From owner-svn-src-projects@FreeBSD.ORG Fri Dec 14 14:52:55 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD0E018F; Fri, 14 Dec 2012 14:52:55 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 791548FC0C; Fri, 14 Dec 2012 14:52:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBEEqt1E081071; Fri, 14 Dec 2012 14:52:55 GMT (envelope-from linimon@svn.freebsd.org) Received: (from linimon@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBEEqt14081070; Fri, 14 Dec 2012 14:52:55 GMT (envelope-from linimon@svn.freebsd.org) Message-Id: <201212141452.qBEEqt14081070@svn.freebsd.org> From: Mark Linimon Date: Fri, 14 Dec 2012 14:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244212 - projects/portbuild/tools X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2012 14:52:55 -0000 Author: linimon (doc,ports committer) Date: Fri Dec 14 14:52:54 2012 New Revision: 244212 URL: http://svnweb.freebsd.org/changeset/base/244212 Log: Refactor. Make it so that the build userid can be something other than ports-. Modified: projects/portbuild/tools/addarch Modified: projects/portbuild/tools/addarch ============================================================================== --- projects/portbuild/tools/addarch Fri Dec 14 14:45:18 2012 (r244211) +++ projects/portbuild/tools/addarch Fri Dec 14 14:52:54 2012 (r244212) @@ -8,6 +8,8 @@ pbd=${PORTBUILD_DATA:-/var/portbuild} PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:${pbc}/scripts +QMANAGER=qmanager.py + test_fs() { local fs=$1 @@ -45,7 +47,11 @@ if [ $valid_arch = 0 ]; then exit 1 fi -uid=ports-${arch} +if [ ! -z "${PORTBUILD_USER}" ]; then + uid=${PORTBUILD_USER} +else + uid=ports-${arch} +fi if [ ! -z "${PORTBUILD_GROUP}" ]; then gid=${PORTBUILD_GROUP} else @@ -126,18 +132,17 @@ EOF chmod 664 ${conf} || exit 1 fi -qm=qmanager.py -if [ ! -x ${pbc}/qmanager/$qm ]; then - echo "you need to install qmanager under ${pbc}/qmanager/ and re-run this script." +if [ ! -x ${pbc}/qmanager/${QMANAGER} ]; then + echo "you need to install ${QMANAGER} under ${pbc}/qmanager/ and re-run this script." exit 1 else running=`ps ax | grep -v grep | grep $qm` if [ -z "${running}" ]; then - echo "qmanager is not running. run /usr/local/etc/rc.d/qmanager.sh and re-run this script." + echo "${QMANAGER} is not running. run /usr/local/etc/rc.d/qmanager.sh and re-run this script." exit 1 else echo "adding ${arch} to qmanager ..." - python ${pbc}/qmanager/qclient add_acl name=ports-${arch} uidlist=${uid} gidlist=${gid} sense=1 + python ${pbc}/qmanager/qclient add_acl name=${uid} uidlist=${uid} gidlist=${gid} sense=1 echo "... done." fi fi