<> {{{#!irc [06:58] hiya kirkland :) [06:58] <@kirkland> dholbach: howdy [06:58] * kirkland wonders how many people are up at this crazy hour :-) [06:59] +1 :) [06:59] * FuturePilot is [06:59] <@kirkland> very good :-) [06:59] +1 [06:59] <@kirkland> i'm just getting my demo env setup [06:59] * dholbach just told a few folks [06:59] I'm not [07:00] I've sleep during the day... [07:00] <@kirkland> howdy all! [07:01] <@kirkland> alrighty ... [07:01] <@kirkland> my name is Dustin Kirkland [07:02] <@kirkland> I'm a MOTU and Core Developer in Ubuntu, and I work for Canonical on the Ubuntu Server [07:02] <@kirkland> i'm here to talk about PPA's [07:02] <@kirkland> what they are [07:02] <@kirkland> how to use them [07:03] <@kirkland> and how wonderfully useful they are! [07:03] <@kirkland> so a PPA is a Personal Package Archive [07:03] <@kirkland> and it's a tremendously interesting concept [07:04] <@kirkland> i have been in and around Linux development for almost 10 years now, and I never heard of this "PPA" concept until I began working on ubuntu and with launchpad [07:04] <@kirkland> so let's start by explaining what an archive is [07:05] <@kirkland> i assume most people here have used something like apt-get, aptitude, smart, update-manager, synaptic [07:05] <@kirkland> these are client-side utilities that talk to a server providing an archive [07:06] <@kirkland> now the archive itself [07:06] <@kirkland> is really just an http server [07:06] <@kirkland> with files and directories that can be browsed [07:06] <@kirkland> i suppose it could probably be an ftp server too [07:07] <@kirkland> in any case, you're probably familiar with http://archive.ubuntu.com [07:07] <@kirkland> if not, browse around it some time, by hand, by pointing a web browser at that address [07:07] <@kirkland> you should see a fairly regular hierarchy [07:07] <@kirkland> most of the interesting stuff happens in the pool/ directory [07:08] <@kirkland> that's where binary and source packages land [07:09] <@kirkland> now, archive.ubuntu.com is the "official" archive [07:09] <@kirkland> which means that these are the packages, as "officially" prepared by the developers of the Ubuntu project [07:10] <@kirkland> ie, MOTU for Universe/Multiverse, and Core Dev for Main [07:10] <@kirkland> users should be able to maintain some fair amount of confidence in the quality and security of packages available in the general ubuntu archive [07:10] <@kirkland> ..... [07:10] <@kirkland> now, that's all fine and dandy [07:11] <@kirkland> but where does the really fun crack live? [07:11] <@kirkland> in PPA's of course :-) [07:11] <@kirkland> so a PPA is really just a mini little archive [07:11] <@kirkland> the structure is basically identical to the archive.ubuntu.com [07:12] <@kirkland> but the packages provided there are not part of the official distribution [07:12] <@kirkland> there are several reasons for this [07:12] <@kirkland> and different people use PPA's for different ones [07:12] <@kirkland> usually, it's intended for testing [07:13] <@kirkland> providing a binary, built package to some person or people for them to test [07:13] <@kirkland> let's take a look at a couple of examples ... [07:14] <@kirkland> as part of my responsibilities on the Ubuntu Server Team, I'm the package maintainer of KVM [07:14] <@kirkland> it's a virtualization hypervisor, similar, perhaps, to vmware or virtualbox [07:14] <@kirkland> 8.04 (hardy) shipped with kvm-62, 8.10 (intrepid) shipped with kvm-72 [07:14] <@kirkland> whereas 9.04 (jaunty) shipped with kvm-84 [07:15] <@kirkland> now, in the last ~1 year, this particular package has come *a long* way [07:15] <@kirkland> and there are people using hardy and intrepid want to use kvm-84, for various bugs that have been fixed, or new features added [07:16] <@kirkland> of course, we have processes for rolling out small fixes via updates to Hardy/Intrepid etc. [07:16] <@kirkland> and we have a backports mechanism for backporting packages too [07:16] <@kirkland> but this is a bit of a special case, and I wanted some really thorough testing [07:16] <@kirkland> i could ask people to just "go build it yourself" [07:16] <@kirkland> but really, how many people would do that? :-) [07:17] <@kirkland> and, furthermore, how would I be sure that they built the right thing, or in the right way? [07:17] <@kirkland> so i've been using a PPA to provide packages to this group of people [07:17] <@kirkland> https://edge.launchpad.net/~ubuntu-virt/+archive/ppa [07:17] <@kirkland> specifically, that PPA ^ [07:18] <@kirkland> if you go to that webpage, you should see 3 version of kvm published in that ppa, one each for Hardy, Intrepid, and Jaunty [07:18] <@kirkland> you can also see that I uploaded the latest version merely 7 hours ago :-) [07:18] <@kirkland> that brings us to another nice benefit of PPA's ... [07:19] <@kirkland> you can upload to them basically whenever you want! [07:19] <@kirkland> for the official archives, we have a number of deadlines and freezes that must be adhered to [07:19] <@kirkland> currently, Karmic is open for development, and developers can upload to it [07:19] <@kirkland> but Hardy/Intrepid/Jaunty are not open for development [07:20] <@kirkland> and thus, it requires special permission to upload to those official archives [07:20] <@kirkland> but PPA's can be uploaded to at any time, really [07:20] <@kirkland> I should also note that this particular PPA is a "team" PPA [07:20] <@kirkland> this is a relatively recent feature to Launchpad [07:21] <@kirkland> so I have my own PPA ... [07:21] <@kirkland> https://edge.launchpad.net/~kirkland/+archive/ppa [07:21] <@kirkland> but i also have access to a number of team ppa's [07:21] <@kirkland> so these KVM packages are sort of maintained by the ~ubuntu-virt team [07:22] <@kirkland> in my PPA, you'll see a different set of packages [07:22] <@kirkland> for one thing, you might notice XMMS :-) [07:22] <@kirkland> i still prefer xmms over all of the other mp3 players out there, but it was pulled from the official Ubuntu archives (for some very good reasons) [07:23] <@kirkland> no matter ... I just keep a copy in my PPA, that I can use on any Ubuntu machine I have :-) [07:23] <@kirkland> so using a ppa [07:23] <@kirkland> i should probably explain how to do this ... [07:24] <@kirkland> to do so, i have created a shared screen instance [07:24] <@kirkland> you can join me at: [07:25] <@kirkland> ssh -C guest@ec2-75-101-177-177.compute-1.amazonaws.com [07:25] <@kirkland> the password is "guest" [07:26] <@kirkland> okay [07:26] <@kirkland> please try to watch IRC, where I'll explain what I'm doing [07:26] <@kirkland> and the terminal, where I'm going to do it [07:26] <@kirkland> first, I'm going to add my PPA to my list of archives [07:26] <@kirkland> sudo vi /etc/apt/sources.list [07:27] <@kirkland> now, see the webpage https://edge.launchpad.net/~kirkland/+archive/ppa [07:27] <@kirkland> deb http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty main [07:27] <@kirkland> deb-src http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty mai [07:27] <@kirkland> i'm going to add that to my sources.list [07:27] <@kirkland> i'm going to save that file [07:27] <@kirkland> and sudo apt-get update [07:28] <@kirkland> as you can see, i get an error about a missing gpg key [07:28] <@kirkland> we can solve that by retrieving the proper key [07:28] <@kirkland> This repository is signed with 1024R/34BEEE14 OpenPGP key. Follow these instructions for installing packages from this PPA. [07:28] <@kirkland> ^ the webpage tells us this [07:28] <@kirkland> http://keyserver.ubuntu.com:11371/pks/lookup?search=0x657A928364338B14A900B68D7781BA0134BEEE14&op=index [07:29] <@kirkland> https://help.launchpad.net/Packaging/PPA#Adding a PPA to your Ubuntu repositories [07:30] <@kirkland> sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 657a928364338b14a900b68d7781ba0134beee14 [07:30] <@kirkland> now, let's rerun the update [07:30] <@kirkland> \o/ [07:30] <@kirkland> no errors [07:31] <@kirkland> so i want to install the last screen-profiles package from my PPA [07:31] <@kirkland> note that version on this Hardy server is 1.44 [07:31] <@kirkland> https://edge.launchpad.net/~kirkland/+archive/ppa [07:31] <@kirkland> and note that 1.54 is available here [07:32] <@kirkland> now, notice that version 1.54-0ubuntu1~ppa3 is installed [07:33] <@kirkland> thanks micahg [07:33] <@kirkland> so apt-cache policy screen-profiles will show the different versions available [07:33] <@kirkland> and specifically where they came from [07:33] <@kirkland> now, let's grab a source package [07:35] <@kirkland> whoops, bad example [07:35] <@kirkland> um, let's grab a different package (something that's not already in my ppa) [07:36] <@kirkland> gotta chase down some dependencies [07:36] Try a usplash-theme [07:36] fish [07:37] <@kirkland> so i'm going to grab the source of a package called bip [07:37] <@kirkland> it's an irc proxy [07:37] <@kirkland> apt-get source bip [07:37] <@kirkland> let's imagine that i've made some edition to the source code [07:38] <@kirkland> now, i need to increment the version, and add a changelog message [07:38] <@kirkland> dch -i [07:38] <@kirkland> (more dependencies) [07:40] <@kirkland> okay, now here's an important point [07:40] <@kirkland> when preparing a package for upload to a ppa [07:40] <@kirkland> we need to version it in such a way that it's a "successor" to previous versions [07:40] <@kirkland> but we want to make sure that future, official versions supercede this package [07:41] <@kirkland> in this case, jaunty's bip is version 0.7.4-2ubuntu1 [07:41] <@kirkland> by doing a dch -i, i have "incremented" the ubuntu1 to an ubuntu2 [07:41] <@kirkland> that will ensure that this is considered an "upgrade" from the previous ubuntu1 version [07:42] <@kirkland> however, we want to make sure that a future, *real* ubuntu2 version will supercede this one [07:42] <@kirkland> and thus, there's a special character that allows us to do this ... [07:42] <@kirkland> the ~ tilda [07:42] <@kirkland> bip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low [07:42] <@kirkland> package is bip [07:42] <@kirkland> the version is 0.7.4-2ubuntu2~ppa1 [07:43] <@kirkland> if i want to make multiple uploads of this package over and over to my ppa, i can iterate ~ppa2, ~ppa3, etc. [07:43] <@kirkland> now, i add a change log entry [07:43] <@kirkland> specificying the file i changed [07:43] <@kirkland> and why [07:43] <@kirkland> and i reference the bug number fixed [07:44] <@kirkland> next I should build the package locally [07:44] <@kirkland> to make sure that I haven't broken the build somehow [07:44] <@kirkland> before wasting the time of the build machines in soyuz [07:44] <@kirkland> (note that you should really use pbuild or sbuild, eventually, but that's an hour long class in itself) [07:44] <@kirkland> so first, i need to get the build-dependencies [07:45] <@kirkland> sudo apt-get build-dep bip [07:45] <@kirkland> and then I'll do the build [07:45] <@kirkland> using "debuild" [07:46] * kirkland now wishes he had shelled out $0.80/hour for the quad-core ec2 instance :-) [07:47] <@kirkland> so dch is the changelog editor [07:47] <@kirkland> you can use dch -e to edit the existing entry [07:47] <@kirkland> (ie, don't increment) [07:47] <@kirkland> the -i does the increment [07:47] <@kirkland> i also should have noted that you really want to double check the release [07:47] <@kirkland> in this case, it's "jaunty" [07:48] <@kirkland> but you might have, perhaps, wanted to specify that this package is for hardy or karmic, for instance [07:48] <@kirkland> okay, the build is done [07:48] <@kirkland> you see there's an error [07:48] <@kirkland> it's missing the gpg to sign this package [07:48] <@kirkland> of course, I have not copied my gpg key to ec2 :-) [07:48] <@kirkland> so I'm not going to be able to sign this package [07:49] <@kirkland> (nor actually upload it) [07:49] <@kirkland> but let's get to that point .... [07:49] <@kirkland> looking in the director above this one, we can now see that we have binary *.deb files [07:49] <@kirkland> so we have build the binary package locally [07:49] <@kirkland> now, let's build the source package [07:49] <@kirkland> debuild -S [07:50] <@kirkland> again, i'm going to get the same GPG errors [07:50] <@kirkland> under normal circumstances, you will be prompted for your GPG password [07:50] <@kirkland> and GPG will be used to "sign" your package [07:50] <@kirkland> this is how Launchpad (and users of your PPA) can have confidence that you're the person who created that pacakge [07:51] <@kirkland> okay, so the *source.changes file is the file that contains the magic needed to upload to a ppa [07:51] <@kirkland> we should see some important information in this file [07:52] <@kirkland> most importantly, checksums of the files, and a manifest of the files that need to be uploaded [07:52] <@kirkland> once you have a changes file, you are clear to upload [07:52] <@kirkland> now, uploading to a PPA requires one configuration change [07:52] <@kirkland> you need a file in your home directory called ~/.dput.cf [07:53] <@kirkland> my ppa entry looks like this: [07:53] <@kirkland> [kirkland-ppa] [07:53] <@kirkland> fqdn = ppa.launchpad.net [07:53] <@kirkland> method = ftp [07:53] <@kirkland> incoming = ~kirkland/ubuntu/ [07:53] <@kirkland> login = anonymous [07:53] <@kirkland> allow_unsigned_uploads = 0 [07:53] <@kirkland> now that i have that file, i could attempt the upload [07:54] <@kirkland> (note that this is going to fail, because of the lack of a gpg signature) [07:54] <@kirkland> but i want to demonstrate the command [07:54] <@kirkland> dput kirkland-ppa *sources.changes [07:54] <@kirkland> dput kirkland-ppa *source.changes [07:55] <@kirkland> now under normal circumstances, you'd see a few messages scroll by, and see your upload take place [07:55] <@kirkland> about a minute later, you should get an email from Launchpad either accepting, or rejecting your upload (in case something was malformed) [07:55] <@kirkland> if it's accepted, your package will go into the build queue [07:55] <@kirkland> and eventually, Soyuz will build your code, and publish it to your PPA [07:56] <@kirkland> alrighty ... let's take a few questions ... [07:56] how do you specify what ubuntu version your package is for ? [07:56] Kirk, If I use intrepid, and need to do that for Hardy, I must to do in a chroot + debootstrap? [07:56] so if i am building my first package should i start importing my keys first from launchpad? [07:56] <@kirkland> it's pretty quiet, so i suppose you can just paste your question here [07:57] <@kirkland> djails: in the first line of the changelog, edited with dch [07:57] <@kirkland> djails: bip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low [07:57] <@kirkland> djails: note the "jaunty" in that line [07:58] <@kirkland> rolando-ve: hmm, to do your test binary build properly -- yes [07:58] <@kirkland> rolando-ve: however, you should be able to build your source package safely [07:58] <@kirkland> rolando-ve: so in that case you could grab the source, edit your changelog (and whatever files) and debuild -S [07:58] <@kirkland> rolando-ve: again, it's always proper form to test your build locally first [07:58] can i make it a version that never gets replaced by the official branch? or just start my own ? [07:59] <@kirkland> rolando-ve: it's quite rude to cause build failures on launchpad (costing other people time) if your build won't even work locally [07:59] ls [07:59] oops [07:59] <@kirkland> blacknred0: if you're building your first package, you should make sure that launchpad has your GPG and SSH public keys [08:00] <@kirkland> blacknred0: also, i think you have to sign the Ubuntero agreement to use PPAs [08:00] <@kirkland> iKOSHrf: i don't think i understand that question? [08:00] kirkland, yeap, i have all of them. i am getting problems in the building :S [08:00] kirkland, i see the package you build was for the i386 architectures. How will you change the package to be build for the amd64 architectures? [08:00] <@kirkland> iKOSHrf: if you don't ever want it to get replaced, change the version to 99999.99999.9999 :-) [08:00] kirkland, if i just want to "fork" the version to make it my own "version" for some odd reason [08:01] hehehe ok. [08:01] <@kirkland> blacknred0: make sure you have all of the build dependencies, sudo apt-get build-dep $PKG [08:01] kirkland, i mean is just a single script but it the make doesn't want to make the file properly [08:01] kirkland, ok, thnx for the info. [08:02] <@kirkland> iKOSHrf: well i think that's exactly what I did in my bip example -- i have forked the ubuntu2 version; but you're saying that you don't want it to ever be replaced [08:02] <@kirkland> iKOSHrf: in that case, you could add a really big number at the beginning of the package (which I don't really recommend), or "pin" the package [08:02] <@kirkland> iKOSHrf: see the manpages for apt-get for pinning instructions [08:02] ok, thanks. [08:02] kirkland: thanks. Now if you want to create a package for different versions of ubuntu, how do you go about that ? [08:03] <@kirkland> Ludo: well, ideally you'd test your build on both architectures; i usually do that with KVM virtual machines; however, I understand that this isn't always possible [08:03] <@kirkland> Ludo: launchpad will build PPA packages for several archectures for you [08:04] <@kirkland> Ludo: basically, once I've confirmed that it builds on one arch, and if I have reasonable certainty that it'll build elsewhere, I go ahead and push it to launchpad [08:04] kirkland, thanks. [08:04] <@kirkland> djails: what do you mean? you just change "jaunty" to say "karmic" or "hardy" in that first line [08:05] kirkland: so do you maintain a debian/ dir per version ? I have this upstream source tree and I want to createpackages for serveral ubuntus [08:05] do you need ot backport -dev packages? [08:05] <@kirkland> djails: ah ... [08:06] <@kirkland> djails: gotcha [08:06] kirkland, how would one add a extra dependency to a package? For example I need a extra library or newer library for my modification to work? [08:06] <@kirkland> djails: so I usually just dch -e, add a ~ppa1 ... hardy, then debuild -S [08:06] <@kirkland> djails: then, in that same dir [08:07] <@kirkland> djails: dch -e again, change to ~ppa2 ... intrepid, debuild -S again [08:07] <@kirkland> djails: dch -e again, change to ~ppa3 ... jaunty; debuild -S [08:07] <@kirkland> djails: then cd .. [08:07] <@kirkland> djails: and dput kirkland-ppa *source.changes [08:07] <@kirkland> djails: HOWEVER .... [08:07] <@kirkland> djails: this won't necessarily work for just any package [08:08] <@kirkland> djails: it'll work fine for simple packages with minimal build dependencies [08:08] <@kirkland> djails: but if a package depends on a newer version of some library, it's quite a bit more difficult :-) [08:08] kirkland: ok got it ! i ll try that [08:08] <@kirkland> Ludo: that information is in debian/control [08:08] <@kirkland> Ludo: so over in our shared screen session ... [08:09] <@kirkland> Build-Depends: cdbs (>= 0.4.49), debhelper (>= 5.0.37.2), bison, flex, libssl-dev, quilt [08:09] <@kirkland> Ludo: those are the build-deps for bip [08:09] <@kirkland> okay guys ... i'm about to call it a night here [08:09] <@kirkland> as it's past 2am :-) [08:09] 1 last Q? [08:09] <@kirkland> one thing that i'll mention [08:09] <@kirkland> micahg: shoot! [08:09] do you have to backport -dev packages? [08:10] I want to build FF3.5b4 for Jaunty [08:10] or are -dev only used when compiling? [08:10] ps [08:10] sorry [08:11] <@kirkland> micahg: i'm not sure i understand your question [08:11] <@kirkland> micahg: but your build dependencies should be available [08:11] <@kirkland> micahg: so if you want to build something in your PPA, you need to ensure that the build deps are available [08:11] <@kirkland> micahg: that brings up an important point .... [08:12] <@kirkland> micahg: in your PPA configuration page, you can specify a few different restrictions, or options for your dependencies [08:12] <@kirkland> on your own PPA page, you should see a link for "Edit dependencies" [08:13] <@kirkland> Basic (only released packages). [08:13] <@kirkland> Security (basic dependencies and important security updates). [08:13] <@kirkland> Default (security dependencies and recommended updates). [08:13] <@kirkland> Proposed (default dependencies and proposed updates). [08:13] <@kirkland> Backports (default dependencies and unsupported updates). [08:13] <@kirkland> micahg: that might help [08:13] ok [08:13] thanks [08:13] Thanks [08:14] kirkland: thanks ! [08:14] kirkland: thanks for the tutorial :) [08:14] <@kirkland> you guys are most welcome [08:14] kirkland, thanks. [08:14] Nice job kirkland [08:14] <@kirkland> so one last thing in closing [08:14] <@kirkland> some people have asked how to setup a shared screen session like i used [08:14] <@kirkland> did you guys find that useful? [08:14] yes [08:14] definitely [08:14] very [08:15] Yeap [08:15] ^^ [08:15] <@kirkland> okay, so i have a blog post about this [08:15] <@kirkland> http://blog.dustinkirkland.com/2009/04/teaching-class-with-gnu-screen.html [08:15] <@kirkland> that explains in detail what needs to be done [08:15] Thanks again, :D [08:15] Thankyou for the session :) [08:15] <@kirkland> more simply, if you have an EC2 account, you can use a script I wrote, called "screenbin" [08:16] <@kirkland> i just uploaded a new version to my PPA, so look for it there shortly :-) [08:16] <@kirkland> that's all from me [08:16] <@kirkland> good night :-) [08:16] <@kirkland> or morning [08:16] good night [08:17] kirkland: If you let me, I would like to translate it to Spanish [08:17] <@kirkland> rolando-ve: please, go for it :-) [08:17] and post it in my blog, (as yours) [08:17] Thanks! [08:17] see all! }}} ---- CategoryPackaging