From 1b81ad49148fc6cc9bf2893e758ac3b45ca5049c Mon Sep 17 00:00:00 2001 From: Karim Date: Sat, 20 Jun 2026 02:09:54 +0200 Subject: [PATCH] iso: fresh work dir each build (avoid stale-stage reuse) + modern bootmodes mkarchiso reuses completed stages in the work dir -> a 'too short' build that ships a stale airootfs. bootstrap now 'rm -rf' the work dir first. Also switch profiledef bootmodes to the non-deprecated names (bios.syslinux, uefi.systemd-boot). Co-Authored-By: Claude Opus 4.8 --- iso/bootstrap-profile.sh | 9 ++++++--- .../modules/shellprocess-striplive.conf | 2 +- iso/build-profile/airootfs/etc/hostname | 2 +- iso/build-profile/airootfs/etc/motd | 10 ++-------- iso/build-profile/airootfs/etc/os-release | 11 +++++++++++ iso/build-profile/airootfs/root/.bash_profile | 6 ------ iso/build-profile/airootfs/root/.zprofile | 5 +++++ .../loader/entries/01-archiso-linux.conf | 2 +- .../entries/02-archiso-speech-linux.conf | 2 +- iso/build-profile/grub/grub.cfg | 4 ++-- iso/build-profile/grub/loopback.cfg | 4 ++-- iso/build-profile/profiledef.sh | 8 +++++++- iso/build-profile/syslinux/archiso_head.cfg | 2 +- .../syslinux/archiso_pxe-linux.cfg | 18 +++++++++--------- .../syslinux/archiso_sys-linux.cfg | 12 ++++++------ iso/overrides/profiledef.sh | 3 +-- 16 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 iso/build-profile/airootfs/etc/os-release delete mode 100644 iso/build-profile/airootfs/root/.bash_profile create mode 100644 iso/build-profile/airootfs/root/.zprofile diff --git a/iso/bootstrap-profile.sh b/iso/bootstrap-profile.sh index d4acf27..f8b1ea8 100755 --- a/iso/bootstrap-profile.sh +++ b/iso/bootstrap-profile.sh @@ -39,10 +39,13 @@ install -m644 "$HERE/overrides/pacman.conf" "$PROFILE/pacman.conf" cp -rT "$HERE/overrides/airootfs" "$PROFILE/airootfs" echo "==> profile ready: $PROFILE" +WORK=/tmp/tanin-work if [ "${1:-}" = "--build" ]; then - echo "==> building ISO (sudo mkarchiso) …" - sudo mkarchiso -v -w /tmp/tanin-work -o "$HERE/out" "$PROFILE" + echo "==> clean work dir (mkarchiso reuses stale stages otherwise -> 'too short' builds)" + sudo rm -rf "$WORK" + echo "==> building ISO (sudo mkarchiso) … this takes a while (downloads + squashfs)" + sudo mkarchiso -v -w "$WORK" -o "$HERE/out" "$PROFILE" echo "ISO written to $HERE/out/" else - echo "build with: sudo mkarchiso -v -w /tmp/tanin-work -o \"$HERE/out\" \"$PROFILE\"" + echo "build with: sudo rm -rf $WORK && sudo mkarchiso -v -w $WORK -o \"$HERE/out\" \"$PROFILE\"" fi diff --git a/iso/build-profile/airootfs/etc/calamares/modules/shellprocess-striplive.conf b/iso/build-profile/airootfs/etc/calamares/modules/shellprocess-striplive.conf index 4ed1fc9..fe4e890 100644 --- a/iso/build-profile/airootfs/etc/calamares/modules/shellprocess-striplive.conf +++ b/iso/build-profile/airootfs/etc/calamares/modules/shellprocess-striplive.conf @@ -6,6 +6,6 @@ timeout: 30 script: - "rm -f /etc/systemd/system/getty@tty1.service.d/autologin.conf" - "rmdir --ignore-fail-on-non-empty /etc/systemd/system/getty@tty1.service.d 2>/dev/null || true" -- "rm -f /root/.bash_profile" +- "rm -f /root/.zprofile" - "rm -f /usr/local/bin/tanin-installer" - "systemctl set-default graphical.target" diff --git a/iso/build-profile/airootfs/etc/hostname b/iso/build-profile/airootfs/etc/hostname index 2dbe21e..8ca39f5 100644 --- a/iso/build-profile/airootfs/etc/hostname +++ b/iso/build-profile/airootfs/etc/hostname @@ -1 +1 @@ -archiso +taninux diff --git a/iso/build-profile/airootfs/etc/motd b/iso/build-profile/airootfs/etc/motd index 4d9eda1..22a698e 100644 --- a/iso/build-profile/airootfs/etc/motd +++ b/iso/build-profile/airootfs/etc/motd @@ -1,11 +1,5 @@ -To install Arch Linux follow the installation guide: -https://wiki.archlinux.org/title/Installation_guide -For Wi-Fi, authenticate to the wireless network using the iwctl utility. -For mobile broadband (WWAN) modems, connect with the mmcli utility. -Ethernet, WLAN and WWAN interfaces using DHCP should work automatically. + TANINUX (camel) — a curated Arch desktop: niri + eww. -After connecting to the internet, the installation guide can be accessed -via the convenience script Installation_guide. + The installer launches on tty1. To start it manually: tanin-installer -                                           diff --git a/iso/build-profile/airootfs/etc/os-release b/iso/build-profile/airootfs/etc/os-release new file mode 100644 index 0000000..3121358 --- /dev/null +++ b/iso/build-profile/airootfs/etc/os-release @@ -0,0 +1,11 @@ +NAME="TANINUX" +PRETTY_NAME="TANINUX (camel)" +ID=taninux +ID_LIKE=arch +BUILD_ID=rolling +ANSI_COLOR="38;2;163;158;196" +HOME_URL="https://taninux.kgva.ch" +DOCUMENTATION_URL="https://git.openbureau.ch/karim/taninux" +SUPPORT_URL="https://git.openbureau.ch/karim/taninux" +BUG_REPORT_URL="https://git.openbureau.ch/karim/taninux/issues" +LOGO=taninux diff --git a/iso/build-profile/airootfs/root/.bash_profile b/iso/build-profile/airootfs/root/.bash_profile deleted file mode 100644 index 25e84cc..0000000 --- a/iso/build-profile/airootfs/root/.bash_profile +++ /dev/null @@ -1,6 +0,0 @@ -# Live ISO: on the first console (tty1), launch the TANINUX installer. -# (On an installed system this file isn't present — Calamares' shellprocess -# strips the live-only bits from the target.) -if [[ "$(tty)" == /dev/tty1 ]] && [[ -z "${WAYLAND_DISPLAY:-}" ]] && ! pgrep -x cage >/dev/null 2>&1; then - exec tanin-installer -fi diff --git a/iso/build-profile/airootfs/root/.zprofile b/iso/build-profile/airootfs/root/.zprofile new file mode 100644 index 0000000..d81920a --- /dev/null +++ b/iso/build-profile/airootfs/root/.zprofile @@ -0,0 +1,5 @@ +# Live ISO: auto-launch the TANINUX installer on the first console. +# (Removed from the installed target by Calamares' shellprocess-striplive.) +if [[ "$(tty)" == /dev/tty1 ]] && [[ -z "$WAYLAND_DISPLAY" ]] && ! pgrep -x cage >/dev/null 2>&1; then + exec tanin-installer +fi diff --git a/iso/build-profile/efiboot/loader/entries/01-archiso-linux.conf b/iso/build-profile/efiboot/loader/entries/01-archiso-linux.conf index 329fca5..e62d16c 100644 --- a/iso/build-profile/efiboot/loader/entries/01-archiso-linux.conf +++ b/iso/build-profile/efiboot/loader/entries/01-archiso-linux.conf @@ -1,4 +1,4 @@ -title Arch Linux install medium (%ARCH%, UEFI) +title TANINUX install medium (%ARCH%, UEFI) sort-key 01 linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img diff --git a/iso/build-profile/efiboot/loader/entries/02-archiso-speech-linux.conf b/iso/build-profile/efiboot/loader/entries/02-archiso-speech-linux.conf index 313a1cd..2d38f0d 100644 --- a/iso/build-profile/efiboot/loader/entries/02-archiso-speech-linux.conf +++ b/iso/build-profile/efiboot/loader/entries/02-archiso-speech-linux.conf @@ -1,4 +1,4 @@ -title Arch Linux install medium (%ARCH%, UEFI) with speech +title TANINUX install medium (%ARCH%, UEFI) with speech sort-key 02 linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img diff --git a/iso/build-profile/grub/grub.cfg b/iso/build-profile/grub/grub.cfg index bcbd020..c48fd2a 100644 --- a/iso/build-profile/grub/grub.cfg +++ b/iso/build-profile/grub/grub.cfg @@ -44,13 +44,13 @@ timeout_style=menu # Menu entries -menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { +menuentry "TANINUX install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img } -menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { +menuentry "TANINUX install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img diff --git a/iso/build-profile/grub/loopback.cfg b/iso/build-profile/grub/loopback.cfg index 0c299dc..594c77c 100644 --- a/iso/build-profile/grub/loopback.cfg +++ b/iso/build-profile/grub/loopback.cfg @@ -21,13 +21,13 @@ timeout_style=menu # Menu entries -menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { +menuentry "TANINUX install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img } -menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { +menuentry "TANINUX install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img diff --git a/iso/build-profile/profiledef.sh b/iso/build-profile/profiledef.sh index cf0022e..0297a8f 100644 --- a/iso/build-profile/profiledef.sh +++ b/iso/build-profile/profiledef.sh @@ -16,9 +16,15 @@ airootfs_image_type="squashfs" airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '19' '-b' '1M') bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19') file_permissions=( + # --- releng's entries (must keep — we replace releng's profiledef) --- ["/etc/shadow"]="0:0:400" - ["/etc/gshadow"]="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/Installation_guide"]="0:0:755" + ["/usr/local/bin/livecd-sound"]="0:0:755" + # --- TANINUX additions --- ["/root/customize_airootfs.sh"]="0:0:755" ["/usr/local/bin/tanin-installer"]="0:0:755" ) diff --git a/iso/build-profile/syslinux/archiso_head.cfg b/iso/build-profile/syslinux/archiso_head.cfg index 671ab4e..a71c39b 100644 --- a/iso/build-profile/syslinux/archiso_head.cfg +++ b/iso/build-profile/syslinux/archiso_head.cfg @@ -1,6 +1,6 @@ SERIAL 0 115200 UI vesamenu.c32 -MENU TITLE Arch Linux +MENU TITLE TANINUX MENU BACKGROUND splash.png MENU WIDTH 78 diff --git a/iso/build-profile/syslinux/archiso_pxe-linux.cfg b/iso/build-profile/syslinux/archiso_pxe-linux.cfg index 6cd9fca..71297cc 100644 --- a/iso/build-profile/syslinux/archiso_pxe-linux.cfg +++ b/iso/build-profile/syslinux/archiso_pxe-linux.cfg @@ -1,9 +1,9 @@ LABEL arch_nbd TEXT HELP -Boot the Arch Linux install medium using NBD. -It allows you to install Arch Linux or perform system maintenance. +Boot the TANINUX install medium using NBD. +It allows you to install TANINUX or perform system maintenance. ENDTEXT -MENU LABEL Arch Linux install medium (%ARCH%, NBD) +MENU LABEL TANINUX install medium (%ARCH%, NBD) LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% archiso_nbd_srv=${pxeserver} cms_verify=y @@ -11,10 +11,10 @@ SYSAPPEND 3 LABEL arch_nfs TEXT HELP -Boot the Arch Linux live medium using NFS. -It allows you to install Arch Linux or perform system maintenance. +Boot the TANINUX live medium using NFS. +It allows you to install TANINUX or perform system maintenance. ENDTEXT -MENU LABEL Arch Linux install medium (%ARCH%, NFS) +MENU LABEL TANINUX install medium (%ARCH%, NFS) LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt cms_verify=y @@ -22,10 +22,10 @@ SYSAPPEND 3 LABEL arch_http TEXT HELP -Boot the Arch Linux live medium using HTTP. -It allows you to install Arch Linux or perform system maintenance. +Boot the TANINUX live medium using HTTP. +It allows you to install TANINUX or perform system maintenance. ENDTEXT -MENU LABEL Arch Linux install medium (%ARCH%, HTTP) +MENU LABEL TANINUX install medium (%ARCH%, HTTP) LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ cms_verify=y diff --git a/iso/build-profile/syslinux/archiso_sys-linux.cfg b/iso/build-profile/syslinux/archiso_sys-linux.cfg index 7544b01..c121b7f 100644 --- a/iso/build-profile/syslinux/archiso_sys-linux.cfg +++ b/iso/build-profile/syslinux/archiso_sys-linux.cfg @@ -1,9 +1,9 @@ LABEL arch TEXT HELP -Boot the Arch Linux install medium on BIOS. -It allows you to install Arch Linux or perform system maintenance. +Boot the TANINUX install medium on BIOS. +It allows you to install TANINUX or perform system maintenance. ENDTEXT -MENU LABEL Arch Linux install medium (%ARCH%, BIOS) +MENU LABEL TANINUX install medium (%ARCH%, BIOS) LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% @@ -11,10 +11,10 @@ APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% # Accessibility boot option LABEL archspeech TEXT HELP -Boot the Arch Linux install medium on BIOS with speakup screen reader. -It allows you to install Arch Linux or perform system maintenance with speech feedback. +Boot the TANINUX install medium on BIOS with speakup screen reader. +It allows you to install TANINUX or perform system maintenance with speech feedback. ENDTEXT -MENU LABEL Arch Linux install medium (%ARCH%, BIOS) with ^speech +MENU LABEL TANINUX install medium (%ARCH%, BIOS) with ^speech LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-zen INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-zen.img APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on diff --git a/iso/overrides/profiledef.sh b/iso/overrides/profiledef.sh index 0297a8f..4e466f8 100644 --- a/iso/overrides/profiledef.sh +++ b/iso/overrides/profiledef.sh @@ -8,8 +8,7 @@ iso_application="TANINUX (camel) — niri/eww desktop · live + Calamares instal iso_version="$(date +%Y.%m.%d)" install_dir="tanin" buildmodes=('iso') -bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' - 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito') +bootmodes=('bios.syslinux' 'uefi.systemd-boot') arch="x86_64" pacman_conf="pacman.conf" airootfs_image_type="squashfs"