Patching debian packages

While upgrading my server, I had to create a new version of Cyrus-SASL packages with the crypt patch. This turned out to be more difficult as I thought as just patching the raw source would conflict with debian patches applied after that and the package building would fail. Fortunately, I learned about (dpatch)[http://www.tuxmaniac.com/blog/2008/01/25/dpatch-just-superb-a-short-how-to/], which is a standard mechanism for patching stuff in Debian.

Once I figured out how to do it, it tunred out to be very simple:

  1. Unpack the original orig.tar.gz
  2. Apply the Debian diff (this would create a debian subdirectory)
  3. Edit changelog file to add a new release (so that we can keep track of it).
  4. Run dpatch-edit-patch fixing_foo to create a patch. This will create a shell with mounted source package and any changes you make there will be included in the diff.
  5. Exit the shell without changing anything. You will change things after making sure that the patch is applied in the correct order.
  6. Edit 00list to set the patch ordering.
  7. Run dpatch-edit-patch again now, with all the previous patches applied.
  8. Make the necessary changes.
  9. Build the target package with debuild-pbuilder (this will download all the dependencies too).
  10. Install the pakcages with dpkg -i (I could also create my private apt-repository for this. I wrote about in in a blog entry about pbuilder).
  11. Pin the packages so that they will not get upgraded echo "package hold" | dpkg --set-selection

11 Responses to “Patching debian packages”

  1. sohbet Says:

    sohbetin tatli mekani

  2. chat Says:

    chat odalarımızda sizlerle el ele

  3. netlog Says:

    netlog odalarımızda sizlerle el ele

  4. sohbet Says:

    sohbet odalarimiz

  5. CHAT Says:

    CHA odalarimiz

  6. NETLOK Says:

    NETLOK NEDİR?

  7. dini sohbet Says:

    islam dini hakında konuşalım

  8. mario oyunları Says:

    thanks

  9. kral oyun Says:

    Thanks. Kral OYUN

  10. chat Says:

    thanks so much admin

  11. sohbet Says:

    Thank You admin nice Post

Leave a Reply