]>
Commit | Line | Data |
---|---|---|
df27e1a5 | 1 | # TODO: |
41537a2c | 2 | # - consider using CONFIG_PRIVSEP |
486800af | 3 | # - icon for wpa_gui |
51864755 JB |
4 | # |
5 | # Conditional build | |
465476b1 JB |
6 | %bcond_without dbus # D-BUS control interface |
7 | %bcond_without gui # GUI (wpa_gui) package | |
8 | %bcond_with pcsc # PC/SC support for smartcards | |
867e45e1 | 9 | %bcond_without qt5 # use Qt 5 instead of Qt 4 |
f66a8987 | 10 | |
bde40618 | 11 | Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant |
47cec9ef | 12 | Summary(pl.UTF-8): Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa |
bde40618 | 13 | Name: wpa_supplicant |
5a8cc4fa | 14 | Version: 2.6 |
867e45e1 | 15 | Release: 4 |
465476b1 | 16 | License: BSD |
bdc271c3 | 17 | Group: Networking |
b08e6453 | 18 | Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz |
5a8cc4fa | 19 | # Source0-md5: 091569eb4440b7d7f2b4276dbfc03c3c |
bde40618 | 20 | Source1: %{name}.config |
486800af | 21 | Source2: %{name}-wpa_gui.desktop |
29638b4d | 22 | Source3: %{name}.tmpfiles |
f66a8987 | 23 | Source4: %{name}.service |
bde40618 | 24 | Patch0: %{name}-makefile.patch |
19721d40 | 25 | Patch1: %{name}-OPTCFLAGS.patch |
30872be4 | 26 | Patch2: %{name}-lrelease.patch |
4771e8c9 | 27 | # http://www.linuxwimax.org/Download |
bd214586 JB |
28 | Patch3: %{name}-0.7.2-generate-libeap-peer.patch |
29 | Patch4: dbus-services.patch | |
a39fe044 AM |
30 | Patch5: 0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch |
31 | Patch6: 0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch | |
32 | Patch7: 0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch | |
33 | Patch8: 0004-Prevent-installation-of-an-all-zero-TK.patch | |
34 | Patch9: 0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch | |
35 | Patch10: 0006-TDLS-Reject-TPK-TK-reconfiguration.patch | |
36 | Patch11: 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch | |
37 | Patch12: 0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch | |
867e45e1 | 38 | Patch13: %{name}-lrelease5.patch |
b08e6453 | 39 | URL: http://w1.fi/wpa_supplicant/ |
19aba961 | 40 | %{?with_dbus:BuildRequires: dbus-devel} |
170ebb19 | 41 | BuildRequires: libnl-devel >= 1:3.2 |
2af19e57 | 42 | BuildRequires: ncurses-devel |
bde40618 | 43 | BuildRequires: openssl-devel |
465476b1 | 44 | %{?with_pcsc:BuildRequires: pcsc-lite-devel} |
8f834f15 | 45 | BuildRequires: pkgconfig |
c299b6ab | 46 | BuildRequires: rpmbuild(macros) >= 1.647 |
bed81893 | 47 | %if %{with gui} |
465476b1 JB |
48 | %if %{with qt5} |
49 | BuildRequires: Qt5Gui-devel >= 5 | |
50 | BuildRequires: Qt5Widgets-devel >= 5 | |
51 | BuildRequires: qt5-build >= 5 | |
867e45e1 | 52 | BuildRequires: qt5-linguist >= 5.13.0-3 |
465476b1 JB |
53 | BuildRequires: qt5-qmake >= 5 |
54 | %else | |
55 | BuildRequires: QtGui-devel >= 4 | |
56 | BuildRequires: qt4-build >= 4 | |
57 | BuildRequires: qt4-linguist >= 4 | |
58 | BuildRequires: qt4-qmake >= 4 | |
59 | %endif | |
bed81893 | 60 | %endif |
bde40618 | 61 | BuildRequires: readline-devel |
53789b76 | 62 | BuildRequires: sed >= 4.0 |
f85cfd26 | 63 | Requires: rc-scripts >= 0.4.1.24 |
f66a8987 | 64 | Requires: systemd-units >= 38 |
bde40618 | 65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
465476b1 JB |
67 | %define qtver %{?with_qt5:5}%{!?with_qt5:4} |
68 | ||
bde40618 | 69 | %description |
bdc271c3 AG |
70 | wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE |
71 | 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is | |
72 | used in the client stations. It implements key negotiation with a WPA | |
73 | Authenticator and it controls the roaming and IEEE 802.11 | |
bde40618 | 74 | authentication/association of the wlan driver. |
75 | ||
855d62cf | 76 | wpa_supplicant is designed to be a "daemon" program that runs in the |
77 | background and acts as the backend component controlling the wireless | |
78 | connection. Support for separate frontend programs is included and an | |
79 | example text-based frontend, wpa_cli, is included with wpa_supplicant. | |
80 | ||
81 | Supported WPA/IEEE 802.11i features: | |
82 | - WPA-PSK ("WPA-Personal") | |
90dcf215 JB |
83 | - WPA with EAP (e.g., with RADIUS authentication server) |
84 | ("WPA-Enterprise") (currently, EAP-TLS and EAP-PEAP/MSCHAPv2 are | |
85 | supported with an integrated IEEE 802.1X Supplicant; other EAP types | |
86 | may be used with an external program, Xsupplicant) | |
855d62cf | 87 | - key management for CCMP, TKIP, WEP104, WEP40 |
88 | - RSN/WPA2 (IEEE 802.11i) | |
89 | ||
6c208807 JR |
90 | %description -l pl.UTF-8 |
91 | wpa_supplicant to suplikant WPA z obsługą WPA oraz WPA2 (IEEE 802.11i | |
92 | / RSN). Suplikant to element IEEE 802.1X/WPA używany na stacjach | |
93 | klienckich. Implementuje negocjację kluczy z elementem | |
94 | uwierzytelniającym WPA (WPA Authenticator) i kontroluje roaming oraz | |
90dcf215 JB |
95 | uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11. |
96 | ||
6c208807 JR |
97 | wpa_supplicant jest zaprojektowany tak, by był wspólnym programem |
98 | działającym w tle i działa jako element backendu sterujący połączeniem | |
99 | bezprzewodowym. Dostępna jest obsługa oddzielnych programów | |
100 | frontendowych, a w pakiecie wpa_supplicant załączony jest prosty | |
90dcf215 JB |
101 | frontend tekstowy - wpa_cli. |
102 | ||
6c208807 | 103 | Obsługiwane możliwości WPA/IEEE 802.11i: |
90dcf215 | 104 | - WPA-PSK ("WPA-Personal") |
6c208807 JR |
105 | - WPA z EAP (np. z serwerem uwierzytleniającym RADIUS) |
106 | ("WPA-Enterprise") (aktualnie EAP-TLS i EAP-PEAP/MSCHAPv2 są | |
107 | obsługiwane przez załączonego suplikanta IEEE 802.1X; inne rodzaje EAP | |
108 | mogą być używane przez zewnętrzny program - Xsupplicant) | |
109 | - zarządzanie kluczy dla CCMP, TKIP, WEP104, WEP40 | |
90dcf215 | 110 | - RSN/WPA2 (IEEE 802.11i) |
bde40618 | 111 | |
df27e1a5 PG |
112 | %package -n wpa_gui |
113 | Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI | |
47cec9ef | 114 | Summary(pl.UTF-8): Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa |
df27e1a5 | 115 | Group: X11/Applications/Networking |
fcaa0e79 | 116 | Requires: %{name} = %{version}-%{release} |
df27e1a5 PG |
117 | |
118 | %description -n wpa_gui | |
fcaa0e79 JB |
119 | Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI. |
120 | ||
6c208807 | 121 | %description -n wpa_gui -l pl.UTF-8 |
fcaa0e79 | 122 | Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa. |
df27e1a5 | 123 | |
4771e8c9 MB |
124 | %package -n libeap |
125 | Summary: EAP Peer library | |
126 | Summary(pl.UTF-8): Biblioteka EAP Peer | |
127 | Group: Libraries | |
128 | ||
129 | %description -n libeap | |
130 | EAP Peer library. | |
131 | ||
132 | %description -n libeap -l pl.UTF-8 | |
133 | Biblioteka EAP Peer. | |
134 | ||
135 | %package -n libeap-devel | |
136 | Summary: Development files for eap library | |
137 | Summary(pl.UTF-8): Pliki programistyczne dla biblioteki eap | |
138 | Group: Development/Libraries | |
139 | Requires: libeap = %{version}-%{release} | |
140 | ||
141 | %description -n libeap-devel | |
142 | Development files for eap library. | |
143 | ||
144 | %description -n libeap-devel -l pl.UTF-8 | |
145 | Pliki programistyczne dla biblioteki eap. | |
146 | ||
bde40618 | 147 | %prep |
148 | %setup -q | |
149 | %patch0 -p1 | |
0d44a591 | 150 | %patch1 -p1 |
867e45e1 | 151 | %if %{without qt5} |
30872be4 | 152 | %patch2 -p0 |
867e45e1 | 153 | %endif |
bd214586 | 154 | %patch3 -p1 |
4771e8c9 | 155 | %patch4 -p1 |
a39fe044 AM |
156 | %patch5 -p1 |
157 | %patch6 -p1 | |
158 | %patch7 -p1 | |
159 | %patch8 -p1 | |
160 | %patch9 -p1 | |
161 | %patch10 -p1 | |
162 | %patch11 -p1 | |
867e45e1 JR |
163 | %patch12 -p1 |
164 | %if %{with qt5} | |
165 | %patch13 -p0 | |
166 | %endif | |
bde40618 | 167 | |
53789b76 MB |
168 | %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc |
169 | ||
8b73356c | 170 | cp -p %{SOURCE1} wpa_supplicant/.config |
bde40618 | 171 | |
19aba961 MB |
172 | %if %{with dbus} |
173 | echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config | |
f1257d27 MB |
174 | echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config |
175 | echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config | |
19aba961 MB |
176 | %endif |
177 | ||
465476b1 JB |
178 | %if %{with pcsc} |
179 | echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config | |
180 | echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config | |
181 | echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config | |
182 | echo 'CONFIG_EAP_AKA_PRIME=y' >> wpa_supplicant/.config | |
183 | %endif | |
184 | ||
bde40618 | 185 | %build |
01adb5d5 | 186 | %{__make} -C wpa_supplicant \ |
5bc65950 | 187 | V=1 \ |
2af19e57 | 188 | CC="%{__cc}" \ |
43e2545a | 189 | BINDIR="%{_sbindir}" \ |
c35099eb | 190 | LDFLAGS="%{rpmldflags}" \ |
de1f0e4e | 191 | OPTCFLAGS="%{rpmcppflags} %{rpmcflags}" |
bde40618 | 192 | |
35d6fc22 PG |
193 | # eapol_test: |
194 | %{__make} -C wpa_supplicant eapol_test \ | |
5bc65950 | 195 | V=1 \ |
35d6fc22 PG |
196 | CC="%{__cc}" \ |
197 | LDFLAGS="%{rpmldflags}" \ | |
19721d40 | 198 | OPTCFLAGS="%{rpmcppflags} %{rpmcflags}" |
35d6fc22 | 199 | |
bed81893 | 200 | %if %{with gui} |
b194f08b | 201 | cd wpa_supplicant/wpa_gui-qt4 |
465476b1 | 202 | qmake-qt%{qtver} -o Makefile wpa_gui.pro \ |
de1f0e4e JB |
203 | QMAKE_CXX="%{__cxx}" \ |
204 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
205 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" | |
b194f08b | 206 | cd ../.. |
01adb5d5 | 207 | %{__make} -C wpa_supplicant wpa_gui-qt4 \ |
5bc65950 | 208 | V=1 \ |
465476b1 JB |
209 | QTDIR=%{_libdir}/qt%{qtver} \ |
210 | UIC=%{_bindir}/uic-qt%{qtver} | |
bed81893 | 211 | %endif |
df27e1a5 | 212 | |
4771e8c9 MB |
213 | %{__make} -C src/eap_peer clean |
214 | %{__make} -C src/eap_peer \ | |
215 | CC="%{__cc}" \ | |
de1f0e4e JB |
216 | CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0)" \ |
217 | LDFLAGS="%{rpmldflags} -shared" | |
4771e8c9 | 218 | |
bde40618 | 219 | %install |
220 | rm -rf $RPM_BUILD_ROOT | |
29638b4d | 221 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \ |
f66a8987 | 222 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} |
5f8b0164 | 223 | |
43e2545a ER |
224 | install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir} |
225 | install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_sbindir} | |
226 | install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir} | |
4771e8c9 | 227 | |
43e2545a | 228 | cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir} |
bde40618 | 229 | |
43e2545a ER |
230 | cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
231 | cp -p wpa_supplicant/doc/docbook/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
75221d1f | 232 | |
41537a2c JB |
233 | # program exists with CONFIG_PRIVSEP only |
234 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8 | |
235 | ||
19aba961 MB |
236 | %if %{with dbus} |
237 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services} | |
43e2545a ER |
238 | cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf |
239 | cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services | |
f66a8987 | 240 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service |
19aba961 MB |
241 | %endif |
242 | ||
bed81893 | 243 | %if %{with gui} |
43e2545a ER |
244 | install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir} |
245 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop | |
bed81893 | 246 | %endif |
df27e1a5 | 247 | |
43e2545a ER |
248 | install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir} |
249 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
29638b4d | 250 | |
4771e8c9 | 251 | %{__make} -C src/eap_peer install \ |
53789b76 MB |
252 | DESTDIR=$RPM_BUILD_ROOT \ |
253 | LIBDIR=%{_libdir} | |
4771e8c9 | 254 | |
bde40618 | 255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
c299b6ab JR |
258 | %post |
259 | %systemd_reload | |
260 | %systemd_service_restart wpa_supplicant.service | |
261 | ||
262 | %preun | |
263 | %systemd_preun wpa_supplicant.service | |
264 | ||
265 | %postun | |
266 | %systemd_reload | |
267 | ||
41537a2c JB |
268 | %post -n libeap -p /sbin/ldconfig |
269 | %postun -n libeap -p /sbin/ldconfig | |
4771e8c9 | 270 | |
bde40618 | 271 | %files |
272 | %defattr(644,root,root,755) | |
465476b1 | 273 | %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples} |
bdc271c3 | 274 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
35d6fc22 | 275 | %attr(755,root,root) %{_bindir}/eapol_test |
41537a2c JB |
276 | %attr(755,root,root) %{_sbindir}/wpa_cli |
277 | %attr(755,root,root) %{_sbindir}/wpa_passphrase | |
278 | %attr(755,root,root) %{_sbindir}/wpa_supplicant | |
9d11e01d | 279 | %attr(750,root,root) %ghost %dir /var/run/%{name} |
f66a8987 | 280 | %{systemdtmpfilesdir}/%{name}.conf |
41537a2c | 281 | %{_mandir}/man5/wpa_supplicant.conf.5* |
bb5696df | 282 | %{_mandir}/man8/eapol_test.8* |
41537a2c JB |
283 | %{_mandir}/man8/wpa_background.8* |
284 | %{_mandir}/man8/wpa_cli.8* | |
285 | %{_mandir}/man8/wpa_passphrase.8* | |
286 | %{_mandir}/man8/wpa_supplicant.8* | |
19aba961 | 287 | %if %{with dbus} |
4ea51389 | 288 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf |
19aba961 | 289 | %{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service |
f1257d27 | 290 | %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service |
f66a8987 | 291 | %{systemdunitdir}/%{name}.service |
19aba961 | 292 | %endif |
df27e1a5 | 293 | |
bed81893 | 294 | %if %{with gui} |
df27e1a5 PG |
295 | %files -n wpa_gui |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_bindir}/wpa_gui | |
41537a2c | 298 | %{_mandir}/man8/wpa_gui.8* |
486800af | 299 | %{_desktopdir}/wpa_gui.desktop |
bed81893 | 300 | %endif |
4771e8c9 MB |
301 | |
302 | %files -n libeap | |
303 | %defattr(644,root,root,755) | |
304 | %attr(755,root,root) %{_libdir}/libeap.so.*.*.* | |
41537a2c | 305 | %attr(755,root,root) %ghost %{_libdir}/libeap.so.0 |
4771e8c9 MB |
306 | |
307 | %files -n libeap-devel | |
308 | %defattr(644,root,root,755) | |
309 | %attr(755,root,root) %{_libdir}/libeap.so | |
310 | %{_includedir}/eap_peer | |
311 | %{_pkgconfigdir}/libeap0.pc |