summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-08-29 21:06:50 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-08-29 21:06:50 +0000
commit90d4370a79f28647201a039c2d03a928b9301974 (patch)
treecdd009cd06a850b0e6388562f858c7416768e35b /net-libs/libpcap
parentInitial commit. (diff)
downloadhistorical-90d4370a79f28647201a039c2d03a928b9301974.tar.gz
historical-90d4370a79f28647201a039c2d03a928b9301974.tar.bz2
historical-90d4370a79f28647201a039c2d03a928b9301974.zip
Bump to newer snapshot, and include poll() CPU usage fix from Ubuntu. Massively drops CPU usage for live captures again.
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r--net-libs/libpcap/ChangeLog10
-rw-r--r--net-libs/libpcap/Manifest5
-rw-r--r--net-libs/libpcap/files/libpcap-1.0.1_pre20090812-poll-cpu-usage.patch27
-rw-r--r--net-libs/libpcap/libpcap-1.0.1_pre20090812.ebuild59
4 files changed, 99 insertions, 2 deletions
diff --git a/net-libs/libpcap/ChangeLog b/net-libs/libpcap/ChangeLog
index 77857561bb34..6877649a4312 100644
--- a/net-libs/libpcap/ChangeLog
+++ b/net-libs/libpcap/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-libs/libpcap
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.122 2009/07/22 19:22:52 klausman Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.123 2009/08/29 21:06:50 robbat2 Exp $
+
+*libpcap-1.0.1_pre20090812 (29 Aug 2009)
+
+ 29 Aug 2009; Robin H. Johnson <robbat2@gentoo.org>
+ +libpcap-1.0.1_pre20090812.ebuild,
+ +files/libpcap-1.0.1_pre20090812-poll-cpu-usage.patch:
+ Bump to newer snapshot, and include poll() CPU usage fix from Ubuntu.
+ Massively drops CPU usage for live captures again.
22 Jul 2009; Tobias Klausmann <klausman@gentoo.org>
libpcap-1.0.1_pre20090708.ebuild:
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
index 73748e1970aa..6a21dfb5d11a 100644
--- a/net-libs/libpcap/Manifest
+++ b/net-libs/libpcap/Manifest
@@ -12,12 +12,15 @@ AUX libpcap-1.0.0-install-headers.patch 1447 RMD160 c68db41d4417a57c4b51613699b7
AUX libpcap-1.0.0-optional-bluetooth.patch 5394 RMD160 df5093800385df09e5a0f9a22d359c5e04269a5f SHA1 bdeb0237b720e40585c463fabc3a305f99170024 SHA256 53b01de2108b00c74e2eda513ae8f5253e2b7d960cb8ab22494cbe0631cb3056
AUX libpcap-1.0.0-whitespace.patch 679 RMD160 6a62d2e5737a8627e43b853a687b31c5b4275b96 SHA1 49fa8750e8fe92c13bbb5f111c8d78b173313c4a SHA256 684b4407b3055336478507f7642bd4f83cf10f3cd1d0fd41971cad1f1a12b6bb
AUX libpcap-1.0.1_pre20090708-libnl-automagic.patch 1018 RMD160 75c7caeca86951426b0fc140cc8919e0215a8471 SHA1 7fb4a68bfcd1f884907ca2e71c9340eff21b4548 SHA256 8b29e765a244161545f02ea702f555303a9914ccde73548258d79900691778f5
+AUX libpcap-1.0.1_pre20090812-poll-cpu-usage.patch 1060 RMD160 b4821a0b146dda4ff8cce822e5d86f3196ab0894 SHA1 1b017ce2e2edc978b757c886326da6cc7f6898d2 SHA256 44776d07b759061f27be568f1fef7eb3400f1a10ad11fe14557f676a0dbd04b9
AUX libpcap-cross-linux.patch 1114 RMD160 e76fd1ea94d34e8533416c476d95166ad13579ec SHA1 0853cb1cf102c6d9b41d22b4c62b0e1bac6d73a8 SHA256 4b3fe1e2b7ecefbf82e20120f8c3bf9c5050cb7ccc1e0be77a04af5ef7cbb459
DIST libpcap-0.9.8.tar.gz 520526 RMD160 2f5ecbc9840d8bd646798c977b7a02abe191311e SHA1 11dfe67cfc1c279c7346d626a99ad4ba90621028 SHA256 c4158398de4411627b14f52626e4cef39443f4d5c1b9bce8c07f8526d18362f9
DIST libpcap-1.0.0.tar.gz 524273 RMD160 20857fe6af5dc70fffb19da46e0fee908f55b3ea SHA1 9893654027ae11033d785045ff35583da43fe8fa SHA256 a214c4e1d7e22a758f66fe1d08f0ce41c3ba801a4c13dd1188e1e38288ac73c0
DIST libpcap-1.0.1-20090708.tar.gz 593985 RMD160 6c0deac196c6ec160ecbd8fa6a1f093242b79a55 SHA1 7e10c470ed6df3dce10c7ec5509378782bbf9f28 SHA256 babdd17040cf0cfc79b58121b758088639a37f84172c7a198f826dc0388ef3f7
+DIST libpcap-1.0.1-20090812.tar.gz 574616 RMD160 60cab9e2a00ec5124823958c65fc00ff760f9eb2 SHA1 f7c319e94a6504c60f2774ffae6afe6a31bbfdd4 SHA256 149d256b66f5cea5362858cdcac678f578e5d2e251b686ed8da09eb56dfaee6b
EBUILD libpcap-0.9.8-r2.ebuild 1893 RMD160 7eb603ca3e2cbe57ce3857536b1ecca7b8769742 SHA1 edcc59e68dc8a21036c1f5b9df87b9cb0516ef93 SHA256 f5c8ed79b684c390791df95dfaad5b2ab0a6f7108ca6048823f5101f18c24a4e
EBUILD libpcap-1.0.0-r2.ebuild 1753 RMD160 5919c3b1b5a10563bad6c9df2d50533ac5698aa9 SHA1 ed4594fbd71a1b0ef60201c43a6586d36607a5db SHA256 6e1ebec9bce66d7b08c713ea4db7e09a443d408313b0572776d38f74506eda1c
EBUILD libpcap-1.0.1_pre20090708.ebuild 1803 RMD160 094bab78977034a4ed4b0d6e7c3fdb240fe64a59 SHA1 03aff6a3ddb8d1e95bcc88052a36eb14fe3ca970 SHA256 cf80f44afc13d3f19dacfbcd32ad45e4598c4b8a8f2f7359e650171c29c88969
-MISC ChangeLog 16368 RMD160 37718ef8cfa151a3c3dec31e47928bdba7f30f94 SHA1 4817adbb892cccb7805873b7cd783e753a80f5f3 SHA256 d75d48535d06cd839ce0797a0c872698c54ac9c3555e1f3be9e1a995ab5bbb29
+EBUILD libpcap-1.0.1_pre20090812.ebuild 1799 RMD160 a2c1887e7f8b77482aff49e69ae4e26e38045f20 SHA1 ed89849520befe79e5fdd0aa55b1018d6308f660 SHA256 21abcd6edc48a4222dbf107e6344b7cfc1114644facc026b2b36fa96d4ae6520
+MISC ChangeLog 16682 RMD160 0f75b573975f76df03ebf1123c5c534b74d28683 SHA1 45f614f99fcb72e1b64a22251092c9e4acc881cc SHA256 d9f1cda6e97f27b36b46b95d3f0b547d673e60f110334bf8cc898f95541cf91d
MISC metadata.xml 389 RMD160 34c1d8fae5de18e7a265bec7989f85524d314ffa SHA1 7b0158e05458271a71ea956651a095c577b978ac SHA256 229da3200f3a83c37e581ce62f15ffa8c2f8dbcd1dcb091b8a8904e67e3550e8
diff --git a/net-libs/libpcap/files/libpcap-1.0.1_pre20090812-poll-cpu-usage.patch b/net-libs/libpcap/files/libpcap-1.0.1_pre20090812-poll-cpu-usage.patch
new file mode 100644
index 000000000000..8468dc503447
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.0.1_pre20090812-poll-cpu-usage.patch
@@ -0,0 +1,27 @@
+https://bugs.launchpad.net/ubuntu/+source/tcpdump/+bug/369288
+
+Rediffed to apply.
+
+diff -Nuar --exclude '*.orig' --exclude '*.rej' libpcap-1.0.1-20090708.orig/pcap-linux.c libpcap-1.0.1-20090708/pcap-linux.c
+--- libpcap-1.0.1-20090708.orig/pcap-linux.c 2009-07-08 11:52:08.000000000 +0000
++++ libpcap-1.0.1-20090708/pcap-linux.c 2009-08-29 20:47:44.951806355 +0000
+@@ -2785,6 +2785,19 @@
+ handle->fd, errno, pcap_strerror(errno));
+ return -1;
+ }
++
++ /* poll() sometimes returns > 0 even in error cases
++ * and sets error-bits like POLLERR, POLLHUP, ..
++ * Are also "good" bits are possible, like POLLPRI.
++ * TODO: what's with POLLRDHUP since kernel 2.6.17?
++ */
++ if (ret > 0 && pollinfo.revents & (POLLERR | POLLHUP | POLLNVAL)) {
++ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
++ "critical revent in poll on packet socket fd %d: 0x%4.4x",
++ handle->fd, pollinfo.revents);
++ return -1;
++ }
++
+ /* check for break loop condition on interrupted syscall*/
+ if (handle->break_loop) {
+ handle->break_loop = 0;
diff --git a/net-libs/libpcap/libpcap-1.0.1_pre20090812.ebuild b/net-libs/libpcap/libpcap-1.0.1_pre20090812.ebuild
new file mode 100644
index 000000000000..462029c15b13
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.0.1_pre20090812.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-1.0.1_pre20090812.ebuild,v 1.1 2009/08/29 21:06:50 robbat2 Exp $
+
+EAPI=2
+inherit autotools eutils multilib toolchain-funcs
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+HOMEPAGE="http://www.tcpdump.org/"
+MY_P=${PN}-${PV/_pre/-}
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+# SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
+# http://www.jp.tcpdump.org/release/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="bluetooth ipv6 libnl"
+
+RDEPEND="!virtual/libpcap
+ bluetooth? ( || ( net-wireless/bluez net-wireless/bluez-libs ) )
+ libnl? ( dev-libs/libnl )"
+DEPEND="${RDEPEND}
+ sys-devel/flex"
+PROVIDE="virtual/libpcap"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-cross-linux.patch"
+ epatch "${FILESDIR}/${PN}-1.0.1_pre20090812-poll-cpu-usage.patch"
+ echo ${PV} > VERSION # Avoid CVS in version
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable ipv6) \
+ $(use_with libnl) \
+ $(use_enable bluetooth)
+}
+
+src_compile() {
+ emake all shared || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-shared || die "emake install failed"
+
+ dosym libpcap.so.${PV} /usr/$(get_libdir)/libpcap.so.1
+ dosym libpcap.so.${PV} /usr/$(get_libdir)/libpcap.so
+
+ # We need this to build pppd on G/FBSD systems
+ if [[ "${USERLAND}" == "BSD" ]]; then
+ insinto /usr/include
+ doins pcap-int.h || die "failed to install pcap-int.h"
+ fi
+
+ # We are not installing README.{Win32,aix,hpux,tru64} (bug 183057)
+ dodoc CREDITS CHANGES VERSION TODO README{,.dag,.linux,.macosx,.septel} || die
+}