diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/tcpdump |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/tcpdump')
-rw-r--r-- | net-analyzer/tcpdump/Manifest | 6 | ||||
-rw-r--r-- | net-analyzer/tcpdump/metadata.xml | 15 | ||||
-rw-r--r-- | net-analyzer/tcpdump/tcpdump-4.9.2.ebuild | 99 | ||||
-rw-r--r-- | net-analyzer/tcpdump/tcpdump-9999.ebuild | 103 |
4 files changed, 223 insertions, 0 deletions
diff --git a/net-analyzer/tcpdump/Manifest b/net-analyzer/tcpdump/Manifest new file mode 100644 index 000000000000..4abc2b37d735 --- /dev/null +++ b/net-analyzer/tcpdump/Manifest @@ -0,0 +1,6 @@ +DIST tcpdump-4.9.2.tar.gz 2298386 SHA256 798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79 SHA512 e1bc19a5867d6e3628f3941bdf3ec831bf13784f1233ca1bccc46aac1702f47ee9357d7ff0ca62cddf211b3c8884488c21144cabddd92c861e32398cd8f7c44b WHIRLPOOL 6652a5bb83a082bc8df050610ed640f0119fb846f2938a5148be3008506548e73c3c6437a62752eafdd00910c35b2b5decfd21c207719d156fb7dc8ca9e3443a +EBUILD tcpdump-4.9.2.ebuild 2083 SHA256 16b88b7edbf95895040bfbc48eae36e95ac64df03a2469c9c059181487040189 SHA512 1d6df16693ed2fb2f4aa50e26d789f679eeee5521da6e23c82520eec9165d86dd40bb3c2c089a4048baf0b34270d207c65487cfb325c6d1b5808728516373dbf WHIRLPOOL aa91facc01b6d91c16acca322ba1f03d0091f228a5c318d5e9558b7263a2b129187678003143bcacf0af59a9c76d89e6948b1b619276a9cbc1ef919a59de087c +EBUILD tcpdump-9999.ebuild 2210 SHA256 1dcc973caa9dbd0dddf3e8a727eb28acf12401416b82acbbf4fa4bc5a4fbef4c SHA512 1c6e0b3ff504bcca0ebbb160f5a0eb88d5c57a4afc09400bbbccfaf62396018f4a03e284626b7a7d55829ffc8bf2648f5d84ae63defa9c1d7cde3678bf2635e6 WHIRLPOOL 58221a015af9fb2e025aaa5faf2dfbd9d1e0bbf0552d784314a5eefbed03682f706e4ca96dddc61641b6e62c41d6b900b90441c69e82bdce4bad8f020bf940fb +MISC ChangeLog 4540 SHA256 a8cdb402e44537e911dd0bdd1343ebab7b0d39764d2232612431a5f9e90770d1 SHA512 69fe80d6589da9d2eff31f47af51478948e5db827861a6634effba434abc68cd34f27dbfc76ccab6ce4beb0cca71e31896a6873877c7320923daab1c7f8fcf04 WHIRLPOOL a6c75e60e59c0bd0d28f92a0d6ecd40f829c787fd8da17004d32dcdebab8610dfb624731f878c94fd2c3e80e5c8e8ef30a1539e059eb276f22a77ad73c4c18d5 +MISC ChangeLog-2015 29712 SHA256 4863278ce61c263a75d88ae2e72ccc38b70e82e9d9c506e533decf67447ca784 SHA512 bf84d0fa6c94c6eb1c27f3f923e40e198c9fcdad1b394e8f62d45d9a1c7de828d91ebb493bfcf8c423ec3204a1deeb14b07fb58a722247f2e15900dd4ff85480 WHIRLPOOL c299c8d27622a079e2a9a01c5fef0bd30e9c3b5a48dc6ed156a12e6929d32ea01401e1d2fffc27ef57b338698855ac250c2faa5c8b8a2ae847bf5eb2e92bdddf +MISC metadata.xml 580 SHA256 46979e33a5f85d38a1ac9ae7ebbe91fc543fb300f6438d0de8fd20afd2a533d7 SHA512 b8fd75f13c0993c8aa97e0c35649b4f11f992413f4dce8f737c28741d047bb36637b6c509139a046594fa788eb2932ee39a87046742372c63fe0bc6e037da49a WHIRLPOOL c2a08efcdfbbc172b878c2ccb29e4ef4863ebf2149c6492570bd7f53c4c92e8b3c3e5f66a7deb43f5dc845f4d4ddbdaaae557de30e765f6fbfca6ecf9b98f5e3 diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml new file mode 100644 index 000000000000..2d5b8e1103b2 --- /dev/null +++ b/net-analyzer/tcpdump/metadata.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <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> + </use> + <upstream> + <remote-id type="github">the-tcpdump-group/tcpdump</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-analyzer/tcpdump/tcpdump-4.9.2.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.2.ebuild new file mode 100644 index 000000000000..5ce4d4fd76cb --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-4.9.2.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs user + +DESCRIPTION="A Tool for network monitoring and data acquisition" +HOMEPAGE=" + http://www.tcpdump.org/ + https://github.com/the-tcpdump-group/tcpdump +" +SRC_URI=" + http://www.tcpdump.org/release/${P}.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +IUSE="+drop-root libressl smi ssl samba suid 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? ( + || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) + dev-lang/perl + ) +" + +pkg_setup() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +src_prepare() { + default + + sed -i -e '/^eapon1/d;' tests/TESTLIST || die + + # bug 630394 + sed -i -e '/^nbns-valgrind/d' tests/TESTLIST || die +} + +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 "${EPREFIX}/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." +} diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild new file mode 100644 index 000000000000..0a56c11cfe97 --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs user + +DESCRIPTION="A Tool for network monitoring and data acquisition" +EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump" +HOMEPAGE=" + http://www.tcpdump.org/ + ${EGIT_REPO_URI} +" + +LICENSE="BSD" +SLOT="0" +IUSE="+drop-root libressl smi ssl samba suid test" +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +fi + +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? ( + || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) + dev-lang/perl + ) +" + +pkg_setup() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +src_prepare() { + default + + sed -i -e '/^eapon1/d;' tests/TESTLIST || die + + # bug 630394 + sed -i -e '/^nbns-valgrind/d' tests/TESTLIST || die +} + +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 "${EPREFIX}/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." +} |