commit:     2ee17b4a82ccad13f49f3dcdde94740e53564b3f
Author:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 28 08:58:04 2024 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 04:10:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ee17b4a

net-firewall/firewalld: improved systemd service

removed environment variable reference from ExecStart

Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35562
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 .../firewalld/files/firewalld-systemd-service.patch   | 19 +++++++++++++++++++
 ...alld-2.1.1-r1.ebuild => firewalld-2.1.1-r2.ebuild} | 11 ++++-------
 2 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/net-firewall/firewalld/files/firewalld-systemd-service.patch 
b/net-firewall/firewalld/files/firewalld-systemd-service.patch
new file mode 100644
index 000000000000..66f4c730b66f
--- /dev/null
+++ b/net-firewall/firewalld/files/firewalld-systemd-service.patch
@@ -0,0 +1,19 @@
+Drops the/an obsolete 'conflicts' line with old iptables services bug #833506
+Removes EnvironmentFile and FIREWALLD_ARGS variable
+===================================================================
+--- a/config/firewalld.service.in
++++ b/config/firewalld.service.in
+@@ -4,12 +4,10 @@
+ Wants=network-pre.target
+ After=dbus.service
+ After=polkit.service
+-Conflicts=iptables.service ip6tables.service ebtables.service ipset.service 
nftables.service
+ Documentation=man:firewalld(1)
+
+ [Service]
+-EnvironmentFile=-/etc/sysconfig/firewalld
+-ExecStart=@sbindir@/firewalld --nofork --nopid $FIREWALLD_ARGS
++ExecStart=@sbindir@/firewalld --nofork --nopid
+ ExecReload=/bin/kill -HUP $MAINPID
+ # supress to log debug and error output also to /var/log/messages
+ StandardOutput=null

diff --git a/net-firewall/firewalld/firewalld-2.1.1-r1.ebuild 
b/net-firewall/firewalld/firewalld-2.1.1-r2.ebuild
similarity index 94%
rename from net-firewall/firewalld/firewalld-2.1.1-r1.ebuild
rename to net-firewall/firewalld/firewalld-2.1.1-r2.ebuild
index aac81d88bbee..fbe62a47db37 100644
--- a/net-firewall/firewalld/firewalld-2.1.1-r1.ebuild
+++ b/net-firewall/firewalld/firewalld-2.1.1-r2.ebuild
@@ -55,6 +55,10 @@ QA_AM_MAINTAINER_MODE=".*--run autom4te 
--language=autotest.*"
 
 PLOCALES="ar as ast bg bn_IN ca cs da de el en_GB en_US es et eu fa fi fr gl 
gu hi hr hu ia id it ja ka kn ko lt ml mr nl or pa pl pt pt_BR ro ru si sk sl 
sq sr sr@latin sv ta te tr uk zh_CN zh_TW"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-systemd-service.patch
+)
+
 pkg_setup() {
        # See bug #830132 for the huge list
        # We can probably narrow it down a bit but it's rather fragile
@@ -165,13 +169,6 @@ src_prepare() {
 
        plocale_find_changes "po" "" ".po" || die
        plocale_get_locales | sed -e 's/ /\n/g' > po/LINGUAS
-
-       # Our version drops the/an obsolete 'conflicts' line with old iptables 
services
-       # bug #833506
-       sed -i \
-       -e "/Conflicts=iptables.service ip6tables.service ebtables.service 
ipset.service nftables.service/d" \
-       -e "/EnvironmentFile=-\/etc\/sysconfig\/firewalld/d" \
-       config/firewalld.service.in || die
 }
 
 src_configure() {

Reply via email to