aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2005-04-02 20:20:21 +0000
committerKris Kennaway <kris@FreeBSD.org>2005-04-02 20:20:21 +0000
commit9ebdc14d1db26d66f5511ffecd5d0899c4be4224 (patch)
tree7826f04c85d350e3f4bf26b839c317c352d2980e /Tools
parentad771cae4d791a097fbfa0223a7fe7a70d20b73b (diff)
downloadports-9ebdc14d1db26d66f5511ffecd5d0899c4be4224.tar.gz
ports-9ebdc14d1db26d66f5511ffecd5d0899c4be4224.zip
Build packages with WRKDIRPREFIX=/work (which does not exist by
default) instead of /tmp, since some packages incorrectly search this build path at runtime to try to load things. Requested by: nectar
Notes
Notes: svn path=/head/; revision=132266
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/portbuild10
1 files changed, 9 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild
index 24cc444a6a4c..42641e5f09ef 100755
--- a/Tools/portbuild/scripts/portbuild
+++ b/Tools/portbuild/scripts/portbuild
@@ -185,7 +185,7 @@ shift 2
echo $pkgname
echo $dirname
-export WRKDIRPREFIX=/tmp
+export WRKDIRPREFIX=/work
export DISTDIR=/tmp/distfiles
export PACKAGES=/tmp/packages
@@ -272,6 +272,11 @@ echo "in directory ${chroot}" | tee -a ${chroot}/tmp/${pkgname}.log
mkdir -p ${chroot}/a/ports
rm -rf ${chroot}/usr/ports
+# Don't build in a world-writable directory because some ports hardcode
+# this path and try to load things from it at runtime, which is bad for
+# user security
+mkdir ${chroot}/work
+
if [ ! -z "${ccache_dir}" ]; then
mkdir -p ${chroot}/root/.ccache/
mount -o rw -t nullfs ${ccache_dir} ${chroot}/root/.ccache/
@@ -312,6 +317,9 @@ mkdir ${chroot}/usr/X11R6
if [ $X_WINDOW_SYSTEM = "xfree86-3" ]; then
mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.x11.dist -p ${chroot}/usr/X11R6 \
>/dev/null 2>&1
+elif [ $X_WINDOW_SYSTEM = "xorg" ]; then
+ mtree -deU -f ${chroot}/a/ports/x11-servers/xorg-server/files/BSD.x11-xorg.dist -p ${chroot}/usr/X11R6 \
+ >/dev/null 2>&1
else
mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.x11-4.dist -p ${chroot}/usr/X11R6 \
>/dev/null 2>&1