pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45692: net/kismet update (kismet-2011-03-R2)



>Number:         45692
>Category:       pkg
>Synopsis:       net/kismet update (kismet-2011-03-R2)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 06 22:20:01 +0000 2011
>Originator:     Mustafa Dogan
>Release:        NetBSD 5.99.57
>Organization:
TESMER
>Environment:
NetBSD md.dogan.biz.tr 5.99.57 NetBSD 5.99.57 (GENERIC) #0: Sat Nov 26 23:14:47 
EET 2011  
root%md.dogan.biz.tr@localhost:/root/OBJ/sys/arch/i386/compile/GENERIC i386
>Description:
I made kismet-2011-03-R2 package compilable. Maybe some extra effort would be 
needed but, at least it is usable.
>How-To-Repeat:

>Fix:
==================== File: Makefile ====================
# $NetBSD: Makefile,v 1.21 2011/11/20 22:11:23 sbd Exp $

DISTNAME=               kismet-2011-03-R2
PKGNAME=                kismet-2011.03.02
#PKGREVISION=           1
CATEGORIES=             net
MASTER_SITES=           http://www.kismetwireless.net/code/

MAINTAINER=             pkgsrc-users%NetBSD.org@localhost
HOMEPAGE=               http://www.kismetwireless.net/
COMMENT=                802.11 wireless network detector, sniffer and IDS

PKG_DESTDIR_SUPPORT=    user-destdir

USE_LANGUAGES=          c c++
USE_NCURSES=            yes # needs libpanel
USE_TOOLS+=             gmake perl:run
GNU_CONFIGURE=          yes
CONFIGURE_ARGS+=        --sysconfdir=${PKG_SYSCONFDIR}

REPLACE_PERL+=          scripts/gpsmap-helper-earthamaps
LIBS.NetBSD+=           -lm

# might be appended to in options.mk
PLIST_SRC=              PLIST

.include "../../mk/bsd.prefs.mk"

KISMET_USER?=           kismet
KISMET_GROUP?=          kismet
PKG_GROUPS=             ${KISMET_GROUP}
PKG_USERS=              ${KISMET_USER}:${KISMET_GROUP}::Kismet\ 
user:${VARBASE}/log/kismet
PKG_GROUPS_VARS+=       KISMET_GROUP
PKG_USERS_VARS+=        KISMET_USER
BUILD_DEFS+=            VARBASE

PKG_SYSCONFSUBDIR=      ${PKGBASE}
EGDIR=                  ${PREFIX}/share/examples/${PKGBASE}
CONF_FILES+=            ${EGDIR}/kismet.conf.default            \
                                ${PKG_SYSCONFDIR}/kismet.conf
CONF_FILES+=            ${EGDIR}/kismet_drone.conf.default      \
                                ${PKG_SYSCONFDIR}/kismet_drone.conf
OWN_DIRS_PERMS+=        ${VARBASE}/log/kismet ${KISMET_USER} ${KISMET_GROUP} 
0700

SUBST_CLASSES+=         user
SUBST_MESSAGE.user=     Fixing user name.
SUBST_STAGE.user=       pre-configure
SUBST_FILES.user=       conf/kismet.conf.in
SUBST_SED.user=         -e 's/your_user_here/${KISMET_USER}/'

INSTALLATION_DIRS+=     bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR}

post-install:
        ${INSTALL_DATA} ${WRKSRC}/conf/kismet.conf              \
            ${DESTDIR}${EGDIR}/kismet.conf.default
        ${INSTALL_DATA} ${WRKSRC}/conf/kismet_drone.conf        \
            ${DESTDIR}${EGDIR}/kismet_drone.conf.default
        ${INSTALL_SCRIPT} ${WRKSRC}/scripts/kismet.in           \
            ${DESTDIR}${PREFIX}/bin/kismet

#DEPENDS+=               wget>=1.9.1:../../net/wget

