From a6c2c2b70b1a7639032f7f695f6dfc9bf53a8577 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 9 Jan 2024 11:20:27 +0100 Subject: [PATCH 01/38] 2252302 - hplip-3.23.12 is available --- .gitignore | 1 + hplip-fix-Wreturn-type-warning.patch | 11 ------ hplip-snprintf-format.patch | 51 ---------------------------- hplip-use-raw-strings.patch | 22 ------------ hplip.spec | 12 +++---- sources | 2 +- 6 files changed, 8 insertions(+), 91 deletions(-) delete mode 100644 hplip-snprintf-format.patch diff --git a/.gitignore b/.gitignore index 57fc212..21ead10 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.3-repack.tar.gz /hplip-3.23.5-repack.tar.gz /hplip-3.23.8-repack.tar.gz +/hplip-3.23.12-repack.tar.gz diff --git a/hplip-fix-Wreturn-type-warning.patch b/hplip-fix-Wreturn-type-warning.patch index e128078..aa40e1a 100644 --- a/hplip-fix-Wreturn-type-warning.patch +++ b/hplip-fix-Wreturn-type-warning.patch @@ -1,14 +1,3 @@ ---- hplip-3.20.3/prnt/hpps/hppsfilter.c.orig 2020-03-25 01:09:51.585129957 +0000 -+++ hplip-3.20.3/prnt/hpps/hppsfilter.c 2020-03-25 01:10:15.610058293 +0000 -@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m - if(ptempbooklet_file == NULL) - { - fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename); -- return 1; -+ return; - } - chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - --- hplip-3.20.3/scan/sane/hpaio.c.orig 2020-03-25 01:24:15.558732638 +0000 +++ hplip-3.20.3/scan/sane/hpaio.c 2020-03-25 02:48:36.097054366 +0000 @@ -406,20 +406,34 @@ extern SANE_Status sane_hpaio_open(SANE_ diff --git a/hplip-snprintf-format.patch b/hplip-snprintf-format.patch deleted file mode 100644 index 21b1530..0000000 --- a/hplip-snprintf-format.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up hplip-3.23.3/protocol/hp_ipp.c.snprintf-format hplip-3.23.3/protocol/hp_ipp.c ---- hplip-3.23.3/protocol/hp_ipp.c.snprintf-format 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/protocol/hp_ipp.c 2023-05-29 14:21:30.872871575 +0200 -@@ -108,10 +108,10 @@ int addCupsPrinter(char *name, char *dev - goto abort; - } - -- if ( info == NULL ) -- snprintf( info,sizeof(info), name ); -+ if ( info == NULL ) -+ info = name; - -- sprintf(printer_uri, "ipp://localhost/printers/%s", name); -+ snprintf( printer_uri, sizeof(printer_uri), "ipp://localhost/printers/%s", name); - - cupsSetUser("root"); - /* Connect to the HTTP server */ -@@ -514,27 +514,27 @@ int __parsePrinterAttributes(ipp_t *resp - - if ( strcmp(attr_name, "printer-name") == 0 && - val_tag == IPP_TAG_NAME ) { -- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "device-uri") == 0 && - val_tag == IPP_TAG_URI ) { -- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->device_uri, sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-uri-supported") == 0 && - val_tag == IPP_TAG_URI ) { -- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->printer_uri, sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-info") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->info, sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-location") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->location, sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-make-and-model") == 0 && - val_tag == IPP_TAG_TEXT ) { -- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); -+ snprintf(t_printer->make_model, sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL)); - } - else if ( strcmp(attr_name, "printer-state") == 0 && - val_tag == IPP_TAG_ENUM ) { diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index afef121..6777903 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -396,25 +396,3 @@ index 98f57fd..1a74d6d 100755 ("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/ui5/devmgr_ext.py b/ui5/devmgr_ext.py -index 34b4977..6b7a61e 100644 ---- a/ui5/devmgr_ext.py -+++ b/ui5/devmgr_ext.py -@@ -12,7 +12,7 @@ class Ui_MainWindow_Derived(object): - - self.latest_available_version = latest_available_version - self.Is_autoInstaller_distro = Is_autoInstaller_distro -- if self.latest_available_version is not "": -+ if self.latest_available_version != "": - self.tab_3 = QWidget() - self.tab_3.setObjectName("tab_3") - self.label = QLabel(self.tab_3) -@@ -34,7 +34,7 @@ class Ui_MainWindow_Derived(object): - - def retranslateUi(self, MainWindow): - super(Ui_MainWindow_Derived, self).retranslateUi(MainWindow) -- if self.latest_available_version is not "": -+ if self.latest_available_version != "": - self.label.setText(QApplication.translate("MainWindow", "New version of HPLIP-%s is available"%self.latest_available_version, None)) - self.Tabs.setTabText(self.Tabs.indexOf(self.tab_3), QApplication.translate("MainWindow", "Upgrade", None)) - if self.Is_autoInstaller_distro: diff --git a/hplip.spec b/hplip.spec index 1164fa0..c81a746 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.23.8 +Version: 3.23.12 Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG @@ -199,9 +199,6 @@ 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 -# hplip 3.22.6 doesn't use the correct arguments for snprintf -# reported as https://bugs.launchpad.net/hplip/+bug/1982185 -Patch59: hplip-snprintf-format.patch Patch60: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: @@ -238,6 +235,7 @@ Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch +Patch71: hplip-hpaio-c99.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -563,8 +561,6 @@ 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 -# hplip 3.22.6 doesn't use proper arguments for snprintf -%patch -P 59 -p1 -b .snprintf-format %patch -P 60 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: @@ -594,6 +590,7 @@ done # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings +%patch -P 71 -p1 -b .hpaio-c99 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -965,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Jan 08 2024 Zdenek Dohnal - 3.23.12-1 +- 2252302 - hplip-3.23.12 is available + * Tue Oct 03 2023 Zdenek Dohnal - 3.23.8-1 - 2239465 - hplip-3.23.8 is available diff --git a/sources b/sources index 7038e4a..c2976ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.8-repack.tar.gz) = 07df27ee2389f351c917011c939c221e835bbfe30211bfaa69bbb9b0897bb6cc33ab697b25ac4d614a587be60d96d60b681a51c92e4d8ea60043187275004d2e +SHA512 (hplip-3.23.12-repack.tar.gz) = 7e4713e5769a59e686aeada778b91ec65a6f8a2e393bd13473fb77be4ef1e1c470ae355b22ffa13f4f2e2353533f6a855b9749a267543d2dfb1f630724fb7100 From d726b77698ed806fb84e482fb40202548095fbe1 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 9 Jan 2024 15:35:15 +0100 Subject: [PATCH 02/38] Fix build with GCC 14 --- hplip-hpaio-gcc14.patch | 114 ++++++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++- 2 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 hplip-hpaio-gcc14.patch diff --git a/hplip-hpaio-gcc14.patch b/hplip-hpaio-gcc14.patch new file mode 100644 index 0000000..f7d195e --- /dev/null +++ b/hplip-hpaio-gcc14.patch @@ -0,0 +1,114 @@ +diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c +index 57d1dde..3475929 100644 +--- a/scan/sane/hpaio.c ++++ b/scan/sane/hpaio.c +@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_ + ResetDeviceList(&DeviceList); + DevDiscovery(localOnly); + *deviceList = (const SANE_Device **)DeviceList; +- SANE_Device*** devList; ++ const SANE_Device*** devList; + orblite_get_devices(devList, localOnly); + + return SANE_STATUS_GOOD; +diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c +index 2eb7aba..4eaa468 100644 +--- a/scan/sane/orblite.c ++++ b/scan/sane/orblite.c +@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint + }, + + { + SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc + SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint ++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint + }, + + // optResolution, // resolution group +@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc + SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint ++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint + }, + + // optMode, // color/depth group +@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint + }, + + // optSource, +@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint + }, + + // optPaperSize, +@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc + SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint ++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint + }, + + // optPaperSize, +@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = { + SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc + SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size, + SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability) +- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint ++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint + }, + #ifdef NOTDEF + // default template +@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle) + SANE_Auth_Callback authorize; + const SANE_Device *** device_list; + SANE_Bool local_only; ++ void * temp_handle; + + + // Allocate handle, set all handle values to zero +@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle) + if (stat != SANE_STATUS_GOOD) + return stat; + +- stat = g_handle->bb_orblite_open(devicename, &g_handle); ++ temp_handle = g_handle; ++ stat = g_handle->bb_orblite_open(devicename, &temp_handle); ++ g_handle = temp_handle; + if (stat == SANE_STATUS_GOOD) + *handle = g_handle; + diff --git a/hplip.spec b/hplip.spec index c81a746..4dbb361 100644 --- a/hplip.spec +++ b/hplip.spec @@ -235,7 +235,9 @@ Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 Patch70: hplip-use-raw-strings.patch -Patch71: hplip-hpaio-c99.patch +# FTBFS GCC 14 +# https://bugs.launchpad.net/hplip/+bug/2048780 +Patch71: hplip-hpaio-gcc14.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -590,7 +592,9 @@ done # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 %patch -P 70 -p1 -b .raw-strings -%patch -P 71 -p1 -b .hpaio-c99 +# FTBFS GCC 14 +# https://bugs.launchpad.net/hplip/+bug/2048780 +%patch -P 71 -p1 -b .hpaio-gcc14 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 From 187b064062ee720212f6462ff182e2813f432ded Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 19 Jan 2024 09:23:18 +0100 Subject: [PATCH 03/38] add fallback url to hp-plugin-download --- hp-plugin.in | 28 ++++++++++++++++++++++------ hplip.spec | 5 ++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index c6de68a..a125970 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -9,12 +9,20 @@ then exit 1 fi -# link to the plugin -PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${VER}-plugin.run" - # plugin name PLUGIN_FILE="hplip-${VER}-plugin.run" +download() +{ + SOURCE="$1" + + @bindir@/curl --create-dir -O --output-dir ~/.hplip ${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/${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 if [ ! -d ~/.hplip ] @@ -22,11 +30,19 @@ then @bindir@/mkdir ~/.hplip || (@bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1) fi -@bindir@/curl --create-dir -O --output-dir ~/.hplip ${PLUGIN_SOURCE} +for link in ${PLUGIN_SOURCE} ${FALLBACK_SOURCE} +do + download ${link} -if [ ! -f ~/.hplip/${PLUGIN_FILE} ] + if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "xtext/x-shellscript" + then + break + fi +done + +if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "x" then - @bindir@/echo "The downloaded file does not exist - error during downloading, exiting..." + @bindir@/echo "The downloaded file does not exist or is not a shell script - error during downloading, exiting..." exit 1 fi diff --git a/hplip.spec b/hplip.spec index 4dbb361..4c8ed35 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 1%{?dist} +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 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 19 2024 Zdenek Dohnal - 3.23.12-2 +- add fallback url to hp-plugin-download + * Mon Jan 08 2024 Zdenek Dohnal - 3.23.12-1 - 2252302 - hplip-3.23.12 is available From 639b6e999f595ca5c5d58bb337b16b34cd3fdfeb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 22:11:36 +0000 Subject: [PATCH 04/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 4c8ed35..1d06126 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 2%{?dist} +Release: 3%{?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 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 3.23.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Zdenek Dohnal - 3.23.12-2 - add fallback url to hp-plugin-download From dabcff0237f93f88e260a089ed7d069c2d43ffa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 21:45:51 +0000 Subject: [PATCH 05/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 1d06126..0e06590 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 3%{?dist} +Release: 4%{?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 @@ -966,6 +966,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 3.23.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 3.23.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a13fbe55d3df2dee8a449391171ec2ceb6991aed Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 18 Mar 2024 16:07:00 +0100 Subject: [PATCH 06/38] 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback --- hplip-locale-format.patch | 13 +++++++++++++ hplip.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-locale-format.patch 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.spec b/hplip.spec index 0e06590..f477533 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 4%{?dist} +Release: 5%{?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 @@ -238,6 +238,9 @@ Patch70: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 Patch71: hplip-hpaio-gcc14.patch +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +Patch72: hplip-locale-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -595,6 +598,9 @@ done # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 %patch -P 71 -p1 -b .hpaio-gcc14 +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +%patch -P 72 -p1 -b .locale-format # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -966,6 +972,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 18 2024 Zdenek Dohnal - 3.23.12-5 +- 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback + * Wed Jan 24 2024 Fedora Release Engineering - 3.23.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d5743e6d63b9d09c92223bbe159ecec5b0338464 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 21 Mar 2024 14:13:55 +0100 Subject: [PATCH 07/38] hp-plugin-download - curl removed --create-dir parameter --- hp-plugin.in | 2 +- hplip.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index a125970..48ab3b9 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,7 +16,7 @@ download() { SOURCE="$1" - @bindir@/curl --create-dir -O --output-dir ~/.hplip ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE} } # link to the plugin diff --git a/hplip.spec b/hplip.spec index f477533..5fb0c82 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 5%{?dist} +Release: 6%{?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 @@ -972,6 +972,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Mar 21 2024 Zdenek Dohnal - 3.23.12-6 +- hp-plugin-download - curl removed --create-dir parameter + * Mon Mar 18 2024 Zdenek Dohnal - 3.23.12-5 - 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback From 0b780c93e6e2bc053010fd9f2ee730c998235815 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 15 Apr 2024 15:09:27 +0200 Subject: [PATCH 08/38] Update gating.yaml --- gating.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/gating.yaml b/gating.yaml index de5c323..3c35f7d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -21,7 +21,5 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional} From 3f33fc6240ae9e4b8aac4b74f0df84f18365248c Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 7 May 2024 17:20:13 +0200 Subject: [PATCH 09/38] Remove additional License tags, merged into one --- hplip.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hplip.spec b/hplip.spec index 5fb0c82..15ceb64 100644 --- a/hplip.spec +++ b/hplip.spec @@ -334,14 +334,12 @@ drivers for HP printers and multi-function peripherals. %package common Summary: Files needed by the HPLIP printer and scanner drivers -License: GPLv2+ %description common Files needed by the HPLIP printer and scanner drivers. %package libs Summary: HPLIP libraries -License: GPLv2+ and MIT Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: python3 @@ -351,7 +349,6 @@ Libraries needed by HPLIP. %if 0%{?rhel} <= 8 || 0%{?fedora} %package gui Summary: HPLIP graphical tools -License: BSD BuildRequires: libappstream-glib # for avahi-browse - looks for devices on local network @@ -372,7 +369,6 @@ HPLIP graphical tools. %package -n libsane-hpaio Summary: SANE driver for scanners in HP's multi-function devices -License: GPLv2+ Requires: sane-backends Requires: %{name}-libs%{?_isa} = %{version}-%{release} From 19b7cb06147db4016bb9ed4dbc9756eb2749abd2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 23 May 2024 13:40:39 +0200 Subject: [PATCH 10/38] plans: fix url --- plans/tier1-internal.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf index 4f7e4b3..0e4d1c9 100644 --- a/plans/tier1-internal.fmf +++ b/plans/tier1-internal.fmf @@ -3,7 +3,7 @@ discover: - name: rhel how: fmf filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/hplip + url: https://pkgs.devel.redhat.com/git/tests/hplip execute: how: tmt adjust: From 48d1741f8d75da563d3d10a855e9ec98c9b3ec5b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 10:31:56 +0200 Subject: [PATCH 11/38] Rebuilt for Python 3.13 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 15ceb64..879db66 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 6%{?dist} +Release: 7%{?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 @@ -968,6 +968,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jun 07 2024 Python Maint - 3.23.12-7 +- Rebuilt for Python 3.13 + * Thu Mar 21 2024 Zdenek Dohnal - 3.23.12-6 - hp-plugin-download - curl removed --create-dir parameter From dbdc2cce2a673564afd55429ea95e655b639205b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 09:21:06 +0000 Subject: [PATCH 12/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 879db66..9e48015 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 7%{?dist} +Release: 8%{?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 @@ -968,6 +968,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 3.23.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 3.23.12-7 - Rebuilt for Python 3.13 From c78ccf59f8cda28f09402350909dbfe0cc2e7011 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 18 Jun 2024 16:31:50 +0200 Subject: [PATCH 13/38] 2292623 - hplip-3.24.4 is available --- .gitignore | 1 + hplip-no-readfp.patch | 26 -------------------------- hplip.spec | 25 +++++++++++-------------- sources | 2 +- 4 files changed, 13 insertions(+), 41 deletions(-) delete mode 100644 hplip-no-readfp.patch diff --git a/.gitignore b/.gitignore index 21ead10..e99ac7f 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.5-repack.tar.gz /hplip-3.23.8-repack.tar.gz /hplip-3.23.12-repack.tar.gz +/hplip-3.24.4-repack.tar.gz diff --git a/hplip-no-readfp.patch b/hplip-no-readfp.patch deleted file mode 100644 index 35108e3..0000000 --- a/hplip-no-readfp.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/base/g.py b/base/g.py -index 0aa0e2e..96b3131 100644 ---- a/base/g.py -+++ b/base/g.py -@@ -128,7 +128,7 @@ class ConfigBase(object): - try: - fp = open(self.filename, "r") - try: -- self.conf.readfp(fp) -+ self.conf.read_file(fp, self.filename) - except configparser.MissingSectionHeaderError: - print("") - log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename) -diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py -index 3110a0f..3761f89 100644 ---- a/ui5/devmgr5.py -+++ b/ui5/devmgr5.py -@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): - - hplip_conf = configparser.ConfigParser() - fp = open("/etc/hp/hplip.conf", "r") -- hplip_conf.readfp(fp) -+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf") - fp.close() - - try: diff --git a/hplip.spec b/hplip.spec index 9e48015..bb82ef9 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.23.12 -Release: 8%{?dist} +Version: 3.24.4 +Release: 1%{?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 @@ -229,18 +229,15 @@ Patch67: hplip-fix-parsing-lpstat.patch # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # it should not hang. Patch68: hplip-plugin-curl.patch -# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() -# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 -Patch69: hplip-no-readfp.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 -Patch70: hplip-use-raw-strings.patch +Patch69: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -Patch71: hplip-hpaio-gcc14.patch +Patch70: hplip-hpaio-gcc14.patch # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -Patch72: hplip-locale-format.patch +Patch71: hplip-locale-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -585,18 +582,15 @@ done # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... %patch -P 68 -p1 -b .curl-switch -# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp() -# Upstream https://bugs.launchpad.net/hplip/+bug/2028001 -%patch -P 69 -p1 -b .no-readfp # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 -%patch -P 70 -p1 -b .raw-strings +%patch -P 69 -p1 -b .raw-strings # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -%patch -P 71 -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 72 -p1 -b .locale-format +%patch -P 71 -p1 -b .locale-format # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -968,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 23 2024 Zdenek Dohnal - 3.24.4-1 +- 2292623 - hplip-3.24.4 is available + * Thu Jul 18 2024 Fedora Release Engineering - 3.23.12-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index c2976ff..d883a96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.23.12-repack.tar.gz) = 7e4713e5769a59e686aeada778b91ec65a6f8a2e393bd13473fb77be4ef1e1c470ae355b22ffa13f4f2e2353533f6a855b9749a267543d2dfb1f630724fb7100 +SHA512 (hplip-3.24.4-repack.tar.gz) = 7a1c0024ec3703a9e36ef50c873c7c959eb0be646e53f517d9234b5a961ef7a7a0a646bc28dee533d3b12583b12f527d5ac2bd457272053ddc4b22e745b57b63 From 46b95935766e634c1809101d431ffda8e192f931 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 06:50:48 +0200 Subject: [PATCH 14/38] Add rpminspect.yaml to waive badfuncs of rpminspect --- rpminspect.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..30264bb --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,10 @@ +--- +badfuncs: + allowed: + # printers usually do not live on networks which would require + # IPv6 due having too many hosts on one network, so it is not + # a priority to have IPv6 support. + # It is reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=2275938 + /usr/lib64/libhpmud.so.*: + - gethostbyname + - inet_addr From 489909d19a621a93c2f96e9a79279d2eefe01bb8 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 08:46:15 +0200 Subject: [PATCH 15/38] rpminspect.yaml: include /usr/lib/ too --- rpminspect.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpminspect.yaml b/rpminspect.yaml index 30264bb..3092346 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -5,6 +5,6 @@ badfuncs: # IPv6 due having too many hosts on one network, so it is not # a priority to have IPv6 support. # It is reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=2275938 - /usr/lib64/libhpmud.so.*: + /usr/lib*/libhpmud.so.*: - gethostbyname - inet_addr From ee555b54afda4badbb5044fa36235460ed3ec111 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 Jul 2024 08:50:57 +0200 Subject: [PATCH 16/38] Update plans --- gating.yaml | 6 +++--- plans.fmf | 37 +++++++++++++++++++++++++++++++++++++ plans/public.fmf | 6 ------ plans/tier1-internal.fmf | 12 ------------ 4 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 plans.fmf delete mode 100644 plans/public.fmf delete mode 100644 plans/tier1-internal.fmf diff --git a/gating.yaml b/gating.yaml index 3c35f7d..71d105b 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,7 +4,7 @@ product_versions: decision_context: bodhi_update_push_testing subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional} #Rawhide --- !Policy @@ -13,7 +13,7 @@ product_versions: decision_context: bodhi_update_push_stable subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/public.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional} #gating rhel --- !Policy @@ -21,5 +21,5 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} - - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional} diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..deb443d --- /dev/null +++ b/plans.fmf @@ -0,0 +1,37 @@ +/tier1-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier1/internal + +/tier1-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier1/public + +/tier2-tier3-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier2-tier3/internal + +/tier2-tier3-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/tier2-tier3/public + + +/others-internal: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/others/internal + +/others-public: + plan: + import: + url: https://src.fedoraproject.org/tests/hplip.git + name: /plans/others/public + diff --git a/plans/public.fmf b/plans/public.fmf deleted file mode 100644 index 8dee615..0000000 --- a/plans/public.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: Test plan that runs all tests from hplip tests repo. -discover: - how: fmf - url: https://src.fedoraproject.org/tests/hplip.git -execute: - how: tmt diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf deleted file mode 100644 index 0e4d1c9..0000000 --- a/plans/tier1-internal.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: CI plan, picks internal Tier1 tests, runs in beakerlib. -discover: - - name: rhel - how: fmf - filter: 'tier: 1' - url: https://pkgs.devel.redhat.com/git/tests/hplip -execute: - how: tmt -adjust: - enabled: false - when: distro == centos-stream or distro == fedora - because: They don't have access to internal repos. From 25bd7772e9e14c4dd71fd472b89b4c162fd58c23 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 06:01:15 +0000 Subject: [PATCH 17/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index bb82ef9..a0db0ff 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 1%{?dist} +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 @@ -962,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 3.24.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Jul 23 2024 Zdenek Dohnal - 3.24.4-1 - 2292623 - hplip-3.24.4 is available From b6d5d449574dd35347a4870f70f96b4ec53d4de0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 24 Jan 2025 10:34:06 +0100 Subject: [PATCH 18/38] fix FTBFS (fedora#2340616) --- hplip-gcc15-stdc23.patch | 13 +++++++++++++ hplip.spec | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 hplip-gcc15-stdc23.patch diff --git a/hplip-gcc15-stdc23.patch b/hplip-gcc15-stdc23.patch new file mode 100644 index 0000000..a18f245 --- /dev/null +++ b/hplip-gcc15-stdc23.patch @@ -0,0 +1,13 @@ +diff --git a/scan/sane/ledmi.h b/scan/sane/ledmi.h +index a987c5d..f72847b 100644 +--- a/scan/sane/ledmi.h ++++ b/scan/sane/ledmi.h +@@ -162,7 +162,7 @@ struct ledm_session + int bb_open(struct ledm_session*); + int bb_close(struct ledm_session*); + int bb_get_parameters(struct ledm_session*, SANE_Parameters*, int); +-int bb_is_paper_in_adf(); /* 0 = no paper in adf, 1 = paper in adf, -1 = error */ ++int bb_is_paper_in_adf(struct ledm_session*); /* 0 = no paper in adf, 1 = paper in adf, -1 = error */ + SANE_Status bb_start_scan(struct ledm_session*); + int bb_get_image_data(struct ledm_session*, int); + int bb_end_page(struct ledm_session*, int); diff --git a/hplip.spec b/hplip.spec index a0db0ff..6ef3b80 100644 --- a/hplip.spec +++ b/hplip.spec @@ -238,6 +238,9 @@ 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 +Patch72: hplip-gcc15-stdc23.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -591,6 +594,8 @@ done # 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 72 -p1 -b .gcc-strc23 # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -962,6 +967,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Jan 24 2025 Zdenek Dohnal - 3.24.4-2 +- fix FTBFS (fedora#2340616) + * Fri Jan 17 2025 Fedora Release Engineering - 3.24.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 690f2e34e856c42477e3fcf589c9513d50446d1f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 11 Feb 2025 11:35:11 +0100 Subject: [PATCH 19/38] Require setup for lp group --- hplip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 6ef3b80..8f09058 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 2%{?dist} +Release: 3%{?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 @@ -316,6 +316,8 @@ Requires: python3-dbus %if 0%{?rhel} <= 8 || 0%{?fedora} Requires: python3-pillow %endif +# user+group lp +Requires: setup # /usr/lib/udev/rules.d Requires: systemd # 1788643 - Fedora minimal does not ship tar by default @@ -967,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Feb 11 2025 Zdenek Dohnal - 3.24.4-3 +- require setup because of lp group + * Fri Jan 24 2025 Zdenek Dohnal - 3.24.4-2 - fix FTBFS (fedora#2340616) From 4a5cbec2d343c943d625d1440a67f3bb5a6e4ff9 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Sat, 1 Mar 2025 17:20:18 +0000 Subject: [PATCH 20/38] curl needs --location to follow redirects In the patch, only one of the curl commands is using the --location argument to direct curl to follow 301 redirects. All curl invocations need to use that argument. Signed-off-by: Brian J. Murrell --- hplip-plugin-curl.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hplip-plugin-curl.patch b/hplip-plugin-curl.patch index 023e528..380ce9b 100644 --- a/hplip-plugin-curl.patch +++ b/hplip-plugin-curl.patch @@ -32,7 +32,7 @@ index 56683fb..031ceec 100755 - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) + curl = utils.which("curl", True) + if curl: -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) - log.debug("wget returned: %d" % status) @@ -43,7 +43,7 @@ index 56683fb..031ceec 100755 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 --cache=off -P %s %s" % (wget,self.__plugin_path,src) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) @@ -52,7 +52,7 @@ index 56683fb..031ceec 100755 status, filename = utils.download_from_network(digsig_url, digsig_file, True) else: - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,digsig_url) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl, self.__plugin_path,digsig_url) ++ cmd = "%s --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: From b549b17216ae294de8b2740e780800af5e390761 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 3 Mar 2025 14:32:38 +0100 Subject: [PATCH 21/38] enable following links with curl in all use cases (fedora#2349177) --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 8f09058..f3011a5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 3%{?dist} +Release: 4%{?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 @@ -969,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 03 2025 Zdenek Dohnal - 3.24.4-4 +- enable following links with curl in all use cases (fedora#2349177) + * Tue Feb 11 2025 Zdenek Dohnal - 3.24.4-3 - require setup because of lp group From c5b4c3d5cb00abc83f1d0aba435cf167dff539be Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 2 Apr 2025 09:35:29 +0200 Subject: [PATCH 22/38] hp-plugin-download did not follow redirections and was missing '-o' in grep --- hp-plugin.in | 6 +++--- hplip.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index 48ab3b9..1c0a827 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,7 +16,7 @@ download() { SOURCE="$1" - @bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip --location ${SOURCE} } # link to the plugin @@ -34,13 +34,13 @@ for link in ${PLUGIN_SOURCE} ${FALLBACK_SOURCE} do download ${link} - if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "xtext/x-shellscript" + if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep -o 'text/x-shellscript')" = "xtext/x-shellscript" then break fi done -if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "x" +if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep -o 'text/x-shellscript')" = "x" then @bindir@/echo "The downloaded file does not exist or is not a shell script - error during downloading, exiting..." exit 1 diff --git a/hplip.spec b/hplip.spec index f3011a5..bf91d8a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.24.4 -Release: 4%{?dist} +Release: 5%{?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 @@ -969,6 +969,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 02 2025 Zdenek Dohnal - 3.24.4-5 +- hp-plugin-download did not follow redirections and was missing '-o' in grep + * Mon Mar 03 2025 Zdenek Dohnal - 3.24.4-4 - enable following links with curl in all use cases (fedora#2349177) From ea1621b02f742057f7efbe4cab4b38888e83505a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 2 Apr 2025 17:26:07 +0200 Subject: [PATCH 23/38] Format QDateTime strings in Status History table, elsewhere --- hplip-format-qdatetime.patch | 53 ++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++++++ 2 files changed, 61 insertions(+) create mode 100644 hplip-format-qdatetime.patch diff --git a/hplip-format-qdatetime.patch b/hplip-format-qdatetime.patch new file mode 100644 index 0000000..9517e65 --- /dev/null +++ b/hplip-format-qdatetime.patch @@ -0,0 +1,53 @@ +From 839a216f17ce17a5667eecd54de2a70b1383df2c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Wed, 5 Jan 2022 21:57:06 -0500 +Subject: [PATCH 1/2] Info dlg: Use QDateTime.toString() + +--- + ui5/infodialog.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui5/infodialog.py b/ui5/infodialog.py +index 0de62fb..eaa846d 100644 +--- a/ui5/infodialog.py ++++ b/ui5/infodialog.py +@@ -186,7 +186,7 @@ class InfoDialog(QDialog, Ui_Dialog): + for row, h in enumerate(history): + dt = QDateTime() + dt.setTime_t(int(h.timedate)) +- dt = value_str(dt) ++ dt = value_str(dt.toString()) + + ess = device.queryString(h.event_code, 0) + +-- +2.33.1 + +From f6e7ab1542afe7fbcd2d29b6cb15b97484e3779c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Wed, 5 Jan 2022 21:56:39 -0500 +Subject: [PATCH 2/2] value_str: Handle QDateTime correctly + +--- + ui5/ui_utils.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ui5/ui_utils.py b/ui5/ui_utils.py +index caba339..225ca1c 100644 +--- a/ui5/ui_utils.py ++++ b/ui5/ui_utils.py +@@ -105,7 +105,10 @@ def value_str(data): + if data is None: + return "" + try: +- if not PY3: ++ if PY3: ++ if isinstance(data, QDateTime): ++ data = data.toString() ++ else: + try: + data = data.toString() + except AttributeError as e: +-- +2.33.1 + diff --git a/hplip.spec b/hplip.spec index bf91d8a..bbe9a4e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -241,6 +241,9 @@ Patch71: hplip-locale-format.patch # function prototype did not specify argument's data types # https://bugs.launchpad.net/hplip/+bug/2096650 Patch72: hplip-gcc15-stdc23.patch +# status history table shows unformatted QDateTime values +# https://bugs.launchpad.net/hplip/+bug/1956547 +Patch73: hplip-format-qdatetime.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -598,6 +601,8 @@ done %patch -P 71 -p1 -b .locale-format # https://bugs.launchpad.net/hplip/+bug/2096650 %patch -P 72 -p1 -b .gcc-strc23 +# https://bugs.launchpad.net/hplip/+bug/1956547 +%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 @@ -969,6 +974,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 02 2025 FeRD (Frank Dana) - 3.24.4-5 +- Format QDateTime strings in Status History table, elsewhere + * Wed Apr 02 2025 Zdenek Dohnal - 3.24.4-5 - hp-plugin-download did not follow redirections and was missing '-o' in grep From 8104c07571940e12c97025aeb6a61f5d0d79cf91 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 3 Apr 2025 14:47:14 +0200 Subject: [PATCH 24/38] Use weak rich dependency for hplip-gui --- hplip.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hplip.spec b/hplip.spec index bbe9a4e..125041d 100644 --- a/hplip.spec +++ b/hplip.spec @@ -296,6 +296,10 @@ BuildRequires: sane-backends-devel # macros: %%{_tmpfilesdir}, %%{_udevrulesdir} BuildRequires: systemd +%if 0%{?fedora} || 0%{?rhel} <= 8 +Recommends: (%{name}-gui%{?_isa} = %{version}-%{release} if qt5-qtbase-gui%{?_isa}) +Suggests: hplip-gui +%endif # uses avahi-browse for discovering IPP-over-USB printers Recommends: avahi-tools # 1733449 - Scanner on an HP AIO printer is not detected unless libsane-hpaio is installed @@ -974,6 +978,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.4-5 +- Use weak rich dependency for hplip-gui + * Wed Apr 02 2025 FeRD (Frank Dana) - 3.24.4-5 - Format QDateTime strings in Status History table, elsewhere From f08eed6ffd4dd009c7d80833727e18345fbf2678 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 3 Apr 2025 14:22:17 -0400 Subject: [PATCH 25/38] hp-plugin: Use rpm queryformat to get version Eliminates dependency on gawk. --- hp-plugin.in | 4 ++-- hplip.spec | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index 1c0a827..5bdbab0 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -1,7 +1,7 @@ #!/usr/bin/bash -# get version from base hplip rpm - it is always in the second column -VER=$(@bindir@/rpm -q hplip | @bindir@/awk -F '-' '{print $2}') +# get version from base hplip rpm +VER=$(@bindir@/rpm -q hplip --queryformat='%{version}') if test "x$VER" = "x" then diff --git a/hplip.spec b/hplip.spec index 125041d..4baee16 100644 --- a/hplip.spec +++ b/hplip.spec @@ -313,8 +313,6 @@ Requires: cups # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... Requires: curl -# for bash script acting as hp-plugin (Source7) -Requires: gawk # set require directly to /usr/bin/gpg, because gnupg2 and gnupg ships it, # but gnupg will be deprecated in the future Requires: %{_bindir}/gpg @@ -978,6 +976,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.5-5 +- hp-plugin: Use rpm queryformat to get version (no gawk dependency) + * Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.4-5 - Use weak rich dependency for hplip-gui From 4cfd5e5ec3520d9d9af8c01e25258391effbac5b Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 11 Apr 2025 12:04:43 +0200 Subject: [PATCH 26/38] hplip-3.25.2 is available (fedora#2353147) --- .gitignore | 1 + hplip-covscan.patch | 138 +++++++------- hplip-pcardext-disable.patch | 25 +-- hplip-strncpy.patch | 31 ++-- hplip-use-raw-strings.patch | 339 ++++------------------------------- hplip.spec | 7 +- sources | 2 +- 7 files changed, 131 insertions(+), 412 deletions(-) diff --git a/.gitignore b/.gitignore index e99ac7f..c4e3a17 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,4 @@ hplip-3.10.6.tar.gz /hplip-3.23.8-repack.tar.gz /hplip-3.23.12-repack.tar.gz /hplip-3.24.4-repack.tar.gz +/hplip-3.25.2-repack.tar.gz diff --git a/hplip-covscan.patch b/hplip-covscan.patch index 6c88581..29384dc 100644 --- a/hplip-covscan.patch +++ b/hplip-covscan.patch @@ -1,6 +1,6 @@ -diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c ---- hplip-3.23.3/common/utils.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/common/utils.c 2023-05-29 13:58:10.969395214 +0200 +diff -up hplip-3.25.2/common/utils.c.covscan hplip-3.25.2/common/utils.c +--- hplip-3.25.2/common/utils.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/common/utils.c 2025-04-11 10:21:58.034950818 +0200 @@ -1,5 +1,9 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE @@ -12,10 +12,10 @@ diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c #include #include #include -diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c ---- hplip-3.23.3/io/hpmud/hpmud.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/hpmud.c 2023-05-29 13:58:10.970395208 +0200 -@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_ +diff -up hplip-3.25.2/io/hpmud/hpmud.c.covscan hplip-3.25.2/io/hpmud/hpmud.c +--- hplip-3.25.2/io/hpmud/hpmud.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/hpmud.c 2025-04-11 10:21:58.035151792 +0200 +@@ -769,6 +769,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_ } strncpy(ds->uri, msp->device[dd].uri, sizeof(ds->uri)); @@ -23,9 +23,9 @@ diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c ds->io_mode = msp->device[dd].io_mode; ds->channel_cnt = msp->device[dd].channel_cnt; ds->mlc_up = msp->device[dd].mlc_up; -diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c ---- hplip-3.23.3/io/hpmud/jd.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/jd.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/jd.c.covscan hplip-3.25.2/io/hpmud/jd.c +--- hplip-3.25.2/io/hpmud/jd.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/jd.c 2025-04-11 10:21:58.035328288 +0200 @@ -31,6 +31,7 @@ #endif @@ -34,9 +34,9 @@ diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c #include "hpmud.h" #include "hpmudi.h" -diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c ---- hplip-3.23.3/io/hpmud/model.c.covscan 2023-05-29 13:58:10.958395279 +0200 -+++ hplip-3.23.3/io/hpmud/model.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/model.c.covscan hplip-3.25.2/io/hpmud/model.c +--- hplip-3.25.2/io/hpmud/model.c.covscan 2025-04-11 10:21:58.023885145 +0200 ++++ hplip-3.25.2/io/hpmud/model.c 2025-04-11 10:21:58.035487541 +0200 @@ -117,6 +117,7 @@ static int ReadConfig() if (rcbuf[0] == '[') { @@ -53,9 +53,9 @@ diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c break; /* done */ } } -diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c ---- hplip-3.23.3/io/hpmud/musb.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/musb.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/musb.c.covscan hplip-3.25.2/io/hpmud/musb.c +--- hplip-3.25.2/io/hpmud/musb.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/musb.c 2025-04-11 10:21:58.035717762 +0200 @@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch len = size-1; /* leave byte for zero termination */ if (len > 2) @@ -65,9 +65,9 @@ diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c ---- hplip-3.23.3/io/hpmud/pp.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/io/hpmud/pp.c 2023-05-29 13:58:10.970395208 +0200 +diff -up hplip-3.25.2/io/hpmud/pp.c.covscan hplip-3.25.2/io/hpmud/pp.c +--- hplip-3.25.2/io/hpmud/pp.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/io/hpmud/pp.c 2025-04-11 10:21:58.035977040 +0200 @@ -632,7 +632,7 @@ static int device_id(int fd, char *buffe len = size-1; /* leave byte for zero termination */ if (len > 2) @@ -77,9 +77,9 @@ diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c buffer[len]=0; DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); -diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am ---- hplip-3.23.3/Makefile.am.covscan 2023-05-29 13:58:10.944395361 +0200 -+++ hplip-3.23.3/Makefile.am 2023-05-29 13:58:10.969395214 +0200 +diff -up hplip-3.25.2/Makefile.am.covscan hplip-3.25.2/Makefile.am +--- hplip-3.25.2/Makefile.am.covscan 2025-04-11 10:21:58.010155532 +0200 ++++ hplip-3.25.2/Makefile.am 2025-04-11 10:22:52.826357214 +0200 @@ -3,7 +3,7 @@ # # (c) 2004-2015 Copyright HP Development Company, LP @@ -90,7 +90,7 @@ diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\" @@ -310,7 +310,7 @@ dist_pcard_DATA = pcard/__init__.py pcar - pcardextdir = $(pyexecdir) + pcardextdir = $(PYTHONEXECDIR) pcardext_LTLIBRARIES = pcardext.la pcardext_la_LDFLAGS = -module -avoid-version -pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c @@ -107,9 +107,9 @@ diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am libhpipp_la_LDFLAGS = -version-info 0:1:0 libhpipp_la_LIBADD = libhpmud.la -diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c ---- hplip-3.23.3/pcard/fat.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/pcard/fat.c 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/pcard/fat.c.covscan hplip-3.25.2/pcard/fat.c +--- hplip-3.25.2/pcard/fat.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/pcard/fat.c 2025-04-11 10:21:58.036450105 +0200 @@ -519,14 +519,17 @@ int FatFreeSpace(void) int FatDiskAttributes( PHOTO_CARD_ATTRIBUTES * pa ) @@ -139,9 +139,9 @@ diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c cwd.StartSector = ConvertClusterToSector(fa.StartCluster); cwd.CurrSector = cwd.StartSector; cwd.StartCluster = fa.StartCluster; -diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp ---- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/prnt/hpijs/context2.cpp.covscan hplip-3.25.2/prnt/hpijs/context2.cpp +--- hplip-3.25.2/prnt/hpijs/context2.cpp.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/context2.cpp 2025-04-11 10:21:58.036656862 +0200 @@ -1302,6 +1302,7 @@ DRIVER_ERROR PrintContext::SelectDevice if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize)) { @@ -150,9 +150,9 @@ diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/co } thePrinter = pPFI->CreatePrinter (pSS, familyHandle); if (thePrinter->constructor_error != NO_ERROR) -diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hpijs/systemservices.cpp ---- hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan 2023-03-28 09:26:27.000000000 +0200 -+++ hplip-3.23.3/prnt/hpijs/systemservices.cpp 2023-05-29 13:58:10.971395203 +0200 +diff -up hplip-3.25.2/prnt/hpijs/systemservices.cpp.covscan hplip-3.25.2/prnt/hpijs/systemservices.cpp +--- hplip-3.25.2/prnt/hpijs/systemservices.cpp.covscan 2025-02-27 13:12:44.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/systemservices.cpp 2025-04-11 10:21:58.036891582 +0200 @@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM IOMode.bDevID =IM.bDevID && IOMode.bDevID; @@ -164,10 +164,10 @@ diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hp } APDK_END_NAMESPACE -diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hppsfilter.c ---- hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/prnt/hpps/hppsfilter.c 2023-05-29 13:58:10.972395197 +0200 -@@ -274,13 +274,13 @@ static void WriteHeader(char **argument) +diff -up hplip-3.25.2/prnt/hpps/hppsfilter.c.covscan hplip-3.25.2/prnt/hpps/hppsfilter.c +--- hplip-3.25.2/prnt/hpps/hppsfilter.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpps/hppsfilter.c 2025-04-11 10:21:58.037072084 +0200 +@@ -329,13 +329,13 @@ static void WriteHeader(char **argument) /* Writing Header Information argument[1] = JOB ID , argument[2]= USERNAME, argument[3] = TITLE */ hpwrite("\x1b%-12345X@PJL JOBNAME=", strlen("\x1b%-12345X@PJL JOBNAME=")); @@ -184,9 +184,9 @@ diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hpps hpwrite(buffer, strlen(buffer)); fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n"); return; -diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h ---- hplip-3.23.3/protocol/hp_ipp.h.covscan 2023-05-29 13:58:10.972395197 +0200 -+++ hplip-3.23.3/protocol/hp_ipp.h 2023-05-29 13:59:03.645085468 +0200 +diff -up hplip-3.25.2/protocol/hp_ipp.h.covscan hplip-3.25.2/protocol/hp_ipp.h +--- hplip-3.25.2/protocol/hp_ipp.h.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/protocol/hp_ipp.h 2025-04-11 10:21:58.037239020 +0200 @@ -168,6 +168,11 @@ HPIPP_RESULT parseResponseHeader(char* h HPIPP_RESULT prepend_http_header(raw_ipp *raw_request,const char *resource); enum HPMUD_RESULT sendUSBRequest(char *buf, int size, raw_ipp *responseptr, char * device_uri); @@ -199,9 +199,9 @@ diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h ipp_t * createFaxDetailRequest(const char *printer_name); ipp_t * getDeviceFaxModemAttributes(char* device_uri,char* printer_name, int *count); -diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm.c ---- hplip-3.23.3/scan/sane/bb_ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/bb_ledm.c 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/bb_ledm.c.covscan hplip-3.25.2/scan/sane/bb_ledm.c +--- hplip-3.25.2/scan/sane/bb_ledm.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/bb_ledm.c 2025-04-11 10:21:58.037378913 +0200 @@ -26,6 +26,7 @@ # include "http.h" # include "xml.h" @@ -210,9 +210,9 @@ diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm # include -diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h ---- hplip-3.23.3/scan/sane/common.h.covscan 2023-05-29 13:58:10.727396637 +0200 -+++ hplip-3.23.3/scan/sane/common.h 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/common.h.covscan hplip-3.25.2/scan/sane/common.h +--- hplip-3.25.2/scan/sane/common.h.covscan 2025-04-11 10:21:57.806326475 +0200 ++++ hplip-3.25.2/scan/sane/common.h 2025-04-11 10:21:58.037532413 +0200 @@ -36,7 +36,7 @@ #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) @@ -222,9 +222,9 @@ diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h #define BUG_DUMP(data, size) bugdump((data), (size)) #define BUG_SZ(args...) {syslog(LOG_ERR, args); DBG(2, args);} -diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c ---- hplip-3.23.3/scan/sane/escl.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/escl.c 2023-05-29 13:58:10.972395197 +0200 +diff -up hplip-3.25.2/scan/sane/escl.c.covscan hplip-3.25.2/scan/sane/escl.c +--- hplip-3.25.2/scan/sane/escl.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/escl.c 2025-04-11 10:21:58.037677793 +0200 @@ -849,7 +849,7 @@ SANE_Status escl_control_option(SANE_Han //DBG8("escl_control_option (option=%s) action=%d\n", ps->option[option].name, action); if (stat != SANE_STATUS_GOOD) @@ -243,9 +243,9 @@ diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c return; } -diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c ---- hplip-3.23.3/scan/sane/http.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/http.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/http.c.covscan hplip-3.25.2/scan/sane/http.c +--- hplip-3.25.2/scan/sane/http.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/http.c 2025-04-11 10:21:58.037859247 +0200 @@ -36,6 +36,7 @@ #include #include @@ -254,9 +254,9 @@ diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c #include "hpmud.h" #include "http.h" -diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c ---- hplip-3.23.3/scan/sane/io.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/io.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/io.c.covscan hplip-3.25.2/scan/sane/io.c +--- hplip-3.25.2/scan/sane/io.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/io.c 2025-04-11 10:21:58.037998005 +0200 @@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden" if (dbus_error_is_set(&dbus_err)) @@ -284,9 +284,9 @@ diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c return 0; } -diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c ---- hplip-3.23.3/scan/sane/ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/ledm.c 2023-05-29 13:58:10.973395191 +0200 +diff -up hplip-3.25.2/scan/sane/ledm.c.covscan hplip-3.25.2/scan/sane/ledm.c +--- hplip-3.25.2/scan/sane/ledm.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/ledm.c 2025-04-11 10:21:58.038131991 +0200 @@ -813,7 +813,7 @@ SANE_Status ledm_control_option(SANE_Han if (stat != SANE_STATUS_GOOD) @@ -305,9 +305,9 @@ diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c return; } -diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell.c ---- hplip-3.23.3/scan/sane/marvell.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/marvell.c 2023-05-29 13:58:10.976395173 +0200 +diff -up hplip-3.25.2/scan/sane/marvell.c.covscan hplip-3.25.2/scan/sane/marvell.c +--- hplip-3.25.2/scan/sane/marvell.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/marvell.c 2025-04-11 10:21:58.038309394 +0200 @@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_se if (!ps->ip_handle) @@ -407,9 +407,9 @@ diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell goto bugout; } -diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c ---- hplip-3.23.3/scan/sane/sclpml.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/sclpml.c 2023-05-29 13:58:10.976395173 +0200 +diff -up hplip-3.25.2/scan/sane/sclpml.c.covscan hplip-3.25.2/scan/sane/sclpml.c +--- hplip-3.25.2/scan/sane/sclpml.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/sclpml.c 2025-04-11 10:21:58.038605168 +0200 @@ -30,6 +30,7 @@ #include #include @@ -427,9 +427,9 @@ diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c return; } -diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c ---- hplip-3.23.3/scan/sane/soap.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/soap.c 2023-05-29 13:58:10.977395167 +0200 +diff -up hplip-3.25.2/scan/sane/soap.c.covscan hplip-3.25.2/scan/sane/soap.c +--- hplip-3.25.2/scan/sane/soap.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/soap.c 2025-04-11 10:21:58.038894758 +0200 @@ -142,7 +142,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) @@ -520,9 +520,9 @@ diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c goto bugout; } -diff -up hplip-3.23.3/scan/sane/soapht.c.covscan hplip-3.23.3/scan/sane/soapht.c ---- hplip-3.23.3/scan/sane/soapht.c.covscan 2023-03-28 09:26:11.000000000 +0200 -+++ hplip-3.23.3/scan/sane/soapht.c 2023-05-29 13:58:10.977395167 +0200 +diff -up hplip-3.25.2/scan/sane/soapht.c.covscan hplip-3.25.2/scan/sane/soapht.c +--- hplip-3.25.2/scan/sane/soapht.c.covscan 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/scan/sane/soapht.c 2025-04-11 10:21:58.039106018 +0200 @@ -136,7 +136,7 @@ static int get_ip_data(struct soap_sessi if (!ps->ip_handle) diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch index adcac1d..342c4d3 100644 --- a/hplip-pcardext-disable.patch +++ b/hplip-pcardext-disable.patch @@ -1,29 +1,12 @@ -The pcardext Python extension cannot be loaded because it has not been -ported to Python 3: - ->>> import pcardext -Traceback (most recent call last): - File "", line 1, in -ImportError: /usr/lib64/python3.11/site-packages/pcardext.so: undefined symbol: PyString_AsStringAndSize ->>> - -Stop building this extension because it breaks the build if the -compiler lacks support for implicit function declarations. - -Bug: - -Submitted upstream: - -diff --git a/Makefile.am b/Makefile.am -index ddac16a9dd514008..15d953af9150c09e 100644 ---- a/Makefile.am -+++ b/Makefile.am +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 = $(pyexecdir) +-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-strncpy.patch b/hplip-strncpy.patch index eac29b8..cbd262d 100644 --- a/hplip-strncpy.patch +++ b/hplip-strncpy.patch @@ -1,7 +1,7 @@ -diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp ---- hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy 2015-01-21 16:52:44.066497631 +0000 -+++ hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp 2015-01-21 16:59:46.216434376 +0000 -@@ -203,6 +203,7 @@ HPCupsFilter::HPCupsFilter() : m_pPrinte +diff -up hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp +--- hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp.strncpy 2025-04-11 10:16:00.438702562 +0200 ++++ hplip-3.25.2/prnt/hpcups/HPCupsFilter.cpp 2025-04-11 10:21:25.088096376 +0200 +@@ -211,6 +211,7 @@ HPCupsFilter::HPCupsFilter() : m_pPrinte adj_k_width = 0; black_raster = NULL; color_raster = NULL; @@ -9,7 +9,7 @@ diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/h } HPCupsFilter::~HPCupsFilter() -@@ -384,9 +385,9 @@ DRIVER_ERROR HPCupsFilter::startPage (cu +@@ -428,15 +429,15 @@ DRIVER_ERROR HPCupsFilter::startPage (cu m_JA.media_attributes.physical_height = cups_header->PageSize[1]; m_JA.media_attributes.printable_width = ((cups_header->ImagingBoundingBox[2]-cups_header->ImagingBoundingBox[0]) * horz_res) / 72; m_JA.media_attributes.printable_height = ((cups_header->ImagingBoundingBox[3]-cups_header->ImagingBoundingBox[1]) * vert_res) / 72; @@ -20,11 +20,18 @@ diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/h + strncpy(m_JA.media_attributes.MediaTypeName, cups_header->MediaType, sizeof(m_JA.media_attributes.MediaTypeName)-1); + strncpy(m_JA.quality_attributes.hbpl1_print_quality, cups_header->OutputType, sizeof(m_JA.quality_attributes.hbpl1_print_quality)-1); m_JA.color_mode = cups_header->cupsRowStep; + + if (m_JA.media_attributes.PageSizeName[0] == '\0') { + // Copy the value of cups_header->cupsPageSizeName if it isnot null + if (cups_header->cupsPageSizeName != nullptr) { +- strncpy(m_JA.media_attributes.PageSizeName, cups_header->cupsPageSizeName, sizeof(m_JA.media_attributes.PageSizeName)); ++ strncpy(m_JA.media_attributes.PageSizeName, cups_header->cupsPageSizeName, sizeof(m_JA.media_attributes.PageSizeName) - 1); + } + } } - else { -diff -up hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijs.cpp ---- hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy 2015-01-21 17:00:03.225512410 +0000 -+++ hplip-3.14.10/prnt/hpijs/hpijs.cpp 2015-01-21 17:04:59.308870785 +0000 +diff -up hplip-3.25.2/prnt/hpijs/hpijs.cpp.strncpy hplip-3.25.2/prnt/hpijs/hpijs.cpp +--- hplip-3.25.2/prnt/hpijs/hpijs.cpp.strncpy 2025-04-11 10:16:00.434453252 +0200 ++++ hplip-3.25.2/prnt/hpijs/hpijs.cpp 2025-04-11 10:16:00.501228045 +0200 @@ -605,7 +605,7 @@ int main (int argc, char *argv[], char * } @@ -34,9 +41,9 @@ diff -up hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpi #ifdef HAVE_LIBHPIP char *pDev; -diff -up hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijsfax.cpp ---- hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy 2015-01-21 17:05:06.585904171 +0000 -+++ hplip-3.14.10/prnt/hpijs/hpijsfax.cpp 2015-01-21 17:05:15.787946389 +0000 +diff -up hplip-3.25.2/prnt/hpijs/hpijsfax.cpp.strncpy hplip-3.25.2/prnt/hpijs/hpijsfax.cpp +--- hplip-3.25.2/prnt/hpijs/hpijsfax.cpp.strncpy 2025-02-27 13:12:29.000000000 +0100 ++++ hplip-3.25.2/prnt/hpijs/hpijsfax.cpp 2025-04-11 10:16:00.501403513 +0200 @@ -282,7 +282,7 @@ int hpijsFaxServer (int argc, char **arg char user_name[32]={0,}; diff --git a/hplip-use-raw-strings.patch b/hplip-use-raw-strings.patch index 6777903..77d1b87 100644 --- a/hplip-use-raw-strings.patch +++ b/hplip-use-raw-strings.patch @@ -1,7 +1,8 @@ -diff --git a/base/LedmWifi.py b/base/LedmWifi.py -index f63a050..074d5a2 100644 ---- a/base/LedmWifi.py -+++ b/base/LedmWifi.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 @@ -11,136 +12,12 @@ index f63a050..074d5a2 100644 HTTP_OK = 200 HTTP_ACCEPTED = 202 HTTP_NOCONTENT = 204 -diff --git a/base/device.py b/base/device.py -index fbe6c34..a551403 100644 ---- a/base/device.py -+++ b/base/device.py -@@ -47,7 +47,7 @@ from . import models, mdns, slp, avahi - from .strings import * - from .sixext import PY3, to_bytes_utf8, to_unicode, to_string_latin, to_string_utf8, xStringIO - --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_ERROR = 500 -diff --git a/base/g.py b/base/g.py -index 96b3131..023aeea 100644 ---- a/base/g.py -+++ b/base/g.py -@@ -302,7 +302,7 @@ prop.hpcups_build = to_bool(sys_conf.get('configure', 'hpcups-install', '0')) - prop.hpijs_build = to_bool(sys_conf.get('configure', 'hpijs-install', '0')) - - # Spinner, ala Gentoo Portage --spinner = "\|/-\|/-" -+spinner = r"\|/-\|/-" - spinpos = 0 - enable_spinner = True - -@@ -352,7 +352,7 @@ def check_extension_module_env(ext_mod): - log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod) - sys.exit(1) - -- m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found -+ m = re.search(r'python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found - ext_ver = xint(m.group(1)) - - if ext_ver[0] == 3: -diff --git a/base/logger.py b/base/logger.py -index dd92a9c..68e4f13 100644 ---- a/base/logger.py -+++ b/base/logger.py -@@ -437,10 +437,10 @@ class Logger(object): - start = start + " " - number_chars = number_chars + 1 - try: -- elem_start = re.findall("(\<\W{0,1}\w+) ?", line)[0] -- elem_finished = re.findall("([?|\]\]]*\>)", line)[0] -+ elem_start = re.findall(r"(\<\W{0,1}\w+) ?", line)[0] -+ elem_finished = re.findall(r"([?|\]\]]*\>)", line)[0] - #should not have * -- attrs = re.findall("(\S*?\=\".*?\")", line) -+ attrs = re.findall(r"(\S*?\=\".*?\")", line) - #output.write(start + elem_start) - self.log(start+elem_start, level, False) - number_chars = len(start + elem_start) -diff --git a/base/models.py b/base/models.py -index dc6cc39..48dd2ef 100644 ---- a/base/models.py -+++ b/base/models.py -@@ -35,7 +35,7 @@ except ImportError: - datetime = None - - --pat_prod_num = re.compile("""(\d+)""", re.I) -+pat_prod_num = re.compile(r"""(\d+)""", re.I) - - TYPE_UNKNOWN = 0 - TYPE_STRING = 1 -@@ -427,25 +427,25 @@ class ModelData: - } - - self.RE_FIELD_TYPES = { -- re.compile('^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -- re.compile('^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -- re.compile('^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, -- re.compile('^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, -- re.compile('^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -- re.compile('^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -- re.compile('^model(\d+)', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-type', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-id', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-level', re.IGNORECASE) : TYPE_INT, -+ re.compile(r'^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR, -+ re.compile(r'^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL, -+ re.compile(r'^model(\d+)', re.IGNORECASE) : TYPE_STR, - } - - self.TYPE_CACHE = {} -diff --git a/base/password.py b/base/password.py -index 259bf82..a4ed107 100644 ---- a/base/password.py -+++ b/base/password.py -@@ -167,8 +167,8 @@ class Password(object): - - 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("]", "\]") -+ cb = cb.replace("[", r"\[") -+ cb = cb.replace("]", r"\]") - - self.__password_prompt_str = cb - try: -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/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 @@ -159,101 +36,12 @@ index 0818574..8625f53 100755 except AttributeError: desc = '' -diff --git a/base/status.py b/base/status.py -index 37c774e..01f455d 100644 ---- a/base/status.py -+++ b/base/status.py -@@ -1341,7 +1341,7 @@ def MapPJLErrorCode(error_code, str_code=None): - return status_code - - --pjl_code_pat = re.compile("""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) -+pjl_code_pat = re.compile(r"""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE) - - - -diff --git a/base/tui.py b/base/tui.py -index 0f90f92..3b36c65 100644 ---- a/base/tui.py -+++ b/base/tui.py -@@ -217,7 +217,7 @@ class ProgressMeter(object): - self.progress = 0 - self.prompt = prompt - self.prev_length = 0 -- self.spinner = "\|/-\|/-*" -+ self.spinner = r"\|/-\|/-*" - self.spinner_pos = 0 - self.max_size = ttysize()[1] - len(prompt) - 25 - self.update(0) -diff --git a/base/utils.py b/base/utils.py -index 2b631ce..2fb57c4 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -148,7 +148,7 @@ def get_cups_systemgroup_list(): - return lis - - try: -- lis = ((re.findall('SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') -+ lis = ((re.findall(r'SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ') - except IndexError: - return lis - -@@ -1597,7 +1597,7 @@ def mixin(cls): - # ------------------------- Usage Help - USAGE_OPTIONS = ("[OPTIONS]", "", "heading", False) - USAGE_LOGGING1 = ("Set the logging level:", "-l or --logging=", 'option', False) --USAGE_LOGGING2 = ("", ": none, info\*, error, warn, debug (\*default)", "option", False) -+USAGE_LOGGING2 = ("", r": none, info\*, error, warn, debug (\*default)", "option", False) - USAGE_LOGGING3 = ("Run in debug mode:", "-g (same as option: -ldebug)", "option", False) - USAGE_LOGGING_PLAIN = ("Output plain text only:", "-t", "option", False) - USAGE_ARGS = ("[PRINTER|DEVICE-URI]", "", "heading", False) -@@ -1605,13 +1605,13 @@ USAGE_ARGS2 = ("[PRINTER]", "", "heading", False) - USAGE_DEVICE = ("To specify a device-URI:", "-d or --device=", "option", False) - USAGE_PRINTER = ("To specify a CUPS printer:", "-p or --printer=", "option", False) - USAGE_BUS1 = ("Bus to probe (if device not specified):", "-b or --bus=", "option", False) --USAGE_BUS2 = ("", ": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) -+USAGE_BUS2 = ("", r": cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False) - USAGE_HELP = ("This help information:", "-h or --help", "option", True) - USAGE_SPACE = ("", "", "space", False) - USAGE_EXAMPLES = ("Examples:", "", "heading", False) - USAGE_NOTES = ("Notes:", "", "heading", False) - USAGE_STD_NOTES1 = ("If device or printer is not specified, the local device bus is probed and the program enters interactive mode.", "", "note", False) --USAGE_STD_NOTES2 = ("If -p\* is specified, the default CUPS printer will be used.", "", "note", False) -+USAGE_STD_NOTES2 = (r"If -p\* is specified, the default CUPS printer will be used.", "", "note", False) - USAGE_SEEALSO = ("See Also:", "", "heading", False) - USAGE_LANGUAGE = ("Set the language:", "--loc= or --lang=. Use --loc=? or --lang=? to see a list of available language codes.", "option", False) - USAGE_LANGUAGE2 = ("Set the language:", "--lang=. Use --lang=? to see a list of available language codes.", "option", False) -@@ -1839,7 +1839,7 @@ encoding: utf8 - - elif typ == 'man': - log.info('.TH "%s" 1 "%s" Linux "User Manuals"' % (crumb, version)) -- log.info(".SH NAME\n%s \- %s" % (crumb, title)) -+ log.info(r".SH NAME\n%s \- %s" % (crumb, title)) - - for line in text_list: - text1, text2, format, trailing_space = line -@@ -1938,7 +1938,7 @@ def unescape(text): - except KeyError: - pass - return text # leave as is -- return re.sub("&#?\w+;", fixup, text) -+ return re.sub(r"&#?\w+;", fixup, text) - - - # Adds HTML or XML character references and entities from a text string -@@ -1991,7 +1991,7 @@ def Is_HPLIP_older_version(installed_version, available_version): - log.debug("HPLIP Installed_version=%s Available_version=%s"%(installed_version,available_version)) - cnt = 0 - Is_older = False -- pat=re.compile('''(\d{1,})([a-z]{1,})''') -+ pat=re.compile(r'''(\d{1,})([a-z]{1,})''') - try: - while cnt 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 --git a/scan.py b/scan.py -index 0bfa6f5..27b8c2e 100755 ---- a/scan.py -+++ b/scan.py -@@ -249,9 +249,9 @@ try: - extra_options=[utils.USAGE_SPACE, - ("[OPTIONS] (General)", "", "header", False), - ("Scan destinations:", "-s or --dest=", "option", False), -- ("", "where is a comma separated list containing one or more of: 'file'\*, ", "option", False), -+ ("", r"where is a comma separated list containing one or more of: 'file'\*, ", "option", False), - ("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False), -- ("Scan mode:", "-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), -+ ("Scan mode:", r"-m or --mode=. Where is 'gray'\*, 'color' or 'lineart'.", "option", False), - ("Scanning resolution:", "-r or --res= or --resolution=", "option", False), - ("", "where 300 is default.", "option", False), - ("Image resize:", "--resize= (min=1%, max=400%, default=100%)", "option", False), -@@ -268,7 +268,7 @@ try: - utils.USAGE_SPACE, - ("[OPTIONS] (Scan area)", "", "header", False), - ("Specify the units for area/box measurements:", "-t or --units=", "option", False), -- ("", "where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), -+ ("", r"where is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False), - ("Scan area:", "-a,,, or --area=,,,", "option", False), - ("", "Coordinates are relative to the upper left corner of the scan area.", "option", False), - ("", "Units for tlx, tly, brx, and bry are specified by -t/--units (default is 'mm').", "option", False), -diff --git a/setup.py b/setup.py -index 98f57fd..1a74d6d 100755 ---- a/setup.py -+++ b/setup.py +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, diff --git a/hplip.spec b/hplip.spec index 4baee16..0d88003 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.24.4 -Release: 5%{?dist} +Version: 3.25.2 +Release: 1%{?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 @@ -976,6 +976,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Fri Apr 11 2025 Zdenek Dohnal - 3.25.2-1 +- hplip-3.25.2 is available (fedora#2353147) + * Thu Apr 03 2025 FeRD (Frank Dana) - 3.24.5-5 - hp-plugin: Use rpm queryformat to get version (no gawk dependency) diff --git a/sources b/sources index d883a96..9ed256f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.24.4-repack.tar.gz) = 7a1c0024ec3703a9e36ef50c873c7c959eb0be646e53f517d9234b5a961ef7a7a0a646bc28dee533d3b12583b12f527d5ac2bd457272053ddc4b22e745b57b63 +SHA512 (hplip-3.25.2-repack.tar.gz) = 38941d8f624b8edc4a45695151649d18a430177f9b3e257cd969e234ff0f45285a68fa83240727dce411fea961de34b4dc5b46741a48087b77f1e34b48d7d6b1 From ae1776306626781f8a2d0d7e942749a15d84784e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 16 Apr 2025 17:14:15 +0200 Subject: [PATCH 27/38] remove Recommends on hplip-gui due complaint at (fedora#2360020) --- hplip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hplip.spec b/hplip.spec index 0d88003..f57e86c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 1%{?dist} +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 @@ -297,7 +297,6 @@ BuildRequires: sane-backends-devel BuildRequires: systemd %if 0%{?fedora} || 0%{?rhel} <= 8 -Recommends: (%{name}-gui%{?_isa} = %{version}-%{release} if qt5-qtbase-gui%{?_isa}) Suggests: hplip-gui %endif # uses avahi-browse for discovering IPP-over-USB printers @@ -976,6 +975,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Apr 16 2025 Zdenek Dohnal - 3.25.2-2 +- remove Recommends on hplip-gui due complaint at (fedora#2360020) + * Fri Apr 11 2025 Zdenek Dohnal - 3.25.2-1 - hplip-3.25.2 is available (fedora#2353147) From f66385472fcf440142e106a2a3203411fcf0785b Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 7 May 2025 10:44:05 +0200 Subject: [PATCH 28/38] hp-plugin failed checksum due usage of different hashes (fedora#2361230) output is not seen after installing plugin (fedora#2361230) --- hplip-plugin-reverthash.patch | 83 +++++++++++++++++++++++++++++++++++ hplip-plugin-stdout.patch | 13 ++++++ hplip.spec | 16 ++++++- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 hplip-plugin-reverthash.patch create mode 100644 hplip-plugin-stdout.patch diff --git a/hplip-plugin-reverthash.patch b/hplip-plugin-reverthash.patch new file mode 100644 index 0000000..006f01e --- /dev/null +++ b/hplip-plugin-reverthash.patch @@ -0,0 +1,83 @@ +diff --git a/base/utils.py b/base/utils.py +index 09a3cb7..137ec72 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -67,11 +67,17 @@ try: + except ImportError: + dbus_avail=False + +-import hashlib ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++except ImportError: ++ import sha # deprecated in 2.6/3.0 + ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + +diff --git a/installer/core_install.py b/installer/core_install.py +index 9a929a4..299b2f4 100644 +--- a/installer/core_install.py ++++ b/installer/core_install.py +@@ -31,10 +31,18 @@ import pwd + import tarfile + import stat + import glob +-import hashlib + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() ++ ++except ImportError: ++ import sha # deprecated in 2.6/3.0 ++ ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + # Local +diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py +index c2e2a94..4ae24e5 100755 +--- a/installer/pluginhandler.py ++++ b/installer/pluginhandler.py +@@ -21,7 +21,6 @@ + + import os + import shutil +-import hashlib + + from base import utils, tui, os_utils, validation, password + from base.g import * +@@ -31,8 +30,17 @@ from base.sixext.moves import configparser + from installer import core_install + + +-def get_checksum(s): +- return hashlib.sha256(s).hexdigest() ++try: ++ import hashlib # new in 2.5 ++ ++ def get_checksum(s): ++ return hashlib.sha1(s).hexdigest() ++ ++except ImportError: ++ import sha # deprecated in 2.6/3.0 ++ ++ def get_checksum(s): ++ return sha.new(s).hexdigest() + + + PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state' diff --git a/hplip-plugin-stdout.patch b/hplip-plugin-stdout.patch new file mode 100644 index 0000000..c8d28a9 --- /dev/null +++ b/hplip-plugin-stdout.patch @@ -0,0 +1,13 @@ +diff --git a/base/os_utils.py b/base/os_utils.py +index 9fa137c..71edcc7 100644 +--- a/base/os_utils.py ++++ b/base/os_utils.py +@@ -37,7 +38,7 @@ def execute(cmd): + try: + # Use shlex.split to safely split the command into arguments + args = shlex.split(cmd) +- result = subprocess.run(args, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) ++ result = subprocess.run(args, check=True) + return result.returncode + except subprocess.CalledProcessError as e: + error_message = "Command failed with return code %d: %s\n%s" % (e.returncode, cmd, e.stderr.decode()) diff --git a/hplip.spec b/hplip.spec index f57e86c..dab37b1 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 2%{?dist} +Release: 3%{?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 @@ -244,6 +244,12 @@ Patch72: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 Patch73: hplip-format-qdatetime.patch +# revert to old hash for now until plugin.conf has newer hashes, +# and make sure we see prompts when installing plugin... +# https://bugs.launchpad.net/hplip/+bug/2110100 +# https://bugs.launchpad.net/hplip/+bug/2110101 +Patch74: hplip-plugin-reverthash.patch +Patch75: hplip-plugin-stdout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -604,6 +610,10 @@ done %patch -P 72 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 %patch -P 73 -p1 -b .format-qdatetime +# https://bugs.launchpad.net/hplip/+bug/2110100 +# https://bugs.launchpad.net/hplip/+bug/2110101 +%patch -P 74 -p1 -b .hashrevert +%patch -P 75 -p1 -b .stdout # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -975,6 +985,10 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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) From 61a4f33d3a811f559bfde7f27eade48f16740df5 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 12 May 2025 10:03:00 +0200 Subject: [PATCH 29/38] plugin.conf now looks to use sha256 as well per email comms with HP, drop the revert --- hplip-plugin-reverthash.patch | 83 ----------------------------------- hplip.spec | 12 +++-- 2 files changed, 5 insertions(+), 90 deletions(-) delete mode 100644 hplip-plugin-reverthash.patch diff --git a/hplip-plugin-reverthash.patch b/hplip-plugin-reverthash.patch deleted file mode 100644 index 006f01e..0000000 --- a/hplip-plugin-reverthash.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/base/utils.py b/base/utils.py -index 09a3cb7..137ec72 100644 ---- a/base/utils.py -+++ b/base/utils.py -@@ -67,11 +67,17 @@ try: - except ImportError: - dbus_avail=False - --import hashlib -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+except ImportError: -+ import sha # deprecated in 2.6/3.0 - -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - -diff --git a/installer/core_install.py b/installer/core_install.py -index 9a929a4..299b2f4 100644 ---- a/installer/core_install.py -+++ b/installer/core_install.py -@@ -31,10 +31,18 @@ import pwd - import tarfile - import stat - import glob --import hashlib - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() -+ -+except ImportError: -+ import sha # deprecated in 2.6/3.0 -+ -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - # Local -diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py -index c2e2a94..4ae24e5 100755 ---- a/installer/pluginhandler.py -+++ b/installer/pluginhandler.py -@@ -21,7 +21,6 @@ - - import os - import shutil --import hashlib - - from base import utils, tui, os_utils, validation, password - from base.g import * -@@ -31,8 +30,17 @@ from base.sixext.moves import configparser - from installer import core_install - - --def get_checksum(s): -- return hashlib.sha256(s).hexdigest() -+try: -+ import hashlib # new in 2.5 -+ -+ def get_checksum(s): -+ return hashlib.sha1(s).hexdigest() -+ -+except ImportError: -+ import sha # deprecated in 2.6/3.0 -+ -+ def get_checksum(s): -+ return sha.new(s).hexdigest() - - - PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state' diff --git a/hplip.spec b/hplip.spec index dab37b1..2f7eb19 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 3%{?dist} +Release: 4%{?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 @@ -244,11 +244,8 @@ Patch72: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 Patch73: hplip-format-qdatetime.patch -# revert to old hash for now until plugin.conf has newer hashes, -# and make sure we see prompts when installing plugin... -# https://bugs.launchpad.net/hplip/+bug/2110100 +# make sure we see prompts when installing plugin... # https://bugs.launchpad.net/hplip/+bug/2110101 -Patch74: hplip-plugin-reverthash.patch Patch75: hplip-plugin-stdout.patch %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -610,9 +607,7 @@ done %patch -P 72 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 %patch -P 73 -p1 -b .format-qdatetime -# https://bugs.launchpad.net/hplip/+bug/2110100 # https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 74 -p1 -b .hashrevert %patch -P 75 -p1 -b .stdout # Fedora specific patches now, don't put a generic patches under it @@ -985,6 +980,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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) From 8541ecd6f87ae8863c9fd24f259d4a9daa38596a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 26 May 2025 15:24:43 +0200 Subject: [PATCH 30/38] hp-toolbox shows traceback when closing and there is no HP device (fedora#2360501) --- hplip-gui-close-trace.patch | 24 ++++++++++++++++++++++++ hplip.spec | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 hplip-gui-close-trace.patch diff --git a/hplip-gui-close-trace.patch b/hplip-gui-close-trace.patch new file mode 100644 index 0000000..39d8f01 --- /dev/null +++ b/hplip-gui-close-trace.patch @@ -0,0 +1,24 @@ +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.spec b/hplip.spec index 2f7eb19..9956010 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 4%{?dist} +Release: 5%{?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 @@ -247,6 +247,9 @@ Patch73: hplip-format-qdatetime.patch # make sure we see prompts when installing plugin... # https://bugs.launchpad.net/hplip/+bug/2110101 Patch75: hplip-plugin-stdout.patch +# toolbox shows traceback when button 'close' is clicked on at first dialog +# https://bugs.launchpad.net/hplip/+bug/2111722 +Patch76: hplip-gui-close-trace.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -609,6 +612,8 @@ done %patch -P 73 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2110101 %patch -P 75 -p1 -b .stdout +# https://bugs.launchpad.net/hplip/+bug/2111722 +%patch -P 76 -p1 -b .gui-close-trace # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -980,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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 From b1ef7ae35e07387acaa3c9b76e10b8a3ea5c2152 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 22:22:15 +0200 Subject: [PATCH 31/38] Rebuilt for Python 3.14 --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 9956010..07f2ece 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 5%{?dist} +Release: 6%{?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 @@ -985,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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) From a995e312cb21fcc2c0b58e5c33feba6b60c38978 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 3 Jun 2025 08:11:29 +0200 Subject: [PATCH 32/38] Switch tests to Centos Stream --- plans.fmf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plans.fmf b/plans.fmf index deb443d..f4c2755 100644 --- a/plans.fmf +++ b/plans.fmf @@ -1,37 +1,37 @@ /tier1-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier1/internal /tier1-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier1/public /tier2-tier3-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier2-tier3/internal /tier2-tier3-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/tier2-tier3/public /others-internal: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/others/internal /others-public: plan: import: - url: https://src.fedoraproject.org/tests/hplip.git + url: https://gitlab.com/redhat/centos-stream/tests/hplip.git name: /plans/others/public From 73678936ce93c0579ee46011aed32d96aa2844d2 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 20 Jun 2025 11:24:48 +0200 Subject: [PATCH 33/38] Remove URLopener Python 3.14 removed URLopener, which is used in hplip as parent class for LocalOpener* classes, and various hplip scripts (hp-setup, hp-plugin) started to traceback after removal. Remove URLopener for now, since at least sanity testing passes without it. --- hplip-no-urlopener.patch | 79 ++++++++++++++++++++++++++++++++++++++++ hplip.spec | 10 ++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 hplip-no-urlopener.patch diff --git a/hplip-no-urlopener.patch b/hplip-no-urlopener.patch new file mode 100644 index 0000000..903fbbc --- /dev/null +++ b/hplip-no-urlopener.patch @@ -0,0 +1,79 @@ +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.spec b/hplip.spec index 07f2ece..80334d0 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 6%{?dist} +Release: 7%{?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 @@ -250,6 +250,9 @@ Patch75: hplip-plugin-stdout.patch # toolbox shows traceback when button 'close' is clicked on at first dialog # https://bugs.launchpad.net/hplip/+bug/2111722 Patch76: hplip-gui-close-trace.patch +# Python 3.14 removed urlopener +# https://bugs.launchpad.net/hplip/+bug/2115046 +Patch77: hplip-no-urlopener.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -614,6 +617,8 @@ done %patch -P 75 -p1 -b .stdout # https://bugs.launchpad.net/hplip/+bug/2111722 %patch -P 76 -p1 -b .gui-close-trace +# https://bugs.launchpad.net/hplip/+bug/2115046 +%patch -P 77 -p1 -b .no-urlopener # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -985,6 +990,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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 From 5ad054fcdb04a8adabd112aa4ab0ec6b14d2364c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:04:43 +0000 Subject: [PATCH 34/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- hplip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hplip.spec b/hplip.spec index 80334d0..9fbf105 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.25.2 -Release: 7%{?dist} +Release: 8%{?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 @@ -990,6 +990,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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 From 01d1e50f44f87ee2ac1d0f3a7629c562631b69ae Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 12 Aug 2025 13:31:19 +0200 Subject: [PATCH 35/38] hplip-3.25.6 is available (fedora#2386814) --- .gitignore | 1 + hplip-pcardext-disable.patch | 9 +++-- hplip-plugin-stdout.patch | 13 ------- hplip.spec | 73 ++++++++++++++++-------------------- sources | 2 +- 5 files changed, 40 insertions(+), 58 deletions(-) delete mode 100644 hplip-plugin-stdout.patch diff --git a/.gitignore b/.gitignore index c4e3a17..89da7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,4 @@ 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 diff --git a/hplip-pcardext-disable.patch b/hplip-pcardext-disable.patch index 342c4d3..158379d 100644 --- a/hplip-pcardext-disable.patch +++ b/hplip-pcardext-disable.patch @@ -1,12 +1,13 @@ -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 +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 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 c8d28a9..0000000 --- a/hplip-plugin-stdout.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/os_utils.py b/base/os_utils.py -index 9fa137c..71edcc7 100644 ---- a/base/os_utils.py -+++ b/base/os_utils.py -@@ -37,7 +38,7 @@ def execute(cmd): - try: - # Use shlex.split to safely split the command into arguments - args = shlex.split(cmd) -- result = subprocess.run(args, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -+ result = subprocess.run(args, check=True) - return result.returncode - except subprocess.CalledProcessError as e: - error_message = "Command failed with return code %d: %s\n%s" % (e.returncode, cmd, e.stderr.decode()) diff --git a/hplip.spec b/hplip.spec index 9fbf105..24f7071 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.25.2 -Release: 8%{?dist} +Version: 3.25.6 +Release: 1%{?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 @@ -199,60 +199,54 @@ 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 -Patch60: hplip-plugin-script.patch +Patch59: hplip-plugin-script.patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -Patch61: hplip-pserror-c99.patch +Patch60: hplip-pserror-c99.patch # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -Patch62: hplip-scan-hpaio-include.patch +Patch61: 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: -Patch63: hplip-scan-orblite-c99.patch +Patch62: 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: -Patch64: hplip-pcardext-disable.patch +Patch63: hplip-pcardext-disable.patch # undefined strcasestr() in sclpml.c - build with _GNU_SOURCE # Submitted upstream: -Patch65: hplip-sclpml-strcasestr.patch +Patch64: 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 -Patch67: hplip-fix-parsing-lpstat.patch +Patch65: 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. -Patch68: hplip-plugin-curl.patch +Patch66: hplip-plugin-curl.patch # fix SyntaxWarning from python3.12 # https://bugs.launchpad.net/hplip/+bug/2029480 -Patch69: hplip-use-raw-strings.patch +Patch67: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -Patch70: hplip-hpaio-gcc14.patch +Patch68: hplip-hpaio-gcc14.patch # format is no longer method in locale module # https://bugs.launchpad.net/hplip/+bug/2045507 -Patch71: hplip-locale-format.patch +Patch69: hplip-locale-format.patch # function prototype did not specify argument's data types # https://bugs.launchpad.net/hplip/+bug/2096650 -Patch72: hplip-gcc15-stdc23.patch +Patch70: hplip-gcc15-stdc23.patch # status history table shows unformatted QDateTime values # https://bugs.launchpad.net/hplip/+bug/1956547 -Patch73: hplip-format-qdatetime.patch -# make sure we see prompts when installing plugin... -# https://bugs.launchpad.net/hplip/+bug/2110101 -Patch75: hplip-plugin-stdout.patch -# toolbox shows traceback when button 'close' is clicked on at first dialog -# https://bugs.launchpad.net/hplip/+bug/2111722 -Patch76: hplip-gui-close-trace.patch +Patch71: hplip-format-qdatetime.patch # Python 3.14 removed urlopener # https://bugs.launchpad.net/hplip/+bug/2115046 -Patch77: hplip-no-urlopener.patch +Patch72: hplip-no-urlopener.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -577,48 +571,44 @@ 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 60 -p1 -b .plugin-patch +%patch -P 59 -p1 -b .plugin-patch # C99 compatibility fixes by fweimer - use explicit int # Submitted upstream: -%patch -P 61 -p1 -b .pserror-int +%patch -P 60 -p1 -b .pserror-int # C99 compatibility patch by fweimer - several undefined functions in hpaio # backend are declared in orblite.h # Submitted upstream: -%patch -P 62 -p1 -b .hpaio-orblite-defs +%patch -P 61 -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 63 -p1 -b .orblite-undefs +%patch -P 62 -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 64 -p1 -b .pcardext-disable +%patch -P 63 -p1 -b .pcardext-disable # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE -%patch -P 65 -p1 -b .sclpml-strcasestr +%patch -P 64 -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 67 -p1 -b .lpstat-parse +%patch -P 65 -p1 -b .lpstat-parse # switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # which causes great delays... -%patch -P 68 -p1 -b .curl-switch +%patch -P 66 -p1 -b .curl-switch # fix warnings # upstream https://bugs.launchpad.net/hplip/+bug/2029480 -%patch -P 69 -p1 -b .raw-strings +%patch -P 67 -p1 -b .raw-strings # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 -%patch -P 70 -p1 -b .hpaio-gcc14 +%patch -P 68 -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 +%patch -P 69 -p1 -b .locale-format # https://bugs.launchpad.net/hplip/+bug/2096650 -%patch -P 72 -p1 -b .gcc-strc23 +%patch -P 70 -p1 -b .gcc-strc23 # https://bugs.launchpad.net/hplip/+bug/1956547 -%patch -P 73 -p1 -b .format-qdatetime -# https://bugs.launchpad.net/hplip/+bug/2110101 -%patch -P 75 -p1 -b .stdout -# https://bugs.launchpad.net/hplip/+bug/2111722 -%patch -P 76 -p1 -b .gui-close-trace +%patch -P 71 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2115046 -%patch -P 77 -p1 -b .no-urlopener +%patch -P 72 -p1 -b .no-urlopener # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -990,6 +980,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* 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 diff --git a/sources b/sources index 9ed256f..3eebca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.25.2-repack.tar.gz) = 38941d8f624b8edc4a45695151649d18a430177f9b3e257cd969e234ff0f45285a68fa83240727dce411fea961de34b4dc5b46741a48087b77f1e34b48d7d6b1 +SHA512 (hplip-3.25.6-repack.tar.gz) = 1b431142e2516e383d5fcbaa1487c5a680b60a409bec02de4526ac82d2a88a4b2b28f3813740ae8f7f32f02d058ae6e986efc8e57a30d1c560132dc4014b87b4 From 334237ac687d516e55b7d3819a58ff2314f09798 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 17 Sep 2025 14:01:58 +0200 Subject: [PATCH 36/38] hp-scan command failed to run and gives an error (fedora#2395809) --- hplip-scan-size.patch | 37 +++++++++++++++++++++++++++++++++++++ hplip.spec | 8 ++++++++ 2 files changed, 45 insertions(+) create mode 100644 hplip-scan-size.patch diff --git a/hplip-scan-size.patch b/hplip-scan-size.patch new file mode 100644 index 0000000..1ff8cb3 --- /dev/null +++ b/hplip-scan-size.patch @@ -0,0 +1,37 @@ +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.spec b/hplip.spec index 24f7071..f7d6bdd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -247,6 +247,9 @@ Patch71: hplip-format-qdatetime.patch # Python 3.14 removed urlopener # https://bugs.launchpad.net/hplip/+bug/2115046 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 %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -609,6 +612,8 @@ done %patch -P 71 -p1 -b .format-qdatetime # https://bugs.launchpad.net/hplip/+bug/2115046 %patch -P 72 -p1 -b .no-urlopener +# https://bugs.launchpad.net/hplip/+bug/2124268 +%patch -P 73 -p1 -b .scan-size # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -980,6 +985,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Sep 17 2025 Zdenek Dohnal - 3.25.6-1 +- hp-scan command failed to run and gives an error (fedora#2395809) + * Tue Aug 12 2025 Zdenek Dohnal - 3.25.6-1 - hplip-3.25.6 is available (fedora#2386814) From be70bd6792c1b3d232805da4c8678273e2ddf7c6 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 17 Sep 2025 14:08:07 +0200 Subject: [PATCH 37/38] Use new HP GPG key for plugin validation HP now uses new key pair for signing plugin tarball as fix for CVE-2025-43023, but hplip code was still downloading the old one, thus validation always failed. --- hplip-new-gpg-key.patch | 13 +++++++++++++ hplip.spec | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 hplip-new-gpg-key.patch 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.spec b/hplip.spec index f7d6bdd..6fb946e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -250,6 +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 +# 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 @@ -614,6 +617,8 @@ done %patch -P 72 -p1 -b .no-urlopener # https://bugs.launchpad.net/hplip/+bug/2124268 %patch -P 73 -p1 -b .scan-size +# 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 @@ -987,6 +992,7 @@ find doc/images -type f -exec chmod 644 {} \; %changelog * 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) From 075cac0afbd6516bdd9adef4eece7870c62d1e72 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 9 Jan 2026 13:04:20 +0100 Subject: [PATCH 38/38] hplip-3.25.8 is available (fedora#2415311) --- .gitignore | 1 + hplip-add-ppd-crash.patch | 13 ------------ hplip-keyserver.patch | 44 --------------------------------------- hplip-new-gpg-key.patch | 13 ------------ hplip-plugin-stdout.patch | 41 ++++++++++++++++++++++++++++++++++++ hplip.spec | 19 +++++++++++------ sources | 2 +- 7 files changed, 56 insertions(+), 77 deletions(-) delete mode 100644 hplip-new-gpg-key.patch create mode 100644 hplip-plugin-stdout.patch diff --git a/.gitignore b/.gitignore index 89da7d2..00397c1 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,4 @@ 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 798630a..beb070d 100644 --- a/hplip-add-ppd-crash.patch +++ b/hplip-add-ppd-crash.patch @@ -1,16 +1,3 @@ -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 9b457f1..c525503 100644 --- a/hplip-keyserver.patch +++ b/hplip-keyserver.patch @@ -10,47 +10,3 @@ 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 deleted file mode 100644 index 4aa433b..0000000 --- a/hplip-new-gpg-key.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 new file mode 100644 index 0000000..92f8016 --- /dev/null +++ b/hplip-plugin-stdout.patch @@ -0,0 +1,41 @@ +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 6fb946e..d6b78cd 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,7 +6,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.25.6 +Version: 3.25.8 Release: 1%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG @@ -76,6 +76,8 @@ 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 @@ -250,9 +252,11 @@ 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 -# 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 +# 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 %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -617,8 +621,8 @@ done %patch -P 72 -p1 -b .no-urlopener # https://bugs.launchpad.net/hplip/+bug/2124268 %patch -P 73 -p1 -b .scan-size -# Use new GPG key from Ubuntu keyserver -%patch -P 74 -p1 -b .new-gpg-key +# https://bugs.launchpad.net/hplip/+bug/2110101 +%patch -P 74 -p1 -b .plugin-stdout # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -990,6 +994,9 @@ 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 3eebca3..601b241 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.25.6-repack.tar.gz) = 1b431142e2516e383d5fcbaa1487c5a680b60a409bec02de4526ac82d2a88a4b2b28f3813740ae8f7f32f02d058ae6e986efc8e57a30d1c560132dc4014b87b4 +SHA512 (hplip-3.25.8-repack.tar.gz) = e4f82215e2753bee864e5ba643be2ce3566f1691638c35c74016279f92c872713d06e38a066d283f03f3e571d10c8ac2f1539bd32f6bafd1958641d96fe11059