Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > f9b53c6da0234d9a60afb48b41828f16 > files > 15

ntp-4.2.0-21.2.20060mdk.src.rpm

%define name	ntp 
%define version	4.2.0
%define release	21.2.20060mdk
%define rver	4.2.0
%define ntp_user ntp
%define ntp_group ntp

Summary:	Synchronizes system time using the Network Time Protocol (NTP)
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	BSD-Style
Group:		System/Servers
Source0:	http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/%{name}-%{rver}.tar.bz2
Source1:	ntp.conf.bz2
Source2:	ntp.keys.bz2
Source3:	ntpd.init.bz2
Source4:	ntpstat-0.2.tar.bz2
Source5:	ntp-4.1.2-rh-manpages.tar.bz2
Source6:	ntpdate.bash-completion.bz2
Patch0:		ntp-4.0.99k-add_time_h.patch.bz2
Patch1:		ntp-4.1.1-biarch-utmp.patch.bz2
Patch2:		ntp-4.2.0-ntpdate_quiet.diff.bz2
Patch3:		ntp-4.2.0-genkey3.patch.bz2
Patch4:		ntp-4.2.0-md5.patch.bz2
Patch5:		ntp-4.2.0-libtool.diff.bz2
Patch6:		ntp-4.2.0-lib64.patch.bz2
# http://qa.mandrakesoft.com/show_bug.cgi?id=14333
# http://bugzilla.ntp.org/show_bug.cgi?id=251
# http://ntp.bkbits.net:8080/ntp-stable/cset@3fe3631eWOmqU87rpGQrj82kAK8NoQ?nav=index.html|ChangeSet@-2w
Patch7:		ntp-4.2.0-droproot.patch.bz2
Patch8:		ntp-4.2.0-gcc4.patch.bz2
Patch9:		ntp-4.2.0-CAN-2005-2496.patch.bz2
URL:		http://www.ntp.org/
Requires(pre):	rpm-helper
# the init script may run ntpdate
Requires(post):	%{name}-client = %{version}
# the init script may have to modprobe capability
Requires(post):	modutils
BuildRequires:	autoconf2.5
BuildRequires:	automake1.7
BuildRequires:	openssl-static-devel
BuildRequires:	ncurses-devel
BuildRequires:	elfutils-devel
BuildRequires:	dos2unix
BuildRequires:	libcap-devel
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%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.  Ntp 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.

%package	client
Summary:	The ntpdate client for setting system time from NTP servers
Group:		System/Servers
Conflicts:	ntp < 4.2.0-3mdk

%description	client
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.  Ntp 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).

ntpdate is a simple NTP client which allows a system's clock to be set
to match the time obtained by communicating with one or more servers.

ntpdate is optional (but recommended) if you're running an NTP server,
because initially setting the system clock to an almost-correct time
will help the NTP server synchronize faster.

The ntpdate client by itself is useful for occasionally setting the time on
machines that are not on the net full-time, such as laptops.

%prep

%setup -q -n ntp-%{rver} -a4 -a5

#%patch0 -p1 -b .add_time
%patch1 -p1 -b .biarch-utmp
%patch2 -p0 -b .ntpdate_quiet
%patch3 -p1 -b .genkey3
%patch4 -p1 -b .md5
%patch5 -p1 -b .libtool
%patch6 -p1 -b .lib64
%patch7 -p1 -b .droproot
%patch8 -p1 -b .gcc4
%patch9 -p1 -b .can-2005-2496

# fix strange perms
find html -type f | xargs chmod 644
find html -type d | xargs chmod 755

bzcat %{SOURCE1} > ntp.conf
bzcat %{SOURCE2} > ntp.keys
bzcat %{SOURCE3} > ntpd.init
bzcat %{SOURCE6} > ntpdate.bash-completion

%build
export WANT_AUTOCONF_2_5=1
libtoolize --copy --force; aclocal-1.7; autoconf; automake-1.7 --add-missing

