From 3408841822599a2d6e39f8817a63f5eb37f7cf3a Mon Sep 17 00:00:00 2001 From: veilor-org Date: Fri, 1 May 2026 15:21:22 +0100 Subject: [PATCH] ks: %post --nochroot loosened error handling + nochroot trace log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found via debugfs: overlay copy succeeds (veilor-power, tuned profiles, sshd-hardening, sudoers, systemd units all present in v0.2.1 rootfs) but `mkdir + cp assets/scripts` aborted with set -eu — leaves /usr/share/ veilor-os missing → all chroot %post scripts fail. Switch to set +e on cp plus persist trace log to /var/log/veilor-nochroot.log for next debug. --- kickstart/veilor-os.ks | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/kickstart/veilor-os.ks b/kickstart/veilor-os.ks index 028ed0c..725b70e 100644 --- a/kickstart/veilor-os.ks +++ b/kickstart/veilor-os.ks @@ -131,8 +131,8 @@ fira-code-fonts %end # ── Post-install (nochroot): copy overlay tree into installed root ── -%post --nochroot -set -eu +%post --nochroot --erroronfail +set -uo pipefail # DEST: livecd-creator sets INSTALL_ROOT, livemedia-creator uses /mnt/sysimage. DEST="${INSTALL_ROOT:-/mnt/sysimage}" [[ -d $DEST ]] || { echo "[ERR] DEST=$DEST does not exist (livecd-creator? livemedia-creator?)" >&2; exit 1; } @@ -162,11 +162,24 @@ if [[ -z $SRC ]]; then exit 1 fi -echo "[INFO] using SRC=$SRC" -cp -a "$SRC/overlay/." "$DEST/" -mkdir -p "$DEST/usr/share/veilor-os" -cp -a "$SRC/assets" "$DEST/usr/share/veilor-os/" -cp -a "$SRC/scripts" "$DEST/usr/share/veilor-os/" +echo "[INFO] using SRC=$SRC DEST=$DEST" +set -x +cp -a "$SRC/overlay/." "$DEST/" || echo "[ERR] overlay cp failed: $?" +mkdir -p "$DEST/usr/share/veilor-os" || echo "[ERR] mkdir failed: $?" +ls -la "$SRC/assets" "$SRC/scripts" 2>&1 || echo "[ERR] assets/scripts missing in $SRC" +cp -a "$SRC/assets" "$DEST/usr/share/veilor-os/" || echo "[ERR] assets cp failed: $?" +cp -a "$SRC/scripts" "$DEST/usr/share/veilor-os/" || echo "[ERR] scripts cp failed: $?" +ls -la "$DEST/usr/share/veilor-os/" 2>&1 || echo "[ERR] dest dir missing post-cp" +set +x + +# Persist nochroot log into installed system for diagnostics +{ + echo "=== %post --nochroot trace ===" + date + echo "SRC=$SRC DEST=$DEST" + ls -la "$DEST/usr/share/veilor-os/" 2>&1 + ls -la "$DEST/usr/local/sbin/" 2>&1 +} > "$DEST/var/log/veilor-nochroot.log" 2>&1 || true %end # ── Post-install (chroot): apply hardening, theme, branding ──