Update the comment for the workaround dealing with tmp.mount dangling symlink.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1112
This commit is contained in:
Franck Bui 2020-08-31 13:22:09 +00:00 committed by Git OBS Bridge
parent 13448b7011
commit 47425fd6e2
2 changed files with 26 additions and 8 deletions

View File

@ -864,9 +864,18 @@ fi
# It's run only once. # It's run only once.
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
# Previous versions had tmp.mount moved to /usr/share/systemd/tmp.mount. # During the migration to tmpfs for /tmp, a bug was introduced that
# It could be symlinked into /etc to make /tmp a tmpfs. The file does not exist anymore, # affected users using tmpfs for /tmp and happened during the _second_
# so migrate the link to the new location. # update following the one that introduced tmpfs on /tmp. It consisted
# in creating a dangling symlink /etc/systemd/system/tmp.mount
# pointing to the old copy that previous versions shipped in
# /usr/share/systemd, which doesn't exist anymore. So we migrate the
# link to the new location.
#
# Users have been exposed to this bug during a short period of time as
# it was present only in one release and was fixed shortly after by
# the next update. So we can assume that it's safe to drop it in 6
# months (ie March 2021).
if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then
ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount
fi fi
@ -883,7 +892,7 @@ fi
# old systems, the file doesn't exist. This is equivalent to # old systems, the file doesn't exist. This is equivalent to
# generation #1, which enables the creation of all compat symlinks. # generation #1, which enables the creation of all compat symlinks.
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
echo "COMPAT_SYMLINK_GENERATION=2">/usr/lib/udev/compat-symlink-generation echo "COMPAT_SYMLINK_GENERATION=2" >/usr/lib/udev/compat-symlink-generation
fi fi
%post -n udev%{?mini} %post -n udev%{?mini}

View File

@ -862,9 +862,18 @@ fi
# It's run only once. # It's run only once.
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
# Previous versions had tmp.mount moved to /usr/share/systemd/tmp.mount. # During the migration to tmpfs for /tmp, a bug was introduced that
# It could be symlinked into /etc to make /tmp a tmpfs. The file does not exist anymore, # affected users using tmpfs for /tmp and happened during the _second_
# so migrate the link to the new location. # update following the one that introduced tmpfs on /tmp. It consisted
# in creating a dangling symlink /etc/systemd/system/tmp.mount
# pointing to the old copy that previous versions shipped in
# /usr/share/systemd, which doesn't exist anymore. So we migrate the
# link to the new location.
#
# Users have been exposed to this bug during a short period of time as
# it was present only in one release and was fixed shortly after by
# the next update. So we can assume that it's safe to drop it in 6
# months (ie March 2021).
if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then
ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount
fi fi
@ -881,7 +890,7 @@ fi
# old systems, the file doesn't exist. This is equivalent to # old systems, the file doesn't exist. This is equivalent to
# generation #1, which enables the creation of all compat symlinks. # generation #1, which enables the creation of all compat symlinks.
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
echo "COMPAT_SYMLINK_GENERATION=2">/usr/lib/udev/compat-symlink-generation echo "COMPAT_SYMLINK_GENERATION=2" >/usr/lib/udev/compat-symlink-generation
fi fi
%post -n udev%{?mini} %post -n udev%{?mini}