Date: Sun, 3 Nov 2013 21:41:31 GMT From: <ohauer@FreeBSD.org> To: <FreeBSD-gnats-submit@freebsd.org> Cc: babt@FreeBSD.org Subject: ports/183628: [patch] Mk/bsd.port.mk user/group with pkgng Message-ID: <201311032141.rA3LfVbf047993@freefall.freebsd.org> Resent-Message-ID: <201311032150.rA3Lo2v2048302@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 183628 >Category: ports >Synopsis: [patch] Mk/bsd.port.mk user/group with pkgng >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 03 21:50:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: ohauer >Release: >Organization: >Environment: >Description: The ${ECHO_CMD} command in bsd.port.mk miss param '-e' to interpret '\n' users-groups.sh without fix: ----------------------------- if ! /usr/sbin/pw groupshow mail | /usr/bin/grep -qw postfix; then \n echo "Adding user 'postfix' to group 'mail'." \n /usr/sbin/pw groupmod mail -m postfix \nfi users-groups.sh with fix: ----------------------------- if ! /usr/sbin/pw groupshow mail | /usr/bin/grep -qw postfix; then echo "Adding user 'postfix' to group 'mail'." /usr/sbin/pw groupmod mail -m postfix fi Sample port mail/postfix: Installing postfix pkgng package shows the following error: [1/1] Installing postfix-2.10.2,1...===> Creating users and/or groups. Using existing group 'mail'. Using existing group 'maildrop'. Using existing group 'postfix'. Using existing user 'postfix'. Syntax error: end of file unexpected (expecting "fi") pkg: PRE-INSTALL script failed >How-To-Repeat: make package -C mail/postfix pkg delete -y postfix pkg add $packages/All/postfix >Fix: --- bsd.port.mk.diff begins here --- Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 332647) +++ Mk/bsd.port.mk (working copy) @@ -4264,7 +4268,7 @@ echo \"Adding user '$${_login}' to group '${_group}'.\"; \ ${PW} groupmod ${_group} -m $${_login}; fi" >> ${TMPPLIST}; \ else \ - ${ECHO_CMD} "if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \n \ + ${ECHO_CMD} -e "if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \n \ echo \"Adding user '$${_login}' to group '${_group}'.\" \n \ ${PW} groupmod ${_group} -m $${_login} \nfi" >> ${_UG_OUTPUT}; \ fi ; \ --- bsd.port.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311032141.rA3LfVbf047993>