diff options
author | Aaron W. Swenson <titanofold@gentoo.org> | 2011-08-13 00:47:23 +0000 |
---|---|---|
committer | Aaron W. Swenson <titanofold@gentoo.org> | 2011-08-13 00:47:23 +0000 |
commit | 287c881e242327b7405e2d5ab63605d5af3e8a19 (patch) | |
tree | d03f23bcf81bd4019ca92c6a31d4568a7fc24271 /net-dns | |
parent | Based on 2.6.32.44 + genpatches-2.6.32-40 + grsecurity-2.2.2-2.6.32.44-201108... (diff) | |
download | gentoo-2-287c881e242327b7405e2d5ab63605d5af3e8a19.tar.gz gentoo-2-287c881e242327b7405e2d5ab63605d5af3e8a19.tar.bz2 gentoo-2-287c881e242327b7405e2d5ab63605d5af3e8a19.zip |
Fixes bug 258343
(Portage version: 2.1.10.3/cvs/Linux i686)
Diffstat (limited to 'net-dns')
-rw-r--r-- | net-dns/ddclient/ChangeLog | 8 | ||||
-rw-r--r-- | net-dns/ddclient/ddclient-3.8.1-r1.ebuild | 70 | ||||
-rw-r--r-- | net-dns/ddclient/files/iproute2.patch | 30 | ||||
-rw-r--r-- | net-dns/ddclient/metadata.xml | 8 |
4 files changed, 113 insertions, 3 deletions
diff --git a/net-dns/ddclient/ChangeLog b/net-dns/ddclient/ChangeLog index a808a8f513c7..0a3218fffc40 100644 --- a/net-dns/ddclient/ChangeLog +++ b/net-dns/ddclient/ChangeLog @@ -1,6 +1,12 @@ # 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.41 2011/08/12 12:29:42 titanofold Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/ChangeLog,v 1.42 2011/08/13 00:47:23 titanofold Exp $ + +*ddclient-3.8.1-r1 (13 Aug 2011) + + 13 Aug 2011; Aaron W. Swenson <titanofold@gentoo.org> +files/iproute2.patch, + +ddclient-3.8.1-r1.ebuild, metadata.xml: + Fixes bug 258343 *ddclient-3.8.1 (12 Aug 2011) diff --git a/net-dns/ddclient/ddclient-3.8.1-r1.ebuild b/net-dns/ddclient/ddclient-3.8.1-r1.ebuild new file mode 100644 index 000000000000..211a157a9a47 --- /dev/null +++ b/net-dns/ddclient/ddclient-3.8.1-r1.ebuild @@ -0,0 +1,70 @@ +# 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-r1.ebuild,v 1.1 2011/08/13 00:47:23 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 +ssl" + +RDEPEND=">=dev-lang/perl-5.1 + hardened? ( sys-apps/iproute2 ) + ssl? ( dev-perl/IO-Socket-SSL ) +" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + # Remove pid line, because it is specified in /etc/conf.d/ddclient + einfo "Applying PID setup" + if ! sed '/^pid/d' -i "sample-etc_${PN}.conf"; then + eerror "Failed to remove pid from /etc/${PN}/${PN}.conf" + eerror "Please set the PID in /etc/conf.d/${PN}, not /etc/${PN}/${PN}.conf" + fi + + use hardened && epatch "${FILESDIR}/iproute2.patch" + + if ! use ssl; then + einfo "Disabling SSL per your USE flags" + sed '/^ssl/,/ssl-library$/d' -i "sample-etc_${PN}.conf" || \ + eerror "Failed to remove ssl from /etc/$PN/$PN.conf" + fi +} + +src_install() { + dosbin ${PN} + dodoc Change* COPYRIGHT README* RELEASENOTE sample* + + newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + + keepdir /var/{cache,run}/${PN} + fowners -R ${PN}:${PN} /var/{cache,run}/${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} +} + +pkg_postinst() { + use ssl && return + ewarn + ewarn "$PN will not have support for ssl, which means your dynamic DNS account" + ewarn "information -- including your password -- will be sent over the Internet in the" + ewarn "clear. To secure your information, add 'ssl' to your USEflags," + ewarn "emerge -N ddclient, and add 'ssl=yes' to /etc/$PN/$PN.conf" + ewarn +} diff --git a/net-dns/ddclient/files/iproute2.patch b/net-dns/ddclient/files/iproute2.patch new file mode 100644 index 000000000000..f81dd8c00d82 --- /dev/null +++ b/net-dns/ddclient/files/iproute2.patch @@ -0,0 +1,30 @@ +diff -u a/ddclient b/ddclient +--- a/ddclient 2011-07-11 17:04:21.000000000 -0400 ++++ b/ddclient 2011-08-12 20:13:15.980466303 -0400 +@@ -588,7 +588,7 @@ + [ "ip", "=s", "-ip address : set the IP address to 'address'" ], + "", + [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], +- [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], ++ [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ], + "", + [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], + [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], +@@ -1316,7 +1316,7 @@ + + { + local $opt{'use'} = 'if'; +- foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { ++ foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) { + $if =~ s/:?\s.*//is; + local $opt{'if'} = $if; + printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); +@@ -1937,7 +1937,7 @@ + + } elsif ($use eq 'if') { + $skip = opt('if-skip', $h) || ''; +- $reply = `ifconfig $arg 2> /dev/null`; ++ $reply = `ip addr show $arg 2> /dev/null`; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { diff --git a/net-dns/ddclient/metadata.xml b/net-dns/ddclient/metadata.xml index 0e15846b229c..ca2709366ccd 100644 --- a/net-dns/ddclient/metadata.xml +++ b/net-dns/ddclient/metadata.xml @@ -3,7 +3,11 @@ <pkgmetadata> <herd>no-herd</herd> <maintainer> - <email>titanofold@gentoo.org</email> - <name>Aaron W. Swenson</name> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> </maintainer> +<use> + <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag> + <flag name="ssl">Connect to the server utilizing SSL</flag> +</use> </pkgmetadata> |