diff options
author | Jeroen Roovers <jer@gentoo.org> | 2013-06-03 19:20:55 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2013-06-03 19:20:55 +0000 |
commit | 04d8939e3f952f6cfc8e3ff18f8c45abc04cbda1 (patch) | |
tree | f2806e8a5ffea98772bd8faffbc09ccc194d174d /net-analyzer/tcpdump | |
parent | Fix whitespace. (diff) | |
download | gentoo-2-04d8939e3f952f6cfc8e3ff18f8c45abc04cbda1.tar.gz gentoo-2-04d8939e3f952f6cfc8e3ff18f8c45abc04cbda1.tar.bz2 gentoo-2-04d8939e3f952f6cfc8e3ff18f8c45abc04cbda1.zip |
Avoid test suite failure when USE=drop-root / FEATURES=-userpriv (bug #435982). Rename USE=chroot to USE=drop-root since USE=suid is already taken and has a different meaning in these ebuilds.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer/tcpdump')
-rw-r--r-- | net-analyzer/tcpdump/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/tcpdump/metadata.xml | 1 | ||||
-rw-r--r-- | net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild | 23 |
3 files changed, 22 insertions, 10 deletions
diff --git a/net-analyzer/tcpdump/ChangeLog b/net-analyzer/tcpdump/ChangeLog index e499b5b9ff0c..766c54e67227 100644 --- a/net-analyzer/tcpdump/ChangeLog +++ b/net-analyzer/tcpdump/ChangeLog @@ -1,6 +1,12 @@ # 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.170 2013/06/03 01:46:58 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.171 2013/06/03 19:20:55 jer Exp $ + + 03 Jun 2013; Jeroen Roovers <jer@gentoo.org> tcpdump-4.4.0-r1.ebuild, + metadata.xml: + Avoid test suite failure when USE=drop-root / FEATURES=-userpriv (bug + #435982). Rename USE=chroot to USE=drop-root since USE=suid is already taken + and has a different meaning in these ebuilds. 03 Jun 2013; Jeroen Roovers <jer@gentoo.org> tcpdump-4.4.0-r1.ebuild: Use append-cflags instead of append-flags. diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml index a9759ef741a8..6a8ad3280bd1 100644 --- a/net-analyzer/tcpdump/metadata.xml +++ b/net-analyzer/tcpdump/metadata.xml @@ -6,5 +6,6 @@ <use> <flag name='smi'>Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag> <flag name='chroot'>Chroot into /var/lib/tcpdump when dropping privileges</flag> + <flag name='drop-root'>Drop privileges to tcpdump:tcpdump when run as root</flag> </use> </pkgmetadata> diff --git a/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild index 992f285c8894..4dffa83db617 100644 --- a/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild +++ b/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild @@ -1,6 +1,6 @@ # 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.4 2013/06/03 01:46:58 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.4.0-r1.ebuild,v 1.5 2013/06/03 19:20:55 jer Exp $ EAPI=5 @@ -15,17 +15,17 @@ SRC_URI="http://www.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 ~arm-linux ~x86-linux" -IUSE="+chroot smi ssl ipv6 -samba suid test" +IUSE="+drop-root smi ssl ipv6 -samba suid test" RDEPEND=" - chroot? ( sys-libs/libcap-ng ) + drop-root? ( sys-libs/libcap-ng ) net-libs/libpcap smi? ( net-libs/libsmi ) ssl? ( >=dev-libs/openssl-0.9.6m ) " DEPEND=" ${RDEPEND} - chroot? ( virtual/pkgconfig ) + drop-root? ( virtual/pkgconfig ) test? ( || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) dev-lang/perl @@ -45,7 +45,7 @@ pkg_setup() { ewarn "CAUTION !!! CAUTION !!! CAUTION" ewarn fi - if use chroot || use suid; then + if use drop-root || use suid; then enewgroup tcpdump enewuser tcpdump -1 -1 -1 tcpdump fi @@ -63,7 +63,7 @@ src_configure() { filter-flags -finline-functions - if use chroot; then + if use drop-root; then append-cppflags -DHAVE_CAP_NG_H export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) fi @@ -71,15 +71,20 @@ src_configure() { econf \ $(use_enable ipv6) \ $(use_enable samba smb) \ - $(use_with chroot chroot '') \ + $(use_with drop-root chroot '') \ $(use_with smi) \ $(use_with ssl crypto "${EPREFIX}/usr") \ --with-user=tcpdump } src_test() { - sed '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST - emake check + if has !userpriv ${FEATURES} && use drop-root; then + sed -i '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST + emake check + else + ewarn "If you want to run the test suite, make sure you either" + ewarn "set FEATURES=userpriv or set USE=-drop-root" + fi } src_install() { |