Skip to contentSkip to conversation

Bump cups-filter to the latest version

PATCH In review Angelo Compagnucci 2 participants 16 messages Aug 20, 2025 – Oct 30

lore
Share & tools
lore
#0 lore raw

v2 cover Bump cups-filter to the latest version

cups-filters went though a lot of changes lately, therefore bumping to the latest version wasn't as straightforward as I hoped.

Angelo Compagnucci (4):
package/qpdf: bump to version 12.2.0
package/libcupsfilters: new package
package/libppd: new package
package/cups-filters: bump to version 2.0.1

 DEVELOPERS                                    |   3 +
 package/Config.in                             |   2 +
 ...ecv-instead-of-system-CVE-2023-24805.patch | 208 ------------------
 package/cups-filters/Config.in                |  16 +-
 package/cups-filters/cups-filters.hash        |   2 +-
 package/cups-filters/cups-filters.mk          |  70 +-----
 package/libcupsfilters/Config.in              |  34 +++
 package/libcupsfilters/libcupsfilters.hash    |   3 +
 package/libcupsfilters/libcupsfilters.mk      |  93 ++++++++
 package/libppd/Config.in                      |   8 +
 package/libppd/libppd.hash                    |   4 +
 package/libppd/libppd.mk                      |  24 ++
 package/qpdf/qpdf.hash                        |   4 +-
 package/qpdf/qpdf.mk                          |  26 +--
 14 files changed, 193 insertions(+), 304 deletions(-)
 delete mode 100644 package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch
 create mode 100644 package/libcupsfilters/Config.in
 create mode 100644 package/libcupsfilters/libcupsfilters.hash
 create mode 100644 package/libcupsfilters/libcupsfilters.mk
 create mode 100644 package/libppd/Config.in
 create mode 100644 package/libppd/libppd.hash
 create mode 100644 package/libppd/libppd.mk
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 1/4 package/qpdf: bump to version 12.2.0

Changelog:
https://qpdf.readthedocs.io/en/stable/release-notes.html

Updating source URL (Github) and updating build system to cmake.

---
 DEVELOPERS             |  1 +
 package/qpdf/qpdf.hash |  4 ++--
 package/qpdf/qpdf.mk   | 26 ++++++++++----------------
 3 files changed, 13 insertions(+), 18 deletions(-)
DEVELOPERS +1 -0
index 3efad36d70..875406610e 100644
@@ -233,6 +233,7 @@ F:	package/python-pillow/
 F:	package/python-pydal/
 F:	package/python-spidev/
 F:	package/python-web2py/
+F:	package/qpdf/
 F:	package/qt5/qt5coap/
 F:	package/qt5/qt5knx/
 F:	package/qt5/qt5mqtt/
package/qpdf/qpdf.hash +2 -2
index 08a048f2ed..89391dd1d8 100644
@@ -1,5 +1,5 @@
-# From https://sourceforge.net/projects/qpdf/files/qpdf/10.5.0/qpdf-10.5.0.sha256/download
-sha256  88257d36a44fd5c50b2879488324dd9cafc11686ae49d8c4922a4872203ce006  qpdf-10.5.0.tar.gz
+# From https://sourceforge.net/projects/qpdf/files/qpdf/12.2.0/qpdf-12.2.0.sha256/download
+sha256  b3d1575b2218badc3549d6977524bb0f8c468c6528eebc8967bbe3078cf2cace  qpdf-12.2.0.tar.gz
 # Locally computed:
 sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE.txt
 sha256  fb929ac30decb4dc3a2eea2bec6c43296a797c5d2d602deb3784ee39430583d5  Artistic-2.0
package/qpdf/qpdf.mk +10 -16
index d479515789..2a4e7f3386 100644
@@ -4,36 +4,30 @@
 #
 ################################################################################
 
-QPDF_VERSION = 10.5.0
-QPDF_SITE = http://downloads.sourceforge.net/project/qpdf/qpdf/$(QPDF_VERSION)
+QPDF_VERSION = 12.2.0
+QPDF_SITE = https://github.com/qpdf/qpdf/releases/download/v$(QPDF_VERSION)
 QPDF_INSTALL_STAGING = YES
 QPDF_LICENSE = Apache-2.0 or Artistic-2.0
 QPDF_LICENSE_FILES = LICENSE.txt Artistic-2.0
 QPDF_CPE_ID_VALID = YES
 QPDF_DEPENDENCIES = host-pkgconf zlib jpeg
+QPDF_SUPPORTS_IN_SOURCE_BUILD = NO
 
-QPDF_CONF_OPTS = --with-random=/dev/urandom
-
-ifeq ($(BR2_USE_WCHAR),)
-QPDF_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DQPDF_NO_WCHAR_T"
-endif
+QPDF_CONF_OPTS = -DSKIP_OS_SECURE_RANDOM=ON \
+	-DUSE_IMPLICIT_CRYPTO=OFF -DREQUIRE_CRYPTO_NATIVE=ON
 
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
-QPDF_CONF_OPTS += --enable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=ON
 QPDF_DEPENDENCIES += gnutls
 else
-QPDF_CONF_OPTS += --disable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-QPDF_CONF_OPTS += --enable-crypto-openssl
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_OPENSSL=ON
 QPDF_DEPENDENCIES += openssl
 else
-QPDF_CONF_OPTS += --disable-crypto-openssl
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-QPDF_CONF_ENV += LIBS=-latomic
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_OPENSSL=OFF
 endif
 
-$(eval $(autotools-package))
+$(eval $(cmake-package))
Signature · 7 lines
2.34.1

To: [email protected]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 1/4 v2] package/qpdf: bump to version 12.2.0

Hello Angelo,

Thanks for this patch, which looks great. I have a few questions below.

Quoted 13 lines · On Wed, 20 Aug 2025 18:39:18 +0200 Angelo Compagnucci…
package/qpdf/qpdf.mk +2 -2
index d479515789..2a4e7f3386 100644
@@ -4,36 +4,30 @@
 #
 ################################################################################
 
-QPDF_VERSION = 10.5.0
-QPDF_SITE = http://downloads.sourceforge.net/project/qpdf/qpdf/$(QPDF_VERSION)
+QPDF_VERSION = 12.2.0
+QPDF_SITE = https://github.com/qpdf/qpdf/releases/download/v$(QPDF_VERSION)
 QPDF_INSTALL_STAGING = YES

package/qpdf/qpdf.mk line 18

Quoted 10 lines
package/qpdf/qpdf.mk +1 -4
 QPDF_LICENSE = Apache-2.0 or Artistic-2.0
 QPDF_LICENSE_FILES = LICENSE.txt Artistic-2.0
 QPDF_CPE_ID_VALID = YES
 QPDF_DEPENDENCIES = host-pkgconf zlib jpeg
+QPDF_SUPPORTS_IN_SOURCE_BUILD = NO
 
-QPDF_CONF_OPTS = --with-random=/dev/urandom
-
-ifeq ($(BR2_USE_WCHAR),)
-QPDF_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DQPDF_NO_WCHAR_T"

Are you confident that qpdf no builds properly in configurations with BR2_USE_WCHAR disabled, without anything special?

package/qpdf/qpdf.mk line 17

Quoted 3 lines
package/qpdf/qpdf.mk +2 -1
-endif
+QPDF_CONF_OPTS = -DSKIP_OS_SECURE_RANDOM=ON \
+	-DUSE_IMPLICIT_CRYPTO=OFF -DREQUIRE_CRYPTO_NATIVE=ON

What are these 3 options doing? -DSKIP_OS_SECURE_RANDOM=ON seems scary, and the other ones would benefit from a bit of explanation so we understand how it interacts with the options below to select crypto support.

Quoted 9 lines
package/qpdf/qpdf.mk +2 -2
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
-QPDF_CONF_OPTS += --enable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=ON
 QPDF_DEPENDENCIES += gnutls
 else
-QPDF_CONF_OPTS += --disable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=OFF
 endif
 

package/qpdf/qpdf.mk line 36

Quoted 10 lines
package/qpdf/qpdf.mk +1 -6
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-QPDF_CONF_OPTS += --enable-crypto-openssl
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_OPENSSL=ON
 QPDF_DEPENDENCIES += openssl
 else
-QPDF_CONF_OPTS += --disable-crypto-openssl
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-QPDF_CONF_ENV += LIBS=-latomic

This is no longer needed? Did you test building with a SPARC toolchain for example, which is known to be picky as all __atomic built-ins are implemented in libatomic?

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 1/4 v2] package/qpdf: bump to version 12.2.0

Il giorno ven 22 ago 2025 alle ore 23:08 Thomas Petazzoni < [email protected]> ha scritto:

Quoted 29 lines

Hello Angelo,

Thanks for this patch, which looks great. I have a few questions below.

package/qpdf/qpdf.mk line 5

Quoted 7 lines · On Wed, 20 Aug 2025 18:39:18 +0200 Angelo Compagnucci…
package/qpdf/qpdf.mk +0 -0
index d479515789..2a4e7f3386 100644
@@ -4,36 +4,30 @@
 #
 

################################################################################

package/qpdf/qpdf.mk line 7

Quoted 3 lines
package/qpdf/qpdf.mk +0 -2
-QPDF_VERSION = 10.5.0
-QPDF_SITE =

http://downloads.sourceforge.net/project/qpdf/qpdf/$(QPDF_VERSION)

package/qpdf/qpdf.mk line 7

Quoted 2 lines
package/qpdf/qpdf.mk +2 -0
+QPDF_VERSION = 12.2.0
+QPDF_SITE =

https://github.com/qpdf/qpdf/releases/download/v$(QPDF_VERSION)

