From 6f9387e0f4a4ea84589afa7c5a736fcfc5bab560 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 9 Jan 2017 13:25:49 +0100 Subject: [PATCH] version 1.5.9 --- .gitignore | 1 + sources | 2 +- system-config-printer-device-sorting.patch | 126 --------------------- system-config-printer-minorerrors.patch | 43 ------- system-config-printer-permission.patch | 21 ---- system-config-printer-shbang.patch | 9 -- system-config-printer.spec | 30 ++--- 7 files changed, 14 insertions(+), 218 deletions(-) delete mode 100644 system-config-printer-device-sorting.patch delete mode 100644 system-config-printer-minorerrors.patch delete mode 100644 system-config-printer-permission.patch delete mode 100644 system-config-printer-shbang.patch diff --git a/.gitignore b/.gitignore index 13d9169..521c3a4 100644 --- a/.gitignore +++ b/.gitignore @@ -257,3 +257,4 @@ pycups-1.9.51.tar.bz2 /system-config-printer-1.5.5.tar.xz /system-config-printer-1.5.6.tar.xz /system-config-printer-1.5.7.tar.xz +/system-config-printer-1.5.9.tar.gz diff --git a/sources b/sources index 393189c..77b09c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1a0c6a4566a5479733945f6db32d6f00 system-config-printer-1.5.7.tar.xz +SHA512 (system-config-printer-1.5.9.tar.gz) = 2167be3fe9e1bee5831c92d4f58aebb464e70c056d15d205a8c0fcfaaec1365c348d4f29f21021894c94d1b29dec1f8623089aaafddba2d4a04cb1c6ed16c4cd diff --git a/system-config-printer-device-sorting.patch b/system-config-printer-device-sorting.patch deleted file mode 100644 index 20a6696..0000000 --- a/system-config-printer-device-sorting.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting system-config-printer-1.5.7/cupshelpers/cupshelpers.py ---- system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting 2015-04-23 16:05:58.000000000 +0100 -+++ system-config-printer-1.5.7/cupshelpers/cupshelpers.py 2015-05-26 09:57:43.583569255 +0100 -@@ -547,68 +547,68 @@ class Device: - Compare devices by order of preference. - """ - if other == None: -- return 1 -+ return True - - if self.is_class != other.is_class: - if other.is_class: -- return 1 -- return -1 -+ return True -+ return False - if not self.is_class and (self.type != other.type): - # "hp"/"hpfax" before "usb" before * before "parallel" before - # "serial" - if other.type == "serial": -- return 1 -+ return True - if self.type == "serial": -- return -1 -+ return False - if other.type == "parallel": -- return 1 -+ return True - if self.type == "parallel": -- return -1 -+ return False - if other.type == "hp": -- return -1 -+ return False - if self.type == "hp": -- return 1 -+ return True - if other.type == "hpfax": -- return -1 -+ return False - if self.type == "hpfax": -- return 1 -+ return True - if other.type == "dnssd": -- return -1 -+ return False - if self.type == "dnssd": -- return 1 -+ return True - if other.type == "socket": -- return -1 -+ return False - if self.type == "socket": -- return 1 -+ return True - if other.type == "lpd": -- return -1 -+ return False - if self.type == "lpd": -- return 1 -+ return True - if other.type == "ipps": -- return -1 -+ return False - if self.type == "ipps": -- return 1 -+ return True - if other.type == "ipp": -- return -1 -+ return False - if self.type == "ipp": -- return 1 -+ return True - if other.type == "usb": -- return -1 -+ return False - if self.type == "usb": -- return 1 -+ return True - if self.type == "dnssd" and other.type == "dnssd": - if other.uri.find("._pdl-datastream") != -1: # Socket -- return -1 -+ return False - if self.uri.find("._pdl-datastream") != -1: -- return 1 -+ return True - if other.uri.find("._printer") != -1: # LPD -- return -1 -+ return False - if self.uri.find("._printer") != -1: -- return 1 -+ return True - if other.uri.find("._ipp") != -1: # IPP -- return -1 -+ return False - if self.uri.find("._ipp") != -1: -- return 1 -+ return True - result = bool(self.id) < bool(other.id) - if not result: - result = self.info < other.info -diff -up system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting system-config-printer-1.5.7/test_PhysicalDevice.py ---- system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting 2015-04-23 16:22:28.000000000 +0100 -+++ system-config-printer-1.5.7/test_PhysicalDevice.py 2015-05-26 09:57:43.583569255 +0100 -@@ -49,3 +49,21 @@ def run_test(): - phys.add_device (device) - devices = phys.get_devices () - assert devices[0].uri.startswith ("hp") -+ -+ dev1 = cupshelpers.Device("hp:/usb/HP_Color_LaserJet_CP3525?serial=CNCTC8G0QX", -+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;', -+ 'device-make-and-model':'HP Color LaserJet CP3525', -+ 'device-class':'direct'}) -+ phys = PhysicalDevice (dev1) -+ dev2 = cupshelpers.Device('usb://HP/Color%20LaserJet%20CP3525?serial=CNCTC8G0QX', -+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;', -+ 'device-make-and-model':'HP Color LaserJet CP3525', -+ 'device-class':'direct'}) -+ -+ # hp device should sort < usb device -+ assert dev1 < dev2 -+ -+ phys.add_device (dev2) -+ devices = phys.get_devices () -+ assert devices[0] < devices[1] -+ assert devices[0].uri.startswith ("hp") diff --git a/system-config-printer-minorerrors.patch b/system-config-printer-minorerrors.patch deleted file mode 100644 index 8881c89..0000000 --- a/system-config-printer-minorerrors.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up system-config-printer-1.5.7/jobviewer.py.minorerrors system-config-printer-1.5.7/jobviewer.py ---- system-config-printer-1.5.7/jobviewer.py.minorerrors 2016-10-24 17:37:43.212104425 +0200 -+++ system-config-printer-1.5.7/jobviewer.py 2016-10-24 17:52:58.886209601 +0200 -@@ -25,6 +25,8 @@ import dbus - import dbus.glib - import dbus.service - import threading -+import gi -+gi.require_version('Notify', '0.7') - from gi.repository import Notify - from gi.repository import GLib - from gi.repository import GObject -@@ -52,6 +54,7 @@ from functools import reduce - cups.require("1.9.47") - - try: -+ gi.require_version('GnomeKeyring', '1.0') - from gi.repository import GnomeKeyring - USE_KEYRING=True - except ImportError: -diff -up system-config-printer-1.5.7/system-config-printer.py.minorerrors system-config-printer-1.5.7/system-config-printer.py ---- system-config-printer-1.5.7/system-config-printer.py.minorerrors 2016-10-24 17:37:59.637936671 +0200 -+++ system-config-printer-1.5.7/system-config-printer.py 2016-10-24 17:48:21.537238174 +0200 -@@ -27,14 +27,19 @@ import config - import sys, os, time, re - import _thread - import dbus -+import gi - try: -+ gi.require_version('Polkit', '1.0') - from gi.repository import Polkit - except: - Polkit = False - -+gi.require_version('GdkPixbuf', '2.0') - from gi.repository import GdkPixbuf - try: -+ gi.require_version('Gdk', '3.0') - from gi.repository import Gdk -+ gi.require_version('Gtk', '3.0') - from gi.repository import Gtk - Gtk.init (sys.argv) - except RuntimeError as e: diff --git a/system-config-printer-permission.patch b/system-config-printer-permission.patch deleted file mode 100644 index 3483700..0000000 --- a/system-config-printer-permission.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up system-config-printer-1.4.5/system-config-printer.py.permission system-config-printer-1.4.5/system-config-printer.py ---- system-config-printer-1.4.5/system-config-printer.py.permission 2014-07-04 17:02:41.000000000 +0100 -+++ system-config-printer-1.4.5/system-config-printer.py 2014-07-11 17:25:28.027096533 +0100 -@@ -207,11 +207,13 @@ class GUI(GtkGUI): - Gtk.Window.set_default_icon_name ('printer') - - edit_action = 'org.opensuse.cupspkhelper.mechanism.all-edit' -+ self.edit_permission = None - if Polkit: -- self.edit_permission = Polkit.Permission.new_sync (edit_action, -- None, None) -- else: -- self.edit_permission = None -+ try: -+ self.edit_permission = Polkit.Permission.new_sync (edit_action, -+ None, None) -+ except GLib.GError: -+ pass # Maybe cups-pk-helper isn't installed. - - self.unlock_button = Gtk.LockButton () - if self.edit_permission != None: diff --git a/system-config-printer-shbang.patch b/system-config-printer-shbang.patch deleted file mode 100644 index c4df504..0000000 --- a/system-config-printer-shbang.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up system-config-printer-1.5.7/udev/udev-add-printer.shbang system-config-printer-1.5.7/udev/udev-add-printer ---- system-config-printer-1.5.7/udev/udev-add-printer.shbang 2015-04-23 16:05:58.000000000 +0100 -+++ system-config-printer-1.5.7/udev/udev-add-printer 2015-05-26 09:15:43.761220755 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/python3 -s -B -+#!/usr/bin/python3 -sB - - ## udev-add-printer - diff --git a/system-config-printer.spec b/system-config-printer.spec index 2569ed5..fd31a6d 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -4,17 +4,16 @@ # Enable hardened build, as the udev part runs with privilege. %global _hardened_build 1 +%global username zdohnal + Summary: A printer administration tool Name: system-config-printer -Version: 1.5.7 -Release: 11%{?dist} +Version: 1.5.9 +Release: 1%{?dist} License: GPLv2+ -URL: http://cyberelk.net/tim/software/system-config-printer/ +URL: https://github.com/%{username}/%{name} Group: System Environment/Base -Source0: http://cyberelk.net/tim/data/system-config-printer/1.5/%{name}-%{version}.tar.xz -Patch1: system-config-printer-shbang.patch -Patch2: system-config-printer-device-sorting.patch -Patch3: system-config-printer-minorerrors.patch +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cups-devel >= 1.2 BuildRequires: desktop-file-utils >= 0.2.92 @@ -85,15 +84,6 @@ printers. %prep %setup -q -# Fixed shbang line in udev-add-printer (trac #244). -%patch1 -p1 -b .shbang - -# Fixed device sorting (bug #1210733). -%patch2 -p1 -b .device-sorting - -# Fixed minor errors (bug #1354606) -%patch3 -p1 -b .minorerrors - %build %configure --with-udev-rules make %{?_smp_mflags} @@ -112,7 +102,7 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris %find_lang system-config-printer %files libs -f system-config-printer.lang -%doc COPYING +%license COPYING %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf %{_datadir}/dbus-1/interfaces/*.xml @@ -169,7 +159,8 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris %{_unitdir}/configure-printer@.service %files -%doc ChangeLog README +%doc ChangeLog NEWS ABOUT-NLS AUTHORS ChangeLog-OLD +%license COPYING %{_bindir}/%{name} %{_bindir}/install-printerdriver %{_datadir}/%{name}/check-device-ids.py* @@ -196,6 +187,9 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris exit 0 %changelog +* Mon Jan 09 2017 Zdenek Dohnal - 1.5.9-1 +- version 1.5.9 + * Mon Dec 19 2016 Miro HronĨok - 1.5.7-11 - Rebuild for Python 3.6