Dev Week -- Bazaar for packaging -- james_w -- Wed, Jan 21

UTC -4 (EST)

(01:01:23 PM) dholbach: next up is Mr james_w!
(01:01:29 PM) dholbach: big round applause for James!
(01:01:36 PM) ***rugby471 feels his life is now complete
(01:01:49 PM) rugby471: thanks daniel!!!
(01:01:50 PM) Ape3000: This was very good session and I really learned lots of things.
(01:01:51 PM) dinxter: thanks daniel
(01:01:52 PM) dholbach: for more Harvest goodness :-)
(01:01:58 PM) ***porthose *applause
(01:02:10 PM) ian_brasil: thx
(01:02:15 PM) porthose: thanks daniel great session
(01:02:18 PM) enaut: thanks
(01:02:26 PM) Flimm: Harvest looks especially interesting
(01:02:34 PM) dholbach: james_w is going to talk about Bazaar and Packaging which is going to make 1) your life easier, 2) you very happy
(01:02:40 PM) james_w: \o/
(01:02:41 PM) dholbach: Rock On everybody!
(01:03:01 PM) james_w: I'm just getting set up still, I had a great idea about 10 minutes ago, so I'm changing the session a bit
(01:03:11 PM) cool2k: thnks it was great!!
(01:03:11 PM) james_w: is anyone still running Hardy?
(01:03:19 PM) Arc: nope
(01:03:53 PM) Flimm: Not me
(01:03:55 PM) furicle: Yes
(01:04:07 PM) Flimm: I borrow somebody else's comp to test stuff on Hardy
(01:04:42 PM) james_w: as Mr. Holbach said, we're going to be looking at bzr for packaging
(01:05:12 PM) james_w: we're actually going to fix that baobab bug again, but this time using bzr
(01:05:30 PM) james_w: for that we need some extra tools, so if you would all
(01:05:40 PM) james_w: sudo aptitude install bzr bzrtools bzr-svn bzr-builddeb
(01:05:44 PM) james_w: that would be fantastic
(01:08:00 PM) james_w: I'm working on a project called "Distributed Development" that aims to make bzr really useful for packaging
(01:08:09 PM) james_w: and at the same time use bzr for packaging more in Ubuntu
(01:08:25 PM) james_w: as part of that I have created the branches you can see at
(01:08:51 PM) james_w: these will be moved to launchpad soon, the launchpad developers are working hard to accommodate them.
(01:09:00 PM) james_w: until that time they live there
(01:09:12 PM) james_w: so you can click through there and find the gnome-utils branches
(01:09:22 PM) james_w: <Arc> QUESTION: is this currently supported for PPAs on launchpad?
(01:09:32 PM) james_w: Arc: you mean bzr for PPAs?
(01:09:43 PM) Arc: yes
(01:09:49 PM) james_w: sort of
(01:09:57 PM) james_w: you can use bzr and then upload a source package
(01:10:16 PM) james_w: there are plans in the works to allow you to just point to a branch and ask for it to be built in your PPA
(01:10:53 PM) james_w: <Flimm> QUESTION: packages-import for both main and universe?
(01:10:55 PM) james_w: yup
(01:11:31 PM) james_w: to show off some of the things that it will be possible to do I have created a project on
(01:11:34 PM) james_w: you can see it at
(01:12:09 PM) james_w: and once you have the above packages installed you can grab the source by typing
(01:14:34 PM) james_w: bzr branch lp://staging/gnome-utils-ubuntu
(01:14:53 PM) james_w: (the staging is just there as we are experimenting)
(01:15:25 PM) james_w: also it will be written "lp:ubuntu/jaunty/gnome-utils-ubuntu" once launchpad hosts the branches
(01:15:33 PM) james_w: <Flimm> QUESTION: where can I upload any commits I make to bzr branches from packages-import?
(01:15:45 PM) james_w: I would just recommend pushing them to your +junk area for now
(01:15:56 PM) james_w: once launchpad hosts them you will be able to push to
(01:16:10 PM) james_w: lp:~your-user/ubuntu/jaunty/gnome-utils
(01:17:03 PM) james_w: once you have branched the code then we can work on the fix
(01:17:51 PM) james_w: Mr. Holbach helpfully told us that the fix is between revisions 8377 and 8378 of
(01:18:41 PM) james_w: now, we installed bzr-svn, meaning we can access this URL using bzr
(01:19:35 PM) james_w: (I've just noticed I also have a bzr plugin named "sandwich", I wonder what that does)
(01:20:56 PM) james_w: bzr diff -c  8378
(01:21:12 PM) james_w: that will show us the changes in revision 8378 in SVN
(01:21:52 PM) james_w: except that we are not accessing a native bzr branch, so we have to say
(01:21:53 PM) james_w:  bzr diff -c  svn:8378
(01:22:06 PM) james_w: because 8378 is an svn revision number
(01:22:28 PM) james_w: (when you run these commands it will spin a progress bar for a little while as it does the translation)
(01:25:42 PM) james_w: as well as making packaging branches available we are working on making bzr versions of the SVN projects available
(01:26:01 PM) james_w: so one day you won't have to wait for this translation to be done, you can just access the bzr version
(01:33:23 PM) james_w: right
(01:33:31 PM) james_w: so it's the same diff we saw an hour ago :-)
(01:33:37 PM) james_w: interesting eh? :-)
(01:34:03 PM) james_w: but we don't just want to see the diff, we want to pull in the changes
(01:34:06 PM) james_w: we want to merge them
(01:34:29 PM) james_w: bzrtools provides a nice "patch" command we can use for this
(01:34:40 PM) james_w: so you can "bzr patch file" and it will apply it
(01:35:29 PM) james_w: or you can pipe in a patch so "bzr diff -c  svn:8378 | bzr patch" should work
(01:35:46 PM) james_w: if you were in the last session and have the patch file laying around then "bzr patch thatfile" will work
(01:36:02 PM) james_w: interestingly, it should also work over any transport
(01:36:24 PM) james_w: so "bzr patch http://some-server/some-patch-someone-has-pointed-you-to" should work
(01:37:54 PM) james_w: e.g. "bzr patch"
(01:38:02 PM) james_w: to apply the part of the patch that makes the code change
(01:38:40 PM) james_w: once you've applied the patch however you chose to do it
(01:39:11 PM) james_w: you can write a changelog entry to go along with it
(01:39:14 PM) james_w: run "dch -i -D UNRELEASED"
(01:39:19 PM) james_w: and type in your message
(01:39:41 PM) james_w: once done, save and quit
(01:39:47 PM) james_w: and run "debcommit"
(01:40:07 PM) james_w: (I assume you all have devscripts installed from the last session for those last two commands)
(01:41:18 PM) james_w: make sure include the bug number as "LP: #301952" in the changelog
(01:42:07 PM) james_w: once you are done you can run "bzr log -r -1" and "bzr diff -c -1" to see your message and the changes
(01:42:15 PM) james_w: (or install bzr-gtk and run "bzr viz")
(01:42:37 PM) james_w: now you want to build the package to test it
(01:42:48 PM) james_w: simply run "bzr builddeb -S"
(01:43:08 PM) james_w: that will download the tarball that you need, and build you a source package
(01:43:22 PM) james_w: you can then build that in pbuilder or similar, or sign it and push it to your PPA
(01:43:36 PM) james_w: <Quintasan> bzr: ERROR: A Debian packaging error occurred: uscan failed to retrieve the upstream tarball
(01:43:53 PM) james_w: ah, you don't have deb-src entries for jaunty in your sources.list
(01:45:07 PM) james_w: you can add them or run "(cd .. && wget"
(01:45:24 PM) james_w: once you are happy with the fix you want to get this uploaded to Ubuntu
(01:45:32 PM) james_w: so it needs to be merged in to the main packaging branch
(01:45:36 PM) james_w: for that we use launchpad
(01:45:45 PM) james_w: so first you need to push your changes back to launchpad
(01:46:26 PM) james_w: "bzr push lp://staging/~YOUR_LP_USERNAME/gnome-utils-ubuntu/fix-301952"
(01:46:42 PM) james_w: where YOUR_LP_USERNAME is your launchpad username, and the last part of the URL is anything you want
(01:47:11 PM) james_w: this will fail if you haven't registered you SSH key with launchpad yet
(01:47:55 PM) james_w: oh, and also if you haven't yet run "bzr launchpad-login"
(01:48:05 PM) james_w: "bzr launchpad-login YOUR_LP_USERNAME"
(01:49:14 PM) james_w: for information on registering your launchpad SSH key
(01:49:23 PM) james_w: iulian> QUESTION: Can Ubuntu devs commit to the main branch?  If yes, where will it be located?
(01:49:31 PM) james_w: iulian: yes, if they can upload the package
(01:49:39 PM) james_w: once the branches are hosted on launchpad
(01:50:19 PM) james_w: once you have pushed you can go to and you should be able to see your branch
(01:54:28 PM) james_w: when you can see your branch the next step is to propose it for merging in to the main branch
(01:54:50 PM) james_w: if you click on the link to your branch you can click "Propose for merging in to another branch"
(01:56:39 PM) james_w: in the next form you can just add your explanation of what you have done, the "cover letter" of the change
(01:57:10 PM) james_w: you will end up with something like
(01:57:21 PM) james_w: which a developer can then review and merge
(01:58:33 PM) james_w: and if you also look at the bug report on staging you will see that under the description it now links to a branch that has the fix
(01:58:51 PM) james_w: this went from the changelog -> bzr because of debcommit
(01:59:00 PM) james_w: then launchpad noticed that and added the link for us
(01:59:53 PM) james_w: we're out of time unfortunately
(01:59:59 PM) james_w: sorry for rushing the last bit
(02:00:12 PM) james_w: that's what happens when you decide to change your session at the last minute :-)
(02:00:42 PM) UbuntuIRC: saludos
(02:01:05 PM) dinxter: thanks james
(02:01:12 PM) pochu_ is now known as pochu
(02:01:18 PM) porthose: james_w: thanks for the great session :-D
(02:01:27 PM) Flimm: Thank you james_w
(02:01:28 PM) james_w: I'm happy to help people with things outside the session, but we have to make way for the next session now
(02:01:35 PM) iulian: Thanks James, that was great.
(02:01:35 PM) james_w: thanks for playing along
(02:02:15 PM) Quintasan: thanks, some knowledge wont hurt ;)
(02:02:18 PM) james_w: WalterMundt> QUESTION: I notice that committing to bzr this way doesn't create a patchfile under debian/ -- does that get handled at some other stage?
(02:02:22 PM) james_w: good question
(02:02:32 PM) james_w: you can still create that patch file manually if you like
(02:02:50 PM) james_w: it's better not to do that if you are using bzr, but while we still use patch systems you can do that step
(02:03:00 PM) james_w: bzr doesn't stop you, it could automate it better though
(02:03:15 PM) james_w: but now we have JontheEchidna with "Kubuntu Bug Squishing"

MeetingLogs/devweek0901/Bzr4Pkgs (last edited 2009-01-21 19:49:43 by pool-71-182-96-163)