From 7888635f1528f372c7da7996b3cd266dfb911aca09c3a5198c00cc717288064c Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 22 Jan 2019 12:52:01 +0000 Subject: [PATCH] Accepting request 667787 from home:dmolkentin:branches:security:dehydrated - Remove RandomizedDelaySec attribute for distros with older systemd (boo#1110697) OBS-URL: https://build.opensuse.org/request/show/667787 OBS-URL: https://build.opensuse.org/package/show/security:dehydrated/dehydrated?expand=0&rev=36 --- dehydrated.changes | 6 ++++++ dehydrated.spec | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dehydrated.changes b/dehydrated.changes index 094ac15..2a0ec27 100644 --- a/dehydrated.changes +++ b/dehydrated.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 22 11:52:00 UTC 2019 - Daniel Molkentin + +- Remove RandomizedDelaySec attribute for distros with older systemd + (boo#1110697) + ------------------------------------------------------------------- Fri Apr 27 11:14:45 UTC 2018 - daniel.molkentin@suse.com diff --git a/dehydrated.spec b/dehydrated.spec index c4c3f92..0e4a257 100644 --- a/dehydrated.spec +++ b/dehydrated.spec @@ -1,7 +1,7 @@ # # spec file for package dehydrated # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -90,6 +90,7 @@ BuildRequires: generic-logos-httpd BuildRequires: shadow %endif %if %{with systemd} +BuildRequires: systemd BuildRequires: pkgconfig(systemd) %{?systemd_requires} %else #with_systemd @@ -229,6 +230,10 @@ install -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf sed "s,@POSTRUNHOOKS_DIR@,%{_postrunhooks},g" %{SOURCE6} > dehydrated.service install -D -m 644 dehydrated.service %{buildroot}%{_unitdir}/dehydrated.service install -D -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/dehydrated.timer +if [ $(rpm -q --queryformat='%{VERSION}' systemd) -lt 229 ]; then +# No support for this attribute in systemd < v229 +sed -i 's/^RandomizedDelaySec/#&/' %{buildroot}%{_unitdir}/dehydrated.timer +fi %if 0%{?suse_version} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcdehydrated %endif