diff options
author | Alexander Paetzelt | 2020-03-09 17:04:36 +0100 |
---|---|---|
committer | Alexander Paetzelt | 2020-03-09 17:04:36 +0100 |
commit | 3b9027f01b2c8f6b463cafaece532a429517669d (patch) | |
tree | e8b5353a025c489ccd246481aeaad544faf4aad7 | |
parent | 5eaa823267a2a72e204e7043f73fc1cec00e3096 (diff) | |
download | aur-3b9027f01b2c8f6b463cafaece532a429517669d.tar.gz |
Include changes made in [extra] 'kismet' package
* clean up dependencies
* fix stripping through makepkg
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | kismet-git-sysusers.conf | 2 | ||||
-rw-r--r-- | kismet-git.install | 22 | ||||
-rw-r--r-- | python-install-flags.patch | 45 |
5 files changed, 128 insertions, 31 deletions
@@ -1,30 +1,46 @@ pkgbase = kismet-git - pkgdesc = Current development version based on git repo - pkgver = r8139.8baa2896 + pkgdesc = 802.11 layer2 wireless network detector, sniffer, and intrusion detection system + pkgver = r9339.de354712 pkgrel = 1 url = https://www.kismetwireless.net/ install = kismet-git.install arch = x86_64 license = GPL - depends = libelf + makedepends = git + makedepends = python-setuptools depends = libmicrohttpd depends = libnm - depends = libpcap - depends = pkg-config - depends = protobuf-c + depends = libusb + depends = libusb-1.0.so depends = lm_sensors + depends = protobuf-c + depends = python + optdepends = festival: text-to-speech support + optdepends = flite: alternative/lightweight text-to-speech support + optdepends = gpsd: log coordinates of detected networks optdepends = hackrf: use with HackRF compatible software defined radio (SDR) + optdepends = python-numpy: needed by some captures/plugins + optdepends = python-protobuf: needed by some captures/plugins + optdepends = python-pyserial: needed by some captures/plugins + optdepends = sox: provide the default kismet sound playback binary + optdepends = wireshark-cli: provide OUI files used to determine device manufacturer + optdepends = wireshark-cli: mergecap, to merge multiple capture files conflicts = kismet backup = etc/kismet/kismet.conf + backup = etc/kismet/kismet_80211.conf backup = etc/kismet/kismet_alerts.conf + backup = etc/kismet/kismet_filter.conf backup = etc/kismet/kismet_httpd.conf backup = etc/kismet/kismet_logging.conf backup = etc/kismet/kismet_memory.conf backup = etc/kismet/kismet_storage.conf + backup = etc/kismet/kismet_uav.conf source = git+https://github.com/kismetwireless/kismet source = kismet-git-sysusers.conf + source = python-install-flags.patch sha256sums = SKIP - sha256sums = 8b5b25bb6d9c611589ce0200da3cfeed2194bfa45aeed88e10c980c668383806 + sha256sums = fbc444b9973795c105eff41e914c3fcc24ba07e4f309838828622d7a65201d2f + sha256sums = 3155f457bdc762202f28f56f55c61352332a639cddd5948c0879ed4ba79a7ed5 pkgname = kismet-git @@ -1,20 +1,48 @@ # Maintainer: Alexander Paetzelt <techge+arch [ät] posteo [do] net> +# parts are based on [extra] packet 'kismet' -> https://www.archlinux.org/packages/extra/x86_64/kismet/ + pkgname=kismet-git -pkgver=r8139.8baa2896 +pkgver=r9339.de354712 pkgrel=1 -pkgdesc="Current development version based on git repo" -arch=('x86_64') +pkgdesc="802.11 layer2 wireless network detector, sniffer, and intrusion detection system" url="https://www.kismetwireless.net/" +arch=('x86_64') license=('GPL') -depends=('libelf' 'libmicrohttpd' 'libnm' 'libpcap' 'pkg-config' 'protobuf-c' 'lm_sensors') -optdepends=('hackrf: use with HackRF compatible software defined radio (SDR)') +depends=('libmicrohttpd' + 'libnm' + 'libusb' + 'libusb-1.0.so' + 'lm_sensors' + 'protobuf-c' + 'python') +makedepends=('git' 'python-setuptools') +optdepends=('festival: text-to-speech support' + 'flite: alternative/lightweight text-to-speech support' + 'gpsd: log coordinates of detected networks' + 'hackrf: use with HackRF compatible software defined radio (SDR)' + 'python-numpy: needed by some captures/plugins' + 'python-protobuf: needed by some captures/plugins' + 'python-pyserial: needed by some captures/plugins' + 'sox: provide the default kismet sound playback binary' + 'wireshark-cli: provide OUI files used to determine device manufacturer' + 'wireshark-cli: mergecap, to merge multiple capture files') +backup=(etc/kismet/kismet.conf + etc/kismet/kismet_80211.conf + etc/kismet/kismet_alerts.conf + etc/kismet/kismet_filter.conf + etc/kismet/kismet_httpd.conf + etc/kismet/kismet_logging.conf + etc/kismet/kismet_memory.conf + etc/kismet/kismet_storage.conf + etc/kismet/kismet_uav.conf) conflicts=('kismet') -backup=('etc/kismet/kismet.conf' 'etc/kismet/kismet_alerts.conf' 'etc/kismet/kismet_httpd.conf' 'etc/kismet/kismet_logging.conf' 'etc/kismet/kismet_memory.conf' 'etc/kismet/kismet_storage.conf') install=${pkgname}.install source=("git+https://github.com/kismetwireless/kismet" - "${pkgname}-sysusers.conf") + "${pkgname}-sysusers.conf" + "python-install-flags.patch") sha256sums=('SKIP' - '8b5b25bb6d9c611589ce0200da3cfeed2194bfa45aeed88e10c980c668383806') + 'fbc444b9973795c105eff41e914c3fcc24ba07e4f309838828622d7a65201d2f' + '3155f457bdc762202f28f56f55c61352332a639cddd5948c0879ed4ba79a7ed5') pkgver() { cd "$srcdir/kismet" @@ -23,6 +51,8 @@ pkgver() { prepare() { cd "$srcdir/kismet" + patch -Np0 < ../python-install-flags.patch + autoreconf -fiv # include submodule for docs git submodule update --init docs } @@ -30,19 +60,19 @@ prepare() { build() { cd "$srcdir/kismet" ./configure --prefix=/usr \ - --sysconfdir=/etc/kismet \ - --disable-python-tools - make + --localstatedir=/var \ + --sysconfdir=/etc/kismet + make all plugins } package() { cd "$srcdir/kismet" make DESTDIR="$pkgdir/" install - # install capture_tools setuid so that kismet can started as user and - # network device can get handled by capture tools - install -o root -g 315 -m 4550 capture_linux_wifi/kismet_cap_linux_wifi "${pkgdir}/usr/bin/" - install -o root -g 315 -m 4550 capture_linux_bluetooth/kismet_cap_linux_bluetooth "${pkgdir}/usr/bin/" + # Makepkg strip bug #43600 + chmod u+w "${pkgdir}"/usr/bin/kismet* + chmod o-x "${pkgdir}"/usr/bin/kismet_cap* + chown 0:315 "${pkgdir}"/usr/bin/kismet_cap* # include docs in /usr/share/doc/ mkdir -p ${pkgdir}/usr/share/doc/$pkgname diff --git a/kismet-git-sysusers.conf b/kismet-git-sysusers.conf index 85fc087dce76..807210fa7977 100644 --- a/kismet-git-sysusers.conf +++ b/kismet-git-sysusers.conf @@ -1 +1 @@ -u kismet 315 "Kismet users" +g kismet 315 "Kismet users" diff --git a/kismet-git.install b/kismet-git.install index 3230ed685749..21fce3626793 100644 --- a/kismet-git.install +++ b/kismet-git.install @@ -1,15 +1,21 @@ post_install() { + post_upgrade + cat << EOP - - Kismet has been installed with a SUID ROOT CAPTURE HELPER executeable by - users in the group 'kismet'. This WILL ALLOW USERS IN THIS GROUP - TO ALTER YOUR NETWORK INTERFACE STATES, but is more secure than running - all of Kismet as root. ONLY users in this group will be able to - run Kismet and capture from physical network devices. - + Kismet has been installed with net_raw,net_admin capabilities capture helper + executables for users in the 'kismet' group. This WILL ALLOW USERS IN THIS + GROUP TO ALTER YOUR NETWORK INTERFACE STATES, but is more secure than running + all of Kismet as root. ONLY users in this group will be able to run Kismet + and capture from physical network devices. + Use 'sudo usermod -a -G kismet foouser' to add yourself to the kismet group. You will need to log out and back in before your user will have access. Check the output of the 'groups' command to make sure your user has the proper group! - EOP } + +post_upgrade() { + for cap_bin in /usr/bin/kismet_cap_*; do + setcap cap_net_raw,cap_net_admin=eip "${cap_bin}"; + done +} diff --git a/python-install-flags.patch b/python-install-flags.patch new file mode 100644 index 000000000000..9e6e1f0dd45a --- /dev/null +++ b/python-install-flags.patch @@ -0,0 +1,45 @@ +--- capture_freaklabs_zigbee/Makefile.in 2019-10-10 10:49:00.494256269 +0200 ++++ capture_freaklabs_zigbee/Makefile.in 2019-10-10 10:52:49.374152190 +0200 +@@ -10,7 +10,7 @@ + $(PYTHON) ./setup.py bdist + + install: +- $(PYTHON) ./setup.py install ++ $(PYTHON) ./setup.py install --root="$(DESTDIR)" -O1 + # $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) $(MONITOR_BIN) $(BIN)/$(MONITOR_BIN) + + clean: +--- capture_sdr_rtl433/Makefile.in 2019-10-10 10:49:00.507590313 +0200 ++++ capture_sdr_rtl433/Makefile.in 2019-10-10 10:52:28.069331801 +0200 +@@ -11,7 +11,7 @@ + $(PYTHON) ./setup.py bdist + + install: +- $(PYTHON) ./setup.py install ++ $(PYTHON) ./setup.py install --root="$(DESTDIR)" -O1 + + clean: + @-$(PYTHON) ./setup.py clean +--- capture_sdr_rtladsb/Makefile.in 2019-10-10 10:49:00.510923825 +0200 ++++ capture_sdr_rtladsb/Makefile.in 2019-10-10 10:52:32.542260533 +0200 +@@ -11,7 +11,7 @@ + $(PYTHON) ./setup.py bdist + + install: +- $(PYTHON) ./setup.py install ++ $(PYTHON) ./setup.py install --root="$(DESTDIR)" -O1 + # These are now part of the setup.py install + # $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) aircraft_db.csv $(ETC)/kismet_aircraft_db.csv + # $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) $(MONITOR_BIN) $(BIN)/$(MONITOR_BIN) +--- capture_sdr_rtlamr/Makefile.in 2019-10-10 10:49:00.514257335 +0200 ++++ capture_sdr_rtlamr/Makefile.in 2019-10-10 10:52:35.978622527 +0200 +@@ -11,7 +11,7 @@ + $(PYTHON) ./setup.py bdist + + install: +- $(PYTHON) ./setup.py install ++ $(PYTHON) ./setup.py install --root="$(DESTDIR)" -O1 + + protobuf: + $(PROTOCBIN) -I ../protobuf_definitions --python_out=./KismetCaptureRtlamr ../protobuf_definitions/*.proto + |