From d42669565c76f992e000c8162618f4e4cc8cde89 Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 6 Mar 2021 07:06:47 +0300 Subject: [PATCH] universalize! Signed-off-by: fbt --- autobuilder/Containerfile | 2 +- autobuilder/build | 3 +-- makepkg-ci | 2 +- makepkg-podman | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/autobuilder/Containerfile b/autobuilder/Containerfile index 31b614a..1c695ba 100644 --- a/autobuilder/Containerfile +++ b/autobuilder/Containerfile @@ -1,5 +1,5 @@ FROM localhost/spark -RUN pacman -Suy --noconfirm base-devel git +RUN pacman -Suy --noconfirm base-devel COPY locale.gen /etc/locale.gen RUN locale-gen diff --git a/autobuilder/build b/autobuilder/build index db35ea5..ef0097a 100755 --- a/autobuilder/build +++ b/autobuilder/build @@ -3,7 +3,6 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin export LC_ALL=en_US.UTF-8 -export PKG_URL=$1 # Upgrade pacman -Suy --noconfirm @@ -18,4 +17,4 @@ printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' "$BUILDUSER" > /etc/sudoers.d/ cd /buildroot # Build the damn thing -sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg -s --noconfirm -L +sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg "$@" diff --git a/makepkg-ci b/makepkg-ci index e8f593f..239d4b4 100755 --- a/makepkg-ci +++ b/makepkg-ci @@ -10,7 +10,7 @@ pkg_url=$2 #podman run --userns=keep-id -u root --rm -v "/tmp/$did:/buildroot" "spark:autobuilder" /build git clone "$pkg_url" "/tmp/$did" cd "/tmp/$did" -makepkg-podman 'localhost/spark:autobuilder' +PODMAN_IMAGE='localhost/spark:autobuilder' makepkg-podman --noconfirm -sL artifacts=( "/tmp/$did/"*.pkg.* ) for i in "${artifacts[@]}"; do diff --git a/makepkg-podman b/makepkg-podman index a73f7d8..a1b663b 100755 --- a/makepkg-podman +++ b/makepkg-podman @@ -1,6 +1,6 @@ #!/usr/bin/env bash -image=${1:-localhost/spark:autobuilder} +image=${PODMAN_IMAGE:-localhost/spark:autobuilder} podman_cmd=( podman run --rm -u root @@ -9,8 +9,7 @@ podman_cmd=( --workdir /buildroot --name "autobuilder.$$" --env "BUILDUSER=$USER" - --entrypoint /build - "$image" + "$image" /build "$@" ) "${podman_cmd[@]}"