Package101a1

Ubuntu Open Week - Packaging 101 - Session 1 - Daniel Holbach - Tue, Oct 23, 2007

see also Wednesday session.

15:06 -!- popey changed the topic of #ubuntu-classroom to: Ubuntu Open Week info: Information and Logs: https://wiki.ubuntu.com/UbuntuOpenWeek  |  Ubuntu classroom transcripts: https://wiki.ubuntu.com/ClassroomTranscripts | Please ask questions in #ubuntu-classroom-chat not here | Current Session: Packaging 101 - Session 1 - Daniel Holbach
15:06 < jono> ladies and gentlemen
15:06  * adamsweet rolls drums
15:06 < jono> please prepare
15:06 < jono> for the legend
15:06 < jono> the man
15:06 < warp10|Gutsying> Hi all!
15:06 < jono> the stuff of legend
15:07 < jono> daniel "kickarse" holbach
15:07 < tuxmaniac> :)
15:07  * Hobbsee dies of shock, at the greatness of dholbach
15:07 <+dholbach> Welcome everybody to the Packaging 101 session!
15:07 < leogg> :)
15:07 < jono> wooo!
15:07 <+dholbach> jono, Hobbsee: thanks a lot for that introduction :-)
15:07 < M0useP0t4t0> thanks for invitation @ tuxmaniac :) appreciated!
15:07 < jono> :)
15:07 <+dholbach> for those who don't know me yet
15:07 < ecspike> yay!
15:07 <+dholbach> My name is Daniel Holbach, I work for Canonical, part of the MOTU team for a long time and have worked in a couple of other Ubuntu teams already. What I'm working on now is trying to make becoming a MOTU more easier and enjoyable, so if you have any questions, recommendations or worries outside of this session, feel free to drop me a mail at dholbach@ubuntu.com
15:07 <@popey> Guys, can we please take chatter and questions to the #ubuntu-classroom-chat channel, not here. Thanks.
15:08 <+dholbach> if you have any questions about the session itself, as popey says: ask them in #ubuntu-classroom-chat with QUESTION prefixed
15:08 <+dholbach> Who of you already started contributing to Ubuntu in form of packages or patches?
15:08 <+dholbach> Ok: Who of you started playing with packaging tools already? :-)
15:08  * Amaranth ​
15:08 < ode> me
15:09 < jackie> yes
15:09 <@popey> o/
15:09 < mruiz> dholbach, me!
15:09 < Sophomore> I have
15:09 < Sodki> me, but on Gentoo
15:09 <@PriceChild> *waves*
15:09 < matthe1> a little
15:09  * Jucato a bit
15:09 < shane_> me
15:09  * effie_jayx raises hand
15:09  * Tesla-BOO6C4E-HE 
15:09  * Martinp23 :)
15:09 < tikal26> +1
15:09 < peppych> first try this afternoon
15:09 < DrDabbles> yar
15:09 < shane_> checkinstall
15:09  * tuxmaniac pokes in
15:09 < warp10|Gutsying> me too!
15:09  * andresmujica feels ashamed
15:09 <+dholbach> rock on! that's a great start! :-)
15:09 < bahadunn> me too but mostly just debian packages
15:09  * jono smiles
15:09 < matthe1> checkinstall!
15:09 <+dholbach> What I want to show in today's sessions is two tasks Ubuntu Developers do quite often: 1) updating a package to a new upstream release, 2) providing a debdiff.
15:10 <+dholbach> Why are they important? These tasks are performed quite often and if you're able to make good use of them, it's a very good starting point to get involved as an Ubuntu Developer.
15:10  * evarlast raises hand.  and using PPA - it rules!
15:10 <+dholbach> How do you become an Ubuntu Developer? First of all you become a MOTU: a Master Of The Universe. The process is all written up on http://wiki.ubuntu.com/UbuntuDevelopers - basically it boils down to:
15:10 <+dholbach>  1) contribute patches and new packages
15:10 <+dholbach>  2) get them reviewed by the reviewer team
15:11 <+dholbach>  3) get them uploaded by a sponsor
15:11 <+dholbach>  4) Go back to 1) a couple of times until your sponsors tell you "I'm tired of this - you should be able to do this yourself."
15:11 <+dholbach>  5) Write your application to the MOTU Council.
15:11 < evarlast> s/configure;make;make install/dh_make -s ;dch -v; debuild;dpkg -i/g #;p
15:11 <+dholbach> http://wiki.ubuntu.com/SponsorshipProcess explains how uploads get sponsored. Sponsoring means: somebody who's allowed to upload to the build daemons, will sign your package with their GPG key and upload it for you.
15:12 <+dholbach> The review process is also quite easy: you file a bug with the a link to the source package or attach the patch (debdiff), then you subscribe either ubuntu-main-sponsors (for packages in main or restricted) or ubuntu-universe-sponsors (for packages that live in universe or multiverse).
15:12 <+dholbach> Are there any questions about that already?
15:12 < manish-manipal> any oyher sponsors?
15:12 < manish-manipal> any other sponsors?
15:12 <@popey> you want specific questions or just next in the queue dholbach ?
15:12 <@Amaranth> manish-manipal: #ubuntu-classroom-chat
15:13 <+dholbach> popey: what you have in the queue already :)
15:13 <@popey> < oly-> QUESTION: I have just recently packaging an application i have written, i use the command dpkg-deb -b folder, i have been told i should not package this way any reason why ? and is this correct ?
15:13 <@Amaranth> dholbach: The current questions have nothing to do with what you just talked about
15:13 <+dholbach> oly-: there are a variety of different ways packaging applications: http://wiki.ubuntu.com/PackagingGuide/Basic will help you with that
15:14 < oly-> I know there are a few ways, i was just curious if there is any reason why i should not use that method,
15:14 <+dholbach> oly-: all the necessary bits in the debian/ directory are explained there - if you need help with your package, just write a mail to ubuntu-motu-mentors@lists.ubuntu.com
15:14 <+dholbach> oly-: I'd need to look at your source package to say that
15:14 <@popey> < scorpioxy> QUESTION: Is there anything specific or magical about packaging a gnome applet written in pyGTK?
15:15 <+dholbach> scorpioxy: no, that should be relatively easy - in http://wiki.ubuntu.com/PackagingGuide/Basic there should be a couple of python reference packages that you could look at
15:15 <+dholbach> scorpioxy: same goes for you: if you need help ask on the mentors list
15:15 <@popey> < evarlast> QUESTION: what is being done about the sparse documentation, conflicting documentation? What further documentation could be reference for packaging things like python apps, python libs via eggs, mono apps and libs, ruby apps, etc ?
15:15  * dholbach is happy to see so many people doing packaging work already :)
15:16 <+dholbach> evarlast: good question!
15:16 <+dholbach> evarlast: it's something I've been working on in the last weeks and will continue to work on
15:16 <+dholbach> evarlast: I plan http://wiki.ubuntu.com/PackagingGuide and http://wiki.ubuntu.com/UbuntuDevelopment to be the definite namespaces for things to live in
15:16 <@popey> < tuxmaniac> QUESTION: How is the sync between debian testing and Ubuntu done. Is there any involvement of the maintainer, MOTU other than the "Acks" ?
15:17 <+dholbach> tuxmaniac: the sync process is quite easy: 1) make sure we can sync the new version from debian (by proof reading the diff, test-building, test-installing), 2) file a bug with the sync request
15:17 <+dholbach> it's explained on http://wiki.ubuntu.com/UbuntuDevelopment too
15:17 <@popey> < DrDabbles> QUESTION: If I have an upstream update to a package not contained in UNIVERSE or MULTIVERSE...what happens?
15:17 <+dholbach> (or linked from there at leasT)
15:18 <+dholbach> DrDabbles: http://wiki.ubuntu.com/UbuntuDevelopment#NewPackages explains what to do
15:18 <+dholbach> DrDabbles: either you package it on your own or you file a request for somebody else to do it
15:18 <+dholbach> both is explained there
15:18 <+dholbach> To sum it up: http://wiki.ubuntu.com/SponsorshipProcess and http://wiki.ubuntu.com/UbuntuDevelopers are the process pages that you really want to bookmark, if you're interested in packaging and joining the team. :-)
15:18 <+dholbach> The MOTU team can be found on #ubuntu-motu and at http://wiki.ubuntu.com/MOTU - if you need help with anything let us know, there's also our motu-mentors list at http://lists.ubuntu.com/ubuntu-motu-mentors
15:18 < DrDabbles> dholback: I actually mean what if it's in MAIN versus UNIVERSE
15:19 <+dholbach> DrDabbles: oh right - to get it into main it needs a review and to fulfil a couple of prerequisites
15:19 <+dholbach> the process is on http://wiki.ubuntu.com/UbuntuMainInclusionRequirements I beliebe
15:19 <+dholbach> believe
15:20 <+dholbach> hope that helps
15:20 <@popey>  < tikal26> Question- How you can check if someone else is packaging something
15:20 <+dholbach> you can either check http://launchpad.net/ubuntu/+bugs and filter the needs-packaging bugs and see if it was filed there
15:21 <+dholbach> or check http://revu.tauware.de
15:21 <+dholbach> (also if you want to know if somebody in Debian works on it: check http://bugs.debian.org/wnpp I believe)
15:21 <+dholbach> let's get started updating a package
15:22 <+dholbach> one of the first things we need is check if we have deb-src entries in our /etc/apt/sources.list
15:22 <+dholbach> deb-src http://archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse     if you're on gutsy already
15:23 <+dholbach> the next step will be to set up the DEBFULLNAME and DEBEMAIL variables
15:23 <+dholbach> I have these two lines in my   ~/.bashrc
15:23 <+dholbach> export DEBFULLNAME='Daniel Holbach'
15:23 <+dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
15:23 < kavoor> QUESTION: where can i get older versions .. for ex : firefox v 1.5
15:23 <+dholbach> please add something along those lines if you haven't already
15:24 <+dholbach> and run    source ~/.bashrc    in the terminal afterwards
15:24 <@popey> kavoor: please ask questions in #ubuntu-classroom-chat thanks
15:24 <+dholbach> these two variables are used by a couple of tools and it will spare you the pain of changing them manually
15:24 < kavoor> #join ubuntu-classroom-chat
15:24 <+dholbach> after that we'll install a couple of tools we'll need along the way
15:24 <+dholbach> sudo apt-get install devscripts build-essential wget cdbs fakeroot liburi-perl debhelper
15:25 <@popey> kavoor: /join #ubuntu-classroom-chat
15:25 <+dholbach>  . build-essential will give you a minimal build environment (make, gcc, etc.)
15:25 <+dholbach>  . devscripts includes tools that make packaging a lot easier
15:26 <+dholbach> etc - this is all explained on http://wiki.ubuntu.com/PackagingGuide
15:26 <+dholbach> BuildTools is the section I believe
15:26 <+dholbach> <mruiz> QUESTION: I dholbach. It would be great if you can explain to us how to prepare our development environment (hardy chroot, pbuilder, etc). Thanks!
15:26 <+dholbach> mruiz: for this tutorial I did not plan to set up chroots or pbuilders as it might take too long for those on a slow connection
15:27 <+dholbach> now we'll get the source of the old package
15:27 <+dholbach> I chose the somewhat historic case of brasero 0.5.2 -> brasero 0.5.90
15:27 <+dholbach> (as it worked nicely for me... :))
15:28 <+dholbach> so instead of running       apt-get source brasero        to get the source from the archive, we'll run:
15:28 <+dholbach>  dget -x http://people.ubuntu.com/~dholbach/motu/brasero_0.5.2-0ubuntu1.dsc
15:29 <+dholbach> if the download is done on your machine, you'll see that it has downloaded a .orig.tar.gz, a .diff.gz and a .dsc file
15:29 <+dholbach> the .orig.tar.gz file is the source tarball the upstream author provided on his homepage
15:29 <+dholbach> the .diff.gz file contains the compressed changes done by the package maintainer
15:29 <+dholbach> the .dsc file is a text-only description file
15:30 <+dholbach> now we'll get the new source upstream tarball we want to update to (0.5.90):
15:30 <+dholbach> wget http://people.ubuntu.com/~dholbach/motu/brasero-0.5.90.tar.gz
15:30 < sgtd> demonstrating /topic
15:30 <+dholbach> now we'll extract the tarball:
15:30 <+dholbach>  tar xfz brasero-0.5.90.tar.gz
15:30 < joumetal> rcd
15:31 <+dholbach> and rename it to the .orig.tar.gz file name:
15:31 <+dholbach>  mv brasero-0.5.90.tar.gz brasero_0.5.90.orig.tar.gz
15:31  * RainCT says hi (a bit late :P)
15:31 <+dholbach> now we'll simply copy the packaging changes over: in this case it's simply the debian directory
15:31 <@popey> RainCT: ----> #ubuntu-classroom-chat
15:31 <+dholbach> cp -r brasero-0.5.2/debian brasero-0.5.90/
15:32 <+dholbach> now let's get the build-dependencies for the package:
15:32 <+dholbach> sudo apt-get build-dep brasero
15:32 <+dholbach> this might take a while, so I'm happy to take on a few questions
15:32 <@popey> < Knightlust> QUESTION: why host reviews on revu.tauware.de? Why not host it at revu.ubuntu.com?
15:33 <+dholbach> Knightlust: good question. it was community contributed solution to help with reviewing packages, I believe there was a .ubuntu.com redirect or hostname for quite a while
15:33 <+dholbach> that's all I can say for now
15:33 <@popey> < kavoor> QUESTION: where can i get older versions .. for ex : firefox v 1.5
15:34 <+dholbach> kavoor: best to check on launchpad: http://launchpad.net/ubuntu/+source/firefox - there you should be able to get all old versions of it
15:34 <@popey> < gonzalo> QUESTION: How do we get any other packages? Like, say, synaptic? Is there a standard place from where to retrieve them?
15:34 <+dholbach> gonzalo: if you're talking about the source, it's simply        apt-get source synaptic
15:34 <@popey> < DrDabbles> QUESTION: If the new version has different build deps, just install them manually and note the packaging metadata?
15:35 <+dholbach> DrDabbles: that's a very good question
15:35 <+dholbach> if you run       diff -u brasero-0.5.{2,90}/configure.in
15:35 -!- mode/#ubuntu-classroom [-o PriceChild] by ChanServ
15:35 <+dholbach> you will notice that quite a few things have changed from a build system point of view during those two releases (0.5.2, 0.5.90)
15:35 <+dholbach> -LIBBURN_REQUIRED=0.2.3
15:35 <+dholbach> +LIBBURN_REQUIRED=0.3.4
15:36 <+dholbach> for example
15:36 <+dholbach> that's a change you definitely want to reflect in debian/control
15:36 <+dholbach> if you all look at brasero-0.5.90/debian/control  for a sec, you'll see the Build-Depends line
15:37 <+dholbach> it contains all the packages that are required to be installed to build the package
15:38 <+dholbach> our version of brasero does not seem to make use of libburn, but libnautilus-burn
15:38 <+dholbach> so that change does not affect us
15:38 <+dholbach> DrDabbles: but generally: that's very important to check
15:38 <@popey> < Sophomore> QUESTION: wouldn't it be safer just to gzip -dc ../brasero*diff.gz | patch -p1 than copy the debian dir over? it'd be cleaner to do this I'd imagine, so ~ backup files wouldn't be copied over as well
15:38 <+dholbach> Sophomore: definitely, we could also make use of debian/watch files and use uupdate, which would do it all for you
15:39 <+dholbach> Sophomore: this was a selected easy example
15:39 <+dholbach> Sophomore: but yeah, I agree
15:39 <@popey> < ian_brasil> Question : how can I add my key to the revu ring?...the emaill address on the page is not valid
15:39 <+dholbach> ian_brasil: best to ask on #ubuntu-motu, there's always a few revu admins around
15:39 <+dholbach> (if it's not explained in a different way on http://wiki.ubuntu.com/REVU)
15:39 <@popey> < tuxmaniac> QUESTION: How do I proceed if I dont want my machine to get loaded with all the build-deps of my packages. Is there a way to install build-deps -> remove after work done?
15:40 <+dholbach> tuxmaniac: good question: there's for example pbuilder: http://wiki.ubuntu.com/PbuilderHowto
15:40 <+dholbach> which will create a chrooted environment, in which those packages are installed and de-installed
15:40 <+dholbach> it has the benefit of building in a clean and minimal environment
15:40 <+dholbach> I just didn't feel we'd have the time for everybody to set up a chroot in this session
15:41 <@popey>  < andresmujica> QUESTION: Which is the best way to help usefully to packaging without being a developer?
15:42 <+dholbach> andresmujica: it does not take a lot of coding experience to work on packaging. it's more important that you test things carefully, you're able to read documentation, talk to people and are interested in making things work and dive in directly
15:42 <+dholbach> andresmujica: on http://wiki.ubuntu.com/MOTU/TODO and http://wiki.ubuntu.com/MOTU/Bugs we have a bunch of tasks that are suited for new contributors, you might want to check out the 'bitesize' tasks
15:43 <+dholbach> ok, let's move on, everybody all set? all build-depends installed? :)
15:43 <+dholbach> for each upload you prepare in ubuntu, you add a new changelog entry, so that's what we'll do now
15:43 <+dholbach> cd brasero-0.5.90
15:43 <+dholbach> dch -i
15:44 <+dholbach> you will notice that a lot of the changelog entry has already been prepared for you
15:44 <+dholbach> DEBFULLNAME and DEBMAIL was used and the upload target ('gutsy') should also be there
15:44 <+dholbach> we'll change the version string to 0.5.90-0ubuntu1
15:45 <+dholbach> which means: 0.5.90 is the upstream version
15:45 <+dholbach> and 0ubuntu1 is the first upload to ubuntu (without being merged with a debian version)
15:45 <+dholbach> 0.5.90-1 would be the first upload going to debian, we might decide to sync that
15:46 <+dholbach> (depending on the differences in the packaging)
15:46 <+dholbach> also we'll change the upload target (it might say 'gutsy' or 'feisty' in your case) to 'hardy'
15:46 <+dholbach> in Ubuntu we can only do uploads to the "current development release"
15:47 <+dholbach> gutsy is released, so it was closed and only uploads to gutsy-updates and gutsy-security can happen
15:47 <+dholbach> (Ok, -proposed is part of that, and there's also -backports)
15:47 <+dholbach> add a fancy changelog entry like        "New Upstream release"
15:47 <+dholbach> and save the file
15:48 <+dholbach> now run      debuild -S -sa
15:48 <+dholbach> this will build the source package (create the .diff.gz and .dsc file) for you
15:49 <+dholbach> it might complain if you don't have GPG set up, but that's expected and OK in our case
15:49 <+dholbach> check out https://help.ubuntu.com/community/GnuPrivacyGuardHowto after the session, you'll need it to become an Ubuntu developer :)
15:49 <+dholbach> <ian_brasil> Question: i am currently uploading some documentation to my PPA into universe/devel ...should this be marked Gutsy or Hardy?
15:49 <+dholbach> ian_brasil: if you want to get it into hardy, use hardy
15:50 <+dholbach> hardy should be set up right now, I hope the PPAs are on hardy too already - best to ask in #launchpad
15:50 <+dholbach> if not, using 'gutsy' for reviewing and testing purposes should be fine
15:51 <@popey> < ian_brasil> Question: if i want to send my work to someone to review what file do I need to send?
15:51 <+dholbach> ian_brasil: best to upload it to some place and give them the link to the .dsc file
15:51 <+dholbach> ian_brasil: that way, they can simply run        dget -x <link>
15:51 <+dholbach> (and get the whole package downloaded)
15:52 <+dholbach> .orig.tar.gz .diff.gz and .dsc are mandatory
15:52 <@popey> < tuxmaniac> QUESTION: This package has a Debian revision number but there does not seem to be
15:52 <@popey> < tuxmaniac> QUESTION: I have the .orig.tar.gz but it still gives this warning. Any thing I missed out?
15:52 <@popey> sorry..
15:52 <@popey> < tuxmaniac> QUESTION: This package has a Debian revision number but there does not seem to be an appropriate original tar file or .orig directory in the parent directory;
15:52 <@popey> < tuxmaniac> QUESTION: I have the .orig.tar.gz but it still gives this warning. Any thing I missed out?
15:53 <+dholbach> tuxmaniac: is this the output you get?
15:53 <+dholbach> daniel@bert:~$ ls *.tar.gz
15:53 <+dholbach> brasero_0.5.2.orig.tar.gz  brasero_0.5.90.orig.tar.gz
15:53 <+dholbach> daniel@bert:~$
15:53 < tuxmaniac> dholbach, yes
15:53 <+dholbach> tuxmaniac: and did you change the version number in debian/changelog to 0.5.90-0ubuntu1
15:53 <+dholbach> (of the new changelog entry)
15:53 <+dholbach> once you've done that, run    debuild -S -sa    again
15:54 <+dholbach> ok, now we'll do a test build of the package
15:54 <+dholbach> up until now, we just did source changes and built source packages
15:54 <+dholbach> these source packages are uploaded to the Ubuntu build daemons, building the binary packages locally is still important for testing reasons
15:55 <+dholbach> so now please run         debuild -us -uc
15:55 <+dholbach> this will build the package and not ask you to sign the packages :-)
15:55 <+dholbach> I suppose this will take a while for everybody, so please ask questions in the meantime
15:56 < hydrogen> Oo, it failed!
15:56 <@popey> QUESTION: compile failed here
15:56 <+dholbach> what's the error message, popey?
15:56 <@popey> http://pastebin.ubuntu.com/1242/
15:56 <@popey> thats the end of it
15:57 < DrDabbles> Complains about no members for BraseroDataDiscPrivate
15:57 < eyedol> I'm late. whats happening ATM
15:57 <@popey> eyedol: --> #ubuntu-classroom-chat please
15:57 <+dholbach> interesting, checking
15:58 < tuxmaniac> dholbach, failed for me too
15:58 < AsSFOuR> hi all
15:58 < peppych> +1 :(
15:58  * hydrogen rebuilds to get the original error message
15:58 <+dholbach> I'm sorry this happened - it worked for me when I prepared it
15:59 <+dholbach> the problem is here:
15:59 <+dholbach> data-disc.c:89: Fehler: expected specifier-qualifier-list before »GtkTooltips«
15:59 <+dholbach> data-disc.c: In Funktion »brasero_data_disc_get_property«:
15:59 <+dholbach> data-disc.c:602: Fehler: »BraseroDataDiscPrivate« hat kein Element namens »reject_files«
15:59 <+dholbach> data-disc.c: In Funktion »brasero_data_disc_set_property«:
15:59 < hydrogen> yea
15:59 <+dholbach> I'm sure this is resolved in a newer version of brasero
15:59 <+dholbach> sorry to let you all run into this problem, we won't get that fixed just now
16:00 <+dholbach> I suggest we do a five minutes break until the next session?
16:00 <@popey> yay
16:00 <@popey> thanks dholbach 
16:00 <+dholbach> thanks

MeetingLogs/openweekgutsy/Package101a1 (last edited 2008-08-06 16:29:21 by localhost)