/srv/irclogs.ubuntu.com/2009/05/07/#ubuntu-classroom.txt

=== 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
dholbachhiya kirkland :)06:58
kirklanddholbach: howdy06:58
* kirkland wonders how many people are up at this crazy hour :-)06:58
Rail+1 :)06:59
* FuturePilot is06:59
kirklandvery good :-)06:59
RoAkSoAx+106:59
kirklandi'm just getting my demo env setup06:59
* dholbach just told a few folks06:59
Jordan_UI'm not06:59
ienorandI've sleep during the day...07:00
kirklandhowdy all!07:00
kirklandalrighty ...07:01
kirklandmy name is Dustin Kirkland07:01
kirklandI'm a MOTU and Core Developer in Ubuntu, and I work for Canonical on the Ubuntu Server07:02
kirklandi'm here to talk about PPA's07:02
kirklandwhat they are07:02
kirklandhow to use them07:02
kirklandand how wonderfully useful they are!07:03
kirklandso a PPA is a Personal Package Archive07:03
kirklandand it's a tremendously interesting concept07:03
kirklandi 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 launchpad07:04
kirklandso let's start by explaining what an archive is07:04
kirklandi assume most people here have used something like apt-get, aptitude, smart, update-manager, synaptic07:05
kirklandthese are client-side utilities that talk to a server providing an archive07:05
kirklandnow the archive itself07:06
kirklandis really just an http server07:06
kirklandwith files and directories that can be browsed07:06
kirklandi suppose it could probably be an ftp server too07:06
kirklandin any case, you're probably familiar with http://archive.ubuntu.com07:07
kirklandif not, browse around it some time, by hand, by pointing a web browser at that address07:07
kirklandyou should see a fairly regular hierarchy07:07
kirklandmost of the interesting stuff happens in the pool/ directory07:07
kirklandthat's where binary and source packages land07:08
kirklandnow, archive.ubuntu.com is the "official" archive07:09
kirklandwhich means that these are the packages, as "officially" prepared by the developers of the Ubuntu project07:09
kirklandie, MOTU for Universe/Multiverse, and Core Dev for Main07:10
kirklandusers should be able to maintain some fair amount of confidence in the quality and security of packages available in the general ubuntu archive07:10
kirkland.....07:10
kirklandnow, that's all fine and dandy07:10
kirklandbut where does the really fun crack live?07:11
kirklandin PPA's of course :-)07:11
kirklandso a PPA is really just a mini little archive07:11
kirklandthe structure is basically identical to the archive.ubuntu.com07:11
kirklandbut the packages provided there are not part of the official distribution07:12
kirklandthere are several reasons for this07:12
kirklandand different people use PPA's for different ones07:12
kirklandusually, it's intended for testing07:12
kirklandproviding a binary, built package to some person or people for them to test07:13
kirklandlet's take a look at a couple of examples ...07:13
kirklandas part of my responsibilities on the Ubuntu Server Team, I'm the package maintainer of KVM07:14
kirklandit's a virtualization hypervisor, similar, perhaps, to vmware or virtualbox07:14
kirkland8.04 (hardy) shipped with kvm-62, 8.10 (intrepid) shipped with kvm-7207:14
kirklandwhereas 9.04 (jaunty) shipped with kvm-8407:14
kirklandnow, in the last ~1 year, this particular package has come *a long* way07:15
kirklandand there are people using hardy and intrepid want to use kvm-84, for various bugs that have been fixed, or new features added07:15
kirklandof course, we have processes for rolling out small fixes via updates to Hardy/Intrepid etc.07:16
kirklandand we have a backports mechanism for backporting packages too07:16
kirklandbut this is a bit of a special case, and I wanted some really thorough testing07:16
kirklandi could ask people to just "go build it yourself"07:16
kirklandbut really, how many people would do that? :-)07:16
kirklandand, furthermore, how would I be sure that they built the right thing, or in the right way?07:17
kirklandso i've been using a PPA to provide packages to this group of people07:17
kirklandhttps://edge.launchpad.net/~ubuntu-virt/+archive/ppa07:17
kirklandspecifically, that PPA ^07:17
kirklandif you go to that webpage, you should see 3 version of kvm published in that ppa, one each for Hardy, Intrepid, and Jaunty07:18
kirklandyou can also see that I uploaded the latest version merely 7 hours ago :-)07:18
kirklandthat brings us to another nice benefit of PPA's ...07:18
kirklandyou can upload to them basically whenever you want!07:19
kirklandfor the official archives, we have a number of deadlines and freezes that must be adhered to07:19
kirklandcurrently, Karmic is open for development, and developers can upload to it07:19
kirklandbut Hardy/Intrepid/Jaunty are not open for development07:19
kirklandand thus, it requires special permission to upload to those official archives07:20
kirklandbut PPA's can be uploaded to at any time, really07:20
kirklandI should also note that this particular PPA is a "team" PPA07:20
kirklandthis is a relatively recent feature to Launchpad07:20
kirklandso I have my own PPA ...07:21
kirklandhttps://edge.launchpad.net/~kirkland/+archive/ppa07:21
kirklandbut i also have access to a number of team ppa's07:21
kirklandso these KVM packages are sort of maintained by the ~ubuntu-virt team07:21
kirklandin my PPA, you'll see a different set of packages07:22
kirklandfor one thing, you might notice XMMS :-)07:22
kirklandi 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:22
kirklandno matter ... I just keep a copy in my PPA, that I can use on any Ubuntu machine I have :-)07:23
kirklandso using a ppa07:23
kirklandi should probably explain how to do this ...07:23
kirklandto do so, i have created a shared screen instance07:24
kirklandyou can join me at:07:24
kirklandssh -C guest@ec2-75-101-177-177.compute-1.amazonaws.com07:25
kirklandthe password is "guest"07:25
kirklandokay07:26
kirklandplease try to watch IRC, where I'll explain what I'm doing07:26
kirklandand the terminal, where I'm going to do it07:26
kirklandfirst, I'm going to add my PPA to my list of archives07:26
kirklandsudo vi /etc/apt/sources.list07:26
kirklandnow, see the webpage https://edge.launchpad.net/~kirkland/+archive/ppa07:27
kirklanddeb http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty main07:27
kirklanddeb-src http://ppa.launchpad.net/kirkland/ppa/ubuntu jaunty mai07:27
kirklandi'm going to add that to my sources.list07:27
kirklandi'm going to save that file07:27
kirklandand sudo apt-get update07:27
kirklandas you can see, i get an error about a missing gpg key07:28
kirklandwe can solve that by retrieving the proper key07:28
kirklandThis repository is signed with 1024R/34BEEE14 OpenPGP key. Follow these instructions for installing packages from this PPA.07:28
kirkland^ the webpage tells us this07:28
kirklandhttp://keyserver.ubuntu.com:11371/pks/lookup?search=0x657A928364338B14A900B68D7781BA0134BEEE14&op=index07:28
kirklandhttps://help.launchpad.net/Packaging/PPA#Adding a PPA to your Ubuntu repositories07:29
kirklandsudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 657a928364338b14a900b68d7781ba0134beee1407:30
kirklandnow, let's rerun the update07:30
kirkland\o/07:30
kirklandno errors07:30
kirklandso i want to install the last screen-profiles package from my PPA07:31
kirklandnote that version on this Hardy server is 1.4407:31
kirklandhttps://edge.launchpad.net/~kirkland/+archive/ppa07:31
kirklandand note that 1.54 is available here07:31
kirklandnow, notice that version 1.54-0ubuntu1~ppa3 is installed07:32
kirklandthanks micahg07:33
kirklandso apt-cache policy screen-profiles will show the different versions available07:33
kirklandand specifically where they came from07:33
kirklandnow, let's grab a source package07:33
kirklandwhoops, bad example07:35
kirklandum, let's grab a different package (something that's not already in my ppa)07:35
kirklandgotta chase down some dependencies07:36
rolando-veTry a usplash-theme07:36
santiago-vefish07:36
kirklandso i'm going to grab the source of a package called bip07:37
kirklandit's an irc proxy07:37
kirklandapt-get source bip07:37
kirklandlet's imagine that i've made some edition to the source code07:37
kirklandnow, i need to increment the version, and add a changelog message07:38
kirklanddch -i07:38
kirkland(more dependencies)07:38
kirklandokay, now here's an important point07:40
kirklandwhen preparing a package for upload to a ppa07:40
kirklandwe need to version it in such a way that it's a "successor" to previous versions07:40
kirklandbut we want to make sure that future, official versions supercede this package07:40
kirklandin this case, jaunty's bip is version 0.7.4-2ubuntu107:41
kirklandby doing a dch -i, i have "incremented" the ubuntu1 to an ubuntu207:41
kirklandthat will ensure that this is considered an "upgrade" from the previous ubuntu1 version07:41
kirklandhowever, we want to make sure that a future, *real* ubuntu2 version will supercede this one07:42
kirklandand thus, there's a special character that allows us to do this ...07:42
kirklandthe ~ tilda07:42
kirklandbip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low07:42
kirklandpackage is bip07:42
kirklandthe version is 0.7.4-2ubuntu2~ppa107:42
kirklandif i want to make multiple uploads of this package over and over to my ppa, i can iterate ~ppa2, ~ppa3, etc.07:43
kirklandnow, i add a change log entry07:43
kirklandspecificying the file i changed07:43
kirklandand why07:43
kirklandand i reference the bug number fixed07:43
kirklandnext I should build the package locally07:44
kirklandto make sure that I haven't broken the build somehow07:44
kirklandbefore wasting the time of the build machines in soyuz07:44
kirkland(note that you should really use pbuild or sbuild, eventually, but that's an hour long class in itself)07:44
kirklandso first, i need to get the build-dependencies07:44
kirklandsudo apt-get build-dep bip07:45
kirklandand then I'll do the build07:45
kirklandusing "debuild"07:45
* kirkland now wishes he had shelled out $0.80/hour for the quad-core ec2 instance :-)07:46
kirklandso dch is the changelog editor07:47
kirklandyou can use dch -e to edit the existing entry07:47
kirkland(ie, don't increment)07:47
kirklandthe -i does the increment07:47
kirklandi also should have noted that you really want to double check the release07:47
kirklandin this case, it's "jaunty"07:47
kirklandbut you might have, perhaps, wanted to specify that this package is for hardy or karmic, for instance07:48
kirklandokay, the build is done07:48
kirklandyou see there's an error07:48
kirklandit's missing the gpg to sign this package07:48
kirklandof course, I have not copied my gpg key to ec2 :-)07:48
kirklandso I'm not going to be able to sign this package07:48
kirkland(nor actually upload it)07:49
kirklandbut let's get to that point ....07:49
kirklandlooking in the director above this one, we can now see that we have binary *.deb files07:49
kirklandso we have build the binary package locally07:49
kirklandnow, let's build the source package07:49
kirklanddebuild -S07:49
kirklandagain, i'm going to get the same GPG errors07:50
kirklandunder normal circumstances, you will be prompted for your GPG password07:50
kirklandand GPG will be used to "sign" your package07:50
kirklandthis is how Launchpad (and users of your PPA) can have confidence that you're the person who created that pacakge07:50
kirklandokay, so the *source.changes file is the file that contains the magic needed to upload to a ppa07:51
kirklandwe should see some important information in this file07:51
kirklandmost importantly, checksums of the files, and a manifest of the files that need to be uploaded07:52
kirklandonce you have a changes file, you are clear to upload07:52
kirklandnow, uploading to a PPA requires one configuration change07:52
kirklandyou need a file in your home directory called ~/.dput.cf07:52
kirklandmy ppa entry looks like this:07:53
kirkland[kirkland-ppa]07:53
kirklandfqdn = ppa.launchpad.net07:53
kirklandmethod = ftp07:53
kirklandincoming = ~kirkland/ubuntu/07:53
kirklandlogin = anonymous07:53
kirklandallow_unsigned_uploads = 007:53
kirklandnow that i have that file, i could attempt the upload07:53
kirkland(note that this is going to fail, because of the lack of a gpg signature)07:54
kirklandbut i want to demonstrate the command07:54
kirkland dput kirkland-ppa *sources.changes07:54
kirkland dput kirkland-ppa *source.changes07:54
kirklandnow under normal circumstances, you'd see a few messages scroll by, and see your upload take place07:55
kirklandabout a minute later, you should get an email from Launchpad either accepting, or rejecting your upload (in case something was malformed)07:55
kirklandif it's accepted, your package will go into the build queue07:55
kirklandand eventually, Soyuz will build your code, and publish it to your PPA07:55
kirklandalrighty ... let's take a few questions ...07:56
djailshow do you specify what ubuntu version your package is for ?07:56
rolando-veKirk, If I use intrepid, and need to do that for Hardy, I must to do in a chroot + debootstrap?07:56
blacknred0so if i am building my first package should i start importing my keys first from launchpad?07:56
kirklandit's pretty quiet, so i suppose you can just paste your question here07:56
kirklanddjails: in the first line of the changelog, edited with dch07:57
kirklanddjails: bip (0.7.4-2ubuntu2~ppa1) jaunty; urgency=low07:57
kirklanddjails: note the "jaunty" in that line07:57
kirklandrolando-ve: hmm, to do your test binary build properly -- yes07:58
kirklandrolando-ve: however, you should be able to build your source package safely07:58
kirklandrolando-ve: so in that case you could grab the source, edit your changelog (and whatever files) and debuild -S07:58
kirklandrolando-ve: again, it's always proper form to test your build locally first07:58
iKOSHrfcan i make it a version that never gets replaced by the official branch? or just start my own ?07:58
kirklandrolando-ve: it's quite rude to cause build failures on launchpad (costing other people time) if your build won't even work locally07:59
micahgls07:59
micahgoops07:59
kirklandblacknred0: if you're building your first package, you should make sure that launchpad has your GPG and SSH public keys07:59
kirklandblacknred0: also, i think you have to sign the Ubuntero agreement to use PPAs08:00
kirklandiKOSHrf: i don't think i understand that question?08:00
blacknred0kirkland, yeap, i have all of them.  i am getting problems in the building :S08:00
Ludokirkland, 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
kirklandiKOSHrf: if you don't ever want it to get replaced, change the version to 99999.99999.9999 :-)08:00
iKOSHrfkirkland, if i just want to "fork" the version to make it my own "version" for some odd reason08:00
iKOSHrfhehehe ok.08:01
kirklandblacknred0: make sure you have all of the build dependencies, sudo apt-get build-dep $PKG08:01
blacknred0kirkland, i mean is just a single script but it the make doesn't want to make the file properly08:01
blacknred0kirkland, ok, thnx for the info.08:01
kirklandiKOSHrf: 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 replaced08:02
kirklandiKOSHrf: 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 package08:02
kirklandiKOSHrf: see the manpages for apt-get for pinning instructions08:02
iKOSHrfok, thanks.08:02
djailskirkland: thanks. Now if you want to create a package for different versions of ubuntu, how do you go about that ?08:02
kirklandLudo: 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 possible08:03
kirklandLudo: launchpad will build PPA packages for several archectures for you08:03
kirklandLudo: 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 launchpad08:04
Ludokirkland,  thanks.08:04
kirklanddjails: what do you mean?  you just change "jaunty" to say "karmic" or "hardy" in that first line08:04
djailskirkland: so do you maintain a debian/ dir per version ? I have this upstream source tree and I want to createpackages for serveral ubuntus08:05
micahgdo you need ot backport -dev packages?08:05
kirklanddjails: ah ...08:05
kirklanddjails: gotcha08:06
Ludokirkland, 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
kirklanddjails: so I usually just dch -e, add a ~ppa1 ... hardy, then debuild -S08:06
kirklanddjails: then, in that same dir08:06
kirklanddjails: dch -e again, change to ~ppa2 ... intrepid, debuild -S again08:07
kirklanddjails: dch -e again, change to ~ppa3 ... jaunty; debuild -S08:07
kirklanddjails: then cd ..08:07
kirklanddjails: and dput kirkland-ppa *source.changes08:07
kirklanddjails: HOWEVER ....08:07
kirklanddjails: this won't necessarily work for just any package08:07
kirklanddjails: it'll work fine for simple packages with minimal build dependencies08:08
kirklanddjails: but if a package depends on a newer version of some library, it's quite a bit more difficult :-)08:08
djailskirkland: ok got it ! i ll try that08:08
kirklandLudo: that information is in debian/control08:08
kirklandLudo: so over in our shared screen session ...08:08
kirklandBuild-Depends: cdbs (>= 0.4.49), debhelper (>= 5.0.37.2), bison, flex, libssl-dev, quilt08:09
kirklandLudo: those are the build-deps for bip08:09
kirklandokay guys ... i'm about to call it a night here08:09
kirklandas it's past 2am :-)08:09
micahg1 last Q?08:09
kirklandone thing that i'll mention08:09
kirklandmicahg: shoot!08:09
micahgdo you have to backport -dev packages?08:09
micahgI want to build FF3.5b4 for Jaunty08:10
micahgor are -dev only used when compiling?08:10
ienorandps08:10
ienorandsorry08:10
kirklandmicahg: i'm not sure i understand your question08:11
kirklandmicahg: but your build dependencies should be available08:11
kirklandmicahg: so if you want to build something in your PPA, you need to ensure that the build deps are available08:11
kirklandmicahg: that brings up an important point ....08:11
kirklandmicahg: in your PPA configuration page, you can specify a few different restrictions, or options for your dependencies08:12
kirklandon your own PPA page, you should see a link for "Edit dependencies"08:12
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
kirklandmicahg: that might help08:13
micahgok08:13
micahgthanks08:13
rolando-veThanks08:13
=== mimir|wrk is now known as mimir|on
djailskirkland: thanks !08:14
FuturePilotkirkland: thanks for the tutorial :)08:14
kirklandyou guys are most welcome08:14
Ludokirkland, thanks.08:14
rolando-veNice job kirkland08:14
kirklandso one last thing in closing08:14
kirklandsome people have asked how to setup a shared screen session like i used08:14
kirklanddid you guys find that useful?08:14
micahgyes08:14
djailsdefinitely08:14
FuturePilotvery08:14
rolando-veYeap08:15
Ludo^^08:15
kirklandokay, so i have a blog post about this08:15
kirklandhttp://blog.dustinkirkland.com/2009/04/teaching-class-with-gnu-screen.html08:15
kirklandthat explains in detail what needs to be done08:15
rolando-veThanks again, :D08:15
ienorandThankyou for the session :)08:15
kirklandmore simply, if you have an EC2 account, you can use a script I wrote, called "screenbin"08:15
kirklandi just uploaded a new version to my PPA, so look for it there shortly :-)08:16
kirklandthat's all from me08:16
kirklandgood night :-)08:16
kirklandor morning08:16
micahggood night08:16
rolando-vekirkland: If you let me, I would like to translate it to Spanish08:17
kirklandrolando-ve: please, go for it :-)08:17
rolando-veand post it in my blog, (as yours)08:17
rolando-veThanks!08:17
rolando-vesee all!08:17
neoXsysWhere can i find the log of last session by kirkland?08:35
neoXsyshttp://irclogs.ubuntu.com/2009/05/07/%23ubuntu-classroom.html08:37
=== redarrow_ is now known as redarrow
Walter_EcoIs the a session about Personal Package Archives (PPAs) still on or did I miss it?09:40
maxbWalter_Eco: It was a few hours ago: http://irclogs.ubuntu.com/2009/05/07/%23ubuntu-classroom.html09:45
Walter_Ecothanks09:56
blueShouldn't the motd be updated to show that the PPA class has already taken place?14:51
blueand the wiki.ubuntu.com/Classroom specifies two classes as upcoming even though they have already taken place14:52
bluenot to mention today's class is not even listed on the wiki14:53
TurtlePieikes16:53
=== ashayh is now known as ahuman
tamizh-geekdate -u17:58
tamizh-geeknot upcomin. its finished!17:59
pleia2looks like it might have been canceled actually18:01
jarlenwhich?18:01
pleia2the class in the topic18:02
pleia2it's not up on the packaging team's wiki anymore18:02
jarlenhm, somethings bugged at my place18:02
jarlenwhy is UTC 2 hours and 17 minutes behind my time?18:03
jarlenit can't be like 2 1/4 timezone :P18:03
rfkrocktkhello!18:09
=== 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
pleia2hm18:12
pleia2no, you guys confused me :) the session happened!18:12
rfkrocktkwhen will the session on ubuntu packaging start? is that in an hour?18:14
pleia2rfkrocktk: there was a session this morning18:15
rfkrocktkoh, did I miss it?18:15
pleia2https://wiki.ubuntu.com/Packaging/Training/Logs/2009-05-0718:16
pleia2on PPAs? yes, looks like18:16
rfkrocktkright: 6:00 UTC AM18:16
* rfkrocktk failed.18:17
=== 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
pleia2there, should be all accurate now18:23
=== RoAk is now known as RoAkSoAx
xmetalcorexi have a problem with   < apt -get  > apt: command not found20:51
pleia2it's apt-get20:51
pleia2no space :)20:51
xmetalcorexno space will try20:52
xmetalcorexi want to install dhcp20:53
xmetalcorexcan you tell me the syntaxe20:53
pleia2xmetalcorex: this channel is for hosting classes, you want #ubuntu for support20:53
jimcooncatxmetalcorex: meet me in #ubuntu, I'll give you a hand with that20:54
xmetalcorexthanxxxxx alot20:55
=== micahg1 is now known as micahg
=== k00011 is now known as k0001

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