FixingDesktopBugs

Dev Week -- Fixing Desktop bugs -- seb128 -- Thu, 3rd Feb, 2012

   1 [15:00] <seb128> ok, it's time to start
   2 [15:00] <seb128> thanks everybody for joining
   3 [15:01] <seb128> I'm Sebastien Bacher and working in the Ubuntu Desktop Team
   4 [15:01] <seb128> I will show you a bit of what you do in the desktop team today
   5 [15:01] <seb128> first some infos, you can find us on #ubuntu-desktop on this IRC channel
   6 [15:02] <seb128> or that mailing list: https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
   7 [15:02] <seb128> feel free to join to ask question, participate to discussion or help doing work ;-)
   8 [15:02] <seb128> so let's get started, what we do in the desktop team is basically keeping the desktop in shape
   9 [15:02] <seb128> which means
  10 [15:03] <seb128> - keeping the components updated
  11 [15:03] <seb128> - fixing bugs
  12 [15:03] <seb128> - looking to your bug reports
  13 [15:03] <seb128> - talking to our upstreams (GNOME, Debian, dx, etc)
  14 [15:03] <seb128> you can find some pointers and documentation on https://wiki.ubuntu.com/DesktopTeam/
  15 [15:04] <seb128> I will first walk you through a backport of an upstream GNOME git commit to one of our packages
  16 [15:04] <seb128> note that the desktop team packages use a different workflow for most part than the "UDD" new standard workflow
  17 [15:05] <seb128> 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)
  18 [15:05] <seb128> you can read https://wiki.ubuntu.com/DesktopTeam/Bzr to get some details on our workflow
  19 [15:05] <seb128> so
  20 [15:05] <seb128> let's start by fetch a source
  21 [15:05] <seb128> we will use gnome-control-center in that example
  22 [15:05] <seb128> for that you usually want to use "debcheckout <source>"
  23 [15:06] <seb128> $ debcheckout gnome-control-center
  24 [15:06] <seb128> in this case
  25 [15:06] <seb128> which should give you something around those lines
  26 [15:06] <seb128> bzr branch http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu gnome-control-center ...
  27 [15:06] <seb128> then it's downloading the source for you
  28 [15:07] <seb128> wait a bit for that to be done and you should get that:
  29 [15:07] <seb128> $ ls
  30 [15:07] <seb128> gnome-control-center
  31 [15:07] <seb128> gnome-control-center_3.2.2-2ubuntu5.debian.tar.gz
  32 [15:07] <seb128> gnome-control-center_3.2.2-2ubuntu5.dsc
  33 [15:07] <seb128> gnome-control-center_3.2.2.orig.tar.bz2
  34 [15:07] <seb128> the first one is a checkout of the vcs directory
  35 [15:07] <seb128> the other files are the source package from the archive
  36 [15:07] <seb128>  
  37 [15:08] <seb128> let's have a look to the dir
  38 [15:09] <seb128> hum, demo effect, that didn't do what I wanted today on precise
  39 [15:09] <seb128> will have to look into that
  40 [15:09] <seb128> so what it should have done and what I'm doing now it's what it wrote
  41 [15:09] <seb128> which is basically
  42 [15:10] <seb128> bzr branch lp:~ubuntu-desktop/gnome-control-center/ubuntu g
  43 [15:10] <seb128> bzr branch lp:~ubuntu-desktop/gnome-control-center/ubuntu
  44 [15:10] <seb128> ok, now I got what I wanted ;-)
  45 [15:10] <seb128> let's visit that directory
  46 [15:10] <seb128> cd ubuntu
  47 [15:10] <seb128> $ ls
  48 [15:11] <seb128> debian
  49 [15:11] <seb128> so you get a debian dir there, it's where we will do our work
  50 [15:11] <seb128> to continue you will need the bzr-builddeb and the build-depends of gnome-control-center
  51 [15:11] <seb128> so assuming that you have the deb-src for oneiric or precise enable you can type those commands
  52 [15:12] <seb128> sudo apt-get install bzr-builddeb
  53 [15:12] <seb128> sudo apt-get build-dep gnome-control-center
  54 [15:12] <seb128> the second one will install all the Build-Depends for gnome-control-center, i.e what you need to build it
  55 [15:13] <seb128> now you should be set
  56 [15:13] <seb128> so we are in the debian directory
  57 [15:13] <seb128> rather in the ubuntu dir
  58 [15:13] <seb128> bzr bd-do will give you a shell environement where you can do changes
  59 [15:14] <seb128> whatever change you do that in the debian directory will be applied to the vcs checkout you did when you exit 0
  60 [15:14] <seb128> if you exit with something else than 0 you will not get the changes copied over
  61 [15:16] <seb128> 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
  62 [15:16] <seb128> ie http://git.gnome.org/browse/gnome-control-center/patch/?id=81fb28de5cf8708932224f482a8923322191b00f
  63 [15:16] <seb128> so you did bzr bd-do and are in an unpacked source of gnome-control-center
  64 [15:18] <seb128> let's save the content of that commit in a file, name it git_backport_printer_fix.patch
  65 [15:18] <seb128> new you do
  66 [15:18] <seb128> quilt import git_backport_printer_fix.patch
  67 [15:19] <seb128> Importing patch git_backport_printer_fix.patch (stored as git_backport_printer_fix.patch)
  68 [15:19] <seb128>  
  69 [15:19] <seb128> the patch is imported
  70 [15:19] <seb128> let's check that it applies well
  71 [15:19] <seb128> $ quilt push
  72 [15:19] <seb128> Applying patch git_backport_printer_fix.patch
  73 [15:19] <seb128> patching file panels/printers/cc-printers-panel.c
  74 [15:19] <seb128> Now at patch git_backport_printer_fix.patch
  75 [15:19] <seb128>  
  76 [15:19] <seb128> it does
  77 [15:19] <seb128> let's refresh it
  78 [15:19] <seb128> $ quilt refresh
  79 [15:19] <seb128> Refreshed patch git_backport_printer_fix.patch
  80 [15:20] <seb128> so all good
  81 [15:20] <ClassBot> There are 10 minutes remaining in the current session.
  82 [15:20] <seb128> we have our patch, it applies to our package and we refresh it
  83 [15:20] <seb128> we are happy about it
  84 [15:20] <seb128> we can exit
  85 [15:20] <seb128> $ exit 0
  86 [15:20] <seb128> it bring you back to your vcs dir
  87 [15:21] <seb128> let's see where we stand
  88 [15:21] <seb128> $ bzr statusmodified:
  89 [15:21] <seb128>   debian/patches/series
  90 [15:21] <seb128> unknown:
  91 [15:21] <seb128>   debian/patches/git_backport_printer_fix.patch
  92 [15:21] <seb128> ok
  93 [15:21] <seb128> so the series got updated, and we have a new file
  94 [15:21] <seb128> $ bzr diff
  95 [15:21] <seb128> === modified file 'debian/patches/series'
  96 [15:21] <seb128> --- debian/patches/series      2012-01-25 16:38:52 +0000
  97 [15:21] <seb128> +++ debian/patches/series      2012-02-02 15:18:21 +0000
  98 [15:21] <seb128> @@ -25,3 +25,4 @@
  99 [15:21] <seb128>  93_change_window_role_on_panel_change.patch
 100 [15:21] <seb128>  94_git_adding_shortcuts.patch
 101 [15:21] <seb128>  95_git_ctrlw_shortcut.patch
 102 [15:21] <seb128> +git_backport_printer_fix.patch
 103 [15:21] <seb128>  
 104 [15:21] <seb128> the patch got added to the serie
 105 [15:21] <seb128> we need to add the file to the vcs, that was not done for us
 106 [15:21] <seb128> so we use
 107 [15:22] <seb128> $ bzr add debian/patches/git_backport_printer_fix.patch
 108 [15:22] <seb128> adding debian/patches/git_backport_printer_fix.patch
 109 [15:22] <seb128> at this point we are mostly good
 110 [15:22] <seb128> we need still to update the changelog
 111 [15:22] <seb128> type
 112 [15:22] <seb128> dch -i
 113 [15:22] <seb128> and write a changelog entry
 114 [15:22] <seb128>  * backport fix from git (lp: #...) for example
 115 [15:22] <seb128> then you can bzr diff again
 116 [15:22] <seb128> you get a new revision with a backported patch ready to test!
 117 [15:22] <seb128> now to test it's easy, run bzr bd
 118 [15:23] <seb128> it will build the new version for you
 119 [15:23] <seb128> if you don't have a gpg key matching your changelog email don't worry, it will warn you about that, that's ok
 120 [15:23] <seb128> your deb are in ../build-area after the build
 121 [15:23] <seb128> you can go there, sudo dpkg -i *.deb and try the new version
 122 [15:24] <seb128> if you are happy with the change go back to the ubuntu dir
 123 [15:24] <seb128> $ bzr commit
 124 [15:24] <seb128> to commit you work
 125 [15:24] <seb128> then
 126 [15:24] <seb128> $ bzr push lp:~yourlaunchpadid/gnome-control-conter/my-fix
 127 [15:24] <seb128> $ bzr lp-submit to do a merge proposal
 128 [15:25] <seb128> and wait for us to review your work ;-)
 129 [15:25] <seb128>  
 130 [15:25] <ClassBot> There are 5 minutes remaining in the current session.
 131 [15:25] <seb128> ok, that was basically it for a patch backport, 5 minutes left
 132 [15:25] <seb128> questions?
 133 [15:25] <ClassBot> dholbach asked: Will Wanda the Fish ever come back?
 134 [15:26] <seb128> 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 ;-)
 135 [15:26] <ClassBot> jincreator asked: I tried debcheckout but only get debian folder, not having ,dsc, .debian.tar.gz, .orig.tar.bz2.
 136 [15:27] <seb128> jincreator, that's probably better, seems the tools changed behaviour in precise which confused me
 137 [15:27] <seb128> you probably got the equivalent of my second command
 138 [15:27] <seb128>  
 139 [15:27] <ClassBot> ali1234 asked: don't you need to export QUILT_PATCH_DIR?
 140 [15:27] <seb128> good point, I'm sorry about that
 141 [15:27] <seb128> it's one of those suboptimal thing you have to do, I did it years ago and forgot :p
 142 [15:28] <seb128> you need to "export QUILT_PATCHES=debian/patches"
 143 [15:28] <seb128> put that in your environement then you can forget about it like me :p
 144 [15:28] <seb128>  
 145 [15:28] <ClassBot> ali1234 asked: what if the package doesn't use quilt but something else?
 146 [15:28] <seb128> I couldn't cover all the patch systems there
 147 [15:29] <seb128> you can use edit-patch (great tool that mvo wrote) than wrap around the different patch systems
 148 [15:29] <seb128> it will do the quilt magic for you, or call cdbs-edit-patch or similar
 149 [15:29] <seb128>  
 150 [15:29] <seb128> one minutes left and no question
 151 [15:29] <seb128> seems we are good ;-)
 152 

MeetingLogs/devweek1201/FixingDesktopBugs (last edited 2012-02-03 09:23:48 by dholbach)