diff --git a/systemd-mini.changes b/systemd-mini.changes index 131a1e63..063817c0 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,68 @@ +------------------------------------------------------------------- +Fri Nov 6 08:34:18 UTC 2020 - Franck Bui + +- Import commit fdce77ce2067f9dd90d816bad28b51efed0b6dc1 + + 05fff5bd02 generator: use kmsg in system-level generators, journal otherwise + ecc07954de log: normalize log target condition check + d32ceea42b log: update comment + 2ebad02b60 basic/virt: Detect PowerVM hypervisor (bsc#1176800) + +------------------------------------------------------------------- +Mon Nov 2 15:17:20 UTC 2020 - Franck Bui + +- Simplify systemd-sysv-convert + + - the previous code incorrectly assumed that the sysv init scripts + were uninstalled before %post get executed. It therefore save the + enablement state in %pre and restore it in %post. Now all is done + in %post (making --save option useless) and there's no more need + to remember the enablement state. + + - "--save" option is a NOP but is still kept for backward + compatibility. + + - the previous simplifcation made /var/lib/systemd/migrated no more + used. + + - we do not search for units in /lib/systemd anymore, this shouldn't + be needed anymore these days especially since this path was only + used when systemd was introduced in openSUSE and it was never used + in SLE (checked SLE12-GA). + + - the option --show has been dropped. It's never been used even + internally. + + - the DB is populated only once even if the script was enabled at + multiple runlevels. The runlevel info was never used. A dummy + value is still added to keep the same format just in case. + +------------------------------------------------------------------- +Wed Oct 21 09:52:38 UTC 2020 - Franck Bui + +- No more need to clean the journal-upload stuff with --without=journal_remote + + Since -Dremote build option has been introduced with meson, this + workaround is no more needed. + +------------------------------------------------------------------- +Mon Oct 19 19:53:48 UTC 2020 - Franck Bui + +- Move journal-{remote,upload}.conf.5.gz man pages into systemd-journal_remote sub package + +------------------------------------------------------------------- +Mon Oct 19 18:50:38 UTC 2020 - Franck Bui + +- Explicitly list files in /usr/lib/sysusers.d shipped by the main package + + Currently only one config file is shipped in this directory and we + want to check any new files that may be added in the future. + +------------------------------------------------------------------- +Mon Oct 19 17:29:38 UTC 2020 - Franck Bui + +- Use %{_modulesloaddir}, %{_environmentdir} and %{_modprobedir} wherever appropriate + ------------------------------------------------------------------- Tue Oct 13 09:29:40 UTC 2020 - Franck Bui @@ -8,7 +73,7 @@ Tue Oct 13 09:29:40 UTC 2020 - Franck Bui ------------------------------------------------------------------- Tue Oct 13 08:50:13 UTC 2020 - Franck Bui -- Rely on systemd-default-settings for overriding system default settings +- Rely on systemd-default-settings for overriding system default settings (bsc#1172517) The new branding packages now ships the drop-ins to customize systemd either for an openSUSE or a SLE ditro. @@ -496,6 +561,7 @@ Thu Dec 5 14:00:03 UTC 2019 - Franck Bui - upstream commit 27c3112dcbd1b5f171c36c32550d9c6331375b0b (bsc#1155574) - upstream commit 21b40f16622f171a9969dc334d74fb5eb2f575c2 (bsc#1159814) - upstream commit 9b88bb5023dfa3cea406c14fdaa3d8e3e320907a (jsc#SLE-7689) + - upstream commit bc9ecd484f1ebfe0de8b567c90f6cd867fbd5894 (bsc#1141597) Legacy and obsolete symlinks have been finally dropped. @@ -744,6 +810,7 @@ Tue Sep 3 15:10:10 UTC 2019 - Franck Bui - upstream commit 83cb24ac20baf19f7834931dcf6e03486b4c9c30 (bsc#1156213) - upstream commit a2dcb1d78737d3daa301ee63fbdd02837acb71a8 (bsc#1158485) - upstream commit 08185cff19efcb1d7d9fb7b546e7f516ab6dae91 (bsc#1165011) + - upstream commit 59c55e73eaee345e1ee67c23eace8895ed499693 (bsc#1177510) Drop 0001-Revert-insserv.conf-generator.patch as it's been dropped from branch SUSE/v243 while we were rebasing. diff --git a/systemd-mini.spec b/systemd-mini.spec index 06ec129d..45a51d96 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -26,7 +26,7 @@ ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### %define mini -mini %define min_kernel_version 4.5 -%define suse_version +suse.27.gd7b5ac76dc +%define suse_version +suse.32.gfdce77ce20 %bcond_with gnuefi %if 0%{?bootstrap} @@ -657,14 +657,6 @@ rm -f %{buildroot}%{_sysusersdir}/basic.conf # in this directory... oh well. rm -f %{buildroot}/etc/init.d/README -# journal-upload is built if libcurl is installed which can happen -# when importd is enabled (whereas journal_remote is not). -%if ! %{with journal_remote} -rm -f %{buildroot}%{_sysconfdir}/systemd/journal-upload.conf -rm -f %{buildroot}%{_prefix}/lib/systemd/systemd-journal-upload -rm -f %{buildroot}%{_unitdir}/systemd-journal-upload.* -%endif - # Create the /var/log/journal directory to change the volatile journal # to a persistent one mkdir -p %{buildroot}%{_localstatedir}/log/journal/ @@ -1187,18 +1179,16 @@ fi %endif %dir %{_sysconfdir}/modules-load.d -%{_prefix}/lib/modules-load.d +%{_modulesloaddir} + +%dir %{_sysusersdir} +%{_sysusersdir}/systemd.conf -%{_sysusersdir}/ %dir %{_sysconfdir}/tmpfiles.d %{_tmpfilesdir}/ %exclude %{_tmpfilesdir}/systemd-nspawn.conf -%if %{with journal_remote} -%exclude %{_sysusersdir}/systemd-remote.conf -%endif - -%{_prefix}/lib/environment.d/ +%{_environmentdir}/ %dir %{_binfmtdir} %dir %{_sysconfdir}/binfmt.d @@ -1241,8 +1231,8 @@ fi %{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf # FIXME: why do we have to own this dir ? -%dir %{_prefix}/lib/modprobe.d -%{_prefix}/lib/modprobe.d/systemd.conf +%dir %{_modprobedir} +%{_modprobedir}/systemd.conf # Some files created at runtime. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf @@ -1300,6 +1290,10 @@ fi %if %{with importd} %exclude %{_mandir}/man*/systemd-importd* %endif +%if %{with journal_remote} +%exclude %{_mandir}/man5/journal-remote.conf* +%exclude %{_mandir}/man5/journal-upload.conf* +%endif %if %{with portabled} %exclude %{_mandir}/man*/portablectl* %exclude %{_mandir}/man*/systemd-portabled* @@ -1551,6 +1545,8 @@ fi %{_prefix}/lib/systemd/systemd-journal-remote %{_prefix}/lib/systemd/systemd-journal-upload %{_sysusersdir}/systemd-remote.conf +%{_mandir}/man5/journal-remote.conf* +%{_mandir}/man5/journal-upload.conf* %{_mandir}/man8/systemd-journal-gatewayd.* %{_mandir}/man8/systemd-journal-remote.* %{_mandir}/man8/systemd-journal-upload.* diff --git a/systemd-sysv-convert b/systemd-sysv-convert index 5d07c48d..8a75b941 100644 --- a/systemd-sysv-convert +++ b/systemd-sysv-convert @@ -1,146 +1,112 @@ #!/bin/bash +info() { + echo "$(basename $0): $*" +} + +warn() { + echo >&2 "$(basename $0): warning, $*" +} + +usage() { + echo >&2 "usage: $(basename $0) --apply [ ...]" +} + if [ "$UID" != "0" ]; then - echo Need to be root. + warn "need to be root, aborting" exit 1 fi -declare -A results_target - -usage() { - cat << EOF -usage: systemd-sysv-convert [-h] [--save] [--show] [--apply] - SERVICE [SERVICE ...] -EOF -} - -help() { +if [ $# -lt 2 ]; then usage - cat << EOF -Save and Restore SysV Service Runlevel Information + exit 1 +fi -positional arguments: - SERVICE Service names +database_lookup() { + local service unused -optional arguments: - -h, --help show this help message and exit - --save Save SysV runlevel information for one or more services - --show Show saved SysV runlevel information for one or more services - --apply Apply saved SysV runlevel information for one or more services - to systemd counterparts -EOF -} - -find_service() { - local service=$1 - local rcnd=$2 - - case $rcnd in - boot.d) [ -L /etc/rc.d/$rcnd/S??boot.$service ] ;; - *) [ -L /etc/rc.d/$rcnd/S??$service ] - esac -} - -lookup_database() { - local services=$@ - local service - local runlevel - local priority - - # 'priority' field is not used but is kept for backward compat - # reason. - while read service runlevel priority; do - for s in $services ; do - if [ $s == $service ]; then - results_target[$service]+=" runlevel$runlevel.target" - break - fi - done - done < /var/lib/systemd/sysv-convert/database -} - -declare -i fail=0 -case "$1" in - -h|--help) - help - exit 0 - ;; - --save) - shift - for service in $@ ; do - if [ ! -r /etc/init.d/$service ] && [ ! -r /etc/init.d/boot.$service ]; then - echo "SysV service $service does not exist, skipping" - continue - fi - for rcnd in rc2.d rc3.d rc4.d rc5.d boot.d; do - case $rcnd in - rc*.d) runlevel=${rcnd:2:1} ;; - boot.d) runlevel=3 ;; - esac - - # Write a dumb priority as it is not used. - find_service $service $rcnd && - echo "$service $runlevel 50" >>/var/lib/systemd/sysv-convert/database - done - done - ;; - --show) - shift - services=$@ - lookup_database $services - for service in $services; do - if [ -z "${results_target[$service]}" ]; then - echo "No information about service $service found." >/dev/stderr - let fail++ - continue - fi - for target in ${results_target[$service]}; do - echo "SysV service '$service' is pulled by $target" - done - done - ;; - --apply) - shift - services=$@ - for service in $services; do - if [ ! -f "/lib/systemd/system/$service.service" -a ! -f "/usr/lib/systemd/system/$service.service" ]; then - echo systemd service $service.service does not exist. >/dev/stderr - exit 1 - fi - done - - # - # The database might no have been created by a previous --save - # call. This can happen when: - # - # - we're upgrading a package which initially didn't - # have any unit file nor sysv init script and now - # start shipping one or more unit files (bsc#982303). - # - # - the sysv init service wasn't enabled at all before - # being migrated to a native unit file (bsc#982211). - # - if [ -e /var/lib/systemd/sysv-convert/database ]; then - lookup_database $services - for service in $services; do - [ -f "/lib/systemd/system/$service.service" ] && unit="/lib/systemd/system/$service.service" - [ -f "/usr/lib/systemd/system/$service.service" ] && unit="/usr/lib/systemd/system/$service.service" - - # If $service is not present in the database, - # then it simply means that the sysv init - # service was not enabled at all. - for target in ${results_target[$service]}; do - echo ln -sf $unit /etc/systemd/system/$target.wants/$service.service >/dev/stderr - mkdir -p "/etc/systemd/system/$target.wants" - /bin/ln -sf $unit /etc/systemd/system/$target.wants/$service.service - done - done + # 'priority' field is not used but is kept for backward compat reason. + while read service unused; do + if [ $service == $1 ]; then + return 0 fi - ;; - *) - usage - let fail=2 - ;; -esac + done >/var/lib/systemd/sysv-convert/database +} + +# Initialize the database. +if [ ! -e /var/lib/systemd/sysv-convert/database ]; then + touch /var/lib/systemd/sysv-convert/database +fi + +case "$1" in +--save) + # --save is kept for backward compatibility. + ;; +--apply) + shift + for service in $@; do + # For backward compat we accept the name of the + # service with or without the unit type suffix. If the + # suffix is not there, assume .service type. + case "$service" in + *.*) initscript="${service%.*}" ;; + *) initscript="$service" + service="$service.service" + esac + + # Did we already migrate this service during a previous update ? + database_lookup $initscript && + continue + + # Sanity check. + unit="/usr/lib/systemd/system/$service" + if [ ! -f "$unit" ]; then + warn "$unit not found, skipping" + continue + fi + + # Mark the service as processed to make sure we will do the migration only + # once. This is important especially for packages that keep their init + # scripts around even if they're no more used. Since the saved info won't + # be reused again we simply use an invalid runlevel and add the service + # in the db only once. + database_add $initscript -1 + + # The package is introducing new services and never has any sysv init + # scripts (bsc#982303). + if [ ! -r /etc/init.d/$initscript ] && + [ ! -r /etc/init.d/boot.$initscript ]; then + continue + fi + + for rcnd in rc2.d rc3.d rc4.d rc5.d boot.d; do + # Was the sysvinit script enabled ? (bsc#982211) + case $rcnd in + boot.d) [ -L /etc/rc.d/boot.d/S??boot.$initscript ] || continue ;; + *) [ -L /etc/rc.d/$rcnd/S??$initscript ] || continue + esac + + case $rcnd in + boot.d) runlevel=3 ;; + *) runlevel=${rcnd:2:1} + esac + + target=runlevel$runlevel.target + info "enabling $unit (wanted by $target)..." + + mkdir -p "/etc/systemd/system/$target.wants" + ln -sf $unit /etc/systemd/system/$target.wants/$service + done + done + ;; +*) + usage + exit 1 +esac diff --git a/systemd-v246.6+suse.32.gfdce77ce20.tar.xz b/systemd-v246.6+suse.32.gfdce77ce20.tar.xz new file mode 100644 index 00000000..8b205eb8 --- /dev/null +++ b/systemd-v246.6+suse.32.gfdce77ce20.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:004c6f73d42c28b4706a44c3da99e8c8054ed324b4e77422abdcde0a93caa757 +size 6552480 diff --git a/systemd.changes b/systemd.changes index 131a1e63..063817c0 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,68 @@ +------------------------------------------------------------------- +Fri Nov 6 08:34:18 UTC 2020 - Franck Bui + +- Import commit fdce77ce2067f9dd90d816bad28b51efed0b6dc1 + + 05fff5bd02 generator: use kmsg in system-level generators, journal otherwise + ecc07954de log: normalize log target condition check + d32ceea42b log: update comment + 2ebad02b60 basic/virt: Detect PowerVM hypervisor (bsc#1176800) + +------------------------------------------------------------------- +Mon Nov 2 15:17:20 UTC 2020 - Franck Bui + +- Simplify systemd-sysv-convert + + - the previous code incorrectly assumed that the sysv init scripts + were uninstalled before %post get executed. It therefore save the + enablement state in %pre and restore it in %post. Now all is done + in %post (making --save option useless) and there's no more need + to remember the enablement state. + + - "--save" option is a NOP but is still kept for backward + compatibility. + + - the previous simplifcation made /var/lib/systemd/migrated no more + used. + + - we do not search for units in /lib/systemd anymore, this shouldn't + be needed anymore these days especially since this path was only + used when systemd was introduced in openSUSE and it was never used + in SLE (checked SLE12-GA). + + - the option --show has been dropped. It's never been used even + internally. + + - the DB is populated only once even if the script was enabled at + multiple runlevels. The runlevel info was never used. A dummy + value is still added to keep the same format just in case. + +------------------------------------------------------------------- +Wed Oct 21 09:52:38 UTC 2020 - Franck Bui + +- No more need to clean the journal-upload stuff with --without=journal_remote + + Since -Dremote build option has been introduced with meson, this + workaround is no more needed. + +------------------------------------------------------------------- +Mon Oct 19 19:53:48 UTC 2020 - Franck Bui + +- Move journal-{remote,upload}.conf.5.gz man pages into systemd-journal_remote sub package + +------------------------------------------------------------------- +Mon Oct 19 18:50:38 UTC 2020 - Franck Bui + +- Explicitly list files in /usr/lib/sysusers.d shipped by the main package + + Currently only one config file is shipped in this directory and we + want to check any new files that may be added in the future. + +------------------------------------------------------------------- +Mon Oct 19 17:29:38 UTC 2020 - Franck Bui + +- Use %{_modulesloaddir}, %{_environmentdir} and %{_modprobedir} wherever appropriate + ------------------------------------------------------------------- Tue Oct 13 09:29:40 UTC 2020 - Franck Bui @@ -8,7 +73,7 @@ Tue Oct 13 09:29:40 UTC 2020 - Franck Bui ------------------------------------------------------------------- Tue Oct 13 08:50:13 UTC 2020 - Franck Bui -- Rely on systemd-default-settings for overriding system default settings +- Rely on systemd-default-settings for overriding system default settings (bsc#1172517) The new branding packages now ships the drop-ins to customize systemd either for an openSUSE or a SLE ditro. @@ -496,6 +561,7 @@ Thu Dec 5 14:00:03 UTC 2019 - Franck Bui - upstream commit 27c3112dcbd1b5f171c36c32550d9c6331375b0b (bsc#1155574) - upstream commit 21b40f16622f171a9969dc334d74fb5eb2f575c2 (bsc#1159814) - upstream commit 9b88bb5023dfa3cea406c14fdaa3d8e3e320907a (jsc#SLE-7689) + - upstream commit bc9ecd484f1ebfe0de8b567c90f6cd867fbd5894 (bsc#1141597) Legacy and obsolete symlinks have been finally dropped. @@ -744,6 +810,7 @@ Tue Sep 3 15:10:10 UTC 2019 - Franck Bui - upstream commit 83cb24ac20baf19f7834931dcf6e03486b4c9c30 (bsc#1156213) - upstream commit a2dcb1d78737d3daa301ee63fbdd02837acb71a8 (bsc#1158485) - upstream commit 08185cff19efcb1d7d9fb7b546e7f516ab6dae91 (bsc#1165011) + - upstream commit 59c55e73eaee345e1ee67c23eace8895ed499693 (bsc#1177510) Drop 0001-Revert-insserv.conf-generator.patch as it's been dropped from branch SUSE/v243 while we were rebasing. diff --git a/systemd.spec b/systemd.spec index c32b14c0..03f5ba0f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -24,7 +24,7 @@ %define bootstrap 0 %define mini %nil %define min_kernel_version 4.5 -%define suse_version +suse.27.gd7b5ac76dc +%define suse_version +suse.32.gfdce77ce20 %bcond_with gnuefi %if 0%{?bootstrap} @@ -655,14 +655,6 @@ rm -f %{buildroot}%{_sysusersdir}/basic.conf # in this directory... oh well. rm -f %{buildroot}/etc/init.d/README -# journal-upload is built if libcurl is installed which can happen -# when importd is enabled (whereas journal_remote is not). -%if ! %{with journal_remote} -rm -f %{buildroot}%{_sysconfdir}/systemd/journal-upload.conf -rm -f %{buildroot}%{_prefix}/lib/systemd/systemd-journal-upload -rm -f %{buildroot}%{_unitdir}/systemd-journal-upload.* -%endif - # Create the /var/log/journal directory to change the volatile journal # to a persistent one mkdir -p %{buildroot}%{_localstatedir}/log/journal/ @@ -1185,18 +1177,16 @@ fi %endif %dir %{_sysconfdir}/modules-load.d -%{_prefix}/lib/modules-load.d +%{_modulesloaddir} + +%dir %{_sysusersdir} +%{_sysusersdir}/systemd.conf -%{_sysusersdir}/ %dir %{_sysconfdir}/tmpfiles.d %{_tmpfilesdir}/ %exclude %{_tmpfilesdir}/systemd-nspawn.conf -%if %{with journal_remote} -%exclude %{_sysusersdir}/systemd-remote.conf -%endif - -%{_prefix}/lib/environment.d/ +%{_environmentdir}/ %dir %{_binfmtdir} %dir %{_sysconfdir}/binfmt.d @@ -1239,8 +1229,8 @@ fi %{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf # FIXME: why do we have to own this dir ? -%dir %{_prefix}/lib/modprobe.d -%{_prefix}/lib/modprobe.d/systemd.conf +%dir %{_modprobedir} +%{_modprobedir}/systemd.conf # Some files created at runtime. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf @@ -1298,6 +1288,10 @@ fi %if %{with importd} %exclude %{_mandir}/man*/systemd-importd* %endif +%if %{with journal_remote} +%exclude %{_mandir}/man5/journal-remote.conf* +%exclude %{_mandir}/man5/journal-upload.conf* +%endif %if %{with portabled} %exclude %{_mandir}/man*/portablectl* %exclude %{_mandir}/man*/systemd-portabled* @@ -1549,6 +1543,8 @@ fi %{_prefix}/lib/systemd/systemd-journal-remote %{_prefix}/lib/systemd/systemd-journal-upload %{_sysusersdir}/systemd-remote.conf +%{_mandir}/man5/journal-remote.conf* +%{_mandir}/man5/journal-upload.conf* %{_mandir}/man8/systemd-journal-gatewayd.* %{_mandir}/man8/systemd-journal-remote.* %{_mandir}/man8/systemd-journal-upload.*