Tests / tests (push) Successful in 2m50s
- alvin-install: new sshd screen (default on) + install step. openssh is guaranteed into the pacstrap list when requested, and the final banner reports whether the enable actually succeeded (SSHD_APPLIED) instead of what was selected. The prompt warns that password login uses the same password as LUKS, and only mentions the GitHub key import when a username was given. - alvin-install: replay the `gsettings set` commands end-4 logged during its setup run with a clean env and a throwaway session bus as the target user, then read each key back in a second session to confirm it persisted (gvariant_unescape normalizes both '...' and "..." GVariant output). The venv check now walks the uv bin/python symlink chain, re-rooting absolute hops under $TARGET, since that link dangles on the live medium. - build: append the build stamp to the live /etc/motd (keeps the installed system's motd untouched) and drop alvin-install's install_motd step. - docs: installer sections in README/AGENTS.md, sshd notes, corrected line counts.
57 lines
2.7 KiB
Bash
57 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 keeps it as /etc/alvin-build-stamp and appends it to
|
|
# the live medium's /etc/motd (the installed system's motd is left alone).
|
|
# 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
|