From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Feb 28 11:20:19 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90AEB16A4CE for ; Sat, 28 Feb 2004 11:20:19 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7425F43D39 for ; Sat, 28 Feb 2004 11:20:19 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1SJKJbv006564 for ; Sat, 28 Feb 2004 11:20:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1SJKJaj006562; Sat, 28 Feb 2004 11:20:19 -0800 (PST) (envelope-from gnats) Date: Sat, 28 Feb 2004 11:20:19 -0800 (PST) Message-Id: <200402281920.i1SJKJaj006562@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Thomas-Martin Seck Subject: Re: ports/63503: [Maintainer] www/squid: integrate vendor patches, fix squid user creation, new OPTION X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thomas-Martin Seck List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 19:20:19 -0000 The following reply was made to PR ports/63503; it has been noted by GNATS. From: Thomas-Martin Seck To: bug-followup@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:18:54 +0100 * Thomas-Martin Seck (tmseck@netcologne.de): > A portlint(1)'ed version of Makefile: Ack, that comes when you mechanically search and replace. If portlint(1) cleanliness is required, use this version: 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:17:02 -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..."; \ - ${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..."; \ - ${FIND} -H /var -group $${current_gid} -exec chgrp 100 {} \; ; \ - echo "Finished." - + ${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 ${CHOWN} :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 ${CHOWN} :100 {} \; ; \ + ${ECHO_CMD} "Finished." + .include