6

I'm looking for the best way to maintain a patched version of an upstream ubuntu package. Here's the situation:

We have our own server running reprepro, which would host the modified package. Our other packages are managed using git and the git packaging tools (git-dch, git-buildpackage).

I have the .diff file that contains the patch to the upstream source, which I've applied before by doing apt-get source pkgname, applying it and running debuild. I'd like to track it properly this time using git.

What's the best process for managing this?

1

2 Answers 2

2

I'd suggest something a little different than Flimzy. Take a look at git-import-dsc and possibly git-debimport. They will auto-magically create separate upstream, debian, and prinstine-tar branches from at Debian source package. You could then create your own branch for your patch set. Each time a new upload to Ubuntu is made, you can just run git-import-dsc on the new package and merge with your branch.

Even simpler would be to use bzr if you are not wed to git. Each Ubuntu package can also be found in a bzr branch. bzr branch ubuntu:$PACKAGE_NAME will grab the source branch for you. Make your changes and commit. Then when ever a new Ubuntu upload is made, you can simply run bzr merge-package ubuntu:$PACKAGE_NAME

1

I hope I'm understanding your question fully...

Here's how I do it:

  1. Place the *.orig.tar.gz *.diff.gz and *.dsc files in a directory aptly named for your package
  2. Unpack the source (dpkg-source -x *.dsc). You'll now have three files and one sub-directory
  3. Commit this to your RCS (commit A)
  4. Apply your changes, and commit to your RCS (Commit B)
  5. Make any future changes, and commit (Commit N)

When a new upstream version comes out:

  1. Create a diff between Commit A and Commit N
  2. Repeat steps 1-3 above
  3. Apply your diff (created in step 1), and commit (new Commit A)
  4. Make any future changes and commit (Commit N)

Rinse, repeat.

1
  • Hm, that seems reasonable. I'll give that a try.
    – Daenyth
    Jun 18, 2011 at 12:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .