You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2011/12/19 18:27:13 UTC

svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Author: minfrin
Date: Mon Dec 19 17:27:13 2011
New Revision: 1220867

URL: http://svn.apache.org/viewvc?rev=1220867&view=rev
Log:
Backport:
Distinguish properly between the bindir and sbindir directories when
installing binaries. Previously all binaries were silently installed to
sbindir, whether they were system administration commands or not.

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/Makefile.in
    httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in
    httpd/httpd/branches/2.4.x/build/rules.mk.in
    httpd/httpd/branches/2.4.x/support/Makefile.in
    httpd/httpd/branches/2.4.x/test/Makefile.in

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 19 17:27:13 2011
@@ -1,3 +1,3 @@
 /httpd/httpd/branches/revert-ap-ldap:1150158-1150173
 /httpd/httpd/branches/wombat-integration:723609-723841
-/httpd/httpd/trunk:1201042,1201111,1201194,1201198,1201202,1202236,1202456,1202886,1203859,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206587,1206850,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210080,1210124,1210130,1210219,1210221,1210252,1210284,1210378,1210725,1210892,1210951,1210954,1211528,1211663,1211680,1212883,1213338,1213567,1214003,1214005,1214015,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826
+/httpd/httpd/trunk:1201042,1201111,1201194,1201198,1201202,1202236,1202456,1202886,1203859,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206587,1206850,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210080,1210124,1210130,1210219,1210221,1210252,1210284,1210378,1210725,1210892,1210951,1210954,1211528,1211663,1211680,1212883,1213338,1213567,1214003,1214005,1214015,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826,1220846

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Dec 19 17:27:13 2011
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.0
 
+  *) Distinguish properly between the bindir and sbindir directories when
+     installing binaries. Previously all binaries were silently installed to
+     sbindir, whether they were system administration commands or not.
+     [Graham Leggett]
 
 Changes with Apache 2.3.16
 

Modified: httpd/httpd/branches/2.4.x/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/Makefile.in?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/Makefile.in (original)
+++ httpd/httpd/branches/2.4.x/Makefile.in Mon Dec 19 17:27:13 2011
@@ -12,8 +12,8 @@ PROGRAM_DEPENDENCIES = \
   $(MPM_LIB) \
   os/$(OS_DIR)/libos.la
 
-PROGRAMS        = $(PROGRAM_NAME)
-TARGETS         = $(PROGRAMS) $(shared_build) $(other_targets)
+sbin_PROGRAMS   = $(PROGRAM_NAME)
+TARGETS         = $(sbin_PROGRAMS) $(shared_build) $(other_targets)
 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
 	install-other install-cgi install-include install-suexec install-build \
 	install-man

Modified: httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in (original)
+++ httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in Mon Dec 19 17:27:13 2011
@@ -438,13 +438,12 @@ rm -rf $RPM_BUILD_ROOT
 %files tools
 %defattr(-,root,root)
 %{_sbindir}/ab
-%{_sbindir}/htdbm
-%{_sbindir}/htdigest
-%{_sbindir}/htpasswd
+%{_bindir}/htdbm
+%{_bindir}/htdigest
+%{_bindir}/htpasswd
 %{_sbindir}/logresolve
 %{_sbindir}/httxt2dbm
 %{_sbindir}/rotatelogs
-%{_mandir}/man1/dbmmanage.1*
 %{_mandir}/man1/htdbm.1*
 %{_mandir}/man1/htdigest.1*
 %{_mandir}/man1/htpasswd.1*
@@ -486,8 +485,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/httpd
 %{_sbindir}/apxs
 %{_sbindir}/checkgid
-%{_sbindir}/dbmmanage
+%{_bindir}/dbmmanage
 %{_sbindir}/envvars*