.if exists(/usr/include/net/bpf.h)
CFLAGS+=        -DHAVE_NET_BPF_H
.endif

#.include "../../devel/gmp/buildlink3.mk"
#.include "../../graphics/ImageMagick/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
#.include "../../x11/libX11/buildlink3.mk"

.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

==================== File: patch-Makefile.in ====================
--- Makefile.in.orig    2011-11-26 13:08:55.000000000 +0200
+++ Makefile.in 2011-11-26 17:37:35.000000000 +0200
@@ -105,34 +105,30 @@
        @-echo "'Makefile.in' or 'configure' are more current than this 
Makefile.  You should re-run 'configure'."
 
 binsuidinstall:
-       $(INSTALL) -o $(INSTUSR) -g $(SUIDGROUP) -m 4550 $(CS) $(BIN)/$(CS); 
+       $(BSD_INSTALL_PROGRAM) $(CS) $(BIN)/$(CS); 
        
 commoninstall:
-       mkdir -p $(ETC)
-       mkdir -p $(BIN)
 
        if test -e $(NC); then \
                echo "Installing client"; \
-               $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 555 scripts/kismet 
$(BIN)/kismet; \
-               $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 555 $(NC) 
$(BIN)/$(NC); \
+               $(BSD_INSTALL_PROGRAM) scripts/kismet $(BIN)/kismet; \
+               $(BSD_INSTALL_PROGRAM) $(NC) $(BIN)/$(NC); \
        fi;
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 555 $(PS) $(BIN)/$(PS); 
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 555 $(DRONE) $(BIN)/$(DRONE);
+       $(BSD_INSTALL_PROGRAM) $(PS) $(BIN)/$(PS); 
+       $(BSD_INSTALL_PROGRAM) $(DRONE) $(BIN)/$(DRONE);
 
-       mkdir -p $(MAN)/man1
-       $(INSTALL) -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.1 
$(MAN)/man1/kismet.1
-       $(INSTALL) -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.1 
$(MAN)/man1/kismet_drone.1
-
-       mkdir -p $(MAN)/man5
-       $(INSTALL) -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.conf.5 
$(MAN)/man5/kismet.conf.5
-       $(INSTALL) -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.conf.5 
$(MAN)/man5/kismet_drone.conf.5
-
-       mkdir -p $(WAV)
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/new.wav $(WAV)/new.wav
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/packet.wav 
$(WAV)/packet.wav
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/alert.wav 
$(WAV)/alert.wav
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/gpslost.wav 
$(WAV)/gpslost.wav
-       $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/gpslock.wav 
$(WAV)/gpslock.wav
+       $(BSD_INSTALL_MAN) man/kismet.1 $(MAN)/man1/kismet.1
+       $(BSD_INSTALL_MAN) man/kismet_drone.1 $(MAN)/man1/kismet_drone.1
+       $(BSD_INSTALL_MAN) man/kismet.conf.5 $(MAN)/man5/kismet.conf.5
+       $(BSD_INSTALL_MAN) man/kismet_drone.conf.5 
$(MAN)/man5/kismet_drone.conf.5
+       $(BSD_INSTALL_MAN) man/kismet_ui.conf.5 $(MAN)/man5/kismet_ui.conf.5
+
+       $(BSD_INSTALL_DATA_DIR) $(WAV)
+       $(BSD_INSTALL_DATA) wav/new.wav $(WAV)/new.wav
+       $(BSD_INSTALL_DATA) wav/packet.wav $(WAV)/packet.wav
+       $(BSD_INSTALL_DATA) wav/alert.wav $(WAV)/alert.wav
+       $(BSD_INSTALL_DATA) wav/gpslost.wav $(WAV)/gpslost.wav
+       $(BSD_INSTALL_DATA) wav/gpslock.wav $(WAV)/gpslock.wav
 
 suidinstall: $(CS)
        -groupadd -f $(SUIDGROUP)
@@ -168,15 +164,13 @@
        @echo "all of Kismet as root.  ONLY users in this group will be able to 
