profiling requires patching systemd during initramfs build; remove runtime profiling option

This commit is contained in:
Anderson Rosenberg 2025-10-22 19:01:39 -04:00
parent 501d68bf7e
commit 4ac936df5b
No known key found for this signature in database
GPG key ID: 7ACF448C0590AB9C
6 changed files with 65 additions and 24 deletions

View file

@ -12,6 +12,7 @@ if [ ! "$HOSTNAME" = "dom0" ]; then
fi
# Set up the defaults
: "${RELIANT_PROFILING=false}"
: "${RELIANT_PARANOID=false}"
: "${RELIANT_BIN_DIR:=/usr/local/bin}"
: "${RELIANT_SBIN_DIR:=/usr/local/sbin}"
@ -54,6 +55,14 @@ case "$RELIANT_PARANOID" in
exit 1 ;;
esac
# RELIANT_PROFILING must be a boolean value
case "$RELIANT_PROFILING" in
"true") ;;
"false") ;;
*) echo "[ERROR]: RELIANT_PROFILING: $RELIANT_PROFILING is not a valid boolean value"
exit 1 ;;
esac
# RELIANT_SPARSE_SAMPLES must be an integer
if ! [ "$RELIANT_SPARSE_SAMPLES" -eq "$RELIANT_SPARSE_SAMPLES" ] 2>/dev/null; then
echo "[ERROR]: RELIANT_SPARSE_SAMPLES: $RELIANT_SPARSE_SAMPLES is not a valid integer"
@ -114,6 +123,7 @@ reliant_install_sbin tools/surgeon-dissect surgeon-dissect 0744 root root
reliant_install_sbin tools/reliant-security reliant-security 0744 root root
reliant_install_sbin tools/reliant-snapshot-rw reliant-snapshot-rw 0744 root root
reliant_install_bin tools/reliant-print-config reliant-print-config 0755 root root
reliant_install_sbin tools/reliant-profiling-patch-systemd reliant-profiling-patch-systemd 0744 root root
# reliant-system/dracut
reliant_install_dracut dracut/99reliant/module-setup.sh module-setup.sh 0744 root root
@ -162,12 +172,18 @@ systemctl enable shufflecake-close.service
# reliant-system/tools
surgeon-dissect -t varlibqubes
reliant-snapshot-rw
if [ "$RELIANT_PROFILING" = "true" ]; then
reliant-profiling-patch-systemd
fi
# reliant-system/qubes-sflc
depmod -a "$RELIANT_KERNEL_VERSION"
# reliant-system/dracut
dracut --force --regenerate-all
if [ "$RELIANT_PROFILING" = "true" ]; then
RELIANT_PROFILING=true dracut --force "/boot/initramfs-$RELIANT_KERNEL_VERSION.reliant-profiling.img"
fi
# Report successful installation
echo "[INFO]: Installation complete. Reboot to enter Protected Mode."