Skip to content

Commit 9b115ba

Browse files
zahclaude
andcommitted
M9.R.42.2: wire REPRO_DISK_DIAG passthrough into the installer launcher
Companion to M9.R.42.1 — the disk-apply kernel-state snapshot hook landed in ``libs/repro_profile/src/repro_profile/disk_apply.nim`` but only fires when REPRO_DISK_DIAG is set in the apply driver's env. The live-ISO installer launcher runs the installer through ``strace -f`` which strips the parent env; we need an explicit ``-E REPRO_DISK_DIAG=/tmp/installer.disk-diag.log`` passthrough so the env-var reaches the ``repro disk apply`` subprocess. Three changes in stage-de-rootfs.sh: 1. ``-E REPRO_DISK_DIAG=/tmp/installer.disk-diag.log`` added to the strace argument list alongside the existing ``-E REPRO_HARDWARE_PROBE_RAWLOG_DIR=...`` passthrough. 2. ``rm -f`` list extended to include ``/tmp/installer.disk-diag.log`` so stale diag data from a previous boot cycle doesn't confuse the current run. 3. The diag-persist ``tar -czf`` list dynamically includes ``installer.disk-diag.log`` when present (gated on ``[ -f ... ]`` so non-DIAG boots don't error on missing file). The M9.R.42 install driver (_m9r42_install.sh) extracts + dumps the disk-diag file from the launcher tarball so the Phase A characterisation can compare /proc/partitions + /dev/<base>* + udevadm settle exit codes BEFORE and AFTER each sgdisk + partprobe step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ff98d6c commit 9b115ba

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

recipes/reproos-iso/scripts/stage-de-rootfs.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,8 @@ fi
928928
_repro_diag="${REPRO_INSTALLER_DIAG:-0}"
929929
if [ "$_repro_diag" = "1" ]; then
930930
rm -f /tmp/installer.strace /tmp/installer.kernelstacks \
931-
/tmp/installer.lddebug /tmp/installer.log /tmp/installer.diag.pid
931+
/tmp/installer.lddebug /tmp/installer.log /tmp/installer.diag.pid \
932+
/tmp/installer.disk-diag.log
932933
# Launch the kernel-stack snapshotter as a background sub-shell.
933934
# The installer's PID becomes its parent shell's $$ once exec
934935
# replaces this script, so we sample $$ from the child's POV via
@@ -1050,6 +1051,7 @@ if [ "$_repro_diag" = "1" ]; then
10501051
-E QML_IMPORT_PATH="$_repro_qml_imports" \
10511052
-E QT_QPA_PLATFORM_PLUGIN_PATH="$_repro_qpa_plugins" \
10521053
-E REPRO_HARDWARE_PROBE_RAWLOG_DIR=/tmp/hw_probe_raw \
1054+
-E REPRO_DISK_DIAG=/tmp/installer.disk-diag.log \
10531055
"$_repro_glibc_dir/ld-linux-x86-64.so.2" \
10541056
--library-path "$_repro_ldpath" \
10551057
/usr/bin/reproos-installer "$@" \
@@ -1074,10 +1076,16 @@ if [ "$_repro_diag" = "1" ]; then
10741076
if [ -d /tmp/hw_probe_raw ]; then
10751077
_hw_probe_files="hw_probe_raw"
10761078
fi
1079+
# M9.R.42.1 — include the disk-apply kernel-state diag if it
1080+
# exists (REPRO_DISK_DIAG was set as an strace passthrough above).
1081+
_disk_diag_file=""
1082+
if [ -f /tmp/installer.disk-diag.log ]; then
1083+
_disk_diag_file="installer.disk-diag.log"
1084+
fi
10771085
tar -czf "$_diagtar" -C /tmp \
10781086
installer.strace installer.kernelstacks installer.lddebug \
10791087
installer.log installer.binfo installer.rc installer.diag.pid \
1080-
$_hw_probe_files \
1088+
$_hw_probe_files $_disk_diag_file \
10811089
2>/dev/null || true
10821090
_diagsz="$(stat -c %s "$_diagtar" 2>/dev/null || echo 0)"
10831091
# ASCII-only header for portability. The host extractor parses

0 commit comments

Comments
 (0)