Do not recreate /var/log/journal on upgrades

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-10-09 10:25:34 -04:00
parent 65fed72862
commit 4e1286dd8b

View File

@ -12,7 +12,7 @@
Name: systemd Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 231 Version: 231
Release: 9%{?gitcommit:.git%{gitcommitshort}}%{?dist} Release: 10%{?gitcommit:.git%{gitcommitshort}}%{?dist}
# For a breakdown of the licensing, see README # For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+ License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager Summary: A System and Service Manager
@ -392,6 +392,11 @@ systemctl daemon-reexec >/dev/null 2>&1 || :
journalctl --update-catalog >/dev/null 2>&1 || : journalctl --update-catalog >/dev/null 2>&1 || :
systemd-tmpfiles --create >/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 # 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 || : 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 || : 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}/pkgconfig
%dir %{_datadir}/zsh %dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions %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
%dir %{_localstatedir}/lib/systemd/catalog %dir %{_localstatedir}/lib/systemd/catalog
%ghost %dir %{_localstatedir}/lib/systemd/coredump %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.* %{_mandir}/man[1578]/systemd-nspawn.*
%changelog %changelog
* Sun Oct 9 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 231-10
- Do not recreate /var/log/journal on upgrades (#1383066)
* Fri Oct 7 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 231-9 * Fri Oct 7 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 231-9
- Fix systemctl set-default (#1374371) - Fix systemctl set-default (#1374371)
- Prevent systemd-udev-trigger.service from restarting (follow-up for #1378974) - Prevent systemd-udev-trigger.service from restarting (follow-up for #1378974)