ks: %post --nochroot loosened error handling + nochroot trace log
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.
This commit is contained in:
parent
9c6136f01f
commit
3408841822
1 changed files with 20 additions and 7 deletions
|
|
@ -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 ──
|
||||
|
|
|
|||
Loading…
Reference in a new issue