From 09aaae7186b8f12fcac047d22ea66336fc2ae546c19aba00c203de018305968e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 Jun 2014 13:37:26 +0000 Subject: [PATCH] Add 0001-detect-s390-virt.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=679 --- 0001-detect-s390-virt.patch | 34 ++++++++++++++++++++++++++++++++++ systemd-mini.changes | 6 ++++++ systemd-mini.spec | 3 +++ systemd.changes | 6 ++++++ systemd.spec | 3 +++ 5 files changed, 52 insertions(+) create mode 100644 0001-detect-s390-virt.patch diff --git a/0001-detect-s390-virt.patch b/0001-detect-s390-virt.patch new file mode 100644 index 00000000..7e6f1390 --- /dev/null +++ b/0001-detect-s390-virt.patch @@ -0,0 +1,34 @@ +bnc#880438 - systemd-detect-virt doesn't work on System z + +--- systemd-210/src/shared/virt.c ++++ systemd-210/src/shared/virt.c 2014-06-17 08:03:30.152489353 +0000 +@@ -196,6 +196,29 @@ + } else + return r; + ++#if defined(__s390x__) ++ /* First layer virtualization (PR/SM) is always present on s390x */ ++ _id = "PR/SM"; ++ r = 1; ++ ++ /* Check for second layer virtualization */ ++ _cleanup_fclose_ FILE *f = NULL; ++ char line[LINE_MAX]; ++ f = fopen("/proc/sysinfo", "re"); ++ if (f) { ++ FOREACH_LINE(line, f, return -errno) { ++ if (startswith(line, "VM00 Control Program:")) { ++ if (strstr(line,"z/VM")) ++ _id = "z/VM"; ++ ++ break; ++ } ++ } ++ } ++ ++ goto finish; ++#endif ++ + /* this will set _id to "other" and return 0 for unknown hypervisors */ + r = detect_vm_cpuid(&_id); + if (r != 0) diff --git a/systemd-mini.changes b/systemd-mini.changes index ddad6785..b9be5413 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + ------------------------------------------------------------------- Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 13903ddd..35293d88 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -564,6 +564,8 @@ Patch278: 0001-core-fix-invalid-free-in-killall.patch Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 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 # UDEV PATCHES # ============ @@ -1083,6 +1085,7 @@ cp %{SOURCE7} m4/ %patch278 -p0 %patch279 -p0 %patch280 -p0 +%patch281 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index ddad6785..b9be5413 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + ------------------------------------------------------------------- Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index acd8e204..7d50e9ca 100644 --- a/systemd.spec +++ b/systemd.spec @@ -559,6 +559,8 @@ Patch278: 0001-core-fix-invalid-free-in-killall.patch Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 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 # UDEV PATCHES # ============ @@ -1078,6 +1080,7 @@ cp %{SOURCE7} m4/ %patch278 -p0 %patch279 -p0 %patch280 -p0 +%patch281 -p1 # udev patches %patch1001 -p1