Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/wpa_supplicant: wpa_supplicant-2.3-r2.ebuild ChangeLog
Date: Wed, 04 Feb 2015 20:57:01
Message-Id: 20150204205656.8ED2A110F8@oystercatcher.gentoo.org
1 floppym 15/02/04 20:56:56
2
3 Modified: ChangeLog
4 Added: wpa_supplicant-2.3-r2.ebuild
5 Log:
6 Exclude wpa_supplicant.service when USE=-dbus, bug 538600.
7
8 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
9
10 Revision Changes Path
11 1.222 net-wireless/wpa_supplicant/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.222&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.222&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?r1=1.221&r2=1.222
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v
20 retrieving revision 1.221
21 retrieving revision 1.222
22 diff -u -r1.221 -r1.222
23 --- ChangeLog 2 Nov 2014 09:40:03 -0000 1.221
24 +++ ChangeLog 4 Feb 2015 20:56:56 -0000 1.222
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-wireless/wpa_supplicant
27 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.221 2014/11/02 09:40:03 swift Exp $
29 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.222 2015/02/04 20:56:56 floppym Exp $
31 +
32 +*wpa_supplicant-2.3-r2 (04 Feb 2015)
33 +
34 + 04 Feb 2015; Mike Gilbert <floppym@g.o> +wpa_supplicant-2.3-r2.ebuild:
35 + Exclude wpa_supplicant.service when USE=-dbus, bug 538600.
36
37 02 Nov 2014; Sven Vermeulen <swift@g.o> wpa_supplicant-2.2-r1.ebuild,
38 wpa_supplicant-2.3-r1.ebuild, wpa_supplicant-2.3.ebuild:
39
40
41
42 1.1 net-wireless/wpa_supplicant/wpa_supplicant-2.3-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.3-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.3-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: wpa_supplicant-2.3-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2015 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.3-r2.ebuild,v 1.1 2015/02/04 20:56:56 floppym Exp $
52
53 EAPI=5
54
55 inherit eutils toolchain-funcs qt4-r2 systemd multilib
56
57 DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
58 HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
59 SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
60 LICENSE="|| ( GPL-2 BSD )"
61
62 SLOT="0"
63 #KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
64 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"
65 REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )"
66
67 CDEPEND="dbus? ( sys-apps/dbus )
68 kernel_linux? (
69 eap-sim? ( sys-apps/pcsc-lite )
70 dev-libs/libnl:3
71 net-wireless/crda
72 )
73 !kernel_linux? ( net-libs/libpcap )
74 qt4? (
75 dev-qt/qtcore:4
76 dev-qt/qtgui:4
77 dev-qt/qtsvg:4
78 )
79 readline? (
80 sys-libs/ncurses
81 sys-libs/readline
82 )
83 ssl? ( dev-libs/openssl )
84 !ssl? ( gnutls? ( net-libs/gnutls ) )
85 !ssl? ( !gnutls? ( dev-libs/libtommath ) )
86 "
87 DEPEND="${CDEPEND}
88 virtual/pkgconfig
89 "
90 RDEPEND="${CDEPEND}
91 selinux? ( sec-policy/selinux-networkmanager )
92 "
93
94 S="${WORKDIR}/${P}/${PN}"
95
96 Kconfig_style_config() {
97 #param 1 is CONFIG_* item
98 #param 2 is what to set it = to, defaulting in y
99 CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1"
100 setting="${2:-y}"
101
102 if [ ! $setting = n ]; then
103 #first remove any leading "# " if $2 is not n
104 sed -i "/^# *$CONFIG_PARAM/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM"
105 #set item = $setting (defaulting to y)
106 sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
107 else
108 #ensure item commented out
109 sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM"
110 fi
111 }
112
113 pkg_setup() {
114 if use gnutls && use ssl ; then
115 elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\""
116 fi
117 }
118
119 src_prepare() {
120 # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
121 sed -i \
122 -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
123 ../src/l2_packet/l2_packet_freebsd.c || die
124
125 # People seem to take the example configuration file too literally (bug #102361)
126 sed -i \
127 -e "s:^\(opensc_engine_path\):#\1:" \
128 -e "s:^\(pkcs11_engine_path\):#\1:" \
129 -e "s:^\(pkcs11_module_path\):#\1:" \
130 wpa_supplicant.conf || die
131
132 # Change configuration to match Gentoo locations (bug #143750)
133 sed -i \
134 -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
135 -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
136 wpa_supplicant.conf || die
137
138 if use dbus; then
139 epatch "${FILESDIR}/${P}-dbus-path-fix.patch"
140 fi
141
142 # systemd entries to D-Bus service files (bug #372877)
143 echo 'SystemdService=wpa_supplicant.service' \
144 | tee -a dbus/*.service >/dev/null || die
145
146 cd "${WORKDIR}/${P}"
147
148 if use wimax; then
149 # generate-libeap-peer.patch comes before
150 # fix-undefined-reference-to-random_get_bytes.patch
151 epatch "${FILESDIR}/${P}-generate-libeap-peer.patch"
152 epatch "${FILESDIR}/${P}-fix-undefined-reference-to-random_get_bytes.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.
210 Kconfig_style_config DEBUG_FILE
211
212 if use hs2.0 ; then
213 Kconfig_style_config INTERWORKING
214 Kconfig_style_config HS20
215 fi
216
217 if use uncommon-eap-types; then
218 Kconfig_style_config EAP_GPSK
219 Kconfig_style_config EAP_SAKE
220 Kconfig_style_config EAP_GPSK_SHA256
221 Kconfig_style_config EAP_IKEV2
222 Kconfig_style_config EAP_EKE
223 fi
224
225 if use eap-sim ; then
226 # Smart card authentication
227 Kconfig_style_config EAP_SIM
228 Kconfig_style_config EAP_AKA
229 Kconfig_style_config EAP_AKA_PRIME
230 Kconfig_style_config PCSC
231 fi
232
233 if use fasteap ; then
234 Kconfig_style_config EAP_FAST
235 fi
236
237 if use readline ; then
238 # readline/history support for wpa_cli
239 Kconfig_style_config READLINE
240 else
241 #internal line edit mode for wpa_cli
242 Kconfig_style_config WPA_CLI_EDIT
243 fi
244
245 # SSL authentication methods
246 if use ssl ; then
247 Kconfig_style_config TLS openssl
248 elif use gnutls ; then
249 Kconfig_style_config TLS gnutls
250 Kconfig_style_config GNUTLS_EXTRA
251 else
252 Kconfig_style_config TLS internal
253 fi
254
255 if use smartcard ; then
256 Kconfig_style_config SMARTCARD
257 fi
258
259 if use tdls ; then
260 Kconfig_style_config TDLS
261 fi
262
263 if use kernel_linux ; then
264 # Linux specific drivers
265 Kconfig_style_config DRIVER_ATMEL
266 Kconfig_style_config DRIVER_HOSTAP
267 Kconfig_style_config DRIVER_IPW
268 Kconfig_style_config DRIVER_NL80211
269 Kconfig_style_config DRIVER_RALINK
270 Kconfig_style_config DRIVER_WEXT
271 Kconfig_style_config DRIVER_WIRED
272
273 if use ps3 ; then
274 Kconfig_style_config DRIVER_PS3
275 fi
276
277 elif use kernel_FreeBSD ; then
278 # FreeBSD specific driver
279 Kconfig_style_config DRIVER_BSD
280 fi
281
282 # Wi-Fi Protected Setup (WPS)
283 if use wps ; then
284 Kconfig_style_config WPS
285 Kconfig_style_config WPS2
286 # USB Flash Drive
287 Kconfig_style_config WPS_UFD
288 # External Registrar
289 Kconfig_style_config WPS_ER
290 # Universal Plug'n'Play
291 Kconfig_style_config WPS_UPNP
292 # Near Field Communication
293 Kconfig_style_config WPS_NFC
294 fi
295
296 # Wi-Fi Direct (WiDi)
297 if use p2p ; then
298 Kconfig_style_config P2P
299 Kconfig_style_config WIFI_DISPLAY
300 fi
301
302 # Access Point Mode
303 if use ap ; then
304 Kconfig_style_config AP
305 fi
306
307 # Enable mitigation against certain attacks against TKIP
308 Kconfig_style_config DELAYED_MIC_ERROR_REPORT
309
310 # If we are using libnl 2.0 and above, enable support for it
311 # Bug 382159
312 # Removed for now, since the 3.2 version is broken, and we don't
313 # support it.
314 if has_version ">=dev-libs/libnl-3.2"; then
315 Kconfig_style_config LIBNL32
316 fi
317
318 if use qt4 ; then
319 pushd "${S}"/wpa_gui-qt4 > /dev/null
320 eqmake4 wpa_gui.pro
321 popd > /dev/null
322 fi
323 }
324
325 src_compile() {
326 einfo "Building wpa_supplicant"
327 emake V=1 BINDIR=/usr/sbin
328
329 if use wimax; then
330 emake -C ../src/eap_peer clean
331 emake -C ../src/eap_peer
332 fi
333
334 if use qt4 ; then
335 pushd "${S}"/wpa_gui-qt4 > /dev/null
336 einfo "Building wpa_gui"
337 emake
338 popd > /dev/null
339 fi
340 }
341
342 src_install() {
343 dosbin wpa_supplicant
344 dobin wpa_cli wpa_passphrase
345
346 # baselayout-1 compat
347 if has_version "<sys-apps/baselayout-2.0.0"; then
348 dodir /sbin
349 dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant
350 dodir /bin
351 dosym /usr/bin/wpa_cli /bin/wpa_cli
352 fi
353
354 if has_version ">=sys-apps/openrc-0.5.0"; then
355 newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant
356 newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant
357 fi
358
359 exeinto /etc/wpa_supplicant/
360 newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh
361
362 dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
363 wpa_supplicant.conf
364
365 newdoc .config build-config
366
367 doman doc/docbook/*.{5,8}
368
369 if use qt4 ; then
370 into /usr
371 dobin wpa_gui-qt4/wpa_gui
372 doicon wpa_gui-qt4/icons/wpa_gui.svg
373 make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
374 fi
375
376 use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install
377
378 if use dbus ; then
379 pushd "${S}"/dbus > /dev/null
380 insinto /etc/dbus-1/system.d
381 newins dbus-wpa_supplicant.conf wpa_supplicant.conf
382 insinto /usr/share/dbus-1/system-services
383 doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service
384 popd > /dev/null
385
386 # This unit relies on dbus support, bug 538600.
387 systemd_dounit systemd/wpa_supplicant.service
388 fi
389
390 systemd_dounit "systemd/wpa_supplicant@.service"
391 systemd_dounit "systemd/wpa_supplicant-nl80211@.service"
392 systemd_dounit "systemd/wpa_supplicant-wired@.service"
393 }
394
395 pkg_postinst() {
396 elog "If this is a clean installation of wpa_supplicant, you"
397 elog "have to create a configuration file named"
398 elog "/etc/wpa_supplicant/wpa_supplicant.conf"
399 elog
400 elog "An example configuration file is available for reference in"
401 elog "/usr/share/doc/${PF}/"
402
403 if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
404 echo
405 ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf"
406 ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
407 fi
408
409 # Mea culpa, feel free to remove that after some time --mgorny.
410 local fn
411 for fn in wpa_supplicant{,@wlan0}.service; do
412 if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]]
413 then
414 ebegin "Moving ${fn} to multi-user.target"
415 mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \
416 "${ROOT}"/etc/systemd/system/multi-user.target.wants/
417 eend ${?} \
418 "Please try to re-enable ${fn}"
419 fi
420 done
421 }