diff --git a/.gitignore b/.gitignore index 833e1ab..c4e3a17 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,3 @@ hplip-3.10.6.tar.gz /hplip-3.23.12-repack.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 -/hplip-3.26.4-repack.tar.gz diff --git a/hp-plugin.in b/hp-plugin.in index 8a6155e..5bdbab0 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,12 +16,12 @@ download() { SOURCE="$1" - @bindir@/curl -f --user-agent 'Mozilla/5.0 (compatible; hplip-plugin/1.0)' --create-dirs -O --output-dir ~/.hplip --location ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip --location ${SOURCE} } # link to the plugin PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${PLUGIN_FILE}" -FALLBACK_SOURCE="https://developers.hp.com/sites/default/files/2026-05/${PLUGIN_FILE}" +FALLBACK_SOURCE="https://developers.hp.com/sites/default/files/${PLUGIN_FILE}" # create a hidden hplip dir to store a file indicating the plugin version after successful install # the directory can be used by other hplip tools, so we don't have to remove it if the failure happens diff --git a/hplip-CVE-2026-8631-osh.patch b/hplip-CVE-2026-8631-osh.patch deleted file mode 100644 index 226a570..0000000 --- a/hplip-CVE-2026-8631-osh.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff -up hplip-3.21.2/prnt/hpcups/genPCLm.cpp.CVE-2026-8631-osh hplip-3.21.2/prnt/hpcups/genPCLm.cpp ---- hplip-3.21.2/prnt/hpcups/genPCLm.cpp.CVE-2026-8631-osh 2026-07-03 08:25:17.717888763 +0200 -+++ hplip-3.21.2/prnt/hpcups/genPCLm.cpp 2026-07-03 08:48:22.225130940 +0200 -@@ -1922,7 +1922,10 @@ int PCLmGenerator::Encapsulate(void *pI - int whiteStripLen=0; - if(!safe_mul_int_positive(thisHeight, currSourceWidth, &whiteStripLen) || - !safe_mul_int_positive(whiteStripLen, srcNumComponents, &whiteStripLen)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - bool whiteStrip=isWhiteStrip(pInBuffer, whiteStripLen); - if(DebugIt2) - { -@@ -1944,11 +1947,17 @@ int PCLmGenerator::Encapsulate(void *pI - ubyte whitePt=0xff; - size_t tmpStripSize=0; - if(!safe_mul_size_t((size_t)scanlineWidth, (size_t)topMarginInPix, &tmpStripSize)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - - ubyte *tmpStrip=(ubyte*)malloc(tmpStripSize); - if(!tmpStrip) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - memset(tmpStrip,whitePt,tmpStripSize); - - -@@ -2016,7 +2025,10 @@ int PCLmGenerator::Encapsulate(void *pI - { - int sourceLen=0; - if(!safe_mul_int_positive(numLinesThisCall, scanlineWidth, &sourceLen)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - uint32 len=(uint32)sourceLen; - uLongf destSize=len; - -@@ -2025,12 +2037,18 @@ int PCLmGenerator::Encapsulate(void *pI - ubyte whitePt=0xff; - size_t tmpStripSize=0; - if(!safe_mul_size_t((size_t)scanlineWidth, (size_t)topMarginInPix, &tmpStripSize)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - - // We need to inject a blank image-strip with a height==topMarginInPix - ubyte *tmpStrip=(ubyte*)malloc(tmpStripSize); - if(!tmpStrip) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - uLongf tmpDestSize=destSize; - memset(tmpStrip,whitePt,tmpStripSize); - -@@ -2079,20 +2097,29 @@ int PCLmGenerator::Encapsulate(void *pI - { - int sourceLen=0; - if(!safe_mul_int_positive(numLinesThisCall, scanlineWidth, &sourceLen)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - - if(firstStrip && topMarginInPix) - { - ubyte whitePt=0xff; - size_t tmpStripSize=0; - if(!safe_mul_size_t((size_t)scanlineWidth, (size_t)topMarginInPix, &tmpStripSize)) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - - // We need to inject a blank image-strip with a height==topMarginInPix - - ubyte *tmpStrip=(ubyte*)malloc(tmpStripSize); - if(!tmpStrip) -+ { -+ free(newStripPtr); - return(errorOutAndCleanUp()); -+ } - memset(tmpStrip,whitePt,tmpStripSize); - - for(sint32 stripCntr=0; stripCntr 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-curl-fallback.patch b/hplip-curl-fallback.patch deleted file mode 100644 index 596a82c..0000000 --- a/hplip-curl-fallback.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py -index c2e2a94..d10d1b9 100755 ---- a/installer/pluginhandler.py -+++ b/installer/pluginhandler.py -@@ -36,7 +36,7 @@ def get_checksum(s): - - - PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state' --PLUGIN_FALLBACK_LOCATION = 'https://developers.hp.com/sites/default/files/' -+PLUGIN_FALLBACK_LOCATION = 'https://developers.hp.com/sites/default/files/2026-05/' - - - -@@ -281,7 +281,7 @@ class PluginHandle(object): - else: - curl = utils.which("curl", True) - if curl: -- cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) -+ cmd = "%s -f --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) - log.debug(cmd) - status, output = utils.run(cmd) - log.debug("curl returned: %d" % status) -@@ -290,7 +290,7 @@ class PluginHandle(object): - if status != 0 or os_utils.getFileSize(plugin_file) <= 0: - src = os.path.join(PLUGIN_FALLBACK_LOCATION, self.__plugin_name) - log.info("Plugin is not accessible. Trying to download it from fallback location: [%s]" % src) -- cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) -+ cmd = "%s -f --user-agent 'Mozilla/5.0 (compatible; hplip-plugin/1.0)' --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) - log.debug(cmd) - status, output = utils.run(cmd) - -@@ -318,7 +318,7 @@ class PluginHandle(object): - if digsig_url.startswith('file://'): - status, filename = utils.download_from_network(digsig_url, digsig_file, True) - else: -- cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl, self.__plugin_path,digsig_url) -+ cmd = "%s -f --user-agent 'Mozilla/5.0 (compatible; hplip-plugin/1.0)' --create-dirs -O --output-dir %s --location %s" % (curl, self.__plugin_path,digsig_url) - log.debug(cmd) - status, output = utils.run(cmd) - except IOError as e: diff --git a/hplip-gui-close-trace.patch b/hplip-gui-close-trace.patch deleted file mode 100644 index 39d8f01..0000000 --- a/hplip-gui-close-trace.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index 79f8fa8..28a77b3 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -816,6 +816,9 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - - - def updateWindowTitle(self): -+ if self.cur_device is None or self.cur_device_uri is None: -+ return -+ - if self.cur_device.device_type == DEVICE_TYPE_FAX: - self.setWindowTitle(self.__tr("HP Device Manager - %s (Fax)"%self.cur_device.model_ui)) - else: -@@ -1876,6 +1879,9 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - - - def updatePrintControlTab(self): -+ if self.cur_device is None or self.cur_printer is None: -+ return -+ - if self.cur_device.device_type == DEVICE_TYPE_PRINTER: - self.PrintControlPrinterNameLabel.setText(self.__tr("Printer Name:")) - self.groupBox.setTitle(QApplication.translate("MainWindow", "Printer Queue Control", None)) 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-locale-format.patch b/hplip-locale-format.patch new file mode 100644 index 0000000..32fba1e --- /dev/null +++ b/hplip-locale-format.patch @@ -0,0 +1,13 @@ +diff --git a/base/utils.py b/base/utils.py +index e2de550..55848b8 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -474,7 +474,7 @@ def sort_dict_by_value(d): + + + def commafy(val): +- return locale.format("%s", val, grouping=True) ++ return locale.format_string("%s", val, grouping=True) + + + def format_bytes(s, show_bytes=False): diff --git a/hplip-no-urlopener.patch b/hplip-no-urlopener.patch deleted file mode 100644 index 903fbbc..0000000 --- a/hplip-no-urlopener.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/base/device.py b/base/device.py -index 2fdb29c..ca0d97e 100644 ---- a/base/device.py -+++ b/base/device.py -@@ -2526,9 +2526,9 @@ Content-length: %d\r - data = None - - log.debug("Opening: %s" % url2) -- opener = LocalOpener({}) -+ opener = LocalOpener() - try: -- f = opener.open(url2, data) -+ f = opener.open_hp(url2, data) - - except Error: - log.error("Status read failed: %s" % url2) -@@ -2548,7 +2548,7 @@ Content-length: %d\r - try: - url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) - data = self -- opener = LocalOpenerEWS_LEDM({}) -+ opener = LocalOpenerEWS_LEDM() - try: - if footer: - return opener.open_hp(url2, data, footer) -@@ -2563,7 +2563,7 @@ Content-length: %d\r - try: - url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) - data = self -- opener = LocalOpener_LEDM({}) -+ opener = LocalOpener_LEDM() - try: - if footer: - return opener.open_hp(url2, data, footer) -@@ -2580,7 +2580,7 @@ Content-length: %d\r - url="/cdm/supply/v1/suppliesPublic" - url2 = "%s&loc=%s" % (self.device_uri.replace('hpfax:', 'hp:'), url) - data = self -- opener = LocalOpener_CDM({}) -+ opener = LocalOpener_CDM() - try: - if footer: - return opener.open_hp(url2, data, footer) -@@ -2688,7 +2688,7 @@ Content-length: %d\r - - - # URLs: hp:/usb/HP_LaserJet_3050?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml --class LocalOpener(urllib_request.URLopener): -+class LocalOpener(): - def open_hp(self, url, dev): - log.debug("open_hp(%s)" % url) - -@@ -2718,7 +2718,7 @@ class LocalOpener(urllib_request.URLopener): - return response#.fp - - # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml --class LocalOpenerEWS_LEDM(urllib_request.URLopener): -+class LocalOpenerEWS_LEDM(): - def open_hp(self, url, dev, foot=""): - log.debug("open_hp(%s)" % url) - -@@ -2744,7 +2744,7 @@ class LocalOpenerEWS_LEDM(urllib_request.URLopener): - - - # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml --class LocalOpener_LEDM(urllib_request.URLopener): -+class LocalOpener_LEDM(): - def open_hp(self, url, dev, foot=""): - log.debug("open_hp(%s)" % url) - -@@ -2771,7 +2771,7 @@ class LocalOpener_LEDM(urllib_request.URLopener): - - - # URLs: hp:/usb/HP_OfficeJet_7500?serial=00XXXXXXXXXX&loc=/hp/device/info_device_status.xml --class LocalOpener_CDM(urllib_request.URLopener): -+class LocalOpener_CDM(): - def open_hp(self, url, dev, foot=""): - log.debug("open_hp(%s)" % url) - match_obj = http_pat_url.search(url) diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch index 158379d..342c4d3 100644 --- a/hplip-pcardext-disable.patch +++ b/hplip-pcardext-disable.patch @@ -1,13 +1,12 @@ -diff -up hplip-3.25.6/Makefile.am.pcardext-disable hplip-3.25.6/Makefile.am ---- hplip-3.25.6/Makefile.am.pcardext-disable 2025-08-11 12:52:35.359621088 +0200 -+++ hplip-3.25.6/Makefile.am 2025-08-11 12:54:58.654515582 +0200 -@@ -306,14 +306,6 @@ if !HPLIP_CLASS_DRIVER +diff -up hplip-3.25.2/Makefile.am.pcardext-disable hplip-3.25.2/Makefile.am +--- hplip-3.25.2/Makefile.am.pcardext-disable 2025-04-11 10:23:29.576593786 +0200 ++++ hplip-3.25.2/Makefile.am 2025-04-11 10:24:08.259842784 +0200 +@@ -306,13 +306,6 @@ if !HPLIP_CLASS_DRIVER pcarddir = $(hplipdir)/pcard dist_pcard_DATA = pcard/__init__.py pcard/photocard.py -# pcardext -pcardextdir = $(PYTHONEXECDIR) --pcardextdir = $(PYTHONEXECDIR) -pcardext_LTLIBRARIES = pcardext.la -pcardext_la_LDFLAGS = -module -avoid-version -pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h 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-repack.sh b/hplip-repack.sh index 20eb314..a67e7ee 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -19,7 +19,7 @@ rm hplip-$VERSION/locatedriver tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 # check whether plugin is available -wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || wget --user-agent='Mozilla/5.0 (compatible; hplip-plugin/1.0)' -O hplip-plugin.run https://developers.hp.com/sites/default/files/2026-05/hplip-$1-plugin.run || exit 1 +wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || wget -O hplip-plugin.run https://developers.hp.com/sites/default/files/hplip-$1-plugin.run || exit 1 # check whether the file is sane file --mime hplip-plugin.run | grep 'x-shellscript' || exit 1 diff --git a/hplip-scan-size.patch b/hplip-scan-size.patch deleted file mode 100644 index 1ff8cb3..0000000 --- a/hplip-scan-size.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/scan.py b/scan.py -index b262ef2..cb0ffc1 100755 ---- a/scan.py -+++ b/scan.py -@@ -83,7 +83,7 @@ edge_erase_value = 0 - contrast = 0 - set_contrast = False - --page_size = '' -+page_size = 'a4' - size_desc = '' - page_units = 'mm' - default_res = 300 -@@ -1615,7 +1615,7 @@ try: - else: - im = im.convert("RGB") - -- #im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[size],res) -+ #im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[page_size],res) - if barcode_count>0: - if barcode_first_occurence == True: - if barcode_first_page == False: -@@ -1718,12 +1718,12 @@ try: - #so that the output image size matches with the input scan area - #for Flatbad - if im: -- im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[size],res) -+ im = imageprocessing.resize_to_scan_area(im,PAGE_SIZES[page_size],res) - """ - #for ADF - for Image_file in adf_page_files: - image = Image.open(Image_file) -- resized_image = imageprocessing.resize_to_scan_area(image,PAGE_SIZES[size],res) -+ resized_image = imageprocessing.resize_to_scan_area(image,PAGE_SIZES[page_size],res) - resized_image.save(Image_file) - """ - if adf and (save_file =='jpg' or save_file == 'png' or save_file == 'tiff' or save_file == 'pdf' or save_file == 'bmp'): diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index 058539f..77d1b87 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -1,7 +1,23 @@ -diff --git a/base/queues.py b/base/queues.py -index 0818574..8625f53 100755 ---- a/base/queues.py -+++ b/base/queues.py +diff -up hplip-3.25.2/base/device.py.raw-strings hplip-3.25.2/base/device.py +diff -up hplip-3.25.2/base/g.py.raw-strings hplip-3.25.2/base/g.py +diff -up hplip-3.25.2/base/LedmWifi.py.raw-strings hplip-3.25.2/base/LedmWifi.py +--- hplip-3.25.2/base/LedmWifi.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/base/LedmWifi.py 2025-04-11 10:26:18.519166530 +0200 +@@ -31,7 +31,7 @@ from .g import * + from . import device, utils + from .sixext import to_bytes_utf8 + +-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I) ++http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I) + HTTP_OK = 200 + HTTP_ACCEPTED = 202 + HTTP_NOCONTENT = 204 +diff -up hplip-3.25.2/base/logger.py.raw-strings hplip-3.25.2/base/logger.py +diff -up hplip-3.25.2/base/models.py.raw-strings hplip-3.25.2/base/models.py +diff -up hplip-3.25.2/base/password.py.raw-strings hplip-3.25.2/base/password.py +diff -up hplip-3.25.2/base/queues.py.raw-strings hplip-3.25.2/base/queues.py +--- hplip-3.25.2/base/queues.py.raw-strings 2025-04-11 10:26:18.512773352 +0200 ++++ hplip-3.25.2/base/queues.py 2025-04-11 10:26:18.520514306 +0200 @@ -46,7 +46,7 @@ HPPS = 3 HPOTHER = 4 @@ -20,10 +36,12 @@ index 0818574..8625f53 100755 except AttributeError: desc = '' -diff --git a/check.py b/check.py -index 284b88e..86ca832 100755 ---- a/check.py -+++ b/check.py +diff -up hplip-3.25.2/base/status.py.raw-strings hplip-3.25.2/base/status.py +diff -up hplip-3.25.2/base/tui.py.raw-strings hplip-3.25.2/base/tui.py +diff -up hplip-3.25.2/base/utils.py.raw-strings hplip-3.25.2/base/utils.py +diff -up hplip-3.25.2/check.py.raw-strings hplip-3.25.2/check.py +--- hplip-3.25.2/check.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/check.py 2025-04-11 10:26:18.521601431 +0200 @@ -627,7 +627,7 @@ class DependenciesCheck(object): status, output = utils.run("%s -d03f0:" % lsusb) @@ -42,10 +60,9 @@ index 284b88e..86ca832 100755 pat = re.compile('''.*:(.*)''') if pat.search(g): out = out +' '+ pat.search(g).group(1) -diff --git a/fax/soapfax.py b/fax/soapfax.py -index 9865726..344cb34 100644 ---- a/fax/soapfax.py -+++ b/fax/soapfax.py +diff -up hplip-3.25.2/fax/soapfax.py.raw-strings hplip-3.25.2/fax/soapfax.py +--- hplip-3.25.2/fax/soapfax.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/fax/soapfax.py 2025-04-11 10:26:18.521745824 +0200 @@ -42,7 +42,7 @@ from base.sixext import to_bytes_utf8 # **************************************************************************** # @@ -55,10 +72,10 @@ index 9865726..344cb34 100644 TIME_FORMAT_AM_PM = 1 -diff --git a/makeuri.py b/makeuri.py -index 4a10de8..6343e31 100755 ---- a/makeuri.py -+++ b/makeuri.py +diff -up hplip-3.25.2/installer/dcheck.py.raw-strings hplip-3.25.2/installer/dcheck.py +diff -up hplip-3.25.2/makeuri.py.raw-strings hplip-3.25.2/makeuri.py +--- hplip-3.25.2/makeuri.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/makeuri.py 2025-04-11 10:26:18.522024483 +0200 @@ -46,7 +46,7 @@ USAGE = [ (__doc__, "", "name", True), ("DEVNODE (parallel only):", '"/dev/parportX", X=0,1,2,...', "option", False), ("SERIAL NO. (usb and parallel only):", '"serial no."', "option", True), @@ -68,10 +85,10 @@ index 4a10de8..6343e31 100755 ("Show the CUPS URI only (quiet mode):", "-c or --cups", "option", False), ("Show the SANE URI only (quiet mode):", "-s or --sane", "option", False), ("Show the HP Fax URI only (quiet mode):", "-f or --fax", "option", False), -diff --git a/probe.py b/probe.py -index 2041fb6..2b43ece 100755 ---- a/probe.py -+++ b/probe.py +diff -up hplip-3.25.2/prnt/cups.py.raw-strings hplip-3.25.2/prnt/cups.py +diff -up hplip-3.25.2/probe.py.raw-strings hplip-3.25.2/probe.py +--- hplip-3.25.2/probe.py.raw-strings 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/probe.py 2025-04-11 10:26:18.522312569 +0200 @@ -42,11 +42,11 @@ USAGE = [(__doc__, "", "name", True), ("Usage: %s [OPTIONS]" % __mod__, "", "summary", True), utils.USAGE_OPTIONS, @@ -86,3 +103,21 @@ index 2041fb6..2b43ece 100755 ("Search:", "-s or --search=", "option", False), ("", " must be a valid regular expression (not case sensitive)", "option", False), ("Network discovery method:", "-m or --method=: is 'slp'* or 'mdns'.", "option", False), +diff -up hplip-3.25.2/scan.py.raw-strings hplip-3.25.2/scan.py +diff -up hplip-3.25.2/setup.py.raw-strings hplip-3.25.2/setup.py +--- hplip-3.25.2/setup.py.raw-strings 2025-04-11 10:26:18.496992045 +0200 ++++ hplip-3.25.2/setup.py 2025-04-11 10:26:18.522775511 +0200 +@@ -79,11 +79,11 @@ USAGE = [ (__doc__, "", "name", True), + utils.USAGE_SPACE, + utils.USAGE_OPTIONS, + ("Automatic mode:", "-a or --auto (-i mode only)", "option", False), +- ("To specify the port on a multi-port JetDirect:", "--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), ++ ("To specify the port on a multi-port JetDirect:", r"--port= (Valid values are 1\*, 2, and 3. \*default)", "option", False), + ("No testpage in automatic mode:", "-x (-i mode only)", "option", False), + ("To specify a CUPS printer queue name:", "-p or --printer= (-i mode only)", "option", False), + ("To specify a CUPS fax queue name:", "-f or --fax= (-i mode only)", "option", False), +- ("Type of queue(s) to install:", "-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), ++ ("Type of queue(s) to install:", r"-t or --type=. : print*, fax\* (\*default) (-i mode only)", "option", False), + ("To specify the device URI to install:", "-d or --device= (--qt4 mode only)", "option", False), + ("Remove printers or faxes instead of setting-up:", "-r or --rm or --remove", "option", False), + utils.USAGE_LANGUAGE, diff --git a/hplip.spec b/hplip.spec index f1d3a86..f57e86c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.26.4 -Release: 9%{?dist} +Version: 3.25.2 +Release: 2%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -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 @@ -201,68 +199,51 @@ Patch57: hplip-plugin-udevissues.patch # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() Patch58: hplip-no-libhpmud-libm-warnings.patch -Patch59: hplip-plugin-script.patch +Patch60: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -Patch60: hplip-pserror-c99.patch +Patch61: hplip-pserror-c99.patch # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -Patch61: hplip-scan-hpaio-include.patch +Patch62: hplip-scan-hpaio-include.patch # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -Patch62: hplip-scan-orblite-c99.patch +Patch63: hplip-scan-orblite-c99.patch # C99 compatibility patch by fweimer: # PyString_AsStringAndSize is removed in Python3, remove its compilation for now # in case there is a request for compiling it again, there is a possible solution # for the function py3 alternative https://opendev.org/openstack/pyeclib/commit/19c8313986 # - disabling removes hp-unload and /usr/share/hplip/pcard as well # Submitted upstream: -Patch63: hplip-pcardext-disable.patch +Patch64: hplip-pcardext-disable.patch # undefined strcasestr() in sclpml.c - build with _GNU_SOURCE # Submitted upstream: -Patch64: hplip-sclpml-strcasestr.patch +Patch65: hplip-sclpml-strcasestr.patch # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 -Patch65: hplip-fix-parsing-lpstat.patch +Patch67: hplip-fix-parsing-lpstat.patch # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # it should not hang. -Patch66: hplip-plugin-curl.patch +Patch68: hplip-plugin-curl.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 -Patch67: hplip-use-raw-strings.patch +Patch69: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -Patch68: hplip-hpaio-gcc14.patch +Patch70: hplip-hpaio-gcc14.patch +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +Patch71: hplip-locale-format.patch # function prototype did not specify argument's data types # https://bugs.launchpad.net/hplip/+bug/2096650 -Patch69: hplip-gcc15-stdc23.patch +Patch72: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 -Patch70: hplip-format-qdatetime.patch -# Python 3.14 removed urlopener -# https://bugs.launchpad.net/hplip/+bug/2115046 -Patch71: hplip-no-urlopener.patch -# hp-scan command failed to run and gives an error (fedora#2395809) -# https://bugs.launchpad.net/hplip/+bug/2124268 -Patch72: 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 -Patch73: hplip-plugin-stdout.patch -# Fallbacking to HP site for plugin does not work for several reasons: -# - curl was not called with -f, so error 404 from openprinting did not propagated, -# - HP fallback URL in hplip does not contain latest changes - it now has YYYY-MM in it, -# - connecting to HP site requires curl/wget to set user-agent to pretend to be a browser -# https://bugs.launchpad.net/hplip/+bug/2154206 -Patch74: hplip-curl-fallback.patch -# OSH fixes after CVE-2026-8631 -# https://bugs.launchpad.net/hplip/+bug/2156584 -Patch75: hplip-CVE-2026-8631-osh.patch +Patch73: hplip-format-qdatetime.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -587,49 +568,42 @@ done %patch -P 57 -p1 -b .hpplugin-udevperms # 2080235 - Misleading errors about missing shared libraries when scanning %patch -P 58 -p1 -b .no-libm-libhpmud-warn -%patch -P 59 -p1 -b .plugin-patch +%patch -P 60 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -%patch -P 60 -p1 -b .pserror-int +%patch -P 61 -p1 -b .pserror-int # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -%patch -P 61 -p1 -b .hpaio-orblite-defs +%patch -P 62 -p1 -b .hpaio-orblite-defs # C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c # - _DBG() looks like typo and new header is added for funcs # Submitted upstream: -%patch -P 62 -p1 -b .orblite-undefs +%patch -P 63 -p1 -b .orblite-undefs # C99 compatibility patch by fweimer - python2 PyString_AsStringAndSize in python3 code # gives undefined reference - removed for now with dependent hp-unload -%patch -P 63 -p1 -b .pcardext-disable +%patch -P 64 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE -%patch -P 64 -p1 -b .sclpml-strcasestr +%patch -P 65 -p1 -b .sclpml-strcasestr # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed # https://bugs.launchpad.net/hplip/+bug/2027972 -%patch -P 65 -p1 -b .lpstat-parse +%patch -P 67 -p1 -b .lpstat-parse # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... -%patch -P 66 -p1 -b .curl-switch +%patch -P 68 -p1 -b .curl-switch # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 -%patch -P 67 -p1 -b .raw-strings +%patch -P 69 -p1 -b .raw-strings # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -%patch -P 68 -p1 -b .hpaio-gcc14 +%patch -P 70 -p1 -b .hpaio-gcc14 +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +%patch -P 71 -p1 -b .locale-format # https://bugs.launchpad.net/hplip/+bug/2096650 -%patch -P 69 -p1 -b .gcc-strc23 +%patch -P 72 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 -%patch -P 70 -p1 -b .format-qdatetime -# https://bugs.launchpad.net/hplip/+bug/2115046 -%patch -P 71 -p1 -b .no-urlopener -# https://bugs.launchpad.net/hplip/+bug/2124268 -%patch -P 72 -p1 -b .scan-size -# https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 73 -p1 -b .plugin-stdout -# https://bugs.launchpad.net/hplip/+bug/2154206 -%patch -P 74 -p1 -b .curl-fallback -# OSH fixes after CVE-2026-8631 -%patch -P 75 -p1 -b .cve-2026-8631-osh +%patch -P 73 -p1 -b .format-qdatetime # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -1001,66 +975,6 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog -* Wed Jul 22 2026 Python Maint - 3.26.4-9 -- Rebuilt for Python 3.15.0b4 ABI change - -* Thu Jul 16 2026 Fedora Release Engineering - 3.26.4-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Fri Jul 03 2026 Zdenek Dohnal - 3.26.4-7 -- fix CVE-2026-14544 - incomplete fix after CVE-2026-8631 (fedora#2496773, - fedora#2496772) - -* Mon Jun 15 2026 Zdenek Dohnal - 3.26.4-6 -- Fix more leaks after CVE-2026-8632 fix - -* Fri Jun 12 2026 Yaakov Selkowitz - 3.26.4-5 -- Rebuilt for openssl 4.0 - -* Fri Jun 12 2026 Zdenek Dohnal - 3.26.4-4 -- OSH fixes after CVE-2026-8631 - -* Wed Jun 03 2026 Python Maint - 3.26.4-3 -- Rebuilt for Python 3.15 - -* Tue May 26 2026 Zdenek Dohnal - 3.26.4-2 -- Fix location+user-agent of plugin in hp-plugin-download - -* Mon May 25 2026 Zdenek Dohnal - 3.26.4-1 -- 3.26.4 (fedora#2480158), fixes CVE-2026-8631, CVE-2026-8632 - -* Fri Jan 23 2026 Benjamin A. Beasley - 3.25.8-2 -- Rebuilt for net-snmp 5.9.5.2 - -* 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 - -* Tue Aug 12 2025 Zdenek Dohnal - 3.25.6-1 -- hplip-3.25.6 is available (fedora#2386814) - -* Thu Jul 24 2025 Fedora Release Engineering - 3.25.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jun 19 2025 Zdenek Dohnal - 3.25.2-7 -- Python 3.14 removed URLopener - -* Mon Jun 02 2025 Python Maint - 3.25.2-6 -- Rebuilt for Python 3.14 - -* Mon May 26 2025 Zdenek Dohnal - 3.25.2-5 -- hp-toolbox shows traceback when closing and there is no HP device (fedora#2360501) - -* Mon May 12 2025 Zdenek Dohnal - 3.25.2-4 -- plugin.conf now looks to use sha256 as well per email comms with HP, drop the revert - -* Wed May 07 2025 Zdenek Dohnal - 3.25.2-3 -- hp-plugin failed checksum due usage of different hashes (fedora#2361230) -- output is not seen after installing plugin (fedora#2361230) - * Wed Apr 16 2025 Zdenek Dohnal - 3.25.2-2 - remove Recommends on hplip-gui due complaint at (fedora#2360020) diff --git a/plans.fmf b/plans.fmf index f4c2755..deb443d 100644 --- a/plans.fmf +++ b/plans.fmf @@ -1,37 +1,37 @@ /tier1-internal: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/tier1/internal /tier1-public: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/tier1/public /tier2-tier3-internal: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/tier2-tier3/internal /tier2-tier3-public: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/tier2-tier3/public /others-internal: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/others/internal /others-public: plan: import: - url: https://gitlab.com/redhat/centos-stream/tests/hplip.git + url: https://src.fedoraproject.org/tests/hplip.git name: /plans/others/public diff --git a/sources b/sources index 0574f21..9ed256f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.26.4-repack.tar.gz) = e46eb44780afdc13f975a2de23a7fcef51659d96506125a76f23f9e47135a6bd3aab60f70f4b52ad088714f967031324c9f537b4af21e394a49eae9bb94742f4 +SHA512 (hplip-3.25.2-repack.tar.gz) = 38941d8f624b8edc4a45695151649d18a430177f9b3e257cd969e234ff0f45285a68fa83240727dce411fea961de34b4dc5b46741a48087b77f1e34b48d7d6b1