From cde7dabf6b1985c757496185211a550ca94870954a33727a39121726238e85b1 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 8 Jan 2021 20:45:50 +0000 Subject: [PATCH 1/4] Added Jira ref - Update to 3.20.9 (jsc#SLE-17024) OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=206 --- hplip.changes | 2 +- hplip.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hplip.changes b/hplip.changes index 102048c..6ed702f 100644 --- a/hplip.changes +++ b/hplip.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon Nov 23 11:47:45 UTC 2020 - Fridrich Strba -- Update to 3.20.9 +- Update to 3.20.9 (jsc#SLE-17024) Add support for the following printers: * HP Color LaserJet Managed MFP E57540dn * HP Color LaserJet Managed Flow MFP E57540c diff --git a/hplip.spec b/hplip.spec index 8343f06..16b6d73 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ # # spec file for package hplip # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 249930f03f3cb4cd1a8b791fbbcf8bcafc539a9affa93dc006b15580eb9eaf15 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Sat, 9 Jan 2021 00:45:02 +0000 Subject: [PATCH 2/4] - Update to 3.20.11 * Upstream version update and bug fixes (no new printers) * Fix crash in hp-doctor if python3-qt4 is not installed (bsc#1180724) OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=207 --- ...ck.py-fix-crash-in-Qt4-version-check.patch | 64 +++++++++++++++++++ hplip-3.20.11.tar.gz | 3 + hplip-3.20.11.tar.gz.asc | 7 ++ hplip-3.20.9.tar.gz | 3 - hplip-3.20.9.tar.gz.asc | 7 -- hplip.changes | 9 +++ hplip.spec | 7 +- 7 files changed, 88 insertions(+), 12 deletions(-) create mode 100644 dcheck.py-fix-crash-in-Qt4-version-check.patch create mode 100644 hplip-3.20.11.tar.gz create mode 100644 hplip-3.20.11.tar.gz.asc delete mode 100644 hplip-3.20.9.tar.gz delete mode 100644 hplip-3.20.9.tar.gz.asc diff --git a/dcheck.py-fix-crash-in-Qt4-version-check.patch b/dcheck.py-fix-crash-in-Qt4-version-check.patch new file mode 100644 index 0000000..fb5855e --- /dev/null +++ b/dcheck.py-fix-crash-in-Qt4-version-check.patch @@ -0,0 +1,64 @@ +From 9a7ed59efcf645256f8a07f4fb71bf0f838e3838 Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Sat, 9 Jan 2021 01:21:08 +0100 +Subject: [PATCH] dcheck.py: fix crash in Qt4 version check + +On openSUSE, the "PyQt4" module may be available with no submodules. +I.e. "import PyQt4" succeeds, wheras "from PyQt4 import QtCore" fails. +We don't want to make hplip depend on python3-qt4, as all tools use Qt5. + +This leads to the following python backtrace in hp-doctor: + +Traceback (most recent call last): + File "/usr/bin/hp-doctor", line 297, in + num_errors, num_warns = dep.validate(DEPENDENCY_RUN_AND_COMPILE_TIME, False) + File "/usr/share/hplip/check.py", line 368, in validate + self.core.dependencies[dep]) + File "/usr/share/hplip/check.py", line 210, in __update_deps_info + installed_ver = self.core.version_func[deps_info[6]]() + File "/usr/share/hplip/installer/dcheck.py", line 304, in get_pyQt4_version + from PyQt4 import QtCore +ImportError: cannot import name 'QtCore' + +Fix it. +--- + installer/dcheck.py | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/installer/dcheck.py b/installer/dcheck.py +index d684c10..6215b4b 100644 +--- a/installer/dcheck.py ++++ b/installer/dcheck.py +@@ -300,8 +300,12 @@ def get_pyQt4_version(): + except ImportError: + ver='-' + else: +- from PyQt4 import QtCore +- ver = QtCore.PYQT_VERSION_STR ++ try: ++ from PyQt4 import QtCore ++ except ImportError: ++ pass ++ else: ++ ver = QtCore.PYQT_VERSION_STR + return ver + + +@@ -314,8 +318,12 @@ def get_pyQt5_version(): + except ImportError: + ver='-' + else: +- from PyQt5 import QtCore +- ver = QtCore.PYQT_VERSION_STR ++ try: ++ from PyQt5 import QtCore ++ except ImportError: ++ pass ++ else: ++ ver = QtCore.PYQT_VERSION_STR + return ver + + def get_reportlab_version(): +-- +2.29.2 + diff --git a/hplip-3.20.11.tar.gz b/hplip-3.20.11.tar.gz new file mode 100644 index 0000000..9eff4a1 --- /dev/null +++ b/hplip-3.20.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b1675b3d8e709a1325fe863f5aace3bd3710779a73eae868f7b2ee9a56fdb11 +size 26301441 diff --git a/hplip-3.20.11.tar.gz.asc b/hplip-3.20.11.tar.gz.asc new file mode 100644 index 0000000..665eb66 --- /dev/null +++ b/hplip-3.20.11.tar.gz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iEYEABECAAYFAl/EN2AACgkQc9dwzaWQR7mwywCgs8CcCFi6IP5CjOcdocDCJ9fB +c54An3u+HrBb8V+FCTqiy/JdHB/7SgP/ +=gCta +-----END PGP SIGNATURE----- diff --git a/hplip-3.20.9.tar.gz b/hplip-3.20.9.tar.gz deleted file mode 100644 index a188621..0000000 --- a/hplip-3.20.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36251189aa9cc349f6a3eacbb7ac3c4fd26fc9f087c9f75cee051010c85d2ddf -size 26141198 diff --git a/hplip-3.20.9.tar.gz.asc b/hplip-3.20.9.tar.gz.asc deleted file mode 100644 index 67c2069..0000000 --- a/hplip-3.20.9.tar.gz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iEYEABECAAYFAl9q3H0ACgkQc9dwzaWQR7mXYwCg29C1KMe4i4oKiGBuTORPyFFD -DBIAoNsiIA+A17b4QeR4GCbRhWBEYvl5 -=OKLE ------END PGP SIGNATURE----- diff --git a/hplip.changes b/hplip.changes index 6ed702f..b0fabe5 100644 --- a/hplip.changes +++ b/hplip.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 8 20:52:43 UTC 2021 - Martin Wilck + +- Update to 3.20.11 + + * Upstream version update and bug fixes (no new printers) + * Fix crash in hp-doctor if python3-qt4 is not installed + (bsc#1180724) + ------------------------------------------------------------------- Mon Nov 23 11:47:45 UTC 2020 - Fridrich Strba diff --git a/hplip.spec b/hplip.spec index 16b6d73..a2626bb 100644 --- a/hplip.spec +++ b/hplip.spec @@ -24,7 +24,7 @@ %define pyexe %{_bindir}/python3 %global use_qt5 1 Name: hplip -Version: 3.20.9 +Version: 3.20.11 Release: 0 Summary: HP's Printing, Scanning, and Faxing Software License: BSD-3-Clause AND GPL-2.0-or-later AND MIT @@ -73,6 +73,8 @@ Patch303: photocard-fix-import-error-for-pcardext.patch Patch304: hp-sendfax-avoid-crash-if-python-reportlab-is-missin.patch # bsc#1166623, hp-toolbox crashes without python3-distro module Patch305: Use-lsb_release-fallback-code-if-import-distro-fails.patch +# bsc#1180724 +Patch306: dcheck.py-fix-crash-in-Qt4-version-check.patch # PATCH-FIX-SUSE: Remove references to the closed-source ImageProcessor Patch400: hplip-remove-imageprocessor.diff # Let a function return NULL instead of nothing @@ -312,6 +314,7 @@ This sub-package is only required by developers. %patch303 -p1 -b .photocard_import %patch304 -p1 %patch305 -p1 +%patch306 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -665,7 +668,7 @@ exit 0 %exclude %{_datadir}/hplip/scan %exclude %{_datadir}/hplip/scan.py* %exclude %{_datadir}/hplip/uiscan.py* -%exclude %{_datadir}/hplip/__pycache__/uiscan.* +%exclude %{_datadir}/hplip/__pycache__/uiniscan.* %exclude %{_datadir}/hplip/__pycache__/scan.* %exclude %{_datadir}/hplip/base/__pycache__/imageprocessing.* %exclude %{_datadir}/hplip/ui5/__pycache__/scandialog.* From ff41f88b240bc58cdc6d55509611cf2d38776bb3c13fe93dedad0e3bac944dc9 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Sat, 9 Jan 2021 21:14:21 +0000 Subject: [PATCH 3/4] Fixed typo OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=208 --- hplip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index a2626bb..90a670b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -668,7 +668,7 @@ exit 0 %exclude %{_datadir}/hplip/scan %exclude %{_datadir}/hplip/scan.py* %exclude %{_datadir}/hplip/uiscan.py* -%exclude %{_datadir}/hplip/__pycache__/uiniscan.* +%exclude %{_datadir}/hplip/__pycache__/uiscan.* %exclude %{_datadir}/hplip/__pycache__/scan.* %exclude %{_datadir}/hplip/base/__pycache__/imageprocessing.* %exclude %{_datadir}/hplip/ui5/__pycache__/scandialog.* From 8ed15c02ce636ddd74d8ac582922e750029c1080038fcb799ba0b29e455a7abe Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Mon, 11 Jan 2021 12:11:17 +0000 Subject: [PATCH 4/4] Added patch: dcheck.py-fix-crash-in-Qt4-version-check.patch OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=209 --- hplip.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/hplip.changes b/hplip.changes index b0fabe5..9c1c6f1 100644 --- a/hplip.changes +++ b/hplip.changes @@ -6,6 +6,7 @@ Fri Jan 8 20:52:43 UTC 2021 - Martin Wilck * Upstream version update and bug fixes (no new printers) * Fix crash in hp-doctor if python3-qt4 is not installed (bsc#1180724) + Added patch: dcheck.py-fix-crash-in-Qt4-version-check.patch ------------------------------------------------------------------- Mon Nov 23 11:47:45 UTC 2020 - Fridrich Strba