diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/Manifest b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/Manifest new file mode 100644 index 0000000000..f1ce6b20f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/Manifest @@ -0,0 +1 @@ +DIST tcpdump-4.3.0.tar.gz 887619 SHA256 efd08b610210d39977ec3175fa82dad9fbd33587930081be2a905a712dba4286 SHA512 56a33f8aeae551fdc499be31d834207b253de27dce7bdde02e2de5ed0edc4bbe86d8e120c9d2a2303b21d5c32773a4f2984e6af4f0d6f945edb3691a6446cb3c WHIRLPOOL b7d06938816aad8313d61bc30d15efa321ae2ab4663e9355ae2c50b7645bd3cb694de85e04314b5e320459312ee6150a2d3c8c93ee7ffc47ca2ece29bebd8270 diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/files/tcpdump-4.3.0-ssl-detect.patch b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/files/tcpdump-4.3.0-ssl-detect.patch new file mode 100644 index 0000000000..a485437297 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/files/tcpdump-4.3.0-ssl-detect.patch @@ -0,0 +1,125 @@ +fix from upstream to drop ugly filesystem checks that fail horribly when cross-compiling + +From c4b7e5f2b287ee3d1de8f706b809a8e217720c4e Mon Sep 17 00:00:00 2001 +From: Marc Abramowitz +Date: Sat, 13 Oct 2012 11:21:45 -0700 +Subject: [PATCH] Simplify the detection of OpenSSL libcrypto by using + standard autoconf macros rather than a local copy of + AC_LBL_SSLEAY. + +AC_LBL_SSLEAY is old and has not kept pace with some more recent +developments in packaging like Debian and Ubuntu's multiarch support. +The autoconf macros have been updated to handle multiarch so using them +means that tcpdump gains the ability to be built with libcrypto on these +new multiarch distros and to work successfully with Travis CI, which +uses Ubuntu 12, which is one such multiarch distro (see GH-32). + +Fixes GH-33 +--- + configure | 11201 ++++++++++++++++++--------------------------------------- + configure.in | 73 +- + 2 files changed, 3443 insertions(+), 7831 deletions(-) + +diff --git a/configure.in b/configure.in +index 8864238..14a60e1 100644 +--- a/configure.in ++++ b/configure.in +@@ -994,13 +994,13 @@ AC_LBL_UNALIGNED_ACCESS + + AC_VAR_H_ERRNO + +-# Check for SSLeay +-AC_MSG_CHECKING(whether to use SSLeay libcrypto) ++# Check for OpenSSL libcrypto ++AC_MSG_CHECKING(whether to use OpenSSL libcrypto) + # Specify location for both includes and libraries. +-want_libcrypto=youmama ++want_libcrypto=ifavailable + AC_ARG_WITH(crypto, +- AS_HELP_STRING([--with-crypto@<:@=PATH@:>@], +- [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]), ++ AS_HELP_STRING([--with-crypto], ++ [use OpenSSL libcrypto @<:@default=yes, if available@:>@]), + [ + if test $withval = no + then +@@ -1010,10 +1010,6 @@ AC_ARG_WITH(crypto, + then + want_libcrypto=yes + AC_MSG_RESULT(yes) +- else +- want_libcrypto=yes +- AC_MSG_RESULT(yes) +- crypto_dir=$withval + fi + ],[ + # +@@ -1023,63 +1019,8 @@ AC_ARG_WITH(crypto, + AC_MSG_RESULT([yes, if available]) + ]) + if test "$want_libcrypto" != "no"; then +- ac_cv_ssleay_path=no +- incdir=no +- if test "x$crypto_dir" = x; then +- # +- # Location not specified; check the default locations. +- # +- AC_MSG_CHECKING(where SSLeay is located) +- dirs="/usr /usr/local /usr/local/ssl /usr/pkg" +- if test "x${host_alias}" != x; then +- dirs="/usr/${host_alias} $dirs" +- fi +- for dir in $dirs; do +- AC_LBL_SSLEAY($dir) +- +- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then +- break; +- else +- ac_cv_ssleay_path=no +- incdir=no +- fi +- done +- if test "$ac_cv_ssleay_path" != no; then +- AC_MSG_RESULT($ac_cv_ssleay_path) +- fi +- else +- AC_MSG_CHECKING(for SSLeay in $crypto_dir) +- AC_LBL_SSLEAY($crypto_dir) +- if test "$ac_cv_ssleay_path" != no; then +- AC_MSG_RESULT(found) +- fi +- fi +- if test "$ac_cv_ssleay_path" != no; then +- V_INCLS="$V_INCLS $incdir" +- if test "$dir" != "/usr"; then +- LDFLAGS="-L$dir/lib $LDFLAGS" +- fi +- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then +- LIBS="$LIBS -lRSAglue" +- fi +- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then +- LIBS="$LIBS -lrsaref" +- fi +- AC_CHECK_LIB(crypto, DES_cbc_encrypt) +- +- savedcppflags="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $V_INCLS" +- AC_CHECK_HEADERS(openssl/evp.h) +- CPPFLAGS="$savedcppflags" +- else +- # +- # Not found. Did the user explicitly ask for it? +- # +- AC_MSG_RESULT(not found) +- if test "$want_libcrypto" = yes; then +- AC_MSG_ERROR(SSLeay not found) +- fi +- fi ++ AC_CHECK_LIB(crypto, DES_cbc_encrypt) ++ AC_CHECK_HEADERS(openssl/evp.h) + fi + + dnl +-- +1.8.0 + diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/tcpdump-4.3.0.ebuild b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/tcpdump-4.3.0.ebuild new file mode 100644 index 0000000000..c4920be7d2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/tcpdump-4.3.0.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.3.0.ebuild,v 1.8 2012/09/30 16:39:54 armin76 Exp $ + +EAPI="4" + +AUTOTOOLS_AUTO_DEPEND="no" # Only cross-compiling +inherit flag-o-matic user autotools eutils toolchain-funcs + +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 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux" +IUSE="+chroot smi ssl ipv6 -samba suid test" + +RDEPEND=" + net-libs/libpcap + smi? ( net-libs/libsmi ) + ssl? ( >=dev-libs/openssl-0.9.6m ) +" +DEPEND=" + ${RDEPEND} + test? ( + || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) + dev-lang/perl + ) +" + +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() { + if tc-is-cross-compiler ; then + epatch "${FILESDIR}"/${P}-ssl-detect.patch + eautoreconf + fi +} + +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 "${EPREFIX}/usr") \ + $(use_with smi) \ + $(use_enable ipv6) \ + $(use_enable samba smb) \ + $(use_with chroot chroot "${EPREFIX}/var/lib/tcpdump") +} + +src_test() { + sed '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST + emake check +} + +src_install() { + dosbin tcpdump + doman tcpdump.1 + dodoc *.awk + dodoc CHANGES CREDITS README + + if use chroot; then + keepdir /var/lib/tcpdump + fperms 700 /var/lib/tcpdump + fowners tcpdump:tcpdump /var/lib/tcpdump + fi + if use suid; then + fowners root:tcpdump /usr/sbin/tcpdump + fperms 4110 /usr/sbin/tcpdump + fi +} + +pkg_postinst() { + use suid && elog "To let normal users run tcpdump add them into tcpdump group." +}