packages: ntp/ntp.init, ntp/ntp.spec, ntp/ntp.upstart (NEW) - Upstart job f...
jajcus
jajcus at pld-linux.org
Mon May 24 18:41:36 CEST 2010
Author: jajcus Date: Mon May 24 16:41:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- Upstart job for ntpd
- Release: 11
---- Files affected:
packages/ntp:
ntp.init (1.26 -> 1.27) , ntp.spec (1.130 -> 1.131) , ntp.upstart (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/ntp/ntp.init
diff -u packages/ntp/ntp.init:1.26 packages/ntp/ntp.init:1.27
--- packages/ntp/ntp.init:1.26 Fri Jan 22 20:40:54 2010
+++ packages/ntp/ntp.init Mon May 24 18:41:30 2010
@@ -62,6 +62,8 @@
fi
}
+upstart_controlled
+
RETVAL=0
# See how we were called.
case "$1" in
================================================================
Index: packages/ntp/ntp.spec
diff -u packages/ntp/ntp.spec:1.130 packages/ntp/ntp.spec:1.131
--- packages/ntp/ntp.spec:1.130 Sat May 22 18:14:16 2010
+++ packages/ntp/ntp.spec Mon May 24 18:41:30 2010
@@ -5,7 +5,7 @@
Summary(pt_BR.UTF-8): Network Time Protocol versão 4
Name: ntp
Version: 4.2.4p8
-Release: 10
+Release: 11
License: distributable
Group: Networking/Daemons
Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@
Source5: %{name}-client.init
Source6: %{name}-client.sysconfig
Source7: %{name}-manpages.tar.gz
+Source8: %{name}.upstart
# Source7-md5: 208fcc9019e19ab26d28e4597290bffb
Patch0: %{name}-time.patch
Patch1: %{name}-no_libelf.patch
@@ -60,7 +61,7 @@
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.561
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/ntp
@@ -100,7 +101,7 @@
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires: rc-scripts >= 0.4.0.10
+Requires: rc-scripts >= 0.4.3.0
Provides: group(ntp)
Provides: ntp = %{version}-%{release}
Provides: ntpdaemon
@@ -135,6 +136,19 @@
sincronizarão o relógio do seu computador com o horário universal
(UTC) através do protocolo NTP e utilizando servidores NTP públicos.
+%package -n ntpd-upstart
+Summary: Upstart job description for the NTP daemon
+Summary(pl.UTF-8): Opis zadania Upstart dla demona NTP
+Group: Daemons
+Requires: ntpd = %{version}-%{release}
+Requires: upstart >= 0.6
+
+%description -n ntpd-upstart
+Upstart job description for the NTP daemon.
+
+%description -n ntpd-upstart -l pl.UTF-8
+Opis zadania Upstart dla demona NTP.
+
%package -n ntpdate
Summary: Utility to set the date and time via NTP
Summary(pl.UTF-8): Klient do synchronizacji czasu po NTP (Network Time Protocol)
@@ -252,7 +266,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly},%{_mandir}/man1}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly,init},%{_mandir}/man1}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -263,6 +277,7 @@
install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpdate
cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate
+install -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/ntpd.conf
cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
install -d $RPM_BUILD_ROOT/var/lib/ntp
@@ -291,12 +306,19 @@
rm -f /var/lib/ntp/drift
fi
+%post -n ntpd-upstart
+%upstart_post ntpd
+
+%postun -n ntpd-upstart
+%upstart_postun ntpd
+
%postun -n ntp
if [ "$1" = "0" ]; then
%userremove ntp
%groupremove ntp
fi
+
%pre -n ntpdate
%groupadd -g 246 ntp
%useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
@@ -360,6 +382,10 @@
%dir %attr(770,root,ntp) /var/lib/ntp
%attr(640,ntp,ntp) %ghost /var/lib/ntp/drift
+%files -n ntpd-upstart
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/init/ntpd.conf
+
%files -n ntpdate
%defattr(644,root,root,755)
%doc COPYRIGHT
@@ -385,6 +411,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.131 2010/05/24 16:41:30 jajcus
+- Upstart job for ntpd
+- Release: 11
+
Revision 1.130 2010/05/22 16:14:16 gotar
- fixed Group
================================================================
Index: packages/ntp/ntp.upstart
diff -u /dev/null packages/ntp/ntp.upstart:1.1
--- /dev/null Mon May 24 18:41:36 2010
+++ packages/ntp/ntp.upstart Mon May 24 18:41:30 2010
@@ -0,0 +1,21 @@
+description "NTP daemon"
+
+start on pld.network-started
+stop on pld.shutdown-started
+
+env NTPD_USER="ntp"
+env NTPD_OPTIONS=""
+
+respawn
+
+pre-start script
+ # do not bother to start if not configured
+ [ -f /etc/ntp/ntp.conf ] || /sbin/initctl stop
+end script
+
+script
+ # Source old-style ntp service configuration
+ [ -f /etc/sysconfig/ntpd ] && . /etc/sysconfig/ntpd
+
+ exec /usr/sbin/ntpd -n -c /etc/ntp/ntp.conf -p /var/run/ntpd.pid ${NTPD_USER:+-u $NTPD_USER} $NTPD_OPTIONS
+end script
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ntp/ntp.init?r1=1.26&r2=1.27&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ntp/ntp.spec?r1=1.130&r2=1.131&f=u
More information about the pld-cvs-commit
mailing list