SHA256
1
0
forked from pool/systemd

Accepting request 238415 from home:arvidjaar:bnc:883565:Factory

Backport of 0404c609 (bnc#883565)

OBS-URL: https://build.opensuse.org/request/show/238415
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=680
This commit is contained in:
Dr. Werner Fink 2014-06-24 10:02:12 +00:00 committed by Git OBS Bridge
parent 09aaae7186
commit 087d78212d
4 changed files with 73 additions and 10 deletions

View File

@ -0,0 +1,51 @@
From 0404c609f399b2092a3de52eef9d75b0dc12e94c Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 12 May 2014 21:26:54 +0200
Subject: [PATCH] core: sysvcompat - $network should be equivalent to
network-online, rather than network target
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Most likely the facility needed is actual connectivity, rather than whether or not the
network managment daemon is running.
We also need to explicitly pull in the network-online.target, as it is not active by
default.
This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default
as part of network-online.target, and only delay boot when some service actively pulls it in.
See: <https://bugzilla.gnome.org/show_bug.cgi?id=728965>
Cc: Pavel Šimerda <psimerda@redhat.com>
Cc: Michal Sekletar <msekleta@redhat.com>
---
TODO | 4 ----
src/core/service.c | 8 ++++++--
2 files changed, 6 insertions(+), 6 deletions(-)
Modified by Andrey Borzenkov <arvidjaar@gmail.com> for openSUSE.
Index: systemd-210/src/core/service.c
===================================================================
--- systemd-210.orig/src/core/service.c
+++ systemd-210/src/core/service.c
@@ -404,7 +404,7 @@ static int sysv_translate_facility(const
static const char * const table[] = {
/* LSB defined facilities */
"local_fs", NULL,
- "network", SPECIAL_NETWORK_TARGET,
+ "network", SPECIAL_NETWORK_ONLINE_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
@@ -881,6 +881,9 @@ static int service_load_sysv_path(Servic
if (r == 0)
continue;
+ if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET) && d == UNIT_AFTER && e == _UNIT_DEPENDENCY_INVALID)
+ e = UNIT_WANTS;
+
if (e != _UNIT_DEPENDENCY_INVALID)
r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true);
else

View File

@ -13,11 +13,11 @@ systemd unit drop-in files to add dependencies
create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c
Index: systemd-208/Makefile.am
Index: systemd-210/Makefile.am
===================================================================
--- systemd-208.orig/Makefile.am
+++ systemd-208/Makefile.am
@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \
--- systemd-210.orig/Makefile.am
+++ systemd-210/Makefile.am
@@ -343,6 +343,7 @@ rootlibexec_PROGRAMS = \
systemd-socket-proxyd
systemgenerator_PROGRAMS = \
@ -25,7 +25,7 @@ Index: systemd-208/Makefile.am
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator
@@ -1658,6 +1659,14 @@ systemd_delta_LDADD = \
@@ -1728,6 +1729,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@ -40,10 +40,10 @@ Index: systemd-208/Makefile.am
systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c
Index: systemd-208/src/insserv-generator/Makefile
Index: systemd-210/src/insserv-generator/Makefile
===================================================================
--- /dev/null
+++ systemd-208/src/insserv-generator/Makefile
+++ systemd-210/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@
+# This file is part of systemd.
+#
@ -73,10 +73,10 @@ Index: systemd-208/src/insserv-generator/Makefile
+ $(MAKE) -C .. clean
+
+.PHONY: all clean
Index: systemd-208/src/insserv-generator/insserv-generator.c
Index: systemd-210/src/insserv-generator/insserv-generator.c
===================================================================
--- /dev/null
+++ systemd-208/src/insserv-generator/insserv-generator.c
+++ systemd-210/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,312 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@ -146,7 +146,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c
+ static const char * const table[] = {
+ /* LSB defined facilities */
+ "local_fs", NULL,
+ "network", SPECIAL_NETWORK_TARGET,
+ "network", SPECIAL_NETWORK_ONLINE_TARGET,
+ "named", SPECIAL_NSS_LOOKUP_TARGET,
+ "portmap", SPECIAL_RPCBIND_TARGET,
+ "remote_fs", SPECIAL_REMOTE_FS_TARGET,

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com
- make sure legacy services that depend on network are started after
network is available (bnc#883565)
* 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch
* update insserv-generator.patch to translate $network into
network-online.target
-------------------------------------------------------------------
Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de

View File

@ -561,6 +561,8 @@ Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch
Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch
# PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438)
Patch281: 0001-detect-s390-virt.patch
# PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available
Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch
# UDEV PATCHES
# ============
@ -1081,6 +1083,7 @@ cp %{SOURCE7} m4/
%patch279 -p0
%patch280 -p0
%patch281 -p1
%patch282 -p1
# udev patches
%patch1001 -p1