Quoted 7 lines
package/qpdf/qpdf.mk +1 -0
 QPDF_INSTALL_STAGING = YES
 QPDF_LICENSE = Apache-2.0 or Artistic-2.0
 QPDF_LICENSE_FILES = LICENSE.txt Artistic-2.0
 QPDF_CPE_ID_VALID = YES
 QPDF_DEPENDENCIES = host-pkgconf zlib jpeg
+QPDF_SUPPORTS_IN_SOURCE_BUILD = NO
 
Quoted 8 lines

package/qpdf/qpdf.mk line 18

Quoted 4 lines
package/qpdf/qpdf.mk +0 -4
-QPDF_CONF_OPTS = --with-random=/dev/urandom
-
-ifeq ($(BR2_USE_WCHAR),)
-QPDF_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DQPDF_NO_WCHAR_T"

Are you confident that qpdf no builds properly in configurations with BR2_USE_WCHAR disabled, without anything special?

Ok, by the documentation it seems this is still valid

"You can disable use of ``wchar_t`` in qpdf's code by defining the ``QPDF_NO_WCHAR_T`` preprocessor symbol in your build (e.g. by including ``-DQPDF_NO_WCHAR_T`` in ``CFLAGS`` and ``CXXFLAGS``)."

Quoted 6 lines

-endif

package/qpdf/qpdf.mk line 17

Quoted 2 lines
package/qpdf/qpdf.mk +2 -0
+QPDF_CONF_OPTS = -DSKIP_OS_SECURE_RANDOM=ON \
+     -DUSE_IMPLICIT_CRYPTO=OFF -DREQUIRE_CRYPTO_NATIVE=ON

What are these 3 options doing? -DSKIP_OS_SECURE_RANDOM=ON seems scary,

This one maps the old --with-random=/dev/urandom option. I'm not sure if this is still needed honestly, we could try to remove it and see if it fails in testing.

Quoted 4 lines

and the other ones would benefit from a bit of explanation so we understand how it interacts with the options below to select crypto support.

Those two options are used to suppress the use of the internally downloaded and built providers and instead use system ones.

Quoted 9 lines

ifeq ($(BR2_PACKAGE_GNUTLS),y)

Quoted 8 lines
package/qpdf/qpdf.mk +2 -2
-QPDF_CONF_OPTS += --enable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=ON
 QPDF_DEPENDENCIES += gnutls
 else
-QPDF_CONF_OPTS += --disable-crypto-gnutls
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_GNUTLS=OFF
 endif
 
Quoted 15 lines

package/qpdf/qpdf.mk line 36

Quoted 10 lines
package/qpdf/qpdf.mk +1 -6
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-QPDF_CONF_OPTS += --enable-crypto-openssl
+QPDF_CONF_OPTS += -DREQUIRE_CRYPTO_OPENSSL=ON
 QPDF_DEPENDENCIES += openssl
 else
-QPDF_CONF_OPTS += --disable-crypto-openssl
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-QPDF_CONF_ENV += LIBS=-latomic

This is no longer needed? Did you test building with a SPARC toolchain for example, which is known to be picky as all __atomic built-ins are implemented in libatomic?

CMakeLists.txt has:
set(CMAKE_REQUIRED_LIBRARIES atomic)
therefore cmake should take care of this.

Quoted 9 lines

Thanks a lot!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

PATCH v2 2/4 package/libcupsfilters: new package

In reply to Angelo Compagnucci

Newer versions of cups-filters split several parts of the main software into external libraries. This is the main filters library.

---
 DEVELOPERS                                 |  1 +
 package/Config.in                          |  1 +
 package/libcupsfilters/Config.in           | 34 ++++++++
 package/libcupsfilters/libcupsfilters.hash |  3 +
 package/libcupsfilters/libcupsfilters.mk   | 93 ++++++++++++++++++++++
 5 files changed, 132 insertions(+)
 create mode 100644 package/libcupsfilters/Config.in
 create mode 100644 package/libcupsfilters/libcupsfilters.hash
 create mode 100644 package/libcupsfilters/libcupsfilters.mk
DEVELOPERS +1 -0
index 875406610e..bc8816c8aa 100644
@@ -220,6 +220,7 @@ F:	package/i2c-tools/
 F:	package/jq/
 F:	package/libapparmor/
 F:	package/libb64/
+F:	package/libcupsfilters
 F:	package/libdill/
 F:	package/mender/
 F:	package/mender-artifact/
package/Config.in +1 -0
index 137f74ed82..68a8f96e23 100644
@@ -352,6 +352,7 @@ comment "Graphic libraries"
 	source "package/freerdp/Config.in"
 	source "package/graphicsmagick/Config.in"
 	source "package/imagemagick/Config.in"
+	source "package/libcupsfilters/Config.in"
 	source "package/libglvnd/Config.in"
 	source "package/mesa3d/Config.in"
 	source "package/mesa3d-headers/Config.in"
package/libcupsfilters/Config.in new file +34 -0
new file mode 100644
index 0000000000..e664869a41
@@ -0,0 +1,34 @@
+config BR2_PACKAGE_LIBCUPSFILTERS
+	bool "libcupsfilters"
+	# needs fork()
+	depends on BR2_USE_MMU
+	depends on BR2_INSTALL_LIBSTDCPP # qpdf
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_PACKAGE_CUPS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # qpdf
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC # qpdf
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_FONTCONFIG
+	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_LCMS2
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_QPDF
+	help
+	  This project provides backends, filters, and other software
+	  that was once part of the core CUPS distribution but is no
+	  longer maintained by Apple Inc.
+	  This package provides the libcupsfilters library, which in
+	  its 2.x version contains all the code of the filters of the
+	  former cups-filters package as library functions,
+	  the so-called filter functions.
+
+	  http://www.linuxfoundation.org/collaborate/workgroups/openprinting/libcupsfilters
+
+comment "libcupsfilters needs a toolchain w/ wchar, C++, threads and dynamic library, gcc >= 5"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_5
package/libcupsfilters/libcupsfilters.hash new file +3 -0
new file mode 100644
index 0000000000..c1d2253229
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  ff31778a438bf335ceed254ccc706d5cd0eee55f608fcf567d88699b15f4fa9e  libcupsfilters-2.1.1.tar.gz
+sha256  38192ffdaca98b718f78b2d4abc38bb087f0bbcc9a16d212c98b903b985f900f  COPYING
package/libcupsfilters/libcupsfilters.mk new file +93 -0

93 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 2/4 v2] package/libcupsfilters: new package

Hello Angelo,

Thanks a lot for this great work! I have a number of comments/questions below.

Quoted 7 lines · On Wed, 20 Aug 2025 18:39:19 +0200 Angelo Compagnucci…
package/libcupsfilters/Config.in new file +1 -0
new file mode 100644
index 0000000000..e664869a41
@@ -0,0 +1,34 @@
+config BR2_PACKAGE_LIBCUPSFILTERS

package/libcupsfilters/Config.in line 11

Quoted 10 lines
package/libcupsfilters/Config.in new file +10 -0
+	bool "libcupsfilters"
+	# needs fork()
+	depends on BR2_USE_MMU
+	depends on BR2_INSTALL_LIBSTDCPP # qpdf
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_PACKAGE_CUPS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # qpdf
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC # qpdf

For the ones that don't have a comment, are they directly dependencies due to libcupsfilter itself?

package/libcupsfilters/Config.in line 12

Quoted 1 line
package/libcupsfilters/Config.in new file +1 -0
+	select BR2_PACKAGE_JPEG

This dependency doesn't seem to be mandatory according to
https://github.com/OpenPrinting/libcupsfilters/blob/master/INSTALL.md#prerequisites-for-compilation

package/libcupsfilters/Config.in line 13

Quoted 1 line
package/libcupsfilters/Config.in new file +1 -0
+	select BR2_PACKAGE_FONTCONFIG

Same.

package/libcupsfilters/Config.in line 14

Quoted 1 line
package/libcupsfilters/Config.in new file +1 -0
+	select BR2_PACKAGE_FREETYPE

There's no mention of freetype in INSTALL.md nor in configure.ac.

package/libcupsfilters/Config.in line 16

Quoted 2 lines
package/libcupsfilters/Config.in new file +2 -0
+	select BR2_PACKAGE_LCMS2
+	select BR2_PACKAGE_LIBGLIB2

There's no mention of glib2 in INSTALL.md nor in configure.ac.

Quoted 7 lines
package/libcupsfilters/libcupsfilters.mk new file +1 -0
new file mode 100644
index 0000000000..9cf449ac8d
@@ -0,0 +1,93 @@
+################################################################################

package/libcupsfilters/libcupsfilters.mk line 11

Quoted 10 lines
package/libcupsfilters/libcupsfilters.mk new file +10 -0
+#
+# libcupsfilters
+#
+################################################################################
+
+LIBCUPSFILTERS_VERSION = 2.1.1
+LIBCUPSFILTERS_SITE = https://github.com/OpenPrinting/libcupsfilters/releases/download/$(LIBCUPSFILTERS_VERSION)
+LIBCUPSFILTERS_LICENSE = GPL-2.0, GPL-2.0+, GPL-3.0, GPL-3.0+, LGPL-2, LGPL-2.1+, MIT, BSD-4-Clause
+LIBCUPSFILTERS_LICENSE_FILES = COPYING
+LIBCUPSFILTERS_CPE_ID_VENDOR = linuxfoundation

Where did you find this? I don't see any CPE entry about libcupsfilter, so we can't know which CPE it will get for the moment.

package/libcupsfilters/libcupsfilters.mk line 12

Quoted 1 line
package/libcupsfilters/libcupsfilters.mk new file +1 -0
+LIBCUPSFILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg

As requested above: this needs to be revisited.

package/libcupsfilters/libcupsfilters.mk line 19

