||<>|| This is an edited transcript of the ''PPA and Ubuntu Packaging 101'' session held in #launchpad at 15.00 UTC on 13th September 2007. For details of other PPA IRC sessions, see the [[PPA101|PPA 101]] page. Questions are left in context, unless they appear in a mass Q&A section of the session. The original log of #launchpad for this day is available at: http://people.ubuntu.com/~fabbione/irclogs/launchpad-2007-09-13.html Search for "Hello and welcome to the PPA and Ubuntu Packaging 101 session!" = Basics of Ubuntu packaging = '''Led by:''' Jordan Mantha - Laserjock - MOTU team Laserjock: ok, so we don't have time to launch into a big session on packaging<
> Laserjock: but there are some basics that are useful when doing PPAs<
> Laserjock: so first off, what does PPA accept?<
> Laserjock: it accepts *source* packages<
> Laserjock: so you don't want to upload .debs Laserjock: anybody actually read the Ubuntu Packaging Guide?<
> Laserjock: :-) ''Various people say they have.'' Laserjock: Ok, so I wanted to say that remember that we deal with source packages, that is .dsc, .diff.gz, and .orig.tar.gz normally Laserjock: now, to start with you might find it easiest to take an existing Ubuntu package<
> Laserjock: you can either apt-get source <
> Laserjock: and note that you shouldn't do that with sudo<
> Laserjock: or you can get the files from Launchpad or archive.ubuntu.com<
> Laserjock: you can then mess around in the unpacked source package ( dpkg-source -x .dsc if it isn't unpacked already)<
> Laserjock: and to rebuild it you can do debuild -S (which is a wrapper around dpkg-buildpackage -S -rfakeroot)<
><
> Laserjock: if you need to include the .orig.tar.gz in the upload, like the first time you have that .orig.tar.gz in your PPA<
> Laserjock: then add -sa , debuild -S -sa<
> Laserjock: the packages need to be signed with your gpg key (the same one that's on Launchpad)<
> Laserjock: so make sure that the email address in your changelog entry is the same as in your gpg key<
> Laserjock: I would strongly suggest that people test their source package by building them locally into .debs<
> Laserjock: a good way to do that is with pbuilder<
> superm1: its much more time consuming and annoying to let the PPA fail to build than it is to do it locally<
> DaveMorris: for signing you can also use debsign -k _source.changes Laserjock: superm1: exactly<
> Laserjock: pbuilder creates a minimal Ubuntu envioronment in a chroot Laserjock: and and it provides a "clean room" because all the changes are dropped at then end of each session<
> Laserjock: I don't seem to have it on me, but I made a script that allows you to easiy create and use pbuilders<
> zakame: just to add: you'd want to look into /usr/lib/pbuilder/pbuilder-satisfydepends to be able to get the depencies for your package prior to building ;)<
> Laserjock: I'll email the launchpad-users list with a URL later<
> stdin: There a guide to create/use pbuilder on the wiki -> https://wiki.ubuntu.com/PbuilderHowto[[BR]] Laserjock: in any case you can have multiple pbuilders<
> Laserjock: one for each Ubuntu release for example<
> Laserjock: so you can be running Feisty and build Gutsy .debs<
> Laserjock: I would highly recommend testing *each* source package before you upload<
> Laserjock: simply as a way to minimize problems<
> Laserjock: with lots of packages in the build queues, etc. it can take a while to get a package into the PPA archive tezem: Laserjock: for every Ubuntu release seperately?<
> Laserjock: yes Laserjock: also note that the Packaging Guide is a community project, any help, proofreading, etc. is appreciated == Questions == Laserjock: ok, are there any parts that people had problems with specifially when it came to PPAs? '''Question:''' damon_: what if my source code is pure python,do I need to learn all about make files and ./config etc before I can do anything useful?<
> '''Answer:''' Laserjock: damon_: no. python packages often use distutils. check out a similar package from the Ubuntu archive to see how they did it. '''Question:''' superm1: well the big thing i know i ran into with PPAs off the bat was that you need to manually put the section in. which isn't addressed in that guide. since there is no override system.<
> '''Answer:''' cprov: superm1: but it's mentioned in PPAQuickStart. PPA don't automaticaly apply overrides, it doesn't propagate adjustments made on component/section/priority in previous uploads.<
> '''Further discussion:'''<
> superm1: cprov, indeed, but i think people might have needed a clarification on what that meant<
> Laserjock: I'm guessing people would find a sample debian/changelog file helpful?<
> cprov: superm1: yes, it definitely needs a better description then. Any suggestion ?<
> og3: samples are always good<
> cprov: Laserjock: yes, debian/{control, changelog} samples<
> cprov: changelog -> "bar (1.0-21) gutsy; urgency=low" and control -> "Section: universe/web" are the important bits, IMHO '''Question:''' vinze: So is it also possible to package e.g. GTK themes?<
> '''Answer:''' Laserjock: it's possible to package basically anything. '''Question:''' laga: what has caught me a few times already: the time it takes between the upload and the availability of the source packages at least. i uploaded a package to gutsy and the same package to feisty, with the orig.tar.gz this time. the second upload was reject because the orig.tar.gz was not in the archive yet.<
> xhaker: cprov, Laserjock: as laga pointed out, ppa requires you to upload the orig.tar.gz . Is there any plans to make ppa able to find the corresponding orig.tar.gz when it is somewhere in ubuntu.<
> '''Answer:''' cprov: xhaker: allowing file lookups in ubuntu archive would be helpful, we are investigating the implications in the archive, let me find the specific bug = Basics of PPA features = '''Led by:''' Celso Providelo - cprov - Launchpad team cprov: ok, PPA UI allow users to 'retry' failed builds '''Question:''' laga: cprov: does it also allow users to rebuild completed builds?<
> '''Answer:''' cprov: laga: no, only failed builds. Once a build is completed it gets published in the archive, so a 'rebuild' as this point would be a bin-NMU which is not allowed in ppas<
> '''Further discussion:''' geser: laga: that wouldn't be wise as this could create debs with the same name (and version) but different dependencies<
> cprov: laga: if you want to rebuild a completed build you have to upload a new version of the source in question cprov: the 'retry' link is presented for PPA owners on the left-top portlet in the build page<
> cprov: has everyone noticed it ? is it clear to get in the build page ? laga: tbh, i hadn't noticed it until i was told it was there<
> cprov: laga: but you do receive a build-failure-notification email with direct links, no ? '''Question:''' DaveMorris: I didn't know before, but it's easy once your told, but how do you reupload the source file, the same as before?<
> '''Answer:''' cprov: DaveMorris: yes, just follow the established procedure DaveMorris: my email's did't have direct links to rebuild<
> cprov: DaveMorris: the link points to the "build page"<
> DaveMorris: yeah that one is there, cprov: where you can find out if it's a temporary failure (which could be sorted by a rebuild) or if it's permanent, like a broken source or a ogre-model failure '''Question:''' Laserjock: cprov: if a build fails do we upload with the same versioning or do we need to bump?<
> '''Answer:''' cprov: Laserjock: same version would be reject ;) uploads have to use higher versions always '''Question:''' DaveMorris: won't a revison bump make it appear as a new build though, rather than rebuilding the previous<
> '''Answer:''' cprov: DaveMorris: yes, new source versions will generate new builds and that's what you want. The old build records will remain as "failed". '''Question:''' Derevko: old packages versions are marked as "PendingRemoval", when they will be removed?<
> '''Answer:''' cprov: Derevko: backend will be added in the next LP release cycle (in two weeks) = What is the ogre model? = '''Led by:''' Celso Providelo - cprov - Launchpad team cprov: Ogre-model is a mechanism to force build-dependencies to be in the same or lower components<
> cprov: i.e., source in main can only build-depend on binaries in main, source in universe can build-depend on binaires in main, restricted, universe<
> cprov: currently, ogre-model failures can only be solved by another source upload '''Question:''' mrevell: Hobbsee suggested that "ogre model" is a confusing term. Would you agree?<
> '''Answer:''' cprov: mrevell: we can think about another name, but that's the term used in debian and ubuntu.<
> '''Further discussion:''' <
> Hobbsee: cprov: if it's the term used in debian and ubuntu, how come most of the MOTU's dont recognise it?<
> superm1: Hobbsee, because its something that we normally wouldn't be exposed to since there is an override system on the archive?<
> cprov: Hobbsee: dunno, I didn't know it in debian either, but it's being referred like that since I implemented it two years ago<
> Hobbsee: cprov: the highups may know about it.<
> Hobbsee: superm1: depends if you ever upload to main. if you puload to main, even in ubuntu, you'll get depwaits if you build-dep on universe packages.<
> cprov: Hobbsee: and superm1 is right, with auto-overrides uploads almost never notice it<
> cprov: Hobbsee: we very rarely have uploads to main in ubuntu, they usually get promoted/overridden from universe<
> Hobbsee: cprov: sure, but if you upload a newer version fo what's already there, it'll land in main<
> Hobbsee: (if the original was in main)<
> cprov: Hobbsee: yes, even if the Section is "universe/
", that's auto-override fault.<
> cprov: Hobbsee: once we have UI to allow manual overrides in PPAs we can enable auto-overrides too '''Question:''' gnomefreak: ppa is no longer beta right?<
> '''Answer:''' mrevell: gnomefreak: PPA is in beta but on Launchpad's production site mrevell: Great, thanks very much both to cprov and Laserjock, and to everyone for coming! PLease post further questions to the wonderful launchpad-users list = Next session = Further PPA introductory and Q&A sessions will be held, including as part of Ubuntu Open Week in October. Please subscribe to the [[PPA101|PPA and Ubuntu Packaging 101]] wiki page to get updates.