/srv/irclogs.ubuntu.com/2009/04/23/#ubuntu-classroom.txt

dtchenfor those of you idling for the piuparts/vm session, i've placed some notes at https://wiki.ubuntu.com/Packaging/Training/Logs/2009-04-2300:38
dtchenit's a good idea to go ahead and configure pbuilder, piuparts, and your vm00:39
=== pleia2 changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/ubuntu-classroom | Upcoming: 23 Apr @ 00:00 UTC Package testing: piuparts and VMs | Run 'date -u' in a terminal to find out the UTC time
dtchenall right folks, it being 00:00 utc and such, let's roll on through. i hear there's a release being prepared. :-)01:00
nhandler:)01:01
dtchenagain, this packaging session will introduce piuparts for package testing, and we'll mention how to use a VM to further test functionality01:01
dtchenthere are some notes (and corrections!) at https://wiki.ubuntu.com/Packaging/Training/Logs/2009-04-23, so please take look and get your prerequisites all shiny01:02
kklimondadamn, I've managed to stay awake for this session.. any cookies for me? ;}01:02
dtchencough, take a* look01:02
dtchenany questions before we dive in?01:02
kklimondaWhy so late? ;)01:03
=== Pollywog is now known as pollywog_
dtchen(no idea! the schedule rotation deems it so)01:03
dtchenok, and with that resounding silence, let's get started.01:03
kklimondadtchen: wait - how to configure piuparts?01:04
kklimondado i even have to?01:04
eythianhopefully this VM gets installed before you're too far through.01:04
kklimonda:)01:04
dtchenpiuparts(8) is a tool for providing a somewhat systematic method for testing whether a binary package can be installed and removed, and/or any of the intermediate upgrade steps01:04
Pollywogwe are installing a vm?01:05
dtchenkklimonda: as long as you have piuparts installed, that will suffice01:05
eythianPollywog: My desktop is intrepid01:05
Pollywogic01:05
dtcheneythian: / Pollywog: you don't necessarily *need* a VM, but it's quite useful for actual usage testing01:05
dtchen(ok, back to topic)01:06
dtchensome (many?) people are familiar with building binary packages from source packages on their local systems01:06
dtchenpbuilder is but one such utility - granted, it's a very nice utility01:07
dtchenbriefly, one would do something akin to: # pbuilder build foo.dsc01:07
dtchenif everything "goes well", one ends up with ../*.deb (and the other parts of the source package)01:08
dtchenpeople often then use dpkg -i (or gdebi or ...) to install ../*.deb01:08
dtchenhowever, pbuilder has one fairly glaring omission in the maintenance sense: it doesn't actually test-install/remove/etc. the generated binary packages01:09
kklimondadtchen: is it possible to install packages in pbuilder chroot without too much work?01:09
nhandlerYes kklimonda01:09
dtchenkklimonda: absolutely, and i'll touch on that briefly, too, with something called pbuilder hooks01:09
dtchensince kklimonda provided such a nice segue...01:10
dtchenpbuilder has an extension mechanism known as hooks. take a look in /usr/share/doc/pbuilder/examples/01:10
dtchennow, piuparts and pbuilder hooks for executing an install/upgrade/removal test are nominally similar01:11
dtchenwhere piuparts really differs is the ability to test install/upgrade/removal for an entire archive01:11
dtchenthat's a bit much for pbuilder (although it's certainly possible with some additional scripting)01:11
dtchen(so, next time you encounter liw online, give him a virtual beer)01:12
dtchendoes anyone have any questions regarding what piuparts is used for?01:12
kklimondano01:13
dtchenok, now let's look at the functional testing of binary packages01:13
dtchenpiuparts and pbuilder (with hooks) are useful for fairly basic testing, but they don't actually test whether your pbuilt/sbuilt package actually starts, throws pretty screen bling up, crackles/hisses/pops, etc.01:14
dtchen(err, oops, was that pulseaudio?)01:14
kklimonda:)01:14
dtchento get a sense of whether your package works, you really should use a VM. at the very least, you can install in the pbuilder chroot and invoke the program(s).01:15
dtchennow that i've set the stage, let's look at the two munged source packages i've placed at http://kernel.ubuntu.com/~dtchen/package-training-2009.04.23/01:15
dtchenthe first is oss-compat, and we'll use that to demonstrate piuparts01:16
nhandlerShould we download the packages?01:16
dtchenyes, we should have the munged source packages downloaded01:16
kklimondadone01:17
dtchenfor people who preferred `apt-get source oss-compat', i'll pastebin the debdiff01:17
dtchen(well, the relevant portion)01:17
nhandlerFor everyone else, you can use dget to download the source package01:18
dtchenhttp://paste.ubuntu.com/156227/01:18
dtchenso the basic idea here is that as of jaunty, module-init-tools requires files to have the ".conf" suffix/extension01:19
dtchenthis modification is a fairly straightforward one: we look at the source package and modify debian/postinst01:19
dtchen(then adjust debian/control, add/modify the changelog entry, etc.)01:20
dtchennow, when that package is pbuilt using pbuilder [without hooks], the deb will be generated correctly01:20
dtchenthis case is an excellent illustration of where the install pbuilder hook and piuparts shine01:21
dtchenbecause the actual error lies in the postinst, pbuilder [without hooks] won't throw any errors01:21
dtchenso let's actually use piuparts ;-)01:21
dtchenthe syntax is fairly basic:01:22
dtchensudo piuparts foo.deb01:22
dtchenon my system, because i use apt-cacher-ng, the syntax is bit more convoluted:01:23
dtchensudo piuparts -m "http://localhost:3142/ubuntu" --skip-minimize -- foo.deb01:23
kklimondadtchen: i get " E: Couldn't find package debfoster"01:24
kklimondaI've added --skip-minimize and it worked01:25
dtchenif you're using jaunty, you'll probably need the --skip-minimize01:25
dtchennow, piuparts will create a minimal chroot if you use the above command, but most of you likely have a pbuilder base.tgz (or jaunty.tgz or whatnot) already01:25
dtchenyou can instruct piuparts to use the existing pbuilder base.tgz by passing -p01:26
dtchen(so, as piuparts runs...)01:26
kklimondadtchen: -p ? not -b ?01:26
dtchenkklimonda: -b is more flexible01:27
kklimondai see - it's a shortcut01:27
kklimonda:)01:27
kklimondadtchen: but still when i use my pbuilder base.tgz I get "E: Couldn't find package debfoster" error01:27
dtchenkklimonda: are you using jaunty's piuparts?01:28
kklimondadtchen: yes01:28
kklimonda0.35ubuntu101:28
dtchenlet's troubleshoot that offline01:28
Pollywogso piuparts is different for different releases?01:29
juanje1kklimonda: adding --keep-sources-list option probably it works01:29
kklimondadtchen: appending --skip-minimize (as adviced in bug #317721) helps01:29
kklimondaoh, no ubottu here :)01:29
dtchenPollywog: ideally, no - however, there is a difference between the Debian and Ubuntu components and priorities01:29
kklimondajuanje1: yes - it also worked01:30
dtchenthe Ubuntu modification in jaunty helps work around it, but it's imperfect)(01:30
dtchen(hmm, Home key fail)01:30
asomethingdtchen: -b is used to specify a specific base tarball, right? I've got pbuilder set up for jaunty, intrepid, and sid01:31
dtchenasomething: correct01:31
dtchennow, piuparts's output is fairly verbose01:31
dtchenthe parts we're interested in lie toward the end of the output01:32
dtchennamely, PASS/FAIL/ERROR01:32
dtchennote the:01:33
dtchenERROR: Broken symlinks:01:33
dtchen  /etc/modprobe.d/oss-compat.conf -> /lib/oss-compat/linu01:33
dtchen(that's deftly illustrated at http://paste.ubuntu.com/156227/)01:33
dtchenthe process of correcting the error as a maintainer is fairly intuitive01:34
dtchenwe readd the omitted character, regenerate the source package, rebuild it, rerun piuparts on it. (rinse, lather, repeat)01:34
dtchenany questions thus far?01:35
dtchenok, so we've quickly demonstrated how piuparts can assist in catching maintainer script errors01:36
dtchennow, as maintainers/developers, we're supposed to be testing all our changes01:37
dtchendue to whatever excuses, many of us don't ;-)01:37
dtchenfunctional testing, however, is quite important01:37
dtchenreally, changes must be tested in a VM for both correctness and efficiency01:38
dtchenthe second example munged source package in my kernel.ubuntu.com space is pavucontrol01:38
dtchenthe change that actually makes jaunty's pavucontrol binary package usable is introduced in debian/patches/0002-Handle-noninitialised-data.patch01:39
dtchenseveral iterations of that patch were generated before i discovered that upstream's fix wasn't entirely applicable to our source package01:40
dtcheni.e., sometimes it's not as straightforward as "just applying upstream fixes"01:40
dtchenbriefly, jaunty ships with an older pulseaudio source package with many, many backported alsa fixes01:41
dtchenthese backported fixes differ from the current upstream source package, and therefore there are several assumptions in upstream's pavucontrol fix that aren't applicable to Ubuntu01:41
kklimondamhm01:42
kklimondaso we should use "test before release" as our mantra ? :)01:42
dtchenfor our purposes, however, we're only going to illustrate that using a VM to test changes is the most efficient manner of demonstrating that a bug was fixed01:44
dtchen(that's bug 359274)01:44
dtchenif one were to take my munged source package, it is functionally equivalent to jaunty's superceded 0.9.7-1ubuntu101:44
dtchenthat version crashes as soon as a user attempts to mute System Sounds in the Playback tab01:44
dtchenthus, testing in a VM (or a chroot or whatnot) is the simplest way to demonstrate the efficacy of a fix01:44
dtchenabsolutely01:44
dtchensince many people don't have VMs configured, i won't insist that everyone duplicate the crash right this moment, but run through it on your own time, and remember that development really needs this constant testing01:45
dtchenanecdote: if i had consistently used piuparts on my alsa-* and pulseaudio* source uploads for jaunty, i probably would have eliminated a half-dozen uploads01:46
dtchenso, what do we take away from this session? using piuparts is good. testing in a vm after using piuparts is good.01:46
dtcheni'll open it up for general questions now.01:47
Pollywogare there some Ubuntu-specific tutorials?01:47
Pollywogfor piuparts01:47
dtchenno, but feel free to pitch in :-)01:48
dtchen(this session was just an intro to piuparts)01:48
kklimondadtchen: i have a minor problem with pbuilder but it's unrelated to this class.01:48
dtchenkklimonda: right, we can discuss that offline in -motu after this session01:48
kklimondaok01:48
dtchenPollywog: do you have specific questions on using piuparts in a particular context?01:49
kklimondadtchen: thanks for piuparts introduction - i was going to read about it some time ago and then forgot how it's called :)01:49
nhandlerdtchen: Is there a hook for pbuilder to have it run the deb through piuparts?01:49
Pollywogno, I am really confused because I have not used piuparts01:50
dtchennhandler: no, but there's some duplication in /usr/share/doc/pbuilder/examples/B91dpkg-i01:50
PollywogI have played with pbuilder a few times01:50
Pollywogbut in Debian01:50
dtchenPollywog: ok. very briefly, one uses pbuilder to generate a set of binary package(s) from a source package01:51
dtchenPollywog: however, pbuilder by default does not actually test the installation/upgrade/removal of said generated binary package(s)01:51
dtchenPollywog: it can be particularly troublesome if errors lie in the maintainer scripts01:52
dtchen(since we only encounter those at package install/upgrade/removal)01:52
dtchenPollywog: try this: sudo piuparts --skip-minimize hello01:54
dtchenjuanje1: i have not tried using jaunty's piuparts on hardy, so i don't know offhand if it's feasible01:54
dtchenjuanje1: one thing to be aware of is the python2.6 transition01:54
dtchenPollywog: err, i think i omitted an -a01:55
PollywogI will need to get the sources for hello01:56
Pollywogoh something happened01:57
dtchenPollywog: actually, you don't have to retrieve the sources01:57
Pollywogyes I see that now01:57
dtchenPollywog: -a instructs piuparts to retrieve from the repository using apt-get01:57
PollywogI added the -a01:57
dtchenjuanje1: i generally filter the output in some other process01:58
dtchenjuanje1: the verboseness of piuparts can be cumbersome01:58
Pollywogis there a way to adjust the verbosity?01:59
dtchenPollywog: not quite01:59
Pollywogk01:59
dtchenany other questions before we wrap up?02:00
Pollywognone here02:00
Pollywogdtchen: thanks for the class02:00
dtchenno prob, thanks all!02:00
juanje1dtchen: yep, thanks :-)02:00
asomethingdtchen: thanks!02:01
dtchenso, next week is dholbach with "Getting Started with Ubuntu Development"02:02
dtchenit will take place on 30 April 2009, 06:00 UTC02:02
dtchenhope to see you here!02:02
=== alexbobp is now known as socat
=== socat is now known as alexbobp
=== croppa_ is now known as croppa
=== ChanServ changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/ubuntu-classroom | Upcoming: 24 Apr 2009 @ 00:00 UTC: SSH; Ubuntu Open Week! Mon 27 April - Fri 1 May https://wiki.ubuntu.com/UbuntuOpenWeek | Run 'date -u' in a terminal to find out the UTC time
=== MTeck is now known as MTecknology
=== patrick is now known as Guest73092
HymnToLifeguess I'll do a Photoshop break in an hour23:06
macmanthis chan has always been here ?23:06
HymnToLifeyes23:07
HymnToLifeThu 23 Apr 2009 22:07:27 UTC23:07
HymnToLifebodhi_zazen: surely you mean in TWO hours ;)23:07
kklimondawhat is this class going to be about?23:08
HymnToLife/topic23:08
kklimondaSSH?23:09
bodhi_zazenssh23:09
bodhi_zazentwo hours, lol23:10
bodhi_zazenah, yes :)23:10
bodhi_zazensorry23:10
kklimondawhat exactly? ssh basics - rsa keys etc. ?23:10
bodhi_zazenkklimonda: what ever people like23:11
bodhi_zazenI would like these sessions to be Q&A more then lectures23:12
bodhi_zazenand I have a shared ssh session set up so can demo commands in a shared session23:12
kklimondamhm23:12
bodhi_zazen>:)23:13
bodhi_zazenhttp://paste.ubuntu.com/156798/23:13
bodhi_zazenyou will not be able to log in as of yet though23:13
HymnToLife>O23:15
HymnToLifea lecture on SSH would be easy23:15
HymnToLife1. Get "SSH: the definitive guite" from O'REilly23:16
HymnToLife2. Read it23:16
HymnToLife3. ???23:16
HymnToLife4. PROFIT!23:16
cprofittwhat?23:18
HymnToLifelol23:18
HymnToLifeyou, sir, just won an internets23:19
HymnToLife:<23:23

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