Req #28960 [Opn->Fbk]: When INSTALL_ROOT don't use apxs with Option '-a'

From: Date: Fri, 20 Jan 2017 20:21:29 +0000
Subject: Req #28960 [Opn->Fbk]: When INSTALL_ROOT don't use apxs with Option '-a'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206780@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=28960&edit=1 ID: 28960 Updated by: heiglandreas@php.net Reported by: Joerg dot Dieter dot Friedrich at uni-konstanz dot de Summary: When INSTALL_ROOT don't use apxs with Option '-a' -Status: Open +Status: Feedback Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Is this still relevant? Previous Comments: ------------------------------------------------------------------------ [2012-12-28 13:05:33] mamfelt at gmail dot com I did some testing and cannot get the ifeq to work, what does work is this change in Makefile.global (for version 5.3.20 +) --- Makefile.global.distr 2012-12-19 16:13:48.000000000 +0100 +++ Makefile.global 2012-12-28 13:57:48.000000000 +0100 @@ -33,6 +33,11 @@ fi; \ done; \ fi + @if [ -z $(strip $(INSTALL_ROOT)) ]; then \ + APXS_ACTIVATE="-a" ; \ + else \ + APXS_ACTIVATE="" ; \ + fi @$(INSTALL_IT) install-modules: build-modules I have not been able to find the file that creates the INSTALL_IT definition for Makefile. I thought it would be sapi/apache2handler/config.m4 but any (or where) I make changes are not applied by the ./configure process. I switch -a for $(APXS_ACTIVATE) so it reads: INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/opt/httpd/libexec' && $(mkinstalldirs) '$(INSTALL_ROOT)/var/httpd/etc' && /opt/httpd/sbin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/opt/httpd/libexec' -S SYSCONFDIR='$(INSTALL_ROOT)/var/httpd/etc' -i $(APXS_ACTIVATE) -n php5 libphp5.la /var/http/etc, /opt/httpd/sbin, etc, are coming from the configure inputs of course. ------------------------------------------------------------------------ [2012-12-27 12:18:49] mamfelt at gmail dot com Have since learned that INSTALL_ROOT should only be set just before "make install" because having it set earlier has side-effects for the regular make (at least on AIX). Now the APXS call is part of a compound command (multiple calls with &&) so it is not even looking at INSTALL_ROOT - other than to pass it as an argument. I am not "smart enough" to come up with the right Makefile syntax change, and - would also be "nice" if TARGET_ROOT was DESTDIR like most "GNU" based opensource packages. - but that would be a new feature request I expect :) ------------------------------------------------------------------------ [2012-10-05 16:30:25] mamfelt at gmail dot com I have been trying to figure out how to get information into Makefile so that looking at the value of INSTALL_ROOT is determined at 'make install' time. The following logic is run either at buildconf, or configure time (does this mean INSTALL_ROOT needs to be defined BEFORE running ./configure??) because it seems the outoput is always coming from the 'else' block if test -z $APXS -q SYSCONFDIR; then INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -i -n php5" else APXS_SYSCONFDIR='$(INSTALL_ROOT)'$APXS -q SYSCONFDIR INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -S SYSCONFDIR='$APXS_SYSCONFDIR' \ -i -a -n php5" fi as the -a option is hard coded as the only statement in Makefile ------------------------------------------------------------------------ [2004-06-29 16:38:02] Joerg dot Dieter dot Friedrich at uni-konstanz dot de OK, my patch is obviously wrong. I'm not really good at autoconf and configure. my ifeq-test is make-syntax not configure, I thought this will be put into the Makefile, which is not, and configure fails :-( please look at it. ------------------------------------------------------------------------ [2004-06-29 15:54:31] Joerg dot Dieter dot Friedrich at uni-konstanz dot de oops, typo in patch: --- sapi/apache/config.m4.orig Tue Jun 29 15:44:21 2004 +++ sapi/apache/config.m4 Tue Jun 29 15:52:54 2004 @@ -70,9 +70,16 @@ # Test whether apxs support -S option $APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1 + + # Test whether INSTALL_ROOT is set + ifeq ($(strip $(INSTALL_ROOT)),) + APXS_ACTIVATE="-a" + else + APXS_ACTIVATE="" + endif if test "$?" != "0"; then - APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED" # Old apxs does not have -S option + APACHE_INSTALL="$APXS -i $APXS_ACTIVATE -n php4 $SAPI_SHARED" # Old apxs does not have -S option else APXS_LIBEXECDIR='$(INSTALL_ROOT)'$APXS -q LIBEXECDIR if test -z $APXS -q SYSCONFDIR; then @@ -85,7 +92,7 @@ \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -S SYSCONFDIR='$APXS_SYSCONFDIR' \ - -i -a -n php4 $SAPI_SHARED" + -i $APXS_ACTIVATE -n php4 $SAPI_SHARED" fi fi ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=28960 -- Edit this bug report at https://bugs.php.net/bug.php?id=28960&edit=1

« previous php.bugs (#206780) next »