net-wireless/wpa_supplicant: dropped wpa_supplicant from pentoo tree. Gentoo's is newer anyway

This commit is contained in:
Zero_Chaos 2010-05-31 17:29:53 +00:00
parent 6a7d1bb9d0
commit 3b248a1c4b
8 changed files with 228 additions and 303 deletions

View file

@ -1,7 +1,9 @@
AUX fix-menu-crash-2010.01.1.patch 2420 RMD160 076a088463f6c5358198c5aa6b07b0ca279c8804 SHA1 1ee3418bbee6133b5148331f5e00d1606253840f SHA256 9cd7633aec703f641db845a07405b756b731a4a16e1bf99bd23c84b9da219767
AUX kismet-pentoo.patch 490 RMD160 374c3be715e6b5741f3232d50ed1194783f9ca11 SHA1 3ae5ae1c6e392a710ee85dfec801c098c4a4129d SHA256 a38b0124e6d07bac442cf7fc62feba2fbd540f2d0cb93daba82238bf124bf63c
AUX kismet.confd 403 RMD160 cf6cad4dc844ccf9c807edfb5adec2351c0cd249 SHA1 50ce39c8989ddf214f72b3ac14f2a989d6121d15 SHA256 d2f5bb606e4dac45c8de27843ab460b9dac02e83979e52e1b8b3ca3af841adeb
AUX kismet.initd 742 RMD160 f91c46a9a3d1cac2610659e65a1a3538af4f2772 SHA1 54aa3d489e2fade47cca11a036cb1237dab7786a SHA256 b4420c22264ff3604bf956b65bca5b564cbb70676c3f48d5e444f3aa6687a624
DIST kismet-2010-01-R1.tar.gz 887325 RMD160 fb77368ccf702971bb877d83d5c7e819daeecbb3 SHA1 4ac00edd8607196dffc450535487104edef76c1d SHA256 9d1d1eae686d546e2fb8d6b4b3dcc106b7de5bd2bf4cf36d123b74625a8ed880
EBUILD kismet-2010.01.1-r1.ebuild 3741 RMD160 1a0234ebb2088d5c5d96c9bda2ae6238bafd2b84 SHA1 494cd425a5c406b68b887097bc8828078d971822 SHA256 63e1b872d5a71fe82b256c0ad561177cb67025f80d966fbd6c087de118529b2d
EBUILD kismet-2010.01.1-r2.ebuild 3867 RMD160 7a61d36f2a01ff472e21a0c21471389c7ea4aba6 SHA1 a73755ec40d9fee4af4ff6d1fdd7b734fe16be70 SHA256 f3f3753844887e8f3f478410ec7f7998582aa24c8155f2a409ebf0e66afa5651
EBUILD kismet-2010.01.1.ebuild 2883 RMD160 f467e46de8e49788a7b44dc22f97ce3840ff0507 SHA1 e9a6b30c151c0a0f49edf483d85a37ecf5e7042f SHA256 29d12405f8c942d05cbeca9a0d72d5330969ce7331239747d5d90ce418ac0735
EBUILD kismet-9999.ebuild 3218 RMD160 3c60daf507fde0a131d0761c5c3078c4ae32f022 SHA1 345d32497d1db60acf15db2947f8f6360c43da53 SHA256 049b76d32000f31492ba792b7263524b0cdcc15fb6078cb1252701943c811cae

View file

