You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Joe Schaefer <jo...@sunstarsys.com> on 2005/02/01 09:19:20 UTC
[PATCH] Re: apr-related ABI issues for apreq2 packagers
Joe Schaefer <jo...@sunstarsys.com> writes:
> Max Kellermann <ma...@duempel.org> writes:
[...]
>> But we shouldn't just make a "recommendation" of this case,
>> we should hard code our decision (whatever of the two it may be)
>> in our build scripts. Everything else endangers binary
>> compatibility between different distributions.
>
> That's the core issue: should *we* tinker with our major number
> based on apr's ABI, or should we always leave it "2"? IMO
> we should always leave ours at "2", no matter which apr version
> a user links us against.
Here's a patch which splits the difference by bumping our generated
so's major number based on the apr major version. This should cover
the ABI issues, so installing libapreq2 into a system-wide directory
won't cause a conflict when different apr ABIs are present.
I'd like to commit this patch to trunk, but first am looking
for feedback on the general concept.
- echo ${ltmaj}:${patch}:${minor}
+elif test "$1" = "minor"; then
+ echo ${minor}
+elif test "$1" = "patch"; then
+ echo ${patch}
else
echo "ERROR: unknown version CMD ($1)"
exit 1
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 125283)
+++ acinclude.m4 (working copy)
@@ -53,7 +53,7 @@
APACHE2_INCLUDES=-I`$APACHE2_APXS -q INCLUDEDIR`
APR_MAJOR_VERSION=`$APACHE2_APXS -q APR_VERSION 2>/dev/null | cut -d. -f 1`
- if test ${APR_MAJOR_VERSION:=0} -eq 0; then
+ if test ${APR_MAJOR_VERSION:="0"} -eq 0; then
apr_config=apr-config
apu_config=apu-config
else
@@ -168,10 +168,20 @@
get_version="$abs_srcdir/build/get-version.sh"
version_hdr="$abs_srcdir/src/apreq_version.h"
- APREQ_LIBTOOL_VERSION=`$get_version libtool $version_hdr APREQ`
+ # set version data
+
APREQ_MAJOR_VERSION=`$get_version major $version_hdr APREQ`
- APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+ APREQ_MINOR_VERSION=`$get_version minor $version_hdr APREQ`
+ APREQ_PATCH_VERSION=`$get_version patch $version_hdr APREQ`
+ APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+ # XXX: APR_MAJOR_VERSION doesn't yet work for static builds
+ APREQ_LIBTOOL_CURRENT=`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION`
+ APREQ_LIBTOOL_REVISION=$APREQ_PATCH_VERSION
+ APREQ_LIBTOOL_AGE=$APREQ_MINOR_VERSION
+
+ APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE"
+
APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION"
APREQ_INCLUDES=""
APREQ_LDFLAGS=""
--
Joe Schaefer
Re: [PATCH] Re: apr-related ABI issues for apreq2 packagers
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Joe Schaefer <jo...@sunstarsys.com> writes:
[...]
> I'd like to commit this patch to trunk, but first am looking
> for feedback on the general concept.
Oops, looks like some of the build/get-version.sh
sections of the patch are missing. I'm not sure how
that happened. Here's the full patch again; sorry
for the inconvenience.
Index: build/get-version.sh
===================================================================
--- build/get-version.sh (revision 125283)
+++ build/get-version.sh (working copy)
@@ -8,12 +8,13 @@
#
# get-version.sh all returns a dotted version number
# get-version.sh major returns just the major version number
-# get-version.sh libtool returns a version "libtool -version-info" format
+# get-version.sh minor returns just the minor version number
+# get-version.sh patch returns just the match version number
#
if test $# != 3; then
echo "USAGE: $0 CMD INCLUDEDIR PREFIX"
- echo " where CMD is one of: all, major, libtool"
+ echo " where CMD is one of: all, major, minor, patch"
exit 1
fi
@@ -23,14 +24,15 @@
major="`sed -n $major_sed $2`"
minor="`sed -n $minor_sed $2`"
patch="`sed -n $patch_sed $2`"
-ltmaj="`expr $major + $minor`"
if test "$1" = "all"; then
echo ${major}.${minor}.${patch}
elif test "$1" = "major"; then
echo ${major}
-elif test "$1" = "libtool"; then
- echo ${ltmaj}:${patch}:${minor}
+elif test "$1" = "minor"; then
+ echo ${minor}
+elif test "$1" = "patch"; then
+ echo ${patch}
else
echo "ERROR: unknown version CMD ($1)"
exit 1
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 125283)
+++ acinclude.m4 (working copy)
@@ -53,7 +53,7 @@
APACHE2_INCLUDES=-I`$APACHE2_APXS -q INCLUDEDIR`
APR_MAJOR_VERSION=`$APACHE2_APXS -q APR_VERSION 2>/dev/null | cut -d. -f 1`
- if test ${APR_MAJOR_VERSION:=0} -eq 0; then
+ if test ${APR_MAJOR_VERSION:="0"} -eq 0; then
apr_config=apr-config
apu_config=apu-config
else
@@ -168,10 +168,20 @@
get_version="$abs_srcdir/build/get-version.sh"
version_hdr="$abs_srcdir/src/apreq_version.h"
- APREQ_LIBTOOL_VERSION=`$get_version libtool $version_hdr APREQ`
+ # set version data
+
APREQ_MAJOR_VERSION=`$get_version major $version_hdr APREQ`
- APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+ APREQ_MINOR_VERSION=`$get_version minor $version_hdr APREQ`
+ APREQ_PATCH_VERSION=`$get_version patch $version_hdr APREQ`
+ APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+ # XXX: APR_MAJOR_VERSION doesn't yet work for static builds
+ APREQ_LIBTOOL_CURRENT=`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION`
+ APREQ_LIBTOOL_REVISION=$APREQ_PATCH_VERSION
+ APREQ_LIBTOOL_AGE=$APREQ_MINOR_VERSION
+
+ APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE"
+
APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION"
APREQ_INCLUDES=""
APREQ_LDFLAGS=""
--
Joe Schaefer