summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-03-03 19:03:26 +0100
committerKhem Raj <raj.khem@gmail.com>2026-03-03 21:08:13 -0800
commit13b791e31d8586a83542d4ec1fa744487741c3f7 (patch)
tree73b6bb71314b3d38d8d8e3ae9d233e7fc4580dc5
parent7125b918bd34bc5906f252f3fbba68f2e755c46d (diff)
downloadmeta-openembedded-13b791e31d8586a83542d4ec1fa744487741c3f7.tar.gz
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 <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch27
-rw-r--r--meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch33
-rw-r--r--meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch64
-rw-r--r--meta-oe/recipes-extended/hplip/hplip/configure.patch2
-rw-r--r--meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch22
-rw-r--r--meta-oe/recipes-extended/hplip/hplip_3.25.8.bb (renamed from meta-oe/recipes-extended/hplip/hplip_3.22.10.bb)11
6 files changed, 35 insertions, 124 deletions
diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch b/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch
index 659eca41c9..1457fc62c8 100644
--- a/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch
+++ b/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch
@@ -7,38 +7,29 @@ Also define _GNU_SOURCE for the same
7 7
8Upstream-Status: Pending 8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Rebased for latest version. string.h is included already, left
12only the _GNU_SOURCE definition.
13
14Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
10--- 15---
11 common/utils.c | 2 ++ 16 common/utils.c | 2 ++
12 1 file changed, 2 insertions(+) 17 1 file changed, 2 insertions(+)
13 18
14--- a/common/utils.c 19--- a/common/utils.c
15+++ b/common/utils.c 20+++ b/common/utils.c
16@@ -1,9 +1,11 @@ 21@@ -1,3 +1,4 @@
17+#define _GNU_SOURCE 22+#define _GNU_SOURCE
18 #include "utils.h" 23 #include "utils.h"
19 #include "string.h" 24 #include "string.h"
20 #include <dlfcn.h> 25 #include <dlfcn.h>
21 #include <sys/stat.h>
22 #include <errno.h>
23 #include <stdlib.h>
24+#include <string.h> /* strcasestr */
25
26 extern int errno;
27
28--- a/protocol/hp_ipp.c 26--- a/protocol/hp_ipp.c
29+++ b/protocol/hp_ipp.c 27+++ b/protocol/hp_ipp.c
30@@ -18,12 +18,13 @@ Boston, MA 02110-1301, USA. 28@@ -18,6 +18,7 @@ Boston, MA 02110-1301, USA.
31 29
32 \******************************************************************************/ 30 \******************************************************************************/
33 31
34-
35+#define _GNU_SOURCE 32+#define _GNU_SOURCE
36 #include <cups/cups.h> 33 #include <cups/cups.h>
37 #include <cups/language.h> 34 #include <cups/language.h>
38 #include <cups/ppd.h> 35 #include <cups/ppd.h>
39 #include <syslog.h>
40 #include <stdarg.h>
41+#include <string.h> /* strcasecmp */
42 #include <sys/types.h>
43 #include <pwd.h>
44 #include <sys/stat.h>
diff --git a/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch b/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch
index 7223bf939e..b17d8ec8fd 100644
--- a/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch
+++ b/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch
@@ -13,18 +13,19 @@ Upstream-Status: Pending
13 13
14--- a/prnt/cupsext/cupsext.c 14--- a/prnt/cupsext/cupsext.c
15+++ b/prnt/cupsext/cupsext.c 15+++ b/prnt/cupsext/cupsext.c
16@@ -101,6 +101,11 @@ typedef int Py_ssize_t; 16@@ -99,6 +99,12 @@ typedef int Py_ssize_t;
17 #define _STRINGIZE(x) #x 17 #define _STRINGIZE(x) #x
18 #define STRINGIZE(x) _STRINGIZE(x) 18 #define STRINGIZE(x) _STRINGIZE(x)
19 19
20+void _releaseCupsInstance(void); 20+void _releaseCupsInstance(void);
21+int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info); 21+int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info);
22+int setDefaultCupsPrinter(char *pr_name); 22+int setDefaultCupsPrinter(char *pr_name);
23+int delCupsPrinter(char *pr_name); 23+int delCupsPrinter(char *pr_name);
24+int controlCupsPrinter(char *pr_name, int op); 24+int controlCupsPrinter(char *pr_name, int op);
25 25+
26 //static http_t * http = NULL; /* HTTP object */ 26 // static http_t * http = NULL; /* HTTP object */
27 27
28 PyObject *releaseCupsInstance(PyObject *self, PyObject *args)
28--- a/protocol/hp_ipp.c 29--- a/protocol/hp_ipp.c
29+++ b/protocol/hp_ipp.c 30+++ b/protocol/hp_ipp.c
30@@ -22,6 +22,7 @@ Boston, MA 02110-1301, USA. 31@@ -22,6 +22,7 @@ Boston, MA 02110-1301, USA.
@@ -34,20 +35,20 @@ Upstream-Status: Pending
34+#include <stdio.h> 35+#include <stdio.h>
35 #include <syslog.h> 36 #include <syslog.h>
36 #include <stdarg.h> 37 #include <stdarg.h>
37 #include <string.h> /* strcasecmp */ 38 #include <sys/types.h>
38@@ -42,7 +43,7 @@ Boston, MA 02110-1301, USA. 39@@ -45,7 +46,7 @@ Boston, MA 02110-1301, USA.
39 #define STRINGIZE(x) _STRINGIZE(x) 40 dst[size - 1] = '\0'; \
40 41 } while (0)
41 42
42-http_t* acquireCupsInstance() 43-http_t *acquireCupsInstance()
43+http_t* acquireCupsInstance(void) 44+http_t *acquireCupsInstance(void)
44 { 45 {
45 if ( http == NULL) 46 if (http == NULL)
46 { 47 {
47@@ -53,7 +54,7 @@ http_t* acquireCupsInstance() 48@@ -55,7 +56,7 @@ http_t* acquireCupsInstance()
49 return http;
48 } 50 }
49 51
50
51-void _releaseCupsInstance() 52-void _releaseCupsInstance()
52+void _releaseCupsInstance(void) 53+void _releaseCupsInstance(void)
53 { 54 {
diff --git a/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch b/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch
deleted file mode 100644
index ac0ff81e6f..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From 4b3014df3990d90d6929510f2bde073171503329 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 2 Sep 2022 18:18:44 -0700
4Subject: [PATCH] hp_ipp.c: Add printf format to snprintf calls
5
6Avoid -Wformat warnings
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 protocol/hp_ipp.c | 14 +++++++-------
13 1 file changed, 7 insertions(+), 7 deletions(-)
14
15diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c
16index 597d9b9..a027baf 100644
17--- a/protocol/hp_ipp.c
18+++ b/protocol/hp_ipp.c
19@@ -112,7 +112,7 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file,
20 }
21
22 if ( info == NULL )
23- snprintf( info,sizeof(info), name );
24+ snprintf( info,sizeof(info), "%s", name );
25
26 sprintf( printer_uri, "ipp://localhost/printers/%s", name );
27
28@@ -513,27 +513,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list)
29
30 if ( strcmp(attr_name, "printer-name") == 0 &&
31 val_tag == IPP_TAG_NAME ) {
32- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) );
33+ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL) );
34 }
35 else if ( strcmp(attr_name, "device-uri") == 0 &&
36 val_tag == IPP_TAG_URI ) {
37- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) );
38+ snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL) );
39 }
40 else if ( strcmp(attr_name, "printer-uri-supported") == 0 &&
41 val_tag == IPP_TAG_URI ) {
42- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) );
43+ snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL) );
44 }
45 else if ( strcmp(attr_name, "printer-info") == 0 &&
46 val_tag == IPP_TAG_TEXT ) {
47- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) );
48+ snprintf(t_printer->info,sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL) );
49 }
50 else if ( strcmp(attr_name, "printer-location") == 0 &&
51 val_tag == IPP_TAG_TEXT ) {
52- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) );
53+ snprintf(t_printer->location,sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL) );
54 }
55 else if ( strcmp(attr_name, "printer-make-and-model") == 0 &&
56 val_tag == IPP_TAG_TEXT ) {
57- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) );
58+ snprintf(t_printer->make_model,sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL) );
59 }
60 else if ( strcmp(attr_name, "printer-state") == 0 &&
61 val_tag == IPP_TAG_ENUM ) {
62--
632.37.3
64
diff --git a/meta-oe/recipes-extended/hplip/hplip/configure.patch b/meta-oe/recipes-extended/hplip/hplip/configure.patch
index 0e0fd47fa1..9dad089ff1 100644
--- a/meta-oe/recipes-extended/hplip/hplip/configure.patch
+++ b/meta-oe/recipes-extended/hplip/hplip/configure.patch
@@ -3,7 +3,7 @@ Upstream-Status: Pending
3--- a/configure.in 3--- a/configure.in
4+++ b/configure.in 4+++ b/configure.in
5@@ -30,7 +30,7 @@ 5@@ -30,7 +30,7 @@
6 AC_INIT([HP Linux Imaging and Printing], [3.22.10], [3.22.10], [hplip]) 6 AC_INIT([HP Linux Imaging and Printing], [3.25.8], [3.25.8], [hplip])
7 7
8 #AM_INIT_AUTOMAKE([1.9 foreign]) 8 #AM_INIT_AUTOMAKE([1.9 foreign])
9-AM_INIT_AUTOMAKE 9-AM_INIT_AUTOMAKE
diff --git a/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch b/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch
deleted file mode 100644
index 45b25c5e76..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1From 2fcd0e79b21ec6dbf975ad7d1b5697a78993e2f1 Mon Sep 17 00:00:00 2001
2From: David Valleau <valleau@chromium.org>
3Date: Wed, 14 Aug 2019 15:47:38 -0700
4Subject: [PATCH] Fixing invalid return in void function
5
6---
7Upstream-Status: Pending
8
9 prnt/hpps/hppsfilter.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12--- a/prnt/hpps/hppsfilter.c
13+++ b/prnt/hpps/hppsfilter.c
14@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m
15 if(ptempbooklet_file == NULL)
16 {
17 fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename);
18- return 1;
19+ return;
20 }
21 chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
22
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/meta-oe/recipes-extended/hplip/hplip_3.25.8.bb
index 2b53d19f9f..3b5f58f320 100644
--- a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
+++ b/meta-oe/recipes-extended/hplip/hplip_3.25.8.bb
@@ -8,17 +8,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
8 file://600-fix.patch \ 8 file://600-fix.patch \
9 file://030-replace_unsafe_memcpy_with_memmove.patch \ 9 file://030-replace_unsafe_memcpy_with_memmove.patch \
10 file://050-fix-glibcisms.patch \ 10 file://050-fix-glibcisms.patch \
11 file://hplip-3.19.6-fix-return.patch \
12 file://0001-common-utils-Include-string.h-for-strcasestr.patch \ 11 file://0001-common-utils-Include-string.h-for-strcasestr.patch \
13 file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \ 12 file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \
14 file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \ 13 file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \
15 file://0004-Define-missing-prototype-for-functions.patch \ 14 file://0004-Define-missing-prototype-for-functions.patch \
16 file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \
17 file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ 15 file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \
18 file://0001-Fix-installing-ipp-usb-quirk.patch \ 16 file://0001-Fix-installing-ipp-usb-quirk.patch \
19 file://0001-Drop-using-register-storage-classifier.patch \ 17 file://0001-Drop-using-register-storage-classifier.patch \
20 file://0001-Fix-upstream-CFLAGS-override.patch" 18 file://0001-Fix-upstream-CFLAGS-override.patch"
21SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" 19SRC_URI[sha256sum] = "1cf6d6c28735435c8eb6646e83bcfb721e51c4b1f0e8cf9105a6faf96dc9ad25"
22 20
23CVE_PRODUCT = "hplip linux_imaging_and_printing" 21CVE_PRODUCT = "hplip linux_imaging_and_printing"
24 22
@@ -51,6 +49,13 @@ EXTRA_OECONF += "\
51 49
52EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" 50EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/"
53 51
52do_configure:prepend() {
53 # If not set directly, it determines the absolute path of site-packages dir in recipe-sysroot,
54 # and then it installs the python libraries into a folder in ${D} that was constructed from
55 # that path, instead of using the correct ${PYTHON_SITEPACKAGES_DIR}.
56 sed -i 's,^\( PYTHONEXECDIR=\).*,\1"${PYTHON_SITEPACKAGES_DIR}",' configure.in
57}
58
54do_install:append() { 59do_install:append() {
55 rm -rf ${D}${datadir}/hplip/upgrade.py 60 rm -rf ${D}${datadir}/hplip/upgrade.py
56 rm -rf ${D}${datadir}/hplip/uninstall.py 61 rm -rf ${D}${datadir}/hplip/uninstall.py