SHA256
1
0
forked from pool/systemd

Accepting request 816787 from Base:System

OBS-URL: https://build.opensuse.org/request/show/816787
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=312
This commit is contained in:
Dominique Leuenberger 2020-06-27 21:20:59 +00:00 committed by Git OBS Bridge
parent 9ff341ce06
commit 9ea81e08d6
5 changed files with 96 additions and 34 deletions

View File

@ -128,8 +128,18 @@ migrate_language () {
fi 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

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
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>
- Fix inconsistent file modes for some ghost files (bsc#1173227)
Ghost files are assumed by rpm to have mode 000 by default which is
not consistent with file permissions set at runtime.
Also /var/lib/systemd/random-seed was tracked wrongly as a
directory.
Also don't track (ghost) /etc/systemd/system/runlevel*.target
aliases since we're not supposed to track units or aliases user
might define/override.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 19 09:59:29 UTC 2020 - Franck Bui <fbui@suse.com> Fri Jun 19 09:59:29 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -672,10 +672,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog
# Create ghost databases
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
# Make sure the NTP units dir exists # Make sure the NTP units dir exists
mkdir -p %{buildroot}%{_ntpunitsdir} mkdir -p %{buildroot}%{_ntpunitsdir}
@ -724,8 +720,16 @@ EOF
install -m 644 %{S:11} %{buildroot}%{_unitdir}/ install -m 644 %{S:11} %{buildroot}%{_unitdir}/
ln -s ../after-local.service %{buildroot}%{_unitdir}/multi-user.target.wants/ ln -s ../after-local.service %{buildroot}%{_unitdir}/multi-user.target.wants/
# ghost directories with default permissions.
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed
# ghost files with default permisssions.
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
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} %fdupes -s %{buildroot}%{_mandir}
@ -869,10 +873,9 @@ fi
# This is needed both at package updates and package installations # This is needed both at package updates and package installations
# because we might be upgrading from a system which was running SysV # because we might be upgrading from a system which was running SysV
# init (systemd package is being installed). # 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 && # It's run only once.
touch %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done || : %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
fi
%postun %postun
%systemd_postun %systemd_postun
@ -1242,12 +1245,8 @@ fi
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
%ghost %config(noreplace) %{_sysconfdir}/locale.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf
%ghost %config(noreplace) %{_sysconfdir}/machine-id
%ghost %config(noreplace) %{_sysconfdir}/machine-info %ghost %config(noreplace) %{_sysconfdir}/machine-info
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target %ghost %attr(0444,root,root) %config(noreplace) %{_sysconfdir}/machine-id
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target
%{_datadir}/systemd %{_datadir}/systemd
%{_datadir}/factory %{_datadir}/factory
@ -1319,7 +1318,8 @@ fi
%endif %endif
%ghost %{_localstatedir}/lib/systemd/catalog/database %ghost %{_localstatedir}/lib/systemd/catalog/database
%ghost %{_localstatedir}/lib/systemd/backlight %ghost %{_localstatedir}/lib/systemd/backlight
%ghost %{_localstatedir}/lib/systemd/random-seed %ghost %{_localstatedir}/lib/systemd/i18n-migrated
%ghost %attr(0600,root,root) %{_localstatedir}/lib/systemd/random-seed
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
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>
- Fix inconsistent file modes for some ghost files (bsc#1173227)
Ghost files are assumed by rpm to have mode 000 by default which is
not consistent with file permissions set at runtime.
Also /var/lib/systemd/random-seed was tracked wrongly as a
directory.
Also don't track (ghost) /etc/systemd/system/runlevel*.target
aliases since we're not supposed to track units or aliases user
might define/override.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 19 09:59:29 UTC 2020 - Franck Bui <fbui@suse.com> Fri Jun 19 09:59:29 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -670,10 +670,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog
# Create ghost databases
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
# Make sure the NTP units dir exists # Make sure the NTP units dir exists
mkdir -p %{buildroot}%{_ntpunitsdir} mkdir -p %{buildroot}%{_ntpunitsdir}
@ -722,8 +718,16 @@ EOF
install -m 644 %{S:11} %{buildroot}%{_unitdir}/ install -m 644 %{S:11} %{buildroot}%{_unitdir}/
ln -s ../after-local.service %{buildroot}%{_unitdir}/multi-user.target.wants/ ln -s ../after-local.service %{buildroot}%{_unitdir}/multi-user.target.wants/
# ghost directories with default permissions.
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed
# ghost files with default permisssions.
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
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} %fdupes -s %{buildroot}%{_mandir}
@ -867,10 +871,9 @@ fi
# This is needed both at package updates and package installations # This is needed both at package updates and package installations
# because we might be upgrading from a system which was running SysV # because we might be upgrading from a system which was running SysV
# init (systemd package is being installed). # 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 && # It's run only once.
touch %{_prefix}/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done || : %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || :
fi
%postun %postun
%systemd_postun %systemd_postun
@ -1240,12 +1243,8 @@ fi
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
%ghost %config(noreplace) %{_sysconfdir}/locale.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf
%ghost %config(noreplace) %{_sysconfdir}/machine-id
%ghost %config(noreplace) %{_sysconfdir}/machine-info %ghost %config(noreplace) %{_sysconfdir}/machine-info
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target %ghost %attr(0444,root,root) %config(noreplace) %{_sysconfdir}/machine-id
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target
%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target
%{_datadir}/systemd %{_datadir}/systemd
%{_datadir}/factory %{_datadir}/factory
@ -1317,7 +1316,8 @@ fi
%endif %endif
%ghost %{_localstatedir}/lib/systemd/catalog/database %ghost %{_localstatedir}/lib/systemd/catalog/database
%ghost %{_localstatedir}/lib/systemd/backlight %ghost %{_localstatedir}/lib/systemd/backlight
%ghost %{_localstatedir}/lib/systemd/random-seed %ghost %{_localstatedir}/lib/systemd/i18n-migrated
%ghost %attr(0600,root,root) %{_localstatedir}/lib/systemd/random-seed
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions