From 4e1286dd8b6d12cc286dcc57e3ff69c00bd3c0e0 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 09 2016 14:25:34 +0000 Subject: Do not recreate /var/log/journal on upgrades --- diff --git a/systemd.spec b/systemd.spec index 1ffb586..3aad034 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 231 -Release: 9%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 10%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -392,6 +392,11 @@ systemctl daemon-reexec >/dev/null 2>&1 || : journalctl --update-catalog >/dev/null 2>&1 || : systemd-tmpfiles --create >/dev/null 2>&1 || : +if [ $1 -eq 1 ] ; then + # create /var/log/journal only on initial installation + mkdir -p %{_localstatedir}/log/journal +fi + # Make sure new journal files will be owned by the "systemd-journal" group chgrp systemd-journal /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2> /dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : chmod g+s /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2> /dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : @@ -573,7 +578,7 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd %dir %{_datadir}/pkgconfig %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions -%dir %attr(2755,root,systemd-journal) %verify(not mode) %{_localstatedir}/log/journal +%ghost %dir %{_localstatedir}/log/journal %dir %{_localstatedir}/lib/systemd %dir %{_localstatedir}/lib/systemd/catalog %ghost %dir %{_localstatedir}/lib/systemd/coredump @@ -953,6 +958,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd %{_mandir}/man[1578]/systemd-nspawn.* %changelog +* Sun Oct 9 2016 Zbigniew Jędrzejewski-Szmek - 231-10 +- Do not recreate /var/log/journal on upgrades (#1383066) + * Fri Oct 7 2016 Zbigniew Jędrzejewski-Szmek - 231-9 - Fix systemctl set-default (#1374371) - Prevent systemd-udev-trigger.service from restarting (follow-up for #1378974)