+%{_mandir}/man1/dbmmanage.1*
 %{_mandir}/man8/apxs.8*
 %dir %{_libdir}/httpd/build
 %{_libdir}/httpd/build/*.mk

Modified: httpd/httpd/branches/2.4.x/build/rules.mk.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/build/rules.mk.in?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/build/rules.mk.in (original)
+++ httpd/httpd/branches/2.4.x/build/rules.mk.in Mon Dec 19 17:27:13 2011
@@ -166,9 +166,15 @@ local-extraclean: local-distclean x-loca
 	fi
 
 program-install: $(TARGETS) $(SHARED_TARGETS)
-	@if test -n '$(PROGRAMS)'; then \
+	@if test -n '$(bin_PROGRAMS)'; then \
+	    test -d $(DESTDIR)$(bindir) || $(MKINSTALLDIRS) $(DESTDIR)$(bindir); \
+	    list='$(bin_PROGRAMS)'; for i in $$list; do \
+	        $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir); \
+	    done; \
+	fi
+	@if test -n '$(sbin_PROGRAMS)'; then \
 	    test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
-	    list='$(PROGRAMS)'; for i in $$list; do \
+	    list='$(sbin_PROGRAMS)'; for i in $$list; do \
 	        $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir); \
 	    done; \
 	fi

Modified: httpd/httpd/branches/2.4.x/support/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/Makefile.in?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/Makefile.in (original)
+++ httpd/httpd/branches/2.4.x/support/Makefile.in Mon Dec 19 17:27:13 2011
@@ -3,8 +3,9 @@ DISTCLEAN_TARGETS = apxs apachectl dbmma
 
 CLEAN_TARGETS = suexec
 
-PROGRAMS = htpasswd htdigest rotatelogs logresolve ab htdbm htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)
-TARGETS  = $(PROGRAMS)
+bin_PROGRAMS = htpasswd htdigest htdbm
+sbin_PROGRAMS = rotatelogs logresolve ab htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)
+TARGETS  = $(bin_PROGRAMS) $(sbin_PROGRAMS)
 
 PROGRAM_LDADD        = $(UTIL_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS)
 PROGRAM_DEPENDENCIES = 
@@ -16,7 +17,13 @@ install:
 	@test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
 	@test -d $(DESTDIR)$(libexecdir) || $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
 	@cp -p $(top_builddir)/server/httpd.exp $(DESTDIR)$(libexecdir)
-	@for i in apxs apachectl dbmmanage; do \
+	@for i in dbmmanage; do \
+	    if test -f "$(builddir)/$$i"; then \
+	        cp -p $$i $(DESTDIR)$(bindir); \
+	        chmod 755 $(DESTDIR)$(bindir)/$$i; \
+	    fi ; \
+	done
+	@for i in apxs apachectl; do \
 	    if test -f "$(builddir)/$$i"; then \
 	        cp -p $$i $(DESTDIR)$(sbindir); \
 	        chmod 755 $(DESTDIR)$(sbindir)/$$i; \

Modified: httpd/httpd/branches/2.4.x/test/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/Makefile.in?rev=1220867&r1=1220866&r2=1220867&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/Makefile.in (original)
+++ httpd/httpd/branches/2.4.x/test/Makefile.in Mon Dec 19 17:27:13 2011
@@ -3,7 +3,7 @@
 # test programs, then "make test"
 TARGETS =
 
-PROGRAMS =
+bin_PROGRAMS =
 
 PROGRAM_LDADD        = $(EXTRA_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
 PROGRAM_DEPENDENCIES =  \
@@ -12,7 +12,7 @@ PROGRAM_DEPENDENCIES =  \
 
 include $(top_builddir)/build/rules.mk
 
-test: $(PROGRAMS)
+test: $(bin_PROGRAMS)
 
 # example for building a test proggie
 # dbu_OBJECTS = dbu.lo



Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 12/20/2011 5:35 AM, Graham Leggett wrote:
> 
> This is the standard convention that's used by automake, I'm not keen on inventing another arbitrary format if I can avoid it:

Ahhh.

We don't speak automake :)

I find the convention very irritating, but will leave it at that
and let others chime in.

Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 12/20/2011 7:23 AM, Graham Leggett wrote:
> On 20 Dec 2011, at 3:10 PM, Jeff Trawick wrote:
> 
>>>> None of these require the user to be administrator, except to use the
>>>> apxs -i option.  Not really sure if these make sense.  Any pointers to
>>>> a decent canonical definition of sbin v bin?
>>>
>>> You're right, the current split doesn't seem to make much sense.
>>>
>>> I think apxs belongs in bin, given that "apxs -i" is the same as "make install" and make goes in bin.
>>
>> /usr/sbin/apxs seems to be the usual place in my non-scientific survey.
> 
> I see this is true for Fedora and Redhat, though it doesn't seem to make sense - non root users want to compile Apache httpd modules too, and shouldn't need to fiddle with paths to get it.
> 
>>> In the case of ab, logresolve, httxt2dbm and rotatelogs, these are definitely bin.
>>
>> rotatelogs isn't expected to be used by end users.  Why not sbin?
>>
>> In general, looking at and possibly following the distros for bin vs
>> sbin could be helpful.
> 
> I had analysed the Fedora packaging split for bin/sbin already, but had missed rotatelogs, which they place in sbin. That does make some sense, will change it again.

+1

I agree that apxs seems odd in either sbin, or bin.  It practically screams
for a dev-bin/ much like we deposit specific libfoo.pc/libfoo-config.sh files.
Since -config's are going into bin/, apxs should be going into bin/.



Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by Graham Leggett <mi...@sharp.fm>.
On 20 Dec 2011, at 3:10 PM, Jeff Trawick wrote:

>>> None of these require the user to be administrator, except to use the
>>> apxs -i option.  Not really sure if these make sense.  Any pointers to
>>> a decent canonical definition of sbin v bin?
>> 
>> You're right, the current split doesn't seem to make much sense.
>> 
>> I think apxs belongs in bin, given that "apxs -i" is the same as "make install" and make goes in bin.
> 
> /usr/sbin/apxs seems to be the usual place in my non-scientific survey.

I see this is true for Fedora and Redhat, though it doesn't seem to make sense - non root users want to compile Apache httpd modules too, and shouldn't need to fiddle with paths to get it.

>> In the case of ab, logresolve, httxt2dbm and rotatelogs, these are definitely bin.
> 
> rotatelogs isn't expected to be used by end users.  Why not sbin?
> 
> In general, looking at and possibly following the distros for bin vs
> sbin could be helpful.

I had analysed the Fedora packaging split for bin/sbin already, but had missed rotatelogs, which they place in sbin. That does make some sense, will change it again.

Regards,
Graham
--




Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Dec 20, 2011 at 6:35 AM, Graham Leggett <mi...@sharp.fm> wrote:
> On 20 Dec 2011, at 9:34 AM, William A. Rowe Jr. wrote:
>
>>> -PROGRAMS        = $(PROGRAM_NAME)
>>> -TARGETS         = $(PROGRAMS) $(shared_build) $(other_targets)
>>> +sbin_PROGRAMS   = $(PROGRAM_NAME)
>>> +TARGETS         = $(sbin_PROGRAMS) $(shared_build) $(other_targets)
>>
>> Yow.  That defies every naming convention I've ever observed.  Can't we
>> pick one case or the other?  Perhaps even "SPROGRAMS" vs PROGRAMS, or
>> "SYSPROGRAMS"?
>
> This is the standard convention that's used by automake, I'm not keen on inventing another arbitrary format if I can avoid it:
>
> http://www.gnu.org/software/automake/manual/automake.html#Uniform
>
>>> Modified: httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in
>>> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in?rev=1220867&r1=1220866&r2=1220867&view=diff
>>> ==============================================================================
>>> --- httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in (original)
>>> +++ httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in Mon Dec 19 17:27:13 2011
>>
>>> %{_sbindir}/ab
>>
>> sbin?
>>
>>> %{_sbindir}/logresolve
>>> %{_sbindir}/httxt2dbm
>>
>> sbin?
>>
>>> %{_sbindir}/apxs
>>
>> sbin?
>
> I initially moved tools to match the existing documentation, which has historically divided the tools up between section 1 (bin) and section 8 (sbin), possibly arbitrarily:
>
> https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/man
>
>> None of these require the user to be administrator, except to use the
>> apxs -i option.  Not really sure if these make sense.  Any pointers to
>> a decent canonical definition of sbin v bin?
>
> You're right, the current split doesn't seem to make much sense.
>
> I think apxs belongs in bin, given that "apxs -i" is the same as "make install" and make goes in bin.

/usr/sbin/apxs seems to be the usual place in my non-scientific survey.

> In the case of ab, logresolve, httxt2dbm and rotatelogs, these are definitely bin.

rotatelogs isn't expected to be used by end users.  Why not sbin?

In general, looking at and possibly following the distros for bin vs
sbin could be helpful.

Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by Graham Leggett <mi...@sharp.fm>.
On 20 Dec 2011, at 9:34 AM, William A. Rowe Jr. wrote:

>> -PROGRAMS        = $(PROGRAM_NAME)
>> -TARGETS         = $(PROGRAMS) $(shared_build) $(other_targets)
>> +sbin_PROGRAMS   = $(PROGRAM_NAME)
>> +TARGETS         = $(sbin_PROGRAMS) $(shared_build) $(other_targets)
> 
> Yow.  That defies every naming convention I've ever observed.  Can't we
> pick one case or the other?  Perhaps even "SPROGRAMS" vs PROGRAMS, or
> "SYSPROGRAMS"?

This is the standard convention that's used by automake, I'm not keen on inventing another arbitrary format if I can avoid it:

http://www.gnu.org/software/automake/manual/automake.html#Uniform

>> Modified: httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in
>> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in?rev=1220867&r1=1220866&r2=1220867&view=diff
>> ==============================================================================
>> --- httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in (original)
>> +++ httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in Mon Dec 19 17:27:13 2011
> 
>> %{_sbindir}/ab
> 
> sbin?
> 
>> %{_sbindir}/logresolve
>> %{_sbindir}/httxt2dbm
> 
> sbin?
> 
>> %{_sbindir}/apxs
> 
> sbin?

I initially moved tools to match the existing documentation, which has historically divided the tools up between section 1 (bin) and section 8 (sbin), possibly arbitrarily:

https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/man

> None of these require the user to be administrator, except to use the
> apxs -i option.  Not really sure if these make sense.  Any pointers to
> a decent canonical definition of sbin v bin?

You're right, the current split doesn't seem to make much sense.

I think apxs belongs in bin, given that "apxs -i" is the same as "make install" and make goes in bin.

In the case of ab, logresolve, httxt2dbm and rotatelogs, these are definitely bin.

Regards,
Graham
--


Re: svn commit: r1220867 - in /httpd/httpd/branches/2.4.x: ./ CHANGES Makefile.in build/rpm/httpd.spec.in build/rules.mk.in support/Makefile.in test/Makefile.in

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 12/19/2011 11:27 AM, minfrin@apache.org wrote:
> Modified: httpd/httpd/branches/2.4.x/Makefile.in
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/Makefile.in?rev=1220867&r1=1220866&r2=1220867&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.4.x/Makefile.in (original)
> +++ httpd/httpd/branches/2.4.x/Makefile.in Mon Dec 19 17:27:13 2011
> @@ -12,8 +12,8 @@ PROGRAM_DEPENDENCIES = \
>    $(MPM_LIB) \
>    os/$(OS_DIR)/libos.la
>  
> -PROGRAMS        = $(PROGRAM_NAME)
> -TARGETS         = $(PROGRAMS) $(shared_build) $(other_targets)
> +sbin_PROGRAMS   = $(PROGRAM_NAME)
> +TARGETS         = $(sbin_PROGRAMS) $(shared_build) $(other_targets)

Yow.  That defies every naming convention I've ever observed.  Can't we
pick one case or the other?  Perhaps even "SPROGRAMS" vs PROGRAMS, or
"SYSPROGRAMS"?

> Modified: httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in?rev=1220867&r1=1220866&r2=1220867&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in (original)
> +++ httpd/httpd/branches/2.4.x/build/rpm/httpd.spec.in Mon Dec 19 17:27:13 2011

>  %{_sbindir}/ab

sbin?

>  %{_sbindir}/logresolve
>  %{_sbindir}/httxt2dbm

sbin?

>  %{_sbindir}/apxs

sbin?

None of these require the user to be administrator, except to use the
apxs -i option.  Not really sure if these make sense.  Any pointers to
a decent canonical definition of sbin v bin?

> --- httpd/httpd/branches/2.4.x/support/Makefile.in (original)
> +++ httpd/httpd/branches/2.4.x/support/Makefile.in Mon Dec 19 17:27:13 2011
> @@ -3,8 +3,9 @@ DISTCLEAN_TARGETS = apxs apachectl dbmma
>  
>  CLEAN_TARGETS = suexec
>  
> -PROGRAMS = htpasswd htdigest rotatelogs logresolve ab htdbm htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)
> -TARGETS  = $(PROGRAMS)
> +bin_PROGRAMS = htpasswd htdigest htdbm
> +sbin_PROGRAMS = rotatelogs logresolve ab htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)

Here again, pick a case?