rpms/ddclient/devel ddclient.rwtab, NONE, 1.1 .cvsignore, 1.3, 1.4 ddclient.initscript, 1.2, 1.3 ddclient.spec, 1.7, 1.8 ddclient.sysconfig, 1.1, 1.2 sources, 1.3, 1.4 ddclient.cache.patch, 1.2, NONE
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Sat Mar 3 08:37:20 UTC 2007
- Previous message (by thread): rpms/jeta/FC-5 jeta.spec, NONE, 1.1 nojta.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/unrtf/FC-6 unrtf-0.20.2-fb2ansi.patch, NONE, 1.1 unrtf-0.20.2-in_pict.patch, NONE, 1.1 unrtf.spec, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: scop
Update of /cvs/extras/rpms/ddclient/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14387
Modified Files:
.cvsignore ddclient.initscript ddclient.spec
ddclient.sysconfig sources
Added Files:
ddclient.rwtab
Removed Files:
ddclient.cache.patch
Log Message:
* Fri Mar 2 2007 Ville Skyttä <ville.skytta at iki.fi> - 3.7.1-1
- 3.7.1, cache file moved to /var/cache/ddclient.
- Run as a dedicated ddclient user (#220539).
- Add read only root/temporary state config (#220540).
- Create/chmod cache in init script instead of %post.
- Add scriptlet dependencies, try-restart action and other minor tweaks.
--- NEW FILE ddclient.rwtab ---
files /var/cache/ddclient/ddclient.cache
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ddclient/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 29 Aug 2005 07:13:12 -0000 1.3
+++ .cvsignore 3 Mar 2007 08:36:48 -0000 1.4
@@ -1 +1 @@
-ddclient-3.6.6.tar.bz2
+ddclient-3.7.1.tar.bz2
Index: ddclient.initscript
===================================================================
RCS file: /cvs/extras/rpms/ddclient/devel/ddclient.initscript,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ddclient.initscript 29 Aug 2005 07:13:12 -0000 1.2
+++ ddclient.initscript 3 Mar 2007 08:36:48 -0000 1.3
@@ -21,10 +21,14 @@
exec="/usr/sbin/ddclient"
prog=$(basename $exec)
lockfile=/var/lock/subsys/$prog
+cache=/var/cache/ddclient/ddclient.cache
+pid=/var/run/ddclient/ddclient.pid
start() {
echo -n $"Starting $prog: "
- daemon $exec $DDCLIENT_OPTIONS
+ [ -f $cache ] || touch $cache
+ chown ddclient:ddclient $cache && chmod 600 $cache || exit $?
+ daemon --user=ddclient --pidfile=$pid $exec $DDCLIENT_OPTIONS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@@ -33,6 +37,8 @@
stop() {
echo -n $"Stopping $prog: "
+ # FIXME: call killproc with -p $pid; not done yet so that a 3.6.6->3.7.1
+ # update will do the right thing with try-restart during the upgrade
killproc $prog
retval=$?
echo
@@ -53,10 +59,6 @@
restart
}
-fdrstatus() {
- status $prog
-}
-
# See how we were called.
case "$1" in
start|stop|restart|reload)
@@ -66,12 +68,12 @@
force_reload
;;
status)
- fdrstatus
+ status -p $pid $prog
;;
- condrestart)
+ try-restart|condrestart)
[ ! -f $lockfile ] || restart
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
+ echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac
Index: ddclient.spec
===================================================================
RCS file: /cvs/extras/rpms/ddclient/devel/ddclient.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ddclient.spec 20 Sep 2006 18:51:13 -0000 1.7
+++ ddclient.spec 3 Mar 2007 08:36:48 -0000 1.8
@@ -1,19 +1,23 @@
Name: ddclient
-Version: 3.6.6
-Release: 2%{?dist}
+Version: 3.7.1
+Release: 1%{?dist}
Summary: Client to update dynamic DNS host entries
Group: System Environment/Daemons
License: GPL
URL: http://ddclient.sourceforge.net/
-Source0: http://download.sf.net/ddclient/%{name}-%{version}.tar.bz2
+Source0: http://downloads.sourceforge.net/ddclient/%{name}-%{version}.tar.bz2
+Source1: ddclient.rwtab
Source2: ddclient.initscript
Source3: ddclient.sysconfig
-# Patch hardcodes cache location to /var/cache.
-# This is reflected in install section below.
-Patch: ddclient.cache.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
BuildArch: noarch
+Requires(pre): /usr/sbin/useradd
+Requires(pre): /usr/sbin/groupadd
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(hint): perl(IO::Socket::SSL)
%description
ddclient is a Perl client used to update dynamic DNS entries for accounts
@@ -22,8 +26,9 @@
%prep
%setup -q
-%patch -p1
rm sample-etc_rc.d_init.d_ddclient*
+sed -i -e 's|/var/run/ddclient.pid|/var/run/ddclient/ddclient.pid|' \
+ sample-etc_ddclient.conf
# Backwards compatibility from pre-3.6.6-1
sed -i -e 's|/etc/ddclient/|%{_sysconfdir}/|' ddclient
@@ -38,44 +43,68 @@
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -p ddclient $RPM_BUILD_ROOT%{_sbindir}
install -pm 600 sample-etc_ddclient.conf \
- $RPM_BUILD_ROOT%{_sysconfdir}/ddclient.conf
+ $RPM_BUILD_ROOT%{_sysconfdir}/ddclient.conf
+install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/ddclient
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/ddclient
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ddclient
-mkdir -p $RPM_BUILD_ROOT/var/cache
-touch $RPM_BUILD_ROOT/var/cache/ddclient.cache
+mkdir -p $RPM_BUILD_ROOT/var/cache/ddclient
+touch $RPM_BUILD_ROOT/var/cache/ddclient/ddclient.cache
+mkdir -p $RPM_BUILD_ROOT/var/run/ddclient
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+/usr/sbin/groupadd -r ddclient >/dev/null 2>&1 || :
+/usr/sbin/useradd -r -M -d /var/cache/ddclient -g ddclient \
+ -s /sbin/nologin -c "Dynamic DNS Client" ddclient >/dev/null 2>&1 || :
+
%post
/sbin/chkconfig --add ddclient
-touch /var/cache/ddclient.cache
-chmod 0600 /var/cache/ddclient.cache
+if [ $1 -gt 1 ]; then
+ # 3.6.6->3.7.1: config(noreplace), but we need the ownership change...
+ chown ddclient:ddclient %{_sysconfdir}/ddclient.conf
+ # ...and the pid file location change is nice to have too
+ if grep -qF /var/run/ddclient.pid %{_sysconfdir}/ddclient.conf ; then
+ sed -i -e 's|/var/run/ddclient.pid|/var/run/ddclient/ddclient.pid|' \
+ %{_sysconfdir}/ddclient.conf || :
+ fi
+fi
%preun
if [ $1 -eq 0 ]; then
- /sbin/service ddclient stop > /dev/null 2>&1
- /sbin/chkconfig --del ddclient
+ %{_initrddir}/ddclient stop > /dev/null 2>&1
+ /sbin/chkconfig --del ddclient
fi
%postun
if [ $1 -ge 1 ]; then
- /sbin/service ddclient condrestart >/dev/null
+ %{_initrddir}/ddclient try-restart >/dev/null
fi
%files
%defattr(-,root,root,-)
%doc README* COPYING COPYRIGHT Changelog sample-*
-%{_sbindir}/ddclient
-%config(noreplace) %{_sysconfdir}/ddclient.conf
+%attr(600,ddclient,ddclient) %config(noreplace) %{_sysconfdir}/ddclient.conf
+%config(noreplace) %{_sysconfdir}/rwtab.d/ddclient
%config(noreplace) %{_sysconfdir}/sysconfig/ddclient
-%ghost %attr(0600, root, root) /var/cache/ddclient.cache
+%attr(0700,ddclient,ddclient) %dir /var/cache/ddclient/
+%attr(0600,ddclient,ddclient) %ghost /var/cache/ddclient/ddclient.cache
%{_initrddir}/ddclient
+%{_sbindir}/ddclient
+%attr(0755,ddclient,ddclient) %dir /var/run/ddclient/
%changelog
+* Fri Mar 2 2007 Ville Skyttä <ville.skytta at iki.fi> - 3.7.1-1
+- 3.7.1, cache file moved to /var/cache/ddclient.
+- Run as a dedicated ddclient user (#220539).
+- Add read only root/temporary state config (#220540).
+- Create/chmod cache in init script instead of %%post.
+- Add scriptlet dependencies, try-restart action and other minor tweaks.
+
* Sat Jul 30 2005 Ville Skyttä <ville.skytta at iki.fi> - 3.6.6-1
- 3.6.6, update URLs (#165272).
- Restart service on future package upgrades (still manually needed this time).
@@ -88,7 +117,7 @@
* Mon Apr 05 2004 Toshio Kuratomi <toshio[+]tiki-lounge.com> - 0:3.6.3-0.fdr.4.fc1
- Fix %%doc %%attr ownership
-- Touch the cache file in %post
+- Touch the cache file in %%post
* Mon Sep 08 2003 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:3.6.3-0.fdr.3
- Add own Fedora-style initscript and /etc/sysconfig/ddclient file.
Index: ddclient.sysconfig
===================================================================
RCS file: /cvs/extras/rpms/ddclient/devel/ddclient.sysconfig,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ddclient.sysconfig 8 Nov 2004 04:12:32 -0000 1.1
+++ ddclient.sysconfig 3 Mar 2007 08:36:48 -0000 1.2
@@ -1,4 +1,4 @@
-#
-# ddclient service options
+# -*- sh -*-
+# ddclient service options, see ddclient --help for what's available.
#
DDCLIENT_OPTIONS="-daemon 300"
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ddclient/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 29 Aug 2005 07:13:12 -0000 1.3
+++ sources 3 Mar 2007 08:36:48 -0000 1.4
@@ -1 +1 @@
-5fd0f82446fbed857c841a4deb83cdb9 ddclient-3.6.6.tar.bz2
+f41cd854e28333f56821166cf3e49836 ddclient-3.7.1.tar.bz2
--- ddclient.cache.patch DELETED ---
- Previous message (by thread): rpms/jeta/FC-5 jeta.spec, NONE, 1.1 nojta.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/unrtf/FC-6 unrtf-0.20.2-fb2ansi.patch, NONE, 1.1 unrtf-0.20.2-in_pict.patch, NONE, 1.1 unrtf.spec, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list