Jul 16 2004

Recompiling Apache 2.0 on Fedora

Published by Chris McAvoy at 3:54 am under Blog

I recently ran into a problem with how Fedora compiled suexec in their httpd package. I had to learn how to rebuild Apache from the SRPM, it was a pretty interesting process. I’m not sure if it saves a whole lot of time over compiling from source, but it keeps better in line with the rpm philosophy.

First, I downloaded the source rpm:

  1. apt-get source httpd

This installed the source package in /usr/src/redhat/SOURCES. I uncompressed the source, and edited the httpd.spec file in the httpd source directory as follows:

—with-suexec-docroot=/home \

The intent is to change the root filesystem that suexec expects, so that I can turn on suexec for any of the web directories under /home.

I also had to change line 20, to change the prereq from db3-devel to db4-devel. I’m not sure if that’s a bug in the spec.

Then I ran # rpmbuild -bb httpd.spec which should have created the rpm, but ended up throwing the following error:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/httpd-root
error: Installed (but unpackaged) file(s) found:
/usr/lib/httpd/build/config.nice
/usr/lib/libapr-0.a
/usr/lib/libapr-0.la
/usr/lib/libaprutil-0.a
/usr/lib/libaprutil-0.la
/usr/share/man/man8/apachectl.8.gz
/usr/share/man/man8/httpd.8.gz
/var/www/error/README

RPM build errors:
File listed twice: /etc/httpd/conf/ssl.conf
Installed (but unpackaged) file(s) found:
/usr/lib/httpd/build/config.nice
/usr/lib/libapr-0.a
/usr/lib/libapr-0.la
/usr/lib/libaprutil-0.a
/usr/lib/libaprutil-0.la
/usr/share/man/man8/apachectl.8.gz
/usr/share/man/man8/httpd.8.gz
/var/www/error/README

I’m not sure where to go from here, so I’m posting a message to LUNI (Linux Users of Northern Illinois) looking for help. We’ll see. If anyone (actually reads this weblog) knows what’s up, drop me an email at chris at wirelion dot com. I’d really appreciate any help.


Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • del.icio.us
  • digg
  • Reddit
  • StumbleUpon

Trackback URI | Comments RSS

Leave a Reply