Tests / tests (push) Failing after 2m33s
- profiledef.sh stages airootfs/root/.iso-build-stamp (git/CI gated, falls back to 'commit unknown'); customize_airootfs.sh installs it as /etc/alvin-build-stamp; install_motd appends it to the target /etc/motd - alvin-install: skippable git/GitHub screens with ssh-import-id import (yay build + python-distro, curl .keys fallback), LUKS Mode A (systemd sd-encrypt + rd.luks.name) vs Mode B (unl0kr + cryptdevice), TPM2 enrollment via $PASSWORD with rd.luks.options activation, unl0kr build/verify with Mode-A fallback, login manager none/greetd/sddm/gdm (enable DM before disabling getty@tty1), autologin per DM (forced off when TPM enrolled), build-stamp motd; includes the existing GRUB_DISABLE_BOOTNEXT grub tweak - review fixes: greetd autologin TOML quoting, .ssh chowned before ssh-import-id, builtin-aware initramfs module verification across all installed kernels, curl exit-code split (fetch failure vs no keys), plain Hyprland on every login path - add curl to packages.x86_64; document stamp flow and installer in AGENTS.md/README.md
56 lines
2.7 KiB
Bash
56 lines
2.7 KiB
Bash
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2034
|
|
|
|
iso_name="Alvin archlinux"
|
|
iso_label="AlvinArch_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
|
iso_publisher="Arch Linux <https://archlinux.org>"
|
|
iso_application="Alvin Arch Linux Live ISO"
|
|
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
|
install_dir="arch"
|
|
buildmodes=('iso')
|
|
bootmodes=('bios.syslinux'
|
|
'uefi.systemd-boot')
|
|
pacman_conf="pacman.conf"
|
|
airootfs_image_type="squashfs"
|
|
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86,arm64' '-b' '1M' '-Xdict-size' '1M')
|
|
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
|
|
file_permissions=(
|
|
["/etc/shadow"]="0:0:400"
|
|
["/root"]="0:0:750"
|
|
["/root/.automated_script.sh"]="0:0:755"
|
|
["/root/.gnupg"]="0:0:700"
|
|
["/usr/local/bin/choose-mirror"]="0:0:755"
|
|
["/usr/local/bin/alvin-install"]="0:0:755"
|
|
["/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
|