1 |
commit: f7eb63336462f8e02254f603196cad22fdc07989 |
2 |
Author: Zero_Chaos <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 5 22:47:16 2015 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 5 22:47:44 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7eb6333 |
7 |
|
8 |
net-wireless/wpa_supplicant: version bump for bug #562158 |
9 |
|
10 |
Package-Manager: portage-2.2.22 |
11 |
|
12 |
net-wireless/wpa_supplicant/Manifest | 1 + |
13 |
...do-not-call-dbus-functions-with-NULL-path.patch | 12 + |
14 |
.../wpa_supplicant/wpa_supplicant-2.5.ebuild | 373 +++++++++++++++++++++ |
15 |
3 files changed, 386 insertions(+) |
16 |
|
17 |
diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest |
18 |
index 0e170b4..b8c30a4 100644 |
19 |
--- a/net-wireless/wpa_supplicant/Manifest |
20 |
+++ b/net-wireless/wpa_supplicant/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST wpa_supplicant-2.4.tar.gz 2525648 SHA256 058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122 SHA512 03d8199325b3910f77013ddb7edd803ab4444542230484e1cb465dc3df9372b39ee3307d823ce88730e8f5a5231ef3183954c54cf07297b70432f526e45aac2b WHIRLPOOL 092ae97e2c0f55d7055fd4e5d688e2ba538f785089a13c754129829854b20a98de832d9d0925dce5823a060d10a3bb5882b0bf3d6cf55f8de9bbc2b00fbb7392 |
23 |
+DIST wpa_supplicant-2.5.tar.gz 2607336 SHA256 cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316 SHA512 e3ca36ed10b4dae8f663e98ad230c8c059c952316c21a6b0638ecb1b40a5ef1b9083138ab45207cb764a17e870b4bd0625dd6efdb65856cb4dca13ccc0559e81 WHIRLPOOL 7f35ba06fc4022fe21f05a54a5b108bf2111dcb22e795e1566a514400db8348e79cc80b605dab5b586ab8f3966833ade7153e63c118794a0f06c4afd7a37781d |
24 |
|
25 |
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.5-do-not-call-dbus-functions-with-NULL-path.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.5-do-not-call-dbus-functions-with-NULL-path.patch |
26 |
new file mode 100644 |
27 |
index 0000000..deb6996 |
28 |
--- /dev/null |
29 |
+++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.5-do-not-call-dbus-functions-with-NULL-path.patch |
30 |
@@ -0,0 +1,12 @@ |
31 |
+diff -Naur wpa_supplicant/dbus/dbus_new_helpers.c wpa_supplicant-fixed/dbus/dbus_new_helpers.c |
32 |
+--- wpa_supplicant/dbus/dbus_new_helpers.c 2015-09-27 15:02:05.000000000 -0400 |
33 |
++++ wpa_supplicant-fixed/dbus/dbus_new_helpers.c 2015-10-05 18:38:58.489713168 -0400 |
34 |
+@@ -847,7 +847,7 @@ |
35 |
+ const struct wpa_dbus_property_desc *dsc; |
36 |
+ int i = 0; |
37 |
+ |
38 |
+- if (iface == NULL) |
39 |
++ if (iface == NULL || path == NULL) |
40 |
+ return; |
41 |
+ |
42 |
+ dbus_connection_get_object_path_data(iface->con, path, |
43 |
|
44 |
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.5.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.5.ebuild |
45 |
new file mode 100644 |
46 |
index 0000000..ae65c11 |
47 |
--- /dev/null |
48 |
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.5.ebuild |
49 |
@@ -0,0 +1,373 @@ |
50 |
+# Copyright 1999-2015 Gentoo Foundation |
51 |
+# Distributed under the terms of the GNU General Public License v2 |
52 |
+# $Id$ |
53 |
+ |
54 |
+EAPI=5 |
55 |
+ |
56 |
+inherit eutils toolchain-funcs qt4-r2 systemd multilib |
57 |
+ |
58 |
+DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" |
59 |
+HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" |
60 |
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz" |
61 |
+LICENSE="|| ( GPL-2 BSD )" |
62 |
+ |
63 |
+SLOT="0" |
64 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
65 |
+IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 p2p ps3 qt4 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD" |
66 |
+REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )" |
67 |
+ |
68 |
+CDEPEND="dbus? ( sys-apps/dbus ) |
69 |
+ kernel_linux? ( |
70 |
+ eap-sim? ( sys-apps/pcsc-lite ) |
71 |
+ dev-libs/libnl:3 |
72 |
+ net-wireless/crda |
73 |
+ ) |
74 |
+ !kernel_linux? ( net-libs/libpcap ) |
75 |
+ qt4? ( |
76 |
+ dev-qt/qtcore:4 |
77 |
+ dev-qt/qtgui:4 |
78 |
+ dev-qt/qtsvg:4 |
79 |
+ ) |
80 |
+ readline? ( |
81 |
+ sys-libs/ncurses:0= |
82 |
+ sys-libs/readline:0 |
83 |
+ ) |
84 |
+ ssl? ( dev-libs/openssl:0 ) |
85 |
+ !ssl? ( gnutls? ( net-libs/gnutls ) ) |
86 |
+ !ssl? ( !gnutls? ( dev-libs/libtommath ) ) |
87 |
+" |
88 |
+DEPEND="${CDEPEND} |
89 |
+ virtual/pkgconfig |
90 |
+" |
91 |
+RDEPEND="${CDEPEND} |
92 |
+ selinux? ( sec-policy/selinux-networkmanager ) |
93 |
+" |
94 |
+ |
95 |
+S="${WORKDIR}/${P}/${PN}" |
96 |
+ |
97 |
+Kconfig_style_config() { |
98 |
+ #param 1 is CONFIG_* item |
99 |
+ #param 2 is what to set it = to, defaulting in y |
100 |
+ CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" |
101 |
+ setting="${2:-y}" |
102 |
+ |
103 |
+ if [ ! $setting = n ]; then |
104 |
+ #first remove any leading "# " if $2 is not n |
105 |
+ sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" |
106 |
+ #set item = $setting (defaulting to y) |
107 |
+ sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" |
108 |
+ else |
109 |
+ #ensure item commented out |
110 |
+ sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+pkg_setup() { |
115 |
+ if use gnutls && use ssl ; then |
116 |
+ elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\"" |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+src_prepare() { |
121 |
+ # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD |
122 |
+ sed -i \ |
123 |
+ -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ |
124 |
+ ../src/l2_packet/l2_packet_freebsd.c || die |
125 |
+ |
126 |
+ # People seem to take the example configuration file too literally (bug #102361) |
127 |
+ sed -i \ |
128 |
+ -e "s:^\(opensc_engine_path\):#\1:" \ |
129 |
+ -e "s:^\(pkcs11_engine_path\):#\1:" \ |
130 |
+ -e "s:^\(pkcs11_module_path\):#\1:" \ |
131 |
+ wpa_supplicant.conf || die |
132 |
+ |
133 |
+ # Change configuration to match Gentoo locations (bug #143750) |
134 |
+ sed -i \ |
135 |
+ -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ |
136 |
+ -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ |
137 |
+ wpa_supplicant.conf || die |
138 |
+ |
139 |
+ #if use dbus; then |
140 |
+ # epatch "${FILESDIR}/${P}-dbus-path-fix.patch" |
141 |
+ #fi |
142 |
+ |
143 |
+ # systemd entries to D-Bus service files (bug #372877) |
144 |
+ echo 'SystemdService=wpa_supplicant.service' \ |
145 |
+ | tee -a dbus/*.service >/dev/null || die |
146 |
+ |
147 |
+ cd "${WORKDIR}/${P}" |
148 |
+ |
149 |
+ if use wimax; then |
150 |
+ # generate-libeap-peer.patch comes before |
151 |
+ # fix-undefined-reference-to-random_get_bytes.patch |
152 |
+ epatch "${FILESDIR}/${P}-generate-libeap-peer.patch" |
153 |
+ |
154 |
+ # multilib-strict fix (bug #373685) |
155 |
+ sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile |
156 |
+ fi |
157 |
+ |
158 |
+ # bug (320097) |
159 |
+ epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch" |
160 |
+ |
161 |
+ # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX, |
162 |
+ # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED. |
163 |
+ # bug (374089) |
164 |
+ #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch" |
165 |
+} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ # Toolchain setup |
169 |
+ tc-export CC |
170 |
+ |
171 |
+ cp defconfig .config |
172 |
+ |
173 |
+ # Basic setup |
174 |
+ Kconfig_style_config CTRL_IFACE |
175 |
+ Kconfig_style_config BACKEND file |
176 |
+ Kconfig_style_config IBSS_RSN |
177 |
+ Kconfig_style_config IEEE80211W |
178 |
+ Kconfig_style_config IEEE80211R |
179 |
+ |
180 |
+ # Basic authentication methods |
181 |
+ # NOTE: we don't set GPSK or SAKE as they conflict |
182 |
+ # with the below options |
183 |
+ Kconfig_style_config EAP_GTC |
184 |
+ Kconfig_style_config EAP_MD5 |
185 |
+ Kconfig_style_config EAP_OTP |
186 |
+ Kconfig_style_config EAP_PAX |
187 |
+ Kconfig_style_config EAP_PSK |
188 |
+ Kconfig_style_config EAP_TLV |
189 |
+ Kconfig_style_config EAP_EXE |
190 |
+ Kconfig_style_config IEEE8021X_EAPOL |
191 |
+ Kconfig_style_config PKCS12 |
192 |
+ Kconfig_style_config PEERKEY |
193 |
+ Kconfig_style_config EAP_LEAP |
194 |
+ Kconfig_style_config EAP_MSCHAPV2 |
195 |
+ Kconfig_style_config EAP_PEAP |
196 |
+ Kconfig_style_config EAP_TLS |
197 |
+ Kconfig_style_config EAP_TTLS |
198 |
+ |
199 |
+ # Enabling background scanning. |
200 |
+ Kconfig_style_config BGSCAN_SIMPLE |
201 |
+ Kconfig_style_config BGSCAN_LEARN |
202 |
+ |
203 |
+ if use dbus ; then |
204 |
+ Kconfig_style_config CTRL_IFACE_DBUS |
205 |
+ Kconfig_style_config CTRL_IFACE_DBUS_NEW |
206 |
+ Kconfig_style_config CTRL_IFACE_DBUS_INTRO |
207 |
+ fi |
208 |
+ |
209 |
+ # Enable support for writing debug info to a log file and syslog. |
210 |
+ Kconfig_style_config DEBUG_FILE |
211 |
+ Kconfig_style_config DEBUG_SYSLOG |
212 |
+ |
213 |
+ if use hs2-0 ; then |
214 |
+ Kconfig_style_config INTERWORKING |
215 |
+ Kconfig_style_config HS20 |
216 |
+ fi |
217 |
+ |
218 |
+ if use uncommon-eap-types; then |
219 |
+ Kconfig_style_config EAP_GPSK |
220 |
+ Kconfig_style_config EAP_SAKE |
221 |
+ Kconfig_style_config EAP_GPSK_SHA256 |
222 |
+ Kconfig_style_config EAP_IKEV2 |
223 |
+ Kconfig_style_config EAP_EKE |
224 |
+ fi |
225 |
+ |
226 |
+ if use eap-sim ; then |
227 |
+ # Smart card authentication |
228 |
+ Kconfig_style_config EAP_SIM |
229 |
+ Kconfig_style_config EAP_AKA |
230 |
+ Kconfig_style_config EAP_AKA_PRIME |
231 |
+ Kconfig_style_config PCSC |
232 |
+ fi |
233 |
+ |
234 |
+ if use fasteap ; then |
235 |
+ Kconfig_style_config EAP_FAST |
236 |
+ fi |
237 |
+ |
238 |
+ if use readline ; then |
239 |
+ # readline/history support for wpa_cli |
240 |
+ Kconfig_style_config READLINE |
241 |
+ else |
242 |
+ #internal line edit mode for wpa_cli |
243 |
+ Kconfig_style_config WPA_CLI_EDIT |
244 |
+ fi |
245 |
+ |
246 |
+ # SSL authentication methods |
247 |
+ if use ssl ; then |
248 |
+ Kconfig_style_config TLS openssl |
249 |
+ elif use gnutls ; then |
250 |
+ Kconfig_style_config TLS gnutls |
251 |
+ Kconfig_style_config GNUTLS_EXTRA |
252 |
+ else |
253 |
+ Kconfig_style_config TLS internal |
254 |
+ fi |
255 |
+ |
256 |
+ if use smartcard ; then |
257 |
+ Kconfig_style_config SMARTCARD |
258 |
+ fi |
259 |
+ |
260 |
+ if use tdls ; then |
261 |
+ Kconfig_style_config TDLS |
262 |
+ fi |
263 |
+ |
264 |
+ if use kernel_linux ; then |
265 |
+ # Linux specific drivers |
266 |
+ Kconfig_style_config DRIVER_ATMEL |
267 |
+ Kconfig_style_config DRIVER_HOSTAP |
268 |
+ Kconfig_style_config DRIVER_IPW |
269 |
+ Kconfig_style_config DRIVER_NL80211 |
270 |
+ Kconfig_style_config DRIVER_RALINK |
271 |
+ Kconfig_style_config DRIVER_WEXT |
272 |
+ Kconfig_style_config DRIVER_WIRED |
273 |
+ |
274 |
+ if use ps3 ; then |
275 |
+ Kconfig_style_config DRIVER_PS3 |
276 |
+ fi |
277 |
+ |
278 |
+ elif use kernel_FreeBSD ; then |
279 |
+ # FreeBSD specific driver |
280 |
+ Kconfig_style_config DRIVER_BSD |
281 |
+ fi |
282 |
+ |
283 |
+ # Wi-Fi Protected Setup (WPS) |
284 |
+ if use wps ; then |
285 |
+ Kconfig_style_config WPS |
286 |
+ Kconfig_style_config WPS2 |
287 |
+ # USB Flash Drive |
288 |
+ Kconfig_style_config WPS_UFD |
289 |
+ # External Registrar |
290 |
+ Kconfig_style_config WPS_ER |
291 |
+ # Universal Plug'n'Play |
292 |
+ Kconfig_style_config WPS_UPNP |
293 |
+ # Near Field Communication |
294 |
+ Kconfig_style_config WPS_NFC |
295 |
+ fi |
296 |
+ |
297 |
+ # Wi-Fi Direct (WiDi) |
298 |
+ if use p2p ; then |
299 |
+ Kconfig_style_config P2P |
300 |
+ Kconfig_style_config WIFI_DISPLAY |
301 |
+ fi |
302 |
+ |
303 |
+ # Access Point Mode |
304 |
+ if use ap ; then |
305 |
+ Kconfig_style_config AP |
306 |
+ fi |
307 |
+ |
308 |
+ # Enable mitigation against certain attacks against TKIP |
309 |
+ Kconfig_style_config DELAYED_MIC_ERROR_REPORT |
310 |
+ |
311 |
+ # If we are using libnl 2.0 and above, enable support for it |
312 |
+ # Bug 382159 |
313 |
+ # Removed for now, since the 3.2 version is broken, and we don't |
314 |
+ # support it. |
315 |
+ if has_version ">=dev-libs/libnl-3.2"; then |
316 |
+ Kconfig_style_config LIBNL32 |
317 |
+ fi |
318 |
+ |
319 |
+ if use qt4 ; then |
320 |
+ pushd "${S}"/wpa_gui-qt4 > /dev/null |
321 |
+ eqmake4 wpa_gui.pro |
322 |
+ popd > /dev/null |
323 |
+ fi |
324 |
+} |
325 |
+ |
326 |
+src_compile() { |
327 |
+ einfo "Building wpa_supplicant" |
328 |
+ emake V=1 BINDIR=/usr/sbin |
329 |
+ |
330 |
+ if use wimax; then |
331 |
+ emake -C ../src/eap_peer clean |
332 |
+ emake -C ../src/eap_peer |
333 |
+ fi |
334 |
+ |
335 |
+ if use qt4 ; then |
336 |
+ pushd "${S}"/wpa_gui-qt4 > /dev/null |
337 |
+ einfo "Building wpa_gui" |
338 |
+ emake |
339 |
+ popd > /dev/null |
340 |
+ fi |
341 |
+} |
342 |
+ |
343 |
+src_install() { |
344 |
+ dosbin wpa_supplicant |
345 |
+ dobin wpa_cli wpa_passphrase |
346 |
+ |
347 |
+ # baselayout-1 compat |
348 |
+ if has_version "<sys-apps/baselayout-2.0.0"; then |
349 |
+ dodir /sbin |
350 |
+ dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant |
351 |
+ dodir /bin |
352 |
+ dosym /usr/bin/wpa_cli /bin/wpa_cli |
353 |
+ fi |
354 |
+ |
355 |
+ if has_version ">=sys-apps/openrc-0.5.0"; then |
356 |
+ newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant |
357 |
+ newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant |
358 |
+ fi |
359 |
+ |
360 |
+ exeinto /etc/wpa_supplicant/ |
361 |
+ newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh |
362 |
+ |
363 |
+ dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ |
364 |
+ wpa_supplicant.conf |
365 |
+ |
366 |
+ newdoc .config build-config |
367 |
+ |
368 |
+ doman doc/docbook/*.{5,8} |
369 |
+ |
370 |
+ if use qt4 ; then |
371 |
+ into /usr |
372 |
+ dobin wpa_gui-qt4/wpa_gui |
373 |
+ doicon wpa_gui-qt4/icons/wpa_gui.svg |
374 |
+ make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;" |
375 |
+ fi |
376 |
+ |
377 |
+ use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install |
378 |
+ |
379 |
+ if use dbus ; then |
380 |
+ pushd "${S}"/dbus > /dev/null |
381 |
+ insinto /etc/dbus-1/system.d |
382 |
+ newins dbus-wpa_supplicant.conf wpa_supplicant.conf |
383 |
+ insinto /usr/share/dbus-1/system-services |
384 |
+ doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service |
385 |
+ popd > /dev/null |
386 |
+ |
387 |
+ # This unit relies on dbus support, bug 538600. |
388 |
+ systemd_dounit systemd/wpa_supplicant.service |
389 |
+ fi |
390 |
+ |
391 |
+ systemd_dounit "systemd/wpa_supplicant@.service" |
392 |
+ systemd_dounit "systemd/wpa_supplicant-nl80211@.service" |
393 |
+ systemd_dounit "systemd/wpa_supplicant-wired@.service" |
394 |
+} |
395 |
+ |
396 |
+pkg_postinst() { |
397 |
+ elog "If this is a clean installation of wpa_supplicant, you" |
398 |
+ elog "have to create a configuration file named" |
399 |
+ elog "/etc/wpa_supplicant/wpa_supplicant.conf" |
400 |
+ elog |
401 |
+ elog "An example configuration file is available for reference in" |
402 |
+ elog "/usr/share/doc/${PF}/" |
403 |
+ |
404 |
+ if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then |
405 |
+ echo |
406 |
+ ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf" |
407 |
+ ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf" |
408 |
+ fi |
409 |
+ |
410 |
+ # Mea culpa, feel free to remove that after some time --mgorny. |
411 |
+ local fn |
412 |
+ for fn in wpa_supplicant{,@wlan0}.service; do |
413 |
+ if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]] |
414 |
+ then |
415 |
+ ebegin "Moving ${fn} to multi-user.target" |
416 |
+ mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \ |
417 |
+ "${ROOT}"/etc/systemd/system/multi-user.target.wants/ |
418 |
+ eend ${?} \ |
419 |
+ "Please try to re-enable ${fn}" |
420 |
+ fi |
421 |
+ done |
422 |
+} |