You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Tim Moloney <mo...@mrsl.com> on 2002/10/30 22:10:06 UTC

Changing mmn in Apache

I'm trying to build an httpd 2.0.43 RPM that is a drop in replacement
for the httpd RPM that comes with Red Hat 8.0.  The problem with all
of the RPMs I've seen so far (including my own) are that many modules
generate the following error message.

   httpd: module "mod_XXX.c" is not compatible with this version of
   Apache (found 20020628, need 20020903).

Rather than rebuild all the Apache module RPMs, I think that I can
take a short-cut.  I think that I can just change the value of mmn
from 20020903 to 20020628 during the build of the httpd 2.0.43 RPM.

I think this will work because
- the only documented changes from 20020628 to 20020903 are changes
   to the APR error constants
- the only dependencies on APR that I know of are Subversion (which
   needs the new error codes, hence 2.0.43) and mod_perl (which I'll
   remove)

Will this work or am I about to shoot myself in the foot?

-- 
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Mon, Nov 04, 2002 at 11:40:03AM -0500, Tim Moloney wrote:
> Joe Orton wrote:
> 
> >If you're building 2.0.43, you should change the "%define mmn xxxx" at
> >the top of httpd.spec to use the new MMN number, so that this
> >incompatiblity is reflected in the package dependencies.  Any Apache 2.0
> >module packages designed to work with the Red Hat Linux 8.0 httpd
> >package should have a line like:
> >
> >Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn)
> >
> >so that they pick up a dependency on the module ABI version.
> 
> Yes, you're right.  Doing this would catch the incompatibility
> at installation time rather than at runtime.  Since Greg Stein
> has convinced me that my short-cut is a bad idea, I will
> definitely do this and rebuild the RPMs for the modules I need.
> Thanks for the reminder.

Great. I've added a check to our %pre which checks that %mmn matches the
value from the actual sources, to avoid this kind of thing in the
future:

