summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2011-11-13 16:42:02 +0000
committerAaron W. Swenson <titanofold@gentoo.org>2011-11-13 16:42:02 +0000
commit8093f485dc32ca6110e8e759cb4f7b8c2e1cc48d (patch)
tree14ef96c96b7d48bf953b16fb328e92ed57461f48 /net-dns
parentFix init.d typo #390381 by Helmut Jarausch. (diff)
downloadgentoo-2-8093f485dc32ca6110e8e759cb4f7b8c2e1cc48d.tar.gz
gentoo-2-8093f485dc32ca6110e8e759cb4f7b8c2e1cc48d.tar.bz2
gentoo-2-8093f485dc32ca6110e8e759cb4f7b8c2e1cc48d.zip
Fixes bug 386161. Initscript now creates (/var)?/run/ddclient folder for those on tmpfs.
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/ddclient/ChangeLog10
-rw-r--r--net-dns/ddclient/ddclient-3.8.1-r4.ebuild56
-rw-r--r--net-dns/ddclient/files/cmd-over-cfg.patch11
-rw-r--r--net-dns/ddclient/files/ddclient.confd-r12
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r358
5 files changed, 136 insertions, 1 deletions
diff --git a/net-dns/ddclient/ChangeLog b/net-dns/ddclient/ChangeLog
index 2dde8e3da152..b2e60e1c0cc5 100644
--- a/net-dns/ddclient/ChangeLog
+++ b/net-dns/ddclient/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-dns/ddclient
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/ChangeLog,v 1.49 2011/10/18 21:01:33 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/ChangeLog,v 1.50 2011/11/13 16:42:02 titanofold Exp $
+
+*ddclient-3.8.1-r4 (13 Nov 2011)
+
+ 13 Nov 2011; Aaron W. Swenson <titanofold@gentoo.org>
+ +ddclient-3.8.1-r4.ebuild, +files/cmd-over-cfg.patch,
+ +files/ddclient.confd-r1, +files/ddclient.initd-r3:
+ Fixes bug 386161. Initscript now creates (/var)?/run/ddclient folder for
+ those on tmpfs.
18 Oct 2011; Jeroen Roovers <jer@gentoo.org> ddclient-3.8.1-r3.ebuild:
Stable for HPPA (bug #382717).
diff --git a/net-dns/ddclient/ddclient-3.8.1-r4.ebuild b/net-dns/ddclient/ddclient-3.8.1-r4.ebuild
new file mode 100644
index 000000000000..4772aa4cfbb6
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.1-r4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/ddclient-3.8.1-r4.ebuild,v 1.1 2011/11/13 16:42:02 titanofold Exp $
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ dev-perl/Digest-SHA1
+ dev-perl/IO-Socket-SSL
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ # Remove pid line, because it is specified in /etc/init.d/ddclient
+ ebegin "Removing PID setup from ${PN}.conf"
+ if ! sed '/^pid/d' -i "sample-etc_${PN}.conf"; then
+ eerror "Failed to remove pid from /etc/${PN}/${PN}.conf"
+ fi
+ eend $?
+
+ use hardened && epatch "${FILESDIR}/iproute2.patch"
+
+ epatch "${FILESDIR}/cmd-over-cfg.patch"
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+ keepdir /var/cache/${PN}
+ fowners -R ${PN}:${PN} /var/cache/${PN}
+
+ insinto /etc/${PN}
+ insopts -m 0600 -o ${PN} -g ${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+ fowners -R ${PN}:${PN} /etc/${PN}
+}
diff --git a/net-dns/ddclient/files/cmd-over-cfg.patch b/net-dns/ddclient/files/cmd-over-cfg.patch
new file mode 100644
index 000000000000..9033873fde74
--- /dev/null
+++ b/net-dns/ddclient/files/cmd-over-cfg.patch
@@ -0,0 +1,11 @@
+--- ddclient.old 2011-11-13 10:14:59.957846596 -0500
++++ ddclient 2011-11-13 10:18:33.864245944 -0500
+@@ -773,7 +773,7 @@
+ foreach my $h (sort keys %config) {
+ next if $config{$h}{'protocol'} ne lc($s);
+ $examined{$h} = 1;
+- my $use = $config{$h}{'use'} || opt('use');
++ my $use = opt('use') || $config{$h}{'use'};
+ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use};
+ # bug #13: we should only do this once
+ # use isn't enough, we have to save the origin to.
diff --git a/net-dns/ddclient/files/ddclient.confd-r1 b/net-dns/ddclient/files/ddclient.confd-r1
new file mode 100644
index 000000000000..69ad0eeff87d
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.confd-r1
@@ -0,0 +1,2 @@
+# No need to specify a pid in /etc/ddclient/ddclient.conf
+#PIDFILE=/var/run/ddclient/ddclient.pid
diff --git a/net-dns/ddclient/files/ddclient.initd-r3 b/net-dns/ddclient/files/ddclient.initd-r3
new file mode 100644
index 000000000000..2fe7c5bd4f75
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r3
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/files/ddclient.initd-r3,v 1.1 2011/11/13 16:42:02 titanofold Exp $
+
+if [ -d /run ] ; then
+ PIDFILE=${PIDFILE:-/run/ddclient/ddclient.pid}
+else
+ PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+fi
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then
+ eerror "${conf} must not be world or group readable. Try:"
+ eerror " chmod 600 ${conf}"
+ eerror " chown ddclient:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "${conf} is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ local piddir=$(dirname ${PIDFILE})
+ if [ ! -d ${piddir} ] ; then
+ ebegin "Making ${piddir}"
+ mkdir -p ${piddir}
+ eend $?
+ ebegin "Changing permissions of ${piddir}"
+ chown ddclient:ddclient ${piddir}
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \
+ --name ddclient --pidfile ${PIDFILE} -- -pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE}
+ eend $?
+}