diff --git a/firewalld-1.0.1.tar.gz b/firewalld-1.0.1.tar.gz deleted file mode 100644 index c3e3e0ea62653543cba0ea2549bed9aa662c31ca..0000000000000000000000000000000000000000 Binary files a/firewalld-1.0.1.tar.gz and /dev/null differ diff --git a/firewalld-1.2.1.tar.gz b/firewalld-1.2.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0dae9a14e2e088aeffad0b0eef466a3295800715 Binary files /dev/null and b/firewalld-1.2.1.tar.gz differ diff --git a/firewalld.spec b/firewalld.spec index 93e8ffd5b1198c2b88626d50ba9b49e7a7e75c41..4b7a0358b9c1dbeb769b7c8ecd582c39bed4055d 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -1,7 +1,7 @@ %define anolis_release 1 Name: firewalld -Version: 1.0.1 +Version: 1.2.1 Release: %{anolis_release}%{?dist} Summary: A firewall daemon with D-Bus interface providing a dynamic firewall @@ -23,25 +23,15 @@ BuildRequires: docbook-style-xsl BuildRequires: libxslt BuildRequires: iptables, ebtables, ipset BuildRequires: python3-devel -BuildRequires: make Requires: iptables, ebtables, ipset -Suggests: iptables-nft Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires: firewalld-filesystem = %{version}-%{release} -Requires: python3-firewall = %{version}-%{release} -Obsoletes: firewalld-selinux < 0.4.4.2-2 -Conflicts: selinux-policy < 3.14.1-28 -Conflicts: cockpit-ws < 173-2 +Requires: python3-firewall = %{version}-%{release} Recommends: libcap-ng-python3 -Provides: variant_config(Server) - -# Remove old config subpackages -Obsoletes: firewalld-config-server <= 0.3.15 - %description firewalld is a firewall service daemon that provides a dynamic customizable firewall with a D-Bus interface. @@ -49,13 +39,9 @@ firewall with a D-Bus interface. %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 -Requires: python3-gobject-base Requires: python3-nftables +Requires: python3-gobject-base %description -n python3-firewall Python3 bindings for firewalld. @@ -78,7 +64,7 @@ Summary: Firewall panel applet Requires: %{name} = %{version}-%{release} Requires: firewall-config = %{version}-%{release} Requires: hicolor-icon-theme -Requires: python3-qt5-base +Requires: python3-qt5 Requires: python3-gobject Requires: libnotify Requires: NetworkManager-libnm @@ -103,10 +89,11 @@ The firewall configuration application provides an configuration interface for firewalld. %prep -%autosetup -p1 +%autosetup +./autogen.sh %build -%configure --enable-sysconfig --enable-rpmmacros PYTHON="%{__python3} %{py3_shbang_opts}" +%configure --enable-sysconfig --enable-rpmmacros PYTHON=%{__python3} # Enable the make line if there are patches affecting man pages to # regenerate them make %{?_smp_mflags} @@ -120,21 +107,6 @@ desktop-file-install --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/firewall-config.desktop -install -d -m 755 %{buildroot}%{_prefix}/lib/firewalld/zones/ - -# standard firewalld.conf -mv %{buildroot}%{_sysconfdir}/firewalld/firewalld.conf \ - %{buildroot}%{_sysconfdir}/firewalld/firewalld-standard.conf - -# server firewalld.conf -cp -a %{buildroot}%{_sysconfdir}/firewalld/firewalld-standard.conf \ - %{buildroot}%{_sysconfdir}/firewalld/firewalld-server.conf - -rm -f %{buildroot}%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy - -# remove file mistakenly added to upstream dist tarball -rm -f %{buildroot}%{_datadir}/man/man1/firewallctl.1 - %find_lang %{name} --all-name %post @@ -144,39 +116,39 @@ rm -f %{buildroot}%{_datadir}/man/man1/firewallctl.1 %systemd_preun 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 | silverblue | kde | kinoite) - ln -sf firewalld-workstation.conf %{_sysconfdir}/firewalld/firewalld.conf || : - ;; - *) - ln -sf firewalld-standard.conf %{_sysconfdir}/firewalld/firewalld.conf - ;; - esac +%systemd_postun_with_restart firewalld.service + +%post -n firewall-applet +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun -n firewall-applet +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : fi -if [ ! -e %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy ]; then - # 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 || : - # no extra rules choice here (yet) - rm -f %{_datadir}/polkit-1/rules.d/org.fedoraproject.FirewallD1.rules || : +%posttrans -n firewall-applet +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + + +%post -n firewall-config +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun -n firewall-config +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : fi +%posttrans -n firewall-config +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + %files -f %{name}.lang -%doc COPYING README +%doc COPYING README.md CODE_OF_CONDUCT.md %{_sbindir}/firewalld %{_bindir}/firewall-cmd %{_bindir}/firewall-offline-cmd @@ -184,17 +156,14 @@ fi %{_datadir}/bash-completion/completions/firewall-cmd %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_firewalld -%ghost %config(missingok,noreplace) %{_datadir}/polkit-1/rules.d/org.fedoraproject.FirewallD1.rules %{_prefix}/lib/firewalld/icmptypes/*.xml -%{_prefix}/lib/firewalld/ipsets/README +%{_prefix}/lib/firewalld/ipsets/README.md %{_prefix}/lib/firewalld/policies/*.xml %{_prefix}/lib/firewalld/services/*.xml %{_prefix}/lib/firewalld/zones/*.xml %{_prefix}/lib/firewalld/helpers/*.xml %attr(0750,root,root) %dir %{_sysconfdir}/firewalld -%ghost %config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf -%config(noreplace) %{_sysconfdir}/firewalld/firewalld-standard.conf -%config(noreplace) %{_sysconfdir}/firewalld/firewalld-server.conf +%config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf %config(noreplace) %{_sysconfdir}/firewalld/lockdown-whitelist.xml %attr(0750,root,root) %dir %{_sysconfdir}/firewalld/helpers %attr(0750,root,root) %dir %{_sysconfdir}/firewalld/icmptypes @@ -208,7 +177,7 @@ fi %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 +%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy %{_mandir}/man1/firewall*cmd*.1* %{_mandir}/man1/firewalld*.1* %{_mandir}/man5/firewall*.5* @@ -249,7 +218,7 @@ fi %files -n firewalld-test %dir %{_datadir}/firewalld/testsuite -%{_datadir}/firewalld/testsuite/README +%{_datadir}/firewalld/testsuite/README.md %{_datadir}/firewalld/testsuite/testsuite %dir %{_datadir}/firewalld/testsuite/integration %{_datadir}/firewalld/testsuite/integration/testsuite @@ -260,10 +229,10 @@ fi %{_datadir}/firewalld/testsuite/python/firewalld_test.py %files -n firewall-applet +%attr(0755,root,root) %dir %{_sysconfdir}/firewall %{_bindir}/firewall-applet %defattr(0644,root,root) %config(noreplace) %{_sysconfdir}/xdg/autostart/firewall-applet.desktop -%dir %{_sysconfdir}/firewall %config(noreplace) %{_sysconfdir}/firewall/applet.conf %{_datadir}/icons/hicolor/*/apps/firewall-applet*.* %{_mandir}/man1/firewall-applet*.1* @@ -281,5 +250,8 @@ fi %{_mandir}/man1/firewall-config*.1* %changelog +* Wed Oct 26 2022 Guyu Wang - 1.2.1-1 +- Init 1.2.1 for Anolis OS 23 + * Sat Mar 12 2022 Peng Zhou - 1.0.1-1 - Init for Anolis OS 23