Applying patches to Debian pptpd

by Louis Savarese and James Cameron

How to install pptpd on Debian is described in Debian pptpd HOWTO. Given a patch to pptpd, how do you rebuild Debian pptpd as a package?

  1. be in an appropriate working directory;


  2. ensure your /etc/apt/sources.list has deb-src lines,

  3. get the source to the package;

    apt-get source pptpd

  4. get and install the packages required to rebuild the package;

    apt-get build-dep pptpd

  5. get and install Debian packaging utilities;

    apt-get install devscripts build-essential fakeroot

  6. change to the directory containing the unpacked source;

    cd pptpd-1.2.1

  7. download the patch to this directory;

    wget [...]pptpd-1.2.3-loopback.patch

  8. apply the patch;

    patch < pptpd-1.2.3-loopback.patch

  9. change the package version;

    dch --newversion 1.2.1-4.0 add loopback patch

  10. build the package;

    debuild -us -uc

    Note: this builds a .deb file and places it in the parent directory. You can adjust which flags are passed to the configure script by looking at the file debian/rules.

  11. install the package;

    dpkg --install ../pptpd_1.2.1-4.0_i386.deb

(Derived from a post by Louis which was a follow up to a post by James.)


If you have comments on this document, please send them to the author at quozl at laptop dot org. But if you need help, use the mailing list (subscribe, archives) so that we can share the load.


2005-08-08 First draft, from mailing list.