From 6af65c578716098ed6bec447d5d7a299ebb05e15 Mon Sep 17 00:00:00 2001 From: jwboyer Date: Mon, 27 Nov 2006 03:29:36 +0000 Subject: [PATCH 01/16] Update to latest 3.6 release --- .cvsignore | 2 +- ddclient.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index a801f8d..6d7acdf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ddclient-3.6.6.tar.bz2 +ddclient-3.6.7.tar.bz2 diff --git a/ddclient.spec b/ddclient.spec index 513bfa6..412d519 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,5 +1,5 @@ Name: ddclient -Version: 3.6.6 +Version: 3.6.7 Release: 2%{?dist} Summary: Client to update dynamic DNS host entries @@ -76,6 +76,9 @@ fi %changelog +* Sun Nov 26 2006 Josh Boyer - 3.6.7-1 +- Update to latest 3.6 release + * Sat Jul 30 2005 Ville Skyttä - 3.6.6-1 - 3.6.6, update URLs (#165272). - Restart service on future package upgrades (still manually needed this time). diff --git a/sources b/sources index be68acc..ab54a97 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5fd0f82446fbed857c841a4deb83cdb9 ddclient-3.6.6.tar.bz2 +b07a29a891dcf40b941b9bc5ef3ce598 ddclient-3.6.7.tar.bz2 From 9ea3f264edf513c6165335acce39f33e330d88b2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 23 Jan 2008 18:41:51 +0000 Subject: [PATCH 02/16] Initialize branch EL-5 for ddclient --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..42f697a --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-5 From 3a388d3219defa96996ee72090d7a327a54d0e41 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Wed, 23 Jan 2008 19:13:15 +0000 Subject: [PATCH 03/16] - Upgrade to 3.7.3 (#429438) - Updated the license tag according to the guidelines --- .cvsignore | 2 +- ddclient.cache.patch | 19 ---------- ddclient.initscript | 18 +++++---- ddclient.rwtab | 1 + ddclient.spec | 88 +++++++++++++++++++++++++++++++++----------- ddclient.sysconfig | 4 +- sources | 2 +- 7 files changed, 81 insertions(+), 53 deletions(-) delete mode 100644 ddclient.cache.patch create mode 100644 ddclient.rwtab diff --git a/.cvsignore b/.cvsignore index 6d7acdf..b67ecec 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ddclient-3.6.7.tar.bz2 +ddclient-3.7.3.tar.bz2 diff --git a/ddclient.cache.patch b/ddclient.cache.patch deleted file mode 100644 index ab03b50..0000000 --- a/ddclient.cache.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- ddclient-3.6.6/ddclient.cache 2005-03-20 13:01:23.000000000 +0200 -+++ ddclient-3.6.6/ddclient 2005-07-30 23:27:07.000000000 +0300 -@@ -23,6 +23,7 @@ - my $now = time; - my $hostname = hostname(); - my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $cache = ($program =~ /test/i) ? './' : '/var/cache/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; - my $last_msgs = ''; -@@ -217,7 +218,7 @@ - 'global-defaults' => { - 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), - 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), -- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), -+ 'cache' => setv(T_FILE, 0, 0, 1, "$cache$program.cache", undef), - 'pid' => setv(T_FILE, 0, 0, 1, "", undef), - 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), - 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), diff --git a/ddclient.initscript b/ddclient.initscript index 6094348..2a8176a 100755 --- a/ddclient.initscript +++ b/ddclient.initscript @@ -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 @@ start() { 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 @@ force_reload() { restart } -fdrstatus() { - status $prog -} - # See how we were called. case "$1" in start|stop|restart|reload) @@ -66,12 +68,12 @@ case "$1" in 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 diff --git a/ddclient.rwtab b/ddclient.rwtab new file mode 100644 index 0000000..927514c --- /dev/null +++ b/ddclient.rwtab @@ -0,0 +1 @@ +files /var/cache/ddclient/ddclient.cache diff --git a/ddclient.spec b/ddclient.spec index 412d519..9cf26ea 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,19 +1,23 @@ Name: ddclient -Version: 3.6.7 -Release: 2%{?dist} +Version: 3.7.3 +Release: 1%{?dist} Summary: Client to update dynamic DNS host entries Group: System Environment/Daemons -License: GPL +License: GPLv2+ URL: http://ddclient.sourceforge.net/ -Source0: http://download.sf.net/ddclient/%{name}-%{version}.tar.bz2 +Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{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,11 +26,22 @@ on many dynamic DNS services. %prep %setup -q -%patch -p1 rm sample-etc_rc.d_init.d_ddclient* + +# Move pid file location for running as non-root. +sed -i -e 's|/var/run/ddclient.pid|/var/run/ddclient/ddclient.pid|' \ + sample-etc_ddclient.conf + +# Send less mail by default, eg. not on every shutdown. +sed -i -e 's|^mail=|#mail=|' sample-etc_ddclient.conf + +# http://sourceforge.net/forum/forum.php?forum_id=706446 +sed -i -e 's|"3\.7\.1"|"3.7.2"|' ddclient + # Backwards compatibility from pre-3.6.6-1 sed -i -e 's|/etc/ddclient/|%{_sysconfdir}/|' ddclient + %build @@ -38,46 +53,75 @@ mkdir -p $RPM_BUILD_ROOT%{_initrddir} 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 -* Sun Nov 26 2006 Josh Boyer - 3.6.7-1 -- Update to latest 3.6 release +* Wed Jan 23 2008 Robert Scheck 3.7.3-1 +- Upgrade to 3.7.3 (#429438) +- Updated the license tag according to the guidelines + +* Thu Jun 14 2007 Ville Skyttä - 3.7.2-1 +- 3.7.2. +- Tweak default config to send less mail (eg. not on every shutdown). + +* Fri Mar 2 2007 Ville Skyttä - 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ä - 3.6.6-1 - 3.6.6, update URLs (#165272). @@ -91,7 +135,7 @@ fi * Mon Apr 05 2004 Toshio Kuratomi - 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 - 0:3.6.3-0.fdr.3 - Add own Fedora-style initscript and /etc/sysconfig/ddclient file. diff --git a/ddclient.sysconfig b/ddclient.sysconfig index f046b08..97de4c1 100644 --- a/ddclient.sysconfig +++ b/ddclient.sysconfig @@ -1,4 +1,4 @@ -# -# ddclient service options +# -*- sh -*- +# ddclient service options, see ddclient --help for what's available. # DDCLIENT_OPTIONS="-daemon 300" diff --git a/sources b/sources index ab54a97..184dc0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b07a29a891dcf40b941b9bc5ef3ce598 ddclient-3.6.7.tar.bz2 +f6a55bc68cf73ffe7e80d2fa5cd44f85 ddclient-3.7.3.tar.bz2 From cecbc7f37af8f9e31a586e4984c4a09380bbd807 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:20:37 +0000 Subject: [PATCH 04/16] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 17b07ef..2523f42 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := ddclient SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From a2735a59d5c5633e67e430182d1965ac03b6b1dc Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:20:38 +0000 Subject: [PATCH 05/16] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 17b07ef..2523f42 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := ddclient SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 279d2d57bbe47964a57062af39c0224d669d8046 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 1 May 2010 23:15:57 +0000 Subject: [PATCH 06/16] - Upgrade to 3.8.0 and several spec file cleanups (#551906) - Rewrote initscript to match LSB standards and headers (#246903) - Added dispatcher to NetworkManager to avoid failures (#506286) --- .cvsignore | 2 +- ddclient.NetworkManager | 15 +++++ ddclient.initscript | 121 ++++++++++++++++++---------------- ddclient.spec | 140 ++++++++++++++++++++-------------------- sources | 2 +- 5 files changed, 154 insertions(+), 126 deletions(-) create mode 100644 ddclient.NetworkManager diff --git a/.cvsignore b/.cvsignore index b67ecec..6d46518 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ddclient-3.7.3.tar.bz2 +ddclient-3.8.0.tar.bz2 diff --git a/ddclient.NetworkManager b/ddclient.NetworkManager new file mode 100644 index 0000000..df7abf5 --- /dev/null +++ b/ddclient.NetworkManager @@ -0,0 +1,15 @@ +#!/bin/sh + +export LC_ALL=C + +if [ "$2" = "down" ]; then + /sbin/ip route ls | grep -q '^default' || { + [ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || : + } && { :; } +fi + +if [ "$2" = "up" ]; then + /sbin/ip -o route show dev "$1" | grep -q '^default' && { + /sbin/chkconfig ddclient && /sbin/service ddclient start || : + } || { :; } +fi diff --git a/ddclient.initscript b/ddclient.initscript index 2a8176a..1271d2c 100755 --- a/ddclient.initscript +++ b/ddclient.initscript @@ -1,79 +1,92 @@ -#!/bin/sh +#!/bin/bash # -# ddclient This shell script takes care of starting and stopping ddclient. +# ddclient Client to update dynamic DNS host entries # -# chkconfig: - 65 35 -# description: ddclient provides support for updating dynamic DNS services -# processname: ddclient -# config: /etc/sysconfig/ddclient +# chkconfig: - 65 35 +# description: ddclient is a Perl client used to update dynamic DNS \ +# entries for accounts on many dynamic DNS services. +# processname: /usr/sbin/ddclient +# config: /etc/ddclient.conf +# pidfile: /var/run/ddclient/ddclient.pid + +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $network $syslog +# Should-Start: $named +# Should-Stop: $named +# Short-Description: Client to update dynamic DNS host entries +# Description: ddclient is a Perl client used to update dynamic DNS +# entries for accounts on many dynamic DNS services. +### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions -# Source networking configuration. -. /etc/sysconfig/network +if [ -f /etc/sysconfig/ddclient ]; then + . /etc/sysconfig/ddclient +fi -# Check that networking is up. -[ "$NETWORKING" = "no" ] && exit 0 - -. /etc/sysconfig/ddclient - -exec="/usr/sbin/ddclient" -prog=$(basename $exec) +exec=/usr/sbin/ddclient +prog=`basename $exec` lockfile=/var/lock/subsys/$prog cache=/var/cache/ddclient/ddclient.cache pid=/var/run/ddclient/ddclient.pid +RETVAL=0 start() { - echo -n $"Starting $prog: " - [ -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 - return $retval + # Check that networking is up. + [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0 + + echo -n $"Starting $prog: " + [ -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 + + return $RETVAL } 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 - [ $retval -eq 0 ] && rm -f $lockfile - return $retval + echo -n $"Stopping $prog: " + killproc -p $pid $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + + return $RETVAL } restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart + stop + start } # See how we were called. case "$1" in - start|stop|restart|reload) - $1 - ;; - force-reload) - force_reload - ;; + start) + start + ;; + stop) + stop + ;; status) - status -p $pid $prog - ;; - try-restart|condrestart) - [ ! -f $lockfile ] || restart - ;; + status -p $pid $prog + ;; + restart|force-reload|reload) + restart + ;; + condrestart|try-restart) + if [ -f $lockfile ]; then + restart + fi + ;; *) - echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" - exit 2 + echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|force-reload|try-restart}" + RETVAL=1 + ;; esac + +exit $RETVAL diff --git a/ddclient.spec b/ddclient.spec index 9cf26ea..1b23dfe 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,113 +1,113 @@ -Name: ddclient -Version: 3.7.3 -Release: 1%{?dist} -Summary: Client to update dynamic DNS host entries - -Group: System Environment/Daemons -License: GPLv2+ -URL: http://ddclient.sourceforge.net/ -Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 -Source1: ddclient.rwtab -Source2: ddclient.initscript -Source3: ddclient.sysconfig -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) +Summary: Client to update dynamic DNS host entries +Name: ddclient +Version: 3.8.0 +Release: 1%{?dist} +License: GPLv2+ +Group: System Environment/Daemons +URL: http://ddclient.sourceforge.net/ +Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 +Source1: ddclient.rwtab +Source2: ddclient.initscript +Source3: ddclient.sysconfig +Source4: ddclient.NetworkManager +BuildArch: noarch +Requires(pre): shadow-utils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service +Requires(hint): perl(IO::Socket::SSL) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. - %prep %setup -q -rm sample-etc_rc.d_init.d_ddclient* - # Move pid file location for running as non-root. -sed -i -e 's|/var/run/ddclient.pid|/var/run/ddclient/ddclient.pid|' \ - sample-etc_ddclient.conf +sed -e 's|/var/run/ddclient.pid|%{_localstatedir}/run/%{name}/%{name}.pid|' -i sample-etc_ddclient.conf # Send less mail by default, eg. not on every shutdown. -sed -i -e 's|^mail=|#mail=|' sample-etc_ddclient.conf +sed -e 's|^mail=|#mail=|' -i sample-etc_ddclient.conf # http://sourceforge.net/forum/forum.php?forum_id=706446 -sed -i -e 's|"3\.7\.1"|"3.7.2"|' ddclient +sed -e 's|"3\.7\.1"|"3.7.2"|' -i %{name} # Backwards compatibility from pre-3.6.6-1 -sed -i -e 's|/etc/ddclient/|%{_sysconfdir}/|' ddclient - +sed -e 's|/etc/ddclient/|%{_sysconfdir}/|' -i %{name} %build - %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_sbindir} -mkdir -p $RPM_BUILD_ROOT%{_initrddir} -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 -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/ddclient -touch $RPM_BUILD_ROOT/var/cache/ddclient/ddclient.cache -mkdir -p $RPM_BUILD_ROOT/var/run/ddclient +mkdir -p $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/{rc.d/init.d,rwtab.d,sysconfig}} +install -p -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} +install -p -m 600 sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/%{name} +install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} +%if 0%{?fedora}%{?rhel} > 4 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache +# Correct permissions for later usage in %doc +chmod 644 sample-* %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 || : +getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name} +getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Dynamic DNS Client" %{name} +exit 0 %post -/sbin/chkconfig --add ddclient -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 +/sbin/chkconfig --add %{name} %preun if [ $1 -eq 0 ]; then - %{_initrddir}/ddclient stop > /dev/null 2>&1 - /sbin/chkconfig --del ddclient + /sbin/service %{name} stop > /dev/null 2>&1 || : + /sbin/chkconfig --del %{name} fi %postun -if [ $1 -ge 1 ]; then - %{_initrddir}/ddclient try-restart >/dev/null +if [ $1 -ne 0 ]; then + /sbin/service %{name} condrestart > /dev/null 2>&1 || : fi %files %defattr(-,root,root,-) -%doc README* COPYING COPYRIGHT Changelog sample-* -%attr(600,ddclient,ddclient) %config(noreplace) %{_sysconfdir}/ddclient.conf -%config(noreplace) %{_sysconfdir}/rwtab.d/ddclient -%config(noreplace) %{_sysconfdir}/sysconfig/ddclient -%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/ - +%doc README* COPYING COPYRIGHT Changelog sample-etc_ppp_ip-up.local +%doc sample-etc_dhclient-exit-hooks sample-etc_cron.d_ddclient +%doc sample-ddclient-wrapper.sh sample-etc_dhcpc_dhcpcd-eth0.exe +%{_sysconfdir}/rc.d/init.d/%{name} +%if 0%{?fedora}%{?rhel} > 4 +%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +%attr(600,%{name},%{name}) %config(noreplace) %{_sysconfdir}/%{name}.conf +%config(noreplace) %{_sysconfdir}/rwtab.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%{_sbindir}/%{name} +%attr(0700,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}/ +%attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache +%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ %changelog +* Sat May 01 2010 Robert Scheck 3.8.0-1 +- Upgrade to 3.8.0 and several spec file cleanups (#551906) +- Rewrote initscript to match LSB standards and headers (#246903) +- Added dispatcher to NetworkManager to avoid failures (#506286) + +* Fri Jul 24 2009 Fedora Release Engineering - 3.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 3.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Wed Jan 23 2008 Robert Scheck 3.7.3-1 - Upgrade to 3.7.3 (#429438) - Updated the license tag according to the guidelines diff --git a/sources b/sources index 184dc0a..008224d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f6a55bc68cf73ffe7e80d2fa5cd44f85 ddclient-3.7.3.tar.bz2 +6cac7a5eb1da781bfd4d98cef0b21f8e ddclient-3.8.0.tar.bz2 From 98a9abe0e03d90b30c25f232295d90b904843ddf Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 1 May 2010 23:15:58 +0000 Subject: [PATCH 07/16] - Upgrade to 3.8.0 and several spec file cleanups (#551906) - Rewrote initscript to match LSB standards and headers (#246903) - Added dispatcher to NetworkManager to avoid failures (#506286) --- .cvsignore | 2 +- ddclient.NetworkManager | 15 +++++ ddclient.initscript | 121 ++++++++++++++++++++---------------- ddclient.spec | 134 +++++++++++++++++++--------------------- sources | 2 +- 5 files changed, 148 insertions(+), 126 deletions(-) create mode 100644 ddclient.NetworkManager diff --git a/.cvsignore b/.cvsignore index b67ecec..6d46518 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ddclient-3.7.3.tar.bz2 +ddclient-3.8.0.tar.bz2 diff --git a/ddclient.NetworkManager b/ddclient.NetworkManager new file mode 100644 index 0000000..df7abf5 --- /dev/null +++ b/ddclient.NetworkManager @@ -0,0 +1,15 @@ +#!/bin/sh + +export LC_ALL=C + +if [ "$2" = "down" ]; then + /sbin/ip route ls | grep -q '^default' || { + [ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || : + } && { :; } +fi + +if [ "$2" = "up" ]; then + /sbin/ip -o route show dev "$1" | grep -q '^default' && { + /sbin/chkconfig ddclient && /sbin/service ddclient start || : + } || { :; } +fi diff --git a/ddclient.initscript b/ddclient.initscript index 2a8176a..1271d2c 100755 --- a/ddclient.initscript +++ b/ddclient.initscript @@ -1,79 +1,92 @@ -#!/bin/sh +#!/bin/bash # -# ddclient This shell script takes care of starting and stopping ddclient. +# ddclient Client to update dynamic DNS host entries # -# chkconfig: - 65 35 -# description: ddclient provides support for updating dynamic DNS services -# processname: ddclient -# config: /etc/sysconfig/ddclient +# chkconfig: - 65 35 +# description: ddclient is a Perl client used to update dynamic DNS \ +# entries for accounts on many dynamic DNS services. +# processname: /usr/sbin/ddclient +# config: /etc/ddclient.conf +# pidfile: /var/run/ddclient/ddclient.pid + +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $network $syslog +# Should-Start: $named +# Should-Stop: $named +# Short-Description: Client to update dynamic DNS host entries +# Description: ddclient is a Perl client used to update dynamic DNS +# entries for accounts on many dynamic DNS services. +### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions -# Source networking configuration. -. /etc/sysconfig/network +if [ -f /etc/sysconfig/ddclient ]; then + . /etc/sysconfig/ddclient +fi -# Check that networking is up. -[ "$NETWORKING" = "no" ] && exit 0 - -. /etc/sysconfig/ddclient - -exec="/usr/sbin/ddclient" -prog=$(basename $exec) +exec=/usr/sbin/ddclient +prog=`basename $exec` lockfile=/var/lock/subsys/$prog cache=/var/cache/ddclient/ddclient.cache pid=/var/run/ddclient/ddclient.pid +RETVAL=0 start() { - echo -n $"Starting $prog: " - [ -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 - return $retval + # Check that networking is up. + [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0 + + echo -n $"Starting $prog: " + [ -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 + + return $RETVAL } 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 - [ $retval -eq 0 ] && rm -f $lockfile - return $retval + echo -n $"Stopping $prog: " + killproc -p $pid $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + + return $RETVAL } restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart + stop + start } # See how we were called. case "$1" in - start|stop|restart|reload) - $1 - ;; - force-reload) - force_reload - ;; + start) + start + ;; + stop) + stop + ;; status) - status -p $pid $prog - ;; - try-restart|condrestart) - [ ! -f $lockfile ] || restart - ;; + status -p $pid $prog + ;; + restart|force-reload|reload) + restart + ;; + condrestart|try-restart) + if [ -f $lockfile ]; then + restart + fi + ;; *) - echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" - exit 2 + echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|force-reload|try-restart}" + RETVAL=1 + ;; esac + +exit $RETVAL diff --git a/ddclient.spec b/ddclient.spec index 7b01699..1b23dfe 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,113 +1,107 @@ -Name: ddclient -Version: 3.7.3 -Release: 3%{?dist} -Summary: Client to update dynamic DNS host entries - -Group: System Environment/Daemons -License: GPLv2+ -URL: http://ddclient.sourceforge.net/ -Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 -Source1: ddclient.rwtab -Source2: ddclient.initscript -Source3: ddclient.sysconfig -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) +Summary: Client to update dynamic DNS host entries +Name: ddclient +Version: 3.8.0 +Release: 1%{?dist} +License: GPLv2+ +Group: System Environment/Daemons +URL: http://ddclient.sourceforge.net/ +Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 +Source1: ddclient.rwtab +Source2: ddclient.initscript +Source3: ddclient.sysconfig +Source4: ddclient.NetworkManager +BuildArch: noarch +Requires(pre): shadow-utils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service +Requires(hint): perl(IO::Socket::SSL) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. - %prep %setup -q -rm sample-etc_rc.d_init.d_ddclient* - # Move pid file location for running as non-root. -sed -i -e 's|/var/run/ddclient.pid|/var/run/ddclient/ddclient.pid|' \ - sample-etc_ddclient.conf +sed -e 's|/var/run/ddclient.pid|%{_localstatedir}/run/%{name}/%{name}.pid|' -i sample-etc_ddclient.conf # Send less mail by default, eg. not on every shutdown. -sed -i -e 's|^mail=|#mail=|' sample-etc_ddclient.conf +sed -e 's|^mail=|#mail=|' -i sample-etc_ddclient.conf # http://sourceforge.net/forum/forum.php?forum_id=706446 -sed -i -e 's|"3\.7\.1"|"3.7.2"|' ddclient +sed -e 's|"3\.7\.1"|"3.7.2"|' -i %{name} # Backwards compatibility from pre-3.6.6-1 -sed -i -e 's|/etc/ddclient/|%{_sysconfdir}/|' ddclient - +sed -e 's|/etc/ddclient/|%{_sysconfdir}/|' -i %{name} %build - %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_sbindir} -mkdir -p $RPM_BUILD_ROOT%{_initrddir} -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 -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/ddclient -touch $RPM_BUILD_ROOT/var/cache/ddclient/ddclient.cache -mkdir -p $RPM_BUILD_ROOT/var/run/ddclient +mkdir -p $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/{rc.d/init.d,rwtab.d,sysconfig}} +install -p -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} +install -p -m 600 sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/%{name} +install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} +%if 0%{?fedora}%{?rhel} > 4 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache +# Correct permissions for later usage in %doc +chmod 644 sample-* %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 || : +getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name} +getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Dynamic DNS Client" %{name} +exit 0 %post -/sbin/chkconfig --add ddclient -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 +/sbin/chkconfig --add %{name} %preun if [ $1 -eq 0 ]; then - %{_initrddir}/ddclient stop > /dev/null 2>&1 - /sbin/chkconfig --del ddclient + /sbin/service %{name} stop > /dev/null 2>&1 || : + /sbin/chkconfig --del %{name} fi %postun -if [ $1 -ge 1 ]; then - %{_initrddir}/ddclient try-restart >/dev/null +if [ $1 -ne 0 ]; then + /sbin/service %{name} condrestart > /dev/null 2>&1 || : fi %files %defattr(-,root,root,-) -%doc README* COPYING COPYRIGHT Changelog sample-* -%attr(600,ddclient,ddclient) %config(noreplace) %{_sysconfdir}/ddclient.conf -%config(noreplace) %{_sysconfdir}/rwtab.d/ddclient -%config(noreplace) %{_sysconfdir}/sysconfig/ddclient -%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/ - +%doc README* COPYING COPYRIGHT Changelog sample-etc_ppp_ip-up.local +%doc sample-etc_dhclient-exit-hooks sample-etc_cron.d_ddclient +%doc sample-ddclient-wrapper.sh sample-etc_dhcpc_dhcpcd-eth0.exe +%{_sysconfdir}/rc.d/init.d/%{name} +%if 0%{?fedora}%{?rhel} > 4 +%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +%attr(600,%{name},%{name}) %config(noreplace) %{_sysconfdir}/%{name}.conf +%config(noreplace) %{_sysconfdir}/rwtab.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%{_sbindir}/%{name} +%attr(0700,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}/ +%attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache +%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ %changelog +* Sat May 01 2010 Robert Scheck 3.8.0-1 +- Upgrade to 3.8.0 and several spec file cleanups (#551906) +- Rewrote initscript to match LSB standards and headers (#246903) +- Added dispatcher to NetworkManager to avoid failures (#506286) + * Fri Jul 24 2009 Fedora Release Engineering - 3.7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 184dc0a..008224d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f6a55bc68cf73ffe7e80d2fa5cd44f85 ddclient-3.7.3.tar.bz2 +6cac7a5eb1da781bfd4d98cef0b21f8e ddclient-3.8.0.tar.bz2 From aac484e0b59a56e8a11df806e4b93521187fb058 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 01:46:38 +0000 Subject: [PATCH 08/16] Initialize branch EL-6 for ddclient --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From 445fccb4f4dad8a9ff7f4f721b163da2da81269f Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 29 May 2010 10:47:50 +0000 Subject: [PATCH 09/16] - Fixed wrong permissions at NetworkManager dispatcher (#506286) - Updated %description to be more verbose and detailed (#588053) --- ddclient.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ddclient.spec b/ddclient.spec index 1b23dfe..083ebd5 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,7 +1,7 @@ Summary: Client to update dynamic DNS host entries Name: ddclient Version: 3.8.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://ddclient.sourceforge.net/ @@ -20,7 +20,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n %description ddclient is a Perl client used to update dynamic DNS entries for accounts -on many dynamic DNS services. +on many different dynamic DNS services. Features include: Operating as a +daemon, manual and automatic updates, static and dynamic updates, optimized +updates for multiple addresses, MX, wildcards, abuse avoidance, retrying +the failed updates and sending update status to syslog and through e-mail. %prep %setup -q @@ -49,7 +52,7 @@ install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} %if 0%{?fedora}%{?rhel} > 4 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +install -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} %endif mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache @@ -97,6 +100,10 @@ fi %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ %changelog +* Sat May 29 2010 Robert Scheck 3.8.0-2 +- Fixed wrong permissions at NetworkManager dispatcher (#506286) +- Updated %%description to be more verbose and detailed (#588053) + * Sat May 01 2010 Robert Scheck 3.8.0-1 - Upgrade to 3.8.0 and several spec file cleanups (#551906) - Rewrote initscript to match LSB standards and headers (#246903) From b0bb95d3576c62cf8eb6738ebf7a9b96ce4a1e9c Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 29 May 2010 10:49:35 +0000 Subject: [PATCH 10/16] Sync with devel branch --- ddclient.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ddclient.spec b/ddclient.spec index 1b23dfe..083ebd5 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,7 +1,7 @@ Summary: Client to update dynamic DNS host entries Name: ddclient Version: 3.8.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://ddclient.sourceforge.net/ @@ -20,7 +20,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n %description ddclient is a Perl client used to update dynamic DNS entries for accounts -on many dynamic DNS services. +on many different dynamic DNS services. Features include: Operating as a +daemon, manual and automatic updates, static and dynamic updates, optimized +updates for multiple addresses, MX, wildcards, abuse avoidance, retrying +the failed updates and sending update status to syslog and through e-mail. %prep %setup -q @@ -49,7 +52,7 @@ install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} %if 0%{?fedora}%{?rhel} > 4 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +install -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} %endif mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache @@ -97,6 +100,10 @@ fi %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ %changelog +* Sat May 29 2010 Robert Scheck 3.8.0-2 +- Fixed wrong permissions at NetworkManager dispatcher (#506286) +- Updated %%description to be more verbose and detailed (#588053) + * Sat May 01 2010 Robert Scheck 3.8.0-1 - Upgrade to 3.8.0 and several spec file cleanups (#551906) - Rewrote initscript to match LSB standards and headers (#246903) From dec6e7d6028d6400dfcdbe4b899b41d0eb0debc5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 12:45:05 +0000 Subject: [PATCH 11/16] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 2523f42..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: ddclient -# $Id$ -NAME := ddclient -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 42f697a..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-5 From c5c28888e7aeea573f8d9eb910d8842586deffba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 12:45:08 +0000 Subject: [PATCH 12/16] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 2523f42..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: ddclient -# $Id$ -NAME := ddclient -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 From 0bf1ae4183db080455db35c506b98f5067d0bde0 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 29 Mar 2012 07:09:32 -0500 Subject: [PATCH 13/16] Latest upstream. --- .gitignore | 1 + ddclient.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6d46518..b5e08cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ ddclient-3.8.0.tar.bz2 +/ddclient-3.8.1.tar.bz2 diff --git a/ddclient.spec b/ddclient.spec index c660cf2..5713afa 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,7 +1,7 @@ Summary: Client to update dynamic DNS host entries Name: ddclient -Version: 3.8.0 -Release: 4%{?dist} +Version: 3.8.1 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://ddclient.sourceforge.net/ @@ -100,6 +100,9 @@ fi %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ %changelog +* Thu Mar 29 2012 Jon Ciesla - 3.8.1-1 +- Latest upstream, BZ 720627. + * Thu Feb 10 2011 Robert Scheck 3.8.0-4 - Replaced Requires(hint) by Requires as RPM 4.9 dropped support diff --git a/sources b/sources index 008224d..61c72ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6cac7a5eb1da781bfd4d98cef0b21f8e ddclient-3.8.0.tar.bz2 +7fa417bc65f8f0e6ce78418a4f631988 ddclient-3.8.1.tar.bz2 From 0fba70ef8caf2ed16ad442ed4985b6fcc200a121 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Wed, 17 Dec 2014 17:53:15 +0100 Subject: [PATCH 14/16] 2014-12-17: Retired orphaned package, because it was orphaned for more than six weeks. Reference: https://fedorahosted.org/epel/ticket/7 --- .gitignore | 1 - ddclient-tmpfiles.conf | 1 - ddclient.NetworkManager | 15 --- ddclient.initscript | 92 -------------- ddclient.rwtab | 1 - ddclient.service | 15 --- ddclient.spec | 266 ---------------------------------------- ddclient.sysconfig | 4 - dead.package | 3 + sources | 1 - 10 files changed, 3 insertions(+), 396 deletions(-) delete mode 100644 .gitignore delete mode 100644 ddclient-tmpfiles.conf delete mode 100644 ddclient.NetworkManager delete mode 100755 ddclient.initscript delete mode 100644 ddclient.rwtab delete mode 100644 ddclient.service delete mode 100644 ddclient.spec delete mode 100644 ddclient.sysconfig create mode 100644 dead.package delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1f60290..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/ddclient-3.8.1.tar.bz2 diff --git a/ddclient-tmpfiles.conf b/ddclient-tmpfiles.conf deleted file mode 100644 index 881d82f..0000000 --- a/ddclient-tmpfiles.conf +++ /dev/null @@ -1 +0,0 @@ -d /var/run/ddclient 0755 ddclient ddclient - diff --git a/ddclient.NetworkManager b/ddclient.NetworkManager deleted file mode 100644 index df7abf5..0000000 --- a/ddclient.NetworkManager +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -export LC_ALL=C - -if [ "$2" = "down" ]; then - /sbin/ip route ls | grep -q '^default' || { - [ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || : - } && { :; } -fi - -if [ "$2" = "up" ]; then - /sbin/ip -o route show dev "$1" | grep -q '^default' && { - /sbin/chkconfig ddclient && /sbin/service ddclient start || : - } || { :; } -fi diff --git a/ddclient.initscript b/ddclient.initscript deleted file mode 100755 index 1271d2c..0000000 --- a/ddclient.initscript +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# -# ddclient Client to update dynamic DNS host entries -# -# chkconfig: - 65 35 -# description: ddclient is a Perl client used to update dynamic DNS \ -# entries for accounts on many dynamic DNS services. -# processname: /usr/sbin/ddclient -# config: /etc/ddclient.conf -# pidfile: /var/run/ddclient/ddclient.pid - -### BEGIN INIT INFO -# Provides: ddclient -# Required-Start: $local_fs $network $syslog -# Required-Stop: $local_fs $network $syslog -# Should-Start: $named -# Should-Stop: $named -# Short-Description: Client to update dynamic DNS host entries -# Description: ddclient is a Perl client used to update dynamic DNS -# entries for accounts on many dynamic DNS services. -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -if [ -f /etc/sysconfig/ddclient ]; then - . /etc/sysconfig/ddclient -fi - -exec=/usr/sbin/ddclient -prog=`basename $exec` -lockfile=/var/lock/subsys/$prog -cache=/var/cache/ddclient/ddclient.cache -pid=/var/run/ddclient/ddclient.pid -RETVAL=0 - -start() { - # Check that networking is up. - [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0 - - echo -n $"Starting $prog: " - [ -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 - - return $RETVAL -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p $pid $prog - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - - return $RETVAL -} - -restart() { - stop - start -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status -p $pid $prog - ;; - restart|force-reload|reload) - restart - ;; - condrestart|try-restart) - if [ -f $lockfile ]; then - restart - fi - ;; - *) - echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|force-reload|try-restart}" - RETVAL=1 - ;; -esac - -exit $RETVAL diff --git a/ddclient.rwtab b/ddclient.rwtab deleted file mode 100644 index 927514c..0000000 --- a/ddclient.rwtab +++ /dev/null @@ -1 +0,0 @@ -files /var/cache/ddclient/ddclient.cache diff --git a/ddclient.service b/ddclient.service deleted file mode 100644 index 3bdd806..0000000 --- a/ddclient.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=A Perl Client Used To Update Dynamic DNS -After=syslog.target network.target nss-lookup.target - -[Service] -User=ddclient -Group=ddclient -Type=forking -PIDFile=/var/run/ddclient/ddclient.pid -EnvironmentFile=-/etc/sysconfig/ddclient -ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache -ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS - -[Install] -WantedBy=multi-user.target diff --git a/ddclient.spec b/ddclient.spec deleted file mode 100644 index 004465c..0000000 --- a/ddclient.spec +++ /dev/null @@ -1,266 +0,0 @@ -# This macro only defined by default around Fedora 18 time -%{!?_tmpfilesdir:%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d} - -Summary: Client to update dynamic DNS host entries -Name: ddclient -Version: 3.8.1 -Release: 9%{?dist} -License: GPLv2+ -Group: System Environment/Daemons -URL: http://ddclient.sourceforge.net/ -Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 -Source1: ddclient.rwtab -Source2: ddclient.service -Source3: ddclient.sysconfig -Source4: ddclient.NetworkManager -Source5: ddclient-tmpfiles.conf -Source6: ddclient.initscript -BuildArch: noarch -Requires(pre): shadow-utils -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -BuildRequires: systemd-units -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -%else -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/service, /sbin/chkconfig -Requires(postun): /sbin/service -%endif -Requires: perl(Digest::SHA1), perl(IO::Socket::SSL) -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%description -ddclient is a Perl client used to update dynamic DNS entries for accounts -on many different dynamic DNS services. Features include: Operating as a -daemon, manual and automatic updates, static and dynamic updates, optimized -updates for multiple addresses, MX, wildcards, abuse avoidance, retrying -the failed updates and sending update status to syslog and through e-mail. - -%prep -%setup -q -# Move pid file location for running as non-root. -sed -e 's|/var/run/ddclient.pid|%{_localstatedir}/run/%{name}/%{name}.pid|' -i sample-etc_ddclient.conf - -# Send less mail by default, eg. not on every shutdown. -sed -e 's|^mail=|#mail=|' -i sample-etc_ddclient.conf - -# http://sourceforge.net/forum/forum.php?forum_id=706446 -sed -e 's|"3\.7\.1"|"3.7.2"|' -i %{name} - -# Backwards compatibility from pre-3.6.6-1 -sed -e 's|/etc/ddclient/|%{_sysconfdir}/|' -i %{name} - -%build - -%install -rm -rf $RPM_BUILD_ROOT - -install -D -p -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} -install -D -p -m 600 sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf -install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/%{name} -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service -install -D -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf -%else -install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} -%endif -install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} -%if 0%{?fedora}%{?rhel} > 4 -install -D -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} -%endif -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} -touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache - -# Correct permissions for later usage in %doc -chmod 644 sample-* - -%clean -rm -rf $RPM_BUILD_ROOT - -%pre -getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name} -getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Dynamic DNS Client" %{name} -exit 0 - -%post -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%if 0%{?fedora} >= 18 - %systemd_post %{name}.service -%else -if [ $1 -eq 1 ]; then - # Package install, not upgrade - /bin/systemctl daemon-reload > /dev/null 2>&1 || : -fi -%endif -%else -/sbin/chkconfig --add %{name} -%endif - -%preun -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%if 0%{?fedora} >= 18 - %systemd_preun %{name}.service -%else -# Work around RHBZ #655116 -if [ $1 -eq 0 ]; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : -fi -%endif -%else -if [ $1 -eq 0 ]; then - /sbin/service %{name} stop > /dev/null 2>&1 || : - /sbin/chkconfig --del %{name} -fi -%endif - -%postun -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%if 0%{?fedora} >= 18 - %systemd_postun_with_restart %{name}.service -%else -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ]; then - # Package upgrade, not uninstall - /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : -fi -%endif -%else -if [ $1 -ne 0 ]; then - /sbin/service %{name} condrestart > /dev/null 2>&1 || : -fi -%endif - -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%triggerun -- ddclient < 3.8.1-1 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply ddclient -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save ddclient >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del %{name} > /dev/null 2>&1 || : -/bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || : -%endif - -%files -%defattr(-,root,root,-) -%doc README* COPYING COPYRIGHT Changelog sample-etc_ppp_ip-up.local -%doc sample-etc_dhclient-exit-hooks sample-etc_cron.d_ddclient -%doc sample-ddclient-wrapper.sh sample-etc_dhcpc_dhcpcd-eth0.exe -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%{_unitdir}/%{name}.service -%{_tmpfilesdir}/%{name}.conf -%ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ -%else -%{_sysconfdir}/rc.d/init.d/%{name} -%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ -%endif -%if 0%{?fedora}%{?rhel} > 4 -%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} -%endif -%attr(600,%{name},%{name}) %config(noreplace) %{_sysconfdir}/%{name}.conf -%config(noreplace) %{_sysconfdir}/rwtab.d/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%{_sbindir}/%{name} -%attr(0700,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}/ -%attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache - -%changelog -* Wed Dec 25 2013 Robert Scheck 3.8.1-9 -- Use the new systemd macros (#850084, thanks to Lukáš Nykrýn) -- Adapted the spec file to handle systemd and SysV initscripts - -* Sat Aug 10 2013 Paul Howarth - 3.8.1-8 -- BR: systemd-units for %%{_unitdir} macro definition (fixes FTBFS #992118) -- Put tmpfiles config in %%{_tmpfilesdir}, not under /etc -- Package installation creates %%{_localstatedir}/run/%%{name} (#909272, #957355) -- Service files are not executable -- Require perl(Digest::SHA1) (#909258) -- Wait for name resolution to be available before starting (#905553) - -* Sat Aug 03 2013 Fedora Release Engineering - 3.8.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 17 2013 Petr Pisar - 3.8.1-6 -- Perl 5.18 rebuild - -* Wed Feb 13 2013 Fedora Release Engineering - 3.8.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 3.8.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue May 15 2012 Jon Ciesla - 3.8.1-3 -- Add ghost to /var/run/ddclient - -* Mon May 14 2012 Jon Ciesla - 3.8.1-2 -- Add tmpfiles.d. - -* Thu Mar 29 2012 Jon Ciesla - 3.8.1-1 -- Latest upstream. -- Migrate to systemd, 718756. - -* Fri Jan 13 2012 Fedora Release Engineering - 3.8.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Feb 10 2011 Robert Scheck 3.8.0-4 -- Replaced Requires(hint) by Requires as RPM 4.9 dropped support - -* Tue Feb 08 2011 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sat May 29 2010 Robert Scheck 3.8.0-2 -- Fixed wrong permissions at NetworkManager dispatcher (#506286) -- Updated %%description to be more verbose and detailed (#588053) - -* Sat May 01 2010 Robert Scheck 3.8.0-1 -- Upgrade to 3.8.0 and several spec file cleanups (#551906) -- Rewrote initscript to match LSB standards and headers (#246903) -- Added dispatcher to NetworkManager to avoid failures (#506286) - -* Fri Jul 24 2009 Fedora Release Engineering - 3.7.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Tue Feb 24 2009 Fedora Release Engineering - 3.7.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Jan 23 2008 Robert Scheck 3.7.3-1 -- Upgrade to 3.7.3 (#429438) -- Updated the license tag according to the guidelines - -* Thu Jun 14 2007 Ville Skyttä - 3.7.2-1 -- 3.7.2. -- Tweak default config to send less mail (eg. not on every shutdown). - -* Fri Mar 2 2007 Ville Skyttä - 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ä - 3.6.6-1 -- 3.6.6, update URLs (#165272). -- Restart service on future package upgrades (still manually needed this time). -- Don't set service to autostart on "chkconfig --add". -- Fix sysconfig/ddclient permissions. -- Drop non-useful samples. - -* Wed Apr 6 2005 Michael Schwendt - 3.6.3-5 -- rebuilt - -* Mon Apr 05 2004 Toshio Kuratomi - 0:3.6.3-0.fdr.4.fc1 -- Fix %%doc %%attr ownership -- Touch the cache file in %%post - -* Mon Sep 08 2003 Michael Schwendt - 0:3.6.3-0.fdr.3 -- Add own Fedora-style initscript and /etc/sysconfig/ddclient file. -- Fix file permissions of config file and example files. -- Since ddclient.cache.patch uses hardcoded /var, don't use - %%_localstatedir in spec file either. - -* Sun Sep 07 2003 Thomas Vander Stichele -- 0:3.6.3-0.fdr.2: fixed ghostness of cache file diff --git a/ddclient.sysconfig b/ddclient.sysconfig deleted file mode 100644 index 97de4c1..0000000 --- a/ddclient.sysconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -*- sh -*- -# ddclient service options, see ddclient --help for what's available. -# -DDCLIENT_OPTIONS="-daemon 300" diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..8d8263d --- /dev/null +++ b/dead.package @@ -0,0 +1,3 @@ +2014-12-17: Retired orphaned package, because it was orphaned for more than six weeks. +Reference: https://fedorahosted.org/epel/ticket/7 + diff --git a/sources b/sources deleted file mode 100644 index 61c72ba..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -7fa417bc65f8f0e6ce78418a4f631988 ddclient-3.8.1.tar.bz2 From 8d86d8d19b63230f22d8646e033bf9ced184817a Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sat, 2 Apr 2016 20:26:31 -0400 Subject: [PATCH 15/16] Revert "2014-12-17: Retired orphaned package, because it was orphaned for more than six weeks." This reverts commit 0fba70ef8caf2ed16ad442ed4985b6fcc200a121. --- .gitignore | 1 + ddclient-tmpfiles.conf | 1 + ddclient.NetworkManager | 15 +++ ddclient.initscript | 92 ++++++++++++++ ddclient.rwtab | 1 + ddclient.service | 15 +++ ddclient.spec | 266 ++++++++++++++++++++++++++++++++++++++++ ddclient.sysconfig | 4 + dead.package | 3 - sources | 1 + 10 files changed, 396 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 ddclient-tmpfiles.conf create mode 100644 ddclient.NetworkManager create mode 100755 ddclient.initscript create mode 100644 ddclient.rwtab create mode 100644 ddclient.service create mode 100644 ddclient.spec create mode 100644 ddclient.sysconfig delete mode 100644 dead.package create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f60290 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ddclient-3.8.1.tar.bz2 diff --git a/ddclient-tmpfiles.conf b/ddclient-tmpfiles.conf new file mode 100644 index 0000000..881d82f --- /dev/null +++ b/ddclient-tmpfiles.conf @@ -0,0 +1 @@ +d /var/run/ddclient 0755 ddclient ddclient - diff --git a/ddclient.NetworkManager b/ddclient.NetworkManager new file mode 100644 index 0000000..df7abf5 --- /dev/null +++ b/ddclient.NetworkManager @@ -0,0 +1,15 @@ +#!/bin/sh + +export LC_ALL=C + +if [ "$2" = "down" ]; then + /sbin/ip route ls | grep -q '^default' || { + [ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || : + } && { :; } +fi + +if [ "$2" = "up" ]; then + /sbin/ip -o route show dev "$1" | grep -q '^default' && { + /sbin/chkconfig ddclient && /sbin/service ddclient start || : + } || { :; } +fi diff --git a/ddclient.initscript b/ddclient.initscript new file mode 100755 index 0000000..1271d2c --- /dev/null +++ b/ddclient.initscript @@ -0,0 +1,92 @@ +#!/bin/bash +# +# ddclient Client to update dynamic DNS host entries +# +# chkconfig: - 65 35 +# description: ddclient is a Perl client used to update dynamic DNS \ +# entries for accounts on many dynamic DNS services. +# processname: /usr/sbin/ddclient +# config: /etc/ddclient.conf +# pidfile: /var/run/ddclient/ddclient.pid + +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $network $syslog +# Should-Start: $named +# Should-Stop: $named +# Short-Description: Client to update dynamic DNS host entries +# Description: ddclient is a Perl client used to update dynamic DNS +# entries for accounts on many dynamic DNS services. +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -f /etc/sysconfig/ddclient ]; then + . /etc/sysconfig/ddclient +fi + +exec=/usr/sbin/ddclient +prog=`basename $exec` +lockfile=/var/lock/subsys/$prog +cache=/var/cache/ddclient/ddclient.cache +pid=/var/run/ddclient/ddclient.pid +RETVAL=0 + +start() { + # Check that networking is up. + [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0 + + echo -n $"Starting $prog: " + [ -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 + + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pid $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + + return $RETVAL +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status -p $pid $prog + ;; + restart|force-reload|reload) + restart + ;; + condrestart|try-restart) + if [ -f $lockfile ]; then + restart + fi + ;; + *) + echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|force-reload|try-restart}" + RETVAL=1 + ;; +esac + +exit $RETVAL diff --git a/ddclient.rwtab b/ddclient.rwtab new file mode 100644 index 0000000..927514c --- /dev/null +++ b/ddclient.rwtab @@ -0,0 +1 @@ +files /var/cache/ddclient/ddclient.cache diff --git a/ddclient.service b/ddclient.service new file mode 100644 index 0000000..3bdd806 --- /dev/null +++ b/ddclient.service @@ -0,0 +1,15 @@ +[Unit] +Description=A Perl Client Used To Update Dynamic DNS +After=syslog.target network.target nss-lookup.target + +[Service] +User=ddclient +Group=ddclient +Type=forking +PIDFile=/var/run/ddclient/ddclient.pid +EnvironmentFile=-/etc/sysconfig/ddclient +ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache +ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/ddclient.spec b/ddclient.spec new file mode 100644 index 0000000..004465c --- /dev/null +++ b/ddclient.spec @@ -0,0 +1,266 @@ +# This macro only defined by default around Fedora 18 time +%{!?_tmpfilesdir:%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d} + +Summary: Client to update dynamic DNS host entries +Name: ddclient +Version: 3.8.1 +Release: 9%{?dist} +License: GPLv2+ +Group: System Environment/Daemons +URL: http://ddclient.sourceforge.net/ +Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 +Source1: ddclient.rwtab +Source2: ddclient.service +Source3: ddclient.sysconfig +Source4: ddclient.NetworkManager +Source5: ddclient-tmpfiles.conf +Source6: ddclient.initscript +BuildArch: noarch +Requires(pre): shadow-utils +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +BuildRequires: systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service +%endif +Requires: perl(Digest::SHA1), perl(IO::Socket::SSL) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +ddclient is a Perl client used to update dynamic DNS entries for accounts +on many different dynamic DNS services. Features include: Operating as a +daemon, manual and automatic updates, static and dynamic updates, optimized +updates for multiple addresses, MX, wildcards, abuse avoidance, retrying +the failed updates and sending update status to syslog and through e-mail. + +%prep +%setup -q +# Move pid file location for running as non-root. +sed -e 's|/var/run/ddclient.pid|%{_localstatedir}/run/%{name}/%{name}.pid|' -i sample-etc_ddclient.conf + +# Send less mail by default, eg. not on every shutdown. +sed -e 's|^mail=|#mail=|' -i sample-etc_ddclient.conf + +# http://sourceforge.net/forum/forum.php?forum_id=706446 +sed -e 's|"3\.7\.1"|"3.7.2"|' -i %{name} + +# Backwards compatibility from pre-3.6.6-1 +sed -e 's|/etc/ddclient/|%{_sysconfdir}/|' -i %{name} + +%build + +%install +rm -rf $RPM_BUILD_ROOT + +install -D -p -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} +install -D -p -m 600 sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf +install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/%{name} +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service +install -D -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf +%else +install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} +%endif +install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} +%if 0%{?fedora}%{?rhel} > 4 +install -D -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{cache,run}/%{name} +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache + +# Correct permissions for later usage in %doc +chmod 644 sample-* + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name} +getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Dynamic DNS Client" %{name} +exit 0 + +%post +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +%if 0%{?fedora} >= 18 + %systemd_post %{name}.service +%else +if [ $1 -eq 1 ]; then + # Package install, not upgrade + /bin/systemctl daemon-reload > /dev/null 2>&1 || : +fi +%endif +%else +/sbin/chkconfig --add %{name} +%endif + +%preun +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +%if 0%{?fedora} >= 18 + %systemd_preun %{name}.service +%else +# Work around RHBZ #655116 +if [ $1 -eq 0 ]; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : + /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : +fi +%endif +%else +if [ $1 -eq 0 ]; then + /sbin/service %{name} stop > /dev/null 2>&1 || : + /sbin/chkconfig --del %{name} +fi +%endif + +%postun +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +%if 0%{?fedora} >= 18 + %systemd_postun_with_restart %{name}.service +%else +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ]; then + # Package upgrade, not uninstall + /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi +%endif +%else +if [ $1 -ne 0 ]; then + /sbin/service %{name} condrestart > /dev/null 2>&1 || : +fi +%endif + +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +%triggerun -- ddclient < 3.8.1-1 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply ddclient +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save ddclient >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del %{name} > /dev/null 2>&1 || : +/bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || : +%endif + +%files +%defattr(-,root,root,-) +%doc README* COPYING COPYRIGHT Changelog sample-etc_ppp_ip-up.local +%doc sample-etc_dhclient-exit-hooks sample-etc_cron.d_ddclient +%doc sample-ddclient-wrapper.sh sample-etc_dhcpc_dhcpcd-eth0.exe +%if 0%{?fedora} > 14 || 0%{?rhel} > 6 +%{_unitdir}/%{name}.service +%{_tmpfilesdir}/%{name}.conf +%ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ +%else +%{_sysconfdir}/rc.d/init.d/%{name} +%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/ +%endif +%if 0%{?fedora}%{?rhel} > 4 +%{_sysconfdir}/NetworkManager/dispatcher.d/50-%{name} +%endif +%attr(600,%{name},%{name}) %config(noreplace) %{_sysconfdir}/%{name}.conf +%config(noreplace) %{_sysconfdir}/rwtab.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%{_sbindir}/%{name} +%attr(0700,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}/ +%attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache + +%changelog +* Wed Dec 25 2013 Robert Scheck 3.8.1-9 +- Use the new systemd macros (#850084, thanks to Lukáš Nykrýn) +- Adapted the spec file to handle systemd and SysV initscripts + +* Sat Aug 10 2013 Paul Howarth - 3.8.1-8 +- BR: systemd-units for %%{_unitdir} macro definition (fixes FTBFS #992118) +- Put tmpfiles config in %%{_tmpfilesdir}, not under /etc +- Package installation creates %%{_localstatedir}/run/%%{name} (#909272, #957355) +- Service files are not executable +- Require perl(Digest::SHA1) (#909258) +- Wait for name resolution to be available before starting (#905553) + +* Sat Aug 03 2013 Fedora Release Engineering - 3.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 3.8.1-6 +- Perl 5.18 rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 3.8.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 3.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 15 2012 Jon Ciesla - 3.8.1-3 +- Add ghost to /var/run/ddclient + +* Mon May 14 2012 Jon Ciesla - 3.8.1-2 +- Add tmpfiles.d. + +* Thu Mar 29 2012 Jon Ciesla - 3.8.1-1 +- Latest upstream. +- Migrate to systemd, 718756. + +* Fri Jan 13 2012 Fedora Release Engineering - 3.8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Feb 10 2011 Robert Scheck 3.8.0-4 +- Replaced Requires(hint) by Requires as RPM 4.9 dropped support + +* Tue Feb 08 2011 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat May 29 2010 Robert Scheck 3.8.0-2 +- Fixed wrong permissions at NetworkManager dispatcher (#506286) +- Updated %%description to be more verbose and detailed (#588053) + +* Sat May 01 2010 Robert Scheck 3.8.0-1 +- Upgrade to 3.8.0 and several spec file cleanups (#551906) +- Rewrote initscript to match LSB standards and headers (#246903) +- Added dispatcher to NetworkManager to avoid failures (#506286) + +* Fri Jul 24 2009 Fedora Release Engineering - 3.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 3.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Jan 23 2008 Robert Scheck 3.7.3-1 +- Upgrade to 3.7.3 (#429438) +- Updated the license tag according to the guidelines + +* Thu Jun 14 2007 Ville Skyttä - 3.7.2-1 +- 3.7.2. +- Tweak default config to send less mail (eg. not on every shutdown). + +* Fri Mar 2 2007 Ville Skyttä - 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ä - 3.6.6-1 +- 3.6.6, update URLs (#165272). +- Restart service on future package upgrades (still manually needed this time). +- Don't set service to autostart on "chkconfig --add". +- Fix sysconfig/ddclient permissions. +- Drop non-useful samples. + +* Wed Apr 6 2005 Michael Schwendt - 3.6.3-5 +- rebuilt + +* Mon Apr 05 2004 Toshio Kuratomi - 0:3.6.3-0.fdr.4.fc1 +- Fix %%doc %%attr ownership +- Touch the cache file in %%post + +* Mon Sep 08 2003 Michael Schwendt - 0:3.6.3-0.fdr.3 +- Add own Fedora-style initscript and /etc/sysconfig/ddclient file. +- Fix file permissions of config file and example files. +- Since ddclient.cache.patch uses hardcoded /var, don't use + %%_localstatedir in spec file either. + +* Sun Sep 07 2003 Thomas Vander Stichele +- 0:3.6.3-0.fdr.2: fixed ghostness of cache file diff --git a/ddclient.sysconfig b/ddclient.sysconfig new file mode 100644 index 0000000..97de4c1 --- /dev/null +++ b/ddclient.sysconfig @@ -0,0 +1,4 @@ +# -*- sh -*- +# ddclient service options, see ddclient --help for what's available. +# +DDCLIENT_OPTIONS="-daemon 300" diff --git a/dead.package b/dead.package deleted file mode 100644 index 8d8263d..0000000 --- a/dead.package +++ /dev/null @@ -1,3 +0,0 @@ -2014-12-17: Retired orphaned package, because it was orphaned for more than six weeks. -Reference: https://fedorahosted.org/epel/ticket/7 - diff --git a/sources b/sources new file mode 100644 index 0000000..61c72ba --- /dev/null +++ b/sources @@ -0,0 +1 @@ +7fa417bc65f8f0e6ce78418a4f631988 ddclient-3.8.1.tar.bz2 From f17012b62a793b9937c33d683f8cfa4d5b3eb8bb Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 3 Apr 2016 09:49:17 -0400 Subject: [PATCH 16/16] No-change rebuild to restore package --- ddclient.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ddclient.spec b/ddclient.spec index 004465c..2dfa6a6 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -4,7 +4,7 @@ Summary: Client to update dynamic DNS host entries Name: ddclient Version: 3.8.1 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://ddclient.sourceforge.net/ @@ -169,6 +169,9 @@ fi %attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache %changelog +* Sun Apr 03 2016 Scott Talbert - 3.8.1-10 +- No-change rebuild to restore package + * Wed Dec 25 2013 Robert Scheck 3.8.1-9 - Use the new systemd macros (#850084, thanks to Lukáš Nykrýn) - Adapted the spec file to handle systemd and SysV initscripts