Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bb6f8dddd
|
||
|
|
0fbec83573
|
||
|
|
a6c99b72d0
|
||
|
|
c64c64dc97
|
||
|
|
319333e400
|
||
|
|
bb6f64e977
|
||
|
|
3b3764573e
|
||
|
|
8501a60165
|
@@ -41,15 +41,96 @@ jobs:
|
||||
- name: Install archiso and dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
pacman -Syu --noconfirm --needed archiso jq
|
||||
# Install with a *private* config instead of /etc/pacman.conf.
|
||||
# The host config is shared mutable state: the tests workflow
|
||||
# rewrites it and jobs overlap on this runner (runs 132 and 133
|
||||
# ran concurrently), so writing it here could corrupt a concurrent
|
||||
# tests run. It also carries [cachyos] and [chaotic-aur] leftovers
|
||||
# from tests.yaml, and syncing those two repos means extra DNS
|
||||
# lookups against a gateway that intermittently drops UDP/53 —
|
||||
# that is what failed run 131 at this very step. The build only
|
||||
# needs archiso/jq from extra; mkarchiso reads the *profile's*
|
||||
# pacman.conf for everything that goes into the ISO.
|
||||
BUILD_CONF=$(mktemp)
|
||||
trap 'rm -f "$BUILD_CONF"' EXIT
|
||||
cat > "$BUILD_CONF" << 'STOCKCONF'
|
||||
[options]
|
||||
DisableSandbox
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
CheckSpace
|
||||
ParallelDownloads = 5
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
- name: Ensure /dev/stdin exists for mkinitcpio
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
STOCKCONF
|
||||
sed -i 's/^ //' "$BUILD_CONF"
|
||||
|
||||
# Warm the resolver cache for the mirrors we are about to query.
|
||||
# systemd-resolved serves later lookups from cache, so a gateway
|
||||
# UDP/53 burst cannot hit them again. Failures here are not fatal —
|
||||
# the retry loop below is the real safety net.
|
||||
for host in mirror.aarnet.edu.au gsl-syd.mm.fcix.net au.arch.niranjan.co; do
|
||||
for try in 1 2 3 4 5; do
|
||||
if getent hosts "$host" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
echo " ⏳ DNS for $host failed (try $try/5), retrying in $(( try * 3 ))s..."
|
||||
sleep $(( try * 3 ))
|
||||
done
|
||||
done
|
||||
|
||||
# The gateway drops DNS queries in bursts; one burst must not fail
|
||||
# the whole job, so retry with backoff before giving up.
|
||||
synced=0
|
||||
for try in 1 2 3 4 5; do
|
||||
if pacman --config "$BUILD_CONF" -Syu --noconfirm --needed archiso jq; then
|
||||
synced=1
|
||||
break
|
||||
fi
|
||||
echo " ⚠️ pacman -Syu failed (attempt $try/5), retrying in $(( try * 15 ))s..." >&2
|
||||
sleep $(( try * 15 ))
|
||||
done
|
||||
if [ "$synced" -ne 1 ]; then
|
||||
echo "❌ pacman -Syu failed after 5 attempts — giving up" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Ensure /dev/fd symlinks exist for mkinitcpio and procsub
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Docker/container environments may lack /dev/stdin; mkinitcpio needs it
|
||||
[ -e /dev/stdin ] || ln -sf /proc/self/fd/0 /dev/stdin
|
||||
[ -e /dev/stdout ] || ln -sf /proc/self/fd/1 /dev/stdout
|
||||
[ -e /dev/stderr ] || ln -sf /proc/self/fd/2 /dev/stderr
|
||||
# mkinitcpio's preset step pipes through /dev/stdin and bash process
|
||||
# substitution (< <(...)) uses /dev/fd; both break if these symlinks
|
||||
# are missing (they are normally created once at boot by mkinitcpio's
|
||||
# init). Two places need them, so cover both:
|
||||
# 1. the executor's own /dev: mkarchiso reads /dev/stdin on the host
|
||||
# (machine-id, version, pkglist) and the workflow's own scripts use
|
||||
# process substitution here. A no-op if the links already exist.
|
||||
ln -sfn /proc/self/fd /dev/fd
|
||||
ln -sfn /proc/self/fd/0 /dev/stdin
|
||||
ln -sfn /proc/self/fd/1 /dev/stdout
|
||||
ln -sfn /proc/self/fd/2 /dev/stderr
|
||||
# 2. the chroot's /dev: devtmpfs is single-instance, so mounting it
|
||||
# here yields the same tree that pacstrap/arch-chroot expose as
|
||||
# <chroot>/dev. When the executor's /dev is itself devtmpfs (1)
|
||||
# already fixed that tree; this pass is what makes it work when
|
||||
# the executor's /dev is a plain tmpfs or directory instead.
|
||||
d="$(mktemp -d)"
|
||||
trap 'umount "$d" 2>/dev/null || true; rmdir "$d" 2>/dev/null || true' EXIT
|
||||
mount -t devtmpfs devtmpfs "$d"
|
||||
ln -sfn /proc/self/fd "$d/fd"
|
||||
ln -sfn /proc/self/fd/0 "$d/stdin"
|
||||
ln -sfn /proc/self/fd/1 "$d/stdout"
|
||||
ln -sfn /proc/self/fd/2 "$d/stderr"
|
||||
ls -l "$d/fd" "$d/stdin" "$d/stdout" "$d/stderr"
|
||||
umount "$d"
|
||||
rmdir "$d"
|
||||
trap - EXIT
|
||||
|
||||
- name: Build Arch ISO
|
||||
run: |
|
||||
|
||||
@@ -36,7 +36,23 @@ jobs:
|
||||
rm -f /var/lib/pacman/sync/cachyos* /var/lib/pacman/sync/chaotic*
|
||||
|
||||
- name: Install prerequisites
|
||||
run: pacman -Syu --noconfirm --needed shellcheck yamllint
|
||||
run: |
|
||||
# The gateway intermittently drops UDP/53 (it failed build run 131
|
||||
# at the equivalent step); retry with backoff instead of dying on
|
||||
# the first bad DNS burst.
|
||||
synced=0
|
||||
for try in 1 2 3 4 5; do
|
||||
if pacman -Syu --noconfirm --needed shellcheck yamllint; then
|
||||
synced=1
|
||||
break
|
||||
fi
|
||||
echo "⚠️ pacman -Syu failed (attempt $try/5), retrying in $(( try * 15 ))s..." >&2
|
||||
sleep $(( try * 15 ))
|
||||
done
|
||||
if [ "$synced" -ne 1 ]; then
|
||||
echo "❌ pacman -Syu failed after 5 attempts — giving up" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up CachyOS repo
|
||||
run: |
|
||||
@@ -54,7 +70,20 @@ jobs:
|
||||
printf '\n[cachyos]\nInclude = /etc/pacman.d/cachyos-mirrorlist\n' \
|
||||
>> /etc/pacman.conf
|
||||
|
||||
pacman -Syu --noconfirm --needed
|
||||
# Retry: gateway drops UDP/53 in bursts (see run 131)
|
||||
synced=0
|
||||
for try in 1 2 3 4 5; do
|
||||
if pacman -Syu --noconfirm --needed; then
|
||||
synced=1
|
||||
break
|
||||
fi
|
||||
echo "⚠️ pacman -Syu failed (attempt $try/5), retrying in $(( try * 15 ))s..." >&2
|
||||
sleep $(( try * 15 ))
|
||||
done
|
||||
if [ "$synced" -ne 1 ]; then
|
||||
echo "❌ pacman -Syu failed after 5 attempts — giving up" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up chaotic-aur repo
|
||||
run: |
|
||||
@@ -65,7 +94,20 @@ jobs:
|
||||
printf '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n' \
|
||||
>> /etc/pacman.conf
|
||||
|
||||
pacman -Syu --noconfirm --needed
|
||||
# Retry: gateway drops UDP/53 in bursts (see run 131)
|
||||
synced=0
|
||||
for try in 1 2 3 4 5; do
|
||||
if pacman -Syu --noconfirm --needed; then
|
||||
synced=1
|
||||
break
|
||||
fi
|
||||
echo "⚠️ pacman -Syu failed (attempt $try/5), retrying in $(( try * 15 ))s..." >&2
|
||||
sleep $(( try * 15 ))
|
||||
done
|
||||
if [ "$synced" -ne 1 ]; then
|
||||
echo "❌ pacman -Syu failed after 5 attempts — giving up" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Lint shell scripts with ShellCheck
|
||||
run: |
|
||||
|
||||
@@ -5,3 +5,7 @@ out/
|
||||
# In-image copy of localrepo/ — populated by localrepo/update.sh and
|
||||
# .gitea/workflows/build-iso.yaml, shipped as /opt/localrepo on the ISO
|
||||
airootfs/opt/localrepo/
|
||||
|
||||
# Build stamp staged by profiledef.sh at ISO build time (see AGENTS.md);
|
||||
# consumed by customize_airootfs.sh, never committed
|
||||
airootfs/root/.iso-build-stamp
|
||||
|
||||
@@ -49,12 +49,12 @@ install them into the target without the network.
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `packages.x86_64` | Live ISO package list (~402 packages) |
|
||||
| `profiledef.sh` | ISO metadata, compression, boot modes |
|
||||
| `profiledef.sh` | ISO metadata, compression, boot modes, build-stamp staging |
|
||||
| `pacman.conf` | Repos: cachyos → core → extra → multilib → chaotic-aur → local-aur |
|
||||
| `bootstrap_packages` | Minimal build-time packages (`base`, `arch-install-scripts`) |
|
||||
| `airootfs/root/customize_airootfs.sh` | Runs inside chroot during build: keyrings, skel dotfiles (incl. end4-pC), qsConfig patch, end-4 `install-deps`, package harvest, uv/font pre-warm |
|
||||
| `airootfs/root/.live-pacman.conf` | `/etc/pacman.conf` of the built image (adds `[local-aur]` = `file:///opt/localrepo`) |
|
||||
| `airootfs/usr/local/bin/alvin-install` | Installer: partitions, pacstrap, user, end-4 dotfiles (`--skip-alldeps`), boot |
|
||||
| `airootfs/usr/local/bin/alvin-install` | Installer: partitions, pacstrap, LUKS (systemd initramfs **or** experimental unl0kr + optional TPM2 unlock), user, git identity + GitHub SSH keys, login manager (none/greetd/sddm/gdm) + autologin, end-4 dotfiles (`--skip-alldeps`), build-stamp motd, boot |
|
||||
| `localrepo/build-end4-deps.sh` | Non-interactive AUR builds for end-4 dependencies |
|
||||
| `localrepo/update.sh` | Regenerates localrepo DB, syncs names to packages.x86_64, syncs `airootfs/opt/localrepo/` |
|
||||
|
||||
@@ -72,3 +72,4 @@ install them into the target without the network.
|
||||
- End-4 metapackages are built from `localrepo/end4-pkgbuilds/` (quickshell-git, bibata-modern-classic-bin, microtex-git).
|
||||
- `packages.x86_64` is sorted alphabetically. Keep it sorted when adding/removing entries.
|
||||
- `airootfs/opt/localrepo/` is a build artifact (gitignored) — never commit it.
|
||||
- **Build stamp flow**: `profiledef.sh` (sourced by mkarchiso) stages the gitignored `airootfs/root/.iso-build-stamp` when a `.git` dir exists **or** `CI`/`GITEA_ACTIONS` is set — line reads `AlvinArch build <date> | commit <date> | <4-char hash>` (falls back to `commit unknown` if `git -c safe.directory` can't read the repo; without `.git`/CI no file is staged). `customize_airootfs.sh` installs it as `/etc/alvin-build-stamp` on the live medium, and `alvin-install`'s `install_motd` copies the live `/etc/motd` banner to the target and appends the stamp. If the medium has no stamp, the installed system gets no motd from us.
|
||||
|
||||
@@ -50,6 +50,7 @@ AlvinArch/
|
||||
### Key Features
|
||||
|
||||
- **Hyprland + end-4** — Wayland compositor with illogical-impulse dotfiles (quickshell, bibata cursors, microtex)
|
||||
- **Automated installer (`alvin-install`)** — gum TUI: LUKS with systemd initramfs or experimental touchscreen unl0kr, optional TPM2 auto-unlock, GitHub SSH key import, login manager choice (none/greetd/sddm/gdm), autologin, and a build stamp in `/etc/motd`
|
||||
- **LazyVim** — Pre-configured Neovim with lazy.nvim and curated plugins
|
||||
- **Fish + Zsh + Starship** — Dual shell setup with oh-my-zsh and a cross-shell prompt
|
||||
- **Local AUR repo** — Pre-built packages (end-4 deps, wallust, grub-customizer, etc.) that aren't in official repos
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# The chroot's /dev is the kernel's single shared devtmpfs, which only gets the
|
||||
# fd/stdin/stdout/stderr symlinks at boot (from mkinitcpio's init). If the
|
||||
# runner environment lacks them, process substitution (< <(...)) and upstream
|
||||
# tools (pacman-key) fail with "… /dev/fd/63: No such file or directory".
|
||||
# Self-heal here; the CI build-iso workflow does the same before pacstrap so
|
||||
# that mkinitcpio's hook (which pipes through /dev/stdin) works too.
|
||||
for _link in "fd:/proc/self/fd" "stdin:/proc/self/fd/0" \
|
||||
"stdout:/proc/self/fd/1" "stderr:/proc/self/fd/2"; do
|
||||
[[ -e "/dev/${_link%%:*}" || -L "/dev/${_link%%:*}" ]] ||
|
||||
ln -sfn "${_link#*:}" "/dev/${_link%%:*}"
|
||||
done
|
||||
unset _link
|
||||
|
||||
# Populate the keyring in the built root from the keyring bundles
|
||||
# (/usr/share/pacman/keyrings, incl. the copied cachyos keyring).
|
||||
# This mirrors the guide; it runs inside the image you are making.
|
||||
@@ -14,6 +27,13 @@ pacman-key --populate archlinux cachyos chaotic
|
||||
install -m 0644 /root/.live-pacman.conf /etc/pacman.conf
|
||||
rm -f /root/.live-pacman.conf
|
||||
|
||||
# Build stamp staged by profiledef.sh (absent for non-git, non-CI builds):
|
||||
# keep it where alvin-install looks for it, drop the staging copy.
|
||||
if [[ -f /root/.iso-build-stamp ]]; then
|
||||
install -m 0644 /root/.iso-build-stamp /etc/alvin-build-stamp
|
||||
rm -f /root/.iso-build-stamp
|
||||
fi
|
||||
|
||||
# ============================================================================
|
||||
# Pre-install dotfile dependencies into /etc/skel so new users get them
|
||||
# instantly on first login (no network required).
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -87,6 +87,9 @@ done
|
||||
info "═══ Step 2: Building AUR dependencies ═══"
|
||||
|
||||
# ── Theming & appearance ─────────────────────────────────────────────────────
|
||||
# Entries in these lists must start at column 0: CI's package check accepts
|
||||
# repo-less packages via `grep -qxF <pkg>` against this file (exact whole-line
|
||||
# match), which silently never matched while the names were indented.
|
||||
AUR_THEMING=(
|
||||
adw-gtk-theme-git
|
||||
darkly-bin
|
||||
@@ -111,7 +114,6 @@ AUR_TOOLS=(
|
||||
AUR_MISSING=(
|
||||
asciinema-agg
|
||||
davs2
|
||||
syncthingtray-qt6
|
||||
varia
|
||||
woeusb-ng
|
||||
ttf-ms-fonts
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-1
@@ -46,6 +46,7 @@ cpio
|
||||
cronie
|
||||
cryptsetup
|
||||
cups
|
||||
curl
|
||||
darkhttpd
|
||||
davs2
|
||||
dconf-editor
|
||||
@@ -321,7 +322,7 @@ starship
|
||||
sudo
|
||||
swaync
|
||||
syncthing
|
||||
syncthingtray-qt6
|
||||
syncthingtray
|
||||
syntax-highlighting
|
||||
syslinux
|
||||
systemd-resolvconf
|
||||
|
||||
@@ -24,3 +24,32 @@ file_permissions=(
|
||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
)
|
||||
|
||||
# ── Build stamp (staged file, never committed) ────────────────────────────────
|
||||
# airootfs/root/.iso-build-stamp lands at /root/.iso-build-stamp on the ISO;
|
||||
# customize_airootfs.sh installs it as /etc/alvin-build-stamp, and alvin-install
|
||||
# appends it to the installed system's /etc/motd. Only stamp builds from a git
|
||||
# checkout or CI — a random source-tarball build would record a bogus commit.
|
||||
# Sourced by mkarchiso under `set -eu`, hence every expansion is defaulted.
|
||||
_stamp_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
_stamp_file="${_stamp_dir}/airootfs/root/.iso-build-stamp"
|
||||
rm -f "${_stamp_file}"
|
||||
if [[ -e "${_stamp_dir}/.git" || -n "${CI:-}" || -n "${GITEA_ACTIONS:-}" ]]; then
|
||||
_stamp_build="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
|
||||
# git ≥2.46 honours -c safe.directory even when mkarchiso runs as root
|
||||
# over a user-owned checkout; older gits ignore it (protected-config
|
||||
# scope) and fall through to the "unknown" line below instead of failing
|
||||
# the build (`|| true` keeps set -e happy either way).
|
||||
_stamp_commit="$(git -C "${_stamp_dir}" -c safe.directory="${_stamp_dir}" \
|
||||
log -1 --format='%cs|%h' 2>/dev/null || true)"
|
||||
if [[ -n "${_stamp_commit}" && "${_stamp_commit}" == *"|"* ]]; then
|
||||
_stamp_hash="${_stamp_commit##*|}"
|
||||
printf 'AlvinArch build %s | commit %s | %s\n' \
|
||||
"${_stamp_build}" "${_stamp_commit%%|*}" "${_stamp_hash:0:4}" \
|
||||
> "${_stamp_file}"
|
||||
else
|
||||
printf 'AlvinArch build %s | commit unknown\n' \
|
||||
"${_stamp_build}" > "${_stamp_file}"
|
||||
fi
|
||||
fi
|
||||
unset _stamp_dir _stamp_file _stamp_build _stamp_commit _stamp_hash
|
||||
|
||||
Reference in New Issue
Block a user