summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2010-04-02 06:02:17 +0000
committerPeter Volkov <pva@gentoo.org>2010-04-02 06:02:17 +0000
commit6fd7408513e8ddd5108e2d40dbec509a6e2c8640 (patch)
treefbf8f9615f19b022809bca25c3b7b262dd3c14aa /net-analyzer
parentVersion bump, bug #312337, thank Richard Hartmann for report. Fixes compatibi... (diff)
downloadgentoo-2-6fd7408513e8ddd5108e2d40dbec509a6e2c8640.tar.gz
gentoo-2-6fd7408513e8ddd5108e2d40dbec509a6e2c8640.tar.bz2
gentoo-2-6fd7408513e8ddd5108e2d40dbec509a6e2c8640.zip
Version bump, bug #312337, thank Richard Hartmann for report. Fixes inability to run tcpdump if built with USE=-chroot, bug 281936, thank Travis Schack for report. Tests are broken in the release.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/tcpdump/ChangeLog10
-rw-r--r--net-analyzer/tcpdump/files/tcpdump-4.1.0-without-chroot.patch27
-rw-r--r--net-analyzer/tcpdump/tcpdump-4.1.0.ebuild84
3 files changed, 120 insertions, 1 deletions
diff --git a/net-analyzer/tcpdump/ChangeLog b/net-analyzer/tcpdump/ChangeLog
index c2a5284fdd85..eed6c4dbe272 100644
--- a/net-analyzer/tcpdump/ChangeLog
+++ b/net-analyzer/tcpdump/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/tcpdump
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.139 2010/02/12 14:34:14 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.140 2010/04/02 06:02:17 pva Exp $
+
+*tcpdump-4.1.0 (02 Apr 2010)
+
+ 02 Apr 2010; Peter Volkov <pva@gentoo.org> +tcpdump-4.1.0.ebuild,
+ +files/tcpdump-4.1.0-without-chroot.patch:
+ Version bump, bug #312337, thank Richard Hartmann for report. Fixes
+ inability to run tcpdump if built with USE=-chroot, bug 281936, thank
+ Travis Schack for report. Tests are broken in the release.
12 Feb 2010; Jeroen Roovers <jer@gentoo.org> tcpdump-3.9.8-r1.ebuild:
Stable for HPPA too.
diff --git a/net-analyzer/tcpdump/files/tcpdump-4.1.0-without-chroot.patch b/net-analyzer/tcpdump/files/tcpdump-4.1.0-without-chroot.patch
new file mode 100644
index 000000000000..d81af4ca776c
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.1.0-without-chroot.patch
@@ -0,0 +1,27 @@
+commit 7ec07e4815965dd31b85e56ac823249bfb9afc28
+Author: Peter Volkov <pva@gentoo.org>
+Date: Fri Apr 2 09:33:30 2010 +0400
+
+ Respect --without-chroot correctly
+
+ ./configure --without-chroot will configure tcpdump with "no" as the
+ value of chroot directory and cause tcpdump to fail with:
+
+ tcpdump: Couldn't chroot/chdir to 'no': No such file or directory
+
+ This patch makes ./configure to avoid chroot directory when called with
+ --without-chroot.
+
+diff --git a/configure.in b/configure.in
+index 1c1b63a..eb3e5e8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -159,7 +159,7 @@ fi
+
+ AC_ARG_WITH(chroot, [ --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
+ AC_MSG_CHECKING([whether to chroot])
+-if test ! -z "$with_chroot" ; then
++if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
+ AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
+ AC_MSG_RESULT(to \"$withval\")
+ else
diff --git a/net-analyzer/tcpdump/tcpdump-4.1.0.ebuild b/net-analyzer/tcpdump/tcpdump-4.1.0.ebuild
new file mode 100644
index 000000000000..961840535cfb
--- /dev/null
+++ b/net-analyzer/tcpdump/tcpdump-4.1.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.1.0.ebuild,v 1.1 2010/04/02 06:02:17 pva Exp $
+
+EAPI="2"
+inherit flag-o-matic toolchain-funcs eutils versionator autotools
+
+DESCRIPTION="A Tool for network monitoring and data acquisition"
+HOMEPAGE="http://www.tcpdump.org/"
+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 ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="+chroot smi ssl ipv6 -samba test"
+
+RDEPEND="net-libs/libpcap
+ smi? ( net-libs/libsmi )
+ ssl? ( >=dev-libs/openssl-0.9.6m )"
+DEPEND="${RDEPEND}
+ test? ( app-arch/sharutils
+ dev-lang/perl )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-2)
+
+pkg_setup() {
+ if use samba ; then
+ ewarn
+ ewarn "CAUTION !!! CAUTION !!! CAUTION"
+ ewarn
+ ewarn "You're about to compile tcpdump with samba printing support"
+ ewarn "Upstream tags it as 'possibly-buggy SMB printer'"
+ ewarn "So think twice whether this is fine with you"
+ ewarn
+ ewarn "CAUTION !!! CAUTION !!! CAUTION"
+ ewarn
+ fi
+ enewgroup tcpdump
+ enewuser tcpdump -1 -1 -1 tcpdump
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-without-chroot.patch"
+ eautoconf
+}
+
+src_configure() {
+ # tcpdump needs some optymalization. see bug #108391
+ ( ! is-flag -O? || is-flag -O0 ) && append-flags -O2
+
+ replace-flags -O[3-9] -O2
+ filter-flags -finline-functions
+
+ econf --with-user=tcpdump \
+ $(use_with ssl crypto) \
+ $(use_with smi) \
+ $(use_enable ipv6) \
+ $(use_enable samba smb) \
+ $(use_with chroot chroot /var/lib/tcpdump)
+}
+
+src_compile() {
+ make CCOPT="$CFLAGS" || die "make failed"
+}
+
+src_test() {
+ #sed '/^\(bgp_vpn_attrset\|ikev2four\|espudp1\|eapon1\)/d;' -i tests/TESTLIST
+ #make check || die "tests failed"
+ ewarn "tests are broken in the release... (tests directory missed in tarball)"
+}
+
+src_install() {
+ dosbin tcpdump || die
+ doman tcpdump.1 || die
+ dodoc *.awk || die
+ dodoc CHANGES CREDITS README || die
+
+ if use chroot; then
+ keepdir /var/lib/tcpdump
+ fperms 700 /var/lib/tcpdump
+ fowners tcpdump:tcpdump /var/lib/tcpdump
+ fi
+}