diff mbox

[devtools] fix potential non-writable directories of builduser in /build

Message ID 20170222121603.13516-1-anthraxx@archlinux.org
State Accepted
Headers show

Commit Message

Levente Polyak Feb. 22, 2017, 12:16 p.m. UTC
This removes the preservation of HOME being /build just for the pacman
sudo call. Former leads to unbuildable packages when an to be installed
dependency writes something into the HOME dir (f.e. .config). The
resulting directories won't be writable by the builduser as they are
owned by root:root and ultimately will fail to build anything that
requires so.
---
 makechrootpkg.in | 1 -
 1 file changed, 1 deletion(-)

Comments

Giancarlo Razzolini Feb. 22, 2017, 3:43 p.m. UTC | #1
Em fevereiro 22, 2017 9:16 Levente Polyak escreveu:
> This removes the preservation of HOME being /build just for the pacman
> sudo call. Former leads to unbuildable packages when an to be installed
> dependency writes something into the HOME dir (f.e. .config). The
> resulting directories won't be writable by the builduser as they are
> owned by root:root and ultimately will fail to build anything that
> requires so.

See this line[0] for the reason that triggered this patch.

[0]https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/keepass-plugin-keeagent#n22
diff mbox

Patch

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 284d444..0336640 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -173,7 +173,6 @@  prepare_chroot() {
 	done
 
 	cat > "$copydir/etc/sudoers.d/builduser-pacman" <<EOF
-Defaults env_keep += "HOME"
 builduser ALL = NOPASSWD: /usr/bin/pacman
 EOF
 	chmod 440 "$copydir/etc/sudoers.d/builduser-pacman"