!162 [sync] PR-154: add macro firewalld_zone to fix firewalld error about nm-shared.xml

From: @openeuler-sync-bot 
Reviewed-by: @gebidelidaye 
Signed-off-by: @gebidelidaye
This commit is contained in:
openeuler-ci-bot 2023-06-19 02:38:55 +00:00 committed by Gitee
commit fe7aa67d33
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

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