PackageMerging

Ubuntu Open Week - Merging Packages 101 - Nicolas Valcárcel - Tue, Apr 29, 2008

[19:00] <nxvl> \o/

[19:01] <nxvl> wooohooo

[19:01] <nxvl> it's merging time!!

[19:01] <nxvl> Hi!

[19:01] <nxvl> We are going to learn how to merge packages

[19:01] <nxvl> But, first of all we need to understand what this merging thing is.

[19:01] <nxvl> On the first stage of our development circle we import packages from debian unstable (sid)

[19:01] <nxvl> and then we start working on them

[19:02] <nxvl> fixing bugs and adding features

[19:02] <nxvl> but if we import all the packages from debian, the work done before will be missing?

[19:02] <nxvl> Well, that's not entirely true.

[19:02] <nxvl> We have 2 ways to import packages from debian: sync and merge

[19:02] <nxvl> To sync a package is to import it from debian as it is, without furter changes.

[19:02] <nxvl> On the other hand we have merging.

[19:03] <nxvl> To merge a package is to take the debian package, and include on it the ubuntu changes

[19:03] <nxvl> but, not all changes, we need to check if the ubuntu changes hasn't been already included on debian.

[19:04] <nxvl> That happends often since in ubuntu we are thankfull with debian and send the patches back to them

[19:04] <nxvl> so they can also take approach of our work.

[19:04] <nxvl> < Raseel> QUESTION: So syncing is usually done for new packages taken       from Debian ?

[19:04] <nxvl> Raseel: good one

[19:04] <nxvl> Raseel: yes, it is

[19:04] <nxvl> Raseel: but not only on this cases

[19:04] <nxvl> Raseel: also we do sync when we haven't change the package in ubuntu

[19:05] <nxvl> Raseel: and when all the ubuntu work has been already included on debian

[19:05] <nxvl>  < rlaager> QUESTION: If I'm interested in getting a new package into

[19:05] <nxvl>                  Ubuntu (by way of Debian), when is the cut-off?

[19:05] <nxvl> rlaager: the Debian import Freeze is the time we don't import anything

[19:06] <nxvl> rlaager: after the DIF we only include special packages

[19:06] <nxvl> rlaager: so you need to ask for an exception to it

[19:07] <nxvl> for Ibex the DIF is going to be on Jube 26

[19:07] <nxvl> June*

[19:07] <nxvl> you can see more of it on https://wiki.ubuntu.com/IntrepidReleaseSchedule

[19:07] <nxvl> Ok have we understand what a merge is?

[19:07] <nxvl> well

[19:07] <nxvl> it seems se did

[19:07] <nxvl> So, now that we have clear the concept of merging i will explain how a merge is done

[19:08] <nxvl> and do a merge with you, so this will be a hands on talk.

[19:08] <nxvl> First of all we need to check what packages need to be merged, since sync is done automatically.

[19:08] <nxvl> and that where MoM goes in.

[19:08] <nxvl> We call MoM our merging tool, which is an acronym of Merge-o-Matic - MoM

[19:09] <nxvl> It can be found on http://merges.ubuntu.com

[19:09] <nxvl> We are going on how to use it later, first we need some tools.

[19:09] <nxvl> First of all we need to create a work directory, i use to use ubuntu/src, but you could use whatever 
you want to

[19:09] <nxvl> From now on we are calling this $WORK_DIR, so please create a working directory for your own.

[19:10] <nxvl> now store the path on the $WORK_DIR variable writting "export $WORK_DIR=/path/to/work/directory"

[19:10] <nxvl> which in my case will be "export WORK_DIR=~/ubuntu/src"

[19:10] <nxvl> ok, now that we have it we need to download the grab-merge script

[19:11] <nxvl> you can find it in MoM, there is a link on the header text which point to it.

[19:11] <nxvl> For making it easier just download it from here: http://merges.ubuntu.com/grab-merge.sh

