[pkg-wpa-devel] r1603 - in /wpasupplicant/trunk/debian: changelog config/kfreebsd-udeb config/linux-udeb config/udeb patches/13_human_readable_signal.patch patches/series rules source/local-options wpasupplicant-udeb.install wpasupplicant.lintian-overrides

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sun Aug 28 01:29:13 UTC 2011


Author: kelmo-guest
Date: Sun Aug 28 01:29:12 2011
New Revision: 1603

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1603
Log:
* Improve integration of the udeb addition with existing debian/rules:
  - build the required binary in the build target in similar way to standard
    package build
  - install binary manually in dh_auto_install override rather than
    wpasupplicant-udeb.install to handle renaming of binary
  - sync udeb CFLAGS with the standard build
  - allow potential for non-linux udebs, add a kfreebsd udeb configuration
    snippet
* Filter the numerous hyphen-used-as-minus-sign informational messages
  from lintian output.
* Add preferred options to debian/source/local-options to assist with quilt
  patch management.
* Add patch for wpa_gui-qt4 which displays scan results signal strength in
  dBm with bar indicator. (Closes: #630681)

Added:
    wpasupplicant/trunk/debian/config/kfreebsd-udeb
    wpasupplicant/trunk/debian/config/linux-udeb
      - copied unchanged from r1602, wpasupplicant/trunk/debian/config/udeb
    wpasupplicant/trunk/debian/patches/13_human_readable_signal.patch
    wpasupplicant/trunk/debian/source/local-options
Removed:
    wpasupplicant/trunk/debian/config/udeb
    wpasupplicant/trunk/debian/wpasupplicant-udeb.install
Modified:
    wpasupplicant/trunk/debian/changelog
    wpasupplicant/trunk/debian/patches/series
    wpasupplicant/trunk/debian/rules
    wpasupplicant/trunk/debian/wpasupplicant.lintian-overrides

Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=1603&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Sun Aug 28 01:29:12 2011
@@ -8,8 +8,22 @@
   * ACK NMU (Closes: #610931)
     - add wpasupplicant-udeb
     - build against libnl3
-
- -- Kel Modderman <kel at otaku42.de>  Sat, 27 Aug 2011 08:47:57 +1000
+  * Improve integration of the udeb addition with existing debian/rules:
+    - build the required binary in the build target in similar way to standard
+      package build
+    - install binary manually in dh_auto_install override rather than
+      wpasupplicant-udeb.install to handle renaming of binary
+    - sync udeb CFLAGS with the standard build
+    - allow potential for non-linux udebs, add a kfreebsd udeb configuration
+      snippet
+  * Filter the numerous hyphen-used-as-minus-sign informational messages
+    from lintian output.
+  * Add preferred options to debian/source/local-options to assist with quilt
+    patch management.
+  * Add patch for wpa_gui-qt4 which displays scan results signal strength in
+    dBm with bar indicator. (Closes: #630681)
+
+ -- Kel Modderman <kel at otaku42.de>  Sun, 28 Aug 2011 11:25:21 +1000
 
 wpasupplicant (0.7.3-3.1) unstable; urgency=low
 

Added: wpasupplicant/trunk/debian/config/kfreebsd-udeb
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/config/kfreebsd-udeb?rev=1603&op=file
==============================================================================
--- wpasupplicant/trunk/debian/config/kfreebsd-udeb (added)
+++ wpasupplicant/trunk/debian/config/kfreebsd-udeb Sun Aug 28 01:29:12 2011
@@ -1,0 +1,9 @@
+# Debian's wpa_supplicant build time configuration
+CONFIG_DRIVER_BSD=y
+LIBS += -lbsd
+CONFIG_CTRL_IFACE=y
+CONFIG_BACKEND=file
+CONFIG_MAIN=main
+CONFIG_OS=unix
+CONFIG_ELOOP=eloop
+CONFIG_L2_PACKET=freebsd

Added: wpasupplicant/trunk/debian/patches/13_human_readable_signal.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/13_human_readable_signal.patch?rev=1603&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/13_human_readable_signal.patch (added)
+++ wpasupplicant/trunk/debian/patches/13_human_readable_signal.patch Sun Aug 28 01:29:12 2011
@@ -1,0 +1,162 @@
+Description: Display signal strength in dBm with visual indicator in the form
+ of a bar for scan results displayed by wpa_gui-qt4. Any signal > -35dBm is
+ treated as full signal bar, signals between range of -95<->-35dBm are
+ displayed linearly. Convert WEXT signal level value to scale that nl80211
+ typically reports in dBm. The condition which differentiates 8-bit WEXT dBm
+ and regular dBm is probably fragile, but there is currently no way to know
+ what the driver is going to report for signal strength.
+ See also:
+ http://mail.gnome.org/archives/networkmanager-list/2009-November/msg00003.html
+ http://lists.shmoo.com/pipermail/hostap/2009-April/019682.html
+Author: Kel Modderman <kel at otaku42.de>
+Bug-Debian: http://bugs.debian.org/630681
+---
+--- a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
++++ b/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
+@@ -15,6 +15,7 @@
+ #include <cstdio>
+ 
+ #include "scanresults.h"
++#include "signalbar.h"
+ #include "wpagui.h"
+ #include "networkconfig.h"
+ 
+@@ -33,6 +34,7 @@ ScanResults::ScanResults(QWidget *parent
+ 	wpagui = NULL;
+ 	scanResultsWidget->setItemsExpandable(FALSE);
+ 	scanResultsWidget->setRootIsDecorated(FALSE);
++	scanResultsWidget->setItemDelegate(new SignalBar(scanResultsWidget));
+ }
+ 
+ 
+@@ -91,7 +93,7 @@ void ScanResults::updateResults()
+ 				bssid = (*it).mid(pos);
+ 			else if ((*it).startsWith("freq="))
+ 				freq = (*it).mid(pos);
+-			else if ((*it).startsWith("qual="))
++			else if ((*it).startsWith("level="))
+ 				signal = (*it).mid(pos);
+ 			else if ((*it).startsWith("flags="))
+ 				flags = (*it).mid(pos);
+--- /dev/null
++++ b/wpa_supplicant/wpa_gui-qt4/signalbar.h
+@@ -0,0 +1,34 @@
++/*
++ * wpa_gui - SignalBar class
++ * Copyright (c) 2011, Kel Modderman <kel at otaku42.de>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Alternatively, this software may be distributed under the terms of BSD
++ * license.
++ *
++ * See README and COPYING for more details.
++ */
++
++#ifndef SIGNALBAR_H
++#define SIGNALBAR_H
++
++#include <QObject>
++#include <QStyledItemDelegate>
++
++class SignalBar : public QStyledItemDelegate
++{
++	Q_OBJECT
++
++public:
++	SignalBar(QObject *parent = 0);
++	~SignalBar();
++
++	virtual void paint(QPainter *painter,
++			   const QStyleOptionViewItem &option,
++			   const QModelIndex &index) const ;
++};
++
++#endif /* SIGNALBAR_H */
+--- /dev/null
++++ b/wpa_supplicant/wpa_gui-qt4/signalbar.cpp
+@@ -0,0 +1,64 @@
++/*
++ * wpa_gui - SignalBar class
++ * Copyright (c) 2011, Kel Modderman <kel at otaku42.de>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Alternatively, this software may be distributed under the terms of BSD
++ * license.
++ *
++ * See README and COPYING for more details.
++ */
++
++#include <cstdio>
++#include <qapplication.h>
++
++#include "signalbar.h"
++
++
++SignalBar::SignalBar(QObject *parent)
++	: QStyledItemDelegate(parent)
++{
++}
++
++
++SignalBar::~SignalBar()
++{
++}
++
++
++void SignalBar::paint(QPainter *painter,
++		      const QStyleOptionViewItem &option,
++		      const QModelIndex &index) const
++{
++	QStyleOptionProgressBar opts;
++	int signal;
++
++	if (index.column() != 3) {
++		QStyledItemDelegate::paint(painter, option, index);
++		return;
++	}
++
++	if (index.data().toInt() > 0)
++		signal = 0 - (256 - index.data().toInt());
++	else
++		signal = index.data().toInt();
++
++	opts.minimum = -95;
++	opts.maximum = -35;
++	if (signal < opts.minimum)
++		opts.progress = opts.minimum;
++	else if (signal > opts.maximum)
++		opts.progress = opts.maximum;
++	else
++		opts.progress = signal;
++
++	opts.text = QString::number(signal) + " dBm";
++	opts.textVisible = true;
++	opts.rect = option.rect;
++
++	QApplication::style()->drawControl(QStyle::CE_ProgressBar,
++					   &opts, painter);
++}
+--- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
++++ b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
+@@ -34,6 +34,7 @@ HEADERS	+= wpamsg.h \
+ 	wpagui.h \
+ 	eventhistory.h \
+ 	scanresults.h \
++	signalbar.h \
+ 	userdatarequest.h \
+ 	networkconfig.h \
+ 	addinterface.h \
+@@ -44,6 +45,7 @@ SOURCES	+= main.cpp \
+ 	wpagui.cpp \
+ 	eventhistory.cpp \
+ 	scanresults.cpp \
++	signalbar.cpp \
+ 	userdatarequest.cpp \
+ 	networkconfig.cpp \
+ 	addinterface.cpp \

Modified: wpasupplicant/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/series?rev=1603&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/patches/series (original)
+++ wpasupplicant/trunk/debian/patches/series Sun Aug 28 01:29:12 2011
@@ -4,3 +4,4 @@
 07_dbus_service_syslog.patch
 09_dbus_emit_change_events.patch
 12_wpa_gui_knotify_support.patch
+13_human_readable_signal.patch

Modified: wpasupplicant/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/rules?rev=1603&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/rules (original)
+++ wpasupplicant/trunk/debian/rules Sun Aug 28 01:29:12 2011
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 CFLAGS = -MMD -Wall -g
-UDEB_CFLAGS = -Wall -g -Os
+UCFLAGS = -MMD -Wall -g -Os
 CXXFLAGS = -g
 LDFLAGS = -Wl,--as-needed
 V = 1
@@ -18,14 +18,24 @@
 
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 BUILD_DOT_CONFIG := debian/config/$(DEB_HOST_ARCH_OS)
+UDEB_DOT_CONFIG := debian/config/$(DEB_HOST_ARCH_OS)-udeb
 
 ### start dh overrides
 override_dh_auto_configure:
-	cp --remove-destination $(BUILD_DOT_CONFIG) wpa_supplicant/.config
 	dh_auto_configure --sourcedirectory=wpa_supplicant/wpa_gui-qt4 \
 	                  --buildsystem=qmake
 
 override_dh_auto_build:
+	# Build udeb
+	cp -v --remove-destination $(UDEB_DOT_CONFIG) wpa_supplicant/.config
+	CFLAGS="$(UCFLAGS)" dh_auto_build --sourcedirectory=wpa_supplicant \
+	              --buildsystem=makefile \
+		      --parallel
+	mv -v wpa_supplicant/wpa_supplicant wpa_supplicant/wpa_supplicant-udeb
+	dh_auto_clean --sourcedirectory=wpa_supplicant \
+	              --buildsystem=makefile
+	# End udeb
+	cp -v --remove-destination $(BUILD_DOT_CONFIG) wpa_supplicant/.config
 	dh_auto_build --sourcedirectory=wpa_supplicant \
 	              --buildsystem=makefile \
 		      --parallel
@@ -53,7 +63,7 @@
 	chmod 0755 debian/wpagui/usr/share/wpagui/netdev_wrapper
 
 override_dh_install:
-	dh_install -Nwpasupplicant-udeb
+	dh_install
 	install --mode=644 -D wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
 		debian/wpasupplicant/etc/dbus-1/system.d/wpa_supplicant.conf
 	install --mode=644 -D wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
@@ -62,12 +72,9 @@
 		debian/wpasupplicant/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service
 	install --mode=755 -D wpa_supplicant/examples/60_wpa_supplicant \
 		debian/wpasupplicant/usr/lib/pm-utils/sleep.d/60_wpa_supplicant
-	# Build/install udeb... I'm embarrassed to have to put this all here
-	$(MAKE) -C wpa_supplicant clean
-	rm -f wpa_supplicant/.config
-	cp -v debian/config/udeb wpa_supplicant/.config
-	CFLAGS="$(UDEB_CFLAGS)" $(MAKE) -C wpa_supplicant
-	dh_install -pwpasupplicant-udeb
+	# Install udeb
+	install --mode=755 -D wpa_supplicant/wpa_supplicant-udeb \
+		debian/wpasupplicant-udeb/sbin/wpa_supplicant
 
 override_dh_installchangelogs:
 	dh_installchangelogs wpa_supplicant/ChangeLog

Added: wpasupplicant/trunk/debian/source/local-options
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/source/local-options?rev=1603&op=file
==============================================================================
--- wpasupplicant/trunk/debian/source/local-options (added)
+++ wpasupplicant/trunk/debian/source/local-options Sun Aug 28 01:29:12 2011
@@ -1,0 +1,2 @@
+unapply-patches
+abort-on-upstream-changes

Modified: wpasupplicant/trunk/debian/wpasupplicant.lintian-overrides
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/wpasupplicant.lintian-overrides?rev=1603&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/wpasupplicant.lintian-overrides (original)
+++ wpasupplicant/trunk/debian/wpasupplicant.lintian-overrides Sun Aug 28 01:29:12 2011
@@ -1,3 +1,6 @@
 # We distribute the package under the terms of the BSD license due to the
 # openssl issue, tell lintian to not complain:
 wpasupplicant binary: possible-gpl-code-linked-with-openssl
+
+# These are numerous and unlikely to be fixed anytime soon, filter them out.
+wpasupplicant binary: hyphen-used-as-minus-sign




More information about the Pkg-wpa-devel mailing list