universalize!
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
ca73f5eeaf
commit
d42669565c
|
@ -1,5 +1,5 @@
|
||||||
FROM localhost/spark
|
FROM localhost/spark
|
||||||
RUN pacman -Suy --noconfirm base-devel git
|
RUN pacman -Suy --noconfirm base-devel
|
||||||
|
|
||||||
COPY locale.gen /etc/locale.gen
|
COPY locale.gen /etc/locale.gen
|
||||||
RUN locale-gen
|
RUN locale-gen
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
export PKG_URL=$1
|
|
||||||
|
|
||||||
# Upgrade
|
# Upgrade
|
||||||
pacman -Suy --noconfirm
|
pacman -Suy --noconfirm
|
||||||
|
@ -18,4 +17,4 @@ printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' "$BUILDUSER" > /etc/sudoers.d/
|
||||||
cd /buildroot
|
cd /buildroot
|
||||||
|
|
||||||
# Build the damn thing
|
# Build the damn thing
|
||||||
sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg -s --noconfirm -L
|
sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg "$@"
|
||||||
|
|
|
@ -10,7 +10,7 @@ pkg_url=$2
|
||||||
#podman run --userns=keep-id -u root --rm -v "/tmp/$did:/buildroot" "spark:autobuilder" /build
|
#podman run --userns=keep-id -u root --rm -v "/tmp/$did:/buildroot" "spark:autobuilder" /build
|
||||||
git clone "$pkg_url" "/tmp/$did"
|
git clone "$pkg_url" "/tmp/$did"
|
||||||
cd "/tmp/$did"
|
cd "/tmp/$did"
|
||||||
makepkg-podman 'localhost/spark:autobuilder'
|
PODMAN_IMAGE='localhost/spark:autobuilder' makepkg-podman --noconfirm -sL
|
||||||
|
|
||||||
artifacts=( "/tmp/$did/"*.pkg.* )
|
artifacts=( "/tmp/$did/"*.pkg.* )
|
||||||
for i in "${artifacts[@]}"; do
|
for i in "${artifacts[@]}"; do
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
image=${1:-localhost/spark:autobuilder}
|
image=${PODMAN_IMAGE:-localhost/spark:autobuilder}
|
||||||
|
|
||||||
podman_cmd=(
|
podman_cmd=(
|
||||||
podman run --rm -u root
|
podman run --rm -u root
|
||||||
|
@ -9,8 +9,7 @@ podman_cmd=(
|
||||||
--workdir /buildroot
|
--workdir /buildroot
|
||||||
--name "autobuilder.$$"
|
--name "autobuilder.$$"
|
||||||
--env "BUILDUSER=$USER"
|
--env "BUILDUSER=$USER"
|
||||||
--entrypoint /build
|
"$image" /build "$@"
|
||||||
"$image"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
"${podman_cmd[@]}"
|
"${podman_cmd[@]}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user