diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-wireless/kismet | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'net-wireless/kismet')
-rw-r--r-- | net-wireless/kismet/Manifest | 6 | ||||
-rw-r--r-- | net-wireless/kismet/kismet-2019.12.2.ebuild | 166 | ||||
-rw-r--r-- | net-wireless/kismet/kismet-9999.ebuild | 20 | ||||
-rw-r--r-- | net-wireless/kismet/metadata.xml | 3 |
4 files changed, 185 insertions, 10 deletions
diff --git a/net-wireless/kismet/Manifest b/net-wireless/kismet/Manifest index 463119391998..249f7ffec26a 100644 --- a/net-wireless/kismet/Manifest +++ b/net-wireless/kismet/Manifest @@ -6,7 +6,9 @@ AUX kismet.initd-r2 495 BLAKE2B 6d495c1fe5582921a67acf411fc65f6f3b3d832017e9354e AUX kismet.initd-r3 332 BLAKE2B e3d4987a41acf7b76aa0a08da7d11bb7c49807a5f60e4540620a34cf3bb8fc71e076ffdfad4b35699b2158c3376a691c3ca6ea1236f4f9eb3c24fc77eed4ab71 SHA512 0d5ff74553e122d645985ead839f48e5edd716bc510e505798938a705e14276a97bbd5ca2dfbf784ef044fa7b12064068ec03b8839dd8237794e17f6715f6231 DIST kismet-2016-07-R1.tar.xz 709364 BLAKE2B 5b667a02b517bd413d569f40df1f2a2e1158357c602fa807d712870543a7fade25077f449c07c023ad1d2150870352aa754484846d8c2a0d9f027113bb57c1fc SHA512 88891a0cd5ef94a4815d259e433f946f52552c125e05a5d8ac447d04e6090f2bd92f8bd8573440f0dfe446b29233bef81d9889e53170757ad0116ddfc2cb8416 DIST kismet-2019-09-R1.tar.xz 3034832 BLAKE2B 9f7818549e5260dc081ac39ea8323c70f2e4d0b959bc42dacc253c9d72bf72c2547f7c6d65d84ee7d0ca4a41068f5973028e48f6f9f3c5a7cd50c35246570814 SHA512 eeaf069718206f2b6d292c41792217afc9c72c10ffa014c8c670de64195bd28d44f33364dba7d338610f17a5af2be3c125ccd1297cce362159a4968c9ddabb88 +DIST kismet-2019-12-R2.tar.xz 3127064 BLAKE2B b7ffac6a6a4d7d7893d3564f9471080e055798c325b102f98fa0e86db37bcbab33422afae9c2694b747ae0c369259b62c218a77c673d0e0c05969a56e42311c2 SHA512 b1e3de74a6d314150d849ac3d95c8b99324bba14522dc4f00244d1c09acb690cce40d35dbe33845ffb1060a69cd38f036d59a0283ed9b1a70b022e3d57cde5a0 EBUILD kismet-2016.07.1-r2.ebuild 4224 BLAKE2B 810401dfc709c81f55e881cc625d029544f37b454bb1076a902fa38254506fd82e8b1226dab0c2a4b7a58ed580bdc8202fcf9200df8591f67ca48caaa604747c SHA512 1c798255763de2961884ee73abe4c5c2aacdde1f85a36daf01595ba2b04d906d03adff68a81c0f23a4c66db66b6f74cf609c4f4a680627db26cdbf19b9c88bb8 EBUILD kismet-2019.09.1-r1.ebuild 4630 BLAKE2B 9c302952243e30c5002d613d824e266837f80620aec815540fe10bb75ebf7c61d28477f7b3c72331b0396ea50fe51686645e6e71454bf7876686734353f3cc7e SHA512 4cd45d2a225f73880b9c1b3e6f1271c9a8e83458b39aa944e604fef1ac5c3c1334b23823647c8cc5e7ee63602aa88dd8c6af22b662fcfd48bafc0624471a2859 -EBUILD kismet-9999.ebuild 4630 BLAKE2B 9c302952243e30c5002d613d824e266837f80620aec815540fe10bb75ebf7c61d28477f7b3c72331b0396ea50fe51686645e6e71454bf7876686734353f3cc7e SHA512 4cd45d2a225f73880b9c1b3e6f1271c9a8e83458b39aa944e604fef1ac5c3c1334b23823647c8cc5e7ee63602aa88dd8c6af22b662fcfd48bafc0624471a2859 -MISC metadata.xml 1259 BLAKE2B c9c91a87613a3126a81c28e768dbcf37422e04c8679d991ed2149361bf07d43a1dc17e5eaffebbb77bb9e92f2fd316192745e8b3cde04729db12b7dbefd33d26 SHA512 777ea0bad8a04dc4ac303eee0006692aa0107a7c38322b890565fab59288d84932b531145445623af1fa594b762aec627dd00f659b90f1fb595d7b49f6ab20a0 +EBUILD kismet-2019.12.2.ebuild 4806 BLAKE2B eff96d3957f26ff8616d1f4f3e1f1ce05cb16819a07e1d2c6d5894c2410455b57d23db1ce393f8c8b500f5a6699bf64c09b212806ec2714fb3b11cfa3a1a8c0e SHA512 221043f10fc049922646e60c5408626c0b6263f8403effae30f5cbced7b2472122565a3005a9fc56ef6dc9c8be9df8652595b501aa335335560a873987c31dd0 +EBUILD kismet-9999.ebuild 4806 BLAKE2B eff96d3957f26ff8616d1f4f3e1f1ce05cb16819a07e1d2c6d5894c2410455b57d23db1ce393f8c8b500f5a6699bf64c09b212806ec2714fb3b11cfa3a1a8c0e SHA512 221043f10fc049922646e60c5408626c0b6263f8403effae30f5cbced7b2472122565a3005a9fc56ef6dc9c8be9df8652595b501aa335335560a873987c31dd0 +MISC metadata.xml 1545 BLAKE2B c1b1fe5d6f61ca1141bf0bec03e7f416a0c7e8ec2b15aaaefe0cfc763af9c385e791747eeaf6c3d0b83594acbb528e0c6ef4abfcb348edd027d77a5ef720fa83 SHA512 49e887edfcde73eea51e96dad9c648f70f59524fc0e3f6567aeff116bf33ad7b9e57f4e8dcdfd02b0fef524a101f172bf1035437a6138376b0a41f1e8e60af32 diff --git a/net-wireless/kismet/kismet-2019.12.2.ebuild b/net-wireless/kismet/kismet-2019.12.2.ebuild new file mode 100644 index 000000000000..2a02da5e4246 --- /dev/null +++ b/net-wireless/kismet/kismet-2019.12.2.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_6 ) + +inherit autotools eutils multilib user python-single-r1 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://www.kismetwireless.net/git/${PN}.git" + inherit git-r3 + RESTRICT="strip" +else + MY_P=${P/\./-} + MY_P=${MY_P/_beta/-BETA} + MY_P=${MY_P/./-R} + S=${WORKDIR}/${MY_P/BETA/beta} + + #normally we want an official release + SRC_URI="https://www.kismetwireless.net/code/${MY_P}.tar.xz" + + #but sometimes we want a git commit + #COMMIT="6d6d486831c0f7ac712ffb8a3ff122c5063c3b2a" + #SRC_URI="https://github.com/kismetwireless/kismet/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + #S="${WORKDIR}/${PN}-${COMMIT}" + + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" +fi + +DESCRIPTION="IEEE 802.11 wireless LAN sniffer" +HOMEPAGE="https://www.kismetwireless.net" + +LICENSE="GPL-2" +SLOT="0/${PV}" +IUSE="libusb lm-sensors networkmanager +pcre rtlsdr selinux +suid ubertooth" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +CDEPEND=" + ${PYTHON_DEPS} + networkmanager? ( net-misc/networkmanager:= ) + dev-libs/glib:= + dev-libs/elfutils:= + sys-libs/zlib:= + dev-db/sqlite:= + net-libs/libmicrohttpd + kernel_linux? ( sys-libs/libcap + dev-libs/libnl:3 + net-libs/libpcap + ) + libusb? ( virtual/libusb:1 ) + dev-libs/protobuf-c:= + dev-libs/protobuf:= + dev-python/protobuf-python[${PYTHON_USEDEP}] + sys-libs/ncurses:= + lm-sensors? ( sys-apps/lm-sensors ) + pcre? ( dev-libs/libpcre ) + suid? ( sys-libs/libcap ) + ubertooth? ( net-wireless/ubertooth:= ) + " + +DEPEND="${CDEPEND} + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + dev-python/pyserial[${PYTHON_USEDEP}] + selinux? ( sec-policy/selinux-kismet ) +" +PDEPEND="rtlsdr? ( dev-python/numpy[${PYTHON_USEDEP}] + net-wireless/rtl-sdr )" + +src_prepare() { + sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \ + conf/kismet_logging.conf || die + + # Don't strip and set correct mangrp + sed -i -e 's| -s||g' \ + -e 's|@mangrp@|root|g' Makefile.in + + eapply_user + + #just use set to fix setup.py + find . -name "Makefile.in" -exec sed -i 's#setup.py install#setup.py install --root=$(DESTDIR)#' {} + || die + find . -name "Makefile" -exec sed -i 's#setup.py install#setup.py install --root=$(DESTDIR)#' {} + || die + + if [ "${PV}" = "9999" ]; then + eautoreconf + fi +} + +src_configure() { + econf \ + $(use_enable libusb libusb) \ + $(use_enable pcre) \ + $(use_enable lm-sensors lmsensors) \ + $(use_enable networkmanager libnm) \ + $(use_enable ubertooth) \ + --sysconfdir=/etc/kismet \ + --disable-optimization +} + +src_install() { + emake DESTDIR="${D}" commoninstall + python_optimize + emake DESTDIR="${D}" forceconfigs + + insinto /usr/share/${PN} + doins Makefile.inc + + dodoc CHANGELOG README* + newinitd "${FILESDIR}"/${PN}.initd-r3 kismet + newconfd "${FILESDIR}"/${PN}.confd-r2 kismet +} + +pkg_preinst() { + if use suid; then + enewgroup kismet + fowners root:kismet /usr/bin/kismet_cap_linux_bluetooth + fowners root:kismet /usr/bin/kismet_cap_linux_wifi + fowners root:kismet /usr/bin/kismet_cap_pcapfile + # Need to set the permissions after chowning. + # See chown(2) + fperms 4550 /usr/bin/kismet_cap_linux_bluetooth + fperms 4550 /usr/bin/kismet_cap_linux_wifi + fperms 4550 /usr/bin/kismet_cap_pcapfile + elog "Kismet has been installed with a setuid-root helper binary" + elog "to enable minimal-root operation. Users need to be part of" + elog "the 'kismet' group to perform captures from physical devices." + fi + if ! use suid; then + ewarn "It is highly discouraged to run a sniffer as root," + ewarn "Please consider enabling the suid use flag and adding" + ewarn "your user to the kismet group." + fi +} + +migrate_config() { + einfo "Kismet Configuration files are now read from /etc/kismet/" + ewarn "Please keep user specific settings in /etc/kismet/kismet_site.conf" + if [ -n "$(ls ${EROOT}/etc/kismet_*.conf 2> /dev/null)" ]; then + ewarn "Files at /etc/kismet_*.conf will not be read and should be removed" + fi + if [ -f "${EROOT}/etc/kismet_site.conf" ] && [ ! -f "${EROOT}/etc/kismet/kismet_site.conf" ]; then + mv /etc/kismet_site.conf /etc/kismet/kismet_site.conf || die "Failed to migrate kismet_site.conf to new location" + ewarn "Your /etc/kismet_site.conf file has been automatically moved to /etc/kismet/kismet_site.conf" + elif [ -f "${EROOT}/etc/kismet_site.conf" ] && [ -f "${EROOT}/etc/kismet/kismet_site.conf" ]; then + ewarn "Both /etc/kismet_site.conf and /etc/kismet/kismet_site.conf exist, please migrate needed bits" + ewarn "into /etc/kismet/kismet_site.conf and remove /etc/kismet_site.conf" + fi +} + +pkg_postinst() { + if [ -n "${REPLACING_VERSIONS}" ]; then + for v in ${REPLACING_VERSIONS}; do + if ver_test ${v} -lt 2019.07.2 ; then + migrate_config + break + fi + if ver_test ${v} -eq 9999 ; then + migrate_config + break + fi + done + fi +} diff --git a/net-wireless/kismet/kismet-9999.ebuild b/net-wireless/kismet/kismet-9999.ebuild index 01ac8b25a826..2a02da5e4246 100644 --- a/net-wireless/kismet/kismet-9999.ebuild +++ b/net-wireless/kismet/kismet-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -25,7 +25,7 @@ else #SRC_URI="https://github.com/kismetwireless/kismet/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" #S="${WORKDIR}/${PN}-${COMMIT}" - KEYWORDS="amd64 arm ~arm64 ~ppc x86" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" fi DESCRIPTION="IEEE 802.11 wireless LAN sniffer" @@ -33,8 +33,8 @@ HOMEPAGE="https://www.kismetwireless.net" LICENSE="GPL-2" SLOT="0/${PV}" -IUSE="lm-sensors mousejack networkmanager +pcre selinux +suid" -REQUIRED_USE=${PYTHON_REQUIRED_USE} +IUSE="libusb lm-sensors networkmanager +pcre rtlsdr selinux +suid ubertooth" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" CDEPEND=" ${PYTHON_DEPS} @@ -48,7 +48,7 @@ CDEPEND=" dev-libs/libnl:3 net-libs/libpcap ) - mousejack? ( virtual/libusb:1 ) + libusb? ( virtual/libusb:1 ) dev-libs/protobuf-c:= dev-libs/protobuf:= dev-python/protobuf-python[${PYTHON_USEDEP}] @@ -56,6 +56,7 @@ CDEPEND=" lm-sensors? ( sys-apps/lm-sensors ) pcre? ( dev-libs/libpcre ) suid? ( sys-libs/libcap ) + ubertooth? ( net-wireless/ubertooth:= ) " DEPEND="${CDEPEND} @@ -66,6 +67,8 @@ RDEPEND="${CDEPEND} dev-python/pyserial[${PYTHON_USEDEP}] selinux? ( sec-policy/selinux-kismet ) " +PDEPEND="rtlsdr? ( dev-python/numpy[${PYTHON_USEDEP}] + net-wireless/rtl-sdr )" src_prepare() { sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \ @@ -88,10 +91,11 @@ src_prepare() { src_configure() { econf \ + $(use_enable libusb libusb) \ $(use_enable pcre) \ $(use_enable lm-sensors lmsensors) \ - $(use_enable mousejack libusb) \ $(use_enable networkmanager libnm) \ + $(use_enable ubertooth) \ --sysconfdir=/etc/kismet \ --disable-optimization } @@ -133,9 +137,9 @@ pkg_preinst() { migrate_config() { einfo "Kismet Configuration files are now read from /etc/kismet/" - if [ -n "$(ls ${EROOT}/etc/kismet_*.conf)" ]; then + ewarn "Please keep user specific settings in /etc/kismet/kismet_site.conf" + if [ -n "$(ls ${EROOT}/etc/kismet_*.conf 2> /dev/null)" ]; then ewarn "Files at /etc/kismet_*.conf will not be read and should be removed" - ewarn "Please keep user specific settings in /etc/kismet/kismet_site.conf" fi if [ -f "${EROOT}/etc/kismet_site.conf" ] && [ ! -f "${EROOT}/etc/kismet/kismet_site.conf" ]; then mv /etc/kismet_site.conf /etc/kismet/kismet_site.conf || die "Failed to migrate kismet_site.conf to new location" diff --git a/net-wireless/kismet/metadata.xml b/net-wireless/kismet/metadata.xml index e5158f5c107b..db93b745df76 100644 --- a/net-wireless/kismet/metadata.xml +++ b/net-wireless/kismet/metadata.xml @@ -7,6 +7,7 @@ </maintainer> <use> <flag name="client">Build the ncurses-based user interface</flag> + <flag name="libusb">Support libusb based capture sources such as mousejack, cc2540(ble), and nrf51822(ble)</flag> <flag name="suid"> Install a setuid root helper binary with limited functionality; this allows running kismet as a normal user, significantly @@ -21,6 +22,8 @@ <flag name="plugin-ptw">Build the ptw plugin</flag> <flag name="plugin-spectools">Build the spectools plugin. This uses <pkg>net-wireless/spectools</pkg></flag> <flag name="plugin-syslog">Build the syslog plugin.</flag> + <flag name="rtlsdr">Enable rtlsdr based kismet capture sources</flag> <flag name="ruby">Build extras which are written in ruby, example plugins and the like.</flag> + <flag name="ubertooth">Enable capture source for ubertooth to sniff bluetooth low energy</flag> </use> </pkgmetadata> |