== Ubuntu Open Week - Merging Packages 101 - Nicolas Valcárcel - Tue, Apr 29, 2008 == {{{ [19:00] \o/ [19:01] wooohooo [19:01] it's merging time!! [19:01] Hi! [19:01] We are going to learn how to merge packages [19:01] But, first of all we need to understand what this merging thing is. [19:01] On the first stage of our development circle we import packages from debian unstable (sid) [19:01] and then we start working on them [19:02] fixing bugs and adding features [19:02] but if we import all the packages from debian, the work done before will be missing? [19:02] Well, that's not entirely true. [19:02] We have 2 ways to import packages from debian: sync and merge [19:02] To sync a package is to import it from debian as it is, without furter changes. [19:02] On the other hand we have merging. [19:03] To merge a package is to take the debian package, and include on it the ubuntu changes [19:03] but, not all changes, we need to check if the ubuntu changes hasn't been already included on debian. [19:04] That happends often since in ubuntu we are thankfull with debian and send the patches back to them [19:04] so they can also take approach of our work. [19:04] < Raseel> QUESTION: So syncing is usually done for new packages taken from Debian ? [19:04] Raseel: good one [19:04] Raseel: yes, it is [19:04] Raseel: but not only on this cases [19:04] Raseel: also we do sync when we haven't change the package in ubuntu [19:05] Raseel: and when all the ubuntu work has been already included on debian [19:05] < rlaager> QUESTION: If I'm interested in getting a new package into [19:05] Ubuntu (by way of Debian), when is the cut-off? [19:05] rlaager: the Debian import Freeze is the time we don't import anything [19:06] rlaager: after the DIF we only include special packages [19:06] rlaager: so you need to ask for an exception to it [19:07] for Ibex the DIF is going to be on Jube 26 [19:07] June* [19:07] you can see more of it on https://wiki.ubuntu.com/IntrepidReleaseSchedule [19:07] Ok have we understand what a merge is? [19:07] well [19:07] it seems se did [19:07] So, now that we have clear the concept of merging i will explain how a merge is done [19:08] and do a merge with you, so this will be a hands on talk. [19:08] First of all we need to check what packages need to be merged, since sync is done automatically. [19:08] and that where MoM goes in. [19:08] We call MoM our merging tool, which is an acronym of Merge-o-Matic - MoM [19:09] It can be found on http://merges.ubuntu.com [19:09] We are going on how to use it later, first we need some tools. [19:09] 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] From now on we are calling this $WORK_DIR, so please create a working directory for your own. [19:10] now store the path on the $WORK_DIR variable writting "export $WORK_DIR=/path/to/work/directory" [19:10] which in my case will be "export WORK_DIR=~/ubuntu/src" [19:10] ok, now that we have it we need to download the grab-merge script [19:11] you can find it in MoM, there is a link on the header text which point to it. [19:11] For making it easier just download it from here: http://merges.ubuntu.com/grab-merge.sh [19:11] and save it on $WORK_DIR, just write on your terminal: [19:11] cd $WORK_DIR ; wget -c http://merges.ubuntu.com/grab-merge.sh; chmod +x grab-merge.sh [19:12] ok, now we will need some packages, we need devscripts, which are packages for doing our packaging work [19:12] and most important for merging patchutils, so please run: [19:12] sudo apt-get install devscripts patchutils [19:12] i will wait a little so you all can download and install them [19:13] oh! i have a question in here [19:13] 13:09 QUESTION: so, except during the DIF time, any Debian package will be sync'd ? [19:13] progfou: yes, all the packages that doesn't need to be merged are automatically synced [19:14] after DIF we need special cases to sync and merge packages [19:14] ok! [19:14] so all of you must have the tools installed [19:14] < Raseel> QUESTION: Which package are we planning to merge ? [19:14] Raseel: beagle [19:14] ok, i think we have all what we need now, so let's start [19:15] i will do a complete, so a "complex" merge, so you understand everything you can see on a merge [19:15] and later i will do a simple and easy merge if we have time. [19:15] What we need? [19:15] just to pick a package and make an empty directory. [19:15] to pick a package you need to browse the list of packages on MoM [19:16] as we are new contributor our main focus will be on universe, so go into the universe list: [19:16] http://merges.ubuntu.com/universe.html [19:16] There we find a large list of packages, with their ubuntu, debian and base version [19:16] also we see the last uploader, which is the last person who work on the package, and in some cases the uploader [19:17] QUESTION: as a debian maintainer, is it safe to wait that the package to merge is in testing ? [19:17] rZr: nop [19:17] rZr: we merge from debian sid, not from testing [19:17] 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] < arhimodeg> QUESTION: on apt-get is always the last revision of a program? [19:17] arhimodeg: yes [19:18] < rZr> even when there are know RC bugs ? [19:18] rZr: yes [19:18] rZr: we fix them after DIF [19:18] ok [19:18] 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] 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] but more on this later. [19:19] We are going to work on beagle [19:19] so we are going to create an empty directory to work on it and get into it: [19:19] mkdir $WORK_DIR/beagle ; cd $WORK_DIR/beagle [19:19] now we need to download the packages to work on them, that's easily done with the script we download earlier: [19:19] ../grab-merge.sh beagle [19:20] i will give you some minutes so we all have the files we need [19:20] now we wait until it downloads the debian package and the ubuntu one. [19:21] 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] rZr: thnx :D [19:21] 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] in this case we see a CONFLICTS title on it where we can find a line saying: [19:22] C debian/patches/00list [19:22] That means that on this file we have a conflict and we need to decide what to include and what to remove [19:23] 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] cd beagle-0.3.4-1ubuntu1/ ; vim debian/patches/00list [19:23] there we see: [19:23] <<<<<<< beagle-0.3.3-2ubuntu1 (ubuntu) [19:23] glib-sharp-2.0-support.dpatch [19:23] ======= [19:23] fix_system-scripts.dpatch [19:23] >>>>>>> beagle-0.3.4-1 (debian) [19:23] now we need to check what this patches are and what to keep [19:24] doing 'ls debian/patches/' we find that we have the 2 patches in there [19:24] 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] dch -e [19:24] there we see that Luca Falavigna added glib-sharp-2.0-support.dpatch on 0.3.3-2ubuntu1 [19:25] (if you are using vim put the cursor on 0.3.3-2ubuntu1 and press space bar [19:25] but we alse see that Jose Carlos Garcia Sogo disable it on 0.3.4-1: [19:25] + glib-sharp-2.0-support: disabled. Included upstream. [19:25] 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] 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] we can check it on BTS, the debian bug tacker, at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470328 [19:26] 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] so we need to remove: [19:26] <<<<<<< beagle-0.3.3-2ubuntu1 (ubuntu) [19:26] glib-sharp-2.0-support.dpatch [19:26] ======= [19:26] and [19:26] >>>>>>> beagle-0.3.4-1 (debian) [19:26] 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] Then we just need to edit the changelog adding the changes we are keeping, so the changelog entry needs to be: [19:27] beagle (0.3.4-1ubuntu1) hardy; urgency=low [19:27] * Merge from debian unstable, remaining changes: [19:27] - debian/control: [19:27] + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and [19:27] and update the dependencies accordingly. [19:27] + Change Maintainer to Ubuntu Mono Team. [19:27] - debian/rules: [19:27] + Install the mozilla-beagle and thunderbird-beagle extensions. [19:27] - ice{dove,weasel}.dirs: [19:27] + Renamed to {mozilla,thunderbird}-beagle.dirs. [19:27] + Fixed paths to point to usr/lib/{firefox,thunderbird} [19:28] -- Nicolas Valcárcel Tue, 29 Apr 2008 00:33:30 -0500 [19:28] 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] ok [19:28] i will slow a little [19:28] i will wait a bit until everyone is with me again [19:28] :D [19:28] if you have questions ask them now [19:29] i have uploaded my changelog to pastebin [19:29] http://pastebin.ca/1001989 [19:29] so you can check it clearly [19:30] are you already with me? [19:31] raise your hands if you have you changelog already edited: o/ [19:31] < Syntux> QUESTION: do we have to delete the patches files or remove them from certain file that list all patches? [19:31] Syntux: both [19:32] Syntux: we need to remove the line containing "glib-sharp-2.0-support.dpatch" from 00list [19:32] and remove the patch file from debian/patches [19:32] no one raise his hand :( [19:33] ok [19:33] it seems that everyone is still downloading the packages [19:34] Syntux: yes, sorry about that :( [19:35] Syntux: i was expeting better broadband from the audience than mine [19:37] ok [19:37] i will continue for now [19:37] if you have still problems downloading you can check at the logs after the session and ping me, i'm always online [19:37] :D [19:38] ok [19:38] so, why we have this o the changelog? [19:38] we have included this things [19:38] since the only changes we are keeping are the ones from the last merge. [19:38] Then is just a matter of generating the debdiff, reporting the bug asking for merge, upload the debdiff and ask for sponsorship. [19:39] 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] i have already report the bug and upload the debdiff [19:39] on Bug #224318 [19:40] https://bugs.edge.launchpad.net/ubuntu/+source/beagle/+bug/224318 [19:40] ScottK: i will apreciate if you sponsor it :D [19:40] so i was thinking on do another merge [19:41] but as everyone is still stuck on the first one [19:41] i will only answer questions [19:41] :D [19:41] so, please try to finish the merge [19:41] and ask questions if you have some [19:42] < RoAkSoAx> QUESTION: do we have to be on Intrepid Ibex to do the merging? [19:43] RoAkSoAx: nop [19:43] RoAkSoAx: but it is helpfull to have a chroot environment [19:43] RoAkSoAx: i use pbuilder, but you can use whatever you want [19:44] < 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] Gilou: we send our packages back to debian, to contribute to them [19:45] 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] 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] stani: done :D [19:47] Gilou: does that answers your question? [19:47] < Monika|K> Question: You write Change Maintainer to Ubuntu Mono Team ... should that be MOTU Team? [19:48] Monika|K: not in this case, the maintainers of beagle are Mono Team [19:48] Monika|K: since they are the ones in charge of Mono packages [19:48] Monika|K: but in most cases it will we MOTU or Core Developers [19:49] Monika|K: but there are also specific cases in which a person is listed as Maintainer [19:49] < Monika|K> Question: What is beagle and what does it have to do with Firefox? [19:49] Monika|K: beagle is a search engine [19:50] Monika|K: it an app that do files search on our system, it also finds firefox bookmarks [19:50] Monika|K: but that's a little OT [19:50] rZr: i have see those logs before, i'm not sure where they keep them [19:52] < Monika|K> Question: In what cases would a person be listed as maintainer? [19:52] on ubuntu we don't use it [19:52] 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] or when the package are just synced [19:53] s/are/is [19:53] ScottK: isn't it? [19:55] did you have any last questions? [19:55] have you all merge the package? [19:56] if you merge the package raise your hands: o/ [19:56] ok [19:57] so as i'm getting out of time [19:57] just a few last words [19:57] please if you want to be involved on ubuntu, keep in mind that we depend on debian's work [19:57] and we need to be thankfull with DD [19:58] so if you have corrected a bug, try to check if it is also present in debian and send them the patch [19:58] also [19:58] you need to keep in mind that if someone helps you [19:58] you need to make 2 things: [19:58] 1) say thanks [19:58] 2) hug hime like this: [19:58] * nxvl HUGS ScottK [19:58] :D [19:59] thanks to all for comming here [19:59] if you have problems you can ask in #ubuntu-motu [19:59] there is always good people around helping new contributors [20:00] and i hope to see you around [20:00] 14:01 < rZr> QUESTION: i would appreciate that LP can list rc bugs thats are in ubuntu and debian , is that planned ? [20:00] rZr: take a look at ubuntuwire [20:01] http://www.ubuntuwire.com }}}