From ca73f5eeaf6c61260e6064e0f4400e23962d5a73 Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 6 Mar 2021 06:48:58 +0300 Subject: [PATCH] sudo should be dynamic then too Signed-off-by: fbt --- autobuilder/Containerfile | 6 ++---- autobuilder/build | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/autobuilder/Containerfile b/autobuilder/Containerfile index c48de7e..31b614a 100644 --- a/autobuilder/Containerfile +++ b/autobuilder/Containerfile @@ -1,12 +1,10 @@ FROM localhost/spark +RUN pacman -Suy --noconfirm base-devel git COPY locale.gen /etc/locale.gen RUN locale-gen -RUN pacman -Suy --noconfirm base-devel git - -COPY ./builder.sudoers /etc/sudoers.d/builder +COPY gnupg /.gnupg COPY ./build /build -COPY gnupg /.gnupg RUN chmod 700 /.gnupg diff --git a/autobuilder/build b/autobuilder/build index a4497d1..db35ea5 100755 --- a/autobuilder/build +++ b/autobuilder/build @@ -11,6 +11,9 @@ pacman -Suy --noconfirm # gnupg dir permissions chown -R "$BUILDUSER:$BUILDUSER" /.gnupg +# Add sudo permissions for pacman to install dependencies +printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' "$BUILDUSER" > /etc/sudoers.d/builduser + # Workdir cd /buildroot