unos-repository

APK repository for unos
git clone git://git.finwo.net/misc/unos-repository
Log | Files | Refs | README

commit 34f9b4542b4fa93178dfca86c4cb632c8ad0f2ae
parent 49e247d6cf79eba2145da12978a2a7c28ebc0da5
Author: Robin Bron <robin.bron@yourhosting.nl>
Date:   Mon, 28 Sep 2026 23:33:48 +0200

More builder setup

Diffstat:
M.conductor.yml | 2+-
A.dockerignore | 5+++++
Mbuilder/Dockerfile | 9+++++----
Mbuilder/VERSION | 2+-
Mmk/bootstrap-host.sh | 17++++++++++++++++-
5 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/.conductor.yml b/.conductor.yml @@ -6,7 +6,7 @@ version: 1 defaults: - image: finwo/unos-builder:0.1.0 + image: finwo/unos-builder:0.2.0 timeout: 2h env: DEBIAN_FRONTEND: noninteractive diff --git a/.dockerignore b/.dockerignore @@ -0,0 +1,5 @@ +build/ +.git/ +.sign-key +channels/ +tests/ diff --git a/builder/Dockerfile b/builder/Dockerfile @@ -1,10 +1,11 @@ -# UNOS build toolchain. Bump builder/VERSION whenever this or mk/ci-setup.sh -# changes, or the pipeline keeps running against the previously pushed tag. +# Bump builder/VERSION when this, mk/ci-setup.sh or the bootstrap pins change. FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive -COPY mk/ci-setup.sh /tmp/ci-setup.sh -RUN /tmp/ci-setup.sh --install-only && rm -f /tmp/ci-setup.sh +COPY mk /tmp/mk +RUN /tmp/mk/ci-setup.sh --install-only \ + && UNOS_HOSTDIR=/opt/unos-host /tmp/mk/bootstrap-host.sh \ + && rm -rf /tmp/mk /tmp/build WORKDIR /work diff --git a/builder/VERSION b/builder/VERSION @@ -1 +1 @@ -0.1.0 +0.2.0 diff --git a/mk/bootstrap-host.sh b/mk/bootstrap-host.sh @@ -31,7 +31,9 @@ set -eu HERE=$(cd "$(dirname "$0")" && pwd) ROOT=$(cd "${HERE}/.." && pwd) -HOSTDIR="${ROOT}/build/host" +# UNOS_HOSTDIR builds into the builder image; UNOS_HOST_CACHE seeds from it. +HOSTDIR="${UNOS_HOSTDIR:-${ROOT}/build/host}" +HOST_CACHE="${UNOS_HOST_CACHE:-/opt/unos-host}" SRCDEST="${ROOT}/build/work/sources" WORK="${ROOT}/build/work/hostbootstrap" @@ -124,6 +126,19 @@ if [ "${FORCE}" != "1" ] && check_tools 2>/dev/null; then exit 0 fi +# Prebuilt in the builder image; copying beats recompiling muon and apk in +# every task. Version-checked after, so a stale cache still rebuilds. +if [ "${FORCE}" != "1" ] && [ "${HOST_CACHE}" != "${HOSTDIR}" ] \ + && [ -x "${HOST_CACHE}/bin/apk" ]; then + mkdir -p "${HOSTDIR}" + cp -a "${HOST_CACHE}/." "${HOSTDIR}/" + if check_tools 2>/dev/null; then + msg "host tools seeded from ${HOST_CACHE}" + exit 0 + fi + msg "cache at ${HOST_CACHE} is stale, rebuilding" +fi + command -v cc >/dev/null 2>&1 || command -v gcc >/dev/null 2>&1 \ || die "no C compiler on PATH"