9e4319
Summary: A firewall daemon with D-Bus interface providing a dynamic firewall
9e4319
Name: firewalld
5e31d5
Version: 1.2.1
5e31d5
Release: 1%{?dist}
9e4319
URL:     http://www.firewalld.org
9e4319
License: GPLv2+
9e4319
Source0: https://github.com/firewalld/firewalld/releases/download/v%{version}/firewalld-%{version}.tar.gz
9e4319
Patch1: 0001-RHEL-only-Add-cockpit-by-default-to-some-zones.patch
9e4319
BuildArch: noarch
9e4319
BuildRequires: autoconf
9e4319
BuildRequires: automake
9e4319
BuildRequires: desktop-file-utils
9e4319
BuildRequires: gettext
9e4319
BuildRequires: intltool
9e4319
# glib2-devel is needed for gsettings.m4
9e4319
BuildRequires: glib2, glib2-devel
9e4319
BuildRequires: systemd-units
9e4319
BuildRequires: docbook-style-xsl
9e4319
BuildRequires: libxslt
9e4319
BuildRequires: iptables, ebtables, ipset
9e4319
BuildRequires: python3-devel
9e4319
BuildRequires: make
9e4319
Requires: iptables, ebtables, ipset
9e4319
Requires(post): systemd
9e4319
Requires(preun): systemd
9e4319
Requires(postun): systemd
9e4319
Requires: firewalld-filesystem = %{version}-%{release}
9e4319
Requires: python3-firewall  = %{version}-%{release}
9e4319
Obsoletes: firewalld-selinux < 0.4.4.2-2
9e4319
Conflicts: selinux-policy < 3.14.1-28
9e4319
Conflicts: cockpit-ws < 173-2
9e4319
Recommends: libcap-ng-python3
9e4319
9e4319
%description
9e4319
firewalld is a firewall service daemon that provides a dynamic customizable 
9e4319
firewall with a D-Bus interface.
9e4319
9e4319
%package -n python3-firewall
9e4319
Summary: Python3 bindings for firewalld
9e4319
9e4319
%{?python_provide:%python_provide python3-firewall}
9e4319
9e4319
Requires: python3-dbus
9e4319
Requires: python3-gobject-base
9e4319
Requires: python3-nftables
9e4319
9e4319
%description -n python3-firewall
9e4319
Python3 bindings for firewalld.
9e4319
9e4319
%package -n firewalld-filesystem
9e4319
Summary: Firewalld directory layout and rpm macros
9e4319
9e4319
%description -n firewalld-filesystem
9e4319
This package provides directories and rpm macros which
9e4319
are required by other packages that add firewalld configuration files.
9e4319
9e4319
%package -n firewall-applet
9e4319
Summary: Firewall panel applet
9e4319
Requires: %{name} = %{version}-%{release}
9e4319
Requires: firewall-config = %{version}-%{release}
9e4319
Requires: hicolor-icon-theme
9e4319
Requires: python3-qt5-base
9e4319
Requires: python3-gobject
9e4319
Requires: libnotify
9e4319
Requires: NetworkManager-libnm
9e4319
Requires: dbus-x11
9e4319
9e4319
%description -n firewall-applet
9e4319
The firewall panel applet provides a status information of firewalld and also 
9e4319
the firewall settings.
9e4319
9e4319
%package -n firewall-config
9e4319
Summary: Firewall configuration application
9e4319
Requires: %{name} = %{version}-%{release}
9e4319
Requires: hicolor-icon-theme
9e4319
Requires: gtk3
9e4319
Requires: python3-gobject
9e4319
Requires: NetworkManager-libnm
9e4319
Requires: dbus-x11
9e4319
Recommends: polkit
9e4319
9e4319
%description -n firewall-config
9e4319
The firewall configuration application provides an configuration interface for 
9e4319
firewalld.
9e4319
9e4319
%pretrans -p <lua>
9e4319
-- HACK: Old rpm versions had an untracked (%ghost) symlink for
9e4319
-- /etc/firewalld/firewalld.conf. RPM won't handle replacing the symlink due to
9e4319
-- "%config(noreplace)". As such, we remove the symlink here before attempting
9e4319
-- to install the new version which is a real file. Only replace the symlink if
9e4319
-- the target matches one of the previous package's expected targets.
9e4319
--
9e4319
-- Unfortunately this must be done in pretrans in order to occur before RPM
9e4319
-- makes decisions about file replacement.
9e4319
--
9e4319
local old_package_symlinks = {"firewalld-standard.conf", "firewalld-server.conf",
9e4319
                              "firewalld-workstation.conf"}
