Not sure why but when you try to build c9s with rpm-ostree from
git main the change in [1] causes the sed commands here to exit
with a weird error:
```
sed: couldn't close stdout: Bad file descriptor
```
Let's just redirect to /dev/null for now and maybe we can drop
it longer term when c9s goes away. See also [2] where this was
reported.
[1] f4aecb9b62
[2] https://github.com/coreos/rpm-ostree/pull/5388#issuecomment-2971623787
35 lines
1.7 KiB
YAML
35 lines
1.7 KiB
YAML
# Fix general bugs
|
|
|
|
postprocess:
|
|
# See also https://github.com/openshift/os/blob/f6cde963ee140c02364674db378b2bc4ac42675b/common.yaml#L156
|
|
# This one is undoes the effect of
|
|
# # RHEL-only: Disable /tmp on tmpfs.
|
|
#Wants=tmp.mount
|
|
# in /usr/lib/systemd/system/basic.target
|
|
# We absolutely must have tmpfs-on-tmp for multiple reasons,
|
|
# but the biggest is that when we have composefs for / it's read-only,
|
|
# and for units with ProtectSystem=full systemd clones / but needs
|
|
# a writable place.
|
|
- |
|
|
#!/usr/bin/env bash
|
|
set -xeuo pipefail
|
|
mkdir -p /usr/lib/systemd/system/local-fs.target.wants
|
|
if test '!' -f /usr/lib/systemd/system/local-fs.target.wants/tmp.mount; then
|
|
ln -sf ../tmp.mount /usr/lib/systemd/system/local-fs.target.wants
|
|
fi
|
|
|
|
# See https://github.com/containers/bootc/issues/358
|
|
# basically systemd-tmpfiles doesn't follow symlinks; ordinarily our
|
|
# tmpfiles.d unit for `/var/roothome` is fine, but this actually doesn't
|
|
# work if we want to use tmpfiles.d to write to `/root/.ssh` because
|
|
# tmpfiles gives up on that before getting to `/var/roothome`.
|
|
#
|
|
# Redirect stdout to /dev/null because of some weird stdout issue
|
|
# with newer rpm-ostree: https://github.com/coreos/rpm-ostree/pull/5388#issuecomment-2971623787
|
|
sed -i -e 's, /root, /var/roothome,' /usr/lib/tmpfiles.d/provision.conf > /dev/null
|
|
# Because /var/roothome is also defined in rpm-ostree-0-integration.conf
|
|
# we need to delete /var/roothome
|
|
#
|
|
# Redirect stdout to /dev/null because of some weird stdout issue
|
|
# with newer rpm-ostree: https://github.com/coreos/rpm-ostree/pull/5388#issuecomment-2971623787
|
|
sed -i -e '/^d- \/var\/roothome /d' /usr/lib/tmpfiles.d/provision.conf > /dev/null
|