artools only embeds internal LiveOS md5 files; nothing verifies the ISO itself. Emit <iso>.sha256 alongside the artifact in both CI and the podman build script so releases ship a verifiable checksum.
41 lines
1.5 KiB
Bash
Executable File
41 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Antergos NeXT ISO build inside the Artix container (see Containerfile).
|
|
# Rootful podman is required: artools' chroot mounts devtmpfs, which rootless
|
|
# containers cannot do.
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# 1. Ensure the build image exists (rootful — the run step below is rootful,
|
|
# and rootless podman uses a separate image store)
|
|
if ! sudo podman image exists localhost/antergos-build:latest; then
|
|
sudo podman build -t antergos-build .
|
|
fi
|
|
|
|
# 2. Run the build (privileged, workspace mounted, tmpfs workdir, ISO exported)
|
|
sudo podman run --rm --privileged --entrypoint sh \
|
|
-v "$(pwd):/workspace" \
|
|
-e WORKSPACE_DIR=/workspace \
|
|
-e INITSYS=dinit \
|
|
localhost/antergos-build:latest -c '
|
|
set -euo pipefail
|
|
mkdir -p /var/lib/artools/buildiso
|
|
mount -t tmpfs -o size=12G,exec,suid,dev tmpfs /var/lib/artools/buildiso
|
|
modprobe loop 2>/dev/null || true
|
|
[ -e /dev/loop-control ] || mknod -m 0660 /dev/loop-control c 10 237
|
|
for i in $(seq 0 15); do
|
|
[ -e "/dev/loop$i" ] || mknod -m 0660 "/dev/loop$i" b 7 "$i"
|
|
done
|
|
/workspace/buildiso -p antergos
|
|
echo "=== BUILD FINISHED ==="
|
|
mkdir -p /workspace/iso-output
|
|
cp -a /workspace/iso/antergos/. /workspace/iso-output/ 2>/dev/null || true
|
|
cd /workspace/iso-output
|
|
ISO=$(ls antergos-*.iso 2>/dev/null | head -1)
|
|
[[ -z "$ISO" || ! -f "$ISO" ]] && { echo "No ISO found in iso-output/"; exit 1; }
|
|
sha256sum "$ISO" > "$ISO.sha256"
|
|
cat "$ISO.sha256"
|
|
ls -la /workspace/iso-output/ | head -20
|
|
'
|