svn commit: r244212 - projects/portbuild/tools
Mark Linimon
linimon at FreeBSD.org
Fri Dec 14 14:52:55 UTC 2012
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-<arch>.
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
More information about the svn-src-projects
mailing list