Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .onedev-buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 40
imports:
- projectPath: OpenMandriva/Packages
revision: mirroring
32 changes: 3 additions & 29 deletions iwd.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: Wireless daemon for Linux
Name: iwd
Version: 1.9
Release: 1
Release: 2
License: LGPLv2+
URL: https://lists.01.org/mailman/listinfo/iwd
Source0: https://www.kernel.org/pub/linux/network/wireless/%{name}-%{version}.tar.xz
Expand All @@ -19,6 +19,7 @@ BuildRequires: systemd-macros
BuildRequires: pkgconfig(ell) >= 0.29
Requires: dbus
Requires: systemd
Obsoletes: wpa_supplicant < 2.9

%description
The daemon and utilities for controlling and configuring the Wi-Fi network
Expand Down Expand Up @@ -51,38 +52,11 @@ cat > %{buildroot}%{_presetdir}/86-iwd.preset << EOF
enable iwd.service
EOF

# (tpg) make sure that wpa_supplicant is stop and disabled on update
%triggerin -- wpa_supplicant
systemctl disable --now wpa_supplicant.service

# (tpg) make sure that IWD is default backend and restart NM
# this may be removed or changed after wpa_supplicant go away
%triggerin -- NetworkManager
sed -i -e 's/^#wifi.backend=iwd/wifi.backend=iwd/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
sed -i -e 's/^wifi.backend=wpa_supplicant/#wifi.backend=wpa_supplicant/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
systemctl restart --quiet NetworkManager.service

%post
%systemd_post iwd.service
# (tpg) this may be removed or adapted when wpa_supplicant will go away
if [ "$1" = 1 ]; then
if [ -e /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf ]; then
systemctl disable --now wpa_supplicant.service
sed -i -e 's/^#wifi.backend=iwd/wifi.backend=iwd/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
sed -i -e 's/^wifi.backend=wpa_supplicant/#wifi.backend=wpa_supplicant/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
systemctl restart --quiet NetworkManager.service
fi
fi

%preun
# (tpg) this may be removed or adapted when wpa_supplicant will go away
if [ "$1" = 0 ]; then
if [ $(command -v wpa_supplicant) ]; then
sed -i -e 's/^#wifi.backend=iwd/wifi.backend=iwd/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
sed -i -e 's/^wifi.backend=wpa_supplicant/#wifi.backend=wpa_supplicant/g' /usr/lib/NetworkManager/conf.d/00-wifi-backend.conf
systemctl restart --quiet NetworkManager.service
fi
fi
%systemd_preun iwd.service

%files
%doc AUTHORS README TODO ChangeLog
Expand Down