Accepting request 384762 from home:markkp:branches:network:time
Lots of changes to prepare chrony for inclusion in SLES12 SP2. OBS-URL: https://build.opensuse.org/request/show/384762 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=11
This commit is contained in:
parent
5d7a54988f
commit
ac8323b394
10
chrony-include-termios.patch
Normal file
10
chrony-include-termios.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/sys_linux.c
|
||||||
|
+++ b/sys_linux.c
|
||||||
|
@@ -50,6 +50,7 @@
|
||||||
|
#ifdef FEAT_SCFILTER
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <seccomp.h>
|
||||||
|
+#include <termios.h>
|
||||||
|
#ifdef FEAT_PHC
|
||||||
|
#include <linux/ptp_clock.h>
|
||||||
|
#endif
|
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 5 22:27:48 UTC 2016 - mpost@suse.com
|
||||||
|
|
||||||
|
- Removed %if for distributions that aren't building chrony.
|
||||||
|
- Renamed chrony-2.2_logrotate.patch to chrony-logrotate.patch since
|
||||||
|
the patch is not particularly version-dependent.
|
||||||
|
- Added clknetsim for "make check" processing.
|
||||||
|
- Added Buildrequires for gcc-c++ and timezone for building clknetsim
|
||||||
|
and running "make check".
|
||||||
|
- Changed Buildrequires and Requires to specify the minimum level of
|
||||||
|
libseccomp needed to build on s390x and ppc64le.
|
||||||
|
- Removed "-Recommends: timedatex" since I couldn't find any instance
|
||||||
|
of it anywhere in the build service.
|
||||||
|
- Modified the description to use some of the information from the
|
||||||
|
chrony web site.
|
||||||
|
- Added chrony-include-termios.patch so that it will build on ppc64le.
|
||||||
|
- Added make-105-ntpauth-more-reliable.patch so that "make check"
|
||||||
|
will not report a non-failure as a failure.
|
||||||
|
- Added --without-nss to ./configure to avoid "interruption code
|
||||||
|
0x2003B in chronyd" errors.
|
||||||
|
- Changed the symbolic links for rcchronyd and rcchronyd-wait to
|
||||||
|
point to the actual location of the service command, not the symlink
|
||||||
|
in /sbin.
|
||||||
|
- Added reference to chrony-dnssrv@.service in %pre, %preun, %post,
|
||||||
|
and %postun.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 28 09:35:07 UTC 2016 - mpluskal@suse.com
|
Mon Mar 28 09:35:07 UTC 2016 - mpluskal@suse.com
|
||||||
|
|
||||||
|
102
chrony.spec
102
chrony.spec
@ -11,24 +11,26 @@
|
|||||||
# case the license is the MIT License). An "Open Source License" is a
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
#
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define vendorzone opensuse.
|
%define vendorzone opensuse.
|
||||||
%if 0%{?suse_version} > 1230 || 0%{?rhel_version} > 600 || 0%{?centos_version} > 600 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}
|
%if 0%{?suse_version} > 1230
|
||||||
%bcond_without systemd
|
%bcond_without systemd
|
||||||
%bcond_without syscallfilter
|
%bcond_without syscallfilter
|
||||||
%else
|
%else
|
||||||
%bcond_with systemd
|
%bcond_with systemd
|
||||||
%bcond_with syscallfilter
|
%bcond_with syscallfilter
|
||||||
%endif
|
%endif
|
||||||
|
%global clknetsim_ver 96416d5
|
||||||
|
|
||||||
Name: chrony
|
Name: chrony
|
||||||
Version: 2.3
|
Version: 2.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: System Clock Synchronization Client and Server
|
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
|
Summary: System Clock Synchronization Client and Server
|
||||||
Group: Productivity/Networking/Other
|
Group: Productivity/Networking/Other
|
||||||
Url: http://chrony.tuxfamily.org/
|
Url: http://chrony.tuxfamily.org/
|
||||||
Source: http://download.tuxfamily.org/chrony/chrony-%{version}.tar.gz
|
Source: http://download.tuxfamily.org/chrony/chrony-%{version}.tar.gz
|
||||||
@ -38,11 +40,17 @@ Source3: chrony.dhclient
|
|||||||
Source4: chrony.helper
|
Source4: chrony.helper
|
||||||
Source5: chrony-dnssrv@.service
|
Source5: chrony-dnssrv@.service
|
||||||
Source6: chrony-dnssrv@.timer
|
Source6: chrony-dnssrv@.timer
|
||||||
|
# Simulator for test suite
|
||||||
|
Source10: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
||||||
|
|
||||||
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch0: chrony-config.patch
|
Patch0: chrony-config.patch
|
||||||
# add NTP servers from DHCP when starting service
|
# Add NTP servers from DHCP when starting service
|
||||||
Patch1: chrony-service-helper.patch
|
Patch1: chrony-service-helper.patch
|
||||||
Patch2: chrony-2.2_logrotate.patch
|
Patch2: chrony-logrotate.patch
|
||||||
|
Patch3: chrony-include-termios.patch
|
||||||
|
Patch4: make-105-ntpauth-more-reliable.patch
|
||||||
|
#
|
||||||
BuildRequires: NetworkManager-devel
|
BuildRequires: NetworkManager-devel
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
@ -50,17 +58,14 @@ BuildRequires: libedit-devel
|
|||||||
BuildRequires: mozilla-nss-devel
|
BuildRequires: mozilla-nss-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: texinfo
|
BuildRequires: texinfo
|
||||||
Requires: logrotate
|
BuildRequires: gcc-c++
|
||||||
Requires(pre): %fillup_prereq
|
# The timezone package is needed for the "make check" tests. It can be
|
||||||
Requires(pre): %{_sbindir}/groupadd
|
# removed if the call to make check is ever deleted.
|
||||||
Requires(pre): %{_sbindir}/useradd
|
BuildRequires: timezone
|
||||||
Requires(pre): %{install_info_prereq}
|
|
||||||
Recommends: timedatex
|
|
||||||
#
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
%if %{with syscallfilter}
|
%if %{with syscallfilter}
|
||||||
%ifarch %ix86 x86_64 %arm aarch64
|
%ifarch %{ix86} x86_64 %{arm} aarch64 s390 s390x ppc64le
|
||||||
BuildRequires: libseccomp-devel
|
BuildRequires: libseccomp-devel >= 2.2.0
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
@ -69,28 +74,45 @@ BuildRequires: pkgconfig(systemd)
|
|||||||
%else
|
%else
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
%endif
|
%endif
|
||||||
|
Requires: logrotate
|
||||||
|
Requires: libseccomp2 >= 2.2.0
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
Requires(pre): %{_sbindir}/groupadd
|
||||||
|
Requires(pre): %{_sbindir}/useradd
|
||||||
|
Requires(pre): %{install_info_prereq}
|
||||||
|
#
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Chrony is a pair of programs which are used to maintain the accuracy of the
|
Chrony is an implementation of the Network Time Protocol (NTP). It can
|
||||||
system clock on a computer. The two programs are called chronyd and chronyc.
|
synchronize the system clock with NTP servers, reference clocks (e.g. a
|
||||||
|
GPS receiver), and manual input using wristwatch and keyboard. It can
|
||||||
|
also operate as an NTPv4 (RFC 5905) server and peer to provide a time
|
||||||
|
service to other computers in the network.
|
||||||
|
|
||||||
Chronyd is a daemon which runs in background on the system. It obtains
|
Chrony consists of two programs: chronyd and chronyc.
|
||||||
measurements via the network of the system clock’s offset relative to time
|
|
||||||
servers on other systems and adjusts the system time accordingly. For isolated
|
|
||||||
systems, the user can periodically enter the correct time by hand (using
|
|
||||||
Chronyc). In either case, Chronyd determines the rate at which the computer
|
|
||||||
gains or loses time, and compensates for this. Chronyd implements the NTP
|
|
||||||
protocol and can act as either a client or a server.
|
|
||||||
|
|
||||||
Chronyc provides a user interface to Chronyd for monitoring its performance and
|
Chronyd is a daemon which runs in the background on the system. It
|
||||||
configuring various settings. It can do so while running on the same computer
|
obtains measurements of the system clock’s offset relative to time
|
||||||
as the Chronyd instance it is controlling or a different computer.
|
servers on other systems via the network and adjusts the system time
|
||||||
|
accordingly. For isolated systems, the user can periodically enter the
|
||||||
|
correct time by hand (using chronyc). In either case, chronyd
|
||||||
|
determines the rate at which the computer gains or loses time, and
|
||||||
|
compensates for this. Chronyd can act as either a client or a server.
|
||||||
|
|
||||||
|
Chronyc provides a user interface to chronyd for monitoring its
|
||||||
|
performance and configuring various settings. It can do so while
|
||||||
|
running on the same computer as the chronyd instance it is controlling
|
||||||
|
or a different computer.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -a 10
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
# use our vendor zone (2.*pool.ntp.org names include IPv6 addresses)
|
# use our vendor zone (2.*pool.ntp.org names include IPv6 addresses)
|
||||||
sed -e 's|^\(pool \)\(pool.ntp.org\)|\12.%{vendorzone}\2|' \
|
sed -e 's|^\(pool \)\(pool.ntp.org\)|\12.%{vendorzone}\2|' \
|
||||||
< examples/chrony.conf.example2 > chrony.conf
|
< examples/chrony.conf.example2 > chrony.conf
|
||||||
@ -100,6 +122,8 @@ touch -r examples/chrony.conf.example2 chrony.conf
|
|||||||
# regenerate the file from getdate.y
|
# regenerate the file from getdate.y
|
||||||
rm -f getdate.c
|
rm -f getdate.c
|
||||||
|
|
||||||
|
mv clknetsim-%{clknetsim_ver}* test/simulation/clknetsim
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# not autoconf:
|
# not autoconf:
|
||||||
export CFLAGS="%{optflags} -Wall -fpic -DPIC $(pkg-config --cflags libseccomp)"
|
export CFLAGS="%{optflags} -Wall -fpic -DPIC $(pkg-config --cflags libseccomp)"
|
||||||
@ -110,6 +134,7 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
|||||||
--enable-scfilter \
|
--enable-scfilter \
|
||||||
%endif
|
%endif
|
||||||
--with-user=chrony \
|
--with-user=chrony \
|
||||||
|
--without-nss \
|
||||||
--with-hwclockfile=%{_sysconfdir}/adjtime \
|
--with-hwclockfile=%{_sysconfdir}/adjtime \
|
||||||
--with-sendmail=%{_sbindir}/sendmail
|
--with-sendmail=%{_sbindir}/sendmail
|
||||||
|
|
||||||
@ -118,7 +143,7 @@ gzip -9 -f -n chrony.txt
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make %{?_smp_mflags} DESTDIR=%{buildroot} install install-docs
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install install-docs
|
||||||
rm -rf "%{buildroot}%{_docdir}/%{name}"
|
rm "%{buildroot}%{_docdir}/%{name}/%{name}.html"
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,logrotate.d}
|
mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,logrotate.d}
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/{lib,log}/chrony
|
mkdir -p %{buildroot}%{_localstatedir}/{lib,log}/chrony
|
||||||
@ -145,8 +170,8 @@ install -m 644 -p examples/chrony-wait.service \
|
|||||||
%{buildroot}%{_unitdir}/chrony-wait.service
|
%{buildroot}%{_unitdir}/chrony-wait.service
|
||||||
install -m 644 -p %{SOURCE5} %{buildroot}%{_unitdir}/chrony-dnssrv@.service
|
install -m 644 -p %{SOURCE5} %{buildroot}%{_unitdir}/chrony-dnssrv@.service
|
||||||
install -m 644 -p %{SOURCE6} %{buildroot}%{_unitdir}/chrony-dnssrv@.timer
|
install -m 644 -p %{SOURCE6} %{buildroot}%{_unitdir}/chrony-dnssrv@.timer
|
||||||
ln -s /sbin/service "%{buildroot}%{_sbindir}/rcchronyd"
|
ln -s /usr/sbin/service "%{buildroot}%{_sbindir}/rcchronyd"
|
||||||
ln -s /sbin/service "%{buildroot}%{_sbindir}/rcchrony-wait"
|
ln -s /usr/sbin/service "%{buildroot}%{_sbindir}/rcchrony-wait"
|
||||||
|
|
||||||
echo 'chronyd.service' > \
|
echo 'chronyd.service' > \
|
||||||
%{buildroot}%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list
|
%{buildroot}%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list
|
||||||
@ -160,17 +185,24 @@ install -m 755 -p %{SOURCE4} %{buildroot}%{_datadir}/chrony-helper
|
|||||||
|
|
||||||
touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}
|
touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}
|
||||||
|
|
||||||
|
%check
|
||||||
|
# Set random seed to get deterministic results
|
||||||
|
export CLKNETSIM_RANDOM_SEED=24501
|
||||||
|
make %{?_smp_mflags} -C test/simulation/clknetsim
|
||||||
|
|
||||||
|
make check
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%{_sbindir}/groupadd -r chrony >/dev/null 2>&1 || :
|
%{_sbindir}/groupadd -r chrony >/dev/null 2>&1 || :
|
||||||
%{_sbindir}/useradd -g chrony -s /bin/false -r -c "Chrony Daemon" -d "%{_localstatedir}/lib/chrony" chrony >/dev/null 2>&1 || :
|
%{_sbindir}/useradd -g chrony -s /bin/false -r -c "Chrony Daemon" -d "%{_localstatedir}/lib/chrony" chrony >/dev/null 2>&1 || :
|
||||||
# START BIG SYSTEMD
|
# START BIG SYSTEMD
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%service_add_pre chronyd.service chrony-wait.service
|
%service_add_pre chronyd.service chrony-wait.service chrony-dnssrv@.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%service_del_preun chronyd.service chrony-wait.service
|
%service_del_preun chronyd.service chrony-wait.service chrony-dnssrv@.service
|
||||||
%else
|
%else
|
||||||
%stop_on_removal chronyd
|
%stop_on_removal chronyd
|
||||||
%endif
|
%endif
|
||||||
@ -179,13 +211,13 @@ touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}
|
|||||||
%fillup_only %{name}
|
%fillup_only %{name}
|
||||||
%install_info --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
%install_info --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%service_add_post chronyd.service chrony-wait.service
|
%service_add_post chronyd.service chrony-wait.service chrony-dnssrv@.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%service_del_postun chronyd.service chrony-wait.service
|
%service_del_postun chronyd.service chrony-wait.service chrony-dnssrv@.service
|
||||||
%else
|
%else
|
||||||
%restart_on_update chronyd
|
%restart_on_update chronyd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
3
clknetsim-96416d5.tar.gz
Normal file
3
clknetsim-96416d5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fa624416000c526948c2590510107f773b702779e99bb724d33946b366722db3
|
||||||
|
size 40246
|
22
make-105-ntpauth-more-reliable.patch
Normal file
22
make-105-ntpauth-more-reliable.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 9749a1c6fcbdbf158bef2e0b454e7044a742749a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||||
|
Date: Mon, 14 Mar 2016 17:42:49 +0100
|
||||||
|
Subject: test: make 105-ntpauth more reliable
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/test/simulation/105-ntpauth b/test/simulation/105-ntpauth
|
||||||
|
index 1b9dd48..2ebcec3 100755
|
||||||
|
--- a/test/simulation/105-ntpauth
|
||||||
|
+++ b/test/simulation/105-ntpauth
|
||||||
|
@@ -43,7 +43,7 @@ check_packet_interval || test_fail
|
||||||
|
client_conf="keyfile tmp/keys"
|
||||||
|
clients=2
|
||||||
|
peers=2
|
||||||
|
-max_sync_time=300
|
||||||
|
+max_sync_time=500
|
||||||
|
base_delay="$default_base_delay (* -1 (equal 0.1 from 3) (equal 0.1 to 1))"
|
||||||
|
client_lpeer_options="key 1"
|
||||||
|
client_rpeer_options="key 1"
|
||||||
|
--
|
||||||
|
cgit v0.10.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user