summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-01-14 16:16:26 -0500
committerMichael Orlitzky <mjo@gentoo.org>2017-01-14 16:52:54 -0500
commit5cadafb0174f267b92e5ea9e2cc90c57352e14e7 (patch)
tree8266a254a0ab73ee6ff4fd30fe2c02916ceb14b0 /net-dns/updatedd
parentapp-admin/kpcli: Add missing virtual dependency (diff)
downloadgentoo-5cadafb0174f267b92e5ea9e2cc90c57352e14e7.tar.gz
gentoo-5cadafb0174f267b92e5ea9e2cc90c57352e14e7.tar.bz2
gentoo-5cadafb0174f267b92e5ea9e2cc90c57352e14e7.zip
net-dns/updatedd: new revision to set timeouts for ipserv.pl.
This new revision adds a patch by Maciej S. Szmigiero that sets timeouts on the socket used by ipserv.pl. Doing so prevents updatedd from hanging when the other end of the socket goes AWOL. As a consequence, dev-perl/IO-Socket-Timeout was added to RDEPEND. The "~arm" and "~ppc" keywords had to be dropped to satisfy that new dependency. Gentoo-Bug: 605626 Package-Manager: portage-2.3.0
Diffstat (limited to 'net-dns/updatedd')
-rw-r--r--net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch36
-rw-r--r--net-dns/updatedd/updatedd-2.6-r5.ebuild29
2 files changed, 65 insertions, 0 deletions
diff --git a/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch b/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch
new file mode 100644
index 000000000000..dbcf4c7c7c79
--- /dev/null
+++ b/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch
@@ -0,0 +1,36 @@
+Patch by Maciej S. Szmigiero to prevent ipserv from hanging when the
+other end of the connection goes AWOL.
+
+Gentoo-Bug: 602216
+
+--- a/scripts/ipserv.pl.in 2005-03-06 22:21:36.000000000 +0100
++++ b/scripts/ipserv.pl.in 2017-01-14 19:39:25.583277538 +0100
+@@ -20,6 +20,7 @@
+
+ use strict;
+ use IO::Socket;
++use IO::Socket::Timeout qw(IO::Socket::INET);
+
+ my $ipv4_rex = qr/(?:\d{1,3}\.){3}\d{1,3}/imosx;
+
+@@ -128,7 +129,8 @@
+ $socket = IO::Socket::INET->new(PeerAddr => $target->{url},
+ PeerPort => $target->{port},
+ Proto => "tcp",
+- Type => SOCK_STREAM)
++ Type => SOCK_STREAM,
++ Timeout => 2 * 60)
+ or $retries--;
+
+ } while(!defined($socket) && $retries != 0);
+@@ -137,6 +139,10 @@
+ die "could not connect to $target->{url}: $!";
+ }
+
++ IO::Socket::Timeout->enable_timeouts_on($socket);
++ $socket->read_timeout(2 * 60);
++ $socket->write_timeout(2 * 60);
++
+ if(defined($target->{request})) {
+ print($socket $target->{request});
+ }
diff --git a/net-dns/updatedd/updatedd-2.6-r5.ebuild b/net-dns/updatedd/updatedd-2.6-r5.ebuild
new file mode 100644
index 000000000000..24685ac55356
--- /dev/null
+++ b/net-dns/updatedd/updatedd-2.6-r5.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="Dynamic DNS client with plugins for several dynamic dns services"
+HOMEPAGE="https://savannah.nongnu.org/projects/updatedd/"
+SRC_URI="https://savannah.nongnu.org/download/updatedd/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ dev-perl/IO-Socket-Timeout"
+
+PATCHES=(
+ "${FILESDIR}/${P}-options.patch"
+ "${FILESDIR}/fix-ovh-DYNDNSHOST.patch"
+ "${FILESDIR}/respect-docdir.patch"
+ "${FILESDIR}/set-socket-timeouts-for-ipserv.patch"
+)
+
+src_configure() {
+ econf --disable-static --docdir="/usr/share/doc/${PF}"
+}