Steps for applying a patch to the Apache source tree and building a Debian package of the patched Apache in order to install via apt as normal.
- Download the source package and build dependencies:
- Apply the patch to the source:
- Build the debian package:
- List the currently installed apache2 packages:
- Install the appropriate newly built packages (all the packages listed in the previous step) and restart apache:
apt-get source apache2 apt-get build-dep apache2
cd apache2-2.2.9/ patch -p1 < patchfile
dpkg-buildpackage -uc -us -b
dpkg -l | egrep '^i+ +apache2'
cd .. dpkg -i apache2_2.2.9-10+lenny2_all.deb dpkg -i apache2-mpm-prefork_2.2.9-10+lenny2_amd64.deb dpkg -i apache2-prefork-dev_2.2.9-10+lenny2_amd64.deb dpkg -i apache2-utils_2.2.9-10+lenny2_amd64.deb dpkg -i apache2.2-common_2.2.9-10+lenny2_amd64.deb apache2ctl restart
Simples!
2 Comments
You didn’t write anything about the patchfile. Where to get it? How do we know we can patch the Debian source with it?
The patchfile is whatever patch you want to apply to Apache, I was merely explaining how to apply such a patch in a Debian environment – which patchfile(s) you use depends why you need to patch Apache. If you don’t have a specific patch you need then you should be fine with the standard Debian install.
One Trackback
[…] Source: https://base6.com/2009/06/07/patching-apache-on-debian/ […]