diff options
author | Jeroen Roovers <jer@gentoo.org> | 2013-06-02 16:16:07 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2013-06-02 16:16:07 +0000 |
commit | ebde35bd22cf23e92eaa0f60437286e9de9075be (patch) | |
tree | f7280e2c12b7c79716c61308dbe20183c1437881 /net-analyzer | |
parent | dev-scheme/greg: Fix leading spaces (diff) | |
download | gentoo-2-ebde35bd22cf23e92eaa0f60437286e9de9075be.tar.gz gentoo-2-ebde35bd22cf23e92eaa0f60437286e9de9075be.tar.bz2 gentoo-2-ebde35bd22cf23e92eaa0f60437286e9de9075be.zip |
Run user.eclass functions conditionally, and in pkg_preinst too. Fix CFLAGS -O2 injection better. Copy the configure warning about SMB support.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/tcpdump/ChangeLog | 6 | ||||
-rw-r--r-- | net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild | 36 |
2 files changed, 31 insertions, 11 deletions
diff --git a/net-analyzer/tcpdump/ChangeLog b/net-analyzer/tcpdump/ChangeLog index 84b79e537a2a..60f20f9e7fd9 100644 --- a/net-analyzer/tcpdump/ChangeLog +++ b/net-analyzer/tcpdump/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/tcpdump # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.168 2013/06/02 14:50:22 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.169 2013/06/02 16:16:07 jer Exp $ + + 02 Jun 2013; Jeroen Roovers <jer@gentoo.org> tcpdump-4.4.0-r1.ebuild: + Run user.eclass functions conditionally, and in pkg_preinst too. Fix CFLAGS + -O2 injection better. Copy the configure warning about SMB support. 02 Jun 2013; Jeroen Roovers <jer@gentoo.org> tcpdump-4.4.0-r1.ebuild: Do not keep /var/lib/tcpdump. diff --git a/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild index e455c3f4808e..41f780172335 100644 --- a/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild +++ b/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild,v 1.2 2013/06/02 14:50:22 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild,v 1.3 2013/06/02 16:16:07 jer Exp $ EAPI=5 AUTOTOOLS_AUTO_DEPEND="no" # Only cross-compiling -inherit eutils flag-o-matic user toolchain-funcs +inherit autotools eutils flag-o-matic toolchain-funcs user DESCRIPTION="A Tool for network monitoring and data acquisition" HOMEPAGE="http://www.tcpdump.org/" @@ -38,27 +38,36 @@ pkg_setup() { 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 "Upstream tags it with:" + ewarn "WARNING: The SMB printer may have exploitable buffer overflows!!!" 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 + if use chroot || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi } +src_prepare() { + sed -i aclocal.m4 -e 's|\"-O2\"|\"\"|g' || die + eautoconf +} src_configure() { - # tcpdump needs some optymalization. see bug #108391 - ( ! is-flag -O? || is-flag -O0 ) && append-flags -O2 + # tcpdump needs some optimization. see bug #108391 + # but do not replace -Os + filter-flags -O[0-9] + is-flagq -O? || append-flags -O2 + + filter-flags -finline-functions + if use chroot; then append-cppflags -DHAVE_CAP_NG_H export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) fi - replace-flags -O[3-9] -O2 - filter-flags -finline-functions - econf \ $(use_enable ipv6) \ $(use_enable samba smb) \ @@ -85,6 +94,13 @@ src_install() { fi } +pkg_preinst() { + if use chroot || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + pkg_postinst() { use suid && elog "To let normal users run tcpdump add them into tcpdump group." } |