fedora-common-ostree: Move post script inline

This was difficult with the JSON based manifests but is now easy with
the YAML ones.
This commit is contained in:
Timothée Ravier 2021-10-09 16:31:03 +02:00
parent c5edd168e1
commit eb48de275c
2 changed files with 20 additions and 23 deletions

View file

@ -40,8 +40,6 @@ etc-group-members:
- wheel - wheel
tmp-is-dir: true tmp-is-dir: true
postprocess-script: post.sh
ignore-removed-users: ignore-removed-users:
- root - root
ignore-removed-groups: ignore-removed-groups:
@ -96,3 +94,23 @@ exclude-packages:
- gstreamer1-plugin-openh264 - gstreamer1-plugin-openh264
- mozilla-openh264 - mozilla-openh264
- 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

21
post.sh
View file

@ -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