Skip to content

Instantly share code, notes, and snippets.

@paran01d
Last active August 29, 2015 14:08
Show Gist options
  • Save paran01d/50736659da53a2d3c591 to your computer and use it in GitHub Desktop.
Save paran01d/50736659da53a2d3c591 to your computer and use it in GitHub Desktop.
Debian Package Diff

If you have two directories a and b that are similar, and you want b to be the same as a, you can create and apply a patch with:

$ diff -ur b a > ba.diff $ patch -i ba.diff

  1. Grab the sources with apt-get source wine and cd into the new directory
  2. Find what sort of patch system the wine package is based on: what-patch; in this case, it tells us we that the wine package uses quilt for patch management Since we're using quilt, add your custom patch(es) to the quilt series: QUILT_PATCHES=debian/patches quilt import <your-patchfile.patch> If you have multiple patches, do this for each patch, in the order that you want them applied.
  3. Add a suitable entry to the debian/changelog file - you'll need to alter the version number to ensure that your PPA version is differentiated from the official version. Typically, you should increment the last version number, and add a tilde (~) followed by your custom version string (eg ~jbowtie1). The dch -i command can help with this too.
  4. Build the source package: debuild -S -sa
  5. Upload your source package to the PPA build system: dput ppa: ../wine*.changes The parameter is specified on the launchpad page for the PPA you want to upload it to (you'll have to create this beforehand).

It's usually a good idea to do a test build before doing the dput - the pbuilder command allows you to recreate what the PPA build system would do with your package (ie, start from a clean install, add required deps, then build).

In this case you would have to set up pbuilder first (see https://wiki.ubuntu.com/PbuilderHowto), then do this before the dput:

sudo pbuilder build ../*.dsc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment