From 076f43b39b799ce17e8d5ec427cccf09a64b943f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 10 Sep 2012 18:17:25 +0200 Subject: [PATCH] use correct vendor pool.ntp.org zone on RHEL (#845981) --- chrony.conf | 8 ++++---- chrony.spec | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/chrony.conf b/chrony.conf index 7e3690b..f383e45 100644 --- a/chrony.conf +++ b/chrony.conf @@ -1,9 +1,9 @@ # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). -server 0.fedora.pool.ntp.org iburst -server 1.fedora.pool.ntp.org iburst -server 2.fedora.pool.ntp.org iburst -server 3.fedora.pool.ntp.org iburst +server 0.VENDORZONE.pool.ntp.org iburst +server 1.VENDORZONE.pool.ntp.org iburst +server 2.VENDORZONE.pool.ntp.org iburst +server 3.VENDORZONE.pool.ntp.org iburst # Ignore stratum in source selection. stratumweight 0 diff --git a/chrony.spec b/chrony.spec index 24e6c7b..23739c7 100644 --- a/chrony.spec +++ b/chrony.spec @@ -33,12 +33,20 @@ systems with intermittent internet connections, but it also works well in permanently connected environments. It can use also hardware reference clocks, system real-time clock or manual input as time references. +%if 0%{!?vendorzone:1} +%{?fedora: %global vendorzone fedora.} +%{?rhel: %global vendorzone rhel.} +%endif + %prep %setup -q -n %{name}-%{version}%{?prerelease} %{?gitpatch:%patch0 -p1} %{?gitpatch: echo %{version}-%{gitpatch} > version.txt} +sed -e 's|VENDORZONE\.|%{vendorzone}|' < %{SOURCE1} > chrony.conf +touch -r %{SOURCE1} chrony.conf + %build CFLAGS="$RPM_OPT_FLAGS" %ifarch %{sparc} @@ -69,7 +77,7 @@ mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/systemd-timedated-ntp.target.wants -install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf +install -m 644 -p chrony.conf $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf install -m 640 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.keys install -m 644 -p %{SOURCE3} $RPM_BUILD_ROOT/lib/systemd/system/chronyd.service install -m 755 -p %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/chrony-helper