app-admin/cobbler: update patches

This commit is contained in:
Alexander Miroshnichenko 2021-06-30 20:46:30 +03:00
parent a64547ff92
commit 3da8a45cc5
No known key found for this signature in database
GPG Key ID: E93720C6C73A77F4
3 changed files with 69 additions and 0 deletions

View File

@ -23,6 +23,7 @@ BDEPEND="dev-python/sphinx"
RDEPEND="${PYTHON_DEPS}
dev-python/future
dev-python/coverage
dev-python/dnspython
dev-python/netaddr
dev-python/distro
dev-python/django
@ -39,6 +40,8 @@ PATCHES=(
"${FILESDIR}/utils.patch"
"${FILESDIR}/tftpgen.patch"
"${FILESDIR}/0001-Disable-cache-2387.patch"
"${FILESDIR}/0002-cgi.parse_qs-is-deprecated.patch"
"${FILESDIR}/0003-Remove-import-cgi.patch"
)
src_prepare() {

View File

@ -0,0 +1,34 @@
From 5170d70f77a32d3b4f2196fe5ed47e8d669c98c2 Mon Sep 17 00:00:00 2001
From: tpw56j <68420914+tpw56j@users.noreply.github.com>
Date: Sat, 18 Jul 2020 11:15:52 +0300
Subject: [PATCH] cgi.parse_qs is deprecated
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
From https://docs.python.org/3.2/library/cgi.html:
cgi.parse_qs(qs, keep_blank_values=False, strict_parsing=False)
This function is deprecated in this module. Use urllib.parse.parse_qs() instead. It is maintained here only for backward compatibility.
urllib.parse.parse_qs also works in the python-2.7 (cobbler-2.8.5)
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
svc/services.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/svc/services.py b/svc/services.py
index 7001e0258e22..fa4be4aac4e9 100644
--- a/svc/services.py
+++ b/svc/services.py
@@ -63,7 +63,7 @@ def application(environ, start_response):
form[field] = t
label = not label
- form["query_string"] = cgi.parse_qs(environ['QUERY_STRING'])
+ form["query_string"] = urllib.parse.parse_qs(environ['QUERY_STRING'])
# This MAC header is set by anaconda during a kickstart booted with the
# kssendmac kernel option. The field will appear here as something
--
2.26.2

View File

@ -0,0 +1,32 @@
From aa759646b540e7d5e4364f771782f604a88171fd Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.com>
Date: Fri, 19 Feb 2021 22:56:01 +0100
Subject: [PATCH] Remove import cgi
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
commit 5170d70f77a32d3b4f2196fe5ed47e8d669c98c2
cgi.parse_qs is deprecated
removed the last cgi module user:
svc/services.py:31:1: F401 'cgi' imported but unused
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
svc/services.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/svc/services.py b/svc/services.py
index 047eccc161ab..dcfbac119e4a 100644
--- a/svc/services.py
+++ b/svc/services.py
@@ -28,7 +28,6 @@ import urllib.request
import urllib.parse
import urllib.error
import xmlrpc.server
-import cgi
from cobbler import settings
--
2.26.2