From 87a48a2fc2087431ddb1671af5f3570cead77956 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 1 Nov 2019 17:35:44 +0100 Subject: [PATCH 001/166] 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 From 35def6bed102e8ac80bc4b928d3e99bbba60bf41 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Nov 2019 13:07:25 +0100 Subject: [PATCH 002/166] 1772698 - missing HP LaserJet 2200 driver --- hplip-missing-laserjet2200.patch | 35 ++++++++++++++++++++++++++++++++ hplip.spec | 11 +++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 hplip-missing-laserjet2200.patch diff --git a/hplip-missing-laserjet2200.patch b/hplip-missing-laserjet2200.patch new file mode 100644 index 0000000..b67d586 --- /dev/null +++ b/hplip-missing-laserjet2200.patch @@ -0,0 +1,35 @@ +diff --git a/io/hpmud/model.c b/io/hpmud/model.c +index d546ec1..288cd75 100644 +--- a/io/hpmud/model.c ++++ b/io/hpmud/model.c +@@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * + char rcbuf[255]; + char section[128]; + char file[128]; +- int found=0, n; ++ int found=0; ++ size_t n; ++ ++ size_t model_len = strlen(model); + + if ((fp = fopen(datFile, "r")) == NULL) + goto bugout; +@@ -423,9 +426,15 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * + n = strlen(section); + section[n-2]=0; /* remove ']' and CR */ + if (strcasecmp(model, section) == 0 || +- (section[0] == 'h' && section[1] == 'p' && +- section[2] == '_' && +- strcasecmp(model, section + 3) == 0)) ++ (section[0] == 'h' && ++ section[1] == 'p' && ++ section[2] == '_' && ++ strcasecmp(model, section + 3) == 0) || ++ (n > model_len && ++ strncasecmp(section, model, model_len) && ++ strncasecmp(section + model_len, "_series", strlen("_series")) ++ ) ++ ) + { + /* Found model match. */ + *bytes_read = ResolveAttributes(fp, attr, attrSize); diff --git a/hplip.spec b/hplip.spec index 77243fd..f70deca 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.10 -Release: 1%{?dist} +Release: 2%{?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 @@ -119,6 +119,10 @@ Patch47: hplip-systray-blockerror.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1843592 # bugzillas 1742949, 1740132, 1739855 Patch48: hplip-missing-drivers.patch +# laserjet 2200 has different device id than HP expects... +# https://bugzilla.redhat.com/show_bug.cgi?id=1772698 +# reported upstream +Patch49: hplip-missing-laserjet2200.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -372,6 +376,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch47 -p1 -b .systray-blockerror # 1742949, 1740132, 1739855 - missing drivers %patch48 -p1 -b .missing-drivers +# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat +%patch49 -p1 -b .missing-laserjet-2200 sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -678,6 +684,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Nov 15 2019 Zdenek Dohnal - 3.19.10-2 +- 1772698 - missing HP LaserJet 2200 driver + * Fri Nov 01 2019 Zdenek Dohnal - 3.19.10-1 - 3.19.10 From c07d98eebd87cd994b6920211b1ba7cd4b940375 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Nov 2019 14:21:59 +0100 Subject: [PATCH 003/166] 1773345 - Problems with HP M281fdw LaserJet --- hplip-m278m281-bad-model.patch | 13 +++++++++++++ hplip.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-m278m281-bad-model.patch diff --git a/hplip-m278m281-bad-model.patch b/hplip-m278m281-bad-model.patch new file mode 100644 index 0000000..36c8685 --- /dev/null +++ b/hplip-m278m281-bad-model.patch @@ -0,0 +1,13 @@ +diff --git a/data/models/models.dat b/data/models/models.dat +index f4d9955..234902f 100644 +--- a/data/models/models.dat ++++ b/data/models/models.dat +@@ -62355,7 +62355,7 @@ usb-pid=af2a + usb-vid=3f0 + wifi-config=3 + +-[hp_color_laserjet_mfp_m278-m281] ++[hp_colorlaserjet_mfp_m278-m281] + align-type=0 + clean-type=0 + color-cal-type=0 diff --git a/hplip.spec b/hplip.spec index f70deca..b938b4a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -121,8 +121,12 @@ Patch47: hplip-systray-blockerror.patch Patch48: hplip-missing-drivers.patch # laserjet 2200 has different device id than HP expects... # https://bugzilla.redhat.com/show_bug.cgi?id=1772698 -# reported upstream +# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 Patch49: hplip-missing-laserjet2200.patch +# color laserjet m278-m281 printers report themselves as colorlaserjet... in queries +# https://bugzilla.redhat.com/show_bug.cgi?id=1773345 +# upstream https://bugs.launchpad.net/hplip/+bug/1851013 +Patch50: hplip-m278m281-bad-model.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -378,6 +382,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch48 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat %patch49 -p1 -b .missing-laserjet-2200 +# 1773345 - Problems with HP M281fdw LaserJet +%patch50 -p1 -b .m278-m281-bad-model sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -684,6 +690,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Nov 18 2019 Zdenek Dohnal - 3.19.10-2 +- 1773345 - Problems with HP M281fdw LaserJet + * Fri Nov 15 2019 Zdenek Dohnal - 3.19.10-2 - 1772698 - missing HP LaserJet 2200 driver From 9ea0342f43380ae06ca62fa4f83c116dd312fd26 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 28 Nov 2019 13:20:49 +0100 Subject: [PATCH 004/166] 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id --- hplip-missing-laserjet2200.patch | 14 ++++++++------ hplip.spec | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hplip-missing-laserjet2200.patch b/hplip-missing-laserjet2200.patch index b67d586..3dca0a1 100644 --- a/hplip-missing-laserjet2200.patch +++ b/hplip-missing-laserjet2200.patch @@ -1,5 +1,5 @@ diff --git a/io/hpmud/model.c b/io/hpmud/model.c -index d546ec1..288cd75 100644 +index d546ec1..5bb6091 100644 --- a/io/hpmud/model.c +++ b/io/hpmud/model.c @@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * @@ -14,21 +14,23 @@ index d546ec1..288cd75 100644 if ((fp = fopen(datFile, "r")) == NULL) goto bugout; -@@ -423,9 +426,15 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * +@@ -422,10 +425,16 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * + strncpy(section, rcbuf+1, sizeof(section)); /* found new section */ n = strlen(section); section[n-2]=0; /* remove ']' and CR */ - if (strcasecmp(model, section) == 0 || +- if (strcasecmp(model, section) == 0 || - (section[0] == 'h' && section[1] == 'p' && - section[2] == '_' && - strcasecmp(model, section + 3) == 0)) ++ if ((strcasecmp(model, section) == 0) || + (section[0] == 'h' && + section[1] == 'p' && + section[2] == '_' && + strcasecmp(model, section + 3) == 0) || + (n > model_len && -+ strncasecmp(section, model, model_len) && -+ strncasecmp(section + model_len, "_series", strlen("_series")) -+ ) ++ strncasecmp(section, model, model_len) == 0 && ++ strncasecmp(section + model_len, "_series", strlen("_series") == 0) ++ ) + ) { /* Found model match. */ diff --git a/hplip.spec b/hplip.spec index b938b4a..7dfed39 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.10 -Release: 2%{?dist} +Release: 3%{?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 @@ -690,6 +690,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 28 2019 Zdenek Dohnal - 3.19.10-3 +- 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id + * Mon Nov 18 2019 Zdenek Dohnal - 3.19.10-2 - 1773345 - Problems with HP M281fdw LaserJet From 212ea17bdd223d30b4bcea9653988e9b6602a035 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 28 Nov 2019 14:15:11 +0100 Subject: [PATCH 005/166] 3.19.11 --- .gitignore | 1 + hplip.spec | 7 +++++-- sources | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b82c923..a44f22a 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,4 @@ hplip-3.10.6.tar.gz /hp-laserjet_professional_p_1102w.ppd.gz /hplip-3.19.8.tar.gz /hplip-3.19.10.tar.gz +/hplip-3.19.11.tar.gz diff --git a/hplip.spec b/hplip.spec index 7dfed39..5b53350 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.19.10 -Release: 3%{?dist} +Version: 3.19.11 +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 @@ -690,6 +690,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 28 2019 Zdenek Dohnal - 3.19.11-1 +- 3.19.11 + * Thu Nov 28 2019 Zdenek Dohnal - 3.19.10-3 - 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id diff --git a/sources b/sources index 2e813f4..0f2b4a4 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -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 +SHA512 (hplip-3.19.11.tar.gz) = f419de0e18937c93c2727f4d8b4f7bf1fcc24961a6b7a0d043ce8341c65d0c0332cd354c0cd907b85bc6ccc7735d23ba5f2c918dba5bf965540291cfcbe032d5 From 6d0c6956115b377c534247c2f275b7b72d35de5a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 28 Nov 2019 14:15:11 +0100 Subject: [PATCH 006/166] 3.19.11 --- .gitignore | 1 + hplip.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b82c923..a44f22a 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,4 @@ hplip-3.10.6.tar.gz /hp-laserjet_professional_p_1102w.ppd.gz /hplip-3.19.8.tar.gz /hplip-3.19.10.tar.gz +/hplip-3.19.11.tar.gz diff --git a/hplip.spec b/hplip.spec index 7dfed39..5b53350 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.19.10 -Release: 3%{?dist} +Version: 3.19.11 +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 @@ -690,6 +690,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 28 2019 Zdenek Dohnal - 3.19.11-1 +- 3.19.11 + * Thu Nov 28 2019 Zdenek Dohnal - 3.19.10-3 - 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id diff --git a/sources b/sources index 2e813f4..7bc2fda 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (hplip-3.19.10.tar.gz) = 2ff8bf3d866826ca4a0ffb151ebaa18449af66b0aff8b96363344bd48fdca31d7dd022c1432bec9fadbc41d5a99983a23f3b60e89297319072ecc711ccece45b +SHA512 (hplip-3.19.11.tar.gz) = f419de0e18937c93c2727f4d8b4f7bf1fcc24961a6b7a0d043ce8341c65d0c0332cd354c0cd907b85bc6ccc7735d23ba5f2c918dba5bf965540291cfcbe032d5 SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 From 2247e69265c960fd83fa0e57c870054fbdc9185d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 12 Dec 2019 12:40:45 +0100 Subject: [PATCH 007/166] 3.19.12 --- hplip-m278m281-bad-model.patch | 13 ------------- hplip.spec | 11 ++++------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 hplip-m278m281-bad-model.patch diff --git a/hplip-m278m281-bad-model.patch b/hplip-m278m281-bad-model.patch deleted file mode 100644 index 36c8685..0000000 --- a/hplip-m278m281-bad-model.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/data/models/models.dat b/data/models/models.dat -index f4d9955..234902f 100644 ---- a/data/models/models.dat -+++ b/data/models/models.dat -@@ -62355,7 +62355,7 @@ usb-pid=af2a - usb-vid=3f0 - wifi-config=3 - --[hp_color_laserjet_mfp_m278-m281] -+[hp_colorlaserjet_mfp_m278-m281] - align-type=0 - clean-type=0 - color-cal-type=0 diff --git a/hplip.spec b/hplip.spec index 5b53350..c25ce8b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.19.11 +Version: 3.19.12 Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC @@ -123,10 +123,6 @@ Patch48: hplip-missing-drivers.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1772698 # reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 Patch49: hplip-missing-laserjet2200.patch -# color laserjet m278-m281 printers report themselves as colorlaserjet... in queries -# https://bugzilla.redhat.com/show_bug.cgi?id=1773345 -# upstream https://bugs.launchpad.net/hplip/+bug/1851013 -Patch50: hplip-m278m281-bad-model.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -382,8 +378,6 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch48 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat %patch49 -p1 -b .missing-laserjet-2200 -# 1773345 - Problems with HP M281fdw LaserJet -%patch50 -p1 -b .m278-m281-bad-model sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -690,6 +684,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Dec 12 2019 Zdenek Dohnal - 3.19.12-1 +- 3.19.12 + * Thu Nov 28 2019 Zdenek Dohnal - 3.19.11-1 - 3.19.11 From 538f042a5c119569d4d163ca85b7a682f82f5186 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 12 Dec 2019 13:18:26 +0100 Subject: [PATCH 008/166] 3.19.12 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a44f22a..051a7b2 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ hplip-3.10.6.tar.gz /hplip-3.19.8.tar.gz /hplip-3.19.10.tar.gz /hplip-3.19.11.tar.gz +/hplip-3.19.12.tar.gz diff --git a/sources b/sources index 7bc2fda..9d211b6 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (hplip-3.19.11.tar.gz) = f419de0e18937c93c2727f4d8b4f7bf1fcc24961a6b7a0d043ce8341c65d0c0332cd354c0cd907b85bc6ccc7735d23ba5f2c918dba5bf965540291cfcbe032d5 +SHA512 (hplip-3.19.12.tar.gz) = 5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d869eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677 SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 From f0692ad1eec397b375c33c21c7daa669e5efb874 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 8 Jan 2020 08:35:04 +0100 Subject: [PATCH 009/166] 1788643 - hp-plugin needs explicit requirement for tar --- hplip.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index c25ce8b..384bf93 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.12 -Release: 1%{?dist} +Release: 2%{?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 @@ -136,6 +136,9 @@ Requires: %{_bindir}/gpg Requires: systemd # 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed Requires: libsane-hpaio +# 1788643 - Fedora minimal does not ship tar by default +Requires: tar + # require coreutils, because timeout binary is needed in post scriptlet, # because hpcups-update-ppds script can freeze in certain situation and # stop the update @@ -684,6 +687,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jan 08 2020 Zdenek Dohnal - 3.19.12-2 +- 1788643 - hp-plugin needs explicit requirement for tar + * Thu Dec 12 2019 Zdenek Dohnal - 3.19.12-1 - 3.19.12 From ed50eac6802a99a2dc9d452e74fe25f92a83b6fc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 04:23:14 +0000 Subject: [PATCH 010/166] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 384bf93..2fcdd1e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.12 -Release: 2%{?dist} +Release: 3%{?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 @@ -687,6 +687,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 3.19.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Jan 08 2020 Zdenek Dohnal - 3.19.12-2 - 1788643 - hp-plugin needs explicit requirement for tar From 9ac914b020a3df5aad8b4ede8be4cc28a7540796 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Feb 2020 15:12:10 +0100 Subject: [PATCH 011/166] 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes fix pillow version check --- hplip-pil.patch | 18 ++++++++++++++++++ hplip-unicodeerror.patch | 18 ++++++++++++++++++ hplip.spec | 15 ++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 hplip-pil.patch create mode 100644 hplip-unicodeerror.patch diff --git a/hplip-pil.patch b/hplip-pil.patch new file mode 100644 index 0000000..2784b54 --- /dev/null +++ b/hplip-pil.patch @@ -0,0 +1,18 @@ +diff --git a/installer/dcheck.py b/installer/dcheck.py +index 3d0624e..1817819 100644 +--- a/installer/dcheck.py ++++ b/installer/dcheck.py +@@ -366,11 +366,11 @@ def get_xsane_version(): + + def get_pil_version(): + try: +- from PIL import Image ++ import PIL + except ImportError: + return '-' + else: +- return Image.PILLOW_VERSION ++ return PIL.__version__ + + def get_libpthread_version(): + try: diff --git a/hplip-unicodeerror.patch b/hplip-unicodeerror.patch new file mode 100644 index 0000000..f98c7a3 --- /dev/null +++ b/hplip-unicodeerror.patch @@ -0,0 +1,18 @@ +diff --git a/base/sixext.py b/base/sixext.py +index 0bf4fc4..311bf72 100644 +--- a/base/sixext.py ++++ b/base/sixext.py +@@ -110,11 +110,11 @@ if PY3: + + + def to_string_utf8(s): +- return s.decode("utf-8") ++ return s.decode("utf-8", 'ignore') + + + def to_string_latin(s): +- return s.decode("latin-1") ++ return s.decode("latin-1", 'ignore') + + + def to_unicode(s, enc=None): diff --git a/hplip.spec b/hplip.spec index 2fcdd1e..c1f01ea 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.12 -Release: 3%{?dist} +Release: 4%{?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 @@ -123,6 +123,12 @@ Patch48: hplip-missing-drivers.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1772698 # reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 Patch49: hplip-missing-laserjet2200.patch +# sixext has problems with python3 strings (bz#1573430) +# reported https://bugs.launchpad.net/bugs/1480152 +Patch50: hplip-unicodeerror.patch +# the version attribute in python-pillow got changed again.. +# https://bugs.launchpad.net/hplip/+bug/1863620 +Patch51: hplip-pil.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -381,6 +387,9 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch48 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat %patch49 -p1 -b .missing-laserjet-2200 +# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes +%patch50 -p1 -b .unicodeerror +%patch51 -p1 -b .pil sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -687,6 +696,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Feb 17 2020 Zdenek Dohnal - 3.19.12-4 +- 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes +- fix pillow version check + * Wed Jan 29 2020 Fedora Release Engineering - 3.19.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 49a583d4e8b3d6cf035ff071c60677ac882c6e57 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 4 Mar 2020 13:47:18 +0100 Subject: [PATCH 012/166] 3.20.2 --- .gitignore | 1 + hplip.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 051a7b2..8dea8cc 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ hplip-3.10.6.tar.gz /hplip-3.19.10.tar.gz /hplip-3.19.11.tar.gz /hplip-3.19.12.tar.gz +/hplip-3.20.2.tar.gz diff --git a/hplip.spec b/hplip.spec index c1f01ea..bb1e80b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.19.12 -Release: 4%{?dist} +Version: 3.20.2 +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 @@ -696,6 +696,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Mar 04 2020 Zdenek Dohnal - 3.20.2-1 +- 3.20.2 + * Mon Feb 17 2020 Zdenek Dohnal - 3.19.12-4 - 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes - fix pillow version check diff --git a/sources b/sources index 9d211b6..9e79ff1 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (hplip-3.19.12.tar.gz) = 5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d869eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677 -SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 +SHA512 (hplip-3.20.2.tar.gz) = 013abeb1453a2b1045618543d2795d0653ac12b1804b99043b3ca04a8f7bc48289be1a0b3d7740064df1286eacfb5b1f504b64b280c169c7d263b7d5e7a213a0 SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 +SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 From ffccbcb989a59f3ff5b2ccb18f53b026a5941ec7 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 10 Mar 2020 13:04:11 +0100 Subject: [PATCH 013/166] 3.20.3 --- .gitignore | 1 + hplip.spec | 5 ++++- sources | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8dea8cc..a2e7364 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ hplip-3.10.6.tar.gz /hplip-3.19.11.tar.gz /hplip-3.19.12.tar.gz /hplip-3.20.2.tar.gz +/hplip-3.20.3.tar.gz diff --git a/hplip.spec b/hplip.spec index bb1e80b..b1d445b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.2 +Version: 3.20.3 Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC @@ -696,6 +696,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Mar 10 2020 Zdenek Dohnal - 3.20.3-1 +- 3.20.3 + * Wed Mar 04 2020 Zdenek Dohnal - 3.20.2-1 - 3.20.2 diff --git a/sources b/sources index 9e79ff1..a387f66 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (hplip-3.20.2.tar.gz) = 013abeb1453a2b1045618543d2795d0653ac12b1804b99043b3ca04a8f7bc48289be1a0b3d7740064df1286eacfb5b1f504b64b280c169c7d263b7d5e7a213a0 -SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 +SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 +SHA512 (hplip-3.20.3.tar.gz) = a397eb3896292ac956a1969b76707af62c866e47d88148fa75b68574e4639283f7414a2c77e6854c5d22daea49181d4f1bc2daf11fb3058372ff084d591696f1 From 48d84277fa097cfd98e2538e162af5764c234437 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Mar 2020 01:14:22 +0000 Subject: [PATCH 014/166] Fix some -Wreturn-type warnings clang treates these as errors, so this fixes the build with clang --- hplip-fix-Wreturn-type-warning.patch | 111 +++++++++++++++++++++++++++ hplip.spec | 9 ++- 2 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 hplip-fix-Wreturn-type-warning.patch diff --git a/hplip-fix-Wreturn-type-warning.patch b/hplip-fix-Wreturn-type-warning.patch new file mode 100644 index 0000000..e128078 --- /dev/null +++ b/hplip-fix-Wreturn-type-warning.patch @@ -0,0 +1,111 @@ +--- hplip-3.20.3/prnt/hpps/hppsfilter.c.orig 2020-03-25 01:09:51.585129957 +0000 ++++ hplip-3.20.3/prnt/hpps/hppsfilter.c 2020-03-25 01:10:15.610058293 +0000 +@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m + if(ptempbooklet_file == NULL) + { + fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename); +- return 1; ++ return; + } + chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + +--- hplip-3.20.3/scan/sane/hpaio.c.orig 2020-03-25 01:24:15.558732638 +0000 ++++ hplip-3.20.3/scan/sane/hpaio.c 2020-03-25 02:48:36.097054366 +0000 +@@ -406,20 +406,34 @@ extern SANE_Status sane_hpaio_open(SANE_ + + extern void sane_hpaio_close(SANE_Handle handle) + { +- if (strcmp(*((char **)handle), "MARVELL") == 0) +- return marvell_close(handle); +- if (strcmp(*((char **)handle), "SOAP") == 0) +- return soap_close(handle); +- if (strcmp(*((char **)handle), "SOAPHT") == 0) +- return soapht_close(handle); +- if (strcmp(*((char **)handle), "LEDM") == 0) +- return ledm_close(handle); +- if (strcmp(*((char **)handle), "SCL-PML") == 0) +- return sclpml_close(handle); +- if (strcmp(*((char **)handle), "ESCL") == 0) +- return escl_close(handle); +- if (strcmp(*((char **)handle), "ORBLITE") == 0) +- return orblite_close(handle); ++ if (strcmp(*((char **)handle), "MARVELL") == 0) { ++ marvell_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SOAP") == 0) { ++ soap_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SOAPHT") == 0) { ++ soapht_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "LEDM") == 0) { ++ ledm_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SCL-PML") == 0) { ++ sclpml_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "ESCL") == 0) { ++ escl_close(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "ORBLITE") == 0) { ++ orblite_close(handle); ++ return; ++ } + } /* sane_hpaio_close() */ + + extern const SANE_Option_Descriptor * sane_hpaio_get_option_descriptor(SANE_Handle handle, SANE_Int option) +@@ -539,20 +553,34 @@ extern SANE_Status sane_hpaio_read(SANE_ + /* Note, sane_cancel is called normally not just during IO abort situations. */ + extern void sane_hpaio_cancel( SANE_Handle handle ) + { +- if (strcmp(*((char **)handle), "MARVELL") == 0) +- return marvell_cancel(handle); +- if (strcmp(*((char **)handle), "SOAP") == 0) +- return soap_cancel(handle); +- if (strcmp(*((char **)handle), "SOAPHT") == 0) +- return soapht_cancel(handle); +- if (strcmp(*((char **)handle), "LEDM") == 0) +- return ledm_cancel(handle); +- if (strcmp(*((char **)handle), "SCL-PML") == 0) +- return sclpml_cancel(handle); +- if (strcmp(*((char **)handle), "ESCL") == 0) +- return escl_cancel(handle); +- if (strcmp(*((char **)handle), "ORBLITE") == 0) +- return orblite_cancel(handle); ++ if (strcmp(*((char **)handle), "MARVELL") == 0) { ++ marvell_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SOAP") == 0) { ++ soap_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SOAPHT") == 0) { ++ soapht_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "LEDM") == 0) { ++ ledm_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "SCL-PML") == 0) { ++ sclpml_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "ESCL") == 0) { ++ escl_cancel(handle); ++ return; ++ } ++ if (strcmp(*((char **)handle), "ORBLITE") == 0) { ++ orblite_cancel(handle); ++ return; ++ } + } /* sane_hpaio_cancel() */ + + extern SANE_Status sane_hpaio_set_io_mode(SANE_Handle handle, SANE_Bool nonBlocking) diff --git a/hplip.spec b/hplip.spec index b1d445b..f4884eb 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.3 -Release: 1%{?dist} +Release: 2%{?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 @@ -130,6 +130,8 @@ Patch50: hplip-unicodeerror.patch # https://bugs.launchpad.net/hplip/+bug/1863620 Patch51: hplip-pil.patch +Patch52: hplip-fix-Wreturn-type-warning.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow Requires: cups @@ -390,6 +392,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes %patch50 -p1 -b .unicodeerror %patch51 -p1 -b .pil +%patch52 -p1 -b .Wreturn-fix sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -696,6 +699,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Mar 25 2020 Tom Stellard - 3.20.3-2 +- Fix some -Wreturn-type warnings +- clang treates these as errors, so this fixes the build with clang. + * Tue Mar 10 2020 Zdenek Dohnal - 3.20.3-1 - 3.20.3 From 5cb03441e93debd40f2391f6d3938cd09ed046a2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 7 Apr 2020 08:14:33 +0200 Subject: [PATCH 015/166] 1821469 - use list of keyservers when trying to download gpg keys --- hplip-keyserver.patch | 59 ++++++++++++++++++++++++++++++++++++++----- hplip.spec | 5 +++- 2 files changed, 57 insertions(+), 7 deletions(-) diff --git a/hplip-keyserver.patch b/hplip-keyserver.patch index fb69217..92bd018 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -1,12 +1,59 @@ -diff -up hplip-3.18.6/base/validation.py.keyserver hplip-3.18.6/base/validation.py ---- hplip-3.18.6/base/validation.py.keyserver 2018-11-13 17:35:38.085322569 +0100 -+++ hplip-3.18.6/base/validation.py 2018-11-13 17:36:18.026991983 +0100 -@@ -42,7 +42,7 @@ class DigiSign_Verification(object): +diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py +--- hplip-3.20.3/base/tui.py.keyserver 2020-04-07 07:31:12.747293360 +0200 ++++ hplip-3.20.3/base/tui.py 2020-04-07 07:31:32.180113572 +0200 +@@ -241,6 +241,7 @@ class ProgressMeter(object): + sys.stdout.write(y) + + sys.stdout.flush() ++ sys.stdout.write('\n') + self.prev_length = len(y) + self.spinner_pos = (self.spinner_pos + 1) % 8 + +diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py +--- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100 ++++ hplip-3.20.3/base/validation.py 2020-04-07 07:34:30.896467229 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # + # (c) Copyright 2015 HP Development Company, L.P. +@@ -42,8 +42,10 @@ class DigiSign_Verification(object): class GPG_Verification(DigiSign_Verification): - def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): -+ def __init__(self, pgp_site = 'sks-keyservers.net', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): - self.__pgp_site = pgp_site +- self.__pgp_site = pgp_site ++ def __init__(self, keyservers = ['pgp.mit.edu', 'sks-keyservers.net', ++ 'pool.sks-keyservers.net'], ++ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): ++ self.__keyservers = keyservers self.__key = key self.__gpg = utils.which('gpg',True) + +@@ -82,13 +84,18 @@ class GPG_Verification(DigiSign_Verifica + + + def __acquire_gpg_key(self): +- +- cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \ +- % (self.__gpg, self.__gpg_dir, self.__pgp_site, self.__key) +- +- log.info("Receiving digital keys: %s" % cmd) +- status, output = utils.run(cmd) +- log.debug(output) ++ for kserver in self.__keyservers: ++ cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \ ++ % (self.__gpg, self.__gpg_dir, kserver, self.__key) ++ ++ log.info("Receiving digital keys: %s" % cmd) ++ status, output = utils.run(cmd) ++ log.debug(output) ++ ++ if not status: ++ break ++ log.info("Receiving keys from {} failed, trying the next keyserver." ++ .format(kserver)) + + self.__change_owner(True) + diff --git a/hplip.spec b/hplip.spec index f4884eb..56f656d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.3 -Release: 2%{?dist} +Release: 3%{?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 @@ -699,6 +699,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Apr 07 2020 Zdenek Dohnal - 3.20.3-3 +- 1821469 - use list of keyservers when trying to download gpg keys + * Wed Mar 25 2020 Tom Stellard - 3.20.3-2 - Fix some -Wreturn-type warnings - clang treates these as errors, so this fixes the build with clang. From 16f1c5dbc93f72c23752da1c38a94a27ba190178 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 7 Apr 2020 08:48:11 +0200 Subject: [PATCH 016/166] add keyserver.ubuntu.com too (1821469) --- hplip-keyserver.patch | 13 +++++++------ hplip.spec | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hplip-keyserver.patch b/hplip-keyserver.patch index 92bd018..d706f3d 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -1,6 +1,6 @@ diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py ---- hplip-3.20.3/base/tui.py.keyserver 2020-04-07 07:31:12.747293360 +0200 -+++ hplip-3.20.3/base/tui.py 2020-04-07 07:31:32.180113572 +0200 +--- hplip-3.20.3/base/tui.py.keyserver 2020-03-10 09:01:53.000000000 +0100 ++++ hplip-3.20.3/base/tui.py 2020-04-07 08:44:44.319710001 +0200 @@ -241,6 +241,7 @@ class ProgressMeter(object): sys.stdout.write(y) @@ -11,27 +11,28 @@ diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py --- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100 -+++ hplip-3.20.3/base/validation.py 2020-04-07 07:34:30.896467229 +0200 ++++ hplip-3.20.3/base/validation.py 2020-04-07 08:45:46.657132415 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # -*- coding: utf-8 -*- # # (c) Copyright 2015 HP Development Company, L.P. -@@ -42,8 +42,10 @@ class DigiSign_Verification(object): +@@ -42,8 +42,11 @@ class DigiSign_Verification(object): class GPG_Verification(DigiSign_Verification): - def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): - self.__pgp_site = pgp_site + def __init__(self, keyservers = ['pgp.mit.edu', 'sks-keyservers.net', -+ 'pool.sks-keyservers.net'], ++ 'pool.sks-keyservers.net', ++ 'keyserver.ubuntu.com'], + key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): + self.__keyservers = keyservers self.__key = key self.__gpg = utils.which('gpg',True) -@@ -82,13 +84,18 @@ class GPG_Verification(DigiSign_Verifica +@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verifica def __acquire_gpg_key(self): diff --git a/hplip.spec b/hplip.spec index 56f656d..0674bb6 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.3 -Release: 3%{?dist} +Release: 4%{?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 @@ -699,6 +699,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Apr 07 2020 Zdenek Dohnal - 3.20.3-4 +- add keyserver.ubuntu.com too (1821469) + * Tue Apr 07 2020 Zdenek Dohnal - 3.20.3-3 - 1821469 - use list of keyservers when trying to download gpg keys From 07e64db764a8949055d72d0fbcfb97362f8aff41 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 15 Apr 2020 11:53:21 +0200 Subject: [PATCH 017/166] model mismatch during scanning due 'HP_' string --- ...et2200.patch => hplip-model-mismatch.patch | 27 +++++++++++++++++++ hplip.spec | 15 +++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) rename hplip-missing-laserjet2200.patch => hplip-model-mismatch.patch (61%) diff --git a/hplip-missing-laserjet2200.patch b/hplip-model-mismatch.patch similarity index 61% rename from hplip-missing-laserjet2200.patch rename to hplip-model-mismatch.patch index 3dca0a1..9b416f8 100644 --- a/hplip-missing-laserjet2200.patch +++ b/hplip-model-mismatch.patch @@ -1,3 +1,30 @@ +diff --git a/io/hpmud/jd.c b/io/hpmud/jd.c +index 20df27a..7ed4918 100644 +--- a/io/hpmud/jd.c ++++ b/io/hpmud/jd.c +@@ -208,7 +208,22 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"))) jd_open(mud_device *pd + { + /* Make sure uri model matches device id model. */ + hpmud_get_uri_model(pd->uri, uri_model, sizeof(uri_model)); ++ ++ /* remove possible hp_ string */ ++ if (strncasecmp(uri_model, "HP_", 3) == 0) ++ { ++ memmove(uri_model, uri_model + 3, 127); ++ uri_model[127] = '\0'; ++ } ++ + hpmud_get_model(pd->id, model, sizeof(model)); ++ /* remove possible hp_ string */ ++ if (strncasecmp(model, "HP_", 3) == 0) ++ { ++ memmove(model, model + 3, 127); ++ model[127] = '\0'; ++ } ++ + if (strcasecmp(uri_model, model) != 0) + { + stat = HPMUD_R_INVALID_URI; /* different device plugged in */ diff --git a/io/hpmud/model.c b/io/hpmud/model.c index d546ec1..5bb6091 100644 --- a/io/hpmud/model.c diff --git a/hplip.spec b/hplip.spec index 0674bb6..0a1a4d5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.3 -Release: 4%{?dist} +Release: 5%{?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 @@ -119,19 +119,21 @@ Patch47: hplip-systray-blockerror.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1843592 # bugzillas 1742949, 1740132, 1739855 Patch48: hplip-missing-drivers.patch -# laserjet 2200 has different device id than HP expects... +# laserjet 2200 and other devices have different device id than HP expects... # https://bugzilla.redhat.com/show_bug.cgi?id=1772698 # reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 -Patch49: hplip-missing-laserjet2200.patch +Patch49: hplip-model-mismatch.patch # sixext has problems with python3 strings (bz#1573430) # reported https://bugs.launchpad.net/bugs/1480152 Patch50: hplip-unicodeerror.patch # the version attribute in python-pillow got changed again.. # https://bugs.launchpad.net/hplip/+bug/1863620 Patch51: hplip-pil.patch - +# error with new gcc, already reported in upstream as +# https://bugs.launchpad.net/hplip/+bug/1836735 Patch52: hplip-fix-Wreturn-type-warning.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow Requires: cups @@ -388,7 +390,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h # 1742949, 1740132, 1739855 - missing drivers %patch48 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat -%patch49 -p1 -b .missing-laserjet-2200 +%patch49 -p1 -b .model-mismatch # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes %patch50 -p1 -b .unicodeerror %patch51 -p1 -b .pil @@ -699,6 +701,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 15 2020 Zdenek Dohnal - 3.20.3-5 +- model mismatch during scanning due 'HP_' string + * Tue Apr 07 2020 Zdenek Dohnal - 3.20.3-4 - add keyserver.ubuntu.com too (1821469) From 0f2672f23b47e739d03c522d3ec2552bcaeff049 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 19 May 2020 10:44:40 +0200 Subject: [PATCH 018/166] 3.20.5 --- hplip-configure-python.patch | 56 ++++++++++++++++++++++++++++++++++++ hplip-pil.patch | 18 ------------ hplip.spec | 26 ++++++++--------- 3 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 hplip-configure-python.patch delete mode 100644 hplip-pil.patch diff --git a/hplip-configure-python.patch b/hplip-configure-python.patch new file mode 100644 index 0000000..b119212 --- /dev/null +++ b/hplip-configure-python.patch @@ -0,0 +1,56 @@ +diff --git a/configure.in b/configure.in +index 9e330e3..e4a254e 100755 +--- a/configure.in ++++ b/configure.in +@@ -604,20 +604,31 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu + fi + fi + +-SAVE_CPPFLAGS="$CPPFLAGS" +-CFLAGS=`python-config --includes` +-if [ $? -eq 0 ] +-then +- echo $FLAGS +-else +-CFLAGS=`python3-config --includes` +- if [ $? -eq 0 ] +- then +- echo $FLAGS +- fi ++AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)]) ++ ++PYTHON_INCLUDES=`$python3_config_path --includes` ++if test "X$PYTHON_INCLUDES" == "X" ; then ++ AC_MSG_ERROR([Cannot get Python includes via python3-config], 6) ++fi ++ ++PYTHON_LIBS=`$python3_config_path --libs` ++if test "X$PYTHON_LIBS" == "X" ; then ++ AC_MSG_ERROR([Cannot get Python libs via python3-config], 6) ++fi ++ ++SAVE_CFLAGS=$CFLAGS ++SAVE_LIBS=$LIBS ++ ++CFLAGS="$CFLAGS $PYTHON_INCLUDES" ++LIBS="$LIBS $PYTHON_LIBS" ++ ++AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6)) ++ ++if test "X$python_includes" != "Xok" ; then ++ CFLAGS="$SAVE_CFLAGS" ++ LIBS="$SAVE_LIBS" + fi + +-#CFLAGS=`(python-config --includes)` + if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then + AC_ARG_VAR([PYTHON], [Python interpreter/compiler command]) + AM_PATH_PYTHON([2.2]) +@@ -630,7 +641,6 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite + AS_IF([test "x$FOUND_HEADER" != "xyes"], + [AC_MSG_ERROR([cannot find python-devel support], 6)]) + fi +-CFLAGS="$save_CFLAGS" + + if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then + AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)]) diff --git a/hplip-pil.patch b/hplip-pil.patch deleted file mode 100644 index 2784b54..0000000 --- a/hplip-pil.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/installer/dcheck.py b/installer/dcheck.py -index 3d0624e..1817819 100644 ---- a/installer/dcheck.py -+++ b/installer/dcheck.py -@@ -366,11 +366,11 @@ def get_xsane_version(): - - def get_pil_version(): - try: -- from PIL import Image -+ import PIL - except ImportError: - return '-' - else: -- return Image.PILLOW_VERSION -+ return PIL.__version__ - - def get_libpthread_version(): - try: diff --git a/hplip.spec b/hplip.spec index 0a1a4d5..9db95ec 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.3 -Release: 5%{?dist} +Version: 3.20.5 +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 @@ -126,12 +126,13 @@ Patch49: hplip-model-mismatch.patch # sixext has problems with python3 strings (bz#1573430) # reported https://bugs.launchpad.net/bugs/1480152 Patch50: hplip-unicodeerror.patch -# the version attribute in python-pillow got changed again.. -# https://bugs.launchpad.net/hplip/+bug/1863620 -Patch51: hplip-pil.patch # error with new gcc, already reported in upstream as # https://bugs.launchpad.net/hplip/+bug/1836735 -Patch52: hplip-fix-Wreturn-type-warning.patch +Patch51: hplip-fix-Wreturn-type-warning.patch +# upstream check for python clears OS build system +# CFLAGS +# https://bugs.launchpad.net/hplip/+bug/1879445 +Patch52: hplip-configure-python.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -393,8 +394,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch49 -p1 -b .model-mismatch # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes %patch50 -p1 -b .unicodeerror -%patch51 -p1 -b .pil -%patch52 -p1 -b .Wreturn-fix +%patch51 -p1 -b .Wreturn-fix +%patch52 -p1 -b .configure-python sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -419,12 +420,6 @@ sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in # Regenerating all autotools files works-around these rpath issues. autoreconf --verbose --force --install -# hplip used improper way of checking python usability which worked -# until python38 - start to include python in spec file -# https://bugzilla.redhat.com/show_bug.cgi?id=1706233 -export CFLAGS="%{optflags} $(python3-config --includes)" -export CXXFLAGS="%{optflags} $(python3-config --includes)" - %configure \ --enable-scan-build --enable-gui-build --enable-fax-build \ --disable-foomatic-rip-hplip-install --enable-pp-build \ @@ -701,6 +696,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu May 14 2020 Zdenek Dohnal - 3.20.5-1 +- 3.20.5 + * Wed Apr 15 2020 Zdenek Dohnal - 3.20.3-5 - model mismatch during scanning due 'HP_' string From a82459c176f51380050859eb8ad7358a86543add Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 19 May 2020 10:44:40 +0200 Subject: [PATCH 019/166] 3.20.5 --- .gitignore | 3 +-- hp-laserjet_cp_1025nw.ppd.gz | Bin 0 -> 3147 bytes hp-laserjet_professional_p_1102w.ppd.gz | Bin 0 -> 2507 bytes sources | 4 +--- 4 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 hp-laserjet_cp_1025nw.ppd.gz create mode 100644 hp-laserjet_professional_p_1102w.ppd.gz diff --git a/.gitignore b/.gitignore index a2e7364..80c624c 100644 --- a/.gitignore +++ b/.gitignore @@ -91,11 +91,10 @@ hplip-3.10.6.tar.gz /hplip-3.18.6.tar.gz /hplip-3.18.12.tar.gz /hplip-3.19.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 /hplip-3.19.11.tar.gz /hplip-3.19.12.tar.gz /hplip-3.20.2.tar.gz /hplip-3.20.3.tar.gz +/hplip-3.20.5.tar.gz diff --git a/hp-laserjet_cp_1025nw.ppd.gz b/hp-laserjet_cp_1025nw.ppd.gz new file mode 100644 index 0000000000000000000000000000000000000000..ab80803c1dfc0ddc254e4c7f0c5f94ea30c88d25 GIT binary patch literal 3147 zcmV-R47BqfiwFp;*92Su188t9Y+-X{a%yFCUt@4zF)%VUZg(zlaAW|*TWfFIHW&V$ zUqPf8kOYk+Qlu_fF~G5#CPmWtjk|ZiieXS}##SRsnl7omU%x|2vgAmXEf4Vw#I`7& z^YC2A^N427hQq;mZxTH63v^5s{rKqYCwL)fMo+HC(Nhqi>mj;zVjg|w3F?OkYlQhf z&<{76q5iMKk&?^wBkm-8f*zMBnQ?hb>gfmb5L883%L`VRq6ryvGCoB_(=6x_E+cn3 zO9a$_zi=-I=iE=EsN*l+qub%p*;NqDo#g*Kirv6p4fhIEmu*3zjgd+>P*Xf zAN{H4#*3comW;gDH)?g_)c^W@KQ_-AIg5{47d zKa7G&I!>V1N!35lT=7vq@W6k=$n_Jjf5an~$EP5C=lJQ9GfvWoN1)+)DB6Mv_j2Gy zk3*l)EQpdX?)bT_ADV^k_ZWI_>-Zjej?*wkx!2yKi2s$k5sy(A1tAPJaiS#(y>#mO z!sJou=o4MTnxbjiDbgz5z7@d}aey{yJVetS!w9}cDL*$#3Ja!Xb-d~P zQ8-e|+aO;Z52h*PZ{Z!$4slCl20LNsxnmg<^~Ikk;^uiIBZ9O%&2q%TnV{&H3)AmI z?*Dp&&O{JK5I^;fPh1CyuMl6z;d>w8?xP8ZY=XWM?vIx+U=8*B<%lO~Sjw(atZ2AE zx8Nxr9j&^cKDbO@F!csBE#wt~OIP^&!v|Fi@djc#<&lPLLtTk|BiKN?q5YxW%pI5z z)62_Xf&A3-e)%QlNeKNWGEB!6tZQfLJiBW40Ylanm|F9B0~FO)P~RZph>~td!C zbO8evUl4rTW)Z+x082W-^bECUfFW$7A!`V>sptlx*j7xVyE$xO=H|e+t>!>%5YuQU z7!iH8u&TKLm%BlAwCFy4N}p3T`#3K$f?5kGfsKyD8ZHr;VRlZ59#eZPgTNagDhOGS z5VM&=yE*Zash5Cb8Vkajadc)@fNV>#4Pj( zI-=Ot_LWeWXzSe~c6B@Isl7Q+jMnuA_e+PNXr;ew}_Y8+N;;?lT zs5%|J>c8}e+9TqNpyC_>)ixJwm!#A&g}DYRe#iOdzw`~YZdT_I4% zn5}g5rofy9DOKN5^x1*u3?B0m--guH*!Bv?r~+k_Sy<^P@Gl+9O?;_dl-4t7vRU&QR~Iem_F2v(m%b>#JEKVqMQ9g^DTkZ(`! zbD#sz`yvnDoZ!C>*I_Asj(%8@zl!2p)BM7>2POI?=pm_o1@*rn`{e)*PxnjgLlXWH z^-z?5J;(qVg}wb2{LS|K%;GG z)PM?7)7r$VDo@4>my$GvHcBVag(CS{gBRN}JGj zR2SZ^_*h34&7CstdmA&&;`ocr;sZPsdg z8+XgMQ;%yhn@L!{D_R%Xz^3xe&3gYjVUl~4a!%?DL)PWHm1P!g0IgG^eEYH9zlGc6 zyNGp}tt2Ji3v4j4#x`DClyB~pWu~sAPA(+>7mFRHjA^EoJqfI3$SWO9R6_2;t&s@1 zAGby#Ua8s6BJv%!y66TvkZ+XL`){oH`G!}6vuj2DwQsX6EHSl+VKURgEf(%j!}IN- zx{~c>dZXxuN?hy^H4J!5wbfrSL$T%4sHLU0%AFhGHp>Lh!?V5I!>LTvW`#Rd&umjh zmP(6QV5TJ7>!q@;d&gRt@3%CnXeo!;wn?@4$qf`y{9s9LT86e&zkEYvqn~ytaB^Q` zt+W{p`O{w8@{Ni{v6dpW!+LY)EacCIzqylSmL+VZ^_q+0!J^z{Ieh)wofA!6KfXX& z-Ini1XZos)%Qv7i_1~MLqr-ju}VM~fGRH=v9MVOv)aJ4wjHyoFADd{q!y=?^WVzF*PWfa5?=Xs z)glf=JFb6J_Q@Jl`HtkI%}ic(IFYwbr9GuogGJ@dPheZT%o$Uo&aB64rFxs2DpnO< z$}&&5PL&6((f?A%bCc!Ho+=frTvaw*pfBP-3Pe;^ZF!TLePmW;ccod{se1j}1CIkQ z6*K1>Eb;JMqy160tDJ}{*sFx>f%yq*TO|Hp1Tv=g;`qrYVCnq)G62cZeaDUeJC5yv@p4cbQITc{IEAhM;+qJw&=Wy^!oC zbq2`D@cfGtMZu3f#r7L+MfTr~df%vYl>5Se^npjE(Q-7Nd5_Os ztZtO;G&yP-{+;wg0CRLl;i2P+|CkH97`!IaX{am7{iM1WHd@Xf1E~C?kdIxcPRA$k z)TU@z_q?s_{S_X7;x0ZY1v;6MiR~fM#q{5u@Tos@{4tM~=b{p)^G=9DegF?qk4_Tr l;J}~YS#g4bC$#b3EZ-x{G=kCNQvAc-(LXQ0y8W#>003Q@A%p+` literal 0 HcmV?d00001 diff --git a/hp-laserjet_professional_p_1102w.ppd.gz b/hp-laserjet_professional_p_1102w.ppd.gz new file mode 100644 index 0000000000000000000000000000000000000000..b7167118f9bd2bda4bc731a1019516138072fa55 GIT binary patch literal 2507 zcmV;+2{iT}iwFp;*92Su188t9Y+-X{a%yFCUvP47W@U48X>V>}Y+rC+F)=VQcP?;n zWB|ol`)}g77XH0|h1IK-+G@!A$*xwSFr9WqTefs|q`O*;3>e5XBw5F4VgLGjoH!4f z@JLtf9ZexP=ks@7K0YQ~j7Eb_Zx&8S7o8fCetL586Z}IkjOLzC&^)B*dW42JCiFML z(1?a}631Q`U>`+DRTb?8y?AVi`d>$5Nx=J*U`A$WvO#P~(p%}2{csh*tTY>WRwYwX zI0l_f&yl7m4oE~B>MfRxvku5J@xy3E0+vE?u=#|BqmzrPkghQMgHWzWq4^a|U5@FJ z>PV^v<3k)Q61*tyeGV4B7ca{@pMz;Q^MXYe-Hh*tn0bMEaxv=j3GeWV`(_z+eC~rE zgnf@HKKLGePkkUo(F~}-J+oxW0C0BDYa{9fjL>s{-Qpmb<0(rhp@6*}@v(45e8GNb zE)X9tL(1;F=~JQb_k9YZW#s*c0at+>V)+E1X%fXqxb_pG58gIilUq&r4o`Mk1!7wjP*l5q!4m%3d%gvgq&Oq$Q&m=OYe*$%x^q= zxy&Lx-o%Woy66h~F^E1cX_zdQQNo?CW)!n{iX(CliUkaU$`u*;N$e^h{`i0aPrZM* z#~(KlF*Kft1L{2!+L@8L7eE4I#;7+*7>Okb67@mYI|9`o$O2|WJ>So@T}C3Lxpkn4 z|Kpz@F@xo>0+qP)ZbqXAf@44~Bj1ap%v&8oX-MTP=fMG`XYrPACtkqcz=}o33m^aq zpQn>e0(638SMI2a>VSxR9_jE=e4MBEBg6Ren zR!}e4j0sDk5?kbEKF~!&@E@Tkg$U|da?b*|xmFEl1*v-a%P(@81CS&OLKUPLaxVR+ z<~qpGl)vPg6^39gE-%A13KHM{_1BoN2*hS-$WE&arra|T%)ZuCrJ2Dj8DMr~x@Iee zQ5dr+B!rw_G;r8z#R^AnZN(r=CO#>cvX5vVq4vrs%Wg&Z+odVPA5tA{t(kVC<6Nuc zFjY&^44`!+%V@>)c}=DXgOVZ_SICw$$OuI;(-r%gx8h4v(~xaitq4`?Np;P&W-BsW zB5~blp(lBBbDR6vPy3ku+%CWEYXEk>2)KOYFDjtkZre% zShkAg>M}<9H6T(^!c8c*`+rppt5b4tGCO*Az5HwPG2(`qmf46W>KN}Yqzq3=Udok=yWNI zcRs}1MFRbaW1DMx#|o>iY|VC&X|yX>Kr#|kTfuYRl>27IMhj}C<~C<)h0QQsWEpN-HmJy# zRW{p#%G~TxNRmpk@imva6G5LDat#0DgmLO~B-r5vo=&iOO8`^FR@~-hcTZ5eA zJ(~l;@y_jmVEM=fK~T1A5zyOu1VQ$ZU4o$em_DIG_Wqqh)v|Z*6$IG_bPM@ve)oPs z5PfLJP`L5Edxm_a{Xe>flKUh3hLZK8I){?+V|s^@@58%?SGzrj6AYVDj}lyN_*=sb zdp^%$4QY;r426F$^Gd$9e`oR_i%dta$v5rAg27fB84m8N6++Xj!JGC-)j_H$naFS* zNz+}|RW#kuZ4j;dV&xmG>QM_1t7FwIhtsTmDX+h0)&ysJa?1jo40xmcPBsyULP zK`OeYt~SK?4D94unu5djxCNF5u8oD6$#>3$BpWE zL-`TMiqpDit@4P|L0z<|=!ho2E_|@wh+e&pY$`Qr$Gufz(%yTk#Jrm3aE%e&bRD{< zyojc_8MC9Rh~9PwPjf*LEovRJvzCZfvmwH@GLp57)$+lc$L;d*YLdhCLv({p8aI}X zysK-7+|gx2G-r)d?5P%6k5#P_X}49a67~7^mI={4H3Iik2+;&J!uAvg(aNL`6W8f? z7~i}ZTc%|rt=;+XHQ|p}xqfDv8Q0%#F@@$Q?xL)~r2nDeNn#eRiUTfx76YItj8Ogu ztyOvAKphRy(D#pP-Y8zZnqO$E!pvU4V#rM>R-k#abZ&%}i|ZEuI>XiWOnyI~gCbp| z=NN@Qb=p09E^i!^-+IDmA`s4G^KX}Kf+%5QKVgP&m(G~@Bz+VOaY}ii(0W`)WYo&O``4Vkt-_aPDmf(rqBH3 z`-H)5#6KMEgc82}SU4T(qAwJ0PAWp_fXrW@Ci$d12$au~;W)_$E9^bj70k_uIiVYoH~p@TNZKWmq#01fD3zz5&jq(dvN?HMzR4peMM>AsDz9Q zoTazUQ+rC3vd^N50=Yq1;JB4?`luWI4mskn&Cy1c6BJgJLtS*of7ihsSd57wIeW{D z%I>CCDd+O_w+9l3e!`RTPu_LH-(PjRDpL+9o-;XptxecbkDjsgRD)GlVE~gu7C~vC z{0A%Gtll#Y*ca$@Nar#PpSozwa4>_<==4mL6!ZMF9C^6EZARTseD7~wiraz*WaYgL z)sB)YxxzskzAEH~K}Jnm0*Bdd&>qu@O+>SuGz86`y#dnB={d3;>YDh^ghBV#R=$l< z+n_fp*tx@$hA(e~y-nQ;_TOp!)~K|^-I13*v>^%IjHgR~^3=xaMr^CaQJdl4p&vq6 zqep^A*ylgl3)>jHg=wW~fqWaPjbY=>Y7)YxH;%~EgJ$gX42~m`l8KA4Qu+~23UM1B zlz>*IWUx0t+L-=d9L@Vn983w_ba*F{tXeU0`~XfN6U^cx9QYF)s%9vhqho&O`H3GK VZ3|5{{C9yT{{uXm6uCqz004cGzybgO literal 0 HcmV?d00001 diff --git a/sources b/sources index a387f66..ca7c599 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (hp-laserjet_cp_1025nw.ppd.gz) = d79aa8c777b6be434578febe4bdce6b208ea2f13a5be48c855ff4b74f008cf20fd24ba1c003fca6dc532d5c558e162333dd1d3ca2cc13d980c7668381e121ec1 -SHA512 (hp-laserjet_professional_p_1102w.ppd.gz) = 8c7e5cb2122bed3ee0d789297f60fd92836f947af486d986af60bf98fefb05c38093d62c8871e920ab6b0b31f2f71632a23c71c55be99746e3658959e083e888 -SHA512 (hplip-3.20.3.tar.gz) = a397eb3896292ac956a1969b76707af62c866e47d88148fa75b68574e4639283f7414a2c77e6854c5d22daea49181d4f1bc2daf11fb3058372ff084d591696f1 +SHA512 (hplip-3.20.5.tar.gz) = fce3c7b8a2f3b0d2875bafd2ff65a3312fae867b658cd45eea16d9f3663646b6b0b70b58e6c2b46eb24627cdeefb318b6ca9ccf5a0e9790ff19519518992da07 From 2b42a1175ea4f04e57d805f16c8aea52b5565243 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 25 May 2020 12:25:36 +0200 Subject: [PATCH 020/166] fix infinite loop in password dialog in hp-toolbox --- hplip-dialog-infinite-loop.patch | 34 ++++++++++++++++++++++++++++++++ hplip.spec | 11 ++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 hplip-dialog-infinite-loop.patch diff --git a/hplip-dialog-infinite-loop.patch b/hplip-dialog-infinite-loop.patch new file mode 100644 index 0000000..dbb04e7 --- /dev/null +++ b/hplip-dialog-infinite-loop.patch @@ -0,0 +1,34 @@ +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index c23957a..48b248f 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -2247,7 +2247,7 @@ class PasswordDialog(QDialog): + self.prompt = prompt + + Layout= QGridLayout(self) +- Layout.setMargin(11) ++ Layout.setContentsMargins(11, 11, 11, 11) + Layout.setSpacing(6) + + self.PromptTextLabel = QLabel(self) +@@ -2300,14 +2300,15 @@ class PasswordDialog(QDialog): + # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + def showPasswordUI(prompt): ++ dlg = None ++ + try: + dlg = PasswordDialog(prompt, None) ++ except Exception as e: ++ log.error('Unable to open password dialog due following error:\n {}'.format(e)) + +- if dlg.exec_() == QDialog.Accepted: +- return (dlg.getUsername(), dlg.getPassword()) +- +- finally: +- pass ++ if dlg and dlg.exec_() == QDialog.Accepted: ++ return (dlg.getUsername(), dlg.getPassword()) + + return ("", "") + diff --git a/hplip.spec b/hplip.spec index 9db95ec..419e372 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.5 -Release: 1%{?dist} +Release: 2%{?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 @@ -133,6 +133,11 @@ Patch51: hplip-fix-Wreturn-type-warning.patch # CFLAGS # https://bugs.launchpad.net/hplip/+bug/1879445 Patch52: hplip-configure-python.patch +# taken from hplip upstream report - toolbox uses deprecated method +# setMargin(), which generates an exception, resulting in a infinite loop +# of request on cupsd +# https://bugs.launchpad.net/hplip/+bug/1880275 +Patch53: hplip-dialog-infinite-loop.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -396,6 +401,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch50 -p1 -b .unicodeerror %patch51 -p1 -b .Wreturn-fix %patch52 -p1 -b .configure-python +%patch53 -p1 -b .dialog-infinite-loop sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -696,6 +702,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon May 25 2020 Zdenek Dohnal - 3.20.5-2 +- fix infinite loop in password dialog in hp-toolbox + * Thu May 14 2020 Zdenek Dohnal - 3.20.5-1 - 3.20.5 From a7ca817248caac48d797ba4f31ddc3f0883e1851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 26 May 2020 02:48:24 +0200 Subject: [PATCH 021/166] Rebuilt for Python 3.9 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 419e372..3f2578c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.5 -Release: 2%{?dist} +Release: 3%{?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 @@ -702,6 +702,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue May 26 2020 Miro Hrončok - 3.20.5-3 +- Rebuilt for Python 3.9 + * Mon May 25 2020 Zdenek Dohnal - 3.20.5-2 - fix infinite loop in password dialog in hp-toolbox From d6b7a484d512f21c353468427f1141f7f237c41e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 1 Jun 2020 09:25:27 +0200 Subject: [PATCH 022/166] 1794147 - HP-setup crashes with Python3 ui5 module not found error --- hplip-ui-optional.patch | 79 +++++++++++++++++++++++++++-------------- hplip.spec | 5 ++- 2 files changed, 57 insertions(+), 27 deletions(-) diff --git a/hplip-ui-optional.patch b/hplip-ui-optional.patch index 0710d10..cf4c037 100644 --- a/hplip-ui-optional.patch +++ b/hplip-ui-optional.patch @@ -1,16 +1,24 @@ -diff -up hplip-3.19.6/base/utils.py.ui-optional hplip-3.19.6/base/utils.py ---- hplip-3.19.6/base/utils.py.ui-optional 2019-06-26 15:07:10.000000000 +0200 -+++ hplip-3.19.6/base/utils.py 2019-07-12 08:16:22.390256936 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # - # (c) Copyright 2001-2018 HP Development Company, L.P. -@@ -734,6 +734,13 @@ def checkPyQtImport(): # qt3 +diff --git a/base/utils.py b/base/utils.py +index 98437a3..4192189 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -722,6 +722,12 @@ def canEnterGUIMode4(): # qt4 + log.warn(e) + return False + ++ try: ++ import ui ++ except ImportError: ++ log.error('HPLIP UI module not installed - run the command with \'-i\' option for interactive mode or install hplip-gui package.') ++ return False ++ + return True + + +@@ -734,6 +740,13 @@ def checkPyQtImport(): # qt3 if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'): no_qt_message_gtk() - + + # hplip-gui sub-package (Fedora) + try: + import ui @@ -20,8 +28,8 @@ diff -up hplip-3.19.6/base/utils.py.ui-optional hplip-3.19.6/base/utils.py + log.error("PyQt not installed. GUI not available. Exiting.") return False - -@@ -784,7 +791,8 @@ def checkPyQtImport4(): + +@@ -784,7 +797,8 @@ def checkPyQtImport4(): import PyQt5 import ui5 else: @@ -30,16 +38,16 @@ diff -up hplip-3.19.6/base/utils.py.ui-optional hplip-3.19.6/base/utils.py + log.error("Install the hplip-gui package for graphical support.") return False return True - -@@ -2456,6 +2464,7 @@ def checkPyQtImport45(): + +@@ -2456,6 +2470,7 @@ def checkPyQtImport45(): except ImportError as e: log.debug(e) - + + log.error("Install the hplip-gui package for graphical support.") raise ImportError("GUI Modules PyQt4 and PyQt5 are not installed") - - -@@ -2477,6 +2486,7 @@ def import_dialog(ui_toolkit): + + +@@ -2477,6 +2492,7 @@ def import_dialog(ui_toolkit): return (QApplication, "ui4") except ImportError as e: log.error(e) @@ -47,7 +55,7 @@ diff -up hplip-3.19.6/base/utils.py.ui-optional hplip-3.19.6/base/utils.py sys.exit(1) elif ui_toolkit == "qt5": try: -@@ -2485,9 +2495,7 @@ def import_dialog(ui_toolkit): +@@ -2485,9 +2501,7 @@ def import_dialog(ui_toolkit): return (QApplication, "ui5") except ImportError as e: log.error(e) @@ -56,14 +64,15 @@ diff -up hplip-3.19.6/base/utils.py.ui-optional hplip-3.19.6/base/utils.py - log.error("Unable to load Qt support. Is it installed?") + log.error("Unable to load Qt support. Is hplip-gui package installed?") sys.exit(1) - - -diff -up hplip-3.19.6/plugin.py.ui-optional hplip-3.19.6/plugin.py ---- hplip-3.19.6/plugin.py.ui-optional 2019-06-26 15:07:10.000000000 +0200 -+++ hplip-3.19.6/plugin.py 2019-07-12 08:15:03.731933177 +0200 + + +diff --git a/plugin.py b/plugin.py +index c833c55..74f93ef 100755 +--- a/plugin.py ++++ b/plugin.py @@ -252,7 +252,11 @@ if mode == GUI_MODE: # clean_exit(1) - + QApplication, ui_package = utils.import_dialog(ui_toolkit) - ui = import_module(ui_package + ".plugindialog") + try: @@ -74,3 +83,21 @@ diff -up hplip-3.19.6/plugin.py.ui-optional hplip-3.19.6/plugin.py if ui_toolkit == "qt5": from PyQt5.QtWidgets import QMessageBox elif ui_toolkit == "qt4": +diff --git a/setup.py b/setup.py +index ba1b519..ac4afa2 100755 +--- a/setup.py ++++ b/setup.py +@@ -218,11 +218,11 @@ if mode == GUI_MODE: + log.warning("-p or -f option is not supported") + if ui_toolkit == 'qt3': + if not utils.canEnterGUIMode(): +- log.error("%s requires GUI support (try running with --qt4). Also, try using interactive (-i) mode." % __mod__) ++ log.error("%s requires GUI support (try running with --qt3). Also, try using interactive (-i) mode." % __mod__) + clean_exit(1) + else: + if not utils.canEnterGUIMode4(): +- log.error("%s requires GUI support (try running with --qt3). Also, try using interactive (-i) mode." % __mod__) ++ log.error("%s requires GUI support (try running with --qt4). Also, try using interactive (-i) mode." % __mod__) + clean_exit(1) + + if mode == GUI_MODE: diff --git a/hplip.spec b/hplip.spec index 3f2578c..06c406d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.5 -Release: 3%{?dist} +Release: 4%{?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 @@ -702,6 +702,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jun 01 2020 Zdenek Dohnal - 3.20.5-4 +- 1794147 - HP-setup crashes with Python3 ui5 module not found error + * Tue May 26 2020 Miro Hrončok - 3.20.5-3 - Rebuilt for Python 3.9 From 458a657499eca3aa9a2944ccd832f3e76b0f9ea0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 1 Jun 2020 13:57:39 +0200 Subject: [PATCH 023/166] 1590014 - hplip PPD search doesn't expect '-' in device name --- hplip-find-driver.patch | 134 ++++++++++++++++++++++++++++++++++++++++ hplip.spec | 8 +++ 2 files changed, 142 insertions(+) create mode 100644 hplip-find-driver.patch diff --git a/hplip-find-driver.patch b/hplip-find-driver.patch new file mode 100644 index 0000000..fbc038e --- /dev/null +++ b/hplip-find-driver.patch @@ -0,0 +1,134 @@ +diff --git a/prnt/cups.py b/prnt/cups.py +index a9f410a..b3e7434 100644 +--- a/prnt/cups.py ++++ b/prnt/cups.py +@@ -489,49 +489,72 @@ def getPPDFile2(mq,model, ppds): # New PPD find + #Check if common ppd name is already given in models.dat(This is needed because in case of devices having more than one derivatives + #will have diffrent model name strings in device ID, because of which we don't get the common ppd name for search) + family_check=isfamilydrv(ppds) +- family_class=getFamilyClassName(model) ++ + model = models.normalizeModelName(model) +- if family_check==0: +- ppd_name = mq.get('ppd-name',0) +- else: +- ppd_name = mq.get('family-ppd',0) + +- if ppd_name == 0: +- stripped_model = stripModel2(model) +- else: +- stripped_model = stripModel2(ppd_name) ++ ppd_name = mq.get('{}'.format('family-ppd' if family_check else 'ppd-name'), 0) ++ ++ stripped_model = stripModel2(ppd_name) if ppd_name else stripModel2(model) ++ ++ wanted_model = getFamilyClassName(model) if family_check else stripped_model + + log.debug("Matching PPD list to model %s..." % stripped_model) + + matches = [] +- if family_check ==0 : +- for f in ppds: +- match = ppd_pat.match(f) +- if match is not None: +- if match.group(1) == stripped_model: +- log.debug("Found match: %s" % f) +- try: +- pdls = match.group(2).split('-') +- except AttributeError: +- pdls = [] +- if (prop.hpcups_build and 'hpijs' not in f) or \ +- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \ +- ('ps' in pdls) or ('pdf' in pdls): +- matches.append((f, [p for p in pdls if p and p != 'hpijs'])) +- else: +- for f in ppds: +- match = ppd_pat1.match(f) +- if match is not None: +- if match.group(1) == family_class: +- log.debug("Found match: %s" % f) +- try: +- pdls = match.group(2).split('-') +- except AttributeError: +- pdls = [] +- if (prop.hpcups_build and 'hpijs' not in f) or \ +- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \ +- ('ps' in pdls) or ('pdf' in pdls): +- matches.append((f, [p for p in pdls if p and p != 'hpijs'])) ++ for f in ppds: ++ # ignore foomatic and gutenprint drivers ++ if 'foomatic' in f or 'gutenprint' in f: ++ continue ++ ++ # see if driver type is in driver name ++ driver_types = [] ++ if 'hpcups' in f: ++ driver_types.append('hpcups') ++ if 'hpijs' in f: ++ driver_types.append('hpijs') ++ ++ ++ ppd_filename = f.rsplit('/', 1)[1].split('.')[0].replace('hp-', '') ++ ++ if not ppd_filename: ++ continue ++ ++ # we need to sanitize the end of filename - there can be a driver type (-hpijs, -hpcups), ++ # pdl name (-zjstream, -pdf, -ps etc.) or the device can just have '-' in their name ++ # (HP Photosmart Premium C309g-m). ++ # So if we don't know the name after '-', take it as part of device name. ++ # If we know them either like driver type of PDL, remove the string from ppd name ++ # so we can compare it with stripped model ++ pdl_candidates = [] ++ pdl_candidates = ppd_filename.split('-')[1:] ++ ++ pdls = [] ++ ppd_model = ppd_filename ++ ++ for pdl in pdl_candidates: ++ if pdl in ['hpijs', 'hpcups']: ++ ppd_model=ppd_model.replace('-{}'.format(pdl), '') ++ continue ++ ++ if not models.PDL_TYPES.get(pdl): ++ log.debug('Unknown PDL named \'{}\' - can be a new PDL or ' ++ 'just a part of device name. Assume it is ' ++ 'a part of device name.'.format(pdl)) ++ else: ++ pdls.append(pdl) ++ ppd_model=ppd_model.replace('-{}'.format(pdl), '') ++ ++ if ppd_model != wanted_model: ++ continue ++ ++ log.debug("Found match: %s" % f) ++ ++ if (prop.hpcups_build and 'hpijs' not in f) or \ ++ ((prop.hpijs_build and 'hpijs' in driver_types) or (prop.hpcups_build and 'hpijs' not in driver_types)) or \ ++ ('ps' in pdls) or ('pdf' in pdls): ++ matches.append((f, pdls, [d for d in driver_types if d and d != 'hpijs'])) ++ ++ + log.debug(matches) + num_matches = len(matches) + +@@ -570,7 +593,7 @@ def getPPDFile2(mq,model, ppds): # New PPD find + # > 1 + log.debug("%d matches found. Searching based on PDL: Host > PS,PDF > PCL/Other" % num_matches) + for p in [models.PDL_TYPE_HOST, models.PDL_TYPE_PS,models.PDL_TYPE_PDF, models.PDL_TYPE_PCL]: +- for f, pdl_list in matches: ++ for f, pdl_list, driver_list in matches: + for x in pdl_list: + # default to HOST-based PDLs, as newly supported PDLs will most likely be of this type + if models.PDL_TYPES.get(x, models.PDL_TYPE_HOST) == p: +@@ -579,8 +602,8 @@ def getPPDFile2(mq,model, ppds): # New PPD find + + log.debug("%d matches found. Searching based on Filters: HPCUPS > HPIJS" % num_matches) + for p in ["hpcups","hpijs"]: +- for f, pdl_list in matches: +- if p in f: ++ for f, pdl_list, driver_list in matches: ++ if p in driver_list: + log.debug("Selecting PPD: %s" % (f)) + return (f, '') + diff --git a/hplip.spec b/hplip.spec index 06c406d..17c51eb 100644 --- a/hplip.spec +++ b/hplip.spec @@ -138,6 +138,11 @@ Patch52: hplip-configure-python.patch # of request on cupsd # https://bugs.launchpad.net/hplip/+bug/1880275 Patch53: hplip-dialog-infinite-loop.patch +# searching algorithm did not expect '-' in model name and thought it is a new PDL +# it resulted in incorrect PPD match, so e.g. hpijs driver was used instead of hpcups +# bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014 +# reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587 +Patch54: hplip-find-driver.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -402,6 +407,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch51 -p1 -b .Wreturn-fix %patch52 -p1 -b .configure-python %patch53 -p1 -b .dialog-infinite-loop +# 1590014 - hplip PPD search doesn't expect '-' in device name +%patch54 -p1 -b .find-driver sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -704,6 +711,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Mon Jun 01 2020 Zdenek Dohnal - 3.20.5-4 - 1794147 - HP-setup crashes with Python3 ui5 module not found error +- 1590014 - hplip PPD search doesn't expect '-' in device name * Tue May 26 2020 Miro Hrončok - 3.20.5-3 - Rebuilt for Python 3.9 From 97d6cead18fb6a8e42d929d24879b7f34523ec1f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 5 Jun 2020 08:32:27 +0200 Subject: [PATCH 024/166] 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error --- hplip-clean-ldl.patch | 44 +++++++++++++++++++++++++++++++++++++++++++ hplip.spec | 14 ++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 hplip-clean-ldl.patch diff --git a/hplip-clean-ldl.patch b/hplip-clean-ldl.patch new file mode 100644 index 0000000..89553ec --- /dev/null +++ b/hplip-clean-ldl.patch @@ -0,0 +1,44 @@ +diff --git a/base/device.py b/base/device.py +index 6d7add9..bf27307 100644 +--- a/base/device.py ++++ b/base/device.py +@@ -2264,7 +2264,8 @@ class Device(object): + self.callback() + + if total_bytes_to_write != bytes_out: +- raise Error(ERROR_DEVICE_IO_ERROR) ++ raise Error(ERROR_DEVICE_IO_ERROR, 'Number of written ' ++ 'bytes by hpmudext mismatch with expected amount.') + + return bytes_out + +diff --git a/base/g.py b/base/g.py +index 9856662..0aa0e2e 100644 +--- a/base/g.py ++++ b/base/g.py +@@ -398,9 +398,11 @@ ERROR_STRINGS = { + + + class Error(Exception): +- def __init__(self, opt=ERROR_INTERNAL): ++ def __init__(self, opt=ERROR_INTERNAL, msg=None): + self.opt = opt + self.msg = ERROR_STRINGS.get(opt, ERROR_STRINGS[ERROR_INTERNAL]) ++ if msg: ++ self.msg = '{} - {}'.format(self.msg, msg) + log.debug("Exception: %d (%s)" % (opt, self.msg)) + Exception.__init__(self, self.msg, opt) + +diff --git a/prnt/ldl.py b/prnt/ldl.py +index e3f77f7..8b28e7f 100644 +--- a/prnt/ldl.py ++++ b/prnt/ldl.py +@@ -145,7 +145,7 @@ def buildLIDILPacket(packet_type, command=0, operation=0, other={}): + p = '$\x00\x10\x00\x08\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$' + + elif packet_type == PACKET_TYPE_RESET_LIDIL: +- p = '$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$' ++ p = b'$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$' + + elif packet_type == PACKET_TYPE_COMMAND: + diff --git a/hplip.spec b/hplip.spec index 17c51eb..fa5644c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -143,6 +143,15 @@ Patch53: hplip-dialog-infinite-loop.patch # bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014 # reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587 Patch54: hplip-find-driver.patch +# hp-clean didn't work for Photosmart C1410 because it was comparing +# string length with buffer size for string object, which is different, +# causing cleaning to fail - the fix is to make the object bytes-like, +# then buffer size is the same as the length. +# Thanks to Stefan Assmann we were able to fix level 1 cleaning +# for the device, but there can be similar issues with other devices +# bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308 +# reported upstream https://bugs.launchpad.net/hplip/+bug/1882193 +Patch55: hplip-clean-ldl.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -409,6 +418,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch53 -p1 -b .dialog-infinite-loop # 1590014 - hplip PPD search doesn't expect '-' in device name %patch54 -p1 -b .find-driver +# 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error +%patch55 -p1 -b .clean-ldl sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -709,6 +720,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jun 05 2020 Zdenek Dohnal - 3.20.5-4 +- 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error + * Mon Jun 01 2020 Zdenek Dohnal - 3.20.5-4 - 1794147 - HP-setup crashes with Python3 ui5 module not found error - 1590014 - hplip PPD search doesn't expect '-' in device name From c9df354ed61714a0aa57c846a2f7b8c1f47a4e2e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 16 Jun 2020 13:40:07 +0200 Subject: [PATCH 025/166] fix the optional GUI --- hplip-ui-optional.patch | 374 ++++++++++++++++++++++++++++++++++++---- hplip.spec | 5 +- 2 files changed, 342 insertions(+), 37 deletions(-) diff --git a/hplip-ui-optional.patch b/hplip-ui-optional.patch index cf4c037..2699d1e 100644 --- a/hplip-ui-optional.patch +++ b/hplip-ui-optional.patch @@ -1,21 +1,54 @@ -diff --git a/base/utils.py b/base/utils.py -index 98437a3..4192189 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -722,6 +722,12 @@ def canEnterGUIMode4(): # qt4 - log.warn(e) - return False +diff --git a/align.py b/align.py +index c5a66fe..9067676 100755 +--- a/align.py ++++ b/align.py +@@ -241,8 +241,13 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".aligndialog") + try: -+ import ui -+ except ImportError: -+ log.error('HPLIP UI module not installed - run the command with \'-i\' option for interactive mode or install hplip-gui package.') -+ return False ++ ui = import_module(ui_package + ".aligndialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + #try: + if 1: +diff --git a/base/queues.py b/base/queues.py +index 04c37b1..dec7fe9 100755 +--- a/base/queues.py ++++ b/base/queues.py +@@ -375,8 +375,14 @@ def main_function(passwordObj = None, mode = GUI_MODE, ui_toolkit= UI_TOOLKIT_QT + sys.exit(1) + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".queuesconf") +- setupdialog = import_module(ui_package + ".setupdialog") + - return True ++ try: ++ ui = import_module(ui_package + ".queuesconf") ++ setupdialog = import_module(ui_package + ".setupdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) - -@@ -734,6 +740,13 @@ def checkPyQtImport(): # qt3 + app = QApplication(sys.argv) + dialog = ui.QueuesDiagnose(None, "","",QUEUES_MSG_SENDING,passwordObj) +diff --git a/base/utils.py b/base/utils.py +index cde819f..0d6e9ff 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # + # (c) Copyright 2001-2018 HP Development Company, L.P. +@@ -734,6 +734,13 @@ def checkPyQtImport(): # qt3 if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'): no_qt_message_gtk() @@ -29,7 +62,7 @@ index 98437a3..4192189 100644 log.error("PyQt not installed. GUI not available. Exiting.") return False -@@ -784,7 +797,8 @@ def checkPyQtImport4(): +@@ -784,7 +791,8 @@ def checkPyQtImport4(): import PyQt5 import ui5 else: @@ -39,7 +72,7 @@ index 98437a3..4192189 100644 return False return True -@@ -2456,6 +2470,7 @@ def checkPyQtImport45(): +@@ -2456,6 +2464,7 @@ def checkPyQtImport45(): except ImportError as e: log.debug(e) @@ -47,7 +80,7 @@ index 98437a3..4192189 100644 raise ImportError("GUI Modules PyQt4 and PyQt5 are not installed") -@@ -2477,6 +2492,7 @@ def import_dialog(ui_toolkit): +@@ -2477,6 +2486,7 @@ def import_dialog(ui_toolkit): return (QApplication, "ui4") except ImportError as e: log.error(e) @@ -55,7 +88,7 @@ index 98437a3..4192189 100644 sys.exit(1) elif ui_toolkit == "qt5": try: -@@ -2485,9 +2501,7 @@ def import_dialog(ui_toolkit): +@@ -2485,9 +2495,7 @@ def import_dialog(ui_toolkit): return (QApplication, "ui5") except ImportError as e: log.error(e) @@ -66,38 +99,307 @@ index 98437a3..4192189 100644 sys.exit(1) +diff --git a/clean.py b/clean.py +index 3d41f04..0141f23 100755 +--- a/clean.py ++++ b/clean.py +@@ -193,8 +193,13 @@ try: + else: + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".cleandialog") + ++ try: ++ ui = import_module(ui_package + ".cleandialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + #try: + if 1: +diff --git a/devicesettings.py b/devicesettings.py +index 0710519..ac42db5 100755 +--- a/devicesettings.py ++++ b/devicesettings.py +@@ -75,7 +75,13 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".devicesetupdialog") ++ ++ try: ++ ui = import_module(ui_package + ".devicesetupdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + dlg = ui.DeviceSetupDialog(None, device_uri) +diff --git a/diagnose_plugin.py b/diagnose_plugin.py +index e4e6ebd..1bcd8c3 100755 +--- a/diagnose_plugin.py ++++ b/diagnose_plugin.py +@@ -94,7 +94,14 @@ if mode == GUI_MODE: + # sys.exit(1) + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".plugindiagnose") ++ ++ try: ++ ui = import_module(ui_package + ".plugindiagnose") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) ++ + from installer import pluginhandler + + app = QApplication(sys.argv) +diff --git a/fab.py b/fab.py +index 9bd6166..e11ebc4 100755 +--- a/fab.py ++++ b/fab.py +@@ -854,8 +854,13 @@ if mode == GUI_MODE: + else: # qt4 + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".fabwindow") + ++ try: ++ ui = import_module(ui_package + ".fabwindow") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + log.set_module("hp-fab(qt4)") + +diff --git a/faxsetup.py b/faxsetup.py +index dd704d2..b8b3e6e 100755 +--- a/faxsetup.py ++++ b/faxsetup.py +@@ -73,7 +73,13 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".faxsetupdialog") ++ ++ try: ++ ui = import_module(ui_package + ".faxsetupdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + dlg = ui.FaxSetupDialog(None, device_uri) +diff --git a/firmware.py b/firmware.py +index 33e044d..a38058b 100755 +--- a/firmware.py ++++ b/firmware.py +@@ -118,7 +118,13 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".firmwaredialog") ++ ++ try: ++ ui = import_module(ui_package + ".firmwaredialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + if ui_toolkit == 'qt3': + try: +diff --git a/info.py b/info.py +index 6c28531..5b05eda 100755 +--- a/info.py ++++ b/info.py +@@ -172,7 +172,13 @@ try: + + else: # GUI mode + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".infodialog") ++ ++ try: ++ ui = import_module(ui_package + ".infodialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + if 1: + app = QApplication(sys.argv) diff --git a/plugin.py b/plugin.py -index c833c55..74f93ef 100755 +index f54f726..58d6006 100755 --- a/plugin.py +++ b/plugin.py -@@ -252,7 +252,11 @@ if mode == GUI_MODE: +@@ -252,7 +252,14 @@ if mode == GUI_MODE: # clean_exit(1) QApplication, ui_package = utils.import_dialog(ui_toolkit) - ui = import_module(ui_package + ".plugindialog") ++ + try: + ui = import_module(ui_package + ".plugindialog") + except ModuleNotFoundError: -+ log.error("hplip-gui not installed. GUI not available. Exiting.") -+ clean_exit(1) ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) ++ if ui_toolkit == "qt5": from PyQt5.QtWidgets import QMessageBox elif ui_toolkit == "qt4": +diff --git a/print.py b/print.py +index ab37047..f98e5bd 100755 +--- a/print.py ++++ b/print.py +@@ -140,7 +140,12 @@ else: # qt4 + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".printdialog") ++ try: ++ ui = import_module(ui_package + ".printdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + if 1: + app = QApplication(sys.argv) +diff --git a/printsettings.py b/printsettings.py +index 76b662e..7a1b416 100755 +--- a/printsettings.py ++++ b/printsettings.py +@@ -85,7 +85,12 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".printsettingsdialog") ++ try: ++ ui = import_module(ui_package + ".printsettingsdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + dialog = ui.PrintSettingsDialog(None, printer_name, fax_mode) +diff --git a/sendfax.py b/sendfax.py +index 491c8f9..0815ee7 100755 +--- a/sendfax.py ++++ b/sendfax.py +@@ -211,7 +211,13 @@ if mode == GUI_MODE: + # sys.exit(1) + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".sendfaxdialog") ++ ++ try: ++ ui = import_module(ui_package + ".sendfaxdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + dlg = ui.SendFaxDialog(None, printer_name, device_uri, mod.args) diff --git a/setup.py b/setup.py -index ba1b519..ac4afa2 100755 +index 2608f95..b09a8ef 100755 --- a/setup.py +++ b/setup.py -@@ -218,11 +218,11 @@ if mode == GUI_MODE: - log.warning("-p or -f option is not supported") - if ui_toolkit == 'qt3': - if not utils.canEnterGUIMode(): -- log.error("%s requires GUI support (try running with --qt4). Also, try using interactive (-i) mode." % __mod__) -+ log.error("%s requires GUI support (try running with --qt3). Also, try using interactive (-i) mode." % __mod__) - clean_exit(1) - else: - if not utils.canEnterGUIMode4(): -- log.error("%s requires GUI support (try running with --qt3). Also, try using interactive (-i) mode." % __mod__) -+ log.error("%s requires GUI support (try running with --qt4). Also, try using interactive (-i) mode." % __mod__) - clean_exit(1) +@@ -310,7 +310,12 @@ if mode == GUI_MODE: + # clean_exit(1) - if mode == GUI_MODE: + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".setupdialog") ++ try: ++ ui = import_module(ui_package + ".setupdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + log.debug("Sys.argv=%s printer_name=%s param=%s jd_port=%s device_uri=%s remove=%s" % (sys.argv, printer_name, param, jd_port, device_uri, remove)) +diff --git a/testpage.py b/testpage.py +index a5ed2bc..2a707a1 100755 +--- a/testpage.py ++++ b/testpage.py +@@ -77,7 +77,13 @@ try: + # log.error("Unable to load Qt4 support. Is it installed?") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".printtestpagedialog") ++ ++ try: ++ ui = import_module(ui_package + ".printtestpagedialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + log.set_module("%s(UI)" % __mod__) + +diff --git a/toolbox.py b/toolbox.py +index 2a67504..4e57b9e 100755 +--- a/toolbox.py ++++ b/toolbox.py +@@ -267,9 +267,13 @@ else: # qt4 + # log.error("Unable to load Qt support") + # sys.exit(1) + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".devmgr5") +- + ++ try: ++ ui = import_module(ui_package + ".devmgr5") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + log.set_module("hp-toolbox(UI)") + +diff --git a/uiscan.py b/uiscan.py +index 6301c1f..9f42c52 100755 +--- a/uiscan.py ++++ b/uiscan.py +@@ -55,7 +55,13 @@ if __name__ == "__main__": + + QApplication, ui_package = utils.import_dialog(ui_toolkit) + +- ui = import_module(ui_package + ".scandialog") ++ ++ try: ++ ui = import_module(ui_package + ".scandialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + obj=ui.SetupDialog() + #obk=obj.setupUi(devicelist) +diff --git a/wificonfig.py b/wificonfig.py +index b21e83a..21b11c7 100755 +--- a/wificonfig.py ++++ b/wificonfig.py +@@ -72,7 +72,13 @@ try: + # sys.exit(1) + + QApplication, ui_package = utils.import_dialog(ui_toolkit) +- ui = import_module(ui_package + ".wifisetupdialog") ++ ++ try: ++ ui = import_module(ui_package + ".wifisetupdialog") ++ except ModuleNotFoundError: ++ log.error('HPLIP GUI is not available - use interactive mode ' ++ '(option \'-i\') or install hplip-gui package.') ++ sys.exit(1) + + app = QApplication(sys.argv) + dlg = ui.WifiSetupDialog(None, device_uri, standalone=True) diff --git a/hplip.spec b/hplip.spec index fa5644c..fbbbdc3 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.5 -Release: 4%{?dist} +Release: 5%{?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 @@ -720,6 +720,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jun 16 2020 Zdenek Dohnal - 3.20.5-5 +- fix the optional GUI + * Fri Jun 05 2020 Zdenek Dohnal - 3.20.5-4 - 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error From 57dab6529db49eb7daa89b378618006e32d730c0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 16 Jun 2020 16:45:19 +0200 Subject: [PATCH 026/166] remove the check for scripts which are only in hplip-gui --- hplip-ui-optional.patch | 132 ---------------------------------------- hplip.spec | 5 +- 2 files changed, 4 insertions(+), 133 deletions(-) diff --git a/hplip-ui-optional.patch b/hplip-ui-optional.patch index 2699d1e..08e6d12 100644 --- a/hplip-ui-optional.patch +++ b/hplip-ui-optional.patch @@ -118,25 +118,6 @@ index 3d41f04..0141f23 100755 #try: if 1: -diff --git a/devicesettings.py b/devicesettings.py -index 0710519..ac42db5 100755 ---- a/devicesettings.py -+++ b/devicesettings.py -@@ -75,7 +75,13 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".devicesetupdialog") -+ -+ try: -+ ui = import_module(ui_package + ".devicesetupdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dlg = ui.DeviceSetupDialog(None, device_uri) diff --git a/diagnose_plugin.py b/diagnose_plugin.py index e4e6ebd..1bcd8c3 100755 --- a/diagnose_plugin.py @@ -176,25 +157,6 @@ index 9bd6166..e11ebc4 100755 log.set_module("hp-fab(qt4)") -diff --git a/faxsetup.py b/faxsetup.py -index dd704d2..b8b3e6e 100755 ---- a/faxsetup.py -+++ b/faxsetup.py -@@ -73,7 +73,13 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".faxsetupdialog") -+ -+ try: -+ ui = import_module(ui_package + ".faxsetupdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dlg = ui.FaxSetupDialog(None, device_uri) diff --git a/firmware.py b/firmware.py index 33e044d..a38058b 100755 --- a/firmware.py @@ -253,42 +215,6 @@ index f54f726..58d6006 100755 if ui_toolkit == "qt5": from PyQt5.QtWidgets import QMessageBox elif ui_toolkit == "qt4": -diff --git a/print.py b/print.py -index ab37047..f98e5bd 100755 ---- a/print.py -+++ b/print.py -@@ -140,7 +140,12 @@ else: # qt4 - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".printdialog") -+ try: -+ ui = import_module(ui_package + ".printdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - if 1: - app = QApplication(sys.argv) -diff --git a/printsettings.py b/printsettings.py -index 76b662e..7a1b416 100755 ---- a/printsettings.py -+++ b/printsettings.py -@@ -85,7 +85,12 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".printsettingsdialog") -+ try: -+ ui = import_module(ui_package + ".printsettingsdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dialog = ui.PrintSettingsDialog(None, printer_name, fax_mode) diff --git a/sendfax.py b/sendfax.py index 491c8f9..0815ee7 100755 --- a/sendfax.py @@ -345,61 +271,3 @@ index a5ed2bc..2a707a1 100755 log.set_module("%s(UI)" % __mod__) -diff --git a/toolbox.py b/toolbox.py -index 2a67504..4e57b9e 100755 ---- a/toolbox.py -+++ b/toolbox.py -@@ -267,9 +267,13 @@ else: # qt4 - # log.error("Unable to load Qt support") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".devmgr5") -- - -+ try: -+ ui = import_module(ui_package + ".devmgr5") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - log.set_module("hp-toolbox(UI)") - -diff --git a/uiscan.py b/uiscan.py -index 6301c1f..9f42c52 100755 ---- a/uiscan.py -+++ b/uiscan.py -@@ -55,7 +55,13 @@ if __name__ == "__main__": - - QApplication, ui_package = utils.import_dialog(ui_toolkit) - -- ui = import_module(ui_package + ".scandialog") -+ -+ try: -+ ui = import_module(ui_package + ".scandialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - obj=ui.SetupDialog() - #obk=obj.setupUi(devicelist) -diff --git a/wificonfig.py b/wificonfig.py -index b21e83a..21b11c7 100755 ---- a/wificonfig.py -+++ b/wificonfig.py -@@ -72,7 +72,13 @@ try: - # sys.exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".wifisetupdialog") -+ -+ try: -+ ui = import_module(ui_package + ".wifisetupdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dlg = ui.WifiSetupDialog(None, device_uri, standalone=True) diff --git a/hplip.spec b/hplip.spec index fbbbdc3..e1bd587 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.5 -Release: 5%{?dist} +Release: 6%{?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 @@ -720,6 +720,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jun 16 2020 Zdenek Dohnal - 3.20.5-6 +- remove the check for scripts which are only in hplip-gui + * Tue Jun 16 2020 Zdenek Dohnal - 3.20.5-5 - fix the optional GUI From 5eb8189bae2c83477564d2da80a10b1588c51eb0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 18 Jun 2020 13:28:47 +0200 Subject: [PATCH 027/166] 3.20.6 --- .gitignore | 1 + hplip-hpfax-importerror-print.patch | 10 +-- hplip-missing-drivers.patch | 112 ++++++++++++++-------------- hplip.spec | 12 ++- sources | 2 +- 5 files changed, 68 insertions(+), 69 deletions(-) diff --git a/.gitignore b/.gitignore index 80c624c..b35bdcb 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.2.tar.gz /hplip-3.20.3.tar.gz /hplip-3.20.5.tar.gz +/hplip-3.20.6.tar.gz diff --git a/hplip-hpfax-importerror-print.patch b/hplip-hpfax-importerror-print.patch index 8d487c4..3fdafda 100644 --- a/hplip-hpfax-importerror-print.patch +++ b/hplip-hpfax-importerror-print.patch @@ -1,16 +1,10 @@ -commit cdf5cb36e5d5a86f6a690c5861666cdc2da70593 -Author: Tomas Korbar -Date: Wed Sep 19 15:33:03 2018 +0200 - - Fix TypeError in hpfax - diff --git a/fax/backend/hpfax.py b/fax/backend/hpfax.py -index 9560e84..bc0912a 100755 +index a63051d..3e187c9 100755 --- a/fax/backend/hpfax.py +++ b/fax/backend/hpfax.py @@ -89,7 +89,7 @@ try: from base import utils - from prnt import cups + #from prnt import cups except ImportError as e: - bug("Error importing HPLIP modules: %s\n" % (pid, e)) + bug("Error importing HPLIP modules: %s\n" % (e)) diff --git a/hplip-missing-drivers.patch b/hplip-missing-drivers.patch index 967a62e..08198bc 100644 --- a/hplip-missing-drivers.patch +++ b/hplip-missing-drivers.patch @@ -1,44 +1,7 @@ -diff --git a/Makefile.in b/Makefile.in -index 57b2812..250e2dc 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -1542,6 +1542,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-designjet_z6810ps_42in-ps.ppd.gz \ - ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ - ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ - ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ -+ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ - ppd/hpcups/hp-laserjet_m1005.ppd.gz \ - ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ - ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -1655,6 +1656,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-designjet_z6810ps_42in-ps.ppd.gz \ - ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ - ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ - ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ -+ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ - ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ - ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ - ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \ -@@ -3895,6 +3897,7 @@ dist_unrel_DATA = - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ -+@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -4007,6 +4010,7 @@ dist_unrel_DATA = - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ -+@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff --git a/cups_drv.inc b/cups_drv.inc -index 3863c52..50c570d 100644 ---- a/cups_drv.inc -+++ b/cups_drv.inc -@@ -398,6 +398,7 @@ cups_ppd_printers = \ +diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc +--- hplip-3.20.6/cups_drv.inc.missing-drivers 2020-06-09 13:23:14.000000000 +0200 ++++ hplip-3.20.6/cups_drv.inc 2020-06-17 13:49:39.110952720 +0200 +@@ -407,6 +407,7 @@ cups_ppd_printers = \ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ @@ -46,7 +9,7 @@ index 3863c52..50c570d 100644 ppd/hpcups/hp-laserjet_m1005.ppd.gz \ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -510,6 +511,7 @@ cups_ppd_printers = \ +@@ -520,6 +521,7 @@ cups_ppd_printers = \ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ @@ -54,10 +17,9 @@ index 3863c52..50c570d 100644 ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff --git a/data/models/models.dat b/data/models/models.dat -index 9dfcf3d..9da0acd 100644 ---- a/data/models/models.dat -+++ b/data/models/models.dat +diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/models/models.dat +--- hplip-3.20.6/data/models/models.dat.missing-drivers 2020-06-17 13:49:39.080953000 +0200 ++++ hplip-3.20.6/data/models/models.dat 2020-06-17 13:49:39.120952626 +0200 @@ -2104,7 +2104,7 @@ usb-pid=411 usb-vid=3f0 wifi-config=0 @@ -461,7 +423,7 @@ index 9dfcf3d..9da0acd 100644 [officejet_100_mobile_l411] align-type=-1 clean-type=1 -@@ -17865,6 +18229,58 @@ usb-pid=2c17 +@@ -17867,6 +18231,58 @@ usb-pid=2c17 usb-vid=3f0 wifi-config=0 @@ -520,7 +482,7 @@ index 9dfcf3d..9da0acd 100644 [hp_laserjet_cp1025nw] align-type=0 clean-type=0 -@@ -18466,6 +18882,49 @@ usb-pid=3011 +@@ -18468,6 +18884,49 @@ usb-pid=3011 usb-vid=3f0 wifi-config=0 @@ -570,15 +532,48 @@ index 9dfcf3d..9da0acd 100644 [hp_laserjet_professional_p1102] align-type=0 clean-type=0 -diff --git a/prnt/drv/hpcups.drv.in b/prnt/drv/hpcups.drv.in -index 335b3da..d7a1872 100644 ---- a/prnt/drv/hpcups.drv.in -+++ b/prnt/drv/hpcups.drv.in -@@ -22258,6 +22258,14 @@ Group "RLT/HP Real Life Technologies" - Attribute "Product" "" "(HP LaserJet Professional p1102 Printer)" +diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in +--- hplip-3.20.6/Makefile.in.missing-drivers 2020-06-09 13:23:20.000000000 +0200 ++++ hplip-3.20.6/Makefile.in 2020-06-17 13:49:39.110952720 +0200 +@@ -1571,6 +1571,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase + ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ + ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ + ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ ++ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ + ppd/hpcups/hp-laserjet_m1005.ppd.gz \ + ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ + ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ +@@ -1685,6 +1686,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase + ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ + ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ + ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ ++ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ + ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ + ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ + ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \ +@@ -3961,6 +3963,7 @@ dist_unrel_DATA = + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ ++@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ +@@ -4074,6 +4077,7 @@ dist_unrel_DATA = + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ ++@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ +diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/drv/hpcups.drv.in +--- hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers 2020-06-17 13:49:39.009953663 +0200 ++++ hplip-3.20.6/prnt/drv/hpcups.drv.in 2020-06-17 13:51:49.576733820 +0200 +@@ -22319,6 +22319,14 @@ Group "RLT/HP Real Life Technologies" Attribute "Product" "" "(HP LaserJet Professional p1102s Printer)" } -+ { + { + ModelName "HP LaserJet Professional p1102w" + Attribute "NickName" "" "HP LaserJet Professional p1102w, hpcups $Version, requires proprietary plugin" + Attribute "ShortNickName" "" "HP LaserJet Professional p1102w hpijs" @@ -586,10 +581,11 @@ index 335b3da..d7a1872 100644 + PCFileName "hp-laserjet_professional_p1102w.ppd" + Attribute "Product" "" "(HP LaserJet Professional p1102w Printer)" + } - { ++ { ModelName "HP LaserJet Professional p1106" - Attribute "NickName" "" "HP LaserJet Professional p1106, hpcups $Version, requires proprietary plugin" -@@ -22692,6 +22700,14 @@ Group "RLT/HP Real Life Technologies" + Attribute "NickName" "" "HP LaserJet Professional p1106, hpcups $Version" + Attribute "ShortNickName" "" "HP LJ Pro p1106 hpijs" +@@ -22752,6 +22760,14 @@ Group "RLT/HP Real Life Technologies" PCFileName "hp-laserjet_cp1025nw.ppd" Attribute "Product" "" "(HP LaserJet Pro cp1025nw Color Printer Series)" } diff --git a/hplip.spec b/hplip.spec index e1bd587..429cf43 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.5 -Release: 6%{?dist} +Version: 3.20.6 +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 @@ -152,6 +152,10 @@ Patch54: hplip-find-driver.patch # bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308 # reported upstream https://bugs.launchpad.net/hplip/+bug/1882193 Patch55: hplip-clean-ldl.patch +# 3.20.6 turned off requirement for most devices which needed it +# - it will cause malfunction of printing and scanning for them +# https://bugs.launchpad.net/hplip/+bug/1883898 +Patch56: hplip-revert-plugins.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -420,6 +424,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch54 -p1 -b .find-driver # 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error %patch55 -p1 -b .clean-ldl +%patch56 -p1 -b .revert-plugins sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -720,6 +725,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jun 17 2020 Zdenek Dohnal - 3.20.6-1 +- 3.20.6 + * Tue Jun 16 2020 Zdenek Dohnal - 3.20.5-6 - remove the check for scripts which are only in hplip-gui diff --git a/sources b/sources index ca7c599..cffcc78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.20.5.tar.gz) = fce3c7b8a2f3b0d2875bafd2ff65a3312fae867b658cd45eea16d9f3663646b6b0b70b58e6c2b46eb24627cdeefb318b6ca9ccf5a0e9790ff19519518992da07 +SHA512 (hplip-3.20.6.tar.gz) = 6a5ce55465e3a537ecc0b6e7d198835dbe495e191522e674a507a4993e2061da3ea084a5239a74b2279c065c0775067d5b6a4aeb2a7791825106a299fb55e8f8 From c8c103d91cb99aa20ef99ef26a40af0d06c047f7 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 18 Jun 2020 13:28:47 +0200 Subject: [PATCH 028/166] 3.20.6 --- hplip-revert-plugins.patch | 1312 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1312 insertions(+) create mode 100644 hplip-revert-plugins.patch diff --git a/hplip-revert-plugins.patch b/hplip-revert-plugins.patch new file mode 100644 index 0000000..bc54c15 --- /dev/null +++ b/hplip-revert-plugins.patch @@ -0,0 +1,1312 @@ +diff --git a/data/models/models.dat b/data/models/models.dat +index 85485636e..3a430e250 100644 +--- a/data/models/models.dat ++++ b/data/models/models.dat +@@ -2131,7 +2131,7 @@ ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=64 + power-settings=0 + pq-diag-type=0 +@@ -3913,8 +3913,8 @@ model1=HP LaserJet Pro 200 color MFP M276nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -3967,8 +3967,8 @@ model1=HP LaserJet 200 Color MFP M275s + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4021,8 +4021,8 @@ model1=HP LaserJet 200 Color MFP M275u + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4075,8 +4075,8 @@ model1=HP LaserJet 200 Color MFP M275t + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4128,8 +4128,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4181,8 +4181,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4234,8 +4234,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4288,8 +4288,8 @@ model1=HP LaserJet Pro 200 color MFP M276n + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4341,8 +4341,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4394,8 +4394,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4447,8 +4447,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4500,8 +4500,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4553,8 +4553,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4606,8 +4606,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4659,8 +4659,8 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -4713,8 +4713,8 @@ model1=HP LaserJet 200 Color MFP M275nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -5850,7 +5850,7 @@ model1=HP LaserJet Pro MFP M225rdn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=2112 + power-settings=0 + ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd +@@ -5893,7 +5893,7 @@ model1=HP LaserJet Pro MFP M225dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=2112 + power-settings=0 + ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd +@@ -5934,7 +5934,7 @@ model1=HP LaserJet Pro MFP M225dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=2112 + power-settings=0 + ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd +@@ -5975,7 +5975,7 @@ model1=HP LaserJet Pro MFP M226dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=2112 + power-settings=0 + ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd +@@ -6017,7 +6017,7 @@ model1=HP LaserJet Pro MFP M226dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=2112 + power-settings=0 + ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd +@@ -6466,8 +6466,8 @@ model1=HP LaserJet 300 Color MFP M375nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -7863,8 +7863,8 @@ model1=HP LaserJet 400 Color MFP M475dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -8007,8 +8007,8 @@ model1=HP LaserJet 400 MFP M425dw + monitor-type=1 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_400_mfp_m425-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -8052,8 +8052,8 @@ model1=HP Laserjet 400 MFP M425dn + monitor-type=1 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_400_mfp_m425-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -8440,8 +8440,8 @@ model1=HP LaserJet 400 Color MFP M475dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -8751,8 +8751,8 @@ model1=HP LaserJet Pro MFP M435nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -9374,8 +9374,8 @@ model1=HP Color Laserjet Pro MFP M476dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -9416,8 +9416,8 @@ model1=HP Color Laserjet Pro MFP M476nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -9458,8 +9458,8 @@ model1=HP Color Laserjet Pro MFP M476dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -9754,8 +9754,8 @@ model1=HP LaserJet Pro 500 color MFP M570dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_500_color_mfp_m570-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -9808,8 +9808,8 @@ model1=HP LaserJet Pro 500 color MFP M570dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_500_color_mfp_m570-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -10383,8 +10383,8 @@ model1=HP LaserJet Pro M521dn Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_mfp_m521-ps.ppd + family-ppd=hp-postscript-laserjet.ppd +@@ -10428,8 +10428,8 @@ model1=HP LaserJet Pro M521dw Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_mfp_m521-ps.ppd + family-ppd=hp-postscript-laserjet.ppd +@@ -16911,7 +16911,7 @@ model1=HP LaserJet 1000 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17091,7 +17091,7 @@ model1=HP LaserJet 1005 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17131,7 +17131,7 @@ model1=HP LaserJet P1005 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17174,7 +17174,7 @@ model1=HP LaserJet M1005 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -17217,7 +17217,7 @@ model1=HP LaserJet P1006 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17260,7 +17260,7 @@ model1=HP LaserJet P1007 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17303,7 +17303,7 @@ model1=HP LaserJet P1008 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17346,7 +17346,7 @@ model1=HP LaserJet P1009 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17563,8 +17563,8 @@ model1=HP Color LaserJet CM1015 Multifunction Printer + monitor-type=0 + panel-check-type=1 + pcard-type=2 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -17615,8 +17615,8 @@ model1=HP Color LaserJet CM1017 Multifunction Printer + monitor-type=0 + panel-check-type=1 + pcard-type=2 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -17668,7 +17668,7 @@ model2=HP LaserJet 1018s Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17712,7 +17712,7 @@ model2=HP LaserJet 1020 Plus Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17885,7 +17885,7 @@ model1=HP LaserJet Pro CP1025nw Color Printer Series + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -17937,7 +17937,7 @@ model1=HP LaserJet Pro CP1025 Color Printer Series + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18487,7 +18487,7 @@ model2=HP Laserjet Professional P1102s Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18530,7 +18530,7 @@ model1=HP LaserJet Professional P 1102w Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18573,7 +18573,7 @@ model1=HP Laserjet Professional P1106w Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18616,7 +18616,7 @@ model1=HP Laserjet Professional P1106 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18659,7 +18659,7 @@ model1=HP LaserJet Professional P1107 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18702,7 +18702,7 @@ model1=HP LaserJet Professional P1107w Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18745,7 +18745,7 @@ model1=HP Laserjet Professional P1108w Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18788,7 +18788,7 @@ model1=HP Laserjet Professional P1108 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18831,7 +18831,7 @@ model1=HP LaserJet Professional P1109w Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -18874,7 +18874,7 @@ model1=HP LaserJet Professional P1109 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19091,7 +19091,7 @@ model1=HP LaserJet M1120 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19134,7 +19134,7 @@ model1=HP LaserJet M1120n Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19224,7 +19224,7 @@ model2=HP LaserJet Professional M1132s Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19267,7 +19267,7 @@ model1=HP Laserjet Professional M1136 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19310,7 +19310,7 @@ model1=HP LaserJet Professional M1137 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19353,7 +19353,7 @@ model1=HP LaserJet Professional M1138 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19396,7 +19396,7 @@ model1=HP LaserJet Professional M1139 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -19988,7 +19988,7 @@ model1=HP LaserJet Professional M1212nf Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20031,7 +20031,7 @@ model1=HP LaserJet Professional M1213nf Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20074,7 +20074,7 @@ model1=HP LaserJet Professional M1214nfh Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20117,7 +20117,7 @@ model1=HP Color LaserJet CP1215 Printer + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -20216,7 +20216,7 @@ model1=HP LaserJet Professional M1216nfh MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20259,7 +20259,7 @@ model1=HP Color LaserJet CP1217 Printer + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -20311,7 +20311,7 @@ model1=HP LaserJet Professional M1217nfW Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20354,7 +20354,7 @@ model1=HP Laserjet M1210 MFP Series + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20444,7 +20444,7 @@ model1=HP HotSpot LaserJet Pro M1218nfs MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20486,7 +20486,7 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20528,7 +20528,7 @@ linefeed-cal-type=0 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -20571,7 +20571,7 @@ model1=HP LaserJet Professional M1219nf MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -21235,8 +21235,8 @@ model1=HP Color LaserJet CM1312nfi Multifunction Printer + monitor-type=0 + panel-check-type=1 + pcard-type=2 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -21287,8 +21287,8 @@ model1=HP Color LaserJet CM1312 Multifunction Printer + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -21385,7 +21385,7 @@ model1=HP LaserJet M1319f Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -21861,8 +21861,8 @@ model1=HP LaserJet Professional CM1411fn + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -21914,8 +21914,8 @@ model1=HP LaserJet Professional CM1412fn + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -21967,8 +21967,8 @@ model1=HP LaserJet Professional CM1413fn + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22020,8 +22020,8 @@ model1=HP LaserJet Professional CM1415fn + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22073,8 +22073,8 @@ model1=HP LaserJet Professional CM1415fnw + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22126,8 +22126,8 @@ model1=HP LaserJet Professional CM1416fnw + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22179,8 +22179,8 @@ model1=HP LaserJet Professional CM1417fnw + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22232,8 +22232,8 @@ model1=HP LaserJet Professional CM1418fnw + monitor-type=0 + panel-check-type=1 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_cm1410_series-ps.ppd + pq-diag-type=0 +@@ -22619,7 +22619,7 @@ model1=HP LaserJet P1505 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -22921,8 +22921,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -23019,8 +23019,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -23063,8 +23063,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -23430,8 +23430,8 @@ model1=HP LaserJet M1536dnf MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd + family-ppd=hp-postscript-laserjet.ppd +@@ -23475,8 +23475,8 @@ model1=HP LaserJet M1537dnf MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd + pq-diag-type=0 +@@ -23519,8 +23519,8 @@ model1=HP LaserJet M1538dnf MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd + pq-diag-type=0 +@@ -23563,8 +23563,8 @@ model1=HP LaserJet M1539dnf MFP + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd + pq-diag-type=0 +@@ -23607,7 +23607,7 @@ model1=HP LaserJet Professional P1566 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -23650,7 +23650,7 @@ model1=HP LaserJet Professional P1567 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -23693,7 +23693,7 @@ model1=HP LaserJet Professional P1568 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -23736,7 +23736,7 @@ model1=HP LaserJet Professional P1569 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -24132,7 +24132,7 @@ model1=HP Color LaserJet 1600 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -24172,7 +24172,7 @@ model1=HP LaserJet Professional P1606dn Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -24215,7 +24215,7 @@ model1=HP LaserJet Professional P1607dn Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -24258,7 +24258,7 @@ model1=HP LaserJet Professional P1608dn Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -24301,7 +24301,7 @@ model1=HP LaserJet Professional P1609dn Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -25254,7 +25254,7 @@ model1=HP LaserJet P2035n Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -25297,7 +25297,7 @@ model1=HP LaserJet P2035 Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -26939,8 +26939,8 @@ model1=HP Color LaserJet CM2320 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -26991,8 +26991,8 @@ model1=HP Color LaserJet CM2320nf Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -27043,8 +27043,8 @@ model1=HP Color LaserJet CM2320fxi Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -27095,8 +27095,8 @@ model1=HP Color LaserJet CM2320n Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -28453,7 +28453,7 @@ model1=HP Color LaserJet 2600n Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -29353,8 +29353,8 @@ model1=HP LaserJet M2727 Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd + pq-diag-type=0 +@@ -29397,8 +29397,8 @@ model1=HP LaserJet M2727nfs Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd + pq-diag-type=0 +@@ -29441,8 +29441,8 @@ model1=HP LaserJet M2727nf Multifunction Printer + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd + family-ppd=hp-postscript-laserjet.ppd +@@ -52679,8 +52679,8 @@ model1=HP Color LaserJet MFP M277n + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_mfp_m277 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -52733,8 +52733,8 @@ model1=HP Color LaserJet MFP M277dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m277 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -53474,8 +53474,8 @@ model1=HP Color LaserJet Pro MFP M274n + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_mfp_m274-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54257,8 +54257,8 @@ model1=HP Laserjet Pro MFP M426fdn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=laserjet_mfp_m426_m427 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54302,8 +54302,8 @@ model1=HP Laserjet Pro MFP M426fdw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=laserjet_mfp_m426_m427 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54347,8 +54347,8 @@ model1=HP Laserjet Pro MFP M427dn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=laserjet_mfp_m426_m427 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54392,8 +54392,8 @@ model1=HP Laserjet Pro MFP M427fdw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=laserjet_mfp_m426_m427 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54437,8 +54437,8 @@ model1=HP Laserjet Pro MFP M426dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=laserjet_mfp_m426_m427 + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54482,8 +54482,8 @@ model1=HP Laserjet Pro MFP M427dw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-laserjet_mfp_m426_m427-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54812,8 +54812,8 @@ model1=HP Color Laserjet Pro MFP M477 fnw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m477-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54854,8 +54854,8 @@ model1=HP Color Laserjet Pro MFP M477 fdn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=color_laserjet_pro_mfp_m477d + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -54896,8 +54896,8 @@ model1=HP Color Laserjet Pro MFP M477 fdw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m477d-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -56054,8 +56054,8 @@ model1=HP Color Laserjet MFP M377 fnw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m377-ps.ppd + family-ppd=hp-postscript-laserjet-pro.ppd +@@ -57016,8 +57016,8 @@ model1=HP Color LaserJet MFP M277c6 + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + ppd-name=hp-color_laserjet_pro_mfp_m277-ps.ppd + pq-diag-type=0 From e59c9e00581626326686760f70c4bb01e4540ec1 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 23 Jun 2020 15:22:19 +0200 Subject: [PATCH 029/166] appdata.xml needs to be in %%{_datadir}/metainfo --- hplip.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hplip.spec b/hplip.spec index 429cf43..4d8c9b7 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 1%{?dist} +Release: 2%{?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 @@ -507,8 +507,8 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd -mkdir -p %{buildroot}%{_datadir}/appdata -cp %{SOURCE3} %{buildroot}%{_datadir}/appdata/ +mkdir -p %{buildroot}%{_datadir}/metainfo +cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/16x16/hp_logo.png \ @@ -531,7 +531,7 @@ desktop-file-install \ --add-category HardwareSettings \ hplip.desktop -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml # install hp-uiscan desktop file sed -i 's/\/usr\/share\/icons\/Humanity\/devices\/48\/printer\.svg/hp_logo/' hp-uiscan.desktop @@ -700,7 +700,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-uiscan %{_bindir}/hp-wificonfig %{_datadir}/applications/*.desktop -%{_datadir}/appdata/hplip.appdata.xml +%{_datadir}/metainfo/hplip.appdata.xml # Files %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/hplip/check.py* @@ -725,6 +725,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jun 23 2020 Zdenek Dohnal - 3.20.6-2 +- appdata.xml needs to be in %%{_datadir}/metainfo + * Wed Jun 17 2020 Zdenek Dohnal - 3.20.6-1 - 3.20.6 From 6e28c1cddf05fbc4bb6846721deb263764c8566d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Jul 2020 20:10:03 +0000 Subject: [PATCH 030/166] Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro --- hplip.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hplip.spec b/hplip.spec index 4d8c9b7..638e0a1 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 2%{?dist} +Release: 3%{?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 @@ -458,12 +458,12 @@ autoreconf --verbose --force --install --enable-hpijs-install \ --disable-policykit --with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3} -make %{?_smp_mflags} +%make_build %install mkdir -p %{buildroot}%{_bindir} -make install DESTDIR=%{buildroot} PYTHON=%{__python3} +%make_install PYTHON=%{__python3} # Create /run/hplip & /var/lib/hp mkdir -p %{buildroot}/run/hplip @@ -725,6 +725,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jul 13 2020 Tom Stellard - 3.20.6-3 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + * Tue Jun 23 2020 Zdenek Dohnal - 3.20.6-2 - appdata.xml needs to be in %%{_datadir}/metainfo From aecb84c039225c66f3be79e045daf2d454134d13 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 00:57:51 +0000 Subject: [PATCH 031/166] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 638e0a1..da9e433 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 3%{?dist} +Release: 4%{?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 @@ -725,6 +725,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 3.20.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Jul 13 2020 Tom Stellard - 3.20.6-3 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From 9f437c9892853f073d56cc1c733beda012e5047d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 29 Jul 2020 07:28:29 +0200 Subject: [PATCH 032/166] 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() --- hplip-thread-isalive-removed.patch | 93 ++++++++++++++++++++++++++++++ hplip.spec | 12 +++- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 hplip-thread-isalive-removed.patch diff --git a/hplip-thread-isalive-removed.patch b/hplip-thread-isalive-removed.patch new file mode 100644 index 0000000..080b8fd --- /dev/null +++ b/hplip-thread-isalive-removed.patch @@ -0,0 +1,93 @@ +diff --git a/copier/copier.py b/copier/copier.py +index a595baa..7794f48 100644 +--- a/copier/copier.py ++++ b/copier/copier.py +@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device): + + def isCopyActive(self): + if self.copy_thread is not None: +- return self.copy_thread.isAlive() ++ return self.copy_thread.is_alive() + else: + return False + + def waitForCopyThread(self): + if self.copy_thread is not None and \ +- self.copy_thread.isAlive(): ++ self.copy_thread.is_alive(): + + self.copy_thread.join() + +diff --git a/fax/fax.py b/fax/fax.py +index 3d69226..0878a64 100644 +--- a/fax/fax.py ++++ b/fax/fax.py +@@ -478,13 +478,13 @@ class FaxDevice(device.Device): + + def isSendFaxActive(self): + if self.send_fax_thread is not None: +- return self.send_fax_thread.isAlive() ++ return self.send_fax_thread.is_alive() + else: + return False + + def waitForSendFaxThread(self): + if self.send_fax_thread is not None and \ +- self.send_fax_thread.isAlive(): ++ self.send_fax_thread.is_alive(): + + try: + self.send_fax_thread.join() +diff --git a/fax/pmlfax.py b/fax/pmlfax.py +index b68ff6a..b1020d0 100644 +--- a/fax/pmlfax.py ++++ b/fax/pmlfax.py +@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice): + + def isUploadLogActive(self): + if self.upload_log_thread is not None: +- return self.upload_log_thread.isAlive() ++ return self.upload_log_thread.is_alive() + else: + return False + + def waitForUploadLogThread(self): + if self.upload_log_thread is not None and \ +- self.upload_log_thread.isAlive(): ++ self.upload_log_thread.is_alive(): + + self.upload_log_thread.join() + +diff --git a/scan/sane.py b/scan/sane.py +index b6c4acd..e8f8db8 100755 +--- a/scan/sane.py ++++ b/scan/sane.py +@@ -378,14 +378,14 @@ class ScanDevice: + + def isScanActive(self): + if self.scan_thread is not None: +- return self.scan_thread.isAlive() and self.scan_thread.scan_active ++ return self.scan_thread.is_alive() and self.scan_thread.scan_active + else: + return False + + + def waitForScanDone(self): + if self.scan_thread is not None and \ +- self.scan_thread.isAlive() and \ ++ self.scan_thread.is_alive() and \ + self.scan_thread.scan_active: + + try: +@@ -398,9 +398,9 @@ class ScanDevice: + #time.sleep(0.5) + if self.scan_thread is not None: + while True: +- #print self.scan_thread.isAlive() ++ #print self.scan_thread.is_alive() + #print self.scan_thread.scan_active +- if self.scan_thread.isAlive() and \ ++ if self.scan_thread.is_alive() and \ + self.scan_thread.scan_active: + return + diff --git a/hplip.spec b/hplip.spec index da9e433..81bc10c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 4%{?dist} +Release: 5%{?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 @@ -156,6 +156,11 @@ Patch55: hplip-clean-ldl.patch # - it will cause malfunction of printing and scanning for them # https://bugs.launchpad.net/hplip/+bug/1883898 Patch56: hplip-revert-plugins.patch +# python3.9 removes threading.Thread.isAlive() and it is substituted +# by threading.Thread.is_alive() +# https://bugzilla.redhat.com/show_bug.cgi?id=1861055 +# reported upstream https://bugs.launchpad.net/fedora/+bug/1889280 +Patch57: hplip-thread-isalive-removed.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -425,6 +430,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h # 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error %patch55 -p1 -b .clean-ldl %patch56 -p1 -b .revert-plugins +# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() +%patch57 -p1 -b .thread-isalive-removed sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -725,6 +732,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 28 2020 Zdenek Dohnal - 3.20.6-5 +- 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() + * Tue Jul 28 2020 Fedora Release Engineering - 3.20.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 431609f643ad601c4c22dcbc0b54a38c1bbcb4b6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 03:28:34 +0000 Subject: [PATCH 033/166] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 81bc10c..0bf5b34 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 5%{?dist} +Release: 6%{?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 @@ -732,6 +732,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 3.20.6-6 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 28 2020 Zdenek Dohnal - 3.20.6-5 - 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() From 8f59268dca9e91cb53c93a26d71fd16c9d84b1f0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 5 Aug 2020 09:30:34 +0200 Subject: [PATCH 034/166] don't build gui for newer RHELs --- hplip.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 0bf5b34..98a4838 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 6%{?dist} +Release: 7%{?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 @@ -230,6 +230,7 @@ Requires: python3 %description libs Libraries needed by HPLIP. +%if 0%{?rhel} <= 8 || 0%{?fedora} %package gui Summary: HPLIP graphical tools License: BSD @@ -243,6 +244,7 @@ Requires: libsane-hpaio%{?_isa} = %{version}-%{release} %description gui HPLIP graphical tools. +%endif %package -n libsane-hpaio Summary: SANE driver for scanners in HP's multi-function devices @@ -525,6 +527,7 @@ install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \ install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \ %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png +%if 0%{?rhel} <= 8 || 0%{?fedora} mkdir -p %{buildroot}%{_datadir}/applications sed -i -e '/^Categories=/d' hplip.desktop # Encoding key is deprecated @@ -551,6 +554,7 @@ desktop-file-install \ --add-category Scanning \ --add-category Application \ hp-uiscan.desktop +%endif # Regenerate hpcups PPDs on upgrade if necessary (bug #579355). install -p -m755 %{SOURCE1} %{buildroot}%{_bindir}/hpcups-update-ppds @@ -694,6 +698,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop # Python extension %{python3_sitearch}/* +%if 0%{?rhel} <= 8 || 0%{?fedora} %files gui %{_bindir}/hp-check %{_bindir}/hp-devicesettings @@ -724,6 +729,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop # Directories %{_datadir}/hplip/data/images %{_datadir}/hplip/ui5 +%endif %files -n libsane-hpaio %{_libdir}/sane/libsane-*.so @@ -732,6 +738,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Aug 05 2020 Zdenek Dohnal - 3.20.6-7 +- don't build gui for newer RHELs + * Sat Aug 01 2020 Fedora Release Engineering - 3.20.6-6 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 80149bea9461af308b193d4a7189b4422298c7e5 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 24 Aug 2020 12:18:11 +0200 Subject: [PATCH 035/166] typo in hplip-model-mismatch.patch causes regression for 1772698 --- hplip-model-mismatch.patch | 14 ++++++++------ hplip.spec | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hplip-model-mismatch.patch b/hplip-model-mismatch.patch index 9b416f8..594f205 100644 --- a/hplip-model-mismatch.patch +++ b/hplip-model-mismatch.patch @@ -26,7 +26,7 @@ index 20df27a..7ed4918 100644 { stat = HPMUD_R_INVALID_URI; /* different device plugged in */ diff --git a/io/hpmud/model.c b/io/hpmud/model.c -index d546ec1..5bb6091 100644 +index d546ec1..d1809a9 100644 --- a/io/hpmud/model.c +++ b/io/hpmud/model.c @@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * @@ -41,22 +41,24 @@ index d546ec1..5bb6091 100644 if ((fp = fopen(datFile, "r")) == NULL) goto bugout; -@@ -422,10 +425,16 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * +@@ -420,12 +423,18 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * + if (rcbuf[0] == '[') + { strncpy(section, rcbuf+1, sizeof(section)); /* found new section */ - n = strlen(section); +- n = strlen(section); section[n-2]=0; /* remove ']' and CR */ -- if (strcasecmp(model, section) == 0 || ++ n = strlen(section); + if (strcasecmp(model, section) == 0 || - (section[0] == 'h' && section[1] == 'p' && - section[2] == '_' && - strcasecmp(model, section + 3) == 0)) -+ if ((strcasecmp(model, section) == 0) || + (section[0] == 'h' && + section[1] == 'p' && + section[2] == '_' && + strcasecmp(model, section + 3) == 0) || + (n > model_len && + strncasecmp(section, model, model_len) == 0 && -+ strncasecmp(section + model_len, "_series", strlen("_series") == 0) ++ strncasecmp(section + model_len, "_series", strlen("_series")) == 0 + ) + ) { diff --git a/hplip.spec b/hplip.spec index 98a4838..62b8a3c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 7%{?dist} +Release: 8%{?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 @@ -738,6 +738,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Aug 24 2020 Zdenek Dohnal - 3.20.6-8 +- typo in hplip-model-mismatch.patch causes regression for 1772698 + * Wed Aug 05 2020 Zdenek Dohnal - 3.20.6-7 - don't build gui for newer RHELs From 61d7a0bd9dbdcec73b7c042b0273a82d21fe163e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 25 Aug 2020 11:34:55 +0200 Subject: [PATCH 036/166] 1772698 - dont use uninitialized value as an index --- hplip-model-mismatch.patch | 10 ++++------ hplip.spec | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hplip-model-mismatch.patch b/hplip-model-mismatch.patch index 594f205..1dbe3c0 100644 --- a/hplip-model-mismatch.patch +++ b/hplip-model-mismatch.patch @@ -26,7 +26,7 @@ index 20df27a..7ed4918 100644 { stat = HPMUD_R_INVALID_URI; /* different device plugged in */ diff --git a/io/hpmud/model.c b/io/hpmud/model.c -index d546ec1..d1809a9 100644 +index d546ec1..adb3d87 100644 --- a/io/hpmud/model.c +++ b/io/hpmud/model.c @@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * @@ -41,13 +41,11 @@ index d546ec1..d1809a9 100644 if ((fp = fopen(datFile, "r")) == NULL) goto bugout; -@@ -420,12 +423,18 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * - if (rcbuf[0] == '[') - { +@@ -422,10 +425,17 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * strncpy(section, rcbuf+1, sizeof(section)); /* found new section */ -- n = strlen(section); + n = strlen(section); section[n-2]=0; /* remove ']' and CR */ -+ n = strlen(section); ++ n -= 2; if (strcasecmp(model, section) == 0 || - (section[0] == 'h' && section[1] == 'p' && - section[2] == '_' && diff --git a/hplip.spec b/hplip.spec index 62b8a3c..b0ce568 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 8%{?dist} +Release: 9%{?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 @@ -738,6 +738,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Aug 25 2020 Zdenek Dohnal - 3.20.6-9 +- 1772698 - dont use uninitialized value as an index + * Mon Aug 24 2020 Zdenek Dohnal - 3.20.6-8 - typo in hplip-model-mismatch.patch causes regression for 1772698 From 7932099ed7bf64ddcb1bdbe44a2abc92cba53906 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 25 Aug 2020 15:22:49 +0200 Subject: [PATCH 037/166] fix eln build - remove unpackaged files --- hplip.spec | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index b0ce568..c498f78 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 9%{?dist} +Release: 10%{?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 @@ -516,6 +516,36 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd +%if 0%{?rhel} > 8 +rm -rf %{buildroot}%{_bindir}/hp-check \ + %{buildroot}%{_bindir}/hp-devicesettings \ + %{buildroot}%{_bindir}/hp-faxsetup \ + %{buildroot}%{_bindir}/hp-linefeedcal \ + %{buildroot}%{_bindir}/hp-makecopies \ + %{buildroot}%{_bindir}/hp-print \ + %{buildroot}%{_bindir}/hp-printsettings \ + %{buildroot}%{_bindir}/hp-systray \ + %{buildroot}%{_bindir}/hp-toolbox \ + %{buildroot}%{_bindir}/hp-uiscan \ + %{buildroot}%{_bindir}/hp-wificonfig \ + %{buildroot}%{_datadir}/applications/*.desktop \ + %{buildroot}%{_datadir}/metainfo/hplip.appdata.xml \ + %{buildroot}%{_datadir}/icons/hicolor/*/apps/* \ + %{buildroot}%{_datadir}/hplip/check.py* \ + %{buildroot}%{_datadir}/hplip/devicesettings.py* \ + %{buildroot}%{_datadir}/hplip/faxsetup.py* \ + %{buildroot}%{_datadir}/hplip/linefeedcal.py* \ + %{buildroot}%{_datadir}/hplip/makecopies.py* \ + %{buildroot}%{_datadir}/hplip/print.py* \ + %{buildroot}%{_datadir}/hplip/printsettings.py* \ + %{buildroot}%{_datadir}/hplip/systray.py* \ + %{buildroot}%{_datadir}/hplip/toolbox.py* \ + %{buildroot}%{_datadir}/hplip/uiscan.py* \ + %{buildroot}%{_datadir}/hplip/wificonfig.py* \ + %{buildroot}%{_datadir}/hplip/data/images \ + %{buildroot}%{_datadir}/hplip/ui5 +%endif + mkdir -p %{buildroot}%{_datadir}/metainfo cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/ @@ -738,6 +768,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Aug 25 2020 Zdenek Dohnal - 3.20.6-10 +- fix eln build - remove unpackaged files + * Tue Aug 25 2020 Zdenek Dohnal - 3.20.6-9 - 1772698 - dont use uninitialized value as an index From 63b9a8e1311256ec96005ea02dd4df3a97e0dddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Thu, 27 Aug 2020 13:50:17 +0200 Subject: [PATCH 038/166] Rebuilt for new net-snmp release --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index c498f78..84a6bae 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 10%{?dist} +Release: 11%{?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 @@ -768,6 +768,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Aug 27 2020 Josef Ridky - 3.20.6-11 +- Rebuilt for new net-snmp release + * Tue Aug 25 2020 Zdenek Dohnal - 3.20.6-10 - fix eln build - remove unpackaged files From 394e7d6500b78d76a3089a188bd27b8509d31f2e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 15 Sep 2020 08:08:58 +0200 Subject: [PATCH 039/166] move ifdef for removing hplip-gui a little in install phase --- hplip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 84a6bae..078079d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 11%{?dist} +Release: 12%{?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 @@ -546,6 +546,7 @@ rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_datadir}/hplip/ui5 %endif +%if 0%{?rhel} <= 8 || 0%{?fedora} mkdir -p %{buildroot}%{_datadir}/metainfo cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/ @@ -557,7 +558,6 @@ install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \ install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \ %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png -%if 0%{?rhel} <= 8 || 0%{?fedora} mkdir -p %{buildroot}%{_datadir}/applications sed -i -e '/^Categories=/d' hplip.desktop # Encoding key is deprecated @@ -768,6 +768,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Sep 11 2020 Zdenek Dohnal - 3.20.6-12 +- move ifdef for removing hplip-gui a little in install phase + * Thu Aug 27 2020 Josef Ridky - 3.20.6-11 - Rebuilt for new net-snmp release From 43a26f09d8738ccfdd8ea0bffb0767587ffad057 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 30 Sep 2020 08:29:28 +0200 Subject: [PATCH 040/166] fix bashisms in hplip-configure-python.patch thanks for Daniel Pielmeier from Gentoo for review --- hplip-configure-python.patch | 4 ++-- hplip.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hplip-configure-python.patch b/hplip-configure-python.patch index b119212..0f6b713 100644 --- a/hplip-configure-python.patch +++ b/hplip-configure-python.patch @@ -20,12 +20,12 @@ index 9e330e3..e4a254e 100755 +AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)]) + +PYTHON_INCLUDES=`$python3_config_path --includes` -+if test "X$PYTHON_INCLUDES" == "X" ; then ++if test "X$PYTHON_INCLUDES" = "X" ; then + AC_MSG_ERROR([Cannot get Python includes via python3-config], 6) +fi + +PYTHON_LIBS=`$python3_config_path --libs` -+if test "X$PYTHON_LIBS" == "X" ; then ++if test "X$PYTHON_LIBS" = "X" ; then + AC_MSG_ERROR([Cannot get Python libs via python3-config], 6) +fi + diff --git a/hplip.spec b/hplip.spec index 078079d..a520d1f 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.6 -Release: 12%{?dist} +Release: 13%{?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 @@ -768,6 +768,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Sep 30 2020 Zdenek Dohnal - 3.20.6-13 +- fix bashisms in hplip-configure-python.patch +- thanks for Daniel Pielmeier from Gentoo for review + * Fri Sep 11 2020 Zdenek Dohnal - 3.20.6-12 - move ifdef for removing hplip-gui a little in install phase From 2f3766463997c20ea1472fb32f329b760155d312 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 2 Oct 2020 10:09:08 +0200 Subject: [PATCH 041/166] 3.20.9 --- .gitignore | 1 + hplip-3.18.6.tar.gz.asc | 7 - hplip-3.20.9.tar.gz.asc | 7 + hplip-configure-python.patch | 16 +- hplip-covscan.patch | 27 -- hplip-revert-plugins.patch | 862 +++++++++++++++-------------------- hplip.spec | 9 +- sources | 2 +- 8 files changed, 386 insertions(+), 545 deletions(-) delete mode 100644 hplip-3.18.6.tar.gz.asc create mode 100644 hplip-3.20.9.tar.gz.asc diff --git a/.gitignore b/.gitignore index b35bdcb..fd8d283 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.3.tar.gz /hplip-3.20.5.tar.gz /hplip-3.20.6.tar.gz +/hplip-3.20.9.tar.gz diff --git a/hplip-3.18.6.tar.gz.asc b/hplip-3.18.6.tar.gz.asc deleted file mode 100644 index 8221531..0000000 --- a/hplip-3.18.6.tar.gz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iEYEABECAAYFAlsYzCYACgkQc9dwzaWQR7k3kQCgpUG6Okb3nGf7qodmI9zTBf3A -a8AAoLD0LiwifYlnEBlHS5Eaw/ylB9A8 -=H/1x ------END PGP SIGNATURE----- diff --git a/hplip-3.20.9.tar.gz.asc b/hplip-3.20.9.tar.gz.asc new file mode 100644 index 0000000..244c435 --- /dev/null +++ b/hplip-3.20.9.tar.gz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iEYEABECAAYFAl9q3H0ACgkQc9dwzaWQR7mXYwCg29C1KMe4i4oKiGBuTORPyFFD +DBIAoNsiIA+A17b4QeR4GCbRhWBEYvl5 +=OKLE +-----END PGP SIGNATURE----- diff --git a/hplip-configure-python.patch b/hplip-configure-python.patch index 0f6b713..9dc78cd 100644 --- a/hplip-configure-python.patch +++ b/hplip-configure-python.patch @@ -1,8 +1,7 @@ -diff --git a/configure.in b/configure.in -index 9e330e3..e4a254e 100755 ---- a/configure.in -+++ b/configure.in -@@ -604,20 +604,31 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu +diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in +--- hplip-3.20.9/configure.in.configure-python 2020-09-23 07:24:27.000000000 +0200 ++++ hplip-3.20.9/configure.in 2020-10-02 07:27:09.082331431 +0200 +@@ -604,17 +604,29 @@ if test "$class_driver" = "no" && test " fi fi @@ -42,11 +41,8 @@ index 9e330e3..e4a254e 100755 + LIBS="$SAVE_LIBS" fi --#CFLAGS=`(python-config --includes)` - if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then - AC_ARG_VAR([PYTHON], [Python interpreter/compiler command]) - AM_PATH_PYTHON([2.2]) -@@ -630,7 +641,6 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite + #CFLAGS=`(python-config --includes)` +@@ -631,7 +643,6 @@ if test "$class_driver" = "no" && test " AS_IF([test "x$FOUND_HEADER" != "xyes"], [AC_MSG_ERROR([cannot find python-devel support], 6)]) fi diff --git a/hplip-covscan.patch b/hplip-covscan.patch index 3ce9af1..bb6314b 100644 --- a/hplip-covscan.patch +++ b/hplip-covscan.patch @@ -233,21 +233,6 @@ index 5879a70..d246041 100644 hpwrite(buffer, strlen(buffer)); fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n"); return; -diff --git a/protocol/discovery/mdns.c b/protocol/discovery/mdns.c -index abca295..8dd6fa5 100644 ---- a/protocol/discovery/mdns.c -+++ b/protocol/discovery/mdns.c -@@ -31,6 +31,10 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include "mdns.h" - - /* Convert "www.google.com" to "3www6google3com". */ diff --git a/protocol/hp_ipp.h b/protocol/hp_ipp.h index 3853f84..de76202 100644 --- a/protocol/hp_ipp.h @@ -310,18 +295,6 @@ index af45bff..4f59b21 100644 return; } -diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c -index ae34cfb..ffde2ad 100644 ---- a/scan/sane/hpaio.c -+++ b/scan/sane/hpaio.c -@@ -41,6 +41,7 @@ - #include "soap.h" - #include "soapht.h" - #include "marvell.h" -+#include "mdns.h" - #include "hpaio.h" - #include "ledm.h" - #include "sclpml.h" diff --git a/scan/sane/http.c b/scan/sane/http.c index 800df91..45668cd 100644 --- a/scan/sane/http.c diff --git a/hplip-revert-plugins.patch b/hplip-revert-plugins.patch index bc54c15..823fb14 100644 --- a/hplip-revert-plugins.patch +++ b/hplip-revert-plugins.patch @@ -1,8 +1,7 @@ -diff --git a/data/models/models.dat b/data/models/models.dat -index 85485636e..3a430e250 100644 ---- a/data/models/models.dat -+++ b/data/models/models.dat -@@ -2131,7 +2131,7 @@ ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd +diff -up hplip-3.20.9/data/models/models.dat.revert-plugins hplip-3.20.9/data/models/models.dat +--- hplip-3.20.9/data/models/models.dat.revert-plugins 2020-10-02 07:44:26.873416731 +0200 ++++ hplip-3.20.9/data/models/models.dat 2020-10-02 08:49:32.418280169 +0200 +@@ -2123,7 +2123,7 @@ ppd-name=hp-laserjet_100_color_mfp_m175- monitor-type=0 panel-check-type=0 pcard-type=0 @@ -11,7 +10,133 @@ index 85485636e..3a430e250 100644 plugin-reason=64 power-settings=0 pq-diag-type=0 -@@ -3913,8 +3913,8 @@ model1=HP LaserJet Pro 200 color MFP M276nw +@@ -3373,7 +3373,7 @@ model1=HP LaserJet Pro MFP M125r + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3416,7 +3416,7 @@ model1=HP LaserJet Pro MFP M125s + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3459,7 +3459,7 @@ model1=HP LaserJet Pro MFP M125a + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3502,7 +3502,7 @@ model1=HP LaserJet Pro MFP M125nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3545,7 +3545,7 @@ model1=HP LaserJet Pro MFP M125rnw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3588,7 +3588,7 @@ model1=HP LaserJet Pro MFP M125nr + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3631,7 +3631,7 @@ model1=HP LaserJet Pro MFP M126a + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3674,7 +3674,7 @@ model1=HP LaserJet Pro MFP M126nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3717,7 +3717,7 @@ model1=HP LaserJet Pro MFP M127fp + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3760,7 +3760,7 @@ model1=HP LaserJet Pro MFP M127fn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3846,7 +3846,7 @@ model1=HP LaserJet Pro MFP M128fn + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3889,7 +3889,7 @@ model1=HP LaserJet Pro MFP M128fp + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -3932,7 +3932,7 @@ model1=HP LaserJet Pro MFP M128fw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -4225,7 +4225,7 @@ model1=HP Color LaserJet Pro MPF M177fw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -4277,8 +4277,8 @@ model1=HP LaserJet Pro 200 color MFP M27 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -22,7 +147,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -3967,8 +3967,8 @@ model1=HP LaserJet 200 Color MFP M275s +@@ -4331,8 +4331,8 @@ model1=HP LaserJet 200 Color MFP M275s monitor-type=0 panel-check-type=0 pcard-type=0 @@ -33,7 +158,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4021,8 +4021,8 @@ model1=HP LaserJet 200 Color MFP M275u +@@ -4385,8 +4385,8 @@ model1=HP LaserJet 200 Color MFP M275u monitor-type=0 panel-check-type=0 pcard-type=0 @@ -44,7 +169,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4075,8 +4075,8 @@ model1=HP LaserJet 200 Color MFP M275t +@@ -4439,8 +4439,8 @@ model1=HP LaserJet 200 Color MFP M275t monitor-type=0 panel-check-type=0 pcard-type=0 @@ -55,7 +180,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4128,8 +4128,8 @@ linefeed-cal-type=0 +@@ -4492,8 +4492,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -66,7 +191,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4181,8 +4181,8 @@ linefeed-cal-type=0 +@@ -4545,8 +4545,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -77,7 +202,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4234,8 +4234,8 @@ linefeed-cal-type=0 +@@ -4598,8 +4598,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -88,7 +213,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4288,8 +4288,8 @@ model1=HP LaserJet Pro 200 color MFP M276n +@@ -4652,8 +4652,8 @@ model1=HP LaserJet Pro 200 color MFP M27 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -99,7 +224,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4341,8 +4341,8 @@ linefeed-cal-type=0 +@@ -4705,8 +4705,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -110,7 +235,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4394,8 +4394,8 @@ linefeed-cal-type=0 +@@ -4758,8 +4758,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -121,7 +246,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4447,8 +4447,8 @@ linefeed-cal-type=0 +@@ -4811,8 +4811,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -132,7 +257,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4500,8 +4500,8 @@ linefeed-cal-type=0 +@@ -4864,8 +4864,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -143,7 +268,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4553,8 +4553,8 @@ linefeed-cal-type=0 +@@ -4917,8 +4917,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -154,7 +279,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4606,8 +4606,8 @@ linefeed-cal-type=0 +@@ -4970,8 +4970,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -165,7 +290,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4659,8 +4659,8 @@ linefeed-cal-type=0 +@@ -5023,8 +5023,8 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -176,7 +301,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m276-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -4713,8 +4713,8 @@ model1=HP LaserJet 200 Color MFP M275nw +@@ -5077,8 +5077,8 @@ model1=HP LaserJet 200 Color MFP M275nw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -187,7 +312,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_200_colormfp_m275-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -5850,7 +5850,7 @@ model1=HP LaserJet Pro MFP M225rdn +@@ -6214,7 +6214,7 @@ model1=HP LaserJet Pro MFP M225rdn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -196,7 +321,7 @@ index 85485636e..3a430e250 100644 plugin-reason=2112 power-settings=0 ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd -@@ -5893,7 +5893,7 @@ model1=HP LaserJet Pro MFP M225dw +@@ -6257,7 +6257,7 @@ model1=HP LaserJet Pro MFP M225dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -205,7 +330,7 @@ index 85485636e..3a430e250 100644 plugin-reason=2112 power-settings=0 ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd -@@ -5934,7 +5934,7 @@ model1=HP LaserJet Pro MFP M225dn +@@ -6298,7 +6298,7 @@ model1=HP LaserJet Pro MFP M225dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -214,7 +339,7 @@ index 85485636e..3a430e250 100644 plugin-reason=2112 power-settings=0 ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd -@@ -5975,7 +5975,7 @@ model1=HP LaserJet Pro MFP M226dw +@@ -6339,7 +6339,7 @@ model1=HP LaserJet Pro MFP M226dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -223,7 +348,7 @@ index 85485636e..3a430e250 100644 plugin-reason=2112 power-settings=0 ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd -@@ -6017,7 +6017,7 @@ model1=HP LaserJet Pro MFP M226dn +@@ -6381,7 +6381,7 @@ model1=HP LaserJet Pro MFP M226dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -232,7 +357,7 @@ index 85485636e..3a430e250 100644 plugin-reason=2112 power-settings=0 ppd-name=hp-laserjet_pro_mfp_m225_m226-ps.ppd -@@ -6466,8 +6466,8 @@ model1=HP LaserJet 300 Color MFP M375nw +@@ -6830,8 +6830,8 @@ model1=HP LaserJet 300 Color MFP M375nw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -243,7 +368,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -7863,8 +7863,8 @@ model1=HP LaserJet 400 Color MFP M475dw +@@ -8227,8 +8227,8 @@ model1=HP LaserJet 400 Color MFP M475dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -254,7 +379,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -8007,8 +8007,8 @@ model1=HP LaserJet 400 MFP M425dw +@@ -8371,8 +8371,8 @@ model1=HP LaserJet 400 MFP M425dw monitor-type=1 panel-check-type=0 pcard-type=0 @@ -265,7 +390,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_400_mfp_m425-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -8052,8 +8052,8 @@ model1=HP Laserjet 400 MFP M425dn +@@ -8416,8 +8416,8 @@ model1=HP Laserjet 400 MFP M425dn monitor-type=1 panel-check-type=0 pcard-type=0 @@ -276,7 +401,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_400_mfp_m425-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -8440,8 +8440,8 @@ model1=HP LaserJet 400 Color MFP M475dn +@@ -8804,8 +8804,8 @@ model1=HP LaserJet 400 Color MFP M475dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -287,7 +412,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-lj_300_400_color_mfp_m375_m475-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -8751,8 +8751,8 @@ model1=HP LaserJet Pro MFP M435nw +@@ -9115,8 +9115,8 @@ model1=HP LaserJet Pro MFP M435nw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -298,7 +423,7 @@ index 85485636e..3a430e250 100644 power-settings=0 pq-diag-type=0 r-type=0 -@@ -9374,8 +9374,8 @@ model1=HP Color Laserjet Pro MFP M476dw +@@ -9738,8 +9738,8 @@ model1=HP Color Laserjet Pro MFP M476dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -309,7 +434,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -9416,8 +9416,8 @@ model1=HP Color Laserjet Pro MFP M476nw +@@ -9780,8 +9780,8 @@ model1=HP Color Laserjet Pro MFP M476nw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -320,7 +445,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -9458,8 +9458,8 @@ model1=HP Color Laserjet Pro MFP M476dn +@@ -9822,8 +9822,8 @@ model1=HP Color Laserjet Pro MFP M476dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -331,7 +456,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m476-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -9754,8 +9754,8 @@ model1=HP LaserJet Pro 500 color MFP M570dw +@@ -10118,8 +10118,8 @@ model1=HP LaserJet Pro 500 color MFP M57 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -342,7 +467,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_500_color_mfp_m570-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -9808,8 +9808,8 @@ model1=HP LaserJet Pro 500 color MFP M570dn +@@ -10172,8 +10172,8 @@ model1=HP LaserJet Pro 500 color MFP M57 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -353,7 +478,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_500_color_mfp_m570-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -10383,8 +10383,8 @@ model1=HP LaserJet Pro M521dn Multifunction Printer +@@ -10747,8 +10747,8 @@ model1=HP LaserJet Pro M521dn Multifunct monitor-type=0 panel-check-type=0 pcard-type=0 @@ -364,7 +489,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_mfp_m521-ps.ppd family-ppd=hp-postscript-laserjet.ppd -@@ -10428,8 +10428,8 @@ model1=HP LaserJet Pro M521dw Multifunction Printer +@@ -10792,8 +10792,8 @@ model1=HP LaserJet Pro M521dw Multifunct monitor-type=0 panel-check-type=0 pcard-type=0 @@ -375,7 +500,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_mfp_m521-ps.ppd family-ppd=hp-postscript-laserjet.ppd -@@ -16911,7 +16911,7 @@ model1=HP LaserJet 1000 Printer +@@ -18353,7 +18353,7 @@ model1=HP LaserJet Pro CP1025 Color Prin monitor-type=0 panel-check-type=0 pcard-type=0 @@ -384,7 +509,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -17091,7 +17091,7 @@ model1=HP LaserJet 1005 Printer +@@ -18989,7 +18989,7 @@ model1=HP LaserJet Professional P 1102w monitor-type=0 panel-check-type=0 pcard-type=0 @@ -393,7 +518,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -17131,7 +17131,7 @@ model1=HP LaserJet P1005 Printer +@@ -19032,7 +19032,7 @@ model1=HP Laserjet Professional P1106w P monitor-type=0 panel-check-type=0 pcard-type=0 @@ -402,7 +527,70 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -17174,7 +17174,7 @@ model1=HP LaserJet M1005 Multifunction Printer +@@ -19075,7 +19075,7 @@ model1=HP Laserjet Professional P1106 Pr + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19118,7 +19118,7 @@ model1=HP LaserJet Professional P1107 Pr + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19161,7 +19161,7 @@ model1=HP LaserJet Professional P1107w P + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19204,7 +19204,7 @@ model1=HP Laserjet Professional P1108w P + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19247,7 +19247,7 @@ model1=HP Laserjet Professional P1108 Pr + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19290,7 +19290,7 @@ model1=HP LaserJet Professional P1109w P + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19333,7 +19333,7 @@ model1=HP LaserJet Professional P1109 Pr + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -19683,7 +19683,7 @@ model2=HP LaserJet Professional M1132s M monitor-type=0 panel-check-type=0 pcard-type=0 @@ -411,191 +599,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -17217,7 +17217,7 @@ model1=HP LaserJet P1006 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17260,7 +17260,7 @@ model1=HP LaserJet P1007 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17303,7 +17303,7 @@ model1=HP LaserJet P1008 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17346,7 +17346,7 @@ model1=HP LaserJet P1009 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17563,8 +17563,8 @@ model1=HP Color LaserJet CM1015 Multifunction Printer - monitor-type=0 - panel-check-type=1 - pcard-type=2 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -17615,8 +17615,8 @@ model1=HP Color LaserJet CM1017 Multifunction Printer - monitor-type=0 - panel-check-type=1 - pcard-type=2 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -17668,7 +17668,7 @@ model2=HP LaserJet 1018s Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17712,7 +17712,7 @@ model2=HP LaserJet 1020 Plus Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17885,7 +17885,7 @@ model1=HP LaserJet Pro CP1025nw Color Printer Series - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -17937,7 +17937,7 @@ model1=HP LaserJet Pro CP1025 Color Printer Series - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18487,7 +18487,7 @@ model2=HP Laserjet Professional P1102s Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18530,7 +18530,7 @@ model1=HP LaserJet Professional P 1102w Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18573,7 +18573,7 @@ model1=HP Laserjet Professional P1106w Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18616,7 +18616,7 @@ model1=HP Laserjet Professional P1106 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18659,7 +18659,7 @@ model1=HP LaserJet Professional P1107 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18702,7 +18702,7 @@ model1=HP LaserJet Professional P1107w Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18745,7 +18745,7 @@ model1=HP Laserjet Professional P1108w Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18788,7 +18788,7 @@ model1=HP Laserjet Professional P1108 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18831,7 +18831,7 @@ model1=HP LaserJet Professional P1109w Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -18874,7 +18874,7 @@ model1=HP LaserJet Professional P1109 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -19091,7 +19091,7 @@ model1=HP LaserJet M1120 Multifunction Printer +@@ -19726,7 +19726,7 @@ model1=HP Laserjet Professional M1136 Mu monitor-type=0 panel-check-type=0 pcard-type=0 @@ -604,7 +608,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19134,7 +19134,7 @@ model1=HP LaserJet M1120n Multifunction Printer +@@ -19769,7 +19769,7 @@ model1=HP LaserJet Professional M1137 Mu monitor-type=0 panel-check-type=0 pcard-type=0 @@ -613,7 +617,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19224,7 +19224,7 @@ model2=HP LaserJet Professional M1132s Multifunction Printer +@@ -19812,7 +19812,7 @@ model1=HP LaserJet Professional M1138 Mu monitor-type=0 panel-check-type=0 pcard-type=0 @@ -622,7 +626,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19267,7 +19267,7 @@ model1=HP Laserjet Professional M1136 Multifunction Printer +@@ -19855,7 +19855,7 @@ model1=HP LaserJet Professional M1139 Mu monitor-type=0 panel-check-type=0 pcard-type=0 @@ -631,7 +635,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19310,7 +19310,7 @@ model1=HP LaserJet Professional M1137 Multifunction Printer +@@ -20447,7 +20447,7 @@ model1=HP LaserJet Professional M1212nf monitor-type=0 panel-check-type=0 pcard-type=0 @@ -640,7 +644,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19353,7 +19353,7 @@ model1=HP LaserJet Professional M1138 Multifunction Printer +@@ -20490,7 +20490,7 @@ model1=HP LaserJet Professional M1213nf monitor-type=0 panel-check-type=0 pcard-type=0 @@ -649,7 +653,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19396,7 +19396,7 @@ model1=HP LaserJet Professional M1139 Multifunction Printer +@@ -20533,7 +20533,7 @@ model1=HP LaserJet Professional M1214nfh monitor-type=0 panel-check-type=0 pcard-type=0 @@ -658,7 +662,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -19988,7 +19988,7 @@ model1=HP LaserJet Professional M1212nf Multifunction Printer +@@ -20675,7 +20675,7 @@ model1=HP LaserJet Professional M1216nfh monitor-type=0 panel-check-type=0 pcard-type=0 @@ -667,25 +671,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20031,7 +20031,7 @@ model1=HP LaserJet Professional M1213nf Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=65 - power-settings=0 - pq-diag-type=0 -@@ -20074,7 +20074,7 @@ model1=HP LaserJet Professional M1214nfh Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=65 - power-settings=0 - pq-diag-type=0 -@@ -20117,7 +20117,7 @@ model1=HP Color LaserJet CP1215 Printer +@@ -20718,7 +20718,7 @@ model1=HP Color LaserJet CP1217 Printer monitor-type=0 panel-check-type=1 pcard-type=0 @@ -694,7 +680,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -20216,7 +20216,7 @@ model1=HP LaserJet Professional M1216nfh MFP +@@ -20813,7 +20813,7 @@ model1=HP Laserjet M1210 MFP Series monitor-type=0 panel-check-type=0 pcard-type=0 @@ -703,16 +689,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20259,7 +20259,7 @@ model1=HP Color LaserJet CP1217 Printer - monitor-type=0 - panel-check-type=1 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -20311,7 +20311,7 @@ model1=HP LaserJet Professional M1217nfW Multifunction Printer +@@ -20903,7 +20903,7 @@ model1=HP HotSpot LaserJet Pro M1218nfs monitor-type=0 panel-check-type=0 pcard-type=0 @@ -721,7 +698,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20354,7 +20354,7 @@ model1=HP Laserjet M1210 MFP Series +@@ -20945,7 +20945,7 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -730,7 +707,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20444,7 +20444,7 @@ model1=HP HotSpot LaserJet Pro M1218nfs MFP +@@ -20987,7 +20987,7 @@ linefeed-cal-type=0 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -739,7 +716,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20486,7 +20486,7 @@ linefeed-cal-type=0 +@@ -21030,7 +21030,7 @@ model1=HP LaserJet Professional M1219nf monitor-type=0 panel-check-type=0 pcard-type=0 @@ -748,56 +725,7 @@ index 85485636e..3a430e250 100644 plugin-reason=65 power-settings=0 pq-diag-type=0 -@@ -20528,7 +20528,7 @@ linefeed-cal-type=0 - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=65 - power-settings=0 - pq-diag-type=0 -@@ -20571,7 +20571,7 @@ model1=HP LaserJet Professional M1219nf MFP - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=65 - power-settings=0 - pq-diag-type=0 -@@ -21235,8 +21235,8 @@ model1=HP Color LaserJet CM1312nfi Multifunction Printer - monitor-type=0 - panel-check-type=1 - pcard-type=2 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -21287,8 +21287,8 @@ model1=HP Color LaserJet CM1312 Multifunction Printer - monitor-type=0 - panel-check-type=1 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -21385,7 +21385,7 @@ model1=HP LaserJet M1319f Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=65 - power-settings=0 - pq-diag-type=0 -@@ -21861,8 +21861,8 @@ model1=HP LaserJet Professional CM1411fn +@@ -22320,8 +22320,8 @@ model1=HP LaserJet Professional CM1411fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -808,7 +736,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -21914,8 +21914,8 @@ model1=HP LaserJet Professional CM1412fn +@@ -22373,8 +22373,8 @@ model1=HP LaserJet Professional CM1412fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -819,7 +747,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -21967,8 +21967,8 @@ model1=HP LaserJet Professional CM1413fn +@@ -22426,8 +22426,8 @@ model1=HP LaserJet Professional CM1413fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -830,7 +758,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22020,8 +22020,8 @@ model1=HP LaserJet Professional CM1415fn +@@ -22479,8 +22479,8 @@ model1=HP LaserJet Professional CM1415fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -841,7 +769,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22073,8 +22073,8 @@ model1=HP LaserJet Professional CM1415fnw +@@ -22532,8 +22532,8 @@ model1=HP LaserJet Professional CM1415fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -852,7 +780,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22126,8 +22126,8 @@ model1=HP LaserJet Professional CM1416fnw +@@ -22585,8 +22585,8 @@ model1=HP LaserJet Professional CM1416fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -863,7 +791,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22179,8 +22179,8 @@ model1=HP LaserJet Professional CM1417fnw +@@ -22638,8 +22638,8 @@ model1=HP LaserJet Professional CM1417fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -874,7 +802,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22232,8 +22232,8 @@ model1=HP LaserJet Professional CM1418fnw +@@ -22691,8 +22691,8 @@ model1=HP LaserJet Professional CM1418fn monitor-type=0 panel-check-type=1 pcard-type=0 @@ -885,49 +813,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_cm1410_series-ps.ppd pq-diag-type=0 -@@ -22619,7 +22619,7 @@ model1=HP LaserJet P1505 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -22921,8 +22921,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -23019,8 +23019,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -23063,8 +23063,8 @@ ppd-name=hp-laserjet_m1522_mfp-ps.ppd - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -23430,8 +23430,8 @@ model1=HP LaserJet M1536dnf MFP +@@ -23889,8 +23889,8 @@ model1=HP LaserJet M1536dnf MFP monitor-type=0 panel-check-type=0 pcard-type=0 @@ -938,7 +824,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd family-ppd=hp-postscript-laserjet.ppd -@@ -23475,8 +23475,8 @@ model1=HP LaserJet M1537dnf MFP +@@ -23934,8 +23934,8 @@ model1=HP LaserJet M1537dnf MFP monitor-type=0 panel-check-type=0 pcard-type=0 @@ -949,7 +835,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd pq-diag-type=0 -@@ -23519,8 +23519,8 @@ model1=HP LaserJet M1538dnf MFP +@@ -23978,8 +23978,8 @@ model1=HP LaserJet M1538dnf MFP monitor-type=0 panel-check-type=0 pcard-type=0 @@ -960,7 +846,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd pq-diag-type=0 -@@ -23563,8 +23563,8 @@ model1=HP LaserJet M1539dnf MFP +@@ -24022,8 +24022,8 @@ model1=HP LaserJet M1539dnf MFP monitor-type=0 panel-check-type=0 pcard-type=0 @@ -971,7 +857,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_m1530_mfp_series-ps.ppd pq-diag-type=0 -@@ -23607,7 +23607,7 @@ model1=HP LaserJet Professional P1566 +@@ -24109,7 +24109,7 @@ model1=HP LaserJet Professional P1567 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -980,7 +866,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -23650,7 +23650,7 @@ model1=HP LaserJet Professional P1567 +@@ -24152,7 +24152,7 @@ model1=HP LaserJet Professional P1568 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -989,7 +875,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -23693,7 +23693,7 @@ model1=HP LaserJet Professional P1568 +@@ -24195,7 +24195,7 @@ model1=HP LaserJet Professional P1569 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -998,7 +884,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -23736,7 +23736,7 @@ model1=HP LaserJet Professional P1569 +@@ -24631,7 +24631,7 @@ model1=HP LaserJet Professional P1606dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1007,7 +893,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -24132,7 +24132,7 @@ model1=HP Color LaserJet 1600 Printer +@@ -24674,7 +24674,7 @@ model1=HP LaserJet Professional P1607dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1016,7 +902,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -24172,7 +24172,7 @@ model1=HP LaserJet Professional P1606dn Printer +@@ -24717,7 +24717,7 @@ model1=HP LaserJet Professional P1608dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1025,7 +911,7 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -24215,7 +24215,7 @@ model1=HP LaserJet Professional P1607dn Printer +@@ -24760,7 +24760,7 @@ model1=HP LaserJet Professional P1609dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1034,46 +920,10 @@ index 85485636e..3a430e250 100644 plugin-reason=1 power-settings=0 pq-diag-type=0 -@@ -24258,7 +24258,7 @@ model1=HP LaserJet Professional P1608dn Printer +@@ -29946,8 +29946,8 @@ ppd-name=hp-color_laserjet_2800-ps.ppd monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -24301,7 +24301,7 @@ model1=HP LaserJet Professional P1609dn Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -25254,7 +25254,7 @@ model1=HP LaserJet P2035n Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -25297,7 +25297,7 @@ model1=HP LaserJet P2035 Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -26939,8 +26939,8 @@ model1=HP Color LaserJet CM2320 Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 + panel-check-type=1 + pcard-type=2 -plugin=0 -plugin-reason=0 +plugin=1 @@ -1081,10 +931,10 @@ index 85485636e..3a430e250 100644 power-settings=0 pq-diag-type=0 r-type=0 -@@ -26991,8 +26991,8 @@ model1=HP Color LaserJet CM2320nf Multifunction Printer +@@ -30068,8 +30068,8 @@ ppd-name=hp-color_laserjet_2820-ps.ppd monitor-type=0 - panel-check-type=0 - pcard-type=0 + panel-check-type=1 + pcard-type=2 -plugin=0 -plugin-reason=0 +plugin=1 @@ -1092,71 +942,7 @@ index 85485636e..3a430e250 100644 power-settings=0 pq-diag-type=0 r-type=0 -@@ -27043,8 +27043,8 @@ model1=HP Color LaserJet CM2320fxi Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -27095,8 +27095,8 @@ model1=HP Color LaserJet CM2320n Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - pq-diag-type=0 - r-type=0 -@@ -28453,7 +28453,7 @@ model1=HP Color LaserJet 2600n Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 -+plugin=1 - plugin-reason=1 - power-settings=0 - pq-diag-type=0 -@@ -29353,8 +29353,8 @@ model1=HP LaserJet M2727 Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd - pq-diag-type=0 -@@ -29397,8 +29397,8 @@ model1=HP LaserJet M2727nfs Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd - pq-diag-type=0 -@@ -29441,8 +29441,8 @@ model1=HP LaserJet M2727nf Multifunction Printer - monitor-type=0 - panel-check-type=0 - pcard-type=0 --plugin=0 --plugin-reason=0 -+plugin=1 -+plugin-reason=64 - power-settings=0 - ppd-name=hp-laserjet_m2727_mfp_series-ps.ppd - family-ppd=hp-postscript-laserjet.ppd -@@ -52679,8 +52679,8 @@ model1=HP Color LaserJet MFP M277n +@@ -53138,8 +53138,8 @@ model1=HP Color LaserJet MFP M277n monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1167,7 +953,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_mfp_m277 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -52733,8 +52733,8 @@ model1=HP Color LaserJet MFP M277dw +@@ -53192,8 +53192,8 @@ model1=HP Color LaserJet MFP M277dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1178,7 +964,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m277 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -53474,8 +53474,8 @@ model1=HP Color LaserJet Pro MFP M274n +@@ -53933,8 +53933,8 @@ model1=HP Color LaserJet Pro MFP M274n monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1189,7 +975,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_mfp_m274-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54257,8 +54257,8 @@ model1=HP Laserjet Pro MFP M426fdn +@@ -54716,8 +54716,8 @@ model1=HP Laserjet Pro MFP M426fdn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1200,7 +986,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=laserjet_mfp_m426_m427 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54302,8 +54302,8 @@ model1=HP Laserjet Pro MFP M426fdw +@@ -54761,8 +54761,8 @@ model1=HP Laserjet Pro MFP M426fdw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1211,7 +997,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=laserjet_mfp_m426_m427 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54347,8 +54347,8 @@ model1=HP Laserjet Pro MFP M427dn +@@ -54806,8 +54806,8 @@ model1=HP Laserjet Pro MFP M427dn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1222,7 +1008,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=laserjet_mfp_m426_m427 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54392,8 +54392,8 @@ model1=HP Laserjet Pro MFP M427fdw +@@ -54851,8 +54851,8 @@ model1=HP Laserjet Pro MFP M427fdw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1233,7 +1019,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=laserjet_mfp_m426_m427 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54437,8 +54437,8 @@ model1=HP Laserjet Pro MFP M426dw +@@ -54896,8 +54896,8 @@ model1=HP Laserjet Pro MFP M426dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1244,7 +1030,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=laserjet_mfp_m426_m427 family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54482,8 +54482,8 @@ model1=HP Laserjet Pro MFP M427dw +@@ -54941,8 +54941,8 @@ model1=HP Laserjet Pro MFP M427dw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1255,7 +1041,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-laserjet_mfp_m426_m427-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54812,8 +54812,8 @@ model1=HP Color Laserjet Pro MFP M477 fnw +@@ -55271,8 +55271,8 @@ model1=HP Color Laserjet Pro MFP M477 fn monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1266,7 +1052,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m477-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54854,8 +54854,8 @@ model1=HP Color Laserjet Pro MFP M477 fdn +@@ -55313,8 +55313,8 @@ model1=HP Color Laserjet Pro MFP M477 fd monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1277,7 +1063,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=color_laserjet_pro_mfp_m477d family-ppd=hp-postscript-laserjet-pro.ppd -@@ -54896,8 +54896,8 @@ model1=HP Color Laserjet Pro MFP M477 fdw +@@ -55355,8 +55355,8 @@ model1=HP Color Laserjet Pro MFP M477 fd monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1288,7 +1074,16 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m477d-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -56054,8 +56054,8 @@ model1=HP Color Laserjet MFP M377 fnw +@@ -55437,7 +55437,7 @@ model1=HP LaserJet Pro MFP M127fs + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=65 + power-settings=0 + pq-diag-type=0 +@@ -56513,8 +56513,8 @@ model1=HP Color Laserjet MFP M377 fnw monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1299,7 +1094,7 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m377-ps.ppd family-ppd=hp-postscript-laserjet-pro.ppd -@@ -57016,8 +57016,8 @@ model1=HP Color LaserJet MFP M277c6 +@@ -57475,8 +57475,8 @@ model1=HP Color LaserJet MFP M277c6 monitor-type=0 panel-check-type=0 pcard-type=0 @@ -1310,3 +1105,74 @@ index 85485636e..3a430e250 100644 power-settings=0 ppd-name=hp-color_laserjet_pro_mfp_m277-ps.ppd pq-diag-type=0 +@@ -60453,7 +60453,7 @@ model1=HP LaserJet Pro MFP M26a + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -60493,7 +60493,7 @@ model1=HP LaserJet Pro MFP M26nw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -60653,7 +60653,7 @@ model1=HP LaserJet Pro MFP M27cnw + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 ++plugin=1 + plugin-reason=1 + power-settings=0 + pq-diag-type=0 +@@ -65387,8 +65387,8 @@ model1=HP Smart Tank Plus 570 series + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -67470,8 +67470,8 @@ model2=HP DeskJet Ink Advantage 2700 All + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -67510,8 +67510,8 @@ model1=HP DeskJet Plus 4100 All-in-One P + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 +@@ -67632,8 +67632,8 @@ model2=HP DeskJet Ink Advantage 2300 All + monitor-type=0 + panel-check-type=0 + pcard-type=0 +-plugin=0 +-plugin-reason=0 ++plugin=1 ++plugin-reason=64 + power-settings=0 + pq-diag-type=0 + r-type=0 diff --git a/hplip.spec b/hplip.spec index a520d1f..f1c8cd4 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.6 -Release: 13%{?dist} +Version: 3.20.9 +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 @@ -194,6 +194,8 @@ BuildRequires: gcc-c++ BuildRequires: autoconf automake libtool BuildRequires: net-snmp-devel +BuildRequires: pkgconfig(avahi-client) +BuildRequires: pkgconfig(avahi-core) BuildRequires: cups-devel BuildRequires: python3-devel BuildRequires: libjpeg-devel @@ -768,6 +770,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Oct 02 2020 Zdenek Dohnal - 3.20.9-1 +- 3.20.9 + * Wed Sep 30 2020 Zdenek Dohnal - 3.20.6-13 - fix bashisms in hplip-configure-python.patch - thanks for Daniel Pielmeier from Gentoo for review diff --git a/sources b/sources index cffcc78..9d25bc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.20.6.tar.gz) = 6a5ce55465e3a537ecc0b6e7d198835dbe495e191522e674a507a4993e2061da3ea084a5239a74b2279c065c0775067d5b6a4aeb2a7791825106a299fb55e8f8 +SHA512 (hplip-3.20.9.tar.gz) = d2981cf51f6d893a576c51808710ac9815aa6ac5fdc617d95cc372518731a48b0aca09af721c1792e1531df6cf8fc0ebf5ebd7e9c96950602a830ceed3d441ae From b80a1ae08105b2bd898b5129660f71a3b6e56b53 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 12 Oct 2020 15:10:30 +0200 Subject: [PATCH 042/166] fix the patch for adding uncompressed ppd via CLI --- hplip-add-ppd-crash.patch | 16 ++++++++-------- hplip.spec | 5 ++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hplip-add-ppd-crash.patch b/hplip-add-ppd-crash.patch index 43bcd2b..70e9a3b 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -1,14 +1,14 @@ diff --git a/setup.py b/setup.py -index ba1b519..4f64eed 100755 +index 976a42c..3604dd7 100755 --- a/setup.py +++ b/setup.py -@@ -556,6 +556,9 @@ else: # INTERACTIVE_MODE +@@ -558,6 +558,9 @@ else: # INTERACTIVE_MODE + + if file_path.endswith('.gz'): + nickname = gzip.GzipFile(file_path, 'r').read(4096) ++ if sys.version_info[0] > 2: ++ nickname = nickname.decode('utf-8') ++ else: nickname = open(file_path, 'r').read(4096) -+ if sys.version_info[0] > 2: -+ nickname = nickname.decode('utf-8') -+ - try: - desc = nickname_pat.search(nickname).group(1) - except AttributeError: diff --git a/hplip.spec b/hplip.spec index f1c8cd4..4f8e68d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.9 -Release: 1%{?dist} +Release: 2%{?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 @@ -770,6 +770,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Oct 12 2020 Zdenek Dohnal - 3.20.9-2 +- fix the patch for adding uncompressed ppd via CLI + * Fri Oct 02 2020 Zdenek Dohnal - 3.20.9-1 - 3.20.9 From 430ac6f1d4ea5249d74d0d383fc214de79f453bb Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 12 Oct 2020 15:27:38 +0200 Subject: [PATCH 043/166] fix the patch for GUI too --- hplip-add-ppd-crash.patch | 17 +++++++++++++++++ hplip.spec | 1 + 2 files changed, 18 insertions(+) diff --git a/hplip-add-ppd-crash.patch b/hplip-add-ppd-crash.patch index 70e9a3b..7117860 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -12,3 +12,20 @@ index 976a42c..3604dd7 100755 else: nickname = open(file_path, 'r').read(4096) +diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py +index ac45357..a6dacf0 100644 +--- a/ui5/setupdialog.py ++++ b/ui5/setupdialog.py +@@ -772,9 +772,9 @@ class SetupDialog(QDialog, Ui_Dialog): + + + def OtherPPDButton_clicked(self, b): +- ppd_file = to_unicode(QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"), +- sys_conf.get('dirs', 'ppd'), +- self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))) ++ ppd_file = QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"), ++ sys_conf.get('dirs', 'ppd'), ++ self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))[0] + + if ppd_file and os.path.exists(ppd_file): + self.print_ppd = (ppd_file, cups.getPPDDescription(ppd_file)) diff --git a/hplip.spec b/hplip.spec index 4f8e68d..7bde535 100644 --- a/hplip.spec +++ b/hplip.spec @@ -772,6 +772,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Mon Oct 12 2020 Zdenek Dohnal - 3.20.9-2 - fix the patch for adding uncompressed ppd via CLI +- fix the patch for GUI too * Fri Oct 02 2020 Zdenek Dohnal - 3.20.9-1 - 3.20.9 From 7cb6f648cdb35a0f018b511d10b516d6d9e4d638 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 13 Oct 2020 11:34:59 +0200 Subject: [PATCH 044/166] Work around 'not responding' messages during hp-plugin Downloading gpg key for plugin can take some time and wayland can kill the connection, work it around to prefer more stable keyservers --- hplip-keyserver.patch | 6 +++--- hplip.spec | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hplip-keyserver.patch b/hplip-keyserver.patch index d706f3d..e285799 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -24,9 +24,9 @@ diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation. class GPG_Verification(DigiSign_Verification): - def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): - self.__pgp_site = pgp_site -+ def __init__(self, keyservers = ['pgp.mit.edu', 'sks-keyservers.net', -+ 'pool.sks-keyservers.net', -+ 'keyserver.ubuntu.com'], ++ def __init__(self, keyservers = ['pool.sks-keyservers.net', ++ 'keyserver.ubuntu.com', ++ 'sks-keyservers.net', 'pgp.mit.edu'], + key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): + self.__keyservers = keyservers self.__key = key diff --git a/hplip.spec b/hplip.spec index 7bde535..9d02642 100644 --- a/hplip.spec +++ b/hplip.spec @@ -770,6 +770,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Oct 13 2020 Zdenek Dohnal - 3.20.9-2 +- downloading gpg key for plugin can take some time and wayland can + kill the connection, work it around to prefer more stable keyservers + * Mon Oct 12 2020 Zdenek Dohnal - 3.20.9-2 - fix the patch for adding uncompressed ppd via CLI - fix the patch for GUI too From c69a0429a3873e668c2f88fa113a0491357c0441 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 22 Oct 2020 10:24:59 +0200 Subject: [PATCH 045/166] FTBFS with the newest glibc - timeb.h is removed --- hplip-timeb-removed.patch | 12 ++++++++++++ hplip.spec | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 hplip-timeb-removed.patch diff --git a/hplip-timeb-removed.patch b/hplip-timeb-removed.patch new file mode 100644 index 0000000..1dc9aff --- /dev/null +++ b/hplip-timeb-removed.patch @@ -0,0 +1,12 @@ +diff --git a/prnt/hpcups/CommonDefinitions.h b/prnt/hpcups/CommonDefinitions.h +index 082aec9..86763d4 100644 +--- a/prnt/hpcups/CommonDefinitions.h ++++ b/prnt/hpcups/CommonDefinitions.h +@@ -48,7 +48,6 @@ + #include + #include + #include +-#include + #include + + #ifndef _GNU_SOURCE diff --git a/hplip.spec b/hplip.spec index 9d02642..5540635 100644 --- a/hplip.spec +++ b/hplip.spec @@ -161,6 +161,10 @@ Patch56: hplip-revert-plugins.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1861055 # reported upstream https://bugs.launchpad.net/fedora/+bug/1889280 Patch57: hplip-thread-isalive-removed.patch +# glibc moved timeb.h into compat package and it will be removed in the future +# the code doesn't use anything from timeb.h, so it is safe to remove it +# reported upstream https://bugs.launchpad.net/hplip/+bug/1900977 +Patch58: hplip-timeb-removed.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -436,6 +440,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch56 -p1 -b .revert-plugins # 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() %patch57 -p1 -b .thread-isalive-removed +# timed.h is removed from glibc +%patch58 -p1 -b .timed-removed sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -770,6 +776,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Oct 22 2020 Zdenek Dohnal - 3.20.9-2 +- timeb is removed from glibc + * Tue Oct 13 2020 Zdenek Dohnal - 3.20.9-2 - downloading gpg key for plugin can take some time and wayland can kill the connection, work it around to prefer more stable keyservers From 494ebc3d38dc306db43b2f1764f75a557fc81248 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 5 Nov 2020 08:45:34 +0100 Subject: [PATCH 046/166] make is no longer in buildroot by default --- hplip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 5540635..d4bc628 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.9 -Release: 2%{?dist} +Release: 3%{?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 @@ -195,6 +195,8 @@ Requires(post): coreutils BuildRequires: gcc # gcc-c++ is needed for hpijs, hpcups drivers BuildRequires: gcc-c++ +# uses make +BuildRequires: make BuildRequires: autoconf automake libtool BuildRequires: net-snmp-devel @@ -776,6 +778,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 05 2020 Zdenek Dohnal - 3.20.9-3 +- make is no longer in buildroot by default + * Thu Oct 22 2020 Zdenek Dohnal - 3.20.9-2 - timeb is removed from glibc From 2015e140a3fde37fed190f5e80df683de35b5d8f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 20 Nov 2020 06:09:26 +0100 Subject: [PATCH 047/166] 1899410 - non-sudoers cannot authenticate because of bad username in prompt --- hplip-check-userperms.patch | 33 +++++++++++++++++++++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 hplip-check-userperms.patch diff --git a/hplip-check-userperms.patch b/hplip-check-userperms.patch new file mode 100644 index 0000000..9204c0b --- /dev/null +++ b/hplip-check-userperms.patch @@ -0,0 +1,33 @@ +diff --git a/base/password.py b/base/password.py +index bd68f2a..bff9f80 100644 +--- a/base/password.py ++++ b/base/password.py +@@ -157,6 +157,28 @@ class Password(object): + log.warn("%s distro is not found in AUTH_TYPES" % distro_name) + self.__authType = 'su' + ++ # check if caller is in wheel group - use 'su' if he isnt - ++ # or if the caller is root (just for showing 'root' username) ++ # in the prompt ++ import os ++ from grp import getgrnam ++ ++ user = os.getenv('USER') ++ ++ try: ++ members = getgrnam('wheel').gr_mem ++ except KeyError: ++ try: ++ members = getgrnam('sudo').gr_mem ++ except: ++ return ++ ++ if user in members: ++ self.__authType = 'sudo' ++ else: ++ self.__authType = 'su' ++ ++ + def __getPasswordDisplayString(self): + if self.__authType == "su": + return "Please enter the root/superuser password: " diff --git a/hplip.spec b/hplip.spec index d4bc628..7acf707 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.9 -Release: 3%{?dist} +Release: 4%{?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 @@ -165,6 +165,9 @@ Patch57: hplip-thread-isalive-removed.patch # the code doesn't use anything from timeb.h, so it is safe to remove it # reported upstream https://bugs.launchpad.net/hplip/+bug/1900977 Patch58: hplip-timeb-removed.patch +# non-sudoers cannot authenticate +# reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 +Patch59: hplip-check-userperms.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -444,6 +447,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch57 -p1 -b .thread-isalive-removed # timed.h is removed from glibc %patch58 -p1 -b .timed-removed +# 1899410 - non-sudoers cannot authenticate because of bad username in prompt +%patch59 -p1 -b .check-userperms sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -778,6 +783,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 19 2020 Zdenek Dohnal - 3.20.9-4 +- 1899410 - non-sudoers cannot authenticate because of bad username in prompt + * Thu Nov 05 2020 Zdenek Dohnal - 3.20.9-3 - make is no longer in buildroot by default From 3edd0aeaa5f281d6a07c52eccb5fc1bf25b6906a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 2 Dec 2020 12:25:07 +0100 Subject: [PATCH 048/166] 1903029 - hplip-3.20.11 is available --- .gitignore | 1 + hplip.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fd8d283..344f1b9 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.5.tar.gz /hplip-3.20.6.tar.gz /hplip-3.20.9.tar.gz +/hplip-3.20.11.tar.gz diff --git a/hplip.spec b/hplip.spec index 7acf707..cfcd78b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.9 -Release: 4%{?dist} +Version: 3.20.11 +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 @@ -783,6 +783,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Dec 02 2020 Zdenek Dohnal - 3.20.11-1 +- 1903029 - hplip-3.20.11 is available + * Thu Nov 19 2020 Zdenek Dohnal - 3.20.9-4 - 1899410 - non-sudoers cannot authenticate because of bad username in prompt diff --git a/sources b/sources index 9d25bc0..6cdec0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.20.9.tar.gz) = d2981cf51f6d893a576c51808710ac9815aa6ac5fdc617d95cc372518731a48b0aca09af721c1792e1531df6cf8fc0ebf5ebd7e9c96950602a830ceed3d441ae +SHA512 (hplip-3.20.11.tar.gz) = f583fb4140a29c5e21956c3e51fe3620baa65d33b40447af419d7fc61473a1148a1873216a84e89be785b155ee8e9aebd5e3eb19d2ded82b8415b1a35de1b55d From b249f70f9c695daf035004b1b08966f1871f440f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 14 Jan 2021 10:45:39 +0100 Subject: [PATCH 049/166] apply eln changes --- hplip.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index cfcd78b..ac09188 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.11 -Release: 1%{?dist} +Release: 2%{?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 @@ -171,7 +171,9 @@ Patch59: hplip-check-userperms.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if 0%{?rhel} <= 8 || 0%{?fedora} Requires: python3-pillow +%endif Requires: cups Requires: wget Requires: python3-dbus @@ -540,12 +542,14 @@ rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_bindir}/hp-print \ %{buildroot}%{_bindir}/hp-printsettings \ %{buildroot}%{_bindir}/hp-systray \ + %{buildroot}%{_bindir}/hp-scan \ %{buildroot}%{_bindir}/hp-toolbox \ %{buildroot}%{_bindir}/hp-uiscan \ %{buildroot}%{_bindir}/hp-wificonfig \ %{buildroot}%{_datadir}/applications/*.desktop \ %{buildroot}%{_datadir}/metainfo/hplip.appdata.xml \ %{buildroot}%{_datadir}/icons/hicolor/*/apps/* \ + %{buildroot}%{_datadir}/hplip/base/imageprocessing.py* \ %{buildroot}%{_datadir}/hplip/check.py* \ %{buildroot}%{_datadir}/hplip/devicesettings.py* \ %{buildroot}%{_datadir}/hplip/faxsetup.py* \ @@ -554,11 +558,15 @@ rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_datadir}/hplip/print.py* \ %{buildroot}%{_datadir}/hplip/printsettings.py* \ %{buildroot}%{_datadir}/hplip/systray.py* \ + %{buildroot}%{_datadir}/hplip/scan.py* \ %{buildroot}%{_datadir}/hplip/toolbox.py* \ %{buildroot}%{_datadir}/hplip/uiscan.py* \ %{buildroot}%{_datadir}/hplip/wificonfig.py* \ %{buildroot}%{_datadir}/hplip/data/images \ - %{buildroot}%{_datadir}/hplip/ui5 + %{buildroot}%{_datadir}/hplip/scan \ + %{buildroot}%{_datadir}/hplip/ui5 \ + %{buildroot}%{_docdir}/hplip/hpscan.html \ + doc/hpscan.html %endif %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -663,7 +671,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-plugin %{_bindir}/hp-probe %{_bindir}/hp-query +%if 0%{?rhel} <= 8 || 0%{?fedora} %{_bindir}/hp-scan +%endif %{_bindir}/hp-sendfax %{_bindir}/hp-setup %{_bindir}/hp-testpage @@ -700,7 +710,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/plugin.py* %{_datadir}/hplip/probe.py* %{_datadir}/hplip/query.py* +%if 0%{?rhel} <= 8 || 0%{?fedora} %{_datadir}/hplip/scan.py* +%endif %{_datadir}/hplip/sendfax.py* %{_datadir}/hplip/setup.py* %{_datadir}/hplip/testpage.py* @@ -716,7 +728,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/installer %{_datadir}/hplip/pcard %{_datadir}/hplip/prnt +%if 0%{?rhel} <= 8 || 0%{?fedora} %{_datadir}/hplip/scan +%endif %{_datadir}/ppd %{_sharedstatedir}/hp %dir %attr(0775,root,lp) /run/hplip @@ -783,6 +797,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jan 14 2021 Zdenek Dohnal - 3.20.11-2 +- apply eln changes + * Wed Dec 02 2020 Zdenek Dohnal - 3.20.11-1 - 1903029 - hplip-3.20.11 is available From 46cc98726f3310223a6d323f28fc0085204ea51e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 13:33:21 +0000 Subject: [PATCH 050/166] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index ac09188..4d531fa 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.11 -Release: 2%{?dist} +Release: 3%{?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 @@ -797,6 +797,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 3.20.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 14 2021 Zdenek Dohnal - 3.20.11-2 - apply eln changes From b4f017fe30b16be745fc2148e994157b8ac2720e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 2 Feb 2021 12:55:50 +0100 Subject: [PATCH 051/166] 1912147 - Enable matching for '_series' drivers in PPD search algorithm --- hplip-find-driver.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hplip-find-driver.patch b/hplip-find-driver.patch index fbc038e..4f11bb8 100644 --- a/hplip-find-driver.patch +++ b/hplip-find-driver.patch @@ -1,5 +1,5 @@ diff --git a/prnt/cups.py b/prnt/cups.py -index a9f410a..b3e7434 100644 +index a9f410a..733891b 100644 --- a/prnt/cups.py +++ b/prnt/cups.py @@ -489,49 +489,72 @@ def getPPDFile2(mq,model, ppds): # New PPD find @@ -98,7 +98,7 @@ index a9f410a..b3e7434 100644 + pdls.append(pdl) + ppd_model=ppd_model.replace('-{}'.format(pdl), '') + -+ if ppd_model != wanted_model: ++ if ppd_model != wanted_model and ppd_model != '{}_series'.format(wanted_model): + continue + + log.debug("Found match: %s" % f) From 2dc288f050fe3b335ff7bbdc64b906452f49a07d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 2 Feb 2021 13:10:20 +0100 Subject: [PATCH 052/166] rework optional gui messages --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 4d531fa..6c03b5e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.11 -Release: 3%{?dist} +Release: 4%{?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 @@ -797,6 +797,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Feb 02 2021 Zdenek Dohnal - 3.20.11-4 +- 1912147 - Enable matching for '_series' drivers in PPD search algorithm + * Tue Jan 26 2021 Fedora Release Engineering - 3.20.11-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From bb45ee25cc03b3cf5216975591488293dec5e749 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 3 Feb 2021 11:36:51 +0100 Subject: [PATCH 053/166] rework optional gui messages --- hplip-fedora-gui.patch | 31 ++++ hplip-typo.patch | 6 +- hplip-ui-optional.patch | 333 ++++++++++------------------------------ hplip.spec | 17 +- 4 files changed, 127 insertions(+), 260 deletions(-) create mode 100644 hplip-fedora-gui.patch diff --git a/hplip-fedora-gui.patch b/hplip-fedora-gui.patch new file mode 100644 index 0000000..47c9312 --- /dev/null +++ b/hplip-fedora-gui.patch @@ -0,0 +1,31 @@ +diff --git a/base/utils.py b/base/utils.py +index d493b54..401dc41 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -727,8 +727,8 @@ def canEnterGUIMode4(): # qt4 + except ImportError: + try: + import ui5 +- except ImportError as e: +- log.warn(e) ++ except ImportError: ++ log.error("hplip-gui not installed. GUI not available.") + return False + + return True +@@ -746,6 +746,7 @@ def checkPyQtImport(): # qt3 + try: + import ui + except ImportError: ++ log.error("hplip-gui not installed. GUI not available.") + return False + + log.error("PyQt not installed. GUI not available. Exiting.") +@@ -800,6 +801,7 @@ def checkPyQtImport4(): + import ui5 + except ImportError: + log.debug('GUI not available.') ++ log.error('hplip-gui not installed. GUI not available.') + return False + + return True diff --git a/hplip-typo.patch b/hplip-typo.patch index f8a6aca..4d93801 100644 --- a/hplip-typo.patch +++ b/hplip-typo.patch @@ -1,6 +1,6 @@ -diff -up hplip-3.17.11/firmware.py.typo hplip-3.17.11/firmware.py ---- hplip-3.17.11/firmware.py.typo 2018-01-12 16:50:10.338366719 +0100 -+++ hplip-3.17.11/firmware.py 2018-01-12 16:50:33.563184939 +0100 +diff -up hplip-3.20.11/firmware.py.typo hplip-3.20.11/firmware.py +--- hplip-3.20.11/firmware.py.typo 2021-02-03 10:53:34.311743805 +0100 ++++ hplip-3.20.11/firmware.py 2021-02-03 10:54:13.229386257 +0100 @@ -99,7 +99,7 @@ try: if mode == GUI_MODE and (ui_toolkit == 'qt4' or ui_toolkit == 'qt5'): if not utils.canEnterGUIMode4(): diff --git a/hplip-ui-optional.patch b/hplip-ui-optional.patch index 08e6d12..4b3f525 100644 --- a/hplip-ui-optional.patch +++ b/hplip-ui-optional.patch @@ -1,273 +1,96 @@ -diff --git a/align.py b/align.py -index c5a66fe..9067676 100755 ---- a/align.py -+++ b/align.py -@@ -241,8 +241,13 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".aligndialog") - -+ try: -+ ui = import_module(ui_package + ".aligndialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - #try: - if 1: -diff --git a/base/queues.py b/base/queues.py -index 04c37b1..dec7fe9 100755 ---- a/base/queues.py -+++ b/base/queues.py -@@ -375,8 +375,14 @@ def main_function(passwordObj = None, mode = GUI_MODE, ui_toolkit= UI_TOOLKIT_QT - sys.exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".queuesconf") -- setupdialog = import_module(ui_package + ".setupdialog") +diff --git a/base/module.py b/base/module.py +index dd3efa3..04ac5b8 100644 +--- a/base/module.py ++++ b/base/module.py +@@ -432,6 +432,12 @@ class Module(object): + if show_usage is not None: + sys.exit(0) + ++ if mode == GUI_MODE: ++ if not utils.canEnterGUIMode4(): ++ log.warn("GUI mode not available - switching to interactive mode.") ++ mode = INTERACTIVE_MODE ++ ui_toolkit = 'none' + -+ try: -+ ui = import_module(ui_package + ".queuesconf") -+ setupdialog = import_module(ui_package + ".setupdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dialog = ui.QueuesDiagnose(None, "","",QUEUES_MSG_SENDING,passwordObj) + self.mode = mode + return opts, device_uri, printer_name, mode, ui_toolkit, lang + diff --git a/base/utils.py b/base/utils.py -index cde819f..0d6e9ff 100644 +index 98437a3..9b8813b 100644 --- a/base/utils.py +++ b/base/utils.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # - # (c) Copyright 2001-2018 HP Development Company, L.P. -@@ -734,6 +734,13 @@ def checkPyQtImport(): # qt3 +@@ -722,6 +722,15 @@ def canEnterGUIMode4(): # qt4 + log.warn(e) + return False + ++ try: ++ import ui4 ++ except ImportError: ++ try: ++ import ui5 ++ except ImportError as e: ++ log.warn(e) ++ return False ++ + return True + + +@@ -734,6 +743,11 @@ def checkPyQtImport(): # qt3 if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'): no_qt_message_gtk() - -+ # hplip-gui sub-package (Fedora) + + try: + import ui + except ImportError: -+ log.error("hplip-gui not installed. GUI not available. Exiting.") + return False + log.error("PyQt not installed. GUI not available. Exiting.") return False - -@@ -784,7 +791,8 @@ def checkPyQtImport4(): - import PyQt5 - import ui5 - else: + +@@ -781,11 +795,13 @@ def checkPyQtImport4(): + import PyQt4 + import ui4 + except ImportError: +- import PyQt5 +- import ui5 +- else: - log.debug("HPLIP is not installed properly or is installed without graphical support. Please reinstall HPLIP again") -+ # hplip-gui sub-package (Fedora) requires python3-qt5 -+ log.error("Install the hplip-gui package for graphical support.") - return False +- return False ++ try: ++ import PyQt5 ++ import ui5 ++ except ImportError: ++ log.debug('GUI not available.') ++ return False ++ return True - -@@ -2456,6 +2464,7 @@ def checkPyQtImport45(): - except ImportError as e: - log.debug(e) - -+ log.error("Install the hplip-gui package for graphical support.") - raise ImportError("GUI Modules PyQt4 and PyQt5 are not installed") - - -@@ -2477,6 +2486,7 @@ def import_dialog(ui_toolkit): - return (QApplication, "ui4") - except ImportError as e: - log.error(e) -+ log.error("Unable to load Qt support. Is hplip-gui package installed?") - sys.exit(1) - elif ui_toolkit == "qt5": - try: -@@ -2485,9 +2495,7 @@ def import_dialog(ui_toolkit): - return (QApplication, "ui5") - except ImportError as e: - log.error(e) -- sys.exit(1) -- else: -- log.error("Unable to load Qt support. Is it installed?") -+ log.error("Unable to load Qt support. Is hplip-gui package installed?") - sys.exit(1) - - -diff --git a/clean.py b/clean.py -index 3d41f04..0141f23 100755 ---- a/clean.py -+++ b/clean.py -@@ -193,8 +193,13 @@ try: - else: - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".cleandialog") - -+ try: -+ ui = import_module(ui_package + ".cleandialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - #try: - if 1: -diff --git a/diagnose_plugin.py b/diagnose_plugin.py -index e4e6ebd..1bcd8c3 100755 ---- a/diagnose_plugin.py -+++ b/diagnose_plugin.py -@@ -94,7 +94,14 @@ if mode == GUI_MODE: - # sys.exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".plugindiagnose") -+ -+ try: -+ ui = import_module(ui_package + ".plugindiagnose") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) -+ - from installer import pluginhandler - - app = QApplication(sys.argv) + + # def checkPyQtImport5(): diff --git a/fab.py b/fab.py -index 9bd6166..e11ebc4 100755 +index 5577af5..194ceed 100755 --- a/fab.py +++ b/fab.py -@@ -854,8 +854,13 @@ if mode == GUI_MODE: - else: # qt4 - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".fabwindow") - -+ try: -+ ui = import_module(ui_package + ".fabwindow") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - log.set_module("hp-fab(qt4)") - -diff --git a/firmware.py b/firmware.py -index 33e044d..a38058b 100755 ---- a/firmware.py -+++ b/firmware.py -@@ -118,7 +118,13 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".firmwaredialog") -+ -+ try: -+ ui = import_module(ui_package + ".firmwaredialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - if ui_toolkit == 'qt3': - try: -diff --git a/info.py b/info.py -index 6c28531..5b05eda 100755 ---- a/info.py -+++ b/info.py -@@ -172,7 +172,13 @@ try: - - else: # GUI mode - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".infodialog") -+ -+ try: -+ ui = import_module(ui_package + ".infodialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - if 1: - app = QApplication(sys.argv) -diff --git a/plugin.py b/plugin.py -index f54f726..58d6006 100755 ---- a/plugin.py -+++ b/plugin.py -@@ -252,7 +252,14 @@ if mode == GUI_MODE: - # clean_exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".plugindialog") -+ -+ try: -+ ui = import_module(ui_package + ".plugindialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) -+ - if ui_toolkit == "qt5": - from PyQt5.QtWidgets import QMessageBox - elif ui_toolkit == "qt4": -diff --git a/sendfax.py b/sendfax.py -index 491c8f9..0815ee7 100755 ---- a/sendfax.py -+++ b/sendfax.py -@@ -211,7 +211,13 @@ if mode == GUI_MODE: - # sys.exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".sendfaxdialog") -+ -+ try: -+ ui = import_module(ui_package + ".sendfaxdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - dlg = ui.SendFaxDialog(None, printer_name, device_uri, mod.args) -diff --git a/setup.py b/setup.py -index 2608f95..b09a8ef 100755 ---- a/setup.py -+++ b/setup.py -@@ -310,7 +310,12 @@ if mode == GUI_MODE: - # clean_exit(1) - - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".setupdialog") -+ try: -+ ui = import_module(ui_package + ".setupdialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - app = QApplication(sys.argv) - log.debug("Sys.argv=%s printer_name=%s param=%s jd_port=%s device_uri=%s remove=%s" % (sys.argv, printer_name, param, jd_port, device_uri, remove)) -diff --git a/testpage.py b/testpage.py -index a5ed2bc..2a707a1 100755 ---- a/testpage.py -+++ b/testpage.py -@@ -77,7 +77,13 @@ try: - # log.error("Unable to load Qt4 support. Is it installed?") - # sys.exit(1) - QApplication, ui_package = utils.import_dialog(ui_toolkit) -- ui = import_module(ui_package + ".printtestpagedialog") -+ -+ try: -+ ui = import_module(ui_package + ".printtestpagedialog") -+ except ModuleNotFoundError: -+ log.error('HPLIP GUI is not available - use interactive mode ' -+ '(option \'-i\') or install hplip-gui package.') -+ sys.exit(1) - - log.set_module("%s(UI)" % __mod__) - +@@ -776,14 +776,15 @@ mod.setUsage(module.USAGE_FLAG_NONE) + opts, device_uri, printer_name, mode, ui_toolkit, loc = \ + mod.parseStdOpts(handle_device_printer=False) + +-if ui_toolkit == 'qt3': +- if not utils.canEnterGUIMode(): +- log.error("%s GUI mode requires GUI support (try running with --qt4). Entering interactive mode." % __mod__) +- mode = INTERACTIVE_MODE +-else: +- if not utils.canEnterGUIMode4(): +- log.error("%s GUI mode requires GUI support (try running with --qt3). Entering interactive mode." % __mod__) +- mode = INTERACTIVE_MODE ++if ui_toolkit != 'none': ++ if ui_toolkit == 'qt3': ++ if not utils.canEnterGUIMode(): ++ log.error("%s GUI mode requires GUI support (try running with --qt4). Entering interactive mode." % __mod__) ++ mode = INTERACTIVE_MODE ++ else: ++ if not utils.canEnterGUIMode4(): ++ log.error("%s GUI mode requires GUI support (try running with --qt3). Entering interactive mode." % __mod__) ++ mode = INTERACTIVE_MODE + + + if mode == GUI_MODE: diff --git a/hplip.spec b/hplip.spec index 6c03b5e..c48c9ff 100644 --- a/hplip.spec +++ b/hplip.spec @@ -169,6 +169,11 @@ Patch58: hplip-timeb-removed.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 Patch59: hplip-check-userperms.patch +%if 0%{?fedora} || 0%{?rhel} <= 8 +# mention hplip-gui if you want to have GUI +Patch1000: hplip-fedora-gui.patch +%endif + Requires: %{name}-libs%{?_isa} = %{version}-%{release} %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -452,6 +457,11 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h # 1899410 - non-sudoers cannot authenticate because of bad username in prompt %patch59 -p1 -b .check-userperms +%if 0%{?fedora} || 0%{?rhel} <= 8 +# mention hplip-gui should be installed if you want GUI +%patch1000 -p1 -b .fedora-gui +%endif + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -536,6 +546,7 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %if 0%{?rhel} > 8 rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_bindir}/hp-devicesettings \ + %{buildroot}%{_bindir}/hp-diagnose_plugin \ %{buildroot}%{_bindir}/hp-faxsetup \ %{buildroot}%{_bindir}/hp-linefeedcal \ %{buildroot}%{_bindir}/hp-makecopies \ @@ -552,6 +563,7 @@ rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_datadir}/hplip/base/imageprocessing.py* \ %{buildroot}%{_datadir}/hplip/check.py* \ %{buildroot}%{_datadir}/hplip/devicesettings.py* \ + %{buildroot}%{_datadir}/hplip/diagnose_plugin.py* \ %{buildroot}%{_datadir}/hplip/faxsetup.py* \ %{buildroot}%{_datadir}/hplip/linefeedcal.py* \ %{buildroot}%{_datadir}/hplip/makecopies.py* \ @@ -661,7 +673,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-clean %{_bindir}/hp-colorcal %{_bindir}/hp-config_usb_printer -%{_bindir}/hp-diagnose_plugin %{_bindir}/hp-diagnose_queues %{_bindir}/hp-fab %{_bindir}/hp-firmware @@ -695,7 +706,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/clean.py* %{_datadir}/hplip/colorcal.py* %{_datadir}/hplip/config_usb_printer.py* -%{_datadir}/hplip/diagnose_plugin.py* %{_datadir}/hplip/diagnose_queues.py* %{_datadir}/hplip/fab.py* %{_datadir}/hplip/fax @@ -761,6 +771,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %files gui %{_bindir}/hp-check %{_bindir}/hp-devicesettings +%{_bindir}/hp-diagnose_plugin %{_bindir}/hp-faxsetup %{_bindir}/hp-linefeedcal %{_bindir}/hp-makecopies @@ -776,6 +787,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/hplip/check.py* %{_datadir}/hplip/devicesettings.py* +%{_datadir}/hplip/diagnose_plugin.py* %{_datadir}/hplip/faxsetup.py* %{_datadir}/hplip/linefeedcal.py* %{_datadir}/hplip/makecopies.py* @@ -799,6 +811,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Tue Feb 02 2021 Zdenek Dohnal - 3.20.11-4 - 1912147 - Enable matching for '_series' drivers in PPD search algorithm +- rework optional gui messages * Tue Jan 26 2021 Fedora Release Engineering - 3.20.11-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 5a340ce89d22688b8408ff586f9ddb3af3a8eb01 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 5 Feb 2021 08:01:44 +0100 Subject: [PATCH 054/166] 1925259 - %pre scriptlet enables and starts cups.service, which is unnecessary --- hplip.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hplip.spec b/hplip.spec index c48c9ff..451cd62 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.11 -Release: 4%{?dist} +Release: 5%{?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 @@ -651,11 +651,6 @@ rm -f %{buildroot}%{_unitdir}/hplip-printer@.service # window), so don't ship the launcher yet. rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop -# hp-setup needs to have cups service enabled and running for setups of queues -%pre -%{_bindir}/systemctl start cups &>/dev/null ||: -%{_bindir}/systemctl enable cups &>/dev/null ||: - %post # timeout is to prevent possible freeze during update %{_bindir}/timeout 10m -k 15m %{_bindir}/hpcups-update-ppds &>/dev/null ||: @@ -809,6 +804,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Feb 05 2021 Zdenek Dohnal - 3.20.11-5 +- 1925259 - %pre scriptlet enables and starts cups.service, which is unnecessary + * Tue Feb 02 2021 Zdenek Dohnal - 3.20.11-4 - 1912147 - Enable matching for '_series' drivers in PPD search algorithm - rework optional gui messages From b2f875a7674e3bb5e14291d1abe9f6484cc256ec Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 5 Feb 2021 10:14:17 +0100 Subject: [PATCH 055/166] 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly --- hplip-fab-import.patch | 13 +++++++++++++ hplip.spec | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 hplip-fab-import.patch diff --git a/hplip-fab-import.patch b/hplip-fab-import.patch new file mode 100644 index 0000000..0d2e94b --- /dev/null +++ b/hplip-fab-import.patch @@ -0,0 +1,13 @@ +diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py +index 0b95c94..631727c 100644 +--- a/ui5/fabwindow.py ++++ b/ui5/fabwindow.py +@@ -518,7 +518,7 @@ class FABWindow(QMainWindow, Ui_MainWindow): + self.__tr("Import fax addresses from LDIF or vCard"), + #user_conf.workingDirectory(), + self.user_settings.working_dir, +- "vCard (*.vcf);;LDIF (*.ldif *.ldi)")) ++ "vCard (*.vcf);;LDIF (*.ldif *.ldi)")[0]) + + if result: + working_directory = to_unicode(os.path.dirname(result)) diff --git a/hplip.spec b/hplip.spec index 451cd62..8910dfd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -168,6 +168,10 @@ Patch58: hplip-timeb-removed.patch # non-sudoers cannot authenticate # reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 Patch59: hplip-check-userperms.patch +# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly +# getOpenFileName returns a tuple, but hp-fab expects a simple variable +# reported upstream as https://bugs.launchpad.net/hplip/+bug/1914743 +Patch60: hplip-fab-import.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -456,6 +460,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch58 -p1 -b .timed-removed # 1899410 - non-sudoers cannot authenticate because of bad username in prompt %patch59 -p1 -b .check-userperms +# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly +%patch60 -p1 -b .fab-import %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -806,6 +812,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Fri Feb 05 2021 Zdenek Dohnal - 3.20.11-5 - 1925259 - %pre scriptlet enables and starts cups.service, which is unnecessary +- 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly * Tue Feb 02 2021 Zdenek Dohnal - 3.20.11-4 - 1912147 - Enable matching for '_series' drivers in PPD search algorithm From bfad24d925d28df17c78a991998071c702ba15e3 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 18 Feb 2021 09:07:06 +0100 Subject: [PATCH 056/166] remove the old search algorithm --- hplip-find-driver.patch | 49 ++++++++++++++++++++++++++++++++--------- hplip.spec | 5 ++++- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/hplip-find-driver.patch b/hplip-find-driver.patch index 4f11bb8..f991967 100644 --- a/hplip-find-driver.patch +++ b/hplip-find-driver.patch @@ -1,8 +1,8 @@ diff --git a/prnt/cups.py b/prnt/cups.py -index a9f410a..733891b 100644 +index a9f410a..3783a60 100644 --- a/prnt/cups.py +++ b/prnt/cups.py -@@ -489,49 +489,72 @@ def getPPDFile2(mq,model, ppds): # New PPD find +@@ -489,78 +489,77 @@ def getPPDFile2(mq,model, ppds): # New PPD find #Check if common ppd name is already given in models.dat(This is needed because in case of devices having more than one derivatives #will have diffrent model name strings in device ID, because of which we don't get the common ppd name for search) family_check=isfamilydrv(ppds) @@ -55,6 +55,8 @@ index a9f410a..733891b 100644 - ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \ - ('ps' in pdls) or ('pdf' in pdls): - matches.append((f, [p for p in pdls if p and p != 'hpijs'])) +- log.debug(matches) +- num_matches = len(matches) + for f in ppds: + # ignore foomatic and gutenprint drivers + if 'foomatic' in f or 'gutenprint' in f: @@ -89,7 +91,22 @@ index a9f410a..733891b 100644 + if pdl in ['hpijs', 'hpcups']: + ppd_model=ppd_model.replace('-{}'.format(pdl), '') + continue -+ + +- if num_matches == 0: +- log.debug("No PPD found for model %s using new algorithm. Trying old algorithm..." % stripped_model) +- #Using Old algo, ignores the series keyword in ppd searching. +- matches2 = list(getPPDFile(stripModel(stripped_model), ppds).items()) +- log.debug(matches2) +- num_matches2 = len(matches2) +- if num_matches2: +- for f, d in matches2: +- match = ppd_pat.match(f) +- if match is not None: +- log.debug("Found match: %s" % f) +- try: +- pdls = match.group(2).split('-') +- except AttributeError: +- pdls = [] + if not models.PDL_TYPES.get(pdl): + log.debug('Unknown PDL named \'{}\' - can be a new PDL or ' + 'just a part of device name. Assume it is ' @@ -102,17 +119,29 @@ index a9f410a..733891b 100644 + continue + + log.debug("Found match: %s" % f) -+ + +- if (prop.hpcups_build and 'hpijs' not in f) or \ +- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \ +- ('ps' in pdls) or ('pdf' in pdls): +- matches.append((f, [p for p in pdls if p and p != 'hpijs'])) + if (prop.hpcups_build and 'hpijs' not in f) or \ + ((prop.hpijs_build and 'hpijs' in driver_types) or (prop.hpcups_build and 'hpijs' not in driver_types)) or \ + ('ps' in pdls) or ('pdf' in pdls): + matches.append((f, pdls, [d for d in driver_types if d and d != 'hpijs'])) -+ -+ - log.debug(matches) - num_matches = len(matches) -@@ -570,7 +593,7 @@ def getPPDFile2(mq,model, ppds): # New PPD find +- log.debug(matches) +- num_matches = len(matches) ++ ++ log.debug(matches) ++ num_matches = len(matches) + + if num_matches == 0: +- log.error("No PPD found for model %s using old algorithm." % stripModel(stripped_model)) ++ log.error("No PPD found for model %s." % stripModel(stripped_model)) + return None + + elif num_matches == 1: +@@ -570,7 +569,7 @@ def getPPDFile2(mq,model, ppds): # New PPD find # > 1 log.debug("%d matches found. Searching based on PDL: Host > PS,PDF > PCL/Other" % num_matches) for p in [models.PDL_TYPE_HOST, models.PDL_TYPE_PS,models.PDL_TYPE_PDF, models.PDL_TYPE_PCL]: @@ -121,7 +150,7 @@ index a9f410a..733891b 100644 for x in pdl_list: # default to HOST-based PDLs, as newly supported PDLs will most likely be of this type if models.PDL_TYPES.get(x, models.PDL_TYPE_HOST) == p: -@@ -579,8 +602,8 @@ def getPPDFile2(mq,model, ppds): # New PPD find +@@ -579,8 +578,8 @@ def getPPDFile2(mq,model, ppds): # New PPD find log.debug("%d matches found. Searching based on Filters: HPCUPS > HPIJS" % num_matches) for p in ["hpcups","hpijs"]: diff --git a/hplip.spec b/hplip.spec index 8910dfd..413f539 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.20.11 -Release: 5%{?dist} +Release: 6%{?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 @@ -810,6 +810,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Feb 18 2021 Zdenek Dohnal - 3.20.11-6 +- remove the old search algorithm + * Fri Feb 05 2021 Zdenek Dohnal - 3.20.11-5 - 1925259 - %pre scriptlet enables and starts cups.service, which is unnecessary - 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly From 0f40a3baaaa4bb7454d10d54cefe745b2d0e4337 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 19 Feb 2021 07:43:19 +0100 Subject: [PATCH 057/166] get out of hp-setup if the device is a standalone scanner --- hplip-hpsetup-noscanjets.patch | 48 ++++++++++++++++++++++++++++++++++ hplip.spec | 10 +++++++ 2 files changed, 58 insertions(+) create mode 100644 hplip-hpsetup-noscanjets.patch diff --git a/hplip-hpsetup-noscanjets.patch b/hplip-hpsetup-noscanjets.patch new file mode 100644 index 0000000..5c956a0 --- /dev/null +++ b/hplip-hpsetup-noscanjets.patch @@ -0,0 +1,48 @@ +diff --git a/setup.py b/setup.py +index 5d48aaa..88e663f 100755 +--- a/setup.py ++++ b/setup.py +@@ -399,9 +399,19 @@ else: # INTERACTIVE_MODE + #log.warning("Cannot setup fax - device does not have fax feature.") + setup_fax = False + ++ norm_model = models.normalizeModelName(model).lower() ++ ++ # get out if the found model is standalone scanner, hp-setup is printer/fax setup tool ++ if 'scanjet' in norm_model: ++ log.error('The device {} is a standalone scanner. ' ++ 'hp-setup is a printer/MFD setup tool, ' ++ 'not scanner installation tool. '.format(model)) ++ log.info(log.bold('Scanners do not need a installation, but they may ' ++ 'require a binary plugin (install by \'hp-plugin -i\').')) ++ clean_exit(1) ++ + # ******************************* PLUGIN + +- norm_model = models.normalizeModelName(model).lower() + plugin = mq.get('plugin', PLUGIN_NONE) + + if ignore_plugin_check is False and plugin > PLUGIN_NONE: +diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py +index c6f234b..a5041c1 100644 +--- a/ui5/setupdialog.py ++++ b/ui5/setupdialog.py +@@ -1326,6 +1326,18 @@ class SetupDialog(QDialog, Ui_Dialog): + self.mq = device.queryModelByURI(self.device_uri) + back_end, is_hp, bus, model, serial, dev_file, host, zc, port = device.parseDeviceURI(self.device_uri) + self.model = models.normalizeModelName(model).lower() ++ if 'scanjet' in self.model: ++ FailureUI(self, ++ self.__tr('The device {} is a standalone ' ++ 'scanner.

\'hp-setup\' is a tool ' ++ 'for installing printers and multifunction ' ++ 'devices. Scanners supported by HPLIP ' ++ 'work out-of-the-box after HPLIP installation, ' ++ 'or they may require a binary plugin, which you ' ++ 'can install by \'hp-plugin -i\'.

'.format(model))) ++ self.displayPage(PAGE_DEVICES) ++ return ++ + self.showAddPrinterPage() + + elif p == PAGE_ADD_PRINTER: diff --git a/hplip.spec b/hplip.spec index 413f539..77e3c5f 100644 --- a/hplip.spec +++ b/hplip.spec @@ -172,6 +172,10 @@ Patch59: hplip-check-userperms.patch # getOpenFileName returns a tuple, but hp-fab expects a simple variable # reported upstream as https://bugs.launchpad.net/hplip/+bug/1914743 Patch60: hplip-fab-import.patch +# if an user tries to install scanner via hp-setup (printer/fax utility) +# it fails further down - break out earlier with a message +# reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 +Patch61: hplip-hpsetup-noscanjets.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -462,6 +466,9 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch59 -p1 -b .check-userperms # 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly %patch60 -p1 -b .fab-import +# if an user tries to install scanner via hp-setup (printer/fax utility) +# it fails further down - break out earlier with a message +%patch61 -p1 -b .hpsetup-noscanjets %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -810,6 +817,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Feb 19 2021 Zdenek Dohnal - 3.20.11-6 +- get out of hp-setup if the device is a standalone scanner + * Thu Feb 18 2021 Zdenek Dohnal - 3.20.11-6 - remove the old search algorithm From 613fa6c3de1332f7181b9f955f607dfad7ebbacb Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 25 Feb 2021 09:02:13 +0100 Subject: [PATCH 058/166] 1929977 - hplip-3.21.2 is available get out of hp-setup if the device is a standalone scanner remove the old search algorithm --- .gitignore | 1 + ...Processor-functionality-which-is-clo.patch | 57 +++++++++++-------- hplip-3.20.9.tar.gz.asc | 7 --- hplip-3.21.2.tar.gz.asc | 7 +++ hplip-logdir.patch | 20 +++---- hplip.spec | 7 ++- sources | 2 +- 7 files changed, 58 insertions(+), 43 deletions(-) delete mode 100644 hplip-3.20.9.tar.gz.asc create mode 100644 hplip-3.21.2.tar.gz.asc diff --git a/.gitignore b/.gitignore index 344f1b9..0197a9f 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.6.tar.gz /hplip-3.20.9.tar.gz /hplip-3.20.11.tar.gz +/hplip-3.21.2.tar.gz diff --git a/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch index 6a975cd..1582480 100644 --- a/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch +++ b/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch @@ -1,7 +1,7 @@ -diff -up hplip-3.18.12/Makefile.am.libimageprocessor-removal hplip-3.18.12/Makefile.am ---- hplip-3.18.12/Makefile.am.libimageprocessor-removal 2019-01-08 12:51:08.629447883 +0100 -+++ hplip-3.18.12/Makefile.am 2019-01-08 12:51:08.710447208 +0100 -@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER +diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am +--- hplip-3.21.2/Makefile.am.libimageprocessor-removal 2021-02-24 12:38:31.707900421 +0100 ++++ hplip-3.21.2/Makefile.am 2021-02-24 12:38:31.735900172 +0100 +@@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py endif #HPLIP_CLASS_DRIVER @@ -10,7 +10,7 @@ diff -up hplip-3.18.12/Makefile.am.libimageprocessor-removal hplip-3.18.12/Makef dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv if !HPLIP_CLASS_DRIVER -@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte +@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte prnt/hpcups/ImageProcessor.h hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) @@ -19,7 +19,7 @@ diff -up hplip-3.18.12/Makefile.am.libimageprocessor-removal hplip-3.18.12/Makef #else #hpcupsdir = $(cupsfilterdir) #hpcups_PROGRAMS = hpcups -@@ -684,16 +684,6 @@ endif #HPLIP_CLASS_DRIVER +@@ -685,16 +685,6 @@ endif #HPLIP_CLASS_DRIVER install-data-hook: if HPLIP_BUILD @@ -36,9 +36,9 @@ diff -up hplip-3.18.12/Makefile.am.libimageprocessor-removal hplip-3.18.12/Makef if !HPLIP_CLASS_DRIVER # If scanner build, add hpaio entry to sane dll.conf. if [ "$(scan_build)" = "yes" ]; then \ -diff -up hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2019-01-08 12:51:08.619447966 +0100 -+++ hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp 2019-01-08 12:52:39.321686854 +0100 +diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp +--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2021-02-24 12:38:31.701900474 +0100 ++++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-24 12:42:49.445720549 +0100 @@ -31,7 +31,6 @@ \*****************************************************************************/ @@ -47,55 +47,66 @@ diff -up hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hp #include #include -@@ -645,16 +644,10 @@ int HPCupsFilter::processRasterData(cups - +@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); -- image_processor_t* imageProcessor = imageProcessorCreate(); - + +- image_processor_t* imageProcessor=NULL; +- IMAGE_PROCESSOR_ERROR result; +- //added if condition to check if pinter language is "ljzjstream" +- //If so, then bypass imageprocessing functions while running HPCUPS filter. +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ +- imageProcessor = imageProcessorCreate(); +- } while (cupsRasterReadHeader2(cups_raster, &cups_header)) { - -- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ +- result = imageProcessorStartPage(imageProcessor, &cups_header); - if (result != IPE_SUCCESS){ - dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); - } -- +- } current_page_number++; if (current_page_number == 1) { -@@ -753,12 +746,6 @@ int HPCupsFilter::processRasterData(cups +@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups color_raster = rgbRaster; black_raster = kRaster; +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { - result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); - if (result != IPE_SUCCESS){ - dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); - } -- +- } - if ((y == 0) && !is_ljmono) { //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer //may not skip blank lines before actual data -@@ -788,12 +775,6 @@ int HPCupsFilter::processRasterData(cups +@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups } } // for() loop end +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { - result = imageProcessorEndPage(imageProcessor); - if (result != IPE_SUCCESS){ - dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); - } -- +- } - m_Job.NewPage(); if (err != NO_ERROR) { break; -@@ -808,8 +789,6 @@ int HPCupsFilter::processRasterData(cups - rgbRaster = NULL; +@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups } + +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { - imageProcessorDestroy(imageProcessor); -- +- } unlink(hpPreProcessedRasterFile); return ret_status; } diff --git a/hplip-3.20.9.tar.gz.asc b/hplip-3.20.9.tar.gz.asc deleted file mode 100644 index 244c435..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-3.21.2.tar.gz.asc b/hplip-3.21.2.tar.gz.asc new file mode 100644 index 0000000..c99a1cd --- /dev/null +++ b/hplip-3.21.2.tar.gz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iEYEABECAAYFAmApuOMACgkQc9dwzaWQR7kddgCeNSUemyt9lpIk8a37ItEiX7XO +xXYAnjgAIdzPYdmSMFJ5Bqv1JLTv7RiC +=oTOD +-----END PGP SIGNATURE----- diff --git a/hplip-logdir.patch b/hplip-logdir.patch index e18bb5a..4b517a5 100644 --- a/hplip-logdir.patch +++ b/hplip-logdir.patch @@ -1,18 +1,18 @@ -diff -up hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp.logdir 2019-01-08 12:31:15.346315031 +0100 -+++ hplip-3.18.12/prnt/hpcups/HPCupsFilter.cpp 2019-01-08 12:47:42.314131260 +0100 -@@ -643,7 +643,7 @@ int HPCupsFilter::processRasterData(cups +diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp +--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir 2021-02-19 07:46:48.334843864 +0100 ++++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-19 07:48:18.052963216 +0100 +@@ -656,7 +656,7 @@ int HPCupsFilter::processRasterData(cups char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages. - sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); + snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); - image_processor_t* imageProcessor = imageProcessorCreate(); - - while (cupsRasterReadHeader2(cups_raster, &cups_header)) -diff -up hplip-3.18.12/prnt/hpcups/SystemServices.cpp.logdir hplip-3.18.12/prnt/hpcups/SystemServices.cpp ---- hplip-3.18.12/prnt/hpcups/SystemServices.cpp.logdir 2018-12-03 08:07:13.000000000 +0100 -+++ hplip-3.18.12/prnt/hpcups/SystemServices.cpp 2019-01-08 12:31:15.346315031 +0100 + + image_processor_t* imageProcessor=NULL; + IMAGE_PROCESSOR_ERROR result; +diff -up hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.2/prnt/hpcups/SystemServices.cpp +--- hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir 2021-02-15 00:55:21.000000000 +0100 ++++ hplip-3.21.2/prnt/hpcups/SystemServices.cpp 2021-02-19 07:46:48.334843864 +0100 @@ -38,7 +38,7 @@ SystemServices::SystemServices(int iLogL if (iLogLevel & SAVE_OUT_FILE) { diff --git a/hplip.spec b/hplip.spec index 77e3c5f..4e1628b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.20.11 -Release: 6%{?dist} +Version: 3.21.2 +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 @@ -817,6 +817,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Feb 19 2021 Zdenek Dohnal - 3.21.2-1 +- 1929977 - hplip-3.21.2 is available + * Fri Feb 19 2021 Zdenek Dohnal - 3.20.11-6 - get out of hp-setup if the device is a standalone scanner diff --git a/sources b/sources index 6cdec0f..e254a6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.20.11.tar.gz) = f583fb4140a29c5e21956c3e51fe3620baa65d33b40447af419d7fc61473a1148a1873216a84e89be785b155ee8e9aebd5e3eb19d2ded82b8415b1a35de1b55d +SHA512 (hplip-3.21.2.tar.gz) = 73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474 From fd0b4b17ecaae6c8b02b9e7b48865fd0dccd88df Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 22 Apr 2021 13:50:06 +0200 Subject: [PATCH 059/166] 1951922 - hp-systray doesn't support a valid --qt5 option --- hplip-systray-qt5.patch | 14 ++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-systray-qt5.patch diff --git a/hplip-systray-qt5.patch b/hplip-systray-qt5.patch new file mode 100644 index 0000000..00d2d32 --- /dev/null +++ b/hplip-systray-qt5.patch @@ -0,0 +1,14 @@ +diff --git a/base/module.py b/base/module.py +index 04ac5b8..56be168 100644 +--- a/base/module.py ++++ b/base/module.py +@@ -301,6 +301,9 @@ class Module(object): + if UI_TOOLKIT_QT4 in self.supported_ui_toolkits and UI_TOOLKIT_QT4 in self.installed_ui_toolkits: + long_params.extend(['qt4', 'use-qt4']) + ++ if UI_TOOLKIT_QT5 in self.supported_ui_toolkits and UI_TOOLKIT_QT5 in self.installed_ui_toolkits: ++ long_params.extend(['qt5', 'use-qt5']) ++ + if extra_params is not None: + params = ''.join([params, extra_params]) + diff --git a/hplip.spec b/hplip.spec index 4e1628b..521c254 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 1%{?dist} +Release: 2%{?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 @@ -176,6 +176,9 @@ Patch60: hplip-fab-import.patch # it fails further down - break out earlier with a message # reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 Patch61: hplip-hpsetup-noscanjets.patch +# 1951922 - hp-systray doesn't support a valid --qt5 option +# reported upstream https://bugs.launchpad.net/hplip/+bug/1925480 +Patch62: hplip-systray-qt5.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -469,6 +472,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message %patch61 -p1 -b .hpsetup-noscanjets +# 1951922 - hp-systray doesn't support a valid --qt5 option +%patch62 -p1 -b .systray-qt5 %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -817,6 +822,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 22 2021 Zdenek Dohnal - 3.21.2-2 +- 1951922 - hp-systray doesn't support a valid --qt5 option + * Fri Feb 19 2021 Zdenek Dohnal - 3.21.2-1 - 1929977 - hplip-3.21.2 is available From 4769a3668445c61b0311bb22434be4f328403f54 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:07:14 +0200 Subject: [PATCH 060/166] Rebuilt for Python 3.10 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 521c254..953d5b2 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 2%{?dist} +Release: 3%{?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 @@ -822,6 +822,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jun 04 2021 Python Maint - 3.21.2-3 +- Rebuilt for Python 3.10 + * Thu Apr 22 2021 Zdenek Dohnal - 3.21.2-2 - 1951922 - hp-systray doesn't support a valid --qt5 option From f5837c16e5eebd7cdfe37fe37697b41bb7b487d0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 9 Jun 2021 10:11:27 +0200 Subject: [PATCH 061/166] remove redundant files --- .gitignore | 1 + hplip-repack.sh | 22 ++++++++++++++++++++++ hplip.spec | 19 +++++++++++++++---- sources | 2 +- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100755 hplip-repack.sh diff --git a/.gitignore b/.gitignore index 0197a9f..92a0061 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.9.tar.gz /hplip-3.20.11.tar.gz /hplip-3.21.2.tar.gz +/hplip-3.21.2-repack.tar.gz diff --git a/hplip-repack.sh b/hplip-repack.sh new file mode 100755 index 0000000..7639dbe --- /dev/null +++ b/hplip-repack.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + + +VERSION=$1 + +if [ "${VERSION:="*"}" == "*" ] +then + echo "Define a version of hplip as an argument." + exit 1 +fi + +# extract the original tarball +tar -xaf hplip-$VERSION.tar.gz || exit 1 + +# remove unwanted files +rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1 + +# compress into a new tarball +tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 + +# upload a new source tarball +#fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1 diff --git a/hplip.spec b/hplip.spec index 953d5b2..80cc56e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,16 +7,26 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 3%{?dist} +Release: 4%{?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 -Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz +# Original source tarball +# Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%%{version}.tar.gz +# +# Repacked source tarball without redundant files - always repack +# the original tarball once a new version arrives by: +# +# ./hplip-repack.sh +# + +Source0: hplip-%{version}-repack.tar.gz Source1: hpcups-update-ppds.sh Source2: copy-deviceids.py Source3: %{name}.appdata.xml Source4: hp-laserjet_cp_1025nw.ppd.gz Source5: hp-laserjet_professional_p_1102w.ppd.gz + Patch1: hplip-pstotiff-is-rubbish.patch Patch2: hplip-strstr-const.patch Patch3: hplip-ui-optional.patch @@ -388,8 +398,6 @@ done # hplip appdata %patch26 -p1 -b .appdata -rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h - # hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467) %patch27 -p1 -b .check-cups @@ -822,6 +830,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jun 09 2021 Zdenek Dohnal - 3.21.2-3 +- remove redundant files + * Fri Jun 04 2021 Python Maint - 3.21.2-3 - Rebuilt for Python 3.10 diff --git a/sources b/sources index e254a6d..2b6f9f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.21.2.tar.gz) = 73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474 +SHA512 (hplip-3.21.2-repack.tar.gz) = 294947275e9df31100496a84da2b8a17aa07d12ed7d9e622cd4e68082b4a42f59a20177cca91f42d410bcb31f183fd0c8474d8077c177a565c0eea26134b2418 From 32191b266677db0f953b5d9c0b09ee89c03dfb78 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 9 Jun 2021 13:17:41 +0200 Subject: [PATCH 062/166] track hplip-repack.sh as source, to have it in srpm --- hplip.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 80cc56e..661a081 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 4%{?dist} +Release: 5%{?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 @@ -26,6 +26,7 @@ Source2: copy-deviceids.py Source3: %{name}.appdata.xml Source4: hp-laserjet_cp_1025nw.ppd.gz Source5: hp-laserjet_professional_p_1102w.ppd.gz +Source6: hplip-repack.patch Patch1: hplip-pstotiff-is-rubbish.patch Patch2: hplip-strstr-const.patch @@ -830,7 +831,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog -* Wed Jun 09 2021 Zdenek Dohnal - 3.21.2-3 +* Wed Jun 09 2021 Zdenek Dohnal - 3.21.2-5 +- track hplip-repack.sh as source, to have it in srpm + +* Wed Jun 09 2021 Zdenek Dohnal - 3.21.2-4 - remove redundant files * Fri Jun 04 2021 Python Maint - 3.21.2-3 From 17cee5bcf62770b12b80724203067a54caf932bc Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 9 Jun 2021 13:37:45 +0200 Subject: [PATCH 063/166] hplip.spec: fix typo --- hplip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 661a081..7211aa2 100644 --- a/hplip.spec +++ b/hplip.spec @@ -26,7 +26,7 @@ Source2: copy-deviceids.py Source3: %{name}.appdata.xml Source4: hp-laserjet_cp_1025nw.ppd.gz Source5: hp-laserjet_professional_p_1102w.ppd.gz -Source6: hplip-repack.patch +Source6: hplip-repack.sh Patch1: hplip-pstotiff-is-rubbish.patch Patch2: hplip-strstr-const.patch From b7addb99c0a6d31c612f98d4f4cd147eb1b85472 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 11 Jun 2021 08:34:11 +0200 Subject: [PATCH 064/166] 1963114 - patch for hplip firmware load timeout fix --- hplip-hpfirmware-timeout.patch | 23 +++++++++++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 hplip-hpfirmware-timeout.patch diff --git a/hplip-hpfirmware-timeout.patch b/hplip-hpfirmware-timeout.patch new file mode 100644 index 0000000..9aa9b29 --- /dev/null +++ b/hplip-hpfirmware-timeout.patch @@ -0,0 +1,23 @@ +diff --git a/config_usb_printer.py b/config_usb_printer.py +index 946a2d4..fdab79d 100755 +--- a/config_usb_printer.py ++++ b/config_usb_printer.py +@@ -28,6 +28,7 @@ __doc__ = "Udev invokes this tool. Tool detects the plugin, Smart Install (C/DVD + # Std Lib + import sys + import os ++import time + + # Local + from base.g import * +@@ -181,8 +182,9 @@ try: + # ******************************* RUNNING FIRMWARE DOWNLOAD TO DEVICE FOR SUPPORTED PRINTER'S + fw_download_req = mq.get('fw-download', False) + if fw_download_req: +- fw_cmd = "hp-firmware -y3 -s %s"%param ++ fw_cmd = "hp-firmware -n -y3 -s %s"%param + log.info(fw_cmd) ++ time.sleep(5) + fw_sts, fw_out = utils.run(fw_cmd) + if fw_sts == 0: + log.debug("Firmware downloaded to %s "%device_uri) diff --git a/hplip.spec b/hplip.spec index 7211aa2..89d04ee 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 5%{?dist} +Release: 6%{?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 @@ -190,6 +190,9 @@ Patch61: hplip-hpsetup-noscanjets.patch # 1951922 - hp-systray doesn't support a valid --qt5 option # reported upstream https://bugs.launchpad.net/hplip/+bug/1925480 Patch62: hplip-systray-qt5.patch +# 1963114 - patch for hplip firmware load timeout fix +# reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 +Patch63: hplip-hpfirmware-timeout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -483,6 +486,8 @@ done %patch61 -p1 -b .hpsetup-noscanjets # 1951922 - hp-systray doesn't support a valid --qt5 option %patch62 -p1 -b .systray-qt5 +# 1963114 - patch for hplip firmware load timeout fix +%patch63 -p1 -b .hpfirmware-timeout %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -831,6 +836,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jun 11 2021 Zdenek Dohnal - 3.21.2-6 +- 1963114 - patch for hplip firmware load timeout fix + * Wed Jun 09 2021 Zdenek Dohnal - 3.21.2-5 - track hplip-repack.sh as source, to have it in srpm From 9c9af2ba19a97d5292bf209e049ded1420263337 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 28 Jun 2021 06:55:57 +0200 Subject: [PATCH 065/166] sleep after utils.run() (related #1963114) --- hplip-hpfirmware-timeout.patch | 7 ++++--- hplip.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hplip-hpfirmware-timeout.patch b/hplip-hpfirmware-timeout.patch index 9aa9b29..77db559 100644 --- a/hplip-hpfirmware-timeout.patch +++ b/hplip-hpfirmware-timeout.patch @@ -1,5 +1,5 @@ diff --git a/config_usb_printer.py b/config_usb_printer.py -index 946a2d4..fdab79d 100755 +index 946a2d4..8db097e 100755 --- a/config_usb_printer.py +++ b/config_usb_printer.py @@ -28,6 +28,7 @@ __doc__ = "Udev invokes this tool. Tool detects the plugin, Smart Install (C/DVD @@ -10,14 +10,15 @@ index 946a2d4..fdab79d 100755 # Local from base.g import * -@@ -181,8 +182,9 @@ try: +@@ -181,9 +182,10 @@ try: # ******************************* RUNNING FIRMWARE DOWNLOAD TO DEVICE FOR SUPPORTED PRINTER'S fw_download_req = mq.get('fw-download', False) if fw_download_req: - fw_cmd = "hp-firmware -y3 -s %s"%param + fw_cmd = "hp-firmware -n -y3 -s %s"%param log.info(fw_cmd) -+ time.sleep(5) fw_sts, fw_out = utils.run(fw_cmd) ++ time.sleep(5) if fw_sts == 0: log.debug("Firmware downloaded to %s "%device_uri) + else: diff --git a/hplip.spec b/hplip.spec index 89d04ee..6f430c4 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 6%{?dist} +Release: 7%{?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 @@ -836,6 +836,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jun 28 2021 Zdenek Dohnal - 3.21.2-7 +- sleep after utils.run() (related #1963114) + * Fri Jun 11 2021 Zdenek Dohnal - 3.21.2-6 - 1963114 - patch for hplip firmware load timeout fix From 58b699ef49f71a240880cb4492232e9c3774aca8 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 2 Jul 2021 07:30:43 +0200 Subject: [PATCH 066/166] 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats require usbutils - needed by hp-diagnose_queues --- hplip-pyssizet_clean.patch | 76 ++++++++++++++++++++++++++++++++++++++ hplip.spec | 13 ++++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 hplip-pyssizet_clean.patch diff --git a/hplip-pyssizet_clean.patch b/hplip-pyssizet_clean.patch new file mode 100644 index 0000000..0f9bc0b --- /dev/null +++ b/hplip-pyssizet_clean.patch @@ -0,0 +1,76 @@ +diff --git a/io/mudext/hpmudext.c b/io/mudext/hpmudext.c +index dca3e9d..dfcd22a 100644 +--- a/io/mudext/hpmudext.c ++++ b/io/mudext/hpmudext.c +@@ -24,6 +24,8 @@ Authors: Don Welch, David Suffield, Naga Samrat Chowdary Narla + + \*****************************************************************************/ + ++#define PY_SSIZE_T_CLEAN ++ + #include + #include + #include "hpmud.h" +@@ -187,14 +189,22 @@ static PyObject *write_channel(PyObject *self, PyObject *args) + HPMUD_CHANNEL cd; + int timeout = 30; + char * buf; +- int buf_size = 0; ++ Py_ssize_t buf_size = 0; ++ int buf_size_asInt = 0; + int bytes_written = 0; + + if (!PyArg_ParseTuple(args, "iis#|i", &dd, &cd, &buf, &buf_size, &timeout)) + return NULL; + ++ if (buf_size < INT_MIN) ++ buf_size_asInt = INT_MIN; ++ else if (buf_size > INT_MAX) ++ buf_size_asInt = INT_MAX; ++ else ++ buf_size_asInt = (int)buf_size; ++ + Py_BEGIN_ALLOW_THREADS +- result = hpmud_write_channel(dd, cd, buf, buf_size, timeout, &bytes_written); ++ result = hpmud_write_channel(dd, cd, buf, buf_size_asInt, timeout, &bytes_written); + Py_END_ALLOW_THREADS + + return Py_BuildValue("(ii)", result, bytes_written); +@@ -231,14 +241,22 @@ static PyObject *set_pml(PyObject *self, PyObject *args) + char * oid; + int type; + char * data; +- int data_size; ++ Py_ssize_t data_size = 0; ++ int data_size_asInt = 0; + int pml_result; + + if (!PyArg_ParseTuple(args, "iisis#", &dd, &cd, &oid, &type, &data, &data_size)) + return NULL; + ++ if (data_size < INT_MIN) ++ data_size_asInt = INT_MIN; ++ else if (data_size > INT_MAX) ++ data_size_asInt = INT_MAX; ++ else ++ data_size_asInt = (int)data_size; ++ + Py_BEGIN_ALLOW_THREADS +- result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size, &pml_result); ++ result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size_asInt, &pml_result); + Py_END_ALLOW_THREADS + + return Py_BuildValue("(ii)", result, pml_result); +diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c +index 1e6b514..597abd8 100755 +--- a/scan/scanext/scanext.c ++++ b/scan/scanext/scanext.c +@@ -45,6 +45,8 @@ PERFORMANCE OF THIS SOFTWARE. + *******************************************************************/ + + ++#define PY_SSIZE_T_CLEAN ++ + /* _ScanDevice objects */ + + #include "Python.h" diff --git a/hplip.spec b/hplip.spec index 6f430c4..b9d9a96 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 7%{?dist} +Release: 8%{?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 @@ -193,6 +193,9 @@ Patch62: hplip-systray-qt5.patch # 1963114 - patch for hplip firmware load timeout fix # reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 Patch63: hplip-hpfirmware-timeout.patch +# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats +# reported upstream https://bugs.launchpad.net/hplip/+bug/1933973 +Patch64: hplip-pyssizet_clean.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -216,6 +219,8 @@ Requires: systemd Requires: libsane-hpaio # 1788643 - Fedora minimal does not ship tar by default Requires: tar +# require usbutils, hp-diagnose_queues needs lsusb +Requires: usbutils # require coreutils, because timeout binary is needed in post scriptlet, # because hpcups-update-ppds script can freeze in certain situation and @@ -488,6 +493,8 @@ done %patch62 -p1 -b .systray-qt5 # 1963114 - patch for hplip firmware load timeout fix %patch63 -p1 -b .hpfirmware-timeout +# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats +%patch64 -p1 -b .pyssizet_clean %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -836,6 +843,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jul 02 2021 Zdenek Dohnal - 3.21.2-8 +- 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats +- require usbutils - needed by hp-diagnose_queues + * Mon Jun 28 2021 Zdenek Dohnal - 3.21.2-7 - sleep after utils.run() (related #1963114) From 0b9d626c35df80f8aa3c75f1f3f30fb59e5d8832 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 07:42:40 +0000 Subject: [PATCH 067/166] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index b9d9a96..45a4599 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 8%{?dist} +Release: 9%{?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 @@ -843,6 +843,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 3.21.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jul 02 2021 Zdenek Dohnal - 3.21.2-8 - 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats - require usbutils - needed by hp-diagnose_queues From 581db10c37b226869e4202881eec72bf08332732 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 29 Jul 2021 14:10:24 +0200 Subject: [PATCH 068/166] 1985251 - Incorrect permission for gpg directory --- hplip-gpgdir-perms.patch | 13 +++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 hplip-gpgdir-perms.patch diff --git a/hplip-gpgdir-perms.patch b/hplip-gpgdir-perms.patch new file mode 100644 index 0000000..51475de --- /dev/null +++ b/hplip-gpgdir-perms.patch @@ -0,0 +1,13 @@ +diff --git a/base/validation.py b/base/validation.py +index 96e65be..35f22eb 100644 +--- a/base/validation.py ++++ b/base/validation.py +@@ -58,7 +58,7 @@ class GPG_Verification(DigiSign_Verification): + + if not os.path.exists(self.__gpg_dir): + try: +- os.mkdir(self.__gpg_dir, 0o755) ++ os.mkdir(self.__gpg_dir, 0o700) + except OSError: + log.error("Failed to create %s" % self.__gpg_dir) + self.__change_owner() diff --git a/hplip.spec b/hplip.spec index 45a4599..21accd9 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 9%{?dist} +Release: 10%{?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 @@ -196,6 +196,9 @@ Patch63: hplip-hpfirmware-timeout.patch # 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats # reported upstream https://bugs.launchpad.net/hplip/+bug/1933973 Patch64: hplip-pyssizet_clean.patch +# 1985251 - Incorrect permission for gpg directory +# reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 +Patch65: hplip-gpgdir-perms.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -495,6 +498,8 @@ done %patch63 -p1 -b .hpfirmware-timeout # 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats %patch64 -p1 -b .pyssizet_clean +# 1985251 - Incorrect permission for gpg directory +%patch65 -p1 -b .gpgdir-perms %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -843,6 +848,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jul 30 2021 Zdenek Dohnal - 3.21.2-10 +- 1985251 - Incorrect permission for gpg directory + * Thu Jul 22 2021 Fedora Release Engineering - 3.21.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From d360f3c6905dfc314d3ece560931dea9c7360161 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 30 Jul 2021 07:18:24 +0200 Subject: [PATCH 069/166] 1985251 - Incorrect permission for gpg directory 1987141 - hp-plugin installs malformed udev files --- hplip-plugin-udevissues.patch | 26 ++++++++++++++++++++++++++ hplip.spec | 6 ++++++ 2 files changed, 32 insertions(+) create mode 100644 hplip-plugin-udevissues.patch diff --git a/hplip-plugin-udevissues.patch b/hplip-plugin-udevissues.patch new file mode 100644 index 0000000..3a35c6b --- /dev/null +++ b/hplip-plugin-udevissues.patch @@ -0,0 +1,26 @@ +diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py +index 1af8d85..5c498ab 100755 +--- a/installer/pluginhandler.py ++++ b/installer/pluginhandler.py +@@ -403,7 +403,20 @@ class PluginHandle(object): + log.error("Target file %s does not exist. File copy failed." % trg) + continue + else: +- os.chmod(trg, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) ++ if trg == '/etc/udev/rules.d/S99-2000S1.rules' or \ ++ trg == '/etc/udev/rules.d/40-libsane.rules': ++ os.chmod(trg, 0o644) ++ with open(trg, 'r') as udev_f: ++ content = udev_f.read() ++ ++ content = content.replace('libsane_rules_end', 'libsane_usb_rules_end') ++ content = content.replace('GROUP="scanner", ', '') ++ ++ with open(trg, 'w') as udev_f: ++ udev_f.write(content) ++ ++ else: ++ os.chmod(trg, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) + + if link: + if os.path.exists(link): diff --git a/hplip.spec b/hplip.spec index 21accd9..933b2df 100644 --- a/hplip.spec +++ b/hplip.spec @@ -199,6 +199,9 @@ Patch64: hplip-pyssizet_clean.patch # 1985251 - Incorrect permission for gpg directory # reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 Patch65: hplip-gpgdir-perms.patch +# 1987141 - hp-plugin installs malformed udev files +# reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 +Patch66: hplip-plugin-udevissues.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -500,6 +503,8 @@ done %patch64 -p1 -b .pyssizet_clean # 1985251 - Incorrect permission for gpg directory %patch65 -p1 -b .gpgdir-perms +# 1987141 - hp-plugin installs malformed udev files +%patch66 -p1 -b .hpplugin-udevperms %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -850,6 +855,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Fri Jul 30 2021 Zdenek Dohnal - 3.21.2-10 - 1985251 - Incorrect permission for gpg directory +- 1987141 - hp-plugin installs malformed udev files * Thu Jul 22 2021 Fedora Release Engineering - 3.21.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 43689ff8e0b6ce62bc73e011c905dc4e43970a1c Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 30 Jul 2021 07:46:03 +0200 Subject: [PATCH 070/166] 1985251 - Incorrect permission for gpg directory 1987141 - hp-plugin installs malformed udev files fixed warning: redhatenterpriselinux distro is not found in AUTH_TYPES --- hplip-osname-mismatch.patch | 13 +++++++++++++ hplip.spec | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 hplip-osname-mismatch.patch diff --git a/hplip-osname-mismatch.patch b/hplip-osname-mismatch.patch new file mode 100644 index 0000000..205de4d --- /dev/null +++ b/hplip-osname-mismatch.patch @@ -0,0 +1,13 @@ +diff --git a/base/password.py b/base/password.py +index bff9f80..269ebd8 100644 +--- a/base/password.py ++++ b/base/password.py +@@ -97,7 +97,7 @@ def get_distro_name(): + os_name = name.read().strip() + name.close() + +- os_name = os_name.lower() ++ os_name = os_name.lower().replace(' ','') + if "redhatenterprise" in os_name: + os_name = 'rhel' + elif "suse" in os_name: diff --git a/hplip.spec b/hplip.spec index 933b2df..5d55498 100644 --- a/hplip.spec +++ b/hplip.spec @@ -202,6 +202,8 @@ Patch65: hplip-gpgdir-perms.patch # 1987141 - hp-plugin installs malformed udev files # reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 Patch66: hplip-plugin-udevissues.patch +# reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 +Patch67: hplip-osname-mismatch.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -505,6 +507,8 @@ done %patch65 -p1 -b .gpgdir-perms # 1987141 - hp-plugin installs malformed udev files %patch66 -p1 -b .hpplugin-udevperms +# upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 +%patch67 -p1 -b .osname-mismatch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -856,6 +860,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop * Fri Jul 30 2021 Zdenek Dohnal - 3.21.2-10 - 1985251 - Incorrect permission for gpg directory - 1987141 - hp-plugin installs malformed udev files +- fixed warning: redhatenterpriselinux distro is not found in AUTH_TYPES * Thu Jul 22 2021 Fedora Release Engineering - 3.21.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 53aab4a41020bf91eb349705331765ab21f0358e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 3 Sep 2021 11:19:33 +0200 Subject: [PATCH 071/166] 1995647 - Hplip package shows as proprietary in Gnome Software --- hplip.appdata.xml | 6 +++--- hplip.spec | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hplip.appdata.xml b/hplip.appdata.xml index 9c0b711..17ddd4a 100644 --- a/hplip.appdata.xml +++ b/hplip.appdata.xml @@ -1,9 +1,9 @@ - - HP-hplip.desktop + + hplip.desktop CC0-1.0 - GPL-2.0 and MIT and BSD-2-Clause + GPL-2.0+ HPLIP Graphic Tools HPLIP GUI tools and GUI part of other HPLIP tools diff --git a/hplip.spec b/hplip.spec index 5d55498..58b952f 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,8 +7,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 10%{?dist} -License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC +Release: 11%{?dist} +License: GPLv2+ and MIT and BSD and IJG and and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing # Original source tarball @@ -857,6 +857,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Sep 03 2021 Zdenek Dohnal - 3.21.2-11 +- 1995647 - Hplip package shows as proprietary in Gnome Software + * Fri Jul 30 2021 Zdenek Dohnal - 3.21.2-10 - 1985251 - Incorrect permission for gpg directory - 1987141 - hp-plugin installs malformed udev files From 8f08be8b1fe606747464215a90cf4750ad5d1db4 Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:04:18 +0200 Subject: [PATCH 072/166] Rebuilt with OpenSSL 3.0.0 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 58b952f..6957d22 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2+ and MIT and BSD and IJG and and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -857,6 +857,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Sep 14 2021 Sahana Prasad - 3.21.2-12 +- Rebuilt with OpenSSL 3.0.0 + * Fri Sep 03 2021 Zdenek Dohnal - 3.21.2-11 - 1995647 - Hplip package shows as proprietary in Gnome Software From 8d02f877eb3bb47fb27d36bbe4748842124a40a0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 26 Oct 2021 13:15:11 +0200 Subject: [PATCH 073/166] 2015428 - python3.10 has Callable in collections.abc --- hplip-py310-collections-abc.patch | 26 ++++++++++++++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 hplip-py310-collections-abc.patch diff --git a/hplip-py310-collections-abc.patch b/hplip-py310-collections-abc.patch new file mode 100644 index 0000000..48b3e88 --- /dev/null +++ b/hplip-py310-collections-abc.patch @@ -0,0 +1,26 @@ +diff --git a/base/exif.py b/base/exif.py +index 2b8c447..38dca63 100644 +--- a/base/exif.py ++++ b/base/exif.py +@@ -798,7 +798,7 @@ class EXIF_header: + tag_name=tag_entry[0] + if len(tag_entry) != 1: + # optional 2nd tag element is present +- if isinstance(tag_entry[1], collections.Callable): ++ if isinstance(tag_entry[1], collections.abc.Callable): + # call mapping function + printable=tag_entry[1](values) + else: +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index 48b248f..aa911a5 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -1267,7 +1267,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + def ActionsList_clicked(self, item): + if item is not None and self.click_lock is not item: + self.click_lock = item +- if item.cmd and isinstance(item.cmd, collections.Callable): ++ if item.cmd and isinstance(item.cmd, collections.abc.Callable): + dlg = item.cmd() + self.sendMessage('', '', EVENT_DEVICE_STOP_POLLING) + try: diff --git a/hplip.spec b/hplip.spec index 6957d22..4c6e6db 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ and MIT and BSD and IJG and and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -204,6 +204,9 @@ Patch65: hplip-gpgdir-perms.patch Patch66: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 Patch67: hplip-osname-mismatch.patch +# 2015428 - python3.10 has Callable in collections.abc +# reported as https://bugs.launchpad.net/hplip/+bug/1948801 +Patch68: hplip-py310-collections-abc.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -509,6 +512,8 @@ done %patch66 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 %patch67 -p1 -b .osname-mismatch +# 2015428 - python3.10 has Callable in collections.abc +%patch68 -p1 -b .abc %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -857,6 +862,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Oct 26 2021 Zdenek Dohnal - 3.21.2-13 +- 2015428 - python3.10 has Callable in collections.abc + * Tue Sep 14 2021 Sahana Prasad - 3.21.2-12 - Rebuilt with OpenSSL 3.0.0 From 416b1932b5b293aa80c214560fc72e87623b7ef3 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 26 Oct 2021 13:16:17 +0200 Subject: [PATCH 074/166] GUI hp-setup uses avahi-browse --- hplip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hplip.spec b/hplip.spec index 4c6e6db..d8d96e4 100644 --- a/hplip.spec +++ b/hplip.spec @@ -294,6 +294,8 @@ Libraries needed by HPLIP. Summary: HPLIP graphical tools License: BSD BuildRequires: libappstream-glib +# for avahi-browse - looks for devices on local network +Recommends: avahi-tools Requires: python3-qt5 Requires: python3-reportlab # hpssd.py @@ -864,6 +866,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Tue Oct 26 2021 Zdenek Dohnal - 3.21.2-13 - 2015428 - python3.10 has Callable in collections.abc +- GUI hp-setup uses avahi-browse * Tue Sep 14 2021 Sahana Prasad - 3.21.2-12 - Rebuilt with OpenSSL 3.0.0 From 437db9d4518b60cc387df259293ab70f20f69457 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 26 Oct 2021 13:22:41 +0200 Subject: [PATCH 075/166] hplip-osname-mismatch.patch: adjust osname for Fedora CoreOS/Linux --- hplip-osname-mismatch.patch | 12 ++++++++++-- hplip.spec | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hplip-osname-mismatch.patch b/hplip-osname-mismatch.patch index 205de4d..3c38172 100644 --- a/hplip-osname-mismatch.patch +++ b/hplip-osname-mismatch.patch @@ -1,8 +1,8 @@ diff --git a/base/password.py b/base/password.py -index bff9f80..269ebd8 100644 +index bff9f80..d4aac78 100644 --- a/base/password.py +++ b/base/password.py -@@ -97,7 +97,7 @@ def get_distro_name(): +@@ -97,13 +97,15 @@ def get_distro_name(): os_name = name.read().strip() name.close() @@ -11,3 +11,11 @@ index bff9f80..269ebd8 100644 if "redhatenterprise" in os_name: os_name = 'rhel' elif "suse" in os_name: + os_name = 'suse' + elif "arch" in os_name: + os_name = 'manjarolinux' ++ elif "fedora" in os_name: ++ os_name = 'fedora' + + return os_name + diff --git a/hplip.spec b/hplip.spec index d8d96e4..8c84ef1 100644 --- a/hplip.spec +++ b/hplip.spec @@ -867,6 +867,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop * Tue Oct 26 2021 Zdenek Dohnal - 3.21.2-13 - 2015428 - python3.10 has Callable in collections.abc - GUI hp-setup uses avahi-browse +- adjust osname for CoreOS/Linux * Tue Sep 14 2021 Sahana Prasad - 3.21.2-12 - Rebuilt with OpenSSL 3.0.0 From 302fef07d87d0e7c3bdcefb570385e99c145611f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 26 Oct 2021 13:34:21 +0200 Subject: [PATCH 076/166] 2015428 - python3.10 doesn't do an implicit conversion for integer arguments --- hplip-qt5-convert2int.patch | 59 +++++++++++++++++++++++++++++++++++++ hplip.spec | 8 +++++ 2 files changed, 67 insertions(+) create mode 100644 hplip-qt5-convert2int.patch diff --git a/hplip-qt5-convert2int.patch b/hplip-qt5-convert2int.patch new file mode 100644 index 0000000..721e80e --- /dev/null +++ b/hplip-qt5-convert2int.patch @@ -0,0 +1,59 @@ +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index aa911a5..a650017 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -1688,7 +1688,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + + def createStatusLevelGraphic(self, percent, agent_type, w=100, h=18): + if percent: +- fw = w/100*percent ++ fw = int(w/100*percent) + else: + fw = 0 + +@@ -1706,12 +1706,12 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + pp.fillRect(0, 0, fw, h, QBrush(QColor(map[0]))) + + elif map_len == 2: +- h2 = h / 2 ++ h2 = int(h / 2) + pp.fillRect(0, 0, fw, h2, QBrush(QColor(map[0]))) + pp.fillRect(0, h2, fw, h, QBrush(QColor(map[1]))) + + elif map_len == 3: +- h3 = h / 3 ++ h3 = int(h / 3) + h23 = 2 * h3 + pp.fillRect(0, 0, fw, h3, QBrush(QColor(map[0]))) + pp.fillRect(0, h3, fw, h23, QBrush(QColor(map[1]))) +@@ -1725,8 +1725,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + pp.setPen(Qt.white) + + # 75% ticks +- w1 = 3 * w / 4 +- h6 = h / 6 ++ w1 = int(3 * w / 4) ++ h6 = int(h / 6) + pp.drawLine(w1, 0, w1, h6) + pp.drawLine(w1, h, w1, h-h6) + +@@ -1735,8 +1735,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + pp.setPen(Qt.white) + + # 50% ticks +- w2 = w / 2 +- h4 = h / 4 ++ w2 = int(w / 2) ++ h4 = int(h / 4) + pp.drawLine(w2, 0, w2, h4) + pp.drawLine(w2, h, w2, h-h4) + +@@ -1745,7 +1745,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + pp.setPen(Qt.white) + + # 25% ticks +- w4 = w / 4 ++ w4 = int(w / 4) + pp.drawLine(w4, 0, w4, h6) + pp.drawLine(w4, h, w4, h-h6) + diff --git a/hplip.spec b/hplip.spec index 8c84ef1..42b06ec 100644 --- a/hplip.spec +++ b/hplip.spec @@ -207,6 +207,10 @@ Patch67: hplip-osname-mismatch.patch # 2015428 - python3.10 has Callable in collections.abc # reported as https://bugs.launchpad.net/hplip/+bug/1948801 Patch68: hplip-py310-collections-abc.patch +# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals +# fractions and others to an integer argument +# reported as https://bugs.launchpad.net/hplip/+bug/1948801 +Patch69: hplip-qt5-convert2int.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -516,6 +520,9 @@ done %patch67 -p1 -b .osname-mismatch # 2015428 - python3.10 has Callable in collections.abc %patch68 -p1 -b .abc +# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals +# fractions and others to an integer argument +%patch69 -p1 -b .qt5-convert2int.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -868,6 +875,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop - 2015428 - python3.10 has Callable in collections.abc - GUI hp-setup uses avahi-browse - adjust osname for CoreOS/Linux +- 2015428 - python3.10 doesn't do an implicit conversion for integer arguments * Tue Sep 14 2021 Sahana Prasad - 3.21.2-12 - Rebuilt with OpenSSL 3.0.0 From d6bd8532ea39e4a36ca663b1fd6c36db46597018 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 23 Nov 2021 13:03:13 +0100 Subject: [PATCH 077/166] 2025853 - hplip: double "and" in license --- hplip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 42b06ec..269e869 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,8 +7,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 13%{?dist} -License: GPLv2+ and MIT and BSD and IJG and and GPLv2+ with exceptions and ISC +Release: 14%{?dist} +License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing # Original source tarball @@ -871,6 +871,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Nov 23 2021 Zdenek Dohnal - 3.21.2-14 +- 2025853 - hplip: double "and" in license + * Tue Oct 26 2021 Zdenek Dohnal - 3.21.2-13 - 2015428 - python3.10 has Callable in collections.abc - GUI hp-setup uses avahi-browse From 7153ae8af4dbc5fac6c6da37e37598b7a029ec73 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 3 Dec 2021 08:30:44 +0100 Subject: [PATCH 078/166] 2028697 - hp-setup trackbacks when hplip-gui RPM is not installed --- hplip-fedora-gui.patch | 4 ++-- hplip-ui-optional.patch | 4 ++-- hplip.spec | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hplip-fedora-gui.patch b/hplip-fedora-gui.patch index 47c9312..499f4da 100644 --- a/hplip-fedora-gui.patch +++ b/hplip-fedora-gui.patch @@ -5,7 +5,7 @@ index d493b54..401dc41 100644 @@ -727,8 +727,8 @@ def canEnterGUIMode4(): # qt4 except ImportError: try: - import ui5 + import ui5.setupdialog - except ImportError as e: - log.warn(e) + except ImportError: @@ -22,7 +22,7 @@ index d493b54..401dc41 100644 log.error("PyQt not installed. GUI not available. Exiting.") @@ -800,6 +801,7 @@ def checkPyQtImport4(): - import ui5 + import ui5.setupdialog except ImportError: log.debug('GUI not available.') + log.error('hplip-gui not installed. GUI not available.') diff --git a/hplip-ui-optional.patch b/hplip-ui-optional.patch index 4b3f525..d724a30 100644 --- a/hplip-ui-optional.patch +++ b/hplip-ui-optional.patch @@ -27,7 +27,7 @@ index 98437a3..9b8813b 100644 + import ui4 + except ImportError: + try: -+ import ui5 ++ import ui5.setupdialog + except ImportError as e: + log.warn(e) + return False @@ -58,7 +58,7 @@ index 98437a3..9b8813b 100644 - return False + try: + import PyQt5 -+ import ui5 ++ import ui5.setupdialog + except ImportError: + log.debug('GUI not available.') + return False diff --git a/hplip.spec b/hplip.spec index 269e869..2d7bc5d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.2 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -871,6 +871,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Dec 03 2021 Zdenek Dohnal - 3.21.2-15 +- 2028697 - hp-setup trackbacks when hplip-gui RPM is not installed + * Tue Nov 23 2021 Zdenek Dohnal - 3.21.2-14 - 2025853 - hplip: double "and" in license From 11664de4a601aed3073c10f06e8ac5ff29eb0257 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jan 2022 15:55:49 +0100 Subject: [PATCH 079/166] 1959242 - hplip-3.21.12 is available --- .gitignore | 1 + ...Processor-functionality-which-is-clo.patch | 95 +----- hplip-keyserver.patch | 28 +- hplip-logdir.patch | 20 +- hplip-missing-drivers.patch | 46 +-- hplip-missing-links.patch | 11 +- hplip-osname-mismatch.patch | 21 +- hplip-py310-collections-abc.patch | 13 - hplip-pyssizet_clean.patch | 76 ----- hplip-qt5-convert2int.patch | 59 ---- ...ceoption.patch => hplip-sourceoption.patch | 0 hplip-thread-isalive-removed.patch | 93 ------ hplip-timeb-removed.patch | 12 - hplip.spec | 300 +++++++++--------- sources | 2 +- 15 files changed, 219 insertions(+), 558 deletions(-) delete mode 100644 hplip-pyssizet_clean.patch delete mode 100644 hplip-qt5-convert2int.patch rename hplip-3165-sourceoption.patch => hplip-sourceoption.patch (100%) delete mode 100644 hplip-thread-isalive-removed.patch delete mode 100644 hplip-timeb-removed.patch diff --git a/.gitignore b/.gitignore index 92a0061..66c412f 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ hplip-3.10.6.tar.gz /hplip-3.20.11.tar.gz /hplip-3.21.2.tar.gz /hplip-3.21.2-repack.tar.gz +/hplip-3.21.12-repack.tar.gz diff --git a/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch index 1582480..7c61d77 100644 --- a/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch +++ b/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch @@ -1,16 +1,17 @@ -diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am ---- hplip-3.21.2/Makefile.am.libimageprocessor-removal 2021-02-24 12:38:31.707900421 +0100 -+++ hplip-3.21.2/Makefile.am 2021-02-24 12:38:31.735900172 +0100 +diff --git a/Makefile.am b/Makefile.am +index f65afea..12317dc 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py endif #HPLIP_CLASS_DRIVER -dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so +dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template - dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv - if !HPLIP_CLASS_DRIVER -@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte + dist_noinst_DATA += prnt/ipp-usb/HPLIP.conf + dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv +@@ -597,7 +597,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp prnt/hpcups/ImageProcessor.h hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) @@ -19,7 +20,7 @@ diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefil #else #hpcupsdir = $(cupsfilterdir) #hpcups_PROGRAMS = hpcups -@@ -685,16 +685,6 @@ endif #HPLIP_CLASS_DRIVER +@@ -687,16 +687,6 @@ endif #HPLIP_CLASS_DRIVER install-data-hook: if HPLIP_BUILD @@ -33,80 +34,6 @@ diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefil - chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ - ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ - fi - if !HPLIP_CLASS_DRIVER - # If scanner build, add hpaio entry to sane dll.conf. - if [ "$(scan_build)" = "yes" ]; then \ -diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2021-02-24 12:38:31.701900474 +0100 -+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-24 12:42:49.445720549 +0100 -@@ -31,7 +31,6 @@ - \*****************************************************************************/ - - #include "HPCupsFilter.h" --#include "ImageProcessor.h" - - #include - #include -@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups - - snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); - -- image_processor_t* imageProcessor=NULL; -- IMAGE_PROCESSOR_ERROR result; -- //added if condition to check if pinter language is "ljzjstream" -- //If so, then bypass imageprocessing functions while running HPCUPS filter. -- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ -- imageProcessor = imageProcessorCreate(); -- } - while (cupsRasterReadHeader2(cups_raster, &cups_header)) - { -- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ -- result = imageProcessorStartPage(imageProcessor, &cups_header); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); -- } -- } - current_page_number++; - - if (current_page_number == 1) { -@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups - color_raster = rgbRaster; - black_raster = kRaster; - -- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) -- { -- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); -- } -- } -- - if ((y == 0) && !is_ljmono) { - //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer - //may not skip blank lines before actual data -@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups - } - } // for() loop end - -- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) -- { -- result = imageProcessorEndPage(imageProcessor); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); -- } -- } -- - m_Job.NewPage(); - if (err != NO_ERROR) { - break; -@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups - } - - -- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) -- { -- imageProcessorDestroy(imageProcessor); -- } - unlink(hpPreProcessedRasterFile); - return ret_status; - } + if [ -d "/usr/share/ipp-usb/quirks/" ]; then \ + echo "ipp-usb directory exists"; \ + cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \ diff --git a/hplip-keyserver.patch b/hplip-keyserver.patch index e285799..9b457f1 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -1,6 +1,7 @@ -diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py ---- hplip-3.20.3/base/tui.py.keyserver 2020-03-10 09:01:53.000000000 +0100 -+++ hplip-3.20.3/base/tui.py 2020-04-07 08:44:44.319710001 +0200 +diff --git a/base/tui.py b/base/tui.py +index 99bda7b..0f90f92 100644 +--- a/base/tui.py ++++ b/base/tui.py @@ -241,6 +241,7 @@ class ProgressMeter(object): sys.stdout.write(y) @@ -9,30 +10,25 @@ diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py self.prev_length = len(y) self.spinner_pos = (self.spinner_pos + 1) % 8 -diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py ---- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100 -+++ hplip-3.20.3/base/validation.py 2020-04-07 08:45:46.657132415 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # - # (c) Copyright 2015 HP Development Company, L.P. +diff --git a/base/validation.py b/base/validation.py +index ee6b05a..5e955dc 100644 +--- a/base/validation.py ++++ b/base/validation.py @@ -42,8 +42,11 @@ class DigiSign_Verification(object): class GPG_Verification(DigiSign_Verification): - def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): - self.__pgp_site = pgp_site -+ def __init__(self, keyservers = ['pool.sks-keyservers.net', -+ 'keyserver.ubuntu.com', -+ 'sks-keyservers.net', 'pgp.mit.edu'], ++ def __init__(self, keyservers = ['keyserver.ubuntu.com', ++ 'pgp.surf.nl', ++ 'pgp.mit.edu'], + key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): + self.__keyservers = keyservers self.__key = key self.__gpg = utils.which('gpg',True) -@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verifica +@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verification): def __acquire_gpg_key(self): diff --git a/hplip-logdir.patch b/hplip-logdir.patch index 4b517a5..702d328 100644 --- a/hplip-logdir.patch +++ b/hplip-logdir.patch @@ -1,18 +1,18 @@ -diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir 2021-02-19 07:46:48.334843864 +0100 -+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-19 07:48:18.052963216 +0100 -@@ -656,7 +656,7 @@ int HPCupsFilter::processRasterData(cups +diff -up hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp +--- hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp.logdir 2022-01-12 11:27:25.509348511 +0100 ++++ hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp 2022-01-12 11:29:11.507661838 +0100 +@@ -669,7 +669,7 @@ int HPCupsFilter::processRasterData(cups char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages. - sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); + snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); - - image_processor_t* imageProcessor=NULL; - IMAGE_PROCESSOR_ERROR result; -diff -up hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.2/prnt/hpcups/SystemServices.cpp ---- hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir 2021-02-15 00:55:21.000000000 +0100 -+++ hplip-3.21.2/prnt/hpcups/SystemServices.cpp 2021-02-19 07:46:48.334843864 +0100 + #ifndef DISABLE_IMAGEPROCESSOR + image_processor_t* imageProcessor=NULL; + IMAGE_PROCESSOR_ERROR result; +diff -up hplip-3.21.12/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.12/prnt/hpcups/SystemServices.cpp +--- hplip-3.21.12/prnt/hpcups/SystemServices.cpp.logdir 2021-12-13 10:07:36.000000000 +0100 ++++ hplip-3.21.12/prnt/hpcups/SystemServices.cpp 2022-01-12 11:27:25.509348511 +0100 @@ -38,7 +38,7 @@ SystemServices::SystemServices(int iLogL if (iLogLevel & SAVE_OUT_FILE) { diff --git a/hplip-missing-drivers.patch b/hplip-missing-drivers.patch index 08198bc..852512c 100644 --- a/hplip-missing-drivers.patch +++ b/hplip-missing-drivers.patch @@ -1,15 +1,15 @@ -diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc ---- hplip-3.20.6/cups_drv.inc.missing-drivers 2020-06-09 13:23:14.000000000 +0200 -+++ hplip-3.20.6/cups_drv.inc 2020-06-17 13:49:39.110952720 +0200 -@@ -407,6 +407,7 @@ cups_ppd_printers = \ +diff -up hplip-3.21.12/cups_drv.inc.missing-drivers hplip-3.21.12/cups_drv.inc +--- hplip-3.21.12/cups_drv.inc.missing-drivers 2021-12-13 10:09:00.000000000 +0100 ++++ hplip-3.21.12/cups_drv.inc 2022-01-12 17:28:24.033378078 +0100 +@@ -411,6 +411,7 @@ cups_ppd_printers = \ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ + ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ - ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -520,6 +521,7 @@ cups_ppd_printers = \ + ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \ +@@ -527,6 +528,7 @@ cups_ppd_printers = \ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ @@ -17,9 +17,9 @@ diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/models/models.dat ---- hplip-3.20.6/data/models/models.dat.missing-drivers 2020-06-17 13:49:39.080953000 +0200 -+++ hplip-3.20.6/data/models/models.dat 2020-06-17 13:49:39.120952626 +0200 +diff -up hplip-3.21.12/data/models/models.dat.missing-drivers hplip-3.21.12/data/models/models.dat +--- hplip-3.21.12/data/models/models.dat.missing-drivers 2022-01-12 17:24:45.491790543 +0100 ++++ hplip-3.21.12/data/models/models.dat 2022-01-12 17:24:45.509790591 +0100 @@ -2104,7 +2104,7 @@ usb-pid=411 usb-vid=3f0 wifi-config=0 @@ -532,18 +532,18 @@ diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/m [hp_laserjet_professional_p1102] align-type=0 clean-type=0 -diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in ---- hplip-3.20.6/Makefile.in.missing-drivers 2020-06-09 13:23:20.000000000 +0200 -+++ hplip-3.20.6/Makefile.in 2020-06-17 13:49:39.110952720 +0200 -@@ -1571,6 +1571,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase +diff -up hplip-3.21.12/Makefile.in.missing-drivers hplip-3.21.12/Makefile.in +--- hplip-3.21.12/Makefile.in.missing-drivers 2021-12-13 10:09:02.000000000 +0100 ++++ hplip-3.21.12/Makefile.in 2022-01-12 17:29:11.983506989 +0100 +@@ -1613,6 +1613,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ + ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ - ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -1685,6 +1686,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase + ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \ +@@ -1730,6 +1731,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ @@ -551,15 +551,15 @@ diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \ -@@ -3961,6 +3963,7 @@ dist_unrel_DATA = +@@ -4080,6 +4082,7 @@ dist_unrel_DATA = @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ +@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \ -@@ -4074,6 +4077,7 @@ dist_unrel_DATA = + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \ +@@ -4196,6 +4199,7 @@ dist_unrel_DATA = @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ @@ -567,10 +567,10 @@ diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/drv/hpcups.drv.in ---- hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers 2020-06-17 13:49:39.009953663 +0200 -+++ hplip-3.20.6/prnt/drv/hpcups.drv.in 2020-06-17 13:51:49.576733820 +0200 -@@ -22319,6 +22319,14 @@ Group "RLT/HP Real Life Technologies" +diff -up hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.21.12/prnt/drv/hpcups.drv.in +--- hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers 2022-01-12 17:24:45.451790435 +0100 ++++ hplip-3.21.12/prnt/drv/hpcups.drv.in 2022-01-12 17:24:45.514790605 +0100 +@@ -22693,6 +22693,14 @@ Group "RLT/HP Real Life Technologies" Attribute "Product" "" "(HP LaserJet Professional p1102s Printer)" } { @@ -585,7 +585,7 @@ diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/d ModelName "HP LaserJet Professional p1106" Attribute "NickName" "" "HP LaserJet Professional p1106, hpcups $Version" Attribute "ShortNickName" "" "HP LJ Pro p1106 hpijs" -@@ -22752,6 +22760,14 @@ Group "RLT/HP Real Life Technologies" +@@ -23126,6 +23134,14 @@ Group "RLT/HP Real Life Technologies" PCFileName "hp-laserjet_cp1025nw.ppd" Attribute "Product" "" "(HP LaserJet Pro cp1025nw Color Printer Series)" } diff --git a/hplip-missing-links.patch b/hplip-missing-links.patch index 3e19877..0deab1f 100644 --- a/hplip-missing-links.patch +++ b/hplip-missing-links.patch @@ -1,9 +1,8 @@ -diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py -index 4d7c1b8..1af8d85 100755 ---- a/installer/pluginhandler.py -+++ b/installer/pluginhandler.py -@@ -164,7 +164,7 @@ class PluginHandle(object): - for src, trg, link in copies: +diff -up hplip-3.21.12/installer/pluginhandler.py.missing-links hplip-3.21.12/installer/pluginhandler.py +--- hplip-3.21.12/installer/pluginhandler.py.missing-links 2022-01-12 16:55:39.761934879 +0100 ++++ hplip-3.21.12/installer/pluginhandler.py 2022-01-12 17:22:33.367435334 +0100 +@@ -167,7 +167,7 @@ class PluginHandle(object): + continue if link != "": if not utils.check_library(link): - self.__plugin_state = PLUGIN_FILES_CORRUPTED diff --git a/hplip-osname-mismatch.patch b/hplip-osname-mismatch.patch index 3c38172..5f8acb4 100644 --- a/hplip-osname-mismatch.patch +++ b/hplip-osname-mismatch.patch @@ -1,21 +1,12 @@ -diff --git a/base/password.py b/base/password.py -index bff9f80..d4aac78 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -97,13 +97,15 @@ def get_distro_name(): +diff -up hplip-3.21.12/base/password.py.osname-mismatch hplip-3.21.12/base/password.py +--- hplip-3.21.12/base/password.py.osname-mismatch 2022-01-14 08:36:11.413431048 +0100 ++++ hplip-3.21.12/base/password.py 2022-01-14 09:14:57.315230889 +0100 +@@ -105,7 +105,7 @@ def get_distro_name(): os_name = name.read().strip() name.close() - os_name = os_name.lower() + os_name = os_name.lower().replace(' ','') + if 'MX' in distro_release_name: + os_name = "mxlinux" if "redhatenterprise" in os_name: - os_name = 'rhel' - elif "suse" in os_name: - os_name = 'suse' - elif "arch" in os_name: - os_name = 'manjarolinux' -+ elif "fedora" in os_name: -+ os_name = 'fedora' - - return os_name - diff --git a/hplip-py310-collections-abc.patch b/hplip-py310-collections-abc.patch index 48b3e88..a31687d 100644 --- a/hplip-py310-collections-abc.patch +++ b/hplip-py310-collections-abc.patch @@ -11,16 +11,3 @@ index 2b8c447..38dca63 100644 # call mapping function printable=tag_entry[1](values) else: -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index 48b248f..aa911a5 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -1267,7 +1267,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - def ActionsList_clicked(self, item): - if item is not None and self.click_lock is not item: - self.click_lock = item -- if item.cmd and isinstance(item.cmd, collections.Callable): -+ if item.cmd and isinstance(item.cmd, collections.abc.Callable): - dlg = item.cmd() - self.sendMessage('', '', EVENT_DEVICE_STOP_POLLING) - try: diff --git a/hplip-pyssizet_clean.patch b/hplip-pyssizet_clean.patch deleted file mode 100644 index 0f9bc0b..0000000 --- a/hplip-pyssizet_clean.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/io/mudext/hpmudext.c b/io/mudext/hpmudext.c -index dca3e9d..dfcd22a 100644 ---- a/io/mudext/hpmudext.c -+++ b/io/mudext/hpmudext.c -@@ -24,6 +24,8 @@ Authors: Don Welch, David Suffield, Naga Samrat Chowdary Narla - - \*****************************************************************************/ - -+#define PY_SSIZE_T_CLEAN -+ - #include - #include - #include "hpmud.h" -@@ -187,14 +189,22 @@ static PyObject *write_channel(PyObject *self, PyObject *args) - HPMUD_CHANNEL cd; - int timeout = 30; - char * buf; -- int buf_size = 0; -+ Py_ssize_t buf_size = 0; -+ int buf_size_asInt = 0; - int bytes_written = 0; - - if (!PyArg_ParseTuple(args, "iis#|i", &dd, &cd, &buf, &buf_size, &timeout)) - return NULL; - -+ if (buf_size < INT_MIN) -+ buf_size_asInt = INT_MIN; -+ else if (buf_size > INT_MAX) -+ buf_size_asInt = INT_MAX; -+ else -+ buf_size_asInt = (int)buf_size; -+ - Py_BEGIN_ALLOW_THREADS -- result = hpmud_write_channel(dd, cd, buf, buf_size, timeout, &bytes_written); -+ result = hpmud_write_channel(dd, cd, buf, buf_size_asInt, timeout, &bytes_written); - Py_END_ALLOW_THREADS - - return Py_BuildValue("(ii)", result, bytes_written); -@@ -231,14 +241,22 @@ static PyObject *set_pml(PyObject *self, PyObject *args) - char * oid; - int type; - char * data; -- int data_size; -+ Py_ssize_t data_size = 0; -+ int data_size_asInt = 0; - int pml_result; - - if (!PyArg_ParseTuple(args, "iisis#", &dd, &cd, &oid, &type, &data, &data_size)) - return NULL; - -+ if (data_size < INT_MIN) -+ data_size_asInt = INT_MIN; -+ else if (data_size > INT_MAX) -+ data_size_asInt = INT_MAX; -+ else -+ data_size_asInt = (int)data_size; -+ - Py_BEGIN_ALLOW_THREADS -- result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size, &pml_result); -+ result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size_asInt, &pml_result); - Py_END_ALLOW_THREADS - - return Py_BuildValue("(ii)", result, pml_result); -diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c -index 1e6b514..597abd8 100755 ---- a/scan/scanext/scanext.c -+++ b/scan/scanext/scanext.c -@@ -45,6 +45,8 @@ PERFORMANCE OF THIS SOFTWARE. - *******************************************************************/ - - -+#define PY_SSIZE_T_CLEAN -+ - /* _ScanDevice objects */ - - #include "Python.h" diff --git a/hplip-qt5-convert2int.patch b/hplip-qt5-convert2int.patch deleted file mode 100644 index 721e80e..0000000 --- a/hplip-qt5-convert2int.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index aa911a5..a650017 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -1688,7 +1688,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - - def createStatusLevelGraphic(self, percent, agent_type, w=100, h=18): - if percent: -- fw = w/100*percent -+ fw = int(w/100*percent) - else: - fw = 0 - -@@ -1706,12 +1706,12 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - pp.fillRect(0, 0, fw, h, QBrush(QColor(map[0]))) - - elif map_len == 2: -- h2 = h / 2 -+ h2 = int(h / 2) - pp.fillRect(0, 0, fw, h2, QBrush(QColor(map[0]))) - pp.fillRect(0, h2, fw, h, QBrush(QColor(map[1]))) - - elif map_len == 3: -- h3 = h / 3 -+ h3 = int(h / 3) - h23 = 2 * h3 - pp.fillRect(0, 0, fw, h3, QBrush(QColor(map[0]))) - pp.fillRect(0, h3, fw, h23, QBrush(QColor(map[1]))) -@@ -1725,8 +1725,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - pp.setPen(Qt.white) - - # 75% ticks -- w1 = 3 * w / 4 -- h6 = h / 6 -+ w1 = int(3 * w / 4) -+ h6 = int(h / 6) - pp.drawLine(w1, 0, w1, h6) - pp.drawLine(w1, h, w1, h-h6) - -@@ -1735,8 +1735,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - pp.setPen(Qt.white) - - # 50% ticks -- w2 = w / 2 -- h4 = h / 4 -+ w2 = int(w / 2) -+ h4 = int(h / 4) - pp.drawLine(w2, 0, w2, h4) - pp.drawLine(w2, h, w2, h-h4) - -@@ -1745,7 +1745,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - pp.setPen(Qt.white) - - # 25% ticks -- w4 = w / 4 -+ w4 = int(w / 4) - pp.drawLine(w4, 0, w4, h6) - pp.drawLine(w4, h, w4, h-h6) - diff --git a/hplip-3165-sourceoption.patch b/hplip-sourceoption.patch similarity index 100% rename from hplip-3165-sourceoption.patch rename to hplip-sourceoption.patch diff --git a/hplip-thread-isalive-removed.patch b/hplip-thread-isalive-removed.patch deleted file mode 100644 index 080b8fd..0000000 --- a/hplip-thread-isalive-removed.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/copier/copier.py b/copier/copier.py -index a595baa..7794f48 100644 ---- a/copier/copier.py -+++ b/copier/copier.py -@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device): - - def isCopyActive(self): - if self.copy_thread is not None: -- return self.copy_thread.isAlive() -+ return self.copy_thread.is_alive() - else: - return False - - def waitForCopyThread(self): - if self.copy_thread is not None and \ -- self.copy_thread.isAlive(): -+ self.copy_thread.is_alive(): - - self.copy_thread.join() - -diff --git a/fax/fax.py b/fax/fax.py -index 3d69226..0878a64 100644 ---- a/fax/fax.py -+++ b/fax/fax.py -@@ -478,13 +478,13 @@ class FaxDevice(device.Device): - - def isSendFaxActive(self): - if self.send_fax_thread is not None: -- return self.send_fax_thread.isAlive() -+ return self.send_fax_thread.is_alive() - else: - return False - - def waitForSendFaxThread(self): - if self.send_fax_thread is not None and \ -- self.send_fax_thread.isAlive(): -+ self.send_fax_thread.is_alive(): - - try: - self.send_fax_thread.join() -diff --git a/fax/pmlfax.py b/fax/pmlfax.py -index b68ff6a..b1020d0 100644 ---- a/fax/pmlfax.py -+++ b/fax/pmlfax.py -@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice): - - def isUploadLogActive(self): - if self.upload_log_thread is not None: -- return self.upload_log_thread.isAlive() -+ return self.upload_log_thread.is_alive() - else: - return False - - def waitForUploadLogThread(self): - if self.upload_log_thread is not None and \ -- self.upload_log_thread.isAlive(): -+ self.upload_log_thread.is_alive(): - - self.upload_log_thread.join() - -diff --git a/scan/sane.py b/scan/sane.py -index b6c4acd..e8f8db8 100755 ---- a/scan/sane.py -+++ b/scan/sane.py -@@ -378,14 +378,14 @@ class ScanDevice: - - def isScanActive(self): - if self.scan_thread is not None: -- return self.scan_thread.isAlive() and self.scan_thread.scan_active -+ return self.scan_thread.is_alive() and self.scan_thread.scan_active - else: - return False - - - def waitForScanDone(self): - if self.scan_thread is not None and \ -- self.scan_thread.isAlive() and \ -+ self.scan_thread.is_alive() and \ - self.scan_thread.scan_active: - - try: -@@ -398,9 +398,9 @@ class ScanDevice: - #time.sleep(0.5) - if self.scan_thread is not None: - while True: -- #print self.scan_thread.isAlive() -+ #print self.scan_thread.is_alive() - #print self.scan_thread.scan_active -- if self.scan_thread.isAlive() and \ -+ if self.scan_thread.is_alive() and \ - self.scan_thread.scan_active: - return - diff --git a/hplip-timeb-removed.patch b/hplip-timeb-removed.patch deleted file mode 100644 index 1dc9aff..0000000 --- a/hplip-timeb-removed.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/prnt/hpcups/CommonDefinitions.h b/prnt/hpcups/CommonDefinitions.h -index 082aec9..86763d4 100644 ---- a/prnt/hpcups/CommonDefinitions.h -+++ b/prnt/hpcups/CommonDefinitions.h -@@ -48,7 +48,6 @@ - #include - #include - #include --#include - #include - - #ifndef _GNU_SOURCE diff --git a/hplip.spec b/hplip.spec index 2d7bc5d..17ab630 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.21.2 -Release: 15%{?dist} +Version: 3.21.12 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -46,45 +46,45 @@ Patch15: hplip-ppd-ImageableArea.patch Patch16: hplip-scan-tmp.patch Patch17: hplip-log-stderr.patch Patch18: hplip-avahi-parsing.patch -Patch20: hplip-dj990c-margin.patch -Patch21: hplip-strncpy.patch -Patch22: hplip-no-write-bytecode.patch -Patch23: hplip-silence-ioerror.patch -Patch24: hplip-3165-sourceoption.patch -Patch25: hplip-noernie.patch -Patch26: hplip-appdata.patch -Patch27: hplip-check-cups.patch -Patch30: hplip-typo.patch +Patch19: hplip-dj990c-margin.patch +Patch20: hplip-strncpy.patch +Patch21: hplip-no-write-bytecode.patch +Patch22: hplip-silence-ioerror.patch +Patch23: hplip-sourceoption.patch +Patch24: hplip-noernie.patch +Patch25: hplip-appdata.patch +Patch26: hplip-check-cups.patch +Patch27: hplip-typo.patch # python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py - # that results in text string going into translate function in base/utils.py, which # expects binary string because of parameters. Remove this patch if base/utils.py # code gets fixed. -Patch31: hplip-use-binary-str.patch +Patch28: hplip-use-binary-str.patch # m278-m281 doesn't work correctly again -Patch32: hplip-error-print.patch -Patch33: hplip-hpfax-importerror-print.patch -Patch34: hplip-wifisetup.patch +Patch29: hplip-error-print.patch +Patch30: hplip-hpfax-importerror-print.patch +Patch31: hplip-wifisetup.patch # pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers # to choose (Bz#1641100, launchpad#1799212) -Patch35: hplip-keyserver.patch +Patch32: hplip-keyserver.patch # QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments, # This patch solves most of them -Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch +Patch33: 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. -Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch +Patch34: 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. -Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch +Patch35: 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 -Patch39: hplip-add-ppd-crash.patch +Patch36: 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. @@ -93,67 +93,67 @@ Patch39: 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 -Patch40: hplip-missing-links.patch +Patch37: 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. -Patch41: hplip-hplj-3052.patch +Patch38: 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 -Patch42: hplip-hpmud-string-parse.patch +Patch39: 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 -Patch43: hplip-m278-m281-needs-plugin.patch +Patch40: 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 -Patch44: hplip-hpcups-crash.patch +Patch41: hplip-hpcups-crash.patch # Fixing the issues found by coverity scan # reported upstream https://bugs.launchpad.net/hplip/+bug/1808145 -Patch45: hplip-covscan.patch +Patch42: 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 -Patch46: hplip-logging-segfault.patch +Patch43: 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 -Patch47: hplip-systray-blockerror.patch +Patch44: 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 -Patch48: hplip-missing-drivers.patch +Patch45: hplip-missing-drivers.patch # laserjet 2200 and other devices have different device id than HP expects... # https://bugzilla.redhat.com/show_bug.cgi?id=1772698 # reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 -Patch49: hplip-model-mismatch.patch +Patch46: hplip-model-mismatch.patch # sixext has problems with python3 strings (bz#1573430) # reported https://bugs.launchpad.net/bugs/1480152 -Patch50: hplip-unicodeerror.patch +Patch47: hplip-unicodeerror.patch # error with new gcc, already reported in upstream as # https://bugs.launchpad.net/hplip/+bug/1836735 -Patch51: hplip-fix-Wreturn-type-warning.patch +Patch48: hplip-fix-Wreturn-type-warning.patch # upstream check for python clears OS build system # CFLAGS # https://bugs.launchpad.net/hplip/+bug/1879445 -Patch52: hplip-configure-python.patch +Patch49: hplip-configure-python.patch # taken from hplip upstream report - toolbox uses deprecated method # setMargin(), which generates an exception, resulting in a infinite loop # of request on cupsd # https://bugs.launchpad.net/hplip/+bug/1880275 -Patch53: hplip-dialog-infinite-loop.patch +Patch50: hplip-dialog-infinite-loop.patch # searching algorithm did not expect '-' in model name and thought it is a new PDL # it resulted in incorrect PPD match, so e.g. hpijs driver was used instead of hpcups # bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014 # reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587 -Patch54: hplip-find-driver.patch +Patch51: hplip-find-driver.patch # hp-clean didn't work for Photosmart C1410 because it was comparing # string length with buffer size for string object, which is different, # causing cleaning to fail - the fix is to make the object bytes-like, @@ -162,61 +162,88 @@ Patch54: hplip-find-driver.patch # for the device, but there can be similar issues with other devices # bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308 # reported upstream https://bugs.launchpad.net/hplip/+bug/1882193 -Patch55: hplip-clean-ldl.patch +Patch52: hplip-clean-ldl.patch # 3.20.6 turned off requirement for most devices which needed it # - it will cause malfunction of printing and scanning for them # https://bugs.launchpad.net/hplip/+bug/1883898 -Patch56: hplip-revert-plugins.patch -# python3.9 removes threading.Thread.isAlive() and it is substituted -# by threading.Thread.is_alive() -# https://bugzilla.redhat.com/show_bug.cgi?id=1861055 -# reported upstream https://bugs.launchpad.net/fedora/+bug/1889280 -Patch57: hplip-thread-isalive-removed.patch -# glibc moved timeb.h into compat package and it will be removed in the future -# the code doesn't use anything from timeb.h, so it is safe to remove it -# reported upstream https://bugs.launchpad.net/hplip/+bug/1900977 -Patch58: hplip-timeb-removed.patch +Patch53: hplip-revert-plugins.patch # non-sudoers cannot authenticate # reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 -Patch59: hplip-check-userperms.patch +Patch54: hplip-check-userperms.patch # 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly # getOpenFileName returns a tuple, but hp-fab expects a simple variable # reported upstream as https://bugs.launchpad.net/hplip/+bug/1914743 -Patch60: hplip-fab-import.patch +Patch55: hplip-fab-import.patch # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message # reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 -Patch61: hplip-hpsetup-noscanjets.patch +Patch56: hplip-hpsetup-noscanjets.patch # 1951922 - hp-systray doesn't support a valid --qt5 option # reported upstream https://bugs.launchpad.net/hplip/+bug/1925480 -Patch62: hplip-systray-qt5.patch +Patch57: hplip-systray-qt5.patch # 1963114 - patch for hplip firmware load timeout fix # reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 -Patch63: hplip-hpfirmware-timeout.patch -# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats -# reported upstream https://bugs.launchpad.net/hplip/+bug/1933973 -Patch64: hplip-pyssizet_clean.patch +Patch58: hplip-hpfirmware-timeout.patch # 1985251 - Incorrect permission for gpg directory # reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 -Patch65: hplip-gpgdir-perms.patch +Patch59: hplip-gpgdir-perms.patch # 1987141 - hp-plugin installs malformed udev files # reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 -Patch66: hplip-plugin-udevissues.patch +Patch60: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 -Patch67: hplip-osname-mismatch.patch +Patch61: hplip-osname-mismatch.patch # 2015428 - python3.10 has Callable in collections.abc # reported as https://bugs.launchpad.net/hplip/+bug/1948801 -Patch68: hplip-py310-collections-abc.patch -# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals -# fractions and others to an integer argument -# reported as https://bugs.launchpad.net/hplip/+bug/1948801 -Patch69: hplip-qt5-convert2int.patch +Patch62: hplip-py310-collections-abc.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI Patch1000: hplip-fedora-gui.patch %endif +# uses automatic creation of configure +BuildRequires: autoconf +# uses automatic creation of Makefile +BuildRequires: automake +# Make sure we get postscriptdriver tags - need cups and python3-cups. +BuildRequires: cups +BuildRequires: python3-cups +# uses functions from CUPS in filters, backends and libraries defining them +BuildRequires: cups-devel +# gcc and gcc-c++ are no longer in buildroot by default +# gcc is needed for compilation of HPAIO scanning backend, HP implementation of +# IPP and MDNS protocols, hpps driver, hp backend, hpip (image processing +# library), multipoint transport driver hpmud +BuildRequires: gcc +# gcc-c++ is needed for hpijs, hpcups drivers +BuildRequires: gcc-c++ +# support for JPEG file formats in hp-scan +BuildRequires: libjpeg-devel +# uses libtool for autorconf +BuildRequires: libtool +# implements support for USB devices +BuildRequires: libusb1-devel +# uses make +BuildRequires: make +# SLP device discovery is based on SNMP +BuildRequires: net-snmp-devel +# wasn't able to find out why, but SO libraries in hplip-libs require them... +BuildRequires: openssl-devel +# supports mDNS device discovery via Avahi +BuildRequires: pkgconfig(avahi-client) +BuildRequires: pkgconfig(avahi-core) +# implements C Python extensions like hpmudext, cupsext, scanext +BuildRequires: python3-devel +# SANE backend hpaio uses function from SANE API +BuildRequires: sane-backends-devel +BuildRequires: pkgconfig(dbus-1) +# macros: %%{_tmpfilesdir}, %%{_udevrulesdir} +BuildRequires: systemd + +%if 0%{?rhel} <= 8 || 0%{?fedora} +# needed for desktop file validation in spec file +BuildRequires: desktop-file-utils +%endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -236,42 +263,14 @@ Requires: libsane-hpaio Requires: tar # require usbutils, hp-diagnose_queues needs lsusb Requires: usbutils +# uses avahi-browse for discovering IPP-over-USB printers +Recommends: avahi-tools # require coreutils, because timeout binary is needed in post scriptlet, # because hpcups-update-ppds script can freeze in certain situation and # stop the update Requires(post): coreutils -# gcc and gcc-c++ are no longer in buildroot by default - -# gcc is needed for compilation of HPAIO scanning backend, HP implementation of -# IPP and MDNS protocols, hpps driver, hp backend, hpip (image processing -# library), multipoint transport driver hpmud -BuildRequires: gcc -# gcc-c++ is needed for hpijs, hpcups drivers -BuildRequires: gcc-c++ -# uses make -BuildRequires: make - -BuildRequires: autoconf automake libtool -BuildRequires: net-snmp-devel -BuildRequires: pkgconfig(avahi-client) -BuildRequires: pkgconfig(avahi-core) -BuildRequires: cups-devel -BuildRequires: python3-devel -BuildRequires: libjpeg-devel -BuildRequires: desktop-file-utils -BuildRequires: libusb1-devel -BuildRequires: openssl-devel -BuildRequires: sane-backends-devel -BuildRequires: pkgconfig(dbus-1) - -# Make sure we get postscriptdriver tags - need cups and python3-cups. -BuildRequires: cups -BuildRequires: python3-cups - -# macros: %%{_tmpfilesdir}, %%{_udevrulesdir} -BuildRequires: systemd %description The Hewlett-Packard Linux Imaging and Printing Project provides @@ -402,127 +401,118 @@ done %patch18 -p1 -b .parsing # Fixed left/right margins for HP DeskJet 990C (LP #1405212). -%patch20 -p1 -b .dj990c-margin +%patch19 -p1 -b .dj990c-margin # Fixed uses of strncpy throughout. -%patch21 -p1 -b .strncpy +%patch20 -p1 -b .strncpy # Don't try to write bytecode cache for hpfax backend (bug #1192761) # or hp-config_usb_printer (bug #1266903) # or hpps filter (bug #1241548). -%patch22 -p1 -b .no-write-bytecode +%patch21 -p1 -b .no-write-bytecode # Ignore IOError when logging output (bug #712537). -%patch23 -p1 -b .silence-ioerror +%patch22 -p1 -b .silence-ioerror # [abrt] hplip: hp-scan:663::NameError: name 'source_option' is not defined (bug #1341304) -%patch24 -p1 -b .sourceoption +%patch23 -p1 -b .sourceoption # hplip license problem (bug #1364711) -%patch25 -p1 -b .no-ernie +%patch24 -p1 -b .no-ernie # hplip appdata -%patch26 -p1 -b .appdata +%patch25 -p1 -b .appdata # hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467) -%patch27 -p1 -b .check-cups +%patch26 -p1 -b .check-cups # hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869) -%patch30 -p1 -b .typo +%patch27 -p1 -b .typo -%patch31 -p1 -b .use-binary-str +%patch28 -p1 -b .use-binary-str # 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. -%patch32 -p1 -b .error-print-fix +%patch29 -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 -%patch33 -p1 -b .hpfax-import-error-print +%patch30 -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 -%patch34 -p1 -b .wifisetup-bad-call-fix +%patch31 -p1 -b .wifisetup-bad-call-fix # have pool of keyservers to choose -%patch35 -p1 -b .keyserver +%patch32 -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 -%patch36 -p1 -b .qmsgbox-typos-fix +%patch33 -p1 -b .qmsgbox-typos-fix # removal of non open source code, taken from ubuntu -%patch37 -p1 -b .libimageprocessor-removal +%patch34 -p1 -b .libimageprocessor-removal %{_bindir}/rm prnt/hpcups/libImageProcessor-x86* -%patch38 -p1 -b .toolbox-crash +%patch35 -p1 -b .toolbox-crash # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076 -%patch39 -p1 -b .add-ppd-crash +%patch36 -p1 -b .add-ppd-crash # 1671513 - after 'successful' plugin installation it is not installed -%patch40 -p1 -b .missing-links +%patch37 -p1 -b .missing-links # 1684434 - Scanning broken for HP LaserJet 3052 -%patch41 -p1 -b .hp-laserjet-3052-broken-scanning +%patch38 -p1 -b .hp-laserjet-3052-broken-scanning # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1) -%patch42 -p1 -b .hpmud-string-parse +%patch39 -p1 -b .hpmud-string-parse # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2) -%patch43 -p1 -b .m278-m281-needs-plugin +%patch40 -p1 -b .m278-m281-needs-plugin # 1695716 - hpcups crashes in Compressor destructor -%patch44 -p1 -b .hpcups-crash +%patch41 -p1 -b .hpcups-crash # fixing issues found by coverity scan -%patch45 -p1 -b .covscan +%patch42 -p1 -b .covscan # segfault during logging (1727162) -%patch46 -p1 -b .logging-segfault +%patch43 -p1 -b .logging-segfault # 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable -%patch47 -p1 -b .systray-blockerror +%patch44 -p1 -b .systray-blockerror # 1742949, 1740132, 1739855 - missing drivers -%patch48 -p1 -b .missing-drivers +%patch45 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat -%patch49 -p1 -b .model-mismatch +%patch46 -p1 -b .model-mismatch # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes -%patch50 -p1 -b .unicodeerror -%patch51 -p1 -b .Wreturn-fix -%patch52 -p1 -b .configure-python -%patch53 -p1 -b .dialog-infinite-loop +%patch47 -p1 -b .unicodeerror +%patch48 -p1 -b .Wreturn-fix +%patch49 -p1 -b .configure-python +%patch50 -p1 -b .dialog-infinite-loop # 1590014 - hplip PPD search doesn't expect '-' in device name -%patch54 -p1 -b .find-driver +%patch51 -p1 -b .find-driver # 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error -%patch55 -p1 -b .clean-ldl -%patch56 -p1 -b .revert-plugins -# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive() -%patch57 -p1 -b .thread-isalive-removed -# timed.h is removed from glibc -%patch58 -p1 -b .timed-removed +%patch52 -p1 -b .clean-ldl +%patch53 -p1 -b .revert-plugins # 1899410 - non-sudoers cannot authenticate because of bad username in prompt -%patch59 -p1 -b .check-userperms +%patch54 -p1 -b .check-userperms # 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly -%patch60 -p1 -b .fab-import +%patch55 -p1 -b .fab-import # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message -%patch61 -p1 -b .hpsetup-noscanjets +%patch56 -p1 -b .hpsetup-noscanjets # 1951922 - hp-systray doesn't support a valid --qt5 option -%patch62 -p1 -b .systray-qt5 +%patch57 -p1 -b .systray-qt5 # 1963114 - patch for hplip firmware load timeout fix -%patch63 -p1 -b .hpfirmware-timeout -# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats -%patch64 -p1 -b .pyssizet_clean +%patch58 -p1 -b .hpfirmware-timeout # 1985251 - Incorrect permission for gpg directory -%patch65 -p1 -b .gpgdir-perms +%patch59 -p1 -b .gpgdir-perms # 1987141 - hp-plugin installs malformed udev files -%patch66 -p1 -b .hpplugin-udevperms +%patch60 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 -%patch67 -p1 -b .osname-mismatch +%patch61 -p1 -b .osname-mismatch # 2015428 - python3.10 has Callable in collections.abc -%patch68 -p1 -b .abc -# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals -# fractions and others to an integer argument -%patch69 -p1 -b .qt5-convert2int.patch +%patch62 -p1 -b .abc %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -553,13 +543,19 @@ sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in autoreconf --verbose --force --install %configure \ - --enable-scan-build --enable-gui-build --enable-fax-build \ - --disable-foomatic-rip-hplip-install --enable-pp-build \ - --disable-qt4 --enable-qt5 \ - --enable-hpcups-install --enable-cups-drv-install \ + --enable-fax-build \ --enable-foomatic-drv-install \ + --enable-gui-build \ + --enable-hpcups-install \ --enable-hpijs-install \ - --disable-policykit --with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3} + --enable-pp-build \ + --enable-qt5 \ + --enable-scan-build \ + --disable-foomatic-rip-hplip-install \ + --disable-imageProcessor-build \ + --disable-policykit \ + --disable-qt4 \ + --with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3} %make_build @@ -713,6 +709,7 @@ rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff* rm -f %{buildroot}%{_unitdir}/hplip-printer@.service +rm -f %{buildroot}%{_datadir}/ipp-usb/quirks/HPLIP.conf # The systray applet doesn't work properly (displays icon as a # window), so don't ship the launcher yet. @@ -871,6 +868,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 14 2022 Zdenek Dohnal - 3.21.12-1 +- 1959242 - hplip-3.21.12 is available + * Fri Dec 03 2021 Zdenek Dohnal - 3.21.2-15 - 2028697 - hp-setup trackbacks when hplip-gui RPM is not installed diff --git a/sources b/sources index 2b6f9f3..27387b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.21.2-repack.tar.gz) = 294947275e9df31100496a84da2b8a17aa07d12ed7d9e622cd4e68082b4a42f59a20177cca91f42d410bcb31f183fd0c8474d8077c177a565c0eea26134b2418 +SHA512 (hplip-3.21.12-repack.tar.gz) = 56e9f2c5949712625c99129629391fb15e09bd485a0cb343b6482be92726b75e6079f0f9d6fe8f8d2d453d4407b6a8efc3cf31018c97ff36f8b6da11db7d0df5 From fea1bc106d8c1b9a21a1a15bfe9d5676229ed291 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jan 2022 16:12:31 +0100 Subject: [PATCH 080/166] 2015910 - [GUI] hp-setup crashes when loading smart_install module 1959242 - hplip-3.21.12 is available --- hplip-qt5-smart-install.py | 13 +++++++++++++ hplip.spec | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 hplip-qt5-smart-install.py diff --git a/hplip-qt5-smart-install.py b/hplip-qt5-smart-install.py new file mode 100644 index 0000000..322edf1 --- /dev/null +++ b/hplip-qt5-smart-install.py @@ -0,0 +1,13 @@ +diff --git a/base/smart_install.py b/base/smart_install.py +index ec30aef..dd95e09 100755 +--- a/base/smart_install.py ++++ b/base/smart_install.py +@@ -226,7 +226,7 @@ def disable(mode, ui_toolkit='qt4', dialog=None, app=None, passwordObj = None): + dialog.init(printer_names, "", QUEUES_SMART_INSTALL_ENABLED) + else: # If QT object is not created, creating QT app + try: +- from ui4.queuesconf import QueuesDiagnose ++ from ui5.queuesconf import QueuesDiagnose + except ImportError: + log.error("Unable to load Qt4 support. Is it installed?") + else: # app = QApplication(sys.argv) # caller needs to inoke this, if already QApplication object is not created. diff --git a/hplip.spec b/hplip.spec index 17ab630..56f2650 100644 --- a/hplip.spec +++ b/hplip.spec @@ -195,6 +195,9 @@ Patch61: hplip-osname-mismatch.patch # 2015428 - python3.10 has Callable in collections.abc # reported as https://bugs.launchpad.net/hplip/+bug/1948801 Patch62: hplip-py310-collections-abc.patch +# 2015910 - [GUI] hp-setup crashes when loading smart_install module +# reported as https://bugs.launchpad.net/hplip/+bug/1957891 +Patch63: hplip-qt5-smart-install.py %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -513,6 +516,8 @@ done %patch61 -p1 -b .osname-mismatch # 2015428 - python3.10 has Callable in collections.abc %patch62 -p1 -b .abc +# 2015910 - [GUI] hp-setup crashes when loading smart_install module +%patch63 -p1 -b .qt5-smart %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -868,6 +873,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jan 17 2022 Zdenek Dohnal - 3.21.12-1 +- 2015910 - [GUI] hp-setup crashes when loading smart_install module + * Fri Jan 14 2022 Zdenek Dohnal - 3.21.12-1 - 1959242 - hplip-3.21.12 is available From 94e3b4a4c089574e3e2474704f0aa7563107ea1b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 12:25:43 +0000 Subject: [PATCH 081/166] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 56f2650..ee9fa42 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.21.12 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -873,6 +873,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 3.21.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Jan 17 2022 Zdenek Dohnal - 3.21.12-1 - 2015910 - [GUI] hp-setup crashes when loading smart_install module From 21fc6a9ec6518d7ea93cb54ee6a3dc9099060761 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 10 Mar 2022 09:38:26 +0100 Subject: [PATCH 082/166] 2059085 - hplip-3.22.2 is available --- .gitignore | 1 + hplip-missing-drivers.patch | 46 ++++++++++++++++++------------------- hplip.spec | 7 ++++-- sources | 2 +- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 66c412f..069fe93 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ hplip-3.10.6.tar.gz /hplip-3.21.2.tar.gz /hplip-3.21.2-repack.tar.gz /hplip-3.21.12-repack.tar.gz +/hplip-3.22.2-repack.tar.gz diff --git a/hplip-missing-drivers.patch b/hplip-missing-drivers.patch index 852512c..bb9b759 100644 --- a/hplip-missing-drivers.patch +++ b/hplip-missing-drivers.patch @@ -1,6 +1,6 @@ -diff -up hplip-3.21.12/cups_drv.inc.missing-drivers hplip-3.21.12/cups_drv.inc ---- hplip-3.21.12/cups_drv.inc.missing-drivers 2021-12-13 10:09:00.000000000 +0100 -+++ hplip-3.21.12/cups_drv.inc 2022-01-12 17:28:24.033378078 +0100 +diff -up hplip-3.22.2/cups_drv.inc.missing-drivers hplip-3.22.2/cups_drv.inc +--- hplip-3.22.2/cups_drv.inc.missing-drivers 2022-02-23 08:42:29.000000000 +0100 ++++ hplip-3.22.2/cups_drv.inc 2022-03-10 09:11:00.337315604 +0100 @@ -411,6 +411,7 @@ cups_ppd_printers = \ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ @@ -15,11 +15,11 @@ diff -up hplip-3.21.12/cups_drv.inc.missing-drivers hplip-3.21.12/cups_drv.inc ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ + ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ - ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ - ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff -up hplip-3.21.12/data/models/models.dat.missing-drivers hplip-3.21.12/data/models/models.dat ---- hplip-3.21.12/data/models/models.dat.missing-drivers 2022-01-12 17:24:45.491790543 +0100 -+++ hplip-3.21.12/data/models/models.dat 2022-01-12 17:24:45.509790591 +0100 + ppd/hpcups/hp-laserjet_tank_1020.ppd.gz \ + ppd/hpcups/hp-laserjet_tank_150x.ppd.gz \ +diff -up hplip-3.22.2/data/models/models.dat.missing-drivers hplip-3.22.2/data/models/models.dat +--- hplip-3.22.2/data/models/models.dat.missing-drivers 2022-03-10 09:10:13.601066235 +0100 ++++ hplip-3.22.2/data/models/models.dat 2022-03-10 09:10:13.622066347 +0100 @@ -2104,7 +2104,7 @@ usb-pid=411 usb-vid=3f0 wifi-config=0 @@ -532,9 +532,9 @@ diff -up hplip-3.21.12/data/models/models.dat.missing-drivers hplip-3.21.12/data [hp_laserjet_professional_p1102] align-type=0 clean-type=0 -diff -up hplip-3.21.12/Makefile.in.missing-drivers hplip-3.21.12/Makefile.in ---- hplip-3.21.12/Makefile.in.missing-drivers 2021-12-13 10:09:02.000000000 +0100 -+++ hplip-3.21.12/Makefile.in 2022-01-12 17:29:11.983506989 +0100 +diff -up hplip-3.22.2/Makefile.in.missing-drivers hplip-3.22.2/Makefile.in +--- hplip-3.22.2/Makefile.in.missing-drivers 2022-02-23 08:42:31.000000000 +0100 ++++ hplip-3.22.2/Makefile.in 2022-03-10 09:11:45.915558795 +0100 @@ -1613,6 +1613,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ @@ -543,15 +543,15 @@ diff -up hplip-3.21.12/Makefile.in.missing-drivers hplip-3.21.12/Makefile.in ppd/hpcups/hp-laserjet_m1005.ppd.gz \ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \ -@@ -1730,6 +1731,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase +@@ -1729,6 +1730,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase + ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ - ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ + ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ - ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ - ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ - ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \ -@@ -4080,6 +4082,7 @@ dist_unrel_DATA = + ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ + ppd/hpcups/hp-laserjet_tank_1020.ppd.gz \ + ppd/hpcups/hp-laserjet_tank_150x.ppd.gz \ +@@ -4090,6 +4092,7 @@ dist_unrel_DATA = @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \ @@ -559,17 +559,17 @@ diff -up hplip-3.21.12/Makefile.in.missing-drivers hplip-3.21.12/Makefile.in @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \ -@@ -4196,6 +4199,7 @@ dist_unrel_DATA = +@@ -4206,6 +4209,7 @@ dist_unrel_DATA = @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \ +@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \ @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \ - @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \ -diff -up hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.21.12/prnt/drv/hpcups.drv.in ---- hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers 2022-01-12 17:24:45.451790435 +0100 -+++ hplip-3.21.12/prnt/drv/hpcups.drv.in 2022-01-12 17:24:45.514790605 +0100 + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_tank_1020.ppd.gz \ + @HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_tank_150x.ppd.gz \ +diff -up hplip-3.22.2/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.22.2/prnt/drv/hpcups.drv.in +--- hplip-3.22.2/prnt/drv/hpcups.drv.in.missing-drivers 2022-03-10 09:10:13.554065984 +0100 ++++ hplip-3.22.2/prnt/drv/hpcups.drv.in 2022-03-10 09:10:13.629066384 +0100 @@ -22693,6 +22693,14 @@ Group "RLT/HP Real Life Technologies" Attribute "Product" "" "(HP LaserJet Professional p1102s Printer)" } diff --git a/hplip.spec b/hplip.spec index ee9fa42..3e0e6bb 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.21.12 -Release: 2%{?dist} +Version: 3.22.2 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -873,6 +873,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Mar 10 2022 Zdenek Dohnal - 3.22.2-1 +- 2059085 - hplip-3.22.2 is available + * Thu Jan 20 2022 Fedora Release Engineering - 3.21.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 27387b9..80c60de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.21.12-repack.tar.gz) = 56e9f2c5949712625c99129629391fb15e09bd485a0cb343b6482be92726b75e6079f0f9d6fe8f8d2d453d4407b6a8efc3cf31018c97ff36f8b6da11db7d0df5 +SHA512 (hplip-3.22.2-repack.tar.gz) = ab7e0bb4eaaa04aa4be4ee8d1ea5825d3856e93f9a2108149f7282c988c079949668dacfd5b69af0e2a812d2ebc01ff2205d2548336ce43faf6591a98f80e874 From 121a2286ef9998ad2fc943438acb592b76e716af Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 28 Mar 2022 20:09:25 +0200 Subject: [PATCH 083/166] make libsane-hpaio only suggested to prevent possible duplicated scanner devices ipp-usb is pulled in automatically now, so newer devices can be supported by two backends, sane-airscan and libsane-hpaio, which can be confusing. So make libsane-hpaio only suggested to prevent that. --- hplip.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hplip.spec b/hplip.spec index 3e0e6bb..9709cc5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -260,8 +260,6 @@ Requires: python3-dbus Requires: %{_bindir}/gpg # /usr/lib/udev/rules.d Requires: systemd -# 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed -Requires: libsane-hpaio # 1788643 - Fedora minimal does not ship tar by default Requires: tar # require usbutils, hp-diagnose_queues needs lsusb @@ -274,6 +272,8 @@ Recommends: avahi-tools # stop the update Requires(post): coreutils +# 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed +Suggests: libsane-hpaio %description The Hewlett-Packard Linux Imaging and Printing Project provides @@ -307,7 +307,7 @@ Requires: python3-reportlab # hpssd.py Requires: python3-gobject Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: libsane-hpaio%{?_isa} = %{version}-%{release} +Suggests: libsane-hpaio%{?_isa} = %{version}-%{release} %description gui HPLIP graphical tools. @@ -873,6 +873,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 28 2022 Zdenek Dohnal - 3.22.2-2 +- make libsane-hpaio only suggested to prevent possible duplicated scanner devices + * Thu Mar 10 2022 Zdenek Dohnal - 3.22.2-1 - 2059085 - hplip-3.22.2 is available From 0933ecaffa3ac02015f358961e2f418443b50f0d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 11 May 2022 13:31:08 +0200 Subject: [PATCH 084/166] 2079740 - hplip-3.22.4 is available --- .gitignore | 1 + hplip-py310-collections-abc.patch | 13 ------------- hplip-qt5-smart-install.py | 13 ------------- hplip.spec | 15 ++++----------- sources | 2 +- 5 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 hplip-py310-collections-abc.patch delete mode 100644 hplip-qt5-smart-install.py diff --git a/.gitignore b/.gitignore index 069fe93..8c9958b 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ hplip-3.10.6.tar.gz /hplip-3.21.2-repack.tar.gz /hplip-3.21.12-repack.tar.gz /hplip-3.22.2-repack.tar.gz +/hplip-3.22.4-repack.tar.gz diff --git a/hplip-py310-collections-abc.patch b/hplip-py310-collections-abc.patch deleted file mode 100644 index a31687d..0000000 --- a/hplip-py310-collections-abc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/exif.py b/base/exif.py -index 2b8c447..38dca63 100644 ---- a/base/exif.py -+++ b/base/exif.py -@@ -798,7 +798,7 @@ class EXIF_header: - tag_name=tag_entry[0] - if len(tag_entry) != 1: - # optional 2nd tag element is present -- if isinstance(tag_entry[1], collections.Callable): -+ if isinstance(tag_entry[1], collections.abc.Callable): - # call mapping function - printable=tag_entry[1](values) - else: diff --git a/hplip-qt5-smart-install.py b/hplip-qt5-smart-install.py deleted file mode 100644 index 322edf1..0000000 --- a/hplip-qt5-smart-install.py +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/smart_install.py b/base/smart_install.py -index ec30aef..dd95e09 100755 ---- a/base/smart_install.py -+++ b/base/smart_install.py -@@ -226,7 +226,7 @@ def disable(mode, ui_toolkit='qt4', dialog=None, app=None, passwordObj = None): - dialog.init(printer_names, "", QUEUES_SMART_INSTALL_ENABLED) - else: # If QT object is not created, creating QT app - try: -- from ui4.queuesconf import QueuesDiagnose -+ from ui5.queuesconf import QueuesDiagnose - except ImportError: - log.error("Unable to load Qt4 support. Is it installed?") - else: # app = QApplication(sys.argv) # caller needs to inoke this, if already QApplication object is not created. diff --git a/hplip.spec b/hplip.spec index 9709cc5..a61292d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -192,12 +192,6 @@ Patch59: hplip-gpgdir-perms.patch Patch60: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 Patch61: hplip-osname-mismatch.patch -# 2015428 - python3.10 has Callable in collections.abc -# reported as https://bugs.launchpad.net/hplip/+bug/1948801 -Patch62: hplip-py310-collections-abc.patch -# 2015910 - [GUI] hp-setup crashes when loading smart_install module -# reported as https://bugs.launchpad.net/hplip/+bug/1957891 -Patch63: hplip-qt5-smart-install.py %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -514,10 +508,6 @@ done %patch60 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 %patch61 -p1 -b .osname-mismatch -# 2015428 - python3.10 has Callable in collections.abc -%patch62 -p1 -b .abc -# 2015910 - [GUI] hp-setup crashes when loading smart_install module -%patch63 -p1 -b .qt5-smart %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -873,6 +863,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed May 11 2022 Zdenek Dohnal - 3.22.2-3 +- 2079740 - hplip-3.22.4 is available + * Mon Mar 28 2022 Zdenek Dohnal - 3.22.2-2 - make libsane-hpaio only suggested to prevent possible duplicated scanner devices diff --git a/sources b/sources index 80c60de..341dfad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.22.2-repack.tar.gz) = ab7e0bb4eaaa04aa4be4ee8d1ea5825d3856e93f9a2108149f7282c988c079949668dacfd5b69af0e2a812d2ebc01ff2205d2548336ce43faf6591a98f80e874 +SHA512 (hplip-3.22.4-repack.tar.gz) = 33b228ee29536060918d0d15ff563c77e189d1ba1dd728b3038d202714a5d8d7742effb6ad8a2b1e5ea104784bc5d995bf793e4b61ab26552737e09aad318f3e From 129beeedb91f5f4f26c480e23825db54ec4b7583 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 11 May 2022 13:32:21 +0200 Subject: [PATCH 085/166] 2079740 - hplip-3.22.4 is available --- hplip.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hplip.spec b/hplip.spec index a61292d..5340480 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.22.2 -Release: 3%{?dist} +Version: 3.22.4 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -863,7 +863,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog -* Wed May 11 2022 Zdenek Dohnal - 3.22.2-3 +* Wed May 11 2022 Zdenek Dohnal - 3.22.4-1 - 2079740 - hplip-3.22.4 is available * Mon Mar 28 2022 Zdenek Dohnal - 3.22.2-2 From eabb56cabed7b4d1c18977b3e51bb9afaac8c939 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 11 May 2022 13:38:09 +0200 Subject: [PATCH 086/166] Fix prep phase --- hplip-systray-qt5.patch | 14 -------------- hplip.spec | 21 ++++++++------------- 2 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 hplip-systray-qt5.patch diff --git a/hplip-systray-qt5.patch b/hplip-systray-qt5.patch deleted file mode 100644 index 00d2d32..0000000 --- a/hplip-systray-qt5.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/base/module.py b/base/module.py -index 04ac5b8..56be168 100644 ---- a/base/module.py -+++ b/base/module.py -@@ -301,6 +301,9 @@ class Module(object): - if UI_TOOLKIT_QT4 in self.supported_ui_toolkits and UI_TOOLKIT_QT4 in self.installed_ui_toolkits: - long_params.extend(['qt4', 'use-qt4']) - -+ if UI_TOOLKIT_QT5 in self.supported_ui_toolkits and UI_TOOLKIT_QT5 in self.installed_ui_toolkits: -+ long_params.extend(['qt5', 'use-qt5']) -+ - if extra_params is not None: - params = ''.join([params, extra_params]) - diff --git a/hplip.spec b/hplip.spec index 5340480..c94227a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -178,20 +178,17 @@ Patch55: hplip-fab-import.patch # it fails further down - break out earlier with a message # reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 Patch56: hplip-hpsetup-noscanjets.patch -# 1951922 - hp-systray doesn't support a valid --qt5 option -# reported upstream https://bugs.launchpad.net/hplip/+bug/1925480 -Patch57: hplip-systray-qt5.patch # 1963114 - patch for hplip firmware load timeout fix # reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 -Patch58: hplip-hpfirmware-timeout.patch +Patch57: hplip-hpfirmware-timeout.patch # 1985251 - Incorrect permission for gpg directory # reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 -Patch59: hplip-gpgdir-perms.patch +Patch58: hplip-gpgdir-perms.patch # 1987141 - hp-plugin installs malformed udev files # reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 -Patch60: hplip-plugin-udevissues.patch +Patch59: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 -Patch61: hplip-osname-mismatch.patch +Patch60: hplip-osname-mismatch.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -498,16 +495,14 @@ done # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message %patch56 -p1 -b .hpsetup-noscanjets -# 1951922 - hp-systray doesn't support a valid --qt5 option -%patch57 -p1 -b .systray-qt5 # 1963114 - patch for hplip firmware load timeout fix -%patch58 -p1 -b .hpfirmware-timeout +%patch57 -p1 -b .hpfirmware-timeout # 1985251 - Incorrect permission for gpg directory -%patch59 -p1 -b .gpgdir-perms +%patch58 -p1 -b .gpgdir-perms # 1987141 - hp-plugin installs malformed udev files -%patch60 -p1 -b .hpplugin-udevperms +%patch59 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 -%patch61 -p1 -b .osname-mismatch +%patch60 -p1 -b .osname-mismatch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI From 297f625d957216cbfffbab984afbc76424f5e30f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 17 May 2022 12:53:06 +0200 Subject: [PATCH 087/166] 2080235 - Misleading errors about missing shared libraries when scanning --- hplip-no-libhpmud-libm-warnings.patch | 108 ++++++++++++++++++++++++++ hplip.spec | 14 ++++ 2 files changed, 122 insertions(+) create mode 100644 hplip-no-libhpmud-libm-warnings.patch diff --git a/hplip-no-libhpmud-libm-warnings.patch b/hplip-no-libhpmud-libm-warnings.patch new file mode 100644 index 0000000..160b70e --- /dev/null +++ b/hplip-no-libhpmud-libm-warnings.patch @@ -0,0 +1,108 @@ +diff --git a/scan/sane/escl.c b/scan/sane/escl.c +index 9fbbcaf..bc9e0b5 100644 +--- a/scan/sane/escl.c ++++ b/scan/sane/escl.c +@@ -37,18 +37,12 @@ static int bb_load(struct escl_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { + SendScanEvent(ps->uri, EVENT_PLUGIN_FAIL); +diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c +index 236f7c9..793104c 100644 +--- a/scan/sane/marvell.c ++++ b/scan/sane/marvell.c +@@ -60,18 +60,12 @@ static int bb_load(struct marvell_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { +diff --git a/scan/sane/soap.c b/scan/sane/soap.c +index 0d22e52..dcd8c7c 100644 +--- a/scan/sane/soap.c ++++ b/scan/sane/soap.c +@@ -68,18 +68,12 @@ static int bb_load(struct soap_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { +diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c +index 139100d..74e8391 100644 +--- a/scan/sane/soapht.c ++++ b/scan/sane/soapht.c +@@ -62,18 +62,12 @@ static int bb_load(struct soap_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { diff --git a/hplip.spec b/hplip.spec index c94227a..57ed4ef 100644 --- a/hplip.spec +++ b/hplip.spec @@ -189,6 +189,15 @@ Patch58: hplip-gpgdir-perms.patch Patch59: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 Patch60: hplip-osname-mismatch.patch +# 2080235 - Misleading errors about missing shared libraries when scanning +# downstream patch to prevent errors: +# - when loading libhpmud.so - unversioned .so files belong into devel packages, +# but dlopen() in hplip was set to load the unversioned .so - so to remove rpmlint +# error (when libhpmud.so is in non-devel package) and prevent runtime dependency on -devel +# package (if libhpmud.so had been moved to -devel) the dlopen on unversioned .so file was +# removed +# - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() +Patch61: hplip-no-libhpmud-libm-warnings.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -503,6 +512,8 @@ done %patch59 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 %patch60 -p1 -b .osname-mismatch +# 2080235 - Misleading errors about missing shared libraries when scanning +%patch61 -p1 -b .no-libm-libhpmud-warn %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -858,6 +869,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue May 17 2022 Zdenek Dohnal - 3.22.4-1 +- 2080235 - Misleading errors about missing shared libraries when scanning + * Wed May 11 2022 Zdenek Dohnal - 3.22.4-1 - 2079740 - hplip-3.22.4 is available From e4d8f7e061c99f193da9e733cc1a9c5132e0e63a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 17:35:17 +0200 Subject: [PATCH 088/166] Rebuilt for Python 3.11 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 57ed4ef..c7c5eec 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -869,6 +869,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jun 13 2022 Python Maint - 3.22.4-2 +- Rebuilt for Python 3.11 + * Tue May 17 2022 Zdenek Dohnal - 3.22.4-1 - 2080235 - Misleading errors about missing shared libraries when scanning From c7dbb064bdb2253e12905a14126216ee2d047fd2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Jul 2022 11:57:36 +0200 Subject: [PATCH 089/166] recommend libsane-hpaio - duplicated scanners are better than no scanner --- hplip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index c7c5eec..ff04eab 100644 --- a/hplip.spec +++ b/hplip.spec @@ -273,7 +273,7 @@ Recommends: avahi-tools Requires(post): coreutils # 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed -Suggests: libsane-hpaio +Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} %description The Hewlett-Packard Linux Imaging and Printing Project provides @@ -307,7 +307,7 @@ Requires: python3-reportlab # hpssd.py Requires: python3-gobject Requires: %{name}%{?_isa} = %{version}-%{release} -Suggests: libsane-hpaio%{?_isa} = %{version}-%{release} +Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} %description gui HPLIP graphical tools. @@ -869,6 +869,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jul 18 2022 Zdenek Dohnal - 3.22.4-3 +- recommend libsane-hpaio - duplicated scanners are better than no scanner + * Mon Jun 13 2022 Python Maint - 3.22.4-2 - Rebuilt for Python 3.11 From 3c7687254deeef5381343f15cd0b046c3fa084b2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Jul 2022 12:10:41 +0200 Subject: [PATCH 090/166] hplip-repack.sh: Merge hplip-repack and hplip-rebase --- hplip-rebase.sh | 25 ------------------------- hplip-repack.sh | 10 ++++++++++ 2 files changed, 10 insertions(+), 25 deletions(-) delete mode 100755 hplip-rebase.sh diff --git a/hplip-rebase.sh b/hplip-rebase.sh deleted file mode 100755 index f33edca..0000000 --- a/hplip-rebase.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -if [ "$1" == "-h" -o "$1" == "--help" ] -then - echo "Usage: ./hplip-rebase.sh X.Y.Z" - echo " X.Y.Z - new hplip version" - exit 0 -fi - -wget -O hplip-plugin.run http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run - -if [ $? -gt 0 ] -then - echo "Error while downloading plugin. Check version passed by argument or internet connection. For usage run script with -h or --help argument." - rm hplip-plugin.run - exit 1 -fi -rm hplip-plugin.run - -fedpkg mockbuild -if [ $? -gt 0 ] -then - echo "Error during mockbuild." - exit 1 -fi -exit 0 diff --git a/hplip-repack.sh b/hplip-repack.sh index 7639dbe..c25fbb0 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -18,5 +18,15 @@ rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/erni # compress into a new tarball tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 +# check whether plugin is available +wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || exit 1 + +# check whether the file is sane +file --mime hplip-plugin.run | grep 'x-shellscript' || exit 1 + +echo "hplip-${VERSION}-repack.tar.gz is prepared for uploading..." + +exit 0 + # upload a new source tarball #fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1 From cfce1c8fa6b2d016665477be0bf1479cf3a2c93f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 19 Jul 2022 16:20:46 +0200 Subject: [PATCH 091/166] recommend libsane-hpaio - duplicated scanners are better than no scanner 2101790 - hplip-3.22.6 is available --- .gitignore | 1 + hplip-configure-python.patch | 4 +-- hplip-error-print.patch | 44 ------------------------------- hplip-snprintf-format.patch | 50 ++++++++++++++++++++++++++++++++++++ hplip.spec | 12 +++++++-- sources | 2 +- 6 files changed, 64 insertions(+), 49 deletions(-) create mode 100644 hplip-snprintf-format.patch diff --git a/.gitignore b/.gitignore index 8c9958b..2da15b2 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ hplip-3.10.6.tar.gz /hplip-3.21.12-repack.tar.gz /hplip-3.22.2-repack.tar.gz /hplip-3.22.4-repack.tar.gz +/hplip-3.22.6-repack.tar.gz diff --git a/hplip-configure-python.patch b/hplip-configure-python.patch index 9dc78cd..2ae7620 100644 --- a/hplip-configure-python.patch +++ b/hplip-configure-python.patch @@ -28,8 +28,8 @@ diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in + AC_MSG_ERROR([Cannot get Python libs via python3-config], 6) +fi + -+SAVE_CFLAGS=$CFLAGS -+SAVE_LIBS=$LIBS ++SAVE_CFLAGS="$CFLAGS" ++SAVE_LIBS="$LIBS" + +CFLAGS="$CFLAGS $PYTHON_INCLUDES" +LIBS="$LIBS $PYTHON_LIBS" diff --git a/hplip-error-print.patch b/hplip-error-print.patch index e4b3e5f..b7b1a6f 100644 --- a/hplip-error-print.patch +++ b/hplip-error-print.patch @@ -32,47 +32,3 @@ index fdb48e8..345ed82 100644 self.cleanup(EVENT_PCARD_UNABLE_TO_MOUNT) return False -diff --git a/ui4/wifisetupdialog.py b/ui4/wifisetupdialog.py -index 9fd1786..4d36f83 100644 ---- a/ui4/wifisetupdialog.py -+++ b/ui4/wifisetupdialog.py -@@ -256,7 +256,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - try: - self.dev = device.Device(self.device_uri) - except Error as e: -- FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, QString(e[0]))) -+ FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, QString(e.msg))) - - if self.dev is not None: - self.dev.close() -@@ -834,7 +834,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - - - def showIOError(self, e): -- FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % QString(e[0]))) -+ FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % QString(e.msg))) - - if self.dev is not None: - self.dev.close() -diff --git a/ui5/wifisetupdialog.py b/ui5/wifisetupdialog.py -index e0c7aee..74cc0ef 100644 ---- a/ui5/wifisetupdialog.py -+++ b/ui5/wifisetupdialog.py -@@ -259,7 +259,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - try: - self.dev = device.Device(self.device_uri) - except Error as e: -- FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, str(e[0]))) -+ FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, str(e.msg))) - - if self.dev is not None: - self.dev.close() -@@ -840,7 +840,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - - - def showIOError(self, e): -- FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % str(e[0]))) -+ FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % str(e.msg))) - - if self.dev is not None: - self.dev.close() diff --git a/hplip-snprintf-format.patch b/hplip-snprintf-format.patch new file mode 100644 index 0000000..221f1d1 --- /dev/null +++ b/hplip-snprintf-format.patch @@ -0,0 +1,50 @@ +diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c +index 97d827d..af25b3e 100644 +--- a/protocol/hp_ipp.c ++++ b/protocol/hp_ipp.c +@@ -110,9 +110,9 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, + } + + if ( info == NULL ) +- snprintf( info,sizeof(info), name ); ++ info = name; + +- sprintf( printer_uri, "ipp://localhost/printers/%s", name ); ++ snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name); + + cupsSetUser ("root"); + /* Connect to the HTTP server */ +@@ -511,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list) + + if ( strcmp(attr_name, "printer-name") == 0 && + val_tag == IPP_TAG_NAME ) { +- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "device-uri") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->device_uri, sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "printer-uri-supported") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->printer_uri, sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "printer-info") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->info, sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "printer-location") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->location, sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "printer-make-and-model") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->make_model, sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL)); + } + else if ( strcmp(attr_name, "printer-state") == 0 && + val_tag == IPP_TAG_ENUM ) { diff --git a/hplip.spec b/hplip.spec index ff04eab..a76a870 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.22.4 -Release: 2%{?dist} +Version: 3.22.6 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -198,6 +198,9 @@ Patch60: hplip-osname-mismatch.patch # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() Patch61: hplip-no-libhpmud-libm-warnings.patch +# hplip 3.22.6 doesn't use the correct arguments for snprintf +# reported as https://bugs.launchpad.net/hplip/+bug/1982185 +Patch62: hplip-snprintf-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -514,6 +517,8 @@ done %patch60 -p1 -b .osname-mismatch # 2080235 - Misleading errors about missing shared libraries when scanning %patch61 -p1 -b .no-libm-libhpmud-warn +# hplip 3.22.6 doesn't use proper arguments for snprintf +%patch62 -p1 -b .snprintf-format %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -869,6 +874,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 19 2022 Zdenek Dohnal - 3.22.6-1 +- 2101790 - hplip-3.22.6 is available + * Mon Jul 18 2022 Zdenek Dohnal - 3.22.4-3 - recommend libsane-hpaio - duplicated scanners are better than no scanner diff --git a/sources b/sources index 341dfad..65eeba2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.22.4-repack.tar.gz) = 33b228ee29536060918d0d15ff563c77e189d1ba1dd728b3038d202714a5d8d7742effb6ad8a2b1e5ea104784bc5d995bf793e4b61ab26552737e09aad318f3e +SHA512 (hplip-3.22.6-repack.tar.gz) = 6296bf9751b2202beb28e481b556fab838a82905fbc40429bcd654570491e6d9cf8fb9c6d4781924136968d71ad47cba32b4385577e7062ce4a8ee23df44b9da From cc60476218506c1a13db71fc13408643a8d041d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 13:44:10 +0000 Subject: [PATCH 092/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index a76a870..197c315 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -874,6 +874,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 3.22.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jul 19 2022 Zdenek Dohnal - 3.22.6-1 - 2101790 - hplip-3.22.6 is available From 6cb741bb4533bd1bd7b91f6b00efa76be9f0491a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 13 Oct 2022 14:43:35 +0200 Subject: [PATCH 093/166] 2129849 - hp-plugin unable to load plugin.conf --- hp-plugin.in | 46 +++++++++++++++++++++++++++ hplip-plugin-script.patch | 28 +++++++++++++++++ hplip.spec | 65 +++++++++++++++++++++++++-------------- 3 files changed, 116 insertions(+), 23 deletions(-) create mode 100644 hp-plugin.in create mode 100644 hplip-plugin-script.patch diff --git a/hp-plugin.in b/hp-plugin.in new file mode 100644 index 0000000..c3e7bd3 --- /dev/null +++ b/hp-plugin.in @@ -0,0 +1,46 @@ +#!/usr/bin/bash + +# get version from base hplip rpm - it is always in the second column +VER=$(@bindir@/rpm -q hplip | @bindir@/awk -F '-' '{print $2}') + +if test "x$VER" = "x" +then + @bindir@/echo "Version was not acquired - exiting..." + exit 1 +fi + +# link to the plugin +PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${VER}-plugin.run" + +# plugin name +PLUGIN_FILE="hplip-${VER}-plugin.run" + +# create a hidden hplip dir to store a file indicating the plugin version after successful install +# the directory can be used by other hplip tools, so we don't have to remove it if the failure happens +if [ ! -d ~/.hplip ] +then + @bindir@/mkdir ~/.hplip || @bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1 +fi + +@bindir@/wget -O ~/.hplip/${PLUGIN_FILE} ${PLUGIN_SOURCE} + +if [ ! -f ~/.hplip/${PLUGIN_FILE} ] +then + @bindir@/echo "The downloaded file does not exist - error during downloading, exiting..." + exit 1 +fi + +@bindir@/bash ~/.hplip/${PLUGIN_FILE} + +if [ $? -ne 0 ] +then + @bindir@/echo "Plugin installation failed, exiting..." + @bindir@/rm -f ~/.hplip/${PLUGIN_FILE} &> /dev/null + exit 1 +fi + +@bindir@/rm -f ~/.hplip/${PLUGIN_FILE} &> /dev/null +@bindir@/rm -f ~/.hplip/plugin-installed-* &> /dev/null +@bindir@/touch ~/.hplip/plugin-installed-$VER + +exit 0 diff --git a/hplip-plugin-script.patch b/hplip-plugin-script.patch new file mode 100644 index 0000000..9b3c196 --- /dev/null +++ b/hplip-plugin-script.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile.am b/Makefile.am +index bb4195c..ddac16a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -680,6 +680,12 @@ if HPLIP_CLASS_DRIVER + filterdir=$(cupsfilterdir) + printpluginsdir=$(cupsfilterdir) + ++# ++# HP Plugin ++# ++ ++pkgplugindir=$(bindir) ++pkgplugin_DATA=hp-plugin + + dist_filter_DATA = hpcups hpps dat2drv + dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so +diff --git a/configure.in b/configure.in +index f8f1a28..7fa5d12 100644 +--- a/configure.in ++++ b/configure.in +@@ -801,5 +801,5 @@ AC_SUBST(udev_sysfs_rules) + AC_SUBST(epm_class_driver) + AC_SUBST(epm_class_install) + +-AC_CONFIG_FILES(Makefile hplip.conf hplip.desktop hp-uiscan.desktop hplip-systray.desktop prnt/drv/hpijs.drv prnt/drv/hpcups.drv hplip.list data/policykit/com.hp.hplip.service) ++AC_CONFIG_FILES(Makefile hplip.conf hplip.desktop hp-uiscan.desktop hplip-systray.desktop prnt/drv/hpijs.drv prnt/drv/hpcups.drv hplip.list data/policykit/com.hp.hplip.service hp-plugin) + AC_OUTPUT diff --git a/hplip.spec b/hplip.spec index 197c315..27279c5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -27,6 +27,7 @@ Source3: %{name}.appdata.xml Source4: hp-laserjet_cp_1025nw.ppd.gz Source5: hp-laserjet_professional_p_1102w.ppd.gz Source6: hplip-repack.sh +Source7: hp-plugin.in Patch1: hplip-pstotiff-is-rubbish.patch Patch2: hplip-strstr-const.patch @@ -201,6 +202,7 @@ Patch61: hplip-no-libhpmud-libm-warnings.patch # hplip 3.22.6 doesn't use the correct arguments for snprintf # reported as https://bugs.launchpad.net/hplip/+bug/1982185 Patch62: hplip-snprintf-format.patch +Patch63: hplip-plugin-script.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -213,9 +215,12 @@ BuildRequires: autoconf BuildRequires: automake # Make sure we get postscriptdriver tags - need cups and python3-cups. BuildRequires: cups -BuildRequires: python3-cups # uses functions from CUPS in filters, backends and libraries defining them BuildRequires: cups-devel +%if 0%{?rhel} <= 8 || 0%{?fedora} +# needed for desktop file validation in spec file +BuildRequires: desktop-file-utils +%endif # gcc and gcc-c++ are no longer in buildroot by default # gcc is needed for compilation of HPAIO scanning backend, HP implementation of # IPP and MDNS protocols, hpps driver, hp backend, hpip (image processing @@ -238,46 +243,44 @@ BuildRequires: openssl-devel # supports mDNS device discovery via Avahi BuildRequires: pkgconfig(avahi-client) BuildRequires: pkgconfig(avahi-core) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: python3-cups # implements C Python extensions like hpmudext, cupsext, scanext BuildRequires: python3-devel # SANE backend hpaio uses function from SANE API BuildRequires: sane-backends-devel -BuildRequires: pkgconfig(dbus-1) # macros: %%{_tmpfilesdir}, %%{_udevrulesdir} BuildRequires: systemd -%if 0%{?rhel} <= 8 || 0%{?fedora} -# needed for desktop file validation in spec file -BuildRequires: desktop-file-utils -%endif +# uses avahi-browse for discovering IPP-over-USB printers +Recommends: avahi-tools +# 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed +Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -%if 0%{?rhel} <= 8 || 0%{?fedora} -Requires: python3-pillow -%endif Requires: cups -Requires: wget -Requires: python3-dbus +# for bash script acting as hp-plugin (Source7) +Requires: gawk # set require directly to /usr/bin/gpg, because gnupg2 and gnupg ships it, # but gnupg will be deprecated in the future Requires: %{_bindir}/gpg +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: python3-dbus +%if 0%{?rhel} <= 8 || 0%{?fedora} +Requires: python3-pillow +%endif # /usr/lib/udev/rules.d Requires: systemd # 1788643 - Fedora minimal does not ship tar by default Requires: tar # require usbutils, hp-diagnose_queues needs lsusb Requires: usbutils -# uses avahi-browse for discovering IPP-over-USB printers -Recommends: avahi-tools +Requires: wget # require coreutils, because timeout binary is needed in post scriptlet, # because hpcups-update-ppds script can freeze in certain situation and # stop the update Requires(post): coreutils -# 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed -Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} - %description The Hewlett-Packard Linux Imaging and Printing Project provides drivers for HP printers and multi-function peripherals. @@ -303,14 +306,16 @@ Libraries needed by HPLIP. Summary: HPLIP graphical tools License: BSD BuildRequires: libappstream-glib + # for avahi-browse - looks for devices on local network Recommends: avahi-tools -Requires: python3-qt5 -Requires: python3-reportlab +Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} + +Requires: %{name}%{?_isa} = %{version}-%{release} # hpssd.py Requires: python3-gobject -Requires: %{name}%{?_isa} = %{version}-%{release} -Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} +Requires: python3-reportlab +Requires: python3-qt5 %description gui HPLIP graphical tools. @@ -319,6 +324,7 @@ HPLIP graphical tools. %package -n libsane-hpaio Summary: SANE driver for scanners in HP's multi-function devices License: GPLv2+ + Requires: sane-backends Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -519,6 +525,7 @@ done %patch61 -p1 -b .no-libm-libhpmud-warn # hplip 3.22.6 doesn't use proper arguments for snprintf %patch62 -p1 -b .snprintf-format +%patch63 -p1 -b .plugin-patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -540,6 +547,9 @@ rm locatedriver cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups +# 2129849 - move hp-plugin script into srcdir +cp -p %{SOURCE7} . + %build # Work-around Makefile.am imperfections. sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in @@ -612,6 +622,13 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd +# 2129849 - remove hp-plugin script, since it depends on plugin.conf being available at +# http://hplip.sourceforge.net/plugin.conf +rm -f %{buildroot}%{_bindir}/hp-plugin \ + %{buildroot}%{_datadir}/hplip/plugin.py* + +install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin + %if 0%{?rhel} > 8 rm -rf %{buildroot}%{_bindir}/hp-check \ %{buildroot}%{_bindir}/hp-devicesettings \ @@ -782,7 +799,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/__init__.py* %{_datadir}/hplip/levels.py* %{_datadir}/hplip/makeuri.py* -%{_datadir}/hplip/plugin.py* %{_datadir}/hplip/probe.py* %{_datadir}/hplip/query.py* %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -874,6 +890,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Oct 13 2022 Zdenek Dohnal - 3.22.6-3 +- 2129849 - hp-plugin unable to load plugin.conf + * Thu Jul 21 2022 Fedora Release Engineering - 3.22.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 09cd5eff2237ba1bea0415477ce4cb0571a62f1f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 13 Oct 2022 15:06:24 +0200 Subject: [PATCH 094/166] 2129849 - hp-plugin unable to load plugin.conf - add a new backup download script --- hplip.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hplip.spec b/hplip.spec index 27279c5..f0e4f52 100644 --- a/hplip.spec +++ b/hplip.spec @@ -622,12 +622,7 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd -# 2129849 - remove hp-plugin script, since it depends on plugin.conf being available at -# http://hplip.sourceforge.net/plugin.conf -rm -f %{buildroot}%{_bindir}/hp-plugin \ - %{buildroot}%{_datadir}/hplip/plugin.py* - -install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin +install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin-download %if 0%{?rhel} > 8 rm -rf %{buildroot}%{_bindir}/hp-check \ @@ -762,6 +757,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-levels %{_bindir}/hp-makeuri %{_bindir}/hp-plugin +%{_bindir}/hp-plugin-download %{_bindir}/hp-probe %{_bindir}/hp-query %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -799,6 +795,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/__init__.py* %{_datadir}/hplip/levels.py* %{_datadir}/hplip/makeuri.py* +%{_datadir}/hplip/plugin.py* %{_datadir}/hplip/probe.py* %{_datadir}/hplip/query.py* %if 0%{?rhel} <= 8 || 0%{?fedora} @@ -891,7 +888,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %changelog * Thu Oct 13 2022 Zdenek Dohnal - 3.22.6-3 -- 2129849 - hp-plugin unable to load plugin.conf +- 2129849 - hp-plugin unable to load plugin.conf - add a new backup download script * Thu Jul 21 2022 Fedora Release Engineering - 3.22.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 652db6693cf9460f27c6b14282f76f4aad4c3fd7 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 13 Oct 2022 15:07:30 +0200 Subject: [PATCH 095/166] 2129849 - hp-plugin unable to load plugin.conf - add a new backup download script --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index f0e4f52..3fa1a00 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.6 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -887,6 +887,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Oct 13 2022 Zdenek Dohnal - 3.22.6-4 +- bump the NVR + * Thu Oct 13 2022 Zdenek Dohnal - 3.22.6-3 - 2129849 - hp-plugin unable to load plugin.conf - add a new backup download script From ca1713968e5ca3d3c24756ec049c413e4f876aa0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 19 Oct 2022 14:05:07 +0200 Subject: [PATCH 096/166] distutils will be removed in Python3.12, use setuptools now --- hplip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 3fa1a00..4cfeb80 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.6 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -247,6 +247,8 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: python3-cups # implements C Python extensions like hpmudext, cupsext, scanext BuildRequires: python3-devel +# distutils are removed in Python3.12, use setuptools +BuildRequires: python3-setuptools # SANE backend hpaio uses function from SANE API BuildRequires: sane-backends-devel # macros: %%{_tmpfilesdir}, %%{_udevrulesdir} @@ -887,6 +889,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Oct 19 2022 Zdenek Dohnal - 3.22.6-5 +- distutils will be removed in Python3.12, use setuptools now + * Thu Oct 13 2022 Zdenek Dohnal - 3.22.6-4 - bump the NVR From a960ac4214ffd3a10e5d65567281d1f51d247895 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 24 Nov 2022 12:04:27 +0100 Subject: [PATCH 097/166] 2139309 - hplip-3.22.10 is available --- .gitignore | 1 + hplip-fab-import.patch | 13 ----------- hplip-osname-mismatch.patch | 12 ---------- hplip.spec | 45 ++++++++++++++++--------------------- sources | 2 +- 5 files changed, 21 insertions(+), 52 deletions(-) delete mode 100644 hplip-fab-import.patch delete mode 100644 hplip-osname-mismatch.patch diff --git a/.gitignore b/.gitignore index 2da15b2..242bd0c 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,4 @@ hplip-3.10.6.tar.gz /hplip-3.22.2-repack.tar.gz /hplip-3.22.4-repack.tar.gz /hplip-3.22.6-repack.tar.gz +/hplip-3.22.10-repack.tar.gz diff --git a/hplip-fab-import.patch b/hplip-fab-import.patch deleted file mode 100644 index 0d2e94b..0000000 --- a/hplip-fab-import.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py -index 0b95c94..631727c 100644 ---- a/ui5/fabwindow.py -+++ b/ui5/fabwindow.py -@@ -518,7 +518,7 @@ class FABWindow(QMainWindow, Ui_MainWindow): - self.__tr("Import fax addresses from LDIF or vCard"), - #user_conf.workingDirectory(), - self.user_settings.working_dir, -- "vCard (*.vcf);;LDIF (*.ldif *.ldi)")) -+ "vCard (*.vcf);;LDIF (*.ldif *.ldi)")[0]) - - if result: - working_directory = to_unicode(os.path.dirname(result)) diff --git a/hplip-osname-mismatch.patch b/hplip-osname-mismatch.patch deleted file mode 100644 index 5f8acb4..0000000 --- a/hplip-osname-mismatch.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up hplip-3.21.12/base/password.py.osname-mismatch hplip-3.21.12/base/password.py ---- hplip-3.21.12/base/password.py.osname-mismatch 2022-01-14 08:36:11.413431048 +0100 -+++ hplip-3.21.12/base/password.py 2022-01-14 09:14:57.315230889 +0100 -@@ -105,7 +105,7 @@ def get_distro_name(): - os_name = name.read().strip() - name.close() - -- os_name = os_name.lower() -+ os_name = os_name.lower().replace(' ','') - if 'MX' in distro_release_name: - os_name = "mxlinux" - if "redhatenterprise" in os_name: diff --git a/hplip.spec b/hplip.spec index 4cfeb80..832f047 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.22.6 -Release: 5%{?dist} +Version: 3.22.10 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -171,25 +171,19 @@ Patch53: hplip-revert-plugins.patch # non-sudoers cannot authenticate # reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 Patch54: hplip-check-userperms.patch -# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly -# getOpenFileName returns a tuple, but hp-fab expects a simple variable -# reported upstream as https://bugs.launchpad.net/hplip/+bug/1914743 -Patch55: hplip-fab-import.patch # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message # reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 -Patch56: hplip-hpsetup-noscanjets.patch +Patch55: hplip-hpsetup-noscanjets.patch # 1963114 - patch for hplip firmware load timeout fix # reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 -Patch57: hplip-hpfirmware-timeout.patch +Patch56: hplip-hpfirmware-timeout.patch # 1985251 - Incorrect permission for gpg directory # reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 -Patch58: hplip-gpgdir-perms.patch +Patch57: hplip-gpgdir-perms.patch # 1987141 - hp-plugin installs malformed udev files # reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 -Patch59: hplip-plugin-udevissues.patch -# reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 -Patch60: hplip-osname-mismatch.patch +Patch58: hplip-plugin-udevissues.patch # 2080235 - Misleading errors about missing shared libraries when scanning # downstream patch to prevent errors: # - when loading libhpmud.so - unversioned .so files belong into devel packages, @@ -198,11 +192,11 @@ Patch60: hplip-osname-mismatch.patch # package (if libhpmud.so had been moved to -devel) the dlopen on unversioned .so file was # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() -Patch61: hplip-no-libhpmud-libm-warnings.patch +Patch59: hplip-no-libhpmud-libm-warnings.patch # hplip 3.22.6 doesn't use the correct arguments for snprintf # reported as https://bugs.launchpad.net/hplip/+bug/1982185 -Patch62: hplip-snprintf-format.patch -Patch63: hplip-plugin-script.patch +Patch60: hplip-snprintf-format.patch +Patch61: hplip-plugin-script.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -510,24 +504,20 @@ done %patch53 -p1 -b .revert-plugins # 1899410 - non-sudoers cannot authenticate because of bad username in prompt %patch54 -p1 -b .check-userperms -# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly -%patch55 -p1 -b .fab-import # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message -%patch56 -p1 -b .hpsetup-noscanjets +%patch55 -p1 -b .hpsetup-noscanjets # 1963114 - patch for hplip firmware load timeout fix -%patch57 -p1 -b .hpfirmware-timeout +%patch56 -p1 -b .hpfirmware-timeout # 1985251 - Incorrect permission for gpg directory -%patch58 -p1 -b .gpgdir-perms +%patch57 -p1 -b .gpgdir-perms # 1987141 - hp-plugin installs malformed udev files -%patch59 -p1 -b .hpplugin-udevperms -# upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 -%patch60 -p1 -b .osname-mismatch +%patch58 -p1 -b .hpplugin-udevperms # 2080235 - Misleading errors about missing shared libraries when scanning -%patch61 -p1 -b .no-libm-libhpmud-warn +%patch59 -p1 -b .no-libm-libhpmud-warn # hplip 3.22.6 doesn't use proper arguments for snprintf -%patch62 -p1 -b .snprintf-format -%patch63 -p1 -b .plugin-patch +%patch60 -p1 -b .snprintf-format +%patch61 -p1 -b .plugin-patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -889,6 +879,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Nov 23 2022 Zdenek Dohnal - 3.22.10-1 +- 2139309 - hplip-3.22.10 is available + * Wed Oct 19 2022 Zdenek Dohnal - 3.22.6-5 - distutils will be removed in Python3.12, use setuptools now diff --git a/sources b/sources index 65eeba2..b462c5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.22.6-repack.tar.gz) = 6296bf9751b2202beb28e481b556fab838a82905fbc40429bcd654570491e6d9cf8fb9c6d4781924136968d71ad47cba32b4385577e7062ce4a8ee23df44b9da +SHA512 (hplip-3.22.10-repack.tar.gz) = cc7cc12ed04e08cbded581351280b71e13525b06a333d43078d67ae591baeecd29773a7f7fb5ebfc3dd842b1e4c9a84af9c5747987ef1941d1eef405ecb65fc1 From bbb19dff5e32c47720b7523412dd7a59112a19a3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 24 Nov 2022 17:24:31 +0100 Subject: [PATCH 098/166] C99 compatibility fixes Stop building the pcardext Python extension because it unusable (#2148210). Related to: --- hplip-pcardext-disable.patch | 34 ++++++++++++++++++++++++ hplip-pserror-c99.patch | 17 ++++++++++++ hplip-scan-hpaio-include.patch | 19 ++++++++++++++ hplip-scan-orblite-c99.patch | 48 ++++++++++++++++++++++++++++++++++ hplip-sclpml-strcasestr.patch | 20 ++++++++++++++ hplip.spec | 20 +++++++++++++- 6 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 hplip-pcardext-disable.patch create mode 100644 hplip-pserror-c99.patch create mode 100644 hplip-scan-hpaio-include.patch create mode 100644 hplip-scan-orblite-c99.patch create mode 100644 hplip-sclpml-strcasestr.patch diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch new file mode 100644 index 0000000..adcac1d --- /dev/null +++ b/hplip-pcardext-disable.patch @@ -0,0 +1,34 @@ +The pcardext Python extension cannot be loaded because it has not been +ported to Python 3: + +>>> import pcardext +Traceback (most recent call last): + File "", line 1, in +ImportError: /usr/lib64/python3.11/site-packages/pcardext.so: undefined symbol: PyString_AsStringAndSize +>>> + +Stop building this extension because it breaks the build if the +compiler lacks support for implicit function declarations. + +Bug: + +Submitted upstream: + +diff --git a/Makefile.am b/Makefile.am +index ddac16a9dd514008..15d953af9150c09e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -306,13 +306,6 @@ if !HPLIP_CLASS_DRIVER + pcarddir = $(hplipdir)/pcard + dist_pcard_DATA = pcard/__init__.py pcard/photocard.py + +-# pcardext +-pcardextdir = $(pyexecdir) +-pcardext_LTLIBRARIES = pcardext.la +-pcardext_la_LDFLAGS = -module -avoid-version +-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h +-pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) +- + # prnt + prntdir = $(hplipdir)/prnt + dist_prnt_DATA = prnt/cups.py prnt/__init__.py prnt/ldl.py prnt/pcl.py prnt/colorcal.py diff --git a/hplip-pserror-c99.patch b/hplip-pserror-c99.patch new file mode 100644 index 0000000..747af3a --- /dev/null +++ b/hplip-pserror-c99.patch @@ -0,0 +1,17 @@ +prnt/pserror.c: Replace an implicit int with an explicit int + +Submitted upstream: + +diff --git a/prnt/hpps/pserror.c b/prnt/hpps/pserror.c +index 114d7e1b5fa364fb..493b49c27917a7e6 100644 +--- a/prnt/hpps/pserror.c ++++ b/prnt/hpps/pserror.c +@@ -24,7 +24,7 @@ extern char *program ; /* Defined by main program, giving program name */ + void message(int flags, char *format, ...) + { + va_list args ; +- static column = 0 ; /* current screen column for message wrap */ ++ static int column = 0 ; /* current screen column for message wrap */ + char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */ + char *bufptr = msgbuf ; /* message buffer pointer */ + diff --git a/hplip-scan-hpaio-include.patch b/hplip-scan-hpaio-include.patch new file mode 100644 index 0000000..79d1d94 --- /dev/null +++ b/hplip-scan-hpaio-include.patch @@ -0,0 +1,19 @@ +scam/sane/hpaio.c: Include orblite.h for more function prototypes + +Otherwise the build fails with compilers which do not support +implicit function declarations. + +Submitted upstream: + +diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c +index d342626822fc2190..57d1ddea32fb5816 100644 +--- a/scan/sane/hpaio.c ++++ b/scan/sane/hpaio.c +@@ -50,6 +50,7 @@ + #include "sclpml.h" + #include "escl.h" + #include "io.h" ++#include "orblite.h" + #include "orblitei.h" + + diff --git a/hplip-scan-orblite-c99.patch b/hplip-scan-orblite-c99.patch new file mode 100644 index 0000000..e2899f0 --- /dev/null +++ b/hplip-scan-orblite-c99.patch @@ -0,0 +1,48 @@ +scan/sane/orblite: Include for function prototypes + +This is required for C99 compatibility. Also delete the unused +bb_unload function because it calls a call to the undefined +_DBG function/macro. + +Submitted upstream: + +diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c +index ba86640c7528fc9c..ac59dda9c2dba593 100644 +--- a/scan/sane/orblite.c ++++ b/scan/sane/orblite.c +@@ -20,6 +20,7 @@ + #include "orblitei.h" + #include "orblite.h"//Added New + #include ++#include + #include "utils.h" + #include "io.h" + +@@ -193,27 +194,6 @@ bugout: + + } + +-static int bb_unload(SANE_THandle ps) +-{ +- _DBG("Calling orblite bb_unload: \n"); +- if (ps->bb_handle) +- { +- dlclose(ps->bb_handle); +- ps->bb_handle = NULL; +- } +- if (ps->hpmud_handle) +- { +- dlclose(ps->hpmud_handle); +- ps->hpmud_handle = NULL; +- } +-// if (ps->math_handle) +-// { +-// dlclose(ps->math_handle); +-// ps->math_handle = NULL; +-// } +- return 0; +-} +- + SANE_Status + orblite_init (SANE_Int * version_code, SANE_Auth_Callback authorize) + { diff --git a/hplip-sclpml-strcasestr.patch b/hplip-sclpml-strcasestr.patch new file mode 100644 index 0000000..e2d0bb8 --- /dev/null +++ b/hplip-sclpml-strcasestr.patch @@ -0,0 +1,20 @@ +Kludge to support building C99 mode. This should no longer be needed +once glibc declares strcasestr by default, and not just with +-D_GNU_SOURCE. + +Submitted upstream: + +diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c +index dc8b32ce02ad1202..f2cacd53e86800ce 100644 +--- a/scan/sane/sclpml.c ++++ b/scan/sane/sclpml.c +@@ -47,6 +47,9 @@ + #define DEBUG_DECLARE_ONLY + #include "sanei_debug.h" + ++/* This file is not built with _GNU_SOURCE. */ ++char *strcasestr(const char *, const char *); ++ + //# define SCLPML_DEBUG + # ifdef SCLPML_DEBUG + # define _DBG(args...) syslog(LOG_INFO, __FILE__ " " STRINGIZE(__LINE__) ": " args) diff --git a/hplip.spec b/hplip.spec index 832f047..5c8a837 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.10 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -203,6 +203,14 @@ Patch61: hplip-plugin-script.patch Patch1000: hplip-fedora-gui.patch %endif +# C99 compatibility fixes. +# Submitted uostream: +Patch1001: hplip-pserror-c99.patch +Patch1002: hplip-scan-hpaio-include.patch +Patch1003: hplip-scan-orblite-c99.patch +Patch1004: hplip-pcardext-disable.patch +Patch1005: hplip-sclpml-strcasestr.patch + # uses automatic creation of configure BuildRequires: autoconf # uses automatic creation of Makefile @@ -524,6 +532,12 @@ done %patch1000 -p1 -b .fedora-gui %endif +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 +%patch1005 -p1 + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -879,6 +893,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 24 2022 Florian Weimer - 3.22.10-2 +- C99 compatibility fixes +- Stop building the pcardext Python extension because it unusable (#2148210) + * Wed Nov 23 2022 Zdenek Dohnal - 3.22.10-1 - 2139309 - hplip-3.22.10 is available From a3d30bea25d16c72d929bcc8f20877e9195c3c12 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 1 Dec 2022 11:19:14 +0100 Subject: [PATCH 099/166] 2148210 - hplip: pcardext Python extension broken stop shipping hp-unload, since it depends on pcardext --- hplip-scan-orblite-c99.patch | 43 +++---------- hplip-sclpml-strcasestr.patch | 32 +++++----- hplip.spec | 110 +++++++++++++++++++++++----------- 3 files changed, 96 insertions(+), 89 deletions(-) diff --git a/hplip-scan-orblite-c99.patch b/hplip-scan-orblite-c99.patch index e2899f0..c921f22 100644 --- a/hplip-scan-orblite-c99.patch +++ b/hplip-scan-orblite-c99.patch @@ -1,13 +1,5 @@ -scan/sane/orblite: Include for function prototypes - -This is required for C99 compatibility. Also delete the unused -bb_unload function because it calls a call to the undefined -_DBG function/macro. - -Submitted upstream: - diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c -index ba86640c7528fc9c..ac59dda9c2dba593 100644 +index ba86640..2eb7aba 100644 --- a/scan/sane/orblite.c +++ b/scan/sane/orblite.c @@ -20,6 +20,7 @@ @@ -18,31 +10,12 @@ index ba86640c7528fc9c..ac59dda9c2dba593 100644 #include "utils.h" #include "io.h" -@@ -193,27 +194,6 @@ bugout: +@@ -195,7 +196,7 @@ bugout: - } - --static int bb_unload(SANE_THandle ps) --{ -- _DBG("Calling orblite bb_unload: \n"); -- if (ps->bb_handle) -- { -- dlclose(ps->bb_handle); -- ps->bb_handle = NULL; -- } -- if (ps->hpmud_handle) -- { -- dlclose(ps->hpmud_handle); -- ps->hpmud_handle = NULL; -- } --// if (ps->math_handle) --// { --// dlclose(ps->math_handle); --// ps->math_handle = NULL; --// } -- return 0; --} -- - SANE_Status - orblite_init (SANE_Int * version_code, SANE_Auth_Callback authorize) + static int bb_unload(SANE_THandle ps) { +- _DBG("Calling orblite bb_unload: \n"); ++ DBG("Calling orblite bb_unload: \n"); + if (ps->bb_handle) + { + dlclose(ps->bb_handle); diff --git a/hplip-sclpml-strcasestr.patch b/hplip-sclpml-strcasestr.patch index e2d0bb8..daf86c8 100644 --- a/hplip-sclpml-strcasestr.patch +++ b/hplip-sclpml-strcasestr.patch @@ -1,20 +1,16 @@ -Kludge to support building C99 mode. This should no longer be needed -once glibc declares strcasestr by default, and not just with --D_GNU_SOURCE. +Switch the whole libsane-hpaio to get proper definition of strcasestr() used in +sclpml.c -Submitted upstream: - -diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c -index dc8b32ce02ad1202..f2cacd53e86800ce 100644 ---- a/scan/sane/sclpml.c -+++ b/scan/sane/sclpml.c -@@ -47,6 +47,9 @@ - #define DEBUG_DECLARE_ONLY - #include "sanei_debug.h" +diff --git a/Makefile.am b/Makefile.am +index 15d953a..7105f74 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -73,7 +73,7 @@ endif + # The following is a interlibrary dependency that must be compiled first. + libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl + #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG +-libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol ++libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol -D_GNU_SOURCE -+/* This file is not built with _GNU_SOURCE. */ -+char *strcasestr(const char *, const char *); -+ - //# define SCLPML_DEBUG - # ifdef SCLPML_DEBUG - # define _DBG(args...) syslog(LOG_INFO, __FILE__ " " STRINGIZE(__LINE__) ": " args) + if NETWORK_BUILD + libsane_hpaio_la_LIBADD += libhpdiscovery.la diff --git a/hplip.spec b/hplip.spec index 5c8a837..928c464 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -197,19 +197,33 @@ Patch59: hplip-no-libhpmud-libm-warnings.patch # reported as https://bugs.launchpad.net/hplip/+bug/1982185 Patch60: hplip-snprintf-format.patch Patch61: hplip-plugin-script.patch +# C99 compatibility fixes by fweimer - use explicit int +# Submitted upstream: +Patch62: hplip-pserror-c99.patch +# C99 compatibility patch by fweimer - several undefined functions in hpaio +# backend are declared in orblite.h +# Submitted upstream: +Patch63: hplip-scan-hpaio-include.patch +# C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c +# - _DBG() looks like typo and new header is added for funcs +# Submitted upstream: +Patch64: hplip-scan-orblite-c99.patch +# C99 compatibility patch by fweimer: +# PyString_AsStringAndSize is removed in Python3, remove its compilation for now +# in case there is a request for compiling it again, there is a possible solution +# for the function py3 alternative https://opendev.org/openstack/pyeclib/commit/19c8313986 +# - disabling removes hp-unload and /usr/share/hplip/pcard as well +# Submitted upstream: +Patch65: hplip-pcardext-disable.patch +# undefined strcasestr() in sclpml.c - build with _GNU_SOURCE +# Submitted upstream: +Patch66: hplip-sclpml-strcasestr.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI Patch1000: hplip-fedora-gui.patch %endif -# C99 compatibility fixes. -# Submitted uostream: -Patch1001: hplip-pserror-c99.patch -Patch1002: hplip-scan-hpaio-include.patch -Patch1003: hplip-scan-orblite-c99.patch -Patch1004: hplip-pcardext-disable.patch -Patch1005: hplip-sclpml-strcasestr.patch # uses automatic creation of configure BuildRequires: autoconf @@ -526,17 +540,29 @@ done # hplip 3.22.6 doesn't use proper arguments for snprintf %patch60 -p1 -b .snprintf-format %patch61 -p1 -b .plugin-patch +# C99 compatibility fixes by fweimer - use explicit int +# Submitted upstream: +%patch62 -p1 -b .pserror-int +# C99 compatibility patch by fweimer - several undefined functions in hpaio +# backend are declared in orblite.h +# Submitted upstream: +%patch63 -p1 -b .hpaio-orblite-defs +# C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c +# - _DBG() looks like typo and new header is added for funcs +# Submitted upstream: +%patch64 -p1 -b .orblite-undefs +# C99 compatibility patch by fweimer - python2 PyString_AsStringAndSize in python3 code +# gives undefined reference - removed for now with dependent hp-unload +%patch65 -p1 -b .pcardext-disable +# C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE +%patch66 -p1 -b .sclpml-strcasestr +# Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI %patch1000 -p1 -b .fedora-gui %endif -%patch1001 -p1 -%patch1002 -p1 -%patch1003 -p1 -%patch1004 -p1 -%patch1005 -p1 sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -604,8 +630,9 @@ rm -rf %{buildroot}%{_sysconfdir}/sane.d \ %{buildroot}%{_docdir} \ %{buildroot}%{_datadir}/hal/fdi \ %{buildroot}%{_datadir}/hplip/pkservice.py \ - %{buildroot}%{_bindir}/hp-pkservice \ - %{buildroot}%{_datadir}/hplip/locatedriver* \ + %{buildroot}%{_bindir}/hp-pkservice + +rm -rf %{buildroot}%{_datadir}/hplip/locatedriver* \ %{buildroot}%{_datadir}/hplip/dat2drv* rm -f %{buildroot}%{_bindir}/hp-logcapture \ @@ -628,7 +655,32 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd -install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin-download +rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc + +rm -rf %{buildroot}%{_datadir}/hplip/install.* \ + %{buildroot}%{_datadir}/hplip/uninstall.* \ + %{buildroot}%{_bindir}/hp-uninstall \ + %{buildroot}%{_datadir}/hplip/upgrade.* \ + %{buildroot}%{_bindir}/hp-upgrade \ + %{buildroot}%{_datadir}/hplip/hplip-install + +rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template + +rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types \ + %{buildroot}%{_datadir}/hplip/fax/pstotiff* + +rm -f %{buildroot}%{_datadir}/hplip/hplip-install + +rm -f %{buildroot}%{_unitdir}/hplip-printer@.service + +rm -f %{buildroot}%{_datadir}/ipp-usb/quirks/HPLIP.conf + +rm -rf %{buildroot}%{_bindir}/hp-unload \ + %{buildroot}%{_datadir}/%{name}/pcard + +# The systray applet doesn't work properly (displays icon as a +# window), so don't ship the launcher yet. +rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %if 0%{?rhel} > 8 rm -rf %{buildroot}%{_bindir}/hp-check \ @@ -668,6 +720,8 @@ rm -rf %{buildroot}%{_bindir}/hp-check \ doc/hpscan.html %endif +install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin-download + %if 0%{?rhel} <= 8 || 0%{?fedora} mkdir -p %{buildroot}%{_datadir}/metainfo cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/ @@ -721,24 +775,6 @@ find doc/images -type f -exec chmod 644 {} \; # SELinux file context (bug #564551). %{__mkdir_p} %{buildroot}%{_datadir}/hplip/prnt/plugins -# Remove files we don't want to package. -rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc -rm -f %{buildroot}%{_datadir}/hplip/hplip-install -rm -rf %{buildroot}%{_datadir}/hplip/install.* -rm -f %{buildroot}%{_datadir}/hplip/uninstall.* -rm -f %{buildroot}%{_bindir}/hp-uninstall -rm -f %{buildroot}%{_datadir}/hplip/upgrade.* -rm -f %{buildroot}%{_bindir}/hp-upgrade -rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template -rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types -rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff* -rm -f %{buildroot}%{_unitdir}/hplip-printer@.service -rm -f %{buildroot}%{_datadir}/ipp-usb/quirks/HPLIP.conf - -# The systray applet doesn't work properly (displays icon as a -# window), so don't ship the launcher yet. -rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop - %post # timeout is to prevent possible freeze during update %{_bindir}/timeout 10m -k 15m %{_bindir}/hpcups-update-ppds &>/dev/null ||: @@ -773,7 +809,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-setup %{_bindir}/hp-testpage %{_bindir}/hp-timedate -%{_bindir}/hp-unload %{_cups_serverbin}/backend/hp %{_cups_serverbin}/backend/hpfax # ex-hpijs @@ -820,7 +855,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/data/pcl %{_datadir}/hplip/data/ps %{_datadir}/hplip/installer -%{_datadir}/hplip/pcard %{_datadir}/hplip/prnt %if 0%{?rhel} <= 8 || 0%{?fedora} %{_datadir}/hplip/scan @@ -893,6 +927,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Dec 01 2022 Zdenek Dohnal - 3.22.10-3 +- 2148210 - hplip: pcardext Python extension broken +- stop shipping hp-unload, since it depends on pcardext + * Thu Nov 24 2022 Florian Weimer - 3.22.10-2 - C99 compatibility fixes - Stop building the pcardext Python extension because it unusable (#2148210) From 2cf2a6900a7ead39b9978e3ea7504eeb75d82810 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 12:12:56 +0000 Subject: [PATCH 100/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 928c464..cf11e37 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.22.10 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -927,6 +927,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 3.22.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Dec 01 2022 Zdenek Dohnal - 3.22.10-3 - 2148210 - hplip: pcardext Python extension broken - stop shipping hp-unload, since it depends on pcardext From ac182d7612c9f582a657f2b519e9caa41aa3efde Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 6 Jun 2023 16:15:52 +0200 Subject: [PATCH 101/166] 2184067 - hplip-3.23.5 is available --- .gitignore | 2 + ...-constructors-of-PyQT5-with-the-corr.patch | 344 ++++++++---------- hplip-add-ppd-crash.patch | 25 +- hplip-check-userperms.patch | 33 -- hplip-covscan.patch | 306 ++++++++-------- hplip-dialog-infinite-loop.patch | 9 - hplip-hpsetup-noscanjets.patch | 20 +- hplip-nocdmfilter.patch | 47 +++ hplip-noernie.patch | 22 +- hplip-repack.sh | 3 +- hplip-snprintf-format.patch | 25 +- hplip-wifisetup.patch | 14 +- hplip.spec | 175 ++++----- sources | 2 +- 14 files changed, 480 insertions(+), 547 deletions(-) delete mode 100644 hplip-check-userperms.patch create mode 100644 hplip-nocdmfilter.patch diff --git a/.gitignore b/.gitignore index 242bd0c..7899dea 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,5 @@ hplip-3.10.6.tar.gz /hplip-3.22.4-repack.tar.gz /hplip-3.22.6-repack.tar.gz /hplip-3.22.10-repack.tar.gz +/hplip-3.23.3-repack.tar.gz +/hplip-3.23.5-repack.tar.gz diff --git a/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch b/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch index ef7d370..c0b26ec 100644 --- a/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch +++ b/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch @@ -1,45 +1,108 @@ -From 95a73bbc9bd65602a0f9411469ab511bc80a01d0 Mon Sep 17 00:00:00 2001 -From: Till Kamppeter -Date: Wed, 3 Oct 2018 15:13:00 +0200 -Subject: Call QMessageBox constructors of PyQT5 with the correct parameters - -The whole Python source code of HPLIP contains 40 incorrect calls of -the QMessageBox constructurs, mostly the list of buttons was given as -separate arguments instead of a bitwise OR of each button's -representation value. If the flow of the code hits one of these -calls (usually when some error or warnings message should be -displayed or an "Are you sure?" question asked) the GUI app crashes. -See https://pythonspot.com/pyqt5-messagebox/ for QMessageBox -documentation. -This patch corrects all these calls. - -Bug-Debian: https://bugs.debian.org/912768 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1745383 ---- - ui/devmgr4.py | 16 ++++++++-------- - ui/faxaddrbookform.py | 6 +++--- - ui/faxsendjobform.py | 6 +++--- - ui/firmwaredialog.py | 2 +- - ui/makecopiesform.py | 4 ++-- - ui/nodevicesform.py | 2 +- - ui/pluginform2.py | 4 ++-- - ui/printerform.py | 2 +- - ui/settingsdialog.py | 4 ++-- - ui/setupform.py | 10 +++++----- - ui/unloadform.py | 2 +- - ui/upgradeform.py | 4 ++-- - ui5/devmgr5.py | 6 ++---- - ui5/fabwindow.py | 2 +- - ui5/nodevicesdialog.py | 3 +-- - ui5/plugindialog.py | 2 +- - ui5/queuesconf.py | 2 +- - ui5/setupdialog.py | 6 +++--- - 18 files changed, 40 insertions(+), 43 deletions(-) - -diff --git a/ui/devmgr4.py b/ui/devmgr4.py -index cc2552f91..a868ccac0 100644 ---- a/ui/devmgr4.py -+++ b/ui/devmgr4.py +diff -up hplip-3.23.3/ui5/devmgr5.py.qmsgbox-typos-fix hplip-3.23.3/ui5/devmgr5.py +--- hplip-3.23.3/ui5/devmgr5.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui5/devmgr5.py 2023-05-29 13:48:48.429731297 +0200 +@@ -144,8 +144,7 @@ class PluginInstall(QObject): + install_plugin = QMessageBox.warning(self.parent, + self.parent.windowTitle(), + self.__tr("The HPLIP plugin is already installed.

Do you want to continue and re-install it?"), +- QMessageBox.Yes, +- QMessageBox.No, ++ QMessageBox.Yes | QMessageBox.No, + QMessageBox.NoButton) == QMessageBox.Yes + + if install_plugin: +@@ -154,8 +153,7 @@ class PluginInstall(QObject): + QMessageBox.critical(self.parent, + self.parent.windowTitle(), + self.__tr("Unable to find an appropriate su/sudo utility to run hp-plugin.

Install kdesu, gnomesu, or gksu.

"), +- QMessageBox.Ok, +- QMessageBox.NoButton, ++ QMessageBox.Ok | QMessageBox.NoButton, + QMessageBox.NoButton) + + +diff -up hplip-3.23.3/ui5/fabwindow.py.qmsgbox-typos-fix hplip-3.23.3/ui5/fabwindow.py +--- hplip-3.23.3/ui5/fabwindow.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui5/fabwindow.py 2023-05-29 13:48:48.429731297 +0200 +@@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWin + new_name = to_unicode(self.NameLineEdit.text()) + if new_name != self.name: + if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \ +- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: + + self.db.rename(self.name, new_name) + log.debug("Rename %s to %s" % (self.name, new_name)) +diff -up hplip-3.23.3/ui5/nodevicesdialog.py.qmsgbox-typos-fix hplip-3.23.3/ui5/nodevicesdialog.py +--- hplip-3.23.3/ui5/nodevicesdialog.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui5/nodevicesdialog.py 2023-05-29 13:48:48.429731297 +0200 +@@ -64,8 +64,7 @@ class NoDevicesDialog(QDialog, Ui_NoDevi + QMessageBox.critical(self, + self.windowTitle(), + self.__tr("An error occurred.

Please re-start the Device Manager and try again."), +- QMessageBox.Ok, +- QMessageBox.NoButton, ++ QMessageBox.Ok | QMessageBox.NoButton, + QMessageBox.NoButton) + + +diff -up hplip-3.23.3/ui5/plugindialog.py.qmsgbox-typos-fix hplip-3.23.3/ui5/plugindialog.py +--- hplip-3.23.3/ui5/plugindialog.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui5/plugindialog.py 2023-05-29 13:48:48.429731297 +0200 +@@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog): + + if QMessageBox.question(self, " ", + self.__tr("%s

Without this, it is not possible to authenticate and validate the plug-in prior to installation.

Do you still want to install the plug-in?" %error_str), +- QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes: + + self.pluginObj.deleteInstallationFiles(download_plugin_file) + self.close() +diff -up hplip-3.23.3/ui5/queuesconf.py.qmsgbox-typos-fix hplip-3.23.3/ui5/queuesconf.py +--- hplip-3.23.3/ui5/queuesconf.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui5/queuesconf.py 2023-05-29 13:48:48.430731291 +0200 +@@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog) + + if QMessageBox.question(self, " ", + self.__tr("%s

Without this, it is not possible to authenticate and validate this tool prior to installation.

Do you still want to run Smart Install disabler?" %error_str), +- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: + # Disabling without verification. + sts, out = utils.run("sh %s"%smart_install_run) + +diff -up hplip-3.23.3/ui5/setupdialog.py.qmsgbox-typos-fix hplip-3.23.3/ui5/setupdialog.py +--- hplip-3.23.3/ui5/setupdialog.py.qmsgbox-typos-fix 2023-05-29 13:48:48.430731291 +0200 ++++ hplip-3.23.3/ui5/setupdialog.py 2023-05-29 13:54:03.236851925 +0200 +@@ -886,7 +886,7 @@ class SetupDialog(QDialog, Ui_Dialog): + self.windowTitle(), + warn_text, + QMessageBox.Yes | +- QMessageBox.No | ++ QMessageBox.No, + QMessageBox.NoButton) == QMessageBox.Yes): + i = 2 + while True: +@@ -1171,7 +1171,7 @@ class SetupDialog(QDialog, Ui_Dialog): + if QMessageBox.critical(self, + self.windowTitle(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break +@@ -1223,7 +1223,7 @@ class SetupDialog(QDialog, Ui_Dialog): + if QMessageBox.critical(self, + self.windowTitle(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break +diff -up hplip-3.23.3/ui/devmgr4.py.qmsgbox-typos-fix hplip-3.23.3/ui/devmgr4.py +--- hplip-3.23.3/ui/devmgr4.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/devmgr4.py 2023-05-29 13:48:48.424731328 +0200 @@ -1422,7 +1422,7 @@ class DevMgr4(DevMgr4_base): QMessageBox.critical(self, self.caption(), @@ -112,11 +175,10 @@ index cc2552f91..a868ccac0 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/faxaddrbookform.py b/ui/faxaddrbookform.py -index 109462207..b23364410 100644 ---- a/ui/faxaddrbookform.py -+++ b/ui/faxaddrbookform.py -@@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookGroupsForm_base): +diff -up hplip-3.23.3/ui/faxaddrbookform.py.qmsgbox-typos-fix hplip-3.23.3/ui/faxaddrbookform.py +--- hplip-3.23.3/ui/faxaddrbookform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/faxaddrbookform.py 2023-05-29 13:48:48.424731328 +0200 +@@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookG x = QMessageBox.critical(self, self.caption(), self.__tr("Annoying Confirmation: Are you sure you want to delete this group?"), @@ -125,7 +187,7 @@ index 109462207..b23364410 100644 QMessageBox.No | QMessageBox.Default, QMessageBox.NoButton) if x == QMessageBox.Yes: -@@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): +@@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_ba if QMessageBox.critical(self, self.caption(), self.__tr("Annoying Confirmation: Are you sure you want to delete this address book entry?"), @@ -134,7 +196,7 @@ index 109462207..b23364410 100644 QMessageBox.No | QMessageBox.Default, QMessageBox.NoButton) == QMessageBox.Yes: db.delete(self.current.entry['name']) -@@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): +@@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_ba QMessageBox.critical(self, self.caption(), QString(error_text), @@ -143,10 +205,9 @@ index 109462207..b23364410 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py -index 106215c5e..69f424c42 100644 ---- a/ui/faxsendjobform.py -+++ b/ui/faxsendjobform.py +diff -up hplip-3.23.3/ui/faxsendjobform.py.qmsgbox-typos-fix hplip-3.23.3/ui/faxsendjobform.py +--- hplip-3.23.3/ui/faxsendjobform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/faxsendjobform.py 2023-05-29 13:48:48.424731328 +0200 @@ -210,7 +210,7 @@ class FaxSendJobForm(QMainWindow): QMessageBox.information(self, self.caption(), @@ -174,11 +235,10 @@ index 106215c5e..69f424c42 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/firmwaredialog.py b/ui/firmwaredialog.py -index 16b313374..0bcee1164 100644 ---- a/ui/firmwaredialog.py -+++ b/ui/firmwaredialog.py -@@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDialog_Base): +diff -up hplip-3.23.3/ui/firmwaredialog.py.qmsgbox-typos-fix hplip-3.23.3/ui/firmwaredialog.py +--- hplip-3.23.3/ui/firmwaredialog.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/firmwaredialog.py 2023-05-29 13:48:48.424731328 +0200 +@@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDi QMessageBox.critical(self, self.caption(), error_text, @@ -187,10 +247,9 @@ index 16b313374..0bcee1164 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/makecopiesform.py b/ui/makecopiesform.py -index 27f144b36..0fbb573e3 100644 ---- a/ui/makecopiesform.py -+++ b/ui/makecopiesform.py +diff -up hplip-3.23.3/ui/makecopiesform.py.qmsgbox-typos-fix hplip-3.23.3/ui/makecopiesform.py +--- hplip-3.23.3/ui/makecopiesform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/makecopiesform.py 2023-05-29 13:48:48.424731328 +0200 @@ -156,7 +156,7 @@ class MakeCopiesForm(QMainWindow): QMessageBox.critical(self, self.caption(), @@ -209,10 +268,9 @@ index 27f144b36..0fbb573e3 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/nodevicesform.py b/ui/nodevicesform.py -index 01f6ae53b..57a696375 100644 ---- a/ui/nodevicesform.py -+++ b/ui/nodevicesform.py +diff -up hplip-3.23.3/ui/nodevicesform.py.qmsgbox-typos-fix hplip-3.23.3/ui/nodevicesform.py +--- hplip-3.23.3/ui/nodevicesform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/nodevicesform.py 2023-05-29 13:48:48.424731328 +0200 @@ -67,7 +67,7 @@ class NoDevicesForm(NoDevicesForm_base): QMessageBox.critical(self, self.caption(), @@ -222,10 +280,9 @@ index 01f6ae53b..57a696375 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/pluginform2.py b/ui/pluginform2.py -index 64e64aa77..76cb0238b 100644 ---- a/ui/pluginform2.py -+++ b/ui/pluginform2.py +diff -up hplip-3.23.3/ui/pluginform2.py.qmsgbox-typos-fix hplip-3.23.3/ui/pluginform2.py +--- hplip-3.23.3/ui/pluginform2.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/pluginform2.py 2023-05-29 13:48:48.424731328 +0200 @@ -173,7 +173,7 @@ class PluginForm2(PluginForm2_base): QMessageBox.critical(self, self.caption(), @@ -244,10 +301,9 @@ index 64e64aa77..76cb0238b 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/printerform.py b/ui/printerform.py -index 0c6c4f39e..7c10ab07b 100644 ---- a/ui/printerform.py -+++ b/ui/printerform.py +diff -up hplip-3.23.3/ui/printerform.py.qmsgbox-typos-fix hplip-3.23.3/ui/printerform.py +--- hplip-3.23.3/ui/printerform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/printerform.py 2023-05-29 13:48:48.425731321 +0200 @@ -154,7 +154,7 @@ class PrinterForm(QMainWindow): QMessageBox.critical(self, self.caption(), @@ -257,11 +313,10 @@ index 0c6c4f39e..7c10ab07b 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/settingsdialog.py b/ui/settingsdialog.py -index 92da22546..24f02fd84 100644 ---- a/ui/settingsdialog.py -+++ b/ui/settingsdialog.py -@@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base): +diff -up hplip-3.23.3/ui/settingsdialog.py.qmsgbox-typos-fix hplip-3.23.3/ui/settingsdialog.py +--- hplip-3.23.3/ui/settingsdialog.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/settingsdialog.py 2023-05-29 13:48:48.425731321 +0200 +@@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base ## QMessageBox.warning(self, ## self.caption(), ## self.__tr("One or more email addresses are missing.

Please enter this information and try again."), @@ -270,7 +325,7 @@ index 92da22546..24f02fd84 100644 ## QMessageBox.NoButton, ## QMessageBox.NoButton) ## return -@@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base): +@@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base ## QMessageBox.information(self, ## self.caption(), ## self.__tr("

Please check your email for a test message.

If the message doesn't arrive, please check your settings and try again."), @@ -279,10 +334,9 @@ index 92da22546..24f02fd84 100644 ## QMessageBox.NoButton, ## QMessageBox.NoButton) -diff --git a/ui/setupform.py b/ui/setupform.py -index 307917b02..78863fdd8 100644 ---- a/ui/setupform.py -+++ b/ui/setupform.py +diff -up hplip-3.23.3/ui/setupform.py.qmsgbox-typos-fix hplip-3.23.3/ui/setupform.py +--- hplip-3.23.3/ui/setupform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/setupform.py 2023-05-29 13:48:48.425731321 +0200 @@ -602,7 +602,7 @@ class SetupForm(SetupForm_base): if ( QMessageBox.warning(self, self.caption(), @@ -328,10 +382,9 @@ index 307917b02..78863fdd8 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/unloadform.py b/ui/unloadform.py -index 8397a689c..ae363e01e 100644 ---- a/ui/unloadform.py -+++ b/ui/unloadform.py +diff -up hplip-3.23.3/ui/unloadform.py.qmsgbox-typos-fix hplip-3.23.3/ui/unloadform.py +--- hplip-3.23.3/ui/unloadform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/unloadform.py 2023-05-29 13:48:48.425731321 +0200 @@ -135,7 +135,7 @@ class UnloadForm(QMainWindow): QMessageBox.critical(self, self.caption(), @@ -341,10 +394,9 @@ index 8397a689c..ae363e01e 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui/upgradeform.py b/ui/upgradeform.py -index 6b9acf5cc..d0b418419 100644 ---- a/ui/upgradeform.py -+++ b/ui/upgradeform.py +diff -up hplip-3.23.3/ui/upgradeform.py.qmsgbox-typos-fix hplip-3.23.3/ui/upgradeform.py +--- hplip-3.23.3/ui/upgradeform.py.qmsgbox-typos-fix 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/ui/upgradeform.py 2023-05-29 13:48:48.425731321 +0200 @@ -118,7 +118,7 @@ class UpgradeForm(UpgradeForm_base): QMessageBox.critical(self, self.caption(), @@ -363,111 +415,3 @@ index 6b9acf5cc..d0b418419 100644 QMessageBox.NoButton, QMessageBox.NoButton) -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index 495883f72..0ca016820 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -139,8 +139,7 @@ class PluginInstall(QObject): - install_plugin = QMessageBox.warning(self.parent, - self.parent.windowTitle(), - self.__tr("The HPLIP plugin is already installed.

Do you want to continue and re-install it?"), -- QMessageBox.Yes, -- QMessageBox.No, -+ QMessageBox.Yes | QMessageBox.No, - QMessageBox.NoButton) == QMessageBox.Yes - - if install_plugin: -@@ -149,8 +148,7 @@ class PluginInstall(QObject): - QMessageBox.critical(self.parent, - self.parent.windowTitle(), - self.__tr("Unable to find an appropriate su/sudo utility to run hp-plugin.

Install kdesu, gnomesu, or gksu.

"), -- QMessageBox.Ok, -- QMessageBox.NoButton, -+ QMessageBox.Ok | QMessageBox.NoButton, - QMessageBox.NoButton) - - -diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py -index 488b6bbd5..0b95c94f1 100644 ---- a/ui5/fabwindow.py -+++ b/ui5/fabwindow.py -@@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWindow): - new_name = to_unicode(self.NameLineEdit.text()) - if new_name != self.name: - if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \ -- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: -+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: - - self.db.rename(self.name, new_name) - log.debug("Rename %s to %s" % (self.name, new_name)) -diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py -index 6083f6d4b..ca86bfcda 100644 ---- a/ui5/nodevicesdialog.py -+++ b/ui5/nodevicesdialog.py -@@ -64,8 +64,7 @@ class NoDevicesDialog(QDialog, Ui_NoDevicesDialog_base): - QMessageBox.critical(self, - self.windowTitle(), - self.__tr("An error occurred.

Please re-start the Device Manager and try again."), -- QMessageBox.Ok, -- QMessageBox.NoButton, -+ QMessageBox.Ok | QMessageBox.NoButton, - QMessageBox.NoButton) - - -diff --git a/ui5/plugindialog.py b/ui5/plugindialog.py -index e3007f911..1c6b33868 100644 ---- a/ui5/plugindialog.py -+++ b/ui5/plugindialog.py -@@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog): - - if QMessageBox.question(self, " ", - self.__tr("%s

Without this, it is not possible to authenticate and validate the plug-in prior to installation.

Do you still want to install the plug-in?" %error_str), -- QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes: -+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes: - - self.pluginObj.deleteInstallationFiles(download_plugin_file) - self.close() -diff --git a/ui5/queuesconf.py b/ui5/queuesconf.py -index cf2206490..e3c2a0278 100644 ---- a/ui5/queuesconf.py -+++ b/ui5/queuesconf.py -@@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog): - - if QMessageBox.question(self, " ", - self.__tr("%s

Without this, it is not possible to authenticate and validate this tool prior to installation.

Do you still want to run Smart Install disabler?" %error_str), -- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: -+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: - # Disabling without verification. - sts, out = utils.run("sh %s"%smart_install_run) - -diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py -index fbfe5ac9b..120ee1587 100644 ---- a/ui5/setupdialog.py -+++ b/ui5/setupdialog.py -@@ -873,7 +873,7 @@ class SetupDialog(QDialog, Ui_Dialog): - self.windowTitle(), - warn_text, - QMessageBox.Yes|\ -- QMessageBox.No|\ -+ QMessageBox.No, - QMessageBox.NoButton) == QMessageBox.Yes ): - i = 2 - while True: -@@ -1108,7 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog): - if QMessageBox.critical(self, - self.windowTitle(), - error_text, -- QMessageBox.Retry | QMessageBox.Default, -+ QMessageBox.Retry | QMessageBox.Default |\ - QMessageBox.Cancel | QMessageBox.Escape, - QMessageBox.NoButton) == QMessageBox.Cancel: - break -@@ -1138,7 +1138,7 @@ class SetupDialog(QDialog, Ui_Dialog): - if QMessageBox.critical(self, - self.windowTitle(), - error_text, -- QMessageBox.Retry | QMessageBox.Default, -+ QMessageBox.Retry | QMessageBox.Default |\ - QMessageBox.Cancel | QMessageBox.Escape, - QMessageBox.NoButton) == QMessageBox.Cancel: - break diff --git a/hplip-add-ppd-crash.patch b/hplip-add-ppd-crash.patch index 7117860..798630a 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -1,8 +1,7 @@ -diff --git a/setup.py b/setup.py -index 976a42c..3604dd7 100755 ---- a/setup.py -+++ b/setup.py -@@ -558,6 +558,9 @@ else: # INTERACTIVE_MODE +diff -up hplip-3.23.3/setup.py.add-ppd-crash hplip-3.23.3/setup.py +--- hplip-3.23.3/setup.py.add-ppd-crash 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/setup.py 2023-05-29 13:55:03.443497903 +0200 +@@ -553,6 +553,9 @@ else: # INTERACTIVE_MODE if file_path.endswith('.gz'): nickname = gzip.GzipFile(file_path, 'r').read(4096) @@ -12,17 +11,17 @@ index 976a42c..3604dd7 100755 else: nickname = open(file_path, 'r').read(4096) -diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py -index ac45357..a6dacf0 100644 ---- a/ui5/setupdialog.py -+++ b/ui5/setupdialog.py -@@ -772,9 +772,9 @@ class SetupDialog(QDialog, Ui_Dialog): - +diff -up hplip-3.23.3/ui5/setupdialog.py.add-ppd-crash hplip-3.23.3/ui5/setupdialog.py +--- hplip-3.23.3/ui5/setupdialog.py.add-ppd-crash 2023-05-29 13:55:03.443497903 +0200 ++++ hplip-3.23.3/ui5/setupdialog.py 2023-05-29 13:57:19.014700721 +0200 +@@ -765,10 +765,9 @@ class SetupDialog(QDialog, Ui_Dialog): + pass def OtherPPDButton_clicked(self, b): - ppd_file = to_unicode(QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"), -- sys_conf.get('dirs', 'ppd'), -- self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))) +- sys_conf.get( +- 'dirs', 'ppd'), +- self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))) + ppd_file = QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"), + sys_conf.get('dirs', 'ppd'), + self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))[0] diff --git a/hplip-check-userperms.patch b/hplip-check-userperms.patch deleted file mode 100644 index 9204c0b..0000000 --- a/hplip-check-userperms.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/base/password.py b/base/password.py -index bd68f2a..bff9f80 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -157,6 +157,28 @@ class Password(object): - log.warn("%s distro is not found in AUTH_TYPES" % distro_name) - self.__authType = 'su' - -+ # check if caller is in wheel group - use 'su' if he isnt - -+ # or if the caller is root (just for showing 'root' username) -+ # in the prompt -+ import os -+ from grp import getgrnam -+ -+ user = os.getenv('USER') -+ -+ try: -+ members = getgrnam('wheel').gr_mem -+ except KeyError: -+ try: -+ members = getgrnam('sudo').gr_mem -+ except: -+ return -+ -+ if user in members: -+ self.__authType = 'sudo' -+ else: -+ self.__authType = 'su' -+ -+ - def __getPasswordDisplayString(self): - if self.__authType == "su": - return "Please enter the root/superuser password: " diff --git a/hplip-covscan.patch b/hplip-covscan.patch index bb6314b..adc456d 100644 --- a/hplip-covscan.patch +++ b/hplip-covscan.patch @@ -1,38 +1,6 @@ -diff --git a/Makefile.am b/Makefile.am -index 62a25d3..2c4d6f8 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -3,7 +3,7 @@ - # - # (c) 2004-2015 Copyright HP Development Company, LP - # Author: David Suffield, Naga Samrat Chowdary Narla, Sarbeswar Meher --INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -+INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -Iprotocol - CFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" - CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" - -@@ -304,7 +304,7 @@ dist_pcard_DATA = pcard/__init__.py pcard/photocard.py - pcardextdir = $(pyexecdir) - pcardext_LTLIBRARIES = pcardext.la - pcardext_la_LDFLAGS = -module -avoid-version --pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c -+pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h - pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) - - # prnt -@@ -316,7 +316,7 @@ lib_LTLIBRARIES += libhpipp.la - #hpipp_LTLIBRARIES = hpipp.la - #hpipp_la_LDFLAGS = -module -avoid-version - libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h --libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -+libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -D_GNU_SOURCE - libhpipp_la_LDFLAGS = -version-info 0:1:0 - libhpipp_la_LIBADD = libhpmud.la - -diff --git a/common/utils.c b/common/utils.c -index d8ecee9..def4e47 100644 ---- a/common/utils.c -+++ b/common/utils.c +diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c +--- hplip-3.23.3/common/utils.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/common/utils.c 2023-05-29 13:58:10.969395214 +0200 @@ -1,5 +1,9 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE @@ -44,11 +12,10 @@ index d8ecee9..def4e47 100644 #include #include #include -diff --git a/io/hpmud/hpmud.c b/io/hpmud/hpmud.c -index 0eb6fff..358f279 100644 ---- a/io/hpmud/hpmud.c -+++ b/io/hpmud/hpmud.c -@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_DEVICE dd, struct hpmud_dstat *ds) +diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c +--- hplip-3.23.3/io/hpmud/hpmud.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/io/hpmud/hpmud.c 2023-05-29 13:58:10.970395208 +0200 +@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_ } strncpy(ds->uri, msp->device[dd].uri, sizeof(ds->uri)); @@ -56,10 +23,9 @@ index 0eb6fff..358f279 100644 ds->io_mode = msp->device[dd].io_mode; ds->channel_cnt = msp->device[dd].channel_cnt; ds->mlc_up = msp->device[dd].mlc_up; -diff --git a/io/hpmud/jd.c b/io/hpmud/jd.c -index 06f5072..20df27a 100644 ---- a/io/hpmud/jd.c -+++ b/io/hpmud/jd.c +diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c +--- hplip-3.23.3/io/hpmud/jd.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/io/hpmud/jd.c 2023-05-29 13:58:10.970395208 +0200 @@ -31,6 +31,7 @@ #endif @@ -68,10 +34,9 @@ index 06f5072..20df27a 100644 #include "hpmud.h" #include "hpmudi.h" -diff --git a/io/hpmud/model.c b/io/hpmud/model.c -index 4ea8990..a917d69 100644 ---- a/io/hpmud/model.c -+++ b/io/hpmud/model.c +diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c +--- hplip-3.23.3/io/hpmud/model.c.covscan 2023-05-29 13:58:10.958395279 +0200 ++++ hplip-3.23.3/io/hpmud/model.c 2023-05-29 13:58:10.970395208 +0200 @@ -117,6 +117,7 @@ static int ReadConfig() if (rcbuf[0] == '[') { @@ -88,11 +53,10 @@ index 4ea8990..a917d69 100644 break; /* done */ } } -diff --git a/io/hpmud/musb.c b/io/hpmud/musb.c -index 6e99c15..755493e 100644 ---- a/io/hpmud/musb.c -+++ b/io/hpmud/musb.c -@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned char *buffer, int size) +diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c +--- hplip-3.23.3/io/hpmud/musb.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/io/hpmud/musb.c 2023-05-29 13:58:10.970395208 +0200 +@@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch len = size-1; /* leave byte for zero termination */ if (len > 2) len -= 2; @@ -101,11 +65,10 @@ index 6e99c15..755493e 100644 buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff --git a/io/hpmud/pp.c b/io/hpmud/pp.c -index 74c5fdc..021d627 100644 ---- a/io/hpmud/pp.c -+++ b/io/hpmud/pp.c -@@ -632,7 +632,7 @@ static int device_id(int fd, char *buffer, int size) +diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c +--- hplip-3.23.3/io/hpmud/pp.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/io/hpmud/pp.c 2023-05-29 13:58:10.970395208 +0200 +@@ -632,7 +632,7 @@ static int device_id(int fd, char *buffe len = size-1; /* leave byte for zero termination */ if (len > 2) len -= 2; @@ -114,10 +77,39 @@ index 74c5fdc..021d627 100644 buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff --git a/pcard/fat.c b/pcard/fat.c -index caa383f..e1425c0 100644 ---- a/pcard/fat.c -+++ b/pcard/fat.c +diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am +--- hplip-3.23.3/Makefile.am.covscan 2023-05-29 13:58:10.944395361 +0200 ++++ hplip-3.23.3/Makefile.am 2023-05-29 13:58:10.969395214 +0200 +@@ -3,7 +3,7 @@ + # + # (c) 2004-2015 Copyright HP Development Company, LP + # Author: David Suffield, Naga Samrat Chowdary Narla, Sarbeswar Meher +-INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ ++INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -Iprotocol + CFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" + CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" + +@@ -310,7 +310,7 @@ dist_pcard_DATA = pcard/__init__.py pcar + pcardextdir = $(pyexecdir) + pcardext_LTLIBRARIES = pcardext.la + pcardext_la_LDFLAGS = -module -avoid-version +-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c ++pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h + pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + + # prnt +@@ -322,7 +322,7 @@ lib_LTLIBRARIES += libhpipp.la + #hpipp_LTLIBRARIES = hpipp.la + #hpipp_la_LDFLAGS = -module -avoid-version + libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h +-libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" ++libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -D_GNU_SOURCE + libhpipp_la_LDFLAGS = -version-info 0:1:0 + libhpipp_la_LIBADD = libhpmud.la + +diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c +--- hplip-3.23.3/pcard/fat.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/pcard/fat.c 2023-05-29 13:58:10.971395203 +0200 @@ -519,14 +519,17 @@ int FatFreeSpace(void) int FatDiskAttributes( PHOTO_CARD_ATTRIBUTES * pa ) @@ -147,10 +139,9 @@ index caa383f..e1425c0 100644 cwd.StartSector = ConvertClusterToSector(fa.StartCluster); cwd.CurrSector = cwd.StartSector; cwd.StartCluster = fa.StartCluster; -diff --git a/prnt/hpcups/genPCLm.cpp b/prnt/hpcups/genPCLm.cpp -index c0cdc73..4db4bde 100644 ---- a/prnt/hpcups/genPCLm.cpp -+++ b/prnt/hpcups/genPCLm.cpp +diff -up hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan hplip-3.23.3/prnt/hpcups/genPCLm.cpp +--- hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/prnt/hpcups/genPCLm.cpp 2023-05-29 13:58:10.971395203 +0200 @@ -1237,11 +1237,16 @@ void PCLmGenerator::writeJobTicket() char orientation[256]; char duplex[256]; @@ -173,7 +164,7 @@ index c0cdc73..4db4bde 100644 snprintf(pOutStr,OUT_STR_SIZE,"%% genPCLm (Ver: %f)\n",PCLM_Ver); writeStr2OutBuff(pOutStr); snprintf(pOutStr,OUT_STR_SIZE,"%%============= Job Ticket =============\n"); writeStr2OutBuff(pOutStr); -@@ -1635,7 +1640,10 @@ int PCLmGenerator::StartPage(PCLmPageSetup *PCLmPageContent, void **pOutBuffer, +@@ -1635,7 +1640,10 @@ int PCLmGenerator::StartPage(PCLmPageSe } if(strlen(PCLmPageContent->mediaSizeName)) @@ -185,10 +176,9 @@ index c0cdc73..4db4bde 100644 currStripHeight=PCLmPageContent->stripHeight; if(!currStripHeight) -diff --git a/prnt/hpijs/context2.cpp b/prnt/hpijs/context2.cpp -index c3df482..19490b1 100644 ---- a/prnt/hpijs/context2.cpp -+++ b/prnt/hpijs/context2.cpp +diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp +--- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200 @@ -1302,6 +1302,7 @@ DRIVER_ERROR PrintContext::SelectDevice if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize)) { @@ -197,11 +187,10 @@ index c3df482..19490b1 100644 } thePrinter = pPFI->CreatePrinter (pSS, familyHandle); if (thePrinter->constructor_error != NO_ERROR) -diff --git a/prnt/hpijs/systemservices.cpp b/prnt/hpijs/systemservices.cpp -index 95f5a64..f5b4bb5 100644 ---- a/prnt/hpijs/systemservices.cpp -+++ b/prnt/hpijs/systemservices.cpp -@@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM, const char* model) +diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hpijs/systemservices.cpp +--- hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan 2023-03-28 09:26:27.000000000 +0200 ++++ hplip-3.23.3/prnt/hpijs/systemservices.cpp 2023-05-29 13:58:10.971395203 +0200 +@@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM IOMode.bDevID =IM.bDevID && IOMode.bDevID; if (model) @@ -212,11 +201,10 @@ index 95f5a64..f5b4bb5 100644 } APDK_END_NAMESPACE -diff --git a/prnt/hpps/hppsfilter.c b/prnt/hpps/hppsfilter.c -index 5879a70..d246041 100644 ---- a/prnt/hpps/hppsfilter.c -+++ b/prnt/hpps/hppsfilter.c -@@ -230,13 +230,13 @@ static void WriteHeader(char **argument) +diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hppsfilter.c +--- hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/prnt/hpps/hppsfilter.c 2023-05-29 13:58:10.972395197 +0200 +@@ -274,13 +274,13 @@ static void WriteHeader(char **argument) /* Writing Header Information argument[1] = JOB ID , argument[2]= USERNAME, argument[3] = TITLE */ hpwrite("\x1b%-12345X@PJL JOBNAME=", strlen("\x1b%-12345X@PJL JOBNAME=")); @@ -233,25 +221,24 @@ index 5879a70..d246041 100644 hpwrite(buffer, strlen(buffer)); fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n"); return; -diff --git a/protocol/hp_ipp.h b/protocol/hp_ipp.h -index 3853f84..de76202 100644 ---- a/protocol/hp_ipp.h -+++ b/protocol/hp_ipp.h -@@ -166,5 +166,10 @@ int getCupsPrinters(printer_t **printer_list); - HPIPP_RESULT parseResponseHeader(char* header, int *content_length, int *chunked, int* header_size); - HPIPP_RESULT prepend_http_header(raw_ipp *raw_request); +diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h +--- hplip-3.23.3/protocol/hp_ipp.h.covscan 2023-05-29 13:58:10.972395197 +0200 ++++ hplip-3.23.3/protocol/hp_ipp.h 2023-05-29 13:59:03.645085468 +0200 +@@ -168,6 +168,11 @@ HPIPP_RESULT parseResponseHeader(char* h + HPIPP_RESULT prepend_http_header(raw_ipp *raw_request,const char *resource); enum HPMUD_RESULT sendUSBRequest(char *buf, int size, raw_ipp *responseptr, char * device_uri); + enum HPMUD_RESULT sendUSBFileRequest(char *buf, int size, int fileHandle,raw_ipp *responseptr, char *device_uri); +void _releaseCupsInstance(); +int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info); +int delCupsPrinter(char *pr_name); +int setDefaultCupsPrinter(char *pr_name); +int controlCupsPrinter(char *pr_name, int op); - # endif //_IPP_H -diff --git a/scan/sane/bb_ledm.c b/scan/sane/bb_ledm.c -index b233d1e..7ba0edf 100644 ---- a/scan/sane/bb_ledm.c -+++ b/scan/sane/bb_ledm.c + ipp_t * createFaxDetailRequest(const char *printer_name); + ipp_t * getDeviceFaxModemAttributes(char* device_uri,char* printer_name, int *count); +diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm.c +--- hplip-3.23.3/scan/sane/bb_ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/bb_ledm.c 2023-05-29 13:58:10.972395197 +0200 @@ -26,6 +26,7 @@ # include "http.h" # include "xml.h" @@ -260,10 +247,9 @@ index b233d1e..7ba0edf 100644 # include -diff --git a/scan/sane/common.h b/scan/sane/common.h -index 0f67542..e496a74 100644 ---- a/scan/sane/common.h -+++ b/scan/sane/common.h +diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h +--- hplip-3.23.3/scan/sane/common.h.covscan 2023-05-29 13:58:10.727396637 +0200 ++++ hplip-3.23.3/scan/sane/common.h 2023-05-29 13:58:10.972395197 +0200 @@ -36,7 +36,7 @@ #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) @@ -273,11 +259,10 @@ index 0f67542..e496a74 100644 #define BUG_DUMP(data, size) bugdump((data), (size)) #define BUG_SZ(args...) {syslog(LOG_ERR, args); DBG(2, args);} -diff --git a/scan/sane/escl.c b/scan/sane/escl.c -index af45bff..4f59b21 100644 ---- a/scan/sane/escl.c -+++ b/scan/sane/escl.c -@@ -795,7 +795,7 @@ SANE_Status escl_control_option(SANE_Handle handle, SANE_Int option, SANE_Action +diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c +--- hplip-3.23.3/scan/sane/escl.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/escl.c 2023-05-29 13:58:10.972395197 +0200 +@@ -849,7 +849,7 @@ SANE_Status escl_control_option(SANE_Han //DBG8("escl_control_option (option=%s) action=%d\n", ps->option[option].name, action); if (stat != SANE_STATUS_GOOD) { @@ -286,7 +271,7 @@ index af45bff..4f59b21 100644 } return stat; -@@ -1102,7 +1102,7 @@ void escl_close(SANE_Handle handle) +@@ -1159,7 +1159,7 @@ void escl_close(SANE_Handle handle) if (ps == NULL || ps != session) { @@ -295,10 +280,9 @@ index af45bff..4f59b21 100644 return; } -diff --git a/scan/sane/http.c b/scan/sane/http.c -index 800df91..45668cd 100644 ---- a/scan/sane/http.c -+++ b/scan/sane/http.c +diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c +--- hplip-3.23.3/scan/sane/http.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/http.c 2023-05-29 13:58:10.973395191 +0200 @@ -36,6 +36,7 @@ #include #include @@ -307,11 +291,10 @@ index 800df91..45668cd 100644 #include "hpmud.h" #include "http.h" -diff --git a/scan/sane/io.c b/scan/sane/io.c -index 4508458..7bbddea 100755 ---- a/scan/sane/io.c -+++ b/scan/sane/io.c -@@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden"))) InitDbus(void) +diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c +--- hplip-3.23.3/scan/sane/io.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/io.c 2023-05-29 13:58:10.973395191 +0200 +@@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden" if (dbus_error_is_set(&dbus_err)) { @@ -320,7 +303,7 @@ index 4508458..7bbddea 100755 dbus_error_free(&dbus_err); } -@@ -79,7 +79,7 @@ int __attribute__ ((visibility ("hidden"))) SendScanEvent(char *device_uri, int +@@ -79,7 +79,7 @@ int __attribute__ ((visibility ("hidden" if (NULL == msg) { @@ -329,7 +312,7 @@ index 4508458..7bbddea 100755 return 0; } -@@ -94,7 +94,7 @@ int __attribute__ ((visibility ("hidden"))) SendScanEvent(char *device_uri, int +@@ -94,7 +94,7 @@ int __attribute__ ((visibility ("hidden" if (!dbus_connection_send(dbus_conn, msg, NULL)) { @@ -338,11 +321,10 @@ index 4508458..7bbddea 100755 return 0; } -diff --git a/scan/sane/ledm.c b/scan/sane/ledm.c -index 9a1ff02..07ab5b0 100644 ---- a/scan/sane/ledm.c -+++ b/scan/sane/ledm.c -@@ -802,7 +802,7 @@ SANE_Status ledm_control_option(SANE_Handle handle, SANE_Int option, SANE_Action +diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c +--- hplip-3.23.3/scan/sane/ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/ledm.c 2023-05-29 13:58:10.973395191 +0200 +@@ -813,7 +813,7 @@ SANE_Status ledm_control_option(SANE_Han if (stat != SANE_STATUS_GOOD) { @@ -351,7 +333,7 @@ index 9a1ff02..07ab5b0 100644 } return stat; -@@ -1067,7 +1067,7 @@ void ledm_close(SANE_Handle handle) +@@ -1078,7 +1078,7 @@ void ledm_close(SANE_Handle handle) if (ps == NULL || ps != session) { @@ -360,11 +342,10 @@ index 9a1ff02..07ab5b0 100644 return; } -diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c -index ad267a3..236f7c9 100644 ---- a/scan/sane/marvell.c -+++ b/scan/sane/marvell.c -@@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_session *ps, SANE_Byte *data, SANE_Int max +diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell.c +--- hplip-3.23.3/scan/sane/marvell.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/marvell.c 2023-05-29 13:58:10.976395173 +0200 +@@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_se if (!ps->ip_handle) { @@ -373,7 +354,7 @@ index ad267a3..236f7c9 100644 goto bugout; } -@@ -335,7 +335,7 @@ static struct marvell_session *create_session() +@@ -335,7 +335,7 @@ static struct marvell_session *create_se if ((ps = malloc(sizeof(struct marvell_session))) == NULL) { @@ -382,7 +363,7 @@ index ad267a3..236f7c9 100644 return NULL; } memset(ps, 0, sizeof(struct marvell_session)); -@@ -402,7 +402,7 @@ SANE_Status marvell_open(SANE_String_Const device, SANE_Handle *handle) +@@ -402,7 +402,7 @@ SANE_Status marvell_open(SANE_String_Con if (session) { @@ -391,7 +372,7 @@ index ad267a3..236f7c9 100644 return SANE_STATUS_DEVICE_BUSY; } -@@ -431,7 +431,7 @@ SANE_Status marvell_open(SANE_String_Const device, SANE_Handle *handle) +@@ -431,7 +431,7 @@ SANE_Status marvell_open(SANE_String_Con if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK) { @@ -400,7 +381,7 @@ index ad267a3..236f7c9 100644 goto bugout; free(session); -@@ -441,7 +441,7 @@ SANE_Status marvell_open(SANE_String_Const device, SANE_Handle *handle) +@@ -441,7 +441,7 @@ SANE_Status marvell_open(SANE_String_Con if (hpmud_open_channel(session->dd, HPMUD_S_MARVELL_SCAN_CHANNEL, &session->cd) != HPMUD_R_OK) { @@ -418,7 +399,7 @@ index ad267a3..236f7c9 100644 return; } -@@ -849,7 +849,7 @@ SANE_Status marvell_control_option(SANE_Handle handle, SANE_Int option, SANE_Act +@@ -849,7 +849,7 @@ SANE_Status marvell_control_option(SANE_ stat = SANE_STATUS_GOOD; break; } @@ -427,7 +408,7 @@ index ad267a3..236f7c9 100644 } else { /* Set default. */ -@@ -866,7 +866,7 @@ SANE_Status marvell_control_option(SANE_Handle handle, SANE_Int option, SANE_Act +@@ -866,7 +866,7 @@ SANE_Status marvell_control_option(SANE_ if (stat != SANE_STATUS_GOOD) { @@ -436,7 +417,7 @@ index ad267a3..236f7c9 100644 action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto"); } -@@ -905,7 +905,7 @@ SANE_Status marvell_start(SANE_Handle handle) +@@ -905,7 +905,7 @@ SANE_Status marvell_start(SANE_Handle ha if (set_extents(ps)) { @@ -445,7 +426,7 @@ index ad267a3..236f7c9 100644 ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max); stat = SANE_STATUS_INVAL; goto bugout; -@@ -963,7 +963,7 @@ SANE_Status marvell_start(SANE_Handle handle) +@@ -963,7 +963,7 @@ SANE_Status marvell_start(SANE_Handle ha /* Open image processor. */ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE) { @@ -454,7 +435,7 @@ index ad267a3..236f7c9 100644 stat = SANE_STATUS_INVAL; goto bugout; } -@@ -1023,7 +1023,7 @@ SANE_Status marvell_read(SANE_Handle handle, SANE_Byte *data, SANE_Int maxLength +@@ -1023,7 +1023,7 @@ SANE_Status marvell_read(SANE_Handle han if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR)) { @@ -463,10 +444,9 @@ index ad267a3..236f7c9 100644 goto bugout; } -diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c -index 9a5975f..dc8b32c 100644 ---- a/scan/sane/sclpml.c -+++ b/scan/sane/sclpml.c +diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c +--- hplip-3.23.3/scan/sane/sclpml.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/sclpml.c 2023-05-29 13:58:10.976395173 +0200 @@ -30,6 +30,7 @@ #include #include @@ -484,11 +464,10 @@ index 9a5975f..dc8b32c 100644 return; } -diff --git a/scan/sane/soap.c b/scan/sane/soap.c -index 07106fe..0d22e52 100644 ---- a/scan/sane/soap.c -+++ b/scan/sane/soap.c -@@ -142,7 +142,7 @@ static int get_ip_data(struct soap_session *ps, SANE_Byte *data, SANE_Int maxLen +diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c +--- hplip-3.23.3/scan/sane/soap.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/soap.c 2023-05-29 13:58:10.977395167 +0200 +@@ -142,7 +142,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) { @@ -497,7 +476,7 @@ index 07106fe..0d22e52 100644 goto bugout; } -@@ -219,7 +219,7 @@ static struct soap_session *create_session() +@@ -219,7 +219,7 @@ static struct soap_session *create_sessi if ((ps = malloc(sizeof(struct soap_session))) == NULL) { @@ -506,7 +485,7 @@ index 07106fe..0d22e52 100644 return NULL; } memset(ps, 0, sizeof(struct soap_session)); -@@ -418,7 +418,7 @@ SANE_Status soap_open(SANE_String_Const device, SANE_Handle *handle) +@@ -418,7 +418,7 @@ SANE_Status soap_open(SANE_String_Const if (session) { @@ -515,7 +494,7 @@ index 07106fe..0d22e52 100644 return SANE_STATUS_DEVICE_BUSY; } -@@ -434,7 +434,7 @@ SANE_Status soap_open(SANE_String_Const device, SANE_Handle *handle) +@@ -434,7 +434,7 @@ SANE_Status soap_open(SANE_String_Const if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK) { @@ -533,7 +512,7 @@ index 07106fe..0d22e52 100644 return; } -@@ -824,7 +824,7 @@ SANE_Status soap_control_option(SANE_Handle handle, SANE_Int option, SANE_Action +@@ -824,7 +824,7 @@ SANE_Status soap_control_option(SANE_Han if (stat != SANE_STATUS_GOOD) { @@ -542,7 +521,7 @@ index 07106fe..0d22e52 100644 action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto"); } -@@ -862,7 +862,7 @@ SANE_Status soap_start(SANE_Handle handle) +@@ -862,7 +862,7 @@ SANE_Status soap_start(SANE_Handle handl ps->user_cancel = 0; if (set_extents(ps)) { @@ -551,7 +530,7 @@ index 07106fe..0d22e52 100644 ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max); stat = SANE_STATUS_INVAL; goto bugout; -@@ -913,7 +913,7 @@ SANE_Status soap_start(SANE_Handle handle) +@@ -913,7 +913,7 @@ SANE_Status soap_start(SANE_Handle handl /* Open image processor. */ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE) { @@ -560,7 +539,7 @@ index 07106fe..0d22e52 100644 stat = SANE_STATUS_INVAL; goto bugout; } -@@ -955,7 +955,7 @@ SANE_Status soap_start(SANE_Handle handle) +@@ -955,7 +955,7 @@ SANE_Status soap_start(SANE_Handle handl if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE)) { @@ -569,7 +548,7 @@ index 07106fe..0d22e52 100644 stat = SANE_STATUS_IO_ERROR; goto bugout; } -@@ -1007,7 +1007,7 @@ SANE_Status soap_read(SANE_Handle handle, SANE_Byte *data, SANE_Int maxLength, S +@@ -1007,7 +1007,7 @@ SANE_Status soap_read(SANE_Handle handle if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR)) { @@ -578,11 +557,10 @@ index 07106fe..0d22e52 100644 goto bugout; } -diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c -index 269ab21..139100d 100644 ---- a/scan/sane/soapht.c -+++ b/scan/sane/soapht.c -@@ -136,7 +136,7 @@ static int get_ip_data(struct soap_session *ps, SANE_Byte *data, SANE_Int maxLen +diff -up hplip-3.23.3/scan/sane/soapht.c.covscan hplip-3.23.3/scan/sane/soapht.c +--- hplip-3.23.3/scan/sane/soapht.c.covscan 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/scan/sane/soapht.c 2023-05-29 13:58:10.977395167 +0200 +@@ -136,7 +136,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) { @@ -591,7 +569,7 @@ index 269ab21..139100d 100644 goto bugout; } -@@ -435,7 +435,7 @@ static struct soap_session *create_session() +@@ -435,7 +435,7 @@ static struct soap_session *create_sessi if ((ps = malloc(sizeof(struct soap_session))) == NULL) { @@ -600,7 +578,7 @@ index 269ab21..139100d 100644 return NULL; } memset(ps, 0, sizeof(struct soap_session)); -@@ -459,7 +459,7 @@ SANE_Status soapht_open(SANE_String_Const device, SANE_Handle *handle) +@@ -459,7 +459,7 @@ SANE_Status soapht_open(SANE_String_Cons if (session) { @@ -609,7 +587,7 @@ index 269ab21..139100d 100644 return SANE_STATUS_DEVICE_BUSY; } -@@ -475,7 +475,7 @@ SANE_Status soapht_open(SANE_String_Const device, SANE_Handle *handle) +@@ -475,7 +475,7 @@ SANE_Status soapht_open(SANE_String_Cons if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK) { @@ -627,7 +605,7 @@ index 269ab21..139100d 100644 return; } -@@ -904,7 +904,7 @@ SANE_Status soapht_control_option(SANE_Handle handle, SANE_Int option, SANE_Acti +@@ -904,7 +904,7 @@ SANE_Status soapht_control_option(SANE_H if (stat != SANE_STATUS_GOOD) { @@ -636,7 +614,7 @@ index 269ab21..139100d 100644 action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto"); } -@@ -946,7 +946,7 @@ SANE_Status soapht_start(SANE_Handle handle) +@@ -946,7 +946,7 @@ SANE_Status soapht_start(SANE_Handle han if (set_extents(ps)) { @@ -645,7 +623,7 @@ index 269ab21..139100d 100644 ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max); stat = SANE_STATUS_INVAL; goto bugout; -@@ -1032,7 +1032,7 @@ SANE_Status soapht_start(SANE_Handle handle) +@@ -1032,7 +1032,7 @@ SANE_Status soapht_start(SANE_Handle han /* Open image processor. */ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE) { @@ -654,7 +632,7 @@ index 269ab21..139100d 100644 stat = SANE_STATUS_INVAL; goto bugout; } -@@ -1075,7 +1075,7 @@ SANE_Status soapht_start(SANE_Handle handle) +@@ -1075,7 +1075,7 @@ SANE_Status soapht_start(SANE_Handle han if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE)) { @@ -663,7 +641,7 @@ index 269ab21..139100d 100644 stat = SANE_STATUS_IO_ERROR; goto bugout; } -@@ -1124,7 +1124,7 @@ SANE_Status soapht_read(SANE_Handle handle, SANE_Byte *data, SANE_Int maxLength, +@@ -1124,7 +1124,7 @@ SANE_Status soapht_read(SANE_Handle hand if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR)) { diff --git a/hplip-dialog-infinite-loop.patch b/hplip-dialog-infinite-loop.patch index dbb04e7..cfd635b 100644 --- a/hplip-dialog-infinite-loop.patch +++ b/hplip-dialog-infinite-loop.patch @@ -2,15 +2,6 @@ diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py index c23957a..48b248f 100644 --- a/ui5/devmgr5.py +++ b/ui5/devmgr5.py -@@ -2247,7 +2247,7 @@ class PasswordDialog(QDialog): - self.prompt = prompt - - Layout= QGridLayout(self) -- Layout.setMargin(11) -+ Layout.setContentsMargins(11, 11, 11, 11) - Layout.setSpacing(6) - - self.PromptTextLabel = QLabel(self) @@ -2300,14 +2300,15 @@ class PasswordDialog(QDialog): # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/hplip-hpsetup-noscanjets.patch b/hplip-hpsetup-noscanjets.patch index 5c956a0..52a4690 100644 --- a/hplip-hpsetup-noscanjets.patch +++ b/hplip-hpsetup-noscanjets.patch @@ -1,7 +1,6 @@ -diff --git a/setup.py b/setup.py -index 5d48aaa..88e663f 100755 ---- a/setup.py -+++ b/setup.py +diff -up hplip-3.23.3/setup.py.hpsetup-noscanjets hplip-3.23.3/setup.py +--- hplip-3.23.3/setup.py.hpsetup-noscanjets 2023-05-29 14:16:26.148133678 +0200 ++++ hplip-3.23.3/setup.py 2023-05-29 14:16:26.220133253 +0200 @@ -399,9 +399,19 @@ else: # INTERACTIVE_MODE #log.warning("Cannot setup fax - device does not have fax feature.") setup_fax = False @@ -23,13 +22,12 @@ index 5d48aaa..88e663f 100755 plugin = mq.get('plugin', PLUGIN_NONE) if ignore_plugin_check is False and plugin > PLUGIN_NONE: -diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py -index c6f234b..a5041c1 100644 ---- a/ui5/setupdialog.py -+++ b/ui5/setupdialog.py -@@ -1326,6 +1326,18 @@ class SetupDialog(QDialog, Ui_Dialog): - self.mq = device.queryModelByURI(self.device_uri) - back_end, is_hp, bus, model, serial, dev_file, host, zc, port = device.parseDeviceURI(self.device_uri) +diff -up hplip-3.23.3/ui5/setupdialog.py.hpsetup-noscanjets hplip-3.23.3/ui5/setupdialog.py +--- hplip-3.23.3/ui5/setupdialog.py.hpsetup-noscanjets 2023-05-29 14:16:26.220133253 +0200 ++++ hplip-3.23.3/ui5/setupdialog.py 2023-05-29 14:18:12.475041454 +0200 +@@ -1391,6 +1391,18 @@ class SetupDialog(QDialog, Ui_Dialog): + back_end, is_hp, bus, model, serial, dev_file, host, zc, port = device.parseDeviceURI( + self.device_uri) self.model = models.normalizeModelName(model).lower() + if 'scanjet' in self.model: + FailureUI(self, diff --git a/hplip-nocdmfilter.patch b/hplip-nocdmfilter.patch new file mode 100644 index 0000000..ba1806a --- /dev/null +++ b/hplip-nocdmfilter.patch @@ -0,0 +1,47 @@ +diff --git a/Makefile.am b/Makefile.am +index 751c265..a3be3f1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -216,7 +216,7 @@ endif #HPLIP_CLASS_DRIVER + if FAX_BUILD + if !HPLIP_CLASS_DRIVER + faxdir = $(hplipdir)/fax +-dist_fax_DATA = fax/fax.py fax/__init__.py fax/coverpages.py fax/pmlfax.py fax/ledmfax.py fax/cdmfax.py fax/soapfax.py fax/ledmsoapfax.py fax/marvellfax.py \ ++dist_fax_DATA = fax/fax.py fax/__init__.py fax/coverpages.py fax/pmlfax.py fax/ledmfax.py fax/soapfax.py fax/ledmsoapfax.py fax/marvellfax.py \ + fax/faxdevice.py fax/filters/pstotiff fax/filters/pstotiff.convs fax/filters/pstotiff.types + fax_filtersdir = $(mimedir) + dist_fax_filters_DATA = fax/filters/pstotiff.convs fax/filters/pstotiff.types +@@ -228,7 +228,7 @@ if HPIJS_INSTALL + dist_hpijsfaxppd_DATA = fax/ppd/HP-Fax-hpijs.ppd.gz fax/ppd/HP-Fax2-hpijs.ppd.gz fax/ppd/HP-Fax3-hpijs.ppd.gz fax/ppd/HP-Fax4-hpijs.ppd.gz + endif # HPIJS_INSTALL + if HPCUPS_INSTALL +-dist_hpcupsfaxppd_DATA = fax/ppd/HP-Fax-hpcups.ppd.gz fax/ppd/HP-Fax2-hpcups.ppd.gz fax/ppd/HP-Fax3-hpcups.ppd.gz fax/ppd/HP-Fax4-hpcups.ppd.gz fax/ppd/HP-Fax-CDM-hpcups.ppd.gz ++dist_hpcupsfaxppd_DATA = fax/ppd/HP-Fax-hpcups.ppd.gz fax/ppd/HP-Fax2-hpcups.ppd.gz fax/ppd/HP-Fax3-hpcups.ppd.gz fax/ppd/HP-Fax4-hpcups.ppd.gz + endif # HPCUPS_INSTALL + endif # HPLIP_CLASS_DRIVER + endif # FAX_BUILD +@@ -613,12 +613,6 @@ hpcupsfax_PROGRAMS = hpcupsfax + hpcupsfax_SOURCES = prnt/hpijs/hpcupsfax.cpp prnt/hpijs/hpcupsfax.h common/utils.h common/utils.c + hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage -ldl + +-# hpcdmfax +-hpcdmfaxdir = $(cupsfilterdir) +-hpcdmfax_PROGRAMS = hpcdmfax +-hpcdmfax_SOURCES = fax/filters/cdmfax/hpcupscdmfax.cpp fax/filters/cdmfax/hpcupscdmfax.h fax/filters/cdmfax/jetlib.cpp fax/filters/cdmfax/jetlib.h +-hpcdmfax_LDADD = libhpip.la -lcups -lcupsimage -ldl -ljpeg +- + endif # HPLIP_CLASS_DRIVER + endif # FAX_BUILD + endif # HPCUPS ONLY +diff --git a/hplip.list.in b/hplip.list.in +index 909f41d..f2b5e47 100644 +--- a/hplip.list.in ++++ b/hplip.list.in +@@ -94,7 +94,6 @@ f 0755 root root $cupsfilter/pstotiff fax/filters/pstotiff + + %if !print_only_exclude + f 0755 root root $cupsfilter/hpcupsfax .libs/hpcupsfax +-f 0755 root root $cupsfilter/hpcdmfax .libs/hpcdmfax + %endif + + %if foomatic-drv-install diff --git a/hplip-noernie.patch b/hplip-noernie.patch index 4ac83b4..47bb9d0 100644 --- a/hplip-noernie.patch +++ b/hplip-noernie.patch @@ -1,7 +1,7 @@ -diff -up hplip-3.17.4/Makefile.am.no-ernie hplip-3.17.4/Makefile.am ---- hplip-3.17.4/Makefile.am.no-ernie 2017-04-26 16:28:35.398099978 +0200 -+++ hplip-3.17.4/Makefile.am 2017-04-26 16:29:02.235879035 +0200 -@@ -519,7 +519,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte +diff -up hplip-3.23.3/Makefile.am.no-ernie hplip-3.23.3/Makefile.am +--- hplip-3.23.3/Makefile.am.no-ernie 2023-05-29 13:15:58.008610471 +0200 ++++ hplip-3.23.3/Makefile.am 2023-05-29 13:15:58.134609689 +0200 +@@ -562,7 +562,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte prnt/hpcups/Mode2.cpp prnt/hpcups/Mode2.h prnt/hpcups/Mode3.cpp prnt/hpcups/Mode3.h \ prnt/hpcups/Mode9.cpp prnt/hpcups/Mode9.h prnt/hpcups/Mode10.cpp prnt/hpcups/Mode10.h \ prnt/hpcups/ModeDeltaPlus.cpp prnt/hpcups/ModeDeltaPlus.h prnt/hpcups/ModeJbig.cpp prnt/hpcups/ModeJbig.h \ @@ -10,9 +10,9 @@ diff -up hplip-3.17.4/Makefile.am.no-ernie hplip-3.17.4/Makefile.am prnt/hpcups/Encapsulator.cpp prnt/hpcups/Encapsulator.h prnt/hpcups/Pcl3.cpp prnt/hpcups/Pcl3.h \ prnt/hpcups/Pcl3Gui.cpp prnt/hpcups/Pcl3Gui.h prnt/hpcups/Pcl3Gui2.cpp prnt/hpcups/Pcl3Gui2.h \ prnt/hpcups/LJMono.cpp prnt/hpcups/LJMono.h prnt/hpcups/LJColor.cpp prnt/hpcups/LJColor.h \ -diff -up hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp.no-ernie hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp ---- hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp.no-ernie 2017-04-26 16:28:39.525066003 +0200 -+++ hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp 2017-04-26 16:29:46.987510614 +0200 +diff -up hplip-3.23.3/prnt/hpcups/Pcl3Gui2.cpp.no-ernie hplip-3.23.3/prnt/hpcups/Pcl3Gui2.cpp +--- hplip-3.23.3/prnt/hpcups/Pcl3Gui2.cpp.no-ernie 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/prnt/hpcups/Pcl3Gui2.cpp 2023-05-29 13:17:02.468210361 +0200 @@ -30,7 +30,6 @@ #include "CommonDefinitions.h" @@ -26,7 +26,7 @@ diff -up hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp.no-ernie hplip-3.17.4/prnt/hpcups { speed_mech_enabled = true; - m_run_ernie_filter = true; - crd_type = eCrd_both; + crd_type = eCrd_color_only; // pcl3 printers support RGB only ref:hplip-1701 strcpy(m_szLanguage, "PCL3GUI"); } @@ -59,21 +57,6 @@ DRIVER_ERROR Pcl3Gui2::Configure(Pipelin @@ -51,9 +51,9 @@ diff -up hplip-3.17.4/prnt/hpcups/Pcl3Gui2.cpp.no-ernie hplip-3.17.4/prnt/hpcups if (crd_type != eCrd_black_only) { Mode10 *pMode10; -diff -up hplip-3.17.4/prnt/hpcups/Pcl3Gui2.h.no-ernie hplip-3.17.4/prnt/hpcups/Pcl3Gui2.h ---- hplip-3.17.4/prnt/hpcups/Pcl3Gui2.h.no-ernie 2017-04-26 16:28:43.277035115 +0200 -+++ hplip-3.17.4/prnt/hpcups/Pcl3Gui2.h 2017-04-26 16:30:05.826355522 +0200 +diff -up hplip-3.23.3/prnt/hpcups/Pcl3Gui2.h.no-ernie hplip-3.23.3/prnt/hpcups/Pcl3Gui2.h +--- hplip-3.23.3/prnt/hpcups/Pcl3Gui2.h.no-ernie 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/prnt/hpcups/Pcl3Gui2.h 2023-05-29 13:15:58.134609689 +0200 @@ -60,7 +60,6 @@ private: DRIVER_ERROR encapsulateRaster(BYTE *input_raster, unsigned int num_bytes, COLORTYPE c_type); bool speed_mech_enabled; diff --git a/hplip-repack.sh b/hplip-repack.sh index c25fbb0..034187c 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -14,12 +14,13 @@ tar -xaf hplip-$VERSION.tar.gz || exit 1 # remove unwanted files rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1 +rm hplip-$VERSION/fax/filters/cdmfax/hpcupscdmfax.{cpp,h} hplip-$VERSION/fax/filters/cdmfax/jetlib.{cpp,h} hplip-$VERSION/fax/ppd/HP-Fax-CDM-hpcups.ppd.gz || exit 1 # compress into a new tarball tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 # check whether plugin is available -wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || exit 1 +wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || wget -O hplip-plugin.run https://developers.hp.com/sites/default/files/hplip-$1-plugin.run || exit 1 # check whether the file is sane file --mime hplip-plugin.run | grep 'x-shellscript' || exit 1 diff --git a/hplip-snprintf-format.patch b/hplip-snprintf-format.patch index 221f1d1..21b1530 100644 --- a/hplip-snprintf-format.patch +++ b/hplip-snprintf-format.patch @@ -1,20 +1,21 @@ -diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c -index 97d827d..af25b3e 100644 ---- a/protocol/hp_ipp.c -+++ b/protocol/hp_ipp.c -@@ -110,9 +110,9 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, - } +diff -up hplip-3.23.3/protocol/hp_ipp.c.snprintf-format hplip-3.23.3/protocol/hp_ipp.c +--- hplip-3.23.3/protocol/hp_ipp.c.snprintf-format 2023-03-28 09:26:11.000000000 +0200 ++++ hplip-3.23.3/protocol/hp_ipp.c 2023-05-29 14:21:30.872871575 +0200 +@@ -108,10 +108,10 @@ int addCupsPrinter(char *name, char *dev + goto abort; + } - if ( info == NULL ) +- if ( info == NULL ) - snprintf( info,sizeof(info), name ); ++ if ( info == NULL ) + info = name; -- sprintf( printer_uri, "ipp://localhost/printers/%s", name ); -+ snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name); +- sprintf(printer_uri, "ipp://localhost/printers/%s", name); ++ snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name); - cupsSetUser ("root"); - /* Connect to the HTTP server */ -@@ -511,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list) + cupsSetUser("root"); + /* Connect to the HTTP server */ +@@ -514,27 +514,27 @@ int __parsePrinterAttributes(ipp_t *resp if ( strcmp(attr_name, "printer-name") == 0 && val_tag == IPP_TAG_NAME ) { diff --git a/hplip-wifisetup.patch b/hplip-wifisetup.patch index 7247b01..a7dc21b 100644 --- a/hplip-wifisetup.patch +++ b/hplip-wifisetup.patch @@ -1,12 +1,12 @@ -diff -up hplip-3.19.6/ui5/wifisetupdialog.py.wifisetup-bad-call-fix hplip-3.19.6/ui5/wifisetupdialog.py ---- hplip-3.19.6/ui5/wifisetupdialog.py.wifisetup-bad-call-fix 2019-07-12 08:46:56.873167869 +0200 -+++ hplip-3.19.6/ui5/wifisetupdialog.py 2019-07-12 08:49:36.813769803 +0200 -@@ -570,7 +570,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog - try: +diff -up hplip-3.23.3/ui5/wifisetupdialog.py.wifisetup-bad-call-fix hplip-3.23.3/ui5/wifisetupdialog.py +--- hplip-3.23.3/ui5/wifisetupdialog.py.wifisetup-bad-call-fix 2023-05-29 13:45:35.830961640 +0200 ++++ hplip-3.23.3/ui5/wifisetupdialog.py 2023-05-29 13:48:05.939993288 +0200 +@@ -665,7 +665,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog self.ip,_,addressmode, subnetmask, gateway, pridns, sec_dns= self.wifiObj.getIPConfiguration(self.dev, self.adapterName) if self.ip == "0.0.0.0": -- self.ip, subnetmask, gateway, pri_dns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName) -+ self.ip, subnetmask, gateway, pridns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName) + if not self.wifiObj == CdmWifi: +- self.ip, subnetmask, gateway, pri_dns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName) ++ self.ip, subnetmask, gateway, pridns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName) vsa_codes = self.wifiObj.getVSACodes(self.dev, self.adapterName) ss_max, ss_min, ss_val, ss_dbm = self.wifiObj.getSignalStrength(self.dev, self.adapterName,self.network, self.adaptor_id) self.hn = self.wifiObj.getHostname(self.dev) diff --git a/hplip.spec b/hplip.spec index cf11e37..d22bd3b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.22.10 -Release: 4%{?dist} +Version: 3.23.5 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -168,22 +168,19 @@ Patch52: hplip-clean-ldl.patch # - it will cause malfunction of printing and scanning for them # https://bugs.launchpad.net/hplip/+bug/1883898 Patch53: hplip-revert-plugins.patch -# non-sudoers cannot authenticate -# reported upstream https://bugs.launchpad.net/hplip/+bug/1904888 -Patch54: hplip-check-userperms.patch # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message # reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114 -Patch55: hplip-hpsetup-noscanjets.patch +Patch54: hplip-hpsetup-noscanjets.patch # 1963114 - patch for hplip firmware load timeout fix # reported upstream https://bugs.launchpad.net/hplip/+bug/1922404 -Patch56: hplip-hpfirmware-timeout.patch +Patch55: hplip-hpfirmware-timeout.patch # 1985251 - Incorrect permission for gpg directory # reported upstream https://bugs.launchpad.net/hplip/+bug/1938442 -Patch57: hplip-gpgdir-perms.patch +Patch56: hplip-gpgdir-perms.patch # 1987141 - hp-plugin installs malformed udev files # reported upstream https://bugs.launchpad.net/hplip/+bug/1847477 -Patch58: hplip-plugin-udevissues.patch +Patch57: hplip-plugin-udevissues.patch # 2080235 - Misleading errors about missing shared libraries when scanning # downstream patch to prevent errors: # - when loading libhpmud.so - unversioned .so files belong into devel packages, @@ -192,32 +189,38 @@ Patch58: hplip-plugin-udevissues.patch # package (if libhpmud.so had been moved to -devel) the dlopen on unversioned .so file was # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() -Patch59: hplip-no-libhpmud-libm-warnings.patch +Patch58: hplip-no-libhpmud-libm-warnings.patch # hplip 3.22.6 doesn't use the correct arguments for snprintf # reported as https://bugs.launchpad.net/hplip/+bug/1982185 -Patch60: hplip-snprintf-format.patch -Patch61: hplip-plugin-script.patch +Patch59: hplip-snprintf-format.patch +Patch60: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -Patch62: hplip-pserror-c99.patch +Patch61: hplip-pserror-c99.patch # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -Patch63: hplip-scan-hpaio-include.patch +Patch62: hplip-scan-hpaio-include.patch # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -Patch64: hplip-scan-orblite-c99.patch +Patch63: hplip-scan-orblite-c99.patch # C99 compatibility patch by fweimer: # PyString_AsStringAndSize is removed in Python3, remove its compilation for now # in case there is a request for compiling it again, there is a possible solution # for the function py3 alternative https://opendev.org/openstack/pyeclib/commit/19c8313986 # - disabling removes hp-unload and /usr/share/hplip/pcard as well # Submitted upstream: -Patch65: hplip-pcardext-disable.patch +Patch64: hplip-pcardext-disable.patch # undefined strcasestr() in sclpml.c - build with _GNU_SOURCE # Submitted upstream: -Patch66: hplip-sclpml-strcasestr.patch +Patch65: hplip-sclpml-strcasestr.patch +# hpcupscdmfilter for faxing requires jetlib header and source files, +# which have copyright note in the header comment, that the files can't +# be shared and copied for other than archival purposes without HP permission +# - this looks as incompatible conditional for Fedora, so the files are removed, +# hplip repacked and this patch removes its mentions in Makefile.am +Patch66: hplip-nocdmfilter.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -353,21 +356,21 @@ SANE driver for scanners in HP's multi-function devices (from HPOJ). %setup -q # The pstotiff filter is rubbish so replace it (launchpad #528394). -%patch1 -p1 -b .pstotiff-is-rubbish +%patch -P 1 -p1 -b .pstotiff-is-rubbish # Fix compilation. -%patch2 -p1 -b .strstr-const +%patch -P 2 -p1 -b .strstr-const # Make utils.checkPyQtImport() look for the gui sub-package (bug #243273). -%patch3 -p1 -b .ui-optional +%patch -P 3 -p1 -b .ui-optional # Make sure to avoid handwritten asm. -%patch4 -p1 -b .no-asm +%patch -P 4 -p1 -b .no-asm # Corrected several IEEE 1284 Device IDs using foomatic data. # Color LaserJet 2500 series (bug #659040) # LaserJet 4100 Series/2100 Series (bug #659039) -%patch5 -p1 -b .deviceIDs-drv +%patch -P 5 -p1 -b .deviceIDs-drv chmod +x %{SOURCE2} mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs} %{SOURCE2} prnt/drv/hpcups.drv.in \ @@ -375,28 +378,28 @@ mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs} > prnt/drv/hpijs.drv.in # Move udev rules from /etc/ to /usr/lib/ (bug #748208). -%patch6 -p1 -b .udev-rules +%patch -P 6 -p1 -b .udev-rules # Retry when connecting to device fails (bug #532112). -%patch7 -p1 -b .retry-open +%patch -P 7 -p1 -b .retry-open # Mark SNMP quirks in PPD for HP OfficeJet Pro 8500 (bug #581825). -%patch8 -p1 -b .snmp-quirks +%patch -P 8 -p1 -b .snmp-quirks # Fixed bogus low ink warnings from hpijs driver (bug #643643). -%patch9 -p1 -b .hpijs-marker-supply +%patch -P 9 -p1 -b .hpijs-marker-supply # Clear old printer-state-reasons we used to manage (bug #510926). -%patch10 -p1 -b .clear-old-state-reasons +%patch -P 10 -p1 -b .clear-old-state-reasons # Avoid busy loop in hpcups when backend has exited (bug #525944). -%patch11 -p1 -b .hpcups-sigpipe +%patch -P 11 -p1 -b .hpcups-sigpipe # CUPS filters should use TMPDIR when available (bug #865603). -%patch12 -p1 -b .logdir +%patch -P 12 -p1 -b .logdir # Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926). -%patch13 -p1 -b .bad-low-ink-warning +%patch -P 13 -p1 -b .bad-low-ink-warning # Add Device ID for # HP LaserJet Color M451dn (bug #1159380) @@ -404,7 +407,7 @@ for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4); do gunzip ${ppd_file#*/}.gz done -%patch14 -p1 -b .deviceIDs-ppd +%patch -P 14 -p1 -b .deviceIDs-ppd for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4); do gzip -n ${ppd_file#*/} @@ -415,152 +418,151 @@ for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4); do gunzip ${ppd_file#*/}.gz done -%patch15 -p1 -b .ImageableArea +%patch -P 15 -p1 -b .ImageableArea for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4); do gzip -n ${ppd_file#*/} done # Scan to /var/tmp instead of /tmp (bug #1076954). -%patch16 -p1 -b .scan-tmp +%patch -P 16 -p1 -b .scan-tmp # Treat logging before importing of logger module (bug #984699). -%patch17 -p1 -b .log-stderr +%patch -P 17 -p1 -b .log-stderr # Fix parsing of avahi-daemon output (bug #1096939). -%patch18 -p1 -b .parsing +%patch -P 18 -p1 -b .parsing # Fixed left/right margins for HP DeskJet 990C (LP #1405212). -%patch19 -p1 -b .dj990c-margin +%patch -P 19 -p1 -b .dj990c-margin # Fixed uses of strncpy throughout. -%patch20 -p1 -b .strncpy +%patch -P 20 -p1 -b .strncpy # Don't try to write bytecode cache for hpfax backend (bug #1192761) # or hp-config_usb_printer (bug #1266903) # or hpps filter (bug #1241548). -%patch21 -p1 -b .no-write-bytecode +%patch -P 21 -p1 -b .no-write-bytecode # Ignore IOError when logging output (bug #712537). -%patch22 -p1 -b .silence-ioerror +%patch -P 22 -p1 -b .silence-ioerror # [abrt] hplip: hp-scan:663::NameError: name 'source_option' is not defined (bug #1341304) -%patch23 -p1 -b .sourceoption +%patch -P 23 -p1 -b .sourceoption # hplip license problem (bug #1364711) -%patch24 -p1 -b .no-ernie +%patch -P 24 -p1 -b .no-ernie # hplip appdata -%patch25 -p1 -b .appdata +%patch -P 25 -p1 -b .appdata # hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467) -%patch26 -p1 -b .check-cups +%patch -P 26 -p1 -b .check-cups # hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869) -%patch27 -p1 -b .typo +%patch -P 27 -p1 -b .typo -%patch28 -p1 -b .use-binary-str +%patch -P 28 -p1 -b .use-binary-str # 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. -%patch29 -p1 -b .error-print-fix +%patch -P 29 -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 -%patch30 -p1 -b .hpfax-import-error-print +%patch -P 30 -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 -%patch31 -p1 -b .wifisetup-bad-call-fix +%patch -P 31 -p1 -b .wifisetup-bad-call-fix # have pool of keyservers to choose -%patch32 -p1 -b .keyserver +%patch -P 32 -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 -%patch33 -p1 -b .qmsgbox-typos-fix +%patch -P 33 -p1 -b .qmsgbox-typos-fix # removal of non open source code, taken from ubuntu -%patch34 -p1 -b .libimageprocessor-removal +%patch -P 34 -p1 -b .libimageprocessor-removal %{_bindir}/rm prnt/hpcups/libImageProcessor-x86* -%patch35 -p1 -b .toolbox-crash +%patch -P 35 -p1 -b .toolbox-crash # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076 -%patch36 -p1 -b .add-ppd-crash +%patch -P 36 -p1 -b .add-ppd-crash # 1671513 - after 'successful' plugin installation it is not installed -%patch37 -p1 -b .missing-links +%patch -P 37 -p1 -b .missing-links # 1684434 - Scanning broken for HP LaserJet 3052 -%patch38 -p1 -b .hp-laserjet-3052-broken-scanning +%patch -P 38 -p1 -b .hp-laserjet-3052-broken-scanning # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1) -%patch39 -p1 -b .hpmud-string-parse +%patch -P 39 -p1 -b .hpmud-string-parse # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2) -%patch40 -p1 -b .m278-m281-needs-plugin +%patch -P 40 -p1 -b .m278-m281-needs-plugin # 1695716 - hpcups crashes in Compressor destructor -%patch41 -p1 -b .hpcups-crash +%patch -P 41 -p1 -b .hpcups-crash # fixing issues found by coverity scan -%patch42 -p1 -b .covscan +%patch -P 42 -p1 -b .covscan # segfault during logging (1727162) -%patch43 -p1 -b .logging-segfault +%patch -P 43 -p1 -b .logging-segfault # 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable -%patch44 -p1 -b .systray-blockerror +%patch -P 44 -p1 -b .systray-blockerror # 1742949, 1740132, 1739855 - missing drivers -%patch45 -p1 -b .missing-drivers +%patch -P 45 -p1 -b .missing-drivers # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat -%patch46 -p1 -b .model-mismatch +%patch -P 46 -p1 -b .model-mismatch # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes -%patch47 -p1 -b .unicodeerror -%patch48 -p1 -b .Wreturn-fix -%patch49 -p1 -b .configure-python -%patch50 -p1 -b .dialog-infinite-loop +%patch -P 47 -p1 -b .unicodeerror +%patch -P 48 -p1 -b .Wreturn-fix +%patch -P 49 -p1 -b .configure-python +%patch -P 50 -p1 -b .dialog-infinite-loop # 1590014 - hplip PPD search doesn't expect '-' in device name -%patch51 -p1 -b .find-driver +%patch -P 51 -p1 -b .find-driver # 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error -%patch52 -p1 -b .clean-ldl -%patch53 -p1 -b .revert-plugins -# 1899410 - non-sudoers cannot authenticate because of bad username in prompt -%patch54 -p1 -b .check-userperms +%patch -P 52 -p1 -b .clean-ldl +%patch -P 53 -p1 -b .revert-plugins # if an user tries to install scanner via hp-setup (printer/fax utility) # it fails further down - break out earlier with a message -%patch55 -p1 -b .hpsetup-noscanjets +%patch -P 54 -p1 -b .hpsetup-noscanjets # 1963114 - patch for hplip firmware load timeout fix -%patch56 -p1 -b .hpfirmware-timeout +%patch -P 55 -p1 -b .hpfirmware-timeout # 1985251 - Incorrect permission for gpg directory -%patch57 -p1 -b .gpgdir-perms +%patch -P 56 -p1 -b .gpgdir-perms # 1987141 - hp-plugin installs malformed udev files -%patch58 -p1 -b .hpplugin-udevperms +%patch -P 57 -p1 -b .hpplugin-udevperms # 2080235 - Misleading errors about missing shared libraries when scanning -%patch59 -p1 -b .no-libm-libhpmud-warn +%patch -P 58 -p1 -b .no-libm-libhpmud-warn # hplip 3.22.6 doesn't use proper arguments for snprintf -%patch60 -p1 -b .snprintf-format -%patch61 -p1 -b .plugin-patch +%patch -P 59 -p1 -b .snprintf-format +%patch -P 60 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -%patch62 -p1 -b .pserror-int +%patch -P 61 -p1 -b .pserror-int # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -%patch63 -p1 -b .hpaio-orblite-defs +%patch -P 62 -p1 -b .hpaio-orblite-defs # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -%patch64 -p1 -b .orblite-undefs +%patch -P 63 -p1 -b .orblite-undefs # C99 compatibility patch by fweimer - python2 PyString_AsStringAndSize in python3 code # gives undefined reference - removed for now with dependent hp-unload -%patch65 -p1 -b .pcardext-disable +%patch -P 64 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE -%patch66 -p1 -b .sclpml-strcasestr +%patch -P 65 -p1 -b .sclpml-strcasestr +%patch -P 66 -p1 -b .nocdmfilter # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI -%patch1000 -p1 -b .fedora-gui +%patch -P 1000 -p1 -b .fedora-gui %endif @@ -927,6 +929,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jun 06 2023 Zdenek Dohnal - 3.23.5-1 +- 2184067 - hplip-3.23.5 is available + * Thu Jan 19 2023 Fedora Release Engineering - 3.22.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index b462c5f..826d71c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.22.10-repack.tar.gz) = cc7cc12ed04e08cbded581351280b71e13525b06a333d43078d67ae591baeecd29773a7f7fb5ebfc3dd842b1e4c9a84af9c5747987ef1941d1eef405ecb65fc1 +SHA512 (hplip-3.23.5-repack.tar.gz) = 7616a088b6f2f5efbd5ec426b3de80099b56f435adb38c0acd1f60e7cd00e788f94a2e35136011a7d73dd48a891a3b713263132653c9a2acf0ba98d57a790b4c From 850284dda48d0111309ae9e1315284b1b67225e9 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 22:00:33 +0200 Subject: [PATCH 102/166] Rebuilt for Python 3.12 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index d22bd3b..c6eaa68 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -929,6 +929,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jun 13 2023 Python Maint - 3.23.5-2 +- Rebuilt for Python 3.12 + * Tue Jun 06 2023 Zdenek Dohnal - 3.23.5-1 - 2184067 - hplip-3.23.5 is available From 363dc1639dd9014e50a1f8caf4a96b237e7c5768 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 28 Jun 2023 15:30:01 +0200 Subject: [PATCH 103/166] Remove unused files --- hplip-3.21.2.tar.gz.asc | 7 ------- hplip-lineart.patch | 14 -------------- upstream-key.gpg | 30 ------------------------------ 3 files changed, 51 deletions(-) delete mode 100644 hplip-3.21.2.tar.gz.asc delete mode 100644 hplip-lineart.patch delete mode 100644 upstream-key.gpg diff --git a/hplip-3.21.2.tar.gz.asc b/hplip-3.21.2.tar.gz.asc deleted file mode 100644 index c99a1cd..0000000 --- a/hplip-3.21.2.tar.gz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iEYEABECAAYFAmApuOMACgkQc9dwzaWQR7kddgCeNSUemyt9lpIk8a37ItEiX7XO -xXYAnjgAIdzPYdmSMFJ5Bqv1JLTv7RiC -=oTOD ------END PGP SIGNATURE----- diff --git a/hplip-lineart.patch b/hplip-lineart.patch deleted file mode 100644 index 1580086..0000000 --- a/hplip-lineart.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up hplip-3.14.6/scan.py.lineart hplip-3.14.6/scan.py ---- hplip-3.14.6/scan.py.lineart 2014-07-23 12:30:52.361517852 +0100 -+++ hplip-3.14.6/scan.py 2014-07-23 12:32:17.052940000 +0100 -@@ -977,8 +977,8 @@ try: - try: - pixels_per_line = bytes_per_line * 8 # Calculation of pixels_per_line for Lineart must be 8 time of bytes_per_line - # Otherwise, scanned image will be corrupted (slanted) -- im = Image.frombuffer('RGBA', (pixels_per_line, lines), buffer.read(), -- 'raw', 'RGBA', 0, 1).convert('L') -+ im = Image.frombuffer('1', (pixels_per_line, lines), buffer.read(), -+ 'raw', '1', 0, 1).convert('L') - except ValueError: - log.error("Did not read enough data from scanner (I/O Error?)") - sys.exit(1) diff --git a/upstream-key.gpg b/upstream-key.gpg deleted file mode 100644 index bccc555..0000000 --- a/upstream-key.gpg +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.10 (GNU/Linux) - -mQGiBEsnpscRBACyclffkMVkXXdtY2qTT2+B6HN4hBoUxBwZBULyHFuSP9lsB7wK -16Hl5ZTu+oy+GegzzFRrHWxBLN9i67T0plNkqDJhWUrmXR7xvX+dFc+Qrl+uPR0i -CY1NMnWwnFh01YtYb9NAlb3bLn8RLBH8Zo60i7wfwdW9Wi1mgzmUT/UI9wCg7y6R -VmF4RjNWJ2WRdL/jVeAB8H0D/0xfePoYWrSGzOp7+Vl+xYo5TdSrzohUUnly6xla -UIKwlBCG/jpQqKH17803GpkFyh5FxG1Db7VWsciDv7flcBLPtn75gU2fPHXL+gnv -r1eJ+ugQwCl4/8d4iJ5TMXmHQOW2Pd0U47OmbZYNNgtA+lXhF8n8+6w3GRhqubLF -/9b/A/4wH37bv1shLhdLpP+9WYHc8z9+jmStVUFdAGoD/n6vOpBX+GQYaEY5Y8RS -Wf0DFhMF6CFYNZ2ngDyvPt53M2jU7hrxXIfs/b5bLMqG2et9M/avdEWGUKTsC7wu -0zeGtD07r9EA3WDIhxN9QEGZAq5Q3NSbedMHIVE4Ynq7VNCdsrQ0SFBMSVAgKEhQ -IExpbnV4IEltYWdpbmcgYW5kIFByaW50aW5nKSA8aHBsaXBAaHAuY29tPohgBBMR -AgAgBQJLJ6bHAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQc9dwzaWQR7n4 -dQCghZgIpxuTC+GhiQIO0dK9wTlbMmoAoOB252fEOvf73v8Ya8qmN1GlmYiXuQIN -BEsnpscQCACEO/wh+X9Apok41vn+qby5YLvSuXNcub1iVSlsByv+28KQbbvXDNPh -LP9wdO9DmzfIGwarj0uLtn0h9UWTnEpXSZ0bKJnCYc7GZpUvcNyjIuSs69hK2rLd -38MSb1hoBaICLjZERUhe+ZGwlx7zvAIghj+ss1udwpc6PcdPNaimp+ck9/+eSpir -BZsWRDEyYZ8r0Tzh0vCMZG3AJZvm439gsze5ImvAt+xFluYRCHMAkXaYimXAipHd -Hudqu5B1/KNp3kRc68pDw/kzFSJ4bEdSW/3Qu5gJxb4y9XDTMipyFt1YZrP4sYJN -EMAjIllnMHqQsK4efdNY/JSk92wEjmN/AAQLB/42X5RSrDQc9k/2RdgbRUQPXAXF -YRySDMt4XfaQNAYiU2nQ1thxJuLzFLnp8VumzMD4tmsmBNmacVFTAMJyWZrum6eP -dvyczSBG0e+4t6e2YCGdA8hfxJYNHCEE0i6NI7FCu2OPDqgXKsyViql7vchQAAg3 -N4ILBlcoO86JOCbugj+Yjp8mI2tzw2o3GEZLgHPD+t7ECFmeB6QypH02CXGTsTNQ -6qt99zr86urV8Ta39Q0A6pVV81fkXaGIg1eLX7LCE5g4lV9D/G6KXYWYju3EBz/t -eZRyrE3BrKM7MEqVUcgBwjIswBPDfJFW+H6B7Ma9RsT0efJgeruc712Z6cztiEkE -GBECAAkFAksnpscCGwwACgkQc9dwzaWQR7mkswCcD+QNKEcLN9XmWhlzJfwzjW3N -JgMAniNROBBXr37dCkmawTcagKSwhiUx -=2aUQ ------END PGP PUBLIC KEY BLOCK----- From 031349c9fd4e0d4e1d145151671128d7fc7e2f0c Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jul 2023 13:16:47 +0200 Subject: [PATCH 104/166] 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed --- hplip-fix-parsing-lpstat.patch | 13 +++++++++++++ hplip.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-fix-parsing-lpstat.patch diff --git a/hplip-fix-parsing-lpstat.patch b/hplip-fix-parsing-lpstat.patch new file mode 100644 index 0000000..d6028ab --- /dev/null +++ b/hplip-fix-parsing-lpstat.patch @@ -0,0 +1,13 @@ +diff --git a/base/queues.py b/base/queues.py +index 2f56c8a..0818574 100755 +--- a/base/queues.py ++++ b/base/queues.py +@@ -101,7 +101,7 @@ def parseQueues(mode): + try: + match = LPSTAT_PATTERN.search(p) + printer_name = match.group(1) +- device_uri = match.group(2) ++ device_uri = match.group(3) + cups_printers.append((printer_name, device_uri)) + except AttributeError: + pass diff --git a/hplip.spec b/hplip.spec index c6eaa68..8e888d4 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -221,6 +221,9 @@ Patch65: hplip-sclpml-strcasestr.patch # - this looks as incompatible conditional for Fedora, so the files are removed, # hplip repacked and this patch removes its mentions in Makefile.am Patch66: hplip-nocdmfilter.patch +# 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed +# https://bugs.launchpad.net/hplip/+bug/2027972 +Patch67: hplip-fix-parsing-lpstat.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -558,6 +561,9 @@ done # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE %patch -P 65 -p1 -b .sclpml-strcasestr %patch -P 66 -p1 -b .nocdmfilter +# 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed +# https://bugs.launchpad.net/hplip/+bug/2027972 +%patch -P 67 -p1 -b .lpstat-parse # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -929,6 +935,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jul 17 2023 Zdenek Dohnal - 3.23.5-3 +- 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed + * Tue Jun 13 2023 Python Maint - 3.23.5-2 - Rebuilt for Python 3.12 From f616afe82785865c8924c452d1ed1d2d9a70d025 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jul 2023 13:19:28 +0200 Subject: [PATCH 105/166] pstotiff: don't use SAFER with WRITESYSTEMDICT per upstream warning --- hplip-pstotiff-is-rubbish.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hplip-pstotiff-is-rubbish.patch b/hplip-pstotiff-is-rubbish.patch index 014e2cf..901e6a2 100644 --- a/hplip-pstotiff-is-rubbish.patch +++ b/hplip-pstotiff-is-rubbish.patch @@ -57,8 +57,8 @@ diff -up hplip-3.15.2/fax/filters/pstotiff.pstotiff-is-rubbish hplip-3.15.2/fax/ +TMPFILE=`mktemp /tmp/pstotiff.XXXXXX` || exit 1 +gs -I/usr/share/cups/fonts -sDEVICE=tiffg4 -dMaxStripSize=0 -r204x196 \ + -dNOPAUSE -dBATCH -dSAFER -dPARANOIDSAFER \ -+ -dSHORTERRORS -dWRITESYSTEMDICT -dGHOSTSCRIPT \ -+ -sstdout=%stderr -sOutputFile="$TMPFILE" "$IN" ++ -dSHORTERRORS -dGHOSTSCRIPT -sstdout=%stderr \ ++ -sOutputFile="$TMPFILE" "$IN" +RET=$? +cat "$TMPFILE" +rm -f "$TMPFILE" From 042601273672d5760266cfba844ae369d5590170 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jul 2023 18:28:12 +0200 Subject: [PATCH 106/166] switch to curl when downloading plugin --- hp-plugin.in | 2 +- hplip.spec | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index c3e7bd3..b55f8ac 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -22,7 +22,7 @@ then @bindir@/mkdir ~/.hplip || @bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1 fi -@bindir@/wget -O ~/.hplip/${PLUGIN_FILE} ${PLUGIN_SOURCE} +@bindir@/curl --create-dir -O --output-dir ~/.hplip ${PLUGIN_SOURCE} if [ ! -f ~/.hplip/${PLUGIN_FILE} ] then diff --git a/hplip.spec b/hplip.spec index 8e888d4..320255c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -224,6 +224,11 @@ Patch66: hplip-nocdmfilter.patch # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 Patch67: hplip-fix-parsing-lpstat.patch +# switch to curl by downstream patch from wget to workaround openstack dropping IPv6 +# which causes great delays... +# Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, +# it should not hang. +Patch68: hplip-plugin-curl.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -282,6 +287,9 @@ Recommends: avahi-tools Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} Requires: cups +# switch to curl by downstream patch from wget to workaround openstack dropping IPv6 +# which causes great delays... +Requires: curl-minimal # for bash script acting as hp-plugin (Source7) Requires: gawk # set require directly to /usr/bin/gpg, because gnupg2 and gnupg ships it, @@ -298,7 +306,6 @@ Requires: systemd Requires: tar # require usbutils, hp-diagnose_queues needs lsusb Requires: usbutils -Requires: wget # require coreutils, because timeout binary is needed in post scriptlet, # because hpcups-update-ppds script can freeze in certain situation and @@ -564,6 +571,9 @@ done # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 %patch -P 67 -p1 -b .lpstat-parse +# switch to curl by downstream patch from wget to workaround openstack dropping IPv6 +# which causes great delays... +%patch -P 68 -p1 -b .curl-switch # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -937,6 +947,7 @@ find doc/images -type f -exec chmod 644 {} \; %changelog * Mon Jul 17 2023 Zdenek Dohnal - 3.23.5-3 - 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed +- switch to curl when downloading plugin * Tue Jun 13 2023 Python Maint - 3.23.5-2 - Rebuilt for Python 3.12 From eb5e88152538a36e74ea8d7085a54baf48e06103 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 17 Jul 2023 18:43:31 +0200 Subject: [PATCH 107/166] 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() --- hplip-no-readfp.patch | 26 ++++++++++++++++++++++++++ hplip.spec | 7 +++++++ 2 files changed, 33 insertions(+) create mode 100644 hplip-no-readfp.patch diff --git a/hplip-no-readfp.patch b/hplip-no-readfp.patch new file mode 100644 index 0000000..35108e3 --- /dev/null +++ b/hplip-no-readfp.patch @@ -0,0 +1,26 @@ +diff --git a/base/g.py b/base/g.py +index 0aa0e2e..96b3131 100644 +--- a/base/g.py ++++ b/base/g.py +@@ -128,7 +128,7 @@ class ConfigBase(object): + try: + fp = open(self.filename, "r") + try: +- self.conf.readfp(fp) ++ self.conf.read_file(fp, self.filename) + except configparser.MissingSectionHeaderError: + print("") + log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename) +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index 3110a0f..3761f89 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + + hplip_conf = configparser.ConfigParser() + fp = open("/etc/hp/hplip.conf", "r") +- hplip_conf.readfp(fp) ++ hplip_conf.read_file(fp, "/etc/hp/hplip.conf") + fp.close() + + try: diff --git a/hplip.spec b/hplip.spec index 320255c..38a5eb4 100644 --- a/hplip.spec +++ b/hplip.spec @@ -229,6 +229,9 @@ Patch67: hplip-fix-parsing-lpstat.patch # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # it should not hang. Patch68: hplip-plugin-curl.patch +# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() +# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 +Patch69: hplip-no-readfp.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -574,6 +577,9 @@ done # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... %patch -P 68 -p1 -b .curl-switch +# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() +# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 +%patch -P 69 -p1 -b .no-readfp # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -948,6 +954,7 @@ find doc/images -type f -exec chmod 644 {} \; * Mon Jul 17 2023 Zdenek Dohnal - 3.23.5-3 - 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed - switch to curl when downloading plugin +- 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() * Tue Jun 13 2023 Python Maint - 3.23.5-2 - Rebuilt for Python 3.12 From 83a6c95d49dff9dbe32db4a7c6e02c1a6a508f88 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 18 Jul 2023 10:26:16 +0200 Subject: [PATCH 108/166] hplip.spec: recommend python3-gobject in hplip --- hplip.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hplip.spec b/hplip.spec index 38a5eb4..1080e8c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -288,6 +288,10 @@ BuildRequires: systemd Recommends: avahi-tools # 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} +# downloaded plugin requires python3-gobject to work even via CLI... +# but make it weak dependency, so users which don't need the plugin and have servers +# can remove the python3-gobject which is used by desktop apps +Recommends: python3-gobject Requires: cups # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 From 9a35bb2322b3632f6714472b6bac90fa5e0599c8 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 18 Jul 2023 16:54:50 +0200 Subject: [PATCH 109/166] Add missing curl patch --- hplip-plugin-curl.patch | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 hplip-plugin-curl.patch diff --git a/hplip-plugin-curl.patch b/hplip-plugin-curl.patch new file mode 100644 index 0000000..f9ef742 --- /dev/null +++ b/hplip-plugin-curl.patch @@ -0,0 +1,56 @@ +diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py +index 56683fb..031ceec 100755 +--- a/installer/pluginhandler.py ++++ b/installer/pluginhandler.py +@@ -185,14 +185,14 @@ class PluginHandle(object): + if self.__plugin_conf_file.startswith('file://'): + status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True) + else: +- wget = utils.which("wget", True) +- if wget: +- status, output = utils.run("%s --tries=3 --timeout=60 --output-document=%s %s --cache=off" %(wget, local_conf, self.__plugin_conf_file)) ++ curl = utils.which("curl", True) ++ if curl: ++ status, output = utils.run("%s --retry 3 --max-time=10 --output %s %s" %(curl, local_conf, self.__plugin_conf_file)) + if status: + log.error("Plugin download failed with error code = %d" %status) + return status, url, check_sum + else: +- log.error("Please install wget package to download the plugin.") ++ log.error("Please install curl package to download the plugin.") + return status, url, check_sum + except IOError as e: + log.error("I/O Error: %s" % e.strerror) +@@ -284,18 +284,18 @@ class PluginHandle(object): + if src.startswith('file://'): + status, filename = utils.download_from_network(src, plugin_file, True) + else: +- wget = utils.which("wget", True) +- if wget: +- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) ++ curl = utils.which("curl", True) ++ if curl: ++ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) + log.debug(cmd) + status, output = utils.run(cmd) +- log.debug("wget returned: %d" % status) ++ log.debug("curl returned: %d" % status) + + #Check whether plugin is accessible in Openprinting.org website otherwise dowload plugin from alternate location. + if status != 0 or os_utils.getFileSize(plugin_file) <= 0: + src = os.path.join(PLUGIN_FALLBACK_LOCATION, self.__plugin_name) + log.info("Plugin is not accessible. Trying to download it from fallback location: [%s]" % src) +- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) + log.debug(cmd) + status, output = utils.run(cmd) + +@@ -323,7 +323,7 @@ class PluginHandle(object): + if digsig_url.startswith('file://'): + status, filename = utils.download_from_network(digsig_url, digsig_file, True) + else: +- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,digsig_url) ++ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl, self.__plugin_path,digsig_url) + log.debug(cmd) + status, output = utils.run(cmd) + except IOError as e: From 65ca3e41cfaca8d0776ce82ea0bc300d41777049 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 18 Jul 2023 11:42:36 -0700 Subject: [PATCH 110/166] Require curl, not curl-minimal Requiring curl-minimal is not safe. The full curl package does not provide curl-minimal, and the two conflict. So if you have full curl installed, you cannot update, because installing curl-minimal to satisfy hplip's requirement would require the removal of full curl. curl-minimal provides curl, so for a quick fix, just changing this to "Requires: curl", which is satisfied by either. As a refinement we might be able to add something like "Suggests: curl-minimal" to 'cue' the use of curl-minimal rather than curl if neither is currently installed, but I just wanted to make the minimum change necessary to stop breaking openQA tests for now. --- hplip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 1080e8c..ceb95df 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -296,7 +296,7 @@ Recommends: python3-gobject Requires: cups # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... -Requires: curl-minimal +Requires: curl # for bash script acting as hp-plugin (Source7) Requires: gawk # set require directly to /usr/bin/gpg, because gnupg2 and gnupg ships it, @@ -955,6 +955,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 18 2023 Adam Williamson - 3.23.5-4 +- Require curl, not curl-minimal, due to conflicts + * Mon Jul 17 2023 Zdenek Dohnal - 3.23.5-3 - 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed - switch to curl when downloading plugin From a3f2418e3ad7c0303d1113f7d1ae0867b1e97de7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 06:25:09 +0000 Subject: [PATCH 111/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index ceb95df..837e894 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -955,6 +955,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 3.23.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 18 2023 Adam Williamson - 3.23.5-4 - Require curl, not curl-minimal, due to conflicts From ec4e2f53cc04d2be5cc10f2c04e80a01516f5161 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 21 Jul 2023 10:47:20 +0200 Subject: [PATCH 112/166] Enable Fedora CI and gating --- .fmf/version | 1 + ci.fmf | 1 + gating.yaml | 27 +++++++++++++++++++++++++++ plans/public.fmf | 6 ++++++ plans/tier1-internal.fmf | 12 ++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 gating.yaml create mode 100644 plans/public.fmf create mode 100644 plans/tier1-internal.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..de5c323 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,27 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + +#Rawhide +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + +#gating rhel +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional} diff --git a/plans/public.fmf b/plans/public.fmf new file mode 100644 index 0000000..8dee615 --- /dev/null +++ b/plans/public.fmf @@ -0,0 +1,6 @@ +summary: Test plan that runs all tests from hplip tests repo. +discover: + how: fmf + url: https://src.fedoraproject.org/tests/hplip.git +execute: + how: tmt diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf new file mode 100644 index 0000000..ed3dbc3 --- /dev/null +++ b/plans/tier1-internal.fmf @@ -0,0 +1,12 @@ +summary: CI plan, picks internal Tier1 tests, runs in beakerlib. +discover: + - name: rhel + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/hplip +execute: + how: tmt +adjust: + enabled: false + when: distro == centos-stream, fedora + because: They don't have access to internal repos. From c775adaac1e34094fe7141231b6ad0602f45cbda Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 21 Jul 2023 11:17:20 +0200 Subject: [PATCH 113/166] Fix conditional --- plans/tier1-internal.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf index ed3dbc3..1a164be 100644 --- a/plans/tier1-internal.fmf +++ b/plans/tier1-internal.fmf @@ -8,5 +8,5 @@ execute: how: tmt adjust: enabled: false - when: distro == centos-stream, fedora + when: distro == centos-stream or distro == fedora because: They don't have access to internal repos. From aef1ccce5b2a6a37415cfc2101a31c6242d5adf9 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 21 Jul 2023 11:34:46 +0200 Subject: [PATCH 114/166] Fix tier1-internal --- plans/tier1-internal.fmf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf index 1a164be..4f7e4b3 100644 --- a/plans/tier1-internal.fmf +++ b/plans/tier1-internal.fmf @@ -1,12 +1,12 @@ summary: CI plan, picks internal Tier1 tests, runs in beakerlib. discover: - name: rhel - how: fmf - filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/hplip + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/hplip execute: - how: tmt + how: tmt adjust: - enabled: false - when: distro == centos-stream or distro == fedora - because: They don't have access to internal repos. + enabled: false + when: distro == centos-stream or distro == fedora + because: They don't have access to internal repos. From f22496015e70d6f663ee40f62504b888c81dcf94 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 20 Jul 2023 16:15:39 +0200 Subject: [PATCH 115/166] Use raw strings to eliminate syntax warnings --- hplip-use-raw-strings.patch | 290 ++++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 hplip-use-raw-strings.patch diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch new file mode 100644 index 0000000..f3b5495 --- /dev/null +++ b/hplip-use-raw-strings.patch @@ -0,0 +1,290 @@ +diff --git a/base/device.py b/base/device.py +index fbe6c34..a551403 100644 +--- a/base/device.py ++++ b/base/device.py +@@ -47,7 +47,7 @@ from . import models, mdns, slp, avahi + from .strings import * + from .sixext import PY3, to_bytes_utf8, to_unicode, to_string_latin, to_string_utf8, xStringIO + +-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I) ++http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I) + + HTTP_OK = 200 + HTTP_ERROR = 500 +diff --git a/base/g.py b/base/g.py +index 96b3131..023aeea 100644 +--- a/base/g.py ++++ b/base/g.py +@@ -302,7 +302,7 @@ prop.hpcups_build = to_bool(sys_conf.get('configure', 'hpcups-install', '0')) + prop.hpijs_build = to_bool(sys_conf.get('configure', 'hpijs-install', '0')) + + # Spinner, ala Gentoo Portage +-spinner = "\|/-\|/-" ++spinner = r"\|/-\|/-" + spinpos = 0 + enable_spinner = True + +@@ -352,7 +352,7 @@ def check_extension_module_env(ext_mod): + log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod) + sys.exit(1) + +- m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found ++ m = re.search(r'python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found + ext_ver = xint(m.group(1)) + + if ext_ver[0] == 3: +diff --git a/base/logger.py b/base/logger.py +index dd92a9c..68e4f13 100644 +--- a/base/logger.py ++++ b/base/logger.py +@@ -437,10 +437,10 @@ class Logger(object): + start = start + " " + number_chars = number_chars + 1 + try: +- elem_start = re.findall("(\<\W{0,1}\w+) ?", line)[0] +- elem_finished = re.findall("([?|\]\]]*\>)", line)[0] ++ elem_start = re.findall(r"(\<\W{0,1}\w+) ?", line)[0] ++ elem_finished = re.findall(r"([?|\]\]]*\>)", line)[0] + #should not have * +- attrs = re.findall("(\S*?\=\".*?\")", line) ++ attrs = re.findall(r"(\S*?\=\".*?\")", line) + #output.write(start + elem_start) + self.log(start+elem_start, level, False) + number_chars = len(start + elem_start) +diff --git a/base/models.py b/base/models.py +index dc6cc39..48dd2ef 100644 +--- a/base/models.py ++++ b/base/models.py +@@ -35,7 +35,7 @@ except ImportError: + datetime = None + + +-pat_prod_num = re.compile("""(\d+)""", re.I) ++pat_prod_num = re.compile(r"""(\d+)""", re.I) + + TYPE_UNKNOWN = 0 + TYPE_STRING = 1 +@@ -427,25 +427,25 @@ class ModelData: + } + + self.RE_FIELD_TYPES = { +- re.compile('^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, +- re.compile('^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, +- re.compile('^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, +- re.compile('^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, +- re.compile('^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, +- re.compile('^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, +- re.compile('^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, +- re.compile('^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, +- re.compile('^model(\d+)', re.IGNORECASE) : TYPE_STR, ++ re.compile(r'^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, ++ re.compile(r'^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, ++ re.compile(r'^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, ++ re.compile(r'^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, ++ re.compile(r'^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, ++ re.compile(r'^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, ++ re.compile(r'^model(\d+)', re.IGNORECASE) : TYPE_STR, + } + + self.TYPE_CACHE = {} +diff --git a/base/password.py b/base/password.py +index 259bf82..a4ed107 100644 +--- a/base/password.py ++++ b/base/password.py +@@ -167,8 +167,8 @@ class Password(object): + + elif i == 1: # TIMEOUT + if('true' in cmd and self.__password_prompt_str == ""): # sudo true or su -c "true" +- cb = cb.replace("[", "\[") +- cb = cb.replace("]", "\]") ++ cb = cb.replace("[", r"\[") ++ cb = cb.replace("]", r"\]") + + self.__password_prompt_str = cb + try: +diff --git a/base/status.py b/base/status.py +index 37c774e..01f455d 100644 +--- a/base/status.py ++++ b/base/status.py +@@ -1341,7 +1341,7 @@ def MapPJLErrorCode(error_code, str_code=None): + return status_code + + +-pjl_code_pat = re.compile("""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) ++pjl_code_pat = re.compile(r"""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) + + + +diff --git a/base/tui.py b/base/tui.py +index 0f90f92..3b36c65 100644 +--- a/base/tui.py ++++ b/base/tui.py +@@ -217,7 +217,7 @@ class ProgressMeter(object): + self.progress = 0 + self.prompt = prompt + self.prev_length = 0 +- self.spinner = "\|/-\|/-*" ++ self.spinner = r"\|/-\|/-*" + self.spinner_pos = 0 + self.max_size = ttysize()[1] - len(prompt) - 25 + self.update(0) +diff --git a/base/utils.py b/base/utils.py +index 2b631ce..2fb57c4 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -148,7 +148,7 @@ def get_cups_systemgroup_list(): + return lis + + try: +- lis = ((re.findall('SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') ++ lis = ((re.findall(r'SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') + except IndexError: + return lis + +@@ -1597,7 +1597,7 @@ def mixin(cls): + # ------------------------- Usage Help + USAGE_OPTIONS = ("[OPTIONS]", "", "heading", False) + USAGE_LOGGING1 = ("Set the logging level:", "-l or --logging=", 'option', False) +-USAGE_LOGGING2 = ("", ": none, info\*, error, warn, debug (\*default)", "option", False) ++USAGE_LOGGING2 = ("", r": none, info\*, error, warn, debug (\*default)", "option", False) + USAGE_LOGGING3 = ("Run in debug mode:", "-g (same as option: -ldebug)", "option", False) + USAGE_LOGGING_PLAIN = ("Output plain text only:", "-t", "option", False) + USAGE_ARGS = ("[PRINTER|DEVICE-URI]", "", "heading", False) +@@ -1605,13 +1605,13 @@ USAGE_ARGS2 = ("[PRINTER]", "", "heading", False) + USAGE_DEVICE = ("To specify a device-URI:", "-d or --device=", "option", False) + USAGE_PRINTER = ("To specify a CUPS printer:", "-p or --printer=", "option", False) + USAGE_BUS1 = ("Bus to probe (if device not specified):", "-b or --bus=", "option", False) +-USAGE_BUS2 = ("", ": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) ++USAGE_BUS2 = ("", r": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) + USAGE_HELP = ("This help information:", "-h or --help", "option", True) + USAGE_SPACE = ("", "", "space", False) + USAGE_EXAMPLES = ("Examples:", "", "heading", False) + USAGE_NOTES = ("Notes:", "", "heading", False) + USAGE_STD_NOTES1 = ("If device or printer is not specified, the local device bus is probed and the program enters interactive mode.", "", "note", False) +-USAGE_STD_NOTES2 = ("If -p\* is specified, the default CUPS printer will be used.", "", "note", False) ++USAGE_STD_NOTES2 = (r"If -p\* is specified, the default CUPS printer will be used.", "", "note", False) + USAGE_SEEALSO = ("See Also:", "", "heading", False) + USAGE_LANGUAGE = ("Set the language:", "--loc= or --lang=. Use --loc=? or --lang=? to see a list of available language codes.", "option", False) + USAGE_LANGUAGE2 = ("Set the language:", "--lang=. Use --lang=? to see a list of available language codes.", "option", False) +@@ -1839,7 +1839,7 @@ encoding: utf8 + + elif typ == 'man': + log.info('.TH "%s" 1 "%s" Linux "User Manuals"' % (crumb, version)) +- log.info(".SH NAME\n%s \- %s" % (crumb, title)) ++ log.info(r".SH NAME\n%s \- %s" % (crumb, title)) + + for line in text_list: + text1, text2, format, trailing_space = line +@@ -1938,7 +1938,7 @@ def unescape(text): + except KeyError: + pass + return text # leave as is +- return re.sub("&#?\w+;", fixup, text) ++ return re.sub(r"&#?\w+;", fixup, text) + + + # Adds HTML or XML character references and entities from a text string +@@ -1991,7 +1991,7 @@ def Is_HPLIP_older_version(installed_version, available_version): + log.debug("HPLIP Installed_version=%s Available_version=%s"%(installed_version,available_version)) + cnt = 0 + Is_older = False +- pat=re.compile('''(\d{1,})([a-z]{1,})''') ++ pat=re.compile(r'''(\d{1,})([a-z]{1,})''') + try: + while cnt or --bus=", "option", False), +- ("", ": cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)", "option", False), ++ ("", r": cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)", "option", False), + ("Set Time to Live (TTL):", "-t or --ttl= (Default is 4).", "option", False), + ("Set timeout:", "-o or --timeout=", "option", False), + ("Filter by functionality:", "-e or --filter=", "option", False), +- ("", ": comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)", "option", False), ++ ("", r": comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)", "option", False), + ("Search:", "-s or --search=", "option", False), + ("", " must be a valid regular expression (not case sensitive)", "option", False), + ("Network discovery method:", "-m or --method=: is 'slp'* or 'mdns'.", "option", False), +diff --git a/setup.py b/setup.py +index 98f57fd..539be50 100755 +--- a/setup.py ++++ b/setup.py +@@ -79,11 +79,11 @@ USAGE = [ (__doc__, "", "name", True), + utils.USAGE_SPACE, + utils.USAGE_OPTIONS, + ("Automatic mode:", "-a or --auto (-i mode only)", "option", False), +- ("To specify the port on a multi-port JetDirect:", "--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), ++ (r"To specify the port on a multi-port JetDirect:", "--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), + ("No testpage in automatic mode:", "-x (-i mode only)", "option", False), + ("To specify a CUPS printer queue name:", "-p or --printer= (-i mode only)", "option", False), + ("To specify a CUPS fax queue name:", "-f or --fax= (-i mode only)", "option", False), +- ("Type of queue(s) to install:", "-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), ++ (r"Type of queue(s) to install:", "-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), + ("To specify the device URI to install:", "-d or --device= (--qt4 mode only)", "option", False), + ("Remove printers or faxes instead of setting-up:", "-r or --rm or --remove", "option", False), + utils.USAGE_LANGUAGE, From a15ae7afb4df7a45b394ead34b5cd56430661204 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 21 Jul 2023 12:57:24 +0200 Subject: [PATCH 116/166] Fix syntax warnings --- hplip.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 837e894..f869098 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -232,6 +232,8 @@ Patch68: hplip-plugin-curl.patch # 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() # Upstream https://bugs.launchpad.net/hplip/+bug/2028001 Patch69: hplip-no-readfp.patch +# fix SyntaxWarning from python3.12 +Patch70: hplip-use-raw-strings.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -584,6 +586,7 @@ done # 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() # Upstream https://bugs.launchpad.net/hplip/+bug/2028001 %patch -P 69 -p1 -b .no-readfp +%patch -P 70 -p1 -b .raw-strings # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -955,6 +958,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jul 21 2023 Zdenek Dohnal - 3.23.5-6 +- fix syntax warnings + * Thu Jul 20 2023 Fedora Release Engineering - 3.23.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From f9aafff426a057311ed92b72fde9af31ffc54168 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 27 Jul 2023 17:12:37 +0200 Subject: [PATCH 117/166] Fix more warnings --- hplip-use-raw-strings.patch | 136 +++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 3 deletions(-) diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index f3b5495..afef121 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -1,3 +1,16 @@ +diff --git a/base/LedmWifi.py b/base/LedmWifi.py +index f63a050..074d5a2 100644 +--- a/base/LedmWifi.py ++++ b/base/LedmWifi.py +@@ -31,7 +31,7 @@ from .g import * + from . import device, utils + from .sixext import to_bytes_utf8 + +-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I) ++http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I) + HTTP_OK = 200 + HTTP_ACCEPTED = 202 + HTTP_NOCONTENT = 204 diff --git a/base/device.py b/base/device.py index fbe6c34..a551403 100644 --- a/base/device.py @@ -124,6 +137,28 @@ index 259bf82..a4ed107 100644 self.__password_prompt_str = cb try: +diff --git a/base/queues.py b/base/queues.py +index 0818574..8625f53 100755 +--- a/base/queues.py ++++ b/base/queues.py +@@ -46,7 +46,7 @@ HPPS = 3 + HPOTHER = 4 + + DEVICE_URI_PATTERN = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+))(?:&port=(\d))?""", re.I) +-NICKNAME_PATTERN = re.compile(b'''\*NickName:\s*\"(.*)"''', re.MULTILINE) ++NICKNAME_PATTERN = re.compile(r'''\*NickName:\s*\"(.*)"''', re.MULTILINE) + NET_PATTERN = re.compile(r"""(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})""") + NET_ZC_PATTERN = re.compile(r'''zc=(.*)''',re.IGNORECASE) + NET_OTHER_PATTERN = re.compile(r'''(.*)://(.*)''',re.IGNORECASE) +@@ -149,7 +149,7 @@ def parseQueues(mode): + desc='' + else: + try: +- desc = to_string_utf8( NICKNAME_PATTERN.search(fileptr).group(1) ) ++ desc = to_string_utf8( NICKNAME_PATTERN.search(fileptr.decode('utf-8')).group(1) ) + except AttributeError: + desc = '' + diff --git a/base/status.py b/base/status.py index 37c774e..01f455d 100644 --- a/base/status.py @@ -215,6 +250,41 @@ index 2b631ce..2fb57c4 100644 try: while cnt or --port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), ++ ("To specify the port on a multi-port JetDirect:", r"-p or --port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), + ("Show the CUPS URI only (quiet mode):", "-c or --cups", "option", False), + ("Show the SANE URI only (quiet mode):", "-s or --sane", "option", False), + ("Show the HP Fax URI only (quiet mode):", "-f or --fax", "option", False), diff --git a/prnt/cups.py b/prnt/cups.py index 1ea3099..78b8adc 100644 --- a/prnt/cups.py @@ -270,8 +353,33 @@ index 2041fb6..2b43ece 100755 ("Search:", "-s or --search=", "option", False), ("", " must be a valid regular expression (not case sensitive)", "option", False), ("Network discovery method:", "-m or --method=: is 'slp'* or 'mdns'.", "option", False), +diff --git a/scan.py b/scan.py +index 0bfa6f5..27b8c2e 100755 +--- a/scan.py ++++ b/scan.py +@@ -249,9 +249,9 @@ try: + extra_options=[utils.USAGE_SPACE, + ("[OPTIONS] (General)", "", "header", False), + ("Scan destinations:", "-s or --dest=", "option", False), +- ("", "where is a comma separated list containing one or more of: 'file'\*, ", "option", False), ++ ("", r"where is a comma separated list containing one or more of: 'file'\*, ", "option", False), + ("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False), +- ("Scan mode:", "-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), ++ ("Scan mode:", r"-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), + ("Scanning resolution:", "-r or --res= or --resolution=", "option", False), + ("", "where 300 is default.", "option", False), + ("Image resize:", "--resize= (min=1%, max=400%, default=100%)", "option", False), +@@ -268,7 +268,7 @@ try: + utils.USAGE_SPACE, + ("[OPTIONS] (Scan area)", "", "header", False), + ("Specify the units for area/box measurements:", "-t or --units=", "option", False), +- ("", "where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), ++ ("", r"where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), + ("Scan area:", "-a,,, or --area=,,,", "option", False), + ("", "Coordinates are relative to the upper left corner of the scan area.", "option", False), + ("", "Units for tlx, tly, brx, and bry are specified by -t/--units (default is 'mm').", "option", False), diff --git a/setup.py b/setup.py -index 98f57fd..539be50 100755 +index 98f57fd..1a74d6d 100755 --- a/setup.py +++ b/setup.py @@ -79,11 +79,11 @@ USAGE = [ (__doc__, "", "name", True), @@ -279,12 +387,34 @@ index 98f57fd..539be50 100755 utils.USAGE_OPTIONS, ("Automatic mode:", "-a or --auto (-i mode only)", "option", False), - ("To specify the port on a multi-port JetDirect:", "--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), -+ (r"To specify the port on a multi-port JetDirect:", "--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), ++ ("To specify the port on a multi-port JetDirect:", r"--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), ("No testpage in automatic mode:", "-x (-i mode only)", "option", False), ("To specify a CUPS printer queue name:", "-p or --printer= (-i mode only)", "option", False), ("To specify a CUPS fax queue name:", "-f or --fax= (-i mode only)", "option", False), - ("Type of queue(s) to install:", "-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), -+ (r"Type of queue(s) to install:", "-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), ++ ("Type of queue(s) to install:", r"-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), ("To specify the device URI to install:", "-d or --device= (--qt4 mode only)", "option", False), ("Remove printers or faxes instead of setting-up:", "-r or --rm or --remove", "option", False), utils.USAGE_LANGUAGE, +diff --git a/ui5/devmgr_ext.py b/ui5/devmgr_ext.py +index 34b4977..6b7a61e 100644 +--- a/ui5/devmgr_ext.py ++++ b/ui5/devmgr_ext.py +@@ -12,7 +12,7 @@ class Ui_MainWindow_Derived(object): + + self.latest_available_version = latest_available_version + self.Is_autoInstaller_distro = Is_autoInstaller_distro +- if self.latest_available_version is not "": ++ if self.latest_available_version != "": + self.tab_3 = QWidget() + self.tab_3.setObjectName("tab_3") + self.label = QLabel(self.tab_3) +@@ -34,7 +34,7 @@ class Ui_MainWindow_Derived(object): + + def retranslateUi(self, MainWindow): + super(Ui_MainWindow_Derived, self).retranslateUi(MainWindow) +- if self.latest_available_version is not "": ++ if self.latest_available_version != "": + self.label.setText(QApplication.translate("MainWindow", "New version of HPLIP-%s is available"%self.latest_available_version, None)) + self.Tabs.setTabText(self.Tabs.indexOf(self.tab_3), QApplication.translate("MainWindow", "Upgrade", None)) + if self.Is_autoInstaller_distro: From 76d7fdfefcfc4cf80ebe3bc80f1d41c604e27dbe Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 27 Jul 2023 19:25:15 +0200 Subject: [PATCH 118/166] remove redundant files --- hplip-remove-hbpl.patch | 33 +++++++++++++++++++++++++++++++++ hplip-repack.sh | 2 ++ hplip.spec | 9 +++++++-- sources | 2 +- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 hplip-remove-hbpl.patch diff --git a/hplip-remove-hbpl.patch b/hplip-remove-hbpl.patch new file mode 100644 index 0000000..fe233e8 --- /dev/null +++ b/hplip-remove-hbpl.patch @@ -0,0 +1,33 @@ +diff --git a/Makefile.am b/Makefile.am +index a3be3f1..0c74a12 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -583,10 +583,8 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp + prnt/hpcups/dj3600ColorMaps.cpp prnt/hpcups/dj3320PrintModes.h \ + prnt/hpcups/dj4100PrintModes.h \ + prnt/hpcups/Hbpl1.cpp prnt/hpcups/Hbpl1.h prnt/hpcups/Hbpl1_Wrapper.h prnt/hpcups/PCLmGenerator.h \ +- prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ +- prnt/hpcups/genPCLm.h \ +- common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ ++ prnt/hpcups/flate_colorspace.h \ ++ common/utils.c common/utils.h \ + prnt/hpcups/ImageProcessor.h + + hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +diff --git a/prnt/hpcups/Hbpl1.cpp b/prnt/hpcups/Hbpl1.cpp +index 74a67f0..4cac4ab 100644 +--- a/prnt/hpcups/Hbpl1.cpp ++++ b/prnt/hpcups/Hbpl1.cpp +@@ -72,11 +72,6 @@ Hbpl1::Hbpl1 () : Encapsulator () + if ((m_pHbpl1Wrapper = fptr_create(this)) == NULL) + m_init = false; + }*/ +- m_pHbpl1Wrapper = new Hbpl1Wrapper(this); +- if(m_pHbpl1Wrapper == NULL) +- m_init = false; +- else +- m_init = true; + } + + Hbpl1::~Hbpl1() diff --git a/hplip-repack.sh b/hplip-repack.sh index 034187c..1e3ba10 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -15,6 +15,8 @@ tar -xaf hplip-$VERSION.tar.gz || exit 1 # remove unwanted files rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1 rm hplip-$VERSION/fax/filters/cdmfax/hpcupscdmfax.{cpp,h} hplip-$VERSION/fax/filters/cdmfax/jetlib.{cpp,h} hplip-$VERSION/fax/ppd/HP-Fax-CDM-hpcups.ppd.gz || exit 1 +rm hplip-$VERSION/prnt/hpcups/Hbpl1_Wrapper.cpp hplip-$VERSION/prnt/hpcups/genPCLm.{cpp,h} hplip-$VERSION/prnt/hpcups/common_defines.h hplip-$VERSION/prnt/hpcups/genJPEGStrips.cpp hplip-$VERSION/prnt/hpcups/RunLenEncoding.{h,cpp} +rm hplip-$VERSION/locatedriver # compress into a new tarball tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 diff --git a/hplip.spec b/hplip.spec index f869098..004fe81 100644 --- a/hplip.spec +++ b/hplip.spec @@ -234,6 +234,8 @@ Patch68: hplip-plugin-curl.patch Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 Patch70: hplip-use-raw-strings.patch +# more unfriendly licenses... +Patch71: hplip-remove-hbpl.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -587,6 +589,7 @@ done # Upstream https://bugs.launchpad.net/hplip/+bug/2028001 %patch -P 69 -p1 -b .no-readfp %patch -P 70 -p1 -b .raw-strings +%patch -P 71 -p1 -b .hbpl # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -606,13 +609,12 @@ sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \ prnt/filters/hpps \ fax/filters/pstotiff -rm locatedriver - cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups # 2129849 - move hp-plugin script into srcdir cp -p %{SOURCE7} . + %build # Work-around Makefile.am imperfections. sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in @@ -958,6 +960,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 27 2023 Zdenek Dohnal - 3.23.5-6 +- remove redundant files + * Fri Jul 21 2023 Zdenek Dohnal - 3.23.5-6 - fix syntax warnings diff --git a/sources b/sources index 826d71c..9375c30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.5-repack.tar.gz) = 7616a088b6f2f5efbd5ec426b3de80099b56f435adb38c0acd1f60e7cd00e788f94a2e35136011a7d73dd48a891a3b713263132653c9a2acf0ba98d57a790b4c +SHA512 (hplip-3.23.5-repack.tar.gz) = 7b16f86f18f77061396c4b70df47ebb2109a07a018fbadac550d873ee3d68edb9c1530fde3fec07ba5702f896243b81a6b9b23c4602953716ffbab7b025bbf86 From e174e9103e9fe55d9b71ae040f95ec8dbde58281 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 28 Jul 2023 09:30:06 +0200 Subject: [PATCH 119/166] Update hplip-covscan.patch, because genPCLm.cpp was removed --- hplip-covscan.patch | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/hplip-covscan.patch b/hplip-covscan.patch index adc456d..6c88581 100644 --- a/hplip-covscan.patch +++ b/hplip-covscan.patch @@ -139,43 +139,6 @@ diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c cwd.StartSector = ConvertClusterToSector(fa.StartCluster); cwd.CurrSector = cwd.StartSector; cwd.StartCluster = fa.StartCluster; -diff -up hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan hplip-3.23.3/prnt/hpcups/genPCLm.cpp ---- hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/prnt/hpcups/genPCLm.cpp 2023-05-29 13:58:10.971395203 +0200 -@@ -1237,11 +1237,16 @@ void PCLmGenerator::writeJobTicket() - char orientation[256]; - char duplex[256]; - char colorthemes[256]; -- strncpy(colorthemes,getColorThemesString(m_pPCLmSSettings->colorTheme),256); -- strncpy(inputBin,getInputBinString(m_pPCLmSSettings->userInputBin),256); -- strncpy(outputBin,getOutputBin(m_pPCLmSSettings->userOutputBin),256); -- strncpy(orientation,getOrientationString(m_pPCLmSSettings->userOrientation),256); -- strncpy(duplex,getDuplexString(currDuplexDisposition),256); -+ strncpy(colorthemes,getColorThemesString(m_pPCLmSSettings->colorTheme), sizeof(colorthemes)); -+ colorthemes[sizeof(colorthemes)-1] = '\0'; -+ strncpy(inputBin,getInputBinString(m_pPCLmSSettings->userInputBin), sizeof(inputBin)); -+ inputBin[sizeof(inputBin)-1] = '\0'; -+ strncpy(outputBin,getOutputBin(m_pPCLmSSettings->userOutputBin), sizeof(outputBin)); -+ outputBin[sizeof(outputBin)-1] = '\0'; -+ strncpy(orientation,getOrientationString(m_pPCLmSSettings->userOrientation), sizeof(orientation)); -+ orientation[sizeof(orientation)-1] = '\0'; -+ strncpy(duplex,getDuplexString(currDuplexDisposition), sizeof(duplex)); -+ duplex[sizeof(duplex)-1] = '\0'; - - snprintf(pOutStr,OUT_STR_SIZE,"%% genPCLm (Ver: %f)\n",PCLM_Ver); writeStr2OutBuff(pOutStr); - snprintf(pOutStr,OUT_STR_SIZE,"%%============= Job Ticket =============\n"); writeStr2OutBuff(pOutStr); -@@ -1635,7 +1640,10 @@ int PCLmGenerator::StartPage(PCLmPageSe - } - - if(strlen(PCLmPageContent->mediaSizeName)) -- strncpy(currMediaName,PCLmPageContent->mediaSizeName,256); -+ { -+ strncpy(currMediaName,PCLmPageContent->mediaSizeName, sizeof(currMediaName)); -+ currMediaName[sizeof(currMediaName)-1] = '\0'; -+ } - - currStripHeight=PCLmPageContent->stripHeight; - if(!currStripHeight) diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp --- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 +++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200 From ac09a5bddcdfb1bcacd2f47566d860faa06e5ca6 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 28 Jul 2023 14:12:45 +0200 Subject: [PATCH 120/166] SPDX migration --- hplip.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 004fe81..c9928d5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,8 +7,17 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 6%{?dist} -License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC +Release: 7%{?dist} +# most files (base/*, *, ui*/...) - GPL2+ +# prnt/hpijs/ jpeg related files - IJG +# prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP +# base/exif.py - BSD-2-Clause-GeneCash/FreeBSD - reported as https://gitlab.com/fedora/legal/fedora-license-data/-/issues/268 +# base/ldif.py - unknown python license from python-ldap - reported https://gitlab.com/fedora/legal/fedora-license-data/-/issues/269 +# io/*, scan/* - MIT +# protocol/discovery/* - LGPL-2.1-or-later +# protocol/* - GPL2only +# scan/sane/sane.h - Public Domain +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause-HP AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause-FreeBSD AND LicenseRef-Fedora-Public-Domain Url: https://developers.hp.com/hp-linux-imaging-and-printing # Original source tarball @@ -960,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jul 28 2023 Zdenek Dohnal - 3.23.5-7 +- SPDX migration + * Thu Jul 27 2023 Zdenek Dohnal - 3.23.5-6 - remove redundant files From 4fa25e28888896651b9ed0f1da239176bd085506 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 28 Jul 2023 14:14:20 +0200 Subject: [PATCH 121/166] Add license upstream tracker --- hplip-repack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hplip-repack.sh b/hplip-repack.sh index 1e3ba10..bd8b624 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -12,7 +12,7 @@ fi # extract the original tarball tar -xaf hplip-$VERSION.tar.gz || exit 1 -# remove unwanted files +# remove unwanted files - license-related ones reported here https://bugs.launchpad.net/hplip/+bug/2028938 rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1 rm hplip-$VERSION/fax/filters/cdmfax/hpcupscdmfax.{cpp,h} hplip-$VERSION/fax/filters/cdmfax/jetlib.{cpp,h} hplip-$VERSION/fax/ppd/HP-Fax-CDM-hpcups.ppd.gz || exit 1 rm hplip-$VERSION/prnt/hpcups/Hbpl1_Wrapper.cpp hplip-$VERSION/prnt/hpcups/genPCLm.{cpp,h} hplip-$VERSION/prnt/hpcups/common_defines.h hplip-$VERSION/prnt/hpcups/genJPEGStrips.cpp hplip-$VERSION/prnt/hpcups/RunLenEncoding.{h,cpp} From 31a7a6c1eec6c62620ace69be2484f1ef68f1b36 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 3 Aug 2023 14:47:42 +0200 Subject: [PATCH 122/166] Fallback to proprietary plugin for Hbpl1 printers Since files for Hbpl1 printers were removed until the licensing is cleared up, try to fall back to proprietary plugin. --- hplip-remove-hbpl.patch | 28 +++++++++++++++++++++++++--- hplip.spec | 13 ++++++++++++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/hplip-remove-hbpl.patch b/hplip-remove-hbpl.patch index fe233e8..a4a28bf 100644 --- a/hplip-remove-hbpl.patch +++ b/hplip-remove-hbpl.patch @@ -16,18 +16,40 @@ index a3be3f1..0c74a12 100644 hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) diff --git a/prnt/hpcups/Hbpl1.cpp b/prnt/hpcups/Hbpl1.cpp -index 74a67f0..4cac4ab 100644 +index 74a67f0..48f5f94 100644 --- a/prnt/hpcups/Hbpl1.cpp +++ b/prnt/hpcups/Hbpl1.cpp -@@ -72,11 +72,6 @@ Hbpl1::Hbpl1 () : Encapsulator () +@@ -60,7 +60,7 @@ Hbpl1::Hbpl1 () : Encapsulator () + m_ColorMode = COLORTYPE_BOTH; //Grayscale + m_ColorTheme = NONE; + +- /*m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1); ++ m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1); + if (m_hHPLibHandle) + { + dlerror (); +@@ -71,12 +71,7 @@ Hbpl1::Hbpl1 () : Encapsulator () + if ((m_pHbpl1Wrapper = fptr_create(this)) == NULL) m_init = false; - }*/ +- }*/ - m_pHbpl1Wrapper = new Hbpl1Wrapper(this); - if(m_pHbpl1Wrapper == NULL) - m_init = false; - else - m_init = true; ++ } } Hbpl1::~Hbpl1() +@@ -93,8 +88,8 @@ Hbpl1::~Hbpl1() + if(fptr_destroy) + fptr_destroy( m_pHbpl1Wrapper ); + +- //unload_library(m_hHPLibHandle); +- //m_hHPLibHandle = NULL; ++ unload_library(m_hHPLibHandle); ++ m_hHPLibHandle = NULL; + } + } + diff --git a/hplip.spec b/hplip.spec index c9928d5..80ca40f 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 7%{?dist} +Release: 8%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP @@ -229,6 +229,7 @@ Patch65: hplip-sclpml-strcasestr.patch # be shared and copied for other than archival purposes without HP permission # - this looks as incompatible conditional for Fedora, so the files are removed, # hplip repacked and this patch removes its mentions in Makefile.am +# https://bugs.launchpad.net/hplip/+bug/2028938 Patch66: hplip-nocdmfilter.patch # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 @@ -242,8 +243,10 @@ Patch68: hplip-plugin-curl.patch # Upstream https://bugs.launchpad.net/hplip/+bug/2028001 Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 +# https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch # more unfriendly licenses... +# https://bugs.launchpad.net/hplip/+bug/2028938 Patch71: hplip-remove-hbpl.patch %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -587,6 +590,8 @@ done %patch -P 64 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE %patch -P 65 -p1 -b .sclpml-strcasestr +# jetlib.h/.c have suspicious license, root them out +# https://bugs.launchpad.net/hplip/+bug/2028938 %patch -P 66 -p1 -b .nocdmfilter # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 @@ -597,7 +602,10 @@ done # 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() # Upstream https://bugs.launchpad.net/hplip/+bug/2028001 %patch -P 69 -p1 -b .no-readfp +# fix warnings +# upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings +# upstream https://bugs.launchpad.net/hplip/+bug/2028938 %patch -P 71 -p1 -b .hbpl # Fedora specific patches now, don't put a generic patches under it @@ -969,6 +977,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Aug 03 2023 Zdenek Dohnal - 3.23.5-8 +- fallback to using external plugin for Hbpl1 printers + * Fri Jul 28 2023 Zdenek Dohnal - 3.23.5-7 - SPDX migration From 606f617bdecb01aab9b0c52e9d1da727244d33ec Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 3 Aug 2023 16:56:06 +0200 Subject: [PATCH 123/166] hp-plugin.in: Add brackets to prevent early exit --- hp-plugin.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hp-plugin.in b/hp-plugin.in index b55f8ac..c6de68a 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -19,7 +19,7 @@ PLUGIN_FILE="hplip-${VER}-plugin.run" # the directory can be used by other hplip tools, so we don't have to remove it if the failure happens if [ ! -d ~/.hplip ] then - @bindir@/mkdir ~/.hplip || @bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1 + @bindir@/mkdir ~/.hplip || (@bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1) fi @bindir@/curl --create-dir -O --output-dir ~/.hplip ${PLUGIN_SOURCE} From 66bf0186242d8c5f43db8596b2d1b404aa781fae Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 24 Aug 2023 16:34:43 +0200 Subject: [PATCH 124/166] hp-check: use pkgconf when checking for cups version --- hplip-check-cups.patch | 15 ++++++++------- hplip.spec | 7 ++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/hplip-check-cups.patch b/hplip-check-cups.patch index 053eb50..e0f1570 100644 --- a/hplip-check-cups.patch +++ b/hplip-check-cups.patch @@ -1,16 +1,17 @@ -diff -up hplip-3.17.11/installer/core_install.py.check-cups hplip-3.17.11/installer/core_install.py ---- hplip-3.17.11/installer/core_install.py.check-cups 2017-12-07 15:34:24.855761874 +0100 -+++ hplip-3.17.11/installer/core_install.py 2017-12-07 15:38:44.749568860 +0100 -@@ -349,9 +349,9 @@ class CoreInstall(object): +diff --git a/installer/core_install.py b/installer/core_install.py +index a6654e2..0bd1e9c 100644 +--- a/installer/core_install.py ++++ b/installer/core_install.py +@@ -362,9 +362,9 @@ class CoreInstall(object): 'automake': (True, ['prnt'], AUTOMAKE_STR, self.check_automake, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP), 'libjpeg': (True, ['base', 'prnt'], JPEG_STR, self.check_libjpeg, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP), 'libtool': (True, ['base', 'prnt'], LIBTOOL_STR, self.check_libtool, DEPENDENCY_COMPILE_TIME, '-', 'libtool --version', COMPILEDEP), - 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'cups-config --version', EXTERNALDEP), - 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP), - 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP), -+ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'lpstat -r', EXTERNALDEP), -+ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP), -+ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP), ++ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '-', None, EXTERNALDEP), ++ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP), ++ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP), 'gcc': (True, ['base', 'prnt'], GCC_STR, self.check_gcc, DEPENDENCY_COMPILE_TIME, '-', 'gcc --version', COMPILEDEP), 'make': (True, ['base', 'prnt'], MAKE_STR, self.check_make, DEPENDENCY_COMPILE_TIME, '3.0', 'make --version', COMPILEDEP), 'libpthread': (True, ['base', 'prnt'], THREAD_STR, self.check_libpthread, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', 'FUNC#get_libpthread_version', GENERALDEP), diff --git a/hplip.spec b/hplip.spec index 80ca40f..73b161b 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 8%{?dist} +Release: 9%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP @@ -364,6 +364,8 @@ BuildRequires: libappstream-glib # for avahi-browse - looks for devices on local network Recommends: avahi-tools Recommends: libsane-hpaio%{?_isa} = %{version}-%{release} +# for hp-check +Recommends: pkgconf Requires: %{name}%{?_isa} = %{version}-%{release} # hpssd.py @@ -977,6 +979,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Aug 24 2023 Zdenek Dohnal - 3.23.5-9 +- hp-check: use pkgconf when checking for cups version + * Thu Aug 03 2023 Zdenek Dohnal - 3.23.5-8 - fallback to using external plugin for Hbpl1 printers From 249ea11cfbee98cbc1cfd0218f32e171f9b00f32 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 11 Sep 2023 13:15:54 +0200 Subject: [PATCH 125/166] SPDX finished review of one license - take it as BSD-2-Clause --- hplip.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 73b161b..41f7b55 100644 --- a/hplip.spec +++ b/hplip.spec @@ -11,13 +11,12 @@ Release: 9%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP -# base/exif.py - BSD-2-Clause-GeneCash/FreeBSD - reported as https://gitlab.com/fedora/legal/fedora-license-data/-/issues/268 # base/ldif.py - unknown python license from python-ldap - reported https://gitlab.com/fedora/legal/fedora-license-data/-/issues/269 # io/*, scan/* - MIT # protocol/discovery/* - LGPL-2.1-or-later # protocol/* - GPL2only # scan/sane/sane.h - Public Domain -License: GPL-2.0-or-later AND MIT AND BSD-3-Clause-HP AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause-FreeBSD AND LicenseRef-Fedora-Public-Domain +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause-HP AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain Url: https://developers.hp.com/hp-linux-imaging-and-printing # Original source tarball From 6d550c7123397d1a6f48deebd5d4af837237ec46 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 3 Oct 2023 16:31:24 +0200 Subject: [PATCH 126/166] SPDX finished review of one license - take it as BSD-2-Clause --- hplip.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hplip.spec b/hplip.spec index 41f7b55..a63e8e6 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,16 +7,17 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.5 -Release: 9%{?dist} +Release: 10%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG -# prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP -# base/ldif.py - unknown python license from python-ldap - reported https://gitlab.com/fedora/legal/fedora-license-data/-/issues/269 +# prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 +# base/exif.py - BSD-2-Clause - reported as https://gitlab.com/fedora/legal/fedora-license-data/-/issues/268 +# base/ldif.py - python-ldap - reported https://gitlab.com/fedora/legal/fedora-license-data/-/issues/269 # io/*, scan/* - MIT # protocol/discovery/* - LGPL-2.1-or-later # protocol/* - GPL2only # scan/sane/sane.h - Public Domain -License: GPL-2.0-or-later AND MIT AND BSD-3-Clause-HP AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause-HP AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain AND python-ldap Url: https://developers.hp.com/hp-linux-imaging-and-printing # Original source tarball @@ -978,6 +979,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Oct 03 2023 Zdenek Dohnal - 3.23.5-10 +- BSD-3-Clause-HP and python-ldap are added into SPDX list + * Thu Aug 24 2023 Zdenek Dohnal - 3.23.5-9 - hp-check: use pkgconf when checking for cups version From b77080962d48dadf95f7499f37b559acb8042007 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 4 Oct 2023 16:43:50 +0200 Subject: [PATCH 127/166] Rebase to 3.23.8 --- .gitignore | 1 + hplip-nocdmfilter.patch | 47 ----------------------------------- hplip-remove-hbpl.patch | 55 ----------------------------------------- hplip-repack.sh | 3 --- hplip.spec | 23 +++++------------ sources | 2 +- 6 files changed, 8 insertions(+), 123 deletions(-) delete mode 100644 hplip-nocdmfilter.patch delete mode 100644 hplip-remove-hbpl.patch diff --git a/.gitignore b/.gitignore index 7899dea..57fc212 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ hplip-3.10.6.tar.gz /hplip-3.22.10-repack.tar.gz /hplip-3.23.3-repack.tar.gz /hplip-3.23.5-repack.tar.gz +/hplip-3.23.8-repack.tar.gz diff --git a/hplip-nocdmfilter.patch b/hplip-nocdmfilter.patch deleted file mode 100644 index ba1806a..0000000 --- a/hplip-nocdmfilter.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index 751c265..a3be3f1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -216,7 +216,7 @@ endif #HPLIP_CLASS_DRIVER - if FAX_BUILD - if !HPLIP_CLASS_DRIVER - faxdir = $(hplipdir)/fax --dist_fax_DATA = fax/fax.py fax/__init__.py fax/coverpages.py fax/pmlfax.py fax/ledmfax.py fax/cdmfax.py fax/soapfax.py fax/ledmsoapfax.py fax/marvellfax.py \ -+dist_fax_DATA = fax/fax.py fax/__init__.py fax/coverpages.py fax/pmlfax.py fax/ledmfax.py fax/soapfax.py fax/ledmsoapfax.py fax/marvellfax.py \ - fax/faxdevice.py fax/filters/pstotiff fax/filters/pstotiff.convs fax/filters/pstotiff.types - fax_filtersdir = $(mimedir) - dist_fax_filters_DATA = fax/filters/pstotiff.convs fax/filters/pstotiff.types -@@ -228,7 +228,7 @@ if HPIJS_INSTALL - dist_hpijsfaxppd_DATA = fax/ppd/HP-Fax-hpijs.ppd.gz fax/ppd/HP-Fax2-hpijs.ppd.gz fax/ppd/HP-Fax3-hpijs.ppd.gz fax/ppd/HP-Fax4-hpijs.ppd.gz - endif # HPIJS_INSTALL - if HPCUPS_INSTALL --dist_hpcupsfaxppd_DATA = fax/ppd/HP-Fax-hpcups.ppd.gz fax/ppd/HP-Fax2-hpcups.ppd.gz fax/ppd/HP-Fax3-hpcups.ppd.gz fax/ppd/HP-Fax4-hpcups.ppd.gz fax/ppd/HP-Fax-CDM-hpcups.ppd.gz -+dist_hpcupsfaxppd_DATA = fax/ppd/HP-Fax-hpcups.ppd.gz fax/ppd/HP-Fax2-hpcups.ppd.gz fax/ppd/HP-Fax3-hpcups.ppd.gz fax/ppd/HP-Fax4-hpcups.ppd.gz - endif # HPCUPS_INSTALL - endif # HPLIP_CLASS_DRIVER - endif # FAX_BUILD -@@ -613,12 +613,6 @@ hpcupsfax_PROGRAMS = hpcupsfax - hpcupsfax_SOURCES = prnt/hpijs/hpcupsfax.cpp prnt/hpijs/hpcupsfax.h common/utils.h common/utils.c - hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage -ldl - --# hpcdmfax --hpcdmfaxdir = $(cupsfilterdir) --hpcdmfax_PROGRAMS = hpcdmfax --hpcdmfax_SOURCES = fax/filters/cdmfax/hpcupscdmfax.cpp fax/filters/cdmfax/hpcupscdmfax.h fax/filters/cdmfax/jetlib.cpp fax/filters/cdmfax/jetlib.h --hpcdmfax_LDADD = libhpip.la -lcups -lcupsimage -ldl -ljpeg -- - endif # HPLIP_CLASS_DRIVER - endif # FAX_BUILD - endif # HPCUPS ONLY -diff --git a/hplip.list.in b/hplip.list.in -index 909f41d..f2b5e47 100644 ---- a/hplip.list.in -+++ b/hplip.list.in -@@ -94,7 +94,6 @@ f 0755 root root $cupsfilter/pstotiff fax/filters/pstotiff - - %if !print_only_exclude - f 0755 root root $cupsfilter/hpcupsfax .libs/hpcupsfax --f 0755 root root $cupsfilter/hpcdmfax .libs/hpcdmfax - %endif - - %if foomatic-drv-install diff --git a/hplip-remove-hbpl.patch b/hplip-remove-hbpl.patch deleted file mode 100644 index a4a28bf..0000000 --- a/hplip-remove-hbpl.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index a3be3f1..0c74a12 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -583,10 +583,8 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp - prnt/hpcups/dj3600ColorMaps.cpp prnt/hpcups/dj3320PrintModes.h \ - prnt/hpcups/dj4100PrintModes.h \ - prnt/hpcups/Hbpl1.cpp prnt/hpcups/Hbpl1.h prnt/hpcups/Hbpl1_Wrapper.h prnt/hpcups/PCLmGenerator.h \ -- prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ -- prnt/hpcups/genPCLm.h \ -- common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ -- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ -+ prnt/hpcups/flate_colorspace.h \ -+ common/utils.c common/utils.h \ - prnt/hpcups/ImageProcessor.h - - hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) -diff --git a/prnt/hpcups/Hbpl1.cpp b/prnt/hpcups/Hbpl1.cpp -index 74a67f0..48f5f94 100644 ---- a/prnt/hpcups/Hbpl1.cpp -+++ b/prnt/hpcups/Hbpl1.cpp -@@ -60,7 +60,7 @@ Hbpl1::Hbpl1 () : Encapsulator () - m_ColorMode = COLORTYPE_BOTH; //Grayscale - m_ColorTheme = NONE; - -- /*m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1); -+ m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1); - if (m_hHPLibHandle) - { - dlerror (); -@@ -71,12 +71,7 @@ Hbpl1::Hbpl1 () : Encapsulator () - - if ((m_pHbpl1Wrapper = fptr_create(this)) == NULL) - m_init = false; -- }*/ -- m_pHbpl1Wrapper = new Hbpl1Wrapper(this); -- if(m_pHbpl1Wrapper == NULL) -- m_init = false; -- else -- m_init = true; -+ } - } - - Hbpl1::~Hbpl1() -@@ -93,8 +88,8 @@ Hbpl1::~Hbpl1() - if(fptr_destroy) - fptr_destroy( m_pHbpl1Wrapper ); - -- //unload_library(m_hHPLibHandle); -- //m_hHPLibHandle = NULL; -+ unload_library(m_hHPLibHandle); -+ m_hHPLibHandle = NULL; - } - } - diff --git a/hplip-repack.sh b/hplip-repack.sh index bd8b624..a67e7ee 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -13,9 +13,6 @@ fi tar -xaf hplip-$VERSION.tar.gz || exit 1 # remove unwanted files - license-related ones reported here https://bugs.launchpad.net/hplip/+bug/2028938 -rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1 -rm hplip-$VERSION/fax/filters/cdmfax/hpcupscdmfax.{cpp,h} hplip-$VERSION/fax/filters/cdmfax/jetlib.{cpp,h} hplip-$VERSION/fax/ppd/HP-Fax-CDM-hpcups.ppd.gz || exit 1 -rm hplip-$VERSION/prnt/hpcups/Hbpl1_Wrapper.cpp hplip-$VERSION/prnt/hpcups/genPCLm.{cpp,h} hplip-$VERSION/prnt/hpcups/common_defines.h hplip-$VERSION/prnt/hpcups/genJPEGStrips.cpp hplip-$VERSION/prnt/hpcups/RunLenEncoding.{h,cpp} rm hplip-$VERSION/locatedriver # compress into a new tarball diff --git a/hplip.spec b/hplip.spec index a63e8e6..1164fa0 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.23.5 -Release: 10%{?dist} +Version: 3.23.8 +Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -224,13 +224,6 @@ Patch64: hplip-pcardext-disable.patch # undefined strcasestr() in sclpml.c - build with _GNU_SOURCE # Submitted upstream: Patch65: hplip-sclpml-strcasestr.patch -# hpcupscdmfilter for faxing requires jetlib header and source files, -# which have copyright note in the header comment, that the files can't -# be shared and copied for other than archival purposes without HP permission -# - this looks as incompatible conditional for Fedora, so the files are removed, -# hplip repacked and this patch removes its mentions in Makefile.am -# https://bugs.launchpad.net/hplip/+bug/2028938 -Patch66: hplip-nocdmfilter.patch # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 Patch67: hplip-fix-parsing-lpstat.patch @@ -245,9 +238,6 @@ Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch -# more unfriendly licenses... -# https://bugs.launchpad.net/hplip/+bug/2028938 -Patch71: hplip-remove-hbpl.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -592,9 +582,6 @@ done %patch -P 64 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE %patch -P 65 -p1 -b .sclpml-strcasestr -# jetlib.h/.c have suspicious license, root them out -# https://bugs.launchpad.net/hplip/+bug/2028938 -%patch -P 66 -p1 -b .nocdmfilter # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 %patch -P 67 -p1 -b .lpstat-parse @@ -607,8 +594,6 @@ done # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings -# upstream https://bugs.launchpad.net/hplip/+bug/2028938 -%patch -P 71 -p1 -b .hbpl # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -864,6 +849,7 @@ find doc/images -type f -exec chmod 644 {} \; %{_cups_serverbin}/backend/hp %{_cups_serverbin}/backend/hpfax # ex-hpijs +%{_cups_serverbin}/filter/hpcdmfax %{_cups_serverbin}/filter/hpcups %{_cups_serverbin}/filter/hpcupsfax %{_cups_serverbin}/filter/hpps @@ -979,6 +965,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Oct 03 2023 Zdenek Dohnal - 3.23.8-1 +- 2239465 - hplip-3.23.8 is available + * Tue Oct 03 2023 Zdenek Dohnal - 3.23.5-10 - BSD-3-Clause-HP and python-ldap are added into SPDX list diff --git a/sources b/sources index 9375c30..7038e4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.5-repack.tar.gz) = 7b16f86f18f77061396c4b70df47ebb2109a07a018fbadac550d873ee3d68edb9c1530fde3fec07ba5702f896243b81a6b9b23c4602953716ffbab7b025bbf86 +SHA512 (hplip-3.23.8-repack.tar.gz) = 07df27ee2389f351c917011c939c221e835bbfe30211bfaa69bbb9b0897bb6cc33ab697b25ac4d614a587be60d96d60b681a51c92e4d8ea60043187275004d2e From f488895f79cc733b151bc49a1d2da2ad9f1ec66d Mon Sep 17 00:00:00 2001 From: Mikhail Gavrilov Date: Mon, 9 Oct 2023 03:13:40 +0500 Subject: [PATCH 128/166] fix --max-time and add follow to redirections --- hplip-plugin-curl.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hplip-plugin-curl.patch b/hplip-plugin-curl.patch index f9ef742..023e528 100644 --- a/hplip-plugin-curl.patch +++ b/hplip-plugin-curl.patch @@ -2,7 +2,7 @@ diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py index 56683fb..031ceec 100755 --- a/installer/pluginhandler.py +++ b/installer/pluginhandler.py -@@ -185,14 +185,14 @@ class PluginHandle(object): +@@ -185,14 +185,16 @@ class PluginHandle(object): if self.__plugin_conf_file.startswith('file://'): status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True) else: @@ -11,7 +11,9 @@ index 56683fb..031ceec 100755 - status, output = utils.run("%s --tries=3 --timeout=60 --output-document=%s %s --cache=off" %(wget, local_conf, self.__plugin_conf_file)) + curl = utils.which("curl", True) + if curl: -+ status, output = utils.run("%s --retry 3 --max-time=10 --output %s %s" %(curl, local_conf, self.__plugin_conf_file)) ++ cmd = "%s --retry 3 --max-time 10 --output %s --location %s" %(curl, local_conf, self.__plugin_conf_file) ++ log.debug(cmd) ++ status, output = utils.run(cmd) if status: log.error("Plugin download failed with error code = %d" %status) return status, url, check_sum From a6c2c2b70b1a7639032f7f695f6dfc9bf53a8577 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 9 Jan 2024 11:20:27 +0100 Subject: [PATCH 129/166] 2252302 - hplip-3.23.12 is available --- .gitignore | 1 + hplip-fix-Wreturn-type-warning.patch | 11 ------ hplip-snprintf-format.patch | 51 ---------------------------- hplip-use-raw-strings.patch | 22 ------------ hplip.spec | 12 +++---- sources | 2 +- 6 files changed, 8 insertions(+), 91 deletions(-) delete mode 100644 hplip-snprintf-format.patch diff --git a/.gitignore b/.gitignore index 57fc212..21ead10 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.3-repack.tar.gz /hplip-3.23.5-repack.tar.gz /hplip-3.23.8-repack.tar.gz +/hplip-3.23.12-repack.tar.gz diff --git a/hplip-fix-Wreturn-type-warning.patch b/hplip-fix-Wreturn-type-warning.patch index e128078..aa40e1a 100644 --- a/hplip-fix-Wreturn-type-warning.patch +++ b/hplip-fix-Wreturn-type-warning.patch @@ -1,14 +1,3 @@ ---- hplip-3.20.3/prnt/hpps/hppsfilter.c.orig 2020-03-25 01:09:51.585129957 +0000 -+++ hplip-3.20.3/prnt/hpps/hppsfilter.c 2020-03-25 01:10:15.610058293 +0000 -@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m - if(ptempbooklet_file == NULL) - { - fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename); -- return 1; -+ return; - } - chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - --- hplip-3.20.3/scan/sane/hpaio.c.orig 2020-03-25 01:24:15.558732638 +0000 +++ hplip-3.20.3/scan/sane/hpaio.c 2020-03-25 02:48:36.097054366 +0000 @@ -406,20 +406,34 @@ extern SANE_Status sane_hpaio_open(SANE_ diff --git a/hplip-snprintf-format.patch b/hplip-snprintf-format.patch deleted file mode 100644 index 21b1530..0000000 --- a/hplip-snprintf-format.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up hplip-3.23.3/protocol/hp_ipp.c.snprintf-format hplip-3.23.3/protocol/hp_ipp.c ---- hplip-3.23.3/protocol/hp_ipp.c.snprintf-format 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/protocol/hp_ipp.c 2023-05-29 14:21:30.872871575 +0200 -@@ -108,10 +108,10 @@ int addCupsPrinter(char *name, char *dev - goto abort; - } - -- if ( info == NULL ) -- snprintf( info,sizeof(info), name ); -+ if ( info == NULL ) -+ info = name; - -- sprintf(printer_uri, "ipp://localhost/printers/%s", name); -+ snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name); - - cupsSetUser("root"); - /* Connect to the HTTP server */ -@@ -514,27 +514,27 @@ int __parsePrinterAttributes(ipp_t *resp - - if ( strcmp(attr_name, "printer-name") == 0 && - val_tag == IPP_TAG_NAME ) { -- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "device-uri") == 0 && - val_tag == IPP_TAG_URI ) { -- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->device_uri, sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-uri-supported") == 0 && - val_tag == IPP_TAG_URI ) { -- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->printer_uri, sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-info") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->info, sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-location") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->location, sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-make-and-model") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->make_model, sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-state") == 0 && - val_tag == IPP_TAG_ENUM ) { diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index afef121..6777903 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -396,25 +396,3 @@ index 98f57fd..1a74d6d 100755 ("To specify the device URI to install:", "-d or --device= (--qt4 mode only)", "option", False), ("Remove printers or faxes instead of setting-up:", "-r or --rm or --remove", "option", False), utils.USAGE_LANGUAGE, -diff --git a/ui5/devmgr_ext.py b/ui5/devmgr_ext.py -index 34b4977..6b7a61e 100644 ---- a/ui5/devmgr_ext.py -+++ b/ui5/devmgr_ext.py -@@ -12,7 +12,7 @@ class Ui_MainWindow_Derived(object): - - self.latest_available_version = latest_available_version - self.Is_autoInstaller_distro = Is_autoInstaller_distro -- if self.latest_available_version is not "": -+ if self.latest_available_version != "": - self.tab_3 = QWidget() - self.tab_3.setObjectName("tab_3") - self.label = QLabel(self.tab_3) -@@ -34,7 +34,7 @@ class Ui_MainWindow_Derived(object): - - def retranslateUi(self, MainWindow): - super(Ui_MainWindow_Derived, self).retranslateUi(MainWindow) -- if self.latest_available_version is not "": -+ if self.latest_available_version != "": - self.label.setText(QApplication.translate("MainWindow", "New version of HPLIP-%s is available"%self.latest_available_version, None)) - self.Tabs.setTabText(self.Tabs.indexOf(self.tab_3), QApplication.translate("MainWindow", "Upgrade", None)) - if self.Is_autoInstaller_distro: diff --git a/hplip.spec b/hplip.spec index 1164fa0..c81a746 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.23.8 +Version: 3.23.12 Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG @@ -199,9 +199,6 @@ Patch57: hplip-plugin-udevissues.patch # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() Patch58: hplip-no-libhpmud-libm-warnings.patch -# hplip 3.22.6 doesn't use the correct arguments for snprintf -# reported as https://bugs.launchpad.net/hplip/+bug/1982185 -Patch59: hplip-snprintf-format.patch Patch60: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: @@ -238,6 +235,7 @@ Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch +Patch71: hplip-hpaio-c99.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -563,8 +561,6 @@ done %patch -P 57 -p1 -b .hpplugin-udevperms # 2080235 - Misleading errors about missing shared libraries when scanning %patch -P 58 -p1 -b .no-libm-libhpmud-warn -# hplip 3.22.6 doesn't use proper arguments for snprintf -%patch -P 59 -p1 -b .snprintf-format %patch -P 60 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: @@ -594,6 +590,7 @@ done # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings +%patch -P 71 -p1 -b .hpaio-c99 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -965,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jan 08 2024 Zdenek Dohnal - 3.23.12-1 +- 2252302 - hplip-3.23.12 is available + * Tue Oct 03 2023 Zdenek Dohnal - 3.23.8-1 - 2239465 - hplip-3.23.8 is available diff --git a/sources b/sources index 7038e4a..c2976ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.8-repack.tar.gz) = 07df27ee2389f351c917011c939c221e835bbfe30211bfaa69bbb9b0897bb6cc33ab697b25ac4d614a587be60d96d60b681a51c92e4d8ea60043187275004d2e +SHA512 (hplip-3.23.12-repack.tar.gz) = 7e4713e5769a59e686aeada778b91ec65a6f8a2e393bd13473fb77be4ef1e1c470ae355b22ffa13f4f2e2353533f6a855b9749a267543d2dfb1f630724fb7100 From d726b77698ed806fb84e482fb40202548095fbe1 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 9 Jan 2024 15:35:15 +0100 Subject: [PATCH 130/166] Fix build with GCC 14 --- hplip-hpaio-gcc14.patch | 114 ++++++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++- 2 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 hplip-hpaio-gcc14.patch diff --git a/hplip-hpaio-gcc14.patch b/hplip-hpaio-gcc14.patch new file mode 100644 index 0000000..f7d195e --- /dev/null +++ b/hplip-hpaio-gcc14.patch @@ -0,0 +1,114 @@ +diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c +index 57d1dde..3475929 100644 +--- a/scan/sane/hpaio.c ++++ b/scan/sane/hpaio.c +@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_ + ResetDeviceList(&DeviceList); + DevDiscovery(localOnly); + *deviceList = (const SANE_Device **)DeviceList; +- SANE_Device*** devList; ++ const SANE_Device*** devList; + orblite_get_devices(devList, localOnly); + + return SANE_STATUS_GOOD; +diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c +index 2eb7aba..4eaa468 100644 +--- a/scan/sane/orblite.c ++++ b/scan/sane/orblite.c +@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint + }, + + // optResolution, // resolution group +@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc + SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint ++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint + }, + + // optMode, // color/depth group +@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint + }, + + // optSource, +@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint + }, + + // optPaperSize, +@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint + }, + + // optPaperSize, +@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc + SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint ++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint + }, + #ifdef NOTDEF + // default template +@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle) + SANE_Auth_Callback authorize; + const SANE_Device *** device_list; + SANE_Bool local_only; ++ void * temp_handle; + + + // Allocate handle, set all handle values to zero +@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle) + if (stat != SANE_STATUS_GOOD) + return stat; + +- stat = g_handle->bb_orblite_open(devicename, &g_handle); ++ temp_handle = g_handle; ++ stat = g_handle->bb_orblite_open(devicename, &temp_handle); ++ g_handle = temp_handle; + if (stat == SANE_STATUS_GOOD) + *handle = g_handle; + diff --git a/hplip.spec b/hplip.spec index c81a746..4dbb361 100644 --- a/hplip.spec +++ b/hplip.spec @@ -235,7 +235,9 @@ Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch -Patch71: hplip-hpaio-c99.patch +# FTBFS GCC 14 +# https://bugs.launchpad.net/hplip/+bug/2048780 +Patch71: hplip-hpaio-gcc14.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -590,7 +592,9 @@ done # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings -%patch -P 71 -p1 -b .hpaio-c99 +# FTBFS GCC 14 +# https://bugs.launchpad.net/hplip/+bug/2048780 +%patch -P 71 -p1 -b .hpaio-gcc14 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 From 187b064062ee720212f6462ff182e2813f432ded Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 19 Jan 2024 09:23:18 +0100 Subject: [PATCH 131/166] add fallback url to hp-plugin-download --- hp-plugin.in | 28 ++++++++++++++++++++++------ hplip.spec | 5 ++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index c6de68a..a125970 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -9,12 +9,20 @@ then exit 1 fi -# link to the plugin -PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${VER}-plugin.run" - # plugin name PLUGIN_FILE="hplip-${VER}-plugin.run" +download() +{ + SOURCE="$1" + + @bindir@/curl --create-dir -O --output-dir ~/.hplip ${SOURCE} +} + +# link to the plugin +PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${PLUGIN_FILE}" +FALLBACK_SOURCE="https://developers.hp.com/sites/default/files/${PLUGIN_FILE}" + # create a hidden hplip dir to store a file indicating the plugin version after successful install # the directory can be used by other hplip tools, so we don't have to remove it if the failure happens if [ ! -d ~/.hplip ] @@ -22,11 +30,19 @@ then @bindir@/mkdir ~/.hplip || (@bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1) fi -@bindir@/curl --create-dir -O --output-dir ~/.hplip ${PLUGIN_SOURCE} +for link in ${PLUGIN_SOURCE} ${FALLBACK_SOURCE} +do + download ${link} -if [ ! -f ~/.hplip/${PLUGIN_FILE} ] + if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "xtext/x-shellscript" + then + break + fi +done + +if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "x" then - @bindir@/echo "The downloaded file does not exist - error during downloading, exiting..." + @bindir@/echo "The downloaded file does not exist or is not a shell script - error during downloading, exiting..." exit 1 fi diff --git a/hplip.spec b/hplip.spec index 4dbb361..4c8ed35 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 1%{?dist} +Release: 2%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 19 2024 Zdenek Dohnal - 3.23.12-2 +- add fallback url to hp-plugin-download + * Mon Jan 08 2024 Zdenek Dohnal - 3.23.12-1 - 2252302 - hplip-3.23.12 is available From 639b6e999f595ca5c5d58bb337b16b34cd3fdfeb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 22:11:36 +0000 Subject: [PATCH 132/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 4c8ed35..1d06126 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 2%{?dist} +Release: 3%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 3.23.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Zdenek Dohnal - 3.23.12-2 - add fallback url to hp-plugin-download From dabcff0237f93f88e260a089ed7d069c2d43ffa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 21:45:51 +0000 Subject: [PATCH 133/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 1d06126..0e06590 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 3%{?dist} +Release: 4%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 3.23.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 3.23.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a13fbe55d3df2dee8a449391171ec2ceb6991aed Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Mar 2024 16:07:00 +0100 Subject: [PATCH 134/166] 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback --- hplip-locale-format.patch | 13 +++++++++++++ hplip.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-locale-format.patch diff --git a/hplip-locale-format.patch b/hplip-locale-format.patch new file mode 100644 index 0000000..32fba1e --- /dev/null +++ b/hplip-locale-format.patch @@ -0,0 +1,13 @@ +diff --git a/base/utils.py b/base/utils.py +index e2de550..55848b8 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -474,7 +474,7 @@ def sort_dict_by_value(d): + + + def commafy(val): +- return locale.format("%s", val, grouping=True) ++ return locale.format_string("%s", val, grouping=True) + + + def format_bytes(s, show_bytes=False): diff --git a/hplip.spec b/hplip.spec index 0e06590..f477533 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 4%{?dist} +Release: 5%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -238,6 +238,9 @@ Patch70: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 Patch71: hplip-hpaio-gcc14.patch +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +Patch72: hplip-locale-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -595,6 +598,9 @@ done # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 %patch -P 71 -p1 -b .hpaio-gcc14 +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +%patch -P 72 -p1 -b .locale-format # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -966,6 +972,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 18 2024 Zdenek Dohnal - 3.23.12-5 +- 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback + * Wed Jan 24 2024 Fedora Release Engineering - 3.23.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d5743e6d63b9d09c92223bbe159ecec5b0338464 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 21 Mar 2024 14:13:55 +0100 Subject: [PATCH 135/166] hp-plugin-download - curl removed --create-dir parameter --- hp-plugin.in | 2 +- hplip.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index a125970..48ab3b9 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,7 +16,7 @@ download() { SOURCE="$1" - @bindir@/curl --create-dir -O --output-dir ~/.hplip ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE} } # link to the plugin diff --git a/hplip.spec b/hplip.spec index f477533..5fb0c82 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 5%{?dist} +Release: 6%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -972,6 +972,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Mar 21 2024 Zdenek Dohnal - 3.23.12-6 +- hp-plugin-download - curl removed --create-dir parameter + * Mon Mar 18 2024 Zdenek Dohnal - 3.23.12-5 - 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback From 0b780c93e6e2bc053010fd9f2ee730c998235815 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 15 Apr 2024 15:09:27 +0200 Subject: [PATCH 136/166] Update gating.yaml --- gating.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/gating.yaml b/gating.yaml index de5c323..3c35f7d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -21,7 +21,5 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional} From 3f33fc6240ae9e4b8aac4b74f0df84f18365248c Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 7 May 2024 17:20:13 +0200 Subject: [PATCH 137/166] Remove additional License tags, merged into one --- hplip.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hplip.spec b/hplip.spec index 5fb0c82..15ceb64 100644 --- a/hplip.spec +++ b/hplip.spec @@ -334,14 +334,12 @@ drivers for HP printers and multi-function peripherals. %package common Summary: Files needed by the HPLIP printer and scanner drivers -License: GPLv2+ %description common Files needed by the HPLIP printer and scanner drivers. %package libs Summary: HPLIP libraries -License: GPLv2+ and MIT Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: python3 @@ -351,7 +349,6 @@ Libraries needed by HPLIP. %if 0%{?rhel} <= 8 || 0%{?fedora} %package gui Summary: HPLIP graphical tools -License: BSD BuildRequires: libappstream-glib # for avahi-browse - looks for devices on local network @@ -372,7 +369,6 @@ HPLIP graphical tools. %package -n libsane-hpaio Summary: SANE driver for scanners in HP's multi-function devices -License: GPLv2+ Requires: sane-backends Requires: %{name}-libs%{?_isa} = %{version}-%{release} From 19b7cb06147db4016bb9ed4dbc9756eb2749abd2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 23 May 2024 13:40:39 +0200 Subject: [PATCH 138/166] plans: fix url --- plans/tier1-internal.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf index 4f7e4b3..0e4d1c9 100644 --- a/plans/tier1-internal.fmf +++ b/plans/tier1-internal.fmf @@ -3,7 +3,7 @@ discover: - name: rhel how: fmf filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/hplip + url: https://pkgs.devel.redhat.com/git/tests/hplip execute: how: tmt adjust: From 48d1741f8d75da563d3d10a855e9ec98c9b3ec5b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 10:31:56 +0200 Subject: [PATCH 139/166] Rebuilt for Python 3.13 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 15ceb64..879db66 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 6%{?dist} +Release: 7%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -968,6 +968,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jun 07 2024 Python Maint - 3.23.12-7 +- Rebuilt for Python 3.13 + * Thu Mar 21 2024 Zdenek Dohnal - 3.23.12-6 - hp-plugin-download - curl removed --create-dir parameter From dbdc2cce2a673564afd55429ea95e655b639205b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 09:21:06 +0000 Subject: [PATCH 140/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 879db66..9e48015 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 7%{?dist} +Release: 8%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -968,6 +968,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 3.23.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 3.23.12-7 - Rebuilt for Python 3.13 From c78ccf59f8cda28f09402350909dbfe0cc2e7011 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 18 Jun 2024 16:31:50 +0200 Subject: [PATCH 141/166] 2292623 - hplip-3.24.4 is available --- .gitignore | 1 + hplip-no-readfp.patch | 26 -------------------------- hplip.spec | 25 +++++++++++-------------- sources | 2 +- 4 files changed, 13 insertions(+), 41 deletions(-) delete mode 100644 hplip-no-readfp.patch diff --git a/.gitignore b/.gitignore index 21ead10..e99ac7f 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.5-repack.tar.gz /hplip-3.23.8-repack.tar.gz /hplip-3.23.12-repack.tar.gz +/hplip-3.24.4-repack.tar.gz diff --git a/hplip-no-readfp.patch b/hplip-no-readfp.patch deleted file mode 100644 index 35108e3..0000000 --- a/hplip-no-readfp.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/base/g.py b/base/g.py -index 0aa0e2e..96b3131 100644 ---- a/base/g.py -+++ b/base/g.py -@@ -128,7 +128,7 @@ class ConfigBase(object): - try: - fp = open(self.filename, "r") - try: -- self.conf.readfp(fp) -+ self.conf.read_file(fp, self.filename) - except configparser.MissingSectionHeaderError: - print("") - log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename) -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index 3110a0f..3761f89 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - - hplip_conf = configparser.ConfigParser() - fp = open("/etc/hp/hplip.conf", "r") -- hplip_conf.readfp(fp) -+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf") - fp.close() - - try: diff --git a/hplip.spec b/hplip.spec index 9e48015..bb82ef9 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.23.12 -Release: 8%{?dist} +Version: 3.24.4 +Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -229,18 +229,15 @@ Patch67: hplip-fix-parsing-lpstat.patch # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # it should not hang. Patch68: hplip-plugin-curl.patch -# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() -# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 -Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 -Patch70: hplip-use-raw-strings.patch +Patch69: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -Patch71: hplip-hpaio-gcc14.patch +Patch70: hplip-hpaio-gcc14.patch # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -Patch72: hplip-locale-format.patch +Patch71: hplip-locale-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -585,18 +582,15 @@ done # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... %patch -P 68 -p1 -b .curl-switch -# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() -# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 -%patch -P 69 -p1 -b .no-readfp # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 -%patch -P 70 -p1 -b .raw-strings +%patch -P 69 -p1 -b .raw-strings # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -%patch -P 71 -p1 -b .hpaio-gcc14 +%patch -P 70 -p1 -b .hpaio-gcc14 # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -%patch -P 72 -p1 -b .locale-format +%patch -P 71 -p1 -b .locale-format # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -968,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 23 2024 Zdenek Dohnal - 3.24.4-1 +- 2292623 - hplip-3.24.4 is available + * Thu Jul 18 2024 Fedora Release Engineering - 3.23.12-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index c2976ff..d883a96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.12-repack.tar.gz) = 7e4713e5769a59e686aeada778b91ec65a6f8a2e393bd13473fb77be4ef1e1c470ae355b22ffa13f4f2e2353533f6a855b9749a267543d2dfb1f630724fb7100 +SHA512 (hplip-3.24.4-repack.tar.gz) = 7a1c0024ec3703a9e36ef50c873c7c959eb0be646e53f517d9234b5a961ef7a7a0a646bc28dee533d3b12583b12f527d5ac2bd457272053ddc4b22e745b57b63 From 46b95935766e634c1809101d431ffda8e192f931 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 06:50:48 +0200 Subject: [PATCH 142/166] Add rpminspect.yaml to waive badfuncs of rpminspect --- rpminspect.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..30264bb --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,10 @@ +--- +badfuncs: + allowed: + # printers usually do not live on networks which would require + # IPv6 due having too many hosts on one network, so it is not + # a priority to have IPv6 support. + # It is reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=2275938 + /usr/lib64/libhpmud.so.*: + - gethostbyname + - inet_addr From 489909d19a621a93c2f96e9a79279d2eefe01bb8 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 08:46:15 +0200 Subject: [PATCH 143/166] rpminspect.yaml: include /usr/lib/ too --- rpminspect.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpminspect.yaml b/rpminspect.yaml index 30264bb..3092346 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -5,6 +5,6 @@ badfuncs: # IPv6 due having too many hosts on one network, so it is not # a priority to have IPv6 support. # It is reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=2275938 - /usr/lib64/libhpmud.so.*: + /usr/lib*/libhpmud.so.*: - gethostbyname - inet_addr From ee555b54afda4badbb5044fa36235460ed3ec111 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 08:50:57 +0200 Subject: [PATCH 144/166] Update plans --- gating.yaml | 6 +++--- plans.fmf | 37 +++++++++++++++++++++++++++++++++++++ plans/public.fmf | 6 ------ plans/tier1-internal.fmf | 12 ------------ 4 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 plans.fmf delete mode 100644 plans/public.fmf delete mode 100644 plans/tier1-internal.fmf diff --git a/gating.yaml b/gating.yaml index 3c35f7d..71d105b 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,7 +4,7 @@ product_versions: decision_context: bodhi_update_push_testing subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional} #Rawhide --- !Policy @@ -13,7 +13,7 @@ product_versions: decision_context: bodhi_update_push_stable subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional} #gating rhel --- !Policy @@ -21,5 +21,5 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} - - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional} diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..deb443d --- /dev/null +++ b/plans.fmf @@ -0,0 +1,37 @@ +/tier1-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier1/internal + +/tier1-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier1/public + +/tier2-tier3-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier2-tier3/internal + +/tier2-tier3-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier2-tier3/public + + +/others-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/others/internal + +/others-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/others/public + diff --git a/plans/public.fmf b/plans/public.fmf deleted file mode 100644 index 8dee615..0000000 --- a/plans/public.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: Test plan that runs all tests from hplip tests repo. -discover: - how: fmf - url: https://src.fedoraproject.org/tests/hplip.git -execute: - how: tmt diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf deleted file mode 100644 index 0e4d1c9..0000000 --- a/plans/tier1-internal.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: CI plan, picks internal Tier1 tests, runs in beakerlib. -discover: - - name: rhel - how: fmf - filter: 'tier: 1' - url: https://pkgs.devel.redhat.com/git/tests/hplip -execute: - how: tmt -adjust: - enabled: false - when: distro == centos-stream or distro == fedora - because: They don't have access to internal repos. From 25bd7772e9e14c4dd71fd472b89b4c162fd58c23 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 06:01:15 +0000 Subject: [PATCH 145/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index bb82ef9..a0db0ff 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 1%{?dist} +Release: 2%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -962,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 3.24.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Jul 23 2024 Zdenek Dohnal - 3.24.4-1 - 2292623 - hplip-3.24.4 is available From b6d5d449574dd35347a4870f70f96b4ec53d4de0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 24 Jan 2025 10:34:06 +0100 Subject: [PATCH 146/166] fix FTBFS (fedora#2340616) --- hplip-gcc15-stdc23.patch | 13 +++++++++++++ hplip.spec | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 hplip-gcc15-stdc23.patch diff --git a/hplip-gcc15-stdc23.patch b/hplip-gcc15-stdc23.patch new file mode 100644 index 0000000..a18f245 --- /dev/null +++ b/hplip-gcc15-stdc23.patch @@ -0,0 +1,13 @@ +diff --git a/scan/sane/ledmi.h b/scan/sane/ledmi.h +index a987c5d..f72847b 100644 +--- a/scan/sane/ledmi.h ++++ b/scan/sane/ledmi.h +@@ -162,7 +162,7 @@ struct ledm_session + int bb_open(struct ledm_session*); + int bb_close(struct ledm_session*); + int bb_get_parameters(struct ledm_session*, SANE_Parameters*, int); +-int bb_is_paper_in_adf(); /* 0 = no paper in adf, 1 = paper in adf, -1 = error */ ++int bb_is_paper_in_adf(struct ledm_session*); /* 0 = no paper in adf, 1 = paper in adf, -1 = error */ + SANE_Status bb_start_scan(struct ledm_session*); + int bb_get_image_data(struct ledm_session*, int); + int bb_end_page(struct ledm_session*, int); diff --git a/hplip.spec b/hplip.spec index a0db0ff..6ef3b80 100644 --- a/hplip.spec +++ b/hplip.spec @@ -238,6 +238,9 @@ Patch70: hplip-hpaio-gcc14.patch # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 Patch71: hplip-locale-format.patch +# function prototype did not specify argument's data types +# https://bugs.launchpad.net/hplip/+bug/2096650 +Patch72: hplip-gcc15-stdc23.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -591,6 +594,8 @@ done # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 %patch -P 71 -p1 -b .locale-format +# https://bugs.launchpad.net/hplip/+bug/2096650 +%patch -P 72 -p1 -b .gcc-strc23 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -962,6 +967,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 24 2025 Zdenek Dohnal - 3.24.4-2 +- fix FTBFS (fedora#2340616) + * Fri Jan 17 2025 Fedora Release Engineering - 3.24.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 690f2e34e856c42477e3fcf589c9513d50446d1f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 11 Feb 2025 11:35:11 +0100 Subject: [PATCH 147/166] Require setup for lp group --- hplip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 6ef3b80..8f09058 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 2%{?dist} +Release: 3%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -316,6 +316,8 @@ Requires: python3-dbus %if 0%{?rhel} <= 8 || 0%{?fedora} Requires: python3-pillow %endif +# user+group lp +Requires: setup # /usr/lib/udev/rules.d Requires: systemd # 1788643 - Fedora minimal does not ship tar by default @@ -967,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Feb 11 2025 Zdenek Dohnal - 3.24.4-3 +- require setup because of lp group + * Fri Jan 24 2025 Zdenek Dohnal - 3.24.4-2 - fix FTBFS (fedora#2340616) From 4a5cbec2d343c943d625d1440a67f3bb5a6e4ff9 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Sat, 1 Mar 2025 17:20:18 +0000 Subject: [PATCH 148/166] curl needs --location to follow redirects In the patch, only one of the curl commands is using the --location argument to direct curl to follow 301 redirects. All curl invocations need to use that argument. Signed-off-by: Brian J. Murrell --- hplip-plugin-curl.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hplip-plugin-curl.patch b/hplip-plugin-curl.patch index 023e528..380ce9b 100644 --- a/hplip-plugin-curl.patch +++ b/hplip-plugin-curl.patch @@ -32,7 +32,7 @@ index 56683fb..031ceec 100755 - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) + curl = utils.which("curl", True) + if curl: -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) - log.debug("wget returned: %d" % status) @@ -43,7 +43,7 @@ index 56683fb..031ceec 100755 src = os.path.join(PLUGIN_FALLBACK_LOCATION, self.__plugin_name) log.info("Plugin is not accessible. Trying to download it from fallback location: [%s]" % src) - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) @@ -52,7 +52,7 @@ index 56683fb..031ceec 100755 status, filename = utils.download_from_network(digsig_url, digsig_file, True) else: - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,digsig_url) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl, self.__plugin_path,digsig_url) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl, self.__plugin_path,digsig_url) log.debug(cmd) status, output = utils.run(cmd) except IOError as e: From b549b17216ae294de8b2740e780800af5e390761 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 3 Mar 2025 14:32:38 +0100 Subject: [PATCH 149/166] enable following links with curl in all use cases (fedora#2349177) --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 8f09058..f3011a5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 3%{?dist} +Release: 4%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -969,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 03 2025 Zdenek Dohnal - 3.24.4-4 +- enable following links with curl in all use cases (fedora#2349177) + * Tue Feb 11 2025 Zdenek Dohnal - 3.24.4-3 - require setup because of lp group From c5b4c3d5cb00abc83f1d0aba435cf167dff539be Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 2 Apr 2025 09:35:29 +0200 Subject: [PATCH 150/166] hp-plugin-download did not follow redirections and was missing '-o' in grep --- hp-plugin.in | 6 +++--- hplip.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index 48ab3b9..1c0a827 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,7 +16,7 @@ download() { SOURCE="$1" - @bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip --location ${SOURCE} } # link to the plugin @@ -34,13 +34,13 @@ for link in ${PLUGIN_SOURCE} ${FALLBACK_SOURCE} do download ${link} - if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "xtext/x-shellscript" + if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep -o 'text/x-shellscript')" = "xtext/x-shellscript" then break fi done -if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "x" +if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep -o 'text/x-shellscript')" = "x" then @bindir@/echo "The downloaded file does not exist or is not a shell script - error during downloading, exiting..." exit 1 diff --git a/hplip.spec b/hplip.spec index f3011a5..bf91d8a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 4%{?dist} +Release: 5%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -969,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 02 2025 Zdenek Dohnal - 3.24.4-5 +- hp-plugin-download did not follow redirections and was missing '-o' in grep + * Mon Mar 03 2025 Zdenek Dohnal - 3.24.4-4 - enable following links with curl in all use cases (fedora#2349177) From ea1621b02f742057f7efbe4cab4b38888e83505a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 2 Apr 2025 17:26:07 +0200 Subject: [PATCH 151/166] Format QDateTime strings in Status History table, elsewhere --- hplip-format-qdatetime.patch | 53 ++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++++++ 2 files changed, 61 insertions(+) create mode 100644 hplip-format-qdatetime.patch diff --git a/hplip-format-qdatetime.patch b/hplip-format-qdatetime.patch new file mode 100644 index 0000000..9517e65 --- /dev/null +++ b/hplip-format-qdatetime.patch @@ -0,0 +1,53 @@ +From 839a216f17ce17a5667eecd54de2a70b1383df2c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Wed, 5 Jan 2022 21:57:06 -0500 +Subject: [PATCH 1/2] Info dlg: Use QDateTime.toString() + +--- + ui5/infodialog.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui5/infodialog.py b/ui5/infodialog.py +index 0de62fb..eaa846d 100644 +--- a/ui5/infodialog.py ++++ b/ui5/infodialog.py +@@ -186,7 +186,7 @@ class InfoDialog(QDialog, Ui_Dialog): + for row, h in enumerate(history): + dt = QDateTime() + dt.setTime_t(int(h.timedate)) +- dt = value_str(dt) ++ dt = value_str(dt.toString()) + + ess = device.queryString(h.event_code, 0) + +-- +2.33.1 + +From f6e7ab1542afe7fbcd2d29b6cb15b97484e3779c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Wed, 5 Jan 2022 21:56:39 -0500 +Subject: [PATCH 2/2] value_str: Handle QDateTime correctly + +--- + ui5/ui_utils.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ui5/ui_utils.py b/ui5/ui_utils.py +index caba339..225ca1c 100644 +--- a/ui5/ui_utils.py ++++ b/ui5/ui_utils.py +@@ -105,7 +105,10 @@ def value_str(data): + if data is None: + return "" + try: +- if not PY3: ++ if PY3: ++ if isinstance(data, QDateTime): ++ data = data.toString() ++ else: + try: + data = data.toString() + except AttributeError as e: +-- +2.33.1 + diff --git a/hplip.spec b/hplip.spec index bf91d8a..bbe9a4e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -241,6 +241,9 @@ Patch71: hplip-locale-format.patch # function prototype did not specify argument's data types # https://bugs.launchpad.net/hplip/+bug/2096650 Patch72: hplip-gcc15-stdc23.patch +# status history table shows unformatted QDateTime values +# https://bugs.launchpad.net/hplip/+bug/1956547 +Patch73: hplip-format-qdatetime.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -598,6 +601,8 @@ done %patch -P 71 -p1 -b .locale-format # https://bugs.launchpad.net/hplip/+bug/2096650 %patch -P 72 -p1 -b .gcc-strc23 +# https://bugs.launchpad.net/hplip/+bug/1956547 +%patch -P 73 -p1 -b .format-qdatetime # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -969,6 +974,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 02 2025 FeRD (Frank Dana) - 3.24.4-5 +- Format QDateTime strings in Status History table, elsewhere + * Wed Apr 02 2025 Zdenek Dohnal - 3.24.4-5 - hp-plugin-download did not follow redirections and was missing '-o' in grep From 8104c07571940e12c97025aeb6a61f5d0d79cf91 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 3 Apr 2025 14:47:14 +0200 Subject: [PATCH 152/166] Use weak rich dependency for hplip-gui --- hplip.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hplip.spec b/hplip.spec index bbe9a4e..125041d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -296,6 +296,10 @@ BuildRequires: sane-backends-devel # macros: %%{_tmpfilesdir}, %%{_udevrulesdir} BuildRequires: systemd +%if 0%{?fedora} || 0%{?rhel} <= 8 +Recommends: (%{name}-gui%{?_isa} = %{version}-%{release} if qt5-qtbase-gui%{?_isa}) +Suggests: hplip-gui +%endif # uses avahi-browse for discovering IPP-over-USB printers Recommends: avahi-tools # 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed @@ -974,6 +978,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.4-5 +- Use weak rich dependency for hplip-gui + * Wed Apr 02 2025 FeRD (Frank Dana) - 3.24.4-5 - Format QDateTime strings in Status History table, elsewhere From f08eed6ffd4dd009c7d80833727e18345fbf2678 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 3 Apr 2025 14:22:17 -0400 Subject: [PATCH 153/166] hp-plugin: Use rpm queryformat to get version Eliminates dependency on gawk. --- hp-plugin.in | 4 ++-- hplip.spec | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index 1c0a827..5bdbab0 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -1,7 +1,7 @@ #!/usr/bin/bash -# get version from base hplip rpm - it is always in the second column -VER=$(@bindir@/rpm -q hplip | @bindir@/awk -F '-' '{print $2}') +# get version from base hplip rpm +VER=$(@bindir@/rpm -q hplip --queryformat='%{version}') if test "x$VER" = "x" then diff --git a/hplip.spec b/hplip.spec index 125041d..4baee16 100644 --- a/hplip.spec +++ b/hplip.spec @@ -313,8 +313,6 @@ Requires: cups # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... Requires: curl -# for bash script acting as hp-plugin (Source7) -Requires: gawk # set require directly to /usr/bin/gpg, because gnupg2 and gnupg ships it, # but gnupg will be deprecated in the future Requires: %{_bindir}/gpg @@ -978,6 +976,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.5-5 +- hp-plugin: Use rpm queryformat to get version (no gawk dependency) + * Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.4-5 - Use weak rich dependency for hplip-gui From 4cfd5e5ec3520d9d9af8c01e25258391effbac5b Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 11 Apr 2025 12:04:43 +0200 Subject: [PATCH 154/166] hplip-3.25.2 is available (fedora#2353147) --- .gitignore | 1 + hplip-covscan.patch | 138 +++++++------- hplip-pcardext-disable.patch | 25 +-- hplip-strncpy.patch | 31 ++-- hplip-use-raw-strings.patch | 339 ++++------------------------------- hplip.spec | 7 +- sources | 2 +- 7 files changed, 131 insertions(+), 412 deletions(-) diff --git a/.gitignore b/.gitignore index e99ac7f..c4e3a17 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.8-repack.tar.gz /hplip-3.23.12-repack.tar.gz /hplip-3.24.4-repack.tar.gz +/hplip-3.25.2-repack.tar.gz diff --git a/hplip-covscan.patch b/hplip-covscan.patch index 6c88581..29384dc 100644 --- a/hplip-covscan.patch +++ b/hplip-covscan.patch @@ -1,6 +1,6 @@ -diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c ---- hplip-3.23.3/common/utils.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/common/utils.c 2023-05-29 13:58:10.969395214 +0200 +diff -up hplip-3.25.2/common/utils.c.covscan hplip-3.25.2/common/utils.c +--- hplip-3.25.2/common/utils.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/common/utils.c 2025-04-11 10:21:58.034950818 +0200 @@ -1,5 +1,9 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE @@ -12,10 +12,10 @@ diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c #include #include #include -diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c ---- hplip-3.23.3/io/hpmud/hpmud.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/hpmud.c 2023-05-29 13:58:10.970395208 +0200 -@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_ +diff -up hplip-3.25.2/io/hpmud/hpmud.c.covscan hplip-3.25.2/io/hpmud/hpmud.c +--- hplip-3.25.2/io/hpmud/hpmud.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/hpmud.c 2025-04-11 10:21:58.035151792 +0200 +@@ -769,6 +769,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_ } strncpy(ds->uri, msp->device[dd].uri, sizeof(ds->uri)); @@ -23,9 +23,9 @@ diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c ds->io_mode = msp->device[dd].io_mode; ds->channel_cnt = msp->device[dd].channel_cnt; ds->mlc_up = msp->device[dd].mlc_up; -diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c ---- hplip-3.23.3/io/hpmud/jd.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/jd.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/jd.c.covscan hplip-3.25.2/io/hpmud/jd.c +--- hplip-3.25.2/io/hpmud/jd.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/jd.c 2025-04-11 10:21:58.035328288 +0200 @@ -31,6 +31,7 @@ #endif @@ -34,9 +34,9 @@ diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c #include "hpmud.h" #include "hpmudi.h" -diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c ---- hplip-3.23.3/io/hpmud/model.c.covscan 2023-05-29 13:58:10.958395279 +0200 -+++ hplip-3.23.3/io/hpmud/model.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/model.c.covscan hplip-3.25.2/io/hpmud/model.c +--- hplip-3.25.2/io/hpmud/model.c.covscan 2025-04-11 10:21:58.023885145 +0200 ++++ hplip-3.25.2/io/hpmud/model.c 2025-04-11 10:21:58.035487541 +0200 @@ -117,6 +117,7 @@ static int ReadConfig() if (rcbuf[0] == '[') { @@ -53,9 +53,9 @@ diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c break; /* done */ } } -diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c ---- hplip-3.23.3/io/hpmud/musb.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/musb.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/musb.c.covscan hplip-3.25.2/io/hpmud/musb.c +--- hplip-3.25.2/io/hpmud/musb.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/musb.c 2025-04-11 10:21:58.035717762 +0200 @@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch len = size-1; /* leave byte for zero termination */ if (len > 2) @@ -65,9 +65,9 @@ diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c ---- hplip-3.23.3/io/hpmud/pp.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/pp.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/pp.c.covscan hplip-3.25.2/io/hpmud/pp.c +--- hplip-3.25.2/io/hpmud/pp.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/pp.c 2025-04-11 10:21:58.035977040 +0200 @@ -632,7 +632,7 @@ static int device_id(int fd, char *buffe len = size-1; /* leave byte for zero termination */ if (len > 2) @@ -77,9 +77,9 @@ diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am ---- hplip-3.23.3/Makefile.am.covscan 2023-05-29 13:58:10.944395361 +0200 -+++ hplip-3.23.3/Makefile.am 2023-05-29 13:58:10.969395214 +0200 +diff -up hplip-3.25.2/Makefile.am.covscan hplip-3.25.2/Makefile.am +--- hplip-3.25.2/Makefile.am.covscan 2025-04-11 10:21:58.010155532 +0200 ++++ hplip-3.25.2/Makefile.am 2025-04-11 10:22:52.826357214 +0200 @@ -3,7 +3,7 @@ # # (c) 2004-2015 Copyright HP Development Company, LP @@ -90,7 +90,7 @@ diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" @@ -310,7 +310,7 @@ dist_pcard_DATA = pcard/__init__.py pcar - pcardextdir = $(pyexecdir) + pcardextdir = $(PYTHONEXECDIR) pcardext_LTLIBRARIES = pcardext.la pcardext_la_LDFLAGS = -module -avoid-version -pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c @@ -107,9 +107,9 @@ diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am libhpipp_la_LDFLAGS = -version-info 0:1:0 libhpipp_la_LIBADD = libhpmud.la -diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c ---- hplip-3.23.3/pcard/fat.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/pcard/fat.c 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/pcard/fat.c.covscan hplip-3.25.2/pcard/fat.c +--- hplip-3.25.2/pcard/fat.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/pcard/fat.c 2025-04-11 10:21:58.036450105 +0200 @@ -519,14 +519,17 @@ int FatFreeSpace(void) int FatDiskAttributes( PHOTO_CARD_ATTRIBUTES * pa ) @@ -139,9 +139,9 @@ diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c cwd.StartSector = ConvertClusterToSector(fa.StartCluster); cwd.CurrSector = cwd.StartSector; cwd.StartCluster = fa.StartCluster; -diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp ---- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/prnt/hpijs/context2.cpp.covscan hplip-3.25.2/prnt/hpijs/context2.cpp +--- hplip-3.25.2/prnt/hpijs/context2.cpp.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/context2.cpp 2025-04-11 10:21:58.036656862 +0200 @@ -1302,6 +1302,7 @@ DRIVER_ERROR PrintContext::SelectDevice if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize)) { @@ -150,9 +150,9 @@ diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/co } thePrinter = pPFI->CreatePrinter (pSS, familyHandle); if (thePrinter->constructor_error != NO_ERROR) -diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hpijs/systemservices.cpp ---- hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan 2023-03-28 09:26:27.000000000 +0200 -+++ hplip-3.23.3/prnt/hpijs/systemservices.cpp 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/prnt/hpijs/systemservices.cpp.covscan hplip-3.25.2/prnt/hpijs/systemservices.cpp +--- hplip-3.25.2/prnt/hpijs/systemservices.cpp.covscan 2025-02-27 13:12:44.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/systemservices.cpp 2025-04-11 10:21:58.036891582 +0200 @@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM IOMode.bDevID =IM.bDevID && IOMode.bDevID; @@ -164,10 +164,10 @@ diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hp } APDK_END_NAMESPACE -diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hppsfilter.c ---- hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/prnt/hpps/hppsfilter.c 2023-05-29 13:58:10.972395197 +0200 -@@ -274,13 +274,13 @@ static void WriteHeader(char **argument) +diff -up hplip-3.25.2/prnt/hpps/hppsfilter.c.covscan hplip-3.25.2/prnt/hpps/hppsfilter.c +--- hplip-3.25.2/prnt/hpps/hppsfilter.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpps/hppsfilter.c 2025-04-11 10:21:58.037072084 +0200 +@@ -329,13 +329,13 @@ static void WriteHeader(char **argument) /* Writing Header Information argument[1] = JOB ID , argument[2]= USERNAME, argument[3] = TITLE */ hpwrite("\x1b%-12345X@PJL JOBNAME=", strlen("\x1b%-12345X@PJL JOBNAME=")); @@ -184,9 +184,9 @@ diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hpps hpwrite(buffer, strlen(buffer)); fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n"); return; -diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h ---- hplip-3.23.3/protocol/hp_ipp.h.covscan 2023-05-29 13:58:10.972395197 +0200 -+++ hplip-3.23.3/protocol/hp_ipp.h 2023-05-29 13:59:03.645085468 +0200 +diff -up hplip-3.25.2/protocol/hp_ipp.h.covscan hplip-3.25.2/protocol/hp_ipp.h +--- hplip-3.25.2/protocol/hp_ipp.h.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/protocol/hp_ipp.h 2025-04-11 10:21:58.037239020 +0200 @@ -168,6 +168,11 @@ HPIPP_RESULT parseResponseHeader(char* h HPIPP_RESULT prepend_http_header(raw_ipp *raw_request,const char *resource); enum HPMUD_RESULT sendUSBRequest(char *buf, int size, raw_ipp *responseptr, char * device_uri); @@ -199,9 +199,9 @@ diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h ipp_t * createFaxDetailRequest(const char *printer_name); ipp_t * getDeviceFaxModemAttributes(char* device_uri,char* printer_name, int *count); -diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm.c ---- hplip-3.23.3/scan/sane/bb_ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/bb_ledm.c 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/bb_ledm.c.covscan hplip-3.25.2/scan/sane/bb_ledm.c +--- hplip-3.25.2/scan/sane/bb_ledm.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/bb_ledm.c 2025-04-11 10:21:58.037378913 +0200 @@ -26,6 +26,7 @@ # include "http.h" # include "xml.h" @@ -210,9 +210,9 @@ diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm # include -diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h ---- hplip-3.23.3/scan/sane/common.h.covscan 2023-05-29 13:58:10.727396637 +0200 -+++ hplip-3.23.3/scan/sane/common.h 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/common.h.covscan hplip-3.25.2/scan/sane/common.h +--- hplip-3.25.2/scan/sane/common.h.covscan 2025-04-11 10:21:57.806326475 +0200 ++++ hplip-3.25.2/scan/sane/common.h 2025-04-11 10:21:58.037532413 +0200 @@ -36,7 +36,7 @@ #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) @@ -222,9 +222,9 @@ diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h #define BUG_DUMP(data, size) bugdump((data), (size)) #define BUG_SZ(args...) {syslog(LOG_ERR, args); DBG(2, args);} -diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c ---- hplip-3.23.3/scan/sane/escl.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/escl.c 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/escl.c.covscan hplip-3.25.2/scan/sane/escl.c +--- hplip-3.25.2/scan/sane/escl.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/escl.c 2025-04-11 10:21:58.037677793 +0200 @@ -849,7 +849,7 @@ SANE_Status escl_control_option(SANE_Han //DBG8("escl_control_option (option=%s) action=%d\n", ps->option[option].name, action); if (stat != SANE_STATUS_GOOD) @@ -243,9 +243,9 @@ diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c return; } -diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c ---- hplip-3.23.3/scan/sane/http.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/http.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/http.c.covscan hplip-3.25.2/scan/sane/http.c +--- hplip-3.25.2/scan/sane/http.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/http.c 2025-04-11 10:21:58.037859247 +0200 @@ -36,6 +36,7 @@ #include #include @@ -254,9 +254,9 @@ diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c #include "hpmud.h" #include "http.h" -diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c ---- hplip-3.23.3/scan/sane/io.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/io.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/io.c.covscan hplip-3.25.2/scan/sane/io.c +--- hplip-3.25.2/scan/sane/io.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/io.c 2025-04-11 10:21:58.037998005 +0200 @@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden" if (dbus_error_is_set(&dbus_err)) @@ -284,9 +284,9 @@ diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c return 0; } -diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c ---- hplip-3.23.3/scan/sane/ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/ledm.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/ledm.c.covscan hplip-3.25.2/scan/sane/ledm.c +--- hplip-3.25.2/scan/sane/ledm.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/ledm.c 2025-04-11 10:21:58.038131991 +0200 @@ -813,7 +813,7 @@ SANE_Status ledm_control_option(SANE_Han if (stat != SANE_STATUS_GOOD) @@ -305,9 +305,9 @@ diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c return; } -diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell.c ---- hplip-3.23.3/scan/sane/marvell.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/marvell.c 2023-05-29 13:58:10.976395173 +0200 +diff -up hplip-3.25.2/scan/sane/marvell.c.covscan hplip-3.25.2/scan/sane/marvell.c +--- hplip-3.25.2/scan/sane/marvell.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/marvell.c 2025-04-11 10:21:58.038309394 +0200 @@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_se if (!ps->ip_handle) @@ -407,9 +407,9 @@ diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell goto bugout; } -diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c ---- hplip-3.23.3/scan/sane/sclpml.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/sclpml.c 2023-05-29 13:58:10.976395173 +0200 +diff -up hplip-3.25.2/scan/sane/sclpml.c.covscan hplip-3.25.2/scan/sane/sclpml.c +--- hplip-3.25.2/scan/sane/sclpml.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/sclpml.c 2025-04-11 10:21:58.038605168 +0200 @@ -30,6 +30,7 @@ #include #include @@ -427,9 +427,9 @@ diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c return; } -diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c ---- hplip-3.23.3/scan/sane/soap.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/soap.c 2023-05-29 13:58:10.977395167 +0200 +diff -up hplip-3.25.2/scan/sane/soap.c.covscan hplip-3.25.2/scan/sane/soap.c +--- hplip-3.25.2/scan/sane/soap.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/soap.c 2025-04-11 10:21:58.038894758 +0200 @@ -142,7 +142,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) @@ -520,9 +520,9 @@ diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c goto bugout; } -diff -up hplip-3.23.3/scan/sane/soapht.c.covscan hplip-3.23.3/scan/sane/soapht.c ---- hplip-3.23.3/scan/sane/soapht.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/soapht.c 2023-05-29 13:58:10.977395167 +0200 +diff -up hplip-3.25.2/scan/sane/soapht.c.covscan hplip-3.25.2/scan/sane/soapht.c +--- hplip-3.25.2/scan/sane/soapht.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/soapht.c 2025-04-11 10:21:58.039106018 +0200 @@ -136,7 +136,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch index adcac1d..342c4d3 100644 --- a/hplip-pcardext-disable.patch +++ b/hplip-pcardext-disable.patch @@ -1,29 +1,12 @@ -The pcardext Python extension cannot be loaded because it has not been -ported to Python 3: - ->>> import pcardext -Traceback (most recent call last): - File "", line 1, in -ImportError: /usr/lib64/python3.11/site-packages/pcardext.so: undefined symbol: PyString_AsStringAndSize ->>> - -Stop building this extension because it breaks the build if the -compiler lacks support for implicit function declarations. - -Bug: - -Submitted upstream: - -diff --git a/Makefile.am b/Makefile.am -index ddac16a9dd514008..15d953af9150c09e 100644 ---- a/Makefile.am -+++ b/Makefile.am +diff -up hplip-3.25.2/Makefile.am.pcardext-disable hplip-3.25.2/Makefile.am +--- hplip-3.25.2/Makefile.am.pcardext-disable 2025-04-11 10:23:29.576593786 +0200 ++++ hplip-3.25.2/Makefile.am 2025-04-11 10:24:08.259842784 +0200 @@ -306,13 +306,6 @@ if !HPLIP_CLASS_DRIVER pcarddir = $(hplipdir)/pcard dist_pcard_DATA = pcard/__init__.py pcard/photocard.py -# pcardext --pcardextdir = $(pyexecdir) +-pcardextdir = $(PYTHONEXECDIR) -pcardext_LTLIBRARIES = pcardext.la -pcardext_la_LDFLAGS = -module -avoid-version -pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h diff --git a/hplip-strncpy.patch b/hplip-strncpy.patch index eac29b8..cbd262d 100644 --- a/hplip-strncpy.patch +++ b/hplip-strncpy.patch @@ -1,7 +1,7 @@ -diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy 2015-01-21 16:52:44.066497631 +0000 -+++ hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp 2015-01-21 16:59:46.216434376 +0000 -@@ -203,6 +203,7 @@ HPCupsFilter::HPCupsFilter() : m_pPrinte +diff -up hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp +--- hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp.strncpy 2025-04-11 10:16:00.438702562 +0200 ++++ hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp 2025-04-11 10:21:25.088096376 +0200 +@@ -211,6 +211,7 @@ HPCupsFilter::HPCupsFilter() : m_pPrinte adj_k_width = 0; black_raster = NULL; color_raster = NULL; @@ -9,7 +9,7 @@ diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/h } HPCupsFilter::~HPCupsFilter() -@@ -384,9 +385,9 @@ DRIVER_ERROR HPCupsFilter::startPage (cu +@@ -428,15 +429,15 @@ DRIVER_ERROR HPCupsFilter::startPage (cu m_JA.media_attributes.physical_height = cups_header->PageSize[1]; m_JA.media_attributes.printable_width = ((cups_header->ImagingBoundingBox[2]-cups_header->ImagingBoundingBox[0]) * horz_res) / 72; m_JA.media_attributes.printable_height = ((cups_header->ImagingBoundingBox[3]-cups_header->ImagingBoundingBox[1]) * vert_res) / 72; @@ -20,11 +20,18 @@ diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/h + strncpy(m_JA.media_attributes.MediaTypeName, cups_header->MediaType, sizeof(m_JA.media_attributes.MediaTypeName)-1); + strncpy(m_JA.quality_attributes.hbpl1_print_quality, cups_header->OutputType, sizeof(m_JA.quality_attributes.hbpl1_print_quality)-1); m_JA.color_mode = cups_header->cupsRowStep; + + if (m_JA.media_attributes.PageSizeName[0] == '\0') { + // Copy the value of cups_header->cupsPageSizeName if it isnot null + if (cups_header->cupsPageSizeName != nullptr) { +- strncpy(m_JA.media_attributes.PageSizeName, cups_header->cupsPageSizeName, sizeof(m_JA.media_attributes.PageSizeName)); ++ strncpy(m_JA.media_attributes.PageSizeName, cups_header->cupsPageSizeName, sizeof(m_JA.media_attributes.PageSizeName) - 1); + } + } } - else { -diff -up hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijs.cpp ---- hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy 2015-01-21 17:00:03.225512410 +0000 -+++ hplip-3.14.10/prnt/hpijs/hpijs.cpp 2015-01-21 17:04:59.308870785 +0000 +diff -up hplip-3.25.2/prnt/hpijs/hpijs.cpp.strncpy hplip-3.25.2/prnt/hpijs/hpijs.cpp +--- hplip-3.25.2/prnt/hpijs/hpijs.cpp.strncpy 2025-04-11 10:16:00.434453252 +0200 ++++ hplip-3.25.2/prnt/hpijs/hpijs.cpp 2025-04-11 10:16:00.501228045 +0200 @@ -605,7 +605,7 @@ int main (int argc, char *argv[], char * } @@ -34,9 +41,9 @@ diff -up hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpi #ifdef HAVE_LIBHPIP char *pDev; -diff -up hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijsfax.cpp ---- hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy 2015-01-21 17:05:06.585904171 +0000 -+++ hplip-3.14.10/prnt/hpijs/hpijsfax.cpp 2015-01-21 17:05:15.787946389 +0000 +diff -up hplip-3.25.2/prnt/hpijs/hpijsfax.cpp.strncpy hplip-3.25.2/prnt/hpijs/hpijsfax.cpp +--- hplip-3.25.2/prnt/hpijs/hpijsfax.cpp.strncpy 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/hpijsfax.cpp 2025-04-11 10:16:00.501403513 +0200 @@ -282,7 +282,7 @@ int hpijsFaxServer (int argc, char **arg char user_name[32]={0,}; diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index 6777903..77d1b87 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -1,7 +1,8 @@ -diff --git a/base/LedmWifi.py b/base/LedmWifi.py -index f63a050..074d5a2 100644 ---- a/base/LedmWifi.py -+++ b/base/LedmWifi.py +diff -up hplip-3.25.2/base/device.py.raw-strings hplip-3.25.2/base/device.py +diff -up hplip-3.25.2/base/g.py.raw-strings hplip-3.25.2/base/g.py +diff -up hplip-3.25.2/base/LedmWifi.py.raw-strings hplip-3.25.2/base/LedmWifi.py +--- hplip-3.25.2/base/LedmWifi.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/base/LedmWifi.py 2025-04-11 10:26:18.519166530 +0200 @@ -31,7 +31,7 @@ from .g import * from . import device, utils from .sixext import to_bytes_utf8 @@ -11,136 +12,12 @@ index f63a050..074d5a2 100644 HTTP_OK = 200 HTTP_ACCEPTED = 202 HTTP_NOCONTENT = 204 -diff --git a/base/device.py b/base/device.py -index fbe6c34..a551403 100644 ---- a/base/device.py -+++ b/base/device.py -@@ -47,7 +47,7 @@ from . import models, mdns, slp, avahi - from .strings import * - from .sixext import PY3, to_bytes_utf8, to_unicode, to_string_latin, to_string_utf8, xStringIO - --http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I) -+http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I) - - HTTP_OK = 200 - HTTP_ERROR = 500 -diff --git a/base/g.py b/base/g.py -index 96b3131..023aeea 100644 ---- a/base/g.py -+++ b/base/g.py -@@ -302,7 +302,7 @@ prop.hpcups_build = to_bool(sys_conf.get('configure', 'hpcups-install', '0')) - prop.hpijs_build = to_bool(sys_conf.get('configure', 'hpijs-install', '0')) - - # Spinner, ala Gentoo Portage --spinner = "\|/-\|/-" -+spinner = r"\|/-\|/-" - spinpos = 0 - enable_spinner = True - -@@ -352,7 +352,7 @@ def check_extension_module_env(ext_mod): - log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod) - sys.exit(1) - -- m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found -+ m = re.search(r'python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found - ext_ver = xint(m.group(1)) - - if ext_ver[0] == 3: -diff --git a/base/logger.py b/base/logger.py -index dd92a9c..68e4f13 100644 ---- a/base/logger.py -+++ b/base/logger.py -@@ -437,10 +437,10 @@ class Logger(object): - start = start + " " - number_chars = number_chars + 1 - try: -- elem_start = re.findall("(\<\W{0,1}\w+) ?", line)[0] -- elem_finished = re.findall("([?|\]\]]*\>)", line)[0] -+ elem_start = re.findall(r"(\<\W{0,1}\w+) ?", line)[0] -+ elem_finished = re.findall(r"([?|\]\]]*\>)", line)[0] - #should not have * -- attrs = re.findall("(\S*?\=\".*?\")", line) -+ attrs = re.findall(r"(\S*?\=\".*?\")", line) - #output.write(start + elem_start) - self.log(start+elem_start, level, False) - number_chars = len(start + elem_start) -diff --git a/base/models.py b/base/models.py -index dc6cc39..48dd2ef 100644 ---- a/base/models.py -+++ b/base/models.py -@@ -35,7 +35,7 @@ except ImportError: - datetime = None - - --pat_prod_num = re.compile("""(\d+)""", re.I) -+pat_prod_num = re.compile(r"""(\d+)""", re.I) - - TYPE_UNKNOWN = 0 - TYPE_STRING = 1 -@@ -427,25 +427,25 @@ class ModelData: - } - - self.RE_FIELD_TYPES = { -- re.compile('^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -- re.compile('^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -- re.compile('^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -- re.compile('^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^model(\d+)', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^model(\d+)', re.IGNORECASE) : TYPE_STR, - } - - self.TYPE_CACHE = {} -diff --git a/base/password.py b/base/password.py -index 259bf82..a4ed107 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -167,8 +167,8 @@ class Password(object): - - elif i == 1: # TIMEOUT - if('true' in cmd and self.__password_prompt_str == ""): # sudo true or su -c "true" -- cb = cb.replace("[", "\[") -- cb = cb.replace("]", "\]") -+ cb = cb.replace("[", r"\[") -+ cb = cb.replace("]", r"\]") - - self.__password_prompt_str = cb - try: -diff --git a/base/queues.py b/base/queues.py -index 0818574..8625f53 100755 ---- a/base/queues.py -+++ b/base/queues.py +diff -up hplip-3.25.2/base/logger.py.raw-strings hplip-3.25.2/base/logger.py +diff -up hplip-3.25.2/base/models.py.raw-strings hplip-3.25.2/base/models.py +diff -up hplip-3.25.2/base/password.py.raw-strings hplip-3.25.2/base/password.py +diff -up hplip-3.25.2/base/queues.py.raw-strings hplip-3.25.2/base/queues.py +--- hplip-3.25.2/base/queues.py.raw-strings 2025-04-11 10:26:18.512773352 +0200 ++++ hplip-3.25.2/base/queues.py 2025-04-11 10:26:18.520514306 +0200 @@ -46,7 +46,7 @@ HPPS = 3 HPOTHER = 4 @@ -159,101 +36,12 @@ index 0818574..8625f53 100755 except AttributeError: desc = '' -diff --git a/base/status.py b/base/status.py -index 37c774e..01f455d 100644 ---- a/base/status.py -+++ b/base/status.py -@@ -1341,7 +1341,7 @@ def MapPJLErrorCode(error_code, str_code=None): - return status_code - - --pjl_code_pat = re.compile("""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) -+pjl_code_pat = re.compile(r"""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) - - - -diff --git a/base/tui.py b/base/tui.py -index 0f90f92..3b36c65 100644 ---- a/base/tui.py -+++ b/base/tui.py -@@ -217,7 +217,7 @@ class ProgressMeter(object): - self.progress = 0 - self.prompt = prompt - self.prev_length = 0 -- self.spinner = "\|/-\|/-*" -+ self.spinner = r"\|/-\|/-*" - self.spinner_pos = 0 - self.max_size = ttysize()[1] - len(prompt) - 25 - self.update(0) -diff --git a/base/utils.py b/base/utils.py -index 2b631ce..2fb57c4 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -148,7 +148,7 @@ def get_cups_systemgroup_list(): - return lis - - try: -- lis = ((re.findall('SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') -+ lis = ((re.findall(r'SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') - except IndexError: - return lis - -@@ -1597,7 +1597,7 @@ def mixin(cls): - # ------------------------- Usage Help - USAGE_OPTIONS = ("[OPTIONS]", "", "heading", False) - USAGE_LOGGING1 = ("Set the logging level:", "-l or --logging=", 'option', False) --USAGE_LOGGING2 = ("", ": none, info\*, error, warn, debug (\*default)", "option", False) -+USAGE_LOGGING2 = ("", r": none, info\*, error, warn, debug (\*default)", "option", False) - USAGE_LOGGING3 = ("Run in debug mode:", "-g (same as option: -ldebug)", "option", False) - USAGE_LOGGING_PLAIN = ("Output plain text only:", "-t", "option", False) - USAGE_ARGS = ("[PRINTER|DEVICE-URI]", "", "heading", False) -@@ -1605,13 +1605,13 @@ USAGE_ARGS2 = ("[PRINTER]", "", "heading", False) - USAGE_DEVICE = ("To specify a device-URI:", "-d or --device=", "option", False) - USAGE_PRINTER = ("To specify a CUPS printer:", "-p or --printer=", "option", False) - USAGE_BUS1 = ("Bus to probe (if device not specified):", "-b or --bus=", "option", False) --USAGE_BUS2 = ("", ": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) -+USAGE_BUS2 = ("", r": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) - USAGE_HELP = ("This help information:", "-h or --help", "option", True) - USAGE_SPACE = ("", "", "space", False) - USAGE_EXAMPLES = ("Examples:", "", "heading", False) - USAGE_NOTES = ("Notes:", "", "heading", False) - USAGE_STD_NOTES1 = ("If device or printer is not specified, the local device bus is probed and the program enters interactive mode.", "", "note", False) --USAGE_STD_NOTES2 = ("If -p\* is specified, the default CUPS printer will be used.", "", "note", False) -+USAGE_STD_NOTES2 = (r"If -p\* is specified, the default CUPS printer will be used.", "", "note", False) - USAGE_SEEALSO = ("See Also:", "", "heading", False) - USAGE_LANGUAGE = ("Set the language:", "--loc= or --lang=. Use --loc=? or --lang=? to see a list of available language codes.", "option", False) - USAGE_LANGUAGE2 = ("Set the language:", "--lang=. Use --lang=? to see a list of available language codes.", "option", False) -@@ -1839,7 +1839,7 @@ encoding: utf8 - - elif typ == 'man': - log.info('.TH "%s" 1 "%s" Linux "User Manuals"' % (crumb, version)) -- log.info(".SH NAME\n%s \- %s" % (crumb, title)) -+ log.info(r".SH NAME\n%s \- %s" % (crumb, title)) - - for line in text_list: - text1, text2, format, trailing_space = line -@@ -1938,7 +1938,7 @@ def unescape(text): - except KeyError: - pass - return text # leave as is -- return re.sub("&#?\w+;", fixup, text) -+ return re.sub(r"&#?\w+;", fixup, text) - - - # Adds HTML or XML character references and entities from a text string -@@ -1991,7 +1991,7 @@ def Is_HPLIP_older_version(installed_version, available_version): - log.debug("HPLIP Installed_version=%s Available_version=%s"%(installed_version,available_version)) - cnt = 0 - Is_older = False -- pat=re.compile('''(\d{1,})([a-z]{1,})''') -+ pat=re.compile(r'''(\d{1,})([a-z]{1,})''') - try: - while cnt or --search=", "option", False), ("", " must be a valid regular expression (not case sensitive)", "option", False), ("Network discovery method:", "-m or --method=: is 'slp'* or 'mdns'.", "option", False), -diff --git a/scan.py b/scan.py -index 0bfa6f5..27b8c2e 100755 ---- a/scan.py -+++ b/scan.py -@@ -249,9 +249,9 @@ try: - extra_options=[utils.USAGE_SPACE, - ("[OPTIONS] (General)", "", "header", False), - ("Scan destinations:", "-s or --dest=", "option", False), -- ("", "where is a comma separated list containing one or more of: 'file'\*, ", "option", False), -+ ("", r"where is a comma separated list containing one or more of: 'file'\*, ", "option", False), - ("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False), -- ("Scan mode:", "-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), -+ ("Scan mode:", r"-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), - ("Scanning resolution:", "-r or --res= or --resolution=", "option", False), - ("", "where 300 is default.", "option", False), - ("Image resize:", "--resize= (min=1%, max=400%, default=100%)", "option", False), -@@ -268,7 +268,7 @@ try: - utils.USAGE_SPACE, - ("[OPTIONS] (Scan area)", "", "header", False), - ("Specify the units for area/box measurements:", "-t or --units=", "option", False), -- ("", "where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), -+ ("", r"where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), - ("Scan area:", "-a,,, or --area=,,,", "option", False), - ("", "Coordinates are relative to the upper left corner of the scan area.", "option", False), - ("", "Units for tlx, tly, brx, and bry are specified by -t/--units (default is 'mm').", "option", False), -diff --git a/setup.py b/setup.py -index 98f57fd..1a74d6d 100755 ---- a/setup.py -+++ b/setup.py +diff -up hplip-3.25.2/scan.py.raw-strings hplip-3.25.2/scan.py +diff -up hplip-3.25.2/setup.py.raw-strings hplip-3.25.2/setup.py +--- hplip-3.25.2/setup.py.raw-strings 2025-04-11 10:26:18.496992045 +0200 ++++ hplip-3.25.2/setup.py 2025-04-11 10:26:18.522775511 +0200 @@ -79,11 +79,11 @@ USAGE = [ (__doc__, "", "name", True), utils.USAGE_SPACE, utils.USAGE_OPTIONS, diff --git a/hplip.spec b/hplip.spec index 4baee16..0d88003 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.24.4 -Release: 5%{?dist} +Version: 3.25.2 +Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -976,6 +976,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Apr 11 2025 Zdenek Dohnal - 3.25.2-1 +- hplip-3.25.2 is available (fedora#2353147) + * Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.5-5 - hp-plugin: Use rpm queryformat to get version (no gawk dependency) diff --git a/sources b/sources index d883a96..9ed256f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.24.4-repack.tar.gz) = 7a1c0024ec3703a9e36ef50c873c7c959eb0be646e53f517d9234b5a961ef7a7a0a646bc28dee533d3b12583b12f527d5ac2bd457272053ddc4b22e745b57b63 +SHA512 (hplip-3.25.2-repack.tar.gz) = 38941d8f624b8edc4a45695151649d18a430177f9b3e257cd969e234ff0f45285a68fa83240727dce411fea961de34b4dc5b46741a48087b77f1e34b48d7d6b1 From ae1776306626781f8a2d0d7e942749a15d84784e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 16 Apr 2025 17:14:15 +0200 Subject: [PATCH 155/166] remove Recommends on hplip-gui due complaint at (fedora#2360020) --- hplip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 0d88003..f57e86c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 1%{?dist} +Release: 2%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -297,7 +297,6 @@ BuildRequires: sane-backends-devel BuildRequires: systemd %if 0%{?fedora} || 0%{?rhel} <= 8 -Recommends: (%{name}-gui%{?_isa} = %{version}-%{release} if qt5-qtbase-gui%{?_isa}) Suggests: hplip-gui %endif # uses avahi-browse for discovering IPP-over-USB printers @@ -976,6 +975,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 16 2025 Zdenek Dohnal - 3.25.2-2 +- remove Recommends on hplip-gui due complaint at (fedora#2360020) + * Fri Apr 11 2025 Zdenek Dohnal - 3.25.2-1 - hplip-3.25.2 is available (fedora#2353147) From f66385472fcf440142e106a2a3203411fcf0785b Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 7 May 2025 10:44:05 +0200 Subject: [PATCH 156/166] hp-plugin failed checksum due usage of different hashes (fedora#2361230) output is not seen after installing plugin (fedora#2361230) --- hplip-plugin-reverthash.patch | 83 +++++++++++++++++++++++++++++++++++ hplip-plugin-stdout.patch | 13 ++++++ hplip.spec | 16 ++++++- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 hplip-plugin-reverthash.patch create mode 100644 hplip-plugin-stdout.patch diff --git a/hplip-plugin-reverthash.patch b/hplip-plugin-reverthash.patch new file mode 100644 index 0000000..006f01e --- /dev/null +++ b/hplip-plugin-reverthash.patch @@ -0,0 +1,83 @@ +diff --git a/base/utils.py b/base/utils.py +index 09a3cb7..137ec72 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -67,11 +67,17 @@ try: + except ImportError: + dbus_avail=False + +-import hashlib ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++except ImportError: ++ import sha # deprecated in 2.6/3.0 + ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + +diff --git a/installer/core_install.py b/installer/core_install.py +index 9a929a4..299b2f4 100644 +--- a/installer/core_install.py ++++ b/installer/core_install.py +@@ -31,10 +31,18 @@ import pwd + import tarfile + import stat + import glob +-import hashlib + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() ++ ++except ImportError: ++ import sha # deprecated in 2.6/3.0 ++ ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + # Local +diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py +index c2e2a94..4ae24e5 100755 +--- a/installer/pluginhandler.py ++++ b/installer/pluginhandler.py +@@ -21,7 +21,6 @@ + + import os + import shutil +-import hashlib + + from base import utils, tui, os_utils, validation, password + from base.g import * +@@ -31,8 +30,17 @@ from base.sixext.moves import configparser + from installer import core_install + + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() ++ ++except ImportError: ++ import sha # deprecated in 2.6/3.0 ++ ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state' diff --git a/hplip-plugin-stdout.patch b/hplip-plugin-stdout.patch new file mode 100644 index 0000000..c8d28a9 --- /dev/null +++ b/hplip-plugin-stdout.patch @@ -0,0 +1,13 @@ +diff --git a/base/os_utils.py b/base/os_utils.py +index 9fa137c..71edcc7 100644 +--- a/base/os_utils.py ++++ b/base/os_utils.py +@@ -37,7 +38,7 @@ def execute(cmd): + try: + # Use shlex.split to safely split the command into arguments + args = shlex.split(cmd) +- result = subprocess.run(args, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) ++ result = subprocess.run(args, check=True) + return result.returncode + except subprocess.CalledProcessError as e: + error_message = "Command failed with return code %d: %s\n%s" % (e.returncode, cmd, e.stderr.decode()) diff --git a/hplip.spec b/hplip.spec index f57e86c..dab37b1 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 2%{?dist} +Release: 3%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -244,6 +244,12 @@ Patch72: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 Patch73: hplip-format-qdatetime.patch +# revert to old hash for now until plugin.conf has newer hashes, +# and make sure we see prompts when installing plugin... +# https://bugs.launchpad.net/hplip/+bug/2110100 +# https://bugs.launchpad.net/hplip/+bug/2110101 +Patch74: hplip-plugin-reverthash.patch +Patch75: hplip-plugin-stdout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -604,6 +610,10 @@ done %patch -P 72 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 %patch -P 73 -p1 -b .format-qdatetime +# https://bugs.launchpad.net/hplip/+bug/2110100 +# https://bugs.launchpad.net/hplip/+bug/2110101 +%patch -P 74 -p1 -b .hashrevert +%patch -P 75 -p1 -b .stdout # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -975,6 +985,10 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed May 07 2025 Zdenek Dohnal - 3.25.2-3 +- hp-plugin failed checksum due usage of different hashes (fedora#2361230) +- output is not seen after installing plugin (fedora#2361230) + * Wed Apr 16 2025 Zdenek Dohnal - 3.25.2-2 - remove Recommends on hplip-gui due complaint at (fedora#2360020) From 61a4f33d3a811f559bfde7f27eade48f16740df5 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 12 May 2025 10:03:00 +0200 Subject: [PATCH 157/166] plugin.conf now looks to use sha256 as well per email comms with HP, drop the revert --- hplip-plugin-reverthash.patch | 83 ----------------------------------- hplip.spec | 12 +++-- 2 files changed, 5 insertions(+), 90 deletions(-) delete mode 100644 hplip-plugin-reverthash.patch diff --git a/hplip-plugin-reverthash.patch b/hplip-plugin-reverthash.patch deleted file mode 100644 index 006f01e..0000000 --- a/hplip-plugin-reverthash.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/base/utils.py b/base/utils.py -index 09a3cb7..137ec72 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -67,11 +67,17 @@ try: - except ImportError: - dbus_avail=False - --import hashlib -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+except ImportError: -+ import sha # deprecated in 2.6/3.0 - -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - -diff --git a/installer/core_install.py b/installer/core_install.py -index 9a929a4..299b2f4 100644 ---- a/installer/core_install.py -+++ b/installer/core_install.py -@@ -31,10 +31,18 @@ import pwd - import tarfile - import stat - import glob --import hashlib - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() -+ -+except ImportError: -+ import sha # deprecated in 2.6/3.0 -+ -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - # Local -diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py -index c2e2a94..4ae24e5 100755 ---- a/installer/pluginhandler.py -+++ b/installer/pluginhandler.py -@@ -21,7 +21,6 @@ - - import os - import shutil --import hashlib - - from base import utils, tui, os_utils, validation, password - from base.g import * -@@ -31,8 +30,17 @@ from base.sixext.moves import configparser - from installer import core_install - - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() -+ -+except ImportError: -+ import sha # deprecated in 2.6/3.0 -+ -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state' diff --git a/hplip.spec b/hplip.spec index dab37b1..2f7eb19 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 3%{?dist} +Release: 4%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -244,11 +244,8 @@ Patch72: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 Patch73: hplip-format-qdatetime.patch -# revert to old hash for now until plugin.conf has newer hashes, -# and make sure we see prompts when installing plugin... -# https://bugs.launchpad.net/hplip/+bug/2110100 +# make sure we see prompts when installing plugin... # https://bugs.launchpad.net/hplip/+bug/2110101 -Patch74: hplip-plugin-reverthash.patch Patch75: hplip-plugin-stdout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -610,9 +607,7 @@ done %patch -P 72 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 %patch -P 73 -p1 -b .format-qdatetime -# https://bugs.launchpad.net/hplip/+bug/2110100 # https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 74 -p1 -b .hashrevert %patch -P 75 -p1 -b .stdout # Fedora specific patches now, don't put a generic patches under it @@ -985,6 +980,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon May 12 2025 Zdenek Dohnal - 3.25.2-4 +- plugin.conf now looks to use sha256 as well per email comms with HP, drop the revert + * Wed May 07 2025 Zdenek Dohnal - 3.25.2-3 - hp-plugin failed checksum due usage of different hashes (fedora#2361230) - output is not seen after installing plugin (fedora#2361230) From 8541ecd6f87ae8863c9fd24f259d4a9daa38596a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 26 May 2025 15:24:43 +0200 Subject: [PATCH 158/166] hp-toolbox shows traceback when closing and there is no HP device (fedora#2360501) --- hplip-gui-close-trace.patch | 24 ++++++++++++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 hplip-gui-close-trace.patch diff --git a/hplip-gui-close-trace.patch b/hplip-gui-close-trace.patch new file mode 100644 index 0000000..39d8f01 --- /dev/null +++ b/hplip-gui-close-trace.patch @@ -0,0 +1,24 @@ +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index 79f8fa8..28a77b3 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -816,6 +816,9 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + + + def updateWindowTitle(self): ++ if self.cur_device is None or self.cur_device_uri is None: ++ return ++ + if self.cur_device.device_type == DEVICE_TYPE_FAX: + self.setWindowTitle(self.__tr("HP Device Manager - %s (Fax)"%self.cur_device.model_ui)) + else: +@@ -1876,6 +1879,9 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + + + def updatePrintControlTab(self): ++ if self.cur_device is None or self.cur_printer is None: ++ return ++ + if self.cur_device.device_type == DEVICE_TYPE_PRINTER: + self.PrintControlPrinterNameLabel.setText(self.__tr("Printer Name:")) + self.groupBox.setTitle(QApplication.translate("MainWindow", "Printer Queue Control", None)) diff --git a/hplip.spec b/hplip.spec index 2f7eb19..9956010 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 4%{?dist} +Release: 5%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -247,6 +247,9 @@ Patch73: hplip-format-qdatetime.patch # make sure we see prompts when installing plugin... # https://bugs.launchpad.net/hplip/+bug/2110101 Patch75: hplip-plugin-stdout.patch +# toolbox shows traceback when button 'close' is clicked on at first dialog +# https://bugs.launchpad.net/hplip/+bug/2111722 +Patch76: hplip-gui-close-trace.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -609,6 +612,8 @@ done %patch -P 73 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2110101 %patch -P 75 -p1 -b .stdout +# https://bugs.launchpad.net/hplip/+bug/2111722 +%patch -P 76 -p1 -b .gui-close-trace # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -980,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon May 26 2025 Zdenek Dohnal - 3.25.2-5 +- hp-toolbox shows traceback when closing and there is no HP device (fedora#2360501) + * Mon May 12 2025 Zdenek Dohnal - 3.25.2-4 - plugin.conf now looks to use sha256 as well per email comms with HP, drop the revert From b1ef7ae35e07387acaa3c9b76e10b8a3ea5c2152 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 22:22:15 +0200 Subject: [PATCH 159/166] Rebuilt for Python 3.14 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 9956010..07f2ece 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 5%{?dist} +Release: 6%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -985,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jun 02 2025 Python Maint - 3.25.2-6 +- Rebuilt for Python 3.14 + * Mon May 26 2025 Zdenek Dohnal - 3.25.2-5 - hp-toolbox shows traceback when closing and there is no HP device (fedora#2360501) From a995e312cb21fcc2c0b58e5c33feba6b60c38978 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 3 Jun 2025 08:11:29 +0200 Subject: [PATCH 160/166] Switch tests to Centos Stream --- plans.fmf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plans.fmf b/plans.fmf index deb443d..f4c2755 100644 --- a/plans.fmf +++ b/plans.fmf @@ -1,37 +1,37 @@ /tier1-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier1/internal /tier1-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier1/public /tier2-tier3-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier2-tier3/internal /tier2-tier3-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier2-tier3/public /others-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/others/internal /others-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/others/public From 73678936ce93c0579ee46011aed32d96aa2844d2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 20 Jun 2025 11:24:48 +0200 Subject: [PATCH 161/166] Remove URLopener Python 3.14 removed URLopener, which is used in hplip as parent class for LocalOpener* classes, and various hplip scripts (hp-setup, hp-plugin) started to traceback after removal. Remove URLopener for now, since at least sanity testing passes without it. --- hplip-no-urlopener.patch | 79 ++++++++++++++++++++++++++++++++++++++++ hplip.spec | 10 ++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 hplip-no-urlopener.patch diff --git a/hplip-no-urlopener.patch b/hplip-no-urlopener.patch new file mode 100644 index 0000000..903fbbc --- /dev/null +++ b/hplip-no-urlopener.patch @@ -0,0 +1,79 @@ +diff --git a/base/device.py b/base/device.py +index 2fdb29c..ca0d97e 100644 +--- a/base/device.py ++++ b/base/device.py +@@ -2526,9 +2526,9 @@ Content-length: %d\r + data = None + + log.debug("Opening: %s" % url2) +- opener = LocalOpener({}) ++ opener = LocalOpener() + try: +- f = opener.open(url2, data) ++ f = opener.open_hp(url2, data) + + except Error: + log.error("Status read failed: %s" % url2) +@@ -2548,7 +2548,7 @@ Content-length: %d\r + try: + url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) + data = self +- opener = LocalOpenerEWS_LEDM({}) ++ opener = LocalOpenerEWS_LEDM() + try: + if footer: + return opener.open_hp(url2, data, footer) +@@ -2563,7 +2563,7 @@ Content-length: %d\r + try: + url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) + data = self +- opener = LocalOpener_LEDM({}) ++ opener = LocalOpener_LEDM() + try: + if footer: + return opener.open_hp(url2, data, footer) +@@ -2580,7 +2580,7 @@ Content-length: %d\r + url="/cdm/supply/v1/suppliesPublic" + url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) + data = self +- opener = LocalOpener_CDM({}) ++ opener = LocalOpener_CDM() + try: + if footer: + return opener.open_hp(url2, data, footer) +@@ -2688,7 +2688,7 @@ Content-length: %d\r + + + # URLs: hp:/usb/HP_LaserJet_3050?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml +-class LocalOpener(urllib_request.URLopener): ++class LocalOpener(): + def open_hp(self, url, dev): + log.debug("open_hp(%s)" % url) + +@@ -2718,7 +2718,7 @@ class LocalOpener(urllib_request.URLopener): + return response#.fp + + # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml +-class LocalOpenerEWS_LEDM(urllib_request.URLopener): ++class LocalOpenerEWS_LEDM(): + def open_hp(self, url, dev, foot=""): + log.debug("open_hp(%s)" % url) + +@@ -2744,7 +2744,7 @@ class LocalOpenerEWS_LEDM(urllib_request.URLopener): + + + # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml +-class LocalOpener_LEDM(urllib_request.URLopener): ++class LocalOpener_LEDM(): + def open_hp(self, url, dev, foot=""): + log.debug("open_hp(%s)" % url) + +@@ -2771,7 +2771,7 @@ class LocalOpener_LEDM(urllib_request.URLopener): + + + # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml +-class LocalOpener_CDM(urllib_request.URLopener): ++class LocalOpener_CDM(): + def open_hp(self, url, dev, foot=""): + log.debug("open_hp(%s)" % url) + match_obj = http_pat_url.search(url) diff --git a/hplip.spec b/hplip.spec index 07f2ece..80334d0 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 6%{?dist} +Release: 7%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -250,6 +250,9 @@ Patch75: hplip-plugin-stdout.patch # toolbox shows traceback when button 'close' is clicked on at first dialog # https://bugs.launchpad.net/hplip/+bug/2111722 Patch76: hplip-gui-close-trace.patch +# Python 3.14 removed urlopener +# https://bugs.launchpad.net/hplip/+bug/2115046 +Patch77: hplip-no-urlopener.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -614,6 +617,8 @@ done %patch -P 75 -p1 -b .stdout # https://bugs.launchpad.net/hplip/+bug/2111722 %patch -P 76 -p1 -b .gui-close-trace +# https://bugs.launchpad.net/hplip/+bug/2115046 +%patch -P 77 -p1 -b .no-urlopener # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -985,6 +990,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jun 19 2025 Zdenek Dohnal - 3.25.2-7 +- Python 3.14 removed URLopener + * Mon Jun 02 2025 Python Maint - 3.25.2-6 - Rebuilt for Python 3.14 From 5ad054fcdb04a8adabd112aa4ab0ec6b14d2364c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:04:43 +0000 Subject: [PATCH 162/166] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 80334d0..9fbf105 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 7%{?dist} +Release: 8%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -990,6 +990,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 3.25.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jun 19 2025 Zdenek Dohnal - 3.25.2-7 - Python 3.14 removed URLopener From 01d1e50f44f87ee2ac1d0f3a7629c562631b69ae Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 12 Aug 2025 13:31:19 +0200 Subject: [PATCH 163/166] hplip-3.25.6 is available (fedora#2386814) --- .gitignore | 1 + hplip-pcardext-disable.patch | 9 +++-- hplip-plugin-stdout.patch | 13 ------- hplip.spec | 73 ++++++++++++++++-------------------- sources | 2 +- 5 files changed, 40 insertions(+), 58 deletions(-) delete mode 100644 hplip-plugin-stdout.patch diff --git a/.gitignore b/.gitignore index c4e3a17..89da7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.12-repack.tar.gz /hplip-3.24.4-repack.tar.gz /hplip-3.25.2-repack.tar.gz +/hplip-3.25.6-repack.tar.gz diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch index 342c4d3..158379d 100644 --- a/hplip-pcardext-disable.patch +++ b/hplip-pcardext-disable.patch @@ -1,12 +1,13 @@ -diff -up hplip-3.25.2/Makefile.am.pcardext-disable hplip-3.25.2/Makefile.am ---- hplip-3.25.2/Makefile.am.pcardext-disable 2025-04-11 10:23:29.576593786 +0200 -+++ hplip-3.25.2/Makefile.am 2025-04-11 10:24:08.259842784 +0200 -@@ -306,13 +306,6 @@ if !HPLIP_CLASS_DRIVER +diff -up hplip-3.25.6/Makefile.am.pcardext-disable hplip-3.25.6/Makefile.am +--- hplip-3.25.6/Makefile.am.pcardext-disable 2025-08-11 12:52:35.359621088 +0200 ++++ hplip-3.25.6/Makefile.am 2025-08-11 12:54:58.654515582 +0200 +@@ -306,14 +306,6 @@ if !HPLIP_CLASS_DRIVER pcarddir = $(hplipdir)/pcard dist_pcard_DATA = pcard/__init__.py pcard/photocard.py -# pcardext -pcardextdir = $(PYTHONEXECDIR) +-pcardextdir = $(PYTHONEXECDIR) -pcardext_LTLIBRARIES = pcardext.la -pcardext_la_LDFLAGS = -module -avoid-version -pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h diff --git a/hplip-plugin-stdout.patch b/hplip-plugin-stdout.patch deleted file mode 100644 index c8d28a9..0000000 --- a/hplip-plugin-stdout.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/os_utils.py b/base/os_utils.py -index 9fa137c..71edcc7 100644 ---- a/base/os_utils.py -+++ b/base/os_utils.py -@@ -37,7 +38,7 @@ def execute(cmd): - try: - # Use shlex.split to safely split the command into arguments - args = shlex.split(cmd) -- result = subprocess.run(args, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -+ result = subprocess.run(args, check=True) - return result.returncode - except subprocess.CalledProcessError as e: - error_message = "Command failed with return code %d: %s\n%s" % (e.returncode, cmd, e.stderr.decode()) diff --git a/hplip.spec b/hplip.spec index 9fbf105..24f7071 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.25.2 -Release: 8%{?dist} +Version: 3.25.6 +Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -199,60 +199,54 @@ Patch57: hplip-plugin-udevissues.patch # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() Patch58: hplip-no-libhpmud-libm-warnings.patch -Patch60: hplip-plugin-script.patch +Patch59: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -Patch61: hplip-pserror-c99.patch +Patch60: hplip-pserror-c99.patch # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -Patch62: hplip-scan-hpaio-include.patch +Patch61: hplip-scan-hpaio-include.patch # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -Patch63: hplip-scan-orblite-c99.patch +Patch62: hplip-scan-orblite-c99.patch # C99 compatibility patch by fweimer: # PyString_AsStringAndSize is removed in Python3, remove its compilation for now # in case there is a request for compiling it again, there is a possible solution # for the function py3 alternative https://opendev.org/openstack/pyeclib/commit/19c8313986 # - disabling removes hp-unload and /usr/share/hplip/pcard as well # Submitted upstream: -Patch64: hplip-pcardext-disable.patch +Patch63: hplip-pcardext-disable.patch # undefined strcasestr() in sclpml.c - build with _GNU_SOURCE # Submitted upstream: -Patch65: hplip-sclpml-strcasestr.patch +Patch64: hplip-sclpml-strcasestr.patch # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 -Patch67: hplip-fix-parsing-lpstat.patch +Patch65: hplip-fix-parsing-lpstat.patch # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # it should not hang. -Patch68: hplip-plugin-curl.patch +Patch66: hplip-plugin-curl.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 -Patch69: hplip-use-raw-strings.patch +Patch67: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -Patch70: hplip-hpaio-gcc14.patch +Patch68: hplip-hpaio-gcc14.patch # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -Patch71: hplip-locale-format.patch +Patch69: hplip-locale-format.patch # function prototype did not specify argument's data types # https://bugs.launchpad.net/hplip/+bug/2096650 -Patch72: hplip-gcc15-stdc23.patch +Patch70: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 -Patch73: hplip-format-qdatetime.patch -# make sure we see prompts when installing plugin... -# https://bugs.launchpad.net/hplip/+bug/2110101 -Patch75: hplip-plugin-stdout.patch -# toolbox shows traceback when button 'close' is clicked on at first dialog -# https://bugs.launchpad.net/hplip/+bug/2111722 -Patch76: hplip-gui-close-trace.patch +Patch71: hplip-format-qdatetime.patch # Python 3.14 removed urlopener # https://bugs.launchpad.net/hplip/+bug/2115046 -Patch77: hplip-no-urlopener.patch +Patch72: hplip-no-urlopener.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -577,48 +571,44 @@ done %patch -P 57 -p1 -b .hpplugin-udevperms # 2080235 - Misleading errors about missing shared libraries when scanning %patch -P 58 -p1 -b .no-libm-libhpmud-warn -%patch -P 60 -p1 -b .plugin-patch +%patch -P 59 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -%patch -P 61 -p1 -b .pserror-int +%patch -P 60 -p1 -b .pserror-int # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -%patch -P 62 -p1 -b .hpaio-orblite-defs +%patch -P 61 -p1 -b .hpaio-orblite-defs # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -%patch -P 63 -p1 -b .orblite-undefs +%patch -P 62 -p1 -b .orblite-undefs # C99 compatibility patch by fweimer - python2 PyString_AsStringAndSize in python3 code # gives undefined reference - removed for now with dependent hp-unload -%patch -P 64 -p1 -b .pcardext-disable +%patch -P 63 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE -%patch -P 65 -p1 -b .sclpml-strcasestr +%patch -P 64 -p1 -b .sclpml-strcasestr # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 -%patch -P 67 -p1 -b .lpstat-parse +%patch -P 65 -p1 -b .lpstat-parse # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... -%patch -P 68 -p1 -b .curl-switch +%patch -P 66 -p1 -b .curl-switch # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 -%patch -P 69 -p1 -b .raw-strings +%patch -P 67 -p1 -b .raw-strings # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -%patch -P 70 -p1 -b .hpaio-gcc14 +%patch -P 68 -p1 -b .hpaio-gcc14 # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -%patch -P 71 -p1 -b .locale-format +%patch -P 69 -p1 -b .locale-format # https://bugs.launchpad.net/hplip/+bug/2096650 -%patch -P 72 -p1 -b .gcc-strc23 +%patch -P 70 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 -%patch -P 73 -p1 -b .format-qdatetime -# https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 75 -p1 -b .stdout -# https://bugs.launchpad.net/hplip/+bug/2111722 -%patch -P 76 -p1 -b .gui-close-trace +%patch -P 71 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2115046 -%patch -P 77 -p1 -b .no-urlopener +%patch -P 72 -p1 -b .no-urlopener # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -990,6 +980,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Aug 12 2025 Zdenek Dohnal - 3.25.6-1 +- hplip-3.25.6 is available (fedora#2386814) + * Thu Jul 24 2025 Fedora Release Engineering - 3.25.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 9ed256f..3eebca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.25.2-repack.tar.gz) = 38941d8f624b8edc4a45695151649d18a430177f9b3e257cd969e234ff0f45285a68fa83240727dce411fea961de34b4dc5b46741a48087b77f1e34b48d7d6b1 +SHA512 (hplip-3.25.6-repack.tar.gz) = 1b431142e2516e383d5fcbaa1487c5a680b60a409bec02de4526ac82d2a88a4b2b28f3813740ae8f7f32f02d058ae6e986efc8e57a30d1c560132dc4014b87b4 From 334237ac687d516e55b7d3819a58ff2314f09798 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 17 Sep 2025 14:01:58 +0200 Subject: [PATCH 164/166] hp-scan command failed to run and gives an error (fedora#2395809) --- hplip-scan-size.patch | 37 +++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++++++++ 2 files changed, 45 insertions(+) create mode 100644 hplip-scan-size.patch diff --git a/hplip-scan-size.patch b/hplip-scan-size.patch new file mode 100644 index 0000000..1ff8cb3 --- /dev/null +++ b/hplip-scan-size.patch @@ -0,0 +1,37 @@ +diff --git a/scan.py b/scan.py +index b262ef2..cb0ffc1 100755 +--- a/scan.py ++++ b/scan.py +@@ -83,7 +83,7 @@ edge_erase_value = 0 + contrast = 0 + set_contrast = False + +-page_size = '' ++page_size = 'a4' + size_desc = '' + page_units = 'mm' + default_res = 300 +@@ -1615,7 +1615,7 @@ try: + else: + im = im.convert("RGB") + +- #im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[size],res) ++ #im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[page_size],res) + if barcode_count>0: + if barcode_first_occurence == True: + if barcode_first_page == False: +@@ -1718,12 +1718,12 @@ try: + #so that the output image size matches with the input scan area + #for Flatbad + if im: +- im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[size],res) ++ im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[page_size],res) + """ + #for ADF + for Image_file in adf_page_files: + image = Image.open(Image_file) +- resized_image = imageprocessing.resize_to_scan_area(image,PAGE_SIZES[size],res) ++ resized_image = imageprocessing.resize_to_scan_area(image,PAGE_SIZES[page_size],res) + resized_image.save(Image_file) + """ + if adf and (save_file =='jpg' or save_file == 'png' or save_file == 'tiff' or save_file == 'pdf' or save_file == 'bmp'): diff --git a/hplip.spec b/hplip.spec index 24f7071..f7d6bdd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -247,6 +247,9 @@ Patch71: hplip-format-qdatetime.patch # Python 3.14 removed urlopener # https://bugs.launchpad.net/hplip/+bug/2115046 Patch72: hplip-no-urlopener.patch +# hp-scan command failed to run and gives an error (fedora#2395809) +# https://bugs.launchpad.net/hplip/+bug/2124268 +Patch73: hplip-scan-size.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -609,6 +612,8 @@ done %patch -P 71 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2115046 %patch -P 72 -p1 -b .no-urlopener +# https://bugs.launchpad.net/hplip/+bug/2124268 +%patch -P 73 -p1 -b .scan-size # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -980,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Sep 17 2025 Zdenek Dohnal - 3.25.6-1 +- hp-scan command failed to run and gives an error (fedora#2395809) + * Tue Aug 12 2025 Zdenek Dohnal - 3.25.6-1 - hplip-3.25.6 is available (fedora#2386814) From be70bd6792c1b3d232805da4c8678273e2ddf7c6 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 17 Sep 2025 14:08:07 +0200 Subject: [PATCH 165/166] Use new HP GPG key for plugin validation HP now uses new key pair for signing plugin tarball as fix for CVE-2025-43023, but hplip code was still downloading the old one, thus validation always failed. --- hplip-new-gpg-key.patch | 13 +++++++++++++ hplip.spec | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 hplip-new-gpg-key.patch diff --git a/hplip-new-gpg-key.patch b/hplip-new-gpg-key.patch new file mode 100644 index 0000000..4aa433b --- /dev/null +++ b/hplip-new-gpg-key.patch @@ -0,0 +1,13 @@ +diff --git a/base/validation.py b/base/validation.py +index 23645c6..a8e3253 100644 +--- a/base/validation.py ++++ b/base/validation.py +@@ -45,7 +45,7 @@ class GPG_Verification(DigiSign_Verification): + def __init__(self, keyservers = ['keyserver.ubuntu.com', + 'pgp.surf.nl', + 'pgp.mit.edu'], +- key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): ++ key = 0x82FFA7C6AA7411D934BDE173AC69536A2CF3A243): + self.__keyservers = keyservers + self.__key = key + self.__gpg = utils.which('gpg',True) diff --git a/hplip.spec b/hplip.spec index f7d6bdd..6fb946e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -250,6 +250,9 @@ Patch72: hplip-no-urlopener.patch # hp-scan command failed to run and gives an error (fedora#2395809) # https://bugs.launchpad.net/hplip/+bug/2124268 Patch73: hplip-scan-size.patch +# HP uses new GPG key, but hplip code does not use it +# https://developers.hp.com/hp-linux-imaging-and-printing/hplipDigitalCertificate.html +Patch74: hplip-new-gpg-key.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -614,6 +617,8 @@ done %patch -P 72 -p1 -b .no-urlopener # https://bugs.launchpad.net/hplip/+bug/2124268 %patch -P 73 -p1 -b .scan-size +# Use new GPG key from Ubuntu keyserver +%patch -P 74 -p1 -b .new-gpg-key # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -987,6 +992,7 @@ find doc/images -type f -exec chmod 644 {} \; %changelog * Wed Sep 17 2025 Zdenek Dohnal - 3.25.6-1 - hp-scan command failed to run and gives an error (fedora#2395809) +- use new GPG key from HP - new key was used as fix for CVE-2025-43023 * Tue Aug 12 2025 Zdenek Dohnal - 3.25.6-1 - hplip-3.25.6 is available (fedora#2386814) From 075cac0afbd6516bdd9adef4eece7870c62d1e72 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 9 Jan 2026 13:04:20 +0100 Subject: [PATCH 166/166] hplip-3.25.8 is available (fedora#2415311) --- .gitignore | 1 + hplip-add-ppd-crash.patch | 13 ------------ hplip-keyserver.patch | 44 --------------------------------------- hplip-new-gpg-key.patch | 13 ------------ hplip-plugin-stdout.patch | 41 ++++++++++++++++++++++++++++++++++++ hplip.spec | 19 +++++++++++------ sources | 2 +- 7 files changed, 56 insertions(+), 77 deletions(-) delete mode 100644 hplip-new-gpg-key.patch create mode 100644 hplip-plugin-stdout.patch diff --git a/.gitignore b/.gitignore index 89da7d2..00397c1 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,4 @@ hplip-3.10.6.tar.gz /hplip-3.24.4-repack.tar.gz /hplip-3.25.2-repack.tar.gz /hplip-3.25.6-repack.tar.gz +/hplip-3.25.8-repack.tar.gz diff --git a/hplip-add-ppd-crash.patch b/hplip-add-ppd-crash.patch index 798630a..beb070d 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -1,16 +1,3 @@ -diff -up hplip-3.23.3/setup.py.add-ppd-crash hplip-3.23.3/setup.py ---- hplip-3.23.3/setup.py.add-ppd-crash 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/setup.py 2023-05-29 13:55:03.443497903 +0200 -@@ -553,6 +553,9 @@ else: # INTERACTIVE_MODE - - if file_path.endswith('.gz'): - nickname = gzip.GzipFile(file_path, 'r').read(4096) -+ if sys.version_info[0] > 2: -+ nickname = nickname.decode('utf-8') -+ - else: - nickname = open(file_path, 'r').read(4096) - diff -up hplip-3.23.3/ui5/setupdialog.py.add-ppd-crash hplip-3.23.3/ui5/setupdialog.py --- hplip-3.23.3/ui5/setupdialog.py.add-ppd-crash 2023-05-29 13:55:03.443497903 +0200 +++ hplip-3.23.3/ui5/setupdialog.py 2023-05-29 13:57:19.014700721 +0200 diff --git a/hplip-keyserver.patch b/hplip-keyserver.patch index 9b457f1..c525503 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -10,47 +10,3 @@ index 99bda7b..0f90f92 100644 self.prev_length = len(y) self.spinner_pos = (self.spinner_pos + 1) % 8 -diff --git a/base/validation.py b/base/validation.py -index ee6b05a..5e955dc 100644 ---- a/base/validation.py -+++ b/base/validation.py -@@ -42,8 +42,11 @@ class DigiSign_Verification(object): - - - class GPG_Verification(DigiSign_Verification): -- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): -- self.__pgp_site = pgp_site -+ def __init__(self, keyservers = ['keyserver.ubuntu.com', -+ 'pgp.surf.nl', -+ 'pgp.mit.edu'], -+ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): -+ self.__keyservers = keyservers - self.__key = key - self.__gpg = utils.which('gpg',True) - -@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verification): - - - def __acquire_gpg_key(self): -- -- cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \ -- % (self.__gpg, self.__gpg_dir, self.__pgp_site, self.__key) -- -- log.info("Receiving digital keys: %s" % cmd) -- status, output = utils.run(cmd) -- log.debug(output) -+ for kserver in self.__keyservers: -+ cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \ -+ % (self.__gpg, self.__gpg_dir, kserver, self.__key) -+ -+ log.info("Receiving digital keys: %s" % cmd) -+ status, output = utils.run(cmd) -+ log.debug(output) -+ -+ if not status: -+ break -+ log.info("Receiving keys from {} failed, trying the next keyserver." -+ .format(kserver)) - - self.__change_owner(True) - diff --git a/hplip-new-gpg-key.patch b/hplip-new-gpg-key.patch deleted file mode 100644 index 4aa433b..0000000 --- a/hplip-new-gpg-key.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/validation.py b/base/validation.py -index 23645c6..a8e3253 100644 ---- a/base/validation.py -+++ b/base/validation.py -@@ -45,7 +45,7 @@ class GPG_Verification(DigiSign_Verification): - def __init__(self, keyservers = ['keyserver.ubuntu.com', - 'pgp.surf.nl', - 'pgp.mit.edu'], -- key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9): -+ key = 0x82FFA7C6AA7411D934BDE173AC69536A2CF3A243): - self.__keyservers = keyservers - self.__key = key - self.__gpg = utils.which('gpg',True) diff --git a/hplip-plugin-stdout.patch b/hplip-plugin-stdout.patch new file mode 100644 index 0000000..92f8016 --- /dev/null +++ b/hplip-plugin-stdout.patch @@ -0,0 +1,41 @@ +diff --git a/base/os_utils.py b/base/os_utils.py +index 82a8b42..d918822 100644 +--- a/base/os_utils.py ++++ b/base/os_utils.py +@@ -26,6 +26,7 @@ import locale + import stat + import subprocess + import shlex ++import sys + + #Local + from . import logger +@@ -37,17 +38,22 @@ def execute(cmd): + try: + # Use shlex.split to safely split the command into arguments + args = shlex.split(cmd) +- process = subprocess.Popen(args,stdout=subprocess.PIPE, stderr=subprocess.PIPE) ++ process = subprocess.Popen(args,stdout=sys.stdout, stderr=sys.stderr, stdin=sys.stdin) + process.wait() + stdout, stderr = process.communicate() +- log.debug(f"Command executed: {cmd}\n{stdout.decode()}") ++ ++ log.debug(f"Command executed: {cmd}{f'\n{stdout.decode()}' if stdout else ''}") ++ + if process.returncode != 0: +- error_message = f"Command failed with return code {process.returncode}: {cmd}\n{stderr.decode()}" +- log.error(error_message) ++ log.error(f"Command failed with return code" \ ++ f"{process.returncode}: {cmd}" \ ++ f"{f'\n{stderr.decode()}' if stderr else ''}") ++ + return process.returncode + except subprocess.CalledProcessError as e: +- error_message = f"Command failed with return code {e.returncode}: {cmd}\n{e.stderr.decode()}" +- log.error(error_message) ++ log.error(f"Command failed with return code" \ ++ f"{e.returncode}: {cmd}" \ ++ f"{f'\n{e.stderr.decode()}' if e.stderr else ''}") + return e.returncode + except Exception as e: + log.error(f"Error executing command: {cmd}\n{str(e)}") diff --git a/hplip.spec b/hplip.spec index 6fb946e..d6b78cd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.25.6 +Version: 3.25.8 Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG @@ -76,6 +76,8 @@ Patch30: hplip-hpfax-importerror-print.patch Patch31: hplip-wifisetup.patch # pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers # to choose (Bz#1641100, launchpad#1799212) +# F42+ update: HP has new key, and currently only on Ubuntu keyserver - so this patch now +# only adjust terminal output, we will see if connection problems reappear Patch32: hplip-keyserver.patch # QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments, # This patch solves most of them @@ -250,9 +252,11 @@ Patch72: hplip-no-urlopener.patch # hp-scan command failed to run and gives an error (fedora#2395809) # https://bugs.launchpad.net/hplip/+bug/2124268 Patch73: hplip-scan-size.patch -# HP uses new GPG key, but hplip code does not use it -# https://developers.hp.com/hp-linux-imaging-and-printing/hplipDigitalCertificate.html -Patch74: hplip-new-gpg-key.patch +# 3.25.8 brings new implementation for calling commands in subprocess, +# but again directs I/O into pipes, which does not work for TUI plugin +# installation. Additionally it tracebacks if stdout/stderr is None +# https://bugs.launchpad.net/hplip/+bug/2110101 +Patch74: hplip-plugin-stdout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -617,8 +621,8 @@ done %patch -P 72 -p1 -b .no-urlopener # https://bugs.launchpad.net/hplip/+bug/2124268 %patch -P 73 -p1 -b .scan-size -# Use new GPG key from Ubuntu keyserver -%patch -P 74 -p1 -b .new-gpg-key +# https://bugs.launchpad.net/hplip/+bug/2110101 +%patch -P 74 -p1 -b .plugin-stdout # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -990,6 +994,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 09 2026 Zdenek Dohnal - 3.25.8-1 +- hplip-3.25.8 is available (fedora#2415311) + * Wed Sep 17 2025 Zdenek Dohnal - 3.25.6-1 - hp-scan command failed to run and gives an error (fedora#2395809) - use new GPG key from HP - new key was used as fix for CVE-2025-43023 diff --git a/sources b/sources index 3eebca3..601b241 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.25.6-repack.tar.gz) = 1b431142e2516e383d5fcbaa1487c5a680b60a409bec02de4526ac82d2a88a4b2b28f3813740ae8f7f32f02d058ae6e986efc8e57a30d1c560132dc4014b87b4 +SHA512 (hplip-3.25.8-repack.tar.gz) = e4f82215e2753bee864e5ba643be2ce3566f1691638c35c74016279f92c872713d06e38a066d283f03f3e571d10c8ac2f1539bd32f6bafd1958641d96fe11059