]> git.pld-linux.org Git - packages/wpa_supplicant.git/blame - wpa_supplicant.spec
- apply missing security patch
[packages/wpa_supplicant.git] / wpa_supplicant.spec
CommitLineData
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 11Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant
47cec9ef 12Summary(pl.UTF-8): Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
bde40618 13Name: wpa_supplicant
5a8cc4fa 14Version: 2.6
867e45e1 15Release: 4
465476b1 16License: BSD
bdc271c3 17Group: Networking
b08e6453 18Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz
5a8cc4fa 19# Source0-md5: 091569eb4440b7d7f2b4276dbfc03c3c
bde40618 20Source1: %{name}.config
486800af 21Source2: %{name}-wpa_gui.desktop
29638b4d 22Source3: %{name}.tmpfiles
f66a8987 23Source4: %{name}.service
bde40618 24Patch0: %{name}-makefile.patch
19721d40 25Patch1: %{name}-OPTCFLAGS.patch
30872be4 26Patch2: %{name}-lrelease.patch
4771e8c9 27# http://www.linuxwimax.org/Download
bd214586
JB
28Patch3: %{name}-0.7.2-generate-libeap-peer.patch
29Patch4: dbus-services.patch
a39fe044
AM
30Patch5: 0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
31Patch6: 0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
32Patch7: 0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
33Patch8: 0004-Prevent-installation-of-an-all-zero-TK.patch
34Patch9: 0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
35Patch10: 0006-TDLS-Reject-TPK-TK-reconfiguration.patch
36Patch11: 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
37Patch12: 0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
867e45e1 38Patch13: %{name}-lrelease5.patch
b08e6453 39URL: http://w1.fi/wpa_supplicant/
19aba961 40%{?with_dbus:BuildRequires: dbus-devel}
170ebb19 41BuildRequires: libnl-devel >= 1:3.2
2af19e57 42BuildRequires: ncurses-devel
bde40618 43BuildRequires: openssl-devel
465476b1 44%{?with_pcsc:BuildRequires: pcsc-lite-devel}
8f834f15 45BuildRequires: pkgconfig
c299b6ab 46BuildRequires: rpmbuild(macros) >= 1.647
bed81893 47%if %{with gui}
465476b1
JB
48%if %{with qt5}
49BuildRequires: Qt5Gui-devel >= 5
50BuildRequires: Qt5Widgets-devel >= 5
51BuildRequires: qt5-build >= 5
867e45e1 52BuildRequires: qt5-linguist >= 5.13.0-3
465476b1
JB
53BuildRequires: qt5-qmake >= 5
54%else
55BuildRequires: QtGui-devel >= 4
56BuildRequires: qt4-build >= 4
57BuildRequires: qt4-linguist >= 4
58BuildRequires: qt4-qmake >= 4
59%endif
bed81893 60%endif
bde40618 61BuildRequires: readline-devel
53789b76 62BuildRequires: sed >= 4.0
f85cfd26 63Requires: rc-scripts >= 0.4.1.24
f66a8987 64Requires: systemd-units >= 38
bde40618 65BuildRoot: %{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
70wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
71802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is
72used in the client stations. It implements key negotiation with a WPA
73Authenticator and it controls the roaming and IEEE 802.11
bde40618 74authentication/association of the wlan driver.
75
855d62cf 76wpa_supplicant is designed to be a "daemon" program that runs in the
77background and acts as the backend component controlling the wireless
78connection. Support for separate frontend programs is included and an
79example text-based frontend, wpa_cli, is included with wpa_supplicant.
80
81Supported 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
91wpa_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
93klienckich. Implementuje negocjację kluczy z elementem
94uwierzytelniającym WPA (WPA Authenticator) i kontroluje roaming oraz
90dcf215
JB
95uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11.
96
6c208807
JR
97wpa_supplicant jest zaprojektowany tak, by był wspólnym programem
98działającym w tle i działa jako element backendu sterujący połączeniem
99bezprzewodowym. Dostępna jest obsługa oddzielnych programów
100frontendowych, a w pakiecie wpa_supplicant załączony jest prosty
90dcf215
JB
101frontend tekstowy - wpa_cli.
102
6c208807 103Obsł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
113Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI
47cec9ef 114Summary(pl.UTF-8): Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
df27e1a5 115Group: X11/Applications/Networking
fcaa0e79 116Requires: %{name} = %{version}-%{release}
df27e1a5
PG
117
118%description -n wpa_gui
fcaa0e79
JB
119Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI.
120
6c208807 121%description -n wpa_gui -l pl.UTF-8
fcaa0e79 122Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa.
df27e1a5 123
4771e8c9
MB
124%package -n libeap
125Summary: EAP Peer library
126Summary(pl.UTF-8): Biblioteka EAP Peer
127Group: Libraries
128
129%description -n libeap
130EAP Peer library.
131
132%description -n libeap -l pl.UTF-8
133Biblioteka EAP Peer.
134
135%package -n libeap-devel
136Summary: Development files for eap library
137Summary(pl.UTF-8): Pliki programistyczne dla biblioteki eap
138Group: Development/Libraries
139Requires: libeap = %{version}-%{release}
140
141%description -n libeap-devel
142Development files for eap library.
143
144%description -n libeap-devel -l pl.UTF-8
145Pliki 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 170cp -p %{SOURCE1} wpa_supplicant/.config
bde40618 171
19aba961
MB
172%if %{with dbus}
173echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config
f1257d27
MB
174echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config
175echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config
19aba961
MB
176%endif
177
465476b1
JB
178%if %{with pcsc}
179echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config
180echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config
181echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config
182echo '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 201cd wpa_supplicant/wpa_gui-qt4
465476b1 202qmake-qt%{qtver} -o Makefile wpa_gui.pro \
de1f0e4e
JB
203 QMAKE_CXX="%{__cxx}" \
204 QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
205 QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
b194f08b 206cd ../..
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
220rm -rf $RPM_BUILD_ROOT
29638b4d 221install -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
224install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir}
225install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_sbindir}
226install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir}
4771e8c9 227
43e2545a 228cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}
bde40618 229
43e2545a
ER
230cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
231cp -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}
237install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services}
43e2545a
ER
238cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
239cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services
f66a8987 240cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
19aba961
MB
241%endif
242
bed81893 243%if %{with gui}
43e2545a
ER
244install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir}
245cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop
bed81893 246%endif
df27e1a5 247
43e2545a
ER
248install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir}
249cp -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
256rm -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
This page took 0.112687 seconds and 4 git commands to generate.