mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-01 11:51:29 +02:00
net-analyzer/tcpdump: Sync with gentoo
It's from gentoo commit 2c07969041ff2f3f2a4f81b2db040fce315d869d.
This commit is contained in:
parent
256a4f689e
commit
1bd4c2cb61
@ -1,2 +1,2 @@
|
|||||||
DIST tcpdump-4.10.0rc1.tar.gz 1823212 BLAKE2B aa274e548163eacb09a98edbaa1127dbb06b6fe2f6eb23ffa968a577081d9d9323c339a885a198ee08d7dced04302cf50301ca575fbe95e082a6ed89e115de05 SHA512 b226ca569eeda7cee45fc7a1e42766f404d55ebca8133da544ecd75f975701532346f0cfdbefd4fc708fca12a8d094790c99a7276bd9b563885ef036a3912493
|
DIST tcpdump-4.99.1-upstream.tar.gz 2014324 BLAKE2B 0a10fe68afdfe80d3e7e661352fcaf1c47702df27fbed959f52fb0ec81543a1d4ce6b0de16a8b081de48dd43e09a13f5e1f0fb11d7590f92cbff29dc511bea12 SHA512 53d31355e1a6ef5a65bb3bf72454169fc80adf973a327a5768840e6ccf0550fbeb3c8a41f959635076d871df0619680321910a3a97879607f481cdaa8b7ceda7
|
||||||
DIST tcpdump-4.9.3.tar.gz 2333119 BLAKE2B 21e13fc40d98cfac0bbd5513580cf98313df1f8fea24c48f045f70d494aea3e75230b8481049660c109f9179015c3164f3e3b31acc76c0bfb1f2da5039f1834e SHA512 3aec673f78b996a4df884b1240e5d0a26a2ca81ee7aca8a2e6d50255bb53476e008a5ced4409e278a956710d8a4d31d85bbb800c9f1aab92b0b1046b59292a22
|
DIST tcpdump-4.99.1-upstream.tar.gz.sig 442 BLAKE2B 9a80b1796ef777bd06d0b8953fe1ff446431d0ff1dffcd58e29a0b771f6734f70f3f0da7c36a1eaa1b6e57719d79c601872a84b7734208a7e8951cad9aca86ee SHA512 b438643701efbbb5579d9d51ed48756a47dd644e0acb10b0edff6d04f3ae4cea6528b40820a656407b73f983b2a634e0165a6c8c0fca3b557394a14e2f2384ab
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="project">
|
<maintainer type="person">
|
||||||
<email>netmon@gentoo.org</email>
|
<email>zlogene@gentoo.org</email>
|
||||||
<name>Gentoo network monitoring and analysis project</name>
|
<name>Mikle Kolyada</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>sam@gentoo.org</email>
|
||||||
|
<name>Sam James</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<use>
|
<use>
|
||||||
<flag name="smi">Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag>
|
<flag name="smi">Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag>
|
||||||
<flag name="drop-root">Drop privileges to tcpdump:tcpdump when run as root</flag>
|
<flag name="drop-root">Drop privileges to pcap:pcap when run as root</flag>
|
||||||
</use>
|
</use>
|
||||||
<upstream>
|
<upstream>
|
||||||
<remote-id type="cpe">cpe:/a:tcpdump:tcpdump</remote-id>
|
<remote-id type="cpe">cpe:/a:tcpdump:tcpdump</remote-id>
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
inherit autotools user
|
|
||||||
|
|
||||||
DESCRIPTION="A Tool for network monitoring and data acquisition"
|
|
||||||
HOMEPAGE="
|
|
||||||
https://www.tcpdump.org/
|
|
||||||
https://github.com/the-tcpdump-group/tcpdump
|
|
||||||
"
|
|
||||||
LICENSE="BSD"
|
|
||||||
SRC_URI="
|
|
||||||
https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
|
|
||||||
"
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
|
||||||
IUSE="+drop-root libressl +smi +ssl +samba suid test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
REQUIRED_USE="test? ( samba )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
net-libs/libpcap
|
|
||||||
drop-root? ( sys-libs/libcap-ng )
|
|
||||||
smi? ( net-libs/libsmi )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
|
|
||||||
libressl? ( dev-libs/libressl:= )
|
|
||||||
)
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
drop-root? ( virtual/pkgconfig )
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
test? (
|
|
||||||
>=net-libs/libpcap-1.9.1
|
|
||||||
dev-lang/perl
|
|
||||||
)
|
|
||||||
"
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-9999-libdir.patch
|
|
||||||
)
|
|
||||||
S=${WORKDIR}/${PN}-${P/_}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if use drop-root || use suid; then
|
|
||||||
enewgroup tcpdump
|
|
||||||
enewuser tcpdump -1 -1 -1 tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf \
|
|
||||||
$(use_enable samba smb) \
|
|
||||||
$(use_with drop-root cap-ng) \
|
|
||||||
$(use_with drop-root chroot '') \
|
|
||||||
$(use_with smi) \
|
|
||||||
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
|
||||||
$(usex drop-root "--with-user=tcpdump" "")
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
|
|
||||||
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() {
|
|
||||||
dosbin tcpdump
|
|
||||||
doman tcpdump.1
|
|
||||||
dodoc *.awk
|
|
||||||
dodoc CHANGES CREDITS README.md
|
|
||||||
|
|
||||||
if use suid; then
|
|
||||||
fowners root:tcpdump /usr/sbin/tcpdump
|
|
||||||
fperms 4110 /usr/sbin/tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if use drop-root || 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."
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
inherit autotools user
|
|
||||||
|
|
||||||
DESCRIPTION="A Tool for network monitoring and data acquisition"
|
|
||||||
HOMEPAGE="
|
|
||||||
https://www.tcpdump.org/
|
|
||||||
https://github.com/the-tcpdump-group/tcpdump
|
|
||||||
"
|
|
||||||
SRC_URI="
|
|
||||||
https://www.tcpdump.org/release/${P}.tar.gz
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="BSD"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
|
||||||
IUSE="+drop-root libressl smi ssl samba suid test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
net-libs/libpcap
|
|
||||||
drop-root? ( sys-libs/libcap-ng )
|
|
||||||
smi? ( net-libs/libsmi )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
|
|
||||||
libressl? ( dev-libs/libressl:= )
|
|
||||||
)
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
test? (
|
|
||||||
>=net-libs/libpcap-1.9.1
|
|
||||||
dev-lang/perl
|
|
||||||
)
|
|
||||||
"
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-9999-libdir.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if use drop-root || use suid; then
|
|
||||||
enewgroup tcpdump
|
|
||||||
enewuser tcpdump -1 -1 -1 tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf \
|
|
||||||
$(use_enable samba smb) \
|
|
||||||
$(use_with drop-root cap-ng) \
|
|
||||||
$(use_with drop-root chroot '') \
|
|
||||||
$(use_with smi) \
|
|
||||||
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
|
||||||
$(usex drop-root "--with-user=tcpdump" "")
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
|
|
||||||
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() {
|
|
||||||
dosbin tcpdump
|
|
||||||
doman tcpdump.1
|
|
||||||
dodoc *.awk
|
|
||||||
dodoc CHANGES CREDITS README.md
|
|
||||||
|
|
||||||
if use suid; then
|
|
||||||
fowners root:tcpdump /usr/sbin/tcpdump
|
|
||||||
fperms 4110 /usr/sbin/tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if use drop-root || 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."
|
|
||||||
}
|
|
@ -1,92 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
inherit flag-o-matic toolchain-funcs user
|
|
||||||
|
|
||||||
DESCRIPTION="A Tool for network monitoring and data acquisition"
|
|
||||||
HOMEPAGE="
|
|
||||||
https://www.tcpdump.org/
|
|
||||||
https://github.com/the-tcpdump-group/tcpdump
|
|
||||||
"
|
|
||||||
SRC_URI="
|
|
||||||
https://www.tcpdump.org/release/${P}.tar.gz
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="BSD"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
|
|
||||||
IUSE="+drop-root libressl smi ssl samba suid test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
drop-root? ( sys-libs/libcap-ng )
|
|
||||||
net-libs/libpcap
|
|
||||||
smi? ( net-libs/libsmi )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
|
|
||||||
libressl? ( dev-libs/libressl:= )
|
|
||||||
)
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
drop-root? ( virtual/pkgconfig )
|
|
||||||
test? (
|
|
||||||
>=net-libs/libpcap-1.9.1
|
|
||||||
dev-lang/perl
|
|
||||||
app-arch/sharutils
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if use drop-root || use suid; then
|
|
||||||
enewgroup tcpdump
|
|
||||||
enewuser tcpdump -1 -1 -1 tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
if use drop-root; then
|
|
||||||
append-cppflags -DHAVE_CAP_NG_H
|
|
||||||
export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng )
|
|
||||||
fi
|
|
||||||
|
|
||||||
econf \
|
|
||||||
$(use_enable samba smb) \
|
|
||||||
$(use_with drop-root chroot '') \
|
|
||||||
$(use_with smi) \
|
|
||||||
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
|
||||||
$(usex drop-root "--with-user=tcpdump" "")
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
|
|
||||||
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() {
|
|
||||||
dosbin tcpdump
|
|
||||||
doman tcpdump.1
|
|
||||||
dodoc *.awk
|
|
||||||
dodoc CHANGES CREDITS README.md
|
|
||||||
|
|
||||||
if use suid; then
|
|
||||||
fowners root:tcpdump /usr/sbin/tcpdump
|
|
||||||
fperms 4110 /usr/sbin/tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if use drop-root || 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."
|
|
||||||
}
|
|
106
sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/tcpdump-4.99.1.ebuild
vendored
Normal file
106
sdk_container/src/third_party/portage-stable/net-analyzer/tcpdump/tcpdump-4.99.1.ebuild
vendored
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit autotools
|
||||||
|
|
||||||
|
DESCRIPTION="A tool for network monitoring and data acquisition"
|
||||||
|
HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpdump"
|
||||||
|
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
inherit git-r3
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
|
||||||
|
else
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
|
||||||
|
inherit verify-sig
|
||||||
|
|
||||||
|
# Note: drop -upstream on bump, this is just because we switched to the official
|
||||||
|
# distfiles for verify-sig
|
||||||
|
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz"
|
||||||
|
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )"
|
||||||
|
|
||||||
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="+drop-root +smi +ssl +samba suid test"
|
||||||
|
REQUIRED_USE="test? ( samba )"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
# Assorted failures: bug #768498
|
||||||
|
#RESTRICT="test"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
>=net-libs/libpcap-1.10.1
|
||||||
|
drop-root? (
|
||||||
|
acct-group/pcap
|
||||||
|
acct-user/pcap
|
||||||
|
sys-libs/libcap-ng
|
||||||
|
)
|
||||||
|
smi? ( net-libs/libsmi )
|
||||||
|
ssl? (
|
||||||
|
>=dev-libs/openssl-0.9.6m:0=
|
||||||
|
)
|
||||||
|
suid? (
|
||||||
|
acct-group/pcap
|
||||||
|
acct-user/pcap
|
||||||
|
)
|
||||||
|
"
|
||||||
|
DEPEND="
|
||||||
|
${RDEPEND}
|
||||||
|
test? (
|
||||||
|
dev-lang/perl
|
||||||
|
)
|
||||||
|
"
|
||||||
|
BDEPEND="drop-root? ( virtual/pkgconfig )"
|
||||||
|
|
||||||
|
if [[ ${PV} != *9999* ]] ; then
|
||||||
|
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-9999-libdir.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
$(use_enable samba smb) \
|
||||||
|
$(use_with drop-root cap-ng) \
|
||||||
|
$(use_with drop-root chroot '') \
|
||||||
|
$(use_with smi) \
|
||||||
|
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
||||||
|
$(usex drop-root "--with-user=pcap" "")
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
if [[ ${EUID} -ne 0 ]] || ! use drop-root ; then
|
||||||
|
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() {
|
||||||
|
dosbin tcpdump
|
||||||
|
doman tcpdump.1
|
||||||
|
dodoc *.awk
|
||||||
|
dodoc CHANGES CREDITS README.md
|
||||||
|
|
||||||
|
if use suid ; then
|
||||||
|
fowners root:pcap /usr/sbin/tcpdump
|
||||||
|
fperms 4110 /usr/sbin/tcpdump
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
use suid && elog "To let normal users run tcpdump, add them to the pcap group."
|
||||||
|
}
|
@ -1,56 +1,69 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
inherit autotools git-r3 user
|
|
||||||
|
|
||||||
DESCRIPTION="A Tool for network monitoring and data acquisition"
|
inherit autotools
|
||||||
HOMEPAGE="
|
|
||||||
https://www.tcpdump.org/
|
DESCRIPTION="A tool for network monitoring and data acquisition"
|
||||||
https://github.com/the-tcpdump-group/tcpdump
|
HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpdump"
|
||||||
"
|
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
inherit git-r3
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
|
||||||
|
else
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
|
||||||
|
inherit verify-sig
|
||||||
|
|
||||||
|
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
|
||||||
|
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
|
||||||
|
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||||
|
fi
|
||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
|
|
||||||
|
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS=""
|
IUSE="+drop-root +smi +ssl +samba suid test"
|
||||||
IUSE="+drop-root libressl +smi +ssl +samba suid test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
REQUIRED_USE="test? ( samba )"
|
REQUIRED_USE="test? ( samba )"
|
||||||
|
|
||||||
|
# Assorted failures: bug #768498
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
net-libs/libpcap
|
>=net-libs/libpcap-1.10.1
|
||||||
drop-root? ( sys-libs/libcap-ng )
|
drop-root? (
|
||||||
|
acct-group/pcap
|
||||||
|
acct-user/pcap
|
||||||
|
sys-libs/libcap-ng
|
||||||
|
)
|
||||||
smi? ( net-libs/libsmi )
|
smi? ( net-libs/libsmi )
|
||||||
ssl? (
|
ssl? (
|
||||||
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
|
>=dev-libs/openssl-0.9.6m:0=
|
||||||
libressl? ( dev-libs/libressl:= )
|
)
|
||||||
|
suid? (
|
||||||
|
acct-group/pcap
|
||||||
|
acct-user/pcap
|
||||||
)
|
)
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
drop-root? ( virtual/pkgconfig )
|
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
${RDEPEND}
|
${RDEPEND}
|
||||||
test? (
|
test? (
|
||||||
>=net-libs/libpcap-1.9.1
|
|
||||||
dev-lang/perl
|
dev-lang/perl
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
BDEPEND="drop-root? ( virtual/pkgconfig )"
|
||||||
|
|
||||||
|
if [[ ${PV} != *9999* ]] ; then
|
||||||
|
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )"
|
||||||
|
fi
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/${PN}-9999-libdir.patch
|
"${FILESDIR}"/${PN}-9999-libdir.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if use drop-root || use suid; then
|
|
||||||
enewgroup tcpdump
|
|
||||||
enewuser tcpdump -1 -1 -1 tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
default
|
default
|
||||||
|
|
||||||
eautoreconf
|
eautoreconf
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,11 +74,11 @@ src_configure() {
|
|||||||
$(use_with drop-root chroot '') \
|
$(use_with drop-root chroot '') \
|
||||||
$(use_with smi) \
|
$(use_with smi) \
|
||||||
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
$(use_with ssl crypto "${ESYSROOT}/usr") \
|
||||||
$(usex drop-root "--with-user=tcpdump" "")
|
$(usex drop-root "--with-user=pcap" "")
|
||||||
}
|
}
|
||||||
|
|
||||||
src_test() {
|
src_test() {
|
||||||
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
|
if [[ ${EUID} -ne 0 ]] || ! use drop-root ; then
|
||||||
emake check
|
emake check
|
||||||
else
|
else
|
||||||
ewarn "If you want to run the test suite, make sure you either"
|
ewarn "If you want to run the test suite, make sure you either"
|
||||||
@ -79,19 +92,12 @@ src_install() {
|
|||||||
dodoc *.awk
|
dodoc *.awk
|
||||||
dodoc CHANGES CREDITS README.md
|
dodoc CHANGES CREDITS README.md
|
||||||
|
|
||||||
if use suid; then
|
if use suid ; then
|
||||||
fowners root:tcpdump /usr/sbin/tcpdump
|
fowners root:pcap /usr/sbin/tcpdump
|
||||||
fperms 4110 /usr/sbin/tcpdump
|
fperms 4110 /usr/sbin/tcpdump
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if use drop-root || use suid; then
|
|
||||||
enewgroup tcpdump
|
|
||||||
enewuser tcpdump -1 -1 -1 tcpdump
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
use suid && elog "To let normal users run tcpdump add them into tcpdump group."
|
use suid && elog "To let normal users run tcpdump, add them to the pcap group."
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user