Gentoo Archives: gentoo-commits

From: Quentin Retornaz <gentoo@××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/libressl:master commit in: net-wireless/wpa_supplicant/
Date: Thu, 24 Jun 2021 16:52:51
Message-Id: 1624553528.1e2412a2f1d283f95068f3950a4f9f0a2ee9d00f.quentin@gentoo
1 commit: 1e2412a2f1d283f95068f3950a4f9f0a2ee9d00f
2 Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
3 AuthorDate: Thu Jun 24 16:51:54 2021 +0000
4 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
5 CommitDate: Thu Jun 24 16:52:08 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=1e2412a2
7
8 net-wireless/wpa_supplicant: remove old
9
10 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
11
12 .../wpa_supplicant/wpa_supplicant-2.9-r2.ebuild | 472 ---------------------
13 1 file changed, 472 deletions(-)
14
15 diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.9-r2.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.9-r2.ebuild
16 deleted file mode 100644
17 index 5098631..0000000
18 --- a/net-wireless/wpa_supplicant/wpa_supplicant-2.9-r2.ebuild
19 +++ /dev/null
20 @@ -1,472 +0,0 @@
21 -# Copyright 1999-2021 Gentoo Authors
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=7
25 -
26 -inherit desktop qmake-utils readme.gentoo-r1 systemd toolchain-funcs
27 -
28 -DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
29 -HOMEPAGE="https://w1.fi/wpa_supplicant/"
30 -LICENSE="|| ( GPL-2 BSD )"
31 -
32 -if [ "${PV}" = "9999" ]; then
33 - inherit git-r3
34 - EGIT_REPO_URI="https://w1.fi/hostap.git"
35 -else
36 - KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~sparc x86"
37 - SRC_URI="https://w1.fi/releases/${P}.tar.gz"
38 -fi
39 -
40 -SLOT="0"
41 -IUSE="ap bindist broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 macsec +mbo +mesh p2p privsep ps3 qt5 readline selinux smartcard tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD"
42 -
43 -# CONFIG_PRIVSEP=y does not have sufficient support for the new driver
44 -# interface functions used for MACsec, so this combination cannot be used
45 -# at least for now.
46 -REQUIRED_USE="
47 - macsec? ( !privsep )
48 - privsep? ( !macsec )
49 - broadcom-sta? ( !fils !mesh !mbo )
50 -"
51 -
52 -DEPEND="
53 - >=dev-libs/openssl-1.0.2k:0=[bindist=]
54 - dbus? ( sys-apps/dbus )
55 - kernel_linux? (
56 - dev-libs/libnl:3
57 - net-wireless/crda
58 - eap-sim? ( sys-apps/pcsc-lite )
59 - )
60 - !kernel_linux? ( net-libs/libpcap )
61 - qt5? (
62 - dev-qt/qtcore:5
63 - dev-qt/qtgui:5
64 - dev-qt/qtsvg:5
65 - dev-qt/qtwidgets:5
66 - )
67 - readline? (
68 - sys-libs/ncurses:0=
69 - sys-libs/readline:0=
70 - )
71 -"
72 -RDEPEND="${DEPEND}
73 - selinux? ( sec-policy/selinux-networkmanager )
74 -"
75 -BDEPEND="virtual/pkgconfig"
76 -
77 -DOC_CONTENTS="
78 - If this is a clean installation of wpa_supplicant, you
79 - have to create a configuration file named
80 - ${EROOT}/etc/wpa_supplicant/wpa_supplicant.conf
81 - An example configuration file is available for reference in
82 - ${EROOT}/usr/share/doc/${PF}/
83 -"
84 -
85 -S="${WORKDIR}/${P}/${PN}"
86 -
87 -Kconfig_style_config() {
88 - #param 1 is CONFIG_* item
89 - #param 2 is what to set it = to, defaulting in y
90 - CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1"
91 - setting="${2:-y}"
92 -
93 - if [ ! $setting = n ]; then
94 - #first remove any leading "# " if $2 is not n
95 - sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM"
96 - #set item = $setting (defaulting to y)
97 - sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
98 - if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then
99 - echo "$CONFIG_PARAM=$setting" >>.config
100 - fi
101 - else
102 - #ensure item commented out
103 - sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM"
104 - fi
105 -}
106 -
107 -src_prepare() {
108 - default
109 -
110 - # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
111 - sed -i \
112 - -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
113 - ../src/l2_packet/l2_packet_freebsd.c || die
114 -
115 - # People seem to take the example configuration file too literally (bug #102361)
116 - sed -i \
117 - -e "s:^\(opensc_engine_path\):#\1:" \
118 - -e "s:^\(pkcs11_engine_path\):#\1:" \
119 - -e "s:^\(pkcs11_module_path\):#\1:" \
120 - wpa_supplicant.conf || die
121 -
122 - # Change configuration to match Gentoo locations (bug #143750)
123 - sed -i \
124 - -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
125 - -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
126 - wpa_supplicant.conf || die
127 -
128 - # systemd entries to D-Bus service files (bug #372877)
129 - echo 'SystemdService=wpa_supplicant.service' \
130 - | tee -a dbus/*.service >/dev/null || die
131 -
132 - cd "${WORKDIR}/${P}" || die
133 -
134 - if use wimax; then
135 - # generate-libeap-peer.patch comes before
136 - # fix-undefined-reference-to-random_get_bytes.patch
137 - eapply "${FILESDIR}/${P}-generate-libeap-peer.patch"
138 -
139 - # multilib-strict fix (bug #373685)
140 - sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile || die
141 - fi
142 -
143 - # bug (320097)
144 - eapply "${FILESDIR}/${PN}-2.6-do-not-call-dbus-functions-with-NULL-path.patch"
145 -
146 - # bug (640492)
147 - sed -i 's#-Werror ##' wpa_supplicant/Makefile || die
148 -
149 - #CVE-2019-16275 bug #696030
150 - eapply "${FILESDIR}/wpa_supplicant-2.9-AP-Silently-ignore-management-frame-from-unexpected.patch"
151 -
152 - # libressl patch (https://github.com/gentoo/libressl/issues/336)
153 - eapply "${FILESDIR}/${P}-libressl.patch"
154 -}
155 -
156 -src_configure() {
157 - # Toolchain setup
158 - tc-export CC PKG_CONFIG
159 -
160 - cp defconfig .config || die
161 -
162 - # Basic setup
163 - Kconfig_style_config CTRL_IFACE
164 - Kconfig_style_config MATCH_IFACE
165 - Kconfig_style_config BACKEND file
166 - Kconfig_style_config IBSS_RSN
167 - Kconfig_style_config IEEE80211W
168 - Kconfig_style_config IEEE80211R
169 - Kconfig_style_config HT_OVERRIDES
170 - Kconfig_style_config VHT_OVERRIDES
171 - Kconfig_style_config OCV
172 - Kconfig_style_config TLSV11
173 - Kconfig_style_config TLSV12
174 - Kconfig_style_config GETRANDOM
175 -
176 - # Basic authentication methods
177 - # NOTE: we don't set GPSK or SAKE as they conflict
178 - # with the below options
179 - Kconfig_style_config EAP_GTC
180 - Kconfig_style_config EAP_MD5
181 - Kconfig_style_config EAP_OTP
182 - Kconfig_style_config EAP_PAX
183 - Kconfig_style_config EAP_PSK
184 - Kconfig_style_config EAP_TLV
185 - Kconfig_style_config EAP_EXE
186 - Kconfig_style_config IEEE8021X_EAPOL
187 - Kconfig_style_config PKCS12
188 - Kconfig_style_config PEERKEY
189 - Kconfig_style_config EAP_LEAP
190 - Kconfig_style_config EAP_MSCHAPV2
191 - Kconfig_style_config EAP_PEAP
192 - Kconfig_style_config EAP_TEAP
193 - Kconfig_style_config EAP_TLS
194 - Kconfig_style_config EAP_TTLS
195 -
196 - # Enabling background scanning.
197 - Kconfig_style_config BGSCAN_SIMPLE
198 - Kconfig_style_config BGSCAN_LEARN
199 -
200 - if use dbus ; then
201 - Kconfig_style_config CTRL_IFACE_DBUS
202 - Kconfig_style_config CTRL_IFACE_DBUS_NEW
203 - Kconfig_style_config CTRL_IFACE_DBUS_INTRO
204 - else
205 - Kconfig_style_config CTRL_IFACE_DBUS n
206 - Kconfig_style_config CTRL_IFACE_DBUS_NEW n
207 - Kconfig_style_config CTRL_IFACE_DBUS_INTRO n
208 - fi
209 -
210 - if use eapol-test ; then
211 - Kconfig_style_config EAPOL_TEST
212 - fi
213 -
214 - # Enable support for writing debug info to a log file and syslog.
215 - Kconfig_style_config DEBUG_FILE
216 - Kconfig_style_config DEBUG_SYSLOG
217 -
218 - if use hs2-0 ; then
219 - Kconfig_style_config INTERWORKING
220 - Kconfig_style_config HS20
221 - fi
222 -
223 - if use mbo ; then
224 - Kconfig_style_config MBO
225 - else
226 - Kconfig_style_config MBO n
227 - fi
228 -
229 - if use uncommon-eap-types; then
230 - Kconfig_style_config EAP_GPSK
231 - Kconfig_style_config EAP_SAKE
232 - Kconfig_style_config EAP_GPSK_SHA256
233 - Kconfig_style_config EAP_IKEV2
234 - Kconfig_style_config EAP_EKE
235 - fi
236 -
237 - if use eap-sim ; then
238 - # Smart card authentication
239 - Kconfig_style_config EAP_SIM
240 - Kconfig_style_config EAP_AKA
241 - Kconfig_style_config EAP_AKA_PRIME
242 - Kconfig_style_config PCSC
243 - fi
244 -
245 - if use fasteap ; then
246 - Kconfig_style_config EAP_FAST
247 - fi
248 -
249 - if use readline ; then
250 - # readline/history support for wpa_cli
251 - Kconfig_style_config READLINE
252 - else
253 - #internal line edit mode for wpa_cli
254 - Kconfig_style_config WPA_CLI_EDIT
255 - fi
256 -
257 - Kconfig_style_config TLS openssl
258 - Kconfig_style_config FST
259 - if ! use bindist ; then
260 - Kconfig_style_config EAP_PWD
261 - if use fils; then
262 - Kconfig_style_config FILS
263 - Kconfig_style_config FILS_SK_PFS
264 - fi
265 - if use mesh; then
266 - Kconfig_style_config MESH
267 - else
268 - Kconfig_style_config MESH n
269 - fi
270 - #WPA3
271 - Kconfig_style_config OWE
272 - Kconfig_style_config SAE
273 - Kconfig_style_config DPP
274 - Kconfig_style_config SUITEB192
275 - Kconfig_style_config SUITEB
276 - fi
277 -
278 - if use smartcard ; then
279 - Kconfig_style_config SMARTCARD
280 - else
281 - Kconfig_style_config SMARTCARD n
282 - fi
283 -
284 - if use tdls ; then
285 - Kconfig_style_config TDLS
286 - fi
287 -
288 - if use kernel_linux ; then
289 - # Linux specific drivers
290 - Kconfig_style_config DRIVER_ATMEL
291 - Kconfig_style_config DRIVER_HOSTAP
292 - Kconfig_style_config DRIVER_IPW
293 - Kconfig_style_config DRIVER_NL80211
294 - Kconfig_style_config DRIVER_RALINK
295 - Kconfig_style_config DRIVER_WEXT
296 - Kconfig_style_config DRIVER_WIRED
297 -
298 - if use macsec ; then
299 - #requires something, no idea what
300 - #Kconfig_style_config DRIVER_MACSEC_QCA
301 - Kconfig_style_config DRIVER_MACSEC_LINUX
302 - Kconfig_style_config MACSEC
303 - fi
304 -
305 - if use ps3 ; then
306 - Kconfig_style_config DRIVER_PS3
307 - fi
308 -
309 - elif use kernel_FreeBSD ; then
310 - # FreeBSD specific driver
311 - Kconfig_style_config DRIVER_BSD
312 - fi
313 -
314 - # Wi-Fi Protected Setup (WPS)
315 - if use wps ; then
316 - Kconfig_style_config WPS
317 - Kconfig_style_config WPS2
318 - # USB Flash Drive
319 - Kconfig_style_config WPS_UFD
320 - # External Registrar
321 - Kconfig_style_config WPS_ER
322 - # Universal Plug'n'Play
323 - Kconfig_style_config WPS_UPNP
324 - # Near Field Communication
325 - Kconfig_style_config WPS_NFC
326 - else
327 - Kconfig_style_config WPS n
328 - Kconfig_style_config WPS2 n
329 - Kconfig_style_config WPS_UFD n
330 - Kconfig_style_config WPS_ER n
331 - Kconfig_style_config WPS_UPNP n
332 - Kconfig_style_config WPS_NFC n
333 - fi
334 -
335 - # Wi-Fi Direct (WiDi)
336 - if use p2p ; then
337 - Kconfig_style_config P2P
338 - Kconfig_style_config WIFI_DISPLAY
339 - else
340 - Kconfig_style_config P2P n
341 - Kconfig_style_config WIFI_DISPLAY n
342 - fi
343 -
344 - # Access Point Mode
345 - if use ap ; then
346 - Kconfig_style_config AP
347 - else
348 - Kconfig_style_config AP n
349 - fi
350 -
351 - # Enable essentials for AP/P2P
352 - if use ap || use p2p ; then
353 - # Enabling HT support (802.11n)
354 - Kconfig_style_config IEEE80211N
355 -
356 - # Enabling VHT support (802.11ac)
357 - Kconfig_style_config IEEE80211AC
358 - fi
359 -
360 - # Enable mitigation against certain attacks against TKIP
361 - Kconfig_style_config DELAYED_MIC_ERROR_REPORT
362 -
363 - if use privsep ; then
364 - Kconfig_style_config PRIVSEP
365 - fi
366 -
367 - # If we are using libnl 2.0 and above, enable support for it
368 - # Bug 382159
369 - # Removed for now, since the 3.2 version is broken, and we don't
370 - # support it.
371 - if has_version ">=dev-libs/libnl-3.2"; then
372 - Kconfig_style_config LIBNL32
373 - fi
374 -
375 - if use qt5 ; then
376 - pushd "${S}"/wpa_gui-qt4 > /dev/null || die
377 - eqmake5 wpa_gui.pro
378 - popd > /dev/null || die
379 - fi
380 -}
381 -
382 -src_compile() {
383 - einfo "Building wpa_supplicant"
384 - emake V=1 BINDIR=/usr/sbin
385 -
386 - if use wimax; then
387 - emake -C ../src/eap_peer clean
388 - emake -C ../src/eap_peer
389 - fi
390 -
391 - if use qt5; then
392 - einfo "Building wpa_gui"
393 - emake -C "${S}"/wpa_gui-qt4
394 - fi
395 -
396 - if use eapol-test ; then
397 - emake eapol_test
398 - fi
399 -}
400 -
401 -src_install() {
402 - dosbin wpa_supplicant
403 - use privsep && dosbin wpa_priv
404 - dobin wpa_cli wpa_passphrase
405 -
406 - # baselayout-1 compat
407 - if has_version "<sys-apps/baselayout-2.0.0"; then
408 - dodir /sbin
409 - dosym ../usr/sbin/wpa_supplicant /sbin/wpa_supplicant
410 - dodir /bin
411 - dosym ../usr/bin/wpa_cli /bin/wpa_cli
412 - fi
413 -
414 - if has_version ">=sys-apps/openrc-0.5.0"; then
415 - newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant
416 - newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant
417 - fi
418 -
419 - exeinto /etc/wpa_supplicant/
420 - newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh
421 -
422 - readme.gentoo_create_doc
423 - dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
424 - wpa_supplicant.conf
425 -
426 - newdoc .config build-config
427 -
428 - if [ "${PV}" != "9999" ]; then
429 - doman doc/docbook/*.{5,8}
430 - fi
431 -
432 - if use qt5 ; then
433 - into /usr
434 - dobin wpa_gui-qt4/wpa_gui
435 - doicon wpa_gui-qt4/icons/wpa_gui.svg
436 - domenu wpa_gui-qt4/wpa_gui.desktop
437 - else
438 - rm "${ED}"/usr/share/man/man8/wpa_gui.8
439 - fi
440 -
441 - use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install
442 -
443 - if use dbus ; then
444 - pushd "${S}"/dbus > /dev/null || die
445 - insinto /etc/dbus-1/system.d
446 - newins dbus-wpa_supplicant.conf wpa_supplicant.conf
447 - insinto /usr/share/dbus-1/system-services
448 - doins fi.w1.wpa_supplicant1.service
449 - popd > /dev/null || die
450 -
451 - # This unit relies on dbus support, bug 538600.
452 - systemd_dounit systemd/wpa_supplicant.service
453 - fi
454 -
455 - if use eapol-test ; then
456 - dobin eapol_test
457 - fi
458 -
459 - systemd_dounit "systemd/wpa_supplicant@.service"
460 - systemd_dounit "systemd/wpa_supplicant-nl80211@.service"
461 - systemd_dounit "systemd/wpa_supplicant-wired@.service"
462 -}
463 -
464 -pkg_postinst() {
465 - readme.gentoo_print_elog
466 -
467 - if [[ -e "${EROOT}"/etc/wpa_supplicant.conf ]] ; then
468 - echo
469 - ewarn "WARNING: your old configuration file ${EROOT}/etc/wpa_supplicant.conf"
470 - ewarn "needs to be moved to ${EROOT}/etc/wpa_supplicant/wpa_supplicant.conf"
471 - fi
472 -
473 - if use bindist; then
474 - ewarn "Using bindist use flag presently breaks WPA3 (specifically SAE, OWE, DPP, and FILS)."
475 - ewarn "This is incredibly undesirable"
476 - fi
477 -
478 - # Mea culpa, feel free to remove that after some time --mgorny.
479 - local fn
480 - for fn in wpa_supplicant{,@wlan0}.service; do
481 - if [[ -e "${EROOT}"/etc/systemd/system/network.target.wants/${fn} ]]
482 - then
483 - ebegin "Moving ${fn} to multi-user.target"
484 - mv "${EROOT}"/etc/systemd/system/network.target.wants/${fn} \
485 - "${EROOT}"/etc/systemd/system/multi-user.target.wants/ || die
486 - eend ${?} \
487 - "Please try to re-enable ${fn}"
488 - fi
489 - done
490 -
491 - systemd_reenable wpa_supplicant.service
492 -}