aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2005-04-03 04:20:21 +0800
committerkris <kris@FreeBSD.org>2005-04-03 04:20:21 +0800
commit8e2fdee58f56d438343cf24ada1a539fccc50531 (patch)
tree096fcf0f431ba356b4fce5267fdb3b2738da598c /Tools
parent95db83be69fdaa12fceee9b2c62b877a270f921d (diff)
downloadfreebsd-ports-gnome-8e2fdee58f56d438343cf24ada1a539fccc50531.tar.gz
freebsd-ports-gnome-8e2fdee58f56d438343cf24ada1a539fccc50531.tar.zst
freebsd-ports-gnome-8e2fdee58f56d438343cf24ada1a539fccc50531.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
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