Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package hplip for openSUSE:Factory checked 
in at 2025-02-03 21:40:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hplip (Old)
 and      /work/SRC/openSUSE:Factory/.hplip.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hplip"

Mon Feb  3 21:40:38 2025 rev:158 rq:1241606 version:3.24.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/hplip/hplip.changes      2025-01-16 
18:31:20.819053954 +0100
+++ /work/SRC/openSUSE:Factory/.hplip.new.2316/hplip.changes    2025-02-03 
21:40:43.711563163 +0100
@@ -1,0 +2,12 @@
+Thu Jan 23 11:52:26 UTC 2025 - Martin Wilck <[email protected]>
+
+- Fix error in ConfigBase handling (bsc#1209401)
+  - add hplip-base-fix-error-in-ConfigBase-handling.patch
+
+-------------------------------------------------------------------
+Wed Jan 22 16:52:17 UTC 2025 - Martin Wilck <[email protected]>
+
+- Fix python error on SLE12-SP3 (bsc#1209401, bsc#1234745)
+  - add hplip-base-replace-f-string-with-string.format-for-p.patch
+
+-------------------------------------------------------------------
@@ -6 +18 @@
-  (bsc#1234745, CVE-2020-6923)
+  (bsc#1234745, CVE-2020-6923, jsc#PED-11978)

New:
----
  hplip-base-fix-error-in-ConfigBase-handling.patch
  hplip-base-replace-f-string-with-string.format-for-p.patch

BETA DEBUG BEGIN:
  New:- Fix error in ConfigBase handling (bsc#1209401)
  - add hplip-base-fix-error-in-ConfigBase-handling.patch
  New:- Fix python error on SLE12-SP3 (bsc#1209401, bsc#1234745)
  - add hplip-base-replace-f-string-with-string.format-for-p.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hplip.spec ++++++
--- /var/tmp/diff_new_pack.yCMEGS/_old  2025-02-03 21:40:44.955614726 +0100
+++ /var/tmp/diff_new_pack.yCMEGS/_new  2025-02-03 21:40:44.955614726 +0100
@@ -115,6 +115,9 @@
 Patch603:       hplip-scan-orblite-c99.patch
 Patch604:       hplip-sclpml-strcasestr.patch
 Patch605:       hplip-hpaio-gcc14.patch
+Patch606:       hplip-base-fix-error-in-ConfigBase-handling.patch
+# Compatibility patches for old SUSE releases
+Patch700:       hplip-base-replace-f-string-with-string.format-for-p.patch
 
 %if %use_qt5
 BuildRequires:  %{pymod qt5-devel}
@@ -378,6 +381,12 @@
 %patch -P 603 -p1
 %patch -P 604 -p1
 %patch -P 605 -p1
+%patch -P 606 -p1
+%if 0%{?suse_version} < 1500
+# python2 compatibility
+%patch -P 700 -p1
+%endif
+
 # replace "env" shebang and "/usr/bin/python" with real executable
 find . -name '*.py' -o -name pstotiff | \
     xargs -n 1 sed -i '1s,^#!\(%{_bindir}/env 
python\|%{_bindir}/python\),#!%{pyexe},'





++++++ hplip-base-fix-error-in-ConfigBase-handling.patch ++++++
>From 2a13a15b7f533606667e8586ff5ed736f038f2e8 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Thu, 23 Jan 2025 12:47:43 +0100
Subject: [PATCH 1/2] hplip/base: fix error in ConfigBase handling

The code in question was apparently meant to handle the replacement
of ConfigParser.readfp() by ConfigParser.read_file(). But the code
is obviously broken, trying read_file() first and then read_file()
again.
---
 base/g.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/g.py b/base/g.py
index 0d1c986..c1f5d24 100644
--- a/base/g.py
+++ b/base/g.py
@@ -128,7 +128,7 @@ class ConfigBase(object):
             try:
                 fp = open(self.filename, "r")
                 try:
-                    self.conf.read_file(fp)
+                    self.conf.readfp(fp)
                 except AttributeError as e:
                     log.error(f"Error: {e}. Retrying with read_file")
                     try:
-- 
2.48.1


++++++ hplip-base-replace-f-string-with-string.format-for-p.patch ++++++
>From f1fef1ed07951fbc6e81d90ab43172974979eeeb Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Wed, 22 Jan 2025 17:44:04 +0100
Subject: [PATCH 2/2] hplip/base: replace f-string with string.format for
 python2 compatibility

---
 base/g.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/base/g.py b/base/g.py
index c1f5d24..a3b6191 100644
--- a/base/g.py
+++ b/base/g.py
@@ -130,12 +130,12 @@ class ConfigBase(object):
                 try:
                     self.conf.readfp(fp)
                 except AttributeError as e:
-                    log.error(f"Error: {e}. Retrying with read_file")
+                    log.error("Error: {0}. Retrying with read_file".format(e))
                     try:
                         # Attempting to use read_file as a fallback
                         self.conf.read_file(fp)
                     except Exception as e:
-                        log.error(f"Reading file with read_file also failed. 
Error: {e}")
+                        log.error("Reading file with read_file also failed. 
Error: {0}".format(e))
                 except configparser.MissingSectionHeaderError:
                     print("")
                     log.error("Found No Section in %s. Please set the http 
proxy for root and try again." % self.filename)
-- 
2.48.1

Reply via email to