From 8b1e73ecdba83f6c04a3e0fd0714c194dcc8304fa43622de5f6dceaea7059c1a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 30 Jul 2015 06:19:43 +0000 Subject: [PATCH] Accepting request 319468 from home:msmeissn:branches:Base:System - hostname-NULL.patch: Work around a crash on XEN hosts in OBS. /etc/hostname is not present and systemd then does strchr(hostname,soemthing) with hostname NULL. - hostname-NULL.patch: Work around a crash on XEN hosts in OBS. /etc/hostname is not present and systemd then does strchr(hostname,soemthing) with hostname NULL. OBS-URL: https://build.opensuse.org/request/show/319468 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=888 --- hostname-NULL.patch | 13 +++++++++++++ systemd-mini.changes | 7 +++++++ systemd-mini.spec | 3 +++ systemd.changes | 7 +++++++ systemd.spec | 3 +++ 5 files changed, 33 insertions(+) create mode 100644 hostname-NULL.patch diff --git a/hostname-NULL.patch b/hostname-NULL.patch new file mode 100644 index 00000000..ccd9133c --- /dev/null +++ b/hostname-NULL.patch @@ -0,0 +1,13 @@ +Index: systemd-222/src/core/hostname-setup.c +=================================================================== +--- systemd-222.orig/src/core/hostname-setup.c ++++ systemd-222/src/core/hostname-setup.c +@@ -44,7 +44,7 @@ int hostname_setup(void) { + else + log_warning_errno(r, "Failed to read configured hostname: %m"); + +- hn = NULL; ++ hn = strdup("nohostname.set.site"); + } else + hn = b; + /* strip any leftover of a domain name */ diff --git a/systemd-mini.changes b/systemd-mini.changes index e46d66ba..80f67526 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 29 18:10:53 UTC 2015 - meissner@suse.com + +- hostname-NULL.patch: Work around a crash on XEN hosts + in OBS. /etc/hostname is not present and systemd then does + strchr(hostname,soemthing) with hostname NULL. + ------------------------------------------------------------------- Wed Jul 29 09:02:21 UTC 2015 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 2f6e5e99..4ed89f7f 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -291,6 +291,8 @@ Patch1096: 1096-new-udev-root-symlink-generator.patch Patch1097: 1097-udevd-increase-maximum-number-of-children.patch # PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch Patch1098: 1098-systemd-networkd-alias-network-service.patch +# PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner +Patch1099: hostname-NULL.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -614,6 +616,7 @@ cp %{SOURCE7} m4/ %patch1096 -p1 %patch1097 -p1 %patch1098 -p1 +%patch1099 -p1 # remove patch backups find -name '*.orig' -exec rm -f '{}' \+ diff --git a/systemd.changes b/systemd.changes index e46d66ba..80f67526 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 29 18:10:53 UTC 2015 - meissner@suse.com + +- hostname-NULL.patch: Work around a crash on XEN hosts + in OBS. /etc/hostname is not present and systemd then does + strchr(hostname,soemthing) with hostname NULL. + ------------------------------------------------------------------- Wed Jul 29 09:02:21 UTC 2015 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index a59a9976..56a3c1d0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -286,6 +286,8 @@ Patch1096: 1096-new-udev-root-symlink-generator.patch Patch1097: 1097-udevd-increase-maximum-number-of-children.patch # PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch Patch1098: 1098-systemd-networkd-alias-network-service.patch +# PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner +Patch1099: hostname-NULL.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -609,6 +611,7 @@ cp %{SOURCE7} m4/ %patch1096 -p1 %patch1097 -p1 %patch1098 -p1 +%patch1099 -p1 # remove patch backups find -name '*.orig' -exec rm -f '{}' \+