"
        @echo "run Kismet and capture from physical network devices."
 
-install: $(INSTBINS)
-       $(MAKE) -e commoninstall
+install: $(INSTBINS) commoninstall
        @if test -f $(ETC)/kismet.conf; then \
                echo "$(ETC)/kismet.conf already installed, not replacing it.  
HOWEVER"; \
                echo "if there have been any changes to the base config you 
will need"; \
                echo "to add them to your config file."; \
     else \
-               $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf 
$(ETC)/kismet.conf;  \
-               echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 
conf/kismet.conf $(ETC)/kismet.conf;  \
+               $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf;  \
                echo "Installed config into $(ETC)/kismet.conf."; \
        fi
        @if test -f $(ETC)/kismet_drone.conf; then \
@@ -184,25 +178,13 @@
                echo "if there have been any changes to the base config you 
will need"; \
                echo "to add them to your config file."; \
     else \
-               $(INSTALL) -o $(INSTUSR) -g $(INSTGRP) -m 644 
conf/kismet_drone.conf $(ETC)/kismet_drone.conf;  \
-               echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 
conf/kismet_drone.conf $(ETC)/kismet_drone.conf;  \
+               $(BSD_INSTALL_DATA) conf/kismet_drone.conf 
$(ETC)/kismet_drone.conf;  \
                echo "Installed drone config into $(ETC)/kismet_drone.conf."; \
        fi
        @echo "Installed kismet into $(BIN)/."
        @echo "If you have not done so already, read the README file and the 
FAQ file.  Additional"
        @echo "documentation is in the docs/ directory.  You MUST edit 
$(ETC)/kismet.conf "
        @echo "and configure Kismet for your system, or it will NOT run 
properly!"
-       @echo
-       @echo "Kismet has NOT been installed suid-root.  This means you will 
need to start "
-       @echo "it as root.  If you add your user to the $(SUIDGROUP) group and 
install "
-       @echo "Kismet with 'make suidinstall', users in that group will be able 
to "
-       @echo "run Kismet directly."
-       @echo
-       @echo "READ THE KISMET DOCUMENTATION ABOUT THE KISMET SECURITY MODEL TO"
-       @echo "DECIDE IF YOU WANT TO INSTALL IT SUID-ROOT"
-       @echo
-       @echo "It is generally  more secure to install Kismet with the 
suid-root helper "
-       @echo "option."
                 
 rpm:
        @echo "Disabling SUID installation (RPM will handle setting the SUID 
bit.)"

==================== File: patch-configure ====================
--- configure.orig      2011-11-26 13:09:03.000000000 +0200
+++ configure   2011-11-26 14:36:05.000000000 +0200
@@ -5324,7 +5324,7 @@
 
 
 # Do we use uclibc++?
-if test "$foundcxxl"x == "x"; then
+if test "$foundcxxl"x = "x"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" 
>&5
 $as_echo_n "checking for main in -lstdc++... " >&6; }
 if test "${ac_cv_lib_stdcpp_main+set}" = set; then :
@@ -5361,7 +5361,7 @@
 
 fi
 
-if test "$foundcxxl"x == "x"; then
+if test "$foundcxxl"x = "x"; then
        as_fn_error "Neither uclibc uClibc++ or standard gcc stdc++ libraries 
found." "$LINENO" 5
 fi
 CC="$oCC"

==================== File: patch-configure.in ====================
--- configure.in.orig   2011-11-26 13:09:14.000000000 +0200
+++ configure.in        2011-11-26 14:33:44.000000000 +0200
@@ -365,12 +365,12 @@
                         foundcxxl="uclibc" CXXLIBS="$CXXLIBS -luClibc++")
 
 # Do we use uclibc++?
-if test "$foundcxxl"x == "x"; then
+if test "$foundcxxl"x = "x"; then
        AC_CHECK_LIB([stdc++], [main], 
                                 foundcxxl="stdc++" CXXLIBS="$CXXLIBS -lstdc++")
 fi
 
