diff --git a/.gitignore b/.gitignore index 00397c1..89da7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -115,4 +115,3 @@ 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 beb070d..798630a 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -1,3 +1,16 @@ +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 c525503..9b457f1 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -10,3 +10,47 @@ 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 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-plugin-stdout.patch b/hplip-plugin-stdout.patch deleted file mode 100644 index 92f8016..0000000 --- a/hplip-plugin-stdout.patch +++ /dev/null @@ -1,41 +0,0 @@ -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 d6b78cd..6fb946e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.25.8 +Version: 3.25.6 Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG @@ -76,8 +76,6 @@ 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 @@ -252,11 +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 -# 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 +# 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 @@ -621,8 +617,8 @@ done %patch -P 72 -p1 -b .no-urlopener # https://bugs.launchpad.net/hplip/+bug/2124268 %patch -P 73 -p1 -b .scan-size -# https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 74 -p1 -b .plugin-stdout +# 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 @@ -994,9 +990,6 @@ 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 601b241..3eebca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.25.8-repack.tar.gz) = e4f82215e2753bee864e5ba643be2ce3566f1691638c35c74016279f92c872713d06e38a066d283f03f3e571d10c8ac2f1539bd32f6bafd1958641d96fe11059 +SHA512 (hplip-3.25.6-repack.tar.gz) = 1b431142e2516e383d5fcbaa1487c5a680b60a409bec02de4526ac82d2a88a4b2b28f3813740ae8f7f32f02d058ae6e986efc8e57a30d1c560132dc4014b87b4