From owner-svn-ports-all@freebsd.org Thu Oct 29 15:30:37 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11223A21E8F; Thu, 29 Oct 2015 15:30:37 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFDDD18D4; Thu, 29 Oct 2015 15:30:36 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TFUZgP040360; Thu, 29 Oct 2015 15:30:35 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TFUZ2r040359; Thu, 29 Oct 2015 15:30:35 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201510291530.t9TFUZ2r040359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 29 Oct 2015 15:30:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400469 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 15:30:37 -0000 Author: brd Date: Thu Oct 29 15:30:35 2015 New Revision: 400469 URL: https://svnweb.freebsd.org/changeset/ports/400469 Log: Fix a bug introduced in r399992, where creating only a user would fail due to $PW not being set. This only occurred when just a user was being created without a group. Solve this by setting $PW outside of the group creation and above both the user and group creation parts. PR: 203489 Reviewed by: bapt Approved by: portmgr (bapt) Approved by: bdrewery (mentor) Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Thu Oct 29 15:29:13 2015 (r400468) +++ head/Mk/bsd.port.mk Thu Oct 29 15:30:35 2015 (r400469) @@ -3679,20 +3679,20 @@ install-ldconfig-file: _UG_OUTPUT= ${WRKDIR}/users-groups.sh PKGPREINSTALL+= ${_UG_OUTPUT} create-users-groups: + @${RM} -f ${_UG_OUTPUT} || ${TRUE} +.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1002000 + @${ECHO_CMD} "PW=${PW}" >> ${_UG_OUTPUT} +.else + @${ECHO_CMD} -e "if [ -n \"\$${PKG_ROOTDIR}\" -a \"\$${PKG_ROOTDIR}\" != \"/\" ]; then PW=\"${PW} -R \$${PKG_ROOTDIR}\"; else PW=${PW}; fi" >> ${_UG_OUTPUT} +.endif .if defined(GROUPS) .for _file in ${GID_FILES} .if !exists(${_file}) @${ECHO_CMD} "** ${_file} doesn't exist. Exiting."; exit 1 .endif .endfor - @${RM} -f ${_UG_OUTPUT} || ${TRUE} @${ECHO_MSG} "===> Creating users and/or groups." @${ECHO_CMD} "echo \"===> Creating users and/or groups.\"" >> ${_UG_OUTPUT} -.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1002000 - @${ECHO_CMD} "PW=${PW}" >> ${_UG_OUTPUT} -.else - @${ECHO_CMD} -e "if [ -n \"\$${PKG_ROOTDIR}\" -a \"\$${PKG_ROOTDIR}\" != \"/\" ]; then PW=\"${PW} -R \$${PKG_ROOTDIR}\"; else PW=${PW}; fi" >> ${_UG_OUTPUT} -.endif .for _group in ${GROUPS} # _bgpd:*:130: @if ! ${GREP} -h ^${_group}: ${GID_FILES} >/dev/null 2>&1; then \