[19:11] <nxvl> and save it on $WORK_DIR, just write on your terminal:

[19:11] <nxvl> cd $WORK_DIR ; wget -c http://merges.ubuntu.com/grab-merge.sh; chmod +x grab-merge.sh

[19:12] <nxvl> ok, now we will need some packages, we need devscripts, which are packages for doing our packaging work

[19:12] <nxvl> and most important for merging patchutils, so please run:

[19:12] <nxvl> sudo apt-get install devscripts patchutils

[19:12] <nxvl> i will wait a little so you all can download and install them

[19:13] <nxvl> oh! i have a question in here

[19:13] <nxvl> 13:09 <progfou> QUESTION: so, except during the DIF time, any Debian package will be sync'd ?

[19:13] <nxvl> progfou: yes, all the packages that doesn't need to be merged are automatically synced

[19:14] <nxvl> after DIF we need special cases to sync and merge packages

[19:14] <nxvl> ok!

[19:14] <nxvl> so all of you must have the tools installed

[19:14] <nxvl> < Raseel> QUESTION: Which package are we planning to merge ?

[19:14] <nxvl> Raseel: beagle

[19:14] <nxvl> ok, i think we have all what we need now, so let's start

[19:15] <nxvl> i will do a complete, so a "complex" merge, so you understand everything you can see on a merge

[19:15] <nxvl> and later i will do a simple and easy merge if we have time.

[19:15] <nxvl> What we need?

[19:15] <nxvl> just to pick a package and make an empty directory.

[19:15] <nxvl> to pick a package you need to browse the list of packages on MoM

[19:16] <nxvl> as we are new contributor our main focus will be on universe, so go into the universe list:

[19:16] <nxvl> http://merges.ubuntu.com/universe.html

[19:16] <nxvl> There we find a large list of packages, with their ubuntu, debian and base version

[19:16] <nxvl> also we see the last uploader, which is the last person who work on the package, and in some cases the 
uploader

[19:17] <nxvl> QUESTION: as a debian maintainer, is it safe to wait that the  package to merge is in testing ?

[19:17] <nxvl> rZr: nop

[19:17] <nxvl> rZr: we merge from debian sid, not from testing

[19:17] <nxvl> why isn't the person who work on a package the one who upload it? well, as contributor we don't have 
access to the servers

[19:17] <nxvl> < arhimodeg> QUESTION: on apt-get is always the last revision of a  program?

[19:17] <nxvl> arhimodeg: yes

[19:18] <nxvl> < rZr> even when there are know RC bugs ?

[19:18] <nxvl> rZr: yes

[19:18] <nxvl> rZr: we fix them after DIF

[19:18] <nxvl> ok

[19:18] <nxvl> why isn't the person who work on a package the one who upload it? well, as contributor we don't have 
access to the servers

[19:18] <nxvl> so we need a sponsor who will check our work, send us some feedback if something is wrong and/or upload 
it when they are happy with our work

[19:19] <nxvl> but more on this later.

[19:19] <nxvl> We are going to work on beagle

[19:19] <nxvl> so we are going to create an empty directory to work on it and get into it:

[19:19] <nxvl> mkdir $WORK_DIR/beagle ; cd $WORK_DIR/beagle

[19:19] <nxvl> now we need to download the packages to work on them, that's easily done with the script we download 
earlier:

[19:19] <nxvl> ../grab-merge.sh beagle

[19:20] <nxvl> i will give you some minutes so we all have the files we need

[19:20] <nxvl> now we wait until it downloads the debian package and the ubuntu one.

[19:21] <nxvl> most of the work have been already done by MoM, we only need to work on some tunning and the tasks 
which need human intervension

[19:21] <nxvl> rZr: thnx :D

[19:21] <nxvl> ok, if everything is already downloaded we can see a file called REPORT, this is the first thing we 
need to look at

[19:22] <nxvl> in this case we see a CONFLICTS title on it where we can find a line saying:

