From 202db63534c000271c7fb6f81154e699fea8289854573bb59bdce237f5a14151 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 17 May 2013 15:16:28 +0000 Subject: [PATCH] Accepting request 175971 from home:fcrozat:branches:Base:System - Add sysctl-handle-boot-sysctl.conf-kernel_release.patch: ensure /boot/sysctl.conf- is handled (bnc#809420). OBS-URL: https://build.opensuse.org/request/show/175971 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=382 --- ...ndle-boot-sysctl.conf-kernel_release.patch | 53 +++++++++++++++++++ systemd-mini.changes | 6 +++ systemd-mini.spec | 5 +- systemd.changes | 6 +++ systemd.spec | 5 +- 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 sysctl-handle-boot-sysctl.conf-kernel_release.patch diff --git a/sysctl-handle-boot-sysctl.conf-kernel_release.patch b/sysctl-handle-boot-sysctl.conf-kernel_release.patch new file mode 100644 index 00000000..9213a508 --- /dev/null +++ b/sysctl-handle-boot-sysctl.conf-kernel_release.patch @@ -0,0 +1,53 @@ +From 752a4370ecb5643a432ad73b1e22c80cd304948f Mon Sep 17 00:00:00 2001 +From: Frederic Crozat +Date: Fri, 17 May 2013 13:31:46 +0200 +Subject: [PATCH] sysctl: handle /boot/sysctl.conf- + +Add support for kernel release sysctl.conf files (for per-flavor +configuration), needed by openSUSE (bnc#809420). +--- + src/sysctl/sysctl.c | 8 ++++++++ + units/systemd-sysctl.service.in | 1 + + 2 files changed, 9 insertions(+) + +diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c +index db18dd9..aa10b79 100644 +--- a/src/sysctl/sysctl.c ++++ b/src/sysctl/sysctl.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include "log.h" + #include "strv.h" +@@ -297,6 +298,13 @@ int main(int argc, char *argv[]) { + } else { + _cleanup_strv_free_ char **files = NULL; + char **f; ++ char kernel_sysctl[PATH_MAX]; ++ struct utsname uts; ++ ++ assert_se(uname(&uts) >= 0); ++ ++ snprintf(kernel_sysctl, sizeof(kernel_sysctl), "/boot/sysctl.conf-%s", uts.release); ++ r = parse_file(sysctl_options, kernel_sysctl, true); + + r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs); + if (r < 0) { +diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in +index 45e1ceb..61d13c9 100644 +--- a/units/systemd-sysctl.service.in ++++ b/units/systemd-sysctl.service.in +@@ -19,6 +19,7 @@ ConditionDirectoryNotEmpty=|/usr/lib/sysctl.d + ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d + ConditionDirectoryNotEmpty=|/etc/sysctl.d + ConditionDirectoryNotEmpty=|/run/sysctl.d ++ConditionPathExistsGlob=|/boot/sysctl.conf-* + + [Service] + Type=oneshot +-- +1.8.1.4 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 085a2d34..fc7cfcfd 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 17 11:46:02 UTC 2013 - fcrozat@suse.com + +- Add sysctl-handle-boot-sysctl.conf-kernel_release.patch: ensure + /boot/sysctl.conf- is handled (bnc#809420). + ------------------------------------------------------------------- Wed May 15 13:02:05 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 72ac98e9..86dbc1f1 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -153,8 +153,10 @@ Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch Patch27: apply-ACL-for-nvidia-device-nodes.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch -# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch -- FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. +# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. Patch39: systemd-tmp-safe-defaults.patch +# PATCH-FIX-OPENSUSE sysctl-handle-boot-sysctl.conf-kernel_release.patch bnc#809420 fcrozat@suse.com -- handle /boot/sysctl.conf- file +Patch40: sysctl-handle-boot-sysctl.conf-kernel_release.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -401,6 +403,7 @@ cp %{SOURCE7} m4/ %patch37 -p1 %patch38 -p1 %patch39 -p1 +%patch40 -p1 %build autoreconf -fiv diff --git a/systemd.changes b/systemd.changes index 085a2d34..fc7cfcfd 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 17 11:46:02 UTC 2013 - fcrozat@suse.com + +- Add sysctl-handle-boot-sysctl.conf-kernel_release.patch: ensure + /boot/sysctl.conf- is handled (bnc#809420). + ------------------------------------------------------------------- Wed May 15 13:02:05 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 180253b1..94cff34f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -148,8 +148,10 @@ Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch Patch27: apply-ACL-for-nvidia-device-nodes.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch -# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch -- FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. +# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. Patch39: systemd-tmp-safe-defaults.patch +# PATCH-FIX-OPENSUSE sysctl-handle-boot-sysctl.conf-kernel_release.patch bnc#809420 fcrozat@suse.com -- handle /boot/sysctl.conf- file +Patch40: sysctl-handle-boot-sysctl.conf-kernel_release.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -396,6 +398,7 @@ cp %{SOURCE7} m4/ %patch37 -p1 %patch38 -p1 %patch39 -p1 +%patch40 -p1 %build autoreconf -fiv