From owner-freebsd-ports@FreeBSD.ORG Tue Aug 2 01:01:45 2011 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 300DB106567A; Tue, 2 Aug 2011 01:01:45 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from spartan.hamla.org (spartan.hamla.org [206.251.255.30]) by mx1.freebsd.org (Postfix) with ESMTP id 0BE0F8FC20; Tue, 2 Aug 2011 01:01:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by spartan.hamla.org (Postfix) with ESMTP id 4B86517113; Mon, 1 Aug 2011 21:02:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tandon.net; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:reply-to:message-id :subject:subject:from:from:date:date:received; s=aegis; t= 1312246933; bh=CFG6WEFGb2tq5b4W0fRTN2tpbnkNrsCkUetpPbSyExs=; b=G HjtnQBCvfnI2QEPR6wvsggLRJXzsBA18dZSiwwMaYZpd8i0CAmJldfrs/5LBuNjC A1VMwxJiDdzRcuQFEX9m00B5Wn8QS67GQPLwinuntFCP6Wq8nYN1RY1M3+Hu8+cJ Qz/81030Pgt1Ojei2S3chY3Es4k9ip6iD+//ZFMgVY= X-Virus-Scanned: by ClamAV at spartan.hamla.org Received: from spartan.hamla.org ([127.0.0.1]) by localhost (spartan.hamla.org [127.0.0.1]) (amavisd-new, port 10027) with LMTP id DGbLetRjtMYe; Mon, 1 Aug 2011 21:02:13 -0400 (EDT) Date: Mon, 1 Aug 2011 21:01:40 -0400 From: Sahil Tandon To: olli hauer Message-ID: <20110802010139.GA981@magic.hamla.org> References: <4E368625.7010805@quip.cz> <4E370ADA.9060902@FreeBSD.org> <4E371284.5010806@quip.cz> <4E371B3B.7070806@FreeBSD.org> <4E3722DE.6050206@gmx.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <4E3722DE.6050206@gmx.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: ports@FreeBSD.org, ohauer@FreeBSD.org, Miroslav Lachman <000.fbsd@quip.cz> Subject: USERS/GROUPS in bsd.port.mk [was: FreeBSD Port: postfix-2.8.4,1] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sahil Tandon List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 01:01:45 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, 2011-08-02 at 00:04:14 +0200, olli hauer wrote: > No, you don't hit the limitation. It seems you really found a bug in > the Framework! > > From the Framework code in bsd.port.mk existing groups should honored. Along those lines, what about using groupmod instead of usermod? Perhaps due to my ignorance, it seems more straightforward and does not require much sed-fu; I've attached a (probably incomplete) patch to illustrate my thinking. I understand what I am suggesting could introduce other problems, so please do not construe it as an as-is suggestion, but rather something to stoke discussion. -- Sahil Tandon --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.port.mk.diff" Content-Transfer-Encoding: quoted-printable Index: bsd.port.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.690 diff -u -r1.690 bsd.port.mk =1B[34m--- bsd.port.mk 21 Jul 2011 15:10:46 -0000 1.690=1B[0m =1B[31m+++ bsd.port.mk 2 Aug 2011 00:49:22 -0000=1B[0m =1B[1m@@ -4237,12 +4237,9 @@=1B[0m IFS=3D","; for _login in $$members; do \ for _user in ${USERS}; do \ if [ "x$${_user}" =3D "x$${_login}" ]; the= n \ =1B[34m- list=3D`${PW} usershow $${_= login} -P | ${SED} -ne 's/.*Groups: //p'`; \=1B[0m =1B[34m- ${ECHO_MSG} "Setting \`$${_= login}' groups to \`$$list$${list:+,}${_group}'."; \=1B[0m =1B[34m- ${PW} usermod $${_login} -G= $$list$${list:+,}${_group}; \=1B[0m =1B[34m- ${ECHO_CMD} "@exec list=3D\= `${PW} usershow $${_login} -P | ${SED} -ne 's/.*Groups: //p'\`; \=1B[0m =1B[34m- echo \"Setting '$${_login}'= groups to '$$list$${list:+,}${_group}'.\"; \=1B[0m =1B[34m- ${PW} usermod $${_login} -G= $${list},${_group}" >> ${TMPPLIST}; \=1B[0m =1B[31m+ ${ECHO_MSG} "Adding \`$${_l= ogin}' to \`${_group}'."; \=1B[0m =1B[31m+ ${PW} groupmod ${_group} -m= $${_login}; \=1B[0m =1B[31m+ ${ECHO_CMD} "@exec ${PW} gr= oupmod ${_group} -m $${_login}" >> ${TMPPLIST}; \=1B[0m else \ ${ECHO_MSG} "=3D=3D> DEBUG skip lo= gin $${_login} =3D> not defined in USERS \"( ${USERS} )\""; \ fi; \ --VbJkn9YxBvnuCH5J--