/srv/irclogs.ubuntu.com/2009/04/09/#ubuntu-classroom.txt

=== kurrele_away is now known as kurrele
Plaguehi all07:51
jimjeeves     /msg nickserv set hidemail on09:53
=== jimjeeves is now known as jimjeeves_
=== jimjeeves_ is now known as jimjeeves
k-shello12:56
Plaguehi12:58
detohi12:58
james_whi everyone12:59
Tumiehi12:59
darkwisehi13:00
RainCThi13:00
james_wwho's here for the packaging training session?13:00
detome13:00
Plaguehi, me i quess13:00
jimjeevesI am13:00
JanTarye, me too13:00
pitiis that now ?13:00
blfgomesI am13:00
Tumieme too13:00
dave_snhere13:00
james_wwow, large crowd :-)13:01
james_wso, I'm down to do a 15 minute session on bzr-builddeb13:01
lfelipehey13:01
james_wthis is a tool that I wrote to help with building packages from bzr branches13:02
james_wis everyone interested in that?13:02
jimjeevesyes13:02
Rafiksure13:02
Railyes :)13:02
psicus78yes13:02
darkwisesure13:02
james_wwe can use the rest of the time after for general questiong13:02
detoyep13:02
james_wexcellent13:02
dave_snyes13:02
james_wso, first things first, why don't you all install the "bzr-builddeb" package while I talk a little about it13:03
james_wis there anyone that doesn't know what bzr is?13:03
k-ssure13:03
Tumiei don't know bzr13:03
james_wok, let's start there13:03
james_wbzr (http://bazaar-vcs.org/) is a version control system13:03
james_wthis allows you to keep snapshots of your work, and then to look back over them13:04
james_wbzr is a very good one :-)13:04
james_win particular it is a "distributed" version control system13:04
james_wwhat this means is that all of us are collaborating on a project, then we each get a "branch" of the project13:05
james_win that branch we work on the things that we are interested in13:05
james_wso you can implement one feature, while I am working on another, and someone else is fixing bugs13:05
james_wthen we can all "merge" from each other, and bzr will use the historical information that we store to integrate all our work13:06
james_wit isn't always possible to do this without human intervention, so it will sometimes ask us to help out13:06
james_wso using this for developing Ubuntu can be very useful13:06
james_wyou can grab a branch of the package that you want to work on, and make your changes. You can then ask for a review, and if the reviewer asks you to change a few things then you can do so and ask again for review13:07
james_wyou can keep doing it until the reviewer is happy13:07
james_wthey can then take your branch and merge it to the main branch for the package13:07
james_wso, lets have a look at what this might look like13:08
james_wI maintain a site called "package-import.ubuntu.com" currently13:08
james_whttp://package-import.ubuntu.com/13:08
james_won there is a branch of every source package in Ubuntu13:08
james_wwe are working to make these available on launchpad13:09
james_wyou should all have "bzr" installed now if you installed "bzr-builddeb"13:09
james_wyou can check that by running "bzr help" at the command line13:10
james_wso, to get ourselves a branch of a package we use the "bzr branch" command13:10
james_wso everyone try:13:10
james_wbzr branch http://package-import.canonical.com/s/ssss/jaunty13:10
james_wthat gets us a branch that corresponds to what is in the "ssss" package in Jaunty13:11
james_wonce that completes you should have a "jaunty" directory in your current directory13:11
james_weveryone got that?13:11
HerbY_NLyes13:11
Tumiejes13:12
burun0yes13:12
Tumie*yes13:12
shankhsya13:12
jimjeevesyes13:12
darkwiseyes13:12
Rafikyes13:12
james_wexcellent :-)13:12
jimjeeves    *13:12
jimjeeves      /ignore #ubuntu-classroom CRAP NOTICES SNOTES CTCPS JOINS PARTS QUITS KICKS MODES WALLOPS NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS13:12
james_wso, lets check we can build it13:12
james_wif you "cd jaunty" and then run "bzr builddeb"13:12
james_wit should build the package for you13:12
psicus78i didn't got it13:13
james_wpsicus78: did you run the "bzr branch" command? Did it give you an error?13:13
shankhsme too its giving error13:13
psicus78(14:09:55) james_w: you should all have "bzr" installed now if you installed "bzr-builddeb" nothing more after this13:13
HerbY_NLhere also error13:13
RainCTdpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.    - this one?13:13
shankhsbzr: ERROR: unknown command "builddeb"13:13
jimjeevesyes13:13
james_wshankhs: it seems you don't have the "bzr-builddeb" package installed13:14
dave_snwhat if we're on hardy13:14
shankhsjames_w: ok13:14
james_wpsicus78: I will PM you the text in between13:14
plarsdpkg-checkbuilddeps: Unmet build dependencies: libgmp3-dev xmltoman quilt (>= 0.40)13:14
jimjeevesI also get "dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting."13:14
psicus78james_w: i didn't receive the message where you say what to branch13:14
psicus78james_w: ok13:14
Tumiebzr: ERROR: The build failed.13:14
james_wok13:15
blfgomessudo apt-get install libgmp3-dev xmltoman quilt13:15
james_wso we don't have the "Build-Depends" installed13:15
HerbY_NLto correct error: sudo apt-get install debhelper13:15
james_wyou can either do what blfgomes has suggested13:15
james_wor use "apt-get build-dep ssss"13:15
HerbY_NLpackage build ok after rest install13:15
blfgomescool, didn't know that one :)13:15
james_wor you could just build a source package with "bzr builddeb -S"13:16
james_wthat will show the mechanism, but won't involve the extra packages13:16
james_wok, so that's 15 minutes13:16
posingaspopular bzr branch13:16
posingaspopularbzr: ERROR: command 'branch' requires argument FROM_LOCATION13:16
james_wI can show you a bit more of this, or we can move on to Q+A13:17
james_wposingaspopular: you need "bzr branch http://package-import.ubuntu.com/s/ssss/jaunty"13:17
posingaspopularthanks13:17
jimjeevesOk, "bzr builddeb" has worked for me now.13:18
james_wexcellent13:18
jimjeevesit would be quite good for me to see more of this, pleas13:18
darkwisejames_w: " I can show you a bit more of this"  => +113:18
james_wok, another 15 minutes of bzr-builddeb?13:18
shankhsdarkwise: +113:18
jimjeevesyes please13:18
james_wI'm here to serve you people :-)13:19
blfgomesit didn't work for me13:19
=== _Purple_ is now known as _Purple_away
shankhsjames_w: ya13:19
james_wblfgomes: did you get an error?13:19
blfgomesgpg: skipped "James Westby <jw+debian@jameswestby.net>": secret key not available13:19
blfgomesgpg: [stdin]: clearsign failed: secret key not available13:19
james_wah13:19
Railit worked actually :)13:19
james_wso13:19
james_wthis is a common issue, not just with bzr-builddeb13:19
blfgomesRail: it actually said "bzr: ERROR: The build failed." at the end13:20
james_w"debian/changelog" says that I changed the package, so it wants me to sign it, but you aren't me, and you don't have my secret key, so you can't13:20
=== Pollywog_ is now known as pollywog
james_wso really at this point you want to build it without signing it13:20
james_wyou can do that with "bzr bd -S -- -uc -us" on Jaunty13:21
james_werr, "bzr bd -- -uc -us" to build the binary package as you were doing, sorry13:21
Rail...or ignore thas message13:21
blfgomesjames_w, I can see why that happened... I just don't get why I'm the only one that got this error13:21
james_wthose on Intrepid or earlier won't have seen that13:21
blfgomesoh, alright13:21
j1mci got an error, debuild: fatal error at line 1329:13:21
j1mcdpkg-buildpackage -rfakeroot -D -us -uc failed13:21
james_wblfgomes: it seems you are the only one running Jaunty :-)13:21
blfgomesthat explains it13:21
Tumiei only have errors..13:21
james_wj1mc: is there another error in the output?13:22
james_wI haven't seen "-D" before13:22
fabiodmtquit13:22
james_wI'm not sure where that came from13:22
psicus78I'm running jaunty and it ran fine with uc and us options13:22
shankhshow to install bzr-builddeb?( i tried sudo apt-get install bzr-builddeb it didnt work)13:22
j1mcah, there are some unmet build dependencies.  i'll grab them13:22
Tumieinput: bzr builddeb output: bzr: ERROR: The build failed.13:22
james_wTumie: can you pastebin the whole output of the command please?13:22
Tumiehttp://paste.ubuntu.com/147630/13:23
james_wshankhs: it should do, it is in the repositories, did it say it didn't exist, or that it couldn't be installed?13:23
Railjames_w: what's the magic of upstream tarball retrieving? debian/watch?13:23
james_wRail: in this case it uses "apt-get", it can also use debian/watch, yes13:24
shankhsjames_w: Couldn't find package bzr-buliddeb13:24
RainCTshankhs: typo in there :)13:24
james_wshankhs: ah, make sure you typed "sudo apt-get install bzr-builddeb"13:24
james_wI realise it's not the easiest thing to type :-)13:24
j1mci'm good now.  :)13:24
posingaspopularerror: http://paste.ubuntu.com/147631/13:25
shankhsjames_w: thankhs13:25
shankhsjames_w: :)13:25
james_wTumie: ah, you need to install the "quilt" package, sorry. That is one of the build-dependencies, but you also need it to build the source package13:25
james_wposingaspopular: you too13:25
posingaspopularthanks :P13:26
Tumiehow to build the source package ?13:26
james_wok, anyone not managed to get it to build yet?13:26
* j1mc is ok13:27
james_wTumie: you did it :-) it was "bzr builddeb -S"13:27
Tumieok13:27
Railjames_w: what's the preferred method of versioning packages: keeping the whole sources + debian dir or just debian and use --merge?13:27
shankhsjames_w: Where can I find the log of "bzr builddeb"?13:27
Rail(for non-native packages of course)13:27
posingaspopulark it build properly13:28
james_wRail: my preferred method is the whole source, some people prefer the latter. I prefer the former as it is not working against the version control system. With the latter you sometimes have to do things by hand that bzr could automate for you13:28
james_wRail: good question though13:28
james_wshankhs: it doesn't save a log of its own operation13:28
james_wok, those who have built it, you can look at the history13:29
darkwisejames_w : can we install  builddeb if we're not on a debian like Linux ?13:29
shankhsjames_w: OK13:29
james_wtry "bzr log", or install "bzr-gtk" and look at "bzr viz", or if you prefer Qt then install "qbzr" and look at "bzr qlog"13:29
james_wyou can see there a summary of changes made to the package, and you can get diffs between versions easily13:30
posingaspopularwin 1213:30
james_wdarkwise: you can, though it's not packaged anywhere else. It also depends on various tools that will only normally exist on a Debian like distro, so you would have to install them too13:30
darkwisejames_w : thanks13:31
sky_walkieI've got this:13:31
sky_walkiedpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 5.0) libgmp3-dev xmltoman quilt (>= 0.40)13:31
sky_walkiedpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.13:31
sky_walkiedpkg-buildpackage: warning: (Use -d flag to override.)13:31
sky_walkiedebuild: fatal error at line 1329:13:31
sky_walkiedpkg-buildpackage -rfakeroot -D -us -uc failed13:31
sky_walkiebzr: ERROR: The build failed.13:31
sky_walkiewhich probably means install that stuff to get things working ?13:32
posingaspopularsky_walkie: sudo apt-get install libgmp3-dev xmltoman quilt13:32
Rafikyes13:32
sky_walkiethanks13:32
Railjames_w: you mentioned "bzr could automate". What kind of automation you mean?13:32
pollywogis there a metapackage that will install everything we need?13:33
james_wRail: say when you package a new upstream release. If you have patches to the upstream software then it can be tedious to go through each, check if it has been fully applied upstream, and resolve conflicts where necessary. bzr was built to do that sort of thing, so it's a lot easier.13:33
blfgomespollywog: apt-get build-dep ssss13:34
pollywogty13:34
Railjames_w: you mean when upstream uses bzr?13:34
sky_walkiewell now I've got this error:13:34
sky_walkiedpkg-buildpackage: warning: (Use -d flag to override.)13:34
sky_walkiedebuild: fatal error at line 1329:13:34
sky_walkiedpkg-buildpackage -rfakeroot -D -us -uc failed13:34
sky_walkiebzr: ERROR: The build failed.13:34
sky_walkieso I've used -d option13:35
sky_walkieand got this:13:35
sky_walkiemake: dh_testdir: Command not found13:35
sky_walkiemake: *** [clean-patched] Error 12713:35
sky_walkiedpkg-buildpackage: failure: fakeroot debian/rules clean gave error exit status 213:35
sky_walkiedebuild: fatal error at line 1329:13:35
sky_walkiedpkg-buildpackage -rfakeroot -d -us -uc failed13:35
sky_walkiebzr: ERROR: The build failed.13:35
Railsky_walkie: pastebin is great ;)13:35
james_wRail: it doesn't really matter. bzr-builddeb also allows you to package a new upstream from a tarball almost as if it was a branch.13:35
james_wsky_walkie: ah, you also need to install "debhelper"13:35
sky_walkieok13:36
Railjames_w: ah, ok, I need to refresh my bzr-builddeb knowledge :)13:36
james_wRail: yeah, that sort of stuff is just coming together. I need to iron out the kinks and document it better13:37
james_wok, does anyone have any questions?13:37
blfgomesjames_w: you said you planned to make every source package available on launchpad. How will that work?13:37
james_wI'm happy to answer general packaging questions13:37
psicus78james_w: I have one13:37
james_wso if you are stuck on something then speak up13:37
j1mcjames_w: so bzr builddeb just grabs the tarball via the url of the upstream source package, and builds it for you?  is this done primarily for testing purposes?  you then need to update the changelog and stuff, right?13:37
frogfootHow do I make the debian/rules file?13:37
frogfootthe default one does not always work13:38
james_wblfgomes: launchpad has a code hosting service for bzr, and one of the launchpad developers is currently working on making it support package branches well (not in terms of storage as such, but in terms of UI)13:38
james_wblfgomes: once that is done we will migrate the branches to being stored on launchpad13:38
sky_walkie<james_w> thanks no I've deb package13:39
sky_walkienow13:39
james_wsky_walkie: excellent13:39
=== _Purple_away is now known as _Purple_
blfgomesjames_w: oh, I thought you were trying to persuade developers to use bzr :)13:40
james_wj1mc: it builds whatever is in the branch, but we also require a tarball to get the source package correct, so we automate fetching that where possible. The normal packaging tasks of updating changelog etc. are still pretty much the same13:40
RachedTNjames_w: when I try this command :  sudo bzr branch http://package-import.canonical.com/s/ssss/jaunty   I get this error : bzr: ERROR: Unknown branch format: 'Bazaar Branch Format 7 (needs bzr 1.6)\n'13:40
sky_walkieso if I understand well, this is related to packages localted in bazaar only13:40
james_wpsicus78: shoot13:40
psicus78james_w: j1mc asked the question I wanted to ask :)13:41
james_wRachedTN: ah, you don't have a new enough bzr installed. I forgot about that requirement, sorry. There is a PPA with backports available if you like.13:41
pollywogis bzr better than the traditional tools such as pbuilder or are they used for different things?13:41
james_wblfgomes: I am :-)13:41
menesisI have more than a hundred packages of zope modules. If I were to turn them into bzr-builddeb debian/-only branches and put into Launchpad, do I have to create a project for each of them?13:41
james_wsky_walkie: bzr-builddeb is for use with bzr branches, yes, (though it works on SVN as well if you have bzr-svn installed)13:42
RachedTNjames_w: yes, I like to add it, could you please tell me :)13:42
james_wpollywog: these are used for different things. You can make bzr-builddeb run pbuilder if you like13:42
james_wRachedTN: there are links from "https://launchpad.net/bzr"13:42
sky_walkieso if I've my onw bazaar configured with some source code than this bzr appz will do the rest to build ubuntu package13:42
james_wmenesis: not necessarily, you could put them all under one project13:43
RachedTNthanks james_w and keep the good work man, it's reallly helpful and beautiful too :)13:43
james_wfrogfoot: hi, the debian/rules file is hard to create automatically. The default one from dh-make is primarily designed for packages that have a ./configure script and Makefile. If you don't have those then you need to tweak those lines to what is equivalent for your package.13:44
james_wfrogfoot: if you have an example package then I can give some more direct suggestions13:44
Railjames_w: another one: I use quilt and debian/patches for "true" packaging :). Is there any way to automate preparation of patches?13:45
Railquilt add file file file; quilt refresh is boring :)13:45
james_wsky_walkie: if you already have the packaging done, then yes it can build you the packages. It doesn't make writing the packaging any easier though, sorry :-)13:45
james_wRail: I agree :-). There is nothing like that yet, I would like to add it, but I'm not too sure what it should look like.13:45
james_wRail: you might be interested in http://vcs-pkg.org/ which aims to discuss that sort of thing13:46
Railjames_w: thanks a lot13:47
psicus78james_w: why do I get output files both in build-area and in the directory on top of jaunty?13:47
james_wpsicus78: it's a bit unfortunate, but necessary. It needs a temporary directory to do the work so that it doesn't mangle any of your precious files, so it uses build-area for that13:48
james_wyou should be able to delete it with no ill-effects13:48
james_wit could use a real tempdir that it deletes before finishing, but it is sometimes useful to be able to look inside that directory, so it uses build-area to make that easy13:49
psicus78ah ok, no problems, just asking...I thought the good files were those in build area... :)13:49
psicus78are they always the same?13:49
james_was a last step it tries to copy them from build-area to .., so they should be13:50
james_wit doesn't always work as we would like though :-)13:50
psicus78james_w: ok, last question13:50
psicus78just to understand if I figured out correctly. When I branch I get only debian dir and some other files13:51
psicus78are those the ones that I patched to build the package?13:51
psicus78namely, the files that differs from upstream?13:51
james_wnope, with "ssss" you should have got all the files from the upstream as well13:51
james_wit's just a small package :-)13:51
psicus78ah, ok...so why does it get the orig.tar.gz?13:52
psicus78I mean when you run bzr-builddeb13:52
james_wbecause if you are building a source package as well it needs the actual .orig.tar.gz to produce a correct package13:52
james_wdue to the way that debian source packages work, just having the files isn't quite enough13:53
psicus78fine13:53
james_wit doesn't always need it though, so it could optimise by only fetching it when necessary13:53
psicus78do you get any warning if the orig has changed? or just can't happen?13:53
psicus78this lead to another question, when is the package updated on the site you maintain?13:54
psicus78is it linked to upstream automatically?13:54
blfgomesjames_w: so the only reason we need the .orig.tar.gz is to build a source package as well? Could we tell bzr-builddeb to only build the .deb?13:55
jimjeevesAll: I have to go (lunchbreak's over).   james_w: Thanks, very informative.13:56
james_wblfgomes: that's not currently possible13:56
james_wpsicus78: the orig.tar.gz isn't supposed to ever change unless the upstream version number changed13:56
pollywogcould checkinstall be used to build just a deb ?13:57
james_wpsicus78: if you were to edit the .orig.tar.gz on disk then I don't think you would get an error, but you would if you tried to upload to the archive13:57
pollywogI am not sure whether checkinstall is still maintained13:57
james_wpsicus78: the branches on that site aren't linked to upstream. They are linked to the packages in the archive. So when a developer uploads a new version it appears there.13:57
james_wpsicus78: I however do plan to link it to upstream, and then provide reports when there is a new upstream and whether there are any conflicts, and then perhaps whether it builds, installs etc.13:58
psicus78james_w: ok, I think I understood13:58
james_wpsicus78: that's a little way off though :-)13:58
psicus78james_w: that would be cool13:58
james_wpollywog: checkinstall can be used to build a .deb, yes. However, a .deb does not an Ubuntu package make.13:59
RachedTNSo, for people running hardy heron, you 'll notice that when you try this command :  sudo bzr branch http://package-import.canonical.com/s/ssss/jaunty   I get this error : bzr: ERROR: Unknown branch format: 'Bazaar Branch Format 7 (needs bzr 1.6)\n'   , the solution is to remove bzr just installed using this command : apt-get remove --purge bzr builddeb  , than download bzr 1.6 from : https://edge.launchpad.net/ubuntu/+source/bzr/1.6.1-1 13:59
james_wit will give you something that you can install, but there is a bit more to the process than that, so I would be distrustful of the things that it produces13:59
psicus78james_w: so, when a new upstream is released, which is the workflow to update the package?13:59
james_wpollywog: it would also never be accepted in to Ubuntu proper, as we require proper source packages for that14:00
james_wpsicus78: take a look at "bzr help merge-upstream", that aims to automate some parts of it14:00
pollywogjames_w: yes I understand it would not be a proper package14:00
Railjames_w: where (and when) bzr-builddeb stores the "pristine-tar" information?14:00
psicus78RachedTN: It is easier to add this repo https://edge.launchpad.net/~bzr/+archive/ppa14:00
psicus78james_w: thanks!14:01
james_wRail: during the "merge-upstream" command ahtat I just mentioned. It stores it in a "revision property". It will then use it when building the package. That's also something new to Jaunty14:01
RachedTNhanks psicus78, I am a little bit addicted to the " coomand line" :P14:02
menesisjames_w: the ssss package does not have Vcs-Bzr: field in debian/control. But if it had, what does the field mean? Does it help package a new upstream snapshot, or it is the url of a packaging branch?14:02
james_wmenesis: it's the URL of the packaging branch14:02
psicus78RachedTN: that's fine! :)14:02
james_wmenesis: the "debcheckout" tool from the "devscripts" package can grab you the branch from Vcs-Bzr for any package that has that info14:03
james_wok, that's all for today people. Thanks for all the great questions14:03
james_wif you have more there are always lots of helpful people in #ubuntu-motu14:03
psicus78james_w: thank!14:03
Railjames_w: thank you very much, bzr-builddeb rocks ;)14:04
pollywogjames_w:  thanks14:04
blfgomesjames_w: thank you for the class!14:04
menesisok14:04
james_win one week + 6 hours we will have the incredible didrocks presenting "How to update a package", I hope to see you all there14:04
Ryback_james_w: Thanks for the class, it was good to know bzr-builddeb.14:04
RachedTNcertainly, I will not miss it ;)14:04
Ryback_james_w: I'll see that one too :-)14:05
james_wexcellent14:05
bdillyyeah, really nice14:05
james_wthank you all14:05
k-syeah!14:05
james_wtime to find some lunch14:05
lfelipecheers14:05
RachedTNthank you james_w, see you soon  :)14:05
dave_snThanks!14:05
=== santiago-pgsql is now known as santiago-ve
sky_walkiethanks james_w for your time today, how we hear from you soon on another session14:33
sky_walkiehope14:33
=== pleia2 changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/ubuntu-classroom | Upcoming: 10 Apr @ 00:00 UTC: Q&A Session: Linux Permissions | Run 'date -u' in a terminal to find out the UTC time
Fraterhy, someone knows a link to get sources to ubuntu ?20:08
=== nizarus_ is now known as nizarus
=== santiago-pgsql is now known as santiafgo-ve
=== santiafgo-ve is now known as santiago-ve
=== croppa_ is now known as croppa
bodhi_zazenlo everyone23:54
bodhi_zazento ssh into the shared session : http://paste.ubuntu.com/147955/23:54
bodhi_zazenwe can use this shared session to demonstrate permissions and acl if you wish23:55
bodhi_zazenIf people know how to do this, please assist others if needed in a private /msg :023:55

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