diff --git a/net-wireless/kismet/Manifest b/net-wireless/kismet/Manifest new file mode 100644 index 000000000..3cb3142f7 --- /dev/null +++ b/net-wireless/kismet/Manifest @@ -0,0 +1,3 @@ +AUX kismet.confd 403 SHA256 d2f5bb606e4dac45c8de27843ab460b9dac02e83979e52e1b8b3ca3af841adeb SHA512 232801f085980d464df831af8c73fa9c4274b44dd45118938cdf9048e0d54cdcc386aec6749e7a1b2c00b73739ab8bb51ff5dadf8cc1866ce2207e28c4e25b71 WHIRLPOOL 51e1ccf14cca8533525f038a6b6755233e3f4e65486952b09f80372756ac128d4359f3061fb97348673a5a7dfc595e3b63bfef2db5be4814f2b2cf76b2ee1de9 +AUX kismet.initd 742 SHA256 b4420c22264ff3604bf956b65bca5b564cbb70676c3f48d5e444f3aa6687a624 SHA512 3346b113f4370097c1638970b70a918f70b49d6db77bef627dbb5ccea8eed1e02d47f57414beaef163475ecf785d27b77a6501f4917ea9fe62a043c3f39fc3ae WHIRLPOOL 1e4de7b8012fa5f3b7d0e1ad704f4383cf5c3110d22ff9e54b292d7792b52a289e9e58fec26d6893f1a084e1501c9eaff728b435468a9f5c67b7cac6848b9e39 +EBUILD kismet-2013.03.1.ebuild 4138 SHA256 ee16fdfb40f231a6301db43c95284da61df68cb579a10cceb0f31d20fb56fd4b SHA512 ba6dadf7ead68e0f4739dfdf8dfeb92465ad4afe570e44ef935d955fc620ca1496ebeb62a22a69c59e41e96fc61b3ca125f4813bda486294aeed54e8c374d8eb WHIRLPOOL c967dbcc1c1f209a84cd7d509b3b6c59302ca1f8ba79170835cd37619b7cff3ab8557969272abbcbc927afd245ca5522bdd5546f90d1b6bf874f0d4ddc58c05b diff --git a/net-wireless/kismet/files/kismet.confd b/net-wireless/kismet/files/kismet.confd new file mode 100644 index 000000000..d203513c7 --- /dev/null +++ b/net-wireless/kismet/files/kismet.confd @@ -0,0 +1,12 @@ +# /etc/conf.d/kismet - configuration file for /etc/init.d/kismet + +# Kismet configuration is done in /etc/kismet.conf + +# To use the kismet init script, you must have "logtemplate" set to a location +# that is writable by the user assigned by "suiduser". +# e.g. +# suiduser=foo +# logtemplate=%h/kismet_log/%n-%d-%i.%l + +# Options to pass to kismet_server, see `kismet_server --help` +KISMET_SERVER_OPTIONS="" diff --git a/net-wireless/kismet/files/kismet.initd b/net-wireless/kismet/files/kismet.initd new file mode 100644 index 000000000..e18dd0106 --- /dev/null +++ b/net-wireless/kismet/files/kismet.initd @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/files/kismet.initd,v 1.1 2008/08/11 16:57:47 armin76 Exp $ + +checkconfig() { + if [ ! -e /etc/kismet.conf ]; then + eerror "Configuration file /etc/kismet.conf not found" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting kismet server" + start-stop-daemon --start --quiet --pidfile /var/run/kismet_server.pid \ + --background --make-pidfile --exec /usr/bin/kismet_server \ + -- ${KISMET_SERVER_OPTIONS} + eend ${?} +} + +stop() { + ebegin "Stopping kismet server" + start-stop-daemon --stop --quiet --pidfile /var/run/kismet_server.pid + eend ${?} +} diff --git a/net-wireless/kismet/kismet-2013.03.1.ebuild b/net-wireless/kismet/kismet-2013.03.1.ebuild new file mode 100644 index 000000000..585335904 --- /dev/null +++ b/net-wireless/kismet/kismet-2013.03.1.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/kismet-9999.ebuild,v 1.7 2013/02/08 06:20:07 zerochaos Exp $ + +EAPI=5 + +inherit eutils multilib user + +MY_P=${P/\./-} +MY_P=${MY_P/./-R} +S=${WORKDIR}/${MY_P} + + EGIT_BRANCH="Kismet-2013-03-R1" + EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git" + SRC_URI="" + inherit git-2 + KEYWORDS="" + +DESCRIPTION="IEEE 802.11 wireless LAN sniffer" +HOMEPAGE="http://www.kismetwireless.net/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+client +pcre speech +plugin-autowep plugin-btscan plugin-dot15d4 +plugin-ptw plugin-spectools +plugin-syslog +ruby +suid" + +RDEPEND="net-wireless/wireless-tools + kernel_linux? ( sys-libs/libcap + dev-libs/libnl:3 + net-libs/libpcap[-netlink] ) + pcre? ( dev-libs/libpcre ) + suid? ( sys-libs/libcap ) + client? ( sys-libs/ncurses ) + !arm? ( speech? ( app-accessibility/flite ) ) + ruby? ( dev-lang/ruby ) + plugin-btscan? ( net-wireless/bluez ) + plugin-dot15d4? ( virtual/libusb:0 ) + plugin-spectools? ( net-wireless/spectools )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \ + conf/kismet.conf.in + + # Don't strip and set correct mangrp + sed -i -e 's| -s||g' \ + -e 's|@mangrp@|root|g' Makefile.in +} + +src_configure() { + econf \ + $(use_enable client) \ + $(use_enable pcre) +} + +src_compile() { + emake + + if use plugin-autowep; then + cd "${S}"/plugin-autowep + KIS_SRC_DIR="${S}" emake + fi + if use plugin-btscan; then + cd "${S}"/plugin-btscan + KIS_SRC_DIR="${S}" emake + fi + if use plugin-dot15d4; then + cd "${S}"/plugin-dot15d4 + KIS_SRC_DIR="${S}" emake + fi + if use plugin-ptw; then + cd "${S}"/plugin-ptw + KIS_SRC_DIR="${S}" emake + fi + if use plugin-spectools; then + cd "${S}"/plugin-spectools + KIS_SRC_DIR="${S}" emake + fi + if use plugin-syslog; then + cd "${S}"/plugin-syslog + KIS_SRC_DIR="${S}" emake + fi +} + +src_install() { + if use plugin-autowep; then + cd "${S}"/plugin-autowep + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use plugin-btscan; then + cd "${S}"/plugin-btscan + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use plugin-dot15d4; then + cd "${S}"/plugin-dot15d4 + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use plugin-ptw; then + cd "${S}"/plugin-ptw + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use plugin-spectools; then + cd "${S}"/plugin-spectools + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use plugin-syslog; then + cd "${S}"/plugin-syslog + KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install + fi + if use ruby; then + cd "${S}"/ruby + dobin *.rb + fi + + cd "${S}" + emake DESTDIR="${D}" commoninstall + + ##dragorn would prefer I set fire to my head than do this, but it works + ##all external kismet plugins (read: kismet-ubertooth) must be rebuilt when kismet is + ##is there an automatic way to force this? + # install headers for external plugins + insinto /usr/include/kismet + doins *.h + doins Makefile.inc + #todo write a plugin finder that tells you what needs to be rebuilt when kismet is updated, etc + + dodoc CHANGELOG RELEASENOTES.txt README* docs/DEVEL.client docs/README.newcore + newinitd "${FILESDIR}"/${PN}.initd kismet + newconfd "${FILESDIR}"/${PN}.confd kismet + + insinto /etc + doins conf/kismet{,_drone}.conf + + if use suid; then + dobin kismet_capture + fi +} + +pkg_preinst() { + if use suid; then + enewgroup kismet + fowners root:kismet /usr/bin/kismet_capture + # Need to set the permissions after chowning. + # See chown(2) + fperms 4550 /usr/bin/kismet_capture + 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 +}