From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 31 Mar 2024 17:23:47 +0000 (+0200)
Subject: GNUMakefile.in: Set GROUP_T when installing configuration files as root
X-Git-Tag: v_4_0_0~60^2~28
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/user-manual/developer-manual/static/gitweb.js?a=commitdiff_plain;h=1029669713889663657c11e483ca4d333e21a18f;p=privoxy.git

GNUMakefile.in: Set GROUP_T when installing configuration files as root

... and there is no privoxy user available.

Prevents the install target from failing with:

     Installing templates to /tmp/etc/templates
     id: privoxy: no such user
     ******************************************************************
      WARNING! WARNING! installing config files as root!
      It is strongly recommended to run privoxy as a non-root user,
      and to install the config files as that user and/or group!
      Please read INSTALL, and create a privoxy user and group!
     *******************************************************************
     Installing configuration files to /tmp/etc
     Installing config as config.new
     usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
                    [-M log] [-D dest] [-h hash] [-T tags]
                    [-B suffix] [-l linkflags] [-N dbdir]
                    file1 file2
            install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
                    [-M log] [-D dest] [-h hash] [-T tags]
                    [-B suffix] [-l linkflags] [-N dbdir]
                    file1 ... fileN directory
            install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
                    [-M log] [-D dest] [-h hash] [-T tags]
                    directory ...
     gmake: *** [GNUmakefile:865: install] Error 1
---

diff --git a/GNUmakefile.in b/GNUmakefile.in
index cf79aae1..db1bab59 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -927,6 +927,7 @@ install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
 					$(ECHO)  " and to install the config files as that user and/or group!" ;\
 					$(ECHO)  " Please read INSTALL, and create a privoxy user and group!" ;\
 					$(ECHO)  "*******************************************************************" ;\
+					GROUP_T=$(GROUP) ;\
 				fi ;\
 			else \
 				GROUP_T=$(GROUP) ;\