-if test "$foundcxxl"x == "x"; then
+if test "$foundcxxl"x = "x"; then
        AC_MSG_ERROR(Neither uclibc uClibc++ or standard gcc stdc++ libraries 
found.)
 fi
 CC="$oCC"

==================== File: patch-ifcontrol.h ====================
--- ifcontrol.h.orig    2011-11-26 13:09:24.000000000 +0200
+++ ifcontrol.h 2011-11-26 14:41:19.000000000 +0200
@@ -51,7 +51,7 @@
 #include "util.h"
 
 #if defined(SYS_LINUX) || defined(SYS_NETBSD) || defined(SYS_OPENBSD) || \
-       defined(SYS_FREEBSD) || defined(SYS_DARWIN)
+       defined(SYS_FREEBSD) || defined(SYS_DARWIN) || defined(__DragonFly__)
 int Ifconfig_Set_Flags(const char *in_dev, char *errstr, int flags);
 int Ifconfig_Delta_Flags(const char *in_dev, char *errstr, int flags);
 int Ifconfig_Get_Flags(const char *in_dev, char *errstr, int *flags);

==================== File: patch-kis_panel_frontend.cc ====================
--- kis_panel_frontend.cc.orig  2011-11-26 13:09:48.000000000 +0200
+++ kis_panel_frontend.cc       2011-11-26 14:45:15.000000000 +0200
@@ -25,6 +25,7 @@
 #include <sys/types.h>
 #include <dlfcn.h>
 #include <dirent.h>
+#include <limits.h>
 
 #include "util.h"
 #include "messagebus.h"

==================== File: patch-kismet.in ====================
--- scripts/kismet.in.orig      2011-11-30 21:54:26.000000000 +0200
+++ scripts/kismet.in   2011-11-30 22:33:36.000000000 +0200
@@ -1,19 +1,14 @@
 #!/bin/sh
 
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-ETC=@sysconfdir@
-BIN=@bindir@
-
 oargs=$*
 
 until test -z "$1"; do
        if test "$1" = "--help" -o "$1" = "-h"; then
-               exec ${BIN}/kismet_server --help
+               exec kismet_server --help
        fi
 
        shift
 done
 
-exec ${BIN}/kismet_client $client $oargs
+exec kismet_client $client $oargs
 
==================== File: patch-packetsource_bsdrt.cc ====================
--- packetsource_bsdrt.cc.orig  2011-11-26 13:10:26.000000000 +0200
+++ packetsource_bsdrt.cc       2011-11-26 14:57:44.000000000 +0200
@@ -28,7 +28,7 @@
 #endif
 
 #if (defined(HAVE_LIBPCAP) && (defined(SYS_OPENBSD) || defined(SYS_NETBSD) || \
-                                                          
defined(SYS_FREEBSD)))
+                              defined(SYS_FREEBSD) || defined(__DragonFly__)))
 
 #include <string>
 #include <sstream>
@@ -78,7 +78,7 @@
        }
 #endif
 
