first pass at kismet-newcore, this will get an update with an autoloader later

This commit is contained in:
Zero_Chaos 2009-02-25 03:24:33 +00:00
parent c23718149c
commit fb2158050a
8 changed files with 233 additions and 0 deletions

View file

@ -0,0 +1,7 @@
AUX gcc-4.3.patch 1221 RMD160 6c9c7da7c90367a363dd5d6a4e23eeee89791552 SHA1 2aff87ae336cb27d8e96831a7ab57d3f328ca78e SHA256 5e98a582f93169f5525338b9842c9196ff8d2764c69f4dc412acafb67e3b002b
AUX kismet-2007.10.1-Makefile.in.patch 2716 RMD160 abccd73749e80afe299ef46ed7ce39f132d8805c SHA1 4bbe30845e190e01dc495573f7bcedbd8da9c089 SHA256 d74c9b7c558beff78908e3d720d2b1783c101e12c2b719315b5ac3abb2c8808a
AUX kismet-2007.10.1-conf.d 403 RMD160 cf6cad4dc844ccf9c807edfb5adec2351c0cd249 SHA1 50ce39c8989ddf214f72b3ac14f2a989d6121d15 SHA256 d2f5bb606e4dac45c8de27843ab460b9dac02e83979e52e1b8b3ca3af841adeb
AUX kismet-2007.10.1-init.d 749 RMD160 c9dfda5e93ae8fa59679194241dd9508830dc617 SHA1 b3efd2d802aa34eee278fa8b4933e3eec8c33308 SHA256 1dd3fd3fee724490908abe072577ab159c2371820561872f8af0e30ea2f83054
AUX kismet.confd 403 RMD160 cf6cad4dc844ccf9c807edfb5adec2351c0cd249 SHA1 50ce39c8989ddf214f72b3ac14f2a989d6121d15 SHA256 d2f5bb606e4dac45c8de27843ab460b9dac02e83979e52e1b8b3ca3af841adeb
AUX kismet.initd 742 RMD160 f91c46a9a3d1cac2610659e65a1a3538af4f2772 SHA1 54aa3d489e2fade47cca11a036cb1237dab7786a SHA256 b4420c22264ff3604bf956b65bca5b564cbb70676c3f48d5e444f3aa6687a624
EBUILD kismet-newcore-9999.ebuild 1484 RMD160 40c517b6f74d89c2503be9b667d61f895900a312 SHA1 7642a7a3f0dda3e9ec1d172cd98d413a9ece6f9d SHA256 f90a3fec77a7fd3ceab28433a8ddf815a3fa2adf933087b4dc32e357b0d18aac

View file

