Modify

Opened 10 years ago

Closed 10 years ago

#2541 closed enhancement (fixed)

update to kismet-2007-10-R1

Reported by: seniorr@… Owned by: developers
Priority: normal Milestone:
Component: packages Version:
Keywords: Cc:

Description

Here is a new Makefile and (stupid) patch for kismet-2007-10-R1. The patch sucks, as it just makes an atan call go away. I am hoping someone else knows a proper fix. Here's the Makefile:

# 
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$

include $(TOPDIR)/rules.mk

PKG_NAME:=kismet
PKG_VERSION:=2007-10-R1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.kismetwireless.net/code
PKG_MD5SUM:=2100c667e69db0cde35fa2d06c8516e2

PKG_BUILD_DEPENDS:=libnotimpl libpcap libncurses uclibcxx

include $(INCLUDE_DIR)/package.mk

define Package/kismet/Default
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Kismet
  DEPENDS:= +uclibcxx
  URL:=http://www.kismetwireless.net/
endef

define Package/kismet/Default/description
 An 802.11 layer2 wireless network detector, sniffer, and intrusion 
 detection system.
endef

define Package/kismet-client
$(call Package/kismet/Default)
  TITLE+= client
  DEPENDS+= +libncurses
endef

define Package/kismet-client/conffiles
/etc/kismet/ap_manuf
/etc/kismet/client_manuf
/etc/kismet/kismet.conf
/etc/kismet/kismet_ui.conf
endef

define Package/kismet-client/description
$(call Package/kismet/Default/description)
 This package contains the kismet text interface client.
endef

define Package/kismet-drone
$(call Package/kismet/Default)
  DEPENDS+= +libpcap
  TITLE+= drone
endef

define Package/kismet-drone/conffiles
/etc/kismet/kismet_drone.conf
endef

define Package/kismet-drone/description
$(call Package/kismet/Default/description)
 This package contains the kismet remote sniffing.and monitoring drone.
endef

define Package/kismet-server
$(call Package/kismet/Default)
  DEPENDS+= +libpcap
  TITLE+= server
endef

define Package/kismet-server/conffiles
/etc/kismet/ap_manuf
/etc/kismet/client_manuf
/etc/kismet/kismet.conf
endef

define Package/kismet-server/description
$(call Package/kismet/Default/description)
 This package contains the kismet server.
endef

CONFIGURE_ARGS += \
        --enable-syspcap=yes \
        --disable-setuid \
        --disable-wsp100 \
        --disable-gpsmap \

CONFIGURE_VARS += \
        CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
        LDFLAGS="$$$$LDFLAGS" \
        LIBS="-nodefaultlibs -luClibc++ -lm -lnotimpl" \

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                LD="\$$$$(CC)" \
                all
endef

#FIXME: remove this package?
define Package/kismet/install
        $(INSTALL_DIR) $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
endef

define Package/kismet-client/install
        $(INSTALL_DIR) $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/kismet_ui.conf $(1)/etc/kismet/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
endef

define Package/kismet-drone/install
        $(INSTALL_DIR) $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/kismet_drone.conf $(1)/etc/kismet/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
endef

define Package/kismet-server/install
        $(INSTALL_DIR) $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
        $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
endef

$(eval $(call BuildPackage,kismet-client))
$(eval $(call BuildPackage,kismet-drone))
$(eval $(call BuildPackage,kismet-server))

and here is patches/100-atan-fix.patch:

diff -ur kismet-2007-10-R1/gpsd.cc kismet-2007-10-R1-new/gpsd.cc
--- kismet-2007-10-R1/gpsd.cc   2007-10-14 19:33:33.000000000 -0700
+++ kismet-2007-10-R1-new/gpsd.cc       2007-10-14 19:37:07.000000000 -0700
@@ -323,7 +323,7 @@
                if (ty == 0) {
                        dir = 0.0;
                } else {
-                       dir = atan(tx / ty);
+                       dir = tx/ty;
                }
 
                if (!finite(dir))

Attachments (2)

kismet-upgrade.patch (5.9 KB) - added by seniorr@… 10 years ago.
upgrade kismet to 2007-10-R1
kismet-upgrade-corrected.patch (5.7 KB) - added by seniorr@… 10 years ago.
upgrades kismet to 2007-10-R1 correctly

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by blogic

that patch would break gps support

comment:2 Changed 10 years ago by seniorr@…

Yes, it would break that particular part of gps (the direction would be misreported), however, atan() seemed to be unavailable currently, so that patch lets it compile. A better fix would be to make atan() available, but I don't know how to do that.

comment:3 Changed 10 years ago by seniorr@…

This patch doesn't break gpsd support, just changes an atan call into an atan2 call. Please use this patch with the Makefile above.

diff -ru kismet-2007-10-R1/gpsd.cc kismet-2007-10-R1-fixed/gpsd.cc
--- kismet-2007-10-R1/gpsd.cc   2007-09-15 09:14:00.000000000 -0700
+++ kismet-2007-10-R1-fixed/gpsd.cc     2007-11-06 01:46:12.000000000 -0800
@@ -323,7 +323,7 @@
                if (ty == 0) {
                        dir = 0.0;
                } else {
-                       dir = atan(tx / ty);
+                       dir = atan2(tx,ty);
                }
 
                if (!finite(dir))

Changed 10 years ago by seniorr@…

upgrade kismet to 2007-10-R1

comment:4 Changed 10 years ago by seniorr@…

gah, that attachment has the wrong fix in it. the one quoted above is the right one, with atan2(). I'll fix shortly if that'll help

Changed 10 years ago by seniorr@…

upgrades kismet to 2007-10-R1 correctly

comment:5 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

added in r9653

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.