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