ports/63503: [Maintainer] www/squid: integrate vendor patches, fix squid user creation, new OPTION
Thomas-Martin Seck
tmseck at netcologne.de
Sat Feb 28 19:20:14 UTC 2004
The following reply was made to PR ports/63503; it has been noted by GNATS.
From: Thomas-Martin Seck <tmseck at netcologne.de>
To: bug-followup at freebsd.org
Cc:
Subject: Re: ports/63503: [Maintainer] www/squid: integrate vendor patches, fix squid user creation, new OPTION
Date: Sat, 28 Feb 2004 20:11:04 +0100
A portlint(1)'ed version of Makefile:
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/Makefile,v
retrieving revision 1.5.2.21
diff -u -r1.5.2.21 Makefile
--- Makefile 28 Feb 2004 16:30:46 -0000 1.5.2.21
+++ Makefile 28 Feb 2004 19:08:07 -0000
@@ -334,37 +334,37 @@
# This target assumes that SQUID_GID is the primary group of SQUID_UID. If you
# have a different setup, do not run this target!
@if [ `id -u` -ne 0 ]; \
- then echo "Sorry, you must be root to use this target."; exit 1; fi; \
+ then ${ECHO_CMD} "Sorry, you must be root to use this target."; exit 1; fi; \
current_uid=`id -u ${SQUID_UID}`; \
current_gid=`pw groupshow ${SQUID_GID}|cut -f 3 -d :`; \
- echo "I will remove this user:"; \
+ ${ECHO_CMD} "I will remove this user:"; \
id -P $${current_uid}; \
- echo "and this group:"; \
+ ${ECHO_CMD} "and this group:"; \
pw groupshow ${SQUID_GID}; \
- echo "I will then re-create them with a user and group id of 100."; \
- echo "Then all files and directories under ${PREFIX} and /var that"; \
- echo "are owned by uid $${current_uid} will be chown(1)'ed."; \
- echo "After that, all files and directories that were accessible"; \
- echo "by group $${current_gid} will chgrp(1)'ed respectively."; \
- echo "Note that this assumes group '${SQUID_GID}' to be the primary"; \
- echo "group of user '${SQUID_UID}'. If you have a different setup"; \
- echo "please abort this target now."; \
+ ${ECHO_CMD} "I will then re-create them with a user and group id of 100."; \
+ ${ECHO_CMD} "Then all files and directories under ${PREFIX} and /var that"; \
+ ${ECHO_CMD} "are owned by uid $${current_uid} will be ${CHOWN}(1)'ed."; \
+ ${ECHO_CMD} "After that, all files and directories that were accessible"; \
+ ${ECHO_CMD} "by group $${current_gid} will chgrp(1)'ed respectively."; \
+ ${ECHO_CMD} "Note that this assumes group '${SQUID_GID}' to be the primary"; \
+ ${ECHO_CMD} "group of user '${SQUID_UID}'. If you have a different setup"; \
+ ${ECHO_CMD} "please abort this target now."; \
read -p "Press RETURN to continue or CTRL-C to abort:" dummy ; \
- echo "OK, here we go:"; \
- echo "deleting user $${current_uid} and his primary group..."; \
+ ${ECHO_CMD} "OK, here we go:"; \
+ ${ECHO_CMD} "deleting user $${current_uid} and his primary group..."; \
pw userdel -u $${current_uid}; \
- echo "adding user ${SQUID_UID} with id 100..."; \
+ ${ECHO_CMD} "adding user ${SQUID_UID} with id 100..."; \
pw groupadd -n ${SQUID_GID} -g 100; \
pw useradd -n ${SQUID_UID} -u 100 -c "squid caching-proxy pseudo user" \
-d ${PREFIX}/squid -s /sbin/nologin -h - ; \
- echo "chown(1)'ing everything under ${PREFIX} from $${current_uid} to 100..."; \
- ${FIND} -H ${PREFIX} -user $${current_uid} -exec chown 100 {} \; ; \
- echo "chgrp(1)'ing everything under ${PREFIX} from $${current_gid} to 100..."; \
+ ${ECHO_CMD} "${CHOWN}(1)'ing everything under ${PREFIX} from $${current_uid} to 100..."; \
+ ${FIND} -H ${PREFIX} -user $${current_uid} -exec ${CHOWN} 100 {} \; ; \
+ ${ECHO_CMD} "chgrp(1)'ing everything under ${PREFIX} from $${current_gid} to 100..."; \
${FIND} -H ${PREFIX} -group $${current_gid} -exec chgrp 100 {} \; ; \
- echo "chown(1)'ing everything under /var from $${current_uid} to 100..."; \
- ${FIND} -H /var -user $${current_uid} -exec chown 100 {} \; ; \
- echo "chgrp(1)'ing everything under /var from $${current_gid} to 100..."; \
+ ${ECHO_CMD} "${CHOWN}(1)'ing everything under /var from $${current_uid} to 100..."; \
+ ${FIND} -H /var -user $${current_uid} -exec ${CHOWN} 100 {} \; ; \
+ ${ECHO_CMD} "chgrp(1)'ing everything under /var from $${current_gid} to 100..."; \
${FIND} -H /var -group $${current_gid} -exec chgrp 100 {} \; ; \
- echo "Finished."
-
+ ${ECHO_CMD} "Finished."
+
.include <bsd.port.post.mk>
More information about the freebsd-ports-bugs
mailing list