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