diff --git a/hplip-add-ppd-crash.patch b/hplip-add-ppd-crash.patch new file mode 100644 index 0000000..43bcd2b --- /dev/null +++ b/hplip-add-ppd-crash.patch @@ -0,0 +1,14 @@ +diff --git a/setup.py b/setup.py +index ba1b519..4f64eed 100755 +--- a/setup.py ++++ b/setup.py +@@ -556,6 +556,9 @@ else: # INTERACTIVE_MODE + 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 2681b82..d0a336d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -75,6 +75,12 @@ Patch40: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch # New tool - hp-uiscan - misses support of -h argument and crashes with traceback # Reported as https://bugs.launchpad.net/hplip/+bug/1810943 Patch41: hplip-uiscan-help.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 Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -315,6 +321,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch40 -p1 -b .toolbox-crash %patch41 -p1 -b .uiscan-help +# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076 +%patch42 -p1 -b .add-ppd-crash sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -605,6 +613,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop * Fri Feb 01 2019 Zdenek Dohnal - 3.18.12-3 - m277-m281 printer support got some fixes, so try to do not use our downstream patch - hpcups-update-ppds can freeze sometimes, add timeout for to be sure +- fixed hp-setup crash when user wants to define path to PPD file * Fri Feb 01 2019 Fedora Release Engineering - 3.18.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild