From e7669f94b50927ed23dd9b42ceedda678ec28280 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Wed, 3 Sep 2025 00:15:46 +0200 Subject: [PATCH] package/firewalld: backport Python 3.13 port The module pipes is no longer part of the Python standard library. It was removed in Python 3.13 after being deprecated in Python 3.11. The last version of Python that provided the pipes module was Python 3.12. Our firewalld 2.0.2 version is now superseded by several releases (up to 2.3.1) that include this patch (since 2.1.0). [1] https://github.com/firewalld/firewalld/releases/tag/v2.3.1 Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/11198422466 (TestFirewalldSysVInit) Signed-off-by: Romain Naour Signed-off-by: Julien Olivain (cherry picked from commit cd0b373314017c4579e319a824e7cda3df5dfe6c) Signed-off-by: Thomas Perale --- ...tions-don-t-use-deprecated-pipes.quo.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/firewalld/0001-improvement-functions-don-t-use-deprecated-pipes.quo.patch diff --git a/package/firewalld/0001-improvement-functions-don-t-use-deprecated-pipes.quo.patch b/package/firewalld/0001-improvement-functions-don-t-use-deprecated-pipes.quo.patch new file mode 100644 index 0000000000..0deacbcca0 --- /dev/null +++ b/package/firewalld/0001-improvement-functions-don-t-use-deprecated-pipes.quo.patch @@ -0,0 +1,42 @@ +From 0bfa4eb3e15d8df8a68a8c3429505905afae112e Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 7 Jul 2023 18:13:10 +0200 +Subject: [PATCH] improvement(functions): don't use deprecated pipes.quote() + +Since Python 3.3, shlex.quote() replaces it. This avoids a deprecation +warning. + +Upstream: f7f5613b76c044c62c876ae87c6b85f5a41acb2a +[Romain: backport to 2.0.2] +Signed-off-by: Romain Naour +--- + src/firewall/functions.py | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/firewall/functions.py b/src/firewall/functions.py +index f7133d71..6213e778 100644 +--- a/src/firewall/functions.py ++++ b/src/firewall/functions.py +@@ -34,7 +34,6 @@ import socket + import os + import os.path + import shlex +-import pipes + import string + import tempfile + from firewall.core.logger import log +@@ -607,10 +606,7 @@ def checkContext(context): + return True + + def joinArgs(args): +- if "quote" in dir(shlex): +- return " ".join(shlex.quote(a) for a in args) +- else: +- return " ".join(pipes.quote(a) for a in args) ++ return " ".join(shlex.quote(a) for a in args) + + def splitArgs(_string): + return shlex.split(_string) +-- +2.51.0 +