diff --git a/.cvsignore b/.cvsignore index e69de29..27d69f1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ntp-4.0.99j.tar.gz diff --git a/ntp.conf b/ntp.conf new file mode 100644 index 0000000..702dd3c --- /dev/null +++ b/ntp.conf @@ -0,0 +1,44 @@ + +# +# Undisciplined Local Clock. This is a fake driver intended for backup +# and when no outside source of synchronized time is available. The +# default stratum is usually 3, but in this case we elect to use stratum +# 0. Since the server line does not have the prefer keyword, this driver +# is never used for synchronization, unless no other other +# synchronization source is available. In case the local host is +# controlled by some external source, such as an external oscillator or +# another protocol, the prefer keyword would cause the local host to +# disregard all other synchronization sources, unless the kernel +# modifications are in use and declare an unsynchronized condition. +# +server 127.127.1.0 # local clock +fudge 127.127.1.0 stratum 10 + +# +# Drift file. Put this in a directory which the daemon can write to. +# No symbolic links allowed, either, since the daemon updates the file +# by creating a temporary in the same directory and then rename()'ing +# it to the file. +# +driftfile /etc/ntp/drift +multicastclient # listen on default 224.0.1.1 +broadcastdelay 0.008 + +# +# Authentication delay. If you use, or plan to use someday, the +# authentication facility you should make the programs in the auth_stuff +# directory and figure out what this number should be on your machine. +# +authenticate no + +# +# Keys file. If you want to diddle your server at run time, make a +# keys file (mode 600 for sure) and define the key number to be +# used for making requests. +# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote +# systems might be able to reset your clock at will. +# +#keys /etc/ntp/keys +#trustedkey 65535 +#requestkey 65535 +#controlkey 65535 diff --git a/ntp.keys b/ntp.keys new file mode 100644 index 0000000..1c3fbd2 --- /dev/null +++ b/ntp.keys @@ -0,0 +1,2 @@ +65535 M akey +1 M pass diff --git a/ntp.spec b/ntp.spec new file mode 100644 index 0000000..fee49df --- /dev/null +++ b/ntp.spec @@ -0,0 +1,118 @@ +%define _bindir %{_prefix}/sbin + +Summary: Synchronizes system time using the Network Time Protocol (NTP). +Name: ntp +Version: 4.0.99j +Release: 7 +Copyright: distributable +Group: System Environment/Daemons +Source0: ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-%{version}.tar.gz +Source1: ntp.conf +Source2: ntp.keys +Source3: ntpd.rc +Patch0: ntp-4.0.99j-glibc22.patch +Patch1: ntp-4.0.99j-vsnprintf.patch +URL: http://www.cis.udel.edu/~ntp +Prereq: /sbin/chkconfig /etc/init.d +#Conflicts: xntp3 +Obsoletes: xntp3 +BuildRoot: %{_tmppath}/%{name}-root + +%description +The Network Time Protocol (NTP) is used to synchronize a computer's +time with another reference time source. The ntp package contains +utilities and daemons which will synchronize your computer's time to +Coordinated Universal Time (UTC) via the NTP protocol and NTP servers. +The ntp package includes ntpdate (a program for retrieving the date +and time from remote machines via a network) and ntpd (a daemon which +continuously adjusts system time). + +Install the ntp package if you need tools for keeping your system's +time synchronized via the NTP protocol. + +%prep +%setup -q + +%patch1 -p1 -b .vsnprintf + +%build + +# XXX work around for anal ntp configure +%define _target_platform %{nil} +%configure +%undefine _target_platform + +# XXX workaround glibc-2.1.90 lossage for now. +%ifnarch ia64 +patch config.h < %PATCH0 +%endif + +make + +%install +rm -rf $RPM_BUILD_ROOT + +%makeinstall + +{ cd $RPM_BUILD_ROOT + + mkdir -p .%{_sysconfdir}/{ntp,rc.d/init.d} + install -m644 $RPM_SOURCE_DIR/ntp.conf .%{_sysconfdir}/ntp.conf + install -m600 $RPM_SOURCE_DIR/ntp.keys .%{_sysconfdir}/ntp/keys + touch .%{_sysconfdir}/ntp/step-tickers + install -m755 $RPM_SOURCE_DIR/ntpd.rc .%{_sysconfdir}/rc.d/init.d/ntpd + + strip .%{_bindir}/* || : +} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/chkconfig --add ntpd + +%preun +if [ $1 = 0 ]; then + service ntpd stop > /dev/null 2>&1 + /sbin/chkconfig --del ntpd +fi + +%postun +if [ "$1" -ge "1" ]; then + service ntpd condrestart > /dev/null 2>&1 +fi + +%files +%defattr(-,root,root) +%doc html/* NEWS TODO +%{_bindir}/* +%config %{_sysconfdir}/rc.d/init.d/ntpd +%config(noreplace) %{_sysconfdir}/ntp.conf +%config(noreplace) %{_sysconfdir}/ntp/keys +%ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers + +%changelog +* Wed Aug 23 2000 Jeff Johnson +- use vsnprintf rather than vsprintf (#16676). + +* Mon Aug 14 2000 Jeff Johnson +- remove Conflicts: so that the installer is happy. + +* Tue Jul 25 2000 Jeff Johnson +- workaround glibc-2.1.90 lossage for now. + +* Thu Jul 20 2000 Bill Nottingham +- move initscript back + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Mon Jun 26 2000 Preston Brown +- move and update init script, update post/preun/postun scripts + +* Wed Jun 21 2000 Preston Brown +- noreplace ntp.conf,keys files + +* Mon Jun 12 2000 Jeff Johnson +- Create 4.0.99j package. +- FHS packaging. diff --git a/sources b/sources index e69de29..9035999 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6afa4d834cafbf8ea18fb57b87f69f2b ntp-4.0.99j.tar.gz