source: projects/specs/trunk/c/chrony/chrony-vl.spec @ 12389

Revision 12389, 9.7 KB checked in by tomop, 4 years ago (diff)

chrony-3.5-2

RevLine 
[12389]1%bcond_with systemd
2
[8530]3Name:           chrony
[12351]4Version:        3.5
[12389]5Release:        2%{?_dist_release}%{?with_systemd:.systemd}
[8530]6Summary:        An NTP client/server
[12351]7Group:          System Environment/Daemons
8Vendor:         Project Vine
9Distribution:   Vine Linux
10Packager:       tomop
[8530]11
12License:        GPLv2
[12351]13URL:            https://chrony.tuxfamily.org/
14Source0:        https://download.tuxfamily.org/chrony/chrony-%{version}%{?prerelease}.tar.gz
[8530]15Source1:        chrony.conf
[9678]16Source2:        chrony.dhclient
[8530]17Source3:        chronyd.sysconfig
18Source4:        chronyd.init
19Source5:        chrony.logrotate
[12389]20Source6:        chrony.helper
21Source7:        chrony-dnssrv@.service
22Source8:        chrony-dnssrv@.timer
[11087]23
[12389]24# add NTP servers from DHCP when starting service
25Patch2:         chrony-service-helper.patch
26
[8530]27BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
28
[11087]29BuildRequires:  libcap-devel readline-devel ncurses-devel bison
[8530]30
31Requires(pre):  shadow-utils
[12389]32%if %{with systemd}
33%{?systemd_requires}
34%else
[11087]35Requires(post): chkconfig
36Requires(preun): chkconfig initscripts
[8530]37Requires(postun): initscripts
[12389]38%endif
[8530]39
[11717]40%if "%{?_dist_release}" == "vl7"
[9678]41Obsoletes:      ntp < 4.2.6p5
[11717]42%endif
[10610]43Obsoletes: networkmanager-dispatcher-chrony
[9678]44
[8530]45
46%description
47A client/server for the Network Time Protocol, this program keeps your
48computer's clock accurate. It was specially designed to support
49systems with intermittent internet connections, but it also works well
50in permanently connected environments. It can use also hardware reference
51clocks, system real-time clock or manual input as time references.
52
53%prep
54%setup -q -n %{name}-%{version}%{?prerelease}
[12389]55%patch2 -p1 -b .service-helper
[8530]56
[9678]57echo '# Keys used by chronyd for command and NTP authentication' > chrony.keys
58
59# regenerate the file from getdate.y
60rm -f getdate.c
61
[8530]62%build
[9678]63#CFLAGS="$RPM_OPT_FLAGS"
64#%ifarch %{sparc}
65#CFLAGS="$CFLAGS -pie -fPIE"
66#%else
67#CFLAGS="$CFLAGS -pie -fpie"
68#%endif
69#export CFLAGS
70#export LDFLAGS="-Wl,-z,relro,-z,now"
[8530]71
[9678]72%configure \
73        --docdir=%{_docdir} \
74        --with-user=chrony \
75        --with-sendmail=%{_sbindir}/sendmail \
[12389]76%if %{with systemd}
77        --chronyrundir=/run/chrony \
78        --with-pidfile=/run/chrony/chronyd.pid \
79%endif
[9678]80        --enable-forcednsretry
81make %{?_smp_mflags} all docs
[8530]82
83%install
[12389]84rm -rf %{buildroot}
[8530]85
[12389]86make install install-docs DESTDIR=%{buildroot}
[8530]87
[12389]88rm -rf %{buildroot}%{_docdir}
[8530]89
[12389]90mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,logrotate.d}
91mkdir -p %{buildroot}%{_initrddir}
92mkdir -p %{buildroot}%{_localstatedir}/{lib,log}/chrony
93mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
94mkdir -p %{buildroot}%{_sysconfdir}/dhcp/dhclient.d
[8530]95
[12389]96install -m 644 -p %{SOURCE1} %{buildroot}%{_sysconfdir}/chrony.conf
97install -m 640 -p chrony.keys %{buildroot}%{_sysconfdir}/chrony.keys
[9678]98install -m 755 -p examples/chrony.nm-dispatcher \
[12389]99        %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/20-chrony
[9678]100install -m 755 -p %{SOURCE2} \
[12389]101        %{buildroot}%{_sysconfdir}/dhcp/dhclient.d/chrony.sh
[9678]102
[12389]103install -m 644 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/chronyd
104install -m 644 -p %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/chrony
[8530]105
[12389]106%if %{with systemd}
107mkdir -p %{buildroot}{%{_unitdir},/lib/systemd/ntp-units.d}
108install -m 644 -p examples/chronyd.service \
109        %{buildroot}%{_unitdir}/chronyd.service
110install -m 644 -p examples/chrony-wait.service \
111        %{buildroot}%{_unitdir}/chrony-wait.service
112install -m 644 -p %{SOURCE7} %{buildroot}%{_unitdir}/chrony-dnssrv@.service
113install -m 644 -p %{SOURCE8} %{buildroot}%{_unitdir}/chrony-dnssrv@.timer
114mkdir -p %{buildroot}%{_libexecdir}
115install -m 755 -p %{SOURCE6} %{buildroot}%{_libexecdir}/chrony-helper
116echo 'chronyd.service' > \
117        %{buildroot}/lib/systemd/ntp-units.d/50-chronyd.list
118%else
119install -m 755 -p %{SOURCE4} %{buildroot}%{_initrddir}/chronyd
120%endif
[8530]121
[12389]122touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}
123
[8530]124%clean
[12389]125rm -rf %{buildroot}
[8530]126
127%pre
128getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony
129getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \
130       -d %{_localstatedir}/lib/chrony -s /sbin/nologin chrony
131:
132
133%post
[12389]134%if %{with systemd}
135# workaround for late reload of unit file (#1614751)
136%{_bindir}/systemctl daemon-reload
137%systemd_post chronyd.service chrony-wait.service
138%else
[8530]139/sbin/chkconfig --add chronyd
140:
[12389]141%endif
[8530]142
143%preun
[12389]144%if %{with systemd}
145%systemd_preun chronyd.service chrony-wait.service
146%else
[8530]147if [ "$1" -eq 0 ]; then
148        /sbin/service chronyd stop &> /dev/null
149        /sbin/chkconfig --del chronyd
150fi
151:
[12389]152%endif
[8530]153
154%postun
[12389]155%if %{with systemd}
156%systemd_postun_with_restart chronyd.service
157%else
[8530]158if [ "$1" -ge 1 ]; then
159        /sbin/service chronyd condrestart &> /dev/null
160fi
161:
[12389]162%endif
[8530]163
164%files
165%defattr(-,root,root,-)
[12351]166%license COPYING
167%doc FAQ NEWS README examples/*
[8530]168%config(noreplace) %{_sysconfdir}/chrony.conf
169%config(noreplace) %verify(not md5 size mtime) %attr(640,root,chrony) %{_sysconfdir}/chrony.keys
170%config(noreplace) %{_sysconfdir}/sysconfig/chronyd
171%config(noreplace) %{_sysconfdir}/logrotate.d/chrony
[12389]172%if %{with systemd}
173%{_libexecdir}/chrony-helper
174/lib/systemd/ntp-units.d/*.list
175%{_unitdir}/chrony*.service
176%{_unitdir}/chrony*.timer
177%else
[8530]178%{_initrddir}/chronyd
[12389]179%endif
180%dir %{_sysconfdir}/NetworkManager
181%dir %{_sysconfdir}/NetworkManager/dispatcher.d
[9678]182%{_sysconfdir}/NetworkManager/dispatcher.d/20-chrony
[12389]183%dir %{_sysconfdir}/dhcp
184%dir %{_sysconfdir}/dhcp/dhclient.d
[9678]185%{_sysconfdir}/dhcp/dhclient.d/chrony.sh
[8530]186%{_bindir}/chronyc
187%{_sbindir}/chronyd
188%{_mandir}/man[158]/%{name}*.[158]*
189%dir %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony
190%ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/drift
191%ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/rtc
192%dir %attr(-,chrony,chrony) %{_localstatedir}/log/chrony
193
194%changelog
[12389]195* Mon Apr 06 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5-2
196- added systemd stuff (disabled as default).
197- updated Source2.
198
[12351]199* Wed Mar 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5-1
200- new upstream release.
201- dropped Patch102: fixed in upstream.
202
[12135]203* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 3.2-2
204- rebuild with readline-8.0 and ncurses-6.1
205
[11717]206* Sat Jun  9 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 3.2-1
207- update to 3.2
208- drop Patch101; upstream merged
209- add Fedora's patch (Patch102)
210 * Tue Dec 05 2017 Miroslav Lichvar <mlichvar@redhat.com> 3.2-2
211 - fix chronyc getting stuck in infinite loop after clock step (#1520884)
212- restrict obsoleting 'ntp' package to VineSeed; for Vine Linux 6
213
[11087]214* Thu May 18 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 3.0-1
215- update to 3.0
216- add patch to fix time smoothing in interleaved mode (Patch101); from Debian 3.0-4
217- drop chrony.txt in %%doc; upstream dropped
218- drop info file; upstream dropped
219 - drop R: info
220 - drop BR: texinfo
221 - drop scripts for info
222
[10610]223* Mon Jul 11 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 2.2.1-2
224- Obsoletes: networkmanager-dispatcher-chrony
225
[10098]226* Wed Mar 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.1-1
227- new upstream release.
228
[9769]229* Fri Oct 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2-1
230- new upstream release.
231
[9678]232* Sat Jul 25 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.1-1
233- new upstream release.
234
[9184]235* Tue Dec 23 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.31-1
236- new upstream release.
237
[8530]238* Sat Jun 7 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.29.1-1
239- new upstream release.
240- initial build for Vine Linux.
241
242* Fri Aug 09 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.25-3
243- fix buffer overflow when processing crafted command packets (CVE-2012-4502)
244- don't send uninitialized data in command replies (CVE-2012-4503)
245
246* Thu May 19 2011 Miroslav Lichvar <mlichvar@redhat.com> 1.25-2
247- remove timepps.h, NM and dhclient scripts
248- build with readline
249
250* Thu May 05 2011 Miroslav Lichvar <mlichvar@redhat.com> 1.25-1
251- update to 1.25
252- link with -Wl,-z,relro,-z,now options
253- use iburst, four pool servers, rtcsync, stratumweight in default config
254- suppress install-info errors
255
256* Thu Apr 29 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-4.20100428git73d775
257- update to 20100428git73d775
258- replace initstepslew directive with makestep in default config
259- add NetworkManager dispatcher script
260- add dhclient script
261- retry server/peer name resolution at least once to workaround
262  NetworkManager race condition on boot
263- don't verify chrony.keys
264
265* Fri Mar 12 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-3.20100302git5fb555
266- update to snapshot 20100302git5fb555
267- compile with PPS API support
268
269* Thu Feb 04 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-1
270- update to 1.24 (#555367, CVE-2010-0292 CVE-2010-0293 CVE-2010-0294)
271- modify default config
272  - step clock on start if it is off by more than 100 seconds
273  - disable client log
274- build with -fPIE on sparc
275
276* Tue Dec 15 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.24-0.1.pre1
277- update to 1.24-pre1
278
279* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-7.20081106gitbe42b4
280- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
281
282* Fri Jul 17 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.23-6.20081106gitbe42b4
283- switch to editline
284- support arbitrary chronyc commands in init script
285
286* Mon Jun 08 2009 Dan Horak <dan[at]danny.cz> 1.23-5.20081106gitbe42b4
287- add patch with support for s390/s390x
288
289* Mon Mar 09 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.23-4.20081106gitbe42b4
290- fix building with broken libcap header (#483548)
291
292* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-3.20081106gitbe42b4
293- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
294
295* Wed Nov 19 2008 Miroslav Lichvar <mlichvar@redhat.com> 1.23-2.20081106gitbe42b4
296- fix info uninstall
297- generate random command key in init script
298- support cyclelogs, online, offline commands in init script
299- add logrotate script
300
301* Tue Nov 11 2008 Miroslav Lichvar <mlichvar@redhat.com> 1.23-1.20081106gitbe42b4
302- initial release
Note: See TracBrowser for help on using the repository browser.