Gentoo Archives: gentoo-commits

From: "Bjarke Istrup Pedersen (gurligebis)" <gurligebis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/wpa_supplicant: ChangeLog wpa_supplicant-2.1-r1.ebuild wpa_supplicant-2.1.ebuild
Date: Tue, 25 Feb 2014 07:53:57
Message-Id: 20140225075352.D0C992004C@flycatcher.gentoo.org
1 gurligebis 14/02/25 07:53:52
2
3 Modified: ChangeLog
4 Added: wpa_supplicant-2.1-r1.ebuild
5 Removed: wpa_supplicant-2.1.ebuild
6 Log:
7 Adding patch to fix bug #501828
8
9 (Portage version: 2.2.8-r1/cvs/Linux i686, signed Manifest commit with key 15AE484C)
10
11 Revision Changes Path
12 1.210 net-wireless/wpa_supplicant/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.210&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.210&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?r1=1.209&r2=1.210
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v
21 retrieving revision 1.209
22 retrieving revision 1.210
23 diff -u -r1.209 -r1.210
24 --- ChangeLog 14 Feb 2014 08:20:31 -0000 1.209
25 +++ ChangeLog 25 Feb 2014 07:53:52 -0000 1.210
26 @@ -1,6 +1,12 @@
27 # ChangeLog for net-wireless/wpa_supplicant
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.209 2014/02/14 08:20:31 gurligebis Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.210 2014/02/25 07:53:52 gurligebis Exp $
31 +
32 +*wpa_supplicant-2.1-r1 (25 Feb 2014)
33 +
34 + 25 Feb 2014; <gurligebis@g.o> -wpa_supplicant-2.1.ebuild,
35 + +wpa_supplicant-2.1-r1.ebuild, +files/wpa_supplicant-2.1-WPA-fix.patch:
36 + Adding patch to fix bug #501828
37
38 14 Feb 2014; <gurligebis@g.o> wpa_supplicant-2.1.ebuild,
39 +files/wpa_supplicant-2.1-NFC-fix.patch:
40
41
42
43 1.1 net-wireless/wpa_supplicant/wpa_supplicant-2.1-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.1-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.1-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: wpa_supplicant-2.1-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.1-r1.ebuild,v 1.1 2014/02/25 07:53:52 gurligebis Exp $
53
54 EAPI=4
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 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
65 IUSE="ap dbus gnutls eap-sim fasteap p2p ps3 qt4 readline selinux smartcard ssl wimax wps kernel_linux kernel_FreeBSD"
66 REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )"
67
68 RDEPEND="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/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 selinux? ( sec-policy/selinux-networkmanager )"
87 DEPEND="${RDEPEND}
88 virtual/pkgconfig"
89
90 S="${WORKDIR}/${P}/${PN}"
91
92 pkg_setup() {
93 if use gnutls && use ssl ; then
94 elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\""
95 fi
96 }
97
98 src_prepare() {
99 # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
100 sed -i \
101 -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
102 ../src/l2_packet/l2_packet_freebsd.c || die
103
104 # People seem to take the example configuration file too literally (bug #102361)
105 sed -i \
106 -e "s:^\(opensc_engine_path\):#\1:" \
107 -e "s:^\(pkcs11_engine_path\):#\1:" \
108 -e "s:^\(pkcs11_module_path\):#\1:" \
109 wpa_supplicant.conf || die
110
111 # Change configuration to match Gentoo locations (bug #143750)
112 sed -i \
113 -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
114 -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
115 wpa_supplicant.conf || die
116
117 if use dbus; then
118 epatch "${FILESDIR}/${P}-dbus-path-fix.patch"
119 fi
120
121 # systemd entries to D-Bus service files (bug #372877)
122 echo 'SystemdService=wpa_supplicant.service' \
123 | tee -a dbus/*.service >/dev/null || die
124
125 cd "${WORKDIR}/${P}"
126
127 if use wimax; then
128 # generate-libeap-peer.patch comes before
129 # fix-undefined-reference-to-random_get_bytes.patch
130 epatch "${FILESDIR}/${P}-generate-libeap-peer.patch"
131 epatch "${FILESDIR}/${P}-fix-undefined-reference-to-random_get_bytes.patch"
132
133 # multilib-strict fix (bug #373685)
134 sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile
135 fi
136
137 if use wps; then
138 # In version 2.1, there is a bug, what causes compile to fail.
139 epatch "${FILESDIR}/${P}-NFC-fix.patch"
140 fi
141
142 # bug (320097)
143 epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch"
144
145 # bug (501828)
146 epatch "${FILESDIR}/${P}-WPA-fix.patch"
147
148 # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX,
149 # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED.
150 # bug (374089)
151 #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch"
152 }
153
154 src_configure() {
155 # Toolchain setup
156 tc-export CC
157
158 # Basic setup
159 echo "CONFIG_CTRL_IFACE=y" >> .config
160 echo "CONFIG_BACKEND=file" >> .config
161
162 # Basic authentication methods
163 # NOTE: we don't set GPSK or SAKE as they conflict
164 # with the below options
165 echo "CONFIG_EAP_GTC=y" >> .config
166 echo "CONFIG_EAP_MD5=y" >> .config
167 echo "CONFIG_EAP_OTP=y" >> .config
168 echo "CONFIG_EAP_PAX=y" >> .config
169 echo "CONFIG_EAP_PSK=y" >> .config
170 echo "CONFIG_EAP_TLV=y" >> .config
171 echo "CONFIG_EAP_EXE=y" >> .config
172 echo "CONFIG_IEEE8021X_EAPOL=y" >> .config
173 echo "CONFIG_PKCS12=y" >> .config
174 echo "CONFIG_PEERKEY=y" >> .config
175 echo "CONFIG_EAP_LEAP=y" >> .config
176 echo "CONFIG_EAP_MSCHAPV2=y" >> .config
177 echo "CONFIG_EAP_PEAP=y" >> .config
178 echo "CONFIG_EAP_TLS=y" >> .config
179 echo "CONFIG_EAP_TTLS=y" >> .config
180
181 # Enabling background scanning.
182 echo "CONFIG_BGSCAN_SIMPLE=y" >> .config
183 echo "CONFIG_BGSCAN_LEARN=y" >> .config
184
185 if use dbus ; then
186 echo "CONFIG_CTRL_IFACE_DBUS=y" >> .config
187 echo "CONFIG_CTRL_IFACE_DBUS_NEW=y" >> .config
188 echo "CONFIG_CTRL_IFACE_DBUS_INTRO=y" >> .config
189 fi
190
191 # Enable support for writing debug info to a log file.
192 echo "CONFIG_DEBUG_FILE=y" >> .config
193
194 if use eap-sim ; then
195 # Smart card authentication
196 echo "CONFIG_EAP_SIM=y" >> .config
197 echo "CONFIG_EAP_AKA=y" >> .config
198 echo "CONFIG_EAP_AKA_PRIME=y" >> .config
199 echo "CONFIG_PCSC=y" >> .config
200 fi
201
202 if use fasteap ; then
203 echo "CONFIG_EAP_FAST=y" >> .config
204 fi
205
206 if use readline ; then
207 # readline/history support for wpa_cli
208 echo "CONFIG_READLINE=y" >> .config
209 fi
210
211 # SSL authentication methods
212 if use ssl ; then
213 echo "CONFIG_TLS=openssl" >> .config
214 elif use gnutls ; then
215 echo "CONFIG_TLS=gnutls" >> .config
216 echo "CONFIG_GNUTLS_EXTRA=y" >> .config
217 else
218 echo "CONFIG_TLS=internal" >> .config
219 fi
220
221 if use smartcard ; then
222 echo "CONFIG_SMARTCARD=y" >> .config
223 fi
224
225 if use kernel_linux ; then
226 # Linux specific drivers
227 echo "CONFIG_DRIVER_ATMEL=y" >> .config
228 echo "CONFIG_DRIVER_HOSTAP=y" >> .config
229 echo "CONFIG_DRIVER_IPW=y" >> .config
230 echo "CONFIG_DRIVER_NL80211=y" >> .config
231 echo "CONFIG_DRIVER_RALINK=y" >> .config
232 echo "CONFIG_DRIVER_WEXT=y" >> .config
233 echo "CONFIG_DRIVER_WIRED=y" >> .config
234
235 if use ps3 ; then
236 echo "CONFIG_DRIVER_PS3=y" >> .config
237 fi
238
239 elif use kernel_FreeBSD ; then
240 # FreeBSD specific driver
241 echo "CONFIG_DRIVER_BSD=y" >> .config
242 fi
243
244 # Wi-Fi Protected Setup (WPS)
245 if use wps ; then
246 echo "CONFIG_WPS=y" >> .config
247 echo "CONFIG_WPS2=y" >> .config
248 # USB Flash Drive
249 echo "CONFIG_WPS_UFD=y" >> .config
250 # External Registrar
251 echo "CONFIG_WPS_ER=y" >> .config
252 # Universal Plug'n'Play
253 echo "CONFIG_WPS_UPNP=y" >> .config
254 # Near Field Communication
255 echo "CONFIG_WPS_NFC=y" >> .config
256 fi
257
258 # Wi-Fi Direct (WiDi)
259 if use p2p ; then
260 echo "CONFIG_P2P=y" >> .config
261 fi
262
263 # Access Point Mode
264 if use ap ; then
265 echo "CONFIG_AP=y" >> .config
266 fi
267
268 # Enable mitigation against certain attacks against TKIP
269 echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config
270
271 # If we are using libnl 2.0 and above, enable support for it
272 # Bug 382159
273 # Removed for now, since the 3.2 version is broken, and we don't
274 # support it.
275 if has_version ">=dev-libs/libnl-3.2"; then
276 echo "CONFIG_LIBNL32=y" >> .config
277 fi
278
279 if use qt4 ; then
280 pushd "${S}"/wpa_gui-qt4 > /dev/null
281 eqmake4 wpa_gui.pro
282 popd > /dev/null
283 fi
284 }
285
286 src_compile() {
287 einfo "Building wpa_supplicant"
288 emake V=1
289
290 if use wimax; then
291 emake -C ../src/eap_peer clean
292 emake -C ../src/eap_peer
293 fi
294
295 if use qt4 ; then
296 pushd "${S}"/wpa_gui-qt4 > /dev/null
297 einfo "Building wpa_gui"
298 emake
299 popd > /dev/null
300 fi
301 }
302
303 src_install() {
304 dosbin wpa_supplicant
305 dobin wpa_cli wpa_passphrase
306
307 # baselayout-1 compat
308 if has_version "<sys-apps/baselayout-2.0.0"; then
309 dodir /sbin
310 dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant
311 dodir /bin
312 dosym /usr/bin/wpa_cli /bin/wpa_cli
313 fi
314
315 if has_version ">=sys-apps/openrc-0.5.0"; then
316 newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant
317 newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant
318 fi
319
320 exeinto /etc/wpa_supplicant/
321 newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh
322
323 dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
324 wpa_supplicant.conf
325
326 doman doc/docbook/*.{5,8}
327
328 if use qt4 ; then
329 into /usr
330 dobin wpa_gui-qt4/wpa_gui
331 doicon wpa_gui-qt4/icons/wpa_gui.svg
332 make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
333 fi
334
335 use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install
336
337 if use dbus ; then
338 pushd "${S}"/dbus > /dev/null
339 insinto /etc/dbus-1/system.d
340 newins dbus-wpa_supplicant.conf wpa_supplicant.conf
341 insinto /usr/share/dbus-1/system-services
342 doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service
343 keepdir /var/run/wpa_supplicant
344 popd > /dev/null
345 fi
346
347 # systemd stuff
348 systemd_dounit "${FILESDIR}"/wpa_supplicant.service
349 systemd_newunit "${FILESDIR}"/wpa_supplicant_at.service 'wpa_supplicant@.service'
350 }
351
352 pkg_postinst() {
353 elog "If this is a clean installation of wpa_supplicant, you"
354 elog "have to create a configuration file named"
355 elog "/etc/wpa_supplicant/wpa_supplicant.conf"
356 elog
357 elog "An example configuration file is available for reference in"
358 elog "/usr/share/doc/${PF}/"
359
360 if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
361 echo
362 ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf"
363 ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
364 fi
365
366 # Mea culpa, feel free to remove that after some time --mgorny.
367 local fn
368 for fn in wpa_supplicant{,@wlan0}.service; do
369 if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]]
370 then
371 ebegin "Moving ${fn} to multi-user.target"
372 mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \
373 "${ROOT}"/etc/systemd/system/multi-user.target.wants/
374 eend ${?} \
375 "Please try to re-enable ${fn}"
376 fi
377 done
378 }