From a60fed7f9f773368c1adcf0f0784972889dd728a Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Wed, 14 Oct 2015 18:18:48 +0000 Subject: New config: BUILD_HOME, to be able to set the value of HOME while building. Default it to /nonexistent to prevent builds from writing to /home. This reverts what was done for #170762 Closes: #441052 --- pbuilder-buildpackage | 2 +- pbuilderrc | 5 +++++ pbuilderrc.5 | 9 +++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 5e8ef08..310658a 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -76,7 +76,7 @@ esac BUILDRESULTUID="${BUILDRESULTUID:-${SUDO_UID:-0}}" BUILDRESULTGID="${BUILDRESULTGID:-${SUDO_GID:-0}}" -export HOME="$BUILDDIR" +export HOME="$BUILD_HOME" echobacktime extractbuildplace diff --git a/pbuilderrc b/pbuilderrc index 069009e..b4ab567 100644 --- a/pbuilderrc +++ b/pbuilderrc @@ -7,6 +7,11 @@ BASETGZ=/var/cache/pbuilder/base.tgz BUILDPLACE=/var/cache/pbuilder/build # directory inside the chroot where the build happens. See #789404 BUILDDIR=/build +# what be used as value for HOME during builds. See #441052 +# The default value prevents builds to write on HOME, which is prevented on +# Debian buildds too. You can set it to $BUILDDIR to get a working HOME, if +# you need to. +BUILD_HOME=/nonexistent MIRRORSITE=http://httpredir.debian.org/debian #OTHERMIRROR="deb http://www.home.com/updates/ ./" #export http_proxy=http://your-proxy:8080/ diff --git a/pbuilderrc.5 b/pbuilderrc.5 index 4f7d1f2..3d461b8 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -440,6 +440,15 @@ or from the host system into the chroot. If the directory specified here exists and contains one of the copied files (without the leading /etc) that file will be copied from here instead of the system one. +.TP +.BI "BUILD_HOME=" "/nonexistent" +Set the what the +.B HOME +environment variable points to during the builds. It defaults to a non-existing +directory to prevent builds from writing to HOME, which is reserved to users. +If you need a working HOME you can set it to +.B $BUILDDIR +instead. .SH "AUTHOR" Initial coding, and main maintenance is done by -- cgit v1.2.3