[nzlug] Modifying DEB packages

Craig Box craig at dubculture.co.nz
Tue Jul 18 15:14:55 NZST 2006


> How do I do this for Debian and Ubuntu? I did "apt-get source openssl"
> and ended up with unpacked pre-patched openssl source tree. I can
> indeed patch the source tree with my patch and "debuild" it. But this
> way noone else will be able to take the source from me and eventually
> disable the patch again. Actually the ../openssl-...diff.gz isn't
> even created at all, only the modified tree has been packed to
> openssl_0.9.8a-7build1.tar.gz     
> 
> Is there some other cleaner way than directly patching the tree? Best
> if it's something similar to RPM where each patch remains in its own
> .diff file, is distributed this way and could be enabled / disabled
> by anyone wanting to rebuilt the package.   

See http://www.debian.org/doc/maint-guide/ch-build.en.html#s-dpatch,
http://www.debian.org/doc/maint-guide/ap-pkg-eg.en.html#s-pkg-dpatch and
http://www.debian-administration.org/articles/253.

Basically, the method is to drop your patch in the debian/patches directory,
update the list file in that directory, and make sure the 'rules' file has a
section for using dpatch.  OpenSSL on Dapper does not seem to come with any
patches included, but it is quite common in Debian packages.

Craig





More information about the NZLUG mailing list