From f964b55e7f2eea79072a38d1df2318b6d8cd05840f2d403611842b77e4b84d2a Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Mon, 27 May 2013 09:58:29 +0000 Subject: [PATCH] Accepting request 176648 from home:fcrozat:branches:Base:System - Do no ship defaults for sysctl, they should be part of aaa_base (currently in procps). - Add hostname-setup-shortname.patch: ensure shortname is set as hostname (bnc#820213). OBS-URL: https://build.opensuse.org/request/show/176648 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=385 --- hostname-setup-shortname.patch | 25 +++++++++++++++++++++++++ systemd-mini.changes | 8 ++++++++ systemd-mini.spec | 10 ++++++++-- systemd.changes | 8 ++++++++ systemd.spec | 10 ++++++++-- 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 hostname-setup-shortname.patch diff --git a/hostname-setup-shortname.patch b/hostname-setup-shortname.patch new file mode 100644 index 00000000..37f7440e --- /dev/null +++ b/hostname-setup-shortname.patch @@ -0,0 +1,25 @@ +Index: systemd-202/src/core/hostname-setup.c +=================================================================== +--- systemd-202.orig/src/core/hostname-setup.c ++++ systemd-202/src/core/hostname-setup.c +@@ -32,7 +32,7 @@ + #include "fileio.h" + + static int read_and_strip_hostname(const char *path, char **hn) { +- char *s; ++ char *s, *domain; + int r; + + assert(path); +@@ -49,6 +49,11 @@ static int read_and_strip_hostname(const + return -ENOENT; + } + ++ /* strip any leftover of a domain name */ ++ if (domain = strchr(s, '.')) { ++ *domain = NULL; ++ } ++ + *hn = s; + return 0; + } diff --git a/systemd-mini.changes b/systemd-mini.changes index a92519aa..cb74ecbc 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 24 11:37:49 UTC 2013 - fcrozat@suse.com + +- Do no ship defaults for sysctl, they should be part of aaa_base + (currently in procps). +- Add hostname-setup-shortname.patch: ensure shortname is set as + hostname (bnc#820213). + ------------------------------------------------------------------- Fri May 17 15:53:33 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 999bce16..628686af 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -156,6 +156,8 @@ Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch 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 +# PATCH-FIX-OPENSUSE hostname-setup-shortname.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname +Patch41: hostname-setup-shortname.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -403,6 +405,7 @@ cp %{SOURCE7} m4/ %patch38 -p1 %patch39 -p1 %patch40 -p1 +%patch41 -p1 %build autoreconf -fiv @@ -519,7 +522,11 @@ EOF # kernel.core_pattern setting until systemd-coredump is a part of an actual # systemd release and it's made clear how to get the core dumps out of the # journal. -rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/50-coredump.conf +rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf + +# do not ship sysctl defaults in systemd package, will be part of +# aaa_base (in procps for now) +rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf # remove README file for now rm -f %{buildroot}/etc/init.d/README @@ -822,7 +829,6 @@ rm -rf %{buildroot} %dir %{_sysconfdir}/binfmt.d %dir %{_libexecdir}/sysctl.d -%{_libexecdir}/sysctl.d/50-default.conf %dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/systemd diff --git a/systemd.changes b/systemd.changes index a92519aa..cb74ecbc 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 24 11:37:49 UTC 2013 - fcrozat@suse.com + +- Do no ship defaults for sysctl, they should be part of aaa_base + (currently in procps). +- Add hostname-setup-shortname.patch: ensure shortname is set as + hostname (bnc#820213). + ------------------------------------------------------------------- Fri May 17 15:53:33 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index ff03d454..65273b41 100644 --- a/systemd.spec +++ b/systemd.spec @@ -151,6 +151,8 @@ Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch 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 +# PATCH-FIX-OPENSUSE hostname-setup-shortname.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname +Patch41: hostname-setup-shortname.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -398,6 +400,7 @@ cp %{SOURCE7} m4/ %patch38 -p1 %patch39 -p1 %patch40 -p1 +%patch41 -p1 %build autoreconf -fiv @@ -514,7 +517,11 @@ EOF # kernel.core_pattern setting until systemd-coredump is a part of an actual # systemd release and it's made clear how to get the core dumps out of the # journal. -rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/50-coredump.conf +rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf + +# do not ship sysctl defaults in systemd package, will be part of +# aaa_base (in procps for now) +rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf # remove README file for now rm -f %{buildroot}/etc/init.d/README @@ -817,7 +824,6 @@ rm -rf %{buildroot} %dir %{_sysconfdir}/binfmt.d %dir %{_libexecdir}/sysctl.d -%{_libexecdir}/sysctl.d/50-default.conf %dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/systemd