diff --git a/.gitignore b/.gitignore index 8c9958b..2da15b2 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ hplip-3.10.6.tar.gz /hplip-3.21.12-repack.tar.gz /hplip-3.22.2-repack.tar.gz /hplip-3.22.4-repack.tar.gz +/hplip-3.22.6-repack.tar.gz diff --git a/hplip-configure-python.patch b/hplip-configure-python.patch index 9dc78cd..2ae7620 100644 --- a/hplip-configure-python.patch +++ b/hplip-configure-python.patch @@ -28,8 +28,8 @@ diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in + AC_MSG_ERROR([Cannot get Python libs via python3-config], 6) +fi + -+SAVE_CFLAGS=$CFLAGS -+SAVE_LIBS=$LIBS ++SAVE_CFLAGS="$CFLAGS" ++SAVE_LIBS="$LIBS" + +CFLAGS="$CFLAGS $PYTHON_INCLUDES" +LIBS="$LIBS $PYTHON_LIBS" diff --git a/hplip-error-print.patch b/hplip-error-print.patch index e4b3e5f..b7b1a6f 100644 --- a/hplip-error-print.patch +++ b/hplip-error-print.patch @@ -32,47 +32,3 @@ index fdb48e8..345ed82 100644 self.cleanup(EVENT_PCARD_UNABLE_TO_MOUNT) return False -diff --git a/ui4/wifisetupdialog.py b/ui4/wifisetupdialog.py -index 9fd1786..4d36f83 100644 ---- a/ui4/wifisetupdialog.py -+++ b/ui4/wifisetupdialog.py -@@ -256,7 +256,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - try: - self.dev = device.Device(self.device_uri) - except Error as e: -- FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, QString(e[0]))) -+ FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, QString(e.msg))) - - if self.dev is not None: - self.dev.close() -@@ -834,7 +834,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - - - def showIOError(self, e): -- FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % QString(e[0]))) -+ FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % QString(e.msg))) - - if self.dev is not None: - self.dev.close() -diff --git a/ui5/wifisetupdialog.py b/ui5/wifisetupdialog.py -index e0c7aee..74cc0ef 100644 ---- a/ui5/wifisetupdialog.py -+++ b/ui5/wifisetupdialog.py -@@ -259,7 +259,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - try: - self.dev = device.Device(self.device_uri) - except Error as e: -- FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, str(e[0]))) -+ FailureUI(self, self.__tr("Error opening device:

%s

(%s)

") %(self.device_uri, str(e.msg))) - - if self.dev is not None: - self.dev.close() -@@ -840,7 +840,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog): - - - def showIOError(self, e): -- FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % str(e[0]))) -+ FailureUI(self, self.__tr("An I/O error occurred.

Please check the USB connection to your printer and try again.

(%s)" % str(e.msg))) - - if self.dev is not None: - self.dev.close() diff --git a/hplip-snprintf-format.patch b/hplip-snprintf-format.patch new file mode 100644 index 0000000..221f1d1 --- /dev/null +++ b/hplip-snprintf-format.patch @@ -0,0 +1,50 @@ +diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c +index 97d827d..af25b3e 100644 +--- a/protocol/hp_ipp.c ++++ b/protocol/hp_ipp.c +@@ -110,9 +110,9 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, + } + + if ( info == NULL ) +- snprintf( info,sizeof(info), name ); ++ 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 */ +@@ -511,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list) + + 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.spec b/hplip.spec index ff04eab..a76a870 100644 --- a/hplip.spec +++ b/hplip.spec @@ -6,8 +6,8 @@ Summary: HP Linux Imaging and Printing Project Name: hplip -Version: 3.22.4 -Release: 2%{?dist} +Version: 3.22.6 +Release: 1%{?dist} License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -198,6 +198,9 @@ Patch60: hplip-osname-mismatch.patch # removed # - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() Patch61: 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 +Patch62: hplip-snprintf-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -514,6 +517,8 @@ done %patch60 -p1 -b .osname-mismatch # 2080235 - Misleading errors about missing shared libraries when scanning %patch61 -p1 -b .no-libm-libhpmud-warn +# hplip 3.22.6 doesn't use proper arguments for snprintf +%patch62 -p1 -b .snprintf-format %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -869,6 +874,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue Jul 19 2022 Zdenek Dohnal - 3.22.6-1 +- 2101790 - hplip-3.22.6 is available + * Mon Jul 18 2022 Zdenek Dohnal - 3.22.4-3 - recommend libsane-hpaio - duplicated scanners are better than no scanner diff --git a/sources b/sources index 341dfad..65eeba2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hplip-3.22.4-repack.tar.gz) = 33b228ee29536060918d0d15ff563c77e189d1ba1dd728b3038d202714a5d8d7742effb6ad8a2b1e5ea104784bc5d995bf793e4b61ab26552737e09aad318f3e +SHA512 (hplip-3.22.6-repack.tar.gz) = 6296bf9751b2202beb28e481b556fab838a82905fbc40429bcd654570491e6d9cf8fb9c6d4781924136968d71ad47cba32b4385577e7062ce4a8ee23df44b9da