%serverbuild

%configure2_5x \
    --libdir=%{_libdir} \
    --with-crypto=openssl \
    --enable-linuxcaps

%make CFLAGS="%{optflags}"
mv html/hints .

make -C ntpstat-0.2 CFLAGS="%{optflags}"

dos2unix -U html/scripts/*

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_sysconfdir}/ntp
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_mandir}/man1

%makeinstall bindir=%{buildroot}%{_sbindir}

install -m0644 ntp.conf %{buildroot}%{_sysconfdir}/ntp.conf
install -m0640 ntp.keys %{buildroot}%{_sysconfdir}/ntp/keys
install -m0755 ntpd.init %{buildroot}%{_initrddir}/ntpd

touch %{buildroot}%{_sysconfdir}/ntp/step-tickers

install -m0755 ntpstat-0.2/ntpstat %{buildroot}%{_sbindir}/
install -m0644 ntpstat-0.2/ntpstat.1 %{buildroot}%{_mandir}/man1/
install -m0644 man/*.1 %{buildroot}%{_mandir}/man1/

# bash completion
install -d -m 755 %{buildroot}%{_sysconfdir}/bash_completion.d
install -m 644 ntpdate.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/ntpdate

%pre
%_pre_useradd %{ntp_user} %{_sysconfdir}/ntp /bin/false

%post
# ntpd needs to be able to write to the ntp directory
# as well as into the drift file, but not step-tickers
# first installs already have the correct permissions
if [ "$1" = "2" ]; then
	chown %{ntp_user}:%{ntp_group} %{_sysconfdir}/ntp
	[ -f %{_sysconfdir}/ntp/drift ] && \
		chown %{ntp_user}:%{ntp_group} %{_sysconfdir}/ntp/drift || :
	chown root:%{ntp_group} %{_sysconfdir}/ntp/keys
	chmod 0640 %{_sysconfdir}/ntp/keys
fi
%_post_service ntpd
touch %{_sysconfdir}/ntp/step-tickers

%preun
%_preun_service ntpd

%postun
%_postun_userdel %{ntp_user}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc NEWS TODO README* ChangeLog html
%{_initrddir}/ntpd
%config(noreplace) %{_sysconfdir}/ntp.conf
%attr(-,%{ntp_user},%{ntp_group})%dir %{_sysconfdir}/ntp
%attr(0640,root,%{ntp_group})%config(noreplace) %{_sysconfdir}/ntp/keys
%ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers
%{_sbindir}/ntp-keygen
%{_sbindir}/ntp-wait
%{_sbindir}/ntpd
%{_sbindir}/ntpdc
%{_sbindir}/ntpq
%{_sbindir}/ntpstat
%{_sbindir}/ntptime
%{_sbindir}/ntptrace
%{_sbindir}/tickadj
%{_mandir}/man1/ntpd.1*
%{_mandir}/man1/ntpdc.1*
%{_mandir}/man1/ntpq.1*
%{_mandir}/man1/ntpstat.1*
%{_mandir}/man1/ntptime.1*
%{_mandir}/man1/ntptrace.1*
%{_mandir}/man1/tickadj.1*

%files client
%defattr(-,root,root)
%doc ChangeLog README
%{_sysconfdir}/bash_completion.d/ntpdate
%{_sbindir}/ntpdate
%{_mandir}/man1/ntpdate.1*

%changelog
* Sat Sep 30 2006 Stew Benedict <sbenedict@mandriva.com> 4.2.0-21.2.20060mdk
- rebuild against updated openssl-static-devel (0.9.7g-2.5.20060mdk)

* Thu Sep 28 2006 Stew Benedict <sbenedict@mandriva.com> 4.2.0-21.1.20060mdk
- rebuild against updated openssl-static-devel (0.9.7g-2.4.20060mdk)

* Wed Sep  7 2005 Warly <warly@mandriva.com> 4.2.0-21mdk
- Security update for CAN-2005-2496 (P9)

* Fri Jul 22 2005 Couriousous <couriousous@mandriva.org> 4.2.0-20mdk
- fix gcc4 patch ( #16954 )

* Thu Jul 21 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.2.0-19mdk 
- ntpdate bash-completion
- fix gcc 4 build (<couriousous@mandriva.org>)

* Mon Mar 21 2005 Andreas Hasenack <andreas@mandrakesoft.com> 4.2.0-18mdk
- check for stale subsystem lock in the init script (we now check for
  the lock file and if there are any ntpd processes running). If we still
  have problems with this, then the last option would be to make ntpd create
  a pid file and use that.
- just a safe guard: check if we need to load the capability kernel module.
  MDK has this builtin, but some user might rebuild the kernel and use it
  as a module
- Prereq -> Requires(bla)

* Thu Mar 17 2005 Andreas Hasenack <andreas@mandrakesoft.com> 4.2.0-17mdk
- argh, a typo in the init script was preventing step-tickers from ever being
  used

* Thu Mar 17 2005 Andreas Hasenack <andreas@mandrakesoft.com> 4.2.0-16mdk
- using rpm macros for user add/delete
- test for drift file existance before chowning it in %%post
- only use step-tickers if it has some content

* Mon Mar 07 2005 Andreas Hasenack <andreas@mandrakesoft.com> 4.2.0-15mdk
- added drop-root patch from http://bugzilla.ntp.org/show_bug.cgi?id=251 (#14333)
  (it's already applied in the -stable branch)
- deal with upgrades from versions before this patch was applied
- avoid multiple starts in the init script
- return appropriate error codes for start/stop/status
- ntpdate's output was messing the screen. TODO: fix ntpdate's -s option

* Sat Feb 19 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 4.2.0-14mdk
- add BuildRequires: dos2unix

* Thu Feb 17 2005 Warly <warly@mandrakesoft.com> 4.2.0-13mdk
- fix bad touch of the step-tickers file

* Wed Feb 16 2005 Warly <warly@mandrakesoft.com> 4.2.0-12mdk
- change chkconfig level from 55 to 56 to fix bug 9045

* Thu Jan 20 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 4.2.0-11mdk
- rebuild for new readline
- fix summary-ended-with-dot

* Thu Sep 30 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.2.0-10mdk
- lib64 fixes

* Mon Sep 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.2.0-9mdk
- fix S1 (#8844)

* Mon Aug  9 2004 Warly <warly@mandrakesoft.com> 4.2.0-8mdk
- Add more pool.ntp.org entry in ntpd.conf

* Tue Jul 06 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 4.2.0-7mdk
- Add Conflicts to ease upgrade (Mdk bug #10208) 

* Tue Jun 29 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 4.2.0-6mdk
- fix buildrequires

* Sun Jun 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.2.0-5mdk
- added P3 & P4 (fedora) fix #10159 
- added P5
- fix deps

* Sat Jun 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.2.0-4mdk
- new url

* Sat Jun 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.2.0-3mdk
- broke out ntpdate as that's the only one needed if using an external 
  clock source (description stolen from debian)
- added P2 (stolen from gentoo, but tweaked some; usage "ntpdate -Q" 
  and it won't spit out "host found : ..." anymore)
- change group
- added S4 and S5 from fedora
- fix deps
- misc spec file fixes

* Mon Mar 01 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.2.0-2mdk
- Own dir
- macroize

* Tue Jan 27 2004 Warly <warly@mandrakesoft.com> 4.2.0-1mdk
- new version

* Thu Aug 14 2003 Warly <warly@mandrakesoft.com> 4.1.2-1mdk
- new version
- add pool.ntp.org as default server

* Tue Apr 15 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.1-4mdk
- Fix mess introduced in previous release

* Tue Apr  8 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.1-3mdk
- Patch1: Handle biarch struct utmp
- rpmlint fixes: rpm-helper, use %%configure

* Tue May 07 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.1-2mdk
- Automated rebuild in gcc3.1 environment

* Wed Feb 27 2002 Warly <warly@mandrakesoft.com> 4.1.1-1mdk
- final 4.1.1 version

* Tue Dec 11 2001 Warly <warly@mandrakesoft.com> 4.1.0b-0.rc1.1mdk
- new version

* Fri Aug 24 2001 Warly <warly@mandrakesoft.com> 4.1.0-1mdk
- new version

* Tue Jul  3 2001 Pixel <pixel@mandrakesoft.com> 4.0.99k-8mdk
- add a commented - line "server clock.via.net" (will be replaced by DrakX)

* Fri May 11 2001 Warly <warly@mandrakesoft.com> 4.0.99k-7mdk
- remove restrict default ignore from config file

* Sat Apr  7 2001 Warly <warly@mandrakesoft.com> 4.0.99k-6mdk
- s/fopen/fdopen/ in patch tmp
- add restrict default ignore to answer only known server

* Fri Apr 06 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.99k-5mdk
- include patches to fix buffer overflows (MDKSA-2001:036)

* Thu Mar 29 2001 Warly <warly@mandrakesoft.com> 4.0.99k-4mdk
- use %%serverbuild and co macro

* Wed Mar 14 2001 Warly <warly@mandrakesoft.com> 4.0.99k-3mdk
- fix build

* Thu Aug 31 2000 Warly <warly@mandrakesoft.com> 4.0.99k-2mdk
- add condrestart

* Mon Jul 24 2000 Warly <warly@mandrakesoft.com> 4.0.99k-1mdk
- new release
- BM

* Wed Apr 05 2000 Daouda Lo <daouda@mandrakesoft.com> 4.0.99g-3mdk
- fix the conf files permissions
- bunzip'ed conf files

* Fri Mar 31 2000 Warly <warly@mandrakesoft.com> 4.0.99g-2mdk
- New group: System/Configuration/Other

* Tue Mar 07 2000 Daouda LO <daouda@mandrakesoft.com>
- Mandrakised (relocatable + %%define )

* Sun May 23 1999 David E. Myers <dem@skyline.rtp.nc.us>
- Changes for submission to Red Hat Contrib|Net.

* Wed Apr 14 1999 Cristian Gafton <gafton@redhat.com>
- disallow remote updates by default in ntp.conf (#2170)

* Fri Mar 26 1999 Cristian Gafton <gafton@redhat.com>
- use %configure
- fix initscript not to sit out the output of ntpdate (use syslog instead)
- eliminate subshell from the install stage

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 9)

* Sun Nov 22 1998 Jeff Johnson <jbj@redhat.com>
- ntp.conf: default local clock stratum to 10.

* Wed Oct 21 1998 Jeff Johnson <jbj@redhat.com>
- update to 5.93e.

* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
- strip binaries

* Thu Aug  6 1998 Jeff Johnson <jbj@redhat.com>
- update to 5.93c.
- implement suggestions from James Youngman <JYoungman@vggas.com>:
-   correct default /etc/ntp/keys 
-   use /etc/ntp/step-tickers for ntpdate hosts

* Sun May 10 1998 Cristian Gafton <gafton@redhat.com>
- start it after named

* Mon May 04 1998 Jeff Johnson <jbj@redhat.com>
- Update to 5.93.

* Mon Feb  2 1998 Jeff Johnson <jbj@jbj.org>
- Fiddles for RH-5.0. Update to xntp3-5.92.

* Mon Feb  2 1998 Jeff Johnson <jbj@jbj.org>
- Fiddles for RH-5.0. Update to xntp3-5.92.

* Sat Oct 18 1997 Manoj Kasichainula <manojk@io.com>
- Initial release for 5.91