From 09775bd93f14d56be38336f466eb7142a7202f91 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Jun 2009 17:10:34 +0000 Subject: [PATCH] - Use correct 'location' field for printers added remotely. - Parse nmblookup failures correctly in troubleshooter. - Prevent traceback on IPP notification after properties dialog cancelled. - Fixed handling of incorrect authentication when not using PolicyKit (bug #508102). --- system-config-printer-incorrect-auth.patch | 12 ++++++++++++ system-config-printer-nmblookup-failure.patch | 14 ++++++++++++++ system-config-printer-properties-cancel.patch | 12 ++++++++++++ ...-config-printer-remote-location-field.patch | 18 ++++++++++++++++++ system-config-printer.spec | 18 +++++++++++++++++- 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-incorrect-auth.patch create mode 100644 system-config-printer-nmblookup-failure.patch create mode 100644 system-config-printer-properties-cancel.patch create mode 100644 system-config-printer-remote-location-field.patch diff --git a/system-config-printer-incorrect-auth.patch b/system-config-printer-incorrect-auth.patch new file mode 100644 index 0000000..c5989e1 --- /dev/null +++ b/system-config-printer-incorrect-auth.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.1.8/authconn.py.incorrect-auth system-config-printer-1.1.8/authconn.py +--- system-config-printer-1.1.8/authconn.py.incorrect-auth 2009-06-18 16:45:49.000000000 +0100 ++++ system-config-printer-1.1.8/authconn.py 2009-06-25 17:51:23.943329108 +0100 +@@ -389,6 +389,8 @@ class Connection: + _("The password may be incorrect.")) + if self._lock: + d.connect ("response", self._on_not_authorized_dialog_response) ++ d.show_all () ++ d.show_now () + gtk.gdk.threads_leave () + else: + d.run () diff --git a/system-config-printer-nmblookup-failure.patch b/system-config-printer-nmblookup-failure.patch new file mode 100644 index 0000000..20e9cca --- /dev/null +++ b/system-config-printer-nmblookup-failure.patch @@ -0,0 +1,14 @@ +diff -U0 system-config-printer-1.1.8/ChangeLog.nmblookup-failure system-config-printer-1.1.8/ChangeLog +diff -up system-config-printer-1.1.8/troubleshoot/CheckPrinterSanity.py.nmblookup-failure system-config-printer-1.1.8/troubleshoot/CheckPrinterSanity.py +--- system-config-printer-1.1.8/troubleshoot/CheckPrinterSanity.py.nmblookup-failure 2009-05-12 10:36:36.000000000 +0100 ++++ system-config-printer-1.1.8/troubleshoot/CheckPrinterSanity.py 2009-06-25 17:49:39.628328710 +0100 +@@ -99,7 +99,8 @@ class CheckPrinterSanity(Question): + if line.startswith ("querying"): + continue + spc = line.find (' ') +- if spc != -1: ++ if (spc != -1 and ++ not line[spc:].startswith (" failed ")): + # Remember the IP address. + self.answers['remote_server_name'] = line[:spc] + break diff --git a/system-config-printer-properties-cancel.patch b/system-config-printer-properties-cancel.patch new file mode 100644 index 0000000..7127a08 --- /dev/null +++ b/system-config-printer-properties-cancel.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.1.8/system-config-printer.py.properties-cancel system-config-printer-1.1.8/system-config-printer.py +--- system-config-printer-1.1.8/system-config-printer.py.properties-cancel 2009-06-25 17:50:16.256328643 +0100 ++++ system-config-printer-1.1.8/system-config-printer.py 2009-06-25 17:50:37.650328968 +0100 +@@ -1045,7 +1045,7 @@ class GUI(GtkGUI, monitor.Watcher): + + if ((response == gtk.RESPONSE_OK and not success) or + response == gtk.RESPONSE_CANCEL): +- del self.printer ++ self.printer = None + dialog.hide () + + def dests_iconview_selection_changed (self, iconview): diff --git a/system-config-printer-remote-location-field.patch b/system-config-printer-remote-location-field.patch new file mode 100644 index 0000000..bef4b98 --- /dev/null +++ b/system-config-printer-remote-location-field.patch @@ -0,0 +1,18 @@ +diff -up system-config-printer-1.1.8/system-config-printer.py.remote-location-field system-config-printer-1.1.8/system-config-printer.py +--- system-config-printer-1.1.8/system-config-printer.py.remote-location-field 2009-06-25 17:46:36.895328974 +0100 ++++ system-config-printer-1.1.8/system-config-printer.py 2009-06-25 17:46:52.622454030 +0100 +@@ -5791,8 +5791,12 @@ class NewPrinterGUI(GtkGUI): + try: + if len (location) == 0 and self.device.device_class == "direct": + # Set location to the name of this host. +- u = os.uname () +- location = u[1] ++ if (self.mainapp.connect_server == 'localhost' or ++ self.mainapp.connect_server[0] == '/'): ++ u = os.uname () ++ location = u[1] ++ else: ++ location = self.mainapp.connect_server + + # Pre-fill location field. + self.entNPLocation.set_text (location) diff --git a/system-config-printer.spec b/system-config-printer.spec index e54994e..7cf9dc4 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.1.8 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,6 +17,10 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-bug507489.patch Patch2: system-config-printer-ipp-nonfatal-exception.patch Patch3: system-config-printer-https.patch +Patch4: system-config-printer-remote-location-field.patch +Patch5: system-config-printer-nmblookup-failure.patch +Patch6: system-config-printer-properties-cancel.patch +Patch7: system-config-printer-incorrect-auth.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -69,6 +73,10 @@ the configuration tool. %patch1 -p1 -b .bug507489 %patch2 -p1 -b .ipp-nonfatal-exception %patch3 -p1 -b .https +%patch4 -p1 -b .remote-location-field +%patch5 -p1 -b .nmblookup-failure +%patch6 -p1 -b .properties-cancel +%patch7 -p1 -b .incorrect-auth %build %configure @@ -171,6 +179,14 @@ rm -rf %buildroot exit 0 %changelog +* Thu Jun 25 2009 Tim Waugh 1.1.8-3 +- Use correct 'location' field for printers added remotely. +- Parse nmblookup failures correctly in troubleshooter. +- Prevent traceback on IPP notification after properties dialog + cancelled. +- Fixed handling of incorrect authentication when not using + PolicyKit (bug #508102). + * Wed Jun 24 2009 Tim Waugh 1.1.8-2 - Make sure we find https URIs from https backend (bug #507628). - Avoid showing a non-fatal exception when adding an IPP printer