@ -0,0 +1,36 @@
diff -r -u ../kismet-2007-10-R1/kismet_wrapper.cc kismet-2007-10-R1/kismet_wrapper.cc
--- ../kismet-2007-10-R1/kismet_wrapper.cc 2007-10-06 23:50:03.000000000 +0200
+++ kismet-2007-10-R1/kismet_wrapper.cc 2008-03-24 14:23:51.831523343 +0100
@@ -28,6 +28,8 @@
#include "config.h"
+#include <cstring>
+
/* Blob of globals since sighandler needs them */
vector<string> postcli_err;
pid_t srvpid = -1, clipid = -1;
diff -r -u ../kismet-2007-10-R1/ringbuf.cc kismet-2007-10-R1/ringbuf.cc
--- ../kismet-2007-10-R1/ringbuf.cc 2005-12-11 20:14:39.000000000 +0100
+++ kismet-2007-10-R1/ringbuf.cc 2008-03-24 14:23:51.875510223 +0100
@@ -18,6 +18,8 @@
#include "ringbuf.h"
+#include <cstring>
+
RingBuffer::RingBuffer(int in_size) {
ring_len = in_size;
ring_data = new uint8_t[in_size];
diff -r -u ../kismet-2007-10-R1/util.cc kismet-2007-10-R1/util.cc
--- ../kismet-2007-10-R1/util.cc 2006-08-28 22:37:29.000000000 +0200
+++ kismet-2007-10-R1/util.cc 2008-03-24 14:23:51.875510223 +0100
@@ -23,6 +23,8 @@
#include <sys/stat.h>
#include <fcntl.h>
+#include <cstring>
+
// We need this to make uclibc happy since they don't even have rintf...
#ifndef rintf
#define rintf(x) (float) rint((double) (x))

View file

@ -0,0 +1,55 @@
diff -ur kismet-2007-10-R1/Makefile.in kismet-2007-10-R1.new/Makefile.in
--- kismet-2007-10-R1/Makefile.in 2007-10-06 23:53:38.000000000 +0300
+++ kismet-2007-10-R1.new/Makefile.in 2007-11-15 09:45:04.000000000 +0200
@@ -5,7 +5,7 @@
VERSION_TINY = R1
INSTGRP ?= "@instgrp@"
-MANGRP ?= "@mangrp@"
+MANGRP ?= "root"
INSTUSR ?= "root"
ZAURUS = @zaurus@
@@ -138,23 +138,23 @@
fi
binuserinstall:
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(PS) $(BIN)/$(PS);
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(DRONE) $(BIN)/$(DRONE);
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(PS) $(BIN)/$(PS);
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(DRONE) $(BIN)/$(DRONE);
binsuidinstall:
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(PS) $(BIN)/$(PS);
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(DRONE) $(BIN)/$(DRONE);
+ install -o $(INSTUSR) -g $(INSTGRP) -m 4755 $(PS) $(BIN)/$(PS);
+ install -o $(INSTUSR) -g $(INSTGRP) -m 4755 $(DRONE) $(BIN)/$(DRONE);
commoninstall:
mkdir -p $(ETC)
mkdir -p $(BIN)
install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(WRAP) $(BIN)/kismet
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(NC) $(BIN)/$(NC)
- # install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(HOPPER) $(BIN)/$(HOPPER)
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(NC) $(BIN)/$(NC)
+ # install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(HOPPER) $(BIN)/$(HOPPER)
@if test "$(ZAURUS)" = "yes"; then \
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(BUZZER) $(BIN)/buzzme; \
+ echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(BUZZER) $(BIN)/buzzme; \
fi
#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_monitor $(BIN)/kismet_monitor
#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
@@ -169,8 +169,8 @@
install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
@if test "$(GPSLBUILD)" = "$(GPSL)"; then \
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(GPSL) $(BIN)/$(GPSL); \
+ echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(GPSL) $(BIN)/$(GPSL); \
install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \

View file

@ -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=""

View file

@ -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-2007.10.1-init.d,v 1.1 2007/11/25 07:24:37 cla 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 ${?}
}

View file

@ -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=""

View file

@ -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 ${?}
}

View file

@ -0,0 +1,57 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/kismet-2008.05.1.ebuild,v 1.3 2009/02/12 18:14:34 nixnut Exp $
inherit toolchain-funcs linux-info eutils subversion
MY_P=${P/\./-}
MY_P=${MY_P/./-R}
S=${WORKDIR}/${MY_P}
DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
HOMEPAGE="http://www.kismetwireless.net/"
SRC_URI=""
ESVN_REPO_URI="http://svn.kismetwireless.net/code/branch/kismet-newcore"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~ppc ~x86"
IUSE="ncurses"
DEPEND="${RDEPEND}"
RDEPEND="net-wireless/wireless-tools
net-libs/libpcap
ncurses? ( sys-libs/ncurses )"
src_compile() {
cd "${S}"
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
# the configure script only honors '--disable-foo'
# local myconf="--disable-gpsmap"
if ! use ncurses; then
myconf="${myconf} --disable-curses --disable-panel"
fi
econf ${myconf} \
--with-linuxheaders="${KV_DIR}" || die "econf failed"
emake dep || die "emake dep failed"
emake || die "emake failed"
}
src_install () {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc CHANGELOG README* docs/*
# newinitd "${FILESDIR}"/${PN}.initd kismet
# newconfd "${FILESDIR}"/${PN}.confd kismet
}