From e4de321c6e96eaa24639ed05befcea62dc3b3182 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 7 Aug 2024 06:46:51 +0200 Subject: initial commit --- build-image | 22 ++++++++++++++++++++++ slave.Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 build-image create mode 100644 slave.Dockerfile diff --git a/build-image b/build-image new file mode 100755 index 0000000..d3a2af0 --- /dev/null +++ b/build-image @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ "x$1" = 'x--pull' ]; then + shift + git pull --ff-only +fi + +key_id='5FDCA472AB93292BC678FD59255A76DB9A12601A' + +pkill keyboxd +gpg --recv-keys ${key_id} +gpg -a --export-secret-keys ${key_id} > keys + +for i in {1..5}; do + printf 'Server = http://pkgcache.eckner.net/arch/$arch/$repo\n' +done >mirrorlist + +docker buildx build "$@" -f slave.Dockerfile -t arch32-slave . || exit $? + +rm keys +rm mirrorlist + diff --git a/slave.Dockerfile b/slave.Dockerfile new file mode 100644 index 0000000..f0182d3 --- /dev/null +++ b/slave.Dockerfile @@ -0,0 +1,22 @@ +FROM archlinux:base-devel + +WORKDIR /builder/ + +RUN pacman-key --init +RUN curl -Ss https://arch.eckner.net/README | sed 's@^Server = https:.*$@Include = /etc/pacman.d/mirrorlist \\@' | bash +COPY mirrorlist /etc/pacman.d/ +RUN pacman -Syu --noconfirm git +RUN sed -i ' \ + /PACKAGER/ s/.*/PACKAGER="Erich Eckner "/; \ + /^OPTIONS/ s/ debug/ !debug/ \ +' /etc/makepkg.conf + +RUN useradd -m builder +RUN git clone https://git.archlinux32.org/builder/ /builder +RUN mkdir /builder/work + +RUN chown builder:builder /builder/work + +USER builder + +CMD /builder/bin/build-packages -- cgit v1.2.3-70-g09d2