From 896c4186e838d04196ab6ffa4295e6183b71966f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 21 Sep 2018 15:05:22 +0200 Subject: [PATCH] 1628255 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2 (breaks printing) --- cups-filters-cleareof.patch | 11 +++++++++++ cups-filters.spec | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cups-filters-cleareof.patch diff --git a/cups-filters-cleareof.patch b/cups-filters-cleareof.patch new file mode 100644 index 0000000..8b9731f --- /dev/null +++ b/cups-filters-cleareof.patch @@ -0,0 +1,11 @@ +diff -up cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c.cleareof cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c +--- cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c.cleareof 2018-09-21 13:38:05.882666106 +0200 ++++ cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c 2018-09-21 13:38:55.330277816 +0200 +@@ -663,6 +663,7 @@ int print_file(const char *filename, int + rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS, + "Couldn't dup stdout of pdf-to-ps\n"); + ++ clearerr(stdin); + ret = print_file("", 0); + + wait_for_process(renderer_pid); diff --git a/cups-filters.spec b/cups-filters.spec index 9161076..13f14ca 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.21.2 -Release: 1%{?dist} +Release: 2%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -21,6 +21,9 @@ 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-createall.patch +# backported patch from upstream - since glibc 2.28 there is a need to clear EOF on +# file descriptor when I use dup2 on file descriptor where is EOF +Patch02: cups-filters-cleareof.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -119,6 +122,8 @@ This is the development package for OpenPrinting CUPS filters and backends. # set LocalQueueNamingRemoteCUPS and CreateIPPPrinterQueues by default %patch01 -p1 -b .createall +# backported from upstream - EOF from pipe needs to cleared +%patch02 -p1 -b .cleareof %build # work-around Rpath @@ -291,6 +296,9 @@ fi %{_libdir}/libfontembed.so %changelog +* Fri Sep 21 2018 Zdenek Dohnal - 1.21.2-2 +- 1628255 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2 (breaks printing) + * Mon Sep 10 2018 Zdenek Dohnal - 1.21.2-1 - 1.21.2