You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by gs...@apache.org on 2002/08/14 19:15:15 UTC
cvs commit: apr/test Makefile.in
gstein 2002/08/14 10:15:15
Modified: . .cvsignore CHANGES Makefile.in apr-config.in
configure.in
test Makefile.in
Added: build get-version.sh
Removed: . APRVARS.in
Log:
Various changes to clean up APR for a release.
* Add a version number to the library name to support parallel
installation.
See: http://www106.pair.com/rhp/parallel.html
(assuming the app uses apr-config to fetch linking information, then
users should not have anything to change)
* Get rid of APRVARS. Apps should be using apr-config by now.
* Add --version to apr-config so that apps can see what they're
building against.
Revision Changes Path
1.15 +0 -1 apr/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/apr/.cvsignore,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- .cvsignore 29 Jun 2002 07:39:12 -0000 1.14
+++ .cvsignore 14 Aug 2002 17:15:15 -0000 1.15
@@ -5,7 +5,6 @@
config.status
configure
libtool
-APRVARS
apr-config
LibD
LibR
1.319 +9 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -r1.318 -r1.319
--- CHANGES 13 Aug 2002 17:30:06 -0000 1.318
+++ CHANGES 14 Aug 2002 17:15:15 -0000 1.319
@@ -1,5 +1,14 @@
Changes with APR b1
+ *) Add a version number to the library name (e.g. libapr-1.so) so
+ that apps can do things like: -lapr-1 or -lapr-2, depending on
+ which version they want to use and link against.
+
+ *) Add --version to apr-config so that apps can retrieve the version
+ information of the (installed) APR. [Greg Stein]
+
+ *) Remove the APRVARS system; apps should use apr-config. [Greg Stein]
+
*) EBCDIC: fix compile failure in strings/apr_strings.c in
httpd-2.0.40 with the following error message:
CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported
1.81 +3 -4 apr/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/apr/Makefile.in,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- Makefile.in 1 Aug 2002 05:23:18 -0000 1.80
+++ Makefile.in 14 Aug 2002 17:15:15 -0000 1.81
@@ -17,7 +17,7 @@
CLEAN_SUBDIRS= . test build
INSTALL_SUBDIRS=@INSTALL_SUBDIRS@
-TARGET_LIB = libapr.la
+TARGET_LIB = @APR_LIBNAME@.la
#
# Rules for building specific targets, starting with 'all' for
@@ -31,7 +31,7 @@
CLEAN_TARGETS =
DISTCLEAN_TARGETS = config.cache config.log config.status \
include/apr.h include/arch/unix/apr_private.h \
- APRVARS libtool apr.exp apr-config
+ libtool apr.exp apr-config
EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in \
exports.c export_vars.h
@@ -71,7 +71,6 @@
$(top_srcdir)/build/mkdir.sh $(DESTDIR)$(libdir); \
fi;
$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(DESTDIR)$(libdir)
- $(LIBTOOL) --mode=install cp APRVARS $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install cp apr.exp $(DESTDIR)$(libdir)
if [ ! -d $(DESTDIR)$(installbuilddir) ]; then \
$(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir); \
@@ -116,7 +115,7 @@
$(AWK) -f $(top_srcdir)/build/make_var_export.awk $(EXPORT_FILES) > $@
apr.exp: exports.c export_vars.h
- @echo "#! libapr.so" > $@
+ @echo "#! @APR_LIBNAME@.so" > $@
@echo "* This file was AUTOGENERATED at build time." >> $@
@echo "* Please do not edit by hand." >> $@
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
1.21 +9 -3 apr/apr-config.in
Index: apr-config.in
===================================================================
RCS file: /home/cvs/apr/apr-config.in,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- apr-config.in 14 Aug 2002 04:35:19 -0000 1.20
+++ apr-config.in 14 Aug 2002 17:15:15 -0000 1.21
@@ -75,6 +75,8 @@
APR_SOURCE_DIR="@apr_srcdir@"
APR_SO_EXT="@so_ext@"
APR_LIB_TARGET="@export_lib_target@"
+APR_DOTTED_VERSION="@APR_DOTTED_VERSION@"
+APR_LIBNAME="@APR_LIBNAME@"
show_usage()
{
@@ -96,6 +98,7 @@
--apr-so-ext print the extensions of shared objects on this platform
--apr-lib-target print the libtool target information
--apr-libtool print the path to APR's libtool
+ --version print the APR's version as a dotted triple
--help print this help
When linking with libtool, an application should do something like:
@@ -106,7 +109,6 @@
An application should use the results of --cflags, --cppflags, --includes,
and --ldflags in their build process.
EOF
-#' close a quote from above to make emacs happy
}
if test $# -eq 0; then
@@ -130,9 +132,9 @@
fi
if test "$location" = "installed"; then
- LA_FILE="$libdir/libapr.la"
+ LA_FILE="$libdir/${APR_LIBNAME}.la"
else
- LA_FILE="$thisdir/libapr.la"
+ LA_FILE="$thisdir/${APR_LIBNAME}.la"
fi
flags=""
@@ -176,6 +178,10 @@
;;
--srcdir)
echo $APR_SOURCE_DIR
+ exit 0
+ ;;
+ --version)
+ echo $APR_DOTTED_VERSION
exit 0
;;
--link-ld)
1.475 +14 -2 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.474
retrieving revision 1.475
diff -u -r1.474 -r1.475
--- configure.in 5 Aug 2002 09:28:24 -0000 1.474
+++ configure.in 14 Aug 2002 17:15:15 -0000 1.475
@@ -102,7 +102,20 @@
AC_MINIX
APR_EBCDIC
-
+
+dnl get our version information
+APR_MAJOR_VERSION="`$apr_builders/get-version.sh major $apr_srcdir/include`"
+APR_DOTTED_VERSION="`$apr_builders/get-version.sh all $apr_srcdir/include`"
+
+dnl this one will go into apr-config.in
+AC_SUBST(APR_DOTTED_VERSION)
+
+echo "APR Version: ${APR_DOTTED_VERSION}"
+
+dnl this is our library name
+APR_LIBNAME="libapr-${APR_MAJOR_VERSION}"
+AC_SUBST(APR_LIBNAME)
+
dnl prep libtool
dnl
echo "performing libtool configuration..."
@@ -1830,7 +1843,6 @@
AC_OUTPUT([
$MAKEFILE1 $MAKEFILE2 $MAKEFILE3
include/apr.h
- APRVARS
build/rules.mk
apr-config
],[
1.1 apr/build/get-version.sh
Index: get-version.sh
===================================================================
#!/bin/sh
#
# extract version numbers from the apr_version.h header file
#
# USAGE: get-version.sh CMD INCLUDEDIR
# where CMD is one of: all, major
#
# get-version.sh all returns a dotted version number
# get-version.sh major returns just the major version number
#
if test $# != 2; then
echo "USAGE: $0 CMD INCLUDEDIR"
echo " where CMD is one of: all, major"
exit 1
fi
versfile=${2}/apr_version.h
major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
minor="`sed -n '/#define.*APR_MINOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
patch="`sed -n '/#define.*APR_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
if test "$1" = "all"; then
echo ${major}.${minor}.${patch}
elif test "$1" = "major"; then
echo ${major}
else
echo "ERROR: unknown version CMD"
exit 1
fi
1.88 +1 -1 apr/test/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/apr/test/Makefile.in,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- Makefile.in 17 Jul 2002 04:11:33 -0000 1.87
+++ Makefile.in 14 Aug 2002 17:15:15 -0000 1.88
@@ -52,7 +52,7 @@
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
-LOCAL_LIBS=../libapr.la
+LOCAL_LIBS=../@APR_LIBNAME@.la
CLEAN_TARGETS = testfile.tmp testdso@EXEEXT@ mod_test.slo
Re: cvs commit: apr/test Makefile.in
Posted by Gregory Nicholls <gn...@bellsouth.net>.
Justin Erenkrantz wrote:
> My concern is that this is attempting to enforce a versioning
> scheme that isn't what everyone uses. It's what you would use
> if you use /usr and want to support multiple versions installed at
> the same time. Greg's commit locks everyone into this model, and the
> more I think about it, I think that is harmful.
It's also useful if you're installing multiple apr-based packages that may have
been built with different versions. It may not be useful for an apr developer
but I think it's a Good Thing(tm) for end users.
G.
--
<vidi, vici, veni>
Re: cvs commit: apr/test Makefile.in
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 09:27:11PM +0100, Thom May wrote:
> * Greg Stein (gstein@lyra.org) wrote :
> > On Wed, Aug 14, 2002 at 12:11:05PM -0700, Justin Erenkrantz wrote:
>...
> > > If APR supported config.layout (easy enough to add), a layout
> > > could have:
> >
> > I would totally support adding such a notion, along with the
> > ${major_version} example that you provided.
>
> This is really easy to do - the debian packages were doing exactly that for
> a long time. I can resurrect that patch and apply it this evening if people
> think it's a positive step?
Yes. Go for it.
>...
> For sure. the layout stuff is defined as an autoconf macro, so svn would
> just need to sinclude apr_layout.m4 or whatever, and then call the macro.
> We would, I guess, update httpd so we just had one canonical
> APR_LAYOUT implementation.
Apache has a lot more variables than APR has. For example: htdocs, icons,
cgi... Does your system handle that?
Back to the pragmatic: if you have an apr-only layout handler... fine. If it
works for both, well cool.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apr/test Makefile.in
Posted by Thom May <th...@planetarytramp.net>.
* Greg Stein (gstein@lyra.org) wrote :
> On Wed, Aug 14, 2002 at 12:11:05PM -0700, Justin Erenkrantz wrote:
> >...
> > My concern is that this is attempting to enforce a versioning
> > scheme that isn't what everyone uses. It's what you would use
> > if you use /usr and want to support multiple versions installed at
> > the same time. Greg's commit locks everyone into this model, and the
> > more I think about it, I think that is harmful.
>
> It is an improvement on our existing situation. In that sense, it is not
> harmful. The previous situation was hella more harmful.
>
Definitely agreed.
> >...
> > If APR supported config.layout (easy enough to add), a layout
> > could have:
>
> I would totally support adding such a notion, along with the
> ${major_version} example that you provided.
>
This is really easy to do - the debian packages were doing exactly that for
a long time. I can resurrect that patch and apply it this evening if people
think it's a positive step?
> Note that I won't hold 0.9.0 for that, though. :-) IMO, if the more
> flexible installation appears in 0.9.1 ... we're still doing fine by our
> users.
>
> Do you suppose that the layout processing could be app-independent? For
> example, APR provides the functionality, and APR, httpd, and SVN could all
> use it?
>
> [ I'm not trying to add work; if you do an APR-only solution, I'm still fine
> with that... just another add'l feature ]
For sure. the layout stuff is defined as an autoconf macro, so svn would
just need to sinclude apr_layout.m4 or whatever, and then call the macro.
We would, I guess, update httpd so we just had one canonical
APR_LAYOUT implementation.
-Thom
>
--
Thom May -> thom@planetarytramp.net
* moshez tries to understand why in god's name /usr is symlinked to / on the hurd
<vorlon-work> moshez: the same reason that /body/head is symlinked to /body/ass in some Hurd developers?
<vorlon-work> No, that's unkind. /usr -> / makes more sense than the anatomy of said developers.
Re: cvs commit: apr/test Makefile.in
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 12:11:05PM -0700, Justin Erenkrantz wrote:
>...
> My concern is that this is attempting to enforce a versioning
> scheme that isn't what everyone uses. It's what you would use
> if you use /usr and want to support multiple versions installed at
> the same time. Greg's commit locks everyone into this model, and the
> more I think about it, I think that is harmful.
It is an improvement on our existing situation. In that sense, it is not
harmful. The previous situation was hella more harmful.
>...
> If APR supported config.layout (easy enough to add), a layout
> could have:
I would totally support adding such a notion, along with the
${major_version} example that you provided.
Note that I won't hold 0.9.0 for that, though. :-) IMO, if the more
flexible installation appears in 0.9.1 ... we're still doing fine by our
users.
Do you suppose that the layout processing could be app-independent? For
example, APR provides the functionality, and APR, httpd, and SVN could all
use it?
[ I'm not trying to add work; if you do an APR-only solution, I'm still fine
with that... just another add'l feature ]
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apr/test Makefile.in
Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 14, 2002 at 07:41:09PM +0100, Thom May wrote:
> (with debian and apr hacker hats on)
> I think that Greg's proposal is a good thing; having the install scheme be
> consistent across distributions - because we're doing it rather than
> each distributor taking their own approach - is gonna make life easier for
> everyone.
> So, +1 to (both) Greg's proposals from here.
My concern is that this is attempting to enforce a versioning
scheme that isn't what everyone uses. It's what you would use
if you use /usr and want to support multiple versions installed at
the same time. Greg's commit locks everyone into this model, and the
more I think about it, I think that is harmful.
In my case, it's pointless as I already manage the versioning. And,
I would much prefer if we left this up to the distribution to handle
rather than trying to impose our views. If we allow this to be
managed by configure options, distros can customize it however they
want.
If APR supported config.layout (easy enough to add), a layout
could have:
<Layout parallel-apr>
prefix: /usr
exec_prefix: ${exec_prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib/apr-${major_version}
includedir: ${exec_prefix}/include/apr-${major_version}
libsuffix: -${major_version}
</Layout>
Add a substitution for major_version and add a libsuffix option.
And that allows distributions to implement this and people (or
distros) who don't want to, don't get needless clutter. -- justin
Re: cvs commit: apr/test Makefile.in
Posted by Thom May <th...@planetarytramp.net>.
* Justin Erenkrantz (jerenkrantz@apache.org) wrote :
> On Wed, Aug 14, 2002 at 10:46:33AM -0700, Greg Stein wrote:
> > I just wanted to hilite this change, in case people missed it. Our output
> > library now looks like: libapr-0.so
> >
> > (and when we release 1.x.y it will be libapr-1.so)
> >
> > If you've got problems or concerns or whatever with the change, then now is
> > the time :-)
> >
> > [ note: I also plan to shift the includes into INCLUDEDIR/apr-1/* ]
>
> My gut reaction is "Yuck" as I don't like this approach.
>
> To me, this is completely useless as I install each program in its
> own specific directory keyed off the entire version number, so apr
> would go to /pkg/apr-0.9.0/. Therefore, this scheme is only meant
> for people who install to /usr, which, IMHO, is a not-so-good idea.
>
> For those people packaging APR, the configure script options should
> be powerful enough to let them tweak all of the directories without
> us forcing this scheme upon them.
>
> But, I'm curious what others think. -- justin
(with debian and apr hacker hats on)
I think that Greg's proposal is a good thing; having the install scheme be
consistent across distributions - because we're doing it rather than
each distributor taking their own approach - is gonna make life easier for
everyone.
So, +1 to (both) Greg's proposals from here.
-Thom
--
Thom May -> thom@planetarytramp.net
> Personally, I quite like the little pictures they display when things are
> scanned. Just so you know what a zucchini looks like before you go
> throwing your money away on one.
"Oh shit! Is that zucchini? It said OREOS on the shelf!"
Re: cvs commit: apr/test Makefile.in
Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 14, 2002 at 10:46:33AM -0700, Greg Stein wrote:
> I just wanted to hilite this change, in case people missed it. Our output
> library now looks like: libapr-0.so
>
> (and when we release 1.x.y it will be libapr-1.so)
>
> If you've got problems or concerns or whatever with the change, then now is
> the time :-)
>
> [ note: I also plan to shift the includes into INCLUDEDIR/apr-1/* ]
My gut reaction is "Yuck" as I don't like this approach.
To me, this is completely useless as I install each program in its
own specific directory keyed off the entire version number, so apr
would go to /pkg/apr-0.9.0/. Therefore, this scheme is only meant
for people who install to /usr, which, IMHO, is a not-so-good idea.
For those people packaging APR, the configure script options should
be powerful enough to let them tweak all of the directories without
us forcing this scheme upon them.
But, I'm curious what others think. -- justin
Re: cvs commit: apr/test Makefile.in
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 10:53:29AM -0700, Brian Pane wrote:
> Greg Stein wrote:
>...
> >[ note: I also plan to shift the includes into INCLUDEDIR/apr-1/* ]
>
> Will it be INCLUDEDIR/apr-0/* until APR reaches 1.0?
Yes. Although, strictly speaking, I'm ambivalent on using "-1" (instead of
"-0") for the library and the include directory during the pre-1.0 releases.
[ I'd say that I'm -0 because we could break the API between now and the 1.0
release ]
The intent is that applications do the following:
$ gcc `apr-config --includes` ...
And in their C code:
#include <apr_strings.h>
The --includes switch will return: -I/usr/include/apr-0
Applications that want to get smarter can manually include specific
revisions if they wish (although if you have multiple APR's installed, then
you just use the right apr-config to get the right --includes result).
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apr/test Makefile.in
Posted by Brian Pane <br...@apache.org>.
Greg Stein wrote:
>I just wanted to hilite this change, in case people missed it. Our output
>library now looks like: libapr-0.so
>
>(and when we release 1.x.y it will be libapr-1.so)
>
>If you've got problems or concerns or whatever with the change, then now is
>the time :-)
>
>[ note: I also plan to shift the includes into INCLUDEDIR/apr-1/* ]
>
Will it be INCLUDEDIR/apr-0/* until APR reaches 1.0?
Brian
Re: cvs commit: apr/test Makefile.in
Posted by Greg Stein <gs...@lyra.org>.
I just wanted to hilite this change, in case people missed it. Our output
library now looks like: libapr-0.so
(and when we release 1.x.y it will be libapr-1.so)
If you've got problems or concerns or whatever with the change, then now is
the time :-)
[ note: I also plan to shift the includes into INCLUDEDIR/apr-1/* ]
Cheers,
-g
On Wed, Aug 14, 2002 at 05:15:15PM -0000, gstein@apache.org wrote:
> gstein 2002/08/14 10:15:15
>
> Modified: . .cvsignore CHANGES Makefile.in apr-config.in
> configure.in
> test Makefile.in
> Added: build get-version.sh
> Removed: . APRVARS.in
> Log:
> Various changes to clean up APR for a release.
>
> * Add a version number to the library name to support parallel
> installation.
> See: http://www106.pair.com/rhp/parallel.html
>
> (assuming the app uses apr-config to fetch linking information, then
> users should not have anything to change)
>...
--
Greg Stein, http://www.lyra.org/