/srv/irclogs.ubuntu.com/2008/09/03/#ubuntu-classroom.txt

=== 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
mok0ahem16:55
norsetto*cough* *cough*16:59
ryuujinhuh16:59
james_wHi all17:00
norsettohi james_w :)17:00
james_wIs it my session now?17:01
norsettothe floor is yours ...17:01
james_wsorry, I'm a bit lost, I've just been in a meeting17:01
mok0Yep it's you17:01
james_wcool17:01
james_wlet's get started17:01
james_wwho's here for some bzr love?17:01
ktenneyindeed17:02
Serdarbizar love sounds funny, I'm in17:02
james_wcool17:03
james_whi everyone, thanks for coming17:03
james_wmy name is James Westby, I'm going to talk about using bzr for your packaging work17:03
james_wI'm going to go over some of the basics, and you can play along at home17:04
james_wif 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 out17:04
james_wif I'm going to fast, or I don't explain something well enough then please yell and let me know17:05
james_wfirst of all we need to install the necessary tools17:05
james_wwhat release of Ubuntu is everyone running?17:05
BijoyHardy17:06
swingnjazz8.0417:06
Oli``81017:06
azmodiehardy17:06
james_wif you are on Intrepid then "sudo aptitude install bzr-builddeb" is enough17:06
pdragon8.0417:06
james_wif you on Hardy then "sudo aptitude install bzr"17:06
james_wand you will need my PPA enabled to get the bzr-builddeb I will be using in the demonstration.17:06
james_w< Serdar> +QUESTION: what does bzr stand for? There is lack of information about that at https://wiki.ubuntu.com/UbuntuDeveloperWeek#17:07
james_wSerdar: bzr is a version control system, if you want to find out more then you can read bobbo's session from yesterday on bzr17:07
james_wthose on Hardy will want https://edge.launchpad.net/~james-w/+archive17:08
james_winstall bzr-builddeb - 2.0~ppa1~hardy1 from there17:08
james_wSerdar: https://wiki.ubuntu.com/MeetingLogs/devweek0809/BazaarIntro17:09
james_wdeb http://ppa.launchpad.net/james-w/ubuntu hardy main17:09
james_wthat's the sources.list line for hardy users17:10
james_wthen "sudo aptitude update; sudo aptitude install bzr-builddeb=2.0~ppa1~hardy1"17:10
james_wthen remove the line from your sources.list again so you don't accidentally install something else from there17:10
james_won Monday the unstoppable dholbach gave a Packaging 101 session where he looked at the hello-debhelper package17:11
james_wyou can find the log of the session at https://wiki.ubuntu.com/MeetingLogs/devweek0809/Package17:11
james_wI've prepared a small branch of this package for us to play with today17:11
james_wso once you have all of the tools installed then please run "bzr branch lp:~james-w/+junk/hello-debhelper"17:12
james_wyou will get a new directory called "hello-debhelper" if you look in there you will see all of the files of the package17:12
james_wif you run "bzr log" in the directory you can see that this is a bzr branch with a couple of revisions17:13
james_wshout out once you've got that17:13
nasamJep, got that17:13
* Oli`` shouts17:13
kaaloogot it17:13
james_wnice work17:13
james_wright, I've just pushed a new revision to my branch for us to play with, so please run "bzr pull" from the hello-debhelper directory17:15
james_wit should tell you that you have a new revision17:16
james_wif you run "bzr log" now you will see an extra revision17:16
james_wto look at the change that I made run "bzr diff -r2..3"17:16
james_wwhich means "show me the changes between revisions 2 and 3"17:16
james_wyou'll see that I made a small change to the packaging17:16
james_wnow, it's your turn17:17
james_wopen "src/hello.c" in your favourite editor17:18
james_wand find the bit that prints "Hello, world!" in a box17:18
james_wline 11517:18
james_wand edit it to say hello to you instead17:18
james_wwin 1417:18
james_woops17:19
chombium<chombium> QUESTION: bzr pull returned: No revisions to pull.17:19
james_wchombium: what does "bzr revno" say for you?17:19
chombium317:19
chombiumbut I got revision 2 and 3 with bzr log17:20
chombiumseems it's ok17:20
james_wchombium: that's ok, you just grabbed the branch after I had done the push, it won't make a difference17:21
james_wonce you've changed the greeting to say hello to you then save the file and run17:21
james_wbzr commit17:21
james_wthis will open an editor window in which you should type your commit message17:21
james_wsomething like17:21
james_wChanged the greeting to say "hello" to me17:22
james_wgive me a shout once you've done it17:22
ktenneyok17:22
pdragondone17:22
nasamdone17:22
kaaloook17:22
swingnjazzdone17:22
mok0!!!17:22
albert23done17:22
Ampelbein!!!17:22
bobbodone17:22
james_wgreat17:23
james_wat this point you could push your work to launchpad, but it's not necessary for this demonstration so we won't17:23
chombiumdone17:23
james_winstead I've got a change to the package that I propose you make in your branch17:23
james_wI've put this on launchpad for you to look at17:24
james_wso, you can "merge" this change, and review it, and decide if it is good or not17:24
james_wif you run "bzr merge lp:~james-w/+junk/hello-debhelper-proposed"17:24
james_wit will download my changes and try and merge them in to yours17:24
james_w< mok0> +QUESTION: what would happen if we push the new version?17:25
james_wmok0: you wouldn't be able to push to the location that you got the code from as only I can17:25
mok0ok17:26
james_wyou 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 while17:26
james_wI see some of you have done the merge and have noticed a conflict17:27
james_wif you run bzr diff you will be able to see my changes17:28
james_wat the bottom you can see that I added a message about bzr.17:28
james_was 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 conflict17:29
james_whowever, I changed the message to say my name, and you did the same17:29
james_wso we tried to do two different things to the same line, and bzr can't work out what to do17:30
james_wso it asks for our help17:30
james_wto do that it marks the area conflicted17:30
james_wif you try and run "bzr commit" now it won't let you, it tells us to resolve the conflicts first17:30
james_wopen src/hello.c in your editor again, and find the same line as before17:31
james_wyou will see your change, with mine below it17:32
james_wand <<<<<<<<<< above both >>>>>>>>> below them and ================== in the middle17:32
james_wthese are "conflict markers"17:32
james_wwe need to leave the text how we want, and without these markers17:32
james_wso you can delete my change, and all of the markers17:33
james_wor you could delete yours and leave mine17:33
james_wor you could change the message to say hello to both of us17:33
james_wor do whatever you want, it's your choice17:33
james_wso, fix the conflict however you like, and then save the file and run "bzr diff"17:34
james_wif you pastebin the output I will review it for you17:34
ktenneywhat about the new hello.c.* files?17:35
james_wktenney: we'll deal with those in a moment17:35
nasamhttp://paste.ubuntu.com/43096/17:36
james_wnice work nasam17:37
azmodiehttp://pastebin.com/m5456294917:37
james_wazmodie: you kept your change17:38
james_w?17:38
azmodieyeah17:38
james_wgreat, so it's not shown in "bzr diff" as those lines are the same as in the last revision you committed17:39
james_wok, so the last step is to tell bzr we are happy with the state of the files now17:39
james_wrun "bzr resolve src/hello.c"17:39
ktenneyI kept your change17:40
james_wthe hello.c.* files that ktenney mentioned should now be automatically removed for you, and you will be allowed to commit17:40
james_w"bzr resolve" will resolve all the files that no longer have  conflict markers, so that can be quicker17:41
james_wonce you've done that please commit17:41
james_wwhenever 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 changes17:42
james_wnow we can try building the package17:42
james_wthat's why we installed bzr-builddeb, as it makes this easy17:42
james_wrun "bzr builddeb" or "bzr bd" for short and you should see it get to work17:43
james_wthere'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 packages17:44
james_wthat's all I wanted to talk about today17:44
james_ware there any questions?17:44
norsettosee -chat ...17:44
Oli``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
james_wthat's a bug in bzr-builddeb that I think I have since fixed17:45
james_wcan you all try running the command again?17:45
nasamNow it works17:45
james_wif it doesn't work second time then it's a new bug17:46
james_wok, thanks, that'll be fixed in the next release17:46
ktenneydpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 217:46
mok0make[1]: *** No rule to make target `distclean'.  Stop.17:46
mok0m17:46
azmodiei 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 main17:47
james_wthey sound like problems with the package17:47
mok0Let's fix it, then17:47
james_wI'm not the person to teach you about packaging :-)17:47
azmodiels17:48
james_wmok0: I'm not sure why that's failing the build, it should be a non-fatal error17:49
mok0yeah17:49
james_w < norsetto> +QUESTION: can bzr bd work with pbuilder?17:51
james_wif you use plain pbuilder then "bzr bd --builder pdebuild" might do what you want17:51
james_wI need to work out how to make it play better with things like pbuilder-dist and sbuild though17:52
james_wwhat I do for now is build a source package ("bzr bd -S") and then call pbuilder-dist myself17:52
james_w< kaaloo> +QUESTION : You would still have to update the changelog beforehand ?17:52
james_wkaaloo: yes, you still have to do the changelog stuff yourself.17:53
james_w< mok0> +QUESTION: Is there a manpage for bzr bd?17:53
james_wmok0: no, but "bzr help bd" might help17:54
james_walso check /usr/share/doc/bzr-builddeb/ for the user manual17:54
james_wany last questions, as we are almost out of time17:54
* dholbach hugs james_w17:54
james_whey dholbach, I wondered where you were17:54
* james_w hugs dholbach 17:54
james_w< mok0> +QUESTION: is bzr bd and bzr-buildpackage the same program being run?17:55
james_wmok0: yes, bzr-buildpackage just execs "bzr bd", it's there more to try and help people find the command17:55
mok0ok17:56
james_wright, thanks all17:56
james_wif you want more then you can talk to me at any time17:56
chombiumthank you james17:56
james_wand remember17:56
james_wbzr rocks17:56
mok0Thanks james_w!!17:56
swingnjazzwell done, james_w :)17:57
Coperthanks james_w17:57
bobbothanks james_w!17:57
Ampelbeinthanks james_w!17:57
azmodiethanks james_w17:57
pdragonthanks!17:57
james_wthanks all17:58
james_wnext up is norsetto himself I believe17:58
norsettothanks james_w, very enlightening talk!17:58
norsettolets start then, while the iron is still hot ...17:59
sebnernorsetto: \o/17:59
norsettowelcome everybody, I'm gonna talk about how to make a package update17:59
norsettoin particular, "all you wanted to know about whats next after dch -i" (at least I hope)18:00
norsettohi sebner18:00
norsettodo we all know what we mean by a package upgrade?18:00
rUkieno i dont18:01
norsettoanyone ... don't feel shy ...18:01
bobboupgrading to a new upstream release?18:01
norsettobobbo: yes18:01
norsettobobbo: thx18:01
bobbo\o/18:01
norsettowe do have a package in our repository, foo-1, and upstream just released a new shiny foo-218:02
norsettonormally, we would get the update from debian, but there are cases when we don't18:02
norsettofor instance, if debian is in a freeze, or the package is orphaned, or its a native ubuntu package18:02
norsettoor we simply need it urgently, and then pass the result back to debian18:03
norsettoso far so good? please stop me if something is not clear, or I'm too slow/fast18:03
norsetto+<Coper> QUESTION: If i package a new package for Ubuntu should we notify debian so they get it?18:04
norsettoCoper: yes, definetively18:04
Coperhow?18:05
norsettook, so, we now know we have a new upstream version, first thing to do is to get it18:05
sebnerCoper: file a bug in Debian BTS18:05
norsettoCoper: you need to open a RFP or ITP bug in the bts, and submit the package to mentors.debian.net18:06
mok0Good topic for a lesson!18:06
norsettowe can get the tarball manually, using http or wget18:06
norsettoif there is a watch file in the current package, we can use that18:06
norsettojust check if there is a debian/watch file, or give the command "uscan" at the source tree root18:07
norsettouscan --verbose just gives you some more info about what it is trying to do18:08
norsettofinally, there could be a get-orig-source target in debian/rules that we can use18:08
norsettofor instance you can do "make -f debian/rules get-orig-source" to execute it18:08
norsettobe carefull to read changelog, copyright and README.Source, the previous packager might mention few things to be doing on the upstream tarball18:09
norsettolike, removing non distributable content, or repackaging18:10
norsettook, now that we have an upstream tarball, we need to rename it in accordance to our policy18:10
norsettofoo-2.tar.gz will become foo_2.orig.tar.gz18:11
norsettolike as we would do for a shiny new package18:11
norsettonow, the simplest case is if there are no changes to packaging and no changes outside of debian18:12
norsettojust untar your tarball, copy the old debian dir to the new source tree18:13
norsettoand finally add the new changelog entry18:13
norsettoI wish all updates were this simple :-)18:13
norsettoyou still with me?18:13
norsettook, more difficult if in the previous package there were changes outside of debian18:14
norsettofor instance the previous packager made inline changes instead of using a patch system, you can check this by checking the old diff.gz18:15
norsettoin this case just copying debian won't be enough, we have to make all those changes outside of debian too18:16
norsettoyou can do that manually, or using patch18:16
norsettofor instance "zcat ../foo-1.diff.gz | patch -p1" (given at the src tree root)18:16
norsettohere we can already have some pain, as some of the old changes might not apply anymore, or not apply correctly18:17
norsettoall the above procedure can be automated by using uupdate18:18
norsettoagain 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 performed18:18
norsettonow, 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 package18:19
norsettoany idea how we can check what is the difference between the old tarball and the new ?18:20
norsetto+<mok0> QUESTION: What's the difference between uscan and uupdate?18:20
sebnernorsetto: diff?18:21
mok0diff -r old new18:21
norsettomok0: uscan just check and eventually download upstream tarball, uupdate do the update18:21
norsettomok0: uscan can also do the update, depend on what it is in the watch file18:21
norsettosebner: mok0: yes, diff is our friend18:22
norsettoI personally like diff -Nurb18:22
norsettoonce you have the diff, you should check line by line and see what has changed upstream18:22
RoAkSoAxnorsetto: uscan does the update if you add 'debian uupdate' in the watchfile right?18:22
norsettoRoAkSoAx: perfect18:23
norsettotedious perhpas, but its really necessary18:23
norsettook, some example of the things that might have changed upstream and that needs to be considered in the packaging18:24
norsettoone important thing is license18:24
norsettosometime upstream changes the licensing of their packages, or add new file with new licenses18:24
norsettothere is a tool you can use to help you detect these changes18:25
norsettoits called licensecheck and is in the devscripts package18:25
norsettolicensecheck -r --copyright18:25
norsettowill check all files in all subdirs and also check copyrights18:26
norsettojust an example, you may want to check bug 25766418:26
norsettohttps://bugs.launchpad.net/ubuntu/+source/picard/+bug/257664 since ubottu is on strike18:27
ubot5Launchpad bug 257664 in picard "picard crashed with SIGSEGV in memset()" [Medium,Fix released]18:27
norsettothanks ubot5, I love you18:27
mok0thanks for no link :-)18:28
sebnerlol18:28
norsettoyou may want to download the old and the new package and see the diff18:28
norsettoas you can see from the changelog I detected some changes in the licensing, and updated debian/copyright18:29
norsettoanother example is https://bugs.launchpad.net/ubuntu/+source/source-highlight/+bug/24369218:29
ubot5Launchpad bug 243692 in source-highlight "web pages with ~ do not underline correctly" [Undecided,Fix released]18:30
norsettoas you can see in this case the license was changed from gpl-2 to gpl-318:30
norsettook, any other things we should check? ideas?18:31
norsettowhat about patches?18:31
RoAkSoAxnorsetto: update patches to match new files ?18:31
sebnernorsetto: another dependencies or newer versions18:32
norsettoRoAkSoAx: yes, does the old package have patches? Are they still needed anymore? Do they still apply correctly?18:32
norsettosebner: yes, do we need new build-deps for instance18:33
norsettosebner: this is usually reported in upstream ChnageLog, but sometime you only discover it by looking at upstream autoconf files (or Makefile)18:33
norsettoanother thing to check, if the package includes a man page, check if there are upstream changes that needs to go in there18:34
norsettoand don't forget to update the man page date if you do that ;-)18:34
norsettoany change in file locations? Maybe upstream now isntall files differently, we may need to change our packaging18:35
norsettowill this new upstream version close an bug open in LP?18:35
norsettoif so, close it from the changelog18:36
norsettois upstream web page changed?18:36
norsettoreport the change in control and copyright18:36
norsettois upstream now shipping a .desktop file, or new icons?18:37
norsettomake sure you install those18:37
norsettomaybe you need to remove those in the old package if they are obsolete18:37
norsettosometime upstream changes few things which need you to change compilation flags18:38
norsettofor instance, some plugin which are now ON while you used OFF or viceversa18:38
norsettoif upstream is a library particular care has to be taken18:38
norsettocheck if API/ABI change is reflected in SONAME/version18:39
norsettoyou can use check-symbols or icheck to help you with that18:39
norsettoyou may need a library transition, which involves perhpas rebuilding many packages already in the archive18:40
norsettook, perhaps at this point it is better to go together through an example18:40
norsettoanyone is working on an update at the moment?18:40
sebnernorsetto: FF :P18:41
nxvlo/18:41
norsettonxvl: do you want to tell us which package?18:41
nxvlnorsetto: terminator18:41
nxvlbut it's not a good example since i maintain it on upstream bzr18:42
nxvl:D18:42
* bobbo just did three...18:42
norsettobobbo, ok, sounds good, bug numer?18:42
bobbobug #24999718:43
sebnerubot5: hop hop hop18:43
ubot5Factoid 'hop hop hop' not found18:43
norsettook, we also have the new upstream tarball in there :-)18:44
norsettolets download the old package, create a htop directory and download it with "apt-get source htop"18:44
bobbo(https://bugs.edge.launchpad.net/ubuntu/+source/htop/+bug/249997)18:44
ubot5Launchpad bug 249997 in htop "Package is outdated " [Wishlist,Fix released]18:44
norsettobobbo: ok your version is in the rchive already :)18:45
RoAkSoAxbug 25643918:45
RoAkSoAxhttps://bugs.launchpad.net/ubuntu/+source/ao40tlmview/+bug/25643918:45
ubot5Launchpad bug 256439 in ao40tlmview "Please update ao40tlmview to 1.04" [Wishlist,Confirmed]18:45
bobboooh, didnt know that, sorry!18:46
norsettobobbo: no probelm :-)18:46
norsettook, lets check this one18:46
norsettocreate an ao40tlmview dir and download teh src package in tehre with apt-get source ao40tlmview18:46
norsettohave we all got the current package?18:47
norsettonobody?18:48
norsettook lets check the new upstream tarball18:49
norsettothere is no watch file, no link in the bug report18:49
norsettowe can check copyright and see what is the download location there18:50
norsettowhich will give us this location: http://wwwhome.cs.utwente.nl/~ptdeboer/ham/ao40/ao40tlmview-1.04.tgz18:50
norsettolets get it with wget: "wget http://wwwhome.cs.utwente.nl/~ptdeboer/ham/ao40/ao40tlmview-1.04.tgz"18:51
norsettonow we have to rename it so that its compliant with out policy18:51
norsettowhat would the correct name be?18:51
sebnernorsetto: ao40tlmview_1.04.orig.tgz18:52
norsettosebner: indeed18:52
norsettolets see what is the diff between these two upstream version18:52
norsettolets untar the new tarball: tar xzvf ao40tlmview_1.04.orig.tar.gz18:52
norsettoand teh old one: tar xzvf ao40tlmview_1.03.orig.tar.gz18:53
norsettonow we can check the diff: diff -Nurb ao40tlmview_1.03.orig.tar.gz ao40tlmview_1.04.orig.tar.gz > ao40tlmview_1.04.diff18:54
norsettosorry: diff -Nurb ao40tlmview-1.03 ao40tlmview-1.04 > ao40tlmview_1.04.diff18:54
norsettoas you can see there is only one interesting change18:55
sebnernorsetto: makefile one?18:56
norsettoyes, this has no impact on us however18:56
norsettoso, its a very simple update18:56
norsettoif you check the old package, you will see that there are no changes outside of debian18:57
norsettoso, we just cipy the old debian dir and we add a new changelog entry18:57
norsettowe then rebuild the package18:58
sebnernorsetto: though we have to change maintainer and that stuff18:58
norsettoif the rebuild is ok, we attach the new diff.gz to the bug report and ask a sponsor to upload it18:59
norsettosebner: yes, if the package was not already an ubuntu package18:59
norsettosebner: debuild will tell us anyhow ;-)18:59
sebner^^ true18:59
sebnernorsetto: and .dsc is not needed at the bug report?18:59
norsettoas you can see this is exactly what RoAkSoAx did, even if he added a coupld of additional changes18:59
norsettosebner: no19:00
sebnernorsetto: but it was once afaik!?19:00
norsettook, thats about it then19:00
norsettosebner: no, as far as i know it was never required19:00
sebnerO_o19:00
sebnerok19:00
sebnernorsetto: thanks for this great session :D19:00
norsettosebner: you may remember interdiff, but that is gone19:01
norsetto<albert23> norsetto: for an update, we should update the standards-version?19:01
norsettoalbert23: you shouldn't in general, unless there is a change that warrants it19:01
norsettoalbert23: but adding the watch file is a nice addition19:01
sebnernorsetto: ah yes, interdiff19:02
norsettoany other question before I leave the floor to the next lecture?19:02
sebnernorsetto: sebner@ubuntu:~/merges/ao40tlmview/ao40tlmview-1.03$ uupdate ../ao40tlmview_1.04.orig.tgz19:02
sebneruupdate: new version number not recognized from given filename19:02
sebnerPlease run uupdate with the -v option19:02
norsettosebner: yes, thats because of the tgz extension19:03
sebnernorsetto: ah only working with tar.gz?19:03
norsettosebner: 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
sebnernorsetto: kk :) and shouldn it be licensecheck -r .  ?19:04
norsettosebner: yes, or *19:04
norsettowho is the next lecturer?19:04
sebnernorsetto: kk because you were using --copyright ^^19:04
* mathiaz waves at norsetto 19:05
norsettosebner: yes, --copyright also gives you the cipyright it finds in the headers19:05
norsettohi mathiaz!19:05
mathiaznorsetto: hi :)19:05
norsettoso, unless there are further q we can leave the floor to mathiaz, I can asnwer questions in ubuntu-motu anyway19:05
norsettomathiaz: its all your!19:06
mathiaznorsetto: thanks !19:07
mathiazAfter 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 work19:08
mathiazWho are we ?19:08
mathiazWe are a group of people that have an interest in server related software.19:09
mathiazMost of the information can be found under our wiki pages at:19:09
mathiazhttps://wiki.ubuntu.com/ServerTeam19:09
mathiazAs an extension we tend also to deal with setups found in corporate19:09
mathiazenvironments, such as directory services (ldap, AD) web services or network19:09
mathiazauthentication.19:10
mathiazSome of us are working for Canonical in the Server team. Others have services19:10
mathiazrunning on Ubuntu and are interested in fixing bugs.19:10
mathiazThe Canonical server team is lead by Rick Clark (dendrobates) and composed of:19:10
mathiazChuck Short - zul, Dustin Kirkland - kirkland, Mathias Gug  - mathiaz, Thierry19:10
mathiazCarrez - Koon, they have a generalist profile.19:10
mathiazSoren Hansen - soren, our virtualization specialist.19:11
mathiazKees Cook - kees and Jamie Strandboge - jdstrand, are member of the Ubuntu19:11
mathiazSecurity Team. They will make a presentation about the Security team later this19:11
mathiazweek.19:11
mathiazNick Barcet - nijaba, is also working for Canonical as the Ubuntu Server product manager.19:11
mathiazRegular contributors takes on important tasks and lead them to completion.19:11
mathiazsome of them include (listed in alphabetical order):19:12
mathiazAdam Sommer - sommer - our documentation guru. He's taken the task to review19:12
mathiazand update the Server Guide. Thus he is in contact with the Documentation team.19:12
mathiazAnte Karamatić - ivoks - another long time contributor to the Server Team. Also19:12
mathiaza member of MOTU, he has looked over the apache package and improved the bacula19:12
mathiazpackage.19:12
mathiazNeal McBurnett - nealmcb - he has multiple interest: documentation,19:13
mathiazvirtualization.19:13
mathiazNicolas Valcárcel - nxvl - lots of work in bug triagging and packaging.19:13
mathiazHe is also involved in the Security team and the MOTU team.19:13
norsettonxvl kiks ass19:13
mathiazScott Kitterman - ScottK - main interest are mail services19:13
mathiazIf you're interested in postfix or clamav he is the man to talk to. He is also involved with the MOTU team.19:14
mathiazWe are a diverse group that have different interests.19:14
mathiazWe're also involved in other teams from the Ubuntu project.19:14
mathiazThis is one of the caracteristic of the Server Team:19:15
mathiazwe all share a common interest in server technologies, but have differents skills.19:15
mathiazThus being part of the team often means representing the Server Team in other areas of the Ubuntu project.19:15
mathiazBeing a contributor to the server team can be taken under different roles:19:16
mathiazThe helpers answers questions on the ubuntu-server mailing list and the #ubuntu-server IRC channel19:16
mathiazTriagers dig into bugs the ubuntu-server LP team is subscribed to.19:16
mathiazOur LP team is a bug contact for a list packages, such as samba, openldap, mysql or apache2.19:17
mathiazThe current list of packages can be found here:19:17
mathiazhttps://bugs.launchpad.net/~ubuntu-server/+packagebugs.19:17
mathiazA mailing list gathers all the bugs related to the ubuntu-server team:19:17
mathiazubuntu-server-bugs@lists.ubuntu.com19:17
mathiazhttps://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs19:18
mathiazThis is a great way to start with the LP bug tracker and doesn't require any knowledge of programming languages.19:18
mathiazWe're working closely with the BugSquad team - triaggers participate on their mailing lists19:18
mathiazMore information about the BugSquad team can be found here: https://wiki.ubuntu.com/BugSquad/19:19
mathiazAnd once in a while with have the honor of having our own HugDay where the whole bug triagger community helps us.19:19
mathiazOnce bugs have been triagged, it's time to fix them.19:19
mathiazThis is when the packagers19:20
mathiazcome into the game.19:20
mathiazThis role requires an interest in packaging.19:20
mathiazWe maintain a list of bugs that are easy too fix:19:20
mathiazhttps://bugs.launchpad.net/~ubuntu-server/+mentoring19:20
mathiazharvest is another source of bug lists.19:21
mathiazFixes can get easily make their way into the ubuntu repositories via the19:21
mathiazsponsorship process.19:21
mathiazhttps://wiki.ubuntu.com/SponsorshipProcess19:21
mathiazDoing 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
mathiazhttps://wiki.ubuntu.com/MOTU19:22
mathiazTesters are another way to take part of the Server Team activity.19:22
mathiazThis role doesn't require a lot of deep technical knwoledge.19:23
mathiazWe work with the Ubuntu QA team - https://wiki.ubuntu.com/QATeam.19:23
mathiazNow 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
mathiazHere is an example: AD directory integration with likewise-open.19:24
mathiazIf 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
mathiazTesters are now taking a more and more important role as we're approaching release:19:25
mathiazalpha5 and 6 will be followed by Beta on October, the 2nd then RC up to Final on October, the 30th.19:25
mathiazWe're responsible for ensuring that the ubuntu-server isos are working correctly, which involves performing a dozen of tests for two isos.19:26
mathiazThe list of tests can be found in the wiki:19:26
mathiazhttps://wiki.ubuntu.com/Testing/Cases/ServerInstall19:26
mathiazServer hardware support is another area where testing is welcome.19:26
mathiazWe'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
mathiazThis work is coordinated in the ServerTesting Team wiki pages:19:27
mathiazttps://wiki.ubuntu.com/ServerTestingTeam19:27
mathiazThere are also the Documentors19:28
mathiazBrowsing 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
mathiazRecurring themes are identified and turned into documentation.19:29
mathiazA wiki page in the community section of help.ubuntu.com is first created.19:29
mathiazOnce the quality has improved, a new section is added to the server guide.19:29
mathiazAll this work is undertaken by the Documentors of the Server Team.19:30
mathiazCollaboration with the Documentation team is done on a daily basis to achieve consistency with other help resources.19:30
mathiazMore information about the Documentation team: https://wiki.ubuntu.com/DocumentationTeam19:31
mathiazAdam Sommer leads the update and review of the Ubuntu Server guide.19:31
mathiazThe document is maintained in a bzr tree.19:31
mathiazHelping Adam will introduce you to docbook and distributed versioning with bazaar.19:32
mathiazGetting started involves following 3 steps outlined in the Server Team Knowledge base:19:33
mathiazhttps://wiki.ubuntu.com/ServerTeam/KnowledgeBase#Ubuntu%20Server%20Guide19:33
mathiazThere is also the option to go over server related wiki pages on the community  help pages.19:33
mathiazA good starting point is the Server page that has pointer to lots of howtos.19:33
mathiazhttps://help.ubuntu.com/community/Servers19:33
mathiazAnother hat you can wear in the Server Team is the Developer one.19:34
mathiazThey develop new features usually specified during the Ubuntu Developer Summit that takes place at the begining of each release cycle.19:34
mathiazTracked by a blueprint we have around 3 months to get a new feature into Ubuntu.19:34
mathiazNow that Feature Freeze is in place, we've moved our focus to testing and bug19:34
mathiazfixing.19:34
mathiazThus the developer roles won't be very active until we release intrepid at the end of october.19:35
mathiazAs you can see, contributing to the Server Team can be undertaken in more than one way.19:35
mathiazt usually involves a lot of interaction with other teams from the Ubuntu project.19:36
mathiazIt's also a good way to show your contribution to Ubuntu and helps getting Ubuntu membership.19:36
mathiazThe GettingInvolved page gives an overview of the roles I've talked about above:19:37
mathiazhttps://wiki.ubuntu.com/ServerTeam/GettingInvolved19:37
mathiazSo how do we work ?19:37
mathiazWe track our progress on the Roadmap and meet once a week to discuss outstanding issues.19:38
mathiazOur current work can be tracked on the Roadmap wiki page:19:38
mathiazhttps://wiki.ubuntu.com/ServerTeam/Roadmap19:38
mathiazWe use the ubuntu-server mailing to coordinate our activities, discuss policy change in the team as well as helping out users.19:39
mathiazHow to join the Server Team and start contributing ?How to join the Server Team and start contributing ?19:39
mathiazJoining 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
mathiazhttps://launchpad.net/~ubuntu-server/19:40
mathiazIf you already know which role you'd like to contribute as, you can find a list of tasks in the Roadmap.19:41
mathiazDon't hesitate to ask one of the team members involved in your area of interest.19:41
mathiazMost of the information related to the ServerTeam can be found in the ServerTeam wiki pages:19:42
mathiazhttps://wiki.ubuntu.com/ServerTeam.19:42
mathiazIf you're overwhelmed by all the available information and you're lost, come talk to me.19:43
mathiazI'll help get out of the mist and we'll find a way you can get involved in the Server Team.19:43
chombiumQUESTION: what do developers do during the freeze time? fixing bugs?19:43
mathiazchombium: yes - we switch to bug fixing mode.19:44
mathiazchombium: all of the members of the server team actually take part of the different roles19:44
mathiazchombium: they should be thought of as hat rather then just a unique role19:45
RoAkSoAxQUESTION: "<mathiaz> 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:45
mathiazRoAkSoAx: new features don't necessarly involve programming langages19:46
mathiazRoAkSoAx: for example, we discuss during last summit migrating openldap to use cn=config instead.19:46
mathiazRoAkSoAx: that involved mainly packaging work (in this case shell scripting).19:46
RoAkSoAxmathiaz, so might involve just configuration changes?19:46
RoAkSoAxoh ok19:46
RoAkSoAx:)19:46
mathiazRoAkSoAx: there are some features that require development work with programming langages19:47
mathiazRoAkSoAx: for example pitti wrote the jockey utility - it was speced out during uds19:47
mathiazRoAkSoAx: and he coded it using python19:47
chombiumQUESTION: is there any preferred programming language for implementation of the features, or its up to the developer to decide?19:48
mathiazchombium: python tends to be the prefered programming language used by the Ubuntu developer community19:49
RoAkSoAxQUESTION: 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:49
mathiazchombium: but we're gladly accepting contributions coded in other langages19:50
chombiummathiaz: i'm searching for a hole which I can fill :)19:50
mathiazRoAkSoAx: I'd suggest to start with a wiki page on help.ubuntu.com/community/19:50
mathiazRoAkSoAx: once it has matured, you can branch the server guide and add a section about it.19:51
RoAkSoAxmathiaz, perfect, thanks. :)19:51
mathiazRoAkSoAx: then you'd send your merge request to the ubuntu-doc mailing. sommer will probably have a look at it and review it.19:51
mathiazRoAkSoAx: https://wiki.ubuntu.com/ServerTeam/KnowledgeBase#Ubuntu%20Server%20Guide <- outlines how to contribute to the Ubuntu Server Guide.19:52
RoAkSoAxok cool :)19:54
arquebusmathiaz- some very important information here, you should post a log of this lecture in a wiki19:56
mathiazarquebus: IIRC the logs will be posted somewhere on the wiki19:56
arquebusok19:57
lagamathiaz: great session, thanks19:57
chombiumarquebus: https://wiki.ubuntu.com/MeetingLogs/devweek0809/ServerTeam19:57
arquebuschombium: thx19:57
mathiazIf there are more questions, feel free to email me or ping me in #ubuntu-server19:58
mathiazI'll leave the floor to cprov that will introduce you to the wonderfull world of PPA19:58
chombiumthank you very much mathiaz!19:59
cprovmathiaz: thanks, you are the ubuntu-server star!19:59
cprovI guess we can start the 'Introduction to PPAs' session.20:00
cprovwho is here to learn more about PPAs ?20:00
lagamaybe i am. ;)20:01
* siretart raises his hand!20:02
cprovThere is a overview document from previous PPA sessions that might be a useful read: https://wiki.ubuntu.com/CelsoProvidelo/PPASystemOverview20:02
sebnersiretart: debian is missing this cool things :P20:02
cprovyou can start asking question while I talk trivialities about what PPA is20:03
Kurt*raises hand*20:03
cprovI imagine a lot of people already know about PPA (Personal Package Archives) features in Launchpad20:04
=== mcas_away is now known as mcas
cprovin 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:05
cprovIt includes the basic components used for Ubuntu: a upload-processor, a build-service and a repository builder.20:06
cprovbasically, it helps users to get source packages built and published in the same way  they would be if uploaded to the Ubuntu distribution.20:08
cprovThe system is in production since the end of the last year, more overall stats can be found at https://edge.launchpad.net/ubuntu/+ppas20:09
cprovwe are already over 1000 active PPAs (yay!)20:09
cprovlaga: QUESTION: when will it be possible to sign packages on the PPA?20:10
cprovYES :) we are very committed to deliver this features (implemented in a proper way) early in this launchpad milestone.20:10
cprovlaga: QUESTION: i seem to remember reading about a "replay attack" on PPAs. can you comment on that?20:11
cprovright, replay attacks (someone maliciously re-uploading a PPA package uploaded by a ubuntu maintainer) are completely solved in production.20:12
cprovPPA changesfiles are stored without the original signature and makes impossible to re-upload them.20:12
lagaand how was it possible? --verbose ;)20:12
cprovlaga: the original signature is not available anymore, you can't 're-play'20:13
cprovlaga: QUESTION: is there an API for the PPAs, eg to make copying packages into another distro series easier?20:13
cprovyes, soyuz features will be exposed via the public launchpad API soon (launchpadlib) and we have plans to include PPA features very soon.20:15
cprovaga: QUESTION: how much buildd capacity is available? how much could one use up without getting smackedß20:15
cprovlaga:  launchpad IS team is working hard in increasing the number of available builders, https://edge.launchpad.net/+builds20:16
cprovlaga: that certainly makes build-load less than an issue.20:16
cprovlaga: but we have plans to establish fair limits to avoid some users to make things slower to the others.20:17
lagagood :)20:18
cprovstefanlsd: 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
cprovstefanlsd: you always have to trust the owner/uploader20:18
cprovthe PPA system guarantees the binaries you will be installed were in fact generated from the corresponding source20:19
cprovalso, when signed, will guarantee that you will be installing exactly what you aim to.20:19
cprovbut it can't really guarantee that the binary is not doing any malicious task in you system, the users/communities have to audit it somehow20:20
cprovWe 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
cprovlaga: QUESTION: do the ppas take orig.tar.gz from the main archives?20:22
cprovlaga: 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
cprovmok0: QUESTION: Is the PPA software available so I could have my own system running at home?20:23
cprovmok0: not yet, it is still part of Launchpad.20:24
mok0:-(20:24
cprovmok0: it also means that when LP goes free it will be available :)20:24
mok0:-)20:24
cprovlaga: QUESTION: when will support for debian packages be available?20:24
cprovlaga: yes, we are organising the infrastructure to start supporting it.20:25
cprovlaga: in way we can improve the collaboration between debian and ubuntu.20:26
mok0awesome20:26
cprovfor 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
cprovwhat do you think about it ?20:27
cprovare you perplexed with this idea ?20:30
siretartthat sounds great!20:30
sebnercprov: really great!"20:30
sebnercprov: I suppose sid chroot?20:30
cprovsiretart: yes, the way it saves time on the developer side is nice.20:31
cprovsebner: yes, unstable, because that's where they can be uploaded in debian.20:31
sebnercprov: ah, sure ^^. Great! EST?20:32
cprovsiretart: QUESTION: is a 'backport this package' button planned? - what's the spec name if yes?20:32
cprovsiretart: 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:34
cprovsiretart: it would check/prepare a proper version and also compose a proper changelog for backports/syncs.20:36
cprovsiretart: making such tasks easier and more reliable.20:36
siretart\o/20:36
sebnersiretart is now complety satisfied ^^20:37
* siretart cant await using it :)20:38
cprovthere 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:38
cprovsebner: QUESTION: cool new features are planned but do we see them in *near* future? EST?20:39
cprovsebner: I do see them all done in the next 4 months, at least, signed-ppas & the debian-support20:40
sebnercprov: /me is happy to be a LP beta tester :P20:40
cprovWe 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:42
cprovsiretart: QUESTION: are any new architectures planned for the near future?20:44
cprovnot really, we are following XEN in this journey.20:44
cprovI've heard (read) some news about the SPARC support, but I'm no expert.20:45
cprovdo you have any suggestions for improving the current documentation ? https://help.launchpad.net/Packaging/PPA20:49
cprovI personally miss a more hands-on packaging guide, successfull use-cases / workflows based on PPAs20:50
cprovthe best way to improving the experience when using PPAs, IMHO, it making easier to see how the current users have solved their problems.20:51
cprovI've found a very interesting post indexing useful PPAs -> http://ubuntudoctor.com/content/blog/The-Personal-Package-Archives-Index20:52
cprovand I guess that's it for today, another very interesting round of PPA questions & answers session, I hope you liked it.20:54
sebnercprov: it was great. thanks very much :)20:55
cprovplease, 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
cprovwhen filling bugs, don't forget:  product -> soyuz and tag: ppa20:56
cprovI'm leaving the stage for huats & didrocks with their  "Various ways to patch a package"20:57
cprovthank you, guys20:58
=== cprov is now known as cprov-afk
sebnercprov-afk: : thx again and I'm looking forward to these shiny cool new features ;)20:58
didrocksthank you very much cprov, it seems to not be very crowded. We will wait 10 minutes :)20:58
cprov-afkdidrocks: okay, good luck!20:59
huatsthanks cprov-afk20:59
didrockscprov-afk: thx :)20:59
sebnerhuats: didrocks : \o/21:00
didrocksok, I think this is the time :)21:02
didrockshuats: are you ready?21:02
didrocksso, waiting for huats, who is around? :)21:03
nijabao/21:03
Kurto/21:03
huatsI am here :)21:04
sebner\o21:04
didrocksgreat, so, I think there is no need to use -chat for the questions21:04
didrocksjust ask them here prefixing them with QUESTION:21:04
didrocksWelcome to the hands-on training session about how to patch Ubuntu source packages!21:04
didrocksFirst, we really want to thank pitti for his previous sessions on february from which this session is largerly inspired of.21:05
=== mcas is now known as mcas_away
didrocksthis 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
didrocksreally 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
didrocksplease 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
didrockssudo apt-get install dpatch cdbs quilt patchutils devscripts debhelper fakeroot21:05
didrocksmkdir patchtraining21:05
didrockscd patchtraining21:05
didrocksapt-get source cron udev keepalived ed xterm21:05
didrockswget http://people.ubuntu.com/~pitti/scripts/dsrc-new-patch21:06
didrockschmod 755 dsrc-new-patch21:06
didrocksfor 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
didrocksSo, during the dowload time, just a quick introduction21:06
didrocks== Why use separate patches? ==21:06
didrocksin earlier times, people just applied patches inline (ie. directly in the source code tree).21:07
didrockshowever 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
didrocks(tell me is I speed to much)21:07
didrocksindeed, 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
didrocksalso 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:07
didrocksso, 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
didrocksthe 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
didrocksto sum up, that mainly means that "lsdiff -z <sourcepackage>.diff.gz" only contains "debian/"21:08
didrocksthe 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:08
didrocksthis 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
didrockshands on when you will be here and/or if you have questions :)21:09
sebner\o/21:09
didrockssebner: is everything ok?21:09
sebnerdidrocks: sure ^^21:10
didrocksevery downloads are finished?21:10
huatsdidrocks: wait a bit more...21:11
didrocksok huats ;)21:11
didrocksif anyone have a question, this is the right time :)21:11
huatsquestions already ?21:11
huats;)21:12
didrockshum, well, everything's fine, so enough speech, time to play! Are you ready to put your hands on? ^^21:12
didrockslet's assume yes :D (it is late, let's say that some people will read the log :))21:13
chombium\o/21:13
didrocks== cron example: inline patches ==21:13
didrocksthe 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
didrockswith 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:13
didrocks... 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
didrocksif 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
didrocks(you can try it right now)21:14
didrocksyou 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:14
didrocks… I am sure, you can't :) No file explicitely declared in the changelog and you will strike…21:15
didrocksif you have any question regarding this way of "not patching", this is the right time :)21:16
didrockslsdiff if very great to determine in a diff.gz file has other directories/files than just debian/ one21:16
huatsdoes anybody is following ? are we moving too fast ? please tell us right now :)21:16
KurtI'm following :)21:17
chombiumme too :)21:17
huatsok great !21:17
didrocksyeah, two people are alive \o/21:17
huatssorry didrocks but it was neede I think :)21:17
sebnerQUESTION: what does the -z option does? *too lazy to search manpage*21:17
huatsit is for the compression sebner21:17
didrocksit tells than the diff file is a gunzip one21:18
didrocksso, compressed, yes :)21:18
sebnerk, thx :)21:18
sebnerand yes I'm also here ^^21:18
didrocksjust 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 mechanis21:18
didrockssebner: thanks ;)21:18
didrocks== udev: separate patches, but no standard/automated patch system ==21:19
didrocksthis 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:19
didrocksso, 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
didrocksdue 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
didrocksso 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:20
didrockspitti strongly advise you to print and hang over your desk this general approach, so, I will quote him :)21:21
didrocks1. copy the clean source tree to a temporary directory /tmp/old21:21
didrocks2. 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
didrocks3. copy the whole source tree again: cp -a /tmp/old /tmp/new21:21
didrocks4. go into /tmp/new, do your modifications21:21
didrocks5. go back into /tmp and generate the patch with diff -Nurp old new > mypatchname.patch21:21
didrocks6. move the newly generated patch to <original source dir>/debian/patches/mypatchname.patch21:22
didrocksdiff -Nurp is used because, in general, we want the following diff options:21:22
didrocks-N -> include new files21:22
didrocks-u -> unified patches (context diffs are <bad/ugly/wathever word you can find> to read)21:22
didrocks-r -> recursive21:22
didrocks-p -> bonus, you can see the name of the affected C and some other language function in the patch21:22
didrocksanybody has a question about the principal method?21:23
didrocks(we will do a hands-on example now, to burn this in your mind forever :))21:23
chombiumlets get our hands dirty :)21:24
didrockschombium: hehe, sure you will :)21:24
didrocksso, if there is no question, let's move on21:24
didrocksopen a shell in you favorite console tool!21:24
didrocks$ cd udev-* # -117 on hardy and -124 on intrepid21:25
didrocks=> we are now in our original source tree where we want to add a new patch21:25
didrocks$ cp -a . /tmp/old21:25
didrocks=> we create a copy of the clean sources as reference tree (always use name like old, origin, pristine...). We have done with step 121:25
didrocks$ pushd /tmp/old21:25
didrocksdoes everybody know pushd?21:26
sebnernope21:26
Kurtthe directory stack :)21:26
didrocksKurt: yes :)21:26
didrocks=> "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 <patchtraining/udev-*> directory with "popd"21:26
didrockssebner: is it ok?21:26
sebnerdidrocks: ah I already heard of it but forgot it ^^ /me is quite tired already ^^21:27
didrockssebner: be brave, it's time to manipulate :)21:28
didrocks$ debian/rules patch21:28
didrocks=> 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
sebner^^21:28
didrocksIf 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
chombiumQUESTION: cp -a ./tmp/old returns cp: missing destination file operand after `./tmp/old'21:29
didrocksStep 2 is now over21:29
didrockschombium: this is a space beetween . and /21:29
didrocksyou copy the current directory . to /tmp/old21:29
chombiumdidrocks: tx21:29
chombiumgot it :(21:29
didrocksyou're welcome :)21:29
didrockshas everyone applied their patch?21:30
didrocksjust shout when it's done :)21:30
* Ampelbein shouts21:30
* didrocks is afraid :)21:30
Kurtdone21:31
didrockschombium: ok?21:31
* sebner will read the logs tomorrow again xD /me -> bed21:31
chombiumo/21:31
huatsok sebner bye21:31
chombiumdidrocks: yes21:32
didrockssebner: good night. Sleep time has triumphed :)21:32
didrocksgreat!21:32
sebnerhuats: didrocks : great work so far. ROCK ON and I'll read the logs ;)21:32
didrockslet's go on21:32
didrockssebner: contact us on IRC if you have any question in reading the log :)21:32
didrocks(huats or I)21:32
sebnerkk, gn8 fols21:32
didrocksok, so, next step is21:32
didrocks$ cp -a . /tmp/new; cd ../new21:33
didrockschombium: be careful, there is a space again :)21:33
didrocks=> just copy the content with applied patches to /tmp/new where we will begin to work with. This corresponds to step 3.21:33
didrocksso, at this time, /tmp/old and /tmp/new are identical21:33
chombiumdidrocks: :)21:34
didrocksboth contain the patched source code21:34
didrocksNow, let's hack and make a new beautiful patch:21:34
didrocks$ sed -i 's#Linux#GNU/Linux#g' README21:35
didrocksRMS 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
didrocksjust 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:35
* didrocks hopes everyone know sed :)21:36
didrocksare you ok?21:36
chombiumdidrocks: depends on the bugs we need to take care of ;)21:36
KurtI am21:36
chombiumme too21:36
didrockschombium: yes, of course :)21:36
didrocksit'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
didrocks$ cd ..21:37
didrocks=> 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
didrocks$ diff -Nurp old new > 90_happy_rms.patch21:37
didrocks=> so there, we compare the previous source (old) to our hacked tree (new). And we put the differences in the file 90-rms.patch21:37
didrocksoupss, 90_happy_rms.patch21:38
didrocksStep 5 completed! (ignore the 'recursive directory loop' warnings)21:38
didrocksis your patch created?21:38
chombiumyes21:39
didrocksnote 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
didrocks$ popd21:39
didrocks=> as previously said, as we have stacked the previous directory, this will lead you the <patchtraining/udev-*> recorded one21:39
didrocks$ rm -rf /tmp/old /tmp/new21:39
didrocks=> it's everytime a good idea to clean what has to be cleaned, as we will never use that again :)21:40
didrocks$ less /tmp/90_happy_rms.patch21:40
didrocks=> 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
KurtI notice that SELinux was replaced by SEGNU/Linux21:40
didrockstell me when everything is all right. Just a few step has to be done now21:40
didrocksKurt: yes, so, when you use sed, be careful with what you do :)21:41
Kurtdidrocks: heh :)21:41
didrocksthis is the case here, but sed was just use to make a quick hack21:41
didrocksused*21:41
didrocks$ mv /tmp/90_happy_rms.patch debian/patches21:41
didrocks=> copy the patch to the patches directory of your current source package directory (remember, you are in <patchtraining/udev-*>) so that your debian/rules will be able to find it and apply it during the build of the package.21:41
chombiumKurt: the regular expression was bad21:41
didrocks=> Step 6 done! We can take a breath, our patch is perfect ;)21:41
didrockschombium: yes, I know. That was not the goal of this classroom to teach regular expression :)21:42
didrocksping when you are ready!21:42
didrocksyou can test in calling debian/rules patch and confirm that your patch apply correctly!21:42
chombiumdidrock: yes rigth. I was just explaining to Kurt21:42
Kurtlol yeah I was just making a remark, I realized what had happened.  Sorry for the fuss :)21:43
chombiumseems good21:43
didrocksKurt: no problem :)21:43
didrocksKurt: but that shows that you are following, that's good!21:44
didrocksare you all right?21:45
didrocksjust 2 remaining persons apparently :)21:45
KurtI am21:45
chombiumo/21:45
didrocksobviously, 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
didrocksso, 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
didrocksPitti 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:45
didrocks$ cd ..; rm -r udev-*; dpkg-source -x udev_*.dsc; cd udev-*21:46
didrocks=> First, let's clean our work and download again an untouched udev-* source tree.21:46
didrocksstep 1 to 3 are completed in simply calling the script:21:46
didrocks$ ../dsrc-new-patch 90_happy_rms.patch21:46
didrocks=> it drops you into a shell where you can edit the code and hack whatever you want21:46
didrocks$ sed -i 's#Linux#GNU/Linux#g' README21:47
didrocks(yeah, the same bad regexp again :))21:47
didrocks=> make all your modification and then, press <Control-D> or type "exit 0" to leave the subshell.21:47
didrocksthen, 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:47
didrocksAre both of you created successfully the patch?21:48
didrockss/Are/does21:48
KurtI got stuck at the $ ../dsrc-new-patch 90_happy_rms.patch     part21:48
chombiumyes21:48
didrocksKurt: wrong paste, maybe? What is doing the script?21:49
Kurt$ ../dsrc-new-patch 90_happy_rms.patch21:49
Kurtoops21:49
didrocksso, when you execute it, you will see a new shell21:49
didrocksthen, you perform your modifications21:49
didrocksand then "exit 0" or <control D>21:50
didrocks(to return to your previous shell)21:50
didrocksKurt: don't hesitate to ask some more question if you still get stuck21:51
didrocksI think Kurt is lost in its subshell :)21:51
Kurtsorry, I didn't see the wget for the dsrc up there21:52
Kurtcatching up now :)21:52
didrocks:)21:53
didrocksok !21:53
didrocksif you like the script, you can put it in your $PATH (~/bin is a good place for that).21:53
didrocksso, doing this by hand or automatically, always remember (as previously said) to apply the patch in the right order.21:53
didrocksdsrc-new-patch is a hack which mostly works for packages without a real patch system, but split-out patches21:53
didrocksbut 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
didrocksfor the remaining one, you will have to complete the previous manual approach.21:54
didrocksif there is no more question (shout NOW!), let's look at the most popular ones now.21:54
lagadidrocks: did you see my question in ubuntu-classroom-chat?21:54
huatslaga: sure...21:55
didrocksthe rocking huats is going to go on on the session to present you some rocking patch system21:55
huatshe will answer there :)21:55
huatsok guys.21:55
didrocksyes :)21:55
lagayay21:55
didrocks<laga> 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 sources21:55
didrockslaga: do you speak about the patch system?21:55
didrockshow to determine the patch system of a package?21:55
huatsdidrocks: switch to -chat :)21:56
huatsFirst of all thanks didrocks ! That was great :)21:56
didrockslaga: ok, will continue on -chat :)21:56
didrocksthx huats ;)21:56
huatsRight now we will focus on patching systems...21:56
huatsof course the old way, that didrocks showed us are nice21:57
huatsbut you'll enjoy evoluates systems too !21:57
huatsfirst of all21:57
huatslet's have a look at dpatch !21:57
huatsTo do so, we'll use ed21:57
huatsso if you have the sources21:58
huatscd ../ed-0721:58
huatsis it ok for everyone ?21:58
huats(well for both of you :))21:58
Kurtyes for me21:58
chombiumyes21:58
huatsok21:58
huatsgreat21:58
huatsA few words on dpatch, let me quote master pitti :21:58
huats"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:58
huatsThe two most important things you should be aware of:21:59
huats* 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
huats(forgetting to update 00list is a common cause of followup uploads :-) )21:59
huats* 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
nxvlhuats: slow down!21:59
huatsnxvl: sure :)21:59
huatso/ nxvl21:59
huatsdpatch 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
huatsdpatch-list-patch22:00
huatsif you type that in your current shell22:00
huatsyou'll have the whole list22:00
huatsof  patches, with their corresponding authors and descriptions22:01
huatsBut by far, you'll mostly use dpatch-edit-patch. This is the command that will enable you to create/modify a dpatch !22:01
huatsLet's start with editing a patch :22:01
huatstype :22:01
huatsdpatch-edit-patch 07_ed.1-spelling-fixes22:01
huats(note that 07_ed.1-spelling-fixes is a current existing patch)22:02
huatsYou are now in a new shell were the patch is already applied. You can edit the files you want.22:02
huatsBy instance:22:02
huats$ echo "UbuntuDevWeekAugust08" >> README22:02
huatsOnce you are OK with your results, just press Ctrl+D.22:03
huatsOtherwise, if you are not happy with your changes, exit the shell with a non zero value, by instance exit 230.22:03
huatsThe patch will be untouched !22:03
huatsbut in that case type exit 022:03
huatsnow simply look at the debian/patches/07_ed.1-spelling-fixes file22:03
huatsat the end of the file you'll notice what e have added...22:04
huatsis it ok for everyone ?22:04
hggdh  cool22:04
Kurtyep22:04
huatsok22:04
huatschombium: too ?22:04
chombiumyep22:05
huatsok great22:05
huatsNow let's create a patch ! Here again we'll use dpatch-edit-patch.22:05
huats$ dpatch-edit-patch 08_developper_week_patch22:05
huatsIf you are not happy with your changes, exit the shell with a non zero value, by instance exit 230.22:05
huatsThe patch will not be created !22:05
huatsYou are once again in a new shell. You can edit the files as you want.22:05
huats(it is the same process than for editing)22:06
huatsonce again22:06
huatsdo22:06
huats echo "UbuntuDevWeekAugust08-again" >> README22:06
huatsand press Ctrl+D22:06
huatsThe patch has been created22:07
huatsBut so far it won't be applied automatically22:07
huatsDoes anybody can tell me why ?22:07
hggdhbecause of petential order conflict22:07
cocooncrashhuats: It's not in 00list.22:07
Kurtit isn't in the 00list?22:07
huatshggdh: nope22:07
huatscocooncrash: and Kurt exactly22:08
hggdhwhat I meant isL it is not in 00list22:08
hggdhbecause of ...22:08
huatsok hggdh22:08
huatsso it can be done with22:08
huatsecho 08_developper_week_patch.dpatch >> debian/patches/00list22:08
huatsPlease have a look at the file debian/patches/08_developper_week_patch.dpatch22:08
huatsNote that exacly like in the debian/changelog you need to put your name and email in the patch !22:08
huatsYou also have to edit the description of the patch. It is the line that follows ## DP:22:08
huatsSo please do it. Having one of them missing is a very common cause for a sponsor to refuse your request !22:08
huatsNote 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
huats$ dpatch-edit-patch 08_developper_week_patch 07_ed.1-spelling-fixes22:09
huats07_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:09
huatsAnd indeed here notice that all patches are applied. How do I notice that ?22:10
chombiumQUESTION: will the patches be sorted by the file name when adding in 00list?22:11
huatschombium: yes22:11
didrockshuats: not sure22:12
huatshum22:12
huatsno22:12
huatsthey will be treated in the file order22:12
didrockschombium: it's the file order22:12
didrocks:)22:12
huatssorry I missread22:12
didrocksjust copy one question from -chat22:12
didrocks<laga> 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
didrocks<huats> laga:  you have too22:12
didrocks<huats> otherwise you'll have lintian warnings22:12
didrocks(for the log)22:12
huatshum22:13
huatsonce again I missread22:13
huatsyou have to put the author name22:13
cocooncrashQUESTION: Should you put your name or the original author?22:13
huats(not yours in that case)22:13
didrockshuats: yes, it's getting late, I know :)22:13
huatsbut put a name is needed... otherwise lintian will complain22:13
nxvlwe love huats22:13
* nxvl waves on huats 22:14
huats:)22:14
huatsthe answer of my question was that you'll notice : patch XXXX apply on22:14
* didrocks is jalous :)22:14
huatsbefore getting the subshell22:14
huatsThat was pretty simple right ?22:14
huatsany other questions with dpatch ?22:14
huatsOh 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
hggdhQUESTION: new patch, new version number. How is it done under DPATCH?22:15
huatsyou have to choose the number22:15
huatsyourself22:15
huatsversion number ?22:15
hggdhversion.release.subversion etc. So no auto-increment?22:16
cocooncrashhggdh: Patches don't affect the package version number. That is determined by the changelog entry.22:16
* nxvl waves on didrocks too22:16
huatshggdh: cocooncrash has answered :)22:16
hggdh:-)22:16
huatshggdh: didrocks will explain that to you on -chat22:16
didrocks(nxvl: thanks, you rock :))22:16
huatslet's move22:17
huatssince we already have lasted longer than supposed...22:17
huats== keepalived : cdbs with simple-patchsys ==22:17
huatsLet's move to cdbs. For this example we'll have a closer look at keepalived (once again pitti example).22:17
huatsoups22:17
huatsit was not pitti example22:17
huats:(22:17
huatsit is getting way to late :)22:17
huats cd ../keepalived-1.1.1522:17
huatsFirst let's have a look at debian/rules.22:18
huatsYou'll notice that the only reference to the patching system include simple-patchsys.mk22:18
huatsPretty magic :)22:18
huatspitti has the good idea to write a script called 'cdbs-edit-patch' that works closely like dpatch-edit-patch.22:18
huatsThis script is contained in the normal cdbs package.22:18
huatsYou 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
huatsLet's add a new patch !22:18
huats$ cdbs-edit-patch 05-simple-readme.patch22:18
huats$ echo 'This should document keepalived' > UbuntuDevWeek.README22:18
huats<press Control-D to leave the subshell>22:19
huatsHere again if you are not happy with your changes, just type exit 230 in the subshell.22:19
huatsThe edition of an existing patch work exactly the same way...22:19
huatsQuestions ?22:19
huats(I won't be long here since it is pretty the same thing than dpatch-edit-patch)22:20
cocooncrashQUESTION: Are the patches still stored in debian/patches?22:20
huatscocooncrash: it is the debian policy yes22:20
cocooncrashQUESTION: Is 00list is used, or are all patches applied?22:20
huats00list is for dpatch22:20
huatsand only patch in it will be applied22:21
huatsIs it ok for everyone ?22:21
chombiumyep22:21
huatsIf so, I am moving on :)22:21
huats== xterm: quilt ==22:22
huatsThe last patch system that we will detail is quilt. We will study it on xterm.22:22
huatsIt 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
huats$ cd ../xterm-22922:22
huatsLike 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/patches22:22
huatsit is needed to respect the debian policy for patches... and thus to satisfy your question cocooncrash22:23
huatsLet's have a look at debian/rules. You'll notice the line that does the trick :22:23
huatsQUILT_PATCHES = patches/22:23
huatsSo to work right now, let's export that right now (since we won't use debian/rules tonight)22:23
huats$ export QUILT_PATCHES=debian/patches22:23
huatsUnlike 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
huatsNow let's edit the already existing patch 901_xterm_manpage.diff:22:24
huats$ quilt push 901_xterm_manpage.diff22:24
huatsThis will apply all patches (inline remember) in the stack up to the given one.22:24
huatsNow let's edit a file that is already touched by the original patch22:25
huats$ sed -i 's/Copyright/Copyleft/' xterm.man22:25
huatsLet's commit the change:22:25
huatsFirst updates the patch file with your recent changes22:25
huats$ quilt refresh 901_xterm_manpage.diff22:25
huatsThan unapplies all patches to go back to pristine source tree22:25
huats$ quilt pop -a22:25
huatsOk, I'll stop a bit :)22:25
huatsto let you do that :)22:25
huatsPing once you have finished to do that :)22:26
didrocks(sorry, just one this, it's quilt push -a 901_xterm_manpage.diff)22:26
huatsoups sorry.....22:26
didrocksto be push every patch file depending on 901_…22:26
huatsthanks didrocks22:26
didrockswell, everytime, and especially for quilt, look at the man before executing anything you are not quite sure :)22:27
huatsSo have you done it ?22:27
Kurtyes22:27
huatsLook at debian/patches/901_xterm_manpage.diff to see the effect :)22:27
huatsDoes anyone can point it to me ?22:27
huatsanyone ?22:28
Kurtcopyrights switched to copylefts22:28
huatsKurt: thanks !22:28
huats:)22:28
huatsindeed :)22:28
huatsit means that the patch has been modified !22:29
huatsFinally to end our patching tour : let's create our own patch22:29
huats$ quilt push -a22:29
huatsThis will apply all the patches (-a for all)22:29
huats$ quilt new UbuntuDevWeekAugust08.diff22:29
huatsThis is the creation of the patch !22:29
huats$ quilt add README22:30
huatsIt is needed to tell quilt all the files that you want to be incoporated in your patch (likewise version control stuffs).22:30
huats$ echo "UbuntuDevWeekAugust08" >> README22:30
huatsSome modification.22:30
huats$ quilt refresh22:30
huatsUpdate the currently edited patch22:30
huats$ quilt pop -a22:30
huatsThis will finally create debian/patches/UbuntuDevWeekAugust08.diff with the changes to README22:30
huatsAnd that it is :)22:31
huatsDoes anybody can tell me what we need to check ?22:31
huatsto be sure that the patch is applied ?22:31
huats(hint: it is a bit like dpatch :))22:31
hggdh:debian/patches/series?22:31
huatshggdh: exactly22:31
hggdhbut this time it is already added in22:32
huatsexactly22:32
didrockshggdh: yeah, quilt rocks \o/22:32
huatsYou don't edit it manually usually.22:32
huatsThat is pretty it guys !22:32
huatsQuestions ?22:32
Kurtthanks for the session huats and didrocks :) It was great22:33
hggdhthank you22:33
huatsKurt: thanks to you guys22:33
didrocksAlways remember that there is the ubuntu wiki for more details: https://wiki.ubuntu.com/PackagingGuide/PatchSystems22:33
huatsif you have any questions please ping us on IRC :)22:33
huatsor ping master pitti :)22:33
didrocksthanks Kurt & hggdh gor having followed until the end :)22:33
didrocksof ping nxvl, he really loves questions :)22:34
didrockss/of/or22:34
huatsthanks a lot guys22:34
nxvland if pitti tells you he doesn't know, ask anyway, he knows22:34
nxvlthat's why we love pitti22:34
didrocksnxvl: \o/22:34
huatsbye bye everyone !22:34
didrocksthanks a lot to everyone! Bye!22:34
chombiumthanks a log guys22:34
chombium\o/22:35
didrocksthanks chombium \o/22:35
arkaraHi23:20
arkaracan anyone mentor me on packaging?23:21

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!