232 lines
7.3 KiB
RPMSpec
232 lines
7.3 KiB
RPMSpec
Name: firewalld
|
|
Version: 0.8.3
|
|
Release: 3
|
|
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/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
#backport from gnome
|
|
Patch0: firewalld-0.2.6-MDNS-default.patch
|
|
Patch1: repair-test-cases.patch
|
|
|
|
Patch2: 0001-improvement-port-simplify-queryPort.patch
|
|
Patch3: 0001-improvement-port-allow-coalescing-and-breaking-of-ra.patch
|
|
Patch4: 0001-feat-implement-policy-objects-internally.patch
|
|
Patch5: 0001-fix-build-distribute-new-python-files.patch
|
|
Patch6: 0001-fix-po-add-new-python-files-to-POTFILES.patch
|
|
Patch7: 0001-fix-zone-listing-rich-rules-in-default-zone.patch
|
|
Patch8: 0001-fix-policy-ipXtables-calculate-max-name-len-properly.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 ebtables ipset systemd hicolor-icon-theme python3-gobject NetworkManager-libnm dbus-x11 gtk3
|
|
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
|
|
|
|
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} firewall-config = %{version}-%{release}
|
|
Obsoletes: firewalld-filesystem < %{version}-%{release} firewall-config < %{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-slip-dbus python3-decorator python3-gobject-base python3-nftables
|
|
|
|
%description -n python3-firewall
|
|
Python3 bindings for firewalld.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
./autogen.sh
|
|
|
|
|
|
|
|
%build
|
|
%configure --enable-sysconfig --enable-rpmmacros PYTHON=%{__python3}
|
|
|
|
%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
|
|
|
|
%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
|
|
|
|
|
|
%files -f %{name}.lang
|
|
%doc COPYING README
|
|
%{_sbindir}/firewalld
|
|
%{_bindir}/firewall-config
|
|
%{_bindir}/firewall-cmd
|
|
%{_bindir}/firewall-offline-cmd
|
|
%{_datadir}/bash-completion/completions/firewall-cmd
|
|
%{_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/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
|
|
%{_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*
|
|
|
|
%defattr(0644,root,root)
|
|
%attr (0700,root,root) %{_datadir}/firewalld/firewalld-tmp-mmap
|
|
%{_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
|
|
|
|
%files doc
|
|
%{_mandir}/man1/firewall*
|
|
%{_mandir}/man5/firewall*
|
|
|
|
|
|
%files -n python3-firewall
|
|
%defattr(-,root,root)
|
|
%{python3_sitelib}/firewall/*
|
|
|
|
|
|
|
|
%changelog
|
|
* 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.
|