From c5edd168e1dae56f0853d0b4b1d315d9c90b832f Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jan 21 2022 10:29:47 +0000 Subject: [PATCH 1/2] post.sh: Update persistent journal workaround Add a systemd configuration drop-in instead of modyfing the default configuration file. Imported from: https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf --- diff --git a/post.sh b/post.sh index 77c5977..a09d851 100755 --- a/post.sh +++ b/post.sh @@ -6,11 +6,9 @@ set -xeuo pipefail # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 -# Also note the create-new-then-rename dance for rofiles-fuse compat -if ! grep -q '^Storage=persistent' /etc/systemd/journald.conf; then - (cat /etc/systemd/journald.conf && echo 'Storage=persistent') > /etc/systemd.journald.conf.new - mv /etc/systemd.journald.conf{.new,} -fi +# From https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf +install -dm0755 /usr/lib/systemd/journald.conf.d/ +echo -e "[Journal]\nStorage=persistent" > /usr/lib/systemd/journald.conf.d/10-persistent.conf # See: https://src.fedoraproject.org/rpms/glibc/pull-request/4 # Basically that program handles deleting old shared library directories From eb48de275c7c8c464a06a83fff8fe6e81961feec Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jan 21 2022 10:32:12 +0000 Subject: [PATCH 2/2] fedora-common-ostree: Move post script inline This was difficult with the JSON based manifests but is now easy with the YAML ones. --- diff --git a/fedora-common-ostree.yaml b/fedora-common-ostree.yaml index 3fa8ab0..3699e5d 100644 --- a/fedora-common-ostree.yaml +++ b/fedora-common-ostree.yaml @@ -40,8 +40,6 @@ etc-group-members: - wheel tmp-is-dir: true -postprocess-script: post.sh - ignore-removed-users: - root ignore-removed-groups: @@ -96,3 +94,23 @@ exclude-packages: - gstreamer1-plugin-openh264 - mozilla-openh264 - openh264 + +postprocess: + - | + #!/usr/bin/env bash + set -xeuo pipefail + + # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 + # From https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf + install -dm0755 /usr/lib/systemd/journald.conf.d/ + echo -e "[Journal]\nStorage=persistent" > /usr/lib/systemd/journald.conf.d/10-persistent.conf + + # See: https://src.fedoraproject.org/rpms/glibc/pull-request/4 + # Basically that program handles deleting old shared library directories + # mid-transaction, which never applies to rpm-ostree. This is structured as a + # loop/glob to avoid hardcoding (or trying to match) the architecture. + for x in /usr/sbin/glibc_post_upgrade.*; do + if test -f ${x}; then + ln -srf /usr/bin/true ${x} + fi + done diff --git a/post.sh b/post.sh deleted file mode 100755 index a09d851..0000000 --- a/post.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# This file is very similar to treecompose-post.sh -# from fedora-atomic: https://pagure.io/fedora-atomic -# Make changes there first where applicable. - -set -xeuo pipefail - -# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 -# From https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf -install -dm0755 /usr/lib/systemd/journald.conf.d/ -echo -e "[Journal]\nStorage=persistent" > /usr/lib/systemd/journald.conf.d/10-persistent.conf - -# See: https://src.fedoraproject.org/rpms/glibc/pull-request/4 -# Basically that program handles deleting old shared library directories -# mid-transaction, which never applies to rpm-ostree. This is structured as a -# loop/glob to avoid hardcoding (or trying to match) the architecture. -for x in /usr/sbin/glibc_post_upgrade.*; do - if test -f ${x}; then - ln -srf /usr/bin/true ${x} - fi -done