From 44122baa9f627fe5e3d0bc780443b3fd9acaf27a Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 31 Jul 2024 13:29:47 +0800 Subject: [PATCH] build gui with qt5 --- wpa_supplicant-gui-qt4.patch | 36 ----------------------------- wpa_supplicant.spec | 44 +++++++++++++----------------------- 2 files changed, 16 insertions(+), 64 deletions(-) delete mode 100644 wpa_supplicant-gui-qt4.patch diff --git a/wpa_supplicant-gui-qt4.patch b/wpa_supplicant-gui-qt4.patch deleted file mode 100644 index 7acca1e..0000000 --- a/wpa_supplicant-gui-qt4.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9404f356e394604d1d3d6dbffc52abd54260e4d4 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 27 Oct 2015 08:56:35 +0100 -Subject: [PATCH] wpa_supplicant: allow overriding the names of the Qt4 tools - -This is useful for distributions that ship different versions of Qt in -different locations. ---- - wpa_supplicant/Makefile | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- a/wpa_supplicant/Makefile -+++ b/wpa_supplicant/Makefile -@@ -35,6 +35,9 @@ export INCDIR ?= /usr/local/include - export BINDIR ?= /usr/local/sbin - PKG_CONFIG ?= pkg-config - -+QMAKE ?= qmake -+LRELEASE ?= lrelease -+ - CFLAGS += $(EXTRA_CFLAGS) - CFLAGS += -I$(abspath ../src) - CFLAGS += -I$(abspath ../src/utils) -@@ -2039,10 +2042,10 @@ wpa_gui: - @echo "wpa_gui has been removed - see wpa_gui-qt4 for replacement" - - wpa_gui-qt4/Makefile: -- qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro -+ $(QMAKE) -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro - - wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts -- lrelease wpa_gui-qt4/wpa_gui.pro -+ $(LRELEASE) wpa_gui-qt4/wpa_gui.pro - - wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm - $(MAKE) -C wpa_gui-qt4 diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index ba79649..0aa0c5e 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -1,7 +1,7 @@ Name: wpa_supplicant Epoch: 1 Version: 2.11 -Release: 2 +Release: 3 Summary: A WPA Supplicant with support for WPA and WPA2 (IEEE 802.11i / RSN) License: BSD-3-Clause Url: https://w1.fi/wpa_supplicant/ @@ -10,19 +10,14 @@ Source1: build-config Source3: %{name}.service Source5: %{name}.logrotate -%ifnarch loongarch64 -Patch6000: wpa_supplicant-gui-qt4.patch -%endif %if "%{?toolchain}" == "clang" Patch6001: Add-clang-support-for-qmake.patch %endif Patch6002: backport-CVE-2024-5290.patch -%ifarch loongarch64 -BuildRequires: /usr/bin/qmake -%else -BuildRequires: qt-devel >= 4.0 -%endif +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5Widgets) BuildRequires: openssl-devel readline-devel dbus-devel libnl3-devel systemd-units docbook-utils Requires(post): systemd-sysv @@ -37,42 +32,36 @@ It is suitable for both desktop/laptop computers and embedded systems. Supplican used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver. -%ifnarch loongarch64 %package gui Summary: Graphical User Interface for %{name} %description gui Graphical User Interface for wpa_supplicant written using QT -%endif -%package help -Summary: Help package for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description help -This is the help package for %{name}, including some doc and man help files. +%package_help %prep %autosetup -n %{name}-%{version} -p1 %build %define _build_cmd__() %{make_build} %{?1:-C %1} %{?2} -%define _build_setups_qt__ QMAKE='%{qmake_qt4}' LRELEASE='%{_qt4_bindir}/lrelease' QTDIR=%{_libdir}/qt4 -export CFLAGS="${CFLAGS:-%optflags} -fPIE -DPIE"\ - CXXFLAGS="${CXXFLAGS:-%optflags} -fPIE -DPIE"\ - LDFLAGS="${LDFLAGS:-%optflags} -pie -Wl,-z,now"\ +export CFLAGS="${CFLAGS:-%build_cflags} -fPIE -DPIE"\ + CXXFLAGS="${CXXFLAGS:-%build_cxxflags} -fPIE -DPIE"\ + LDFLAGS="${LDFLAGS:-%build_ldflags} -pie -Wl,-z,now"\ BINDIR="%{_sbindir}"\ LIBDIR="%{_libdir}" cp -f %{SOURCE1} %{name}/.config %{_build_cmd__ %{name}} -%ifnarch loongarch64 -%{_build_cmd__ %{name} wpa_gui-qt4} %{_build_setups_qt__} -%endif %{_build_cmd__ %{name} eapol_test} %{_build_cmd__ %{name}/doc/docbook man} +pushd wpa_supplicant/wpa_gui-qt4 + %qmake_qt5 + %make_build +popd + %install install -Dm644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service install -Dm644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} @@ -83,9 +72,7 @@ install -m755 %{name}/{wpa_passphrase,wpa_cli,wpa_supplicant,eapol_test} %{build install -Dm644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf install -Dm644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service -%ifnarch loongarch64 install -Dm755 %{name}/wpa_gui-qt4/wpa_gui %{buildroot}/%{_bindir}/wpa_gui -%endif install -d %{buildroot}%{_mandir}/man{5,8} install -m644 %{name}/doc/docbook/*.8 %{buildroot}%{_mandir}/man8 @@ -108,10 +95,8 @@ install -m644 %{name}/doc/docbook/*.5 %{buildroot}%{_mandir}/man5 %{_sbindir}/wpa_cli %{_sbindir}/eapol_test -%ifnarch loongarch64 %files gui %{_bindir}/wpa_gui -%endif %files help %doc %{name}/ChangeLog README %{name}/eap_testing.txt %{name}/todo.txt %{name}/wpa_supplicant.conf %{name}/examples @@ -119,6 +104,9 @@ install -m644 %{name}/doc/docbook/*.5 %{buildroot}%{_mandir}/man5 %{_mandir}/man5/* %changelog +* Sun Sep 08 2024 Funda Wang - 1:2.11-3 +- build with qt5 + * Fri Aug 9 2024 zhangxianting - 1:2.11-2 - fix CVE-2024-5290 -- Gitee