diff --git a/debian-live-config/README.md b/debian-live-config/README.md index d2420555..1111d663 100644 --- a/debian-live-config/README.md +++ b/debian-live-config/README.md @@ -53,12 +53,14 @@ the user's library so a drive moved between hosts keeps its full state: - [x] **Phase 1 — merged live + chroot config**: Single `debian-live-config/` produces a Debian Live ISO with the full WROLPi stack, XFCE auto-login as `wrolpi`, persistence partition created on first boot. -- [x] **Phase 2 — Calamares installer**: `calamares` package and a desktop - launcher. Users can install WROLPi to disk via the "Install WROLPi to - disk" icon on the desktop. -- [x] **Phase 3 — branding**: WROLPi product name, logo, colors applied - to the Calamares wizard via `etc/calamares/branding/wrolpi/`. Orphan - launcher cleaned up post-install by a Calamares shellprocess module. +- [x] **Phase 2 — Debian Installer**: Standard `debian-installer` bundled + via `lb config --debian-installer live --debian-installer-gui true`. + GRUB exposes "Live", "Install", and "Graphical Install" entries. + Live boots into WROLPi; Install/Graphical Install copy the running + squashfs onto the target disk via Debian's `live-installer` flow. + (We previously tried Calamares-as-the-installer; the XFCE + desktop-icon click path proved unreliable in the wrolpi auto-login + session and the upstream d-i path is better-tested.) - [ ] **Release**: CI on tag, hosting, wrolpi.org docs. ## References diff --git a/debian-live-config/build.sh b/debian-live-config/build.sh index f7ed63ce..3c43cba6 100755 --- a/debian-live-config/build.sh +++ b/debian-live-config/build.sh @@ -60,17 +60,20 @@ mkdir -p "${BUILD_DIR}" cd "${BUILD_DIR}" || (echo "Work directory must exist" && exit 1) set -e -# Pure live config — no --debian-installer flags. The graphical installer -# (Calamares) is added in phase 2 as a package + desktop launcher rather -# than via lb's --debian-installer mechanism. noswap prevents the live -# system from activating swap partitions found on the host machine's -# internal disks. +# Live + Debian Installer. The installer is the stock Debian d-i with +# `--debian-installer live`, which copies the running squashfs onto the +# target disk (much faster than a network-based install) and presents the +# usual graphical/text installer flow. GRUB gets "Install" + "Graphical +# install" + "Live" entries. noswap prevents the live system from +# activating swap partitions found on the host machine's internal disks. lb config \ --binary-images iso-hybrid \ --mode debian \ --architectures amd64 \ --linux-flavours amd64 \ --distribution bookworm \ + --debian-installer live \ + --debian-installer-gui true \ --archive-areas "main contrib non-free non-free-firmware" \ --updates true \ --security true \ diff --git a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot index 17449061..d20644f2 100644 --- a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot +++ b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot @@ -206,38 +206,9 @@ autologin-user-timeout=0 autologin-session=xfce EOF -# Calamares launcher on the user's desktop. -# -# Written as a Type=Link rather than Type=Application: a Type=Application -# .desktop file under ~/Desktop is subject to XFCE Bookworm's "trusted -# launcher" check (metadata::trusted, metadata::xfce-exe-checksum) and -# silently refuses to launch if the metadata isn't set in the user's -# session at click time. Type=Link bypasses that check entirely — XFCE -# just opens the URL via xdg-open, which dispatches to the upstream -# install-debian.desktop in /usr/share/applications/, which runs the -# install-debian wrapper. Cleanup of this file on the installed system -# is handled by the shellprocess Calamares module (see -# etc/calamares/modules/shellprocess.conf). mkdir -p /home/wrolpi/Desktop -cat > /home/wrolpi/Desktop/install-wrolpi.desktop <<'EOF' -[Desktop Entry] -Type=Link -Name=Install WROLPi to disk -Comment=Install WROLPi onto this computer's internal drive -Icon=install-debian -URL=/usr/share/applications/install-debian.desktop -EOF -chmod +x /home/wrolpi/Desktop/install-wrolpi.desktop chown -R wrolpi:wrolpi /home/wrolpi/Desktop -# Suppress the upstream calamares-settings-debian autostart that runs -# add-calamares-desktop-icon at every login. Without this it would drop -# a second "Install Debian" .desktop next to ours (and on the system we -# tested with, that copy came out as a 0-byte file for unclear reasons). -# It would also be removed anyway with calamares-settings-debian -# post-install via Calamares' packages module. -rm -f /etc/xdg/autostart/calamares-desktop-icon.desktop - # Drop the default Postgres cluster created by the postgresql-* package. # wrolpi-bootstrap.service creates a fresh cluster on /media/wrolpi/config/postgresql # at first boot regardless of deployment shape; the cluster files installed diff --git a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc deleted file mode 100644 index ff12994a..00000000 --- a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc +++ /dev/null @@ -1,39 +0,0 @@ ---- -componentName: wrolpi -welcomeStyleCalamares: true -welcomeExpandingLogo: true -windowExpanding: normal -windowSize: 800px,520px -windowPlacement: center - -strings: - productName: WROLPi - shortProductName: WROLPi - version: Debian 12 (bookworm) - shortVersion: 12 - versionedName: WROLPi on Debian 12 - shortVersionedName: WROLPi - bootloaderEntryName: WROLPi - productUrl: https://wrolpi.org - supportUrl: https://wrolpi.org - knownIssuesUrl: https://github.com/lrnselfreliance/wrolpi/issues - releaseNotesUrl: https://github.com/lrnselfreliance/wrolpi/releases - donateUrl: https://wrolpi.org - -images: - productLogo: "wrolpi-logo.png" - productIcon: "wrolpi-logo.png" - productWelcome: "wrolpi-logo.png" - -# Calamares fails to start without a slideshow key, even if there is no -# real slideshow content to show. show.qml renders the WROLPi logo + a -# single welcome line during the install. -slideshow: "show.qml" - -style: - sidebarBackground: "#5d2961" - sidebarText: "#FFFFFF" - sidebarTextSelect: "#8d4d92" - sidebarTextHighlight: "#FFFFFF" - -slideshowAPI: 2 diff --git a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml deleted file mode 100644 index c45f5c28..00000000 --- a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml +++ /dev/null @@ -1,44 +0,0 @@ -/* Single-slide Calamares slideshow for WROLPi. - * - * Calamares treats the `slideshow:` key in branding.desc as required; - * omitting it produces a FATAL error. Until we have proper WROLPi - * slideshow art, this minimal QML just shows our logo + a welcome line - * during the install. - * - * Adapted from calamares-settings-debian (GPLv3+), which carries the - * upstream Debian Live presentation. - */ - -import QtQuick 2.0; -import calamares.slideshow 1.0; - -Presentation -{ - id: presentation - - Timer { - interval: 20000 - repeat: true - onTriggered: presentation.goToNextSlide() - } - - Slide { - Image { - id: background1 - source: "wrolpi-logo.png" - width: 320; height: 320 - fillMode: Image.PreserveAspectFit - anchors.centerIn: parent - } - Text { - anchors.horizontalCenter: background1.horizontalCenter - anchors.top: background1.bottom - text: qsTr("Welcome to WROLPi.
"+ - "The rest of the installation is automated and should complete in a few minutes.") - wrapMode: Text.WordWrap - width: 600 - horizontalAlignment: Text.Center - } - } - -} diff --git a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/wrolpi-logo.png b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/wrolpi-logo.png deleted file mode 100755 index 113cad1b..00000000 Binary files a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/wrolpi-logo.png and /dev/null differ diff --git a/debian-live-config/config/includes.chroot/etc/calamares/modules/shellprocess.conf b/debian-live-config/config/includes.chroot/etc/calamares/modules/shellprocess.conf deleted file mode 100644 index 014565da..00000000 --- a/debian-live-config/config/includes.chroot/etc/calamares/modules/shellprocess.conf +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Run inside the target system's chroot so paths refer to the installed -# /home/wrolpi, not the live system's. -dontChroot: false -timeout: 30 -script: - # Remove the orphan "Install WROLPi" launcher. Calamares removes the - # calamares-settings-debian package (taking the install-debian wrapper - # binary with it), but the copy we placed in the wrolpi user's Desktop - # directory is a plain file that apt doesn't track. Without this - # cleanup, the installed system shows an icon that fails when clicked - # because its Exec target no longer exists. - - "rm -f /home/wrolpi/Desktop/install-wrolpi.desktop" diff --git a/debian-live-config/config/includes.chroot/etc/calamares/settings.conf b/debian-live-config/config/includes.chroot/etc/calamares/settings.conf deleted file mode 100644 index 88a4aaca..00000000 --- a/debian-live-config/config/includes.chroot/etc/calamares/settings.conf +++ /dev/null @@ -1,68 +0,0 @@ -# Configuration file for Calamares — WROLPi installer. -# -# Mostly mirrors the upstream calamares-settings-debian settings.conf; -# differences are: -# - branding: wrolpi (was: debian) -# - shellprocess inserted near the end of the exec phase to clean up the -# "Install WROLPi" desktop launcher we drop on the live user's desktop. -# Upstream's packages module already removes calamares-settings-debian -# (taking install-debian and the .desktop file in /usr/share/applications -# with it), but our copy in /home/wrolpi/Desktop/ is a plain file that -# apt doesn't know about and would otherwise survive as an orphan on -# the installed system. ---- - -modules-search: [ local, /usr/lib/calamares/modules ] - -oem-setup: false -disable-cancel: false -disable-cancel-during-exec: false -quit-at-end: false - -sequence: -- show: - - welcome - - locale - - keyboard - - partition - - users - - summary - -- exec: - - partition - - mount - - unpackfs - - dpkg-unsafe-io - - sources-media - - machineid - - fstab - - locale - - keyboard - - localecfg - - users - - displaymanager - - networkcfg - - hwclock - - services-systemd - - bootloader-config - - grubcfg - - bootloader - - packages - - luksbootkeyfile - - plymouthcfg - - initramfscfg - - initramfs - - dpkg-unsafe-io-undo - - sources-media-unmount - - sources-final - - shellprocess - - umount - -- show: - - finished - -branding: wrolpi - -prompt-install: false - -dont-chroot: false diff --git a/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop b/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop deleted file mode 100644 index cdb90d78..00000000 --- a/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Type=Application -Name=WROLPi Install Icon Trust -Comment=Mark the install launcher as trusted so xfdesktop will execute it -Exec=/usr/local/bin/wrolpi-trust-install-icon -StartupNotify=false -NoDisplay=true -X-KDE-autostart-phase=1 diff --git a/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon b/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon deleted file mode 100755 index 50365ac0..00000000 --- a/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# Mark /home/$USER/Desktop/install-wrolpi.desktop as trusted so XFCE -# Bookworm's xfdesktop will execute the launcher instead of handing it to -# panel-desktop-handler.desktop (which silently tries to add the file as -# a panel launcher and never runs it). -# -# Runs at user session start via /etc/xdg/autostart/. Requires gvfs (for -# the metadata service that gio talks to); the package list pulls it in -# explicitly because we build with --apt-recommends false and the default -# XFCE recommend chain would have provided it. - -set -eu - -F="$HOME/Desktop/install-wrolpi.desktop" -[ -f "$F" ] || exit 0 - -gio set --type=string "$F" metadata::trusted true || : -gio set --type=string "$F" metadata::xfce-exe-checksum \ - "$(sha256sum "$F" | cut -d' ' -f1)" || : - -# Nudge xfdesktop to re-read the icon's state. -touch "$F" diff --git a/debian-live-config/config/package-lists/wrolpi.list.chroot b/debian-live-config/config/package-lists/wrolpi.list.chroot index 175a3341..e679271d 100644 --- a/debian-live-config/config/package-lists/wrolpi.list.chroot +++ b/debian-live-config/config/package-lists/wrolpi.list.chroot @@ -6,8 +6,6 @@ bind9-dnsutils build-essential bzip2 ca-certificates -calamares -calamares-settings-debian calibre cargo catdoc