=== dholbach_ is now known as dholbach === schmidtm__ is now known as schmidtm === Asylo40876 is now known as CaptPizzle === cprov-afk is now known as cprov [16:55] ahem [16:59] *cough* *cough* [16:59] huh [17:00] Hi all [17:00] hi james_w :) [17:01] Is it my session now? [17:01] the floor is yours ... [17:01] sorry, I'm a bit lost, I've just been in a meeting [17:01] Yep it's you [17:01] cool [17:01] let's get started [17:01] who's here for some bzr love? [17:02] indeed [17:02] bizar love sounds funny, I'm in [17:03] cool [17:03] hi everyone, thanks for coming [17:03] my name is James Westby, I'm going to talk about using bzr for your packaging work [17:04] I'm going to go over some of the basics, and you can play along at home [17:04] if you're interested in bzr for packaging then there will be loads of cool stuff happening over the next few months, so keep an eye out [17:05] if I'm going to fast, or I don't explain something well enough then please yell and let me know [17:05] first of all we need to install the necessary tools [17:05] what release of Ubuntu is everyone running? [17:06] Hardy [17:06] 8.04 [17:06] 810 [17:06] hardy [17:06] if you are on Intrepid then "sudo aptitude install bzr-builddeb" is enough [17:06] 8.04 [17:06] if you on Hardy then "sudo aptitude install bzr" [17:06] and you will need my PPA enabled to get the bzr-builddeb I will be using in the demonstration. [17:07] < Serdar> +QUESTION: what does bzr stand for? There is lack of information about that at https://wiki.ubuntu.com/UbuntuDeveloperWeek# [17:07] Serdar: bzr is a version control system, if you want to find out more then you can read bobbo's session from yesterday on bzr [17:08] those on Hardy will want https://edge.launchpad.net/~james-w/+archive [17:08] install bzr-builddeb - 2.0~ppa1~hardy1 from there [17:09] Serdar: https://wiki.ubuntu.com/MeetingLogs/devweek0809/BazaarIntro [17:09] deb http://ppa.launchpad.net/james-w/ubuntu hardy main [17:10] that's the sources.list line for hardy users [17:10] then "sudo aptitude update; sudo aptitude install bzr-builddeb=2.0~ppa1~hardy1" [17:10] then remove the line from your sources.list again so you don't accidentally install something else from there [17:11] on Monday the unstoppable dholbach gave a Packaging 101 session where he looked at the hello-debhelper package [17:11] you can find the log of the session at https://wiki.ubuntu.com/MeetingLogs/devweek0809/Package [17:11] I've prepared a small branch of this package for us to play with today [17:12] so once you have all of the tools installed then please run "bzr branch lp:~james-w/+junk/hello-debhelper" [17:12] you will get a new directory called "hello-debhelper" if you look in there you will see all of the files of the package [17:13] if you run "bzr log" in the directory you can see that this is a bzr branch with a couple of revisions [17:13] shout out once you've got that [17:13] Jep, got that [17:13] * Oli`` shouts [17:13] got it [17:13] nice work [17:15] right, I've just pushed a new revision to my branch for us to play with, so please run "bzr pull" from the hello-debhelper directory [17:16] it should tell you that you have a new revision [17:16] if you run "bzr log" now you will see an extra revision [17:16] to look at the change that I made run "bzr diff -r2..3" [17:16] which means "show me the changes between revisions 2 and 3" [17:16] you'll see that I made a small change to the packaging [17:17] now, it's your turn [17:18] open "src/hello.c" in your favourite editor [17:18] and find the bit that prints "Hello, world!" in a box [17:18] line 115 [17:18] and edit it to say hello to you instead [17:18] win 14 [17:19] oops [17:19] QUESTION: bzr pull returned: No revisions to pull. [17:19] chombium: what does "bzr revno" say for you? [17:19] 3 [17:20] but I got revision 2 and 3 with bzr log [17:20] seems it's ok [17:21] chombium: that's ok, you just grabbed the branch after I had done the push, it won't make a difference [17:21] once you've changed the greeting to say hello to you then save the file and run [17:21] bzr commit [17:21] this will open an editor window in which you should type your commit message [17:21] something like [17:22] Changed the greeting to say "hello" to me [17:22] give me a shout once you've done it [17:22] ok [17:22] done [17:22] done [17:22] ok [17:22] done [17:22] !!! [17:22] done [17:22] !!! [17:22] done [17:23] great [17:23] at this point you could push your work to launchpad, but it's not necessary for this demonstration so we won't [17:23] done [17:23] instead I've got a change to the package that I propose you make in your branch [17:24] I've put this on launchpad for you to look at [17:24] so, you can "merge" this change, and review it, and decide if it is good or not [17:24] if you run "bzr merge lp:~james-w/+junk/hello-debhelper-proposed" [17:24] it will download my changes and try and merge them in to yours [17:25] < mok0> +QUESTION: what would happen if we push the new version? [17:25] mok0: you wouldn't be able to push to the location that you got the code from as only I can [17:26] ok [17:26] you could push to a location that you own, and then either ask me to merge your changes, or simply keep a branch of your own to experiment with for a while [17:27] I see some of you have done the merge and have noticed a conflict [17:28] if you run bzr diff you will be able to see my changes [17:28] at the bottom you can see that I added a message about bzr. [17:29] as you didn't change anything in this area there was no problem in making that change in your tree, so it didn't cause a conflict [17:29] however, I changed the message to say my name, and you did the same [17:30] so we tried to do two different things to the same line, and bzr can't work out what to do [17:30] so it asks for our help [17:30] to do that it marks the area conflicted [17:30] if you try and run "bzr commit" now it won't let you, it tells us to resolve the conflicts first [17:31] open src/hello.c in your editor again, and find the same line as before [17:32] you will see your change, with mine below it [17:32] and <<<<<<<<<< above both >>>>>>>>> below them and ================== in the middle [17:32] these are "conflict markers" [17:32] we need to leave the text how we want, and without these markers [17:33] so you can delete my change, and all of the markers [17:33] or you could delete yours and leave mine [17:33] or you could change the message to say hello to both of us [17:33] or do whatever you want, it's your choice [17:34] so, fix the conflict however you like, and then save the file and run "bzr diff" [17:34] if you pastebin the output I will review it for you [17:35] what about the new hello.c.* files? [17:35] ktenney: we'll deal with those in a moment [17:36] http://paste.ubuntu.com/43096/ [17:37] nice work nasam [17:37] http://pastebin.com/m54562949 [17:38] azmodie: you kept your change [17:38] ? [17:38] yeah [17:39] great, so it's not shown in "bzr diff" as those lines are the same as in the last revision you committed [17:39] ok, so the last step is to tell bzr we are happy with the state of the files now [17:39] run "bzr resolve src/hello.c" [17:40] I kept your change [17:40] the hello.c.* files that ktenney mentioned should now be automatically removed for you, and you will be allowed to commit [17:41] "bzr resolve" will resolve all the files that no longer have conflict markers, so that can be quicker [17:41] once you've done that please commit [17:42] whenever you do a merge you should review the changes, as even when bzr doesn't mark any files conflicted you may not want all of the changes [17:42] now we can try building the package [17:42] that's why we installed bzr-builddeb, as it makes this easy [17:43] run "bzr builddeb" or "bzr bd" for short and you should see it get to work [17:44] there's more you can do, but now you know how to pass changes to packages around, merge them, deal with conflicts, and then build the packages [17:44] that's all I wanted to talk about today [17:44] are there any questions? [17:44] see -chat ... [17:45] Yeah a few of us are getting "bzr: ERROR: A Debian packaging error occurred: Could not find upstream tarball at ../tarballs/hello-debhelper_2.2.orig.tar.gz" [17:45] that's a bug in bzr-builddeb that I think I have since fixed [17:45] can you all try running the command again? [17:45] Now it works [17:46] if it doesn't work second time then it's a new bug [17:46] ok, thanks, that'll be fixed in the next release [17:46] dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2 [17:46] make[1]: *** No rule to make target `distclean'. Stop. [17:46] m [17:47] i had same error but adding the deb source ppa solved it. trying to download origional src ppa: deb-src http://ppa.launchpad.net/james-w/ubuntu hardy main [17:47] they sound like problems with the package [17:47] Let's fix it, then [17:47] I'm not the person to teach you about packaging :-) [17:48] ls [17:49] mok0: I'm not sure why that's failing the build, it should be a non-fatal error [17:49] yeah [17:51] < norsetto> +QUESTION: can bzr bd work with pbuilder? [17:51] if you use plain pbuilder then "bzr bd --builder pdebuild" might do what you want [17:52] I need to work out how to make it play better with things like pbuilder-dist and sbuild though [17:52] what I do for now is build a source package ("bzr bd -S") and then call pbuilder-dist myself [17:52] < kaaloo> +QUESTION : You would still have to update the changelog beforehand ? [17:53] kaaloo: yes, you still have to do the changelog stuff yourself. [17:53] < mok0> +QUESTION: Is there a manpage for bzr bd? [17:54] mok0: no, but "bzr help bd" might help [17:54] also check /usr/share/doc/bzr-builddeb/ for the user manual [17:54] any last questions, as we are almost out of time [17:54] * dholbach hugs james_w [17:54] hey dholbach, I wondered where you were [17:54] * james_w hugs dholbach [17:55] < mok0> +QUESTION: is bzr bd and bzr-buildpackage the same program being run? [17:55] mok0: yes, bzr-buildpackage just execs "bzr bd", it's there more to try and help people find the command [17:56] ok [17:56] right, thanks all [17:56] if you want more then you can talk to me at any time [17:56] thank you james [17:56] and remember [17:56] bzr rocks [17:56] Thanks james_w!! [17:57] well done, james_w :) [17:57] thanks james_w [17:57] thanks james_w! [17:57] thanks james_w! [17:57] thanks james_w [17:57] thanks! [17:58] thanks all [17:58] next up is norsetto himself I believe [17:58] thanks james_w, very enlightening talk! [17:59] lets start then, while the iron is still hot ... [17:59] norsetto: \o/ [17:59] welcome everybody, I'm gonna talk about how to make a package update [18:00] in particular, "all you wanted to know about whats next after dch -i" (at least I hope) [18:00] hi sebner [18:00] do we all know what we mean by a package upgrade? [18:01] no i dont [18:01] anyone ... don't feel shy ... [18:01] upgrading to a new upstream release? [18:01] bobbo: yes [18:01] bobbo: thx [18:01] \o/ [18:02] we do have a package in our repository, foo-1, and upstream just released a new shiny foo-2 [18:02] normally, we would get the update from debian, but there are cases when we don't [18:02] for instance, if debian is in a freeze, or the package is orphaned, or its a native ubuntu package [18:03] or we simply need it urgently, and then pass the result back to debian [18:03] so far so good? please stop me if something is not clear, or I'm too slow/fast [18:04] + QUESTION: If i package a new package for Ubuntu should we notify debian so they get it? [18:04] Coper: yes, definetively [18:05] how? [18:05] ok, so, we now know we have a new upstream version, first thing to do is to get it [18:05] Coper: file a bug in Debian BTS [18:06] Coper: you need to open a RFP or ITP bug in the bts, and submit the package to mentors.debian.net [18:06] Good topic for a lesson! [18:06] we can get the tarball manually, using http or wget [18:06] if there is a watch file in the current package, we can use that [18:07] just check if there is a debian/watch file, or give the command "uscan" at the source tree root [18:08] uscan --verbose just gives you some more info about what it is trying to do [18:08] finally, there could be a get-orig-source target in debian/rules that we can use [18:08] for instance you can do "make -f debian/rules get-orig-source" to execute it [18:09] be carefull to read changelog, copyright and README.Source, the previous packager might mention few things to be doing on the upstream tarball [18:10] like, removing non distributable content, or repackaging [18:10] ok, now that we have an upstream tarball, we need to rename it in accordance to our policy [18:11] foo-2.tar.gz will become foo_2.orig.tar.gz [18:11] like as we would do for a shiny new package [18:12] now, the simplest case is if there are no changes to packaging and no changes outside of debian [18:13] just untar your tarball, copy the old debian dir to the new source tree [18:13] and finally add the new changelog entry [18:13] I wish all updates were this simple :-) [18:13] you still with me? [18:14] ok, more difficult if in the previous package there were changes outside of debian [18:15] for instance the previous packager made inline changes instead of using a patch system, you can check this by checking the old diff.gz [18:16] in this case just copying debian won't be enough, we have to make all those changes outside of debian too [18:16] you can do that manually, or using patch [18:16] for instance "zcat ../foo-1.diff.gz | patch -p1" (given at the src tree root) [18:17] here we can already have some pain, as some of the old changes might not apply anymore, or not apply correctly [18:18] all the above procedure can be automated by using uupdate [18:18] again in the src tree root of the old package, give the comman uupdate ../foo_2.orig.tar.gz and all these steps will be automatically performed [18:19] now, as you should have guessed already, before doing all this we need to know what has changed in the new upstream tarball, and we need to check what the previous packager did with the old package [18:20] any idea how we can check what is the difference between the old tarball and the new ? [18:20] + QUESTION: What's the difference between uscan and uupdate? [18:21] norsetto: diff? [18:21] diff -r old new [18:21] mok0: uscan just check and eventually download upstream tarball, uupdate do the update [18:21] mok0: uscan can also do the update, depend on what it is in the watch file [18:22] sebner: mok0: yes, diff is our friend [18:22] I personally like diff -Nurb [18:22] once you have the diff, you should check line by line and see what has changed upstream [18:22] norsetto: uscan does the update if you add 'debian uupdate' in the watchfile right? [18:23] RoAkSoAx: perfect [18:23] tedious perhpas, but its really necessary [18:24] ok, some example of the things that might have changed upstream and that needs to be considered in the packaging [18:24] one important thing is license [18:24] sometime upstream changes the licensing of their packages, or add new file with new licenses [18:25] there is a tool you can use to help you detect these changes [18:25] its called licensecheck and is in the devscripts package [18:25] licensecheck -r --copyright [18:26] will check all files in all subdirs and also check copyrights [18:26] just an example, you may want to check bug 257664 [18:27] https://bugs.launchpad.net/ubuntu/+source/picard/+bug/257664 since ubottu is on strike [18:27] Launchpad bug 257664 in picard "picard crashed with SIGSEGV in memset()" [Medium,Fix released] [18:27] thanks ubot5, I love you [18:28] thanks for no link :-) [18:28] lol [18:28] you may want to download the old and the new package and see the diff [18:29] as you can see from the changelog I detected some changes in the licensing, and updated debian/copyright [18:29] another example is https://bugs.launchpad.net/ubuntu/+source/source-highlight/+bug/243692 [18:30] Launchpad bug 243692 in source-highlight "web pages with ~ do not underline correctly" [Undecided,Fix released] [18:30] as you can see in this case the license was changed from gpl-2 to gpl-3 [18:31] ok, any other things we should check? ideas? [18:31] what about patches? [18:31] norsetto: update patches to match new files ? [18:32] norsetto: another dependencies or newer versions [18:32] RoAkSoAx: yes, does the old package have patches? Are they still needed anymore? Do they still apply correctly? [18:33] sebner: yes, do we need new build-deps for instance [18:33] sebner: this is usually reported in upstream ChnageLog, but sometime you only discover it by looking at upstream autoconf files (or Makefile) [18:34] another thing to check, if the package includes a man page, check if there are upstream changes that needs to go in there [18:34] and don't forget to update the man page date if you do that ;-) [18:35] any change in file locations? Maybe upstream now isntall files differently, we may need to change our packaging [18:35] will this new upstream version close an bug open in LP? [18:36] if so, close it from the changelog [18:36] is upstream web page changed? [18:36] report the change in control and copyright [18:37] is upstream now shipping a .desktop file, or new icons? [18:37] make sure you install those [18:37] maybe you need to remove those in the old package if they are obsolete [18:38] sometime upstream changes few things which need you to change compilation flags [18:38] for instance, some plugin which are now ON while you used OFF or viceversa [18:38] if upstream is a library particular care has to be taken [18:39] check if API/ABI change is reflected in SONAME/version [18:39] you can use check-symbols or icheck to help you with that [18:40] you may need a library transition, which involves perhpas rebuilding many packages already in the archive [18:40] ok, perhaps at this point it is better to go together through an example [18:40] anyone is working on an update at the moment? [18:41] norsetto: FF :P [18:41] o/ [18:41] nxvl: do you want to tell us which package? [18:41] norsetto: terminator [18:42] but it's not a good example since i maintain it on upstream bzr [18:42] :D [18:42] * bobbo just did three... [18:42] bobbo, ok, sounds good, bug numer? [18:43] bug #249997 [18:43] ubot5: hop hop hop [18:43] Factoid 'hop hop hop' not found [18:44] ok, we also have the new upstream tarball in there :-) [18:44] lets download the old package, create a htop directory and download it with "apt-get source htop" [18:44] (https://bugs.edge.launchpad.net/ubuntu/+source/htop/+bug/249997) [18:44] Launchpad bug 249997 in htop "Package is outdated " [Wishlist,Fix released] [18:45] bobbo: ok your version is in the rchive already :) [18:45] bug 256439 [18:45] https://bugs.launchpad.net/ubuntu/+source/ao40tlmview/+bug/256439 [18:45] Launchpad bug 256439 in ao40tlmview "Please update ao40tlmview to 1.04" [Wishlist,Confirmed] [18:46] ooh, didnt know that, sorry! [18:46] bobbo: no probelm :-) [18:46] ok, lets check this one [18:46] create an ao40tlmview dir and download teh src package in tehre with apt-get source ao40tlmview [18:47] have we all got the current package? [18:48] nobody? [18:49] ok lets check the new upstream tarball [18:49] there is no watch file, no link in the bug report [18:50] we can check copyright and see what is the download location there [18:50] which will give us this location: http://wwwhome.cs.utwente.nl/~ptdeboer/ham/ao40/ao40tlmview-1.04.tgz [18:51] lets get it with wget: "wget http://wwwhome.cs.utwente.nl/~ptdeboer/ham/ao40/ao40tlmview-1.04.tgz" [18:51] now we have to rename it so that its compliant with out policy [18:51] what would the correct name be? [18:52] norsetto: ao40tlmview_1.04.orig.tgz [18:52] sebner: indeed [18:52] lets see what is the diff between these two upstream version [18:52] lets untar the new tarball: tar xzvf ao40tlmview_1.04.orig.tar.gz [18:53] and teh old one: tar xzvf ao40tlmview_1.03.orig.tar.gz [18:54] now we can check the diff: diff -Nurb ao40tlmview_1.03.orig.tar.gz ao40tlmview_1.04.orig.tar.gz > ao40tlmview_1.04.diff [18:54] sorry: diff -Nurb ao40tlmview-1.03 ao40tlmview-1.04 > ao40tlmview_1.04.diff [18:55] as you can see there is only one interesting change [18:56] norsetto: makefile one? [18:56] yes, this has no impact on us however [18:56] so, its a very simple update [18:57] if you check the old package, you will see that there are no changes outside of debian [18:57] so, we just cipy the old debian dir and we add a new changelog entry [18:58] we then rebuild the package [18:58] norsetto: though we have to change maintainer and that stuff [18:59] if the rebuild is ok, we attach the new diff.gz to the bug report and ask a sponsor to upload it [18:59] sebner: yes, if the package was not already an ubuntu package [18:59] sebner: debuild will tell us anyhow ;-) [18:59] ^^ true [18:59] norsetto: and .dsc is not needed at the bug report? [18:59] as you can see this is exactly what RoAkSoAx did, even if he added a coupld of additional changes [19:00] sebner: no [19:00] norsetto: but it was once afaik!? [19:00] ok, thats about it then [19:00] sebner: no, as far as i know it was never required [19:00] O_o [19:00] ok [19:00] norsetto: thanks for this great session :D [19:01] sebner: you may remember interdiff, but that is gone [19:01] norsetto: for an update, we should update the standards-version? [19:01] albert23: you shouldn't in general, unless there is a change that warrants it [19:01] albert23: but adding the watch file is a nice addition [19:02] norsetto: ah yes, interdiff [19:02] any other question before I leave the floor to the next lecture? [19:02] norsetto: sebner@ubuntu:~/merges/ao40tlmview/ao40tlmview-1.03$ uupdate ../ao40tlmview_1.04.orig.tgz [19:02] uupdate: new version number not recognized from given filename [19:02] Please run uupdate with the -v option [19:03] sebner: yes, thats because of the tgz extension [19:03] norsetto: ah only working with tar.gz? [19:04] sebner: it should be ao40tlmview_1.04.orig.tar.gz or ao40tlmview-1.04.tgz (even though I'm not sure the latter will work) [19:04] norsetto: kk :) and shouldn it be licensecheck -r . ? [19:04] sebner: yes, or * [19:04] who is the next lecturer? [19:04] norsetto: kk because you were using --copyright ^^ [19:05] * mathiaz waves at norsetto [19:05] sebner: yes, --copyright also gives you the cipyright it finds in the headers [19:05] hi mathiaz! [19:05] norsetto: hi :) [19:05] so, unless there are further q we can leave the floor to mathiaz, I can asnwer questions in ubuntu-motu anyway [19:06] mathiaz: its all your! [19:07] norsetto: thanks ! [19:08] After this technical session on packaging, I'd like to give an overview about the Ubuntu Server Team, who we are, how you can get involved (and put in practice what norsetto just taught you) and how we work [19:08] Who are we ? [19:09] We are a group of people that have an interest in server related software. [19:09] Most of the information can be found under our wiki pages at: [19:09] https://wiki.ubuntu.com/ServerTeam [19:09] As an extension we tend also to deal with setups found in corporate [19:09] environments, such as directory services (ldap, AD) web services or network [19:10] authentication. [19:10] Some of us are working for Canonical in the Server team. Others have services [19:10] running on Ubuntu and are interested in fixing bugs. [19:10] The Canonical server team is lead by Rick Clark (dendrobates) and composed of: [19:10] Chuck Short - zul, Dustin Kirkland - kirkland, Mathias Gug - mathiaz, Thierry [19:10] Carrez - Koon, they have a generalist profile. [19:11] Soren Hansen - soren, our virtualization specialist. [19:11] Kees Cook - kees and Jamie Strandboge - jdstrand, are member of the Ubuntu [19:11] Security Team. They will make a presentation about the Security team later this [19:11] week. [19:11] Nick Barcet - nijaba, is also working for Canonical as the Ubuntu Server product manager. [19:11] Regular contributors takes on important tasks and lead them to completion. [19:12] some of them include (listed in alphabetical order): [19:12] Adam Sommer - sommer - our documentation guru. He's taken the task to review [19:12] and update the Server Guide. Thus he is in contact with the Documentation team. [19:12] Ante Karamatić - ivoks - another long time contributor to the Server Team. Also [19:12] a member of MOTU, he has looked over the apache package and improved the bacula [19:12] package. [19:13] Neal McBurnett - nealmcb - he has multiple interest: documentation, [19:13] virtualization. [19:13] Nicolas Valcárcel - nxvl - lots of work in bug triagging and packaging. [19:13] He is also involved in the Security team and the MOTU team. [19:13] nxvl kiks ass [19:13] Scott Kitterman - ScottK - main interest are mail services [19:14] If you're interested in postfix or clamav he is the man to talk to. He is also involved with the MOTU team. [19:14] We are a diverse group that have different interests. [19:14] We're also involved in other teams from the Ubuntu project. [19:15] This is one of the caracteristic of the Server Team: [19:15] we all share a common interest in server technologies, but have differents skills. [19:15] Thus being part of the team often means representing the Server Team in other areas of the Ubuntu project. [19:16] Being a contributor to the server team can be taken under different roles: [19:16] The helpers answers questions on the ubuntu-server mailing list and the #ubuntu-server IRC channel [19:16] Triagers dig into bugs the ubuntu-server LP team is subscribed to. [19:17] Our LP team is a bug contact for a list packages, such as samba, openldap, mysql or apache2. [19:17] The current list of packages can be found here: [19:17] https://bugs.launchpad.net/~ubuntu-server/+packagebugs. [19:17] A mailing list gathers all the bugs related to the ubuntu-server team: [19:17] ubuntu-server-bugs@lists.ubuntu.com [19:18] https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs [19:18] This is a great way to start with the LP bug tracker and doesn't require any knowledge of programming languages. [19:18] We're working closely with the BugSquad team - triaggers participate on their mailing lists [19:19] More information about the BugSquad team can be found here: https://wiki.ubuntu.com/BugSquad/ [19:19] And once in a while with have the honor of having our own HugDay where the whole bug triagger community helps us. [19:19] Once bugs have been triagged, it's time to fix them. [19:20] This is when the packagers [19:20] come into the game. [19:20] This role requires an interest in packaging. [19:20] We maintain a list of bugs that are easy too fix: [19:20] https://bugs.launchpad.net/~ubuntu-server/+mentoring [19:21] harvest is another source of bug lists. [19:21] Fixes can get easily make their way into the ubuntu repositories via the [19:21] sponsorship process. [19:21] https://wiki.ubuntu.com/SponsorshipProcess [19:22] Doing work on the packaging front leads to a close a collaboration with the MOTU team and is a great way to gain experience to become a MOTU. [19:22] https://wiki.ubuntu.com/MOTU [19:22] Testers are another way to take part of the Server Team activity. [19:23] This role doesn't require a lot of deep technical knwoledge. [19:23] We work with the Ubuntu QA team - https://wiki.ubuntu.com/QATeam. [19:24] Now that we've passed Feature Freeze, new features and new packages are available in the archive and need to be tested before released for wide spread consumption. [19:24] Here is an example: AD directory integration with likewise-open. [19:25] If you have access to an AD domain, installing ubuntu and testing if you can join the domain with likewise-open is an easy way to contribute to the Server Team right now. [19:25] Testers are now taking a more and more important role as we're approaching release: [19:25] alpha5 and 6 will be followed by Beta on October, the 2nd then RC up to Final on October, the 30th. [19:26] We're responsible for ensuring that the ubuntu-server isos are working correctly, which involves performing a dozen of tests for two isos. [19:26] The list of tests can be found in the wiki: [19:26] https://wiki.ubuntu.com/Testing/Cases/ServerInstall [19:26] Server hardware support is another area where testing is welcome. [19:27] We're trying to make sure that ubuntu can used on the main server hardware, so if you have access to such hardware, popping a cd into the machine, installing a standard ubuntu server and reporting that whether it has successfully installed or failed is an easy way to contribute to the server team. [19:27] This work is coordinated in the ServerTesting Team wiki pages: [19:27] ttps://wiki.ubuntu.com/ServerTestingTeam [19:28] There are also the Documentors [19:29] Browsing the ubuntu-server mailing list archive, lurking in the #ubuntu-server irc channel or going through the forum posts shows patterns in user's questions. [19:29] Recurring themes are identified and turned into documentation. [19:29] A wiki page in the community section of help.ubuntu.com is first created. [19:29] Once the quality has improved, a new section is added to the server guide. [19:30] All this work is undertaken by the Documentors of the Server Team. [19:30] Collaboration with the Documentation team is done on a daily basis to achieve consistency with other help resources. [19:31] More information about the Documentation team: https://wiki.ubuntu.com/DocumentationTeam [19:31] Adam Sommer leads the update and review of the Ubuntu Server guide. [19:31] The document is maintained in a bzr tree. [19:32] Helping Adam will introduce you to docbook and distributed versioning with bazaar. [19:33] Getting started involves following 3 steps outlined in the Server Team Knowledge base: [19:33] https://wiki.ubuntu.com/ServerTeam/KnowledgeBase#Ubuntu%20Server%20Guide [19:33] There is also the option to go over server related wiki pages on the community help pages. [19:33] A good starting point is the Server page that has pointer to lots of howtos. [19:33] https://help.ubuntu.com/community/Servers [19:34] Another hat you can wear in the Server Team is the Developer one. [19:34] They develop new features usually specified during the Ubuntu Developer Summit that takes place at the begining of each release cycle. [19:34] Tracked by a blueprint we have around 3 months to get a new feature into Ubuntu. [19:34] Now that Feature Freeze is in place, we've moved our focus to testing and bug [19:34] fixing. [19:35] Thus the developer roles won't be very active until we release intrepid at the end of october. [19:35] As you can see, contributing to the Server Team can be undertaken in more than one way. [19:36] t usually involves a lot of interaction with other teams from the Ubuntu project. [19:36] It's also a good way to show your contribution to Ubuntu and helps getting Ubuntu membership. [19:37] The GettingInvolved page gives an overview of the roles I've talked about above: [19:37] https://wiki.ubuntu.com/ServerTeam/GettingInvolved [19:37] So how do we work ? [19:38] We track our progress on the Roadmap and meet once a week to discuss outstanding issues. [19:38] Our current work can be tracked on the Roadmap wiki page: [19:38] https://wiki.ubuntu.com/ServerTeam/Roadmap [19:39] We use the ubuntu-server mailing to coordinate our activities, discuss policy change in the team as well as helping out users. [19:39] How to join the Server Team and start contributing ?How to join the Server Team and start contributing ? [19:40] Joining the ubuntu-server team on LP is as simple as subscribing to the ubuntu-server mailing list and applying for membership on LP: [19:40] https://launchpad.net/~ubuntu-server/ [19:41] If you already know which role you'd like to contribute as, you can find a list of tasks in the Roadmap. [19:41] Don't hesitate to ask one of the team members involved in your area of interest. [19:42] Most of the information related to the ServerTeam can be found in the ServerTeam wiki pages: [19:42] https://wiki.ubuntu.com/ServerTeam. [19:43] If you're overwhelmed by all the available information and you're lost, come talk to me. [19:43] I'll help get out of the mist and we'll find a way you can get involved in the Server Team. [19:43] QUESTION: what do developers do during the freeze time? fixing bugs? [19:44] chombium: yes - we switch to bug fixing mode. [19:44] chombium: all of the members of the server team actually take part of the different roles [19:45] chombium: they should be thought of as hat rather then just a unique role [19:45] QUESTION: " They develop new features usually specified during the Ubuntu Developer Summit ..." Does this involves involves knowing some kind of programming language? (If Yes, which are the most common?)) [19:46] RoAkSoAx: new features don't necessarly involve programming langages [19:46] RoAkSoAx: for example, we discuss during last summit migrating openldap to use cn=config instead. [19:46] RoAkSoAx: that involved mainly packaging work (in this case shell scripting). [19:46] mathiaz, so might involve just configuration changes? [19:46] oh ok [19:46] :) [19:47] RoAkSoAx: there are some features that require development work with programming langages [19:47] RoAkSoAx: for example pitti wrote the jockey utility - it was speced out during uds [19:47] RoAkSoAx: and he coded it using python [19:48] QUESTION: is there any preferred programming language for implementation of the features, or its up to the developer to decide? [19:49] chombium: python tends to be the prefered programming language used by the Ubuntu developer community [19:49] QUESTION: And what about requesting or suggesting new howto's for the server guide? For example, what if i would like to contribute with a howto of how to install DRBD? [19:50] chombium: but we're gladly accepting contributions coded in other langages [19:50] mathiaz: i'm searching for a hole which I can fill :) [19:50] RoAkSoAx: I'd suggest to start with a wiki page on help.ubuntu.com/community/ [19:51] RoAkSoAx: once it has matured, you can branch the server guide and add a section about it. [19:51] mathiaz, perfect, thanks. :) [19:51] RoAkSoAx: then you'd send your merge request to the ubuntu-doc mailing. sommer will probably have a look at it and review it. [19:52] RoAkSoAx: https://wiki.ubuntu.com/ServerTeam/KnowledgeBase#Ubuntu%20Server%20Guide <- outlines how to contribute to the Ubuntu Server Guide. [19:54] ok cool :) [19:56] mathiaz- some very important information here, you should post a log of this lecture in a wiki [19:56] arquebus: IIRC the logs will be posted somewhere on the wiki [19:57] ok [19:57] mathiaz: great session, thanks [19:57] arquebus: https://wiki.ubuntu.com/MeetingLogs/devweek0809/ServerTeam [19:57] chombium: thx [19:58] If there are more questions, feel free to email me or ping me in #ubuntu-server [19:58] I'll leave the floor to cprov that will introduce you to the wonderfull world of PPA [19:59] thank you very much mathiaz! [19:59] mathiaz: thanks, you are the ubuntu-server star! [20:00] I guess we can start the 'Introduction to PPAs' session. [20:00] who is here to learn more about PPAs ? [20:01] maybe i am. ;) [20:02] * siretart raises his hand! [20:02] There is a overview document from previous PPA sessions that might be a useful read: https://wiki.ubuntu.com/CelsoProvidelo/PPASystemOverview [20:02] siretart: debian is missing this cool things :P [20:03] you can start asking question while I talk trivialities about what PPA is [20:03] *raises hand* [20:04] I imagine a lot of people already know about PPA (Personal Package Archives) features in Launchpad === mcas_away is now known as mcas [20:05] in few words, it's a groups of services already used to manage and maintain the Ubuntu distribution encapsulated in a way every launchpad user can benefit of it. [20:06] It includes the basic components used for Ubuntu: a upload-processor, a build-service and a repository builder. [20:08] basically, it helps users to get source packages built and published in the same way they would be if uploaded to the Ubuntu distribution. [20:09] The system is in production since the end of the last year, more overall stats can be found at https://edge.launchpad.net/ubuntu/+ppas [20:09] we are already over 1000 active PPAs (yay!) [20:10] laga: QUESTION: when will it be possible to sign packages on the PPA? [20:10] YES :) we are very committed to deliver this features (implemented in a proper way) early in this launchpad milestone. [20:11] laga: QUESTION: i seem to remember reading about a "replay attack" on PPAs. can you comment on that? [20:12] right, replay attacks (someone maliciously re-uploading a PPA package uploaded by a ubuntu maintainer) are completely solved in production. [20:12] PPA changesfiles are stored without the original signature and makes impossible to re-upload them. [20:12] and how was it possible? --verbose ;) [20:13] laga: the original signature is not available anymore, you can't 're-play' [20:13] laga: QUESTION: is there an API for the PPAs, eg to make copying packages into another distro series easier? [20:15] yes, soyuz features will be exposed via the public launchpad API soon (launchpadlib) and we have plans to include PPA features very soon. [20:15] aga: QUESTION: how much buildd capacity is available? how much could one use up without getting smackedß [20:16] laga: launchpad IS team is working hard in increasing the number of available builders, https://edge.launchpad.net/+builds [20:16] laga: that certainly makes build-load less than an issue. [20:17] laga: but we have plans to establish fair limits to avoid some users to make things slower to the others. [20:18] good :) [20:18] stefanlsd: QUESTION: Is there anyway to ensure the PPA's that we are using are safe? Or do we just have to trust the PPA owner? [20:18] stefanlsd: you always have to trust the owner/uploader [20:19] the PPA system guarantees the binaries you will be installed were in fact generated from the corresponding source [20:19] also, when signed, will guarantee that you will be installing exactly what you aim to. [20:20] but it can't really guarantee that the binary is not doing any malicious task in you system, the users/communities have to audit it somehow [20:22] We thought about creating a recommendation/voting system on top of the current PPAs, but that's just speculation. I'd be really interested in listen to ideas about this topic. [20:22] laga: QUESTION: do the ppas take orig.tar.gz from the main archives? [20:23] laga: yes, uploaders can easily re-use origs from the Ubuntu Primary archive, it saves a lot of bandwidth and makes package diffs clearer. [20:23] mok0: QUESTION: Is the PPA software available so I could have my own system running at home? [20:24] mok0: not yet, it is still part of Launchpad. [20:24] :-( [20:24] mok0: it also means that when LP goes free it will be available :) [20:24] :-) [20:24] laga: QUESTION: when will support for debian packages be available? [20:25] laga: yes, we are organising the infrastructure to start supporting it. [20:26] laga: in way we can improve the collaboration between debian and ubuntu. [20:26] awesome [20:27] for instance, we plan to, when it's the interest of the user to have a debian PPA as a 'mirror' of the ubuntu one, in way that all package successfully built in the ubuntu PPA will be automatically pushed to the debian PPA. [20:27] what do you think about it ? [20:30] are you perplexed with this idea ? [20:30] that sounds great! [20:30] cprov: really great!" [20:30] cprov: I suppose sid chroot? [20:31] siretart: yes, the way it saves time on the developer side is nice. [20:31] sebner: yes, unstable, because that's where they can be uploaded in debian. [20:32] cprov: ah, sure ^^. Great! EST? [20:32] siretart: QUESTION: is a 'backport this package' button planned? - what's the spec name if yes? [20:34] siretart: yes, we plan to implement this and also native-debian-syncs as part of a more structure and reliable way of merging/diffing two different archives (repositories) [20:36] siretart: it would check/prepare a proper version and also compose a proper changelog for backports/syncs. [20:36] siretart: making such tasks easier and more reliable. [20:36] \o/ [20:37] siretart is now complety satisfied ^^ [20:38] * siretart cant await using it :) [20:38] there is also another feature planned related with supporting backports in PPA that involves giving the users the ability to set the required archive dependencies for a PPA in order to build backports using what is already available in the corresponding ubuntu backports. [20:39] sebner: QUESTION: cool new features are planned but do we see them in *near* future? EST? [20:40] sebner: I do see them all done in the next 4 months, at least, signed-ppas & the debian-support [20:40] cprov: /me is happy to be a LP beta tester :P [20:42] We are also glad to have this army of very bright users working on our side. LP is only helping you to change the world! [20:44] siretart: QUESTION: are any new architectures planned for the near future? [20:44] not really, we are following XEN in this journey. [20:45] I've heard (read) some news about the SPARC support, but I'm no expert. [20:49] do you have any suggestions for improving the current documentation ? https://help.launchpad.net/Packaging/PPA [20:50] I personally miss a more hands-on packaging guide, successfull use-cases / workflows based on PPAs [20:51] the best way to improving the experience when using PPAs, IMHO, it making easier to see how the current users have solved their problems. [20:52] I've found a very interesting post indexing useful PPAs -> http://ubuntudoctor.com/content/blog/The-Personal-Package-Archives-Index [20:54] and I guess that's it for today, another very interesting round of PPA questions & answers session, I hope you liked it. [20:55] cprov: it was great. thanks very much :) [20:56] please, keep the suggestions coming, we are willing to provide the most complete and easiest service for building and distributing software for debian-like systems. [20:56] when filling bugs, don't forget: product -> soyuz and tag: ppa [20:57] I'm leaving the stage for huats & didrocks with their "Various ways to patch a package" [20:58] thank you, guys === cprov is now known as cprov-afk [20:58] cprov-afk: : thx again and I'm looking forward to these shiny cool new features ;) [20:58] thank you very much cprov, it seems to not be very crowded. We will wait 10 minutes :) [20:59] didrocks: okay, good luck! [20:59] thanks cprov-afk [20:59] cprov-afk: thx :) [21:00] huats: didrocks : \o/ [21:02] ok, I think this is the time :) [21:02] huats: are you ready? [21:03] so, waiting for huats, who is around? :) [21:03] o/ [21:03] o/ [21:04] I am here :) [21:04] \o [21:04] great, so, I think there is no need to use -chat for the questions [21:04] just ask them here prefixing them with QUESTION: [21:04] Welcome to the hands-on training session about how to patch Ubuntu source packages! [21:05] First, we really want to thank pitti for his previous sessions on february from which this session is largerly inspired of. === mcas is now known as mcas_away [21:05] this session intends only to go through the different patches system encountered in various packages. It will not teach you how to create a package or what a package is composed of. For this, see dholbach's excellent session on this (https://wiki.ubuntu.com/MeetingLogs/devweek0809/Package). [21:05] really focus on doing stuffs that we are showing you and not taking notes. This is an hands-on demo! The IRC log will be available at https://wiki.ubuntu.com/MeetingLogs/devweek0809/PackagePatches when the session will be over. [21:05] please install few packages during the general introduction of what is a patching a source (for that, you have to have the deb-src repository activated in your source.list) [21:05] sudo apt-get install dpatch cdbs quilt patchutils devscripts debhelper fakeroot [21:05] mkdir patchtraining [21:05] cd patchtraining [21:05] apt-get source cron udev keepalived ed xterm [21:06] wget http://people.ubuntu.com/~pitti/scripts/dsrc-new-patch [21:06] chmod 755 dsrc-new-patch [21:06] for those who have already followed pitti's sesssion, we are taken the same examples (namely cron, udev, keepalived, ed and xterm) as they are little pacakges which illustrates each one "one way to pach a source". [21:06] So, during the dowload time, just a quick introduction [21:06] == Why use separate patches? == [21:07] in earlier times, people just applied patches inline (ie. directly in the source code tree). [21:07] however a package contains a diff.gz file, showing the differences beetween the pristine source and every modifications made by downstream, this makes it very hard to extract patches later to modify them. [21:07] (tell me is I speed to much) [21:07] indeed, how to distinguish the patch you wish to extract and the other modifications? How to send simply only your modification to upstream (as their development has gone further since, so every patches aren't good to be applied...)? [21:07] also this means that new upstream versions are a pain, since they generate a lot of rejections when applying the package diff.gz to them. [21:08] so, using separate patches is clearly a good way to ensure it will be easy for you and for other's to add/remove a patch when it will be no more usefull. [21:08] the ideal state is a complete unmodified tarball from upstream, plus the packaging bits in debian/ and all the clean and separate patches in it. [21:08] to sum up, that mainly means that "lsdiff -z .diff.gz" only contains "debian/" [21:08] the first idea was to create regular patch files and store them in debian/patches/. Then, adding some patch/patch -R snippets to debian/rules. This worked for small patches, but provided no tools for editing these patches, updating them for new upstream versions, etc. [21:09] this is way several standard patch systems were created. Those are easy enough to use and provide some tools for editing previous patch, applying one or more patch, unapplying others... well... just to play :) [21:09] hands on when you will be here and/or if you have questions :) [21:09] \o/ [21:09] sebner: is everything ok? [21:10] didrocks: sure ^^ [21:10] every downloads are finished? [21:11] didrocks: wait a bit more... [21:11] ok huats ;) [21:11] if anyone have a question, this is the right time :) [21:11] questions already ? [21:12] ;) [21:12] hum, well, everything's fine, so enough speech, time to play! Are you ready to put your hands on? ^^ [21:13] let's assume yes :D (it is late, let's say that some people will read the log :)) [21:13] \o/ [21:13] == cron example: inline patches == [21:13] the first package is the simplier one, with no patch system at all. A counter-example against the "old" style of packaging, that you surely not follow appart from the original maintainer use this. [21:13] with this "system", we directly edit the code in the source tree, reposing in the fact that those content will be available in the diff.gz, but all mixed together... making this very inconvenient for submitting patches upstream. [21:14] ... or reviewing for merges (patch 1 is fixed in the new upstream version, but not patch 2), how to easy know which files to take? [21:14] if you do 'lsdiff -z cron*.diff.gz', you see changes which are not in debian/. So, you can see that we have such a package. [21:14] (you can try it right now) [21:14] you can also take a look at it to see how all patches are lumped together. Can anybody in a second told me to which files corresponds the current statement "Use latest lsb logging functions" in the changelog? [21:15] … I am sure, you can't :) No file explicitely declared in the changelog and you will strike… [21:16] if you have any question regarding this way of "not patching", this is the right time :) [21:16] lsdiff if very great to determine in a diff.gz file has other directories/files than just debian/ one [21:16] does anybody is following ? are we moving too fast ? please tell us right now :) [21:17] I'm following :) [21:17] me too :) [21:17] ok great ! [21:17] yeah, two people are alive \o/ [21:17] sorry didrocks but it was neede I think :) [21:17] QUESTION: what does the -z option does? *too lazy to search manpage* [21:17] it is for the compression sebner [21:18] it tells than the diff file is a gunzip one [21:18] so, compressed, yes :) [21:18] k, thx :) [21:18] and yes I'm also here ^^ [21:18] just look again at the diff.gz to see how packaging and code changes are wildly mixed and, let's move on the first (and the most manual) patch mechanis [21:18] sebner: thanks ;) [21:19] == udev: separate patches, but no standard/automated patch system == [21:19] this is the logical evolution of the previous statement. Let's patch something by doing some diff between the previous states of the source code and our one. [21:20] so, everything has to be done manually, making it the most complicated patch system. All others patch system relies on this one and automate it. So, you will first have to understand how it works "beyond the gears" (no no, not Google one ;)). [21:20] due to this complexity, this manual mechanism is rarely used by maintainers, and even it can appears as being difficult for people who has never done this before, you will have to understand it to see how patch system works. [21:20] so please, do not hesitate to ask questions. As we are the latest, we have (almost) all the night/the rest of the day, depending your time (Ok, we want to sleep also ;)). [21:21] pitti strongly advise you to print and hang over your desk this general approach, so, I will quote him :) [21:21] 1. copy the clean source tree to a temporary directory /tmp/old [21:21] 2. apply all previous patches up to the one you want to edit; if you want to create a new patch, apply all existing ones (this is necessary since in general patches depend on previous patches). [21:21] 3. copy the whole source tree again: cp -a /tmp/old /tmp/new [21:21] 4. go into /tmp/new, do your modifications [21:21] 5. go back into /tmp and generate the patch with diff -Nurp old new > mypatchname.patch [21:22] 6. move the newly generated patch to /debian/patches/mypatchname.patch [21:22] diff -Nurp is used because, in general, we want the following diff options: [21:22] -N -> include new files [21:22] -u -> unified patches (context diffs are to read) [21:22] -r -> recursive [21:22] -p -> bonus, you can see the name of the affected C and some other language function in the patch [21:23] anybody has a question about the principal method? [21:23] (we will do a hands-on example now, to burn this in your mind forever :)) [21:24] lets get our hands dirty :) [21:24] chombium: hehe, sure you will :) [21:24] so, if there is no question, let's move on [21:24] open a shell in you favorite console tool! [21:25] $ cd udev-* # -117 on hardy and -124 on intrepid [21:25] => we are now in our original source tree where we want to add a new patch [21:25] $ cp -a . /tmp/old [21:25] => we create a copy of the clean sources as reference tree (always use name like old, origin, pristine...). We have done with step 1 [21:25] $ pushd /tmp/old [21:26] does everybody know pushd? [21:26] nope [21:26] the directory stack :) [21:26] Kurt: yes :) [21:26] => "pushd" is equivalent to cd, but it will use a stack for to remember the previous directory, so, that it will be easy later to go to our directory with "popd" [21:26] sebner: is it ok? [21:27] didrocks: ah I already heard of it but forgot it ^^ /me is quite tired already ^^ [21:28] sebner: be brave, it's time to manipulate :) [21:28] $ debian/rules patch [21:28] => all well-configured debian/rules file has a "patch" (or patch-stamp, apply-patch, setup, unpack...) target that able us to apply every existing patch in debian/patches/ or something similar. This is better than applying all patches one by one, in the right order with the "patch" command. You have to look in debian/rules how it is called. [21:28] ^^ [21:29] If you just want to apply a subset of patch to modify an existing one, you will (but we will not treat this case in this example) only apply them manually (with patch command). [21:29] QUESTION: cp -a ./tmp/old returns cp: missing destination file operand after `./tmp/old' [21:29] Step 2 is now over [21:29] chombium: this is a space beetween . and / [21:29] you copy the current directory . to /tmp/old [21:29] didrocks: tx [21:29] got it :( [21:29] you're welcome :) [21:30] has everyone applied their patch? [21:30] just shout when it's done :) [21:30] * Ampelbein shouts [21:30] * didrocks is afraid :) [21:31] done [21:31] chombium: ok? [21:31] * sebner will read the logs tomorrow again xD /me -> bed [21:31] o/ [21:31] ok sebner bye [21:32] didrocks: yes [21:32] sebner: good night. Sleep time has triumphed :) [21:32] great! [21:32] huats: didrocks : great work so far. ROCK ON and I'll read the logs ;) [21:32] let's go on [21:32] sebner: contact us on IRC if you have any question in reading the log :) [21:32] (huats or I) [21:32] kk, gn8 fols [21:32] ok, so, next step is [21:33] $ cp -a . /tmp/new; cd ../new [21:33] chombium: be careful, there is a space again :) [21:33] => just copy the content with applied patches to /tmp/new where we will begin to work with. This corresponds to step 3. [21:33] so, at this time, /tmp/old and /tmp/new are identical [21:34] didrocks: :) [21:34] both contain the patched source code [21:34] Now, let's hack and make a new beautiful patch: [21:35] $ sed -i 's#Linux#GNU/Linux#g' README [21:35] RMS will enjoy, I'm pretty sure! This simply replace all Linux instance in the README file by GNU/Linux one. You can obviously hack with the tools you prefer (editors like vim/emacs or IDE like eclipse/anjuta/kdevelop). [21:35] just do the changes you desire with the tool you want. As the idea is to keep it minimal here, sed will be ok for us :) This step 4 can length a long time before being completed. [21:36] * didrocks hopes everyone know sed :) [21:36] are you ok? [21:36] didrocks: depends on the bugs we need to take care of ;) [21:36] I am [21:36] me too [21:36] chombium: yes, of course :) [21:37] it's time to create the patch now! For this, we will compared the old tree to the new one (all have previous patches applied, appart from your current hack and extra work). [21:37] $ cd .. [21:37] => for this, we prefer to go back to /tmp (the patch that we would see will state /tmp/old/README vs /tmp/new/README which is better than comparing ../old/README vs README) [21:37] $ diff -Nurp old new > 90_happy_rms.patch [21:37] => so there, we compare the previous source (old) to our hacked tree (new). And we put the differences in the file 90-rms.patch [21:38] oupss, 90_happy_rms.patch [21:38] Step 5 completed! (ignore the 'recursive directory loop' warnings) [21:38] is your patch created? [21:39] yes [21:39] note that it is a good idea to use number prefix for patch names as generally they will be applied in a asciibetical order. As many patches depends on others (ie. you modify a file that is already modified by a previous patch, so the context of the patch has changed), you ensure that everyone will apply that in the same logical order. Some patches will not applied in the pristine code! [21:39] $ popd [21:39] => as previously said, as we have stacked the previous directory, this will lead you the recorded one [21:39] $ rm -rf /tmp/old /tmp/new [21:40] => it's everytime a good idea to clean what has to be cleaned, as we will never use that again :) [21:40] $ less /tmp/90_happy_rms.patch [21:40] => have a look at your patch (you can use gedit/kate if you prefer) to see to what it looks and ensure everything seems fine. [21:40] I notice that SELinux was replaced by SEGNU/Linux [21:40] tell me when everything is all right. Just a few step has to be done now [21:41] Kurt: yes, so, when you use sed, be careful with what you do :) [21:41] didrocks: heh :) [21:41] this is the case here, but sed was just use to make a quick hack [21:41] used* [21:41] $ mv /tmp/90_happy_rms.patch debian/patches [21:41] => copy the patch to the patches directory of your current source package directory (remember, you are in ) so that your debian/rules will be able to find it and apply it during the build of the package. [21:41] Kurt: the regular expression was bad [21:41] => Step 6 done! We can take a breath, our patch is perfect ;) [21:42] chombium: yes, I know. That was not the goal of this classroom to teach regular expression :) [21:42] ping when you are ready! [21:42] you can test in calling debian/rules patch and confirm that your patch apply correctly! [21:42] didrock: yes rigth. I was just explaining to Kurt [21:43] lol yeah I was just making a remark, I realized what had happened. Sorry for the fuss :) [21:43] seems good [21:43] Kurt: no problem :) [21:44] Kurt: but that shows that you are following, that's good! [21:45] are you all right? [21:45] just 2 remaining persons apparently :) [21:45] I am [21:45] o/ [21:45] obviously, this is not trivial for a complete beginner, but after doing this a couple of times, you should understand exactly what is involved and how it work with every system patches. [21:45] so, let's confess that doing this everyday is simply tiring and boring. The idea will be more to concentrate on hacking and fixing stuff than generating the patch itself. [21:45] Pitti has created a script called "dsrc-new-patch" for automating this, and we will see later that other patch systems have something quite similar. [21:46] $ cd ..; rm -r udev-*; dpkg-source -x udev_*.dsc; cd udev-* [21:46] => First, let's clean our work and download again an untouched udev-* source tree. [21:46] step 1 to 3 are completed in simply calling the script: [21:46] $ ../dsrc-new-patch 90_happy_rms.patch [21:46] => it drops you into a shell where you can edit the code and hack whatever you want [21:47] $ sed -i 's#Linux#GNU/Linux#g' README [21:47] (yeah, the same bad regexp again :)) [21:47] => make all your modification and then, press or type "exit 0" to leave the subshell. [21:47] then, step 5 & 6 are automatically completed. Nice, isn't it? You will have a debian/patches/90_happy_rms.patch which is exactly the same than the one you created before. [21:48] Are both of you created successfully the patch? [21:48] s/Are/does [21:48] I got stuck at the $ ../dsrc-new-patch 90_happy_rms.patch part [21:48] yes [21:49] Kurt: wrong paste, maybe? What is doing the script? [21:49] $ ../dsrc-new-patch 90_happy_rms.patch [21:49] oops [21:49] so, when you execute it, you will see a new shell [21:49] then, you perform your modifications [21:50] and then "exit 0" or [21:50] (to return to your previous shell) [21:51] Kurt: don't hesitate to ask some more question if you still get stuck [21:51] I think Kurt is lost in its subshell :) [21:52] sorry, I didn't see the wget for the dsrc up there [21:52] catching up now :) [21:53] :) [21:53] ok ! [21:53] if you like the script, you can put it in your $PATH (~/bin is a good place for that). [21:53] so, doing this by hand or automatically, always remember (as previously said) to apply the patch in the right order. [21:53] dsrc-new-patch is a hack which mostly works for packages without a real patch system, but split-out patches [21:54] but appart from this hack, some patch system has been invented so that hacker can be more concentrated on the code than the tools to generate the result of their work. That's the reason why they are used by 90% of the archive's sources packages. [21:54] for the remaining one, you will have to complete the previous manual approach. [21:54] if there is no more question (shout NOW!), let's look at the most popular ones now. [21:54] didrocks: did you see my question in ubuntu-classroom-chat? [21:55] laga: sure... [21:55] the rocking huats is going to go on on the session to present you some rocking patch system [21:55] he will answer there :) [21:55] ok guys. [21:55] yes :) [21:55] yay [21:55] QUESTION: not following the tutorial right now, but i wonder if you have a good way to mangle the patch level (ie file paths) in patches. that's often useful if you take patches from other sources [21:55] laga: do you speak about the patch system? [21:55] how to determine the patch system of a package? [21:56] didrocks: switch to -chat :) [21:56] First of all thanks didrocks ! That was great :) [21:56] laga: ok, will continue on -chat :) [21:56] thx huats ;) [21:56] Right now we will focus on patching systems... [21:57] of course the old way, that didrocks showed us are nice [21:57] but you'll enjoy evoluates systems too ! [21:57] first of all [21:57] let's have a look at dpatch ! [21:57] To do so, we'll use ed [21:58] so if you have the sources [21:58] cd ../ed-07 [21:58] is it ok for everyone ? [21:58] (well for both of you :)) [21:58] yes for me [21:58] yes [21:58] ok [21:58] great [21:58] A few words on dpatch, let me quote master pitti : [21:58] "dpatch is a pretty robust and proven patch system which also ships a script 'dpatch-edit-patch' packages which use this build-depend on 'dpatch', and debian/rules includes 'dpatch.mk' [21:59] The two most important things you should be aware of: [21:59] * dpatch does not apply debian/patches/*, but instead applies all patches mentioned in debian/patches/00list, in the mentioned order. That means that you do not have to rely on asciibetical ordering of the patches and can easily disable patches, but you have to make sure to not forget to update 00list if you add a new patch. [21:59] (forgetting to update 00list is a common cause of followup uploads :-) ) [21:59] * dpatch patches are actually scripts that are executed, not just patches fed to 'patch'. That means you can also do fancy things like calling autoconf or using sed in a dpatch if you want." [21:59] huats: slow down! [21:59] nxvl: sure :) [21:59] o/ nxvl [22:00] dpatch comes with some interesting scripts to enables us to get info/manipulates patches. Their names are quite explanatory, by instance dpatch-list-patch will list you all existing patches in the packages. [22:00] dpatch-list-patch [22:00] if you type that in your current shell [22:00] you'll have the whole list [22:01] of patches, with their corresponding authors and descriptions [22:01] But by far, you'll mostly use dpatch-edit-patch. This is the command that will enable you to create/modify a dpatch ! [22:01] Let's start with editing a patch : [22:01] type : [22:01] dpatch-edit-patch 07_ed.1-spelling-fixes [22:02] (note that 07_ed.1-spelling-fixes is a current existing patch) [22:02] You are now in a new shell were the patch is already applied. You can edit the files you want. [22:02] By instance: [22:02] $ echo "UbuntuDevWeekAugust08" >> README [22:03] Once you are OK with your results, just press Ctrl+D. [22:03] Otherwise, if you are not happy with your changes, exit the shell with a non zero value, by instance exit 230. [22:03] The patch will be untouched ! [22:03] but in that case type exit 0 [22:03] now simply look at the debian/patches/07_ed.1-spelling-fixes file [22:04] at the end of the file you'll notice what e have added... [22:04] is it ok for everyone ? [22:04] cool [22:04] yep [22:04] ok [22:04] chombium: too ? [22:05] yep [22:05] ok great [22:05] Now let's create a patch ! Here again we'll use dpatch-edit-patch. [22:05] $ dpatch-edit-patch 08_developper_week_patch [22:05] If you are not happy with your changes, exit the shell with a non zero value, by instance exit 230. [22:05] The patch will not be created ! [22:05] You are once again in a new shell. You can edit the files as you want. [22:06] (it is the same process than for editing) [22:06] once again [22:06] do [22:06] echo "UbuntuDevWeekAugust08-again" >> README [22:06] and press Ctrl+D [22:07] The patch has been created [22:07] But so far it won't be applied automatically [22:07] Does anybody can tell me why ? [22:07] because of petential order conflict [22:07] huats: It's not in 00list. [22:07] it isn't in the 00list? [22:07] hggdh: nope [22:08] cocooncrash: and Kurt exactly [22:08] what I meant isL it is not in 00list [22:08] because of ... [22:08] ok hggdh [22:08] so it can be done with [22:08] echo 08_developper_week_patch.dpatch >> debian/patches/00list [22:08] Please have a look at the file debian/patches/08_developper_week_patch.dpatch [22:08] Note that exacly like in the debian/changelog you need to put your name and email in the patch ! [22:08] You also have to edit the description of the patch. It is the line that follows ## DP: [22:08] So please do it. Having one of them missing is a very common cause for a sponsor to refuse your request ! [22:09] Note that you can create your patch in relation with another patch. Simply add the patch you want to be applied before your on the command line. Like that: [22:09] $ dpatch-edit-patch 08_developper_week_patch 07_ed.1-spelling-fixes [22:09] 07_ed.1-spelling-fixes has not been chose randomly. The output of dpatch-list-patch has showed us that it was the last one to be applied. [22:10] And indeed here notice that all patches are applied. How do I notice that ? [22:11] QUESTION: will the patches be sorted by the file name when adding in 00list? [22:11] chombium: yes [22:12] huats: not sure [22:12] hum [22:12] no [22:12] they will be treated in the file order [22:12] chombium: it's the file order [22:12] :) [22:12] sorry I missread [22:12] just copy one question from -chat [22:12] QUESTION: if i take a patch from another source and turn it into a dpatch, do i still need to put my name as the author? [22:12] laga: you have too [22:12] otherwise you'll have lintian warnings [22:12] (for the log) [22:13] hum [22:13] once again I missread [22:13] you have to put the author name [22:13] QUESTION: Should you put your name or the original author? [22:13] (not yours in that case) [22:13] huats: yes, it's getting late, I know :) [22:13] but put a name is needed... otherwise lintian will complain [22:13] we love huats [22:14] * nxvl waves on huats [22:14] :) [22:14] the answer of my question was that you'll notice : patch XXXX apply on [22:14] * didrocks is jalous :) [22:14] before getting the subshell [22:14] That was pretty simple right ? [22:14] any other questions with dpatch ? [22:15] Oh one last word about dpatch. It is needed to modify the debian/rules file (for automatic patching and unpatching). But I won't demonstrate that now. If you want to see how to do that, have a look at the debian/rules file and search for patch :) [22:15] QUESTION: new patch, new version number. How is it done under DPATCH? [22:15] you have to choose the number [22:15] yourself [22:15] version number ? [22:16] version.release.subversion etc. So no auto-increment? [22:16] hggdh: Patches don't affect the package version number. That is determined by the changelog entry. [22:16] * nxvl waves on didrocks too [22:16] hggdh: cocooncrash has answered :) [22:16] :-) [22:16] hggdh: didrocks will explain that to you on -chat [22:16] (nxvl: thanks, you rock :)) [22:17] let's move [22:17] since we already have lasted longer than supposed... [22:17] == keepalived : cdbs with simple-patchsys == [22:17] Let's move to cdbs. For this example we'll have a closer look at keepalived (once again pitti example). [22:17] oups [22:17] it was not pitti example [22:17] :( [22:17] it is getting way to late :) [22:17] cd ../keepalived-1.1.15 [22:18] First let's have a look at debian/rules. [22:18] You'll notice that the only reference to the patching system include simple-patchsys.mk [22:18] Pretty magic :) [22:18] pitti has the good idea to write a script called 'cdbs-edit-patch' that works closely like dpatch-edit-patch. [22:18] This script is contained in the normal cdbs package. [22:18] You just supply the name of a patch to the script, and depending on whether it already exists or not, it will create a new patch or edit an existing one. [22:18] Let's add a new patch ! [22:18] $ cdbs-edit-patch 05-simple-readme.patch [22:18] $ echo 'This should document keepalived' > UbuntuDevWeek.README [22:19] [22:19] Here again if you are not happy with your changes, just type exit 230 in the subshell. [22:19] The edition of an existing patch work exactly the same way... [22:19] Questions ? [22:20] (I won't be long here since it is pretty the same thing than dpatch-edit-patch) [22:20] QUESTION: Are the patches still stored in debian/patches? [22:20] cocooncrash: it is the debian policy yes [22:20] QUESTION: Is 00list is used, or are all patches applied? [22:20] 00list is for dpatch [22:21] and only patch in it will be applied [22:21] Is it ok for everyone ? [22:21] yep [22:21] If so, I am moving on :) [22:22] == xterm: quilt == [22:22] The last patch system that we will detail is quilt. We will study it on xterm. [22:22] It is non-trivial to set up and has a lot of advanced commands which make it very flexible, but not very easy to use. [22:22] $ cd ../xterm-229 [22:22] Like dpatch, it has a list of patches to apply in patches/series (to use debian/patches, packages need to add a sylink) or set $QUILT_PATCHES to debian/patches [22:23] it is needed to respect the debian policy for patches... and thus to satisfy your question cocooncrash [22:23] Let's have a look at debian/rules. You'll notice the line that does the trick : [22:23] QUILT_PATCHES = patches/ [22:23] So to work right now, let's export that right now (since we won't use debian/rules tonight) [22:23] $ export QUILT_PATCHES=debian/patches [22:24] Unlike cdbs-edit-pattch, and dpatch-edit-patch, quilt doesn't create temporary directories with a copy, but remembers old versions of the files and uses the normal working tree a bit like version control (svn, bzr, etc.). [22:24] Now let's edit the already existing patch 901_xterm_manpage.diff: [22:24] $ quilt push 901_xterm_manpage.diff [22:24] This will apply all patches (inline remember) in the stack up to the given one. [22:25] Now let's edit a file that is already touched by the original patch [22:25] $ sed -i 's/Copyright/Copyleft/' xterm.man [22:25] Let's commit the change: [22:25] First updates the patch file with your recent changes [22:25] $ quilt refresh 901_xterm_manpage.diff [22:25] Than unapplies all patches to go back to pristine source tree [22:25] $ quilt pop -a [22:25] Ok, I'll stop a bit :) [22:25] to let you do that :) [22:26] Ping once you have finished to do that :) [22:26] (sorry, just one this, it's quilt push -a 901_xterm_manpage.diff) [22:26] oups sorry..... [22:26] to be push every patch file depending on 901_… [22:26] thanks didrocks [22:27] well, everytime, and especially for quilt, look at the man before executing anything you are not quite sure :) [22:27] So have you done it ? [22:27] yes [22:27] Look at debian/patches/901_xterm_manpage.diff to see the effect :) [22:27] Does anyone can point it to me ? [22:28] anyone ? [22:28] copyrights switched to copylefts [22:28] Kurt: thanks ! [22:28] :) [22:28] indeed :) [22:29] it means that the patch has been modified ! [22:29] Finally to end our patching tour : let's create our own patch [22:29] $ quilt push -a [22:29] This will apply all the patches (-a for all) [22:29] $ quilt new UbuntuDevWeekAugust08.diff [22:29] This is the creation of the patch ! [22:30] $ quilt add README [22:30] It is needed to tell quilt all the files that you want to be incoporated in your patch (likewise version control stuffs). [22:30] $ echo "UbuntuDevWeekAugust08" >> README [22:30] Some modification. [22:30] $ quilt refresh [22:30] Update the currently edited patch [22:30] $ quilt pop -a [22:30] This will finally create debian/patches/UbuntuDevWeekAugust08.diff with the changes to README [22:31] And that it is :) [22:31] Does anybody can tell me what we need to check ? [22:31] to be sure that the patch is applied ? [22:31] (hint: it is a bit like dpatch :)) [22:31] :debian/patches/series? [22:31] hggdh: exactly [22:32] but this time it is already added in [22:32] exactly [22:32] hggdh: yeah, quilt rocks \o/ [22:32] You don't edit it manually usually. [22:32] That is pretty it guys ! [22:32] Questions ? [22:33] thanks for the session huats and didrocks :) It was great [22:33] thank you [22:33] Kurt: thanks to you guys [22:33] Always remember that there is the ubuntu wiki for more details: https://wiki.ubuntu.com/PackagingGuide/PatchSystems [22:33] if you have any questions please ping us on IRC :) [22:33] or ping master pitti :) [22:33] thanks Kurt & hggdh gor having followed until the end :) [22:34] of ping nxvl, he really loves questions :) [22:34] s/of/or [22:34] thanks a lot guys [22:34] and if pitti tells you he doesn't know, ask anyway, he knows [22:34] that's why we love pitti [22:34] nxvl: \o/ [22:34] bye bye everyone ! [22:34] thanks a lot to everyone! Bye! [22:34] thanks a log guys [22:35] \o/ [22:35] thanks chombium \o/ [23:20] Hi [23:21] can anyone mentor me on packaging?