summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/iputils/ChangeLog7
-rw-r--r--net-misc/iputils/files/iputils-20100418-openssl.patch35
-rw-r--r--net-misc/iputils/files/iputils-20100418-so_mark.patch22
-rw-r--r--net-misc/iputils/iputils-20100418.ebuild10
4 files changed, 70 insertions, 4 deletions
diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog
index 9f246075f990..ee56e1524c64 100644
--- a/net-misc/iputils/ChangeLog
+++ b/net-misc/iputils/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/iputils
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.83 2010/08/30 11:57:13 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.84 2010/08/31 17:10:30 vapier Exp $
+
+ 31 Aug 2010; Mike Frysinger <vapier@gentoo.org> iputils-20100418.ebuild,
+ +files/iputils-20100418-openssl.patch, +files/iputils-20100418-so_mark.patch:
+ Make openssl support optional #335436 by Jorge Manuel B. S. Vicetto. Fix
+ building with older linux headers #335347 by Mark Wagner.
30 Aug 2010; Jeroen Roovers <jer@gentoo.org> iputils-20100418.ebuild:
Stable for HPPA PPC (bug #332527).
diff --git a/net-misc/iputils/files/iputils-20100418-openssl.patch b/net-misc/iputils/files/iputils-20100418-openssl.patch
new file mode 100644
index 000000000000..db09ac0e6503
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20100418-openssl.patch
@@ -0,0 +1,35 @@
+make openssl optional
+
+https://bugs.gentoo.org/335436
+
+--- ping6.c
++++ ping6.c
+@@ -161,7 +161,9 @@
+
+ static int icmp_sock;
+
++#ifdef HAVE_OPENSSL
+ #include <openssl/md5.h>
++#endif
+
+ /* Node Information query */
+ int ni_query = -1;
+@@ -478,6 +480,7 @@
+
+ char *ni_groupaddr(const char *name)
+ {
++#ifdef HAVE_OPENSSL
+ MD5_CTX ctxt;
+ __u8 digest[16];
+ static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
+@@ -518,6 +521,10 @@
+ if (q)
+ strcat(nigroup_buf, q);
+ return nigroup_buf;
++#else
++ fprintf(stderr, "ping6: function not available; openssl disabled\n");
++ exit(1);
++#endif
+ }
+
+ int main(int argc, char *argv[])
diff --git a/net-misc/iputils/files/iputils-20100418-so_mark.patch b/net-misc/iputils/files/iputils-20100418-so_mark.patch
new file mode 100644
index 000000000000..ad92254d6f8d
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20100418-so_mark.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/335347
+
+fix building with older linux headers that don't define SO_MARK
+
+--- ping_common.c
++++ ping_common.c
+@@ -485,6 +485,7 @@
+ fprintf(stderr, "Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP\n");
+ }
+ #endif
++#ifdef SO_MARK
+ if (options & F_MARK) {
+ if (setsockopt(icmp_sock, SOL_SOCKET, SO_MARK,
+ &mark, sizeof(mark)) == -1) {
+@@ -494,6 +495,7 @@
+ fprintf(stderr, "Warning: Failed to set mark %d\n", mark);
+ }
+ }
++#endif
+
+ /* Set some SNDTIMEO to prevent blocking forever
+ * on sends, when device is too slow or stalls. Just put limit
diff --git a/net-misc/iputils/iputils-20100418.ebuild b/net-misc/iputils/iputils-20100418.ebuild
index 290ff60ab3f1..cce905e9219d 100644
--- a/net-misc/iputils/iputils-20100418.ebuild
+++ b/net-misc/iputils/iputils-20100418.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20100418.ebuild,v 1.6 2010/08/30 11:57:13 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20100418.ebuild,v 1.7 2010/08/31 17:10:30 vapier Exp $
inherit flag-o-matic eutils toolchain-funcs
@@ -12,10 +12,11 @@ SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
-IUSE="doc idn ipv6 SECURITY_HAZARD static"
+IUSE="doc idn ipv6 SECURITY_HAZARD ssl static"
# sysfsutils is needed for libsysfs which is used by arping only
RDEPEND="!net-misc/rarpd
+ ssl? ( dev-libs/openssl )
idn? ( net-dns/libidn )
sys-fs/sysfsutils"
DEPEND="${RDEPEND}
@@ -27,8 +28,10 @@ src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20100418-openssl.patch #335436
+ epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
epatch "${FILESDIR}"/${PN}-20100418-makefile.patch
- epatch "${FILESDIR}"/${PN}-20100418-proper-libs.patch
+ epatch "${FILESDIR}"/${PN}-20100418-proper-libs.patch #332703
epatch "${FILESDIR}"/${PN}-20100418-printf-size.patch
epatch "${FILESDIR}"/${PN}-20100418-aliasing.patch
epatch "${FILESDIR}"/${PN}-20071127-kernel-ifaddr.patch
@@ -36,6 +39,7 @@ src_unpack() {
epatch "${FILESDIR}"/${PN}-20100418-ping-CVE-2010-2529.patch #332527
use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
use static && append-ldflags -static
+ use ssl && append-cppflags -DHAVE_OPENSSL
use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
export IDN=$(use idn && echo yes)
}