9e4319
9e4319
local symlink_target = posix.readlink("%{_sysconfdir}/firewalld/firewalld.conf")
9e4319
for k,v in ipairs(old_package_symlinks) do
9e4319
  if symlink_target == v then
9e4319
    posix.unlink("%{_sysconfdir}/firewalld/firewalld.conf")
9e4319
    break
9e4319
  end
9e4319
end
9e4319
9e4319
%prep
9e4319
%autosetup -p1
9e4319
9e4319
%build
9e4319
%configure --enable-sysconfig --enable-rpmmacros PYTHON="%{__python3} %{py3_shbang_opts}"
9e4319
make %{?_smp_mflags}
9e4319
9e4319
%install
9e4319
make install DESTDIR=%{buildroot}
9e4319
desktop-file-install --delete-original \
9e4319
  --dir %{buildroot}%{_sysconfdir}/xdg/autostart \
9e4319
  %{buildroot}%{_sysconfdir}/xdg/autostart/firewall-applet.desktop
9e4319
desktop-file-install --delete-original \
9e4319
  --dir %{buildroot}%{_datadir}/applications \
9e4319
  %{buildroot}%{_datadir}/applications/firewall-config.desktop
9e4319
9e4319
install -d -m 755 %{buildroot}%{_prefix}/lib/firewalld/zones/
9e4319
9e4319
# remove unhandle firewalld-test subpackage
9e4319
rm -rf %{buildroot}%{_datadir}/firewalld/testsuite
9e4319
9e4319
%find_lang %{name} --all-name
9e4319
9e4319
%post
9e4319
%systemd_post firewalld.service
9e4319
9e4319
%preun
9e4319
%systemd_preun firewalld.service
9e4319
9e4319
%postun
9e4319
%systemd_postun_with_restart firewalld.service 
9e4319
9e4319
%files -f %{name}.lang
5e31d5
%doc COPYING README.md
9e4319
%{_sbindir}/firewalld
9e4319
%{_bindir}/firewall-cmd
9e4319
%{_bindir}/firewall-offline-cmd
9e4319
%dir %{_datadir}/bash-completion/completions
9e4319
%{_datadir}/bash-completion/completions/firewall-cmd
9e4319
%dir %{_datadir}/zsh/site-functions
9e4319
%{_datadir}/zsh/site-functions/_firewalld
9e4319
%{_prefix}/lib/firewalld/icmptypes/*.xml
5e31d5
%{_prefix}/lib/firewalld/ipsets/README.md
9e4319
%{_prefix}/lib/firewalld/policies/*.xml
9e4319
%{_prefix}/lib/firewalld/services/*.xml
9e4319
%{_prefix}/lib/firewalld/zones/*.xml
9e4319
%{_prefix}/lib/firewalld/helpers/*.xml
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld
9e4319
%config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf
9e4319
%config(noreplace) %{_sysconfdir}/firewalld/lockdown-whitelist.xml
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/helpers
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/icmptypes
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/ipsets
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/policies
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/services
9e4319
%attr(0750,root,root) %dir %{_sysconfdir}/firewalld/zones
9e4319
%defattr(0644,root,root)
9e4319
%config(noreplace) %{_sysconfdir}/sysconfig/firewalld
9e4319
%{_unitdir}/firewalld.service
9e4319
%config(noreplace) %{_datadir}/dbus-1/system.d/FirewallD.conf
9e4319
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.desktop.policy.choice
9e4319
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.server.policy.choice
9e4319
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy
9e4319
%{_mandir}/man1/firewall*cmd*.1*
9e4319
%{_mandir}/man1/firewalld*.1*
9e4319
%{_mandir}/man5/firewall*.5*
9e4319
%{_sysconfdir}/modprobe.d/firewalld-sysctls.conf
9e4319
%{_sysconfdir}/logrotate.d/firewalld
9e4319
9e4319
%files -n python3-firewall
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/__pycache__
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/config
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/config/__pycache__
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/core
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/core/__pycache__
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/core/io
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/core/io/__pycache__
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/server
9e4319
%attr(0755,root,root) %dir %{python3_sitelib}/firewall/server/__pycache__
9e4319
%{python3_sitelib}/firewall/__pycache__/*.py*
9e4319
%{python3_sitelib}/firewall/*.py*
9e4319
%{python3_sitelib}/firewall/config/*.py*
9e4319
%{python3_sitelib}/firewall/config/__pycache__/*.py*
9e4319
%{python3_sitelib}/firewall/core/*.py*
9e4319
%{python3_sitelib}/firewall/core/__pycache__/*.py*
9e4319
%{python3_sitelib}/firewall/core/io/*.py*
9e4319
%{python3_sitelib}/firewall/core/io/__pycache__/*.py*
9e4319
%{python3_sitelib}/firewall/server/*.py*
9e4319
%{python3_sitelib}/firewall/server/__pycache__/*.py*
9e4319
9e4319
%files -n firewalld-filesystem
9e4319
%dir %{_prefix}/lib/firewalld
9e4319
%dir %{_prefix}/lib/firewalld/helpers
9e4319
%dir %{_prefix}/lib/firewalld/icmptypes
9e4319
%dir %{_prefix}/lib/firewalld/ipsets
9e4319
%dir %{_prefix}/lib/firewalld/policies
9e4319
%dir %{_prefix}/lib/firewalld/services
9e4319
%dir %{_prefix}/lib/firewalld/zones
9e4319
%{_rpmconfigdir}/macros.d/macros.firewalld
9e4319
9e4319
%files -n firewall-applet
9e4319
%{_bindir}/firewall-applet
9e4319
%defattr(0644,root,root)
9e4319
%{_sysconfdir}/xdg/autostart/firewall-applet.desktop
9e4319
%dir %{_sysconfdir}/firewall
9e4319
%{_sysconfdir}/firewall/applet.conf
9e4319
%{_datadir}/icons/hicolor/*/apps/firewall-applet*.*
9e4319
%{_mandir}/man1/firewall-applet*.1*
9e4319
9e4319
%files -n firewall-config
9e4319
%{_bindir}/firewall-config
9e4319
%defattr(0644,root,root)
9e4319
%{_datadir}/firewalld/firewall-config.glade
9e4319
%{_datadir}/firewalld/gtk3_chooserbutton.py*
9e4319
%{_datadir}/firewalld/gtk3_niceexpander.py*
9e4319
%{_datadir}/applications/firewall-config.desktop
9e4319
%{_datadir}/metainfo/firewall-config.appdata.xml
9e4319
%{_datadir}/icons/hicolor/*/apps/firewall-config*.*
9e4319
%{_datadir}/glib-2.0/schemas/org.fedoraproject.FirewallConfig.gschema.xml
9e4319
%{_mandir}/man1/firewall-config*.1*
9e4319
9e4319
%changelog
5e31d5
* Mon Nov 07 2022 Eric Garver <egarver@redhat.com> - 1.2.1-1
5e31d5
- package rebase to v1.2.1
5e31d5
cbc1fa
* Wed Aug 03 2022 Eric Garver <egarver@redhat.com> - 1.1.1-3
cbc1fa
- fix(runtimeToPermanent): errors for interfaces not in zone
cbc1fa
cbc1fa
* Fri Jul 15 2022 Eric Garver <egarver@redhat.com> - 1.1.1-2
cbc1fa
- test(functions): normalize iptables ipv6-icmp/icmpv6
cbc1fa
cbc1fa
* Mon May 16 2022 Eric Garver <egarver@redhat.com> - 1.1.1-1
cbc1fa
- package rebase to v1.1.1
cbc1fa
d06f9c
* Mon Nov 22 2021 Eric Garver <egarver@redhat.com> - 1.0.0-4
d06f9c
- fix(firewalld): check capng_apply() return code
d06f9c
d06f9c
* Mon Nov 22 2021 Eric Garver <egarver@redhat.com> - 1.0.0-3
d06f9c
- fix(firewalld): keep linux capability CAP_SYS_MODULE
d06f9c
9e4319
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.0-2
9e4319
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
9e4319
  Related: rhbz#1991688
9e4319
9e4319
* Mon Jul 26 2021 Eric Garver <egarver@redhat.com> - 1.0.0-1
9e4319
- package rebase to v1.0.0
9e4319
9e4319
* Mon Jun 07 2021 Eric Garver <egarver@redhat.com> - 1.0.0-0.3.alpha
9e4319
- remove dead symlink (firewalld.conf) left over from old package versions
9e4319
  before installing new file
9e4319
9e4319
* Tue Jun 01 2021 Eric Garver <egarver@redhat.com> - 1.0.0-0.2.alpha
9e4319
- fix missing policy kit symlink
9e4319
9e4319
* Tue May 25 2021 Eric Garver <egarver@redhat.com> - 1.0.0-0.1.alpha
9e4319
- package rebase to v1.0.0-alpha