chrony-vl.spec 7.1 KB

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