From 428cafe1420fd99f2f311559b3c2cf02dab5d94b Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 03:17:13 +0000 Subject: [PATCH 01/46] Initialize branch F-13 for system-config-printer --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From de9c88b73fbbbb616498eff7e873de76e5d4159d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 17 Feb 2010 16:15:41 +0000 Subject: [PATCH 02/46] - Convert MFG and MDL to lowercase before D-Bus call to work around bug #566217. --- system-config-printer-lowercase-mfg-mdl.patch | 12 ++++++++++++ system-config-printer.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-lowercase-mfg-mdl.patch diff --git a/system-config-printer-lowercase-mfg-mdl.patch b/system-config-printer-lowercase-mfg-mdl.patch new file mode 100644 index 0000000..7255696 --- /dev/null +++ b/system-config-printer-lowercase-mfg-mdl.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.1.91/installdriver.py.lowercase-mfg-mdl system-config-printer-1.1.91/installdriver.py +--- system-config-printer-1.1.91/installdriver.py.lowercase-mfg-mdl 2010-02-08 17:25:56.000000000 +0000 ++++ system-config-printer-1.1.91/installdriver.py 2010-02-17 15:49:19.064410563 +0000 +@@ -43,6 +43,8 @@ class PrinterDriversInstaller(dbus.servi + obj = bus.get_object ("org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit") + proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") ++ mfg = mfg.lower () ++ mdl = mdl.lower () + proxy.InstallPrinterDrivers (0, ["MFG:%s;MDL:%s;" % (mfg, mdl)], + "hide-finished", + reply_handler=reply_handler, diff --git a/system-config-printer.spec b/system-config-printer.spec index be99460..0cb9450 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.91 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,6 +17,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-device-settings.patch +Patch3: system-config-printer-lowercase-mfg-mdl.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -77,6 +78,7 @@ printers. %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .device-settings +%patch3 -p1 -b .lowercase-mfg-mdl %build %configure --with-udev-rules --with-polkit-1 @@ -192,6 +194,10 @@ rm -rf %buildroot exit 0 %changelog +* Wed Feb 17 2010 Tim Waugh - 1.1.91-3 +- Convert MFG and MDL to lowercase before D-Bus call to work around + bug #566217. + * Thu Feb 11 2010 Tim Waugh - 1.1.91-2 - Avoid clearing device settings when adding printer (bug #563989). From 825fa4e9a4121f568805355434794935cbdb26df Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Feb 2010 13:46:44 +0000 Subject: [PATCH 03/46] - 1.1.92. --- .cvsignore | 1 + sources | 2 +- system-config-printer-1.1.91.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.1.92.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-device-settings.patch | 19 ------------------- system-config-printer.spec | 13 +++++++------ 6 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 system-config-printer-1.1.91.tar.xz.sig create mode 100644 system-config-printer-1.1.92.tar.xz.sig delete mode 100644 system-config-printer-device-settings.patch diff --git a/.cvsignore b/.cvsignore index b68029a..aaa1517 100644 --- a/.cvsignore +++ b/.cvsignore @@ -212,3 +212,4 @@ system-config-printer-1.1.16.tar.xz pycups-1.9.48.tar.bz2 system-config-printer-1.1.90.tar.xz system-config-printer-1.1.91.tar.xz +system-config-printer-1.1.92.tar.xz diff --git a/sources b/sources index aabed93..1a5b178 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 2e9ed692c75328e7fb88f8c230f70990 pycups-1.9.48.tar.bz2 -22c3cbe13faa3ef0935564de1b553fb9 system-config-printer-1.1.91.tar.xz +773811075ef52e9afd540a6583cf647f system-config-printer-1.1.92.tar.xz diff --git a/system-config-printer-1.1.91.tar.xz.sig b/system-config-printer-1.1.91.tar.xz.sig deleted file mode 100644 index a516382fa72f25b59250afaf13be687876e8db58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-OK?lE1hg7`no8Q&5dv0o0H1mr|9Vm+9%>oyO8K5J2#TeA=wbk% XnGl>KS~Q= 1.2 BuildRequires: python-devel >= 2.4 @@ -77,8 +76,7 @@ printers. %prep %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc -%patch2 -p1 -b .device-settings -%patch3 -p1 -b .lowercase-mfg-mdl +%patch2 -p1 -b .lowercase-mfg-mdl %build %configure --with-udev-rules --with-polkit-1 @@ -194,6 +192,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Feb 19 2010 Tim Waugh - 1.1.92-1 +- 1.1.92. + * Wed Feb 17 2010 Tim Waugh - 1.1.91-3 - Convert MFG and MDL to lowercase before D-Bus call to work around bug #566217. From 61e6b02bb56b49565c06e864bb2e7a57224f00d7 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sun, 21 Feb 2010 19:04:20 +0000 Subject: [PATCH 04/46] - Display a warning when the wrong IEEE 1284 Device ID is detected. --- ...em-config-printer-device-ids-warning.patch | 23 +++++++++++++++++++ system-config-printer.spec | 7 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-device-ids-warning.patch diff --git a/system-config-printer-device-ids-warning.patch b/system-config-printer-device-ids-warning.patch new file mode 100644 index 0000000..8ab6725 --- /dev/null +++ b/system-config-printer-device-ids-warning.patch @@ -0,0 +1,23 @@ +diff -up system-config-printer-1.1.92/cupshelpers/ppds.py.device-ids-warning system-config-printer-1.1.92/cupshelpers/ppds.py +--- system-config-printer-1.1.92/cupshelpers/ppds.py.device-ids-warning 2010-01-27 11:17:44.000000000 +0000 ++++ system-config-printer-1.1.92/cupshelpers/ppds.py 2010-02-21 18:27:20.767175951 +0000 +@@ -2,7 +2,7 @@ + + ## system-config-printer + +-## Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc. ++## Copyright (C) 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. + ## Copyright (C) 2006 Florian Festi + ## Copyright (C) 2006, 2007, 2008, 2009 Tim Waugh + +@@ -561,6 +561,10 @@ class PPDs: + try: + ppdnamelist += self.ids["hp"][mdll] + status = self.STATUS_SUCCESS ++ print ("**** Incorrect IEEE 1284 Device ID: %s" % ++ self.ids["hp"][mdll]) ++ print "**** Actual ID is MFG:%s;MDL:%s;" % (mfg, mdl) ++ print "**** Please report a bug against the HPLIP component" + id_matched = True + except KeyError: + pass diff --git a/system-config-printer.spec b/system-config-printer.spec index 716a06b..01200d6 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.92 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,6 +17,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch +Patch3: system-config-printer-device-ids-warning.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -77,6 +78,7 @@ printers. %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl +%patch3 -p1 -b .device-ids-warning %build %configure --with-udev-rules --with-polkit-1 @@ -192,6 +194,9 @@ rm -rf %buildroot exit 0 %changelog +* Sun Feb 21 2010 Tim Waugh - 1.1.92-2 +- Display a warning when the wrong IEEE 1284 Device ID is detected. + * Fri Feb 19 2010 Tim Waugh - 1.1.92-1 - 1.1.92. From cc516e8c5ac05234db12c033864a65e142fbd900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Mon, 22 Feb 2010 11:40:54 +0000 Subject: [PATCH 05/46] - Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938). --- system-config-printer-cupsGetPPD2.patch | 12 ++++++++++++ system-config-printer.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cupsGetPPD2.patch diff --git a/system-config-printer-cupsGetPPD2.patch b/system-config-printer-cupsGetPPD2.patch new file mode 100644 index 0000000..50c02b6 --- /dev/null +++ b/system-config-printer-cupsGetPPD2.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.1.92/statereason.py.cupsGetPPD2 system-config-printer-1.1.92/statereason.py +--- system-config-printer-1.1.92/statereason.py.cupsGetPPD2 2010-02-18 16:17:48.000000000 +0100 ++++ system-config-printer-1.1.92/statereason.py 2010-02-22 12:10:09.000000000 +0100 +@@ -138,7 +138,7 @@ class StateReason: + f = self.connection.getPPD(self.printer) + self._ppd = cups.PPD (f) + os.unlink (f) +- except (cups.IPPError, OSError): ++ except (cups.IPPError, RuntimeError, OSError): + pass + + reason = self.get_reason () diff --git a/system-config-printer.spec b/system-config-printer.spec index 01200d6..9175b14 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.92 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-device-ids-warning.patch +Patch4: system-config-printer-cupsGetPPD2.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -79,6 +80,7 @@ printers. %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl %patch3 -p1 -b .device-ids-warning +%patch4 -p1 -b .cupsGetPPD2 %build %configure --with-udev-rules --with-polkit-1 @@ -194,6 +196,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Feb 22 2010 Jiri Popelka 1.1.92-3 +- Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938). + * Sun Feb 21 2010 Tim Waugh - 1.1.92-2 - Display a warning when the wrong IEEE 1284 Device ID is detected. From 192aeb7de214dcfdd120eb3a8a377c0733d09d68 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 22 Feb 2010 17:26:38 +0000 Subject: [PATCH 06/46] - Removed Device ID hacks for Kyocera and HP. This avoids a false positive for the incorrect-Device-ID warning. --- ...em-config-printer-no-device-id-hacks.patch | 24 +++++++++++++++++++ system-config-printer.spec | 8 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-no-device-id-hacks.patch diff --git a/system-config-printer-no-device-id-hacks.patch b/system-config-printer-no-device-id-hacks.patch new file mode 100644 index 0000000..6914125 --- /dev/null +++ b/system-config-printer-no-device-id-hacks.patch @@ -0,0 +1,24 @@ +diff -up system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks system-config-printer-1.1.92/cupshelpers/ppds.py +--- system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks 2010-02-22 17:16:47.012355185 +0000 ++++ system-config-printer-1.1.92/cupshelpers/ppds.py 2010-02-22 17:17:57.924354751 +0000 +@@ -900,20 +900,10 @@ class PPDs: + if not id: + continue + +- # Fix up broken Kyocera IDs +- v = id.find (":Model") +- if v != -1: +- id = id[:v] + ';' + id[v + 1:] +- + id_dict = parseDeviceID (id) + lmfg = id_dict['MFG'].lower () + lmdl = id_dict['MDL'].lower () + +- # Consider "HP" and "Hewlett-Packard" as equal, as the ID returned +- # by the CUPS "usb" backend and HPLIP's "hp" backend are different +- if lmfg == "hewlett-packard": +- lmfg = "hp" +- + bad = False + if len (lmfg) == 0: + _debugprint ("Missing MFG field for %s" % ppdname) diff --git a/system-config-printer.spec b/system-config-printer.spec index 9175b14..24f217f 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.92 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-device-ids-warning.patch Patch4: system-config-printer-cupsGetPPD2.patch +Patch5: system-config-printer-no-device-id-hacks.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -81,6 +82,7 @@ printers. %patch2 -p1 -b .lowercase-mfg-mdl %patch3 -p1 -b .device-ids-warning %patch4 -p1 -b .cupsGetPPD2 +%patch5 -p1 -b .no-device-id-hacks %build %configure --with-udev-rules --with-polkit-1 @@ -196,6 +198,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Feb 22 2010 Tim Waugh - 1.1.92-4 +- Removed Device ID hacks for Kyocera and HP. This avoids a false + positive for the incorrect-Device-ID warning. + * Mon Feb 22 2010 Jiri Popelka 1.1.92-3 - Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938). From 641c88302aeff8b0a32e9dab148326b83d2b253a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sat, 27 Feb 2010 11:09:37 +0000 Subject: [PATCH 07/46] - 1.1.93. --- .cvsignore | 1 + sources | 2 +- system-config-printer-1.1.92.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.1.93.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-cupsGetPPD2.patch | 12 --------- ...em-config-printer-device-ids-warning.patch | 23 ----------------- ...em-config-printer-no-device-id-hacks.patch | 24 ------------------ system-config-printer.spec | 14 +++++----- 8 files changed, 8 insertions(+), 68 deletions(-) delete mode 100644 system-config-printer-1.1.92.tar.xz.sig create mode 100644 system-config-printer-1.1.93.tar.xz.sig delete mode 100644 system-config-printer-cupsGetPPD2.patch delete mode 100644 system-config-printer-device-ids-warning.patch delete mode 100644 system-config-printer-no-device-id-hacks.patch diff --git a/.cvsignore b/.cvsignore index aaa1517..e4b1df4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -213,3 +213,4 @@ pycups-1.9.48.tar.bz2 system-config-printer-1.1.90.tar.xz system-config-printer-1.1.91.tar.xz system-config-printer-1.1.92.tar.xz +system-config-printer-1.1.93.tar.xz diff --git a/sources b/sources index 1a5b178..5fa4782 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 2e9ed692c75328e7fb88f8c230f70990 pycups-1.9.48.tar.bz2 -773811075ef52e9afd540a6583cf647f system-config-printer-1.1.92.tar.xz +454506953f2be06865536953cdba8f05 system-config-printer-1.1.93.tar.xz diff --git a/system-config-printer-1.1.92.tar.xz.sig b/system-config-printer-1.1.92.tar.xz.sig deleted file mode 100644 index 43b8a4bb56a434e531da4065d4e5db430e902762..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-OMa3l1hg7`no8Q&5dz~y0G$+_m(Cgnd7w9_$ncfLIrsbfFqZ(I XOP^(I$#P{0`dYroI~}{Xa{WK^d-ooM diff --git a/system-config-printer-1.1.93.tar.xz.sig b/system-config-printer-1.1.93.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..7c41b8d4110ad234b183de5ed6bcd086e7723080 GIT binary patch literal 65 zcmV-H0KWf-KLZ5-ONjYh1hg7`no8Q&5dyx-0H07$TTb>a3fwDBegqN0y517$J8uA; X9tW{5sjqIhc^u(nS~B(Jw-s+AQp6iE literal 0 HcmV?d00001 diff --git a/system-config-printer-cupsGetPPD2.patch b/system-config-printer-cupsGetPPD2.patch deleted file mode 100644 index 50c02b6..0000000 --- a/system-config-printer-cupsGetPPD2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.92/statereason.py.cupsGetPPD2 system-config-printer-1.1.92/statereason.py ---- system-config-printer-1.1.92/statereason.py.cupsGetPPD2 2010-02-18 16:17:48.000000000 +0100 -+++ system-config-printer-1.1.92/statereason.py 2010-02-22 12:10:09.000000000 +0100 -@@ -138,7 +138,7 @@ class StateReason: - f = self.connection.getPPD(self.printer) - self._ppd = cups.PPD (f) - os.unlink (f) -- except (cups.IPPError, OSError): -+ except (cups.IPPError, RuntimeError, OSError): - pass - - reason = self.get_reason () diff --git a/system-config-printer-device-ids-warning.patch b/system-config-printer-device-ids-warning.patch deleted file mode 100644 index 8ab6725..0000000 --- a/system-config-printer-device-ids-warning.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up system-config-printer-1.1.92/cupshelpers/ppds.py.device-ids-warning system-config-printer-1.1.92/cupshelpers/ppds.py ---- system-config-printer-1.1.92/cupshelpers/ppds.py.device-ids-warning 2010-01-27 11:17:44.000000000 +0000 -+++ system-config-printer-1.1.92/cupshelpers/ppds.py 2010-02-21 18:27:20.767175951 +0000 -@@ -2,7 +2,7 @@ - - ## system-config-printer - --## Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc. -+## Copyright (C) 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. - ## Copyright (C) 2006 Florian Festi - ## Copyright (C) 2006, 2007, 2008, 2009 Tim Waugh - -@@ -561,6 +561,10 @@ class PPDs: - try: - ppdnamelist += self.ids["hp"][mdll] - status = self.STATUS_SUCCESS -+ print ("**** Incorrect IEEE 1284 Device ID: %s" % -+ self.ids["hp"][mdll]) -+ print "**** Actual ID is MFG:%s;MDL:%s;" % (mfg, mdl) -+ print "**** Please report a bug against the HPLIP component" - id_matched = True - except KeyError: - pass diff --git a/system-config-printer-no-device-id-hacks.patch b/system-config-printer-no-device-id-hacks.patch deleted file mode 100644 index 6914125..0000000 --- a/system-config-printer-no-device-id-hacks.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks system-config-printer-1.1.92/cupshelpers/ppds.py ---- system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks 2010-02-22 17:16:47.012355185 +0000 -+++ system-config-printer-1.1.92/cupshelpers/ppds.py 2010-02-22 17:17:57.924354751 +0000 -@@ -900,20 +900,10 @@ class PPDs: - if not id: - continue - -- # Fix up broken Kyocera IDs -- v = id.find (":Model") -- if v != -1: -- id = id[:v] + ';' + id[v + 1:] -- - id_dict = parseDeviceID (id) - lmfg = id_dict['MFG'].lower () - lmdl = id_dict['MDL'].lower () - -- # Consider "HP" and "Hewlett-Packard" as equal, as the ID returned -- # by the CUPS "usb" backend and HPLIP's "hp" backend are different -- if lmfg == "hewlett-packard": -- lmfg = "hp" -- - bad = False - if len (lmfg) == 0: - _debugprint ("Missing MFG field for %s" % ppdname) diff --git a/system-config-printer.spec b/system-config-printer.spec index 24f217f..d9c968c 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -6,8 +6,8 @@ Summary: A printer administration tool Name: system-config-printer -Version: 1.1.92 -Release: 4%{?dist} +Version: 1.1.93 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,9 +17,6 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch -Patch3: system-config-printer-device-ids-warning.patch -Patch4: system-config-printer-cupsGetPPD2.patch -Patch5: system-config-printer-no-device-id-hacks.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -80,9 +77,6 @@ printers. %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl -%patch3 -p1 -b .device-ids-warning -%patch4 -p1 -b .cupsGetPPD2 -%patch5 -p1 -b .no-device-id-hacks %build %configure --with-udev-rules --with-polkit-1 @@ -152,6 +146,7 @@ rm -rf %buildroot %{_datadir}/%{name}/asyncipp.py* %{_datadir}/%{name}/asyncpk1.py* %{_datadir}/%{name}/authconn.py* +%{_datadir}/%{name}/check-device-ids.py* %{_datadir}/%{name}/config.py* %{_datadir}/%{name}/cupspk.py* %{_datadir}/%{name}/debug.py* @@ -198,6 +193,9 @@ rm -rf %buildroot exit 0 %changelog +* Sat Feb 27 2010 Tim Waugh - 1.1.93-1 +- 1.1.93. + * Mon Feb 22 2010 Tim Waugh - 1.1.92-4 - Removed Device ID hacks for Kyocera and HP. This avoids a false positive for the incorrect-Device-ID warning. From 250dd09c9d6b2ea7914ec569f53d4099f3ca0adf Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sun, 28 Feb 2010 09:31:41 +0000 Subject: [PATCH 08/46] - Import gobject in gtkspinner.py. --- system-config-printer-import-gobject.patch | 21 +++++++++++++++++++++ system-config-printer.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-import-gobject.patch diff --git a/system-config-printer-import-gobject.patch b/system-config-printer-import-gobject.patch new file mode 100644 index 0000000..d5fac29 --- /dev/null +++ b/system-config-printer-import-gobject.patch @@ -0,0 +1,21 @@ +diff -up system-config-printer-1.1.93/gtkspinner.py.import-gobject system-config-printer-1.1.93/gtkspinner.py +--- system-config-printer-1.1.93/gtkspinner.py.import-gobject 2009-12-03 17:06:22.000000000 +0000 ++++ system-config-printer-1.1.93/gtkspinner.py 2010-02-28 09:24:55.338693167 +0000 +@@ -2,7 +2,8 @@ + + ## system-config-printer + +-## Copyright (C) 2009 Tim Waugh ++## Copyright (C) 2009, 2010 Red Hat, Inc ++## Author: Tim Waugh + + ## This program is free software; you can redistribute it and/or modify + ## it under the terms of the GNU General Public License as published by +@@ -19,6 +20,7 @@ + ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + import glib ++import gobject + import gtk + + class Spinner: diff --git a/system-config-printer.spec b/system-config-printer.spec index d9c968c..525c228 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.93 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,6 +17,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch +Patch3: system-config-printer-import-gobject.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -77,6 +78,7 @@ printers. %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl +%patch3 -p1 -b .import_gobject %build %configure --with-udev-rules --with-polkit-1 @@ -193,6 +195,9 @@ rm -rf %buildroot exit 0 %changelog +* Sun Feb 28 2010 Tim Waugh - 1.1.93-2 +- Import gobject in gtkspinner.py. + * Sat Feb 27 2010 Tim Waugh - 1.1.93-1 - 1.1.93. From 0fd6a1d808bc1717b1cbf731a00c83a045064096 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 1 Mar 2010 16:36:17 +0000 Subject: [PATCH 09/46] - Attempt to install drivers in the Device ID checker. --- system-config-printer-check-install.patch | 88 +++++++++++++++++++++++ system-config-printer.spec | 9 ++- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 system-config-printer-check-install.patch diff --git a/system-config-printer-check-install.patch b/system-config-printer-check-install.patch new file mode 100644 index 0000000..dc0d72d --- /dev/null +++ b/system-config-printer-check-install.patch @@ -0,0 +1,88 @@ +diff -up system-config-printer-1.1.93/check-device-ids.py.check-install system-config-printer-1.1.93/check-device-ids.py +--- system-config-printer-1.1.93/check-device-ids.py.check-install 2010-02-27 10:33:00.000000000 +0000 ++++ system-config-printer-1.1.93/check-device-ids.py 2010-03-01 16:16:01.088735654 +0000 +@@ -20,6 +20,7 @@ + ## along with this program; if not, write to the Free Software + ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + ++import dbus + import cups + import cupshelpers + from cupshelpers.ppds import PPDs, ppdMakeModelSplit +@@ -27,10 +28,6 @@ import sys + + cups.setUser ('root') + c = cups.Connection () +-print "Fetching driver list" +-ppds = PPDs (c.getPPDs ()) +-ppds._init_ids () +-makes = ppds.getMakes () + + devices = None + if len (sys.argv) > 1 and sys.argv[1] == '--help': +@@ -66,14 +63,56 @@ if len (devices) == 0: + sys.exit (0) + + n = 0 ++device_ids = [] + for device, attrs in devices.iteritems (): + make_and_model = attrs.get ('device-make-and-model') + device_id = attrs.get ('device-id') + if not (make_and_model and device_id): + continue + ++ id_fields = cupshelpers.parseDeviceID (device_id) ++ this_id = "MFG:%s;MDL:%s;" % (id_fields['MFG'], id_fields['MDL']) ++ device_ids.append (this_id) + n += 1 + ++if device_ids: ++ try: ++ bus = dbus.SessionBus () ++ ++ print "Installing relevant drivers using session service" ++ try: ++ obj = bus.get_object ("org.freedesktop.PackageKit", ++ "/org/freedesktop/PackageKit") ++ proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") ++ proxy.InstallPrinterDrivers (0, device_ids, ++ "hide-finished", timeout=3600) ++ except dbus.exceptions.DBusException, (e, r): ++ print "Ignoring exception: %s" % e ++ except dbus.exceptions.DBusException: ++ try: ++ bus = dbus.SystemBus () ++ ++ print "Installing relevant drivers using system service" ++ try: ++ obj = bus.get_object ("com.redhat.PrinterDriversInstaller", ++ "/com/redhat/PrinterDriversInstaller") ++ proxy = dbus.Interface (obj, ++ "com.redhat.PrinterDriversInstaller") ++ for device_id in device_ids: ++ id_dict = cupshelpers.parseDeviceID (device_id) ++ proxy.InstallDrivers (id_dict['MFG'], id_dict['MDL'], '', ++ timeout=3600) ++ except dbus.exceptions.DBusException: ++ print "Ignoring exception: %s" % e ++ except dbus.exceptions.DBusException: ++ print "D-Bus not available so skipping package installation" ++ ++ ++print "Fetching driver list" ++ppds = PPDs (c.getPPDs ()) ++ppds._init_ids () ++makes = ppds.getMakes () ++ + i = 1 + item = unichr (0x251c) + unichr (0x2500) + unichr (0x2500) + last = unichr (0x2514) + unichr (0x2500) + unichr (0x2500) +@@ -92,7 +131,7 @@ for device, attrs in devices.iteritems ( + print "%s %s: MFG:%s;MDL:%s;" % (line, make_and_model, + id_fields['MFG'], + id_fields['MDL']) +- ++ + try: + drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] + except KeyError: diff --git a/system-config-printer.spec b/system-config-printer.spec index 525c228..2694eeb 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.93 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-import-gobject.patch +Patch4: system-config-printer-check-install.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -78,7 +79,8 @@ printers. %setup -q -a 1 -a 2 %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl -%patch3 -p1 -b .import_gobject +%patch3 -p1 -b .import-gobject +%patch4 -p1 -b .check-install %build %configure --with-udev-rules --with-polkit-1 @@ -195,6 +197,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 1 2010 Tim Waugh - 1.1.93-3 +- Attempt to install drivers in the Device ID checker. + * Sun Feb 28 2010 Tim Waugh - 1.1.93-2 - Import gobject in gtkspinner.py. From 543abca28c3b11df41ecda96ec24b8e72fafd581 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 1 Mar 2010 18:58:07 +0000 Subject: [PATCH 10/46] - Use icon name 'printer' instead of 'gnome-dev-printer'. --- system-config-printer-icon-name.patch | 27 +++++++++++++++++++++++++++ system-config-printer.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-icon-name.patch diff --git a/system-config-printer-icon-name.patch b/system-config-printer-icon-name.patch new file mode 100644 index 0000000..bf17c2d --- /dev/null +++ b/system-config-printer-icon-name.patch @@ -0,0 +1,27 @@ +diff -up system-config-printer-1.1.93/system-config-printer.py.icon-name system-config-printer-1.1.93/system-config-printer.py +--- system-config-printer-1.1.93/system-config-printer.py.icon-name 2010-02-26 15:15:26.000000000 +0000 ++++ system-config-printer-1.1.93/system-config-printer.py 2010-03-01 18:53:04.502609395 +0000 +@@ -1463,19 +1463,19 @@ class GUI(GtkGUI, monitor.Watcher): + 'i-network-printer'), + 'local-printer': + (_("Printer"), +- 'gnome-dev-printer'), ++ 'printer'), + 'local-fax': + (_("Fax"), +- 'gnome-dev-printer'), ++ 'printer'), + 'local-class': + (_("Class"), +- 'gnome-dev-printer'), ++ 'printer'), + 'ipp-printer': + (_("Network printer"), + 'i-network-printer'), + 'smb-printer': + (_("Network print share"), +- 'gnome-dev-printer'), ++ 'printer'), + 'network-printer': + (_("Network printer"), + 'i-network-printer'), diff --git a/system-config-printer.spec b/system-config-printer.spec index 2694eeb..9ba12f8 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.93 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-import-gobject.patch Patch4: system-config-printer-check-install.patch +Patch5: system-config-printer-icon-name.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -81,6 +82,7 @@ printers. %patch2 -p1 -b .lowercase-mfg-mdl %patch3 -p1 -b .import-gobject %patch4 -p1 -b .check-install +%patch5 -p1 -b .icon-name %build %configure --with-udev-rules --with-polkit-1 @@ -197,6 +199,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 1 2010 Tim Waugh - 1.1.93-4 +- Use icon name 'printer' instead of 'gnome-dev-printer'. + * Mon Mar 1 2010 Tim Waugh - 1.1.93-3 - Attempt to install drivers in the Device ID checker. From b841b35dab999202bb284a2898c4d0a8d9e31677 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 3 Mar 2010 11:58:03 +0000 Subject: [PATCH 11/46] - Added comments for all sources and patches. - Ship COPYING files. --- system-config-printer.spec | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/system-config-printer.spec b/system-config-printer.spec index 9ba12f8..07b7b10 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,12 +7,14 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.1.93 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base Source0: http://cyberelk.net/tim/data/system-config-printer/1.2/%{name}-%{version}.tar.xz +# Python bindings for libcups Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 +# Python bindings for libsmbclient Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch @@ -78,10 +80,19 @@ printers. %prep %setup -q -a 1 -a 2 +# Don't require epydoc. %patch1 -p1 -b .no-epydoc + +# Convert InstallPrinterDriver requests to lower-case. %patch2 -p1 -b .lowercase-mfg-mdl + +# Import gobject in gtkspinner. %patch3 -p1 -b .import-gobject + +# Attempt to install relevant driver packages in Device IDs checker. %patch4 -p1 -b .check-install + +# Use 'printer' icon name instead of 'gnome-dev-printer'. %patch5 -p1 -b .icon-name %build @@ -119,8 +130,8 @@ rm -rf %buildroot %files libs -f system-config-printer.lang %defattr(-,root,root,-) -%doc --parents pycups-%{pycups_version}/{ChangeLog,README,NEWS,TODO,examples,html} -%doc --parents pysmbc-%{pysmbc_version}/{ChangeLog,README,NEWS,TODO,test.py,html} +%doc --parents pycups-%{pycups_version}/{COPYING,ChangeLog,README,NEWS,TODO,examples,html} +%doc --parents pysmbc-%{pysmbc_version}/{COPYING,ChangeLog,README,NEWS,TODO,test.py,html} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf %{python_sitearch}/cups.so @@ -143,7 +154,7 @@ rm -rf %buildroot %files %defattr(-,root,root,-) -%doc ChangeLog README +%doc COPYING ChangeLog README %{_bindir}/%{name} %{_bindir}/%{name}-applet %dir %{_datadir}/%{name} @@ -199,6 +210,10 @@ rm -rf %buildroot exit 0 %changelog +* Wed Mar 3 2010 Tim Waugh - 1.1.93-5 +- Added comments for all sources and patches. +- Ship COPYING files. + * Mon Mar 1 2010 Tim Waugh - 1.1.93-4 - Use icon name 'printer' instead of 'gnome-dev-printer'. From 3ea06bff643a455e0114855b9052bfc5e8586483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Mon, 8 Mar 2010 17:04:10 +0000 Subject: [PATCH 12/46] - Fixed pycups to be more cautious when removing the Connection object from the list (bug #567386). --- ...onfig-printer-cupsconnection-dealloc.patch | 69 +++++++++++++++++++ system-config-printer.spec | 10 ++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cupsconnection-dealloc.patch diff --git a/system-config-printer-cupsconnection-dealloc.patch b/system-config-printer-cupsconnection-dealloc.patch new file mode 100644 index 0000000..d25f4c4 --- /dev/null +++ b/system-config-printer-cupsconnection-dealloc.patch @@ -0,0 +1,69 @@ +diff -up system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c +--- system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc 2010-03-08 17:06:47.000000000 +0100 ++++ system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c 2010-03-08 17:06:47.000000000 +0100 +@@ -231,37 +231,43 @@ Connection_dealloc (Connection *self) + { + int i, j; + +- if (NumConnections > 1) +- { +- Connection **new_array = calloc (NumConnections - 1, +- sizeof (Connection *)); ++ for (j = 0; j < NumConnections; j++) ++ if (Connections[j] == self) ++ break; + +- for (i = 0, j = 0; i < NumConnections; i++) ++ if (j < NumConnections) ++ { ++ if (NumConnections > 1) + { +- if (Connections[i] == self) ++ Connection **new_array = calloc (NumConnections - 1, ++ sizeof (Connection *)); ++ ++ if (new_array) + { +- if (!new_array) +- Connections[i] = NULL; ++ int k; ++ for (i = 0, k = 0; i < NumConnections; i++) ++ { ++ if (i == j) ++ continue; + +- continue; +- } ++ new_array[k++] = Connections[i]; ++ } + +- if (new_array) +- new_array[j++] = Connections[i]; ++ free (Connections); ++ Connections = new_array; ++ NumConnections--; ++ } else ++ /* Failed to allocate memory. Just clear out the reference. */ ++ Connections[j] = NULL; + } +- +- if (new_array) { ++ else ++ { ++ /* The only element is the one we no longer need. */ + free (Connections); +- Connections = new_array; +- NumConnections--; ++ Connections = NULL; ++ NumConnections = 0; + } + } +- else +- { +- free (Connections); +- Connections = NULL; +- NumConnections = 0; +- } + + if (self->http) { + debugprintf ("httpClose()\n"); diff --git a/system-config-printer.spec b/system-config-printer.spec index 07b7b10..6dd0883 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.93 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -22,6 +22,7 @@ Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-import-gobject.patch Patch4: system-config-printer-check-install.patch Patch5: system-config-printer-icon-name.patch +Patch6: system-config-printer-cupsconnection-dealloc.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -95,6 +96,9 @@ printers. # Use 'printer' icon name instead of 'gnome-dev-printer'. %patch5 -p1 -b .icon-name +# Fix pycups Connection_dealloc() +%patch6 -p1 -b .cupsconnection-dealloc + %build %configure --with-udev-rules --with-polkit-1 @@ -210,6 +214,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 8 2010 Jiri Popelka 1.1.93-6 +- Fixed pycups to be more cautious when removing + the Connection object from the list (bug #567386). + * Wed Mar 3 2010 Tim Waugh - 1.1.93-5 - Added comments for all sources and patches. - Ship COPYING files. From 7086cd2df2a5503d2c5f16aea6b9be8e89c218cb Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 16 Mar 2010 18:06:38 +0000 Subject: [PATCH 13/46] - Import modules we catch exceptions from (bug #574117). --- system-config-printer-missing-imports.patch | 34 +++++++++++++++++++++ system-config-printer.spec | 9 +++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-missing-imports.patch diff --git a/system-config-printer-missing-imports.patch b/system-config-printer-missing-imports.patch new file mode 100644 index 0000000..08caa9f --- /dev/null +++ b/system-config-printer-missing-imports.patch @@ -0,0 +1,34 @@ +diff -up system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports system-config-printer-1.1.18/AdvancedServerSettings.py +--- system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports 2010-03-10 09:33:45.000000000 +0000 ++++ system-config-printer-1.1.18/AdvancedServerSettings.py 2010-03-16 17:30:11.388600957 +0000 +@@ -2,8 +2,9 @@ + + ## system-config-printer + +-## Copyright (C) 2008, 2009 Red Hat, Inc. +-## Copyright (C) 2008, 2009 Tim Waugh ++## Copyright (C) 2008, 2009, 2010 Red Hat, Inc. ++## Authors: ++## Tim Waugh + + ## This program is free software; you can redistribute it and/or modify + ## it under the terms of the GNU General Public License as published by +@@ -20,6 +21,7 @@ + ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + from gettext import gettext as _ ++import cups + import gobject + import gtk + import os +diff -up system-config-printer-1.1.18/jobviewer.py.missing-imports system-config-printer-1.1.18/jobviewer.py +--- system-config-printer-1.1.18/jobviewer.py.missing-imports 2010-03-10 09:33:45.000000000 +0000 ++++ system-config-printer-1.1.18/jobviewer.py 2010-03-16 17:30:11.398601208 +0000 +@@ -23,6 +23,7 @@ import dbus.glib + import dbus.service + import pynotify + import gettext ++import glib + import gobject + import gtk + import gtk.gdk diff --git a/system-config-printer.spec b/system-config-printer.spec index 6dd0883..a359a43 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.93 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -23,6 +23,7 @@ Patch3: system-config-printer-import-gobject.patch Patch4: system-config-printer-check-install.patch Patch5: system-config-printer-icon-name.patch Patch6: system-config-printer-cupsconnection-dealloc.patch +Patch7: system-config-printer-missing-imports.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -99,6 +100,9 @@ printers. # Fix pycups Connection_dealloc() %patch6 -p1 -b .cupsconnection-dealloc +# Import modules we catch exceptions from (bug #574117). +%patch7 -p1 -b .missing-imports + %build %configure --with-udev-rules --with-polkit-1 @@ -214,6 +218,9 @@ rm -rf %buildroot exit 0 %changelog +* Tue Mar 16 2010 Tim Waugh - 1.1.93-7 +- Import modules we catch exceptions from (bug #574117). + * Mon Mar 8 2010 Jiri Popelka 1.1.93-6 - Fixed pycups to be more cautious when removing the Connection object from the list (bug #567386). From ac619f7597eba490de5c3d797cb372bf047961fc Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 17 Mar 2010 15:40:59 +0000 Subject: [PATCH 14/46] - Updated to pycups-1.9.49. - 1.2.0: - Another error handling fix in check-device-ids.py. - Added StartupNotify=true to 'manage print jobs' desktop file. --- .cvsignore | 2 + sources | 4 +- system-config-printer-1.1.93.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.2.0.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-check-install.patch | 88 ------------------ ...onfig-printer-cupsconnection-dealloc.patch | 69 -------------- system-config-printer-icon-name.patch | 27 ------ system-config-printer-import-gobject.patch | 21 ----- system-config-printer-missing-imports.patch | 34 ------- system-config-printer-no-epydoc.patch | 32 +++---- system-config-printer.spec | 34 ++----- 11 files changed, 30 insertions(+), 281 deletions(-) delete mode 100644 system-config-printer-1.1.93.tar.xz.sig create mode 100644 system-config-printer-1.2.0.tar.xz.sig delete mode 100644 system-config-printer-check-install.patch delete mode 100644 system-config-printer-cupsconnection-dealloc.patch delete mode 100644 system-config-printer-icon-name.patch delete mode 100644 system-config-printer-import-gobject.patch delete mode 100644 system-config-printer-missing-imports.patch diff --git a/.cvsignore b/.cvsignore index e4b1df4..9a1fae3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -214,3 +214,5 @@ system-config-printer-1.1.90.tar.xz system-config-printer-1.1.91.tar.xz system-config-printer-1.1.92.tar.xz system-config-printer-1.1.93.tar.xz +pycups-1.9.49.tar.bz2 +system-config-printer-1.2.0.tar.xz diff --git a/sources b/sources index 5fa4782..e88ca84 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 -2e9ed692c75328e7fb88f8c230f70990 pycups-1.9.48.tar.bz2 -454506953f2be06865536953cdba8f05 system-config-printer-1.1.93.tar.xz +6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2 +dc9c0728503c57a846bdf868eb3cf90d system-config-printer-1.2.0.tar.xz diff --git a/system-config-printer-1.1.93.tar.xz.sig b/system-config-printer-1.1.93.tar.xz.sig deleted file mode 100644 index 7c41b8d4110ad234b183de5ed6bcd086e7723080..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-ONjYh1hg7`no8Q&5dyx-0H07$TTb>a3fwDBegqN0y517$J8uA; X9tW{5sjqIhc^u(nS~B(Jw-s+AQp6iE diff --git a/system-config-printer-1.2.0.tar.xz.sig b/system-config-printer-1.2.0.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..cb6555978f006a56a86b16a48ee3a8c14d624c55 GIT binary patch literal 65 zcmV-H0KWf-KLZ5-OQ7fj1hg7`no8Q&5dzZj0G=poYagvCJ&RF^)g7kXKX2ac$6x@T XWb_K5Oo!C4SH&YCJXGHYTV> 1 and sys.argv[1] == '--help': -@@ -66,14 +63,56 @@ if len (devices) == 0: - sys.exit (0) - - n = 0 -+device_ids = [] - for device, attrs in devices.iteritems (): - make_and_model = attrs.get ('device-make-and-model') - device_id = attrs.get ('device-id') - if not (make_and_model and device_id): - continue - -+ id_fields = cupshelpers.parseDeviceID (device_id) -+ this_id = "MFG:%s;MDL:%s;" % (id_fields['MFG'], id_fields['MDL']) -+ device_ids.append (this_id) - n += 1 - -+if device_ids: -+ try: -+ bus = dbus.SessionBus () -+ -+ print "Installing relevant drivers using session service" -+ try: -+ obj = bus.get_object ("org.freedesktop.PackageKit", -+ "/org/freedesktop/PackageKit") -+ proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") -+ proxy.InstallPrinterDrivers (0, device_ids, -+ "hide-finished", timeout=3600) -+ except dbus.exceptions.DBusException, (e, r): -+ print "Ignoring exception: %s" % e -+ except dbus.exceptions.DBusException: -+ try: -+ bus = dbus.SystemBus () -+ -+ print "Installing relevant drivers using system service" -+ try: -+ obj = bus.get_object ("com.redhat.PrinterDriversInstaller", -+ "/com/redhat/PrinterDriversInstaller") -+ proxy = dbus.Interface (obj, -+ "com.redhat.PrinterDriversInstaller") -+ for device_id in device_ids: -+ id_dict = cupshelpers.parseDeviceID (device_id) -+ proxy.InstallDrivers (id_dict['MFG'], id_dict['MDL'], '', -+ timeout=3600) -+ except dbus.exceptions.DBusException: -+ print "Ignoring exception: %s" % e -+ except dbus.exceptions.DBusException: -+ print "D-Bus not available so skipping package installation" -+ -+ -+print "Fetching driver list" -+ppds = PPDs (c.getPPDs ()) -+ppds._init_ids () -+makes = ppds.getMakes () -+ - i = 1 - item = unichr (0x251c) + unichr (0x2500) + unichr (0x2500) - last = unichr (0x2514) + unichr (0x2500) + unichr (0x2500) -@@ -92,7 +131,7 @@ for device, attrs in devices.iteritems ( - print "%s %s: MFG:%s;MDL:%s;" % (line, make_and_model, - id_fields['MFG'], - id_fields['MDL']) -- -+ - try: - drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] - except KeyError: diff --git a/system-config-printer-cupsconnection-dealloc.patch b/system-config-printer-cupsconnection-dealloc.patch deleted file mode 100644 index d25f4c4..0000000 --- a/system-config-printer-cupsconnection-dealloc.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c ---- system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc 2010-03-08 17:06:47.000000000 +0100 -+++ system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c 2010-03-08 17:06:47.000000000 +0100 -@@ -231,37 +231,43 @@ Connection_dealloc (Connection *self) - { - int i, j; - -- if (NumConnections > 1) -- { -- Connection **new_array = calloc (NumConnections - 1, -- sizeof (Connection *)); -+ for (j = 0; j < NumConnections; j++) -+ if (Connections[j] == self) -+ break; - -- for (i = 0, j = 0; i < NumConnections; i++) -+ if (j < NumConnections) -+ { -+ if (NumConnections > 1) - { -- if (Connections[i] == self) -+ Connection **new_array = calloc (NumConnections - 1, -+ sizeof (Connection *)); -+ -+ if (new_array) - { -- if (!new_array) -- Connections[i] = NULL; -+ int k; -+ for (i = 0, k = 0; i < NumConnections; i++) -+ { -+ if (i == j) -+ continue; - -- continue; -- } -+ new_array[k++] = Connections[i]; -+ } - -- if (new_array) -- new_array[j++] = Connections[i]; -+ free (Connections); -+ Connections = new_array; -+ NumConnections--; -+ } else -+ /* Failed to allocate memory. Just clear out the reference. */ -+ Connections[j] = NULL; - } -- -- if (new_array) { -+ else -+ { -+ /* The only element is the one we no longer need. */ - free (Connections); -- Connections = new_array; -- NumConnections--; -+ Connections = NULL; -+ NumConnections = 0; - } - } -- else -- { -- free (Connections); -- Connections = NULL; -- NumConnections = 0; -- } - - if (self->http) { - debugprintf ("httpClose()\n"); diff --git a/system-config-printer-icon-name.patch b/system-config-printer-icon-name.patch deleted file mode 100644 index bf17c2d..0000000 --- a/system-config-printer-icon-name.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up system-config-printer-1.1.93/system-config-printer.py.icon-name system-config-printer-1.1.93/system-config-printer.py ---- system-config-printer-1.1.93/system-config-printer.py.icon-name 2010-02-26 15:15:26.000000000 +0000 -+++ system-config-printer-1.1.93/system-config-printer.py 2010-03-01 18:53:04.502609395 +0000 -@@ -1463,19 +1463,19 @@ class GUI(GtkGUI, monitor.Watcher): - 'i-network-printer'), - 'local-printer': - (_("Printer"), -- 'gnome-dev-printer'), -+ 'printer'), - 'local-fax': - (_("Fax"), -- 'gnome-dev-printer'), -+ 'printer'), - 'local-class': - (_("Class"), -- 'gnome-dev-printer'), -+ 'printer'), - 'ipp-printer': - (_("Network printer"), - 'i-network-printer'), - 'smb-printer': - (_("Network print share"), -- 'gnome-dev-printer'), -+ 'printer'), - 'network-printer': - (_("Network printer"), - 'i-network-printer'), diff --git a/system-config-printer-import-gobject.patch b/system-config-printer-import-gobject.patch deleted file mode 100644 index d5fac29..0000000 --- a/system-config-printer-import-gobject.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up system-config-printer-1.1.93/gtkspinner.py.import-gobject system-config-printer-1.1.93/gtkspinner.py ---- system-config-printer-1.1.93/gtkspinner.py.import-gobject 2009-12-03 17:06:22.000000000 +0000 -+++ system-config-printer-1.1.93/gtkspinner.py 2010-02-28 09:24:55.338693167 +0000 -@@ -2,7 +2,8 @@ - - ## system-config-printer - --## Copyright (C) 2009 Tim Waugh -+## Copyright (C) 2009, 2010 Red Hat, Inc -+## Author: Tim Waugh - - ## This program is free software; you can redistribute it and/or modify - ## it under the terms of the GNU General Public License as published by -@@ -19,6 +20,7 @@ - ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - import glib -+import gobject - import gtk - - class Spinner: diff --git a/system-config-printer-missing-imports.patch b/system-config-printer-missing-imports.patch deleted file mode 100644 index 08caa9f..0000000 --- a/system-config-printer-missing-imports.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports system-config-printer-1.1.18/AdvancedServerSettings.py ---- system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports 2010-03-10 09:33:45.000000000 +0000 -+++ system-config-printer-1.1.18/AdvancedServerSettings.py 2010-03-16 17:30:11.388600957 +0000 -@@ -2,8 +2,9 @@ - - ## system-config-printer - --## Copyright (C) 2008, 2009 Red Hat, Inc. --## Copyright (C) 2008, 2009 Tim Waugh -+## Copyright (C) 2008, 2009, 2010 Red Hat, Inc. -+## Authors: -+## Tim Waugh - - ## This program is free software; you can redistribute it and/or modify - ## it under the terms of the GNU General Public License as published by -@@ -20,6 +21,7 @@ - ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - from gettext import gettext as _ -+import cups - import gobject - import gtk - import os -diff -up system-config-printer-1.1.18/jobviewer.py.missing-imports system-config-printer-1.1.18/jobviewer.py ---- system-config-printer-1.1.18/jobviewer.py.missing-imports 2010-03-10 09:33:45.000000000 +0000 -+++ system-config-printer-1.1.18/jobviewer.py 2010-03-16 17:30:11.398601208 +0000 -@@ -23,6 +23,7 @@ import dbus.glib - import dbus.service - import pynotify - import gettext -+import glib - import gobject - import gtk - import gtk.gdk diff --git a/system-config-printer-no-epydoc.patch b/system-config-printer-no-epydoc.patch index e3d5225..dd79aca 100644 --- a/system-config-printer-no-epydoc.patch +++ b/system-config-printer-no-epydoc.patch @@ -1,7 +1,7 @@ -diff -up system-config-printer-1.1.16/Makefile.am.no-epydoc system-config-printer-1.1.16/Makefile.am ---- system-config-printer-1.1.16/Makefile.am.no-epydoc 2009-12-22 14:44:19.000000000 +0000 -+++ system-config-printer-1.1.16/Makefile.am 2010-01-19 12:50:09.018955351 +0000 -@@ -256,7 +256,9 @@ $(man_MANS): $(top_srcdir)/man/system-co +diff -up system-config-printer-1.2.0/Makefile.am.no-epydoc system-config-printer-1.2.0/Makefile.am +--- system-config-printer-1.2.0/Makefile.am.no-epydoc 2010-03-16 18:22:08.000000000 +0000 ++++ system-config-printer-1.2.0/Makefile.am 2010-03-17 14:37:37.977366218 +0000 +@@ -247,7 +247,9 @@ $(man_MANS): $(top_srcdir)/man/system-co html: $(EXPORT_MODULES) rm -rf html @@ -10,12 +10,12 @@ diff -up system-config-printer-1.1.16/Makefile.am.no-epydoc system-config-printe + pydoc -w $(EXPORT_MODULES) + mv $(patsubst %,%.html,$(EXPORT_MODULES)) html - distcheck-hook: update-po + distcheck-hook: update-po missing-imports -diff -up system-config-printer-1.1.16/Makefile.in.no-epydoc system-config-printer-1.1.16/Makefile.in ---- system-config-printer-1.1.16/Makefile.in.no-epydoc 2009-12-22 14:44:34.000000000 +0000 -+++ system-config-printer-1.1.16/Makefile.in 2010-01-19 12:50:09.020955776 +0000 -@@ -1440,7 +1440,9 @@ $(man_MANS): $(top_srcdir)/man/system-co +diff -up system-config-printer-1.2.0/Makefile.in.no-epydoc system-config-printer-1.2.0/Makefile.in +--- system-config-printer-1.2.0/Makefile.in.no-epydoc 2010-03-17 14:29:52.000000000 +0000 ++++ system-config-printer-1.2.0/Makefile.in 2010-03-17 14:37:19.098486129 +0000 +@@ -1430,7 +1430,9 @@ $(man_MANS): $(top_srcdir)/man/system-co html: $(EXPORT_MODULES) rm -rf html @@ -24,11 +24,11 @@ diff -up system-config-printer-1.1.16/Makefile.in.no-epydoc system-config-printe + pydoc -w $(EXPORT_MODULES) + mv $(patsubst %,%.html,$(EXPORT_MODULES)) html - distcheck-hook: update-po + distcheck-hook: update-po missing-imports -diff -up system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc system-config-printer-1.1.16/pycups-1.9.48/Makefile ---- system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc 2010-01-19 12:34:47.000000000 +0000 -+++ system-config-printer-1.1.16/pycups-1.9.48/Makefile 2010-01-19 12:50:30.098955294 +0000 +diff -up system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc system-config-printer-1.2.0/pycups-1.9.48/Makefile +--- system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc 2010-01-19 12:34:47.000000000 +0000 ++++ system-config-printer-1.2.0/pycups-1.9.49/Makefile 2010-03-17 14:36:52.248486676 +0000 @@ -14,7 +14,9 @@ cups.so: $(SOURCES) doc: cups.so @@ -40,9 +40,9 @@ diff -up system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc system-co clean: -rm -rf build cups.so *.pyc *~ -diff -up system-config-printer-1.1.16/pysmbc-1.0.6/Makefile.no-epydoc system-config-printer-1.1.16/pysmbc-1.0.6/Makefile ---- system-config-printer-1.1.16/pysmbc-1.0.6/Makefile.no-epydoc 2008-10-20 15:51:14.000000000 +0100 -+++ system-config-printer-1.1.16/pysmbc-1.0.6/Makefile 2010-01-19 12:50:30.100081172 +0000 +diff -up system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc system-config-printer-1.2.0/pysmbc-1.0.6/Makefile +--- system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc 2008-10-20 15:51:14.000000000 +0100 ++++ system-config-printer-1.2.0/pysmbc-1.0.6/Makefile 2010-03-17 14:36:52.251484687 +0000 @@ -12,7 +12,9 @@ smbc.so: $(SOURCES) doc: smbc.so diff --git a/system-config-printer.spec b/system-config-printer.spec index a359a43..a705082 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,4 +1,4 @@ -%global pycups_version 1.9.48 +%global pycups_version 1.9.49 %global pysmbc_version 1.0.6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -6,8 +6,8 @@ Summary: A printer administration tool Name: system-config-printer -Version: 1.1.93 -Release: 7%{?dist} +Version: 1.2.0 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,11 +19,6 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch -Patch3: system-config-printer-import-gobject.patch -Patch4: system-config-printer-check-install.patch -Patch5: system-config-printer-icon-name.patch -Patch6: system-config-printer-cupsconnection-dealloc.patch -Patch7: system-config-printer-missing-imports.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -88,23 +83,8 @@ printers. # Convert InstallPrinterDriver requests to lower-case. %patch2 -p1 -b .lowercase-mfg-mdl -# Import gobject in gtkspinner. -%patch3 -p1 -b .import-gobject - -# Attempt to install relevant driver packages in Device IDs checker. -%patch4 -p1 -b .check-install - -# Use 'printer' icon name instead of 'gnome-dev-printer'. -%patch5 -p1 -b .icon-name - -# Fix pycups Connection_dealloc() -%patch6 -p1 -b .cupsconnection-dealloc - -# Import modules we catch exceptions from (bug #574117). -%patch7 -p1 -b .missing-imports - %build -%configure --with-udev-rules --with-polkit-1 +%configure --with-udev-rules pushd pycups-%{pycups_version} make @@ -218,6 +198,12 @@ rm -rf %buildroot exit 0 %changelog +* Wed Mar 17 2010 Tim Waugh - 1.2.0-1 +- Updated to pycups-1.9.49. +- 1.2.0: + - Another error handling fix in check-device-ids.py. + - Added StartupNotify=true to 'manage print jobs' desktop file. + * Tue Mar 16 2010 Tim Waugh - 1.1.93-7 - Import modules we catch exceptions from (bug #574117). From 30b0e07dd3bee2eab09666528bc9ba41a0a6c5a6 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 18 Mar 2010 16:49:46 +0000 Subject: [PATCH 15/46] - Fixed traceback in check-driver-ids.py when no drivers are found (bug #574827). --- system-config-printer-cdi-no-drivers.patch | 12 ++++++++++++ system-config-printer.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-no-drivers.patch diff --git a/system-config-printer-cdi-no-drivers.patch b/system-config-printer-cdi-no-drivers.patch new file mode 100644 index 0000000..b973dfb --- /dev/null +++ b/system-config-printer-cdi-no-drivers.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-no-drivers system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-no-drivers 2010-03-17 14:20:35.000000000 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-18 16:29:56.065865306 +0000 +@@ -167,7 +167,7 @@ for device, attrs in devices.iteritems ( + try: + drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] + except KeyError: +- drivers = None ++ drivers = [] + + if i < n: + more = unichr (0x2502) diff --git a/system-config-printer.spec b/system-config-printer.spec index a705082..25db949 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.2.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch +Patch3: system-config-printer-cdi-no-drivers.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -83,6 +84,10 @@ printers. # Convert InstallPrinterDriver requests to lower-case. %patch2 -p1 -b .lowercase-mfg-mdl +# Fixed traceback in check-driver-ids.py when no drivers are found +# (bug #574827). +%patch3 -p1 -b .cdi-no-drivers + %build %configure --with-udev-rules @@ -198,6 +203,10 @@ rm -rf %buildroot exit 0 %changelog +* Thu Mar 18 2010 Tim Waugh - 1.2.0-2 +- Fixed traceback in check-driver-ids.py when no drivers are found + (bug #574827). + * Wed Mar 17 2010 Tim Waugh - 1.2.0-1 - Updated to pycups-1.9.49. - 1.2.0: From e2fb5cc4bc010a2e99df3fd0c6f863f6937562da Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Mar 2010 11:44:41 +0000 Subject: [PATCH 16/46] - Show CMD field in check-device-ids.py. --- system-config-printer-cdi-cmd.patch | 23 +++++++++++++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-cmd.patch diff --git a/system-config-printer-cdi-cmd.patch b/system-config-printer-cdi-cmd.patch new file mode 100644 index 0000000..f6f7c05 --- /dev/null +++ b/system-config-printer-cdi-cmd.patch @@ -0,0 +1,23 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-cmd system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-cmd 2010-03-19 10:39:18.000000000 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-19 10:39:55.011621602 +0000 +@@ -160,9 +160,16 @@ for device, attrs in devices.iteritems ( + else: + line = last + +- print "%s %s: MFG:%s;MDL:%s;" % (line, make_and_model, +- id_fields['MFG'], +- id_fields['MDL']) ++ cmd = id_fields['CMD'] ++ if cmd: ++ cmd = "CMD:%s;" % reduce (lambda x, y: x + ',' + y, cmd) ++ else: ++ cmd = "" ++ ++ print "%s %s: MFG:%s;MDL:%s;%s" % (line, make_and_model, ++ id_fields['MFG'], ++ id_fields['MDL'], ++ cmd) + + try: + drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] diff --git a/system-config-printer.spec b/system-config-printer.spec index 25db949..c705c7d 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.2.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -20,6 +20,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-cdi-no-drivers.patch +Patch4: system-config-printer-cdi-cmd.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -88,6 +89,9 @@ printers. # (bug #574827). %patch3 -p1 -b .cdi-no-drivers +# Show CMD field in check-device-ids.py. +%patch4 -p1 -b .cdi-cmd + %build %configure --with-udev-rules @@ -203,6 +207,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 19 2010 Tim Waugh - 1.2.0-3 +- Show CMD field in check-device-ids.py. + * Thu Mar 18 2010 Tim Waugh - 1.2.0-2 - Fixed traceback in check-driver-ids.py when no drivers are found (bug #574827). From 8c4642ddf8151991b13bd9f92bd295ad9abda6c4 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Mar 2010 11:51:31 +0000 Subject: [PATCH 17/46] - The canonical name for Kyocera is Kyocera Mita. --- system-config-printer-kyocera-mita.patch | 39 ++++++++++++++++++++++++ system-config-printer.spec | 5 +++ 2 files changed, 44 insertions(+) create mode 100644 system-config-printer-kyocera-mita.patch diff --git a/system-config-printer-kyocera-mita.patch b/system-config-printer-kyocera-mita.patch new file mode 100644 index 0000000..160e2a7 --- /dev/null +++ b/system-config-printer-kyocera-mita.patch @@ -0,0 +1,39 @@ +diff -up system-config-printer-1.2.0/cupshelpers/ppds.py.kyocera-mita system-config-printer-1.2.0/cupshelpers/ppds.py +--- system-config-printer-1.2.0/cupshelpers/ppds.py.kyocera-mita 2010-03-09 17:52:15.000000000 +0000 ++++ system-config-printer-1.2.0/cupshelpers/ppds.py 2010-03-19 11:43:38.823746889 +0000 +@@ -137,6 +137,15 @@ def ppdMakeModelSplit (ppd_make_and_mode + elif l.startswith ("konica minolta "): + make = "KONICA MINOLTA" + model = ppd_make_and_model[15:] ++ elif l.startswith ("lexmark international "): ++ make = "Lexmark" ++ model = ppd_make_and_model[22:] ++ elif l.startswith ("kyocera mita "): ++ make = "Kyocera Mita" ++ model = ppd_make_and_model[13:] ++ elif l.startswith ("kyocera "): ++ make = "Kyocera Mita" ++ model = ppd_make_and_model[8:] + + # Finally, take the first word as the name of the manufacturer. + else: +@@ -156,9 +165,6 @@ def ppdMakeModelSplit (ppd_make_and_mode + makel.endswith ("packard")): + make = "HP" + makel = "hp" +- elif makel == "lexmark international": +- make = "Lexmark" +- makel = "lexmark" + + # HP PPDs give NickNames like: + # *NickName: "HP LaserJet 4 Plus v2013.111 Postscript (recommended)" +@@ -585,7 +591,8 @@ class PPDs: + mdll = mdl.lower () + + mfgrepl = {"hewlett-packard": "hp", +- "lexmark international": "lexmark"} ++ "lexmark international": "lexmark", ++ "kyocera": "kyocera mita"} + if self.lmakes.has_key (mfgl): + # Found manufacturer. + make = self.lmakes[mfgl] diff --git a/system-config-printer.spec b/system-config-printer.spec index c705c7d..11875b3 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -21,6 +21,7 @@ Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-cdi-no-drivers.patch Patch4: system-config-printer-cdi-cmd.patch +Patch5: system-config-printer-kyocera-mita.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -92,6 +93,9 @@ printers. # Show CMD field in check-device-ids.py. %patch4 -p1 -b .cdi-cmd +# The canonical name for Kyocera is Kyocera Mita. +%patch5 -p1 -b .kyocera-mita + %build %configure --with-udev-rules @@ -208,6 +212,7 @@ exit 0 %changelog * Fri Mar 19 2010 Tim Waugh - 1.2.0-3 +- The canonical name for Kyocera is Kyocera Mita. - Show CMD field in check-device-ids.py. * Thu Mar 18 2010 Tim Waugh - 1.2.0-2 From fd124d9dc4eca64d9e7bb624796fa111d7be036c Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Mar 2010 12:59:13 +0000 Subject: [PATCH 18/46] - check-device-ids.py: Fixed driver-URI to filename mapping. --- system-config-printer-cdi-filename.patch | 21 +++++++++++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-filename.patch diff --git a/system-config-printer-cdi-filename.patch b/system-config-printer-cdi-filename.patch new file mode 100644 index 0000000..e0fabb7 --- /dev/null +++ b/system-config-printer-cdi-filename.patch @@ -0,0 +1,21 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-filename system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-filename 2010-03-19 12:39:49.195620887 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-19 12:40:09.012748969 +0000 +@@ -115,16 +115,13 @@ makes = ppds.getMakes () + + def driver_uri_to_filename (uri): + schemeparts = uri.split (':', 2) +- if len (schemeparts) < 1: ++ if len (schemeparts) < 2: + return "/usr/share/cups/model/" + uri + + scheme = schemeparts[0] + if scheme != "drv": + return "/usr/lib/cups/driver/" + scheme + +- if len (schemeparts) < 2: +- return "" +- + rest = schemeparts[1] + rest = rest.lstrip ('/') + parts = rest.split ('/') diff --git a/system-config-printer.spec b/system-config-printer.spec index 11875b3..916b8a0 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.2.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -22,6 +22,7 @@ Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-cdi-no-drivers.patch Patch4: system-config-printer-cdi-cmd.patch Patch5: system-config-printer-kyocera-mita.patch +Patch6: system-config-printer-cdi-filename.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -96,6 +97,9 @@ printers. # The canonical name for Kyocera is Kyocera Mita. %patch5 -p1 -b .kyocera-mita +# check-device-ids.py: Fixed driver-URI to filename mapping. +%patch6 -p1 -b .cdi-filename + %build %configure --with-udev-rules @@ -211,6 +215,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 19 2010 Tim Waugh - 1.2.0-4 +- check-device-ids.py: Fixed driver-URI to filename mapping. + * Fri Mar 19 2010 Tim Waugh - 1.2.0-3 - The canonical name for Kyocera is Kyocera Mita. - Show CMD field in check-device-ids.py. From f95818ce0641f230fafa22f7db74bcbb7e79bad3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 22 Mar 2010 13:01:10 +0000 Subject: [PATCH 19/46] - Fixed pycups build with new distutils. - Fixed reconnection error handling in IPPAuthOperation class (bug #575198). --- system-config-printer-pycups-build.patch | 12 +++++++++ system-config-printer-reconnect-error.patch | 29 +++++++++++++++++++++ system-config-printer.spec | 19 +++++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-pycups-build.patch create mode 100644 system-config-printer-reconnect-error.patch diff --git a/system-config-printer-pycups-build.patch b/system-config-printer-pycups-build.patch new file mode 100644 index 0000000..76a1e35 --- /dev/null +++ b/system-config-printer-pycups-build.patch @@ -0,0 +1,12 @@ +diff -up pycups-1.9.49/Makefile.pycups-build pycups-1.9.49/Makefile +--- pycups-1.9.49/Makefile.pycups-build 2010-03-22 12:46:31.351447572 +0000 ++++ pycups-1.9.49/Makefile 2010-03-22 12:46:41.155449391 +0000 +@@ -31,7 +31,7 @@ dist: + install: + ROOT= ; \ + if [ -n "$$DESTDIR" ]; then ROOT="--root $$DESTDIR"; fi; \ +- python setup.py install $$ROOT ++ CFLAGS=-DVERSION=\\\"$(VERSION)\\\" python setup.py install $$ROOT + + .PHONY: doc clean dist install + diff --git a/system-config-printer-reconnect-error.patch b/system-config-printer-reconnect-error.patch new file mode 100644 index 0000000..31f5455 --- /dev/null +++ b/system-config-printer-reconnect-error.patch @@ -0,0 +1,29 @@ +diff -up system-config-printer-1.2.0/asyncipp.py.reconnect-error system-config-printer-1.2.0/asyncipp.py +--- system-config-printer-1.2.0/asyncipp.py.reconnect-error 2010-01-27 11:17:44.000000000 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-22 11:54:54.320452998 +0000 +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + +-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc. ++## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc. + ## Copyright (C) 2008 Novell, Inc. + ## Author: Tim Waugh + +@@ -333,7 +333,7 @@ class _IPPAuthOperation: + # This is the initial "connection" operation, or a + # subsequent reconnection attempt. + debugprint ("Connection/reconnection failed") +- return self._reconnect_error (exc) ++ return self._reconnect_error (conn, exc) + + if self._cancel: + return self._error (exc) +@@ -353,7 +353,7 @@ class _IPPAuthOperation: + e == cups.IPP_FORBIDDEN): + forbidden = (e == cups.IPP_FORBIDDEN) + elif e == cups.IPP_SERVICE_UNAVAILABLE: +- return self._reconnect_error (exc) ++ return self._reconnect_error (conn, exc) + else: + return self._error (exc) + elif type (exc) == cups.HTTPError: diff --git a/system-config-printer.spec b/system-config-printer.spec index 916b8a0..f940977 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.2.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -23,6 +23,9 @@ Patch3: system-config-printer-cdi-no-drivers.patch Patch4: system-config-printer-cdi-cmd.patch Patch5: system-config-printer-kyocera-mita.patch Patch6: system-config-printer-cdi-filename.patch +Patch7: system-config-printer-reconnect-error.patch + +Patch100: system-config-printer-pycups-build.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -100,6 +103,16 @@ printers. # check-device-ids.py: Fixed driver-URI to filename mapping. %patch6 -p1 -b .cdi-filename +# Fixed reconnection error handling in IPPAuthOperation class (bug #575198). +%patch7 -p1 -b .reconnect-error + +pushd pycups-%{pycups_version} + +# Fixed pycups build with new distutils. +%patch100 -p1 -b .pycups-build + +popd + %build %configure --with-udev-rules @@ -215,6 +228,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 22 2010 Tim Waugh - 1.2.0-5 +- Fixed pycups build with new distutils. +- Fixed reconnection error handling in IPPAuthOperation class (bug #575198). + * Fri Mar 19 2010 Tim Waugh - 1.2.0-4 - check-device-ids.py: Fixed driver-URI to filename mapping. From f59b3e6ffe6db0ffe6f66a995616b1d005e5512e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 22 Mar 2010 17:31:40 +0000 Subject: [PATCH 20/46] - Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). --- system-config-printer-downloadable-drivers.patch | 11 +++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-downloadable-drivers.patch diff --git a/system-config-printer-downloadable-drivers.patch b/system-config-printer-downloadable-drivers.patch new file mode 100644 index 0000000..b840e2b --- /dev/null +++ b/system-config-printer-downloadable-drivers.patch @@ -0,0 +1,11 @@ +diff -up system-config-printer-1.1.18/system-config-printer.py.downloadable-drivers system-config-printer-1.1.18/system-config-printer.py +--- system-config-printer-1.1.18/system-config-printer.py.downloadable-drivers 2010-03-10 09:33:46.000000000 +0000 ++++ system-config-printer-1.1.18/system-config-printer.py 2010-03-22 17:18:40.177572582 +0000 +@@ -6334,6 +6334,7 @@ class NewPrinterGUI(GtkGUI): + # Should report error. + print drivers + print traceback.extract_tb(drivers[2], limit=None) ++ self.downloadable_drivers = dict() + return + + self.openprinting_query_handle = None diff --git a/system-config-printer.spec b/system-config-printer.spec index f940977..e8a1022 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.2.0 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -24,6 +24,7 @@ Patch4: system-config-printer-cdi-cmd.patch Patch5: system-config-printer-kyocera-mita.patch Patch6: system-config-printer-cdi-filename.patch Patch7: system-config-printer-reconnect-error.patch +Patch8: system-config-printer-downloadable-drivers.patch Patch100: system-config-printer-pycups-build.patch @@ -106,6 +107,9 @@ printers. # Fixed reconnection error handling in IPPAuthOperation class (bug #575198). %patch7 -p1 -b .reconnect-error +# Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). +%patch8 -p1 -b .downloadable-drivers + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -228,6 +232,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 22 2010 Tim Waugh - 1.2.0-6 +- Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). + * Mon Mar 22 2010 Tim Waugh - 1.2.0-5 - Fixed pycups build with new distutils. - Fixed reconnection error handling in IPPAuthOperation class (bug #575198). From 4729a0794232f176b744654290a1de9583bf917e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 24 Mar 2010 10:30:58 +0000 Subject: [PATCH 21/46] - Use new JobCancelPurge cups-pk-helper method (bug #576496). --- system-config-printer-JobCancel.patch | 12 ++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-JobCancel.patch diff --git a/system-config-printer-JobCancel.patch b/system-config-printer-JobCancel.patch new file mode 100644 index 0000000..36e5b59 --- /dev/null +++ b/system-config-printer-JobCancel.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.2.0/asyncpk1.py.JobCancel system-config-printer-1.2.0/asyncpk1.py +--- system-config-printer-1.2.0/asyncpk1.py.JobCancel 2010-02-18 15:17:50.000000000 +0000 ++++ system-config-printer-1.2.0/asyncpk1.py 2010-03-24 09:37:25.782824070 +0000 +@@ -431,7 +431,7 @@ class PK1Connection: + args, kwds) + + self._call_with_pk (use_pycups, +- 'JobCancel', tup, reply_handler, error_handler, ++ 'JobCancelPurge', tup, reply_handler, error_handler, + self._nothing_to_unpack, + self._conn.cancelJob, args, kwds) + diff --git a/system-config-printer.spec b/system-config-printer.spec index e8a1022..4768f91 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.2.0 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -25,6 +25,7 @@ Patch5: system-config-printer-kyocera-mita.patch Patch6: system-config-printer-cdi-filename.patch Patch7: system-config-printer-reconnect-error.patch Patch8: system-config-printer-downloadable-drivers.patch +Patch9: system-config-printer-JobCancel.patch Patch100: system-config-printer-pycups-build.patch @@ -110,6 +111,9 @@ printers. # Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). %patch8 -p1 -b .downloadable-drivers +# Use new JobCancelPurge cups-pk-helper method (bug #576496). +%patch9 -p1 -b .JobCancel + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -232,6 +236,9 @@ rm -rf %buildroot exit 0 %changelog +* Wed Mar 24 2010 Tim Waugh - 1.2.0-7 +- Use new JobCancelPurge cups-pk-helper method (bug #576496). + * Mon Mar 22 2010 Tim Waugh - 1.2.0-6 - Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). From 8b21dbb50fdc4b2ea4856cc8313eb8b5823c03e0 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Mar 2010 16:29:11 +0000 Subject: [PATCH 22/46] - Make inklevel widget easier to read (bug #576930). --- system-config-printer-inklevel.patch | 72 ++++++++++++++++++++++++++++ system-config-printer.spec | 9 +++- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-inklevel.patch diff --git a/system-config-printer-inklevel.patch b/system-config-printer-inklevel.patch new file mode 100644 index 0000000..3a05eed --- /dev/null +++ b/system-config-printer-inklevel.patch @@ -0,0 +1,72 @@ +diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-printer-1.2.0/gtkinklevel.py +--- system-config-printer-1.2.0/gtkinklevel.py.inklevel 2009-12-03 17:06:22.000000000 +0000 ++++ system-config-printer-1.2.0/gtkinklevel.py 2010-03-25 16:25:55.108235939 +0000 +@@ -1,7 +1,8 @@ + #!/usr/bin/env python + +-## Copyright (C) 2009 Tim Waugh +-## Copyright (C) 2009 Red Hat, Inc. ++## Copyright (C) 2010 Red Hat, Inc. ++## Authors: ++## Tim Waugh + + ## This program is free software; you can redistribute it and/or modify + ## it under the terms of the GNU General Public License as published by +@@ -56,10 +57,9 @@ class GtkInkLevel (gtk.DrawingArea): + ctx.translate (thickness, thickness) + ctx.scale (w - 2 * thickness, h - 2 * thickness) + thickness = max (ctx.device_to_user_distance (thickness, thickness)) +- ctx.set_line_width (thickness) +- self.draw (ctx) ++ self.draw (ctx, thickness) + +- def draw (self, ctx): ++ def draw (self, ctx, thickness): + r = self._color.red / 65535.0 + g = self._color.green / 65535.0 + b = self._color.blue / 65535.0 +@@ -72,6 +72,7 @@ class GtkInkLevel (gtk.DrawingArea): + ctx.curve_to (0.0, 0.5, 0.1, 0.2, 0.5, 0.0) + ctx.close_path () + ctx.set_source_rgb (r, g, b) ++ ctx.set_line_width (thickness) + ctx.stroke_preserve () + if fill_point > 0.0: + grad_width = 0.10 +@@ -90,6 +91,25 @@ class GtkInkLevel (gtk.DrawingArea): + ctx.set_source_rgb (1, 1, 1) + ctx.fill () + ++ ctx.set_line_width (thickness / 2) ++ ++ ctx.move_to (0.03, 0.5) ++ ctx.line_to (0.9, 0.5) ++ ctx.set_source_rgb (r, g, b) ++ ctx.set_dash ([0.1]) ++ ctx.stroke () ++ ++ ctx.move_to (0, 0.75) ++ ctx.line_to (1, 0.75) ++ ctx.set_source_rgb (r, g, b) ++ ctx.set_dash ([0.05]) ++ ctx.stroke () ++ ++ ctx.move_to (0.15, 0.25) ++ ctx.line_to (0.6, 0.25) ++ ctx.set_source_rgb (r, g, b) ++ ctx.stroke () ++ + if __name__ == '__main__': + # Try it out. + import gobject +diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py +--- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-25 16:25:37.904233984 +0000 ++++ system-config-printer-1.2.0/system-config-printer.py 2010-03-25 16:26:07.037359284 +0000 +@@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher): + vbox = gtk.VBox (spacing=6) + subhbox = gtk.HBox () + inklevel = gtkinklevel.GtkInkLevel (color, level) ++ inklevel.set_tooltip_text ("%d%%" % level) + subhbox.pack_start (inklevel, True, False, 0) + vbox.pack_start (subhbox, False, False, 0) + label = gtk.Label (name) diff --git a/system-config-printer.spec b/system-config-printer.spec index 4768f91..4a431f9 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.2.0 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -26,6 +26,7 @@ Patch6: system-config-printer-cdi-filename.patch Patch7: system-config-printer-reconnect-error.patch Patch8: system-config-printer-downloadable-drivers.patch Patch9: system-config-printer-JobCancel.patch +Patch10: system-config-printer-inklevel.patch Patch100: system-config-printer-pycups-build.patch @@ -114,6 +115,9 @@ printers. # Use new JobCancelPurge cups-pk-helper method (bug #576496). %patch9 -p1 -b .JobCancel +# Make inklevel widget easier to read (bug #576930). +%patch10 -p1 -b .inklevel + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -236,6 +240,9 @@ rm -rf %buildroot exit 0 %changelog +* Thu Mar 25 2010 Tim Waugh - 1.2.0-8 +- Make inklevel widget easier to read (bug #576930). + * Wed Mar 24 2010 Tim Waugh - 1.2.0-7 - Use new JobCancelPurge cups-pk-helper method (bug #576496). From 5c55ae5b79a2fc57c0b13c52d3acaf72e8ae0b71 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Mar 2010 16:33:49 +0000 Subject: [PATCH 23/46] - check-device-ids: search harder for missing Device IDs. --- system-config-printer-cdi-search-harder.patch | 26 +++++++++++++++++++ system-config-printer.spec | 5 ++++ 2 files changed, 31 insertions(+) create mode 100644 system-config-printer-cdi-search-harder.patch diff --git a/system-config-printer-cdi-search-harder.patch b/system-config-printer-cdi-search-harder.patch new file mode 100644 index 0000000..08e0252 --- /dev/null +++ b/system-config-printer-cdi-search-harder.patch @@ -0,0 +1,26 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-search-harder system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-search-harder 2010-03-25 16:33:07.312234926 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-25 16:33:07.409361225 +0000 +@@ -195,6 +195,7 @@ for device, attrs in devices.iteritems ( + print "%s (No drivers)" % more + + (mfr, mdl) = ppdMakeModelSplit (make_and_model) ++ matches = set (ppds.getInfoFromModel (mfr, mdl)) + mfrl = mfr.lower () + mdls = None + for make in makes: +@@ -204,9 +205,10 @@ for device, attrs in devices.iteritems ( + if mdls: + (s, bestmatches) = ppds._findBestMatchPPDs (mdls, id_fields['MDL']) + if s == ppds.STATUS_SUCCESS: +- missing = set (bestmatches) - set (drivers) +- for each in missing: +- print "%s MISSING %s [%s]" % (more, each, +- driver_uri_to_pkg (each)) ++ matches += set (bestmatches) ++ ++ missing = set (matches) - set (drivers) ++ for each in missing: ++ print "%s MISSING %s" % (more, each) + + i += 1 diff --git a/system-config-printer.spec b/system-config-printer.spec index 4a431f9..78337b1 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -27,6 +27,7 @@ Patch7: system-config-printer-reconnect-error.patch Patch8: system-config-printer-downloadable-drivers.patch Patch9: system-config-printer-JobCancel.patch Patch10: system-config-printer-inklevel.patch +Patch11: system-config-printer-cdi-search-harder.patch Patch100: system-config-printer-pycups-build.patch @@ -118,6 +119,9 @@ printers. # Make inklevel widget easier to read (bug #576930). %patch10 -p1 -b .inklevel +# check-device-ids: search harder for missing Device IDs. +%patch11 -p1 -b .cdi-search-harder + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -241,6 +245,7 @@ exit 0 %changelog * Thu Mar 25 2010 Tim Waugh - 1.2.0-8 +- check-device-ids: search harder for missing Device IDs. - Make inklevel widget easier to read (bug #576930). * Wed Mar 24 2010 Tim Waugh - 1.2.0-7 From 355a1cc4100b525fa14fc838f2f9c554526ee22b Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Mar 2010 16:37:37 +0000 Subject: [PATCH 24/46] - Fixed traceback in asyncipp (bug #576932). --- ...em-config-printer-asyncipp-traceback.patch | 31 +++++++++++++++++++ system-config-printer.spec | 5 +++ 2 files changed, 36 insertions(+) create mode 100644 system-config-printer-asyncipp-traceback.patch diff --git a/system-config-printer-asyncipp-traceback.patch b/system-config-printer-asyncipp-traceback.patch new file mode 100644 index 0000000..e33232f --- /dev/null +++ b/system-config-printer-asyncipp-traceback.patch @@ -0,0 +1,31 @@ +diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py +--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-25 16:36:02.264236367 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-25 16:36:08.558237409 +0000 +@@ -189,20 +189,20 @@ class _IPPConnectionThread(threading.Thr + + def _reply (self, result): + def send_reply (result): +- self._reply_handler (self._conn, result) ++ if self._reply_handler: ++ self._reply_handler (self._conn, result) + return False + +- if self._reply_handler: +- gobject.idle_add (send_reply, result) ++ gobject.idle_add (send_reply, result) + + def _error (self, exc): + def send_error (exc): +- self._error_handler (self._conn, exc) ++ if self._error_handler: ++ self._error_handler (self._conn, exc) + return False + +- if self._error_handler: +- debugprint ("Add %s to idle" % self._error_handler) +- gobject.idle_add (send_error, exc) ++ debugprint ("Add %s to idle" % self._error_handler) ++ gobject.idle_add (send_error, exc) + + ### + ### This is the user-visible class. Although it does not inherit from diff --git a/system-config-printer.spec b/system-config-printer.spec index 78337b1..848dd90 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -28,6 +28,7 @@ Patch8: system-config-printer-downloadable-drivers.patch Patch9: system-config-printer-JobCancel.patch Patch10: system-config-printer-inklevel.patch Patch11: system-config-printer-cdi-search-harder.patch +Patch12: system-config-printer-asyncipp-traceback.patch Patch100: system-config-printer-pycups-build.patch @@ -122,6 +123,9 @@ printers. # check-device-ids: search harder for missing Device IDs. %patch11 -p1 -b .cdi-search-harder +# Fixed traceback in asyncipp (bug #576932). +%patch12 -p1 -b .cdi-search-harder + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -245,6 +249,7 @@ exit 0 %changelog * Thu Mar 25 2010 Tim Waugh - 1.2.0-8 +- Fixed traceback in asyncipp (bug #576932). - check-device-ids: search harder for missing Device IDs. - Make inklevel widget easier to read (bug #576930). From 0e4bbba8fd5c4bf8da79f68a7d57c6d1fa00149d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Mar 2010 17:06:59 +0000 Subject: [PATCH 25/46] - Fixed cdi-search-harder patch. --- system-config-printer-cdi-search-harder.patch | 2 +- system-config-printer.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/system-config-printer-cdi-search-harder.patch b/system-config-printer-cdi-search-harder.patch index 08e0252..227255c 100644 --- a/system-config-printer-cdi-search-harder.patch +++ b/system-config-printer-cdi-search-harder.patch @@ -17,7 +17,7 @@ diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-search-harder syste - for each in missing: - print "%s MISSING %s [%s]" % (more, each, - driver_uri_to_pkg (each)) -+ matches += set (bestmatches) ++ matches = matches.union (set (bestmatches)) + + missing = set (matches) - set (drivers) + for each in missing: diff --git a/system-config-printer.spec b/system-config-printer.spec index 848dd90..16c6863 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.2.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -248,6 +248,9 @@ rm -rf %buildroot exit 0 %changelog +* Thu Mar 25 2010 Tim Waugh - 1.2.0-9 +- Fixed cdi-search-harder patch. + * Thu Mar 25 2010 Tim Waugh - 1.2.0-8 - Fixed traceback in asyncipp (bug #576932). - check-device-ids: search harder for missing Device IDs. From adaa22b190b5cb7bb7f4091fcd0b06d7dccaccb3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 25 Mar 2010 17:10:24 +0000 Subject: [PATCH 26/46] - check-device-ids: use correct paths for LSB model URIs. --- system-config-printer-cdi-lsb-paths.patch | 17 +++++++++++++++++ system-config-printer.spec | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 system-config-printer-cdi-lsb-paths.patch diff --git a/system-config-printer-cdi-lsb-paths.patch b/system-config-printer-cdi-lsb-paths.patch new file mode 100644 index 0000000..057c1cd --- /dev/null +++ b/system-config-printer-cdi-lsb-paths.patch @@ -0,0 +1,17 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-lsb-paths system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-lsb-paths 2010-03-25 17:06:01.198242692 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-25 17:07:10.914359770 +0000 +@@ -116,6 +116,13 @@ makes = ppds.getMakes () + def driver_uri_to_filename (uri): + schemeparts = uri.split (':', 2) + if len (schemeparts) < 2: ++ if uri.startswith ("lsb/usr/"): ++ return "/usr/share/ppd/" + uri[8:] ++ elif uri.startswith ("lsb/opt/"): ++ return "/opt/share/ppd/" + uri[8:] ++ elif uri.startswith ("lsb/local/"): ++ return "/usr/local/share/ppd/" + uri[10:] ++ + return "/usr/share/cups/model/" + uri + + scheme = schemeparts[0] diff --git a/system-config-printer.spec b/system-config-printer.spec index 16c6863..543ec57 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -29,6 +29,7 @@ Patch9: system-config-printer-JobCancel.patch Patch10: system-config-printer-inklevel.patch Patch11: system-config-printer-cdi-search-harder.patch Patch12: system-config-printer-asyncipp-traceback.patch +Patch13: system-config-printer-cdi-lsb-paths.patch Patch100: system-config-printer-pycups-build.patch @@ -126,6 +127,9 @@ printers. # Fixed traceback in asyncipp (bug #576932). %patch12 -p1 -b .cdi-search-harder +# check-device-ids: use correct paths for LSB model URIs. +%patch13 -p1 -b .cdi-lsb-paths + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -249,6 +253,7 @@ exit 0 %changelog * Thu Mar 25 2010 Tim Waugh - 1.2.0-9 +- check-device-ids: use correct paths for LSB model URIs. - Fixed cdi-search-harder patch. * Thu Mar 25 2010 Tim Waugh - 1.2.0-8 From 38cc47d62b1e409bbf5255d6f0b8bfcee2688ac1 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 26 Mar 2010 10:27:50 +0000 Subject: [PATCH 27/46] - More async traceback fixes (Ubuntu #547075). --- ...em-config-printer-asyncipp-traceback.patch | 39 ++++++++++++------- system-config-printer.spec | 8 +++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/system-config-printer-asyncipp-traceback.patch b/system-config-printer-asyncipp-traceback.patch index e33232f..61fa4cc 100644 --- a/system-config-printer-asyncipp-traceback.patch +++ b/system-config-printer-asyncipp-traceback.patch @@ -1,31 +1,44 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py ---- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-25 16:36:02.264236367 +0000 -+++ system-config-printer-1.2.0/asyncipp.py 2010-03-25 16:36:08.558237409 +0000 -@@ -189,20 +189,20 @@ class _IPPConnectionThread(threading.Thr +--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 10:26:00.420734896 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 10:26:03.187725661 +0000 +@@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr + self._auth_handler = auth_handler + self._auth_queue = Queue.Queue (1) + self.user = None ++ self._destroyed = False + debugprint ("+%s" % self) + + def __del__ (self): +@@ -157,6 +158,7 @@ class _IPPConnectionThread(threading.Thr + self._queue.task_done () + + debugprint ("Thread exiting") ++ self._destroyed = True + del self._conn # already destroyed + del self._reply_handler + del self._error_handler +@@ -189,18 +191,20 @@ class _IPPConnectionThread(threading.Thr def _reply (self, result): def send_reply (result): - self._reply_handler (self._conn, result) -+ if self._reply_handler: ++ if not self._destroyed and self._reply_handler: + self._reply_handler (self._conn, result) return False - if self._reply_handler: -- gobject.idle_add (send_reply, result) -+ gobject.idle_add (send_reply, result) ++ if not self._destroyed and self._reply_handler: + gobject.idle_add (send_reply, result) def _error (self, exc): def send_error (exc): - self._error_handler (self._conn, exc) -+ if self._error_handler: ++ if not self._destroyed and self._error_handler: + self._error_handler (self._conn, exc) return False - if self._error_handler: -- debugprint ("Add %s to idle" % self._error_handler) -- gobject.idle_add (send_error, exc) -+ debugprint ("Add %s to idle" % self._error_handler) -+ gobject.idle_add (send_error, exc) ++ if not self._destroyed and self._error_handler: + debugprint ("Add %s to idle" % self._error_handler) + gobject.idle_add (send_error, exc) - ### - ### This is the user-visible class. Although it does not inherit from diff --git a/system-config-printer.spec b/system-config-printer.spec index 543ec57..2667254 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.2.0 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -125,7 +125,8 @@ printers. %patch11 -p1 -b .cdi-search-harder # Fixed traceback in asyncipp (bug #576932). -%patch12 -p1 -b .cdi-search-harder +# More async traceback fixes (Ubuntu #547075). +%patch12 -p1 -b .asyncipp-traceback # check-device-ids: use correct paths for LSB model URIs. %patch13 -p1 -b .cdi-lsb-paths @@ -252,6 +253,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 26 2010 Tim Waugh - 1.2.0-10 +- More async traceback fixes (Ubuntu #547075). + * Thu Mar 25 2010 Tim Waugh - 1.2.0-9 - check-device-ids: use correct paths for LSB model URIs. - Fixed cdi-search-harder patch. From 9cf8a5691d2a58767863ad9def582eb7f9d3569b Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 26 Mar 2010 10:33:29 +0000 Subject: [PATCH 28/46] - Fixed window transience for 'Change Device URI'. --- system-config-printer-transience.patch | 12 ++++++++++++ system-config-printer.spec | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 system-config-printer-transience.patch diff --git a/system-config-printer-transience.patch b/system-config-printer-transience.patch new file mode 100644 index 0000000..1826f6a --- /dev/null +++ b/system-config-printer-transience.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.2.0/system-config-printer.py.transience system-config-printer-1.2.0/system-config-printer.py +--- system-config-printer-1.2.0/system-config-printer.py.transience 2010-03-26 10:31:28.943600745 +0000 ++++ system-config-printer-1.2.0/system-config-printer.py 2010-03-26 10:31:36.738725437 +0000 +@@ -4012,7 +4012,7 @@ class NewPrinterGUI(GtkGUI): + self.btnNetworkFind.set_sensitive (True) + self.lblNetworkFindNotFound.hide () + +- if dialog_mode == "ppd": ++ if dialog_mode in ["ppd", "device"]: + self.parent = self.mainapp.PrinterPropertiesDialog + else: + self.parent = self.mainapp.PrintersWindow diff --git a/system-config-printer.spec b/system-config-printer.spec index 2667254..ae96f0b 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -30,6 +30,7 @@ Patch10: system-config-printer-inklevel.patch Patch11: system-config-printer-cdi-search-harder.patch Patch12: system-config-printer-asyncipp-traceback.patch Patch13: system-config-printer-cdi-lsb-paths.patch +Patch14: system-config-printer-transience.patch Patch100: system-config-printer-pycups-build.patch @@ -131,6 +132,9 @@ printers. # check-device-ids: use correct paths for LSB model URIs. %patch13 -p1 -b .cdi-lsb-paths +# Fixed window transience for 'Change Device URI'. +%patch14 -p1 -b .transience + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -254,6 +258,7 @@ exit 0 %changelog * Fri Mar 26 2010 Tim Waugh - 1.2.0-10 +- Fixed window transience for 'Change Device URI'. - More async traceback fixes (Ubuntu #547075). * Thu Mar 25 2010 Tim Waugh - 1.2.0-9 From 83894836a8f65b62207662de70adfec7c92822b7 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 26 Mar 2010 10:36:13 +0000 Subject: [PATCH 29/46] - Better inklevel 25/50/75 markers. --- system-config-printer-inklevel.patch | 30 +++++++++++++++++----------- system-config-printer.spec | 2 ++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/system-config-printer-inklevel.patch b/system-config-printer-inklevel.patch index 3a05eed..1eabe3e 100644 --- a/system-config-printer-inklevel.patch +++ b/system-config-printer-inklevel.patch @@ -1,6 +1,6 @@ diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-printer-1.2.0/gtkinklevel.py --- system-config-printer-1.2.0/gtkinklevel.py.inklevel 2009-12-03 17:06:22.000000000 +0000 -+++ system-config-printer-1.2.0/gtkinklevel.py 2010-03-25 16:25:55.108235939 +0000 ++++ system-config-printer-1.2.0/gtkinklevel.py 2010-03-26 10:34:15.981600493 +0000 @@ -1,7 +1,8 @@ #!/usr/bin/env python @@ -33,26 +33,32 @@ diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-print ctx.stroke_preserve () if fill_point > 0.0: grad_width = 0.10 -@@ -90,6 +91,25 @@ class GtkInkLevel (gtk.DrawingArea): +@@ -90,6 +91,31 @@ class GtkInkLevel (gtk.DrawingArea): ctx.set_source_rgb (1, 1, 1) ctx.fill () + ctx.set_line_width (thickness / 2) + -+ ctx.move_to (0.03, 0.5) -+ ctx.line_to (0.9, 0.5) ++ ctx.move_to (0.5, 0.0) ++ ctx.line_to (0.5, 1.0) + ctx.set_source_rgb (r, g, b) -+ ctx.set_dash ([0.1]) + ctx.stroke () + -+ ctx.move_to (0, 0.75) -+ ctx.line_to (1, 0.75) ++ # 50% marker ++ ctx.move_to (0.4, 0.5) ++ ctx.line_to (0.6, 0.5) + ctx.set_source_rgb (r, g, b) -+ ctx.set_dash ([0.05]) + ctx.stroke () + -+ ctx.move_to (0.15, 0.25) -+ ctx.line_to (0.6, 0.25) ++ # 25% marker ++ ctx.move_to (0.45, 0.75) ++ ctx.line_to (0.55, 0.75) ++ ctx.set_source_rgb (r, g, b) ++ ctx.stroke () ++ ++ # 75% marker ++ ctx.move_to (0.45, 0.25) ++ ctx.line_to (0.55, 0.25) + ctx.set_source_rgb (r, g, b) + ctx.stroke () + @@ -60,8 +66,8 @@ diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-print # Try it out. import gobject diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py ---- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-25 16:25:37.904233984 +0000 -+++ system-config-printer-1.2.0/system-config-printer.py 2010-03-25 16:26:07.037359284 +0000 +--- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-26 10:34:06.158727658 +0000 ++++ system-config-printer-1.2.0/system-config-printer.py 2010-03-26 10:34:06.250725897 +0000 @@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher): vbox = gtk.VBox (spacing=6) subhbox = gtk.HBox () diff --git a/system-config-printer.spec b/system-config-printer.spec index ae96f0b..6e9abe3 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -120,6 +120,7 @@ printers. %patch9 -p1 -b .JobCancel # Make inklevel widget easier to read (bug #576930). +# Better inklevel 25/50/75 markers. %patch10 -p1 -b .inklevel # check-device-ids: search harder for missing Device IDs. @@ -258,6 +259,7 @@ exit 0 %changelog * Fri Mar 26 2010 Tim Waugh - 1.2.0-10 +- Better inklevel 25/50/75 markers. - Fixed window transience for 'Change Device URI'. - More async traceback fixes (Ubuntu #547075). From 1fcc63811b36af0b1f30cddbee7f56019f3134d5 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 26 Mar 2010 12:53:25 +0000 Subject: [PATCH 30/46] - More async traceback fixes (Ubuntu #547075). --- ...em-config-printer-asyncipp-traceback.patch | 29 ++++++++++++------- system-config-printer.spec | 5 +++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/system-config-printer-asyncipp-traceback.patch b/system-config-printer-asyncipp-traceback.patch index 61fa4cc..e44b30c 100644 --- a/system-config-printer-asyncipp-traceback.patch +++ b/system-config-printer-asyncipp-traceback.patch @@ -1,6 +1,6 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py ---- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 10:26:00.420734896 +0000 -+++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 10:26:03.187725661 +0000 +--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 12:50:39.829627667 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 12:50:51.888627367 +0000 @@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr self._auth_handler = auth_handler self._auth_queue = Queue.Queue (1) @@ -17,28 +17,35 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-confi del self._conn # already destroyed del self._reply_handler del self._error_handler -@@ -189,18 +191,20 @@ class _IPPConnectionThread(threading.Thr +@@ -188,21 +190,23 @@ class _IPPConnectionThread(threading.Thr + return password def _reply (self, result): - def send_reply (result): +- def send_reply (result): - self._reply_handler (self._conn, result) -+ if not self._destroyed and self._reply_handler: -+ self._reply_handler (self._conn, result) ++ def send_reply (handler, result): ++ if not self._destroyed: ++ handler (self._conn, result) return False - if self._reply_handler: +- gobject.idle_add (send_reply, result) + if not self._destroyed and self._reply_handler: - gobject.idle_add (send_reply, result) ++ gobject.idle_add (send_reply, self._reply_handler, result) def _error (self, exc): - def send_error (exc): +- def send_error (exc): - self._error_handler (self._conn, exc) -+ if not self._destroyed and self._error_handler: -+ self._error_handler (self._conn, exc) ++ def send_error (handler, exc): ++ if not self._destroyed: ++ handler (self._conn, exc) return False - if self._error_handler: + if not self._destroyed and self._error_handler: debugprint ("Add %s to idle" % self._error_handler) - gobject.idle_add (send_error, exc) +- gobject.idle_add (send_error, exc) ++ gobject.idle_add (send_error, self._error_handler, exc) + ### + ### This is the user-visible class. Although it does not inherit from diff --git a/system-config-printer.spec b/system-config-printer.spec index 6e9abe3..5bad9b6 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.2.0 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -258,6 +258,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 26 2010 Tim Waugh - 1.2.0-11 +- More async traceback fixes (Ubuntu #547075). + * Fri Mar 26 2010 Tim Waugh - 1.2.0-10 - Better inklevel 25/50/75 markers. - Fixed window transience for 'Change Device URI'. From d52b8a84278698b898ce0bb73f00d759cb4bab68 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sat, 27 Mar 2010 10:15:38 +0000 Subject: [PATCH 31/46] - Use upstream fix for async bugs. --- ...em-config-printer-asyncipp-traceback.patch | 60 ++++++++++++++++++- system-config-printer.spec | 5 +- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/system-config-printer-asyncipp-traceback.patch b/system-config-printer-asyncipp-traceback.patch index e44b30c..6412886 100644 --- a/system-config-printer-asyncipp-traceback.patch +++ b/system-config-printer-asyncipp-traceback.patch @@ -1,6 +1,6 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py ---- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 12:50:39.829627667 +0000 -+++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 12:50:51.888627367 +0000 +--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-27 10:12:14.667366971 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-27 10:13:04.081365616 +0000 @@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr self._auth_handler = auth_handler self._auth_queue = Queue.Queue (1) @@ -49,3 +49,59 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-confi ### ### This is the user-visible class. Although it does not inherit from +diff -up system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback system-config-printer-1.2.0/asyncpk1.py +--- system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback 2010-03-27 10:12:14.702364469 +0000 ++++ system-config-printer-1.2.0/asyncpk1.py 2010-03-27 10:13:06.407243790 +0000 +@@ -64,6 +64,7 @@ class _PK1AsyncMethodCall: + self._fallback_fn = fallback_fn + self._fallback_args = args + self._fallback_kwds = kwds ++ self._destroyed = False + debugprint ("+_PK1AsyncMethodCall: %s" % self) + + def __del__ (self): +@@ -85,6 +86,7 @@ class _PK1AsyncMethodCall: + + def _destroy (self): + debugprint ("DESTROY: %s" % self) ++ self._destroyed = True + del self._bus + del self._conn + del self._pk_method_name +@@ -97,6 +99,9 @@ class _PK1AsyncMethodCall: + del self._fallback_kwds + + def _pk_reply_handler (self, error, *args): ++ if self._destroyed: ++ return ++ + if str (error) == '': + self._client_reply_handler (self._conn, self._unpack_fn (*args)) + self._destroy () +@@ -106,6 +111,9 @@ class _PK1AsyncMethodCall: + self.call_fallback_fn () + + def _pk_error_handler (self, exc): ++ if self._destroyed: ++ return ++ + if exc.get_dbus_name () == CUPS_PK_NEED_AUTH: + exc = cups.IPPError (cups.IPP_NOT_AUTHORIZED, 'pkcancel') + self._client_error_handler (self._conn, exc) +@@ -123,10 +131,16 @@ class _PK1AsyncMethodCall: + self._fallback_fn (*self._fallback_args, **self._fallback_kwds) + + def _ipp_reply_handler (self, conn, *args): ++ if self._destroyed: ++ return ++ + self._client_reply_handler (self._conn, *args) + self._destroy () + + def _ipp_error_handler (self, conn, *args): ++ if self._destroyed: ++ return ++ + self._client_error_handler (self._conn, *args) + self._destroy () + diff --git a/system-config-printer.spec b/system-config-printer.spec index 5bad9b6..b95aa01 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.2.0 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -258,6 +258,9 @@ rm -rf %buildroot exit 0 %changelog +* Sat Mar 27 2010 Tim Waugh - 1.2.0-12 +- Use upstream fix for async bugs. + * Fri Mar 26 2010 Tim Waugh - 1.2.0-11 - More async traceback fixes (Ubuntu #547075). From 46d234b9d7eee34cb0c35e3d83482aade27b5867 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sat, 27 Mar 2010 10:25:48 +0000 Subject: [PATCH 32/46] - check-device-ids: use make-and-model field for best-matching. - Use upstream fix for async bugs. --- system-config-printer-cdi-make-and-model.patch | 12 ++++++++++++ system-config-printer.spec | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 system-config-printer-cdi-make-and-model.patch diff --git a/system-config-printer-cdi-make-and-model.patch b/system-config-printer-cdi-make-and-model.patch new file mode 100644 index 0000000..f4c552c --- /dev/null +++ b/system-config-printer-cdi-make-and-model.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-make-and-model system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-make-and-model 2010-03-27 10:16:04.371239756 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-27 10:16:14.458240137 +0000 +@@ -210,7 +210,7 @@ for device, attrs in devices.iteritems ( + mdls = ppds.makes[make] + break + if mdls: +- (s, bestmatches) = ppds._findBestMatchPPDs (mdls, id_fields['MDL']) ++ (s, bestmatches) = ppds._findBestMatchPPDs (mdls, mdl) + if s == ppds.STATUS_SUCCESS: + matches = matches.union (set (bestmatches)) + diff --git a/system-config-printer.spec b/system-config-printer.spec index b95aa01..0c7f323 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -31,6 +31,7 @@ Patch11: system-config-printer-cdi-search-harder.patch Patch12: system-config-printer-asyncipp-traceback.patch Patch13: system-config-printer-cdi-lsb-paths.patch Patch14: system-config-printer-transience.patch +Patch15: system-config-printer-cdi-make-and-model.patch Patch100: system-config-printer-pycups-build.patch @@ -136,6 +137,9 @@ printers. # Fixed window transience for 'Change Device URI'. %patch14 -p1 -b .transience +# check-device-ids: use make-and-model field for best-matching. +%patch15 -p1 -b .cdi-make-and-model + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -259,6 +263,7 @@ exit 0 %changelog * Sat Mar 27 2010 Tim Waugh - 1.2.0-12 +- check-device-ids: use make-and-model field for best-matching. - Use upstream fix for async bugs. * Fri Mar 26 2010 Tim Waugh - 1.2.0-11 From 1f861f112684c06127ce0ca73b5831fd5ad7a986 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 12 Apr 2010 11:25:23 +0000 Subject: [PATCH 33/46] - Use JobCancel compatibility method until cups-pk-helper-0.1.0 is packaged (bug #581315). --- system-config-printer-jobcancel-compat.patch | 17 +++++++++++++++++ system-config-printer.spec | 11 ++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-jobcancel-compat.patch diff --git a/system-config-printer-jobcancel-compat.patch b/system-config-printer-jobcancel-compat.patch new file mode 100644 index 0000000..2978d8a --- /dev/null +++ b/system-config-printer-jobcancel-compat.patch @@ -0,0 +1,17 @@ +diff -up system-config-printer-1.2.0/asyncpk1.py.jobcancel-compat system-config-printer-1.2.0/asyncpk1.py +--- system-config-printer-1.2.0/asyncpk1.py.jobcancel-compat 2010-04-12 12:09:40.000000000 +0100 ++++ system-config-printer-1.2.0/asyncpk1.py 2010-04-12 12:12:03.562024987 +0100 +@@ -441,11 +441,10 @@ class PK1Connection: + (use_pycups, reply_handler, error_handler, + tup) = self._args_kwds_to_tuple ([int], +- [(None, None), +- (None, False)], # purge_job ++ [(None, None)], + args, kwds) + + self._call_with_pk (use_pycups, +- 'JobCancelPurge', tup, reply_handler, error_handler, ++ 'JobCancel', tup, reply_handler, error_handler, + self._nothing_to_unpack, + self._conn.cancelJob, args, kwds) + diff --git a/system-config-printer.spec b/system-config-printer.spec index 0c7f323..0538081 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.2.0 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -32,6 +32,7 @@ Patch12: system-config-printer-asyncipp-traceback.patch Patch13: system-config-printer-cdi-lsb-paths.patch Patch14: system-config-printer-transience.patch Patch15: system-config-printer-cdi-make-and-model.patch +Patch16: system-config-printer-jobcancel-compat.patch Patch100: system-config-printer-pycups-build.patch @@ -140,6 +141,10 @@ printers. # check-device-ids: use make-and-model field for best-matching. %patch15 -p1 -b .cdi-make-and-model +# Use JobCancel compatibility method until cups-pk-helper-0.1.0 is +# packaged (bug #581315). +%patch16 -p1 -b .jobcancel-compat + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -262,6 +267,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Apr 12 2010 Tim Waugh - 1.2.0-13 +- Use JobCancel compatibility method until cups-pk-helper-0.1.0 is + packaged (bug #581315). + * Sat Mar 27 2010 Tim Waugh - 1.2.0-12 - check-device-ids: use make-and-model field for best-matching. - Use upstream fix for async bugs. From 699813d7cf9387d27ecb8802bc8dec1057a690dd Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 14 Apr 2010 23:59:16 +0000 Subject: [PATCH 34/46] - Updated to 1.2.1: - Fixed missing translations (bug #580442). - Offer to adjust firewall when necessary. - Avoid tracebacks when adjusting server settings. - Handle IPP failure fetching printer attributes for completed jobs (Ubuntu #562679). - monitor: don't crash if job-state attribute is missing (Ubuntu #562441). - troubleshoot: handle IPPError in PrintTestPage module (bug #579957). - Lots of check-device-ids fixes. --- .cvsignore | 1 + pycups-request-readio.patch | 21 ---- sources | 2 +- system-config-printer-1.2.0.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.2.1.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-JobCancel.patch | 12 -- ...em-config-printer-asyncipp-traceback.patch | 107 ------------------ system-config-printer-cdi-cmd.patch | 23 ---- system-config-printer-cdi-filename.patch | 21 ---- system-config-printer-cdi-lsb-paths.patch | 17 --- ...em-config-printer-cdi-make-and-model.patch | 12 -- system-config-printer-cdi-no-drivers.patch | 12 -- system-config-printer-cdi-search-harder.patch | 26 ----- ...-config-printer-downloadable-drivers.patch | 11 -- system-config-printer-inklevel.patch | 78 ------------- system-config-printer-jobcancel-compat.patch | 17 --- system-config-printer-kyocera-mita.patch | 39 ------- system-config-printer-lowercase-mfg-mdl.patch | 12 -- system-config-printer-reconnect-error.patch | 29 ----- system-config-printer-transience.patch | 12 -- system-config-printer.spec | 80 +++---------- 21 files changed, 16 insertions(+), 516 deletions(-) delete mode 100644 pycups-request-readio.patch delete mode 100644 system-config-printer-1.2.0.tar.xz.sig create mode 100644 system-config-printer-1.2.1.tar.xz.sig delete mode 100644 system-config-printer-JobCancel.patch delete mode 100644 system-config-printer-asyncipp-traceback.patch delete mode 100644 system-config-printer-cdi-cmd.patch delete mode 100644 system-config-printer-cdi-filename.patch delete mode 100644 system-config-printer-cdi-lsb-paths.patch delete mode 100644 system-config-printer-cdi-make-and-model.patch delete mode 100644 system-config-printer-cdi-no-drivers.patch delete mode 100644 system-config-printer-cdi-search-harder.patch delete mode 100644 system-config-printer-downloadable-drivers.patch delete mode 100644 system-config-printer-inklevel.patch delete mode 100644 system-config-printer-jobcancel-compat.patch delete mode 100644 system-config-printer-kyocera-mita.patch delete mode 100644 system-config-printer-lowercase-mfg-mdl.patch delete mode 100644 system-config-printer-reconnect-error.patch delete mode 100644 system-config-printer-transience.patch diff --git a/.cvsignore b/.cvsignore index 9a1fae3..ee1a9d5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -216,3 +216,4 @@ system-config-printer-1.1.92.tar.xz system-config-printer-1.1.93.tar.xz pycups-1.9.49.tar.bz2 system-config-printer-1.2.0.tar.xz +system-config-printer-1.2.1.tar.xz diff --git a/pycups-request-readio.patch b/pycups-request-readio.patch deleted file mode 100644 index 1eb3459..0000000 --- a/pycups-request-readio.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -U0 pycups-1.9.47/ChangeLog.request-readio pycups-1.9.47/ChangeLog -diff -up pycups-1.9.47/cupsipp.c.request-readio pycups-1.9.47/cupsipp.c ---- pycups-1.9.47/cupsipp.c.request-readio 2009-08-18 11:56:03.000000000 +0100 -+++ pycups-1.9.47/cupsipp.c 2010-01-06 15:54:37.978283521 +0000 -@@ -1,6 +1,6 @@ - /* - * cups - Python bindings for CUPS -- * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc. -+ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. - * Author: Tim Waugh - * - * This program is free software; you can redistribute it and/or modify -@@ -421,7 +421,7 @@ IPPRequest_getAttributes (IPPRequest *se - if (!value) { - Py_DECREF (values); - values = NULL; -- break; -+ continue; - } - - debugprintf ("\n"); diff --git a/sources b/sources index e88ca84..da82021 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2 -dc9c0728503c57a846bdf868eb3cf90d system-config-printer-1.2.0.tar.xz +c5463ad1b9f81947293521f8152727a1 system-config-printer-1.2.1.tar.xz diff --git a/system-config-printer-1.2.0.tar.xz.sig b/system-config-printer-1.2.0.tar.xz.sig deleted file mode 100644 index cb6555978f006a56a86b16a48ee3a8c14d624c55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-OQ7fj1hg7`no8Q&5dzZj0G=poYagvCJ&RF^)g7kXKX2ac$6x@T XWb_K5Oo!C4SH&YCJXGHYTV> --## Copyright (C) 2009 Red Hat, Inc. -+## Copyright (C) 2010 Red Hat, Inc. -+## Authors: -+## Tim Waugh - - ## This program is free software; you can redistribute it and/or modify - ## it under the terms of the GNU General Public License as published by -@@ -56,10 +57,9 @@ class GtkInkLevel (gtk.DrawingArea): - ctx.translate (thickness, thickness) - ctx.scale (w - 2 * thickness, h - 2 * thickness) - thickness = max (ctx.device_to_user_distance (thickness, thickness)) -- ctx.set_line_width (thickness) -- self.draw (ctx) -+ self.draw (ctx, thickness) - -- def draw (self, ctx): -+ def draw (self, ctx, thickness): - r = self._color.red / 65535.0 - g = self._color.green / 65535.0 - b = self._color.blue / 65535.0 -@@ -72,6 +72,7 @@ class GtkInkLevel (gtk.DrawingArea): - ctx.curve_to (0.0, 0.5, 0.1, 0.2, 0.5, 0.0) - ctx.close_path () - ctx.set_source_rgb (r, g, b) -+ ctx.set_line_width (thickness) - ctx.stroke_preserve () - if fill_point > 0.0: - grad_width = 0.10 -@@ -90,6 +91,31 @@ class GtkInkLevel (gtk.DrawingArea): - ctx.set_source_rgb (1, 1, 1) - ctx.fill () - -+ ctx.set_line_width (thickness / 2) -+ -+ ctx.move_to (0.5, 0.0) -+ ctx.line_to (0.5, 1.0) -+ ctx.set_source_rgb (r, g, b) -+ ctx.stroke () -+ -+ # 50% marker -+ ctx.move_to (0.4, 0.5) -+ ctx.line_to (0.6, 0.5) -+ ctx.set_source_rgb (r, g, b) -+ ctx.stroke () -+ -+ # 25% marker -+ ctx.move_to (0.45, 0.75) -+ ctx.line_to (0.55, 0.75) -+ ctx.set_source_rgb (r, g, b) -+ ctx.stroke () -+ -+ # 75% marker -+ ctx.move_to (0.45, 0.25) -+ ctx.line_to (0.55, 0.25) -+ ctx.set_source_rgb (r, g, b) -+ ctx.stroke () -+ - if __name__ == '__main__': - # Try it out. - import gobject -diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py ---- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-26 10:34:06.158727658 +0000 -+++ system-config-printer-1.2.0/system-config-printer.py 2010-03-26 10:34:06.250725897 +0000 -@@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher): - vbox = gtk.VBox (spacing=6) - subhbox = gtk.HBox () - inklevel = gtkinklevel.GtkInkLevel (color, level) -+ inklevel.set_tooltip_text ("%d%%" % level) - subhbox.pack_start (inklevel, True, False, 0) - vbox.pack_start (subhbox, False, False, 0) - label = gtk.Label (name) diff --git a/system-config-printer-jobcancel-compat.patch b/system-config-printer-jobcancel-compat.patch deleted file mode 100644 index 2978d8a..0000000 --- a/system-config-printer-jobcancel-compat.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up system-config-printer-1.2.0/asyncpk1.py.jobcancel-compat system-config-printer-1.2.0/asyncpk1.py ---- system-config-printer-1.2.0/asyncpk1.py.jobcancel-compat 2010-04-12 12:09:40.000000000 +0100 -+++ system-config-printer-1.2.0/asyncpk1.py 2010-04-12 12:12:03.562024987 +0100 -@@ -441,11 +441,10 @@ class PK1Connection: - (use_pycups, reply_handler, error_handler, - tup) = self._args_kwds_to_tuple ([int], -- [(None, None), -- (None, False)], # purge_job -+ [(None, None)], - args, kwds) - - self._call_with_pk (use_pycups, -- 'JobCancelPurge', tup, reply_handler, error_handler, -+ 'JobCancel', tup, reply_handler, error_handler, - self._nothing_to_unpack, - self._conn.cancelJob, args, kwds) - diff --git a/system-config-printer-kyocera-mita.patch b/system-config-printer-kyocera-mita.patch deleted file mode 100644 index 160e2a7..0000000 --- a/system-config-printer-kyocera-mita.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up system-config-printer-1.2.0/cupshelpers/ppds.py.kyocera-mita system-config-printer-1.2.0/cupshelpers/ppds.py ---- system-config-printer-1.2.0/cupshelpers/ppds.py.kyocera-mita 2010-03-09 17:52:15.000000000 +0000 -+++ system-config-printer-1.2.0/cupshelpers/ppds.py 2010-03-19 11:43:38.823746889 +0000 -@@ -137,6 +137,15 @@ def ppdMakeModelSplit (ppd_make_and_mode - elif l.startswith ("konica minolta "): - make = "KONICA MINOLTA" - model = ppd_make_and_model[15:] -+ elif l.startswith ("lexmark international "): -+ make = "Lexmark" -+ model = ppd_make_and_model[22:] -+ elif l.startswith ("kyocera mita "): -+ make = "Kyocera Mita" -+ model = ppd_make_and_model[13:] -+ elif l.startswith ("kyocera "): -+ make = "Kyocera Mita" -+ model = ppd_make_and_model[8:] - - # Finally, take the first word as the name of the manufacturer. - else: -@@ -156,9 +165,6 @@ def ppdMakeModelSplit (ppd_make_and_mode - makel.endswith ("packard")): - make = "HP" - makel = "hp" -- elif makel == "lexmark international": -- make = "Lexmark" -- makel = "lexmark" - - # HP PPDs give NickNames like: - # *NickName: "HP LaserJet 4 Plus v2013.111 Postscript (recommended)" -@@ -585,7 +591,8 @@ class PPDs: - mdll = mdl.lower () - - mfgrepl = {"hewlett-packard": "hp", -- "lexmark international": "lexmark"} -+ "lexmark international": "lexmark", -+ "kyocera": "kyocera mita"} - if self.lmakes.has_key (mfgl): - # Found manufacturer. - make = self.lmakes[mfgl] diff --git a/system-config-printer-lowercase-mfg-mdl.patch b/system-config-printer-lowercase-mfg-mdl.patch deleted file mode 100644 index 7255696..0000000 --- a/system-config-printer-lowercase-mfg-mdl.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.91/installdriver.py.lowercase-mfg-mdl system-config-printer-1.1.91/installdriver.py ---- system-config-printer-1.1.91/installdriver.py.lowercase-mfg-mdl 2010-02-08 17:25:56.000000000 +0000 -+++ system-config-printer-1.1.91/installdriver.py 2010-02-17 15:49:19.064410563 +0000 -@@ -43,6 +43,8 @@ class PrinterDriversInstaller(dbus.servi - obj = bus.get_object ("org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit") - proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") -+ mfg = mfg.lower () -+ mdl = mdl.lower () - proxy.InstallPrinterDrivers (0, ["MFG:%s;MDL:%s;" % (mfg, mdl)], - "hide-finished", - reply_handler=reply_handler, diff --git a/system-config-printer-reconnect-error.patch b/system-config-printer-reconnect-error.patch deleted file mode 100644 index 31f5455..0000000 --- a/system-config-printer-reconnect-error.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up system-config-printer-1.2.0/asyncipp.py.reconnect-error system-config-printer-1.2.0/asyncipp.py ---- system-config-printer-1.2.0/asyncipp.py.reconnect-error 2010-01-27 11:17:44.000000000 +0000 -+++ system-config-printer-1.2.0/asyncipp.py 2010-03-22 11:54:54.320452998 +0000 -@@ -1,6 +1,6 @@ - #!/usr/bin/env python - --## Copyright (C) 2007, 2008, 2009 Red Hat, Inc. -+## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc. - ## Copyright (C) 2008 Novell, Inc. - ## Author: Tim Waugh - -@@ -333,7 +333,7 @@ class _IPPAuthOperation: - # This is the initial "connection" operation, or a - # subsequent reconnection attempt. - debugprint ("Connection/reconnection failed") -- return self._reconnect_error (exc) -+ return self._reconnect_error (conn, exc) - - if self._cancel: - return self._error (exc) -@@ -353,7 +353,7 @@ class _IPPAuthOperation: - e == cups.IPP_FORBIDDEN): - forbidden = (e == cups.IPP_FORBIDDEN) - elif e == cups.IPP_SERVICE_UNAVAILABLE: -- return self._reconnect_error (exc) -+ return self._reconnect_error (conn, exc) - else: - return self._error (exc) - elif type (exc) == cups.HTTPError: diff --git a/system-config-printer-transience.patch b/system-config-printer-transience.patch deleted file mode 100644 index 1826f6a..0000000 --- a/system-config-printer-transience.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.2.0/system-config-printer.py.transience system-config-printer-1.2.0/system-config-printer.py ---- system-config-printer-1.2.0/system-config-printer.py.transience 2010-03-26 10:31:28.943600745 +0000 -+++ system-config-printer-1.2.0/system-config-printer.py 2010-03-26 10:31:36.738725437 +0000 -@@ -4012,7 +4012,7 @@ class NewPrinterGUI(GtkGUI): - self.btnNetworkFind.set_sensitive (True) - self.lblNetworkFindNotFound.hide () - -- if dialog_mode == "ppd": -+ if dialog_mode in ["ppd", "device"]: - self.parent = self.mainapp.PrinterPropertiesDialog - else: - self.parent = self.mainapp.PrintersWindow diff --git a/system-config-printer.spec b/system-config-printer.spec index 0538081..dbc6b67 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -6,8 +6,8 @@ Summary: A printer administration tool Name: system-config-printer -Version: 1.2.0 -Release: 13%{?dist} +Version: 1.2.1 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,21 +18,6 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch -Patch2: system-config-printer-lowercase-mfg-mdl.patch -Patch3: system-config-printer-cdi-no-drivers.patch -Patch4: system-config-printer-cdi-cmd.patch -Patch5: system-config-printer-kyocera-mita.patch -Patch6: system-config-printer-cdi-filename.patch -Patch7: system-config-printer-reconnect-error.patch -Patch8: system-config-printer-downloadable-drivers.patch -Patch9: system-config-printer-JobCancel.patch -Patch10: system-config-printer-inklevel.patch -Patch11: system-config-printer-cdi-search-harder.patch -Patch12: system-config-printer-asyncipp-traceback.patch -Patch13: system-config-printer-cdi-lsb-paths.patch -Patch14: system-config-printer-transience.patch -Patch15: system-config-printer-cdi-make-and-model.patch -Patch16: system-config-printer-jobcancel-compat.patch Patch100: system-config-printer-pycups-build.patch @@ -96,55 +81,6 @@ printers. # Don't require epydoc. %patch1 -p1 -b .no-epydoc -# Convert InstallPrinterDriver requests to lower-case. -%patch2 -p1 -b .lowercase-mfg-mdl - -# Fixed traceback in check-driver-ids.py when no drivers are found -# (bug #574827). -%patch3 -p1 -b .cdi-no-drivers - -# Show CMD field in check-device-ids.py. -%patch4 -p1 -b .cdi-cmd - -# The canonical name for Kyocera is Kyocera Mita. -%patch5 -p1 -b .kyocera-mita - -# check-device-ids.py: Fixed driver-URI to filename mapping. -%patch6 -p1 -b .cdi-filename - -# Fixed reconnection error handling in IPPAuthOperation class (bug #575198). -%patch7 -p1 -b .reconnect-error - -# Initialize downloadable_drivers when OpenPrinting query fails (bug #574562). -%patch8 -p1 -b .downloadable-drivers - -# Use new JobCancelPurge cups-pk-helper method (bug #576496). -%patch9 -p1 -b .JobCancel - -# Make inklevel widget easier to read (bug #576930). -# Better inklevel 25/50/75 markers. -%patch10 -p1 -b .inklevel - -# check-device-ids: search harder for missing Device IDs. -%patch11 -p1 -b .cdi-search-harder - -# Fixed traceback in asyncipp (bug #576932). -# More async traceback fixes (Ubuntu #547075). -%patch12 -p1 -b .asyncipp-traceback - -# check-device-ids: use correct paths for LSB model URIs. -%patch13 -p1 -b .cdi-lsb-paths - -# Fixed window transience for 'Change Device URI'. -%patch14 -p1 -b .transience - -# check-device-ids: use make-and-model field for best-matching. -%patch15 -p1 -b .cdi-make-and-model - -# Use JobCancel compatibility method until cups-pk-helper-0.1.0 is -# packaged (bug #581315). -%patch16 -p1 -b .jobcancel-compat - pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -267,6 +203,18 @@ rm -rf %buildroot exit 0 %changelog +* Thu Apr 15 2010 Tim Waugh - 1.2.1-1 +- Updated to 1.2.1: + - Fixed missing translations (bug #580442). + - Offer to adjust firewall when necessary. + - Avoid tracebacks when adjusting server settings. + - Handle IPP failure fetching printer attributes for completed jobs + (Ubuntu #562679). + - monitor: don't crash if job-state attribute is missing + (Ubuntu #562441). + - troubleshoot: handle IPPError in PrintTestPage module (bug #579957). + - Lots of check-device-ids fixes. + * Mon Apr 12 2010 Tim Waugh - 1.2.0-13 - Use JobCancel compatibility method until cups-pk-helper-0.1.0 is packaged (bug #581315). From 1b26791b0f4e7330e6c1debc2c98783a794ba2c9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 22 Apr 2010 15:15:08 +0000 Subject: [PATCH 35/46] - Specify requested attributes in getJobs if possible (bug #584806). - Added optional requested_attributes argument to Connection.getJobs (bug #584806). --- pycups-add-getJobs-requested-attrs.patch | 198 ++++++++++++++++++ ...-printer-use-getJobs-requested-attrs.patch | 34 +++ system-config-printer.spec | 16 +- 3 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 pycups-add-getJobs-requested-attrs.patch create mode 100644 system-config-printer-use-getJobs-requested-attrs.patch diff --git a/pycups-add-getJobs-requested-attrs.patch b/pycups-add-getJobs-requested-attrs.patch new file mode 100644 index 0000000..6867f54 --- /dev/null +++ b/pycups-add-getJobs-requested-attrs.patch @@ -0,0 +1,198 @@ +diff -U0 pycups-1.9.49/ChangeLog.add-getJobs-requested-attrs pycups-1.9.49/ChangeLog +diff -up pycups-1.9.49/cupsconnection.c.add-getJobs-requested-attrs pycups-1.9.49/cupsconnection.c +--- pycups-1.9.49/cupsconnection.c.add-getJobs-requested-attrs 2010-02-24 15:07:28.000000000 +0000 ++++ pycups-1.9.49/cupsconnection.c 2010-04-22 16:02:33.425457367 +0100 +@@ -1382,6 +1382,52 @@ Connection_getDevices (Connection *self, + return result; + } + ++static int ++get_requested_attrs (PyObject *requested_attrs, size_t *n_attrs, char ***attrs) ++{ ++ int i; ++ size_t n; ++ char **as; ++ ++ if (!PyList_Check (requested_attrs)) { ++ PyErr_SetString (PyExc_TypeError, "List required"); ++ return -1; ++ } ++ ++ n = PyList_Size (requested_attrs); ++ as = malloc ((n + 1) * sizeof (char *)); ++ for (i = 0; i < n; i++) { ++ PyObject *val = PyList_GetItem (requested_attrs, i); // borrowed ref ++ if (!PyString_Check (val)) { ++ PyErr_SetString (PyExc_TypeError, "String required"); ++ while (--i >= 0) ++ free (as[i]); ++ free (as); ++ return -1; ++ } ++ ++ as[i] = strdup (PyString_AsString (val)); ++ } ++ as[n] = NULL; ++ ++ debugprintf ("Requested attributes:\n"); ++ for (i = 0; as[i] != NULL; i++) ++ debugprintf (" %s\n", as[i]); ++ ++ *n_attrs = n; ++ *attrs = as; ++ return 0; ++} ++ ++static void ++free_requested_attrs (size_t n_attrs, char **attrs) ++{ ++ int i; ++ for (i = 0; i < n_attrs; i++) ++ free (attrs[i]); ++ free (attrs); ++} ++ + static PyObject * + Connection_getJobs (Connection *self, PyObject *args, PyObject *kwds) + { +@@ -1392,10 +1438,14 @@ Connection_getJobs (Connection *self, Py + int my_jobs = 0; + int limit = -1; + int first_job_id = -1; ++ PyObject *requested_attrs = NULL; ++ char **attrs = NULL; /* initialised to calm compiler */ ++ size_t n_attrs = 0; /* initialised to calm compiler */ + static char *kwlist[] = { "which_jobs", "my_jobs", "limit", "first_job_id", +- NULL }; +- if (!PyArg_ParseTupleAndKeywords (args, kwds, "|siii", kwlist, +- &which, &my_jobs, &limit, &first_job_id)) ++ "requested_attributes", NULL }; ++ if (!PyArg_ParseTupleAndKeywords (args, kwds, "|siiiO", kwlist, ++ &which, &my_jobs, &limit, &first_job_id, ++ &requested_attrs)) + return NULL; + + debugprintf ("-> Connection_getJobs(%s,%d)\n", +@@ -1419,6 +1469,18 @@ Connection_getJobs (Connection *self, Py + ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, + "first-job-id", first_job_id); + ++ if (requested_attrs) { ++ if (get_requested_attrs (requested_attrs, &n_attrs, &attrs) == -1) { ++ ippDelete (request); ++ return NULL; ++ } ++ ++ ippAddStrings (request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, ++ "requested-attributes", n_attrs, NULL, ++ (const char **) attrs); ++ free_requested_attrs (n_attrs, attrs); ++ } ++ + debugprintf ("cupsDoRequest(\"/\")\n"); + Connection_begin_allow_threads (self); + answer = cupsDoRequest (self->http, request, "/"); +@@ -1474,6 +1536,18 @@ Connection_getJobs (Connection *self, Py + else if (!strcmp (attr->name, "job-preserved") && + attr->value_tag == IPP_TAG_BOOLEAN) + val = PyBool_FromLong (attr->values[0].integer); ++ else { ++ if (attr->num_values > 1) { ++ int i; ++ val = PyList_New (0); ++ for (i = 0; i < attr->num_values; i++) { ++ PyObject *item = PyObject_from_attr_value (attr, i); ++ if (item) ++ PyList_Append (val, item); ++ } ++ } else ++ val = PyObject_from_attr_value (attr, 0); ++ } + + if (val) { + debugprintf ("Adding %s to job dict\n", attr->name); +@@ -1500,52 +1574,6 @@ Connection_getJobs (Connection *self, Py + return result; + } + +-static int +-get_requested_attrs (PyObject *requested_attrs, size_t *n_attrs, char ***attrs) +-{ +- int i; +- size_t n; +- char **as; +- +- if (!PyList_Check (requested_attrs)) { +- PyErr_SetString (PyExc_TypeError, "List required"); +- return -1; +- } +- +- n = PyList_Size (requested_attrs); +- as = malloc ((n + 1) * sizeof (char *)); +- for (i = 0; i < n; i++) { +- PyObject *val = PyList_GetItem (requested_attrs, i); // borrowed ref +- if (!PyString_Check (val)) { +- PyErr_SetString (PyExc_TypeError, "String required"); +- while (--i >= 0) +- free (as[i]); +- free (as); +- return -1; +- } +- +- as[i] = strdup (PyString_AsString (val)); +- } +- as[n] = NULL; +- +- debugprintf ("Requested attributes:\n"); +- for (i = 0; as[i] != NULL; i++) +- debugprintf (" %s\n", as[i]); +- +- *n_attrs = n; +- *attrs = as; +- return 0; +-} +- +-static void +-free_requested_attrs (size_t n_attrs, char **attrs) +-{ +- int i; +- for (i = 0; i < n_attrs; i++) +- free (attrs[i]); +- free (attrs); +-} +- + static PyObject * + Connection_getJobAttributes (Connection *self, PyObject *args, PyObject *kwds) + { +@@ -4439,7 +4467,7 @@ PyMethodDef Connection_methods[] = + + { "getJobs", + (PyCFunction) Connection_getJobs, METH_VARARGS | METH_KEYWORDS, +- "getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1) -> dict\n" ++ "getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1, requested_attributes=None) -> dict\n" + "Fetch a list of jobs.\n" + "@type which_jobs: string\n" + "@param which_jobs: which jobs to fetch; possible values: \n" +@@ -4453,6 +4481,8 @@ PyMethodDef Connection_methods[] = + "@param limit: maximum number of jobs to return\n" + "@type first_job_id: integer\n" + "@param first_job_id: lowest job ID to return\n" ++ "@type requested_attributes: string list\n" ++ "@param requested_attributes: list of requested attribute names\n" + "@raise IPPError: IPP problem" }, + + { "getJobAttributes", +diff -up pycups-1.9.49/NEWS.add-getJobs-requested-attrs pycups-1.9.49/NEWS +--- pycups-1.9.49/NEWS.add-getJobs-requested-attrs 2010-01-19 12:33:26.000000000 +0000 ++++ pycups-1.9.49/NEWS 2010-04-22 16:01:37.816457416 +0100 +@@ -1,6 +1,10 @@ + NEWS + ---- + ++New in 1.9.50: ++ ++* cups.getJobs() now takes optional requested_attributes argument. ++ + New in 1.9.48: + + * cups.cancelJob()'s optional second argument is now a keyword. diff --git a/system-config-printer-use-getJobs-requested-attrs.patch b/system-config-printer-use-getJobs-requested-attrs.patch new file mode 100644 index 0000000..f9ec21d --- /dev/null +++ b/system-config-printer-use-getJobs-requested-attrs.patch @@ -0,0 +1,34 @@ +diff -up system-config-printer-1.2.1/monitor.py.use-getJobs-requested-attrs system-config-printer-1.2.1/monitor.py +--- system-config-printer-1.2.1/monitor.py.use-getJobs-requested-attrs 2010-04-15 00:11:33.000000000 +0100 ++++ system-config-printer-1.2.1/monitor.py 2010-04-22 16:05:28.493458040 +0100 +@@ -608,11 +608,26 @@ class Monitor: + return False + + limit = 1 ++ r = ["job-id", ++ "job-printer-uri", ++ "job-state", ++ "job-originating-user-name", ++ "job-k-octets", ++ "job-name", ++ "time-at-creation"] + try: +- fetched = c.getJobs (which_jobs=self.which_jobs, +- my_jobs=self.my_jobs, +- first_job_id=self.fetch_first_job_id, +- limit=limit) ++ try: ++ fetched = c.getJobs (which_jobs=self.which_jobs, ++ my_jobs=self.my_jobs, ++ first_job_id=self.fetch_first_job_id, ++ limit=limit, ++ requested_attributes=r) ++ except TypeError: ++ # requested_attributes requires pycups 1.9.50 ++ fetched = c.getJobs (which_jobs=self.which_jobs, ++ my_jobs=self.my_jobs, ++ first_job_id=self.fetch_first_job_id, ++ limit=limit) + except cups.IPPError, (e, m): + self.watcher.cups_ipp_error (self, e, m) + self.fetch_jobs_timer = None diff --git a/system-config-printer.spec b/system-config-printer.spec index dbc6b67..a9a3924 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.2.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,8 +18,10 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch +Patch2: system-config-printer-use-getJobs-requested-attrs.patch Patch100: system-config-printer-pycups-build.patch +Patch101: pycups-add-getJobs-requested-attrs.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -81,11 +83,18 @@ printers. # Don't require epydoc. %patch1 -p1 -b .no-epydoc +# Specify requested attributes in getJobs if possible (bug #584806). +%patch2 -p1 -b .use-getJobs-requested-attrs.patch + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. %patch100 -p1 -b .pycups-build +# Added optional requested_attributes argument to Connection.getJobs +# (bug #584806). +%patch101 -p1 -b .add-getJobs-requested-attrs + popd %build @@ -203,6 +212,11 @@ rm -rf %buildroot exit 0 %changelog +* Thu Apr 22 2010 Tim Waugh - 1.2.1-2 +- Specify requested attributes in getJobs if possible (bug #584806). +- Added optional requested_attributes argument to Connection.getJobs + (bug #584806). + * Thu Apr 15 2010 Tim Waugh - 1.2.1-1 - Updated to 1.2.1: - Fixed missing translations (bug #580442). From 56ed9b83bb61033aca86c182b3ed4a438566062a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 7 May 2010 15:29:58 +0000 Subject: [PATCH 36/46] - Updated to 1.2.2: - Check we are connected to the local server for server firewall changes and package installation. - Avoid Yes/No buttons (trac #204). - Set gettext domain for new printer dialog (Ubuntu #557199). - Make sure the printer we are changing the PPD for still exists and close New Printer window if not (bug #581668). - Specify requested_attributes in getJobs if possible (bug #584806). - Resolve DNS-SD hostnames for physical device comparision (trac #179). - jobviewer: PrinterURIIndex fix when no initial printer names and when looking up by name. - Don't fetch Device ID from network printer if we already know it. - Applet module no longer needs to import statereason. - Removed doubled-up 'translatable' attribute in UI file (Ubuntu #571662). - Fixed indentation in PK1Connection.getDevices. - No need to introspect CupsPkHelper every time, just once. - troubleshoot: turn off debugging before fetching error log. - Fixed localized state reasons (bug #587718). - Match Kyocera as manufacturer when only model name reported (Ubuntu #564633). - Fixed TreeIter handling in update_job_creation_times (bug #588409). - Make Verify buttons auto-sized (Ubuntu #575048). - Fixed a troubleshooter string and some SMB auth dialog strings that were not being translated (Ubuntu #557199). - Show unmatched IEEE 1284 Device IDs in less confusing format. - check-device-ids: run SNMP query for lpd URIs too. - Handle HTTPError from AdvancedServerSettingsDialog, and treat any HTTP errors as failures (bug #587744). - asyncconn/asyncipp: some fixes for connection/reconnection failures. - ppdsloader: watch out for errors when connecting. - Initialise GUI.printers in constructor (bug #589793). - Always use close_fds=True in subprocess.Popen calls (bug #587830). - Translation updates. --- .cvsignore | 1 + sources | 2 +- system-config-printer-1.2.1.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.2.2.tar.xz.sig | Bin 0 -> 65 bytes ...-printer-use-getJobs-requested-attrs.patch | 34 ------------- system-config-printer.spec | 47 +++++++++++++++--- 6 files changed, 43 insertions(+), 41 deletions(-) delete mode 100644 system-config-printer-1.2.1.tar.xz.sig create mode 100644 system-config-printer-1.2.2.tar.xz.sig delete mode 100644 system-config-printer-use-getJobs-requested-attrs.patch diff --git a/.cvsignore b/.cvsignore index ee1a9d5..e6fe8d1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -217,3 +217,4 @@ system-config-printer-1.1.93.tar.xz pycups-1.9.49.tar.bz2 system-config-printer-1.2.0.tar.xz system-config-printer-1.2.1.tar.xz +system-config-printer-1.2.2.tar.xz diff --git a/sources b/sources index da82021..2ed88c8 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2 -c5463ad1b9f81947293521f8152727a1 system-config-printer-1.2.1.tar.xz +b14021236af2d935641c27d214d4923a system-config-printer-1.2.2.tar.xz diff --git a/system-config-printer-1.2.1.tar.xz.sig b/system-config-printer-1.2.1.tar.xz.sig deleted file mode 100644 index 74c72181d67a0a3824fe8e97fbe153dc37d112f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-OU6!Z1hg7`no8Q&5dt@20G==t3sBc4zdV - 1.2.2-1 +- Updated to 1.2.2: + - Check we are connected to the local server for server firewall + changes and package installation. + - Avoid Yes/No buttons (trac #204). + - Set gettext domain for new printer dialog (Ubuntu #557199). + - Make sure the printer we are changing the PPD for still exists + and close New Printer window if not (bug #581668). + - Specify requested_attributes in getJobs if possible (bug #584806). + - Resolve DNS-SD hostnames for physical device comparision + (trac #179). + - jobviewer: PrinterURIIndex fix when no initial printer names and + when looking up by name. + - Don't fetch Device ID from network printer if we already know it. + - Applet module no longer needs to import statereason. + - Removed doubled-up 'translatable' attribute in UI file + (Ubuntu #571662). + - Fixed indentation in PK1Connection.getDevices. + - No need to introspect CupsPkHelper every time, just once. + - troubleshoot: turn off debugging before fetching error log. + - Fixed localized state reasons (bug #587718). + - Match Kyocera as manufacturer when only model name reported + (Ubuntu #564633). + - Fixed TreeIter handling in update_job_creation_times (bug #588409). + - Make Verify buttons auto-sized (Ubuntu #575048). + - Fixed a troubleshooter string and some SMB auth dialog strings + that were not being translated (Ubuntu #557199). + - Show unmatched IEEE 1284 Device IDs in less confusing format. + - check-device-ids: run SNMP query for lpd URIs too. + - Handle HTTPError from AdvancedServerSettingsDialog, and treat any + HTTP errors as failures (bug #587744). + - asyncconn/asyncipp: some fixes for connection/reconnection + failures. + - ppdsloader: watch out for errors when connecting. + - Initialise GUI.printers in constructor (bug #589793). + - Always use close_fds=True in subprocess.Popen calls (bug #587830). + - Translation updates. + * Thu Apr 22 2010 Tim Waugh - 1.2.1-2 - Specify requested attributes in getJobs if possible (bug #584806). - Added optional requested_attributes argument to Connection.getJobs From 10abeb2c63b041af204e03d9e6ec6c88b18b04fe Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 13 May 2010 12:12:17 +0000 Subject: [PATCH 37/46] - cups-pk-helper FileGet method requires directory it can write to (bug #587744). --- ...em-config-printer-cupspk-fileget-tmp.patch | 29 +++++++++++++++++++ system-config-printer.spec | 11 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cupspk-fileget-tmp.patch diff --git a/system-config-printer-cupspk-fileget-tmp.patch b/system-config-printer-cupspk-fileget-tmp.patch new file mode 100644 index 0000000..a62e110 --- /dev/null +++ b/system-config-printer-cupspk-fileget-tmp.patch @@ -0,0 +1,29 @@ +diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py +--- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp 2010-05-07 15:19:03.000000000 +0100 ++++ system-config-printer-1.2.2/asyncpk1.py 2010-05-13 13:00:57.759093485 +0100 +@@ -153,7 +153,10 @@ class _WriteToTmpFile: + def __init__ (self, kwds, reply_handler, error_handler): + self._reply_handler = reply_handler + self._error_handler = error_handler +- (tmpfd, tmpfname) = tempfile.mkstemp () ++ ++ # Create the temporary file in /tmp to ensure that ++ # cups-pk-helper-mechanism is able to write to it. ++ (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp") + os.close (tmpfd) + self._filename = tmpfname + debugprint ("Created tempfile %s" % tmpfname) +diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py +--- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp 2010-04-15 00:11:33.000000000 +0100 ++++ system-config-printer-1.2.2/cupspk.py 2010-05-13 13:00:57.760093336 +0100 +@@ -385,7 +385,9 @@ class Connection: + filename = None + + if (not use_pycups) and (fd != None or file_object != None): +- (tmpfd, tmpfname) = tempfile.mkstemp() ++ # Create the temporary file in /tmp to ensure that ++ # cups-pk-helper-mechanism is able to write to it. ++ (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp") + os.close (tmpfd) + + pk_args = (resource, tmpfname) diff --git a/system-config-printer.spec b/system-config-printer.spec index 98573af..bc486a9 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.2.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch +Patch2: system-config-printer-cupspk-fileget-tmp.patch Patch100: system-config-printer-pycups-build.patch Patch101: pycups-add-getJobs-requested-attrs.patch @@ -82,6 +83,10 @@ printers. # Don't require epydoc. %patch1 -p1 -b .no-epydoc +# cups-pk-helper FileGet method requires directory it can write to +# (bug #587744). +%patch2 -p1 -b .no-epydoc + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -209,6 +214,10 @@ rm -rf %buildroot exit 0 %changelog +* Thu May 13 2010 Tim Waugh - 1.2.2-2 +- cups-pk-helper FileGet method requires directory it can write to + (bug #587744). + * Fri May 7 2010 Tim Waugh - 1.2.2-1 - Updated to 1.2.2: - Check we are connected to the local server for server firewall From 8713afba05963233b4c6649e1d21b7fbd33c3054 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 13 May 2010 12:14:35 +0000 Subject: [PATCH 38/46] Fixed typo. --- system-config-printer.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-config-printer.spec b/system-config-printer.spec index bc486a9..a3a5b4f 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -85,7 +85,7 @@ printers. # cups-pk-helper FileGet method requires directory it can write to # (bug #587744). -%patch2 -p1 -b .no-epydoc +%patch2 -p1 -b .cupspk-fileget-tmp pushd pycups-%{pycups_version} From e4381b0e73f7a72fb271f0463d2aa8d648bfd084 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 18 May 2010 12:15:55 +0000 Subject: [PATCH 39/46] - Updated pysmbc to 1.0.7. --- .cvsignore | 1 + pysmbc-1.0.6.tar.bz2.sig | Bin 65 -> 0 bytes pysmbc-1.0.7.tar.bz2.sig | 7 ++++++ sources | 1 + system-config-printer-no-epydoc.patch | 32 +++++++++++++------------- system-config-printer.spec | 11 +++++---- 6 files changed, 32 insertions(+), 20 deletions(-) delete mode 100644 pysmbc-1.0.6.tar.bz2.sig create mode 100644 pysmbc-1.0.7.tar.bz2.sig diff --git a/.cvsignore b/.cvsignore index e6fe8d1..8ab9082 100644 --- a/.cvsignore +++ b/.cvsignore @@ -218,3 +218,4 @@ pycups-1.9.49.tar.bz2 system-config-printer-1.2.0.tar.xz system-config-printer-1.2.1.tar.xz system-config-printer-1.2.2.tar.xz +pysmbc-1.0.7.tar.bz2 diff --git a/pysmbc-1.0.6.tar.bz2.sig b/pysmbc-1.0.6.tar.bz2.sig deleted file mode 100644 index e88c1ec9262f14cc8f92774ae87d00e2a0d87945..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-Nc@{=X(f@P9=Dkz5d!c?0GkBoTWVW@d&v!p^rJRG{TBon)x7|p XQ1WGwLff0*zmNh8uEATuQ&;FeXOkST diff --git a/pysmbc-1.0.7.tar.bz2.sig b/pysmbc-1.0.7.tar.bz2.sig new file mode 100644 index 0000000..c76411b --- /dev/null +++ b/pysmbc-1.0.7.tar.bz2.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.14 (GNU/Linux) + +iD8DBQBL8nU8BLQafZpK2tcRAoYjAKCWjLs2dyh1TSsj+UQ7sPmf/Frk/ACgkwNw +O8USf8fZmPPt14wAZPt5Phk= +=TdIr +-----END PGP SIGNATURE----- diff --git a/sources b/sources index 2ed88c8..7428660 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2 b14021236af2d935641c27d214d4923a system-config-printer-1.2.2.tar.xz +89e6fd9129f1700eec16156bdbf60dda pysmbc-1.0.7.tar.bz2 diff --git a/system-config-printer-no-epydoc.patch b/system-config-printer-no-epydoc.patch index dd79aca..c826fab 100644 --- a/system-config-printer-no-epydoc.patch +++ b/system-config-printer-no-epydoc.patch @@ -1,7 +1,7 @@ -diff -up system-config-printer-1.2.0/Makefile.am.no-epydoc system-config-printer-1.2.0/Makefile.am ---- system-config-printer-1.2.0/Makefile.am.no-epydoc 2010-03-16 18:22:08.000000000 +0000 -+++ system-config-printer-1.2.0/Makefile.am 2010-03-17 14:37:37.977366218 +0000 -@@ -247,7 +247,9 @@ $(man_MANS): $(top_srcdir)/man/system-co +diff -up system-config-printer-1.2.2/Makefile.am.no-epydoc system-config-printer-1.2.2/Makefile.am +--- system-config-printer-1.2.2/Makefile.am.no-epydoc 2010-05-07 15:19:03.000000000 +0100 ++++ system-config-printer-1.2.2/Makefile.am 2010-05-18 12:57:39.219065881 +0100 +@@ -248,7 +248,9 @@ $(man_MANS): $(top_srcdir)/man/system-co html: $(EXPORT_MODULES) rm -rf html @@ -12,10 +12,10 @@ diff -up system-config-printer-1.2.0/Makefile.am.no-epydoc system-config-printer distcheck-hook: update-po missing-imports -diff -up system-config-printer-1.2.0/Makefile.in.no-epydoc system-config-printer-1.2.0/Makefile.in ---- system-config-printer-1.2.0/Makefile.in.no-epydoc 2010-03-17 14:29:52.000000000 +0000 -+++ system-config-printer-1.2.0/Makefile.in 2010-03-17 14:37:19.098486129 +0000 -@@ -1430,7 +1430,9 @@ $(man_MANS): $(top_srcdir)/man/system-co +diff -up system-config-printer-1.2.2/Makefile.in.no-epydoc system-config-printer-1.2.2/Makefile.in +--- system-config-printer-1.2.2/Makefile.in.no-epydoc 2010-05-07 15:26:09.000000000 +0100 ++++ system-config-printer-1.2.2/Makefile.in 2010-05-18 12:57:39.222067064 +0100 +@@ -1431,7 +1431,9 @@ $(man_MANS): $(top_srcdir)/man/system-co html: $(EXPORT_MODULES) rm -rf html @@ -26,9 +26,9 @@ diff -up system-config-printer-1.2.0/Makefile.in.no-epydoc system-config-printer distcheck-hook: update-po missing-imports -diff -up system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc system-config-printer-1.2.0/pycups-1.9.48/Makefile ---- system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc 2010-01-19 12:34:47.000000000 +0000 -+++ system-config-printer-1.2.0/pycups-1.9.49/Makefile 2010-03-17 14:36:52.248486676 +0000 +diff -up system-config-printer-1.2.2/pycups-1.9.49/Makefile.no-epydoc system-config-printer-1.2.2/pycups-1.9.49/Makefile +--- system-config-printer-1.2.2/pycups-1.9.49/Makefile.no-epydoc 2010-03-10 09:45:10.000000000 +0000 ++++ system-config-printer-1.2.2/pycups-1.9.49/Makefile 2010-05-18 12:57:39.226942671 +0100 @@ -14,7 +14,9 @@ cups.so: $(SOURCES) doc: cups.so @@ -40,10 +40,10 @@ diff -up system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc system-con clean: -rm -rf build cups.so *.pyc *~ -diff -up system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc system-config-printer-1.2.0/pysmbc-1.0.6/Makefile ---- system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc 2008-10-20 15:51:14.000000000 +0100 -+++ system-config-printer-1.2.0/pysmbc-1.0.6/Makefile 2010-03-17 14:36:52.251484687 +0000 -@@ -12,7 +12,9 @@ smbc.so: $(SOURCES) +diff -up system-config-printer-1.2.2/pysmbc-1.0.7/Makefile.no-epydoc system-config-printer-1.2.2/pysmbc-1.0.7/Makefile +--- system-config-printer-1.2.2/pysmbc-1.0.7/Makefile.no-epydoc 2010-05-18 11:59:35.000000000 +0100 ++++ system-config-printer-1.2.2/pysmbc-1.0.7/Makefile 2010-05-18 12:58:28.680066521 +0100 +@@ -8,7 +8,9 @@ smbc.so: $(SOURCES) doc: smbc.so rm -rf html @@ -53,4 +53,4 @@ diff -up system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc system-conf + mv $(patsubst %.so,%.html,$<) html clean: - -rm -rf build smbc.so *.pyc *~ + -rm -rf build smbc.so *.pyc tests/*.pyc *~ tests/*~ diff --git a/system-config-printer.spec b/system-config-printer.spec index a3a5b4f..b20419a 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,5 +1,5 @@ %global pycups_version 1.9.49 -%global pysmbc_version 1.0.6 +%global pysmbc_version 1.0.7 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -134,13 +134,13 @@ rm -rf %buildroot %files libs -f system-config-printer.lang %defattr(-,root,root,-) %doc --parents pycups-%{pycups_version}/{COPYING,ChangeLog,README,NEWS,TODO,examples,html} -%doc --parents pysmbc-%{pysmbc_version}/{COPYING,ChangeLog,README,NEWS,TODO,test.py,html} +%doc --parents pysmbc-%{pysmbc_version}/{COPYING,README,NEWS,TODO,html} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf %{python_sitearch}/cups.so %{python_sitearch}/cups-1.0-py%{pyver}.egg-info %{python_sitearch}/smbc.so -%{python_sitearch}/smbc-1.0-py%{pyver}.egg-info +%{python_sitearch}/pysmbc-%{pysmbc_version}-py%{pyver}.egg-info %dir %{python_sitelib}/cupshelpers %{python_sitelib}/cupshelpers/__init__.py* %{python_sitelib}/cupshelpers/cupshelpers.py* @@ -214,6 +214,9 @@ rm -rf %buildroot exit 0 %changelog +* Tue May 18 2010 Tim Waugh - 1.2.2-3 +- Updated pysmbc to 1.0.7. + * Thu May 13 2010 Tim Waugh - 1.2.2-2 - cups-pk-helper FileGet method requires directory it can write to (bug #587744). From 1362cbca3c8a9ba57b4eee598857bd4b83c1b6cb Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 18 May 2010 13:53:22 +0000 Subject: [PATCH 40/46] - Updated pycups to 1.9.50. --- .cvsignore | 1 + pycups-1.9.50.tar.bz2.sig | Bin 0 -> 65 bytes pycups-add-getJobs-requested-attrs.patch | 198 ----------------------- sources | 3 +- system-config-printer-no-epydoc.patch | 6 +- system-config-printer-pycups-build.patch | 12 -- system-config-printer.spec | 19 +-- 7 files changed, 8 insertions(+), 231 deletions(-) create mode 100644 pycups-1.9.50.tar.bz2.sig delete mode 100644 pycups-add-getJobs-requested-attrs.patch delete mode 100644 system-config-printer-pycups-build.patch diff --git a/.cvsignore b/.cvsignore index 8ab9082..f75cd04 100644 --- a/.cvsignore +++ b/.cvsignore @@ -219,3 +219,4 @@ system-config-printer-1.2.0.tar.xz system-config-printer-1.2.1.tar.xz system-config-printer-1.2.2.tar.xz pysmbc-1.0.7.tar.bz2 +pycups-1.9.50.tar.bz2 diff --git a/pycups-1.9.50.tar.bz2.sig b/pycups-1.9.50.tar.bz2.sig new file mode 100644 index 0000000000000000000000000000000000000000..6a280094e3d246f05d58eed16ef8f071ced3c17d GIT binary patch literal 65 zcmV-H0KWf-KLZ5-OY(-51hg7`no8Q&5dtsw0G=%@Hjx29AKX!G#%dSnd=NzkwWt7} XP4jPiNVC-kd!)*M=Vmswp2IM3K=~V^ literal 0 HcmV?d00001 diff --git a/pycups-add-getJobs-requested-attrs.patch b/pycups-add-getJobs-requested-attrs.patch deleted file mode 100644 index 6867f54..0000000 --- a/pycups-add-getJobs-requested-attrs.patch +++ /dev/null @@ -1,198 +0,0 @@ -diff -U0 pycups-1.9.49/ChangeLog.add-getJobs-requested-attrs pycups-1.9.49/ChangeLog -diff -up pycups-1.9.49/cupsconnection.c.add-getJobs-requested-attrs pycups-1.9.49/cupsconnection.c ---- pycups-1.9.49/cupsconnection.c.add-getJobs-requested-attrs 2010-02-24 15:07:28.000000000 +0000 -+++ pycups-1.9.49/cupsconnection.c 2010-04-22 16:02:33.425457367 +0100 -@@ -1382,6 +1382,52 @@ Connection_getDevices (Connection *self, - return result; - } - -+static int -+get_requested_attrs (PyObject *requested_attrs, size_t *n_attrs, char ***attrs) -+{ -+ int i; -+ size_t n; -+ char **as; -+ -+ if (!PyList_Check (requested_attrs)) { -+ PyErr_SetString (PyExc_TypeError, "List required"); -+ return -1; -+ } -+ -+ n = PyList_Size (requested_attrs); -+ as = malloc ((n + 1) * sizeof (char *)); -+ for (i = 0; i < n; i++) { -+ PyObject *val = PyList_GetItem (requested_attrs, i); // borrowed ref -+ if (!PyString_Check (val)) { -+ PyErr_SetString (PyExc_TypeError, "String required"); -+ while (--i >= 0) -+ free (as[i]); -+ free (as); -+ return -1; -+ } -+ -+ as[i] = strdup (PyString_AsString (val)); -+ } -+ as[n] = NULL; -+ -+ debugprintf ("Requested attributes:\n"); -+ for (i = 0; as[i] != NULL; i++) -+ debugprintf (" %s\n", as[i]); -+ -+ *n_attrs = n; -+ *attrs = as; -+ return 0; -+} -+ -+static void -+free_requested_attrs (size_t n_attrs, char **attrs) -+{ -+ int i; -+ for (i = 0; i < n_attrs; i++) -+ free (attrs[i]); -+ free (attrs); -+} -+ - static PyObject * - Connection_getJobs (Connection *self, PyObject *args, PyObject *kwds) - { -@@ -1392,10 +1438,14 @@ Connection_getJobs (Connection *self, Py - int my_jobs = 0; - int limit = -1; - int first_job_id = -1; -+ PyObject *requested_attrs = NULL; -+ char **attrs = NULL; /* initialised to calm compiler */ -+ size_t n_attrs = 0; /* initialised to calm compiler */ - static char *kwlist[] = { "which_jobs", "my_jobs", "limit", "first_job_id", -- NULL }; -- if (!PyArg_ParseTupleAndKeywords (args, kwds, "|siii", kwlist, -- &which, &my_jobs, &limit, &first_job_id)) -+ "requested_attributes", NULL }; -+ if (!PyArg_ParseTupleAndKeywords (args, kwds, "|siiiO", kwlist, -+ &which, &my_jobs, &limit, &first_job_id, -+ &requested_attrs)) - return NULL; - - debugprintf ("-> Connection_getJobs(%s,%d)\n", -@@ -1419,6 +1469,18 @@ Connection_getJobs (Connection *self, Py - ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, - "first-job-id", first_job_id); - -+ if (requested_attrs) { -+ if (get_requested_attrs (requested_attrs, &n_attrs, &attrs) == -1) { -+ ippDelete (request); -+ return NULL; -+ } -+ -+ ippAddStrings (request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, -+ "requested-attributes", n_attrs, NULL, -+ (const char **) attrs); -+ free_requested_attrs (n_attrs, attrs); -+ } -+ - debugprintf ("cupsDoRequest(\"/\")\n"); - Connection_begin_allow_threads (self); - answer = cupsDoRequest (self->http, request, "/"); -@@ -1474,6 +1536,18 @@ Connection_getJobs (Connection *self, Py - else if (!strcmp (attr->name, "job-preserved") && - attr->value_tag == IPP_TAG_BOOLEAN) - val = PyBool_FromLong (attr->values[0].integer); -+ else { -+ if (attr->num_values > 1) { -+ int i; -+ val = PyList_New (0); -+ for (i = 0; i < attr->num_values; i++) { -+ PyObject *item = PyObject_from_attr_value (attr, i); -+ if (item) -+ PyList_Append (val, item); -+ } -+ } else -+ val = PyObject_from_attr_value (attr, 0); -+ } - - if (val) { - debugprintf ("Adding %s to job dict\n", attr->name); -@@ -1500,52 +1574,6 @@ Connection_getJobs (Connection *self, Py - return result; - } - --static int --get_requested_attrs (PyObject *requested_attrs, size_t *n_attrs, char ***attrs) --{ -- int i; -- size_t n; -- char **as; -- -- if (!PyList_Check (requested_attrs)) { -- PyErr_SetString (PyExc_TypeError, "List required"); -- return -1; -- } -- -- n = PyList_Size (requested_attrs); -- as = malloc ((n + 1) * sizeof (char *)); -- for (i = 0; i < n; i++) { -- PyObject *val = PyList_GetItem (requested_attrs, i); // borrowed ref -- if (!PyString_Check (val)) { -- PyErr_SetString (PyExc_TypeError, "String required"); -- while (--i >= 0) -- free (as[i]); -- free (as); -- return -1; -- } -- -- as[i] = strdup (PyString_AsString (val)); -- } -- as[n] = NULL; -- -- debugprintf ("Requested attributes:\n"); -- for (i = 0; as[i] != NULL; i++) -- debugprintf (" %s\n", as[i]); -- -- *n_attrs = n; -- *attrs = as; -- return 0; --} -- --static void --free_requested_attrs (size_t n_attrs, char **attrs) --{ -- int i; -- for (i = 0; i < n_attrs; i++) -- free (attrs[i]); -- free (attrs); --} -- - static PyObject * - Connection_getJobAttributes (Connection *self, PyObject *args, PyObject *kwds) - { -@@ -4439,7 +4467,7 @@ PyMethodDef Connection_methods[] = - - { "getJobs", - (PyCFunction) Connection_getJobs, METH_VARARGS | METH_KEYWORDS, -- "getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1) -> dict\n" -+ "getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1, requested_attributes=None) -> dict\n" - "Fetch a list of jobs.\n" - "@type which_jobs: string\n" - "@param which_jobs: which jobs to fetch; possible values: \n" -@@ -4453,6 +4481,8 @@ PyMethodDef Connection_methods[] = - "@param limit: maximum number of jobs to return\n" - "@type first_job_id: integer\n" - "@param first_job_id: lowest job ID to return\n" -+ "@type requested_attributes: string list\n" -+ "@param requested_attributes: list of requested attribute names\n" - "@raise IPPError: IPP problem" }, - - { "getJobAttributes", -diff -up pycups-1.9.49/NEWS.add-getJobs-requested-attrs pycups-1.9.49/NEWS ---- pycups-1.9.49/NEWS.add-getJobs-requested-attrs 2010-01-19 12:33:26.000000000 +0000 -+++ pycups-1.9.49/NEWS 2010-04-22 16:01:37.816457416 +0100 -@@ -1,6 +1,10 @@ - NEWS - ---- - -+New in 1.9.50: -+ -+* cups.getJobs() now takes optional requested_attributes argument. -+ - New in 1.9.48: - - * cups.cancelJob()'s optional second argument is now a keyword. diff --git a/sources b/sources index 7428660..2747d72 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ -ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 -6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2 b14021236af2d935641c27d214d4923a system-config-printer-1.2.2.tar.xz 89e6fd9129f1700eec16156bdbf60dda pysmbc-1.0.7.tar.bz2 +cae67ab1207f5ffa93edc9b5867738bb pycups-1.9.50.tar.bz2 diff --git a/system-config-printer-no-epydoc.patch b/system-config-printer-no-epydoc.patch index c826fab..deee314 100644 --- a/system-config-printer-no-epydoc.patch +++ b/system-config-printer-no-epydoc.patch @@ -26,9 +26,9 @@ diff -up system-config-printer-1.2.2/Makefile.in.no-epydoc system-config-printer distcheck-hook: update-po missing-imports -diff -up system-config-printer-1.2.2/pycups-1.9.49/Makefile.no-epydoc system-config-printer-1.2.2/pycups-1.9.49/Makefile ---- system-config-printer-1.2.2/pycups-1.9.49/Makefile.no-epydoc 2010-03-10 09:45:10.000000000 +0000 -+++ system-config-printer-1.2.2/pycups-1.9.49/Makefile 2010-05-18 12:57:39.226942671 +0100 +diff -up system-config-printer-1.2.2/pycups-1.9.50/Makefile.no-epydoc system-config-printer-1.2.2/pycups-1.9.50/Makefile +--- system-config-printer-1.2.2/pycups-1.9.50/Makefile.no-epydoc 2010-03-10 09:45:10.000000000 +0000 ++++ system-config-printer-1.2.2/pycups-1.9.50/Makefile 2010-05-18 12:57:39.226942671 +0100 @@ -14,7 +14,9 @@ cups.so: $(SOURCES) doc: cups.so diff --git a/system-config-printer-pycups-build.patch b/system-config-printer-pycups-build.patch deleted file mode 100644 index 76a1e35..0000000 --- a/system-config-printer-pycups-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up pycups-1.9.49/Makefile.pycups-build pycups-1.9.49/Makefile ---- pycups-1.9.49/Makefile.pycups-build 2010-03-22 12:46:31.351447572 +0000 -+++ pycups-1.9.49/Makefile 2010-03-22 12:46:41.155449391 +0000 -@@ -31,7 +31,7 @@ dist: - install: - ROOT= ; \ - if [ -n "$$DESTDIR" ]; then ROOT="--root $$DESTDIR"; fi; \ -- python setup.py install $$ROOT -+ CFLAGS=-DVERSION=\\\"$(VERSION)\\\" python setup.py install $$ROOT - - .PHONY: doc clean dist install - diff --git a/system-config-printer.spec b/system-config-printer.spec index b20419a..c65ee86 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,4 +1,4 @@ -%global pycups_version 1.9.49 +%global pycups_version 1.9.50 %global pysmbc_version 1.0.7 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -20,9 +20,6 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-cupspk-fileget-tmp.patch -Patch100: system-config-printer-pycups-build.patch -Patch101: pycups-add-getJobs-requested-attrs.patch - BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 BuildRequires: libsmbclient-devel >= 3.2 @@ -87,17 +84,6 @@ printers. # (bug #587744). %patch2 -p1 -b .cupspk-fileget-tmp -pushd pycups-%{pycups_version} - -# Fixed pycups build with new distutils. -%patch100 -p1 -b .pycups-build - -# Added optional requested_attributes argument to Connection.getJobs -# (bug #584806). -%patch101 -p1 -b .add-getJobs-requested-attrs - -popd - %build %configure --with-udev-rules @@ -138,7 +124,7 @@ rm -rf %buildroot %config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf %{python_sitearch}/cups.so -%{python_sitearch}/cups-1.0-py%{pyver}.egg-info +%{python_sitearch}/pycups-%{pycups_version}-py%{pyver}.egg-info %{python_sitearch}/smbc.so %{python_sitearch}/pysmbc-%{pysmbc_version}-py%{pyver}.egg-info %dir %{python_sitelib}/cupshelpers @@ -215,6 +201,7 @@ exit 0 %changelog * Tue May 18 2010 Tim Waugh - 1.2.2-3 +- Updated pycups to 1.9.50. - Updated pysmbc to 1.0.7. * Thu May 13 2010 Tim Waugh - 1.2.2-2 From 215d77623d827c28d8bbe971697d0c9e0f99f8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 2 Jun 2010 16:24:18 +0000 Subject: [PATCH 41/46] - Initialise auto_make to the empty string (bug #590193). --- system-config-printer-auto_make.patch | 23 +++++++++++++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-auto_make.patch diff --git a/system-config-printer-auto_make.patch b/system-config-printer-auto_make.patch new file mode 100644 index 0000000..1930888 --- /dev/null +++ b/system-config-printer-auto_make.patch @@ -0,0 +1,23 @@ +diff -up system-config-printer-1.2.2/system-config-printer.py.auto_make system-config-printer-1.2.2/system-config-printer.py +--- system-config-printer-1.2.2/system-config-printer.py.auto_make 2010-05-07 16:19:03.000000000 +0200 ++++ system-config-printer-1.2.2/system-config-printer.py 2010-06-02 18:15:16.000000000 +0200 +@@ -4111,8 +4111,8 @@ class NewPrinterGUI(GtkGUI): + self.on_rbtnNPFoomatic_toggled(self.rbtnNPFoomatic) + self.rbtnChangePPDKeepSettings.set_active(True) + +- self.auto_make = None +- self.auto_model = None ++ self.auto_make = "" ++ self.auto_model = "" + self.auto_driver = None + ppd = self.mainapp.ppd + #self.mainapp.devid = "MFG:Samsung;MDL:ML-3560;DES:;CMD:GDI;" +@@ -4319,7 +4319,7 @@ class NewPrinterGUI(GtkGUI): + self.dialog_mode == "printer_with_uri": + self.busy (self.NewPrinterWindow) + if page_nr == 1: # Device (first page) +- self.auto_make, self.auto_model = None, None ++ self.auto_make, self.auto_model = "", "" + self.auto_driver = None + self.device.uri = self.getDeviceURI() + diff --git a/system-config-printer.spec b/system-config-printer.spec index c65ee86..afc0d6c 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.2.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-cupspk-fileget-tmp.patch +Patch3: system-config-printer-auto_make.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -84,6 +85,9 @@ printers. # (bug #587744). %patch2 -p1 -b .cupspk-fileget-tmp +#Initialise auto_make to the empty string (bug #590193). +%patch3 -p1 -b .auto_make + %build %configure --with-udev-rules @@ -200,6 +204,9 @@ rm -rf %buildroot exit 0 %changelog +* Wed Jun 02 2010 Jiri Popelka 1.2.2-4 +- Initialise auto_make to the empty string (bug #590193). + * Tue May 18 2010 Tim Waugh - 1.2.2-3 - Updated pycups to 1.9.50. - Updated pysmbc to 1.0.7. From 4e3e619ada10efb658c722beb6c92b1a8f592057 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 24 Jun 2010 16:58:52 +0000 Subject: [PATCH 42/46] - Updated to 1.2.3: - Use toolbar instead of menubar in JobsViewer (trac #205). - Fixed HTTPError status code handling when changing server settings. - Fixed traceback with driver auto-selection (bug #590193). - Only local filenames can be selected for troubleshoot.txt (bug #590529). - Fixed cups-pk-helper FileGet usage (bug #587744). - Escape printer names in error dialog markup (Ubuntu #567324). - Avoid traceback changing PPD for queue with bad PPD. - Attempt to translate backend device-info strings (Ubuntu #557199). - Don't buffer debugging output. - Avoid leaking Connection objects when cancelling jobs. - Threading fixes (trac #206). - Canon naming fixes from vendor. - Make deep copy of list of job ids to cancel (bug #598249). - Bluetooth auto-config support. - Restored keybindings/tooltips lost in switch to action groups (trac #208). - Spinner icon has to have more than one frame (bug #603034). - Add job to active_jobs only if we're interested in it (bug #604492). - Make sure automatically-created queues will work; delete queue if missing executables. - Don't add queues for Graphtec devices (bug #547171). - Avoid KeyError in AdvancedServerSettings.py (bug #606798). - Handle empty notify-subscribed-event subscription attributes (bug #606909). --- .cvsignore | 1 + sources | 2 +- system-config-printer-1.2.2.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.2.3.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-auto_make.patch | 23 -------- ...em-config-printer-cupspk-fileget-tmp.patch | 29 ----------- system-config-printer.spec | 49 +++++++++++++----- 7 files changed, 38 insertions(+), 66 deletions(-) delete mode 100644 system-config-printer-1.2.2.tar.xz.sig create mode 100644 system-config-printer-1.2.3.tar.xz.sig delete mode 100644 system-config-printer-auto_make.patch delete mode 100644 system-config-printer-cupspk-fileget-tmp.patch diff --git a/.cvsignore b/.cvsignore index f75cd04..0d3ee49 100644 --- a/.cvsignore +++ b/.cvsignore @@ -220,3 +220,4 @@ system-config-printer-1.2.1.tar.xz system-config-printer-1.2.2.tar.xz pysmbc-1.0.7.tar.bz2 pycups-1.9.50.tar.bz2 +system-config-printer-1.2.3.tar.xz diff --git a/sources b/sources index 2747d72..dea8483 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -b14021236af2d935641c27d214d4923a system-config-printer-1.2.2.tar.xz 89e6fd9129f1700eec16156bdbf60dda pysmbc-1.0.7.tar.bz2 cae67ab1207f5ffa93edc9b5867738bb pycups-1.9.50.tar.bz2 +e9ab97e4b0fdff5a75e1a5874808c2c1 system-config-printer-1.2.3.tar.xz diff --git a/system-config-printer-1.2.2.tar.xz.sig b/system-config-printer-1.2.2.tar.xz.sig deleted file mode 100644 index 332d4159c7a3e1d63cf8e25812b781013f844f02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-OXMaw1hg7`no8Q&5dy4)0G=XgXfoV!#W0}2CiL!<;@IUr1^ED< XWLJw9_Mf1TXUEqePYBkA;L{nQhJPMt diff --git a/system-config-printer-1.2.3.tar.xz.sig b/system-config-printer-1.2.3.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..c356d99d897f4b1b998a448ec73d7a0d9db07805 GIT binary patch literal 65 zcmV-H0KWf-KLZ5-Oe2Yh1hg7`no8Q&5ds&p0HC6b5Y|N0&@h6np-4WJ$d&RaHSmz literal 0 HcmV?d00001 diff --git a/system-config-printer-auto_make.patch b/system-config-printer-auto_make.patch deleted file mode 100644 index 1930888..0000000 --- a/system-config-printer-auto_make.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up system-config-printer-1.2.2/system-config-printer.py.auto_make system-config-printer-1.2.2/system-config-printer.py ---- system-config-printer-1.2.2/system-config-printer.py.auto_make 2010-05-07 16:19:03.000000000 +0200 -+++ system-config-printer-1.2.2/system-config-printer.py 2010-06-02 18:15:16.000000000 +0200 -@@ -4111,8 +4111,8 @@ class NewPrinterGUI(GtkGUI): - self.on_rbtnNPFoomatic_toggled(self.rbtnNPFoomatic) - self.rbtnChangePPDKeepSettings.set_active(True) - -- self.auto_make = None -- self.auto_model = None -+ self.auto_make = "" -+ self.auto_model = "" - self.auto_driver = None - ppd = self.mainapp.ppd - #self.mainapp.devid = "MFG:Samsung;MDL:ML-3560;DES:;CMD:GDI;" -@@ -4319,7 +4319,7 @@ class NewPrinterGUI(GtkGUI): - self.dialog_mode == "printer_with_uri": - self.busy (self.NewPrinterWindow) - if page_nr == 1: # Device (first page) -- self.auto_make, self.auto_model = None, None -+ self.auto_make, self.auto_model = "", "" - self.auto_driver = None - self.device.uri = self.getDeviceURI() - diff --git a/system-config-printer-cupspk-fileget-tmp.patch b/system-config-printer-cupspk-fileget-tmp.patch deleted file mode 100644 index a62e110..0000000 --- a/system-config-printer-cupspk-fileget-tmp.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py ---- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp 2010-05-07 15:19:03.000000000 +0100 -+++ system-config-printer-1.2.2/asyncpk1.py 2010-05-13 13:00:57.759093485 +0100 -@@ -153,7 +153,10 @@ class _WriteToTmpFile: - def __init__ (self, kwds, reply_handler, error_handler): - self._reply_handler = reply_handler - self._error_handler = error_handler -- (tmpfd, tmpfname) = tempfile.mkstemp () -+ -+ # Create the temporary file in /tmp to ensure that -+ # cups-pk-helper-mechanism is able to write to it. -+ (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp") - os.close (tmpfd) - self._filename = tmpfname - debugprint ("Created tempfile %s" % tmpfname) -diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py ---- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp 2010-04-15 00:11:33.000000000 +0100 -+++ system-config-printer-1.2.2/cupspk.py 2010-05-13 13:00:57.760093336 +0100 -@@ -385,7 +385,9 @@ class Connection: - filename = None - - if (not use_pycups) and (fd != None or file_object != None): -- (tmpfd, tmpfname) = tempfile.mkstemp() -+ # Create the temporary file in /tmp to ensure that -+ # cups-pk-helper-mechanism is able to write to it. -+ (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp") - os.close (tmpfd) - - pk_args = (resource, tmpfname) diff --git a/system-config-printer.spec b/system-config-printer.spec index afc0d6c..1ea9fad 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -6,8 +6,8 @@ Summary: A printer administration tool Name: system-config-printer -Version: 1.2.2 -Release: 4%{?dist} +Version: 1.2.3 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,8 +18,6 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch -Patch2: system-config-printer-cupspk-fileget-tmp.patch -Patch3: system-config-printer-auto_make.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -27,7 +25,7 @@ BuildRequires: libsmbclient-devel >= 3.2 BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: gettext-devel BuildRequires: intltool -BuildRequires: libusb-devel, libudev-devel +BuildRequires: libusb-devel, libudev-devel, glib2-devel BuildRequires: xmlto BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -81,13 +79,6 @@ printers. # Don't require epydoc. %patch1 -p1 -b .no-epydoc -# cups-pk-helper FileGet method requires directory it can write to -# (bug #587744). -%patch2 -p1 -b .cupspk-fileget-tmp - -#Initialise auto_make to the empty string (bug #590193). -%patch3 -p1 -b .auto_make - %build %configure --with-udev-rules @@ -103,7 +94,9 @@ popd %install rm -rf %buildroot -make DESTDIR=%buildroot install +make DESTDIR=%buildroot install \ + udevrulesdir=/lib/udev/rules.d \ + udevhelperdir=/lib/udev pushd pycups-%{pycups_version} make DESTDIR=%buildroot install @@ -204,6 +197,36 @@ rm -rf %buildroot exit 0 %changelog +* Thu Jun 24 2010 Tim Waugh - 1.2.3-1 +- Updated to 1.2.3: + - Use toolbar instead of menubar in JobsViewer (trac #205). + - Fixed HTTPError status code handling when changing server + settings. + - Fixed traceback with driver auto-selection (bug #590193). + - Only local filenames can be selected for troubleshoot.txt + (bug #590529). + - Fixed cups-pk-helper FileGet usage (bug #587744). + - Escape printer names in error dialog markup (Ubuntu #567324). + - Avoid traceback changing PPD for queue with bad PPD. + - Attempt to translate backend device-info strings (Ubuntu #557199). + - Don't buffer debugging output. + - Avoid leaking Connection objects when cancelling jobs. + - Threading fixes (trac #206). + - Canon naming fixes from vendor. + - Make deep copy of list of job ids to cancel (bug #598249). + - Bluetooth auto-config support. + - Restored keybindings/tooltips lost in switch to action groups + (trac #208). + - Spinner icon has to have more than one frame (bug #603034). + - Add job to active_jobs only if we're interested in it + (bug #604492). + - Make sure automatically-created queues will work; delete queue if + missing executables. + - Don't add queues for Graphtec devices (bug #547171). + - Avoid KeyError in AdvancedServerSettings.py (bug #606798). + - Handle empty notify-subscribed-event subscription attributes + (bug #606909). + * Wed Jun 02 2010 Jiri Popelka 1.2.2-4 - Initialise auto_make to the empty string (bug #590193). From a4e37c5d29153c1b295c7eef55efd11b2bdc99f9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 25 Jun 2010 16:22:55 +0000 Subject: [PATCH 43/46] - Updated pycups to 1.9.51 (bug #584991). --- .cvsignore | 1 + sources | 1 + system-config-printer-no-epydoc.patch | 56 --------------------------- system-config-printer.spec | 13 +++---- 4 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 system-config-printer-no-epydoc.patch diff --git a/.cvsignore b/.cvsignore index 0d3ee49..fbc67ca 100644 --- a/.cvsignore +++ b/.cvsignore @@ -221,3 +221,4 @@ system-config-printer-1.2.2.tar.xz pysmbc-1.0.7.tar.bz2 pycups-1.9.50.tar.bz2 system-config-printer-1.2.3.tar.xz +pycups-1.9.51.tar.bz2 diff --git a/sources b/sources index dea8483..f33e9a1 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ 89e6fd9129f1700eec16156bdbf60dda pysmbc-1.0.7.tar.bz2 cae67ab1207f5ffa93edc9b5867738bb pycups-1.9.50.tar.bz2 e9ab97e4b0fdff5a75e1a5874808c2c1 system-config-printer-1.2.3.tar.xz +7e9de64bce9496ce2d36ab513dd69dd5 pycups-1.9.51.tar.bz2 diff --git a/system-config-printer-no-epydoc.patch b/system-config-printer-no-epydoc.patch deleted file mode 100644 index deee314..0000000 --- a/system-config-printer-no-epydoc.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up system-config-printer-1.2.2/Makefile.am.no-epydoc system-config-printer-1.2.2/Makefile.am ---- system-config-printer-1.2.2/Makefile.am.no-epydoc 2010-05-07 15:19:03.000000000 +0100 -+++ system-config-printer-1.2.2/Makefile.am 2010-05-18 12:57:39.219065881 +0100 -@@ -248,7 +248,9 @@ $(man_MANS): $(top_srcdir)/man/system-co - - html: $(EXPORT_MODULES) - rm -rf html -- epydoc -o html --html $(EXPORT_MODULES) -+ $(MKDIR_P) html -+ pydoc -w $(EXPORT_MODULES) -+ mv $(patsubst %,%.html,$(EXPORT_MODULES)) html - - distcheck-hook: update-po missing-imports - -diff -up system-config-printer-1.2.2/Makefile.in.no-epydoc system-config-printer-1.2.2/Makefile.in ---- system-config-printer-1.2.2/Makefile.in.no-epydoc 2010-05-07 15:26:09.000000000 +0100 -+++ system-config-printer-1.2.2/Makefile.in 2010-05-18 12:57:39.222067064 +0100 -@@ -1431,7 +1431,9 @@ $(man_MANS): $(top_srcdir)/man/system-co - - html: $(EXPORT_MODULES) - rm -rf html -- epydoc -o html --html $(EXPORT_MODULES) -+ $(MKDIR_P) html -+ pydoc -w $(EXPORT_MODULES) -+ mv $(patsubst %,%.html,$(EXPORT_MODULES)) html - - distcheck-hook: update-po missing-imports - -diff -up system-config-printer-1.2.2/pycups-1.9.50/Makefile.no-epydoc system-config-printer-1.2.2/pycups-1.9.50/Makefile ---- system-config-printer-1.2.2/pycups-1.9.50/Makefile.no-epydoc 2010-03-10 09:45:10.000000000 +0000 -+++ system-config-printer-1.2.2/pycups-1.9.50/Makefile 2010-05-18 12:57:39.226942671 +0100 -@@ -14,7 +14,9 @@ cups.so: $(SOURCES) - - doc: cups.so - rm -rf html -- epydoc -o html --html $< -+ mkdir -p html -+ pydoc -w $(patsubst %.so,%,$<) -+ mv $(patsubst %.so,%.html,$<) html - - clean: - -rm -rf build cups.so *.pyc *~ -diff -up system-config-printer-1.2.2/pysmbc-1.0.7/Makefile.no-epydoc system-config-printer-1.2.2/pysmbc-1.0.7/Makefile ---- system-config-printer-1.2.2/pysmbc-1.0.7/Makefile.no-epydoc 2010-05-18 11:59:35.000000000 +0100 -+++ system-config-printer-1.2.2/pysmbc-1.0.7/Makefile 2010-05-18 12:58:28.680066521 +0100 -@@ -8,7 +8,9 @@ smbc.so: $(SOURCES) - - doc: smbc.so - rm -rf html -- epydoc -o html --html $< -+ mkdir -p html -+ pydoc -w $(patsubst %.so,%,$<) -+ mv $(patsubst %.so,%.html,$<) html - - clean: - -rm -rf build smbc.so *.pyc tests/*.pyc *~ tests/*~ diff --git a/system-config-printer.spec b/system-config-printer.spec index 1ea9fad..860fc04 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,4 +1,4 @@ -%global pycups_version 1.9.50 +%global pycups_version 1.9.51 %global pysmbc_version 1.0.7 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.3 -Release: 1%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,8 +17,6 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 # Python bindings for libsmbclient Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 -Patch1: system-config-printer-no-epydoc.patch - BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 BuildRequires: libsmbclient-devel >= 3.2 @@ -26,7 +24,7 @@ BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: gettext-devel BuildRequires: intltool BuildRequires: libusb-devel, libudev-devel, glib2-devel -BuildRequires: xmlto +BuildRequires: epydoc, xmlto BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -76,8 +74,6 @@ printers. %prep %setup -q -a 1 -a 2 -# Don't require epydoc. -%patch1 -p1 -b .no-epydoc %build %configure --with-udev-rules @@ -197,6 +193,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Jun 25 2010 Tim Waugh - 1.2.3-3 +- Updated pycups to 1.9.51 (bug #584991). + * Thu Jun 24 2010 Tim Waugh - 1.2.3-1 - Updated to 1.2.3: - Use toolbar instead of menubar in JobsViewer (trac #205). From 30cbf73f345fa7d1305f9bcebd71cc8116c2aaa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Mon, 12 Jul 2010 12:21:14 +0000 Subject: [PATCH 44/46] - Moved COPYING file to libs sub-package. --- system-config-printer.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/system-config-printer.spec b/system-config-printer.spec index 860fc04..951ff8e 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.2.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -112,6 +112,7 @@ rm -rf %buildroot %files libs -f system-config-printer.lang %defattr(-,root,root,-) +%doc COPYING %doc --parents pycups-%{pycups_version}/{COPYING,ChangeLog,README,NEWS,TODO,examples,html} %doc --parents pysmbc-%{pysmbc_version}/{COPYING,README,NEWS,TODO,html} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf @@ -136,7 +137,7 @@ rm -rf %buildroot %files %defattr(-,root,root,-) -%doc COPYING ChangeLog README +%doc ChangeLog README %{_bindir}/%{name} %{_bindir}/%{name}-applet %dir %{_datadir}/%{name} @@ -193,6 +194,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Jul 12 2010 Jiri Popelka 1.2.3-4 +- Moved COPYING file to libs sub-package. + * Fri Jun 25 2010 Tim Waugh - 1.2.3-3 - Updated pycups to 1.9.51 (bug #584991). From d66f16a9b631da080e9e99eca115cb2bfa2d4f96 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 13:41:24 +0000 Subject: [PATCH 45/46] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index a860d91..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: system-config-printer -# $Id$ -NAME := system-config-printer -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 From c20702b2ce82d2c38c34e166ff1e598d4a7d272a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 2 Aug 2010 11:56:09 +0100 Subject: [PATCH 46/46] Removed outdated file from sources. --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index f33e9a1..67139b4 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ 89e6fd9129f1700eec16156bdbf60dda pysmbc-1.0.7.tar.bz2 -cae67ab1207f5ffa93edc9b5867738bb pycups-1.9.50.tar.bz2 e9ab97e4b0fdff5a75e1a5874808c2c1 system-config-printer-1.2.3.tar.xz 7e9de64bce9496ce2d36ab513dd69dd5 pycups-1.9.51.tar.bz2