| |
@@ -5,12 +5,52 @@
|
| |
# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295
|
| |
echo 'Storage=persistent' >> /etc/systemd/journald.conf
|
| |
|
| |
+ # Now, we generate a utility that changes a config file, and *requires*
|
| |
+ # that that change was made. (Unlike sed)
|
| |
+ cat >/tmp/assert-sed <<EOF
|
| |
+ #!/usr/bin/python
|
| |
+ import os,sys,re
|
| |
+ pattern = sys.argv[1]
|
| |
+ replacement = sys.argv[2]
|
| |
+ filepath = sys.argv[3]
|
| |
+ newfilepath = filepath + '.new'
|
| |
+ r = re.compile(pattern)
|
| |
+ nmatches = 0
|
| |
+ with open(filepath) as fin:
|
| |
+ with open(newfilepath, 'w') as fout:
|
| |
+ for line in fin:
|
| |
+ (newline, this_nmatches) = r.subn(replacement, line)
|
| |
+ nmatches += this_nmatches
|
| |
+ fout.write(newline)
|
| |
+ if nmatches == 0:
|
| |
+ sys.stderr.write('Failed to find pattern {} in {}\n'.format(pattern, filepath))
|
| |
+ os.unlink(newfilepath)
|
| |
+ sys.exit(1)
|
| |
+ os.rename(newfilepath, filepath)
|
| |
+ EOF
|
| |
+ chmod a+x /tmp/assert-sed
|
| |
+ assert-sed() {
|
| |
+ /tmp/assert-sed "$@"
|
| |
+ }
|
| |
+
|
| |
# Work around https://github.com/systemd/systemd/issues/4082
|
| |
find /usr/lib/systemd/system/ -type f -exec sed -i -e '/^PrivateTmp=/d' -e '/^Protect\(Home\|System\)=/d' {} \;
|
| |
|
| |
+ # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1365297
|
| |
+ cat >/usr/lib/tmpfiles.d/ostree-lvm.conf<<EOF
|
| |
+ d /var/lib/lvm 0755 0 0 - -
|
| |
+ d /var/lib/lvm/backup 0755 0 0 - -
|
| |
+ d /var/lib/lvm/archive 0755 0 0 - -
|
| |
+ EOF
|
| |
+ assert-sed '^(\s*backup_dir\s*=)(.*)' '\1 "/var/lib/lvm/backup"' '/etc/lvm/lvm.conf'
|
| |
+ assert-sed '^(\s*archive_dir\s*=)(.*)' '\1 "/var/lib/lvm/archive"' '/etc/lvm/lvm.conf'
|
| |
+
|
| |
+ rm -f /tmp/assert-sed
|
| |
+
|
| |
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
|
| |
KEEPLANG=en_US
|
| |
find /usr/share/locale -mindepth 1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} +
|
| |
localedef --list-archive | grep -a -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive
|
| |
cp -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
|
| |
build-locale-archive
|
| |
+
|
| |
This works around https://bugzilla.redhat.com/show_bug.cgi?id=1365297