summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-25 15:35:32 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-26 22:24:24 +0200
commit757ec4e1ef633f9867928559df82adf3d0ac7b78 (patch)
tree0ee22fc38f4341154cce4fc89022672cad01937e /test/integration/framework
parentf878d3a862128bc1385616751ae1d78246b1bd01 (diff)
test: Use :$(id -gn) instead of :root (when run as root)
On BSD systems, the root group is wheel, not root, so let's just use the default group here. Gbp-Dch: ignore
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 546f070d7..c513ed12c 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -314,7 +314,7 @@ setupenvironment() {
# relax permissions so that running as root with user switching works
umask 022
chmod 711 "$TMPWORKINGDIRECTORY"
- chown _apt:root "${TMPWORKINGDIRECTORY}/downloaded"
+ chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/downloaded"
fi
TESTDIRECTORY="$(readlink -f "$(dirname $0)")"
@@ -442,7 +442,7 @@ EOF
cp "${TESTDIRECTORY}/apt.pem" "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem"
if [ "$(id -u)" = '0' ]; then
- chown _apt:root "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem"
+ chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem"
fi
echo "Acquire::https::CaInfo \"${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem\";" > rootdir/etc/apt/apt.conf.d/99https
echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
@@ -1960,7 +1960,7 @@ mkdir() {
command mkdir -m 700 -p "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial"
touch "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/lock"
if [ "$(id -u)" = '0' ]; then
- chown _apt:root "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial"
+ chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial"
fi
else
command mkdir "$@"