chrony-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. Name: chrony
  2. Version: 3.5
  3. Release: 1%{?_dist_release}
  4. Summary: An NTP client/server
  5. Group: System Environment/Daemons
  6. Vendor: Project Vine
  7. Distribution: Vine Linux
  8. Packager: tomop
  9. License: GPLv2
  10. URL: https://chrony.tuxfamily.org/
  11. Source0: https://download.tuxfamily.org/chrony/chrony-%{version}%{?prerelease}.tar.gz
  12. Source1: chrony.conf
  13. Source2: chrony.dhclient
  14. Source3: chronyd.sysconfig
  15. Source4: chronyd.init
  16. Source5: chrony.logrotate
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  18. BuildRequires: libcap-devel readline-devel ncurses-devel bison
  19. Requires(pre): shadow-utils
  20. Requires(post): chkconfig
  21. Requires(preun): chkconfig initscripts
  22. Requires(postun): initscripts
  23. %if "%{?_dist_release}" == "vl7"
  24. Obsoletes: ntp < 4.2.6p5
  25. %endif
  26. Obsoletes: networkmanager-dispatcher-chrony
  27. %description
  28. A client/server for the Network Time Protocol, this program keeps your
  29. computer's clock accurate. It was specially designed to support
  30. systems with intermittent internet connections, but it also works well
  31. in permanently connected environments. It can use also hardware reference
  32. clocks, system real-time clock or manual input as time references.
  33. %prep
  34. %setup -q -n %{name}-%{version}%{?prerelease}
  35. echo '# Keys used by chronyd for command and NTP authentication' > chrony.keys
  36. # regenerate the file from getdate.y
  37. rm -f getdate.c
  38. %build
  39. #CFLAGS="$RPM_OPT_FLAGS"
  40. #%ifarch %{sparc}
  41. #CFLAGS="$CFLAGS -pie -fPIE"
  42. #%else
  43. #CFLAGS="$CFLAGS -pie -fpie"
  44. #%endif
  45. #export CFLAGS
  46. #export LDFLAGS="-Wl,-z,relro,-z,now"
  47. %configure \
  48. --docdir=%{_docdir} \
  49. --with-user=chrony \
  50. --with-sendmail=%{_sbindir}/sendmail \
  51. --enable-forcednsretry
  52. make %{?_smp_mflags} all docs
  53. %install
  54. rm -rf $RPM_BUILD_ROOT
  55. make install install-docs DESTDIR=$RPM_BUILD_ROOT
  56. rm -rf $RPM_BUILD_ROOT%{_docdir}
  57. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,logrotate.d}
  58. mkdir -p $RPM_BUILD_ROOT%{_initrddir}
  59. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/chrony
  60. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
  61. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d
  62. install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf
  63. install -m 640 -p chrony.keys $RPM_BUILD_ROOT%{_sysconfdir}/chrony.keys
  64. install -m 755 -p examples/chrony.nm-dispatcher \
  65. $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/20-chrony
  66. install -m 755 -p %{SOURCE2} \
  67. $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d/chrony.sh
  68. install -m 644 -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/chronyd
  69. install -m 755 -p %{SOURCE4} $RPM_BUILD_ROOT%{_initrddir}/chronyd
  70. install -m 644 -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/chrony
  71. touch $RPM_BUILD_ROOT%{_localstatedir}/lib/chrony/{drift,rtc}
  72. %clean
  73. rm -rf $RPM_BUILD_ROOT
  74. %pre
  75. getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony
  76. getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \
  77. -d %{_localstatedir}/lib/chrony -s /sbin/nologin chrony
  78. :
  79. %post
  80. /sbin/chkconfig --add chronyd
  81. :
  82. %preun
  83. if [ "$1" -eq 0 ]; then
  84. /sbin/service chronyd stop &> /dev/null
  85. /sbin/chkconfig --del chronyd
  86. fi
  87. :
  88. %postun
  89. if [ "$1" -ge 1 ]; then
  90. /sbin/service chronyd condrestart &> /dev/null
  91. fi
  92. :
  93. %files
  94. %defattr(-,root,root,-)
  95. %license COPYING
  96. %doc FAQ NEWS README examples/*
  97. %config(noreplace) %{_sysconfdir}/chrony.conf
  98. %config(noreplace) %verify(not md5 size mtime) %attr(640,root,chrony) %{_sysconfdir}/chrony.keys
  99. %config(noreplace) %{_sysconfdir}/sysconfig/chronyd
  100. %config(noreplace) %{_sysconfdir}/logrotate.d/chrony
  101. %{_initrddir}/chronyd
  102. %{_sysconfdir}/NetworkManager/dispatcher.d/20-chrony
  103. %{_sysconfdir}/dhcp/dhclient.d/chrony.sh
  104. %{_bindir}/chronyc
  105. %{_sbindir}/chronyd
  106. %{_mandir}/man[158]/%{name}*.[158]*
  107. %dir %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony
  108. %ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/drift
  109. %ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/rtc
  110. %dir %attr(-,chrony,chrony) %{_localstatedir}/log/chrony
  111. %changelog
  112. * Wed Mar 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5-1
  113. - new upstream release.
  114. - dropped Patch102: fixed in upstream.
  115. * Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 3.2-2
  116. - rebuild with readline-8.0 and ncurses-6.1
  117. * Sat Jun 9 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 3.2-1
  118. - update to 3.2
  119. - drop Patch101; upstream merged
  120. - add Fedora's patch (Patch102)
  121. * Tue Dec 05 2017 Miroslav Lichvar <mlichvar@redhat.com> 3.2-2
  122. - fix chronyc getting stuck in infinite loop after clock step (#1520884)
  123. - restrict obsoleting 'ntp' package to VineSeed; for Vine Linux 6
  124. * Thu May 18 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 3.0-1
  125. - update to 3.0
  126. - add patch to fix time smoothing in interleaved mode (Patch101); from Debian 3.0-4
  127. - drop chrony.txt in %%doc; upstream dropped
  128. - drop info file; upstream dropped
  129. - drop R: info
  130. - drop BR: texinfo
  131. - drop scripts for info
  132. * Mon Jul 11 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 2.2.1-2
  133. - Obsoletes: networkmanager-dispatcher-chrony
  134. * Wed Mar 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.1-1
  135. - new upstream release.
  136. * Fri Oct 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2-1
  137. - new upstream release.
  138. * Sat Jul 25 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.1-1
  139. - new upstream release.
  140. * Tue Dec 23 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.31-1
  141. - new upstream release.
  142. * Sat Jun 7 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.29.1-1
  143. - new upstream release.
  144. - initial build for Vine Linux.
  145. * Fri Aug 09 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.25-3
  146. - fix buffer overflow when processing crafted command packets (CVE-2012-4502)
  147. - don't send uninitialized data in command replies (CVE-2012-4503)
  148. * Thu May 19 2011 Miroslav Lichvar <mlichvar@redhat.com> 1.25-2
  149. - remove timepps.h, NM and dhclient scripts
  150. - build with readline
  151. * Thu May 05 2011 Miroslav Lichvar <mlichvar@redhat.com> 1.25-1
  152. - update to 1.25
  153. - link with -Wl,-z,relro,-z,now options
  154. - use iburst, four pool servers, rtcsync, stratumweight in default config
  155. - suppress install-info errors
  156. * Thu Apr 29 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-4.20100428git73d775
  157. - update to 20100428git73d775
  158. - replace initstepslew directive with makestep in default config
  159. - add NetworkManager dispatcher script
  160. - add dhclient script
  161. - retry server/peer name resolution at least once to workaround
  162. NetworkManager race condition on boot
  163. - don't verify chrony.keys
  164. * Fri Mar 12 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-3.20100302git5fb555
  165. - update to snapshot 20100302git5fb555
  166. - compile with PPS API support
  167. * Thu Feb 04 2010 Miroslav Lichvar <mlichvar@redhat.com> 1.24-1
  168. - update to 1.24 (#555367, CVE-2010-0292 CVE-2010-0293 CVE-2010-0294)
  169. - modify default config
  170. - step clock on start if it is off by more than 100 seconds
  171. - disable client log
  172. - build with -fPIE on sparc
  173. * Tue Dec 15 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.24-0.1.pre1
  174. - update to 1.24-pre1
  175. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-7.20081106gitbe42b4
  176. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  177. * Fri Jul 17 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.23-6.20081106gitbe42b4
  178. - switch to editline
  179. - support arbitrary chronyc commands in init script
  180. * Mon Jun 08 2009 Dan Horak <dan[at]danny.cz> 1.23-5.20081106gitbe42b4
  181. - add patch with support for s390/s390x
  182. * Mon Mar 09 2009 Miroslav Lichvar <mlichvar@redhat.com> 1.23-4.20081106gitbe42b4
  183. - fix building with broken libcap header (#483548)
  184. * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-3.20081106gitbe42b4
  185. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  186. * Wed Nov 19 2008 Miroslav Lichvar <mlichvar@redhat.com> 1.23-2.20081106gitbe42b4
  187. - fix info uninstall
  188. - generate random command key in init script
  189. - support cyclelogs, online, offline commands in init script
  190. - add logrotate script
  191. * Tue Nov 11 2008 Miroslav Lichvar <mlichvar@redhat.com> 1.23-1.20081106gitbe42b4
  192. - initial release