From 320d2b8532a961041cbff37171f85c974b009d31 Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Tue, 9 Dec 2014 12:41:37 +0100 Subject: [PATCH] Add xdiagnose graphical as a fallback if display-manager can't start --- debian/changelog | 10 +++++++++ debian/control | 3 ++- .../patches/Add-xdiagnose-graphical-fallback.patch | 25 ++++++++++++++++++++++ ...r-rcS.d-services-after-local-fs.target-if.patch | 2 +- ...ealize-and-migrate-cgroups-multiple-times.patch | 2 +- .../Provide-shutdown-fallback-for-upstart.patch | 6 +++--- .../Support-system-image-read-only-etc.patch | 6 +++--- ...ession-scopes-into-all-cgroup-controllers.patch | 2 +- debian/patches/insserv.conf-generator.patch | 6 +++--- debian/patches/series | 1 + 10 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 debian/patches/Add-xdiagnose-graphical-fallback.patch diff --git a/debian/changelog b/debian/changelog index 9830b3e..75684f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +systemd (217-3ubuntu2) UNRELEASED; urgency=medium + + * Add xdiagnose graphical as a fallback if display-manager can't start: + - debian/patches/Add-xdiagnose-graphical-fallback.patch: patch graphical + target to require display-manager and fallback to + failsafe-graphical.target + - recommends xdiagnose 3.7 + + -- Didier Roche Tue, 09 Dec 2014 12:38:41 +0100 + systemd (217-3ubuntu1) vivid; urgency=medium * Merge with Debian unstable. Remaining Ubuntu changes: diff --git a/debian/control b/debian/control index 2eae1b0..e2b9cdf 100644 --- a/debian/control +++ b/debian/control @@ -46,7 +46,8 @@ Architecture: linux-any Section: admin Priority: optional Recommends: libpam-systemd, - dbus + dbus, + xdiagnose (>= 3.7), Suggests: systemd-ui Pre-Depends: ${shlibs:Pre-Depends}, ${misc:Pre-Depends} diff --git a/debian/patches/Add-xdiagnose-graphical-fallback.patch b/debian/patches/Add-xdiagnose-graphical-fallback.patch new file mode 100644 index 0000000..ae0e400 --- /dev/null +++ b/debian/patches/Add-xdiagnose-graphical-fallback.patch @@ -0,0 +1,25 @@ +From: Didier Roche +Date: Tue, 9 Dec 2014 12:36:31 +0100 +Subject: Add xdiagnose graphical fallback + +Make graphical target requiring the display manager. If this unit fails, +fallback to failsafe-graphical provided by xdiagnose. +--- + units/graphical.target | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/units/graphical.target b/units/graphical.target +index a2c4532..2ed6ea9 100644 +--- a/units/graphical.target ++++ b/units/graphical.target +@@ -8,8 +8,9 @@ + [Unit] + Description=Graphical Interface + Documentation=man:systemd.special(7) +-Requires=multi-user.target ++Requires=multi-user.target display-manager.service + After=multi-user.target + Conflicts=rescue.target + Wants=display-manager.service + AllowIsolate=yes ++OnFailure=failsafe-graphical.target diff --git a/debian/patches/Do-not-order-rcS.d-services-after-local-fs.target-if.patch b/debian/patches/Do-not-order-rcS.d-services-after-local-fs.target-if.patch index 428538f..6e7d77e 100644 --- a/debian/patches/Do-not-order-rcS.d-services-after-local-fs.target-if.patch +++ b/debian/patches/Do-not-order-rcS.d-services-after-local-fs.target-if.patch @@ -31,7 +31,7 @@ index 863d7f3..ec63e74 100644 diff --git a/src/insserv-generator/insserv-generator.c b/src/insserv-generator/insserv-generator.c -index 9d417f0..0404ccc 100644 +index e8e5cae..ea1ab79 100644 --- a/src/insserv-generator/insserv-generator.c +++ b/src/insserv-generator/insserv-generator.c @@ -64,7 +64,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char diff --git a/debian/patches/Do-not-realize-and-migrate-cgroups-multiple-times.patch b/debian/patches/Do-not-realize-and-migrate-cgroups-multiple-times.patch index b5e01e0..92cd28a 100644 --- a/debian/patches/Do-not-realize-and-migrate-cgroups-multiple-times.patch +++ b/debian/patches/Do-not-realize-and-migrate-cgroups-multiple-times.patch @@ -16,7 +16,7 @@ the root cgroup in all controllers (except systemd). 1 file changed, 7 insertions(+) diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 58e1758..05beaa1 100644 +index 58e1758..137cb87 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -602,6 +602,13 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) { diff --git a/debian/patches/Provide-shutdown-fallback-for-upstart.patch b/debian/patches/Provide-shutdown-fallback-for-upstart.patch index ba74a2f..35891f7 100644 --- a/debian/patches/Provide-shutdown-fallback-for-upstart.patch +++ b/debian/patches/Provide-shutdown-fallback-for-upstart.patch @@ -17,7 +17,7 @@ LP: #1370329 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 0a40cc2..cf11596 100644 +index be2eee2..2bd3ec9 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -34,6 +34,7 @@ @@ -28,7 +28,7 @@ index 0a40cc2..cf11596 100644 #include #include #include -@@ -6710,6 +6711,41 @@ static int talk_initctl(void) { +@@ -6741,6 +6742,41 @@ static int talk_initctl(void) { return 1; } @@ -70,7 +70,7 @@ index 0a40cc2..cf11596 100644 static int systemctl_main(sd_bus *bus, int argc, char *argv[], int bus_error) { static const struct { -@@ -6943,11 +6979,15 @@ static int start_with_fallback(sd_bus *bus) { +@@ -6974,11 +7010,15 @@ static int start_with_fallback(sd_bus *bus) { goto done; } diff --git a/debian/patches/Support-system-image-read-only-etc.patch b/debian/patches/Support-system-image-read-only-etc.patch index 3bf9b02..4c1c6f6 100644 --- a/debian/patches/Support-system-image-read-only-etc.patch +++ b/debian/patches/Support-system-image-read-only-etc.patch @@ -15,7 +15,7 @@ Bug-Ubuntu: https://launchpad.net/bugs/1227520 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c -index a449610..f761ae7 100644 +index 0123922..6e99fd1 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -76,6 +76,25 @@ static void context_free(Context *c) { @@ -44,7 +44,7 @@ index a449610..f761ae7 100644 static int context_read_data(Context *c) { int r; struct utsname u; -@@ -299,12 +318,12 @@ static int context_write_data_static_hostname(Context *c) { +@@ -300,12 +319,12 @@ static int context_write_data_static_hostname(Context *c) { if (isempty(c->data[PROP_STATIC_HOSTNAME])) { @@ -59,7 +59,7 @@ index a449610..f761ae7 100644 } static int context_write_data_machine_info(Context *c) { -@@ -350,13 +369,13 @@ static int context_write_data_machine_info(Context *c) { +@@ -351,13 +370,13 @@ static int context_write_data_machine_info(Context *c) { } if (strv_isempty(l)) { diff --git a/debian/patches/core-Put-session-scopes-into-all-cgroup-controllers.patch b/debian/patches/core-Put-session-scopes-into-all-cgroup-controllers.patch index b8f8cd3..3c563c5 100644 --- a/debian/patches/core-Put-session-scopes-into-all-cgroup-controllers.patch +++ b/debian/patches/core-Put-session-scopes-into-all-cgroup-controllers.patch @@ -22,7 +22,7 @@ https://launchpad.net/bugs/1346734 3 files changed, 64 insertions(+) diff --git a/src/core/scope.c b/src/core/scope.c -index 0f7c1f9..aa90ba7 100644 +index 0f7c1f9..406c281 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -294,6 +294,20 @@ static int scope_start(Unit *u) { diff --git a/debian/patches/insserv.conf-generator.patch b/debian/patches/insserv.conf-generator.patch index f25de8c..928901b 100644 --- a/debian/patches/insserv.conf-generator.patch +++ b/debian/patches/insserv.conf-generator.patch @@ -22,8 +22,8 @@ It has the following modifications: --- Makefile.am | 9 + src/insserv-generator/Makefile | 28 +++ - src/insserv-generator/insserv-generator.c | 377 ++++++++++++++++++++++++++++++ - 3 files changed, 414 insertions(+) + src/insserv-generator/insserv-generator.c | 378 ++++++++++++++++++++++++++++++ + 3 files changed, 415 insertions(+) create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/insserv-generator.c @@ -90,7 +90,7 @@ index 0000000..9d07505 +.PHONY: all clean diff --git a/src/insserv-generator/insserv-generator.c b/src/insserv-generator/insserv-generator.c new file mode 100644 -index 0000000..9d417f0 +index 0000000..e8e5cae --- /dev/null +++ b/src/insserv-generator/insserv-generator.c @@ -0,0 +1,378 @@ diff --git a/debian/patches/series b/debian/patches/series index 4c5d216..09fde4d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,3 +68,4 @@ cgroup-util-Add-more-well-known-controller-names.patch core-Put-session-scopes-into-all-cgroup-controllers.patch cgroup-Initialize-cpuset.clone_children.patch Do-not-realize-and-migrate-cgroups-multiple-times.patch +Add-xdiagnose-graphical-fallback.patch -- 2.1.3