== Dev Week -- Fixing Desktop bugs -- seb128 -- Thu, 3rd Feb, 2012 == {{{#!irc [15:00] ok, it's time to start [15:00] thanks everybody for joining [15:01] I'm Sebastien Bacher and working in the Ubuntu Desktop Team [15:01] I will show you a bit of what you do in the desktop team today [15:01] first some infos, you can find us on #ubuntu-desktop on this IRC channel [15:02] or that mailing list: https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop [15:02] feel free to join to ask question, participate to discussion or help doing work ;-) [15:02] so let's get started, what we do in the desktop team is basically keeping the desktop in shape [15:02] which means [15:03] - keeping the components updated [15:03] - fixing bugs [15:03] - looking to your bug reports [15:03] - talking to our upstreams (GNOME, Debian, dx, etc) [15:03] you can find some pointers and documentation on https://wiki.ubuntu.com/DesktopTeam/ [15:04] I will first walk you through a backport of an upstream GNOME git commit to one of our packages [15:04] note that the desktop team packages use a different workflow for most part than the "UDD" new standard workflow [15:05] the reason are basically that it works better for us still and we wait for a few extra issues to get sorted with UDD (mostly quilt handling and download times) [15:05] you can read https://wiki.ubuntu.com/DesktopTeam/Bzr to get some details on our workflow [15:05] so [15:05] let's start by fetch a source [15:05] we will use gnome-control-center in that example [15:05] for that you usually want to use "debcheckout " [15:06] $ debcheckout gnome-control-center [15:06] in this case [15:06] which should give you something around those lines [15:06] bzr branch http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu gnome-control-center ... [15:06] then it's downloading the source for you [15:07] wait a bit for that to be done and you should get that: [15:07] $ ls [15:07] gnome-control-center [15:07] gnome-control-center_3.2.2-2ubuntu5.debian.tar.gz [15:07] gnome-control-center_3.2.2-2ubuntu5.dsc [15:07] gnome-control-center_3.2.2.orig.tar.bz2 [15:07] the first one is a checkout of the vcs directory [15:07] the other files are the source package from the archive [15:07] [15:08] let's have a look to the dir [15:09] hum, demo effect, that didn't do what I wanted today on precise [15:09] will have to look into that [15:09] so what it should have done and what I'm doing now it's what it wrote [15:09] which is basically [15:10] bzr branch lp:~ubuntu-desktop/gnome-control-center/ubuntu g [15:10] bzr branch lp:~ubuntu-desktop/gnome-control-center/ubuntu [15:10] ok, now I got what I wanted ;-) [15:10] let's visit that directory [15:10] cd ubuntu [15:10] $ ls [15:11] debian [15:11] so you get a debian dir there, it's where we will do our work [15:11] to continue you will need the bzr-builddeb and the build-depends of gnome-control-center [15:11] so assuming that you have the deb-src for oneiric or precise enable you can type those commands [15:12] sudo apt-get install bzr-builddeb [15:12] sudo apt-get build-dep gnome-control-center [15:12] the second one will install all the Build-Depends for gnome-control-center, i.e what you need to build it [15:13] now you should be set [15:13] so we are in the debian directory [15:13] rather in the ubuntu dir [15:13] bzr bd-do will give you a shell environement where you can do changes [15:14] whatever change you do that in the debian directory will be applied to the vcs checkout you did when you exit 0 [15:14] if you exit with something else than 0 you will not get the changes copied over [15:16] let's assume for the exercice than we want to backport the fix from http://git.gnome.org/browse/gnome-control-center/commit/?h=gnome-3-2&id=81fb28de5cf8708932224f482a8923322191b00f [15:16] ie http://git.gnome.org/browse/gnome-control-center/patch/?id=81fb28de5cf8708932224f482a8923322191b00f [15:16] so you did bzr bd-do and are in an unpacked source of gnome-control-center [15:18] let's save the content of that commit in a file, name it git_backport_printer_fix.patch [15:18] new you do [15:18] quilt import git_backport_printer_fix.patch [15:19] Importing patch git_backport_printer_fix.patch (stored as git_backport_printer_fix.patch) [15:19] [15:19] the patch is imported [15:19] let's check that it applies well [15:19] $ quilt push [15:19] Applying patch git_backport_printer_fix.patch [15:19] patching file panels/printers/cc-printers-panel.c [15:19] Now at patch git_backport_printer_fix.patch [15:19] [15:19] it does [15:19] let's refresh it [15:19] $ quilt refresh [15:19] Refreshed patch git_backport_printer_fix.patch [15:20] so all good [15:20] There are 10 minutes remaining in the current session. [15:20] we have our patch, it applies to our package and we refresh it [15:20] we are happy about it [15:20] we can exit [15:20] $ exit 0 [15:20] it bring you back to your vcs dir [15:21] let's see where we stand [15:21] $ bzr statusmodified: [15:21] debian/patches/series [15:21] unknown: [15:21] debian/patches/git_backport_printer_fix.patch [15:21] ok [15:21] so the series got updated, and we have a new file [15:21] $ bzr diff [15:21] === modified file 'debian/patches/series' [15:21] --- debian/patches/series 2012-01-25 16:38:52 +0000 [15:21] +++ debian/patches/series 2012-02-02 15:18:21 +0000 [15:21] @@ -25,3 +25,4 @@ [15:21] 93_change_window_role_on_panel_change.patch [15:21] 94_git_adding_shortcuts.patch [15:21] 95_git_ctrlw_shortcut.patch [15:21] +git_backport_printer_fix.patch [15:21] [15:21] the patch got added to the serie [15:21] we need to add the file to the vcs, that was not done for us [15:21] so we use [15:22] $ bzr add debian/patches/git_backport_printer_fix.patch [15:22] adding debian/patches/git_backport_printer_fix.patch [15:22] at this point we are mostly good [15:22] we need still to update the changelog [15:22] type [15:22] dch -i [15:22] and write a changelog entry [15:22] * backport fix from git (lp: #...) for example [15:22] then you can bzr diff again [15:22] you get a new revision with a backported patch ready to test! [15:22] now to test it's easy, run bzr bd [15:23] it will build the new version for you [15:23] if you don't have a gpg key matching your changelog email don't worry, it will warn you about that, that's ok [15:23] your deb are in ../build-area after the build [15:23] you can go there, sudo dpkg -i *.deb and try the new version [15:24] if you are happy with the change go back to the ubuntu dir [15:24] $ bzr commit [15:24] to commit you work [15:24] then [15:24] $ bzr push lp:~yourlaunchpadid/gnome-control-conter/my-fix [15:24] $ bzr lp-submit to do a merge proposal [15:25] and wait for us to review your work ;-) [15:25] [15:25] There are 5 minutes remaining in the current session. [15:25] ok, that was basically it for a patch backport, 5 minutes left [15:25] questions? [15:25] dholbach asked: Will Wanda the Fish ever come back? [15:26] dholbach, it's still in gnome-panel upstream, you can "free the fish" in the dash but it's not as cool as the vuntz' version I've been told and will not go around you screen ;-) [15:26] jincreator asked: I tried debcheckout but only get debian folder, not having ,dsc, .debian.tar.gz, .orig.tar.bz2. [15:27] jincreator, that's probably better, seems the tools changed behaviour in precise which confused me [15:27] you probably got the equivalent of my second command [15:27] [15:27] ali1234 asked: don't you need to export QUILT_PATCH_DIR? [15:27] good point, I'm sorry about that [15:27] it's one of those suboptimal thing you have to do, I did it years ago and forgot :p [15:28] you need to "export QUILT_PATCHES=debian/patches" [15:28] put that in your environement then you can forget about it like me :p [15:28] [15:28] ali1234 asked: what if the package doesn't use quilt but something else? [15:28] I couldn't cover all the patch systems there [15:29] you can use edit-patch (great tool that mvo wrote) than wrap around the different patch systems [15:29] it will do the quilt magic for you, or call cdbs-edit-patch or similar [15:29] [15:29] one minutes left and no question [15:29] seems we are good ;-) }}}