manifests: consistently use set -xeuo pipefail in postprocess scripts

The `set -euo pipefail` shouldn't be controversial.

The `set -x` bit is more debatable because it makes
the output more verbose but I find it helpful right
now as I comb through all sorts of details as part of
https://github.com/coreos/fedora-coreos-tracker/issues/1861.

If we care about less verbose output, I'd prefer we keep `-x` but
switched to having rpm-ostree buffer postprocess output and only dump it
if it fails.
This commit is contained in:
Jonathan Lebon 2025-05-23 10:49:09 -04:00
parent d529d7002b
commit 2c6d03cfe3
No known key found for this signature in database
7 changed files with 9 additions and 4 deletions

View file

@ -2,8 +2,7 @@
postprocess:
- |
#!/usr/bin/env bash
set -euo pipefail
set -xeuo pipefail
target=/usr/lib/systemd/system/default.target.wants
mkdir -p $target
set -x
ln -s ../bootc-fetch-apply-updates.timer $target

View file

@ -7,6 +7,6 @@ add-files:
postprocess:
- |
#!/bin/bash
set -euo pipefail
set -xeuo pipefail
mkdir -p /usr/lib/systemd/system/local-fs.target.wants
ln -s ../bootc-generic-growpart.service /usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service

View file

@ -2,6 +2,7 @@
postprocess:
- |
#!/usr/bin/env bash
set -xeuo pipefail
mkdir -p /usr/lib/dracut/dracut.conf.d
cat > /usr/lib/dracut/dracut.conf.d/30-bootc-standard.conf << 'EOF'
add_dracutmodules+=" lvm crypt fips "

View file

@ -5,7 +5,9 @@
# rid of this once we move to sysusers and create the dir in the initrd.
postprocess:
- | #!/bin/bash
- |
#!/bin/bash
set -xeuo pipefail
mkdir -p /usr/lib/systemd/journald.conf.d/
cat >/usr/lib/systemd/journald.conf.d/10-centos-bootc-persistent.conf << EOF
[Journal]