diff --git a/1018-Make-LSB-Skripts-know-about-Required-and-Should.patch b/1018-Make-LSB-Skripts-know-about-Required-and-Should.patch new file mode 100644 index 0000000..81a2692 --- /dev/null +++ b/1018-Make-LSB-Skripts-know-about-Required-and-Should.patch @@ -0,0 +1,51 @@ +--- systemd-208/src/core/service.c ++++ systemd-208/src/core/service.c 2014-01-17 12:15:52.527311588 +0000 +@@ -380,6 +380,8 @@ static int sysv_translate_facility(const + "remote_fs", SPECIAL_REMOTE_FS_TARGET, + "syslog", NULL, + "time", SPECIAL_TIME_SYNC_TARGET, ++ "all", SPECIAL_DEFAULT_TARGET, ++ "null", NULL, + }; + + unsigned i; +@@ -389,7 +391,7 @@ static int sysv_translate_facility(const + assert(name); + assert(_r); + +- n = *name == '$' ? name + 1 : name; ++ n = (*name == '$' || *name == '+') ? name + 1 : name; + + for (i = 0; i < ELEMENTSOF(table); i += 2) { + +@@ -816,10 +818,13 @@ static int service_load_sysv_path(Servic + startswith_no_case(t, "Should-Start:") || + startswith_no_case(t, "X-Start-Before:") || + startswith_no_case(t, "X-Start-After:")) { ++ UnitDependency d, e; + char *i, *w; + size_t z; + + state = LSB; ++ d = startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER; ++ e = startswith_no_case(t, "Required-Start:") ? UNIT_REQUIRES_OVERRIDABLE : UNIT_WANTS; + + FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) { + char *n, *m; +@@ -838,12 +843,15 @@ static int service_load_sysv_path(Servic + continue; + } + ++ if (*n == '+') ++ e = UNIT_WANTS; ++ + free(n); + + if (r == 0) + continue; + +- r = unit_add_dependency_by_name(u, startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true); ++ r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true); + + if (r < 0) + log_error_unit(u->id, "[%s:%u] Failed to add dependency on %s, ignoring: %s", diff --git a/systemd.changes b/systemd.changes index 60b685c..a95a922 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 17 12:24:13 UTC 2014 - werner@suse.de + +- Add patch + 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch + to support the "+" to tag wanted dependencies as well as make + sure that required dependencies are handles as required ones. + This should fix bnc#858864 and bnc#857204. + ------------------------------------------------------------------- Wed Jan 15 14:11:02 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 8be1706..c332583 100644 --- a/systemd.spec +++ b/systemd.spec @@ -276,6 +276,8 @@ Patch1015: build-sys-make-multi-seat-x-optional.patch Patch1016: support-powerfail-with-powerstatus.patch # PATCH-FIX-SUSE 1017-enforce-sufficient-shutdown-warnings.patch Patch1017: 1017-enforce-sufficient-shutdown-warnings.patch +# PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch +Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -560,6 +562,7 @@ cp %{SOURCE7} m4/ %patch1015 -p1 %patch1016 -p1 %patch1017 -p1 +%patch1018 -p1 # ensure generate files are removed rm -f units/emergency.service