Accepting request 816786 from home:fbui:systemd:openSUSE-Factory
- migrate-sysconfig-i18n.sh: fix marker handling (bsc#1173229) The marker is used to make sure the script is run only once. Instead of storing it in /usr, use /var which is more appropriate for such file. Also make it owned by systemd package. OBS-URL: https://build.opensuse.org/request/show/816786 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1106
This commit is contained in:
parent
a0237e6d77
commit
006b3d0150
@ -128,8 +128,18 @@ migrate_language () {
|
||||
fi
|
||||
}
|
||||
|
||||
migrate_locale; rv1=$?
|
||||
migrate_keyboard; rv2=$?
|
||||
migrate_language; rv3=$?
|
||||
|
||||
test $((rv1 + rv2 + rv3)) -eq 0
|
||||
# The marker could have been incorrectly put in /usr/lib. In this case
|
||||
# move it to its new place.
|
||||
mv /usr/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done \
|
||||
/var/lib/systemd/i18n-migrated &>/dev/null
|
||||
|
||||
if ! test -e /var/lib/systemd/i18n-migrated; then
|
||||
declare -i rv=0
|
||||
|
||||
migrate_locale; rv+=$?
|
||||
migrate_keyboard; rv+=$?
|
||||
migrate_language; rv+=$?
|
||||
|
||||
test $rv -eq 0 && touch /var/lib/systemd/i18n-migrated
|
||||
fi
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 24 06:33:33 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- migrate-sysconfig-i18n.sh: fix marker handling (bsc#1173229)
|
||||
|
||||
The marker is used to make sure the script is run only once. Instead
|
||||
of storing it in /usr, use /var which is more appropriate for such
|
||||
file.
|
||||
|
||||
Also make it owned by systemd package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 23 13:29:18 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -729,6 +729,7 @@ touch %{buildroot}%{_sysconfdir}/vconsole.conf
|
||||
touch %{buildroot}%{_sysconfdir}/locale.conf
|
||||
touch %{buildroot}%{_sysconfdir}/machine-info
|
||||
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
|
||||
touch %{buildroot}%{_localstatedir}/lib/systemd/i18n-migrated
|
||||
|
||||
%fdupes -s %{buildroot}%{_mandir}
|
||||
|
||||
@ -872,10 +873,9 @@ fi
|
||||
# This is needed both at package updates and package installations
|
||||
# because we might be upgrading from a system which was running SysV
|
||||
# init (systemd package is being installed).
|
||||
if ! test -e %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done; then
|
||||
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh &&
|
||||
touch %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done || :
|
||||
fi
|
||||
#
|
||||
# It's run only once.
|
||||
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
|
||||
|
||||
%postun
|
||||
%systemd_postun
|
||||
@ -1318,6 +1318,7 @@ fi
|
||||
%endif
|
||||
%ghost %{_localstatedir}/lib/systemd/catalog/database
|
||||
%ghost %{_localstatedir}/lib/systemd/backlight
|
||||
%ghost %{_localstatedir}/lib/systemd/i18n-migrated
|
||||
%ghost %attr(0600,root,root) %{_localstatedir}/lib/systemd/random-seed
|
||||
|
||||
%dir %{_datadir}/bash-completion
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 24 06:33:33 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- migrate-sysconfig-i18n.sh: fix marker handling (bsc#1173229)
|
||||
|
||||
The marker is used to make sure the script is run only once. Instead
|
||||
of storing it in /usr, use /var which is more appropriate for such
|
||||
file.
|
||||
|
||||
Also make it owned by systemd package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 23 13:29:18 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -727,6 +727,7 @@ touch %{buildroot}%{_sysconfdir}/vconsole.conf
|
||||
touch %{buildroot}%{_sysconfdir}/locale.conf
|
||||
touch %{buildroot}%{_sysconfdir}/machine-info
|
||||
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
|
||||
touch %{buildroot}%{_localstatedir}/lib/systemd/i18n-migrated
|
||||
|
||||
%fdupes -s %{buildroot}%{_mandir}
|
||||
|
||||
@ -870,10 +871,9 @@ fi
|
||||
# This is needed both at package updates and package installations
|
||||
# because we might be upgrading from a system which was running SysV
|
||||
# init (systemd package is being installed).
|
||||
if ! test -e %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done; then
|
||||
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh &&
|
||||
touch %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done || :
|
||||
fi
|
||||
#
|
||||
# It's run only once.
|
||||
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
|
||||
|
||||
%postun
|
||||
%systemd_postun
|
||||
@ -1316,6 +1316,7 @@ fi
|
||||
%endif
|
||||
%ghost %{_localstatedir}/lib/systemd/catalog/database
|
||||
%ghost %{_localstatedir}/lib/systemd/backlight
|
||||
%ghost %{_localstatedir}/lib/systemd/i18n-migrated
|
||||
%ghost %attr(0600,root,root) %{_localstatedir}/lib/systemd/random-seed
|
||||
|
||||
%dir %{_datadir}/bash-completion
|
||||
|
Loading…
Reference in New Issue
Block a user