2013-01-11 12:21:34 +00:00
|
|
|
|
#
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
Name: chrony
|
2014-02-25 15:55:43 +00:00
|
|
|
|
Version: 1.29.1
|
2013-01-11 12:21:34 +00:00
|
|
|
|
Release: 0
|
|
|
|
|
License: GPL-2.0+
|
|
|
|
|
Summary: System Clock Synchronization Client and Server
|
|
|
|
|
Url: http://chrony.tuxfamily.org/
|
|
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
|
Source: http://download.tuxfamily.org/chrony/chrony-%{version}.tar.gz
|
|
|
|
|
Source1: chrony.init
|
|
|
|
|
Source2: chrony.sysconfig
|
|
|
|
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
|
|
|
|
Patch1: chrony-config.patch
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
|
BuildRequires: libcap-devel
|
|
|
|
|
BuildRequires: make
|
2013-07-23 07:25:51 +00:00
|
|
|
|
BuildRequires: mozilla-nss-devel
|
2013-01-11 12:21:34 +00:00
|
|
|
|
BuildRequires: ncurses-devel
|
2013-07-23 07:25:51 +00:00
|
|
|
|
BuildRequires: pkg-config
|
2013-01-11 12:21:34 +00:00
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
|
BuildRequires: texinfo
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
|
Requires(pre): %install_info_prereq
|
|
|
|
|
Requires(pre): /usr/sbin/groupadd
|
|
|
|
|
Requires(pre): /usr/sbin/useradd
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Chrony is a pair of programs which are used to maintain the accuracy of the
|
|
|
|
|
system clock on a computer. The two programs are called chronyd and chronyc.
|
|
|
|
|
|
|
|
|
|
Chronyd is a daemon which runs in background on the system. It obtains
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# not autoconf:
|
2014-02-25 15:55:43 +00:00
|
|
|
|
export CC="gcc"
|
|
|
|
|
export CFLAGS="%{optflags} -Wall -fpic -DPIC"
|
|
|
|
|
export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
./configure \
|
|
|
|
|
--prefix="%{_prefix}" \
|
|
|
|
|
--exec-prefix="%{_exec_prefix}" \
|
|
|
|
|
--sysconfdir="%{_sysconfdir}" \
|
|
|
|
|
--bindir="%{_bindir}" \
|
|
|
|
|
--sbindir="%{_sbindir}" \
|
|
|
|
|
--datarootdir="%{_datadir}" \
|
|
|
|
|
--infodir="%{_infodir}" \
|
|
|
|
|
--mandir="%{_mandir}" \
|
|
|
|
|
--docdir="%{_docdir}/%{name}"
|
|
|
|
|
|
2014-02-25 15:55:43 +00:00
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
make chrony.txt
|
|
|
|
|
make chrony.info
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%makeinstall
|
2013-01-11 12:21:34 +00:00
|
|
|
|
rm -rf "%{buildroot}%{_docdir}/%{name}"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2013-01-11 12:21:34 +00:00
|
|
|
|
install -d "%{buildroot}%{_infodir}"
|
|
|
|
|
install -m0644 chrony.info "%{buildroot}%{_infodir}"/
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2013-01-11 12:21:34 +00:00
|
|
|
|
install -D -m0755 "%{SOURCE1}" "%{buildroot}%{_initddir}/chronyd"
|
|
|
|
|
install -d "%{buildroot}%{_prefix}/sbin"
|
|
|
|
|
ln -s ../../etc/init.d/chronyd "%{buildroot}%{_sbindir}/rcchronyd"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2013-01-11 12:21:34 +00:00
|
|
|
|
install -D -m0644 "%{SOURCE2}" "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.chronyd"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2013-01-11 12:21:34 +00:00
|
|
|
|
install -d "%{buildroot}%{_localstatedir}/lib/chrony"
|
|
|
|
|
install -d "%{buildroot}%{_localstatedir}/log/chrony"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2012-01-18 09:23:10 +00:00
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version} >= 1030 && 0%{?suse_version} <= 1140
|
2010-05-11 21:52:37 +00:00
|
|
|
|
h=/usr/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ")
|
2013-01-11 12:21:34 +00:00
|
|
|
|
test -e "$h" && ln -s -f "$h" .
|
2012-01-18 09:23:10 +00:00
|
|
|
|
%endif
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
2013-01-11 12:21:34 +00:00
|
|
|
|
install -d "%{buildroot}%{_sysconfdir}"
|
|
|
|
|
install -m0644 examples/chrony.conf.example "%{buildroot}%{_sysconfdir}/chrony.conf"
|
|
|
|
|
install -m0600 examples/chrony.keys.example "%{buildroot}%{_sysconfdir}/chrony.keys"
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
/usr/sbin/groupadd -r chrony || :
|
2013-01-11 12:21:34 +00:00
|
|
|
|
/usr/sbin/useradd -r -g chrony -c "Chrony Daemon" -d "%{_localstatedir}/lib/chrony" chrony || :
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%{fillup_only -an chronyd}
|
|
|
|
|
%install_info --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%stop_on_removal chronyd
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%restart_on_update chronyd
|
|
|
|
|
%insserv_cleanup
|
|
|
|
|
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}"
|
|
|
|
|
|
|
|
|
|
%clean
|
2013-01-11 12:21:34 +00:00
|
|
|
|
rm -rf %{buildroot}
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc README chrony.txt COPYING
|
|
|
|
|
%doc examples
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/chrony.conf
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/chrony.keys
|
|
|
|
|
%{_bindir}/chronyc
|
|
|
|
|
%{_sbindir}/chronyd
|
|
|
|
|
%doc %{_mandir}/man1/chrony.1%{ext_man}
|
|
|
|
|
%doc %{_mandir}/man1/chronyc.1%{ext_man}
|
|
|
|
|
%doc %{_mandir}/man5/chrony.conf.5%{ext_man}
|
|
|
|
|
%doc %{_mandir}/man8/chronyd.8%{ext_man}
|
|
|
|
|
%doc %{_infodir}/chrony.info%{ext_info}
|
2013-01-11 12:21:34 +00:00
|
|
|
|
%config %{_sysconfdir}/init.d/chronyd
|
|
|
|
|
%{_sbindir}/rcchronyd
|
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.chronyd
|
|
|
|
|
%attr(0750,chrony,chrony) %{_localstatedir}/lib/chrony
|
|
|
|
|
%attr(0750,chrony,chrony) %{_localstatedir}/log/chrony
|
2010-05-11 21:52:37 +00:00
|
|
|
|
|
|
|
|
|
%changelog
|