From 87a48a2fc2087431ddb1671af5f3570cead77956 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 1 Nov 2019 17:35:44 +0100 Subject: [PATCH] 3.19.10, to rebase on Monday --- .gitignore | 1 + hplip-colorlaserjet-mfp-m278-m281.patch | 63 ------------------ hplip-dist-removed.patch | 56 ---------------- hplip-pillow-version.patch | 13 ---- hplip.spec | 88 +++++++++++-------------- sources | 2 +- 6 files changed, 41 insertions(+), 182 deletions(-) delete mode 100644 hplip-colorlaserjet-mfp-m278-m281.patch delete mode 100644 hplip-dist-removed.patch delete mode 100644 hplip-pillow-version.patch diff --git a/.gitignore b/.gitignore index c534931..b82c923 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ hplip-3.10.6.tar.gz /hp-laserjet_cp_1025nw.ppd.gz /hp-laserjet_professional_p_1102w.ppd.gz /hplip-3.19.8.tar.gz +/hplip-3.19.10.tar.gz diff --git a/hplip-colorlaserjet-mfp-m278-m281.patch b/hplip-colorlaserjet-mfp-m278-m281.patch deleted file mode 100644 index 2ce7870..0000000 --- a/hplip-colorlaserjet-mfp-m278-m281.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -up hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 hplip-3.17.11/data/models/models.dat ---- hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 2017-11-23 13:10:17.000000000 +0100 -+++ hplip-3.17.11/data/models/models.dat 2018-01-19 08:24:21.554788787 +0100 -@@ -58516,6 +58516,59 @@ usb-pid=3c2a - usb-vid=3f0 - wifi-config=3 - -+[hp_colorlaserjet_mfp_m278-m281] -+align-type=0 -+clean-type=0 -+color-cal-type=0 -+copy-type=0 -+embedded-server-type=1 -+fax-type=7 -+fw-download=False -+icon=hp_color_laserjet_cm1312_mfp.png -+io-mfp-mode=1 -+io-mode=1 -+io-support=14 -+job-storage=0 -+linefeed-cal-type=0 -+model1=HP Color LaserJet MFP M278-281 -+monitor-type=0 -+panel-check-type=0 -+pcard-type=0 -+plugin=1 -+plugin-reason=64 -+power-settings=0 -+ppd-name=hp-color_laserjet_pro_mfp_m277 -+pq-diag-type=0 -+r-type=0 -+r0-agent1-kind=4 -+r0-agent1-sku=CF400A/CF400X -+r0-agent1-type=1 -+r0-agent2-kind=4 -+r0-agent2-sku=CF401A -+r0-agent2-type=4 -+r0-agent3-kind=4 -+r0-agent3-sku=CF403A -+r0-agent3-type=5 -+r0-agent4-kind=4 -+r0-agent4-sku=CF402A -+r0-agent4-type=6 -+scan-src=3 -+scan-type=5 -+status-battery-check=0 -+status-dynamic-counters=0 -+status-type=10 -+support-released=True -+support-subtype=48c3 -+support-type=2 -+support-ver=3.15.4 -+tech-class=Postscript -+family-class=Undefined -+tech-subclass=Normal -+tech-type=4 -+usb-pid=3c2a -+usb-vid=3f0 -+wifi-config=3 -+ - [hp_color_laserjet_m553] - align-type=0 - clean-type=0 diff --git a/hplip-dist-removed.patch b/hplip-dist-removed.patch deleted file mode 100644 index fa7fb2c..0000000 --- a/hplip-dist-removed.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/base/password.py b/base/password.py -index 45c6641..62d93ca 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -78,10 +78,15 @@ def get_distro_name(): - os_name = None - try: - import platform -- os_name = platform.dist()[0] - except ImportError: - os_name = None - -+ try: -+ os_name = platform.dist()[0] -+ except AttributeError: -+ import distro -+ os_name = distro.linux_distribution()[0] -+ - if not os_name: - name = os.popen('lsb_release -i | cut -f 2') - os_name = name.read().strip() -@@ -140,7 +145,11 @@ class Password(object): - self.__authType = AUTH_TYPES[distro_name] - if distro_name == 'fedora': - import platform -- ver = int(platform.dist()[1]) -+ try: -+ ver = int(platform.dist()[1]) -+ except AttributeError: -+ import distro -+ ver = int(distro.linux_distribution()[1]) - if ver >= 28: - self.__authType = AUTH_TYPES['fedora28'] - except KeyError: -diff --git a/installer/core_install.py b/installer/core_install.py -index 9a3b5ac..af1348d 100644 ---- a/installer/core_install.py -+++ b/installer/core_install.py -@@ -640,8 +640,15 @@ class CoreInstall(object): - # Getting distro information using platform module - try: - import platform -- name = platform.dist()[0].lower() -- ver = platform.dist()[1] -+ try: -+ name = platform.dist()[0].lower() -+ ver = platform.dist()[1] -+ except AttributeError: -+ import distro -+ -+ name = distro.linux_distribution()[0].lower() -+ ver = distro.linux_distribution()[1] -+ - if not name: - found = False - log.debug("Not able to detect distro") diff --git a/hplip-pillow-version.patch b/hplip-pillow-version.patch deleted file mode 100644 index 9e2924b..0000000 --- a/hplip-pillow-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/installer/dcheck.py b/installer/dcheck.py -index 38bb76c..3d0624e 100644 ---- a/installer/dcheck.py -+++ b/installer/dcheck.py -@@ -370,7 +370,7 @@ def get_pil_version(): - except ImportError: - return '-' - else: -- return Image.VERSION -+ return Image.PILLOW_VERSION - - def get_libpthread_version(): - try: diff --git a/hplip.spec b/hplip.spec index 52f2e17..77243fd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.19.8 -Release: 2%{?dist} +Version: 3.19.10 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -50,31 +50,30 @@ Patch30: hplip-typo.patch # code gets fixed. Patch31: hplip-use-binary-str.patch # m278-m281 doesn't work correctly again -Patch32: hplip-colorlaserjet-mfp-m278-m281.patch -Patch33: hplip-error-print.patch -Patch34: hplip-hpfax-importerror-print.patch -Patch35: hplip-wifisetup.patch +Patch32: hplip-error-print.patch +Patch33: hplip-hpfax-importerror-print.patch +Patch34: hplip-wifisetup.patch # pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers # to choose (Bz#1641100, launchpad#1799212) -Patch37: hplip-keyserver.patch +Patch35: hplip-keyserver.patch # QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments, # This patch solves most of them -Patch38: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch +Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch # HP upstream introduced new binary blob, which is not open-source, so it violates # FPG by two ways - shipping binary blob and non open source code - so it needs to be removed. # Patch is taken from Debian. -Patch39: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch +Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch # In hplip-3.18.10 some parts of UI code was commented out, which leaved hp-toolbox # unusable (crashed on the start). The patch removes usages of variables, which were # commented out. # The patch is taken from Debian. -Patch40: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch +Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch # hp-setup crashed when user wanted to define a path to PPD file. It was due # byte + string variables incompatibility and it is fixed by decoding the # bytes-like variable # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076 # reported upstream https://bugs.launchpad.net/hplip/+bug/1814272 -Patch42: hplip-add-ppd-crash.patch +Patch39: hplip-add-ppd-crash.patch # external scripts, which are downloaded and run by hp-plugin, try to create links # in non-existing dirs. These scripts ignore errors, so plugin is installed fine # but then internal hp-plugin can check for plugin state, where links are checked too. @@ -83,51 +82,43 @@ Patch42: hplip-add-ppd-crash.patch # because their external scripts try to create links in non-existing dirs. # Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1671513 # Reported upstream: https://bugs.launchpad.net/hplip/+bug/1814574 -Patch43: hplip-missing-links.patch +Patch40: hplip-missing-links.patch # change in 3.18.9 in scanext.c caused broken scanning for HP LaserJet 3052. Since I cannot figure # it out what author wanted by the change (it sets option number 9 to true, but different handles # have different options, so I'm not sure what author wanted to set). # Remove the change for now, it works for user and me. -Patch44: hplip-hplj-3052.patch +Patch41: hplip-hplj-3052.patch # hpmud parses mdns txt record badly # upstream tickets: https://bugs.launchpad.net/hplip/+bug/1797501 # https://bugs.launchpad.net/hplip/+bug/1817214 # https://bugs.launchpad.net/hplip/+bug/1821932 # with no response from upstream # Patch taken from Debian https://lists.debian.org/debian-printing/2018/11/msg00049.html -Patch45: hplip-hpmud-string-parse.patch +Patch42: hplip-hpmud-string-parse.patch # Part of https://bugzilla.redhat.com/show_bug.cgi?id=1694663 # It was found out that specific device needs plugin for scanning # Reported upstream as https://bugs.launchpad.net/hplip/+bug/1822762 -Patch46: hplip-m278-m281-needs-plugin.patch +Patch43: hplip-m278-m281-needs-plugin.patch # hpcups crashes when a printer needs a plugin and does not have one installed # it crashes in destructor, because pointer is not initialized # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1695716 # reported upstream -Patch47: hplip-hpcups-crash.patch +Patch44: hplip-hpcups-crash.patch # Fixing the issues found by coverity scan # reported upstream https://bugs.launchpad.net/hplip/+bug/1808145 -Patch48: hplip-covscan.patch +Patch45: hplip-covscan.patch # Segfault during logging to syslog because argument are switched # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1727162 # upstream https://bugs.launchpad.net/hplip/+bug/1837846 -Patch49: hplip-logging-segfault.patch +Patch46: hplip-logging-segfault.patch # Traceback in hp-systray when there are no resource # wanted to report upstream, but launchpad ends with timeout error # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321 -Patch50: hplip-systray-blockerror.patch -# platform module removed dist methode, using distro instead of it -# https://bugzilla.redhat.com/show_bug.cgi?id=1745317 -# reported upstream https://bugs.launchpad.net/hplip/+bug/1843037 -Patch51: hplip-dist-removed.patch +Patch47: hplip-systray-blockerror.patch # several printers were removed in 3.19.1, but actually someone still uses them # reported upstream https://bugs.launchpad.net/hplip/+bug/1843592 # bugzillas 1742949, 1740132, 1739855 -Patch52: hplip-missing-drivers.patch -# hp-check tracebacks due change in python-pillow - PIL.Image.VERSION is removed, -# so now it uses PIL.Image.PILLOW_VERSION -# reported upstream https://bugs.launchpad.net/hplip/+bug/1846218 -Patch53: hplip-pillow-version.patch +Patch48: hplip-missing-drivers.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -329,62 +320,58 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch30 -p1 -b .typo %patch31 -p1 -b .use-binary-str -#%%patch32 -p1 -b .colorlaserjet-mfp-m278-m281 # TypeError: 'Error' object does not support indexing (bug #1564770) # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1718129 # in python2 it was possible to acces Exception message by index [0]. # in python3 this is no longer possible and it causes TypeError. -%patch33 -p1 -b .error-print-fix +%patch32 -p1 -b .error-print-fix # TypeError: not all arguments converted during string formatting (bug #1566938) # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/616450 # bug caused by more arguments than argument specifiers in formatted string -%patch34 -p1 -b .hpfax-import-error-print +%patch33 -p1 -b .hpfax-import-error-print # 'WifiSetupDialog' object has no attribute 'wifiobj' (bug #1626877) # upstream bug: https://bugs.launchpad.net/hplip/+bug/1752060 # bug caused by typo in wifisetupdialog wifiObj property call -%patch35 -p1 -b .wifisetup-bad-call-fix +%patch34 -p1 -b .wifisetup-bad-call-fix # have pool of keyservers to choose -%patch37 -p1 -b .keyserver +%patch35 -p1 -b .keyserver # TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602) # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383 # bug caused by typo in QMessageBox constructor call # this patch fixes more of those typos - some fixed by tkorbar, some taken from ubuntu fix -%patch38 -p1 -b .qmsgbox-typos-fix +%patch36 -p1 -b .qmsgbox-typos-fix # removal of non open source code, taken from ubuntu -%patch39 -p1 -b .libimageprocessor-removal +%patch37 -p1 -b .libimageprocessor-removal %{_bindir}/rm prnt/hpcups/libImageProcessor-x86* -%patch40 -p1 -b .toolbox-crash +%patch38 -p1 -b .toolbox-crash # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076 -%patch42 -p1 -b .add-ppd-crash +%patch39 -p1 -b .add-ppd-crash # 1671513 - after 'successful' plugin installation it is not installed -%patch43 -p1 -b .missing-links +%patch40 -p1 -b .missing-links # 1684434 - Scanning broken for HP LaserJet 3052 -%patch44 -p1 -b .hp-laserjet-3052-broken-scanning +%patch41 -p1 -b .hp-laserjet-3052-broken-scanning # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1) -%patch45 -p1 -b .hpmud-string-parse +%patch42 -p1 -b .hpmud-string-parse # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2) -%patch46 -p1 -b .m278-m281-needs-plugin +%patch43 -p1 -b .m278-m281-needs-plugin # 1695716 - hpcups crashes in Compressor destructor -%patch47 -p1 -b .hpcups-crash +%patch44 -p1 -b .hpcups-crash # fixing issues found by coverity scan -%patch48 -p1 -b .covscan +%patch45 -p1 -b .covscan # segfault during logging (1727162) -%patch49 -p1 -b .logging-segfault +%patch46 -p1 -b .logging-segfault # 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable -%patch50 -p1 -b .systray-blockerror -# 1745317 - hp-plugin is broken on Rawhide -%patch51 -p1 -b .dist-removed +%patch47 -p1 -b .systray-blockerror # 1742949, 1740132, 1739855 - missing drivers -%patch52 -p1 -b .missing-drivers -%patch53 -p1 -b .pillow-version +%patch48 -p1 -b .missing-drivers sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -691,6 +678,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Nov 01 2019 Zdenek Dohnal - 3.19.10-1 +- 3.19.10 + * Tue Oct 01 2019 Zdenek Dohnal - 3.19.8-2 - hp-check traceback due change in python-pillow diff --git a/sources b/sources index 1b894a7..2e813f4 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (hplip-3.19.8.tar.gz) = 99b7661c9b1d70f3c762658fcbff1ab0c170be8f8fd6cc8bbc80bb0860ccc6d69d38b662ff8be2bd38986a95385a5e5766f22003ee3e74b764dab3d46c6cb9ac +SHA512 (hplip-3.19.10.tar.gz) = 2ff8bf3d866826ca4a0ffb151ebaa18449af66b0aff8b96363344bd48fdca31d7dd022c1432bec9fadbc41d5a99983a23f3b60e89297319072ecc711ccece45b SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888