diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-wireless/kismet | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-wireless/kismet')
-rw-r--r-- | net-wireless/kismet/Manifest | 1 | ||||
-rw-r--r-- | net-wireless/kismet/files/bluechanfix_r3184.patch | 15 | ||||
-rw-r--r-- | net-wireless/kismet/files/header_alignment_r3326.patch | 58 | ||||
-rw-r--r-- | net-wireless/kismet/files/kismet-2011.03.2-cflags-backport.patch | 115 | ||||
-rw-r--r-- | net-wireless/kismet/files/kismet-2013.03.1-tinfo.patch | 11 | ||||
-rw-r--r-- | net-wireless/kismet/files/kismet-console-scrolling-backport.patch | 12 | ||||
-rw-r--r-- | net-wireless/kismet/files/kismet.confd | 12 | ||||
-rw-r--r-- | net-wireless/kismet/files/kismet.initd | 27 | ||||
-rw-r--r-- | net-wireless/kismet/files/makefile.patch | 119 | ||||
-rw-r--r-- | net-wireless/kismet/files/plugins-ldflags.patch | 10 | ||||
-rw-r--r-- | net-wireless/kismet/files/ruby19_fixes.patch | 85 | ||||
-rw-r--r-- | net-wireless/kismet/files/update-kismet_shootout.patch | 103 | ||||
-rw-r--r-- | net-wireless/kismet/files/use-hostname-by-default.patch | 29 | ||||
-rw-r--r-- | net-wireless/kismet/kismet-2013.03.1-r2.ebuild | 174 | ||||
-rw-r--r-- | net-wireless/kismet/kismet-9999.ebuild | 167 | ||||
-rw-r--r-- | net-wireless/kismet/metadata.xml | 31 |
16 files changed, 969 insertions, 0 deletions
diff --git a/net-wireless/kismet/Manifest b/net-wireless/kismet/Manifest new file mode 100644 index 00000000000..0f38cd0d17b --- /dev/null +++ b/net-wireless/kismet/Manifest @@ -0,0 +1 @@ +DIST kismet-2013-03-R1.tar.gz 899372 SHA256 1c1e9f6b550de1f248363d4c9ce1d24fdc20d041ead5a53cec88eb1b07353082 SHA512 7e992f5ef3db4c5fa298bd4aabfe216668baade948b83996850c010c6c92bfa2fea37d7006a532eb6bace015624f536cc45ed8b3b3ed4a6a1cac7a137ac86d36 WHIRLPOOL 694796f7dd0f4ffd70e64d67eba30bf7b206189dadb8e773a302af9f417a8219b45e547bfcaf59db3f502e0f5ab18af6d642e66dbe8277d8af48daeb35b40843 diff --git a/net-wireless/kismet/files/bluechanfix_r3184.patch b/net-wireless/kismet/files/bluechanfix_r3184.patch new file mode 100644 index 00000000000..bdc05cb0b51 --- /dev/null +++ b/net-wireless/kismet/files/bluechanfix_r3184.patch @@ -0,0 +1,15 @@ +Index: packetsourcetracker.cc +=================================================================== +--- packetsourcetracker.cc (revision 3183) ++++ packetsourcetracker.cc (working copy) +@@ -151,7 +151,10 @@ + break; + + case SOURCE_channel: +- osstr << psrc->channel; ++ if (psrc->strong_source != NULL) ++ osstr << psrc->strong_source->FetchChannel(); ++ else ++ osstr << psrc->channel; + cache->Cache(fnum, osstr.str()); + break; diff --git a/net-wireless/kismet/files/header_alignment_r3326.patch b/net-wireless/kismet/files/header_alignment_r3326.patch new file mode 100644 index 00000000000..408456ecafe --- /dev/null +++ b/net-wireless/kismet/files/header_alignment_r3326.patch @@ -0,0 +1,58 @@ +diff -Naur kismet-2011-03-R2-orig/packetsource_pcap.cc kismet-2011-03-R2/packetsource_pcap.cc +--- kismet-2011-03-R2-orig/packetsource_pcap.cc 2011-01-05 16:52:51.000000000 -0500 ++++ kismet-2011-03-R2/packetsource_pcap.cc 2012-02-20 22:37:17.973526919 -0500 +@@ -553,6 +553,9 @@ + } + #endif + ++#define ALIGN_OFFSET(offset, width) \ ++ ( (((offset) + ((width) - 1)) & (~((width) - 1))) - offset ) ++ + /* + * Useful combinations of channel characteristics. + */ +@@ -617,6 +620,8 @@ + enum ieee80211_radiotap_type bit; + int bit0; + const u_char *iter; ++ const u_char *iter_start; ++ unsigned int iter_align; + int fcs_cut = 0; // Is the FCS bit set? + char errstr[STATUS_MAX]; + +@@ -658,7 +663,7 @@ + + eight11chunk->dlt = KDLT_IEEE802_11; + +- iter = (u_char*)(last_presentp + 1); ++ iter_start = iter = (u_char*)(last_presentp + 1); + + for (bit0 = 0, presentp = &hdr->it_present; presentp <= last_presentp; + presentp++, bit0 += 32) { +@@ -686,6 +691,9 @@ + u.i8 = *iter++; + break; + case IEEE80211_RADIOTAP_CHANNEL: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2); ++ iter += iter_align; ++ + u.u16 = EXTRACT_LE_16BITS(iter); + iter += sizeof(u.u16); + u2.u16 = EXTRACT_LE_16BITS(iter); +@@ -695,10 +703,16 @@ + case IEEE80211_RADIOTAP_LOCK_QUALITY: + case IEEE80211_RADIOTAP_TX_ATTENUATION: + case IEEE80211_RADIOTAP_DB_TX_ATTENUATION: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2); ++ iter += iter_align; ++ + u.u16 = EXTRACT_LE_16BITS(iter); + iter += sizeof(u.u16); + break; + case IEEE80211_RADIOTAP_TSFT: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 8); ++ iter += iter_align; ++ + u.u64 = EXTRACT_LE_64BITS(iter); + iter += sizeof(u.u64); + break; diff --git a/net-wireless/kismet/files/kismet-2011.03.2-cflags-backport.patch b/net-wireless/kismet/files/kismet-2011.03.2-cflags-backport.patch new file mode 100644 index 00000000000..2ef2a6b59df --- /dev/null +++ b/net-wireless/kismet/files/kismet-2011.03.2-cflags-backport.patch @@ -0,0 +1,115 @@ +diff -Naur kismet-2011-03-R2/plugin-autowep/Makefile kismet-2011-03-R2-cflags/plugin-autowep/Makefile +--- kismet-2011-03-R2/plugin-autowep/Makefile 2012-07-23 12:58:09.961131948 -0400 ++++ kismet-2011-03-R2-cflags/plugin-autowep/Makefile 2012-07-23 13:00:04.544135017 -0400 +@@ -12,6 +12,7 @@ + PLUGINLDFLAGS += -shared -rdynamic + LIBS += -lstdc++ + CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC ++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC + + PLUGOBJS = autowep-kismet.o + PLUGOUT = autowep-kismet.so +@@ -34,9 +35,9 @@ + @-rm -f *.so + + .c.o: +- $(CC) $(CFLAGS) -c $*.c -o $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@ + + .cc.o: +- $(CXX) $(CFLAGS) -c $*.cc -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@ + + .SUFFIXES: .c .cc .o +diff -Naur kismet-2011-03-R2/plugin-btscan/Makefile kismet-2011-03-R2-cflags/plugin-btscan/Makefile +--- kismet-2011-03-R2/plugin-btscan/Makefile 2012-07-23 12:58:09.962131948 -0400 ++++ kismet-2011-03-R2-cflags/plugin-btscan/Makefile 2012-07-23 13:02:33.016138993 -0400 +@@ -12,6 +12,7 @@ + PLUGINLDFLAGS += -shared -rdynamic + LIBS += -lstdc++ -lbluetooth -lpthread -lncurses -lpanel + CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC ++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC + + SRVOBJS = packetsource_linuxbt.o tracker_btscan.o dumpfile_btscantxt.o kismet_btscan.o + SRVOUT = btscan.so +@@ -44,9 +45,9 @@ + @-rm -f *.so + + .c.o: +- $(CC) $(CFLAGS) -c $*.c -o $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@ + + .cc.o: +- $(CXX) $(CFLAGS) -c $*.cc -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@ + + .SUFFIXES: .c .cc .o +diff -Naur kismet-2011-03-R2/plugin-dot15d4/Makefile kismet-2011-03-R2-cflags/plugin-dot15d4/Makefile +--- kismet-2011-03-R2/plugin-dot15d4/Makefile 2012-07-23 12:58:09.962131948 -0400 ++++ kismet-2011-03-R2-cflags/plugin-dot15d4/Makefile 2012-07-23 13:03:17.209140176 -0400 +@@ -12,6 +12,7 @@ + PLUGINLDFLAGS += -shared -rdynamic + LIBS += -lstdc++ -lusb -lpthread + CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC ++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC + + SRVOBJS = packetsource_raven.o packetsource_serialdev.o \ + packet_dot15d4.o packet_dot15d4_types.o \ +@@ -39,9 +40,9 @@ + @-rm -f *.so + + .c.o: +- $(CC) $(CFLAGS) -c $*.c -o $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@ + + .cc.o: +- $(CXX) $(CFLAGS) -c $*.cc -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@ + + .SUFFIXES: .c .cc .o +diff -Naur kismet-2011-03-R2/plugin-ptw/Makefile kismet-2011-03-R2-cflags/plugin-ptw/Makefile +--- kismet-2011-03-R2/plugin-ptw/Makefile 2012-07-23 12:58:09.963131948 -0400 ++++ kismet-2011-03-R2-cflags/plugin-ptw/Makefile 2012-07-23 13:04:25.764142014 -0400 +@@ -12,6 +12,7 @@ + PLUGINLDFLAGS += -shared -rdynamic + LIBS += -lstdc++ -lssl -lpthread -lcrypto + CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC ++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC + + PLUGOBJS = aircrack-crypto.o aircrack-ptw2-lib.o aircrack-kismet.o + PLUGOUT = aircrack-kismet.so +@@ -34,9 +35,9 @@ + @-rm -f *.so + + .c.o: +- $(CC) $(CFLAGS) -c $*.c -o $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@ + + .cc.o: +- $(CXX) $(CFLAGS) -c $*.cc -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@ + + .SUFFIXES: .c .cc .o +diff -Naur kismet-2011-03-R2/plugin-spectools/Makefile kismet-2011-03-R2-cflags/plugin-spectools/Makefile +--- kismet-2011-03-R2/plugin-spectools/Makefile 2012-07-23 12:58:09.963131948 -0400 ++++ kismet-2011-03-R2-cflags/plugin-spectools/Makefile 2012-07-23 13:05:12.121143257 -0400 +@@ -12,6 +12,7 @@ + PLUGINLDFLAGS += -shared -rdynamic + LIBS += -lstdc++ + CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC ++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -g -fPIC + + CLIOBJS = spectools_ui.o + CLIOUT = spectools_ui.so +@@ -44,9 +45,9 @@ + @-rm -f *.so + + .c.o: +- $(CC) $(CFLAGS) -c $*.c -o $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@ + + .cc.o: +- $(CXX) $(CFLAGS) -c $*.cc -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@ + + .SUFFIXES: .c .cc .o diff --git a/net-wireless/kismet/files/kismet-2013.03.1-tinfo.patch b/net-wireless/kismet/files/kismet-2013.03.1-tinfo.patch new file mode 100644 index 00000000000..ac1a3900447 --- /dev/null +++ b/net-wireless/kismet/files/kismet-2013.03.1-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -423,6 +423,8 @@ + foundlcurses=yes curseaux="-lcurses" termcontrol="curses" ) + fi + ++ AC_SEARCH_LIBS([stdscr], tinfo ncurses,curseaux="$curseaux $ac_res") ++ + if test "$foundlcurses" != "yes"; then + AC_MSG_ERROR(Failed to find libcurses or libncurses. Install them or disable building the Kismet client with --disable-client. Disabling the client is probably not something you want to do normally.) + fi diff --git a/net-wireless/kismet/files/kismet-console-scrolling-backport.patch b/net-wireless/kismet/files/kismet-console-scrolling-backport.patch new file mode 100644 index 00000000000..01baea0bb73 --- /dev/null +++ b/net-wireless/kismet/files/kismet-console-scrolling-backport.patch @@ -0,0 +1,12 @@ +diff -Naur kismet-2011-03-R2-orig/kis_panel_windows.cc kismet-2011-03-R2/kis_panel_windows.cc +--- kismet-2011-03-R2-orig/kis_panel_windows.cc 2011-03-02 17:04:05.000000000 -0500 ++++ kismet-2011-03-R2/kis_panel_windows.cc 2012-02-07 11:53:39.634360668 -0500 +@@ -1936,7 +1936,7 @@ + + // Import the existing console + constext->SetFollowTail(1); +- constext->SetMaxText(50); ++ constext->SetMaxText(250); + if (kpinterface->FetchServerFramework() == NULL) { + constext->SetText("Kismet server not started (or not started via this client)"); + textcb = -1; diff --git a/net-wireless/kismet/files/kismet.confd b/net-wireless/kismet/files/kismet.confd new file mode 100644 index 00000000000..d203513c714 --- /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 00000000000..3e6863483fa --- /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 +# $Id$ + +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/files/makefile.patch b/net-wireless/kismet/files/makefile.patch new file mode 100644 index 00000000000..5580c58346f --- /dev/null +++ b/net-wireless/kismet/files/makefile.patch @@ -0,0 +1,119 @@ +diff -Naur kismet-2011-03-R2-orig/plugin-autowep/Makefile kismet-2011-03-R2/plugin-autowep/Makefile +--- kismet-2011-03-R2-orig/plugin-autowep/Makefile 2009-11-05 21:50:32.000000000 -0500 ++++ kismet-2011-03-R2/plugin-autowep/Makefile 2011-05-31 21:15:06.000000000 -0400 +@@ -1,6 +1,7 @@ + # You will need kismet newcore sources + KIS_SRC_DIR ?= /usr/src/kismet + KIS_INC_DIR ?= $(KIS_SRC_DIR) ++LIBDIR ?= /lib + + include $(KIS_SRC_DIR)/Makefile.inc + +@@ -21,8 +22,8 @@ + $(LD) $(PLUGINLDFLAGS) $(PLUGOBJS) -o $(PLUGOUT) $(LIBS) + + install: $(PLUGOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^ ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/$^ + + userinstall: $(PLUGOUT) + mkdir -p ${HOME}/.kismet/plugins/ +diff -Naur kismet-2011-03-R2-orig/plugin-btscan/Makefile kismet-2011-03-R2/plugin-btscan/Makefile +--- kismet-2011-03-R2-orig/plugin-btscan/Makefile 2010-04-28 15:31:26.000000000 -0400 ++++ kismet-2011-03-R2/plugin-btscan/Makefile 2011-05-31 21:23:55.000000000 -0400 +@@ -1,6 +1,7 @@ + # You will need kismet newcore sources + KIS_SRC_DIR ?= /usr/src/kismet + KIS_INC_DIR ?= $(KIS_SRC_DIR) ++LIBDIR ?= /lib + + include $(KIS_SRC_DIR)/Makefile.inc + +@@ -27,10 +28,10 @@ + $(LD) $(PLUGINLDFLAGS) $(SRVOBJS) -o $(SRVOUT) $(LIBS) + + install: $(SRVOUT) $(CLIOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/lib/kismet/$(SRVOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet_client/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(CLIOUT) $(DESTDIR)$(prefix)/lib/kismet_client/$(CLIOUT) ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/$(SRVOUT) ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet_client/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(CLIOUT) $(DESTDIR)$(prefix)/$(LIBDIR)/kismet_client/$(CLIOUT) + + userinstall: $(SRVOUT) $(CLIOUT) + mkdir -p ${HOME}/.kismet/plugins/ +diff -Naur kismet-2011-03-R2-orig/plugin-dot15d4/Makefile kismet-2011-03-R2/plugin-dot15d4/Makefile +--- kismet-2011-03-R2-orig/plugin-dot15d4/Makefile 2010-07-29 20:59:16.000000000 -0400 ++++ kismet-2011-03-R2/plugin-dot15d4/Makefile 2011-05-31 21:17:25.000000000 -0400 +@@ -1,6 +1,7 @@ + # You will need kismet newcore sources + KIS_SRC_DIR ?= /usr/src/kismet + KIS_INC_DIR ?= $(KIS_SRC_DIR) ++LIBDIR ?= /lib + + include $(KIS_SRC_DIR)/Makefile.inc + +@@ -26,8 +27,8 @@ + $(LD) $(PLUGINLDFLAGS) $(SRVOBJS) -o $(SRVOUT) $(LIBS) + + install: $(SRVOUT) $(CLIOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/lib/kismet/$(SRVOUT) ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/$(SRVOUT) + + userinstall: $(SRVOUT) $(CLIOUT) + mkdir -p ${HOME}/.kismet/plugins/ +diff -Naur kismet-2011-03-R2-orig/plugin-ptw/Makefile kismet-2011-03-R2/plugin-ptw/Makefile +--- kismet-2011-03-R2-orig/plugin-ptw/Makefile 2010-04-28 15:31:26.000000000 -0400 ++++ kismet-2011-03-R2/plugin-ptw/Makefile 2011-05-31 21:18:14.000000000 -0400 +@@ -1,6 +1,7 @@ + # You will need kismet newcore sources + KIS_SRC_DIR ?= /usr/src/kismet + KIS_INC_DIR ?= $(KIS_SRC_DIR) ++LIBDIR ?= /lib + + include $(KIS_SRC_DIR)/Makefile.inc + +@@ -21,9 +22,8 @@ + $(LD) $(PLUGINLDFLAGS) $(PLUGOBJS) -o $(PLUGOUT) $(LIBS) + + install: $(PLUGOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^ ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/$^ + + userinstall: $(PLUGOUT) + mkdir -p ${HOME}/.kismet/plugins/ +diff -Naur kismet-2011-03-R2-orig/plugin-spectools/Makefile kismet-2011-03-R2/plugin-spectools/Makefile +--- kismet-2011-03-R2-orig/plugin-spectools/Makefile 2010-01-07 18:33:30.000000000 -0500 ++++ kismet-2011-03-R2/plugin-spectools/Makefile 2011-05-31 21:19:09.000000000 -0400 +@@ -1,6 +1,7 @@ + # You will need kismet newcore sources + KIS_SRC_DIR ?= /usr/src/kismet + KIS_INC_DIR ?= $(KIS_SRC_DIR) ++LIBDIR ?= /lib + + include $(KIS_SRC_DIR)/Makefile.inc + +@@ -27,10 +28,10 @@ + $(LD) $(PLUGINLDFLAGS) $(SRVOBJS) -o $(SRVOUT) $(LIBS) + + install: $(SRVOUT) $(CLIOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/lib/kismet/$(SRVOUT) +- mkdir -p $(DESTDIR)$(prefix)/lib/kismet_client/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(CLIOUT) $(DESTDIR)$(prefix)/lib/kismet_client/$(CLIOUT) ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(SRVOUT) $(DESTDIR)$(prefix)/$(LIBDIR)/kismet/$(SRVOUT) ++ mkdir -p $(DESTDIR)$(prefix)/$(LIBDIR)/kismet_client/ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(CLIOUT) $(DESTDIR)$(prefix)/$(LIBDIR)/kismet_client/$(CLIOUT) + + userinstall: $(SRVOUT) $(CLIOUT) + mkdir -p ${HOME}/.kismet/plugins/ diff --git a/net-wireless/kismet/files/plugins-ldflags.patch b/net-wireless/kismet/files/plugins-ldflags.patch new file mode 100644 index 00000000000..001ab78dab0 --- /dev/null +++ b/net-wireless/kismet/files/plugins-ldflags.patch @@ -0,0 +1,10 @@ +diff -Naur kismet-2011-03-R2-orig/Makefile.inc.in kismet-2011-03-R2/Makefile.inc.in +--- kismet-2011-03-R2-orig/Makefile.inc.in 2009-11-05 21:43:30.000000000 -0500 ++++ kismet-2011-03-R2/Makefile.inc.in 2011-06-01 00:13:13.000000000 -0400 +@@ -38,5 +38,5 @@ + MAN = ${DESTDIR}@mandir@ + WAV = ${SHARE}/wav/ + +-PLUGINLDFLAGS = @PLUGINLDFLAGS@ ++PLUGINLDFLAGS = @LDFLAGS@ @PLUGINLDFLAGS@ + diff --git a/net-wireless/kismet/files/ruby19_fixes.patch b/net-wireless/kismet/files/ruby19_fixes.patch new file mode 100644 index 00000000000..28b704d03c6 --- /dev/null +++ b/net-wireless/kismet/files/ruby19_fixes.patch @@ -0,0 +1,85 @@ +commit 09b5076e4cd8338d3b45a760662fc7347f8d93bf +Author: Mike Kershaw / Dragorn <dragorn@kismetwireless.net> +Date: Tue Apr 23 10:33:07 2013 -0400 + + Ruby 1.9 removed '.' from search path, use require_relative; also remove + spurious 'break' in tx code + +diff --git a/ruby/kismet.rb b/ruby/kismet.rb +index 5b18b23..7eab708 100755 +--- a/ruby/kismet.rb ++++ b/ruby/kismet.rb +@@ -61,8 +61,6 @@ class Kismet + rescue Exception => e + pp e + +- break if @die +- + puts "write error: #{$!}" + end + end +diff --git a/ruby/kismet_addsource.rb b/ruby/kismet_addsource.rb +index 057a514..d3ae968 100755 +--- a/ruby/kismet_addsource.rb ++++ b/ruby/kismet_addsource.rb +@@ -20,7 +20,7 @@ + + require 'socket' + require 'time' +-require 'kismet' ++require_relative 'kismet' + require 'pp' + require 'optparse' + +diff --git a/ruby/kismet_alert_syslog.rb b/ruby/kismet_alert_syslog.rb +index 6969247..27373a9 100755 +--- a/ruby/kismet_alert_syslog.rb ++++ b/ruby/kismet_alert_syslog.rb +@@ -20,7 +20,7 @@ + + require 'socket' + require 'time' +-require 'kismet' ++require_relative 'kismet' + require 'pp' + require "getopt/long" + require 'syslog' +diff --git a/ruby/kismet_list.rb b/ruby/kismet_list.rb +index ec8f0f9..7adffe6 100755 +--- a/ruby/kismet_list.rb ++++ b/ruby/kismet_list.rb +@@ -20,7 +20,7 @@ + + require 'socket' + require 'time' +-require 'kismet' ++require_relative 'kismet' + + def bssidcb(proto, fields) + puts "Kismet saw network #{fields['bssid']} manuf #{fields['manuf']} on channel #{fields['channel']}" +diff --git a/ruby/kismet_shootout.rb b/ruby/kismet_shootout.rb +index accda7e..931360f 100755 +--- a/ruby/kismet_shootout.rb ++++ b/ruby/kismet_shootout.rb +@@ -21,7 +21,7 @@ + + require 'socket' + require 'time' +-require 'kismet' ++require_relative 'kismet' + require 'pp' + require 'optparse' + +diff --git a/ruby/kismet_sql.rb b/ruby/kismet_sql.rb +index 9fe581d..b878979 100755 +--- a/ruby/kismet_sql.rb ++++ b/ruby/kismet_sql.rb +@@ -22,7 +22,7 @@ + + require 'socket' + require 'time' +-require 'kismet' ++require_relative 'kismet' + require 'pp' + require "getopt/long" + require "sqlite3" diff --git a/net-wireless/kismet/files/update-kismet_shootout.patch b/net-wireless/kismet/files/update-kismet_shootout.patch new file mode 100644 index 00000000000..57ff69f7bec --- /dev/null +++ b/net-wireless/kismet/files/update-kismet_shootout.patch @@ -0,0 +1,103 @@ +From 0ee73bd14c71e44ce53bc1016b871dcb6965e443 Mon Sep 17 00:00:00 2001 +From: "Rick Farina (Zero_Chaos)" <zerochaos@gentoo.org> +Date: Tue, 17 Mar 2015 12:57:16 -0400 +Subject: [PATCH] update kismet_shootout + +make a little more detailed, 100.00 instead of 100. +also extend space for name now that wlan0mon is a common interface name +--- + ruby/kismet_shootout.rb | 30 +++++++++++++++++++++++------- + 1 file changed, 23 insertions(+), 7 deletions(-) + +diff --git a/ruby/kismet_shootout.rb b/ruby/kismet_shootout.rb +index 931360f..61f70b0 100755 +--- a/ruby/kismet_shootout.rb ++++ b/ruby/kismet_shootout.rb +@@ -48,7 +48,7 @@ $lines_per_header = 10 + $num_printed = 10 + + # output type (std, pretty, csv) +-$output_type = "std" ++$output_type = "pretty" + + def sourcecb(proto, fields) + if fields["error"] != "0" +@@ -102,11 +102,11 @@ def sourcecb(proto, fields) + hstr = "" + + if $output_type == "pretty" +- hstr = sprintf("%s %6.6s %5.5s %8.8s %4.4s", hstr, "", "PPS", "Packets", "Pcnt") ++ hstr = sprintf("%s %8.8s %5.5s %8.8s %7.7s", hstr, "Name", "PPS", "Packets", "Percent") + + else + $cards.each { |c| +- hstr = sprintf("%s %6.6s %5.5s %8.8s %4.4s", hstr, c, "PPS", "Total", "Pcnt") ++ hstr = sprintf("%s %8.8s %5.5s %8.8s %7.7s", hstr, c, "PPS", "Total", "Percent") + } + end + +@@ -141,7 +141,7 @@ def sourcecb(proto, fields) + $card_records.each { |cr| + cr[1]["printed"] = 1 + +- printf(" %6.6s %5.5s %8.8s %3d%%\n", cr[1]["interface"], cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100) ++ printf(" %8.8s %5.5s %8.8s %6.2f%%\n", cr[1]["interface"], cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100) + } + + t = Time.now.to_i - $start_time +@@ -163,7 +163,7 @@ def sourcecb(proto, fields) + tu += "#{t}s" + end + +- printf(" %6.6s %5.5s %8.8s %4.4s %6.6s %6.6s\n", "", "", "", "", total - lasttotal, tu) ++ printf(" %8.8s %5.5s %8.8s %7.7s %6.6s %6.6s\n", "", "", "", "", total - lasttotal, tu) + else + $card_records.each { |cr| + cr[1]["printed"] = 1 +@@ -171,7 +171,7 @@ def sourcecb(proto, fields) + cname = "" + cname = cr[1]["interface"] if $output_type == "pretty" + +- str = sprintf("%s %6.6s %5.5s %8.8s %3d%%", str, cname, cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100) ++ str = sprintf("%s %8.8s %5.5s %8.8s %6.2f%%", str, cname, cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100) + } + + t = Time.now.to_i - $start_time +@@ -282,10 +282,18 @@ OptionParser.new do |opts| + options[:channel] = c + end + +- opts.on("--pretty", "Format output with pretty ANSI codes") do ++ opts.on("--pretty", "Format output with pretty ANSI codes (default)") do + options[:pretty] = true + end + ++ opts.on("--std", "Do not format output with pretty ANSI codes") do ++ options[:std] = true ++ end ++ ++ #opts.on("--csv", "Format output as comma separated values") do ++ # options[:csv] = true ++ #end ++ + end.parse! + + if options[:host] +@@ -315,6 +323,14 @@ if options[:pretty] + $output_type = "pretty" + end + ++if options[:std] ++ $output_type = "std" ++end ++ ++if options[:csv] ++ $output_type = "csv" ++end ++ + $cards = ARGV + + puts "INFO: Kismet NIC Shootout" +-- +2.0.5 + diff --git a/net-wireless/kismet/files/use-hostname-by-default.patch b/net-wireless/kismet/files/use-hostname-by-default.patch new file mode 100644 index 00000000000..0f867da10d2 --- /dev/null +++ b/net-wireless/kismet/files/use-hostname-by-default.patch @@ -0,0 +1,29 @@ +diff -ruN kismet-2011-03-R2.orig/conf/kismet.conf.in kismet-2011-03-R2/conf/kismet.conf.in +--- kismet-2011-03-R2.orig/conf/kismet.conf.in 2012-05-22 21:33:23.371718460 -0500 ++++ kismet-2011-03-R2/conf/kismet.conf.in 2012-05-22 21:43:08.641691490 -0500 +@@ -7,7 +7,8 @@ + version=2009-newcore + + # Name of server (Purely for organizational purposes) +-servername=Kismet_2009 ++# If commented out, defaults to host name of system ++#servername=Kismet_Server + + # Prefix of where we log (as used in the logtemplate later) + # logprefix=/some/path/to/logs +diff -ruN kismet-2011-03-R2.orig/kismet_server.cc kismet-2011-03-R2/kismet_server.cc +--- kismet-2011-03-R2.orig/kismet_server.cc 2011-03-03 23:34:42.000000000 -0600 ++++ kismet-2011-03-R2/kismet_server.cc 2012-05-22 21:42:31.319693185 -0500 +@@ -897,7 +897,11 @@ + } + + if (conf->FetchOpt("servername") == "") { +- globalregistry->servername = "Kismet"; ++ char hostname[64]; ++ if (gethostname(hostname, 64) < 0) ++ globalregistry->servername = "Kismet"; ++ else ++ globalregistry->servername = string(hostname); + } else { + globalregistry->servername = MungeToPrintable(conf->FetchOpt("servername")); + } diff --git a/net-wireless/kismet/kismet-2013.03.1-r2.ebuild b/net-wireless/kismet/kismet-2013.03.1-r2.ebuild new file mode 100644 index 00000000000..5854ab862b5 --- /dev/null +++ b/net-wireless/kismet/kismet-2013.03.1-r2.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib user + +MY_P=${P/\./-} +MY_P=${MY_P/./-R} +S=${WORKDIR} + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git" + SRC_URI="" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz" + KEYWORDS="amd64 arm ppc x86" +fi + +DESCRIPTION="IEEE 802.11 wireless LAN sniffer" +HOMEPAGE="http://www.kismetwireless.net/" + +LICENSE="GPL-2" +SLOT="0/${PV}" +IUSE="+client +pcre speech +plugin-autowep +plugin-btscan plugin-dot15d4 +plugin-ptw +plugin-spectools +plugin-syslog +ruby selinux +suid" + +CDEPEND="net-wireless/wireless-tools + kernel_linux? ( sys-libs/libcap + dev-libs/libnl:3 + net-libs/libpcap + ) + 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="${CDEPEND} + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-kismet ) +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-tinfo.patch + epatch "${FILESDIR}"/ruby19_fixes.patch + epatch "${FILESDIR}"/update-kismet_shootout.patch + mv configure.in configure.ac + + sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \ + conf/kismet.conf.in || die + + # Don't strip and set correct mangrp + sed -i -e 's| -s||g' \ + -e 's|@mangrp@|root|g' Makefile.in || die + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable client) \ + $(use_enable pcre) +} + +src_compile() { + emake + + if use plugin-autowep; then + cd "${S}"/restricted-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}"/restricted-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}"/restricted-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}"/restricted-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 +} diff --git a/net-wireless/kismet/kismet-9999.ebuild b/net-wireless/kismet/kismet-9999.ebuild new file mode 100644 index 00000000000..629f220cbdd --- /dev/null +++ b/net-wireless/kismet/kismet-9999.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib user + +MY_P=${P/\./-} +MY_P=${MY_P/./-R} +S=${WORKDIR}/${MY_P} + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git" + SRC_URI="" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~x86" +fi + +DESCRIPTION="IEEE 802.11 wireless LAN sniffer" +HOMEPAGE="http://www.kismetwireless.net/" + +LICENSE="GPL-2" +SLOT="0/${PV}" +IUSE="+client +pcre speech +plugin-autowep +plugin-btscan plugin-dot15d4 +plugin-ptw +plugin-spectools +plugin-syslog +ruby selinux +suid" + +CDEPEND="net-wireless/wireless-tools + kernel_linux? ( sys-libs/libcap + dev-libs/libnl:3 + net-libs/libpcap + ) + 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="${CDEPEND} + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-kismet ) +" + +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}"/restricted-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}"/restricted-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}"/restricted-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}"/restricted-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 +} diff --git a/net-wireless/kismet/metadata.xml b/net-wireless/kismet/metadata.xml new file mode 100644 index 00000000000..47f11248f28 --- /dev/null +++ b/net-wireless/kismet/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + <description>maintainer</description> + </maintainer> + <maintainer> + <email>steev@gentoo.org</email> + <name>Steev Klimaszewski</name> + <description>co-maintainer, CC him on bugs</description> + </maintainer> + <use> + <flag name="client">Build the ncurses-based user interface</flag> + <flag name="suid"> + Install a setuid root helper binary with limited functionality; + this allows running kismet as a normal user, significantly + reducing security risks + </flag> + <flag name="pcre">Build with pcre support</flag> + <flag name="speech">Audio support using <pkg>app-accessibility/flite</pkg></flag> + <flag name="plugin-autowep">Build the autowep plugin</flag> + <flag name="plugin-btscan">Build the btscan plugin</flag> + <flag name="plugin-dot15d4">Build the dot15d4 plugin</flag> + <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="ruby">Build extras which are written in ruby, example plugins and the like.</flag> + </use> +</pkgmetadata> |