# Safety check: prevent build if defined MMN does not equal upstream
vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -v '#'`
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
fi


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by Tim Moloney <mo...@mrsl.com>.
Joe Orton wrote:

> If you're building 2.0.43, you should change the "%define mmn xxxx" at
> the top of httpd.spec to use the new MMN number, so that this
> incompatiblity is reflected in the package dependencies.  Any Apache 2.0
> module packages designed to work with the Red Hat Linux 8.0 httpd
> package should have a line like:
> 
> Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn)
> 
> so that they pick up a dependency on the module ABI version.

Yes, you're right.  Doing this would catch the incompatibility
at installation time rather than at runtime.  Since Greg Stein
has convinced me that my short-cut is a bad idea, I will
definitely do this and rebuild the RPMs for the modules I need.
Thanks for the reminder.

-- 
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Wed, Oct 30, 2002 at 05:10:06PM -0500, Tim Moloney wrote:
> I'm trying to build an httpd 2.0.43 RPM that is a drop in replacement
> for the httpd RPM that comes with Red Hat 8.0.  The problem with all
> of the RPMs I've seen so far (including my own) are that many modules
> generate the following error message.
> 
>   httpd: module "mod_XXX.c" is not compatible with this version of
>   Apache (found 20020628, need 20020903).

If you're building 2.0.43, you should change the "%define mmn xxxx" at
the top of httpd.spec to use the new MMN number, so that this
incompatiblity is reflected in the package dependencies.  Any Apache 2.0
module packages designed to work with the Red Hat Linux 8.0 httpd
package should have a line like:

Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn)

so that they pick up a dependency on the module ABI version.

Regards,

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by "Edward S. Marshall" <es...@logic.net>.
On Wed, 2002-10-30 at 16:10, Tim Moloney wrote:
> Rather than rebuild all the Apache module RPMs, I think that I can
> take a short-cut.  I think that I can just change the value of mmn
> from 20020903 to 20020628 during the build of the httpd 2.0.43 RPM.

I rebuilt the add-ons I needed, but that's just because I'm a masochist
like that. ;-) You might want to ask this question on the httpd dev
list, they're more likely to know the specifics of what changed (despite
the changelog, I'd hope they wouldn't have bumped the mmn for anything
less than a binary-incompatible change...)

You might want to make sure you add /usr/lib/httpd/build/instdso.sh,
/usr/bin/apr-config, and /usr/bin/apu-config to the manifest when you
rebuild. There's actually an couple of open bugzilla entries for that
over at RH:

    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=73428
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74951

-- 
Edward S. Marshall <es...@logic.net>
http://esm.logic.net/

Re: Changing mmn in Apache

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Oct 31, 2002 at 11:01:29AM -0500, Tim Moloney wrote:
> Greg Stein wrote:
> > On Wed, Oct 30, 2002 at 05:10:06PM -0500, Tim Moloney wrote:
>...
> >>Rather than rebuild all the Apache module RPMs, I think that I can
> >>take a short-cut.  I think that I can just change the value of mmn
> >>from 20020903 to 20020628 during the build of the httpd 2.0.43 RPM.
> >>...
> >>Will this work or am I about to shoot myself in the foot?
> > 
> > No, it won't work. Those (compiled) modules were built against a different
> > set of error constants than your 2.0.43 apache.
> 
> I checked all the modules for libapr/libaprutil usage via
> 'ldd *.so | grep apr' and found no hits.

That is because Apache does not link apr(util) into the modules. But the
modules *do* use apr(util). Since there is no link dependency, that just
means that the process (Apache) must load the libraries itself. As a
comparison, SVN links apr(util) into its libraries and into mod_dav_svn.
Thus, apr(util) will get loaded when the library/module is loaded,
regardless of whether the app loads apr(util). This is verify important for
things like the SWIG bindings where Python is definitely not going to be
loading apr(util).

> I know that the error
> contants are in a header file and not the library.  Do the modules
> use the APR constants without actually using the libraries?

They use the constants and the libraries. The ldd output just doesn't tell
the whole story.

> For what it's worth, I've created the new httpd RPM with the modified
> mmn.  My limited testing (SSL, PHP) hasn't blown up in my face yet.

They're error constants. You won't see problems until certain types of
errors occur. And then things will definitely not work right.

It may appear to be working, but you're fooling yourself :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by Tim Moloney <mo...@mrsl.com>.
Greg Stein wrote:
> On Wed, Oct 30, 2002 at 05:10:06PM -0500, Tim Moloney wrote:
> 
>>I'm trying to build an httpd 2.0.43 RPM that is a drop in replacement
>>for the httpd RPM that comes with Red Hat 8.0.  The problem with all
>>of the RPMs I've seen so far (including my own) are that many modules
>>generate the following error message.
>>
>>   httpd: module "mod_XXX.c" is not compatible with this version of
>>   Apache (found 20020628, need 20020903).
>>
>>Rather than rebuild all the Apache module RPMs, I think that I can
>>take a short-cut.  I think that I can just change the value of mmn
>>from 20020903 to 20020628 during the build of the httpd 2.0.43 RPM.
>>...
>>Will this work or am I about to shoot myself in the foot?
> 
> No, it won't work. Those (compiled) modules were built against a different
> set of error constants than your 2.0.43 apache.

I checked all the modules for libapr/libaprutil usage via
'ldd *.so | grep apr' and found no hits.  I know that the error
contants are in a header file and not the library.  Do the modules
use the APR constants without actually using the libraries?

For what it's worth, I've created the new httpd RPM with the modified
mmn.  My limited testing (SSL, PHP) hasn't blown up in my face yet.

-- 
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Changing mmn in Apache

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Oct 30, 2002 at 05:10:06PM -0500, Tim Moloney wrote:
> I'm trying to build an httpd 2.0.43 RPM that is a drop in replacement
> for the httpd RPM that comes with Red Hat 8.0.  The problem with all
> of the RPMs I've seen so far (including my own) are that many modules
> generate the following error message.
> 
>    httpd: module "mod_XXX.c" is not compatible with this version of
>    Apache (found 20020628, need 20020903).
> 
> Rather than rebuild all the Apache module RPMs, I think that I can
> take a short-cut.  I think that I can just change the value of mmn
> from 20020903 to 20020628 during the build of the httpd 2.0.43 RPM.
>...
> Will this work or am I about to shoot myself in the foot?

No, it won't work. Those (compiled) modules were built against a different
set of error constants than your 2.0.43 apache.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org