diff --git a/.gitignore b/.gitignore index 54adadb..a71a990 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ hplip-3.10.6.tar.gz /hplip-3.15.7.tar.gz /hplip-3.15.9.tar.gz /hplip-3.15.11.tar.gz +/hplip-3.16.2.tar.gz diff --git a/hplip-3.15.11.tar.gz.asc b/hplip-3.15.11.tar.gz.asc deleted file mode 100644 index ff6b378..0000000 --- a/hplip-3.15.11.tar.gz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iEYEABECAAYFAlZEazsACgkQc9dwzaWQR7m3UACgg+Msyrw5eUu3E3fYuWbLzEE6 -9bgAnic5tdUXV8L6kYmUUyAnr8MlJ6WU -=zfDs ------END PGP SIGNATURE----- diff --git a/hplip-3.16.2.tar.gz.asc b/hplip-3.16.2.tar.gz.asc new file mode 100644 index 0000000..69816af --- /dev/null +++ b/hplip-3.16.2.tar.gz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iEYEABECAAYFAla4Y60ACgkQc9dwzaWQR7kRMgCgrRJY/P70JtlDqP7/EH9cu62f +6/kAoKIRQRcsMTYmiXmNl04kgvKqCmaX +=LTgC +-----END PGP SIGNATURE----- diff --git a/hplip-stuck-plugin.patch b/hplip-stuck-plugin.patch deleted file mode 100644 index 188682a..0000000 --- a/hplip-stuck-plugin.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 469029615ffd32cf78f3be575694ed58236da3e0 Mon Sep 17 00:00:00 2001 -From: Jiri Popelka -Date: Fri, 22 Jan 2016 16:30:13 +0100 -Subject: [PATCH] fix from launchpad #1510950 - ---- - base/password.py | 27 +++++++++++++++++++++++---- - base/utils.py | 53 ++++++++++++++++++++++++++++++++++------------------- - 2 files changed, 57 insertions(+), 23 deletions(-) - -diff --git a/base/password.py b/base/password.py -index 3ca16ae..f69a248 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -104,6 +104,7 @@ def get_distro_name(): - class Password(object): - def __init__(self, Mode = INTERACTIVE_MODE): - self.__password ="" -+ self.__password_prompt_str="" - self.__passwordValidated = False - self.__mode = Mode - self.__readAuthType() #self.__authType -@@ -200,8 +201,7 @@ class Password(object): - i = child.expect(self.__expectList) - - cb = child.before -- if cb: -- -+ if cb: - start = time.time() - output.write(cb) - -@@ -209,11 +209,26 @@ class Password(object): - ok, ret = True, output.getvalue() - break - -- elif i == 1: # TIMEOUT -- -+ 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("]", "\]") -+ -+ self.__password_prompt_str = cb -+ try: -+ p = re.compile(cb, re.I) -+ except TypeError: -+ self.__expectList.append(cb) -+ else: -+ self.__expectList.append(p) -+ log.debug("Adding missing password prompt string [%s]"%self.__password_prompt_str) - continue - - else: # password -+ if(self.__password_prompt_str == ""): -+ self.__password_prompt_str = utils.EXPECT_WORD_LIST[i] -+ log.debug("Updating password prompt string [%s]"%self.__password_prompt_str) -+ - child.sendline(self.__password) - - except (Exception, pexpect.ExceptionPexpect) as e: -@@ -355,3 +370,7 @@ class Password(object): - self.__validatePassword( pswd_msg) - return self.__password - -+ def getPasswordPromptString(self): -+ return self.__password_prompt_str -+ -+ -diff --git a/base/utils.py b/base/utils.py -index f1ec1e1..5d108f0 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -108,22 +108,21 @@ MAJ_VER = sys.version_info[0] - MIN_VER = sys.version_info[1] - - -- - EXPECT_WORD_LIST = [ - pexpect.EOF, # 0 - pexpect.TIMEOUT, # 1 -- "Continue?", # 2 (for zypper) -- "passwor[dt]:", # en/de/it/ru -- "kennwort", # de? -- "password for", # en -- "mot de passe", # fr -- "contraseña", # es -- "palavra passe", # pt -- "口令", # zh -- "wachtwoord", # nl -- "heslo", # czech -- "密码", -- "Lösenord", #sv -+ u"Continue?", # 2 (for zypper) -+ u"passwor[dt]:", # en/de/it/ru -+ u"kennwort", # de? -+ u"password for", # en -+ u"mot de passe", # fr -+ u"contraseña", # es -+ u"palavra passe", # pt -+ u"口令", # zh -+ u"wachtwoord", # nl -+ u"heslo", # czech -+ u"密码", -+ u"Lösenord", #sv - ] - - -@@ -1260,6 +1259,15 @@ def run(cmd, passwordObj = None, pswd_msg='', log_output=True, spinner=True, tim - import io - output = io.StringIO() - -+ pwd_prompt_str = "" -+ if passwordObj and ('su' in cmd or 'sudo' in cmd): -+ pwd_prompt_str = passwordObj.getPasswordPromptString() -+ log.debug("cmd = %s pwd_prompt_str = [%s]"%(cmd, pwd_prompt_str)) -+ if(pwd_prompt_str == ""): -+ passwordObj.getPassword(pswd_msg, 0) -+ pwd_prompt_str = passwordObj.getPasswordPromptString() -+ log.debug("pwd_prompt_str2 = [%s]"%(pwd_prompt_str)) -+ - try: - child = pexpect.spawnu(cmd, timeout=timeout) - except pexpect.ExceptionPexpect as e: -@@ -1277,15 +1285,22 @@ def run(cmd, passwordObj = None, pswd_msg='', log_output=True, spinner=True, tim - continue - - if child.before: -+ if(pwd_prompt_str and pwd_prompt_str not in EXPECT_LIST): -+ log.debug("Adding %s to EXPECT LIST"%pwd_prompt_str) -+ try: -+ p = re.compile(pwd_prompt_str, re.I) -+ except TypeError: -+ EXPECT_LIST.append(pwd_prompt_str) -+ else: -+ EXPECT_LIST.append(p) -+ EXPECT_LIST.append(pwd_prompt_str) -+ - try: - output.write(child.before) -+ if log_output: -+ log.debug(child.before) - except Exception: - pass -- if log_output: -- try: -- log.debug(child.before) -- except Exception: -- pass - - if i == 0: # EOF - break -@@ -2018,7 +2033,7 @@ def download_from_network(weburl, outputFile = None, useURLLIB=False): - - if useURLLIB: - -- sys.stdout.write("Download in progress..........") -+ #sys.stdout.write("Download in progress..........") - try: - response = urllib2_request.urlopen(weburl) - file_fd = open(outputFile, 'wb') --- -2.5.0 - diff --git a/hplip.spec b/hplip.spec index f77e566..2e41bb3 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.15.11 -Release: 6%{?dist} +Version: 3.16.2 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD Url: http://hplip.sourceforge.net/ @@ -36,7 +36,6 @@ Patch20: hplip-dj990c-margin.patch Patch21: hplip-strncpy.patch Patch22: hplip-no-write-bytecode.patch Patch23: hplip-silence-ioerror.patch -Patch24: hplip-stuck-plugin.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -208,9 +207,6 @@ done # Ignore IOError when logging output (bug #712537). %patch23 -p1 -b .silence-ioerror -# hp-plugin hangs on 'su' (bug #1249414). -%patch24 -p1 -b .stuck-plugin - sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -461,6 +457,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %postun libs -p /sbin/ldconfig %changelog +* Tue Feb 09 2016 Jiri Popelka - 3.16.2-1 +- 3.16.2 + * Wed Jan 27 2016 Jiri Popelka - 3.15.11-6 - updated patch for bug #1249414 diff --git a/sources b/sources index a2c0b7c..3d2ddbc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a2d8134ab15a1d67d4c3b3c11f85ba1c hplip-3.15.11.tar.gz +e024f3b52b3b5be66da843fba7da4cf5 hplip-3.16.2.tar.gz