=== kurrele_away is now known as kurrele [07:51] hi all [09:53] /msg nickserv set hidemail on === jimjeeves is now known as jimjeeves_ === jimjeeves_ is now known as jimjeeves [12:56] hello [12:58] hi [12:58] hi [12:59] hi everyone [12:59] hi [13:00] hi [13:00] hi [13:00] who's here for the packaging training session? [13:00] me [13:00] hi, me i quess [13:00] I am [13:00] ye, me too [13:00] is that now ? [13:00] I am [13:00] me too [13:00] here [13:01] wow, large crowd :-) [13:01] so, I'm down to do a 15 minute session on bzr-builddeb [13:01] hey [13:02] this is a tool that I wrote to help with building packages from bzr branches [13:02] is everyone interested in that? [13:02] yes [13:02] sure [13:02] yes :) [13:02] yes [13:02] sure [13:02] we can use the rest of the time after for general questiong [13:02] yep [13:02] excellent [13:02] yes [13:03] so, first things first, why don't you all install the "bzr-builddeb" package while I talk a little about it [13:03] is there anyone that doesn't know what bzr is? [13:03] sure [13:03] i don't know bzr [13:03] ok, let's start there [13:03] bzr (http://bazaar-vcs.org/) is a version control system [13:04] this allows you to keep snapshots of your work, and then to look back over them [13:04] bzr is a very good one :-) [13:04] in particular it is a "distributed" version control system [13:05] what this means is that all of us are collaborating on a project, then we each get a "branch" of the project [13:05] in that branch we work on the things that we are interested in [13:05] so you can implement one feature, while I am working on another, and someone else is fixing bugs [13:06] then we can all "merge" from each other, and bzr will use the historical information that we store to integrate all our work [13:06] it isn't always possible to do this without human intervention, so it will sometimes ask us to help out [13:06] so using this for developing Ubuntu can be very useful [13:07] you 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 review [13:07] you can keep doing it until the reviewer is happy [13:07] they can then take your branch and merge it to the main branch for the package [13:08] so, lets have a look at what this might look like [13:08] I maintain a site called "package-import.ubuntu.com" currently [13:08] http://package-import.ubuntu.com/ [13:08] on there is a branch of every source package in Ubuntu [13:09] we are working to make these available on launchpad [13:09] you should all have "bzr" installed now if you installed "bzr-builddeb" [13:10] you can check that by running "bzr help" at the command line [13:10] so, to get ourselves a branch of a package we use the "bzr branch" command [13:10] so everyone try: [13:10] bzr branch http://package-import.canonical.com/s/ssss/jaunty [13:11] that gets us a branch that corresponds to what is in the "ssss" package in Jaunty [13:11] once that completes you should have a "jaunty" directory in your current directory [13:11] everyone got that? [13:11] yes [13:12] jes [13:12] yes [13:12] *yes [13:12] ya [13:12] yes [13:12] yes [13:12] yes [13:12] excellent :-) [13:12] * [13:12] /ignore #ubuntu-classroom CRAP NOTICES SNOTES CTCPS JOINS PARTS QUITS KICKS MODES WALLOPS NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS [13:12] so, lets check we can build it [13:12] if you "cd jaunty" and then run "bzr builddeb" [13:12] it should build the package for you [13:13] i didn't got it [13:13] psicus78: did you run the "bzr branch" command? Did it give you an error? [13:13] me too its giving error [13:13] (14:09:55) james_w: you should all have "bzr" installed now if you installed "bzr-builddeb" nothing more after this [13:13] here also error [13:13] dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting. - this one? [13:13] bzr: ERROR: unknown command "builddeb" [13:13] yes [13:14] shankhs: it seems you don't have the "bzr-builddeb" package installed [13:14] what if we're on hardy [13:14] james_w: ok [13:14] psicus78: I will PM you the text in between [13:14] dpkg-checkbuilddeps: Unmet build dependencies: libgmp3-dev xmltoman quilt (>= 0.40) [13:14] I also get "dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting." [13:14] james_w: i didn't receive the message where you say what to branch [13:14] james_w: ok [13:14] bzr: ERROR: The build failed. [13:15] ok [13:15] sudo apt-get install libgmp3-dev xmltoman quilt [13:15] so we don't have the "Build-Depends" installed [13:15] to correct error: sudo apt-get install debhelper [13:15] you can either do what blfgomes has suggested [13:15] or use "apt-get build-dep ssss" [13:15] package build ok after rest install [13:15] cool, didn't know that one :) [13:16] or you could just build a source package with "bzr builddeb -S" [13:16] that will show the mechanism, but won't involve the extra packages [13:16] ok, so that's 15 minutes [13:16] bzr branch [13:16] bzr: ERROR: command 'branch' requires argument FROM_LOCATION [13:17] I can show you a bit more of this, or we can move on to Q+A [13:17] posingaspopular: you need "bzr branch http://package-import.ubuntu.com/s/ssss/jaunty" [13:17] thanks [13:18] Ok, "bzr builddeb" has worked for me now. [13:18] excellent [13:18] it would be quite good for me to see more of this, pleas [13:18] james_w: " I can show you a bit more of this" => +1 [13:18] ok, another 15 minutes of bzr-builddeb? [13:18] darkwise: +1 [13:18] yes please [13:19] I'm here to serve you people :-) [13:19] it didn't work for me === _Purple_ is now known as _Purple_away [13:19] james_w: ya [13:19] blfgomes: did you get an error? [13:19] gpg: skipped "James Westby ": secret key not available [13:19] gpg: [stdin]: clearsign failed: secret key not available [13:19] ah [13:19] it worked actually :) [13:19] so [13:19] this is a common issue, not just with bzr-builddeb [13:20] Rail: it actually said "bzr: ERROR: The build failed." at the end [13:20] "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't === Pollywog_ is now known as pollywog [13:20] so really at this point you want to build it without signing it [13:21] you can do that with "bzr bd -S -- -uc -us" on Jaunty [13:21] err, "bzr bd -- -uc -us" to build the binary package as you were doing, sorry [13:21] ...or ignore thas message [13:21] james_w, I can see why that happened... I just don't get why I'm the only one that got this error [13:21] those on Intrepid or earlier won't have seen that [13:21] oh, alright [13:21] i got an error, debuild: fatal error at line 1329: [13:21] dpkg-buildpackage -rfakeroot -D -us -uc failed [13:21] blfgomes: it seems you are the only one running Jaunty :-) [13:21] that explains it [13:21] i only have errors.. [13:22] j1mc: is there another error in the output? [13:22] I haven't seen "-D" before [13:22] quit [13:22] I'm not sure where that came from [13:22] I'm running jaunty and it ran fine with uc and us options [13:22] how to install bzr-builddeb?( i tried sudo apt-get install bzr-builddeb it didnt work) [13:22] ah, there are some unmet build dependencies. i'll grab them [13:22] input: bzr builddeb output: bzr: ERROR: The build failed. [13:22] Tumie: can you pastebin the whole output of the command please? [13:23] http://paste.ubuntu.com/147630/ [13:23] shankhs: it should do, it is in the repositories, did it say it didn't exist, or that it couldn't be installed? [13:23] james_w: what's the magic of upstream tarball retrieving? debian/watch? [13:24] Rail: in this case it uses "apt-get", it can also use debian/watch, yes [13:24] james_w: Couldn't find package bzr-buliddeb [13:24] shankhs: typo in there :) [13:24] shankhs: ah, make sure you typed "sudo apt-get install bzr-builddeb" [13:24] I realise it's not the easiest thing to type :-) [13:24] i'm good now. :) [13:25] error: http://paste.ubuntu.com/147631/ [13:25] james_w: thankhs [13:25] james_w: :) [13:25] Tumie: 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 package [13:25] posingaspopular: you too [13:26] thanks :P [13:26] how to build the source package ? [13:26] ok, anyone not managed to get it to build yet? [13:27] * j1mc is ok [13:27] Tumie: you did it :-) it was "bzr builddeb -S" [13:27] ok [13:27] james_w: what's the preferred method of versioning packages: keeping the whole sources + debian dir or just debian and use --merge? [13:27] james_w: Where can I find the log of "bzr builddeb"? [13:27] (for non-native packages of course) [13:28] k it build properly [13:28] Rail: 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 you [13:28] Rail: good question though [13:28] shankhs: it doesn't save a log of its own operation [13:29] ok, those who have built it, you can look at the history [13:29] james_w : can we install builddeb if we're not on a debian like Linux ? [13:29] james_w: OK [13:29] try "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:30] you can see there a summary of changes made to the package, and you can get diffs between versions easily [13:30] win 12 [13:30] darkwise: 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 too [13:31] james_w : thanks [13:31] I've got this: [13:31] dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 5.0) libgmp3-dev xmltoman quilt (>= 0.40) [13:31] dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting. [13:31] dpkg-buildpackage: warning: (Use -d flag to override.) [13:31] debuild: fatal error at line 1329: [13:31] dpkg-buildpackage -rfakeroot -D -us -uc failed [13:31] bzr: ERROR: The build failed. [13:32] which probably means install that stuff to get things working ? [13:32] sky_walkie: sudo apt-get install libgmp3-dev xmltoman quilt [13:32] yes [13:32] thanks [13:32] james_w: you mentioned "bzr could automate". What kind of automation you mean? [13:33] is there a metapackage that will install everything we need? [13:33] Rail: 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:34] pollywog: apt-get build-dep ssss [13:34] ty [13:34] james_w: you mean when upstream uses bzr? [13:34] well now I've got this error: [13:34] dpkg-buildpackage: warning: (Use -d flag to override.) [13:34] debuild: fatal error at line 1329: [13:34] dpkg-buildpackage -rfakeroot -D -us -uc failed [13:34] bzr: ERROR: The build failed. [13:35] so I've used -d option [13:35] and got this: [13:35] make: dh_testdir: Command not found [13:35] make: *** [clean-patched] Error 127 [13:35] dpkg-buildpackage: failure: fakeroot debian/rules clean gave error exit status 2 [13:35] debuild: fatal error at line 1329: [13:35] dpkg-buildpackage -rfakeroot -d -us -uc failed [13:35] bzr: ERROR: The build failed. [13:35] sky_walkie: pastebin is great ;) [13:35] Rail: 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] sky_walkie: ah, you also need to install "debhelper" [13:36] ok [13:36] james_w: ah, ok, I need to refresh my bzr-builddeb knowledge :) [13:37] Rail: yeah, that sort of stuff is just coming together. I need to iron out the kinks and document it better [13:37] ok, does anyone have any questions? [13:37] james_w: you said you planned to make every source package available on launchpad. How will that work? [13:37] I'm happy to answer general packaging questions [13:37] james_w: I have one [13:37] so if you are stuck on something then speak up [13:37] james_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] How do I make the debian/rules file? [13:38] the default one does not always work [13:38] blfgomes: 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] blfgomes: once that is done we will migrate the branches to being stored on launchpad [13:39] thanks no I've deb package [13:39] now [13:39] sky_walkie: excellent === _Purple_away is now known as _Purple_ [13:40] james_w: oh, I thought you were trying to persuade developers to use bzr :) [13:40] j1mc: 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 same [13:40] james_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] so if I understand well, this is related to packages localted in bazaar only [13:40] psicus78: shoot [13:41] james_w: j1mc asked the question I wanted to ask :) [13:41] RachedTN: 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] is bzr better than the traditional tools such as pbuilder or are they used for different things? [13:41] blfgomes: I am :-) [13:41] I 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:42] sky_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] james_w: yes, I like to add it, could you please tell me :) [13:42] pollywog: these are used for different things. You can make bzr-builddeb run pbuilder if you like [13:42] RachedTN: there are links from "https://launchpad.net/bzr" [13:42] so if I've my onw bazaar configured with some source code than this bzr appz will do the rest to build ubuntu package [13:43] menesis: not necessarily, you could put them all under one project [13:43] thanks james_w and keep the good work man, it's reallly helpful and beautiful too :) [13:44] frogfoot: 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] frogfoot: if you have an example package then I can give some more direct suggestions [13:45] james_w: another one: I use quilt and debian/patches for "true" packaging :). Is there any way to automate preparation of patches? [13:45] quilt add file file file; quilt refresh is boring :) [13:45] sky_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] Rail: 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:46] Rail: you might be interested in http://vcs-pkg.org/ which aims to discuss that sort of thing [13:47] james_w: thanks a lot [13:47] james_w: why do I get output files both in build-area and in the directory on top of jaunty? [13:48] psicus78: 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 that [13:48] you should be able to delete it with no ill-effects [13:49] it 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 easy [13:49] ah ok, no problems, just asking...I thought the good files were those in build area... :) [13:49] are they always the same? [13:50] as a last step it tries to copy them from build-area to .., so they should be [13:50] it doesn't always work as we would like though :-) [13:50] james_w: ok, last question [13:51] just to understand if I figured out correctly. When I branch I get only debian dir and some other files [13:51] are those the ones that I patched to build the package? [13:51] namely, the files that differs from upstream? [13:51] nope, with "ssss" you should have got all the files from the upstream as well [13:51] it's just a small package :-) [13:52] ah, ok...so why does it get the orig.tar.gz? [13:52] I mean when you run bzr-builddeb [13:52] because if you are building a source package as well it needs the actual .orig.tar.gz to produce a correct package [13:53] due to the way that debian source packages work, just having the files isn't quite enough [13:53] fine [13:53] it doesn't always need it though, so it could optimise by only fetching it when necessary [13:53] do you get any warning if the orig has changed? or just can't happen? [13:54] this lead to another question, when is the package updated on the site you maintain? [13:54] is it linked to upstream automatically? [13:55] james_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:56] All: I have to go (lunchbreak's over). james_w: Thanks, very informative. [13:56] blfgomes: that's not currently possible [13:56] psicus78: the orig.tar.gz isn't supposed to ever change unless the upstream version number changed [13:57] could checkinstall be used to build just a deb ? [13:57] psicus78: 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 archive [13:57] I am not sure whether checkinstall is still maintained [13:57] psicus78: 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:58] psicus78: 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] james_w: ok, I think I understood [13:58] psicus78: that's a little way off though :-) [13:58] james_w: that would be cool [13:59] pollywog: checkinstall can be used to build a .deb, yes. However, a .deb does not an Ubuntu package make. [13:59] So, 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] it 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 produces [13:59] james_w: so, when a new upstream is released, which is the workflow to update the package? [14:00] pollywog: it would also never be accepted in to Ubuntu proper, as we require proper source packages for that [14:00] psicus78: take a look at "bzr help merge-upstream", that aims to automate some parts of it [14:00] james_w: yes I understand it would not be a proper package [14:00] james_w: where (and when) bzr-builddeb stores the "pristine-tar" information? [14:00] RachedTN: It is easier to add this repo https://edge.launchpad.net/~bzr/+archive/ppa [14:01] james_w: thanks! [14:01] Rail: 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 Jaunty [14:02] hanks psicus78, I am a little bit addicted to the " coomand line" :P [14:02] james_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] menesis: it's the URL of the packaging branch [14:02] RachedTN: that's fine! :) [14:03] menesis: the "debcheckout" tool from the "devscripts" package can grab you the branch from Vcs-Bzr for any package that has that info [14:03] ok, that's all for today people. Thanks for all the great questions [14:03] if you have more there are always lots of helpful people in #ubuntu-motu [14:03] james_w: thank! [14:04] james_w: thank you very much, bzr-builddeb rocks ;) [14:04] james_w: thanks [14:04] james_w: thank you for the class! [14:04] ok [14:04] in one week + 6 hours we will have the incredible didrocks presenting "How to update a package", I hope to see you all there [14:04] james_w: Thanks for the class, it was good to know bzr-builddeb. [14:04] certainly, I will not miss it ;) [14:05] james_w: I'll see that one too :-) [14:05] excellent [14:05] yeah, really nice [14:05] thank you all [14:05] yeah! [14:05] time to find some lunch [14:05] cheers [14:05] thank you james_w, see you soon :) [14:05] Thanks! === santiago-pgsql is now known as santiago-ve [14:33] thanks james_w for your time today, how we hear from you soon on another session [14:33] hope === 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 [20:08] hy, someone knows a link to get sources to ubuntu ? === 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 [23:54] lo everyone [23:54] to ssh into the shared session : http://paste.ubuntu.com/147955/ [23:55] we can use this shared session to demonstrate permissions and acl if you wish [23:55] If people know how to do this, please assist others if needed in a private /msg :0