FixingBugsBzr
Dev Week -- Fixing an Ubuntu bug using Bazaar -- james_w -- Fri Sep 4th, 2009
UTC
(01:59:51 PM) james_w: hi everyone (02:00:19 PM) james_w: I'm going to be talking about fixing an Ubuntu bug using bzr (02:00:29 PM) james_w: who's here to learn about that? (02:01:18 PM) james_w: excellent (02:01:36 PM) james_w: so, first things first, install the "bzr-builddeb" package if you don't have it installed yet (02:01:43 PM) james_w: we'll need it in a little while (02:02:27 PM) james_w: if you head on over to https://launchpad.net/ubuntu (02:02:42 PM) james_w: you'll see you are now able to click on the "Code" tab at the top (02:02:54 PM) james_w: which wasn't something you could do until recently (02:03:37 PM) james_w: what does that tab show you? (02:04:11 PM) james_w: it shows you bzr branches for every package in Ubuntu (02:04:29 PM) james_w: you can now get the source of (nearly) every package as a bzr branch (02:04:41 PM) james_w: this means you can more easily look at the history of the package (02:04:49 PM) james_w: more easily version control your changes (02:05:00 PM) james_w: and more easily merge changes from others (02:05:14 PM) james_w: I think this is wicked cool (02:06:16 PM) james_w: qense> QUESTION: How do the branches relate to the apt-get source command? (02:06:21 PM) james_w: good question (02:07:00 PM) james_w: branching lp:ubuntu/<packagename> will get you the same as "apt get source <packagename>" (if you have karmic deb-src lines in your sources.list) (02:07:09 PM) james_w: it just gets it as a bzr branch rather than a tarball (02:07:24 PM) james_w: we keep the branches up to date with changes in the archive (02:07:39 PM) james_w: so that when there is a new upload it appears there very quickly (02:08:49 PM) james_w: e.g. Chuck uploaded net-snmp 43 minutes ago, and the change was available in bzr 5 minutes later (02:08:55 PM) james_w: <AntoineLeclair> QUESTION: same as mruiz: are all ubuntu packages there ? (02:08:59 PM) james_w: almost (02:09:06 PM) james_w: the intent is to have them all there (02:09:14 PM) james_w: we are still working on getting the last 10% there (02:10:07 PM) james_w: so, you don't have to use that long list of branches to navigate (02:10:22 PM) james_w: if you look at https://launchpad.net/ubuntu/+source/net-snmp (02:10:31 PM) james_w: which is the package page for net-snmp that I just mentioned (02:10:42 PM) james_w: you will see that the "Code" tab is again active (02:11:07 PM) james_w: clicking on that gives this page: https://code.launchpad.net/ubuntu/+source/net-snmp (02:11:14 PM) james_w: which is an overview of the branches available (02:11:21 PM) james_w: each branch is attached to a release of Ubuntu (02:11:37 PM) james_w: so you can see the karmic branches separate from the jaunty ones (02:11:46 PM) james_w: so at the top is lp:ubuntu/net-snmp (02:11:58 PM) james_w: which can also be written lp:ubuntu/karmic/net-snmp (02:12:07 PM) james_w: omitting the release gets you the current development one (02:13:06 PM) james_w: under that is lp:ubuntu/jaunty/net-snmp which is obvious the jaunty branch (02:13:15 PM) james_w: then there is intrepid, which is a bit more interesting (02:13:25 PM) james_w: lp:ubuntu/intrepid/net-snmp (02:13:41 PM) james_w: that's the source that was released with intrepid (02:14:00 PM) james_w: then lp:ubuntu/intrepid-security/net-snmp (02:14:08 PM) james_w: which is the source that is in intrepid-security (02:14:19 PM) james_w: so it contains one or more security updates (02:14:31 PM) james_w: <qense> QUESTION: What if you want to get the latest version in e.g. jaunty, but don't know if it's been published in backports, security and/or updates? (02:14:37 PM) james_w: good question (02:14:44 PM) james_w: there's no good answer for that currently (02:14:58 PM) james_w: it's partly that "latest" isn't exactly well defined (02:15:05 PM) james_w: I'm keen to provide that somehow (02:15:20 PM) james_w: but it may be implemented on top of what we have using the LP API or something (02:15:41 PM) james_w: so, that's the branches that are available, what do they contain? (02:15:53 PM) james_w: check out https://code.launchpad.net/~ubuntu-branches/ubuntu/karmic/net-snmp/karmic (02:16:02 PM) james_w: which is the page that corresponds to the karmic branch (02:16:28 PM) james_w: gives you some information on the branch, the latest revisions, and the bugs that have been fixed (02:16:59 PM) james_w: it also allows you to subscribe to the branch (02:17:13 PM) james_w: this would allow you to get an email every time there was an upload of a package (02:17:42 PM) james_w: which I don't think you can currently do without some procmail/rss2email type solution (02:18:47 PM) james_w: if you click on the "Source Code" link then you can see the contents of the branch (02:19:00 PM) james_w: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/karmic/net-snmp/karmic/changes (02:19:21 PM) james_w: and https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/karmic/net-snmp/karmic/files (02:19:32 PM) james_w: so you can see that all the source is there as you would expect (02:19:47 PM) james_w: and you can also see the revision corresponding to each upload (02:20:04 PM) james_w: <jacob> QUESTION: will it eventually be possible, with the correct upload rights, to push to one of these branches and have a package built & uploaded out of it? (or does this already happen? :) ) (02:20:10 PM) james_w: yes and yes (02:20:15 PM) james_w: that is currently in planning (02:20:23 PM) james_w: you will be able to push soon if you can upload (02:20:37 PM) james_w: and then you will be able to request a build from the branch (02:20:49 PM) james_w: (which will work from any packaging branch to PPAs as well) (02:21:00 PM) james_w: <mruiz> QUESTION: how are the default upload rights per branch ? (02:21:07 PM) james_w: this is still being discussed (02:21:26 PM) james_w: one rule will be that if you can upload the package then you will be able to push to these "official branches" (02:21:42 PM) james_w: I should have mentioned that the lp:ubuntu/net-snmp etc. branches are special (02:21:59 PM) james_w: they have been nominated to be "official" and correspond to what is in the archive (02:22:19 PM) james_w: you can push any branch you like to ~LP-ID/ubuntu/karmic/net-snmp/some-name (02:22:26 PM) james_w: if you want to work on this package (02:22:50 PM) james_w: which will work well for PPAs at some point (02:24:01 PM) james_w: in addition to all of this check out https://code.launchpad.net/debian (02:24:12 PM) james_w: we have exactly the same thing there for Debian (02:24:37 PM) james_w: so if you see an upload in Debian with a change you want in Ubuntu then you can merge the Debian branch from there to the Ubuntu one (02:24:57 PM) james_w: <mruiz> QUESTION: are they imported from git.debian.org ? (02:24:58 PM) james_w: no (02:25:05 PM) james_w: not every package is on there (02:25:14 PM) james_w: we would like to do that when it makes sense (02:25:21 PM) james_w: but we need some improvements in bzr first (02:25:27 PM) james_w: so we are working on that (02:26:09 PM) james_w: so, what else can you do with these branches? (02:26:16 PM) james_w: well, I hope you can use them to fix bugs (02:26:26 PM) james_w: otherwise I picked a bad title for this session (02:26:44 PM) james_w: so, I recorded a screencast that shows some of this (02:27:04 PM) james_w: unfortunately it has no audio, but it might help follow along or jog your memory (02:27:06 PM) james_w: http://people.canonical.com/~jamesw/dd.ogv (02:27:17 PM) james_w: <^arky^> QUESTION: Is it possible to checkout the source of package, apply custom patches and publish to personal PPA for testing (02:27:24 PM) james_w: yes, that will be possible one day (02:27:28 PM) james_w: you can do the first part now (02:27:40 PM) james_w: and you can upload the result to your PPA as normal with dput (02:27:53 PM) james_w: the branch -> PPA step will be a future addition (02:28:00 PM) james_w: <mruiz> QUESTION: Who control Ubuntu Branches team? (02:28:06 PM) james_w: <evil laugh> (02:28:07 PM) james_w: I do (02:28:24 PM) james_w: it's kind of an implementation detail (02:28:47 PM) james_w: for all these branches there isn't really an owner, but we can't have no owner, so we just made a new team (02:29:03 PM) james_w: <qense> Not completely ontopic: I'd like to propose an update for the guake package with help of the branch system, but the diff comes from Git. How do I convert it to a usable patch I can add to the branch? (02:29:10 PM) james_w: check out "bzr patch" from bzrtools (02:29:18 PM) james_w: should be able to apply git diffs (02:30:48 PM) james_w: <jacob> QUESTION: will bzr-builddeb be used on the launchpad side for building? (02:30:51 PM) james_w: dunno (02:31:00 PM) james_w: or a more precise answer: (02:31:03 PM) james_w: yes, but no (02:31:15 PM) james_w: there will be code reuse (02:31:29 PM) james_w: but we might want to reduce the amount of trusted code (02:31:38 PM) james_w: and it won't need all the features of bzr-builddeb (02:34:26 PM) james_w: sorry, just checking the cricket score (02:34:38 PM) james_w: right, so let's fix a "bug" (02:34:54 PM) james_w: we can carry on working on this net-snmp package (02:35:24 PM) james_w: oh, staging is down (02:35:29 PM) james_w: that will make this tricky (02:35:47 PM) james_w: we don't really want to create lots of useless merge proposals (02:36:16 PM) james_w: how about I commentate on the video instead? (02:36:18 PM) james_w: would that work? (02:36:31 PM) james_w: not good for the logs though :-/ (02:38:09 PM) james_w: we can at least grab a branch and look around, so let's do that (02:38:34 PM) james_w: bzr branch lp:ubuntu/net-snmp (02:38:51 PM) james_w: that will create a "net-snmp" directory that contains the bzr branch (02:41:51 PM) james_w: <mruiz> error- > bzr: ERROR: exceptions.KeyError: 'Bazaar repository format 2a (needs bzr 1.16 or later)\n (02:41:57 PM) james_w: so, what's going on here? (02:42:10 PM) james_w: bzr is just about to release 2.0 with a new default format (02:42:26 PM) james_w: this format is a lot better than it's previous ones in many ways (02:42:38 PM) james_w: most notably here in disk space (02:43:53 PM) james_w: as there are a *lot* of branches here it would have used loads of disk space in the old format (02:44:23 PM) james_w: so we used the new one a little before it is available to most people so that we could fit all these branches on a sensible number of disk drives (02:44:46 PM) james_w: this is unfortunate in that it makes it harder to use an old release to work on the branches (02:44:56 PM) james_w: there is https://launchpad.net/~bzr/+archive/ppa (02:45:16 PM) james_w: and we will go through the backport process once 2.0 is out (02:45:31 PM) james_w: plus, it's not long until karmic is released :-) (02:48:54 PM) james_w: so, we have the branch now (02:49:08 PM) james_w: you can look around and see that it looks just like a normal package (02:49:12 PM) james_w: how to build it? (02:49:21 PM) james_w: "bzr builddeb -S" (02:49:27 PM) james_w: that will build a source package (02:49:36 PM) james_w: "bzr builddeb" to build a binary one (02:49:39 PM) james_w: "bzr bd" (02:49:46 PM) james_w: you can use that alias for less typing (02:50:01 PM) james_w: <qense> QUESTION: Is there a mechanism for proposing something based on lp:ubuntu/foo/bar to become lp:ubuntu/foo-backports/bar ? (02:50:10 PM) james_w: that would be the normal backport process (02:50:27 PM) james_w: but no, we don't have anything nominations or anything for that (02:50:57 PM) james_w: so, feel free to fix any bugs you find in this package :-) (02:51:22 PM) james_w: if you do fix something then you can "bzr commit", or use "debcommit" after adding a changelog entry with "dch" (02:51:36 PM) james_w: then you should "bzr push" this to LP (02:51:59 PM) james_w: to something like "bzr push lp:~LP-ID/ubuntu/karmic/net-snmp/fix-bug" (02:53:29 PM) james_w: then you can open that branch in your web browser and "Propose for merging in to another branch" (02:53:50 PM) james_w: and that would create a "merge proposal" that allows us to review and comment on the changes (02:53:59 PM) james_w: you can see this in the screencast (02:54:08 PM) james_w: we're out of time, any last questions? (02:56:45 PM) james_w: ok, I'll make way for Laney (02:56:49 PM) james_w: thanks everyone (02:57:03 PM) james_w: I'm always up for discussing this, so grab me another time if you want to know more
MeetingLogs/devweek0909/FixingBugsBzr (last edited 2009-09-04 18:58:11 by pool-71-182-107-66)