hplip: upgrade 3.22.10 -> 3.25.8
PATCH 1/1 hplip: upgrade 3.22.10 -> 3.25.8
Contains fix for CVE-2025-43023, and support for many new printers.
Drop patches that are included in this release (or the underlying problem was solved on another way)
Changelog: https://developers.hp.com/hp-linux-imaging-and-printing/release_notes
Signed-off-by Gyorgy Sarvari <[email protected]>
---
...tils-Include-string.h-for-strcasestr.patch | 27 +++-----
...fine-missing-prototype-for-functions.patch | 33 +++++-----
...-Add-printf-format-to-snprintf-calls.patch | 64 -------------------
.../hplip/hplip/configure.patch | 2 +-
.../hplip/hplip/hplip-3.19.6-fix-return.patch | 22 -------
.../{hplip_3.22.10.bb => hplip_3.25.8.bb} | 11 +++-
6 files changed, 35 insertions(+), 124 deletions(-)
delete mode 100644 meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch
rename meta-oe/recipes-extended/hplip/{hplip_3.22.10.bb => hplip_3.25.8.bb} (86%)meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch +9 -18
@@ -7,38 +7,29 @@ Also define _GNU_SOURCE for the same Upstream-Status: Pending Signed-off-by: Khem Raj <[email protected]> + +Rebased for latest version. string.h is included already, left +only the _GNU_SOURCE definition. + +Signed-off-by: Gyorgy Sarvari <[email protected]> --- common/utils.c | 2 ++ 1 file changed, 2 insertions(+) --- a/common/utils.c +++ b/common/utils.c -@@ -1,9 +1,11 @@ +@@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include "utils.h" #include "string.h" #include <dlfcn.h> - #include <sys/stat.h> - #include <errno.h> - #include <stdlib.h> -+#include <string.h> /* strcasestr */ - - extern int errno; - --- a/protocol/hp_ipp.c +++ b/protocol/hp_ipp.c -@@ -18,12 +18,13 @@ Boston, MA 02110-1301, USA. - +@@ -18,6 +18,7 @@ Boston, MA 02110-1301, USA. + \******************************************************************************/ - -- + +#define _GNU_SOURCE #include <cups/cups.h> #include <cups/language.h> #include <cups/ppd.h> - #include <syslog.h> - #include <stdarg.h> -+#include <string.h> /* strcasecmp */ - #include <sys/types.h> - #include <pwd.h> - #include <sys/stat.h>
meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch +17 -16
@@ -13,18 +13,19 @@ Upstream-Status: Pending --- a/prnt/cupsext/cupsext.c +++ b/prnt/cupsext/cupsext.c -@@ -101,6 +101,11 @@ typedef int Py_ssize_t; +@@ -99,6 +99,12 @@ typedef int Py_ssize_t; #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) - + +void _releaseCupsInstance(void); +int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info); +int setDefaultCupsPrinter(char *pr_name); +int delCupsPrinter(char *pr_name); +int controlCupsPrinter(char *pr_name, int op); - - //static http_t * http = NULL; /* HTTP object */ - ++ + // static http_t * http = NULL; /* HTTP object */ + + PyObject *releaseCupsInstance(PyObject *self, PyObject *args) --- a/protocol/hp_ipp.c +++ b/protocol/hp_ipp.c @@ -22,6 +22,7 @@ Boston, MA 02110-1301, USA.
@@ -34,20 +35,20 @@ Upstream-Status: Pending +#include <stdio.h> #include <syslog.h> #include <stdarg.h> - #include <string.h> /* strcasecmp */ -@@ -42,7 +43,7 @@ Boston, MA 02110-1301, USA. - #define STRINGIZE(x) _STRINGIZE(x) - - --http_t* acquireCupsInstance() -+http_t* acquireCupsInstance(void) + #include <sys/types.h> +@@ -45,7 +46,7 @@ Boston, MA 02110-1301, USA. + dst[size - 1] = '\0'; \ + } while (0) + +-http_t *acquireCupsInstance() ++http_t *acquireCupsInstance(void) { - if ( http == NULL) + if (http == NULL) { -@@ -53,7 +54,7 @@ http_t* acquireCupsInstance() +@@ -55,7 +56,7 @@ http_t* acquireCupsInstance() + return http; } - - + -void _releaseCupsInstance() +void _releaseCupsInstance(void) {
meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch deleted +0 -64
64 lines not on this page · raw message
meta-oe/recipes-extended/hplip/hplip/configure.patch +1 -1
@@ -3,7 +3,7 @@ Upstream-Status: Pending --- a/configure.in +++ b/configure.in @@ -30,7 +30,7 @@ - AC_INIT([HP Linux Imaging and Printing], [3.22.10], [3.22.10], [hplip]) + AC_INIT([HP Linux Imaging and Printing], [3.25.8], [3.25.8], [hplip]) #AM_INIT_AUTOMAKE([1.9 foreign]) -AM_INIT_AUTOMAKE
meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch deleted +0 -22
@@ -1,22 +0,0 @@ -From 2fcd0e79b21ec6dbf975ad7d1b5697a78993e2f1 Mon Sep 17 00:00:00 2001 -From: David Valleau <[email protected]> -Date: Wed, 14 Aug 2019 15:47:38 -0700 -Subject: [PATCH] Fixing invalid return in void function - ---- -Upstream-Status: Pending - - prnt/hpps/hppsfilter.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/prnt/hpps/hppsfilter.c -+++ b/prnt/hpps/hppsfilter.c -@@ -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); -
meta-oe/recipes-extended/hplip/hplip_3.25.8.bb renamed from meta-oe/recipes-extended/hplip/hplip_3.22.10.bb +8 -3
@@ -8,17 +8,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://600-fix.patch \ file://030-replace_unsafe_memcpy_with_memmove.patch \ file://050-fix-glibcisms.patch \ - file://hplip-3.19.6-fix-return.patch \ file://0001-common-utils-Include-string.h-for-strcasestr.patch \ file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \ file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \ file://0004-Define-missing-prototype-for-functions.patch \ - file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ file://0001-Fix-installing-ipp-usb-quirk.patch \ file://0001-Drop-using-register-storage-classifier.patch \ file://0001-Fix-upstream-CFLAGS-override.patch" -SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" +SRC_URI[sha256sum] = "1cf6d6c28735435c8eb6646e83bcfb721e51c4b1f0e8cf9105a6faf96dc9ad25" CVE_PRODUCT = "hplip linux_imaging_and_printing"
@@ -51,6 +49,13 @@ EXTRA_OECONF += "\ EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" +do_configure:prepend() { + # If not set directly, it determines the absolute path of site-packages dir in recipe-sysroot, + # and then it installs the python libraries into a folder in ${D} that was constructed from + # that path, instead of using the correct ${PYTHON_SITEPACKAGES_DIR}. + sed -i 's,^\( PYTHONEXECDIR=\).*,\1"${PYTHON_SITEPACKAGES_DIR}",' configure.in +} + do_install:append() { rm -rf ${D}${datadir}/hplip/upgrade.py rm -rf ${D}${datadir}/hplip/uninstall.py