diff --git a/0009-Fix-compatibility-with-python3-in-putFile-method.patch b/0009-Fix-compatibility-with-python3-in-putFile-method.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6e261a9765006dd2d8c4c86a579d2561f041901 --- /dev/null +++ b/0009-Fix-compatibility-with-python3-in-putFile-method.patch @@ -0,0 +1,30 @@ +From 9fb1f6a731dab0c39ba138d29f310622d4f32d4d Mon Sep 17 00:00:00 2001 +From: Tomas Korbar +Date: Mon, 14 Jan 2019 16:09:25 +0100 +Subject: [PATCH] Fix compatibility with python3 in putFile method + +in python3 os.read returns byte object not a string which caused +writing loop to be endless + +by adding b'' comparison we hold compatibility both with python2 +and python3 +--- + cupspk.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cupspk.py b/cupspk.py +index 5b863b43..b7cbc0b3 100644 +--- a/cupspk.py ++++ b/cupspk.py +@@ -448,7 +448,7 @@ class Connection: + if fd is not None: + os.lseek (fd, 0, os.SEEK_SET) + buf = os.read (fd, 512) +- while buf != '': ++ while buf != '' and buf != b'': + os.write (tmpfd, buf) + buf = os.read (fd, 512) + else: +-- +2.33.0 + diff --git a/system-config-printer.spec b/system-config-printer.spec index a67f50aa132c2838cba7df389051bbd0df818301..9c3108636d0fadeaa8b219560f75b53a4c26f126 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -3,7 +3,7 @@ Name: system-config-printer Summary: a graphical tool for CUPS administration Version: 1.5.11 -Release: 22 +Release: 23 License: GPLv2+ URL: https://github.com/zdohnal/system-config-printer Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz @@ -16,6 +16,7 @@ Patch0005: 0005-Fix-TypeError-raised-by-debugprint-call.patch Patch0006: 0006-Fix-bad-use-of-NamedTemporaryFile.patch Patch0007: 0007-Fix-bad-call-of-cups-connection-getFile.patch Patch0008: 0008-Fix-writing-of-advanced-settings.patch +Patch0009: 0009-Fix-compatibility-with-python3-in-putFile-method.patch BuildRequires: libusb1-devel gcc gettext-devel systemd xmlto systemd-devel python3-devel BuildRequires: intltool cups-devel >= 1.2 desktop-file-utils >= 0.2.92 pkgconfig(glib-2.0) @@ -91,6 +92,9 @@ rm -rf /var/cache/foomatic/foomatic.pickle exit 0 %changelog +* Thu Dec 28 2023 liyuanyuan - 1.5.11-23 +- Fix compatibility with python3 in putFile method + * Tue Dec 12 2023 liyuanyuan - 1.5.11-22 - Fix writing of advanced settings