@ -0,0 +1,93 @@
Index: kis_panel_widgets.cc
===================================================================
--- kis_panel_widgets.cc (revision 3042)
+++ kis_panel_widgets.cc (working copy)
@@ -1334,14 +1334,23 @@
}
void Kis_Menu::FindNextEnabledItem() {
+ int looped = 0;
+
// Handle disabled and spacer items
if (menubar[cur_menu]->items[cur_item]->enabled == 0) {
// find the next enabled item
for (int i = cur_item; i <= (int) menubar[cur_menu]->items.size(); i++) {
// Loop
- if (i >= (int) menubar[cur_menu]->items.size())
+ if (i >= (int) menubar[cur_menu]->items.size()) {
+ looped = 1;
i = 0;
+ }
+ if (looped && i == cur_item) {
+ cur_item = 0;
+ break;
+ }
+
if (menubar[cur_menu]->items[i]->visible == 0)
continue;
@@ -1354,14 +1363,23 @@
}
void Kis_Menu::FindPrevEnabledItem() {
+ int looped = 0;
+
// Handle disabled and spacer items
if (menubar[cur_menu]->items[cur_item]->enabled == 0) {
// find the next enabled item
for (int i = cur_item; i >= -1; i--) {
// Loop
- if (i < 0)
+ if (i < 0) {
i = menubar[cur_menu]->items.size() - 1;
+ looped = 1;
+ }
+ if (looped && i == cur_item) {
+ cur_item = 0;
+ break;
+ }
+
if (menubar[cur_menu]->items[i]->visible == 0)
continue;
@@ -1495,6 +1513,11 @@
return -1;
}
+ if (menubar[cur_menu]->items[cur_item]->enabled == 0) {
+ FindNextEnabledItem();
+ return -1;
+ }
+
int ret = (cur_menu * 100) + cur_item + 1;
// Per-menu callbacks
Index: packetsource_drone.cc
===================================================================
--- packetsource_drone.cc (revision 3042)
+++ packetsource_drone.cc (working copy)
@@ -332,6 +332,13 @@
drone_packet *dpkt = (drone_packet *) &(buf[pos]);
if (kis_ntoh32(dpkt->sentinel) != DroneSentinel) {
+ /*
+ fprintf(stderr, "debug - pkt sentinel mismatch pos %u rlen %u\n", pos, rlen);
+ for (unsigned int z = pos; z < rlen; z++)
+ fprintf(stderr, "%02x ", buf[z]);
+ fprintf(stderr, "\n");
+ */
+
if (reconnect) {
_MSG("Kismet drone client failed to find the sentinel "
"value in a packet header, dropping connection. Will "
@@ -351,6 +358,8 @@
unsigned int dplen = kis_ntoh32(dpkt->data_len);
+ // fprintf(stderr, "debug - dplen %u\n", dplen);
+
// Check for incomplete packets
if (rlen - (int) pos < (int) (dplen + sizeof(drone_packet))) {
break;

View file

@ -0,0 +1,133 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit toolchain-funcs linux-info eutils
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="http://www.kismetwireless.net/code/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="+ncurses +pcre speech +plugin-autowep +plugin-btscan +plugin-ptw +plugin-spectools +suid"
RDEPEND="net-wireless/wireless-tools
kernel_linux? ( sys-libs/libcap
>=dev-libs/libnl-1.1 )
net-libs/libpcap
pcre? ( dev-libs/libpcre )
suid? ( sys-libs/libcap )
ncurses? ( sys-libs/ncurses )
speech? ( app-accessibility/flite )
plugin-btscan? ( net-wireless/bluez )
plugin-spectools? ( net-wireless/spectools )"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
src_compile() {
cd "${S}"
epatch "${FILESDIR}"/kismet-pentoo.patch
#stolen from svn for bugfix until release (remove on version increment)
epatch "${FILESDIR}"/fix-menu-crash-2010.01.1.patch
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
if ! use pcre; then
myconf="${myconf} --disable-pcre"
fi
econf ${myconf} \
--with-linuxheaders="${KV_DIR}" || die "econf failed"
emake dep || die "emake dep failed"
emake || die "emake failed"
if use plugin-autowep; then
cd "${S}"/plugin-autowep
KIS_SRC_DIR="${S}" emake || die "emake failed"
fi
if use plugin-btscan; then
cd "${S}"/plugin-btscan
KIS_SRC_DIR="${S}" emake || die "emake failed"
fi
if use plugin-ptw; then
cd "${S}"/plugin-ptw
KIS_SRC_DIR="${S}" emake || die "emake failed"
fi
if use plugin-spectools; then
cd "${S}"/plugin-spectools
KIS_SRC_DIR="${S}" emake || die "emake failed"
fi
}
src_install () {
if use plugin-autowep; then
cd "${S}"/plugin-autowep
KIS_SRC_DIR="${S}" emake DESTDIR="${D}" install || die "emake install failed"
fi
if use plugin-btscan; then
cd "${S}"/plugin-btscan
KIS_SRC_DIR="${S}" emake DESTDIR="${D}" install || die "emake install failed"
fi
if use plugin-ptw; then
cd "${S}"/plugin-ptw
KIS_SRC_DIR="${S}" emake DESTDIR="${D}" install || die "emake install failed"
fi
if use plugin-spectools; then
cd "${S}"/plugin-spectools
KIS_SRC_DIR="${S}" emake DESTDIR="${D}" install || die "emake install failed"
fi
cd "${S}"
emake DESTDIR="${D}" commoninstall || die "emake install failed"
##dragorn would prefer I set fire to my head than do this, but it works
# install headers for external plugins
insinto /usr/include/kismet
doins *.h || die "Header installation failed"
#write a plugin finder that tells you what needs to be rebuilt when kismet is updated, etc
dodoc CHANGELOG RELEASENOTES.txt README* docs/* || die
newinitd "${FILESDIR}"/${PN}.initd kismet
newconfd "${FILESDIR}"/${PN}.confd kismet
insinto /etc
doins conf/kismet{,_drone}.conf || die
if use suid; then
dobin kismet_capture || die
fi
}
pkg_preinst() {
if use suid; then
enewgroup kismet
fowners root:kismet /usr/bin/kismet_capture || die
# Need to set the permissions after chowning.
# See chown(2)
fperms 4550 /usr/bin/kismet_capture || die
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
}

View file

@ -1,5 +0,0 @@
AUX dbus_path_fix.patch 286 RMD160 891b3b8dc1ed75089a5be31e4a6937fe52178ad0 SHA1 8bf3cc3e970a039c282ca8e01d3096273f1d19f7 SHA256 1d64d21d9a38a41665b054775bfa77c3c3849d2d60d30575434c77b3630ff52f
AUX wpa_cli.sh 1312 RMD160 d894097c699d067068d2cace9bf71dd6c8c29908 SHA1 f2887f74eb053183d13fcb7d039d91c01fb3765a SHA256 f6b62c8b1db53e94c49ad717d10f5cbb3b08127ba9f8ab9c72da14ba52f995d8
AUX wpa_supplicant.conf 183 RMD160 591d852e8993648793f717402c7b5c52e1f54b71 SHA1 0a7f2922ad2394f475e1485d5537d1b2c6d7cafb SHA256 15082ad37ebd98f57c3733454a0921a79dc2b41007f1b012fb7e67c09d87de3a
DIST wpa_supplicant-0.6.9.tar.gz 1178238 RMD160 e8427935b17c354c2654250501236dcd3f239307 SHA1 3764f7bda4e5c87caac2b9e134cb59996f073f09 SHA256 6e5284fa3f7c56e001fae92486eaa31340db5dd925dcb38bd572d2e8ed70f570
EBUILD wpa_supplicant-0.6.9.ebuild 6918 RMD160 5bcfa1b1d748c8d043ab832fc2ca0304a3a995a4 SHA1 00ab521cad19f51ed8261875ffbd4e235e0b4ab8 SHA256 12a97531eeb0278d0454b2341579e1ba76846003296311d746a3a9e14a566953

View file

@ -1,8 +0,0 @@
--- dbus-wpa_supplicant.service.old 2009-04-15 23:16:19.000000000 +0000
+++ dbus-wpa_supplicant.service 2009-04-15 23:16:29.000000000 +0000
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
-Exec=/sbin/wpa_supplicant -u
+Exec=/usr/sbin/wpa_supplicant -u
User=root

View file

@ -1,45 +0,0 @@
#!/bin/sh
# Copyright 1999-2006 Gentoo Foundation
# Written by Roy Marples <uberlord@gentoo.org>
# Distributed under the terms of the GNU General Public License v2
# Alternatively, this file may be distributed under the terms of the BSD License
# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_cli.sh,v 1.1 2006/07/11 15:07:16 uberlord Exp $
if [ -z "$1" -o -z "$2" ]; then
logger -t wpa_cli "Insufficient parameters"
exit 1
fi
INTERFACE="$1"
ACTION="$2"
# Note, the below action must NOT mark the interface down via ifconfig, ip or
# similar. Addresses can be removed, changed and daemons can be stopped, but
# the interface must remain up for wpa_supplicant to work.
if [ -f /etc/gentoo-release ]; then
EXEC="/etc/init.d/net.${INTERFACE} --quiet"
else
logger -t wpa_cli "I don't know what to do with this distro!"
exit 1
fi
case ${ACTION} in
CONNECTED)
EXEC="${EXEC} start"
;;
DISCONNECTED)
EXEC="${EXEC} stop"
;;
*)
logger -t wpa_cli "Unknown action ${ACTION}"
exit 1
;;
esac
# ${EXEC} can use ${IN_BACKGROUND} so that it knows that the user isn't
# stopping the interface and a background process - like wpa_cli - is.
export IN_BACKGROUND=true
logger -t wpa_cli "interface ${INTERFACE} ${ACTION}"
${EXEC} || logger -t wpa_cli "executing '${EXEC}' failed"

View file

@ -1,7 +0,0 @@
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={
key_mgmt=NONE
priority=-9999999
}

View file

@ -1,238 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild,v 1.1 2009/04/15 21:45:22 gurligebis Exp $
EAPI="2"
inherit eutils toolchain-funcs qt3 qt4
DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
LICENSE="|| ( GPL-2 BSD )"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
IUSE="dbus debug gnutls gsm madwifi ps3 qt3 qt4 readline ssl wps kernel_linux kernel_FreeBSD"
DEPEND="dev-libs/libnl
dbus? ( sys-apps/dbus )
kernel_linux? (
gsm? ( sys-apps/pcsc-lite )
madwifi? ( ||
( >net-wireless/madwifi-ng-tools-0.9.3
net-wireless/madwifi-old
net-wireless/madwifi-hal-tools )
)
)
!kernel_linux? ( net-libs/libpcap )
qt4? ( x11-libs/qt-gui:4 )
!qt4? ( qt3? ( x11-libs/qt:3 ) )
readline? ( sys-libs/ncurses sys-libs/readline )
gnutls? ( net-libs/gnutls )
!gnutls? ( ssl? ( dev-libs/openssl ) )
!gnutls? ( !ssl? ( dev-libs/libtommath ) )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${P}/${PN}"
pkg_setup() {
if use gnutls && use ssl ; then
einfo "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\""
fi
if use qt3 && use qt4 ; then
einfo "You have both 'qt3' and 'qt4' USE flags enabled: defaulting to USE=\"qt4\""
fi
}
src_prepare() {
# net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
sed -i \
-e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
../src/l2_packet/l2_packet_freebsd.c || die
# People seem to take the example configuration file too literally (bug #102361)
sed -i \
-e "s:^\(opensc_engine_path\):#\1:" \
-e "s:^\(pkcs11_engine_path\):#\1:" \
-e "s:^\(pkcs11_module_path\):#\1:" \
wpa_supplicant.conf || die
# Change configuration to match Gentoo locations (bug #143750)
sed -i \
-e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
-e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
wpa_supplicant.conf || die
epatch "${FILESDIR}"/dbus_path_fix.patch
}
src_configure() {
# Toolchain setup
echo "CC = $(tc-getCC)" > .config
# Basic setup
echo "CONFIG_CTRL_IFACE=y" >> .config
echo "CONFIG_BACKEND=file" >> .config
# Basic authentication methods
# NOTE: we don't set GPSK or SAKE as they conflict
# with the below options
echo "CONFIG_EAP_GTC=y" >> .config
echo "CONFIG_EAP_MD5=y" >> .config
echo "CONFIG_EAP_OTP=y" >> .config
echo "CONFIG_EAP_PAX=y" >> .config
echo "CONFIG_EAP_PSK=y" >> .config
echo "CONFIG_EAP_TLV=y" >> .config
echo "CONFIG_IEEE8021X_EAPOL=y" >> .config
echo "CONFIG_PKCS12=y" >> .config
echo "CONFIG_PEERKEY=y" >> .config
echo "CONFIG_EAP_LEAP=y" >> .config
echo "CONFIG_EAP_MSCHAPV2=y" >> .config
echo "CONFIG_EAP_PEAP=y" >> .config
echo "CONFIG_EAP_TLS=y" >> .config
echo "CONFIG_EAP_TTLS=y" >> .config
if use dbus ; then
echo "CONFIG_CTRL_IFACE_DBUS=y" >> .config
fi
if use debug ; then
echo "CONFIG_DEBUG_FILE=y" >> .config
fi
if use gsm ; then
# Smart card authentication
echo "CONFIG_EAP_SIM=y" >> .config
echo "CONFIG_EAP_AKA=y" >> .config
echo "CONFIG_EAP_AKA_PRIME=y" >> .config
echo "CONFIG_PCSC=y" >> .config
fi
if use readline ; then
# readline/history support for wpa_cli
echo "CONFIG_READLINE=y" >> .config
fi
# SSL authentication methods
if use ssl ; then
echo "CONFIG_TLS=openssl" >> .config
echo "CONFIG_SMARTCARD=y" >> .config
elif use gnutls ; then
echo "CONFIG_TLS=gnutls" >> .config
echo "CONFIG_GNUTLS_EXTRA=y" >> .config
else
echo "CONFIG_TLS=internal" >> .config
fi
if use kernel_linux ; then
# Linux specific drivers
echo "CONFIG_DRIVER_ATMEL=y" >> .config
#echo "CONFIG_DRIVER_BROADCOM=y" >> .config
#echo "CONFIG_DRIVER_HERMES=y" >> .config
echo "CONFIG_DRIVER_HOSTAP=y" >> .config
echo "CONFIG_DRIVER_IPW=y" >> .config
echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
echo "CONFIG_DRIVER_NL80211=y" >> .config
#echo "CONFIG_DRIVER_PRISM54=y" >> .config
echo "CONFIG_DRIVER_RALINK=y" >> .config
echo "CONFIG_DRIVER_WEXT=y" >> .config
echo "CONFIG_DRIVER_WIRED=y" >> .config
if use madwifi ; then
# Add include path for madwifi-driver headers
echo "CFLAGS += -I/usr/include/madwifi" >> .config
echo "CONFIG_DRIVER_MADWIFI=y" >> .config
fi
if use ps3 ; then
echo "CONFIG_DRIVER_PS3=y" >> .config
fi
elif use kernel_FreeBSD ; then
# FreeBSD specific driver
echo "CONFIG_DRIVER_BSD=y" >> .config
fi
# Wi-Fi Protected Setup (WPS)
if use wps ; then
echo "CONFIG_WPS=y" >> .config
fi
# Enable mitigation against certain attacks against TKIP
echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config
}
src_compile() {
emake || die "emake failed"
if use qt4 ; then
cd "${S}"/wpa_gui-qt4
eqmake4 wpa_gui.pro
emake || die "Qt4 wpa_gui compilation failed"
elif use qt3 ; then
cd "${S}"/wpa_gui
eqmake3 wpa_gui.pro
emake || die "Qt3 wpa_gui compilation failed"
fi
}
src_install() {
dosbin wpa_supplicant || die
dobin wpa_cli wpa_passphrase || die
# baselayout-1 compat
dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant || die
dosym /usr/bin/wpa_cli /bin/wpa_cli || die
exeinto /etc/wpa_supplicant/
newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
wpa_supplicant.conf || die "dodoc failed"
doman doc/docbook/*.{5,8} || die "doman failed"
if use qt4 ; then
into /usr
dobin wpa_gui-qt4/wpa_gui || die
elif use qt3 ; then
into /usr
dobin wpa_gui/wpa_gui || die
fi
if use qt3 || use qt4 ; then
make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
fi
if use dbus ; then
insinto /etc/dbus-1/system.d
newins dbus-wpa_supplicant.conf wpa_supplicant.conf || die
insinto /usr/share/dbus-1/system-services
newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service' || die
keepdir /var/run/wpa_supplicant
fi
}
pkg_postinst() {
einfo "If this is a clean installation of wpa_supplicant, you"
einfo "have to create a configuration file named"
einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
einfo
einfo "An example configuration file is available for reference in"
einfo "/usr/share/doc/${PF}/"
if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
echo
ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf"
ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
fi
if use madwifi ; then
echo
einfo "This package compiles against the headers installed by"
einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
einfo "You should re-emerge ${PN} after upgrading these packages."
fi
}