[19:22] <nxvl>   C  debian/patches/00list

[19:22] <nxvl> That means that on this file we have a conflict and we need to decide what to include and what to 
remove

[19:23] <nxvl> so, open it with your prefered text editor, i prefer vim, so i will use it for the example, feel free 
to use the one you are more comfortable with

[19:23] <nxvl> cd beagle-0.3.4-1ubuntu1/ ; vim debian/patches/00list

[19:23] <nxvl> there we see:

[19:23] <nxvl> <<<<<<< beagle-0.3.3-2ubuntu1 (ubuntu)

[19:23] <nxvl> glib-sharp-2.0-support.dpatch

[19:23] <nxvl> =======

[19:23] <nxvl> fix_system-scripts.dpatch

[19:23] <nxvl> >>>>>>> beagle-0.3.4-1 (debian)

[19:23] <nxvl> now we need to check what this patches are and what to keep

[19:24] <nxvl> doing 'ls debian/patches/' we find that we have the 2 patches in there

[19:24] <nxvl> we need to check at the changelog to decide if we want to delete one of them, we can use dch command 
for this:

[19:24] <nxvl> dch -e

[19:24] <nxvl> there we see that Luca Falavigna added glib-sharp-2.0-support.dpatch on 0.3.3-2ubuntu1

