summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2010-08-15 20:33:23 +0000
committerAlin Năstac <mrness@gentoo.org>2010-08-15 20:33:23 +0000
commit0aa682f2a7179fce3e0a5fc16ccf5a91d55c323e (patch)
tree32d9a8e406332c837b0fefc99026c717ba650c2e /net-dialup
parentStable on amd64 wrt bug #307633 (diff)
downloadgentoo-2-0aa682f2a7179fce3e0a5fc16ccf5a91d55c323e.tar.gz
gentoo-2-0aa682f2a7179fce3e0a5fc16ccf5a91d55c323e.tar.bz2
gentoo-2-0aa682f2a7179fce3e0a5fc16ccf5a91d55c323e.zip
Mark version 1.2.4 as stable on amd64 and x86.
Add dnsretry USE flag and patch (#307489). Version bump. (Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/xl2tpd/ChangeLog13
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.2.6-as-needed.patch12
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.2.6-qa-fixes.patch25
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch40
-rw-r--r--net-dialup/xl2tpd/metadata.xml3
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild6
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.2.6.ebuild (renamed from net-dialup/xl2tpd/xl2tpd-1.1.12-r1.ebuild)28
7 files changed, 112 insertions, 15 deletions
diff --git a/net-dialup/xl2tpd/ChangeLog b/net-dialup/xl2tpd/ChangeLog
index b9436482ff24..749120c4eb6d 100644
--- a/net-dialup/xl2tpd/ChangeLog
+++ b/net-dialup/xl2tpd/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-dialup/xl2tpd
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/ChangeLog,v 1.19 2009/07/16 06:19:19 mrness Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/ChangeLog,v 1.20 2010/08/15 20:33:23 mrness Exp $
+
+*xl2tpd-1.2.6 (15 Aug 2010)
+
+ 15 Aug 2010; Alin Năstac <mrness@gentoo.org> -xl2tpd-1.1.12-r1.ebuild,
+ xl2tpd-1.2.4.ebuild, +xl2tpd-1.2.6.ebuild,
+ +files/xl2tpd-1.2.6-as-needed.patch, +files/xl2tpd-1.2.6-qa-fixes.patch,
+ +files/xl2tpd-dnsretry.patch, metadata.xml:
+ Mark version 1.2.4 as stable on amd64 and x86. Add dnsretry USE flag and
+ patch (#307489). Version bump.
*xl2tpd-1.2.4 (16 Jul 2009)
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.2.6-as-needed.patch b/net-dialup/xl2tpd/files/xl2tpd-1.2.6-as-needed.patch
new file mode 100644
index 000000000000..22d8d9beb145
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.2.6-as-needed.patch
@@ -0,0 +1,12 @@
+diff -Nru xl2tpd-1.2.6.orig/Makefile xl2tpd-1.2.6/Makefile
+--- xl2tpd-1.2.6.orig/Makefile 2010-05-10 22:35:43.000000000 +0200
++++ xl2tpd-1.2.6/Makefile 2010-08-15 21:56:20.000000000 +0200
+@@ -113,7 +113,7 @@
+
+ pfc:
+ $(CC) $(CFLAGS) -c contrib/pfc.c
+- $(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o
++ $(CC) $(LDFLAGS) -o pfc pfc.o -lpcap $(LDLIBS)
+
+ romfs:
+ $(ROMFSINST) /bin/$(EXEC)
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.2.6-qa-fixes.patch b/net-dialup/xl2tpd/files/xl2tpd-1.2.6-qa-fixes.patch
new file mode 100644
index 000000000000..fd37c03f6a8c
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.2.6-qa-fixes.patch
@@ -0,0 +1,25 @@
+diff -Nru xl2tpd-1.2.6.orig/call.c xl2tpd-1.2.6/call.c
+--- xl2tpd-1.2.6.orig/call.c 2010-05-10 22:35:43.000000000 +0200
++++ xl2tpd-1.2.6/call.c 2010-08-15 22:22:10.000000000 +0200
+@@ -682,15 +682,19 @@
+ */
+ if (gconfig.debug_tunnel)
+ {
++ struct in_addr inaddr;
++ inaddr.s_addr = addr;
+ l2tp_log (LOG_DEBUG,
+ "%s: allocating new tunnel for host %s, port %d.\n",
+- __FUNCTION__, IPADDY (addr), ntohs (port));
++ __FUNCTION__, IPADDY (inaddr), ntohs (port));
+ }
+ if (!(st = new_tunnel ()))
+ {
++ struct in_addr inaddr;
++ inaddr.s_addr = addr;
+ l2tp_log (LOG_WARNING,
+ "%s: unable to allocate new tunnel for host %s, port %d.\n",
+- __FUNCTION__, IPADDY (addr), ntohs (port));
++ __FUNCTION__, IPADDY (inaddr), ntohs (port));
+ return NULL;
+ };
+ st->peer.sin_family = AF_INET;
diff --git a/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch b/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch
new file mode 100644
index 000000000000..cf45194b8254
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch
@@ -0,0 +1,40 @@
+diff -Nru xl2tpd-1.2.6.orig/xl2tpd.c xl2tpd-1.2.6/xl2tpd.c
+--- xl2tpd-1.2.6.orig/xl2tpd.c 2010-05-10 22:35:43.000000000 +0200
++++ xl2tpd-1.2.6/xl2tpd.c 2010-08-15 22:02:14.000000000 +0200
+@@ -587,9 +587,33 @@
+ hp = gethostbyname (host);
+ if (!hp)
+ {
+- l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n",
+- host);
+- return NULL;
++ if ( lac->redial )
++ {
++ int imax=lac->rmax;
++ if ( lac->rmax == 0 )
++ imax = 1;
++ while ( imax > 0 )
++ {
++ hp = gethostbyname ( host );
++ if ( hp )
++ break;
++ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s. Trying to look again in %d seconds.\n", host, lac->rtimeout );
++ if ( lac->rtimeout > 0 )
++ sleep ( lac->rtimeout );
++ if ( lac->rmax > 0 )
++ imax--;
++ }
++ if ( ( imax == 0 ) && ( lac->rmax > 0 ) )
++ {
++ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s after %d tries. Lookup stops now.\n", host, lac->rmax );
++ return NULL;
++ }
++ }
++ else
++ {
++ l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n", host);
++ return NULL;
++ }
+ }
+ bcopy (hp->h_addr, &addr, hp->h_length);
+ /* Force creation of a new tunnel
diff --git a/net-dialup/xl2tpd/metadata.xml b/net-dialup/xl2tpd/metadata.xml
index eb06d7f5b8ea..3751bcc34a95 100644
--- a/net-dialup/xl2tpd/metadata.xml
+++ b/net-dialup/xl2tpd/metadata.xml
@@ -3,4 +3,7 @@
<pkgmetadata>
<herd>net-dialup</herd>
<longdescription>The Layer 2 Tunneling Protocol (L2TP) daemon mantained by Xelerance Corporation.</longdescription>
+ <use>
+ <flag name="dnsretry">Patch for host lookup retries, activated by redial feature</flag>
+ </use>
</pkgmetadata>
diff --git a/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild b/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild
index 26aa6ff80c9d..504b945108b8 100644
--- a/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild
+++ b/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild,v 1.1 2009/07/16 06:19:19 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/xl2tpd-1.2.4.ebuild,v 1.2 2010/08/15 20:33:23 mrness Exp $
EAPI="2"
@@ -12,7 +12,7 @@ SRC_URI="ftp://ftp.xelerance.com/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="amd64 ~ppc x86"
IUSE=""
DEPEND="net-libs/libpcap"
diff --git a/net-dialup/xl2tpd/xl2tpd-1.1.12-r1.ebuild b/net-dialup/xl2tpd/xl2tpd-1.2.6.ebuild
index 4e9d7ad0c9cc..526835dfb64a 100644
--- a/net-dialup/xl2tpd/xl2tpd-1.1.12-r1.ebuild
+++ b/net-dialup/xl2tpd/xl2tpd-1.2.6.ebuild
@@ -1,6 +1,8 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/xl2tpd-1.1.12-r1.ebuild,v 1.2 2008/08/17 15:25:13 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/xl2tpd-1.2.6.ebuild,v 1.1 2010/08/15 20:33:23 mrness Exp $
+
+EAPI="2"
inherit eutils flag-o-matic
@@ -10,20 +12,26 @@ SRC_URI="ftp://ftp.xelerance.com/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
-IUSE=""
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dnsretry"
-RDEPEND="!net-dialup/l2tpd
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
net-dialup/ppp"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ epatch "${FILESDIR}"/${P}-qa-fixes.patch
+ use dnsretry && epatch "${FILESDIR}"/${PN}-dnsretry.patch
+}
+
src_compile() {
- append-flags -DTRUST_PPPD_TO_DIE
- emake || die "emake failed"
+ append-flags -DTRUST_PPPD_TO_DIE
+ emake || die "emake failed"
}
src_install() {
- dosbin xl2tpd || die 'xl2tpd binary not found'
- doman doc/*.[85]
+ emake PREFIX=/usr DESTDIR="${D}" install || die "emake install failed"
dodoc CREDITS README.xl2tpd \
doc/README.patents doc/rfc2661.txt doc/*.sample
@@ -31,7 +39,7 @@ src_install() {
dodir /etc/xl2tpd
head -n 2 doc/l2tp-secrets.sample > "${D}/etc/xl2tpd/l2tp-secrets"
fperms 0600 /etc/xl2tpd/l2tp-secrets
- newinitd "${FILESDIR}/xl2tpd-init" xl2tpd
+ newinitd "${FILESDIR}"/xl2tpd-init xl2tpd
keepdir /var/run/xl2tpd
}