Quoted 7 lines
package/libcupsfilters/libcupsfilters.mk new file +7 -0
+LIBCUPSFILTERS_INSTALL_STAGING = YES
+
+LIBCUPSFILTERS_CONF_OPTS = \
+	--disable-mutool \
+	--disable-foomatic \
+	--disable-braille \
+	--enable-imagefilters \

What is the impact of this? Do we need it unconditionally?

package/libcupsfilters/libcupsfilters.mk line 23

Quoted 4 lines
package/libcupsfilters/libcupsfilters.mk new file +4 -0
+	--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config \
+	--with-sysroot=$(STAGING_DIR) \
+	--with-pdftops=pdftops \
+	--with-jpeg \

jpeg seems optional.

package/libcupsfilters/libcupsfilters.mk line 25

Quoted 2 lines
package/libcupsfilters/libcupsfilters.mk new file +2 -0
+	--with-test-font-path=/dev/null \
+	--without-rcdir

You can probably check in ./configure --help for other things to disable, like:

--without-jpegxl

(I honestly didn't find any other).

package/libcupsfilters/libcupsfilters.mk line 85

Quoted 3 lines
package/libcupsfilters/libcupsfilters.mk new file +3 -0
+define LIBCUPSFILTERS_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 package/cups-filters/S82cups-browsed \
+		$(TARGET_DIR)/etc/init.d/S82cups-browsed

We really don't want libcupsfilter to install an init script that comes from package/cups-filters/. If libcupsfilter is now responsible for this, the init script should be moved there (or possibly copied initially, and then removed in the commit that bumps cups-filters, or something like that).

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v2 3/4 package/libppd: new package

In reply to Angelo Compagnucci

This package contains PPD library for newer versions of cups supporting more than ~10000 printer models.

---
v1->v2:
* Fix incorrect order of patches (Baruch Siach)
* Add a note about autoreconf (Baruch Siach)

 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/libppd/Config.in   |  8 ++++++++
 package/libppd/libppd.hash |  4 ++++
 package/libppd/libppd.mk   | 24 ++++++++++++++++++++++++
 5 files changed, 38 insertions(+)
 create mode 100644 package/libppd/Config.in
 create mode 100644 package/libppd/libppd.hash
 create mode 100644 package/libppd/libppd.mk
DEVELOPERS +1 -0
index bc8816c8aa..25d68f43a8 100644
@@ -222,6 +222,7 @@ F:	package/libapparmor/
 F:	package/libb64/
 F:	package/libcupsfilters
 F:	package/libdill/
+F:	package/libppd/
 F:	package/mender/
 F:	package/mender-artifact/
 F:	package/mono/
package/Config.in +1 -0
index 68a8f96e23..d029780241 100644
@@ -354,6 +354,7 @@ comment "Graphic libraries"
 	source "package/imagemagick/Config.in"
 	source "package/libcupsfilters/Config.in"
 	source "package/libglvnd/Config.in"
+	source "package/libppd/Config.in"
 	source "package/mesa3d/Config.in"
 	source "package/mesa3d-headers/Config.in"
 	source "package/ocrad/Config.in"
package/libppd/Config.in new file +8 -0
new file mode 100644
index 0000000000..124de4f7f2
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBPPD
+	bool "libppd"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_LIBCUPSFILTERS
+	help
+	  The Common Unix Printing System
+
+	  ~10000 printer models are supported with PPD-file-based classic CUPS drivers.
package/libppd/libppd.hash new file +4 -0
new file mode 100644
index 0000000000..3f698c3108
@@ -0,0 +1,4 @@
+# Locally calculated:
+sha256  b356aeed1335ef0ca7f799741782a2544e7acee63fb4b047b94e4e0395a9cb62  libppd-2.1.1.tar.gz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  977206f041b9a6f47ac00531e1242c0fab7063da71178f8d868b167b70866b6d  NOTICE
package/libppd/libppd.mk new file +24 -0
new file mode 100644
index 0000000000..9680bb7115
@@ -0,0 +1,24 @@
+################################################################################
+#
+# libppd
+#
+################################################################################
+
+LIBPPD_VERSION = 2.1.1
+LIBPPD_SOURCE = libppd-$(LIBPPD_VERSION).tar.gz
+LIBPPD_SITE = https://github.com/OpenPrinting/libppd/releases/download/$(LIBPPD_VERSION)
+LIBPPD_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
+LIBPPD_LICENSE_FILES = LICENSE NOTICE
+LIBPPD_CPE_ID_VENDOR = openprinting
+LIBPPD_SELINUX_MODULES = cups
+LIBPPD_INSTALL_STAGING = YES
+
+# no configure in tarball
+LIBPPD_AUTORECONF = YES
+
+LIBPPD_DEPENDENCIES = cups libcupsfilters
+
+LIBPPD_CONF_OPTS = \
+	--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config
+
+$(eval $(autotools-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

Re: [Buildroot] [PATCH 3/4 v2] package/libppd: new package

Hello Angelo,

package/libppd/Config.in line 3

Quoted 9 lines · On Wed, 20 Aug 2025 18:39:20 +0200 Angelo Compagnucci…
package/libppd/Config.in new file +3 -0
new file mode 100644
index 0000000000..124de4f7f2
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBPPD
+	bool "libppd"
+	depends on BR2_INSTALL_LIBSTDCPP

This means a Config.in comment is needed.

package/libppd/Config.in line 4

Quoted 1 line
package/libppd/Config.in new file +1 -0
+	depends on BR2_PACKAGE_LIBCUPSFILTERS

We want a "select" here, which means duplicating all the crazy dependencies of libcupsfilters yes :/

Quoted 8 lines
package/libppd/libppd.mk new file +2 -0
new file mode 100644
index 0000000000..9680bb7115
@@ -0,0 +1,24 @@
+################################################################################
+#

package/libppd/libppd.mk line 12

Quoted 10 lines
package/libppd/libppd.mk new file +10 -0
+# libppd
+#
+################################################################################
+
+LIBPPD_VERSION = 2.1.1
+LIBPPD_SOURCE = libppd-$(LIBPPD_VERSION).tar.gz
+LIBPPD_SITE = https://github.com/OpenPrinting/libppd/releases/download/$(LIBPPD_VERSION)
+LIBPPD_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
+LIBPPD_LICENSE_FILES = LICENSE NOTICE
+LIBPPD_CPE_ID_VENDOR = openprinting

Do you have a reference that shows this CPE vendor is used to identify libppd in particular?

package/libppd/libppd.mk line 13

Quoted 1 line
package/libppd/libppd.mk new file +1 -0
+LIBPPD_SELINUX_MODULES = cups

Are you sure this belongs here? This is a real question: I have no idea.

package/libppd/libppd.mk line 19

Quoted 6 lines
package/libppd/libppd.mk new file +6 -0
+LIBPPD_INSTALL_STAGING = YES
+
+# no configure in tarball
+LIBPPD_AUTORECONF = YES
+
+LIBPPD_DEPENDENCIES = cups libcupsfilters

Why do you have a dependency on cups here, but not in Config.in?

package/libppd/libppd.mk line 22

Quoted 2 lines
package/libppd/libppd.mk new file +2 -0
+LIBPPD_CONF_OPTS = \
+	--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config

Seems like it indeed uses cups directly, so package/libppd/Config.in should select it.

I see the configure.ac script checks for zlib. Is this a mandatory dependency? (Not according to the documentation).

There's a fair amount of --disable options in configure.ac, which would be useful to explicitly disable (or handle).

--disable-ghostscript
--disable-pdftops
--disable-mutool
... and more

That's weird because none of those dependencies are described in INSTALL.md. As if the configure.ac had been copy/pasted from libcupsfilters and not adjusted properly?

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

PATCH v2 4/4 package/cups-filters: bump to version 2.0.1

In reply to Angelo Compagnucci

Changelog:
https://github.com/OpenPrinting/cups-filters/releases/tag/2.0.1

This version makes use of two ancillary libraries split from the main code. Those libraries are:
* libcupsfilters
* libppd

This required a major rework of the package because most of the dependencies were moved those new libraries.

---
 ...ecv-instead-of-system-CVE-2023-24805.patch | 208 ------------------
 package/cups-filters/Config.in                |  16 +-
 package/cups-filters/cups-filters.hash        |   2 +-
 package/cups-filters/cups-filters.mk          |  70 +-----
 4 files changed, 10 insertions(+), 286 deletions(-)
 delete mode 100644 package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch
package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch deleted +0 -208
deleted file mode 100644
index e527b20f91..0000000000
@@ -1,208 +0,0 @@
-From 93e60d3df358c0ae6f3dba79e1c9684657683d89 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <[email protected]>
-Date: Wed, 17 May 2023 11:11:29 +0200
-Subject: [PATCH] beh backend: Use execv() instead of system() - CVE-2023-24805
-
-With execv() command line arguments are passed as separate strings and
-not the full command line in a single string. This prevents arbitrary
-command execution by escaping the quoting of the arguments in a job
-with a forged job title.
-
-In addition, done the following fixes and improvements:
-
-- Do not allow '/' in the scheme of the URI (= backend executable
-  name), to assure that only backends inside /usr/lib/cups/backend/
-  are used.
-
-- URI must have ':', to split off scheme, otherwise error out.
-
-- Check return value of snprintf() to create call path for backend, to
-  error out on truncation of a too long scheme or on complete failure
-  due to a completely odd scheme.
-
-- Use strncat() instead of strncpy() for getting scheme from URI, the latter
-  does not require setting terminating zero byte in case of truncation.
-
-- Also exclude "." or ".." as scheme, as directories are not valid CUPS
-  backends.
-
-- Do not use fprintf() in sigterm_handler(), to not interfere with a
-  fprintf() which could be running in the main process when
-  sigterm_handler() is triggered.
-
-- Use "static volatile int" for global variable job_canceled.
-
-Upstream: https://github.com/OpenPrinting/cups-filters/commit/93e60d3df358c0ae6f3dba79e1c9684657683d89
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- backend/beh.c | 107 +++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 84 insertions(+), 23 deletions(-)
-
-diff --git a/backend/beh.c b/backend/beh.c
-index 225fd27d5..8d51235b1 100644
---- a/backend/beh.c
-+++ b/backend/beh.c
-@@ -22,12 +22,13 @@
- #include "backend-private.h"
- #include <cups/array.h>
- #include <ctype.h>
-+#include <sys/wait.h>
- 
- /*
-  * Local globals...
-  */
- 
--static int		job_canceled = 0; /* Set to 1 on SIGTERM */
-+static volatile int	job_canceled = 0; /* Set to 1 on SIGTERM */
- 
- /*
-  * Local functions...
-@@ -213,21 +214,40 @@ call_backend(char *uri,                 /* I - URI of final destination */
- 	     char **argv,		/* I - Command-line arguments */
- 	     char *filename) {          /* I - File name of input data */
-   const char	*cups_serverbin;	/* Location of programs */
-+  char          *backend_argv[8];	/* Arguments for backend */
-   char		scheme[1024],           /* Scheme from URI */
-                 *ptr,			/* Pointer into scheme */
--		cmdline[65536];		/* Backend command line */
--  int           retval;
-+		backend_path[2048];	/* Backend path */
-+  int           pid = 0, 		/* Process ID of backend */
-+                wait_pid,		/* Process ID from wait() */
-+                wait_status, 		/* Status from child */
-+                retval = 0;
-+  int           bytes;
- 
-  /*
-   * Build the backend command line...
-   */
- 
--  strncpy(scheme, uri, sizeof(scheme) - 1);
--  if (strlen(uri) > 1023)
--    scheme[1023] = '\0';
-+  scheme[0] = '\0';
-+  strncat(scheme, uri, sizeof(scheme) - 1);
-   if ((ptr = strchr(scheme, ':')) != NULL)
-     *ptr = '\0';
--
-+  else {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, no colon (':') to mark end of scheme part.\n");
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-+  if (strchr(scheme, '/')) {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, scheme contains a slash ('/').\n");
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-+  if (!strcmp(scheme, ".") || !strcmp(scheme, "..")) {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, scheme (\"%s\") is a directory.\n",
-+	    scheme);
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-   if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
-     cups_serverbin = CUPS_SERVERBIN;
- 
-@@ -235,16 +255,29 @@ call_backend(char *uri,                 /* I - URI of final destination */
-     fprintf(stderr,
- 	    "ERROR: beh: Direct output into a file not supported.\n");
-     exit (CUPS_BACKEND_FAILED);
--  } else
--    snprintf(cmdline, sizeof(cmdline),
--	     "%s/backend/%s '%s' '%s' '%s' '%s' '%s' %s",
--	     cups_serverbin, scheme, argv[1], argv[2], argv[3],
--	     /* Apply number of copies only if beh was called with a
--		file name and not with the print data in stdin, as
--	        backends should handle copies only if they are called
--	        with a file name */
--	     (argc == 6 ? "1" : argv[4]),
--	     argv[5], filename);
-+  }
-+
-+  backend_argv[0] = uri;
-+  backend_argv[1] = argv[1];
-+  backend_argv[2] = argv[2];
-+  backend_argv[3] = argv[3];
-+  /* Apply number of copies only if beh was called with a file name
-+     and not with the print data in stdin, as backends should handle
-+     copies only if they are called with a file name */
-+  backend_argv[4] = (argc == 6 ? "1" : argv[4]);
-+  backend_argv[5] = argv[5];
-+  backend_argv[6] = filename;
-+  backend_argv[7] = NULL;
-+
-+  bytes = snprintf(backend_path, sizeof(backend_path),
-+		   "%s/backend/%s", cups_serverbin, scheme);
-+  if (bytes < 0 || bytes >= sizeof(backend_path))
-+  {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid scheme (\"%s\"), could not determing backend path.\n",
-+	    scheme);
-+    return (CUPS_BACKEND_FAILED);
-+  }
- 
-  /*
-   * Overwrite the device URI and run the actual backend...
-@@ -253,18 +286,44 @@ call_backend(char *uri,                 /* I - URI of final destination */
-   setenv("DEVICE_URI", uri, 1);
- 
-   fprintf(stderr,
--	  "DEBUG: beh: Executing backend command line \"%s\"...\n",
--	  cmdline);
-+	  "DEBUG: beh: Executing backend command line \"%s '%s' '%s' '%s' '%s' '%s' %s\"...\n",
-+	  backend_path, backend_argv[1], backend_argv[2], backend_argv[3],
-+	  backend_argv[4], backend_argv[5], backend_argv[6]);
-   fprintf(stderr,
- 	  "DEBUG: beh: Using device URI: %s\n",
- 	  uri);
- 
--  retval = system(cmdline) >> 8;
-+  if ((pid = fork()) == 0) {
-+   /*
-+    * Child comes here...
-+    */
-+
-+    /* Run the backend */
-+    execv(backend_path, backend_argv);
- 
--  if (retval == -1)
-     fprintf(stderr, "ERROR: Unable to execute backend command line: %s\n",
- 	    strerror(errno));
- 
-+    exit(1);
-+  } else if (pid < 0) {
-+   /*
-+    * Unable to fork!
-+    */
-+
-+    return (CUPS_BACKEND_FAILED);
-+  }
-+
-+  while ((wait_pid = wait(&wait_status)) < 0 && errno == EINTR);
-+
-+  if (wait_pid >= 0 && wait_status) {
-+    if (WIFEXITED(wait_status))
-+      retval = WEXITSTATUS(wait_status);
-+    else if (WTERMSIG(wait_status) != SIGTERM)
-+      retval = WTERMSIG(wait_status);
-+    else
-+      retval = 0;
-+  }
-+
-   return (retval);
- }
- 
-@@ -277,8 +336,10 @@ static void
- sigterm_handler(int sig) {		/* I - Signal number (unused) */
-   (void)sig;
- 
--  fprintf(stderr,
--	  "DEBUG: beh: Job canceled.\n");
-+  const char * const msg = "DEBUG: beh: Job canceled.\n";
-+  /* The if() is to eliminate the return value and silence the warning
-+     about an unused return value. */
-+  if (write(2, msg, strlen(msg)));
- 
-   if (job_canceled)
-     _exit(CUPS_BACKEND_OK);
package/cups-filters/Config.in +6 -10
index ded99a4774..89f4b4d08d 100644
@@ -2,19 +2,15 @@ config BR2_PACKAGE_CUPS_FILTERS
 	bool "cups-filters"
 	# needs fork()
 	depends on BR2_USE_MMU
-	depends on BR2_INSTALL_LIBSTDCPP # qpdf
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_WCHAR
 	depends on !BR2_STATIC_LIBS
-	depends on BR2_USE_WCHAR # libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_PACKAGE_CUPS
+	depends on BR2_PACKAGE_LIBCUPSFILTERS
+	depends on BR2_PACKAGE_LIBPPD
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # qpdf
-	depends on BR2_TOOLCHAIN_HAS_ATOMIC # qpdf
-	select BR2_PACKAGE_JPEG
-	select BR2_PACKAGE_FONTCONFIG
-	select BR2_PACKAGE_FREETYPE
-	select BR2_PACKAGE_LCMS2
-	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_QPDF
 	help
 	  This project provides backends, filters, and other software
 	  that was once part of the core CUPS distribution but is no
package/cups-filters/cups-filters.hash +1 -1
index 7fb3badf46..24c7b463f7 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  01a2acbd6bb78f09638047e4e9ce305d7e5ef4cb9ed6949672b5d901b7321dd4  cups-filters-1.28.17.tar.gz
+sha256  3de1cbb889d06e5a6a945dcb921292544477ab89da95ca89f1eec2de29937afb  cups-filters-2.0.1.tar.gz
 sha256  38192ffdaca98b718f78b2d4abc38bb087f0bbcc9a16d212c98b903b985f900f  COPYING
package/cups-filters/cups-filters.mk +3 -67

85 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

Re: [Buildroot] [PATCH 4/4 v2] package/cups-filters: bump to version 2.0.1

Hello Angelo,

package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS · line 8

Quoted 13 lines · On Wed, 20 Aug 2025 18:39:21 +0200 Angelo Compagnucci…
package/cups-filters/Config.in +4 -1
index ded99a4774..89f4b4d08d 100644
@@ -2,19 +2,15 @@ config BR2_PACKAGE_CUPS_FILTERS
 	bool "cups-filters"
 	# needs fork()
 	depends on BR2_USE_MMU
-	depends on BR2_INSTALL_LIBSTDCPP # qpdf
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_WCHAR

Make sure to indicate from which package those dependencies are inherited.

package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS · line 13

Quoted 7 lines
package/cups-filters/Config.in +2 -2
 	depends on !BR2_STATIC_LIBS
-	depends on BR2_USE_WCHAR # libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_PACKAGE_CUPS
+	depends on BR2_PACKAGE_LIBCUPSFILTERS
+	depends on BR2_PACKAGE_LIBPPD
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # qpdf

You're no longer selecting qpdf, so the comment here is no longer accurate.

Quoted 1 line
package/cups-filters/Config.in +0 -0
 CUPS_FILTERS_CONF_OPTS = \

[...]

package/cups-filters/Config.in

Quoted 1 line
package/cups-filters/Config.in +1 -0
+	CFLAGS="$(TARGET_CFLAGS) -std=gnu17"

By convention, this should go in CUPS_FILTERS_CONF_ENV

Quoted 3 lines

define CUPS_FILTERS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/cups-filters/S82cups-browsed \

Shouldn't this be dropped, now that libcupsfilters does it?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

v3 cover Bump cups-filters to the latest version

In reply to Angelo Compagnucci

Since version 2.0, cups-filters has been split by OpenPrinting into several projects:
- libcupsfilters: the filter functions library
- libppd: the legacy PPD support library
- cups-browsed: the browsing daemon
- cups-filters: the remaining filters and backends

This series adds the new packages and bumps cups-filters to 2.0.1.

libcupsfilters 2.2.x replaced qpdf and Poppler with PDFio and is now written only in C, so the series also adds a pdfio package and the toolchain dependencies coming from qpdf (gcc >= 10, atomic) go away:
libppd, still partly C++, only needs gcc >= 7 for C++17.

Changes v2 -> v3:
- drop the qpdf bump, qpdf is not needed anymore (and master is

    already at 12.3.2)

- new pdfio package, needed by libcupsfilters 2.2.x
- new cups-browsed package, with the init script moved from cups-filters [Thomas]
- address all the review comments, see each patch for details

Answers to the questions on v2 [Thomas]:
- CPE vendors: libcupsfilters, libppd and cups-browsed all use the

    openprinting vendor in the NVD (CVE-2024-47076, CVE-2024-47175,
    CVE-2024-47176), pdfio uses msweet

- zlib is mandatory for libppd, as it's used by the rastertops filter function
- all the optional features that configure enables by default are now explicitly enabled or disabled
- LIBPPD_SELINUX_MODULES was a leftover and has been dropped

Build tested on ARM (Bootlin bleeding-edge glibc toolchain, gcc 16.2) with a minimal configuration and with a full one (dbus, avahi, poppler, cairo, png, tiff, jpeg, fontconfig, libexif), and pdfio also with a static-only musl toolchain.

Angelo Compagnucci (5):
package/pdfio: new package
package/libcupsfilters: new package
package/libppd: new package
package/cups-browsed: new package
package/cups-filters: bump to version 2.0.1

 DEVELOPERS                                    |   4 +
 package/Config.in                             |   4 +
 package/cups-browsed/Config.in                |  22 ++
 .../S82cups-browsed                           |   0
 package/cups-browsed/cups-browsed.hash        |   4 +
 package/cups-browsed/cups-browsed.mk          |  36 +++
 ...ecv-instead-of-system-CVE-2023-24805.patch | 209 ------------------
 ...x-infinite-loop-caused-by-crafted-f.patch} |  33 ++-
 ...ilters-Fixed-building-with-QPDF-11.x.patch |  57 -----
 ...ated-code-to-be-built-with-QPDF-12.x.patch | 165 --------------
 ...x-out-of-bounds-write-in-pdftoraster.patch |  41 ----
 package/cups-filters/Config.in                |  42 ++--
 package/cups-filters/cups-filters.hash        |   5 +-
 package/cups-filters/cups-filters.mk          |  94 ++------
 package/libcupsfilters/Config.in              |  19 ++
 package/libcupsfilters/libcupsfilters.hash    |   4 +
 package/libcupsfilters/libcupsfilters.mk      |  89 ++++++++
 package/libppd/Config.in                      |  19 ++
 package/libppd/libppd.hash                    |   4 +
 package/libppd/libppd.mk                      |  42 ++++
 package/pdfio/Config.in                       |   8 +
 package/pdfio/pdfio.hash                      |   4 +
 package/pdfio/pdfio.mk                        |  22 ++
 23 files changed, 329 insertions(+), 598 deletions(-)
 create mode 100644 package/cups-browsed/Config.in
 rename package/{cups-filters => cups-browsed}/S82cups-browsed (100%)
 create mode 100644 package/cups-browsed/cups-browsed.hash
 create mode 100644 package/cups-browsed/cups-browsed.mk
 delete mode 100644 package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch
 rename package/cups-filters/{0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch => 0001-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch} (61%)
 delete mode 100644 package/cups-filters/0003-libcupsfilters-Fixed-building-with-QPDF-11.x.patch
 delete mode 100644 package/cups-filters/0004-Updated-code-to-be-built-with-QPDF-12.x.patch
 delete mode 100644 package/cups-filters/0005-fix-out-of-bounds-write-in-pdftoraster.patch
 create mode 100644 package/libcupsfilters/Config.in
 create mode 100644 package/libcupsfilters/libcupsfilters.hash
 create mode 100644 package/libcupsfilters/libcupsfilters.mk
 create mode 100644 package/libppd/Config.in
 create mode 100644 package/libppd/libppd.hash
 create mode 100644 package/libppd/libppd.mk
 create mode 100644 package/pdfio/Config.in
 create mode 100644 package/pdfio/pdfio.hash
 create mode 100644 package/pdfio/pdfio.mk
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

PATCH v3 1/5 package/pdfio: new package

PDFio is a simple C library for reading and writing PDF files, needed by libcupsfilters since version 2.2.0, where it replaces qpdf and Poppler.

zlib is mandatory, libpng is optional.

The CPE vendor is msweet, as in the NVD CPE dictionary.

---
Changes v2 -> v3:
- new patch: needed by libcupsfilters 2.2.x

---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/pdfio/Config.in  |  8 ++++++++
 package/pdfio/pdfio.hash |  4 ++++
 package/pdfio/pdfio.mk   | 22 ++++++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/pdfio/Config.in
 create mode 100644 package/pdfio/pdfio.hash
 create mode 100644 package/pdfio/pdfio.mk
DEVELOPERS +1 -0
index b4ada4e1f9..db405749d9 100644
@@ -245,6 +245,7 @@ F:	package/mono/
 F:	package/mono-gtksharp3/
 F:	package/monolite/
 F:	package/openjpeg/
+F:	package/pdfio/
 F:	package/python-can/
 F:	package/python-minimalmodbus/
 F:	package/python-pillow/
package/Config.in +1 -0
index 796c4f1ad6..f38179c3c7 100644
@@ -1830,6 +1830,7 @@ menu "Graphics"
 	source "package/pango/Config.in"
 	source "package/pangomm/Config.in"
 	source "package/pangomm2_46/Config.in"
+	source "package/pdfio/Config.in"
 	source "package/pixman/Config.in"
 	source "package/poppler/Config.in"
 	source "package/powervr/Config.in"
package/pdfio/Config.in new file +8 -0
new file mode 100644
index 0000000000..ab59fe1b08
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PDFIO
+	bool "pdfio"
+	select BR2_PACKAGE_ZLIB
+	help
+	  PDFio is a simple C library for reading and writing PDF
+	  files.
+
+	  https://www.msweet.org/pdfio
package/pdfio/pdfio.hash new file +4 -0
new file mode 100644
index 0000000000..3a8942568e
@@ -0,0 +1,4 @@
+# Locally computed:
+sha256  be9790ff2e9f0b7052fca8e96f2fdb6ebac903910e7ed8e2d1de4b1e55a40a23  pdfio-1.6.6.tar.gz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  7f08e9e1433efb261a0828e73ef59cb5950e8d5ff7d325ca5f7d81cc1d610ba4  NOTICE
package/pdfio/pdfio.mk new file +22 -0
new file mode 100644
index 0000000000..416834b86c
@@ -0,0 +1,22 @@
+################################################################################
+#
+# pdfio
+#
+################################################################################
+
+PDFIO_VERSION = 1.6.6
+PDFIO_SITE = https://github.com/michaelrsweet/pdfio/releases/download/v$(PDFIO_VERSION)
+PDFIO_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
+PDFIO_LICENSE_FILES = LICENSE NOTICE
+PDFIO_CPE_ID_VENDOR = msweet
+PDFIO_INSTALL_STAGING = YES
+PDFIO_DEPENDENCIES = host-pkgconf zlib
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+PDFIO_CONF_OPTS += --enable-libpng
+PDFIO_DEPENDENCIES += libpng
+else
+PDFIO_CONF_OPTS += --disable-libpng
+endif
+
+$(eval $(autotools-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw

PATCH v3 2/5 package/libcupsfilters: new package

In reply to Angelo Compagnucci

Since version 2.0, cups-filters has been split into several projects. libcupsfilters contains the library and the filter functions that were part of cups-filters 1.x, which the remaining cups-filters executables are now thin wrappers around.

Since version 2.2.0, libcupsfilters is written only in C: qpdf and Poppler have been replaced by PDFio, and the pdftoraster filter function runs Poppler's pdftoppm executable.

The required dependencies are cups, lcms2 and pdfio. All the other features are optional and enabled by default by the configure script, so they are explicitly enabled or disabled depending on the configuration. Ghostscript, mutool and pdftoppm are only called at runtime, through their executables, so they are not build dependencies.

BUILT_SOURCES is emptied, as it is only used to generate an input file for the tests, by running a program built for the target, which fails when cross-compiling.

The CPE vendor is openprinting, as shown by CVE-2024-47076 and CVE-2025-64503.

---
Changes v2 -> v3:
- bump to version 2.2.1 (fixes CVE-2025-64503) and use the tar.xz archive
- use pdfio instead of qpdf and Poppler, as required by 2.2.x: this drops the gcc >= 10 and atomic dependencies coming from qpdf
- fix the license: Apache-2.0 with GPL-2.0/LGPL-2.0 exception
- select cups instead of depending on it, document where each toolchain dependency comes from [Thomas]
- drop freetype and glib2, not used by libcupsfilters, and the wchar and dynamic library dependencies coming from glib2 [Thomas]
- make jpeg and fontconfig optional [Thomas]
- explicitly handle all the optional features: libjxl, texttopdf, ghostscript and mutool [Thomas]
- drop the cups-filters 1.x options that libcupsfilters doesn't
support: avahi, ijs, foomatic, braille, ...
- use the openprinting CPE vendor, as in CVE-2024-47076 [Thomas]
- don't install the cups-browsed init script, now in the new cups-browsed package [Thomas]
- empty BUILT_SOURCES, which runs a target program to generate a file only used by the tests
- add a Config.in comment, update the help text and URL

---
 DEVELOPERS                                 |  1 +
 package/Config.in                          |  1 +
 package/libcupsfilters/Config.in           | 19 +++++
 package/libcupsfilters/libcupsfilters.hash |  4 +
 package/libcupsfilters/libcupsfilters.mk   | 89 ++++++++++++++++++++++
 5 files changed, 114 insertions(+)
 create mode 100644 package/libcupsfilters/Config.in
 create mode 100644 package/libcupsfilters/libcupsfilters.hash
 create mode 100644 package/libcupsfilters/libcupsfilters.mk
DEVELOPERS +1 -0
index db405749d9..ee74a3768b 100644
@@ -238,6 +238,7 @@ F:	package/i2c-tools/
 F:	package/jq/
 F:	package/libapparmor/
 F:	package/libb64/
+F:	package/libcupsfilters/
 F:	package/libdill/
 F:	package/mender/
 F:	package/mender-artifact/
package/Config.in +1 -0
index f38179c3c7..fee866748c 100644
@@ -347,6 +347,7 @@ comment "Graphic libraries"
 	source "package/freerdp/Config.in"
 	source "package/graphicsmagick/Config.in"
 	source "package/imagemagick/Config.in"
+	source "package/libcupsfilters/Config.in"
 	source "package/libglvnd/Config.in"
 	source "package/mesa3d/Config.in"
 	source "package/mesa3d-headers/Config.in"
package/libcupsfilters/Config.in new file +19 -0
new file mode 100644
index 0000000000..89d1d6e6bb
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBCUPSFILTERS
+	bool "libcupsfilters"
+	depends on BR2_USE_MMU # cups, fork()
+	depends on BR2_INSTALL_LIBSTDCPP # cups
+	depends on BR2_TOOLCHAIN_HAS_THREADS # cups
+	select BR2_PACKAGE_CUPS
+	select BR2_PACKAGE_LCMS2
+	select BR2_PACKAGE_PDFIO
+	help
+	  libcupsfilters contains the code of the filters of the former
+	  cups-filters package as library functions, the so-called
+	  filter functions, as well as other printing related
+	  functions.
+
+	  https://github.com/OpenPrinting/libcupsfilters
+
+comment "libcupsfilters needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/libcupsfilters/libcupsfilters.hash new file +4 -0
new file mode 100644
index 0000000000..6957e416e5
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  0a22b849d5068c4c86b20fbb4192d3faa3dabcc9ee844c8fd73710ed821d4860  libcupsfilters-2.2.1.tar.xz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  e03a505494f245983c77a0f682fd900799f373ef738d3aa93ff32a3d61096b05  NOTICE
package/libcupsfilters/libcupsfilters.mk new file +89 -0

89 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#13 lore raw

PATCH v3 3/5 package/libppd: new package

In reply to Angelo Compagnucci

Since version 2.0, cups-filters has been split into several projects. libppd contains the legacy PPD file support of CUPS and cups-filters, needed by the classic CUPS printer drivers.

The required dependencies are cups, libcupsfilters and zlib (used by the rastertops filter function). libppd is partly written in C++ and built with -std=c++17, hence the gcc >= 7 dependency.

libppd needs at least one PDF to PostScript renderer to build. Renderers are only called at runtime, through their executables, so Poppler's pdftops is always enabled as the default one, as the former cups-filters package did, and Ghostscript, mutool and pdftocairo are enabled when the corresponding packages are selected.

The CPE vendor is openprinting, as shown by CVE-2024-47175.

---
Changes v2 -> v3:
- use the tar.xz archive, which contains the configure script, and drop AUTORECONF
- select cups, libcupsfilters and zlib instead of depending on them, inherit the cups and libcupsfilters dependencies, add the gcc >= 7 dependency for C++17 and a Config.in comment [Thomas]
- add the missing host-pkgconf and zlib dependencies: zlib is mandatory, as it is used by the rastertops filter function [Thomas]
- explicitly handle the PDF renderers: always enable pdftops, disable acroread and enable ghostscript, mutool and pdftocairo depending on the configuration [Thomas]
- drop LIBPPD_SELINUX_MODULES [Thomas]
- the openprinting CPE vendor is used in CVE-2024-47175 [Thomas]
- rewrite the help text, add the URL

Changes v1 -> v2:
- fix incorrect order of patches [Baruch]
- add a note about autoreconf [Baruch]

---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/libppd/Config.in   | 19 +++++++++++++++++
 package/libppd/libppd.hash |  4 ++++
 package/libppd/libppd.mk   | 42 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 67 insertions(+)
 create mode 100644 package/libppd/Config.in
 create mode 100644 package/libppd/libppd.hash
 create mode 100644 package/libppd/libppd.mk
DEVELOPERS +1 -0
index ee74a3768b..e133d0dbaf 100644
@@ -240,6 +240,7 @@ F:	package/libapparmor/
 F:	package/libb64/
 F:	package/libcupsfilters/
 F:	package/libdill/
+F:	package/libppd/
 F:	package/mender/
 F:	package/mender-artifact/
 F:	package/mono/
package/Config.in +1 -0
index fee866748c..f7e2f8517e 100644
@@ -349,6 +349,7 @@ comment "Graphic libraries"
 	source "package/imagemagick/Config.in"
 	source "package/libcupsfilters/Config.in"
 	source "package/libglvnd/Config.in"
+	source "package/libppd/Config.in"
 	source "package/mesa3d/Config.in"
 	source "package/mesa3d-headers/Config.in"
 	source "package/ocrad/Config.in"
package/libppd/Config.in new file +19 -0
new file mode 100644
index 0000000000..048dc5616a
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBPPD
+	bool "libppd"
+	depends on BR2_USE_MMU # cups, libcupsfilters
+	depends on BR2_INSTALL_LIBSTDCPP # cups, libcupsfilters
+	depends on BR2_TOOLCHAIN_HAS_THREADS # cups, libcupsfilters
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	select BR2_PACKAGE_CUPS
+	select BR2_PACKAGE_LIBCUPSFILTERS
+	select BR2_PACKAGE_ZLIB
+	help
+	  libppd contains the legacy PPD file support of CUPS and
+	  cups-filters, needed by the classic CUPS printer drivers.
+
+	  https://github.com/OpenPrinting/libppd
+
+comment "libppd needs a toolchain w/ C++, threads, gcc >= 7"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/libppd/libppd.hash new file +4 -0
new file mode 100644
index 0000000000..8f124710a5
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  3fa341cc03964046d2bf6b161d80c1b4b2e20609f38d860bcaa11cb70c1285e4  libppd-2.1.1.tar.xz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  55e4def1908892891dca2901cab74ef8142999fc3384ad17364b95893fe0c8f4  NOTICE
package/libppd/libppd.mk new file +42 -0

42 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#14 lore raw

PATCH v3 4/5 package/cups-browsed: new package

In reply to Angelo Compagnucci

Since version 2.0, cups-filters has been split into several projects. cups-browsed contains the daemon, formerly part of cups-filters, that browses the network for remote CUPS queues and IPP network printers and automatically creates local queues pointing to them.

The init script is copied from the cups-filters package, which will stop installing it when bumped to version 2.x.

The CPE vendor is openprinting, as shown by CVE-2024-47176.

---
Changes v2 -> v3:
- new patch: the browsing daemon and its init script moved from cups-filters to this new package [Thomas]

---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/cups-browsed/Config.in         | 22 ++++++++++++
 package/cups-browsed/S82cups-browsed   | 48 ++++++++++++++++++++++++++
 package/cups-browsed/cups-browsed.hash |  4 +++
 package/cups-browsed/cups-browsed.mk   | 36 +++++++++++++++++++
 6 files changed, 112 insertions(+)
 create mode 100644 package/cups-browsed/Config.in
 create mode 100644 package/cups-browsed/S82cups-browsed
 create mode 100644 package/cups-browsed/cups-browsed.hash
 create mode 100644 package/cups-browsed/cups-browsed.mk
DEVELOPERS +1 -0
index e133d0dbaf..3ebb6dc7ab 100644
@@ -228,6 +228,7 @@ F:	configs/sipeed_lichee_rv*
 F:	package/apparmor/
 F:	package/corkscrew/
 F:	package/cups/
+F:	package/cups-browsed/
 F:	package/cups-filters/
 F:	package/cutekeyboard/
 F:	package/fail2ban/
package/Config.in +1 -0
index f7e2f8517e..c4306705d6 100644
@@ -2472,6 +2472,7 @@ endif
 	source "package/crda/Config.in"
 	source "package/ctorrent/Config.in"
 	source "package/cups/Config.in"
+	source "package/cups-browsed/Config.in"
 	source "package/cups-filters/Config.in"
 	source "package/cups-pk-helper/Config.in"
 	source "package/dante/Config.in"
package/cups-browsed/Config.in new file +22 -0
new file mode 100644
index 0000000000..4f99761324
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_CUPS_BROWSED
+	bool "cups-browsed"
+	depends on BR2_USE_MMU # libcupsfilters, libppd, libglib2
+	depends on BR2_INSTALL_LIBSTDCPP # libcupsfilters, libppd
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcupsfilters, libppd, libglib2
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # libppd
+	depends on BR2_USE_WCHAR # libglib2
+	select BR2_PACKAGE_CUPS
+	select BR2_PACKAGE_LIBCUPSFILTERS
+	select BR2_PACKAGE_LIBPPD
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  cups-browsed is a helper daemon to browse the network for
+	  remote CUPS queues and IPP network printers and
+	  automatically create local queues pointing to them.
+
+	  https://github.com/OpenPrinting/cups-browsed
+
+comment "cups-browsed needs a toolchain w/ C++, wchar, threads, gcc >= 7"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/cups-browsed/S82cups-browsed new file +48 -0

48 lines not on this page · raw message

package/cups-browsed/cups-browsed.hash new file +4 -0
new file mode 100644
index 0000000000..c5fc06ef3e
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  d185169a74e6a5731b6bd74cba8d269f34e5c71cb71ef1841f2fa91637ba1d58  cups-browsed-2.1.1.tar.xz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  88cc7e80cd02c9ace9c9296c1f5328151589db7abb504d638aba85c2f85e37b2  NOTICE
package/cups-browsed/cups-browsed.mk new file +36 -0
new file mode 100644
index 0000000000..6a481c54a2
@@ -0,0 +1,36 @@
+################################################################################
+#
+# cups-browsed
+#
+################################################################################
+
+CUPS_BROWSED_VERSION = 2.1.1
+CUPS_BROWSED_SOURCE = cups-browsed-$(CUPS_BROWSED_VERSION).tar.xz
+CUPS_BROWSED_SITE = https://github.com/OpenPrinting/cups-browsed/releases/download/$(CUPS_BROWSED_VERSION)
+CUPS_BROWSED_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
+CUPS_BROWSED_LICENSE_FILES = LICENSE NOTICE
+CUPS_BROWSED_CPE_ID_VENDOR = openprinting
+CUPS_BROWSED_DEPENDENCIES = host-pkgconf cups libcupsfilters libppd libglib2
+
+CUPS_BROWSED_CONF_OPTS = \
+	--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config \
+	--without-rcdir
+
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
+CUPS_BROWSED_CONF_OPTS += --enable-avahi
+CUPS_BROWSED_DEPENDENCIES += avahi
+else
+CUPS_BROWSED_CONF_OPTS += --disable-avahi
+endif
+
+define CUPS_BROWSED_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 package/cups-browsed/S82cups-browsed \
+		$(TARGET_DIR)/etc/init.d/S82cups-browsed
+endef
+
+define CUPS_BROWSED_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0644 $(@D)/daemon/cups-browsed.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/cups-browsed.service
+endef
+
+$(eval $(autotools-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#15 lore raw

PATCH v3 5/5 package/cups-filters: bump to version 2.0.1

In reply to Angelo Compagnucci

Changelog:
https://github.com/OpenPrinting/cups-filters/releases/tag/2.0.1

Since version 2.0, cups-filters has been split into several projects:
- libcupsfilters, the filter functions library
- libppd, the legacy PPD support library
- cups-browsed, the browsing daemon
- cups-filters, the remaining filters and backends, now thin wrappers around the libcupsfilters and libppd filter functions

Most of the dependencies and options moved to libcupsfilters and libppd, which are now selected. cups is now selected instead of being a dependency, as libcupsfilters and libppd select it. wchar is no longer needed, as glib is not used anymore. The cups-browsed init script moved to the cups-browsed package.

foomatic-rip stays disabled, as before: it is only needed by Foomatic printer drivers, which are not packaged.

The license changed to Apache-2.0 with an exception allowing linking with GPL-2.0 and LGPL-2.0 code, see LICENSE and NOTICE.

Patches:
- 0001 (CVE-2023-24805) is merged upstream
- 0002 (CVE-2025-64524) is not in a release yet, renamed to 0001 and refreshed with the upstream commit
- 0003 and 0004 (qpdf 11.x and 12.x) are obsolete, qpdf is not used anymore
- 0005 (CVE-2025-64503) is merged upstream, in libcupsfilters, where the pdftoraster code now lives

AUTORECONF is no longer needed: it was only there to update ax_cxx_compile_stdcxx.m4 for gcc 16.x, and cups-filters 2.0.1 contains only C code and no longer uses it.

---
Changes v2 -> v3:
- select cups, libcupsfilters and libppd instead of depending on them
- document where each toolchain dependency comes from, drop the qpdf dependencies (gcc >= 10 and atomic) for the libppd one (gcc >= 7) and drop wchar, which came from glib2 [Thomas]
- drop -std=gnu17 from CFLAGS, not needed with 2.0.1 (built with

    gcc 16.2) [Thomas]
  - drop the cups-browsed init script, moved to the cups-browsed
    package [Thomas]
  - use the tar.xz archive, fix the license and the license files
  - drop the patches merged upstream or obsolete, refresh the
    CVE-2025-64524 fix
  - drop AUTORECONF
  - update the help text and URL
---
 ...ecv-instead-of-system-CVE-2023-24805.patch | 209 ------------------
 ...x-infinite-loop-caused-by-crafted-f.patch} |  33 ++-
 ...ilters-Fixed-building-with-QPDF-11.x.patch |  57 -----
 ...ated-code-to-be-built-with-QPDF-12.x.patch | 165 --------------
 ...x-out-of-bounds-write-in-pdftoraster.patch |  41 ----
 package/cups-filters/Config.in                |  42 ++--
 package/cups-filters/S82cups-browsed          |  48 ----
 package/cups-filters/cups-filters.hash        |   5 +-
 package/cups-filters/cups-filters.mk          |  94 ++------
 9 files changed, 48 insertions(+), 646 deletions(-)
 delete mode 100644 package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch
 rename package/cups-filters/{0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch => 0001-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch} (61%)
 delete mode 100644 package/cups-filters/0003-libcupsfilters-Fixed-building-with-QPDF-11.x.patch
 delete mode 100644 package/cups-filters/0004-Updated-code-to-be-built-with-QPDF-12.x.patch
 delete mode 100644 package/cups-filters/0005-fix-out-of-bounds-write-in-pdftoraster.patch
 delete mode 100644 package/cups-filters/S82cups-browsed
package/cups-filters/0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch deleted +0 -209
deleted file mode 100644
index fbe2bfac4a..0000000000
@@ -1,209 +0,0 @@
-From 93e60d3df358c0ae6f3dba79e1c9684657683d89 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <[email protected]>
-Date: Wed, 17 May 2023 11:11:29 +0200
-Subject: [PATCH] beh backend: Use execv() instead of system() - CVE-2023-24805
-
-With execv() command line arguments are passed as separate strings and
-not the full command line in a single string. This prevents arbitrary
-command execution by escaping the quoting of the arguments in a job
-with a forged job title.
-
-In addition, done the following fixes and improvements:
-
-- Do not allow '/' in the scheme of the URI (= backend executable
-  name), to assure that only backends inside /usr/lib/cups/backend/
-  are used.
-
-- URI must have ':', to split off scheme, otherwise error out.
-
-- Check return value of snprintf() to create call path for backend, to
-  error out on truncation of a too long scheme or on complete failure
-  due to a completely odd scheme.
-
-- Use strncat() instead of strncpy() for getting scheme from URI, the latter
-  does not require setting terminating zero byte in case of truncation.
-
-- Also exclude "." or ".." as scheme, as directories are not valid CUPS
-  backends.
-
-- Do not use fprintf() in sigterm_handler(), to not interfere with a
-  fprintf() which could be running in the main process when
-  sigterm_handler() is triggered.
-
-- Use "static volatile int" for global variable job_canceled.
-
-CVE: CVE-2023-24805
-Upstream: https://github.com/OpenPrinting/cups-filters/commit/93e60d3df358c0ae6f3dba79e1c9684657683d89
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- backend/beh.c | 107 +++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 84 insertions(+), 23 deletions(-)
-
-diff --git a/backend/beh.c b/backend/beh.c
-index 225fd27d5..8d51235b1 100644
---- a/backend/beh.c
-+++ b/backend/beh.c
-@@ -22,12 +22,13 @@
- #include "backend-private.h"
- #include <cups/array.h>
- #include <ctype.h>
-+#include <sys/wait.h>
- 
- /*
-  * Local globals...
-  */
- 
--static int		job_canceled = 0; /* Set to 1 on SIGTERM */
-+static volatile int	job_canceled = 0; /* Set to 1 on SIGTERM */
- 
- /*
-  * Local functions...
-@@ -213,21 +214,40 @@ call_backend(char *uri,                 /* I - URI of final destination */
- 	     char **argv,		/* I - Command-line arguments */
- 	     char *filename) {          /* I - File name of input data */
-   const char	*cups_serverbin;	/* Location of programs */
-+  char          *backend_argv[8];	/* Arguments for backend */
-   char		scheme[1024],           /* Scheme from URI */
-                 *ptr,			/* Pointer into scheme */
--		cmdline[65536];		/* Backend command line */
--  int           retval;
-+		backend_path[2048];	/* Backend path */
-+  int           pid = 0, 		/* Process ID of backend */
-+                wait_pid,		/* Process ID from wait() */
-+                wait_status, 		/* Status from child */
-+                retval = 0;
-+  int           bytes;
- 
-  /*
-   * Build the backend command line...
-   */
- 
--  strncpy(scheme, uri, sizeof(scheme) - 1);
--  if (strlen(uri) > 1023)
--    scheme[1023] = '\0';
-+  scheme[0] = '\0';
-+  strncat(scheme, uri, sizeof(scheme) - 1);
-   if ((ptr = strchr(scheme, ':')) != NULL)
-     *ptr = '\0';
--
-+  else {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, no colon (':') to mark end of scheme part.\n");
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-+  if (strchr(scheme, '/')) {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, scheme contains a slash ('/').\n");
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-+  if (!strcmp(scheme, ".") || !strcmp(scheme, "..")) {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid URI, scheme (\"%s\") is a directory.\n",
-+	    scheme);
-+    exit (CUPS_BACKEND_FAILED);
-+  }
-   if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
-     cups_serverbin = CUPS_SERVERBIN;
- 
-@@ -235,16 +255,29 @@ call_backend(char *uri,                 /* I - URI of final destination */
-     fprintf(stderr,
- 	    "ERROR: beh: Direct output into a file not supported.\n");
-     exit (CUPS_BACKEND_FAILED);
--  } else
--    snprintf(cmdline, sizeof(cmdline),
--	     "%s/backend/%s '%s' '%s' '%s' '%s' '%s' %s",
--	     cups_serverbin, scheme, argv[1], argv[2], argv[3],
--	     /* Apply number of copies only if beh was called with a
--		file name and not with the print data in stdin, as
--	        backends should handle copies only if they are called
--	        with a file name */
--	     (argc == 6 ? "1" : argv[4]),
--	     argv[5], filename);
-+  }
-+
-+  backend_argv[0] = uri;
-+  backend_argv[1] = argv[1];
-+  backend_argv[2] = argv[2];
-+  backend_argv[3] = argv[3];
-+  /* Apply number of copies only if beh was called with a file name
-+     and not with the print data in stdin, as backends should handle
-+     copies only if they are called with a file name */
-+  backend_argv[4] = (argc == 6 ? "1" : argv[4]);
-+  backend_argv[5] = argv[5];
-+  backend_argv[6] = filename;
-+  backend_argv[7] = NULL;
-+
-+  bytes = snprintf(backend_path, sizeof(backend_path),
-+		   "%s/backend/%s", cups_serverbin, scheme);
-+  if (bytes < 0 || bytes >= sizeof(backend_path))
-+  {
-+    fprintf(stderr,
-+	    "ERROR: beh: Invalid scheme (\"%s\"), could not determing backend path.\n",
-+	    scheme);
-+    return (CUPS_BACKEND_FAILED);
-+  }
- 
-  /*
-   * Overwrite the device URI and run the actual backend...
-@@ -253,18 +286,44 @@ call_backend(char *uri,                 /* I - URI of final destination */
-   setenv("DEVICE_URI", uri, 1);
- 
-   fprintf(stderr,
--	  "DEBUG: beh: Executing backend command line \"%s\"...\n",
--	  cmdline);
-+	  "DEBUG: beh: Executing backend command line \"%s '%s' '%s' '%s' '%s' '%s' %s\"...\n",
-+	  backend_path, backend_argv[1], backend_argv[2], backend_argv[3],
-+	  backend_argv[4], backend_argv[5], backend_argv[6]);
-   fprintf(stderr,
- 	  "DEBUG: beh: Using device URI: %s\n",
- 	  uri);
- 
--  retval = system(cmdline) >> 8;
-+  if ((pid = fork()) == 0) {
-+   /*
-+    * Child comes here...
-+    */
-+
-+    /* Run the backend */
-+    execv(backend_path, backend_argv);
- 
--  if (retval == -1)
-     fprintf(stderr, "ERROR: Unable to execute backend command line: %s\n",
- 	    strerror(errno));
- 
-+    exit(1);
-+  } else if (pid < 0) {
-+   /*
-+    * Unable to fork!
-+    */
-+
-+    return (CUPS_BACKEND_FAILED);
-+  }
-+
-+  while ((wait_pid = wait(&wait_status)) < 0 && errno == EINTR);
-+
-+  if (wait_pid >= 0 && wait_status) {
-+    if (WIFEXITED(wait_status))
-+      retval = WEXITSTATUS(wait_status);
-+    else if (WTERMSIG(wait_status) != SIGTERM)
-+      retval = WTERMSIG(wait_status);
-+    else
-+      retval = 0;
-+  }
-+
-   return (retval);
- }
- 
-@@ -277,8 +336,10 @@ static void
- sigterm_handler(int sig) {		/* I - Signal number (unused) */
-   (void)sig;
- 
--  fprintf(stderr,
--	  "DEBUG: beh: Job canceled.\n");
-+  const char * const msg = "DEBUG: beh: Job canceled.\n";
-+  /* The if() is to eliminate the return value and silence the warning
-+     about an unused return value. */
-+  if (write(2, msg, strlen(msg)));
- 
-   if (job_canceled)
-     _exit(CUPS_BACKEND_OK);
package/cups-filters/0001-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch renamed from package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch +15 -18
similarity index 61%
rename from package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch
rename to package/cups-filters/0001-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch
index 8badcfd429..ab3fc07d93 100644
@@ -1,6 +1,6 @@
-From b03866fd2e251a6d822a5e8c807c8d47b4d2dce2 Mon Sep 17 00:00:00 2001
+From 0fe46c511e81062575b05936f804eb18c9f0a011 Mon Sep 17 00:00:00 2001
 From: Zdenek Dohnal <[email protected]>
-Date: Wed, 12 Nov 2025 16:02:20 +0100
+Date: Wed, 12 Nov 2025 15:47:24 +0100
 Subject: [PATCH] rastertopclx.c: Fix infinite loop caused by crafted file
 
 Infinite loop happened because of crafted input raster file, which led
@@ -12,19 +12,19 @@ being 0.
 
 Fixes CVE-2025-64524
 
-Upstream: https://github.com/OpenPrinting/cups-filters/commit/b03866fd2e251a6d822a5e8c807c8d47b4d2dce2
+Upstream: https://github.com/OpenPrinting/cups-filters/commit/0fe46c511e81062575b05936f804eb18c9f0a011
 
 CVE: CVE-2025-64524
-Signed-off-by: Bernd Kuhls <[email protected]>
+Signed-off-by: Angelo Compagnucci <[email protected]>
 ---
  filter/rastertopclx.c | 25 +++++++++++++++++++++++--
  1 file changed, 23 insertions(+), 2 deletions(-)
 
 diff --git a/filter/rastertopclx.c b/filter/rastertopclx.c
-index 3e7c129da..1015308da 100644
+index ded86f114..39cb378bf 100644
 --- a/filter/rastertopclx.c
 +++ b/filter/rastertopclx.c
-@@ -818,10 +818,10 @@ StartPage(ppd_file_t         *ppd,	/* I - PPD file */
+@@ -825,10 +825,10 @@ StartPage(cf_filter_data_t      *data,	// I - filter data
    }
  
    if (header->cupsCompression)
@@ -37,7 +37,7 @@ index 3e7c129da..1015308da 100644
  
    SeedInvalid = 1;
  
-@@ -1152,6 +1152,13 @@ CompressData(unsigned char *line,	/* I - Data to compress */
+@@ -1159,6 +1159,13 @@ CompressData(unsigned char *line,	// I - Data to compress
                seed ++;
                count ++;
              }
@@ -50,8 +50,8 @@ index 3e7c129da..1015308da 100644
 +	      break;
  	  }
  
-          /*
-@@ -1245,6 +1252,13 @@ CompressData(unsigned char *line,	/* I - Data to compress */
+ 	  //
+@@ -1252,6 +1259,13 @@ CompressData(unsigned char *line,	// I - Data to compress
  
              count = line_ptr - start;
  
@@ -63,9 +63,9 @@ index 3e7c129da..1015308da 100644
 +	      break;
 +
  #if 0
-             fprintf(stderr, "DEBUG: offset=%d, count=%d, comp_ptr=%p(%d of %d)...\n",
- 	            offset, count, comp_ptr, comp_ptr - CompBuffer,
-@@ -1416,6 +1430,13 @@ CompressData(unsigned char *line,	/* I - Data to compress */
+             fprintf(stderr,
+ 		    "DEBUG: offset=%d, count=%d, comp_ptr=%p(%d of %d)...\n",
+@@ -1424,6 +1438,13 @@ CompressData(unsigned char *line,	// I - Data to compress
  
              count = (line_ptr - start) / 3;
  
@@ -76,9 +76,6 @@ index 3e7c129da..1015308da 100644
 +	    if (count == 0)
 +	      break;
 +
-            /*
-             * Place mode 10 compression data in the buffer; each sequence
- 	    * starts with a command byte that looks like:
--- 
-2.47.3
-
+ 	    //
+ 	    // Place mode 10 compression data in the buffer; each sequence
+ 	    // starts with a command byte that looks like:
package/cups-filters/0003-libcupsfilters-Fixed-building-with-QPDF-11.x.patch deleted +0 -57

57 lines not on this page · raw message

package/cups-filters/0004-Updated-code-to-be-built-with-QPDF-12.x.patch deleted +0 -165

165 lines not on this page · raw message

package/cups-filters/0005-fix-out-of-bounds-write-in-pdftoraster.patch deleted +0 -41

41 lines not on this page · raw message

package/cups-filters/Config.in +15 -27

55 lines not on this page · raw message

package/cups-filters/S82cups-browsed deleted +0 -48

48 lines not on this page · raw message

package/cups-filters/cups-filters.hash +3 -2
index 7fb3badf46..8c19f33a58 100644
@@ -1,3 +1,4 @@
 # Locally computed:
-sha256  01a2acbd6bb78f09638047e4e9ce305d7e5ef4cb9ed6949672b5d901b7321dd4  cups-filters-1.28.17.tar.gz
-sha256  38192ffdaca98b718f78b2d4abc38bb087f0bbcc9a16d212c98b903b985f900f  COPYING
+sha256  39e71de3ce06762b342749f1dc7cba6817738f7bf4d322c1bb9ab10b8569ab80  cups-filters-2.0.1.tar.xz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
+sha256  b7d18a6c069a42f955018a1f87cc91781845aa0bb703566d9c6f872ec2df36f2  NOTICE
package/cups-filters/cups-filters.mk +15 -79

119 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot