diff --git a/systemd-mini.changes b/systemd-mini.changes index a218a91..5ac5e11 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 27 12:51:15 UTC 2020 - Fabian Vogt + +- Adjust %pre and %post for the restoration of upstream tmp.mount (boo#1175779) + ------------------------------------------------------------------- Wed Aug 26 09:46:46 UTC 2020 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index a13df83..1b8c166 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -786,12 +786,6 @@ cat %{S:14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map # a %pre that needs to be run during the build. systemd is one of them # so keep the section even if it's empty. %pre -if [ $1 -gt 1 ] ; then - case "$(systemctl show -pFragmentPath tmp.mount)" in - FragmentPath=/usr/lib/systemd/system/tmp.mount) - ln -sf %{_datadir}/systemd/tmp.mount /etc/systemd/system/ || : - esac -fi %post # Make /etc/machine-id an empty file during package installation. On @@ -869,6 +863,13 @@ fi # It's run only once. %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : +# Previous versions had tmp.mount moved to /usr/share/systemd/tmp.mount. +# It could be symlinked into /etc to make /tmp a tmpfs. The file does not exist anymore, +# so migrate the link to the new location. +if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then + ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount +fi + %postun %systemd_postun # Avoid restarting logind until fixed upstream (issue #1163) diff --git a/systemd.changes b/systemd.changes index a218a91..5ac5e11 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 27 12:51:15 UTC 2020 - Fabian Vogt + +- Adjust %pre and %post for the restoration of upstream tmp.mount (boo#1175779) + ------------------------------------------------------------------- Wed Aug 26 09:46:46 UTC 2020 - Franck Bui diff --git a/systemd.spec b/systemd.spec index b2ff8ec..a45247b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -784,12 +784,6 @@ cat %{S:14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map # a %pre that needs to be run during the build. systemd is one of them # so keep the section even if it's empty. %pre -if [ $1 -gt 1 ] ; then - case "$(systemctl show -pFragmentPath tmp.mount)" in - FragmentPath=/usr/lib/systemd/system/tmp.mount) - ln -sf %{_datadir}/systemd/tmp.mount /etc/systemd/system/ || : - esac -fi %post # Make /etc/machine-id an empty file during package installation. On @@ -867,6 +861,13 @@ fi # It's run only once. %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : +# Previous versions had tmp.mount moved to /usr/share/systemd/tmp.mount. +# It could be symlinked into /etc to make /tmp a tmpfs. The file does not exist anymore, +# so migrate the link to the new location. +if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then + ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount +fi + %postun %systemd_postun # Avoid restarting logind until fixed upstream (issue #1163)