8 Star 0 Fork 24

src-openEuler/firewalld

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
firewalld.spec 11.37 KB
一键复制 编辑 原始数据 按行查看 历史
Name: firewalld
Version: 1.2.6
Release: 7
Summary: A firewall daemon with D-Bus interface providing a dynamic firewall
License: GPLv2+
URL: http://www.firewalld.org
Source0: https://github.com/firewalld/firewalld/releases/download/v%{version}/%{name}-%{version}.tar.gz
Patch0: firewalld-0.2.6-MDNS-default.patch
Patch1: repair-test-cases.patch
Patch2: add-Restart-on-failure-on-firewalld.service.patch
Patch3: 0001-fix-config-Specify-the-translation-encoding-format-a.patch
Patch4: backport-chore-nftables-add-delete-table-helper.patch
Patch5: backport-fix-nftables-always-flush-main-table-on-start.patch
Patch6: backport-fix-service-update-highest-port-number-for-ceph.patch
Patch7: backport-fix-nm-release-NM-client-after-a-timeout.patch
BuildArch: noarch
BuildRequires: autoconf automake desktop-file-utils gettext intltool glib2 glib2-devel systemd-units docbook-style-xsl
BuildRequires: libxslt iptables ebtables ipset python3-devel
Requires: iptables iptables-nft ipset systemd
Requires: python3-firewall = %{version}-%{release}
Suggests: iptables-nft
Obsoletes: firewalld-selinux < 0.4.4.2-2
Conflicts: selinux-policy < 3.14.1-28
Conflicts: cockpit-ws < 173-2
Recommends: polkit
Provides: variant_config(Server)
Provides: variant_config(Workstation)
Obsoletes: firewalld-config-standard <= 0.3.15
Obsoletes: firewalld-config-cloud <= 0.3.15
Obsoletes: firewalld-config-server <= 0.3.15
Obsoletes: firewalld-config-workstation <= 0.3.15
Provides: firewalld-filesystem = %{version}-%{release}
Obsoletes: firewalld-filesystem < %{version}-%{release}
%description
firewalld is a firewall service daemon that provides a dynamic customizable
firewall with a D-Bus interface.
%package doc
Summary: Documentation for firewalld
%description doc
Documentation for firewalld.
%package -n python3-firewall
Summary: Python3 bindings for firewalld
%{?python_provide:%python_provide python3-firewall}
Obsoletes: python-firewall < 0.5.2-2
Obsoletes: python2-firewall < 0.5.2-2
Requires: python3-dbus python3-gobject-base python3-nftables
%description -n python3-firewall
Python3 bindings for firewalld.
%package -n firewalld-test
Summary: Firewalld testsuite
%description -n firewalld-test
This package provides the firewalld testsuite.
%if %{?openEuler:1}0
%package -n firewall-config
Summary: Firewall GUI configuration application
Requires: %{name} = %{version}-%{release}
Requires: python3-firewall = %{version}-%{release}
Requires: hicolor-icon-theme python3-gobject NetworkManager-libnm dbus-x11 gtk3
Recommends: polkit
%description -n firewall-config
GUI configuration interface for firewalld.
%endif
%prep
%autosetup -n %{name}-%{version} -p1
./autogen.sh
%build
%configure --enable-sysconfig --enable-rpmmacros PYTHON="%{__python3} %{py3_shbang_opts}"
%make_build
%install
%make_install
desktop-file-install --delete-original \
--dir %{buildroot}%{_sysconfdir}/xdg/autostart \
%{buildroot}%{_sysconfdir}/xdg/autostart/firewall-applet.desktop
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/firewall-config.desktop
mv %{buildroot}%{_sysconfdir}/firewalld/firewalld.conf \
%{buildroot}%{_sysconfdir}/firewalld/firewalld-standard.conf
%find_lang %{name} --all-name
dd if=/dev/zero of=$RPM_BUILD_ROOT/%{_datadir}/firewalld/firewalld-tmp-mmap bs=4096 count=1
%check
%pre
%preun
%systemd_preun firewalld.service
%post
%systemd_post firewalld.service
%postun
%systemd_postun_with_restart firewalld.service
if [ $1 -eq 0 ]; then
if [ -L %{_sysconfdir}/firewalld/firewalld.conf ] && [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
rm -f %{_sysconfdir}/firewalld/firewalld.conf
fi
fi
%posttrans
# If we don't yet have a symlink or existing file for firewalld.conf,
# create it. Note: this will intentionally reset the policykit policy
# at the same time, so they are in sync.
# Import /etc/os-release to get the variant definition
. /etc/os-release || :
if [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
case "$VARIANT_ID" in
server)
ln -sf firewalld-server.conf %{_sysconfdir}/firewalld/firewalld.conf || :
;;
workstation)
ln -sf firewalld-workstation.conf %{_sysconfdir}/firewalld/firewalld.conf || :
;;
*)
ln -sf firewalld-standard.conf %{_sysconfdir}/firewalld/firewalld.conf
;;
esac
fi
if [ ! -e %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy ]; then
case "$VARIANT_ID" in
workstation)
ln -sf org.fedoraproject.FirewallD1.desktop.policy.choice %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
;;
*)
# For all other editions, we'll use the Server polkit policy
ln -sf org.fedoraproject.FirewallD1.server.policy.choice %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
esac
fi
sed -i "s/CleanupModulesOnExit=no/CleanupModulesOnExit=yes/g" %{_sysconfdir}/firewalld/firewalld.conf
%files -f %{name}.lang
%doc COPYING README.md
%{_sbindir}/firewalld
%{_bindir}/firewall-cmd
%{_bindir}/firewall-offline-cmd
%{_datadir}/bash-completion/completions/firewall-cmd
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_firewalld
%{_prefix}/lib/firewalld/*
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/
%config(noreplace) %{_sysconfdir}/firewalld/firewalld-standard.conf
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/helpers
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/icmptypes
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/ipsets
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/services
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/policies
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/zones
%ghost %config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf
%config(noreplace) %{_sysconfdir}/firewalld/lockdown-whitelist.xml
%defattr(0644,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/firewalld
%{_unitdir}/firewalld.service
%config(noreplace) %{_datadir}/dbus-1/system.d/FirewallD.conf
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.desktop.policy.choice
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.server.policy.choice
%ghost %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy
%{_sysconfdir}/modprobe.d/firewalld-sysctls.conf
%attr (0700,root,root) %{_datadir}/firewalld/firewalld-tmp-mmap
%config(noreplace) %{_sysconfdir}/logrotate.d/firewalld
%{_rpmconfigdir}/macros.d/macros.firewalld
#we don't need applet
%exclude %{_bindir}/firewall-applet
%exclude %{_sysconfdir}/xdg/autostart/firewall-applet.desktop
%exclude %dir %{_sysconfdir}/firewall
%exclude %{_sysconfdir}/firewall/applet.conf
%exclude %{_datadir}/icons/hicolor/*/apps/firewall-applet*.*
%exclude %{_mandir}/man1/firewall-applet*.1*
%if %{?openEuler:1}0
%files -n firewall-config
%{_bindir}/firewall-config
%defattr(0644,root,root)
%{_datadir}/firewalld/*
%{_datadir}/applications/firewall-config.desktop
%{_datadir}/metainfo/firewall-config.appdata.xml
%{_datadir}/icons/hicolor/*/apps/firewall-config*.*
%{_datadir}/glib-2.0/schemas/org.fedoraproject.FirewallConfig.gschema.xml
%exclude %{_datadir}/firewalld/firewalld-tmp-mmap
%endif
%exclude %{_datadir}/firewalld/testsuite/*
%files doc
%{_mandir}/man1/firewall*
%{_mandir}/man5/firewall*
%files -n python3-firewall
%defattr(-,root,root)
%{python3_sitelib}/firewall/*
%if %{!?openEuler:1}0
%exclude %{_bindir}/firewall-config
%exclude %{_datadir}/firewalld/*
%exclude %{_datadir}/applications/firewall-config.desktop
%exclude %{_datadir}/metainfo/firewall-config.appdata.xml
%exclude %{_datadir}/icons/hicolor/*/apps/firewall-config*.*
%exclude %{_datadir}/glib-2.0/schemas/org.fedoraproject.FirewallConfig.gschema.xml
%endif
%files -n firewalld-test
%dir %{_datadir}/firewalld/testsuite
%{_datadir}/firewalld/testsuite/README.md
%{_datadir}/firewalld/testsuite/testsuite
%dir %{_datadir}/firewalld/testsuite/integration
%{_datadir}/firewalld/testsuite/integration/testsuite
%dir %{_datadir}/firewalld/testsuite/python
%{_datadir}/firewalld/testsuite/python/firewalld_config.py
%{_datadir}/firewalld/testsuite/python/firewalld_direct.py
%{_datadir}/firewalld/testsuite/python/firewalld_rich.py
%{_datadir}/firewalld/testsuite/python/firewalld_test.py
%changelog
* Wed Aug 28 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.6-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix broken symbolic link after package remove
* Thu Jul 11 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.6-6
- Type:requirement
- ID:NA
- SUG:NA
- DESC:split GUI part from firewalld to firewall-config
* Fri Jul 05 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.6-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix unintentinally exclude file
* Fri Jul 05 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.6-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Firewall startup is to set CleanupModuleOnxit=yes to unload related ko when stopping firewalld service
To reduce unnecessary loading of ebtables-related kernel modules
fix(nm): release NM client after a timeout
* Mon Apr 29 2024 baiguo <baiguo@kylinos.cn> - 1.2.6-3
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update highest port number for ceph
* Sun Apr 28 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.6-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:chore nftables add delete table helper
fix nftables always flush main table on start
* Sat Jan 06 2024 zhanghao <zhanghao383@huawei.com> - 1.2.6-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update to 1.2.6
* Tue Nov 15 2022 luoqing <luoqing@kylinsec.com.cn> - 1.2.1-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:specify the translation encoding format as UTF-8
* Mon Nov 14 2022 yanglu <yanglu72@h-partners.com> - 1.2.1-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update firewalld version to 1.2.1
* Thu Sep 01 2022 xinghe <xinghe2@h-partnres.com> - 1.0.2-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix zone combined forward must not default to True
fix fw icmptype don't alter ipvs in io_object
fix check config use the dictionary variants
fix functions check config fails if direct.xml exists
fix service adding includes
* Thu Jun 30 2022 gaihuiying <eaglegai@163.com> - 1.0.2-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add macros to control if need gtk hicolor-icon-theme, etc.
* Tue Jan 25 2022 yanglu <yanglu72@huawei.com> - 1.0.2-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add-Restart-on-failure-on-firewalld.service
* Sat Dec 11 2021 gaihuiying <gaihuiying1@huawei.com> - 1.0.2-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update to 1.0.2
* Thu Jul 22 2021 gaihuiying <gaihuiying1@huawei.com> - 0.9.4-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update to 0.9.4
* Thu Dec 17 2020 Anakin Zhang <benjamin93@163.com> - 0.8.3-3
- Type:requirement
- ID:NA
- SUG:NA
- DESC:create firewalld temporary file
* Wed Sep 09 2020 gaihuiying <gaihuiying1@huawei.com> - 0.8.3-2
- Type:bugfix
- ID:NA
- SUG:restart
- DESC:remove unuselful patch:patch to default to iptables
add new featuer to fix command error when use with non-existen ipset
* Wed Apr 29 2020 zhouyihang <zhouyihang3@huawei.com> - 0.8.3-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update firewalld version to 0.8.3
* Wed Jan 15 2020 zhangrui <zhangrui182@huawei.com> - 0.6.2-4
- create firewalld.conf file
* Sat Sep 28 2019 huzhiyu <huzhiyu1@huawei.com> - 0.6.2-3
- create firewalld.conf file
* Thu Sep 5 2019 hufeng <solar.hu@huawei.com> - 0.6.2.2
- Create firewalld spec.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/firewalld.git
git@gitee.com:src-openeuler/firewalld.git
src-openeuler
firewalld
firewalld
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385