From bcb88c9641261756c718ef546fc4aed82c4fc6c0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 31 Mar 2017 16:42:00 +0200 Subject: [PATCH] Do not use chgrp when have DESTDIR (i.e. making rpm) --- bacula/src/dird/Makefile.in | 6 +++--- bacula/src/filed/Makefile.in | 2 +- bacula/src/stored/Makefile.in | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bacula/src/dird/Makefile.in b/bacula/src/dird/Makefile.in index 2ee1d93167..fd727ecd0c 100644 --- a/bacula/src/dird/Makefile.in +++ b/bacula/src/dird/Makefile.in @@ -103,7 +103,7 @@ devclean: realclean install: all $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir @srcconf=bacula-dir.conf; \ - if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \ + if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \ destconf=$$srcconf.new; \ echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \ else \ @@ -111,10 +111,10 @@ install: all fi; \ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf - @if test "x${dir_group}" != "x"; then \ + @if test "x${dir_group}" != "x" -a "x${DESTDIR}" = "x" ; then \ chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \ fi - @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ + @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ echo " ==> Saving existing query.sql to query.sql.old"; \ $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \ fi diff --git a/bacula/src/filed/Makefile.in b/bacula/src/filed/Makefile.in index fdbffb4385..5a6e67d1f9 100644 --- a/bacula/src/filed/Makefile.in +++ b/bacula/src/filed/Makefile.in @@ -109,7 +109,7 @@ install: all fi; \ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf - @if test "x${fd_group}" != "x"; then \ + @if test "x${fd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \ chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \ fi @if test -f static-bacula-fd; then \ diff --git a/bacula/src/stored/Makefile.in b/bacula/src/stored/Makefile.in index 9a84b4c22d..2805480d33 100644 --- a/bacula/src/stored/Makefile.in +++ b/bacula/src/stored/Makefile.in @@ -193,7 +193,7 @@ install: all fi; \ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf - @if test "x${sd_group}" != "x"; then \ + @if test "x${sd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \ chgrp -f ${sd_group} ${DESTDIR}${sysconfdir}/$$destconf; \ fi @if test -f static-bacula-sd; then \ -- 2.39.5