From b6fd6aa8ae5e65134fa1f95cd57e019ab1754f5b Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 22 Apr 2013 23:09:46 +0200 Subject: wpa_supplicant: Update to 1.0 Switches dependency from libnl to libnl3. --- source.local/n/wpa_supplicant/config/dot.config | 42 +++ .../n/wpa_supplicant/config/wpa_gui.desktop | 7 + source.local/n/wpa_supplicant/config/wpa_gui.png | Bin 0 -> 5124 bytes .../n/wpa_supplicant/config/wpa_supplicant.conf | 2 + .../wpa_supplicant/config/wpa_supplicant.logrotate | 6 + source.local/n/wpa_supplicant/doinst.sh.gz | Bin 0 -> 284 bytes .../fi.epitest.hostap.WPASupplicant.service | 4 - ...0b5639935d37b95d00f86b57f2844a9c775f57.patch.gz | Bin 897 -> 0 bytes .../patches/dbus-service-file-args.diff | 20 ++ .../n/wpa_supplicant/patches/include-unistd_h.diff | 15 ++ .../n/wpa_supplicant/patches/libnl3-includes.diff | 12 + .../patches/quiet-scan-results-message.diff | 12 + .../patches/squelch-driver-disconnect-spam.diff | 95 +++++++ source.local/n/wpa_supplicant/wpa_gui.png | Bin 5124 -> 0 bytes .../n/wpa_supplicant/wpa_supplicant.SlackBuild | 287 +++++++-------------- .../n/wpa_supplicant/wpa_supplicant.defconfig | 27 -- 16 files changed, 306 insertions(+), 223 deletions(-) create mode 100644 source.local/n/wpa_supplicant/config/dot.config create mode 100644 source.local/n/wpa_supplicant/config/wpa_gui.desktop create mode 100644 source.local/n/wpa_supplicant/config/wpa_gui.png create mode 100644 source.local/n/wpa_supplicant/config/wpa_supplicant.conf create mode 100644 source.local/n/wpa_supplicant/config/wpa_supplicant.logrotate create mode 100644 source.local/n/wpa_supplicant/doinst.sh.gz delete mode 100644 source.local/n/wpa_supplicant/fi.epitest.hostap.WPASupplicant.service delete mode 100644 source.local/n/wpa_supplicant/hostap-07.git-b80b5639935d37b95d00f86b57f2844a9c775f57.patch.gz create mode 100644 source.local/n/wpa_supplicant/patches/dbus-service-file-args.diff create mode 100644 source.local/n/wpa_supplicant/patches/include-unistd_h.diff create mode 100644 source.local/n/wpa_supplicant/patches/libnl3-includes.diff create mode 100644 source.local/n/wpa_supplicant/patches/quiet-scan-results-message.diff create mode 100644 source.local/n/wpa_supplicant/patches/squelch-driver-disconnect-spam.diff delete mode 100644 source.local/n/wpa_supplicant/wpa_gui.png delete mode 100644 source.local/n/wpa_supplicant/wpa_supplicant.defconfig diff --git a/source.local/n/wpa_supplicant/config/dot.config b/source.local/n/wpa_supplicant/config/dot.config new file mode 100644 index 0000000..f4d7306 --- /dev/null +++ b/source.local/n/wpa_supplicant/config/dot.config @@ -0,0 +1,42 @@ +CONFIG_BACKEND=file +CONFIG_BGSCAN_SIMPLE=y +CONFIG_CTRL_IFACE=y +CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_INTRO=y +CONFIG_CTRL_IFACE_DBUS_NEW=y +CONFIG_DEBUG_FILE=y +CONFIG_DRIVER_NL80211=y +CONFIG_DRIVER_WEXT=y +CONFIG_DRIVER_WIRED=y +CONFIG_EAP_AKA=y +CONFIG_EAP_FAST=y +CONFIG_EAP_GPSK=y +CONFIG_EAP_GPSK_SHA256=y +CONFIG_EAP_GTC=y +CONFIG_EAP_IKEV2=y +CONFIG_EAP_LEAP=y +CONFIG_EAP_MD5=y +CONFIG_EAP_MSCHAPV2=y +CONFIG_EAP_OTP=y +CONFIG_EAP_PAX=y +CONFIG_EAP_PEAP=y +CONFIG_EAP_SAKE=y +CONFIG_EAP_TLS=y +CONFIG_EAP_TNC=y +CONFIG_EAP_TTLS=y +CONFIG_IEEE8021X_EAPOL=y +CONFIG_LIBNL32=y +CONFIG_PEERKEY=y +CONFIG_PKCS12=y +CONFIG_READLINE=y +CONFIG_SMARTCARD=y +CONFIG_WPS=y + +# These five are not defined by Fedora +# Do we still need them? +#CONFIG_DRIVER_ATMEL=y +#CONFIG_DRIVER_HOSTAP=y +#CONFIG_DRIVER_IPW=y +#CONFIG_DRIVER_NDISWRAPPER=y +#CONFIG_DRIVER_RALINK=y + diff --git a/source.local/n/wpa_supplicant/config/wpa_gui.desktop b/source.local/n/wpa_supplicant/config/wpa_gui.desktop new file mode 100644 index 0000000..31b8b6b --- /dev/null +++ b/source.local/n/wpa_supplicant/config/wpa_gui.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=wpa_gui +Comment[en]=Wpa_supplicant management +Exec=kdesu wpa_gui +Icon=wpa_gui +Type=Application +Categories=Qt;Network; diff --git a/source.local/n/wpa_supplicant/config/wpa_gui.png b/source.local/n/wpa_supplicant/config/wpa_gui.png new file mode 100644 index 0000000..a72f356 Binary files /dev/null and b/source.local/n/wpa_supplicant/config/wpa_gui.png differ diff --git a/source.local/n/wpa_supplicant/config/wpa_supplicant.conf b/source.local/n/wpa_supplicant/config/wpa_supplicant.conf new file mode 100644 index 0000000..4dbbf96 --- /dev/null +++ b/source.local/n/wpa_supplicant/config/wpa_supplicant.conf @@ -0,0 +1,2 @@ +ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=root diff --git a/source.local/n/wpa_supplicant/config/wpa_supplicant.logrotate b/source.local/n/wpa_supplicant/config/wpa_supplicant.logrotate new file mode 100644 index 0000000..bd7ef91 --- /dev/null +++ b/source.local/n/wpa_supplicant/config/wpa_supplicant.logrotate @@ -0,0 +1,6 @@ +/var/log/wpa_supplicant.log { + missingok + notifempty + size 30k + create 0600 root root +} diff --git a/source.local/n/wpa_supplicant/doinst.sh.gz b/source.local/n/wpa_supplicant/doinst.sh.gz new file mode 100644 index 0000000..afc360f Binary files /dev/null and b/source.local/n/wpa_supplicant/doinst.sh.gz differ diff --git a/source.local/n/wpa_supplicant/fi.epitest.hostap.WPASupplicant.service b/source.local/n/wpa_supplicant/fi.epitest.hostap.WPASupplicant.service deleted file mode 100644 index e8b4250..0000000 --- a/source.local/n/wpa_supplicant/fi.epitest.hostap.WPASupplicant.service +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=fi.epitest.hostap.WPASupplicant -Exec=/usr/sbin/wpa_supplicant -u -User=root diff --git a/source.local/n/wpa_supplicant/hostap-07.git-b80b5639935d37b95d00f86b57f2844a9c775f57.patch.gz b/source.local/n/wpa_supplicant/hostap-07.git-b80b5639935d37b95d00f86b57f2844a9c775f57.patch.gz deleted file mode 100644 index 20b22d5..0000000 Binary files a/source.local/n/wpa_supplicant/hostap-07.git-b80b5639935d37b95d00f86b57f2844a9c775f57.patch.gz and /dev/null differ diff --git a/source.local/n/wpa_supplicant/patches/dbus-service-file-args.diff b/source.local/n/wpa_supplicant/patches/dbus-service-file-args.diff new file mode 100644 index 0000000..7e2449f --- /dev/null +++ b/source.local/n/wpa_supplicant/patches/dbus-service-file-args.diff @@ -0,0 +1,20 @@ +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-06 01:07:44.523999837 -0500 +@@ -1,5 +1,5 @@ + [D-BUS Service] + Name=fi.epitest.hostap.WPASupplicant +-Exec=@BINDIR@/wpa_supplicant -u ++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid + User=root + SystemdService=wpa_supplicant.service +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-06 01:06:59.528589953 -0500 +@@ -1,5 +1,5 @@ + [D-BUS Service] + Name=fi.w1.wpa_supplicant1 +-Exec=@BINDIR@/wpa_supplicant -u ++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid + User=root + SystemdService=wpa_supplicant.service diff --git a/source.local/n/wpa_supplicant/patches/include-unistd_h.diff b/source.local/n/wpa_supplicant/patches/include-unistd_h.diff new file mode 100644 index 0000000..a3c6ae8 --- /dev/null +++ b/source.local/n/wpa_supplicant/patches/include-unistd_h.diff @@ -0,0 +1,15 @@ +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_gui-qt4/wpagui.cpp wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_gui-qt4/wpagui.cpp +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_gui-qt4/wpagui.cpp 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_gui-qt4/wpagui.cpp 2012-05-05 17:04:40.706570034 -0500 +@@ -12,10 +12,8 @@ + * See README and COPYING for more details. + */ + +-#ifdef __MINGW32__ +-/* Need to get getopt() */ ++/* Need to get getopt() regardless with gcc-4.7.x */ + #include +-#endif + + #ifdef CONFIG_NATIVE_WINDOWS + #include diff --git a/source.local/n/wpa_supplicant/patches/libnl3-includes.diff b/source.local/n/wpa_supplicant/patches/libnl3-includes.diff new file mode 100644 index 0000000..f8ff01c --- /dev/null +++ b/source.local/n/wpa_supplicant/patches/libnl3-includes.diff @@ -0,0 +1,12 @@ +diff -Nur wpa_supplicant-1.0-rc3.orig/src/drivers/drivers.mak wpa_supplicant-1.0-rc3/src/drivers/drivers.mak +--- wpa_supplicant-1.0-rc3.orig/src/drivers/drivers.mak 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/src/drivers/drivers.mak 2012-05-05 17:16:01.933597117 -0500 +@@ -48,7 +48,7 @@ + ifdef CONFIG_LIBNL32 + DRV_LIBS += -lnl-3 + DRV_LIBS += -lnl-genl-3 +- DRV_CFLAGS += -DCONFIG_LIBNL20 ++ DRV_CFLAGS += -DCONFIG_LIBNL20 `pkg-config --cflags libnl-3.0` + else + ifdef CONFIG_LIBNL_TINY + DRV_LIBS += -lnl-tiny diff --git a/source.local/n/wpa_supplicant/patches/quiet-scan-results-message.diff b/source.local/n/wpa_supplicant/patches/quiet-scan-results-message.diff new file mode 100644 index 0000000..2b3eb67 --- /dev/null +++ b/source.local/n/wpa_supplicant/patches/quiet-scan-results-message.diff @@ -0,0 +1,12 @@ +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/events.c wpa_supplicant-1.0-rc3/wpa_supplicant/events.c +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/events.c 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/events.c 2012-05-05 17:02:38.061179720 -0500 +@@ -1076,7 +1076,7 @@ + } + + wpa_dbg(wpa_s, MSG_DEBUG, "New scan results available"); +- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); ++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS); + wpas_notify_scan_results(wpa_s); + + wpas_notify_scan_done(wpa_s, 1); diff --git a/source.local/n/wpa_supplicant/patches/squelch-driver-disconnect-spam.diff b/source.local/n/wpa_supplicant/patches/squelch-driver-disconnect-spam.diff new file mode 100644 index 0000000..b8d2be6 --- /dev/null +++ b/source.local/n/wpa_supplicant/patches/squelch-driver-disconnect-spam.diff @@ -0,0 +1,95 @@ +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/events.c wpa_supplicant-1.0-rc3/wpa_supplicant/events.c +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/events.c 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/events.c 2012-05-06 01:01:17.529134316 -0500 +@@ -1593,6 +1593,15 @@ + wpa_s->keys_cleared = 0; + wpa_clear_keys(wpa_s, wpa_s->bssid); + } ++ ++ if (wpa_s->wpa_state == WPA_DISCONNECTED) { ++ wpa_s->disconnect_count++; ++ if (!eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) { ++ eloop_register_timeout(6, 0, wpa_disconnect_spam_handle, wpa_s, NULL); ++ wpa_printf(MSG_DEBUG, "%s: scheduled DISCONNECT spam handler", __FUNCTION__); ++ } ++ } ++ + wpa_supplicant_mark_disassoc(wpa_s); + + if (authenticating && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_supplicant.c wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_supplicant.c +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_supplicant.c 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_supplicant.c 2012-05-06 01:01:17.530134303 -0500 +@@ -434,6 +434,9 @@ + + wpa_supplicant_cancel_scan(wpa_s); + wpa_supplicant_cancel_auth_timeout(wpa_s); ++ if (eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) ++ eloop_cancel_timeout(wpa_disconnect_spam_handle, wpa_s, NULL); ++ + eloop_cancel_timeout(wpa_supplicant_stop_countermeasures, wpa_s, NULL); + #ifdef CONFIG_DELAYED_MIC_ERROR_REPORT + eloop_cancel_timeout(wpa_supplicant_delayed_mic_error_report, +@@ -592,6 +595,23 @@ + #endif /* CONFIG_BGSCAN */ + + ++void wpa_disconnect_spam_handle(void *eloop_ctx, void *timeout_ctx) ++{ ++ struct wpa_supplicant *wpa_s = eloop_ctx; ++ const u8 bssid[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; ++ ++ wpa_printf(MSG_DEBUG, "%s: %d disconnect events in 6 seconds", ++ __FUNCTION__, wpa_s->disconnect_count); ++ ++ if (wpa_s->disconnect_count >= 3) { ++ wpa_printf(MSG_DEBUG, "%s: forcing SSID/BSSID reset", __FUNCTION__); ++ wpa_drv_disassociate(wpa_s, bssid, WLAN_REASON_DEAUTH_LEAVING); ++ wpa_supplicant_req_scan(wpa_s, 1, 0); ++ } ++ wpa_s->disconnect_count = 0; ++} ++ ++ + /** + * wpa_supplicant_set_state - Set current connection state + * @wpa_s: Pointer to wpa_supplicant data +@@ -612,6 +632,18 @@ + if (state != WPA_SCANNING) + wpa_supplicant_notify_scanning(wpa_s, 0); + ++ if (state != WPA_DISCONNECTED && state != WPA_SCANNING) { ++ /* If the state isn't disconnected, cancel any registered ++ * disconnect spam handler, which should only live while ++ * disconnect events are coming in quickly. ++ */ ++ wpa_s->disconnect_count = 0; ++ if (eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) { ++ wpa_printf(MSG_DEBUG, "%s: canceling DISCONNECT spam handler", __FUNCTION__); ++ eloop_cancel_timeout(wpa_disconnect_spam_handle, wpa_s, NULL); ++ } ++ } ++ + if (state == WPA_COMPLETED && wpa_s->new_connection) { + #if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG) + struct wpa_ssid *ssid = wpa_s->current_ssid; +diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_supplicant_i.h wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_supplicant_i.h +--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/wpa_supplicant_i.h 2012-04-16 15:15:40.000000000 -0500 ++++ wpa_supplicant-1.0-rc3/wpa_supplicant/wpa_supplicant_i.h 2012-05-06 01:01:17.530134303 -0500 +@@ -355,6 +355,8 @@ + struct wps_er *wps_er; + int blacklist_cleared; + ++ int disconnect_count; ++ + struct wpabuf *pending_eapol_rx; + struct os_time pending_eapol_rx_time; + u8 pending_eapol_rx_src[ETH_ALEN]; +@@ -535,6 +537,7 @@ + int sec, int usec); + void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, + enum wpa_states state); ++void wpa_disconnect_spam_handle(void *eloop_ctx, void *timeout_ctx); + struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s); + const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s); + void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s); diff --git a/source.local/n/wpa_supplicant/wpa_gui.png b/source.local/n/wpa_supplicant/wpa_gui.png deleted file mode 100644 index a72f356..0000000 Binary files a/source.local/n/wpa_supplicant/wpa_gui.png and /dev/null differ diff --git a/source.local/n/wpa_supplicant/wpa_supplicant.SlackBuild b/source.local/n/wpa_supplicant/wpa_supplicant.SlackBuild index ff4d012..2babc45 100755 --- a/source.local/n/wpa_supplicant/wpa_supplicant.SlackBuild +++ b/source.local/n/wpa_supplicant/wpa_supplicant.SlackBuild @@ -19,78 +19,68 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +# ----------------------------------------------------------------------------- -# Modified 2012 by Eric Hameleers for ARM port. +# Modified 2013 by Eric Hameleers for ARM port. PKGNAM=wpa_supplicant -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +VERSION=1.0 +BUILD=${BUILD:-1} -NUMJOBS=${NUMJOBS:-" -j7 "} +SRCVERSION=$(printf $VERSION | tr _ -) -DOCS="ChangeLog ../COPYING README README-WPS *.txt examples wpa_supplicant.conf.sample" - -# Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac -fi +NUMJOBS=${NUMJOBS:-" -j7 "} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -elif [ "$ARCH" = "arm" ]; then - SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "armel" ]; then - SLKCFLAGS="-O2 -march=armv4t" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" - LIBDIRSUFFIX="" +if [ -e $CWD/machine.conf ]; then + . $CWD/machine.conf ] +elif [ -e /etc/slackbuild/machine.conf ]; then + . /etc/slackbuild/machine.conf ] else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + # Automatically determine the architecture we're building on: + MARCH=$( uname -m ) + if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac + fi + # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + elif [ "$ARCH" = "arm" ]; then + SLKCFLAGS="-O2 -march=armv5te" + LIBDIRSUFFIX="" + else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + fi fi -# Support for some of the wireless drivers needs the header files of those -# drivers. -# Change these *_INCLUDES variables to where _your_ driver include directory -# is located. If any of these directories is found, support for the driver -# will be added to wpa_supplicant. -# My madwifi package for Slackware installs the headers here: -MADWIFI_INCLUDES="/usr/include/madwifi" -HERMES_INCLUDES="" -BROADCOM_INCLUDES="" +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM + rm -rf $PKG mkdir -p $TMP $PKG - -if ! [ -f $CWD/${PKGNAM}.defconfig ]; then - echo "Could not find ${PKGNAM}.defconfig!" - exit 1 -fi - cd $TMP -rm -rf ${PKGNAM}-${VERSION} -tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1 -cd ${PKGNAM}-${VERSION} +rm -rf ${PKGNAM}-${SRCVERSION} +tar xvf $CWD/${PKGNAM}-${SRCVERSION}.tar.?z* || exit 1 +cd ${PKGNAM}-${SRCVERSION} chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -98,179 +88,92 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -#sed -i -e \ -# "s/^#define VERSION_STR \"\(.*\)\"/#define VERSION_STR \"\1_$VERSION\"/" \ -# src/common/version.h +# Fixup various paths in the dbus service file +patch -p1 < $CWD/patches/dbus-service-file-args.diff -zcat $CWD/hostap-07.git-b80b5639935d37b95d00f86b57f2844a9c775f57.patch.gz | patch -p1 --verbose || exit 1 +# Include unistd.h +patch -p1 < $CWD/patches/include-unistd_h.diff + +# Add libnl3 includes +patch -p1 < $CWD/patches/libnl3-includes.diff + +# Eliminate some logspam +patch -p1 < $CWD/patches/quiet-scan-results-message.diff +patch -p1 < $CWD/patches/squelch-driver-disconnect-spam.diff -# The source code has been re-organized: cd wpa_supplicant # Create the configuration file for building wpa_supplicant: -cat $CWD/${PKGNAM}.defconfig > .config -if [ ! -z $MADWIFI_INCLUDES -a -d $MADWIFI_INCLUDES ]; then - echo "Adding madwifi driver (Atheros) support" - cat <<-EOT >> .config - CONFIG_DRIVER_MADWIFI=y - CFLAGS += -I${MADWIFI_INCLUDES} - EOT -fi -if [ ! -z $HERMES_INCLUDES -a -d $HERMES_INCLUDES ]; then - echo "Adding hermes driver (Agere) support" - cat <<-EOT >> .config - CONFIG_DRIVER_HERMES=y - CFLAGS += -I${HERMES_INCLUDES} - EOT -fi -if [ ! -z $BROADCOM_INCLUDES -a -d $BROADCOM_INCLUDES ]; then - echo "Adding broadcom driver support" - cat <<-EOT >> .config - CONFIG_DRIVER_BROADCOM=y - CFLAGS += -I${BROADCOM_INCLUDES} - EOT -fi -make $NUMJOBS || make || exit 1 +cat $CWD/config/dot.config > .config -# Build the Qt4 GUI client -make wpa_gui-qt4 || exit 1 +# Build the usual binaries +CFLAGS="$SLKCFLAGS" \ +make $NUMJOBS \ + BINDIR=/usr/sbin \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1 -# Make man pages if needed -( cd doc/docbook - if ! ls *.? >/dev/null 2>&1 ; then - make man - fi -) +# Build the Qt4 GUI client +CFLAGS="$SLKCFLAGS" \ +make $NUMJOBS \ + wpa_gui-qt4 \ + BINDIR=/usr/sbin \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1 -# Do not build the developer docs: -#PATH=".:$PATH" make docs +# Make sure man pages are built +make -C doc/docbook man # This goes into the doc directory later on: -cp wpa_supplicant.conf wpa_supplicant.conf.sample +mv wpa_supplicant.conf wpa_supplicant.conf.sample # Install binaries: mkdir -p $PKG/usr/sbin $PKG/usr/bin cp wpa_supplicant wpa_passphrase wpa_cli $PKG/usr/sbin/ cp wpa_gui-qt4/wpa_gui $PKG/usr/bin/ +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + # Install dbus configuration file: mkdir -p $PKG/etc/dbus-1/system.d/ cp dbus/dbus-wpa_supplicant.conf \ $PKG/etc/dbus-1/system.d/dbus-wpa_supplicant.conf -# This file should actually be shipped with Slackware's wpa_supplicant -# package, but since we missed it there (just kidding), we'll do it here: mkdir -p $PKG/usr/share/dbus-1/system-services -install -m644 dbus/{fi.epitest.hostap.WPASupplicant.service,fi.w1.wpa_supplicant1.service} \ - $PKG/usr/share/dbus-1/system-services/ -sed -e 's#Exec=/sbin/wpa_supplicant#Exec=/usr/sbin/wpa_supplicant#g' \ - -i $PKG/usr/share/dbus-1/system-services/*.service - -# Install a .desktop file for wpa_gui: -mkdir -p $PKG/usr/share/applications -cat < $PKG/usr/share/applications/wpa_gui.desktop -[Desktop Entry] -Name=wpa_gui -Comment[en]=Wpa_supplicant management -Exec=kdesu wpa_gui -Icon=wpa_gui -Type=Application -Categories=Qt;Network; -EOT - -# The icon used for the menu (converted from the wpa_gui.svg in the source) -mkdir -p $PKG/usr/share/pixmaps -cp -a $CWD/wpa_gui.png $PKG/usr/share/pixmaps/ +install -m644 dbus/*.service $PKG/usr/share/dbus-1/system-services/ + +# Install a .desktop file and icon for wpa_gui: +# (converted from the wpa_gui.svg in the source) +mkdir -p $PKG/usr/share/{applications,pixmaps} +cat $CWD/config/wpa_gui.desktop > $PKG/usr/share/applications/wpa_gui.desktop +cat $CWD/config/wpa_gui.png > $PKG/usr/share/pixmaps/wpa_gui.png + +# Install a logrotate config +mkdir -p $PKG/etc/logrotate.d +cat $CWD/config/wpa_supplicant.logrotate > $PKG/etc/logrotate.d/wpa_supplicant.new # Install man pages: for m in 5 8; do mkdir -p $PKG/usr/man/man${m} cp doc/docbook/*.${m} $PKG/usr/man/man${m}/ done +find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; -# Install a default configuration file: +# Install a default configuration file (only readable by root): mkdir -p $PKG/etc -cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf.new - # See /usr/doc/${PKGNAM}-${VERSION}/wpa_supplicant.conf.sample - # for many more options that you can use in this file. - - # This line enables the use of wpa_cli which is used by rc.wireless - # if possible (to check for successful association) - ctrl_interface=/var/run/wpa_supplicant - # By default, only root (group 0) may use wpa_cli - ctrl_interface_group=0 - eapol_version=1 - ap_scan=1 - fast_reauth=1 - #country=US - - # WPA protected network, supply your own ESSID and WPAPSK here: - network={ - scan_ssid=0 - ssid="your_essid_here" - proto=WPA RSN - key_mgmt=WPA-PSK - pairwise=CCMP TKIP - group=CCMP TKIP WEP104 WEP40 - psk=your_64_char_psk_here - priority=10 - } - - # Plaintext connection (no WPA, no IEEE 802.1X), - # nice for hotel/airport types of WiFi network. - network={ - key_mgmt=NONE - priority=0 - } - _EOT_ - -# Create the 'doinst.sh' script: -mkdir -p $PKG/install 2>/dev/null -cat < $PKG/install/doinst.sh -# Handle the incoming configuration files: -config() { - for infile in \$1; do - NEW="\$infile" - OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" - # If there's no config file by that name, mv it over: - if [ ! -r \$OLD ]; then - mv \$NEW \$OLD - elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then - # toss the redundant copy - rm \$NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... - done -} -config etc/wpa_supplicant.conf.new - -EOINS - -# Add the documentation: -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PKGNAM-$VERSION -cp -a $CWD/README.slackware $PKG/usr/doc/${PKGNAM}-${VERSION}/ -chmod -R a-w $PKG/usr/doc/$PKGNAM-$VERSION/* -chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION/* - -# This should only be read/write by root: +cat $CWD/config/wpa_supplicant.conf > $PKG/etc/wpa_supplicant.conf.new chmod 600 $PKG/etc/wpa_supplicant.conf.new -# Compress the man page(s): -find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; - -# Strip binaries: -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + ChangeLog ../COPYING README README-{P2P,WPS} examples *.txt *.sample $CWD/README.slackware \ + $PKG/usr/doc/$PKGNAM-$VERSION +chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION/* +chmod -R a-w $PKG/usr/doc/$PKGNAM-$VERSION/* -# Add a package description: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -if [ -f $CWD/doinst.sh ]; then - cat $CWD/doinst.sh >> $PKG/install/doinst.sh -fi +zcat $CWD/doinst.sh.gz >> $PKG/install/doinst.sh -# Build the package: cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz diff --git a/source.local/n/wpa_supplicant/wpa_supplicant.defconfig b/source.local/n/wpa_supplicant/wpa_supplicant.defconfig deleted file mode 100644 index 2c530fd..0000000 --- a/source.local/n/wpa_supplicant/wpa_supplicant.defconfig +++ /dev/null @@ -1,27 +0,0 @@ -CONFIG_DRIVER_HOSTAP=y -CONFIG_DRIVER_NDISWRAPPER=y -CONFIG_DRIVER_ATMEL=y -CONFIG_DRIVER_IPW=y -CONFIG_DRIVER_RALINK=y -CONFIG_DRIVER_WEXT=y -CONFIG_DRIVER_NL80211=y -CONFIG_DRIVER_WIRED=y -CONFIG_IEEE8021X_EAPOL=y -CONFIG_EAP_MD5=y -CONFIG_EAP_MSCHAPV2=y -CONFIG_EAP_TLS=y -CONFIG_EAP_PEAP=y -CONFIG_EAP_TTLS=y -CONFIG_EAP_GTC=y -CONFIG_EAP_OTP=y -CONFIG_EAP_LEAP=y -CONFIG_WPS=y -CONFIG_PKCS12=y -CONFIG_SMARTCARD=y -CONFIG_CTRL_IFACE=y -CONFIG_READLINE=y -CONFIG_BACKEND=file -CONFIG_PEERKEY=y -CONFIG_CTRL_IFACE_DBUS=y -CONFIG_CTRL_IFACE_DBUS_NEW=y -CONFIG_CTRL_IFACE_DBUS_INTRO=y -- cgit v1.2.3