add macro firewalld_zone to fix firewalld error about nm-shared.xml

(cherry picked from commit 2051fa5d047fe84d0cf15b3c0bba3f70e58bc810)
This commit is contained in:
gaoxingwang 2023-06-05 20:55:39 +08:00 committed by openeuler-sync-bot
parent 95017b01a2
commit 1794d8104f

View File

@ -37,6 +37,7 @@
%bcond_with libnm_glib
%bcond_without crypto_gnutls
%bcond_without nm_cloud_setup
%bcond_with firewalld_zone
%global dbus_version 1.1
%global dbus_sys_dir %{_datadir}/dbus-1/system.d
@ -50,7 +51,7 @@
Name: NetworkManager
Version: 1.32.12
Epoch: 1
Release: 15
Release: 16
Summary: Network Link Manager and User Applications
License: GPLv2+
URL: https://www.gnome.org/projects/NetworkManager/
@ -80,6 +81,9 @@ BuildRequires: bluez-libs-devel
%if %{with team}
BuildRequires: teamd-devel
%endif
%if %{with firewalld_zone}
BuildRequires: firewalld-filesystem
%endif
Requires(post): systemd
Requires(post): /usr/sbin/update-alternatives
Requires(preun): systemd
@ -305,6 +309,11 @@ intltoolize --automake --copy --force
%if %{with ppp}
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
--enable-ppp=yes \
%endif
%if %{with firewalld_zone}
--enable-firewalld-zone \
%else
--disable-firewalld-zone \
%endif
--with-dist-version=%{version}-%{release} \
--with-config-plugins-default='ifcfg-rh' \
@ -379,6 +388,10 @@ fi
/usr/bin/udevadm control --reload-rules || :
/usr/bin/udevadm trigger --subsystem-match=net || :
%if %{with firewalld_zone}
%firewalld_reload
%endif
%systemd_postun NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service
%ldconfig_scriptlets glib
@ -434,7 +447,9 @@ fi
%{_prefix}/lib/%{name}/dispatcher.d/90-nm-cloud-setup.sh
%{_prefix}/lib/%{name}/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh
%endif
%if %{with firewalld_zone}
%{_prefix}/lib/firewalld/zones/nm-shared.xml
%endif
%config(noreplace) /etc/ld.so.conf.d/*
%if %{with team}
@ -505,6 +520,12 @@ fi
%{_datadir}/gtk-doc/html/NetworkManager/*
%changelog
* Mon Jun 5 2023 gaoxingwang<gaoxingwang1@huawei.com> - 1:1.32.12-16
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:add macro firewalld_zone to fix firewalld error about nm-shared.xml
* Mon Jun 5 2023 gaoxingwang<gaoxingwang1@huawei.com> - 1:1.32.12-15
- Type:bugfix
- CVE:NA