diff --git a/0008-sysv-generator-translate-Required-Start-into-a-Wants.patch b/0008-sysv-generator-translate-Required-Start-into-a-Wants.patch index 55b44930..001c0a6c 100644 --- a/0008-sysv-generator-translate-Required-Start-into-a-Wants.patch +++ b/0008-sysv-generator-translate-Required-Start-into-a-Wants.patch @@ -1,59 +1,28 @@ -From 7f59f7b1b506c1394712ad3d6bab81318052a14c Mon Sep 17 00:00:00 2001 +From 9e6a1f4b085b29abaf90ecd05859537b837b39fe Mon Sep 17 00:00:00 2001 From: Thomas Blume Date: Wed, 4 May 2016 17:40:04 +0200 -Subject: [PATCH 08/11] sysv-generator: translate "Required-Start" into a - "Wants" dependency +Subject: [PATCH 8/8] sysv-generator: translate "Required-Start" into a "Wants" + dependency + +'Required-Start:' used to be supported by insserv but this functionality was +dropped when insserv was rewritten into a compat perl wrapper (insserv-compat), +which happened when systemd was introduced in SUSE, I guess. + +It's been decided to add back the support in systemd instead of insserv-compat, +see the comments in bsc#857204. [tblume: Port of SLES12SP1 patch 0018-Make-LSB-Skripts-know-about-Required-and-Should.patch] -[fbui: this is needed probably because insserv's behavior has been - sadly changed since SLE11: it now doesn't failed if a - dependency listed by Required-Start is missing.] - -[fbui: according to Werner "This should fix bnc#858864 and - bnc#857204." (see Base:System changelog)] +[wfink: fixes bsc#857204] --- - src/sysv-generator/sysv-generator.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + src/sysv-generator/sysv-generator.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c -index fa5355c964..62755f3652 100644 +index bf23c48662..c6e1953839 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c -@@ -257,6 +257,7 @@ static int sysv_translate_facility(SysvStub *s, unsigned line, const char *name, - "remote_fs", SPECIAL_REMOTE_FS_TARGET, - "syslog", NULL, - "time", SPECIAL_TIME_SYNC_TARGET, -+ "all", SPECIAL_DEFAULT_TARGET, - }; - - const char *filename; -@@ -271,6 +272,7 @@ static int sysv_translate_facility(SysvStub *s, unsigned line, const char *name, - - filename = basename(s->path); - -+ n = *name == '+' ? ++name : name; - n = *name == '$' ? name + 1 : name; - - for (i = 0; i < ELEMENTSOF(table); i += 2) { -@@ -407,7 +409,7 @@ static int handle_dependencies(SysvStub *s, unsigned line, const char *full_text - - for (;;) { - _cleanup_free_ char *word = NULL, *m = NULL; -- bool is_before; -+ bool is_before, is_wanted; - - r = extract_first_word(&text, &word, NULL, EXTRACT_UNQUOTE|EXTRACT_RELAX); - if (r < 0) -@@ -420,6 +422,7 @@ static int handle_dependencies(SysvStub *s, unsigned line, const char *full_text - continue; - - is_before = startswith_no_case(full_text, "X-Start-Before:"); -+ is_wanted = startswith_no_case(full_text, "Required-Start:"); - - if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET) && !is_before) { - /* the network-online target is special, as it needs to be actively pulled in */ -@@ -428,8 +431,13 @@ static int handle_dependencies(SysvStub *s, unsigned line, const char *full_text +@@ -409,8 +409,13 @@ static int handle_dependencies(SysvStub *s, unsigned line, const char *full_text return log_oom(); r = strv_extend(&s->wants, m); @@ -61,7 +30,7 @@ index fa5355c964..62755f3652 100644 + } else { r = strv_extend(is_before ? &s->before : &s->after, m); + -+ if (is_wanted) ++ if (startswith_no_case(full_text, "Required-Start:")) + r = strv_extend(&s->wants, m); + } + @@ -69,5 +38,5 @@ index fa5355c964..62755f3652 100644 return log_oom(); } -- -2.26.2 +2.31.1 diff --git a/0009-pid1-handle-console-specificities-weirdness-for-s390.patch b/0009-pid1-handle-console-specificities-weirdness-for-s390.patch deleted file mode 100644 index 6124095d..00000000 --- a/0009-pid1-handle-console-specificities-weirdness-for-s390.patch +++ /dev/null @@ -1,60 +0,0 @@ -From dedd52f920cf7ae718bb31ac7286d3f7314540c6 Mon Sep 17 00:00:00 2001 -From: Franck Bui -Date: Fri, 10 Jun 2016 15:19:57 +0200 -Subject: [PATCH 09/11] pid1: handle console specificities/weirdness for s390 - arch - -The 3270 console on S/390 can do color but not the 3215 console. - -Partial forward port of -0001-On_s390_con3270_disable_ANSI_colour_esc.patch from SLE12-SP1. A -bunch of the previous code has been dropped since some changes -imported from upsteam made them uneeded. - -The remaining bits are probably hackish but at least they are now -minimal. - -It was an attempt to address bnc#860937. And yes turning the console -color mode off by passing $TERM=dumb via the kernel command line would -have been much more easier and enough. - -This is actually implemented by recent systemd. There's also another -command line option: systemd.log_color=off. - -See also a short discussion which happened on @systemd-maintainers -whose $subject is "[PATCH] support conmode setting on command line". - -[ fbui: fixes bsc#860937 ] ---- - src/basic/terminal-util.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c -index d769423d6e..1a65391146 100644 ---- a/src/basic/terminal-util.c -+++ b/src/basic/terminal-util.c -@@ -779,7 +779,20 @@ bool tty_is_vc_resolve(const char *tty) { - } - - const char *default_term_for_tty(const char *tty) { -- return tty && tty_is_vc_resolve(tty) ? "linux" : "vt220"; -+ if (tty && tty_is_vc_resolve(tty)) -+ return "linux"; -+ -+#if defined (__s390__) || defined (__s390x__) -+ if (tty && tty_is_console(tty)) { -+ _cleanup_free_ char *mode = NULL; -+ -+ /* Simply return "dumb" in case of OOM. */ -+ (void) proc_cmdline_get_key("conmode", 0, &mode); -+ (void) proc_cmdline_value_missing("conmode", mode); -+ return streq_ptr(mode, "3270") ? "ibm327x" : "dumb"; -+ } -+#endif -+ return "vt220"; - } - - int fd_columns(int fd) { --- -2.26.2 - diff --git a/0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch b/0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch new file mode 100644 index 00000000..91cc4e55 --- /dev/null +++ b/0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch @@ -0,0 +1,43 @@ +From 6f4d9d9688ad65bb46d09ac09f570c6ee4bc3671 Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Fri, 14 Jan 2022 08:17:38 +0100 +Subject: [PATCH 1010/1010] sysv: add back support for '$all' virtual facility + and '+' facitity name prefix + +'$all' was probably a Debian thing and has probably never been supported by RH, +which explains why systemd upstream never supported it too. At least I couldn't +find any reference of this facility name in +http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#FACILNAME. OTOH +'$all' is described in https://wiki.debian.org/LSBInitScripts + +Regarding the '+' prefix, I couldn't find any mention of it +anywhere. Apparently it was equivalent to '$' in facility names. + +[wfink: bsc#858864] +--- + src/sysv-generator/sysv-generator.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c +index c6e1953839..0aadb397ed 100644 +--- a/src/sysv-generator/sysv-generator.c ++++ b/src/sysv-generator/sysv-generator.c +@@ -243,6 +243,7 @@ static int sysv_translate_facility(SysvStub *s, unsigned line, const char *name, + "remote_fs", SPECIAL_REMOTE_FS_TARGET, + "syslog", NULL, + "time", SPECIAL_TIME_SYNC_TARGET, ++ "all", SPECIAL_DEFAULT_TARGET, + }; + + const char *filename; +@@ -257,6 +258,7 @@ static int sysv_translate_facility(SysvStub *s, unsigned line, const char *name, + + filename = basename(s->path); + ++ n = *name == '+' ? ++name : name; + n = *name == '$' ? name + 1 : name; + + for (i = 0; i < ELEMENTSOF(table); i += 2) { +-- +2.31.1 + diff --git a/systemd.changes b/systemd.changes index 6df14441..d41197ad 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jan 14 14:55:56 UTC 2022 - Franck Bui + +- Drop 0009-pid1-handle-console-specificities-weirdness-for-s390.patch, it's SLE + material. + +- Extract bits from 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch + which are not specific to the handling of 'Required-Start:' and move them into a + new patch 1010-sysv-add-back-support-for-all-virtual-facility-and-f.patch + ------------------------------------------------------------------- Thu Jan 13 21:54:06 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index aabaa681..f3655399 100644 --- a/systemd.spec +++ b/systemd.spec @@ -198,7 +198,7 @@ Patch5: 0005-udev-create-default-symlinks-for-primary-cd_dvd-driv.patch Patch6: 0006-sysv-generator-add-back-support-for-SysV-scripts-for.patch Patch7: 0007-networkd-make-network.service-an-alias-of-systemd-ne.patch Patch8: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch -Patch9: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch +Patch9: 0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch Patch10: 0001-conf-parser-introduce-early-drop-ins.patch Patch11: 0011-core-disable-session-keyring-per-system-sevice-entir.patch Patch12: 0012-resolved-create-etc-resolv.conf-symlink-at-runtime.patch