]> granicus.if.org Git - apache/commitdiff
Backport:
authorGraham Leggett <minfrin@apache.org>
Mon, 19 Dec 2011 17:27:13 +0000 (17:27 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 19 Dec 2011 17:27:13 +0000 (17:27 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1220867 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
Makefile.in
build/rpm/httpd.spec.in
build/rules.mk.in
support/Makefile.in
test/Makefile.in

diff --git a/CHANGES b/CHANGES
index c85514c72ce9375ef74980c69cec7377a2acba11..55d45ef421851499b8f6ef582e5359837052c93c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
 
index 9b11141d79836a659537b622758c70ca43ef206b..c0c47e2b08d9d501d8e8780c4d66a9b90f2024b7 100644 (file)
@@ -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
index eefd0ac35737e8ceec5d57f3b9d5e7a6dbea812d..fd95a1673c3770b76610c494e43608e245973a2e 100644 (file)
@@ -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
index 2bf16fe6787669a6e763708ba21c7ec073f50c8d..3dedb9a3cbe23dee4b28c9e5af75465f369e0f49 100644 (file)
@@ -166,9 +166,15 @@ local-extraclean: local-distclean x-local-extraclean
        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
index b840118b58f9f34be0f2cee97e022c798fa9b5c8..20be821a9ffa0fa5cfe3008f46916894186b3373 100644 (file)
@@ -3,8 +3,9 @@ DISTCLEAN_TARGETS = apxs apachectl dbmmanage log_server_status \
 
 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; \
index 6d834054773e17a75aa6337056a1ee8125983aa9..15d404d208d8478f391b01f704db9844aea874ec 100644 (file)
@@ -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