From 84cf7b39fb80676a70f1b72ba4c471b1e7773b3e26b7a92d915d234dc854de05 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 26 Sep 2017 12:43:17 +0000 Subject: [PATCH] Accepting request 528799 from home:fbui:systemd:Factory - Import commit 9e0985dc330b1cf04bc44049962343bdf4ba851a 4fd7cd041 pam_logind: skip leading /dev/ from PAM_TTY field before passing it on dd6312828 logind: make sure we don't process the same method call twice (#6583) - Update scripts-systemd-upgrade-from-pre-210.sh script - drop dependency on awk - fallback to runlevel #3 if something goes wrong Note: I'm not sure how this is supposed to work as /etc/inittab is likely to be missing in my understanding. Indeed this file is part of the aaa_base package which might be upgraded before systemd is installed... - Drop macros.systemd.upstream as it's not used OBS-URL: https://build.opensuse.org/request/show/528799 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=989 --- macros.systemd.upstream | 105 ------------------------ scripts-systemd-upgrade-from-pre-210.sh | 16 ++-- systemd-234.tar.xz | 4 +- systemd-mini.changes | 26 ++++++ systemd-mini.spec | 2 - systemd.changes | 26 ++++++ systemd.spec | 2 - 7 files changed, 65 insertions(+), 116 deletions(-) delete mode 100644 macros.systemd.upstream diff --git a/macros.systemd.upstream b/macros.systemd.upstream deleted file mode 100644 index 2ba0ff05..00000000 --- a/macros.systemd.upstream +++ /dev/null @@ -1,105 +0,0 @@ -# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ -# -# This file is part of systemd. -# -# Copyright 2012 Lennart Poettering -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# systemd is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with systemd; If not, see . - -# RPM macros for packages installing systemd unit files - -%_unitdir @systemunitdir@ -%_userunitdir @userunitdir@ -%_presetdir @systempresetdir@ -%_udevhwdbdir @udevhwdbdir@ -%_udevrulesdir @udevrulesdir@ -%_journalcatalogdir @catalogdir@ -%_tmpfilesdir @tmpfilesdir@ -%_sysusersdir @sysusersdir@ -%_sysctldir @sysctldir@ -%_binfmtdir @binfmtdir@ - -%systemd_requires \ -Requires(post): systemd \ -Requires(preun): systemd \ -Requires(postun): systemd \ -%{nil} - -%systemd_post() \ -if [ $1 -eq 1 ] ; then \ - # Initial installation \ - systemctl --no-reload preset %{?*} >/dev/null 2>&1 || : \ -fi \ -%{nil} - -%systemd_user_post() %systemd_post --user --global %{?*} - -%systemd_preun() \ -if [ $1 -eq 0 ] ; then \ - # Package removal, not upgrade \ - systemctl --no-reload disable --now %{?*} > /dev/null 2>&1 || : \ -fi \ -%{nil} - -%systemd_user_preun() \ -if [ $1 -eq 0 ] ; then \ - # Package removal, not upgrade \ - systemctl --no-reload --user --global disable %{?*} > /dev/null 2>&1 || : \ -fi \ -%{nil} - -%systemd_postun() %{nil} - -%systemd_user_postun() %{nil} - -%systemd_postun_with_restart() \ -if [ $1 -ge 1 ] ; then \ - # Package upgrade, not uninstall \ - systemctl try-restart %{?*} >/dev/null 2>&1 || : \ -fi \ -%{nil} - -%systemd_user_postun_with_restart() %{nil} - -%udev_hwdb_update() \ -udevadm hwdb --update >/dev/null 2>&1 || : \ -%{nil} - -%udev_rules_update() \ -udevadm control --reload >/dev/null 2>&1 || : \ -%{nil} - -%journal_catalog_update() \ -journalctl --update-catalog >/dev/null 2>&1 || : \ -%{nil} - -%tmpfiles_create() \ -systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \ -%{nil} - -%sysusers_create() \ -systemd-sysusers %{?*} >/dev/null 2>&1 || : \ -%{nil} - -%sysusers_create_inline() \ -echo %{?*} | systemd-sysusers - >/dev/null 2>&1 || : \ -%{nil} - -%sysctl_apply() \ -@rootlibexecdir@/systemd-sysctl %{?*} >/dev/null 2>&1 || : \ -%{nil} - -%binfmt_apply() \ -@rootlibexecdir@/systemd-binfmt %{?*} >/dev/null 2>&1 || : \ -%{nil} diff --git a/scripts-systemd-upgrade-from-pre-210.sh b/scripts-systemd-upgrade-from-pre-210.sh index b94a3985..24738567 100644 --- a/scripts-systemd-upgrade-from-pre-210.sh +++ b/scripts-systemd-upgrade-from-pre-210.sh @@ -8,12 +8,18 @@ # All hacks can potentially break the admin settings since they work # in /etc... -# Try to read default runlevel from the old inittab if it exists +# Try to read default runlevel from the old inittab if it exists. If +# it fails fallback to runlevel 3 which should still be better than +# the rescue shell. +# +# Note: /etc/inittab was part of the aaa_base package which can be +# upgraded before systemd is. Therefore this file is likely to be +# missing. if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then - runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab) - if [ -n "$runlevel" ] ; then - ln -sf /usr/lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target - fi + runlevel=$(sed -n -r "s/^id:([[:digit:]]):initdefault:/\1/p" /etc/inittab) + : ${runlevel:=3} + echo "Initializing default.target to runlevel${runlevel}.target" + ln -s /usr/lib/systemd/system/runlevel${runlevel}.target /etc/systemd/system/default.target fi # since v207 /etc/sysctl.conf is no longer parsed, however diff --git a/systemd-234.tar.xz b/systemd-234.tar.xz index 07321344..e3b02184 100644 --- a/systemd-234.tar.xz +++ b/systemd-234.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e6748a9e064fa60601d85dd13b360142e3d54f31be45b17773d6be3abb9b05f -size 3350944 +oid sha256:6ee3972f4e9cb106edc944878ffd753b55e3318efad555bf06c8e66770e7605e +size 3351148 diff --git a/systemd-mini.changes b/systemd-mini.changes index cbbe1a27..e8f8c007 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Sep 26 10:14:22 UTC 2017 - fbui@suse.com + +- Import commit 9e0985dc330b1cf04bc44049962343bdf4ba851a + + 4fd7cd041 pam_logind: skip leading /dev/ from PAM_TTY field before passing it on + dd6312828 logind: make sure we don't process the same method call twice (#6583) + +------------------------------------------------------------------- +Tue Sep 26 09:27:12 UTC 2017 - fbui@suse.com + +- Update scripts-systemd-upgrade-from-pre-210.sh script + + - drop dependency on awk + - fallback to runlevel #3 if something goes wrong + + Note: I'm not sure how this is supposed to work as /etc/inittab is + likely to be missing in my understanding. Indeed this file is part + of the aaa_base package which might be upgraded before systemd is + installed... + +------------------------------------------------------------------- +Tue Sep 26 08:08:22 UTC 2017 - fbui@suse.com + +- Drop macros.systemd.upstream as it's not used + ------------------------------------------------------------------- Thu Sep 14 16:34:16 UTC 2017 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index c63b0f9a..02ebdf99 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -128,7 +128,6 @@ Requires(post): findutils Requires(post): systemd-presets-branding Requires(post): pam-config >= 0.79-5 %endif -Requires(post): /usr/bin/awk %if 0%{?bootstrap} Conflicts: systemd @@ -147,7 +146,6 @@ Source2: systemd-user Source3: systemd-sysv-convert Source6: baselibs.conf Source7: libgcrypt.m4 -Source10: macros.systemd.upstream Source11: after-local.service Source12: systemd-sysv-install Source14: kbd-model-map.legacy diff --git a/systemd.changes b/systemd.changes index cbbe1a27..e8f8c007 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Sep 26 10:14:22 UTC 2017 - fbui@suse.com + +- Import commit 9e0985dc330b1cf04bc44049962343bdf4ba851a + + 4fd7cd041 pam_logind: skip leading /dev/ from PAM_TTY field before passing it on + dd6312828 logind: make sure we don't process the same method call twice (#6583) + +------------------------------------------------------------------- +Tue Sep 26 09:27:12 UTC 2017 - fbui@suse.com + +- Update scripts-systemd-upgrade-from-pre-210.sh script + + - drop dependency on awk + - fallback to runlevel #3 if something goes wrong + + Note: I'm not sure how this is supposed to work as /etc/inittab is + likely to be missing in my understanding. Indeed this file is part + of the aaa_base package which might be upgraded before systemd is + installed... + +------------------------------------------------------------------- +Tue Sep 26 08:08:22 UTC 2017 - fbui@suse.com + +- Drop macros.systemd.upstream as it's not used + ------------------------------------------------------------------- Thu Sep 14 16:34:16 UTC 2017 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index 97ac7b9b..304d2471 100644 --- a/systemd.spec +++ b/systemd.spec @@ -126,7 +126,6 @@ Requires(post): findutils Requires(post): systemd-presets-branding Requires(post): pam-config >= 0.79-5 %endif -Requires(post): /usr/bin/awk %if 0%{?bootstrap} Conflicts: systemd @@ -145,7 +144,6 @@ Source2: systemd-user Source3: systemd-sysv-convert Source6: baselibs.conf Source7: libgcrypt.m4 -Source10: macros.systemd.upstream Source11: after-local.service Source12: systemd-sysv-install Source14: kbd-model-map.legacy