Revert "rootbld: run mkusers inside the chroot and don't affect host users"
We can't run mkusers inside the chroot because of bwrap peculiarities.
Presently, rootbld does therefore not work at all for APKBUILDs which
use $pkggroups/$pkguser. While not polluting the host is a noble goal
it isn't really useful if it causes rootbld to be incapable of building
certain packages (i.e. those using $pkggroups/$pkguser with groups
not existent on the host).
This commit therefore restores the original behavior for now. While at
it, I also added a comment to the mkusers invocation.
See: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10094
This reverts commit 84d7b7693d
.
This commit is contained in:
parent
7e82b6a34b
commit
c9b4146aaa
|
@ -2483,7 +2483,7 @@ rootbld_actions() {
|
||||||
if ! want_check; then
|
if ! want_check; then
|
||||||
_check=true
|
_check=true
|
||||||
fi
|
fi
|
||||||
for part in symlinksrc unpack prepare mkusers build $_check rootpkg; do
|
for part in symlinksrc unpack prepare build $_check rootpkg; do
|
||||||
runpart $part
|
runpart $part
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -2541,6 +2541,13 @@ rootbld() {
|
||||||
|
|
||||||
msg "Preparing build chroot..."
|
msg "Preparing build chroot..."
|
||||||
|
|
||||||
|
# Unfortunately, we can't create the users inside the chroot.
|
||||||
|
# Hence, we need to do it on the host which is not optimal as it
|
||||||
|
# pollutes the host's /etc/group and /etc/passwd file.
|
||||||
|
#
|
||||||
|
# See https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10094
|
||||||
|
mkusers
|
||||||
|
|
||||||
BUILD_ROOT=$(mktemp -d /var/tmp/abuild.XXXXXXXXXX)
|
BUILD_ROOT=$(mktemp -d /var/tmp/abuild.XXXXXXXXXX)
|
||||||
|
|
||||||
mkdir -p "$BUILD_ROOT/proc" "$BUILD_ROOT/etc/apk/keys" \
|
mkdir -p "$BUILD_ROOT/proc" "$BUILD_ROOT/etc/apk/keys" \
|
||||||
|
|
Loading…
Reference in New Issue