-#if defined(SYS_FREEBSD)
+#if defined(SYS_FREEBSD) || defined(__DragonFly__)
        if (SetIfFlags(prev_flags | IFF_PPROMISC | IFF_UP) == 0) {
 #elif defined(SYS_OPENBSD) || defined(SYS_NETBSD)
        if (SetIfFlags(prev_flags | IFF_PROMISC | IFF_UP) == 0) {
@@ -232,7 +232,7 @@
        return 1;
 }
 
-#elif defined(SYS_FREEBSD) /* Freebsd has a generic 802.11 ioctl */
+#elif defined(SYS_FREEBSD) || defined(__DragonFly__) /* Freebsd has a generic 
802.11 ioctl */
 
 int Radiotap_BSD_Controller::Get80211(int type, int& val, int len, uint8_t 
*data) {
        struct ieee80211req ireq;
@@ -291,7 +291,7 @@
 
 #if defined(SYS_FREEBSD)
        flags = (ifr.ifr_flags & 0xFFFF) | (ifr.ifr_flagshigh << 16);
-#elif defined(SYS_OPENBSD) || defined(SYS_NETBSD)
+#elif defined(SYS_OPENBSD) || defined(SYS_NETBSD) || defined(__DragonFly__)
        flags = ifr.ifr_flags;
 #endif
 
@@ -309,7 +309,7 @@
 #if defined(SYS_FREEBSD)
        ifr.ifr_flags = flags & 0xffff;
        ifr.ifr_flagshigh = flags >> 16;
-#elif defined(SYS_OPENBSD) || defined(SYS_NETBSD)
+#elif defined(SYS_OPENBSD) || defined(SYS_NETBSD) || defined(__DragonFly__)
        ifr.ifr_flags = flags;
 #endif
        if (ioctl(sock, SIOCSIFFLAGS, (caddr_t) &ifr) < 0) {

==================== File: patch-packetsource_bsdrt.h ====================
--- packetsource_bsdrt.h.orig   2011-11-26 13:10:39.000000000 +0200
+++ packetsource_bsdrt.h        2011-11-26 15:00:13.000000000 +0200
@@ -27,7 +27,7 @@
 #include "config.h"
 
 #if (defined(HAVE_LIBPCAP) && (defined(SYS_OPENBSD) || defined(SYS_NETBSD) || \
-                                                          
defined(SYS_FREEBSD)))
+                              defined(SYS_FREEBSD) || defined(__DragonFly__)))
 
 #include <string>
 #include <errno.h>

==================== File: patch-packetsource_pcap.cc ====================
--- packetsource_pcap.cc.orig   2011-11-26 13:11:04.000000000 +0200
+++ packetsource_pcap.cc        2011-11-26 15:22:21.000000000 +0200
@@ -58,7 +58,10 @@
 #include <net/if_media.h>
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
-#include <dev/ic/if_wi_ieee.h>
+#include <dev/ic/wi_ieee.h>
+extern "C" {
+#include <net/bpf.h>
+}
 
 #ifdef HAVE_RADIOTAP
 #include <net80211/ieee80211.h>
@@ -68,7 +71,7 @@
 
 #endif
 
-#ifdef SYS_FREEBSD
+#if defined(SYS_FREEBSD) || defined(__DragonFly__)
 #include <sys/socket.h>
 #include <net/if.h>
 #include <net/if_media.h>
@@ -118,7 +121,7 @@
 
        // Anything but windows and linux
     #if defined (SYS_OPENBSD) || defined(SYS_NETBSD) || defined(SYS_FREEBSD) \
-               || defined(SYS_DARWIN)
+               || defined(SYS_DARWIN) || defined(__DragonFly__)
        // Set the DLT in the order of what we want least, since the last one we
        // set will stick
        pcap_set_datalink(pd, DLT_IEEE802_11);

==================== File: patch-packetsource_pcap.h ====================
--- packetsource_pcap.h.orig    2011-11-26 13:10:56.000000000 +0200
+++ packetsource_pcap.h 2011-11-26 15:05:53.000000000 +0200
@@ -61,14 +61,14 @@
 #if defined(SYS_OPENBSD) || defined(SYS_NETBSD)
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
-#include <dev/ic/if_wi_ieee.h>
+#include <dev/ic/wi_ieee.h>
 
 #include <net80211/ieee80211.h>
 #include <net80211/ieee80211_ioctl.h>
 #include <net80211/ieee80211_radiotap.h>
 #endif // Open/Net
 
-#ifdef SYS_FREEBSD
+#if defined(SYS_FREEBSD) || defined(__DragonFly__)
 #include <net80211/ieee80211_ioctl.h>
 #include <net80211/ieee80211_radiotap.h>
 #endif // FreeBSD



Home | Main Index | Thread Index | Old Index