diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-26 19:26:07 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-26 19:26:07 +0000 |
commit | acfd7c956a7b45da7af1452ec12e0b2d5e6ac65b (patch) | |
tree | 13151a7440c2560b01e3cf5bd56ad280482b88bf /net-print | |
parent | 67dbd3ba144944fbf4b466be1b5fa0569b774e6f (diff) |
gentoo auto-resync : 26:02:2025 - 19:26:07
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/Manifest.gz | bin | 6424 -> 6424 bytes | |||
-rw-r--r-- | net-print/libcupsfilters/Manifest | 5 | ||||
-rw-r--r-- | net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch | 254 | ||||
-rw-r--r-- | net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch | 17 | ||||
-rw-r--r-- | net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch | 28 | ||||
-rw-r--r-- | net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch | 50 | ||||
-rw-r--r-- | net-print/libcupsfilters/files/libcupsfilters-2.1_beta1-CVE-2024-47076.patch | 31 |
7 files changed, 0 insertions, 385 deletions
diff --git a/net-print/Manifest.gz b/net-print/Manifest.gz Binary files differindex dd4ebeccb3c0..462ca3145a58 100644 --- a/net-print/Manifest.gz +++ b/net-print/Manifest.gz diff --git a/net-print/libcupsfilters/Manifest b/net-print/libcupsfilters/Manifest index 0687ebe95a5f..76d5b1b24c7e 100644 --- a/net-print/libcupsfilters/Manifest +++ b/net-print/libcupsfilters/Manifest @@ -1,8 +1,3 @@ -AUX libcupsfilters-2.0.0-color-space.patch 8846 BLAKE2B 204e948b02db64854bc875fbf97c19a59a64217dbedae8733bcff3a1bb142f6c4758521863a3d101eface20b23ecdd6d6e237aabd271e5139de06c096bebaeec SHA512 59655046cd7f4c75af75673ba244bb41bb95bb7f5cfc652acff741c8aa8e2797b6d82f01bff97cc37c4b2f14eb193b55327dcd30f6fd97ad6a2bdbc8673830f8 -AUX libcupsfilters-2.0.0-r3-c++17.patch 622 BLAKE2B a36f3b54b7047cbf1c7b8ff1a615d53fcaa23d9a5cda7abd8a565b40b05ebf3dbf277c7008d99f17d907fb3c3a5e38ff3726a6a56c0bf9c4821d1c11665acff2 SHA512 4bfed9113913b8788f111334df3fa08536c965d316f5b627d614914d6ef2bb14747b8eb25a6c9bd69a092a6082829a97468111c70f3717ce1c762737faddcb07 -AUX libcupsfilters-2.0.0-raster-build-fix.patch 842 BLAKE2B 37abde9acc45311a62edc669498bef9d6f86e691de3c9632aec66ca575c5af9a0dab03b9e7bcf97ad1b927580825a98ee7dcad3fe3e00d1679e25ec7b0f0e843 SHA512 2e639d238c2dbb8646174c3b76c9b5c4450639c8fd0fd1969545d86370fe077f04720412e561108dde88bd86e8a29cf6fe2233a45398494b50a3f6908aa834aa -AUX libcupsfilters-2.0.0-raster-gray.patch 1889 BLAKE2B 515b29df1141389262458205d1104f430f986f2ef5eefb9e2624c34715c4afd1f07b01deb57267fc322707f0799f8b31f17408c96af9f39c38d5eabbdc5eb678 SHA512 b63d639ac5472848a54f23bf0562dff58704b31864d753ce2f3502f56bd427feef4d2439f79e6fa20ab3bfcb61a4d0ac9f783c98716e09e1ed289c01ee570da2 -AUX libcupsfilters-2.1_beta1-CVE-2024-47076.patch 868 BLAKE2B 4820e50f9a6a43133a201e4488906ad910c8aee6d61a3f1612fc3a4f79ab2a59bf24b91e308959ae730c94782a972b440e723b846db93214de1b1c17ca2c3620 SHA512 e58464efafc9cbc661ed1dc467db523a078f44bd765cc17cd82e6583cfec48c864c012fa734a805717351dbcd874ceccd8bcadc9a7d2d243f0396c90cad3288e DIST libcupsfilters-2.1.0.tar.xz 1445276 BLAKE2B 7b7355c71b086dacfeb54d5ef4dbbe84ce23c5f65c36a7ef90c3f3b0a0a7630babebfd0d025dba01ad005714d7811dacf9c1983995e930212aee12b737a45c6a SHA512 2c15180a49f211215a13dac5b198a4f8d11fbc67c49d2112ec0c9a9cfd34f012867780bcf23dba81fae7bfaa7f05d4241b222dc6ad8dd83fc8ae29ce2869b235 DIST libcupsfilters-2.1.1.tar.xz 1446192 BLAKE2B a4310fac3a2d484716b0cc0b96ffcfd8441558ffc8bbd3e9b2d1336a7a1f74e03892a0f653560abd068e8b2f84c134fd0fe4a9a8441f43224833de3c195c8cb7 SHA512 3025a52713a06cc5f79b2c55bcb4a331fddeb7439636951fd25bfb77c048a1a336143a1b03496e284f12de9c97f35cf1cea44c99f7e8d02f90d849e8f4f083ad EBUILD libcupsfilters-2.1.0.ebuild 1603 BLAKE2B d54ef1fcf8df30174ba2ad40dc37871ea4229cb4522dd7141414366247c1593dcc039fb2cabbea5b0f5d1fd1924296d3ac19ae65d25044c7e8fb22ff6a80c011 SHA512 3ddc84e284e8f1b13f91305705560327f6b1d1f5501dbcb2462ad5691f00b2487f9ab1e03a2a7f8e87805e51c596f44267778d226ee4e9666f756976e0d70bd7 diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch deleted file mode 100644 index 37a8bce64d7b..000000000000 --- a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch +++ /dev/null @@ -1,254 +0,0 @@ -https://bugs.gentoo.org/927137 -https://github.com/OpenPrinting/cups-filters/issues/578 -https://github.com/OpenPrinting/libcupsfilters/commit/c6175a2f3f66dbf76bb35ec8d1ba0dc094c9dbac - -From c6175a2f3f66dbf76bb35ec8d1ba0dc094c9dbac Mon Sep 17 00:00:00 2001 -From: Till Kamppeter <till.kamppeter@gmail.com> -Date: Wed, 29 Nov 2023 00:25:16 +0100 -Subject: [PATCH] raster_base_header(): Several fixes on color space selection - -Fixes #38 - -The internal (static) funcrion raster_base_header() creates a CUPS or -PWG Raster header from scratch, without using data of a PPD file by -means of Raster header derived from the PPD. It solely uses IPP -attributes or command line options. - -It distinguishes between CUPS Raster and PWG/Apple Raster headers. - -There were several bugs in selecting the correct color space and depth -settings: - -- For PWG-Raster all attributes and options got ignored and standard - 8-bit sRGB set. - -- Without any valid color space/depth setting attribute or "auto" - always standard 8-bit sRGB got set as the default, regardless - whether the printer is actually a color printer. - -- Color spaces for printing in color could be set on monochrome - printers by options or atrributes. - -- Color spaces not valid on PWG Raster could be set on PWG Raster. - -- DeviceN modes could only be set by specifying a depth, like - "Device4_8" not just "Device4". - -Now we use 8-bit SGray as default for monochrome printers and 8-bit -RGB for color printers. We use the printer IPP attribute -"color-supported" to check whether the printer is color. - -IPP ttributes or command line options setting a color mode on a -monochrome printer are ignored now, also, if the output format is PWG -Raster, setting a color space not supported by PWG Raster is ignored. - -Now for monochrome AirPrint (Apple Raster) printers, the Raster data -sent should be actually monochrome (grayscale) and not color. ---- - cupsfilters/raster.c | 103 +++++++++++++++++++++++++------------------ - 1 file changed, 61 insertions(+), 42 deletions(-) - -diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c -index 32a8b807..5e10f3bb 100644 ---- a/cupsfilters/raster.c -+++ b/cupsfilters/raster.c -@@ -792,7 +792,7 @@ cfRasterSetColorSpace(cups_page_header_t *h, // I - Raster header - - - static int // O - -1 on error, 0 on success --raster_base_header(cups_page_header2_t *h, // O - Raster header -+raster_base_header(cups_page_header2_t *h, // O - Raster header - cf_filter_data_t *data, // I - Filter data - int pwg_raster) // I - 1 if PWG/Apple Raster - { -@@ -1420,41 +1420,46 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - // TODO - Support for MediaType number - h->cupsMediaType = 0; - -- // Only for CUPS Raster, if we do not have a sample header from a PPD file -- if (pwg_raster == 0 && -- ((val = cupsGetOption("pwg-raster-document-type", num_options, -- options)) != NULL || -- (val = cupsGetOption("PwgRasterDocumentType", num_options, -- options)) != NULL || -- (val = cupsGetOption("color-space", num_options, options)) != NULL || -- (val = cupsGetOption("ColorSpace", num_options, options)) != NULL || -- (val = cupsGetOption("color-model", num_options, options)) != NULL || -- (val = cupsGetOption("ColorModel", num_options, options)) != NULL || -- (val = cupsGetOption("print-color-mode", num_options, options)) != -- NULL || -- (val = cupsGetOption("output-mode", num_options, options)) != NULL || -- (val = cupsGetOption("OutputMode", num_options, options)) != NULL || -- (val = cfIPPAttrEnumValForPrinter(data->printer_attrs, -- data->job_attrs, -- "print-color-mode")) != NULL)) -+ -+ // Do we have a color printer? -+ bool is_color = -+ ((attr = ippFindAttribute(data->printer_attrs, "color-supported", -+ IPP_TAG_BOOLEAN)) != NULL && -+ ippGetBoolean(attr, 0)); -+ -+ // Color modes -+ int numcolors = 0; // Number of colorants -+ if ((val = cupsGetOption("pwg-raster-document-type", num_options, -+ options)) != NULL || -+ (val = cupsGetOption("PwgRasterDocumentType", num_options, -+ options)) != NULL || -+ (val = cupsGetOption("color-space", num_options, options)) != NULL || -+ (val = cupsGetOption("ColorSpace", num_options, options)) != NULL || -+ (val = cupsGetOption("color-model", num_options, options)) != NULL || -+ (val = cupsGetOption("ColorModel", num_options, options)) != NULL || -+ (val = cupsGetOption("print-color-mode", num_options, options)) != -+ NULL || -+ (val = cupsGetOption("output-mode", num_options, options)) != NULL || -+ (val = cupsGetOption("OutputMode", num_options, options)) != NULL || -+ (val = cfIPPAttrEnumValForPrinter(data->printer_attrs, -+ data->job_attrs, -+ "print-color-mode")) != NULL) - { - int bitspercolor, // Bits per color - bitsperpixel, // Bits per pixel -- colorspace, // CUPS/PWG raster color space -- numcolors; // Number of colorants -+ colorspace; // CUPS/PWG raster color space; - const char *ptr; // Pointer into value - - ptr = NULL; -- numcolors = 0; - bitspercolor = 8; -- if (!strncasecmp(val, "AdobeRgb", 8)) -+ if (is_color && !strncasecmp(val, "AdobeRgb", 8)) - { - if (*(val + 8) == '_' || *(val + 8) == '-') - ptr = val + 9; - colorspace = 20; - numcolors = 3; - } -- else if (!strncasecmp(val, "adobe-rgb", 9)) -+ else if (is_color && !strncasecmp(val, "adobe-rgb", 9)) - { - if (*(val + 9) == '_' || *(val + 9) == '-') - ptr = val + 10; -@@ -1500,19 +1505,19 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - colorspace = 18; - numcolors = 1; - } -- else if (!strcasecmp(val, "color")) -+ else if (is_color && !strcasecmp(val, "color")) - { - colorspace = 19; - numcolors = 3; - } -- else if (!strncasecmp(val, "Cmyk", 4)) -+ else if (is_color && !strncasecmp(val, "Cmyk", 4)) - { - if (*(val + 4) == '_' || *(val + 4) == '-') - ptr = val + 5; - colorspace = 6; - numcolors = 4; - } -- else if (!strncasecmp(val, "Cmy", 3)) -+ else if (!pwg_raster && is_color && !strncasecmp(val, "Cmy", 3)) - { - if (*(val + 3) == '_' || *(val + 3) == '-') - ptr = val + 4; -@@ -1524,10 +1529,9 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - ptr = val + 6; - numcolors = strtol(ptr, (char **)&ptr, 10); - if (*ptr == '_' || *ptr == '-') -- { - ptr ++; -+ if (numcolors > 0 && numcolors < 16) - colorspace = 47 + numcolors; -- } - else - { - numcolors = 0; -@@ -1548,21 +1552,21 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - colorspace = 18; - numcolors = 1; - } -- else if (!strncasecmp(val, "Srgb", 4)) -+ else if (is_color && !strncasecmp(val, "Srgb", 4)) - { - if (*(val + 4) == '_' || *(val + 4) == '-') - ptr = val + 5; - colorspace = 19; - numcolors = 3; - } -- else if (!strncasecmp(val, "Rgbw", 4)) -+ else if (!pwg_raster && is_color && !strncasecmp(val, "Rgbw", 4)) - { - if (*(val + 4) == '_' || *(val + 4) == '-') - ptr = val + 5; - colorspace = 17; - numcolors = 4; - } -- else if (!strncasecmp(val, "Rgb", 3)) -+ else if (is_color && !strncasecmp(val, "Rgb", 3)) - { - if (*(val + 3) == '_' || *(val + 3) == '-') - ptr = val + 4; -@@ -1572,12 +1576,22 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - else if (!strcasecmp(val, "auto")) - { - // Let "auto" not look like an error -- colorspace = 19; -- numcolors = 3; -+ if (is_color) -+ { -+ colorspace = 19; -+ numcolors = 3; -+ } -+ else -+ { -+ colorspace = 18; -+ numcolors = 1; -+ } - } -+ -+ // Color mode found - if (numcolors > 0) - { -- if (ptr) -+ if (ptr && *ptr) - bitspercolor = strtol(ptr, (char **)&ptr, 10); - bitsperpixel = bitspercolor * numcolors; - // In 1-bit-per-color RGB modes we add a forth bit to each pixel -@@ -1590,20 +1604,25 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - h->cupsColorSpace = colorspace; - h->cupsNumColors = numcolors; - } -- else -+ } -+ -+ // No color mode found -+ if (numcolors == 0) -+ { -+ if (is_color) - { - h->cupsBitsPerColor = 8; - h->cupsBitsPerPixel = 24; - h->cupsColorSpace = 19; - h->cupsNumColors = 3; - } -- } -- else -- { -- h->cupsBitsPerColor = 8; -- h->cupsBitsPerPixel = 24; -- h->cupsColorSpace = 19; -- h->cupsNumColors = 3; -+ else -+ { -+ h->cupsBitsPerColor = 8; -+ h->cupsBitsPerPixel = 8; -+ h->cupsColorSpace = 18; -+ h->cupsNumColors = 1; -+ } - } - - // TODO - Support for color orders 1 (banded) and 2 (planar) - - diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch deleted file mode 100644 index be74a216d22a..000000000000 --- a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://bugs.gentoo.org/923959 -https://github.com/OpenPrinting/libcupsfilters/issues/35 -https://github.com/OpenPrinting/libcupsfilters/commit/668d7dac277c1d44732fc25e5491c79ff82e597d ---- a/cupsfilters/pdftoraster.cxx -+++ b/cupsfilters/pdftoraster.cxx -@@ -2198,7 +2198,11 @@ - // For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW - // should be used as a guard, otherwise use traditional definition - #ifndef _GLIBCXX_THROW -+#if __cplusplus < 201703L - #define _GLIBCXX_THROW throw -+#else -+#define _GLIBCXX_THROW(...) noexcept(false) -+#endif - #endif - - void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc) diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch deleted file mode 100644 index c274b8473c47..000000000000 --- a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -https://bugs.gentoo.org/927137 -https://github.com/OpenPrinting/cups-filters/issues/578 -https://github.com/OpenPrinting/libcupsfilters/commit/107091186dce1c0cb2f042f8b880f571089acaf1 - -From 107091186dce1c0cb2f042f8b880f571089acaf1 Mon Sep 17 00:00:00 2001 -From: zdohnal <zdohnal@redhat.com> -Date: Wed, 29 Nov 2023 13:30:48 +0100 -Subject: [PATCH] raster.c: Fix build after last fix (#40) - -Add header file `stdbool`, since we started to use `bool` in -`raster_base_header()`. ---- - cupsfilters/raster.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c -index 5e10f3bb..e9a8ad1f 100644 ---- a/cupsfilters/raster.c -+++ b/cupsfilters/raster.c -@@ -29,6 +29,7 @@ - #include <cupsfilters/ipp.h> - #include <cupsfilters/libcups2-private.h> - #include <cups/pwg.h> -+#include <stdbool.h> - - // - // Local functions - diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch deleted file mode 100644 index e1648c041e97..000000000000 --- a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch +++ /dev/null @@ -1,50 +0,0 @@ -https://bugs.gentoo.org/927137 -https://github.com/OpenPrinting/cups-filters/issues/578 -https://github.com/OpenPrinting/libcupsfilters/commit/78cc6758d98c31397c8addefaa3dfd8746331b72 - -From 78cc6758d98c31397c8addefaa3dfd8746331b72 Mon Sep 17 00:00:00 2001 -From: zdohnal <zdohnal@redhat.com> -Date: Thu, 7 Mar 2024 18:27:06 +0100 -Subject: [PATCH] raster.c: Always use sRGB/sGray if driver is PWG/URF and - RGB/Gray is requested (#51) - -Some driverless printers (EPSON L3160 in Fedora report) stopped working -after commit c6175a2 if `ColorModel=RGB` is passed as option. A -different CUPS color space is assigned with the fix - CUPS_CSPACE_RGB, -which results in no ICC profile being assigned into Ghostscript command -line. - -Probably we can try other .icc profiles with CUPS_CSPACE_RGB (srgb.icc -does not work with RGB color space), but I tested with reporter that -using sRGB space + srgb.icc works for the printer - so the patch is to -use sRGB if the driver is URF/PWG. - -Same logic applied for grayscale printing, if Gray is requested, sGray is -used for URF/PWG. ---- - cupsfilters/raster.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c -index e9a8ad1f..7b62b922 100644 ---- a/cupsfilters/raster.c -+++ b/cupsfilters/raster.c -@@ -1550,7 +1550,7 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - { - if (*(val + 4) == '_' || *(val + 4) == '-') - ptr = val + 5; -- colorspace = 18; -+ colorspace = pwg_raster ? 18 : 3; - numcolors = 1; - } - else if (is_color && !strncasecmp(val, "Srgb", 4)) -@@ -1571,7 +1571,7 @@ raster_base_header(cups_page_header_t *h, // O - Raster header - { - if (*(val + 3) == '_' || *(val + 3) == '-') - ptr = val + 4; -- colorspace = 1; -+ colorspace = pwg_raster ? 19 : 1; - numcolors = 3; - } - else if (!strcasecmp(val, "auto")) - diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.1_beta1-CVE-2024-47076.patch b/net-print/libcupsfilters/files/libcupsfilters-2.1_beta1-CVE-2024-47076.patch deleted file mode 100644 index 016d086ea2b1..000000000000 --- a/net-print/libcupsfilters/files/libcupsfilters-2.1_beta1-CVE-2024-47076.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://bugs.gentoo.org/940313 -https://github.com/OpenPrinting/libcupsfilters/commit/95576ec3d20c109332d14672a807353cdc551018 - -From 95576ec3d20c109332d14672a807353cdc551018 Mon Sep 17 00:00:00 2001 -From: Zdenek Dohnal <zdohnal@redhat.com> -Date: Thu, 26 Sep 2024 23:09:29 +0200 -Subject: [PATCH] cfGetPrinterAttributes5(): Validate response attributes - before return - -The destination can be corrupted or forged, so validate the response -to strenghten security measures. - -Fixes CVE-2024-47076 ---- a/cupsfilters/ipp.c -+++ b/cupsfilters/ipp.c -@@ -404,6 +404,14 @@ cfGetPrinterAttributes5(http_t *http_printer, - ippDelete(response2); - } - } -+ -+ // Check if the response is valid -+ if (!ippValidateAttributes(response)) -+ { -+ ippDelete(response); -+ response = NULL; -+ } -+ - if (have_http == 0) httpClose(http_printer); - if (uri) free(uri); - return (response); - |