summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Alasuutari2006-11-26 23:55:02 +0200
committerJaka Kranjc2007-01-21 23:11:26 +0100
commit67f920d8f51175be0baa737ff8162137b10df34d (patch)
treedf6bb537dbf797284f3faa0fb0846614eded625c
parent5587f46ea857b6cb9c1f2c5fe91aa80169574662 (diff)
wpa_supplicant: fixed spell, added devel branch version 0.5.6.
-rwxr-xr-xnet/wpa_supplicant/BUILD37
-rwxr-xr-xnet/wpa_supplicant/CONFIGURE114
-rwxr-xr-xnet/wpa_supplicant/DEPENDS44
-rwxr-xr-xnet/wpa_supplicant/DETAILS22
-rw-r--r--net/wpa_supplicant/HISTORY17
-rwxr-xr-xnet/wpa_supplicant/INSTALL12
-rwxr-xr-xnet/wpa_supplicant/PREPARE4
-rwxr-xr-xnet/wpa_supplicant/PRE_BUILD10
-rwxr-xr-xnet/wpa_supplicant/init.d/wpa_supplicant56
-rw-r--r--net/wpa_supplicant/init.d/wpa_supplicant.conf15
-rw-r--r--net/wpa_supplicant/wpa_ctrl.conf9
11 files changed, 307 insertions, 33 deletions
diff --git a/net/wpa_supplicant/BUILD b/net/wpa_supplicant/BUILD
index 02b9cf156d..b43004930c 100755
--- a/net/wpa_supplicant/BUILD
+++ b/net/wpa_supplicant/BUILD
@@ -1,5 +1,34 @@
-sed -i "s|/local||" Makefile &&
-#keep only enabled options
-grep "\"y\"" $SPELL_CONFIG.p >>.config &&
- make
+# Create .config file for make (this is here instead of PRE_BUILD because
+# OPTS isn't available there, and this is equivalent to running ./configure
+# anyway).
+local VARS="CONFIG_NO_WPA CONFIG_DNET_PCAP CONFIG_L2_PACKET CONFIG_NO_WPA2 \
+ CONFIG_NO_STDOUT_DEBUG CONFIG_CTRL_IFACE CONFIG_DRIVER_HOSTAP \
+ CONFIG_DRIVER_HERMES CONFIG_DRIVER_MADWIFI CONFIG_DRIVER_ATMEL \
+ CONFIG_DRIVER_WEXT CONFIG_DRIVER_NDISWRAPPER \
+ CONFIG_DRIVER_BROADCOM CONFIG_DRIVER_IPW CONFIG_DRIVER_WIRED \
+ CONFIG_EAP_MD5 CONFIG_EAP_MSCHAPV2 CONFIG_EAP_TLS \
+ CONFIG_EAP_PEAP CONFIG_EAP_TTLS CONFIG_EAP_GTC CONFIG_EAP_OTP \
+ CONFIG_EAP_SIM CONFIG_EAP_AKA CONFIG_EAP_PSK CONFIG_EAP_PAX \
+ CONFIG_EAP_LEAP CONFIG_EAP_SAKE CONFIG_EAP_GPSK \
+ CONFIG_EAP_GPSK_SHA256 CONFIG_PKCS12 CONFIG_SMARTCARD" var &&
+if [[ $WPA_RELEASE == devel ]]
+then
+ VARS="$VARS CONFIG_TLS"
+fi &&
+
+for var in $VARS $OPTS
+do
+ if [[ ${!var} && ${!var} != n ]]
+ then
+ echo "$var=${!var}" >> .config
+ fi
+done &&
+
+make &&
+
+source "$GRIMOIRE/is_depends_enabled.function" &&
+if is_depends_enabled $SPELL qt-x11
+then
+ make wpa_gui
+fi
diff --git a/net/wpa_supplicant/CONFIGURE b/net/wpa_supplicant/CONFIGURE
index f190303370..1bdec9f39e 100755
--- a/net/wpa_supplicant/CONFIGURE
+++ b/net/wpa_supplicant/CONFIGURE
@@ -1,22 +1,94 @@
-config_query CONFIG_WIRELESS_EXTENSION "wireless extensions?" y
-config_query CONFIG_DRIVER_WEXT "generic wireless extensions support?" y
-
-echo now choose hardare drivers
-config_query CONFIG_DRIVER_HOSTAP "Host AP support?" n
-config_query CONFIG_DRIVER_MADWIFI "madwifi support?" n
-config_query CONFIG_DRIVER_HERMES "Agere support?" n
-config_query CONFIG_DRIVER_PRISM54 "Prism54 support?" n
-config_query CONFIG_DRIVER_NDISWRAPPER "ndiswrapper support?" n
-config_query CONFIG_DRIVER_ATMEL "Atmel support?" n
-config_query CONFIG_DRIVER_BROADCOM "Broadcom support?" n
-config_query CONFIG_DRIVER_IPW "Intel ipw2100/ipw2200 support?" n
-
-echo now choose control interfaces
-config_query CONFIG_CTRL_IFACE "internal supplicant?" y
-config_query CONFIG_XSUPPLICANT_IFACE "external supplicant?" n
-
-config_query WAP_EAP "WAP-Enterprise support" n
-if [ "$WAP_EAP" == "y" ];then
- config_query CONFIG_EAP_TTLS "EAP-TTLS support?" n
- config_query CONFIG_EAP_PEAP "EAP-PEAP support?" n
+# Notice: CONFIG_WIRELESS_EXTENSION and CONFIG_IEEE8021X_EAPOL are
+# automatically enabled in Makefile if relevant options are chosen,
+# prompting about them is unnecessary.
+
+config_query CONFIG_NO_WPA "Build without WPA support?" n &&
+
+if [[ $WPA_RELEASE != devel ]]
+then
+ config_query CONFIG_CTRL_IFACE \
+ "Build external control interface?" \
+ y &&
+ config_query CONFIG_DNET_PCAP \
+ "Use libpcap/libdnet instead of native Linux packet socket \
+interface?" \
+ n
+else
+ config_query CONFIG_NO_WPA2 "Build without WPA2 support?" n &&
+ config_query_list CONFIG_CTRL_IFACE \
+ "Select control interface to build (n is none):" \
+ unix \
+ udp \
+ n &&
+ config_query_list CONFIG_L2_PACKET \
+ "Select layer2 packet processing implementation:" \
+ linux \
+ pcap
+fi &&
+
+config_query CONFIG_NO_STDOUT_DEBUG "Remove debugging code?" n &&
+
+message "${MESSAGE_COLOR}Hardware driver options:${DEFAULT_COLOR}" &&
+
+#
+## Commented-out options require external sources to work, WIP.
+#
+config_query CONFIG_DRIVER_HOSTAP "Host AP (Prism2/2.5/3) support?" y &&
+#config_query CONFIG_DRIVER_HERMES "Agere support?" n &&
+#config_query CONFIG_DRIVER_MADWIFI "MADWIFI support?" n &&
+config_query CONFIG_DRIVER_ATMEL "Atmel AT76C5XXx support?" y &&
+config_query CONFIG_DRIVER_WEXT "Generic Wireless Extensions support?" y &&
+config_query CONFIG_DRIVER_NDISWRAPPER "NdisWrapper support?" n &&
+#config_query CONFIG_DRIVER_BROADCOM "Broadcom IEEE 802.11a/g support?" n &&
+config_query CONFIG_DRIVER_IPW "Intel IPW2100/IPW2200 support?" n &&
+config_query CONFIG_DRIVER_WIRED "Wired Ethernet support?" y &&
+
+message "${MESSAGE_COLOR}Authentication method options:${DEFAULT_COLOR}" &&
+
+config_query CONFIG_EAP_MD5 "EAP-MD5-Challenge support?" y &&
+config_query CONFIG_EAP_MSCHAPV2 "EAP-MSCHAPv2 support?" y &&
+config_query CONFIG_EAP_TLS "EAP-TLS support?" y &&
+config_query CONFIG_EAP_PEAP "EAP-PEAP support?" y &&
+config_query CONFIG_EAP_TTLS "EAP-TTLS support?" y &&
+config_query CONFIG_EAP_GTC "EAP-GTC support?" y &&
+config_query CONFIG_EAP_OTP "EAP-OTC support?" y &&
+config_query CONFIG_EAP_SIM "EAP-SIM (GSM) support?" n &&
+config_query CONFIG_EAP_AKA "EAP-AKA (UMTS) support?" n &&
+config_query CONFIG_EAP_PSK "EAP-PSK support?" n &&
+config_query CONFIG_EAP_PAX "EAP-PAX support?" n &&
+config_query CONFIG_EAP_LEAP "LEAP support?" y &&
+
+if [[ $WPA_RELEASE == devel ]]
+then
+ config_query CONFIG_EAP_SAKE "EAP-SAKE support?" n &&
+ config_query CONFIG_EAP_GPSK "EAP-GPSK support?" n &&
+
+ if [[ $CONFIG_EAP_GPSK == y ]]
+ then
+ config_query CONFIG_EAP_GPSK_SHA256 \
+ "Build SHA256 cipher suite for EAP-GPSK?" \
+ n
+ fi
+fi &&
+
+if [[ $CONFIG_EAP_TLS == y ||
+ $CONFIG_EAP_PEAP == y ||
+ $CONFIG_EAP_TTLS == y ]]
+then
+ message "${MESSAGE_COLOR}Crypto options:${DEFAULT_COLOR}" &&
+
+ if [[ $WPA_RELEASE != devel ]]
+ then
+ CONFIG_TLS=openssl &&
+ persistent_add CONFIG_TLS
+ else
+ config_query_list CONFIG_TLS \
+ "Select TLS library to use:" \
+ openssl \
+ gnutls \
+ internal
+ fi &&
+
+ config_query CONFIG_PKCS12 "Enable PKCS#12 certificate support?" y &&
+ config_query CONFIG_SMARTCARD "Enable smartcard support?" y
fi
diff --git a/net/wpa_supplicant/DEPENDS b/net/wpa_supplicant/DEPENDS
index aab30ccd46..446ef2e934 100755
--- a/net/wpa_supplicant/DEPENDS
+++ b/net/wpa_supplicant/DEPENDS
@@ -1,5 +1,41 @@
-depends wireless_tools &&
-if [ "$WAP-EAP" == "y" ];then
- depends openssl
+depends wireless_tools &&
+
+if [[ $CONFIG_EAP_SIM == y ||
+ $CONFIG_EAP_AKA == y ]]
+then
+ depends pcsc-lite
+fi &&
+
+if [[ $CONFIG_TLS &&
+ $CONFIG_TLS != internal ]]
+then
+ depends $CONFIG_TLS
+fi &&
+
+if [[ $CONFIG_DNET_PCAP == y ||
+ $CONFIG_L2_PACKET == pcap ]]
+then
+ depends libpcap &&
+ depends libdnet
+fi &&
+
+if [[ $CONFIG_CTRL_IFACE != n ]]
+then
+ optional_depends readline \
+ CONFIG_READLINE=y \
+ CONFIG_READLINE=n \
+ "for Readline support in CLI frontend" &&
+
+ optional_depends qt-x11 \
+ "" \
+ "" \
+ "to build wpa_gui, a Qt-based GUI frontend"
+fi &&
+
+if [[ $WPA_RELEASE == devel ]]
+then
+ optional_depends dbus \
+ CONFIG_CTRL_IFACE_DBUS=y \
+ CONFIG_CTRL_IFACE_DBUS=n \
+ "to enable D-Bus control interface"
fi
-#optional_depends openssl "" "" "for WPA-Enterprise support"
diff --git a/net/wpa_supplicant/DETAILS b/net/wpa_supplicant/DETAILS
index 2816bfeb23..f7afe16f55 100755
--- a/net/wpa_supplicant/DETAILS
+++ b/net/wpa_supplicant/DETAILS
@@ -1,16 +1,30 @@
SPELL=wpa_supplicant
+if [[ $WPA_RELEASE == devel ]]
+then
+ VERSION=0.5.6
+ SOURCE_HASH=sha512:d7188c911ba2d075831e6a949f099d5bf22ccee926398ebc2456d9572578dce7dd07ea10282e0401a38481d6d26f49a449de6b1de96b3aef79f7a4f87c1706e3
+else
VERSION=0.4.9
SOURCE_HASH=sha512:9b4e2a0a36ca1dfc247393c5765a3461ed1341a5a008d5d50aaec1db9ca4742a83fb4f37a9685281b37924a47071460a6b0388fc9c71aa0e18a7445296c02d4c
+fi
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://hostap.epitest.fi/releases/${SOURCE}
WEB_SITE=http://hostap.epitest.fi/wpa_supplicant/
ENTERED=20050130
-
LICENSE[0]=GPL
- SHORT="Linux WPA/WPA2/IEEE 802.1X Supplicant "
+ SHORT="A WPA/WPA2 Supplicant."
cat << EOF
-wpa_supplicant is a WPA Supplicant for Linux, BSD and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). It is suitable for both desktop/laptop computers and embedded systems. Supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver.
+wpa_supplicant is a WPA Supplicant for Linux, BSD, and Windows with
+support for WPA and WPA2 (IEEE 802.11i / RSN). It is suitable for
+both desktop/laptop computers and embedded systems. Supplicant is the
+IEEE 802.1X/WPA component that is used in the client stations. It
+implements key negotiation with a WPA Authenticator and it controls the
+roaming and IEEE 802.11 authentication/association of the wlan driver.
-wpa_supplicant is designed to be a "daemon" program that runs in the background and acts as the backend component controlling the wireless connection. wpa_supplicant supports separate frontend programs and a text-based frontend (wpa_cli) and a GUI (wpa_gui) are included with wpa_supplicant.
+wpa_supplicant is designed to be a "daemon" program that runs in the
+background and acts as the backend component controlling the wireless
+connection. wpa_supplicant supports separate frontend programs and a
+text-based frontend (wpa_cli) and a GUI (wpa_gui) are included with
+wpa_supplicant.
EOF
diff --git a/net/wpa_supplicant/HISTORY b/net/wpa_supplicant/HISTORY
index ea9367e8dc..f69e923c07 100644
--- a/net/wpa_supplicant/HISTORY
+++ b/net/wpa_supplicant/HISTORY
@@ -1,3 +1,20 @@
+2006-11-26 Juuso Alasuutari <iuso@sourcemage.org>
+ * PREPARE: Added, query which release to build (new option is devel).
+ * DETAILS: Added devel release version 0.5.6, modified descriptions.
+ * CONFIGURE: Complete rewrite; added prompts for all relevant options.
+ * DEPENDS: Added depends pcsc-lite, openssl | gnutls, libpcap &
+ libdnet, and optional_depends readline, qt-x11, dbus. All are
+ conditional to one or more configure options.
+ * PRE_BUILD: Added, moved install path fix here from BUILD,
+ added fix for devel release install borkage.
+ * BUILD: Modified to create .config without using $SPELL_CONFIG,
+ added wpa_gui build.
+ * INSTALL: Added, use DESTDIR=$INSTALL_ROOT, install wpa_gui and
+ default config file.
+ * init.d/wpa_supplicant: Added, init script.
+ * init.d/wpa_supplicant.conf: Added, sysconfig file.
+ * wpa_ctrl.conf: Added, control interface config file.
+
2006-09-08 Treeve Jelbert <treeve@pi.be>
* DETAILS: version 0.4.9
diff --git a/net/wpa_supplicant/INSTALL b/net/wpa_supplicant/INSTALL
new file mode 100755
index 0000000000..24ca22cd52
--- /dev/null
+++ b/net/wpa_supplicant/INSTALL
@@ -0,0 +1,12 @@
+make DESTDIR="$INSTALL_ROOT" install &&
+
+if is_depends_enabled $SPELL qt-x11
+then
+ cp wpa_gui/wpa_gui "$INSTALL_ROOT/usr/sbin/"
+fi &&
+
+if list_find "$INIT_INSTALLED" wpa_supplicant
+then
+ install_config_file "$SCRIPT_DIRECTORY/wpa_ctrl.conf" \
+ "$INSTALL_ROOT/etc/wpa_ctrl.conf"
+fi
diff --git a/net/wpa_supplicant/PREPARE b/net/wpa_supplicant/PREPARE
new file mode 100755
index 0000000000..5366138c0a
--- /dev/null
+++ b/net/wpa_supplicant/PREPARE
@@ -0,0 +1,4 @@
+config_query_list WPA_RELEASE \
+ "Select which release to build:" \
+ stable \
+ devel
diff --git a/net/wpa_supplicant/PRE_BUILD b/net/wpa_supplicant/PRE_BUILD
new file mode 100755
index 0000000000..3bc919a057
--- /dev/null
+++ b/net/wpa_supplicant/PRE_BUILD
@@ -0,0 +1,10 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+sed -i "s|/local||g" Makefile &&
+
+# Dynamic EAP target borks install.
+if [[ $WPA_RELEASE == devel ]]
+then
+ sed -i "s/wpa_cli dynamic_eap_methods/wpa_cli/" Makefile
+fi
diff --git a/net/wpa_supplicant/init.d/wpa_supplicant b/net/wpa_supplicant/init.d/wpa_supplicant
new file mode 100755
index 0000000000..7214f8916d
--- /dev/null
+++ b/net/wpa_supplicant/init.d/wpa_supplicant
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+. /etc/sysconfig/wpa_supplicant
+
+PROGRAM=/usr/sbin/wpa_supplicant
+RUNLEVEL=3
+NEEDS="+network"
+
+CLI=/usr/sbin/wpa_cli
+DROPFILE=/var/tmp/wpa_supplicant.drop
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ required_executable /usr/sbin/iwconfig
+
+ if /usr/sbin/iwconfig 2>&1 | grep -q "^$INTERFACE "; then
+ if [[ $(/usr/sbin/iwconfig 2>/dev/null | grep "$INTERFACE *unassociated") ]]
+ then
+ echo Starting control interface...
+ $PROGRAM -B -i $INTERFACE -D $DRIVER -c $CONFIG -g $CONTROL
+ evaluate_retval
+ /bin/echo "INTERFACE=\"$INTERFACE\"" 2>/dev/null > $DROPFILE
+ elif [[ $(/usr/sbin/iwconfig 2>/dev/null | grep "$INTERFACE *radio off") ]]
+ then
+ echo $INTERFACE: radio off
+ (exit 1)
+ evaluate_retval
+ else
+ echo $INTERFACE: already connected
+ (exit 1)
+ evaluate_retval
+ fi
+ else
+ echo $INTERFACE: not found
+ (exit 1)
+ evaluate_retval
+ fi
+}
+
+stop()
+{
+ required_executable $CLI
+
+ [[ -f $DROPFILE ]] && . $DROPFILE && rm $DROPFILE
+ echo Stopping control interface...
+ $CLI -i $INTERFACE terminate 1>/dev/null
+ evaluate_retval
+}
+
+status()
+{
+ required_executable $CLI
+ $CLI status
+}
diff --git a/net/wpa_supplicant/init.d/wpa_supplicant.conf b/net/wpa_supplicant/init.d/wpa_supplicant.conf
new file mode 100644
index 0000000000..5bca903e96
--- /dev/null
+++ b/net/wpa_supplicant/init.d/wpa_supplicant.conf
@@ -0,0 +1,15 @@
+#
+# wpa_supplicant init script config for Source Mage GNU/Linux.
+#
+
+# Network interface name
+INTERFACE=wlan
+
+# Device driver
+DRIVER=wext
+
+# Config file
+CONFIG=/etc/wpa_ctrl.conf
+
+# Global control interface socket
+CONTROL=/var/run/wpa_supplicant-global
diff --git a/net/wpa_supplicant/wpa_ctrl.conf b/net/wpa_supplicant/wpa_ctrl.conf
new file mode 100644
index 0000000000..d3af0d633b
--- /dev/null
+++ b/net/wpa_supplicant/wpa_ctrl.conf
@@ -0,0 +1,9 @@
+#
+# wpa_supplicant control interface config for Source Mage GNU/Linux.
+#
+
+# Control interface
+ctrl_interface=/var/run/wpa_supplicant
+
+# Members of this group can access the control interface
+ctrl_interface_group=root