Browse Source

work with no keep-id

Signed-off-by: fbt <fbt@fleshless.org>
master
Jack L. Frost 8 months ago
parent
commit
0a31377fcd
  1. 13
      autobuilder/build
  2. 1
      makepkg-podman

13
autobuilder/build

@ -3,14 +3,21 @@
# Upgrade
pacman -Suy --noconfirm
# Create a builder user
groupadd -g 1100 builder
useradd -g 1100 -u 1100 builder
# gnupg dir permissions
chown -R "$BUILDUSER:$BUILDUSER" /.gnupg
chown -R builder:builder /.gnupg /buildroot
# Add sudo permissions for pacman to install dependencies
printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' "$BUILDUSER" > /etc/sudoers.d/builduser
printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' builder > /etc/sudoers.d/builduser
# Workdir
cd /buildroot
# Build the damn thing
sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg "$@"
sudo -u builder GNUPGHOME="/.gnupg" makepkg "$@"
# Return the permissions
chown -R root:root /buildroot

1
makepkg-podman

@ -4,7 +4,6 @@ image=${PODMAN_IMAGE:-localhost/spark:autobuilder}
podman_cmd=(
podman run --rm -it -u root
--userns=keep-id
-v "$PWD:/buildroot"
--workdir /buildroot
--name "autobuilder.$$"

Loading…
Cancel
Save