=== mb_webguy is now known as mb_webguy|afk === dholbach_ is now known as dholbach === mb_webguy|afk is now known as mb_webguy === mb_webguy is now known as mb_webguy|afk === RoAk is now known as RoAkSoAx === mimir|zZz is now known as mimir|wrk [06:58] hiya kirkland :) [06:58] dholbach: howdy [06:58] * kirkland wonders how many people are up at this crazy hour :-) [06:59] +1 :) [06:59] * FuturePilot is [06:59] very good :-) [06:59] +1 [06:59] 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] howdy all! [07:01] alrighty ... [07:01] my name is Dustin Kirkland [07:02] I'm a MOTU and Core Developer in Ubuntu, and I work for Canonical on the Ubuntu Server [07:02] i'm here to talk about PPA's [07:02] what they are [07:02] how to use them [07:03] and how wonderfully useful they are! [07:03] so a PPA is a Personal Package Archive [07:03] and it's a tremendously interesting concept [07:04] 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] so let's start by explaining what an archive is [07:05] i assume most people here have used something like apt-get, aptitude, smart, update-manager, synaptic [07:05] these are client-side utilities that talk to a server providing an archive [07:06] now the archive itself [07:06] is really just an http server [07:06] with files and directories that can be browsed [07:06] i suppose it could probably be an ftp server too [07:07] in any case, you're probably familiar with http://archive.ubuntu.com [07:07] if not, browse around it some time, by hand, by pointing a web browser at that address [07:07] you should see a fairly regular hierarchy [07:07] most of the interesting stuff happens in the pool/ directory [07:08] that's where binary and source packages land [07:09] now, archive.ubuntu.com is the "official" archive [07:09] which means that these are the packages, as "officially" prepared by the developers of the Ubuntu project [07:10] ie, MOTU for Universe/Multiverse, and Core Dev for Main [07:10] 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] ..... [07:10] now, that's all fine and dandy [07:11] but where does the really fun crack live? [07:11] in PPA's of course :-) [07:11] so a PPA is really just a mini little archive [07:11] the structure is basically identical to the archive.ubuntu.com [07:12] but the packages provided there are not part of the official distribution [07:12] there are several reasons for this [07:12] and different people use PPA's for different ones [07:12] usually, it's intended for testing [07:13] providing a binary, built package to some person or people for them to test [07:13] let's take a look at a couple of examples ... [07:14] as part of my responsibilities on the Ubuntu Server Team, I'm the package maintainer of KVM [07:14] it's a virtualization hypervisor, similar, perhaps, to vmware or virtualbox [07:14] 8.04 (hardy) shipped with kvm-62, 8.10 (intrepid) shipped with kvm-72 [07:14] whereas 9.04 (jaunty) shipped with kvm-84 [07:15] now, in the last ~1 year, this particular package has come *a long* way [07:15] 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] of course, we have processes for rolling out small fixes via updates to Hardy/Intrepid etc. [07:16] and we have a backports mechanism for backporting packages too [07:16] but this is a bit of a special case, and I wanted some really thorough testing [07:16] i could ask people to just "go build it yourself" [07:16] but really, how many people would do that? :-) [07:17] and, furthermore, how would I be sure that they built the right thing, or in the right way? [07:17] so i've been using a PPA to provide packages to this group of people [07:17] https://edge.launchpad.net/~ubuntu-virt/+archive/ppa [07:17] specifically, that PPA ^ [07:18] 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] you can also see that I uploaded the latest version merely 7 hours ago :-) [07:18] that brings us to another nice benefit of PPA's ... [07:19] you can upload to them basically whenever you want! [07:19] for the official archives, we have a number of deadlines and freezes that must be adhered to [07:19] currently, Karmic is open for development, and developers can upload to it [07:19] but Hardy/Intrepid/Jaunty are not open for development [07:20] and thus, it requires special permission to upload to those official archives [07:20] but PPA's can be uploaded to at any time, really [07:20] I should also note that this particular PPA is a "team" PPA [07:20] this is a relatively recent feature to Launchpad [07:21] so I have my own PPA ... [07:21] https://edge.launchpad.net/~kirkland/+archive/ppa [07:21] but i also have access to a number of team ppa's [07:21] so these KVM packages are sort of maintained by the ~ubuntu-virt team [07:22] in my PPA, you'll see a different set of packages [07:22] for one thing, you might notice XMMS :-) [07:22] 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] no matter ... I just keep a copy in my PPA, that I can use on any Ubuntu machine I have :-) [07:23] so using a ppa [07:23] i should probably explain how to do this ... [07:24] to do so, i have created a shared screen instance [07:24] you can join me at: [07:25] ssh -C guest@ec2-75-101-177-177.compute-1.amazonaws.com [07:25] the password is "guest" [07:26] okay [07:26] please try to watch IRC, where I'll explain what I'm doing [07:26] and the terminal, where I'm going to do it [07:26] first, I'm going to add my PPA to my list of archives [07:26] sudo vi /etc/apt/sources.list [07:27] now, see the webpage https://edge.launchpad.net/~kirkland/+archive/ppa [07:27] deb http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty main [07:27] deb-src http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty mai [07:27] i'm going to add that to my sources.list [07:27] i'm going to save that file [07:27] and sudo apt-get update [07:28] as you can see, i get an error about a missing gpg key [07:28] we can solve that by retrieving the proper key [07:28] This repository is signed with 1024R/34BEEE14 OpenPGP key. Follow these instructions for installing packages from this PPA. [07:28] ^ the webpage tells us this [07:28] http://keyserver.ubuntu.com:11371/pks/lookup?search=0x657A928364338B14A900B68D7781BA0134BEEE14&op=index [07:29] https://help.launchpad.net/Packaging/PPA#Adding a PPA to your Ubuntu repositories [07:30] sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 657a928364338b14a900b68d7781ba0134beee14 [07:30] now, let's rerun the update [07:30] \o/ [07:30] no errors [07:31] so i want to install the last screen-profiles package from my PPA [07:31] note that version on this Hardy server is 1.44 [07:31] https://edge.launchpad.net/~kirkland/+archive/ppa [07:31] and note that 1.54 is available here [07:32] now, notice that version 1.54-0ubuntu1~ppa3 is installed [07:33] thanks micahg [07:33] so apt-cache policy screen-profiles will show the different versions available [07:33] and specifically where they came from [07:33] now, let's grab a source package [07:35] whoops, bad example [07:35] um, let's grab a different package (something that's not already in my ppa) [07:36] gotta chase down some dependencies [07:36] Try a usplash-theme [07:36] fish [07:37] so i'm going to grab the source of a package called bip [07:37] it's an irc proxy [07:37] apt-get source bip [07:37] let's imagine that i've made some edition to the source code [07:38] now, i need to increment the version, and add a changelog message [07:38] dch -i [07:38] (more dependencies) [07:40] okay, now here's an important point [07:40] when preparing a package for upload to a ppa [07:40] we need to version it in such a way that it's a "successor" to previous versions [07:40] but we want to make sure that future, official versions supercede this package [07:41] in this case, jaunty's bip is version 0.7.4-2ubuntu1 [07:41] by doing a dch -i, i have "incremented" the ubuntu1 to an ubuntu2 [07:41] that will ensure that this is considered an "upgrade" from the previous ubuntu1 version [07:42] however, we want to make sure that a future, *real* ubuntu2 version will supercede this one [07:42] and thus, there's a special character that allows us to do this ... [07:42] the ~ tilda [07:42] bip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low [07:42] package is bip [07:42] the version is 0.7.4-2ubuntu2~ppa1 [07:43] if i want to make multiple uploads of this package over and over to my ppa, i can iterate ~ppa2, ~ppa3, etc. [07:43] now, i add a change log entry [07:43] specificying the file i changed [07:43] and why [07:43] and i reference the bug number fixed [07:44] next I should build the package locally [07:44] to make sure that I haven't broken the build somehow [07:44] before wasting the time of the build machines in soyuz [07:44] (note that you should really use pbuild or sbuild, eventually, but that's an hour long class in itself) [07:44] so first, i need to get the build-dependencies [07:45] sudo apt-get build-dep bip [07:45] and then I'll do the build [07:45] using "debuild" [07:46] * kirkland now wishes he had shelled out $0.80/hour for the quad-core ec2 instance :-) [07:47] so dch is the changelog editor [07:47] you can use dch -e to edit the existing entry [07:47] (ie, don't increment) [07:47] the -i does the increment [07:47] i also should have noted that you really want to double check the release [07:47] in this case, it's "jaunty" [07:48] but you might have, perhaps, wanted to specify that this package is for hardy or karmic, for instance [07:48] okay, the build is done [07:48] you see there's an error [07:48] it's missing the gpg to sign this package [07:48] of course, I have not copied my gpg key to ec2 :-) [07:48] so I'm not going to be able to sign this package [07:49] (nor actually upload it) [07:49] but let's get to that point .... [07:49] looking in the director above this one, we can now see that we have binary *.deb files [07:49] so we have build the binary package locally [07:49] now, let's build the source package [07:49] debuild -S [07:50] again, i'm going to get the same GPG errors [07:50] under normal circumstances, you will be prompted for your GPG password [07:50] and GPG will be used to "sign" your package [07:50] this is how Launchpad (and users of your PPA) can have confidence that you're the person who created that pacakge [07:51] okay, so the *source.changes file is the file that contains the magic needed to upload to a ppa [07:51] we should see some important information in this file [07:52] most importantly, checksums of the files, and a manifest of the files that need to be uploaded [07:52] once you have a changes file, you are clear to upload [07:52] now, uploading to a PPA requires one configuration change [07:52] you need a file in your home directory called ~/.dput.cf [07:53] my ppa entry looks like this: [07:53] [kirkland-ppa] [07:53] fqdn = ppa.launchpad.net [07:53] method = ftp [07:53] incoming = ~kirkland/ubuntu/ [07:53] login = anonymous [07:53] allow_unsigned_uploads = 0 [07:53] now that i have that file, i could attempt the upload [07:54] (note that this is going to fail, because of the lack of a gpg signature) [07:54] but i want to demonstrate the command [07:54] dput kirkland-ppa *sources.changes [07:54] dput kirkland-ppa *source.changes [07:55] now under normal circumstances, you'd see a few messages scroll by, and see your upload take place [07:55] about a minute later, you should get an email from Launchpad either accepting, or rejecting your upload (in case something was malformed) [07:55] if it's accepted, your package will go into the build queue [07:55] and eventually, Soyuz will build your code, and publish it to your PPA [07:56] 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] it's pretty quiet, so i suppose you can just paste your question here [07:57] djails: in the first line of the changelog, edited with dch [07:57] djails: bip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low [07:57] djails: note the "jaunty" in that line [07:58] rolando-ve: hmm, to do your test binary build properly -- yes [07:58] rolando-ve: however, you should be able to build your source package safely [07:58] rolando-ve: so in that case you could grab the source, edit your changelog (and whatever files) and debuild -S [07:58] 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] 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] blacknred0: if you're building your first package, you should make sure that launchpad has your GPG and SSH public keys [08:00] blacknred0: also, i think you have to sign the Ubuntero agreement to use PPAs [08:00] 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] 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] 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] 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] 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] 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] 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] Ludo: launchpad will build PPA packages for several archectures for you [08:04] 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] 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] djails: ah ... [08:06] 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] djails: so I usually just dch -e, add a ~ppa1 ... hardy, then debuild -S [08:06] djails: then, in that same dir [08:07] djails: dch -e again, change to ~ppa2 ... intrepid, debuild -S again [08:07] djails: dch -e again, change to ~ppa3 ... jaunty; debuild -S [08:07] djails: then cd .. [08:07] djails: and dput kirkland-ppa *source.changes [08:07] djails: HOWEVER .... [08:07] djails: this won't necessarily work for just any package [08:08] djails: it'll work fine for simple packages with minimal build dependencies [08:08] 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] Ludo: that information is in debian/control [08:08] Ludo: so over in our shared screen session ... [08:09] Build-Depends: cdbs (>= 0.4.49), debhelper (>= 5.0.37.2), bison, flex, libssl-dev, quilt [08:09] Ludo: those are the build-deps for bip [08:09] okay guys ... i'm about to call it a night here [08:09] as it's past 2am :-) [08:09] 1 last Q? [08:09] one thing that i'll mention [08:09] 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] micahg: i'm not sure i understand your question [08:11] micahg: but your build dependencies should be available [08:11] micahg: so if you want to build something in your PPA, you need to ensure that the build deps are available [08:11] micahg: that brings up an important point .... [08:12] micahg: in your PPA configuration page, you can specify a few different restrictions, or options for your dependencies [08:12] on your own PPA page, you should see a link for "Edit dependencies" [08:13] Basic (only released packages). [08:13] Security (basic dependencies and important security updates). [08:13] Default (security dependencies and recommended updates). [08:13] Proposed (default dependencies and proposed updates). [08:13] Backports (default dependencies and unsupported updates). [08:13] micahg: that might help [08:13] ok [08:13] thanks [08:13] Thanks === mimir|wrk is now known as mimir|on [08:14] kirkland: thanks ! [08:14] kirkland: thanks for the tutorial :) [08:14] you guys are most welcome [08:14] kirkland, thanks. [08:14] Nice job kirkland [08:14] so one last thing in closing [08:14] some people have asked how to setup a shared screen session like i used [08:14] did you guys find that useful? [08:14] yes [08:14] definitely [08:14] very [08:15] Yeap [08:15] ^^ [08:15] okay, so i have a blog post about this [08:15] http://blog.dustinkirkland.com/2009/04/teaching-class-with-gnu-screen.html [08:15] that explains in detail what needs to be done [08:15] Thanks again, :D [08:15] Thankyou for the session :) [08:15] more simply, if you have an EC2 account, you can use a script I wrote, called "screenbin" [08:16] i just uploaded a new version to my PPA, so look for it there shortly :-) [08:16] that's all from me [08:16] good night :-) [08:16] or morning [08:16] good night [08:17] kirkland: If you let me, I would like to translate it to Spanish [08:17] rolando-ve: please, go for it :-) [08:17] and post it in my blog, (as yours) [08:17] Thanks! [08:17] see all! [08:35] Where can i find the log of last session by kirkland? [08:37] http://irclogs.ubuntu.com/2009/05/07/%23ubuntu-classroom.html === redarrow_ is now known as redarrow [09:40] Is the a session about Personal Package Archives (PPAs) still on or did I miss it? [09:45] Walter_Eco: It was a few hours ago: http://irclogs.ubuntu.com/2009/05/07/%23ubuntu-classroom.html [09:56] thanks [14:51] Shouldn't the motd be updated to show that the PPA class has already taken place? [14:52] and the wiki.ubuntu.com/Classroom specifies two classes as upcoming even though they have already taken place [14:53] not to mention today's class is not even listed on the wiki [16:53] ikes === ashayh is now known as ahuman [17:58] date -u [17:59] not upcomin. its finished! [18:01] looks like it might have been canceled actually [18:01] which? [18:02] the class in the topic [18:02] it's not up on the packaging team's wiki anymore [18:02] hm, somethings bugged at my place [18:03] why is UTC 2 hours and 17 minutes behind my time? [18:03] it can't be like 2 1/4 timezone :P [18:09] hello! === ChanServ changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/ubuntu-classroom || Upcoming: 14 May 2009 @ 12:00 UTC: asac, patch systems and packaging || Run 'date -u' in a terminal to find out the UTC time [18:12] hm [18:12] no, you guys confused me :) the session happened! [18:14] when will the session on ubuntu packaging start? is that in an hour? [18:15] rfkrocktk: there was a session this morning [18:15] oh, did I miss it? [18:16] https://wiki.ubuntu.com/Packaging/Training/Logs/2009-05-07 [18:16] on PPAs? yes, looks like [18:16] right: 6:00 UTC AM [18:17] * rfkrocktk failed. === ChanServ changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/ubuntu-classroom || Upcoming: 14 May 2009 @ 12:00 UTC: asac, patch systems and packaging; 15 May 2009 @ 00:00 UTC: Package Management (Installing software) || Run 'date -u' in a terminal to find out the UTC time [18:23] there, should be all accurate now === RoAk is now known as RoAkSoAx [20:51] i have a problem with < apt -get > apt: command not found [20:51] it's apt-get [20:51] no space :) [20:52] no space will try [20:53] i want to install dhcp [20:53] can you tell me the syntaxe [20:53] xmetalcorex: this channel is for hosting classes, you want #ubuntu for support [20:54] xmetalcorex: meet me in #ubuntu, I'll give you a hand with that [20:55] thanxxxxx alot === micahg1 is now known as micahg === k00011 is now known as k0001