Compare commits
No commits in common. "e1d320c328cb6caf27fe72dbe286c0c892fa9198" and "0dcfec39beed1f2de65a7c1961dbd875daed60df" have entirely different histories.
e1d320c328
...
0dcfec39be
@ -1,29 +0,0 @@
|
|||||||
From 4ab0958643827777f526b180ece874d40009986d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Korbar <tkorbar@redhat.com>
|
|
||||||
Date: Thu, 27 Sep 2018 17:27:39 +0200
|
|
||||||
Subject: [PATCH] Fix TypeError raised by debugprint call
|
|
||||||
|
|
||||||
- this error is caused by typo in options.py:424 debugprint call
|
|
||||||
- debugprint function takes only one parameter so i think it should
|
|
||||||
have been formated string
|
|
||||||
- fix https://bugzilla.redhat.com/show_bug.cgi?id=1619593
|
|
||||||
---
|
|
||||||
options.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/options.py b/options.py
|
|
||||||
index 4dc0b1fe..d756f98d 100644
|
|
||||||
--- a/options.py
|
|
||||||
+++ b/options.py
|
|
||||||
@@ -421,7 +421,7 @@ class OptionSelectOne(Option):
|
|
||||||
self.selector.set_active(selected)
|
|
||||||
else:
|
|
||||||
debugprint("Unknown value for %s: %s" % (name, value))
|
|
||||||
- debugprint("Choices:", supported)
|
|
||||||
+ debugprint("Choices: %s" % (supported))
|
|
||||||
if len(supported) > 0:
|
|
||||||
debugprint("Selecting from choices:", supported[0])
|
|
||||||
self.selector.set_active(0)
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
From f5f670069d6aef364b2245b5b3068e4c4a1c1148 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Korbar <tkorbar@redhat.com>
|
|
||||||
Date: Mon, 19 Nov 2018 13:34:48 +0100
|
|
||||||
Subject: [PATCH] Fix bad use of NamedTemporaryFile
|
|
||||||
|
|
||||||
- os.stat call expects file path not file object
|
|
||||||
---
|
|
||||||
troubleshoot/ErrorLogCheckpoint.py | 42 +++++++++++++++---------------
|
|
||||||
1 file changed, 21 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/troubleshoot/ErrorLogCheckpoint.py b/troubleshoot/ErrorLogCheckpoint.py
|
|
||||||
index 7394c581..7ba7396e 100644
|
|
||||||
--- a/troubleshoot/ErrorLogCheckpoint.py
|
|
||||||
+++ b/troubleshoot/ErrorLogCheckpoint.py
|
|
||||||
@@ -134,28 +134,28 @@ class ErrorLogCheckpoint(Question):
|
|
||||||
if 'error_log_checkpoint' in self.answers:
|
|
||||||
return self.answers
|
|
||||||
|
|
||||||
- with NamedTemporaryFile () as tmpf:
|
|
||||||
- try:
|
|
||||||
- self.op = TimedOperation (self.authconn.getFile,
|
|
||||||
- args=('/admin/log/error_log',
|
|
||||||
- tmpf.file),
|
|
||||||
- parent=parent)
|
|
||||||
- self.op.run ()
|
|
||||||
- except (RuntimeError, cups.IPPError) as e:
|
|
||||||
- self.answers['error_log_checkpoint_exc'] = e
|
|
||||||
- except cups.HTTPError as e:
|
|
||||||
- self.answers['error_log_checkpoint_exc'] = e
|
|
||||||
-
|
|
||||||
- # Abandon the CUPS connection and make another.
|
|
||||||
- answers = self.troubleshooter.answers
|
|
||||||
- factory = answers['_authenticated_connection_factory']
|
|
||||||
- self.authconn = factory.get_connection ()
|
|
||||||
- self.answers['_authenticated_connection'] = self.authconn
|
|
||||||
+ tmpf = NamedTemporaryFile()
|
|
||||||
+ try:
|
|
||||||
+ self.op = TimedOperation (self.authconn.getFile,
|
|
||||||
+ args=["/admin/log/error_log"],
|
|
||||||
+ kwargs={'file': tmpf},
|
|
||||||
+ parent=parent)
|
|
||||||
+ self.op.run ()
|
|
||||||
+ except (RuntimeError, cups.IPPError) as e:
|
|
||||||
+ self.answers['error_log_checkpoint_exc'] = e
|
|
||||||
+ except cups.HTTPError as e:
|
|
||||||
+ self.answers['error_log_checkpoint_exc'] = e
|
|
||||||
+
|
|
||||||
+ # Abandon the CUPS connection and make another.
|
|
||||||
+ answers = self.troubleshooter.answers
|
|
||||||
+ factory = answers['_authenticated_connection_factory']
|
|
||||||
+ self.authconn = factory.get_connection ()
|
|
||||||
+ self.answers['_authenticated_connection'] = self.authconn
|
|
||||||
|
|
||||||
- try:
|
|
||||||
- statbuf = os.stat (tmpf.file)
|
|
||||||
- except OSError:
|
|
||||||
- statbuf = [0, 0, 0, 0, 0, 0, 0]
|
|
||||||
+ try:
|
|
||||||
+ statbuf = os.stat (tmpf.name)
|
|
||||||
+ except OSError:
|
|
||||||
+ statbuf = [0, 0, 0, 0, 0, 0, 0]
|
|
||||||
|
|
||||||
self.answers['error_log_checkpoint'] = statbuf[6]
|
|
||||||
self.persistent_answers['error_log_checkpoint'] = statbuf[6]
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
From eb13a5061d176b813345867942ccaf8f5cf3d6c6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Korbar <tkorbar@redhat.com>
|
|
||||||
Date: Mon, 19 Nov 2018 13:43:39 +0100
|
|
||||||
Subject: [PATCH] Fix bad call of cups connection getFile
|
|
||||||
|
|
||||||
---
|
|
||||||
troubleshoot/ErrorLogFetch.py | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/troubleshoot/ErrorLogFetch.py b/troubleshoot/ErrorLogFetch.py
|
|
||||||
index d7807899..3840dbc8 100644
|
|
||||||
--- a/troubleshoot/ErrorLogFetch.py
|
|
||||||
+++ b/troubleshoot/ErrorLogFetch.py
|
|
||||||
@@ -69,11 +69,11 @@ class ErrorLogFetch(Question):
|
|
||||||
with NamedTemporaryFile (delete=False) as tmpf:
|
|
||||||
success = False
|
|
||||||
try:
|
|
||||||
- c.getFile ('/admin/log/error_log', tmpf.file)
|
|
||||||
+ c.getFile ('/admin/log/error_log', file = tmpf)
|
|
||||||
success = True
|
|
||||||
except cups.HTTPError:
|
|
||||||
try:
|
|
||||||
- os.remove (tmpf.file)
|
|
||||||
+ os.remove (tmpf.name)
|
|
||||||
except OSError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
From 48acbc87a83a3d1f34f3b2383d42fcf02f7568bd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Korbar <tkorbar@redhat.com>
|
|
||||||
Date: Mon, 14 Jan 2019 16:07:25 +0100
|
|
||||||
Subject: [PATCH] Fix writing of advanced settings
|
|
||||||
|
|
||||||
After reading from stream we must return again to line 0 if we
|
|
||||||
want to read file again
|
|
||||||
---
|
|
||||||
serversettings.py | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/serversettings.py b/serversettings.py
|
|
||||||
index c98b08b1..72423057 100644
|
|
||||||
--- a/serversettings.py
|
|
||||||
+++ b/serversettings.py
|
|
||||||
@@ -440,6 +440,9 @@ class ServerSettings(GtkGUI):
|
|
||||||
has_browsepoll = True
|
|
||||||
break
|
|
||||||
|
|
||||||
+ # Return to the start of file
|
|
||||||
+ f.seek(0)
|
|
||||||
+
|
|
||||||
for line in f:
|
|
||||||
line = line.decode('UTF-8')
|
|
||||||
l = line.lower ().strip ()
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
From 9fb1f6a731dab0c39ba138d29f310622d4f32d4d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Korbar <tkorbar@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Summary: a graphical tool for CUPS administration
|
Summary: a graphical tool for CUPS administration
|
||||||
Version: 1.5.11
|
Version: 1.5.11
|
||||||
Release: 23
|
Release: 18
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/zdohnal/system-config-printer
|
URL: https://github.com/zdohnal/system-config-printer
|
||||||
Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz
|
Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz
|
||||||
@ -12,11 +12,6 @@ Patch0001: 0001-Fix-constructing-the-auth-dialog.patch
|
|||||||
Patch0002: 0002-Require-proper-version-of-GDK-and-GTK-in-scp-dbus-se.patch
|
Patch0002: 0002-Require-proper-version-of-GDK-and-GTK-in-scp-dbus-se.patch
|
||||||
Patch0003: 0003-Set-programe-name-for-scp-dbus-service-as-well.patch
|
Patch0003: 0003-Set-programe-name-for-scp-dbus-service-as-well.patch
|
||||||
Patch0004: 0004-Fix-typo-in-debugprint-call.patch
|
Patch0004: 0004-Fix-typo-in-debugprint-call.patch
|
||||||
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: 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)
|
BuildRequires: intltool cups-devel >= 1.2 desktop-file-utils >= 0.2.92 pkgconfig(glib-2.0)
|
||||||
@ -92,21 +87,6 @@ rm -rf /var/cache/foomatic/foomatic.pickle
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Dec 28 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-23
|
|
||||||
- Fix compatibility with python3 in putFile method
|
|
||||||
|
|
||||||
* Tue Dec 12 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-22
|
|
||||||
- Fix writing of advanced settings
|
|
||||||
|
|
||||||
* Fri Nov 24 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-21
|
|
||||||
- Fix bad call of cups connection getFile
|
|
||||||
|
|
||||||
* Thu Nov 09 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-20
|
|
||||||
- Fix bad use of NamedTemporaryFile
|
|
||||||
|
|
||||||
* Thu Nov 02 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-19
|
|
||||||
- Fix TypeError raised by debugprint call
|
|
||||||
|
|
||||||
* Thu Oct 26 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-18
|
* Thu Oct 26 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-18
|
||||||
- Fix typo in debugprint call
|
- Fix typo in debugprint call
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user