Submit patches upstream

There are quite some generic fixes in our overlay that fix e.g. cross-compilation issues. Thus we aim for submitting these patches back to the Gentoo portage tree. You are very welcome to care about this upstream submission process! On this page we describe a proper way of submitting patches upstream. Please follow these steps to make sure we can track the submission process properly:

Preparation steps we need

  1. Update your portage tree.
  2. Check if the ebuild in the overlay is still the newest available package. If this is the case continue with 3., else:
    1. Check if the latest portage version works out of the box (compile and test!).
    2. If not, bump the overlay fixes to the latest version (see Add, modify and delete ebuilds).
  3. Compile and test the version you want to commit.
  4. Clean up the ebuild
    1. Remove all code you commented out.
    2. Comment your changes!
    3. Check the difference between the overlay and portage ebuild. Try to reduce the size of the diff to a minimum!
  5. Create a patch against the portage version of the ebuild using
    cd $PATH_TO_PACKAGE_IN_PORTAGE
    diff -Nur $package.ebuild $PATH_TO_PACKAGE_IN_OVERLAY/$package.ebuild > $PATCHLOCATION/$package.ebuild.patch
    

The actual submission

  1. Create a bug in the Gentoo bugzilla. Attach the ebuild patch ($PATCHLOCATION/$package.ebuild.patch) and all patches required for the ebuild to compile. If you also have the build log of the failure, it won't hurt if you attach it also. Remember the bug ID!
  2. Create a ticket in our trac
    1. Set the title to "Upstream submission of $package"
    2. Set the milestone to "upstream".
    3. Fill in a link to the upstream bug in the form:
      http://bugs.gentoo.org/show_bug.cgi?id=$YourBugID
      

What happens afterwards

Very often the patches don't get applied as they are, so you maybe have to rework patches, bump to new package versions and start over etc. However if one of our patches gets applied upstream we should do some clean-up. Here is what we have to do:

  1. Update your portage tree and confirm that the changes are really there.
  2. Check if the new portage version compiles and works.
  3. Unmask the portage version in the keyword section of the overlay.
  4. State in our ticket that the changes got applied upstream.
  5. Remove the ebuild and, if empty, the category from the overlay.
  6. Remove all the remaining unnecessary bits and pieces in the overlay (keywords, useflags, etc).