All checks were successful
Build Aurora / build (push) Successful in 8m22s
Upstream has no arm64 Aurora or akmods. A stand-in akmods image carries Fedora's own aarch64 kernel (the one Kinoite ships) and no extra kmods; buildah-arm64 makes `just build` target linux/arm64. Vendoring now copies every architecture, and both builds prune their images when done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.8 KiB
Bash
Executable file
41 lines
1.8 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Stands in for ghcr.io/ublue-os/akmods on arm64, which upstream doesn't
|
|
# build: an image with the akmods image's layout (/kernel-rpms, /rpms/common,
|
|
# /rpms/kmods), holding Fedora's own aarch64 kernel from Koji and no extra
|
|
# kmods (so no xone or v4l2loopback on arm64). Pushed where the runner's
|
|
# registries.conf looks first for ghcr.io/ublue-os/akmods (the mirror), so
|
|
# Containerfile.in's `FROM ghcr.io/ublue-os/akmods:...` finds it.
|
|
#
|
|
# Usage: akmods-arm64.sh FLAVOR FEDORA KERNEL
|
|
# e.g. akmods-arm64.sh main 45 7.2.14-300.fc45.aarch64
|
|
# Needs a `podman login` to the forge first.
|
|
set -euo pipefail
|
|
|
|
flavor=$1 fedora=$2 kernel=$3
|
|
mirror=${MIRROR:-forge.quinefoundation.com/quine-global-labs/mirror}
|
|
ref="$mirror/ghcr.io/ublue-os/akmods:$flavor-$fedora-$kernel"
|
|
|
|
nvr=${kernel%.aarch64} # 7.2.14-300.fc45
|
|
version=${nvr%%-*} # 7.2.14
|
|
release=${nvr#*-} # 300.fc45
|
|
koji="https://kojipkgs.fedoraproject.org/packages/kernel/$version/$release/aarch64"
|
|
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
mkdir -p "$work/kernel-rpms" "$work/rpms/common" "$work/rpms/kmods"
|
|
for pkg in kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra; do
|
|
curl -fsSL --retry 5 -o "$work/kernel-rpms/$pkg-$nvr.aarch64.rpm" "$koji/$pkg-$nvr.aarch64.rpm"
|
|
done
|
|
ls -l "$work/kernel-rpms"
|
|
# Empty directories, so the bind mounts of /rpms/* have something to mount.
|
|
touch "$work/rpms/common/.keep" "$work/rpms/kmods/.keep"
|
|
|
|
ctr=$(buildah from --arch arm64 --os linux scratch)
|
|
trap 'buildah rm "$ctr" >/dev/null; rm -rf "$work"' EXIT
|
|
buildah copy "$ctr" "$work/kernel-rpms" /kernel-rpms
|
|
buildah copy "$ctr" "$work/rpms" /rpms
|
|
buildah config --arch arm64 --os linux --label "ostree.linux=$kernel" "$ctr"
|
|
buildah commit --rm "$ctr" "$ref"
|
|
trap 'rm -rf "$work"' EXIT
|
|
podman push --retry 5 "$ref"
|
|
echo "pushed $ref"
|