diff --git a/hplip-hplj-3052.patch b/hplip-hplj-3052.patch new file mode 100644 index 0000000..c65efac --- /dev/null +++ b/hplip-hplj-3052.patch @@ -0,0 +1,21 @@ +diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c +index ff57987..f607220 100755 +--- a/scan/scanext/scanext.c ++++ b/scan/scanext/scanext.c +@@ -407,16 +407,6 @@ static PyObject *setOption (_ScanDevice * self, PyObject * args) + int n; + multipick = 1; + +-if(1) +-{ +-SANE_Bool b = SANE_TRUE; +- sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i); +-} +-else +-{ +-SANE_Bool b = SANE_FALSE; +- sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i); +-} + if (!PyArg_ParseTuple (args, "iO", &n, &value)) + raiseError("Invalid arguments."); + diff --git a/hplip.spec b/hplip.spec index baa4ad1..022cf70 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.18.12 -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 @@ -90,6 +90,11 @@ Patch42: hplip-add-ppd-crash.patch # Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1671513 # Reported upstream: https://bugs.launchpad.net/hplip/+bug/1814574 Patch43: 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 Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -334,6 +339,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch42 -p1 -b .add-ppd-crash # 1671513 - after 'successful' plugin installation it is not installed %patch43 -p1 -b .missing-links +# 1684434 - Scanning broken for HP LaserJet 3052 +%patch44 -p1 -b .hp-laserjet-3052-broken-scanning sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -620,6 +627,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 25 2019 Zdenek Dohnal - 3.18.12-6 +- 1684434 - Scanning broken for HP LaserJet 3052 + * Mon Mar 04 2019 Zdenek Dohnal - 3.18.12-5 - 1684792 - devel-file-in-non-devel-package /usr/lib64/libhpmud.so