[CentOS-devel] openntpd: contributed RPM submission

Durval Menezes durval at tmp.com.br
Sun Apr 2 14:15:36 UTC 2006


Here's my submission for a new package: openntpd, a secure NTP daemon
implementation, ported from the OpenBSD project.

The URL to the SRPM is: 

I've attached the .spec file.

Best Regards,
   Durval Menezes (durval AT tmp DOT com DOT br, http://www.tmp.com.br/)
-------------- next part --------------
Summary: NTP Time Synchronization Client 
Name: openntpd
Version: 3.7p1
Release: 1dm2_el4
License: BSD
Group: Applications/System
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: openssl-devel
Requires: openssl
Requires: /usr/sbin/useradd, /usr/sbin/usermod /sbin/chkconfig

#Patch1: openntpd-3.6p1-linux-adjtimex3.patch

NTP Time Synchronization Client - http://www.openntpd.org

%setup -q -n %{name}-%{version}
#%patch1 -p0

./configure \
  --sbindir=%{_sbindir} \
  --mandir=%{_mandir} \
  --sysconfdir=%{_sysconfdir} \

%{__rm} -rf $RPM_BUILD_ROOT

%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
%{__mkdir_p} $RPM_BUILD_ROOT/%{_initrddir}
%{__cp} contrib/redhat/ntpd $RPM_BUILD_ROOT/%{_initrddir}

if ! /usr/bin/id ntp &>/dev/null; then
  %{__mkdir_p} /var/empty/ntpd
  %{__chown} 0 /var/empty/ntpd
  %{__chgrp} 0 /var/empty/ntpd
  %{__chmod} 0755 /var/empty/ntpd

  useradd -c "OpenNTPD Unprivileged User" -u 38 -r -d /var/empty/ntpd ntp &>/dev/null || \
		%logmsg "Unexpected error adding user \"ntp\". Aborting installation."
/usr/sbin/usermod -s /sbin/nologin ntp &>/dev/null || :

/sbin/chkconfig --add ntpd

if [ $1 -eq 0 ]; then
  /sbin/service ntpd stop &>/dev/null || :
	/sbin/chkconfig --del ntpd
  /usr/sbin/userdel ntp
  exit 0

/sbin/service ntp condrestart &>/dev/null || :

%config(noreplace) %attr(644, root, root) %{_sysconfdir}/ntpd.conf
%config %attr(755, root, root) %{_initrddir}/ntpd
%attr(755, root, root) %{_sbindir}/*
%attr(644, root, root) %{_mandir}/man*/*

* Mon Mar 27 2006 Durval Menezes <durval AT tmp DOT com DOT br> [3.7p1-1dm2_el4]
- Initial package, based on the openntpd.spec included in the original tarfile.

More information about the CentOS-devel mailing list