httpd: source RPM build error regarding MMN

The Problem:  There’s a bug in the httpd.spec file of certain releases of the Apache httpd server source RPM.  This definitely affects recent versions of Fedora, and perhaps other Redhat-based Linux distros.

You may encounter this if you find yourself in the unfortunate position of having to re-build the httpd RPM from source. For example, perhaps you are trying to get Virtualmin to work and need to rebuild Apache with the “suexec_docroot” option set to the /home directory (NOTE: to do so, edit the httpd.spec file as follows: %define contentdir /home).

Anyway, the bug in this case is related to a safety check performed to ensure that you have the correct value set for the Apache module magic number (MMN) in the httpd.spec file.  When you try to build the new httpd RPMs with rpmbuild -bb httpd.spec, you’ll get an error message containing some text like this:

: Error: Upstream MMN is now , packaged MMN is 20051115
: Update the mmn macro and rebuild.

The error will cause the RPM build process to fail, but chances are that the problem is due to bad “safety check” code in httpd.spec rather than an actual bad setting for the MMN parameter.

Solution: To get past this problem, you simply need to comment out the safety check part of the httpd.spec file, so it looks something like this:

# Safety check: prevent build if defined MMN does not equal upstream MMN.
#vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include include/ap_mmn.h | sed -n ‘/^2/p’`
#if test “x${vmmn}” != “x%{mmn}”; then
#   : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}
#   : Update the mmn macro and rebuild.
#   exit 1

Just make sure that you do indeed have the correct value set for the MMN at the top of the file, in this line:

%define mmn 20051115

Note that the above value is for Apache version 2.2.19.  You can find the complete table of valid MMN values in the BUILD/httpd-VERSION/include/ap_mmn.h file from your source RPM, where VERSION is the httpd version number you’re building.

To Learn More:

This entry was posted in Apache Web Server. Bookmark the permalink.

Leave a Reply