aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
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