firewalld/firewalld.spec

222 lines
7.1 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:38:52 -04:00
Name: firewalld
Version: 0.6.2
2020-01-15 09:21:26 +08:00
Release: 4
2019-09-30 10:38:52 -04:00
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
#backport from Eric Garver <e@erig.me>
Patch1: 0001-fedora-patch-to-default-to-iptables-backend.patch
#Patch2,3 backport from upstream
Patch2: 0001-fw_transaction-On-clear-zone-transaction-must-clear-.patch
Patch3: 0001-Fix-translating-labels-392.patch
Patch6000: firewall-core-io-.py-Let-SAX-handle-the-encoding-of-.patch
Patch6001: nftables-fix-destination-checks-not-allowing-masks.patch
Patch6002: firewalld-fix-runtime-to-permanent-if-NM-not-in-use.patch
Patch6003: nftables-fix-reject-statement-in-block-zone.patch
Patch6004: ipXtables-nftables-Fix-object-has-no-attribute-_log_.patch
Patch6005: rich-rules-fix-mark-action.patch
Patch6006: nftables-fix-panic-mode-not-filtering-output-packets.patch
Patch6007: fw_zone-fix-rich-rule-masquerading.patch
Patch6008: fw_zone-fix-IPv6-rich-rule-forward-port-without-toad.patch
Patch6009: nftables-fix-rich-rule-masquerade.patch
Patch6010: nftables-fix-ipv6-rich-rule-forward-ports.patch
Patch6011: ipset-fix-set-apply-if-IndividualCalls-yes.patch
Patch6012: fix-issue-457.patch
Patch9000: repair-test-cases.patch
BuildArch: noarch
BuildRequires: autoconf automake desktop-file-utils gettext intltool glib2 glib2-devel systemd-units docbook-style-xsl
BuildRequires: libxslt iptables ebtables ipset nftables python3-devel
Requires: iptables ebtables ipset systemd hicolor-icon-theme python3-gobject NetworkManager-libnm dbus-x11 gtk3
Requires: nftables >= 0.9.0 kernel >= 4.18.0 python3-firewall = %{version}-%{release}
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}
2020-01-15 09:21:26 +08:00
Obsoletes: python-firewall < 0.5.2-2
Obsoletes: python2-firewall < 0.5.2-2
2019-09-30 10:38:52 -04:00
Requires: python3-dbus python3-slip-dbus python3-decorator python3-gobject-base
%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
%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
%{_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) %{_sysconfdir}/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
%{_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)
%{_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
2020-01-15 09:21:26 +08:00
* Wed Jan 15 2020 zhangrui <zhangrui182@huawei.com> - 0.6.2-4
- create firewalld.conf file
2019-09-30 10:38:52 -04:00
* Sat Sep 28 2019 huzhiyu <huzhiyu1@huawei.com> - 0.6.2-3
2020-01-15 09:21:26 +08:00
- create firewalld.conf file
2019-09-30 10:38:52 -04:00
* Thu Sep 5 2019 hufeng <solar.hu@huawei.com> - 0.6.2.2
2020-01-15 09:21:26 +08:00
- Create firewalld spec.