Annotation of /trunk/core/wpa-supplicant/wpa-supplicant-2.7-r1.smage2
Parent Directory | Revision Log
Revision 31679 -
(hide annotations)
(download)
Wed Dec 5 12:13:17 2018 UTC (5 years, 6 months ago) by niro
File size: 7159 byte(s)
Wed Dec 5 12:13:17 2018 UTC (5 years, 6 months ago) by niro
File size: 7159 byte(s)
auto added: ver bump to 2.7-r1
1 | niro | 31679 | # $Id$ |
2 | |||
3 | PNAME="wpa-supplicant" | ||
4 | PVER="2.7" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="net-wlan" | ||
8 | |||
9 | DESCRIPTION="Linux WPA/WPA2/IEEE 802.1X Supplicant." | ||
10 | HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" | ||
11 | |||
12 | DEPEND=">= dev-libs/openssl-1.1 | ||
13 | >= sys-apps/dbus-1.10 | ||
14 | >= sys-libs/readline-7.0 | ||
15 | == dev-libs/libnl3-3.2.25" | ||
16 | |||
17 | SDEPEND=">= dev-util/pkgconfig-0.25 | ||
18 | >= virtual/sed" | ||
19 | |||
20 | SRCFILE="${PNAME/-/_}-${PVER}.tar.gz" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME/-/_}-${PVER}/" | ||
22 | |||
23 | # confd cvs revision | ||
24 | CONF_CVS_REV=1.3 | ||
25 | SKEL_CVS_REV=1.3 | ||
26 | |||
27 | sminclude mtools dbus systemd | ||
28 | |||
29 | SRC_URI=( | ||
30 | http://hostap.epitest.fi/releases/${SRCFILE} | ||
31 | mirror://${PNAME}/${SRCFILE} | ||
32 | mirror://${PNAME}/confd-wpa_supplicant.skel-${SKEL_CVS_REV} | ||
33 | mirror://${PNAME}/confd-wpa_supplicant-${CONF_CVS_REV} | ||
34 | mirror://${PNAME}/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch | ||
35 | mirror://${PNAME}/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch | ||
36 | mirror://${PNAME}/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch | ||
37 | mirror://${PNAME}/0004-Prevent-installation-of-an-all-zero-TK.patch | ||
38 | mirror://${PNAME}/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch | ||
39 | mirror://${PNAME}/0006-TDLS-Reject-TPK-TK-reconfiguration.patch | ||
40 | mirror://${PNAME}/0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch | ||
41 | mirror://${PNAME}/0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch | ||
42 | ) | ||
43 | |||
44 | # latest stable branch | ||
45 | UP2TAG="release" | ||
46 | # latest devel branch | ||
47 | #UP2TAG="development" | ||
48 | UP2DATE="updatecmd ${HOMEPAGE} | grep -A1 'Latest ${UP2TAG}' | sed -n 's/.*-\(.*\).tar.*/\1/;$ p'" | ||
49 | |||
50 | src_prepare() | ||
51 | { | ||
52 | local MCONFIG=${SRCDIR}/wpa_supplicant/.config | ||
53 | munpack ${SRCFILE} || die | ||
54 | cd ${SRCDIR} | ||
55 | |||
56 | # krackattack patches | ||
57 | mpatch 0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch || die | ||
58 | mpatch 0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch || die | ||
59 | mpatch 0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch || die | ||
60 | mpatch 0004-Prevent-installation-of-an-all-zero-TK.patch || die | ||
61 | mpatch 0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch || die | ||
62 | mpatch 0006-TDLS-Reject-TPK-TK-reconfiguration.patch || die | ||
63 | mpatch 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch || die | ||
64 | mpatch 0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch || die | ||
65 | |||
66 | cd ${SRCDIR}/wpa_supplicant | ||
67 | |||
68 | # broken Makefile | ||
69 | sed -i 's@/usr/local@$(PREFIX)@g' Makefile || die | ||
70 | |||
71 | # basic setup | ||
72 | maddconfig -b "CONFIG_CTRL_IFACE=y" || die | ||
73 | maddconfig -b "CONFIG_BACKEND=file" || die | ||
74 | maddconfig -b "CONFIG_NO_RANDOM_POOL=y" || die | ||
75 | |||
76 | # dbus support | ||
77 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS=y" || die | ||
78 | # Add support for new DBus control interface | ||
79 | # (fi.w1.hostap.wpa_supplicant1) | ||
80 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS_NEW=y" || die | ||
81 | # Add introspection support for new DBus control interface | ||
82 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS_INTRO=y" || die | ||
83 | |||
84 | # readline | ||
85 | maddconfig -b "CONFIG_READLINE=y" || die | ||
86 | |||
87 | # libnl-3.2 | ||
88 | maddconfig -b "CONFIG_LIBNL32=y" || die | ||
89 | |||
90 | # wi-fi protected setup (WPS) support | ||
91 | maddconfig -b "CONFIG_WPS=y" || die | ||
92 | # enable WPS support with NFC config method | ||
93 | maddconfig -b "CONFIG_WPS_NFC=y" || die | ||
94 | |||
95 | # # enable mitigation against certain attacks against TKIP | ||
96 | # maddconfig -b "CONFIG_DELAYED_MIC_ERROR_REPORT=y" || die | ||
97 | |||
98 | # # no debug | ||
99 | # maddconfig -b "CONFIG_NO_STDOUT_DEBUG=y" || die | ||
100 | |||
101 | # add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) | ||
102 | maddconfig -b "CONFIG_DEBUG_FILE=y" || die | ||
103 | |||
104 | # support HT overrides (disable HT/HT40, mask MCS rates, etc.) | ||
105 | maddconfig -b "CONFIG_HT_OVERRIDES=y" || die | ||
106 | |||
107 | # AP mode operations | ||
108 | maddconfig -b "CONFIG_AP=y" || die | ||
109 | |||
110 | # P2P (Wi-Fi Direct) | ||
111 | maddconfig -b "CONFIG_P2P=y" || die | ||
112 | |||
113 | # autoscan | ||
114 | maddconfig -b "CONFIG_AUTOSCAN_EXPONENTIAL=y" || die | ||
115 | # for periodic module: | ||
116 | maddconfig -b "CONFIG_AUTOSCAN_PERIODIC=y" || die | ||
117 | |||
118 | # RSN IBSS/AdHoc support | ||
119 | maddconfig -b "CONFIG_IBSS_RSN=y" || die | ||
120 | |||
121 | # simple background scan | ||
122 | maddconfig -b "CONFIG_BGSCAN_SIMPLE=y" || die | ||
123 | |||
124 | # basic authentication methods | ||
125 | maddconfig -b "CONFIG_EAP_GTC=y" || die | ||
126 | maddconfig -b "CONFIG_EAP_MD5=y" || die | ||
127 | maddconfig -b "CONFIG_EAP_OTP=y" || die | ||
128 | # maddconfig -b "CONFIG_EAP_PSK=y" || die | ||
129 | maddconfig -b "CONFIG_IEEE8021X_EAPOL=y" || die | ||
130 | maddconfig -b "CONFIG_PKCS12=y" || die | ||
131 | # maddconfig -b "CONFIG_PAX=y" || die | ||
132 | # maddconfig -b "CONFIG_TLV=y" || die | ||
133 | maddconfig -b "CONFIG_PEERKEY=y" || die | ||
134 | # maddconfig -b "CONFIG_EAP_PAX=y" || die | ||
135 | # maddconfig -b "CONFIG_EAP_TLV=y" || die | ||
136 | |||
137 | # ssl authentication methods | ||
138 | maddconfig -b "CONFIG_TLS=openssl" || die | ||
139 | maddconfig -b "CONFIG_EAP_LEAP=y" || die | ||
140 | maddconfig -b "CONFIG_EAP_MSCHAPV2=y" || die | ||
141 | maddconfig -b "CONFIG_EAP_PEAP=y" || die | ||
142 | maddconfig -b "CONFIG_EAP_TLS=y" || die | ||
143 | maddconfig -b "CONFIG_EAP_TTLS=y" || die | ||
144 | maddconfig -b "CONFIG_SMARTCARD=y" || die | ||
145 | |||
146 | # linux specific drivers | ||
147 | # maddconfig -b "CONFIG_WIRELESS_EXTENSION=y" || die | ||
148 | # maddconfig -b "CONFIG_DRIVER_ATMEL=y" || die | ||
149 | # maddconfig -b "CONFIG_DRIVER_HOSTAP=y" || die | ||
150 | # maddconfig -b "CONFIG_DRIVER_IPW=y" || die | ||
151 | # maddconfig -b "CONFIG_DRIVER_NDISWRAPPER=y" || die | ||
152 | maddconfig -b "CONFIG_DRIVER_NL80211=y" || die | ||
153 | # maddconfig -b "CONFIG_DRIVER_PRISM54=y" || die | ||
154 | # maddconfig -b "CONFIG_DRIVER_RALINK=y" || die | ||
155 | maddconfig -b "CONFIG_DRIVER_WEXT=y" || die | ||
156 | maddconfig -b "CONFIG_DRIVER_WIRED=y" || die | ||
157 | # maddconfig -b "CONFIG_DRIVER_BROADCOM=y" || die | ||
158 | # maddconfig -b "CONFIG_DRIVER_HERMES=y" || die | ||
159 | # needs madwifi headers | ||
160 | # maddconfig -b "CONFIG_DRIVER_MADWIFI=y" || die | ||
161 | } | ||
162 | |||
163 | src_compile() | ||
164 | { | ||
165 | cd ${SRCDIR}/wpa_supplicant | ||
166 | mmake PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) || die | ||
167 | } | ||
168 | |||
169 | src_install() | ||
170 | { | ||
171 | cd ${SRCDIR}/wpa_supplicant | ||
172 | make PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) DESTDIR=${BINDIR} install || die | ||
173 | |||
174 | # config | ||
175 | minstalldir /etc/wpa_supplicant | ||
176 | minstallfile wpa_supplicant.conf /etc/wpa_supplicant/ || die | ||
177 | |||
178 | # skeletons | ||
179 | minstallconf confd-wpa_supplicant.skel-${SKEL_CVS_REV} wpa_supplicant.skel || die | ||
180 | |||
181 | # rc-config | ||
182 | minstallconf confd-wpa_supplicant-${CONF_CVS_REV} wpa_supplicant || die | ||
183 | |||
184 | # dbus | ||
185 | minstalldbusconfig dbus/dbus-wpa_supplicant.conf wpa_supplicant.conf || die | ||
186 | minstalldbussystemservice dbus/fi.epitest.hostap.WPASupplicant.service || die | ||
187 | minstalldbussystemservice dbus/fi.w1.wpa_supplicant1.service || die | ||
188 | |||
189 | # systemd services | ||
190 | local i | ||
191 | for i in systemd/*.service | ||
192 | do | ||
193 | minstallunit "${i}" || die "${i}" | ||
194 | done | ||
195 | |||
196 | # man pages | ||
197 | minstallman doc/docbook/*.8 || die | ||
198 | minstallman doc/docbook/*.5 || die | ||
199 | # but not priv pages | ||
200 | rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die | ||
201 | |||
202 | minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die | ||
203 | } | ||
204 | |||
205 | postinstall() | ||
206 | { | ||
207 | if [ -f ${MROOT}/etc/wpa_supplicant.conf.example ] | ||
208 | then | ||
209 | rm ${MROOT}/etc/wpa_supplicant.conf.example | ||
210 | fi | ||
211 | |||
212 | # migrate config | ||
213 | if [ -f ${MROOT}/etc/wpa_supplicant.auto ] | ||
214 | then | ||
215 | if [ -f ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto ] | ||
216 | then | ||
217 | rm ${MROOT}/etc/wpa_supplicant.auto | ||
218 | else | ||
219 | mv ${MROOT}/etc/wpa_supplicant.auto ${MROOT}/etc/wpa_supplicant/ | ||
220 | sed -i 's:/var/run/wpa_supplicant:/run/wpa_supplicant:g' \ | ||
221 | ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto | ||
222 | fi | ||
223 | fi | ||
224 | |||
225 | mreloadunit dbus.service | ||
226 | mstartunit wpa_supplicant.service | ||
227 | } | ||
228 | |||
229 | postremove() | ||
230 | { | ||
231 | mreloadunit dbus.service | ||
232 | mstopunit wpa_supplicant.service | ||
233 | } |