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

Revision 12479, 10.0 KB checked in by tomop, 4 years ago (diff)

updated 3 packages

chrony-3.5.1-1

oniguruma-6.9.5.rev1-2

python-virtualenv-20.0.31-1

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