From f16919c0b47aeedf44db5adbb874dff96962470d34a82f3bb760d46d2eeeb805 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 26 Oct 2017 08:03:18 +0000 Subject: [PATCH] Accepting request 536441 from home:markkp:branches:network:time - Modified the spec file to comment out the pool statement in chrony.conf if _not_ building for openSUSE. (bsc#1063704). OBS-URL: https://build.opensuse.org/request/show/536441 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=33 --- chrony.changes | 6 ++++++ chrony.spec | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/chrony.changes b/chrony.changes index 4d639b2..95f19fb 100644 --- a/chrony.changes +++ b/chrony.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 24 18:23:56 UTC 2017 - mpost@suse.com + +- Modified the spec file to comment out the pool statement + in chrony.conf if _not_ building for openSUSE. (bsc#1063704). + ------------------------------------------------------------------- Thu Sep 28 16:17:08 UTC 2017 - mrueckert@suse.de diff --git a/chrony.spec b/chrony.spec index 57b3992..324e895 100644 --- a/chrony.spec +++ b/chrony.spec @@ -25,6 +25,10 @@ %bcond_with systemd %bcond_with syscallfilter %endif +# If is_opensuse is not defined, then this is an older version of SLES +# or some other distribution. So, if not defined then define it as 0 +%if 0%{!?is_opensuse:%global is_opensuse 0} +%endif Name: chrony Version: 3.2 Release: 0 @@ -107,9 +111,16 @@ or a different computer. %patch2 -p1 %patch5 -p1 -# use our vendor zone (2.*pool.ntp.org names include IPv6 addresses) +# If this is an openSUSE build, use our vendor zone +# (2.*pool.ntp.org names include IPv6 addresses). If not +# an openSUSE build, comment out the pool statement +%if %{is_opensuse} sed -e 's|^\(pool \)\(pool.ntp.org\)|\12.%{vendorzone}\2|' \ < examples/chrony.conf.example2 > chrony.conf +%else +sed -e 's|^\pool|! pool|' \ + < examples/chrony.conf.example2 > chrony.conf +%endif touch -r examples/chrony.conf.example2 chrony.conf