From a7be053faa8c7e1a2b8c086bb1940da36ed4e376 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 27 Oct 2020 20:19:22 +0100 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/cups-filters.git#d6cf1a69c5315a173ad0888df74a641087e6bf4e --- cups-filters-uuid.patch | 22 ++++++++++++++++++++++ cups-filters.spec | 9 ++++++++- foomatic-remove-tmpfile.patch | 17 +++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 cups-filters-uuid.patch create mode 100644 foomatic-remove-tmpfile.patch diff --git a/cups-filters-uuid.patch b/cups-filters-uuid.patch new file mode 100644 index 0000000..a13a5c1 --- /dev/null +++ b/cups-filters-uuid.patch @@ -0,0 +1,22 @@ +diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c +index 8c2040b6..b0e7a803 100644 +--- a/utils/cups-browsed.c ++++ b/utils/cups-browsed.c +@@ -3614,7 +3614,7 @@ new_local_printer (const char *device_uri, + { + local_printer_t *printer = g_malloc (sizeof (local_printer_t)); + printer->device_uri = strdup (device_uri); +- printer->uuid = (uuid ? strdup (uuid) : NULL); ++ printer->uuid = uuid; + printer->cups_browsed_controlled = cups_browsed_controlled; + return printer; + } +@@ -3796,7 +3796,7 @@ get_printer_uuid(http_t *http_printer, + + + if (attr) +- uuid = ippGetString(attr, 0, NULL) + 9; ++ uuid = strdup(ippGetString(attr, 0, NULL) + 9); + else { + debug_printf ("Printer with URI %s: Cannot read \"printer-uuid\" IPP attribute!\n", + raw_uri); diff --git a/cups-filters.spec b/cups-filters.spec index f326cd6..0a56c64 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.28.2 -Release: 2%{?dist} +Release: 3%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -21,6 +21,10 @@ Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz Patch01: cups-filters-init-buf.patch +# backported from upstream https://github.com/OpenPrinting/cups-filters/pull/311 +Patch02: cups-filters-uuid.patch +# backported from upstream https://github.com/OpenPrinting/cups-filters/pull/313 +Patch03: foomatic-remove-tmpfile.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -348,6 +352,9 @@ done %{_libdir}/libfontembed.so %changelog +* Tue Sep 29 2020 Zdenek Dohnal - 1.28.2-3 +- 1891720 - foomatic-rip files up /var/spool/tmp with temporary files + * Thu Sep 17 2020 Zdenek Dohnal - 1.28.2-2 - 1879147 - driverless cannot generate ppd for dns-sd based uris diff --git a/foomatic-remove-tmpfile.patch b/foomatic-remove-tmpfile.patch new file mode 100644 index 0000000..bbe7a68 --- /dev/null +++ b/foomatic-remove-tmpfile.patch @@ -0,0 +1,17 @@ +diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c +index 7dc2426..146125f 100644 +--- a/filter/foomatic-rip/foomaticrip.c ++++ b/filter/foomatic-rip/foomaticrip.c +@@ -672,6 +672,12 @@ int print_file(const char *filename, int convert) + if (out != NULL) + fclose(out); + ++ // Delete temp file if we created one ++ if ( *tmpfilename ) { ++ _log("Removing temporary file %s\n", tmpfilename); ++ unlink(tmpfilename); ++ } ++ + return ret; + } +