[hostapd] Switch libnl to libnl3 build dependency

Simone Caronni slaanesh at fedoraproject.org
Mon Feb 3 08:47:34 UTC 2014


commit b7025e747535aa877cb5c3cd7baa7f77915dbb8f
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Mon Feb 3 09:47:52 2014 +0100

    Switch libnl to libnl3 build dependency

 hostapd-document-libnl-configuration.patch |   22 +++++++++++++++++++++
 hostapd.spec                               |   29 ++++++++++++++++++++-------
 2 files changed, 43 insertions(+), 8 deletions(-)
---
diff --git a/hostapd-document-libnl-configuration.patch b/hostapd-document-libnl-configuration.patch
new file mode 100644
index 0000000..384d594
--- /dev/null
+++ b/hostapd-document-libnl-configuration.patch
@@ -0,0 +1,22 @@
+--- a/hostapd/defconfig
++++ b/hostapd/defconfig
+@@ -22,6 +22,19 @@ CONFIG_DRIVER_HOSTAP=y
+ # Driver interface for drivers using the nl80211 kernel interface
+ CONFIG_DRIVER_NL80211=y
+ 
++# driver_nl80211.c requires libnl. If you are compiling it yourself
++# you may need to point hostapd to your version of libnl.
++#
++#CFLAGS += -I$<path to libnl include files>
++#LIBS += -L$<path to libnl library files>
++
++# Use libnl v2.0 (or 3.0) libraries.
++#CONFIG_LIBNL20=y
++
++# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
++#CONFIG_LIBNL32=y
++
++
+ # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
+ #CONFIG_DRIVER_BSD=y
+ #CFLAGS += -I/usr/local/include
diff --git a/hostapd.spec b/hostapd.spec
index 23c2556..6d9e35d 100644
--- a/hostapd.spec
+++ b/hostapd.spec
@@ -2,7 +2,7 @@
 
 Name:           hostapd
 Version:        2.0
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
 License:        BSD
 URL:            http://w1.fi/hostapd
@@ -14,8 +14,9 @@ Source3:        %{name}.sysconfig
 Source4:        %{name}.init
 Patch0:         %{name}-RPM_OPT_FLAGS.patch
 Patch1:         %{name}-EAP-TLS-server-Fix-TLS-Message-Length-validation.patch
+Patch2:         %{name}-document-libnl-configuration.patch
 
-BuildRequires:  libnl-devel >= 1.1
+BuildRequires:  libnl3-devel
 BuildRequires:  openssl-devel
 
 %if 0%{?fedora} || 0%{?rhel} >= 7
@@ -59,17 +60,25 @@ Logwatch scripts for hostapd.
 # 	commit 586c446e0ff42ae00315b014924ec669023bd8de
 %patch1 -p1
 
+# http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=3043b4f4550a71487bd9f0cc876d1baddbb7bb5d
+%patch2 -p1
+
 # Prepare default config file
 cat %{SOURCE2} | sed -e 's/HOSTAPD_VERSION/'%{version}'/' > %{name}.conf
 
 %build
 cd hostapd
-cat defconfig | sed -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
-                        -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \
-                        -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
-                        -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
-                        -e '/^#CONFIG_IEEE80211N=y/s/^#//' \
-                        -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' > .config
+cat defconfig | sed \
+    -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
+    -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \
+    -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
+    -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
+    -e '/^#CONFIG_IEEE80211N=y/s/^#//' \
+    -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \
+    -e '/^#CONFIG_LIBNL32=y/s/^#//' \
+    > .config
+echo "CFLAGS += -I%{_includedir}/libnl3" > .config
+echo "LIBS += -L%{_libdir}" > .config
 make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS"
 
 %install
@@ -171,6 +180,10 @@ fi
 %{_sysconfdir}/logwatch/scripts/services/%{name}
 
 %changelog
+* Mon Feb 03 2014 Simone Caronni <negativo17 at gmail.com> - 2.0-6
+- Add libnl build documentation and switch libnl-devel to libnl3-devel build
+  dependency (#1041471).
+
 * Fri Nov 22 2013 John W. Linville <linville at redhat.com> - 2.0-5
 - Enable CONFIG_FULL_DYNAMIC_VLAN build option
 


More information about the scm-commits mailing list