[19:25] <nxvl> (if you are using vim put the cursor on 0.3.3-2ubuntu1 and press space bar

[19:25] <nxvl> but we alse see that Jose Carlos Garcia Sogo disable it on 0.3.4-1:

[19:25] <nxvl>     + glib-sharp-2.0-support: disabled. Included upstream.

[19:25] <nxvl> but there is no explicit change adding glib-sharp-2.0-support.dpatch to debian, but we can assume that 
he include it on 0.3.3-3

[19:25] <nxvl> since the patch has been included to fix FTBFS as well as the change on 0.3.3-3, se we need to check 
what Debian bug #470328 is

[19:25] <nxvl> we can check it on BTS, the debian bug tacker, at 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470328

[19:26] <nxvl> as we see on the report Luca send his patch back to debian, and they include it, so now we are sure 
that the patch was included on 0.3.3-3 and it's save to remove it

[19:26] <nxvl> so we need to remove:

[19:26] <nxvl> <<<<<<< beagle-0.3.3-2ubuntu1 (ubuntu)

[19:26] <nxvl> glib-sharp-2.0-support.dpatch

[19:26] <nxvl> =======

[19:26] <nxvl> and

[19:26] <nxvl> >>>>>>> beagle-0.3.4-1 (debian)

[19:26] <nxvl> from debian/patches/00list and also is a good idea to remove 
debian/patches/glib-sharp-2.0-support.dpatch since we don't need it anymore

[19:27] <nxvl> Then we just need to edit the changelog adding the changes we are keeping, so the changelog entry needs 
to be:

[19:27] <nxvl> beagle (0.3.4-1ubuntu1) hardy; urgency=low

[19:27] <nxvl>   * Merge from debian unstable, remaining changes:

[19:27] <nxvl>     - debian/control:

[19:27] <nxvl>       + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and

[19:27] <nxvl>         and update the dependencies accordingly.

[19:27] <nxvl>       + Change Maintainer to Ubuntu Mono Team.

[19:27] <nxvl>     - debian/rules:

[19:27] <nxvl>       + Install the mozilla-beagle and thunderbird-beagle extensions.

[19:27] <nxvl>     - ice{dove,weasel}.dirs:

[19:27] <nxvl>       + Renamed to {mozilla,thunderbird}-beagle.dirs.

[19:27] <nxvl>       + Fixed paths to point to usr/lib/{firefox,thunderbird}

[19:28] <nxvl>  -- Nicolas Valcárcel <nvalcarcel@ubuntu.com>  Tue, 29 Apr 2008 00:33:30 -0500

[19:28] <nxvl> 13:28 < ScottK> lintian will also kvetch at you if you have a patch system, but  no patches.

[19:28]  * nxvl HUGS ScottK 

[19:28] <nxvl> ok

[19:28] <nxvl> i will slow a little

[19:28] <nxvl> i will wait a bit until everyone is with me again

[19:28] <nxvl> :D

[19:28] <nxvl> if you have questions ask them now

[19:29] <nxvl> i have uploaded my changelog to pastebin

[19:29] <nxvl> http://pastebin.ca/1001989

[19:29] <nxvl> so you can check it clearly

[19:30] <nxvl> are you already with me?

[19:31] <nxvl> raise your hands if you have you changelog already edited: o/

[19:31] <nxvl> < Syntux> QUESTION: do we have to delete the patches files or remove them  from certain file that list 
all patches?

[19:31] <nxvl> Syntux: both

[19:32] <nxvl> Syntux: we need to remove the line containing "glib-sharp-2.0-support.dpatch" from 00list

[19:32] <nxvl> and remove the patch file from debian/patches

[19:32] <nxvl> no one raise his hand :(

[19:33] <nxvl> ok

[19:33] <nxvl> it seems that everyone is still downloading the packages

[19:34] <nxvl> Syntux: yes, sorry about that :(

[19:35] <nxvl> Syntux: i was expeting better broadband from the audience than mine

[19:37] <nxvl> ok

[19:37] <nxvl> i will continue for now

[19:37] <nxvl> if you have still problems downloading you can check at the logs after the session and ping me, i'm always online

[19:37] <nxvl> :D

[19:38] <nxvl> ok

[19:38] <nxvl> so, why we have this o the changelog?

[19:38] <nxvl> we have included this things

[19:38] <nxvl> since the only changes we are keeping are the ones from the last merge.

[19:38] <nxvl> Then is just a matter of generating the debdiff, reporting the bug asking for merge, upload the debdiff 
and ask for sponsorship.

[19:39] <nxvl> Sometimes we are not keeping any ubuntu changes since all of them have been already included in debian, 
then we need to ask for a sync.

[19:39] <nxvl> i have already report the bug and upload the debdiff

[19:39] <nxvl> on Bug #224318

[19:40] <nxvl> https://bugs.edge.launchpad.net/ubuntu/+source/beagle/+bug/224318

[19:40] <nxvl> ScottK: i will apreciate if you sponsor it :D

[19:40] <nxvl> so i was thinking on do another merge

[19:41] <nxvl> but as everyone is still stuck on the first one

[19:41] <nxvl> i will only answer questions

[19:41] <nxvl> :D

[19:41] <nxvl> so, please try to finish the merge

[19:41] <nxvl> and ask questions if you have some

[19:42] <nxvl> < RoAkSoAx> QUESTION: do we have to be on Intrepid Ibex to do the merging?

[19:43] <nxvl> RoAkSoAx: nop

[19:43] <nxvl> RoAkSoAx: but it is helpfull to have a chroot environment

[19:43] <nxvl> RoAkSoAx: i use pbuilder, but you can use whatever you want

[19:44] <nxvl> < Gilou> QUESTION: what is the relationship between ubuntu & deb  developpers? What would happen if 
debian would take too long to  take your patch into account, would you just roll out your own,  and deal with a merge 
(or non merge) later once the patch is  committed (or not) in debian?

[19:44] <nxvl> Gilou: we send our packages back to debian, to contribute to them

[19:45] <nxvl> Gilou: also, not all our patches are used by DD, because the bug is only present on ubuntu, or they 
don't want that feature


[19:45] <nxvl> Gilou: so, if the patch is not included on debian you just need to merge it on the next development 
circle

=== nxvl changed the topic of #ubuntu-classroom to: Ubuntu Open Week | Information and Logs: 
https://wiki.ubuntu.com/UbuntuOpenWeek | How to ask questions: https://wiki.ubuntu.com/UbuntuOpenWeek/Rules | Ask 
questions in #ubuntu-classroom-chat, prefaced with "QUESTION:" | See https://wiki.ubuntu.com/UbuntuOpenWeek/JoiningIn 
to filter out channel noise | Current session: "Merging 101" - Nicolas ValcÃarcel
=== nxvl changed the topic of #ubuntu-classroom to: Ubuntu Open Week | Information and Logs: https://wiki.ubuntu.com/UbuntuOpenWeek | How to ask questions: https://wiki.ubuntu.com/UbuntuOpenWeek/Rules | Ask questions in #ubuntu-classroom-chat, prefaced with "QUESTION:" | See https://wiki.ubuntu.com/UbuntuOpenWeek/JoiningIn to filter out channel noise | Current session: "Merging 101" - Nicolas Valcarcel

[19:47] <nxvl> stani: done :D

[19:47] <nxvl> Gilou: does that answers your question?

[19:47] <nxvl> < Monika|K> Question: You write Change Maintainer to Ubuntu Mono Team ...  should that be MOTU Team?

[19:48] <nxvl> Monika|K: not in this case, the maintainers of beagle are Mono Team

[19:48] <nxvl> Monika|K: since they are the ones in charge of Mono packages

[19:48] <nxvl> Monika|K: but in most cases it will we MOTU or Core Developers

[19:49] <nxvl> Monika|K: but there are also specific cases in which a person is listed as Maintainer

[19:49] <nxvl> < Monika|K> Question: What is beagle and what does it have to do with  Firefox?

[19:49] <nxvl> Monika|K: beagle is a search engine

[19:50] <nxvl> Monika|K: it an app that do files search on our system, it also finds firefox bookmarks

[19:50] <nxvl> Monika|K: but that's a little OT

[19:50] <nxvl> rZr: i have see those logs before, i'm not sure where they keep them

[19:52] <nxvl> < Monika|K> Question: In what cases would a person be listed as  maintainer?

[19:52] <nxvl> on ubuntu we don't use it

[19:52] <nxvl> but there are cases in which the Debian Maintainer is also an Ubuntu Developer and he want's to still 
be the Maintainer of the package in ubuntu

[19:52] <nxvl> or when the package are just synced

[19:53] <nxvl> s/are/is

[19:53] <nxvl> ScottK: isn't it?

[19:55] <nxvl> did you have any last questions?

[19:55] <nxvl> have you all merge the package?

[19:56] <nxvl> if you merge the package raise your hands: o/

[19:56] <nxvl> ok

[19:57] <nxvl> so as i'm getting out of time

[19:57] <nxvl> just a few last words

[19:57] <nxvl> please if you want to be involved on ubuntu, keep in mind that we depend on debian's work

[19:57] <nxvl> and we need to be thankfull with DD

[19:58] <nxvl> so if you have corrected a bug, try to check if it is also present in debian and send them the patch

[19:58] <nxvl> also

[19:58] <nxvl> you need to keep in mind that if someone helps you

[19:58] <nxvl> you need to make 2 things:

[19:58] <nxvl> 1) say thanks

[19:58] <nxvl> 2) hug hime like this:

[19:58]  * nxvl HUGS ScottK 

[19:58] <nxvl> :D

[19:59] <nxvl> thanks to all for comming here

[19:59] <nxvl> if you have problems you can ask in #ubuntu-motu

[19:59] <nxvl> there is always good people around helping new contributors

[20:00] <nxvl> and i hope to see you around

[20:00] <nxvl> 14:01 < rZr> QUESTION: i would appreciate that LP can list rc  bugs thats are  in ubuntu and debian , 
is that planned ?

[20:00] <nxvl> rZr: take a look at ubuntuwire

[20:01] <nxvl> http://www.ubuntuwire.com

MeetingLogs/openweekhardy/PackageMerging (last edited 2008-08-06 16:34:44 by localhost)