Handle new CUPS 1.5 IPP error response IPP_AUTHENTICATION_CANCELED (Ubuntu #653132).
This commit is contained in:
parent
28b8a9f72a
commit
827232cdf3
55
system-config-printer-auth.patch
Normal file
55
system-config-printer-auth.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
diff -up system-config-printer-1.3.7/asyncipp.py.auth system-config-printer-1.3.7/asyncipp.py
|
||||||
|
--- system-config-printer-1.3.7/asyncipp.py.auth 2011-10-03 11:37:17.000000000 +0100
|
||||||
|
+++ system-config-printer-1.3.7/asyncipp.py 2011-10-17 10:52:52.844802724 +0100
|
||||||
|
@@ -379,8 +379,14 @@ class _IPPAuthOperation:
|
||||||
|
forbidden = False
|
||||||
|
if type (exc) == cups.IPPError:
|
||||||
|
(e, m) = exc.args
|
||||||
|
+ try:
|
||||||
|
+ ipp_auth_canceled = cups.IPP_AUTHENTICATION_CANCELED
|
||||||
|
+ except AttributeError:
|
||||||
|
+ # requires pycups 1.9.60
|
||||||
|
+ ipp_auth_canceled = 4096
|
||||||
|
if (e == cups.IPP_NOT_AUTHORIZED or
|
||||||
|
- e == cups.IPP_FORBIDDEN):
|
||||||
|
+ e == cups.IPP_FORBIDDEN or
|
||||||
|
+ e == ipp_auth_canceled):
|
||||||
|
forbidden = (e == cups.IPP_FORBIDDEN)
|
||||||
|
elif e == cups.IPP_SERVICE_UNAVAILABLE:
|
||||||
|
return self._reconnect_error (conn, exc)
|
||||||
|
diff -up system-config-printer-1.3.7/authconn.py.auth system-config-printer-1.3.7/authconn.py
|
||||||
|
--- system-config-printer-1.3.7/authconn.py.auth 2011-09-26 16:39:20.000000000 +0100
|
||||||
|
+++ system-config-printer-1.3.7/authconn.py 2011-10-17 10:52:34.736129998 +0100
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
-## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||||
|
+## Copyright (C) 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||||
|
## Author: Tim Waugh <twaugh@redhat.com>
|
||||||
|
|
||||||
|
## This program is free software; you can redistribute it and/or modify
|
||||||
|
@@ -241,8 +241,15 @@ class Connection:
|
||||||
|
except cups.IPPError, (e, m):
|
||||||
|
if self._use_pk and m == 'pkcancel':
|
||||||
|
raise cups.IPPError (0, _("Operation canceled"))
|
||||||
|
+ try:
|
||||||
|
+ ipp_auth_canceled = cups.IPP_AUTHENTICATION_CANCELED
|
||||||
|
+ except AttributeError:
|
||||||
|
+ # requires pycups 1.9.60
|
||||||
|
+ ipp_auth_canceled = 4096
|
||||||
|
+
|
||||||
|
if not self._cancel and (e == cups.IPP_NOT_AUTHORIZED or
|
||||||
|
- e == cups.IPP_FORBIDDEN):
|
||||||
|
+ e == cups.IPP_FORBIDDEN or
|
||||||
|
+ e == ipp_auth_canceled):
|
||||||
|
self._failed (e == cups.IPP_FORBIDDEN)
|
||||||
|
elif not self._cancel and e == cups.IPP_SERVICE_UNAVAILABLE:
|
||||||
|
if self._lock:
|
||||||
|
@@ -264,6 +271,7 @@ class Connection:
|
||||||
|
if self._cancel and not self._cannot_auth:
|
||||||
|
raise cups.IPPError (0, _("Operation canceled"))
|
||||||
|
|
||||||
|
+ debugprint ("%s: %s" % (e, m))
|
||||||
|
raise
|
||||||
|
except cups.HTTPError, (s,):
|
||||||
|
if not self._cancel:
|
@ -1,12 +1,13 @@
|
|||||||
Summary: A printer administration tool
|
Summary: A printer administration tool
|
||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Version: 1.3.7
|
Version: 1.3.7
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
|
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
|
||||||
Patch1: system-config-printer-no-applet-in-gnome.patch
|
Patch1: system-config-printer-no-applet-in-gnome.patch
|
||||||
|
Patch2: system-config-printer-auth.patch
|
||||||
BuildRequires: cups-devel >= 1.2
|
BuildRequires: cups-devel >= 1.2
|
||||||
BuildRequires: desktop-file-utils >= 0.2.92
|
BuildRequires: desktop-file-utils >= 0.2.92
|
||||||
BuildRequires: gettext-devel
|
BuildRequires: gettext-devel
|
||||||
@ -71,6 +72,10 @@ printers.
|
|||||||
# Don't start the applet in GNOME.
|
# Don't start the applet in GNOME.
|
||||||
%patch1 -p1 -b .no-applet-in-gnome
|
%patch1 -p1 -b .no-applet-in-gnome
|
||||||
|
|
||||||
|
# Handle new CUPS 1.5 IPP error response IPP_AUTHENTICATION_CANCELED
|
||||||
|
# (Ubuntu #653132).
|
||||||
|
%patch2 -p1 -b .auth
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-udev-rules
|
%configure --with-udev-rules
|
||||||
|
|
||||||
@ -197,6 +202,10 @@ if [ $1 -ge 1 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 17 2011 Tim Waugh <twaugh@redhat.com> 1.3.7-2
|
||||||
|
- Handle new CUPS 1.5 IPP error response IPP_AUTHENTICATION_CANCELED
|
||||||
|
(Ubuntu #653132).
|
||||||
|
|
||||||
* Wed Oct 5 2011 Tim Waugh <twaugh@redhat.com> 1.3.7-1
|
* Wed Oct 5 2011 Tim Waugh <twaugh@redhat.com> 1.3.7-1
|
||||||
- 1.3.7:
|
- 1.3.7:
|
||||||
- Show private job attributes for "my jobs" (bug #742279).
|
- Show private job attributes for "my jobs" (bug #742279).
|
||||||
|
Loading…
Reference in New Issue
Block a user