GNOME/Projects/PatchUpstreaming

From openSUSE

Contents

What is the 'patch upstreaming' project?

It is an attempt to do a full review of all the GNOME-related packages in openSUSE to reduce the number of patches in them, upstreaming anything that should be upstreamed.

But this is done not only for upstreaming patches, which, if done correctly, could have an important impact on GNOME 2.22, but also to do a full review of all patches present in our packages. For this to be done, some things need to be considered:

  • All patches in our packages should be tagged, as described in the Patch Standards section. This includes Bugzilla numbers as well as author's emails/comments.
  • All patches need to be reviewed and their utility confirmed. That is, as part of the tagging, patches need to be associated with a bug number (either in GNOME or Novell bugzillae. If there is no bug number and the patch's utility is not confirmed, those patches should be removed, if they make not sense upstream. Of course, for patches we are not sure they can be removed, those should be kept.
  • There are still some patches that patch .desktop files. Those should be removed, since there is no need to do that now that we use %suse_update_desktop_file.

What this is NOT

Why?

Maintaining lots of patches is a lot of work for packagers, specially when those patches address big parts of code, which makes it hard to keep up-to-date whenever the underlying code changes between point releases. Also, while some patches address changes that are specific to openSUSE, lots of other patches in our packages contain just simple fixes that are in no way specific to openSUSE and thus can be upstreamed.

When?

  • Started 15 January, ending 'when done'
  • On Monday 28th and Tuesday 29th January 2008, patch review process in our IRC channel to do a good kick start of the project.
  • On Friday 18th July, another patch tagging and upstreaming day

What? (Reports)

Before starting the patch upstreaming project, we got the list of all packages and their patches from openSUSE:Factory software repository. You can see the report here.

We now keep track of our patch upstreaming effort on this page. It shows all tags being used in our packages.

How?

Here are instructions on how to do the patch upstreaming: First, get the package from the openSUSE:Factory repository, creating a branch for your work (as stated in Build_Service/Collaboration:

 osc branch GNOME:Factory $package
 osc checkout home:$yourself:branches:GNOME:Factory/$package
 cd home:$yourself:branches:GNOME:Factory/$package

The .spec file contains the list of all patches within the package, just search for Patch in your $EDITOR and you will see one line for each patch in the package. Every patch needs to be GNOME/Patches#Patch_Markup_.28also_called_.22Tagging_Patches.22.29 tagged according to the patch markup we decided. To tag the patches, several things need to be considered:

  • Is the patch still useful? Does it apply? If it's not useful, we should remove the patch. To do so, just remove the line starting with Patch... corresponding to the patch from the .spec file, as well as the corresponding line starting with patch..., which is where the patch actually gets applied to the sources.
  • If the patch contains simple fixes or features, not specific to openSUSE, the patch should be upstreamed. For that, just go to http://bugzilla.gnome.org and follow the instructions for submitting a new bug, and then attach the patch to the bug. Of course, before sending the patch upstream, we should, at least, make sure the patch still applies. Once upstreamed, the bug number should be added to the patch's tag, for future reference.
  • If the patch is specific to openSUSE, the patch should be kept, if it still makes sense, and tagged accordingly with the PATCH-FIX-OPENSUSE or PATCH-FEATURE-OPENSUSE tags. Ideally, there should always be a bug in https://bugzilla.novell.com about every openSUSE-specific patch, used in the patch's tag, so if there are none, we should probably think about adding a bug for it.

Once all patches have been reviewed and tagged or removed, the changes to the package should be submitted. For doing so:

 osc commit -m "Changes description"
 # To see the differences between your package and the original one:
 osc rdiff home:yourself:branches:GNOME:Factory $package
 # Now do the submission:
 osc submitreq create -m "Tagged and upstreamed patches"

Your changes will be submitted, and a maintainer for the project will have to review and accept it, so just go work on another package while you wait :-)