From eb48de275c7c8c464a06a83fff8fe6e81961feec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Sat, 9 Oct 2021 16:31:03 +0200 Subject: [PATCH] fedora-common-ostree: Move post script inline This was difficult with the JSON based manifests but is now easy with the YAML ones. --- fedora-common-ostree.yaml | 22 ++++++++++++++++++++-- post.sh | 21 --------------------- 2 files changed, 20 insertions(+), 23 deletions(-) delete mode 100755 post.sh 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