Hello community, here is the log from the commit of package cups-filters for openSUSE:Factory checked in at 2018-12-11 15:41:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cups-filters (Old) and /work/SRC/openSUSE:Factory/.cups-filters.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cups-filters" Tue Dec 11 15:41:34 2018 rev:36 rq:655413 version:1.21.4 Changes: -------- --- /work/SRC/openSUSE:Factory/cups-filters/cups-filters.changes 2018-09-07 15:34:23.078867813 +0200 +++ /work/SRC/openSUSE:Factory/.cups-filters.new.19453/cups-filters.changes 2018-12-11 15:41:36.454616561 +0100 @@ -1,0 +2,28 @@ +Wed Nov 28 21:12:12 UTC 2018 - [email protected] + +- Update to version 1.21.4: + * cups-browsed: cups-browsed: Limit the number of retries for + creating a print queue when it comes to HTTP timeouts. Number + of retries given by HttpMaxRetries directive in + cups-browsed.conf. + * cups-browsed: Read out current time right before setting the + timeouts. + * libcupsfilters: In the PPD generator for driverless IPP + printing let "*cupsManualCopies: true" lines get added to + the PPD if printing is done in a raster format as then + pdftopdf needs to generate the copies. + * pdftoraster, pdftoopvp, pdftoijs: Fix build with Poppler >= + 0.70 + * pdftopdf: Fixed printing multiple copies on driverless IPP + printers. When printing collated copies the multiple copies + got applied twice, resulting in n*n instead of n copies. + * pdftoraster, pdftoopvp, pdftoijs: Poppler removed memCheck + and gMemReport functions, remove appropriate calls. +- Changes from version 1.21.3: + * foomatic-rip: Reset stdin after replacing the underlying file + descriptor. +- Changes from version 1.21.2: + * cups-browsed: Fixed freeing of literal string caused by + Coverity Scan issue fix. + +------------------------------------------------------------------- Old: ---- cups-filters-1.21.1.tar.xz New: ---- cups-filters-1.21.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cups-filters.spec ++++++ --- /var/tmp/diff_new_pack.HrsYDA/_old 2018-12-11 15:41:37.078615878 +0100 +++ /var/tmp/diff_new_pack.HrsYDA/_new 2018-12-11 15:41:37.082615874 +0100 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -37,7 +37,7 @@ # and also run: zypper vcmp 'next version' 'current version' # e.g. zypper vcmp '1.0.49' '1.0.49.20140326' -> 1.0.49 is older than 1.0.49.20140326 # and zypper vcmp '1.0.50' '1.0.49.20140326' -> 1.0.50 is newer than 1.0.49.20140326 -Version: 1.21.1 +Version: 1.21.4 Release: 0 Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz # Upstream fix for https://bugs.linuxfoundation.org/show_bug.cgi?id=1421 ++++++ cups-filters-1.21.1.tar.xz -> cups-filters-1.21.4.tar.xz ++++++ ++++ 2633 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/INSTALL new/cups-filters-1.21.4/INSTALL --- old/cups-filters-1.21.1/INSTALL 2018-08-26 11:40:27.000000000 +0200 +++ new/cups-filters-1.21.4/INSTALL 2018-11-23 22:18:49.000000000 +0100 @@ -1,4 +1,4 @@ -INSTALL - OpenPrinting CUPS Filters v1.21.1 - 2018-08-26 +INSTALL - OpenPrinting CUPS Filters v1.21.4 - 2018-11-23 -------------------------------------------------------- This file describes how to compile and install OpenPrinting CUPS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/NEWS new/cups-filters-1.21.4/NEWS --- old/cups-filters-1.21.1/NEWS 2018-08-26 11:40:27.000000000 +0200 +++ new/cups-filters-1.21.4/NEWS 2018-11-23 22:18:49.000000000 +0100 @@ -1,6 +1,40 @@ -NEWS - OpenPrinting CUPS Filters v1.21.1 - 2018-08-26 +NEWS - OpenPrinting CUPS Filters v1.21.4 - 2018-11-23 ----------------------------------------------------- +CHANGES IN V1.21.4 + + - cups-browsed: cups-browsed: Limit the number of retries for + creating a print queue when it comes to HTTP + timeouts. Number of retries given by HttpMaxRetries + directive in cups-browsed.conf. Thanks to Zdenek Dohnal for + the patch (Pull request #73, Red Hat bug #1648697). + - cups-browsed: Read out current time right before setting the + timeouts. Thanks to Zdenek Dohnal for the patch (Pull + request #71, Red Hat bug #1648697). + - libcupsfilters: In the PPD generator for driverless IPP + printing let "*cupsManualCopies: true" lines get added to + the PPD if printing is done in a raster format as then + pdftopdf needs to generate the copies. + - pdftoraster, pdftoopvp, pdftoijs: Fix build with Poppler >= + 0.70 (Issue #69, Pull request #70). + - pdftopdf: Fixed printing multiple copies on driverless IPP + printers. When printing collated copies the multiple copies + got applied twice, resulting in n*n instead of n copies + (CUPS issue #5433). + - pdftoraster, pdftoopvp, pdftoijs: Poppler removed memCheck + and gMemReport functions, remove appropriate calls (Issue + #62, Pull request #66). + +CHANGES IN V1.21.3 + + - foomatic-rip: Reset stdin after replacing the underlying file + descriptor (Issue #58). + +CHANGES IN V1.21.2 + + - cups-browsed: Fixed freeing of literal string caused by + Coverity Scan issue fix (Debian bug #907399). + CHANGES IN V1.21.1 - foomatic-rip: Fixed segmentation fault caused by wrong diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/README new/cups-filters-1.21.4/README --- old/cups-filters-1.21.1/README 2018-08-26 11:40:27.000000000 +0200 +++ new/cups-filters-1.21.4/README 2018-11-23 22:18:48.000000000 +0100 @@ -1,4 +1,4 @@ -README - OpenPrinting CUPS Filters v1.21.1 - 2018-08-26 +README - OpenPrinting CUPS Filters v1.21.4 - 2018-11-23 ------------------------------------------------------- Looking for compile instructions? Read the file "INSTALL.txt" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/compile new/cups-filters-1.21.4/compile --- old/cups-filters-1.21.1/compile 2018-08-26 11:40:58.000000000 +0200 +++ new/cups-filters-1.21.4/compile 2018-11-23 22:18:58.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/configure.ac new/cups-filters-1.21.4/configure.ac --- old/cups-filters-1.21.1/configure.ac 2018-08-26 11:40:27.000000000 +0200 +++ new/cups-filters-1.21.4/configure.ac 2018-11-23 22:18:48.000000000 +0100 @@ -7,7 +7,7 @@ # ==================== m4_define([cups_filters_version_major],[1]) m4_define([cups_filters_version_minor],[21]) -m4_define([cups_filters_version_micro],[1]) +m4_define([cups_filters_version_micro],[4]) m4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro]) # ============= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/cupsfilters/ppdgenerator.c new/cups-filters-1.21.4/cupsfilters/ppdgenerator.c --- old/cups-filters-1.21.1/cupsfilters/ppdgenerator.c 2018-08-20 22:48:20.000000000 +0200 +++ new/cups-filters-1.21.4/cupsfilters/ppdgenerator.c 2018-11-23 22:18:49.000000000 +0100 @@ -1228,6 +1228,7 @@ int outputorderinfofound = 0, faceupdown = 1, firsttolast = 1; + int manual_copies = -1; /* * Range check input... @@ -1438,10 +1439,12 @@ https://github.com/apple/cups/issues/5361 */ if (cupsArrayFind(pdl_list, "application/vnd.cups-pdf")) { cupsFilePuts(fp, "*cupsFilter2: \"application/pdf application/pdf 0 -\"\n"); + manual_copies = 0; formatfound = 1; is_pdf = 1; } else if (cupsArrayFind(pdl_list, "application/pdf")) { cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 0 -\"\n"); + manual_copies = 0; formatfound = 1; is_pdf = 1; } @@ -1452,6 +1455,7 @@ joinResolutionArrays(&common_res, ¤t_res, &common_def, ¤t_def)) { cupsFilePuts(fp, "*cupsFilter2: \"image/pwg-raster image/pwg-raster 0 -\"\n"); + if (formatfound == 0) manual_copies = 1; formatfound = 1; is_pwg = 1; } @@ -1487,6 +1491,7 @@ joinResolutionArrays(&common_res, ¤t_res, &common_def, ¤t_def)) { cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 100 -\"\n"); + if (formatfound == 0) manual_copies = 1; formatfound = 1; is_apple = 1; } @@ -1506,6 +1511,7 @@ joinResolutionArrays(&common_res, ¤t_res, &common_def, ¤t_def)) { cupsFilePuts(fp, "*cupsFilter2: \"application/PCLm application/PCLm 200 -\"\n"); + if (formatfound == 0) manual_copies = 1; formatfound = 1; is_pclm = 1; } @@ -1524,6 +1530,7 @@ another format, like PWG or Apple Raster, we prefer it, as some PCL-XL printers have bugs in their PCL-XL interpreters */ cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/vnd.hp-pclxl 300 gstopxl\"\n"); + if (formatfound == 0) manual_copies = 1; formatfound = 1; } } @@ -1532,6 +1539,7 @@ another format, like PWG or Apple Raster, we prefer it, as many PostScript printers have bugs in their PostScript interpreters */ cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-postscript application/postscript 500 -\"\n"); + if (formatfound == 0) manual_copies = 0; formatfound = 1; } if (cupsArrayFind(pdl_list, "application/vnd.hp-pcl")) { @@ -1540,6 +1548,7 @@ are some printers, like HP inkjets which report to accept PCL but do not support PCL 5c/e or PCL-XL */ cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-raster application/vnd.hp-pcl 700 rastertopclx\"\n"); + if (formatfound == 0) manual_copies = 1; formatfound = 1; } if (cupsArrayFind(pdl_list, "image/jpeg")) @@ -1547,9 +1556,16 @@ if (cupsArrayFind(pdl_list, "image/png")) cupsFilePuts(fp, "*cupsFilter2: \"image/png image/png 0 -\"\n"); cupsArrayDelete(pdl_list); + if (manual_copies < 0) manual_copies = 1; if (formatfound == 0) goto bad_ppd; + /* For the case that we will print in a raster format and not in a high-level + format, we need to create multiple copies on the client. We add a line to + the PPD which tells the pdftopdf filter to generate the copies */ + if (manual_copies == 1) + cupsFilePuts(fp, "*cupsManualCopies: true\n"); + /* No resolution requirements by any of the supported PDLs? Use "printer-resolution-supported" attribute */ if (common_res == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/filter/foomatic-rip/foomaticrip.c new/cups-filters-1.21.4/filter/foomatic-rip/foomaticrip.c --- old/cups-filters-1.21.1/filter/foomatic-rip/foomaticrip.c 2018-08-20 22:48:20.000000000 +0200 +++ new/cups-filters-1.21.4/filter/foomatic-rip/foomaticrip.c 2018-11-23 22:18:49.000000000 +0100 @@ -663,6 +663,7 @@ rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS, "Couldn't dup stdout of pdf-to-ps\n"); + clearerr(stdin); ret = print_file("<STDIN>", 0); wait_for_process(renderer_pid); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/filter/pdftoijs.cxx new/cups-filters-1.21.4/filter/pdftoijs.cxx --- old/cups-filters-1.21.1/filter/pdftoijs.cxx 2018-02-07 23:08:42.000000000 +0100 +++ new/cups-filters-1.21.4/filter/pdftoijs.cxx 2018-11-23 22:18:49.000000000 +0100 @@ -72,7 +72,11 @@ #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19 #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23 void CDECL myErrorFun(void *data, ErrorCategory category, +#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 70 + Goffset pos, const char *msg) +#else Goffset pos, char *msg) +#endif /* MAJOR > 0 || MINOR >= 70 */ #else void CDECL myErrorFun(void *data, ErrorCategory category, int pos, char *msg) @@ -503,9 +507,11 @@ ppdClose(ppd); free(outputfile); +#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69 // Check for memory leaks Object::memCheck(stderr); gMemReport(stderr); +#endif return exitCode; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/filter/pdftoopvp/pdftoopvp.cxx new/cups-filters-1.21.4/filter/pdftoopvp/pdftoopvp.cxx --- old/cups-filters-1.21.1/filter/pdftoopvp/pdftoopvp.cxx 2018-02-07 23:08:43.000000000 +0100 +++ new/cups-filters-1.21.4/filter/pdftoopvp/pdftoopvp.cxx 2018-11-23 22:18:49.000000000 +0100 @@ -114,7 +114,11 @@ #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19 #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23 void CDECL myErrorFun(void *data, ErrorCategory category, +#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 70 + Goffset pos, const char *msg) +#else Goffset pos, char *msg) +#endif /* MAJOR > 0 || MINOR >= 70 */ #else void CDECL myErrorFun(void *data, ErrorCategory category, int pos, char *msg) @@ -763,9 +767,11 @@ err0: delete globalParams; +#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69 // check for memory leaks Object::memCheck(stderr); gMemReport(stderr); +#endif } /* muntrace(); */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/filter/pdftopdf/pdftopdf.cc new/cups-filters-1.21.4/filter/pdftopdf/pdftopdf.cc --- old/cups-filters-1.21.1/filter/pdftopdf/pdftopdf.cc 2018-07-12 15:53:28.000000000 +0200 +++ new/cups-filters-1.21.4/filter/pdftopdf/pdftopdf.cc 2018-11-23 22:18:49.000000000 +0100 @@ -783,11 +783,25 @@ } else if ((ppd)&&(!ppd->manual_copies)) { // hw copy generation available param.deviceCopies=param.numCopies; if (param.collate) { // collate requested by user - // check collate device, with current/final(!) ppd settings - param.deviceCollate=printerWillCollate(ppd); - if (!param.deviceCollate) { - // printer can't hw collate -> we must copy collated in sw - param.deviceCopies=1; + // Check output format (FINAL_CONTENT_TYPE env variable) whether it is + // of a driverless IPP printer (PDF, Apple Raster, PWG Raster, PCLm). + // These printers do always hardware collate if they do hardware copies. + // https://github.com/apple/cups/issues/5433 + char *final_content_type = getenv("FINAL_CONTENT_TYPE"); + if (final_content_type && + (strcasestr(final_content_type, "/pdf") || + strcasestr(final_content_type, "/vnd.cups-pdf") || + strcasestr(final_content_type, "/pwg-raster") || + strcasestr(final_content_type, "/urf") || + strcasestr(final_content_type, "/PCLm"))) { + param.deviceCollate = true; + } else { + // check collate device, with current/final(!) ppd settings + param.deviceCollate=printerWillCollate(ppd); + if (!param.deviceCollate) { + // printer can't hw collate -> we must copy collated in sw + param.deviceCopies=1; + } } } // else: printer copies w/o collate and takes care of duplex/evenDuplex } else { // sw copies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/filter/pdftoraster.cxx new/cups-filters-1.21.4/filter/pdftoraster.cxx --- old/cups-filters-1.21.1/filter/pdftoraster.cxx 2018-08-15 17:00:24.000000000 +0200 +++ new/cups-filters-1.21.4/filter/pdftoraster.cxx 2018-11-23 22:18:49.000000000 +0100 @@ -283,7 +283,11 @@ #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19 #if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23 void CDECL myErrorFun(void *data, ErrorCategory category, +#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 70 + Goffset pos, const char *msg) +#else Goffset pos, char *msg) +#endif /* MAJOR > 0 || MINOR >= 70 */ #else void CDECL myErrorFun(void *data, ErrorCategory category, int pos, char *msg) @@ -1686,7 +1690,7 @@ { SplashBitmap *bitmap; Page *page = catalog->getPage(pageNo); - PDFRectangle *mediaBox = page->getMediaBox(); + PDFRectangle mediaBox = *page->getMediaBox(); int rotate = page->getRotate(); double paperdimensions[2], /* Physical size of the paper */ margins[4]; /* Physical margins of print */ @@ -1696,14 +1700,14 @@ bool landscape = 0; fprintf(stderr, "DEBUG: mediaBox = [ %f %f %f %f ]; rotate = %d\n", - mediaBox->x1, mediaBox->y1, mediaBox->x2, mediaBox->y2, rotate); - l = mediaBox->x2 - mediaBox->x1; + mediaBox.x1, mediaBox.y1, mediaBox.x2, mediaBox.y2, rotate); + l = mediaBox.x2 - mediaBox.x1; if (l < 0) l = -l; if (rotate == 90 || rotate == 270) header.PageSize[1] = (unsigned)l; else header.PageSize[0] = (unsigned)l; - l = mediaBox->y2 - mediaBox->y1; + l = mediaBox.y2 - mediaBox.y1; if (l < 0) l = -l; if (rotate == 90 || rotate == 270) header.PageSize[0] = (unsigned)l; @@ -2162,9 +2166,11 @@ cmsDeleteTransform(colorTransform); } +#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69 // Check for memory leaks Object::memCheck(stderr); gMemReport(stderr); +#endif return exitCode; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/m4/libtool.m4 new/cups-filters-1.21.4/m4/libtool.m4 --- old/cups-filters-1.21.1/m4/libtool.m4 2018-08-26 11:40:54.000000000 +0200 +++ new/cups-filters-1.21.4/m4/libtool.m4 2018-11-23 22:18:54.000000000 +0100 @@ -6438,7 +6438,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6813,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6878,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7217,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7301,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7312,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/missing new/cups-filters-1.21.4/missing --- old/cups-filters-1.21.1/missing 2018-08-26 11:40:58.000000000 +0200 +++ new/cups-filters-1.21.4/missing 2018-11-23 22:18:58.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/test-driver new/cups-filters-1.21.4/test-driver --- old/cups-filters-1.21.1/test-driver 2018-08-26 11:40:58.000000000 +0200 +++ new/cups-filters-1.21.4/test-driver 2018-11-23 22:18:58.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/utils/cups-browsed.c new/cups-filters-1.21.4/utils/cups-browsed.c --- old/cups-filters-1.21.1/utils/cups-browsed.c 2018-08-20 22:48:20.000000000 +0200 +++ new/cups-filters-1.21.4/utils/cups-browsed.c 2018-11-23 22:18:49.000000000 +0100 @@ -189,6 +189,7 @@ int overwritten; int netprinter; int is_legacy; + int timeouted; } remote_printer_t; /* Data structure for network interfaces */ @@ -384,6 +385,7 @@ static char *DomainSocket = NULL; static unsigned int HttpLocalTimeout = 5; static unsigned int HttpRemoteTimeout = 10; +static unsigned int HttpMaxRetries = 5; static ip_based_uris_t IPBasedDeviceURIs = IP_BASED_URIS_NO; static local_queue_naming_t LocalQueueNamingRemoteCUPS=LOCAL_QUEUE_NAMING_DNSSD; static local_queue_naming_t LocalQueueNamingIPPPrinter=LOCAL_QUEUE_NAMING_DNSSD; @@ -423,6 +425,9 @@ static char save_options_file[1024]; static char debug_log_file[1024]; +/* Static global variable for indicating we have reached the HTTP timeout */ +static int timeout_reached = 0; + static void recheck_timer (void); static void browse_poll_create_subscription (browsepoll_t *context, http_t *conn); @@ -638,6 +643,7 @@ http_timeout_cb(http_t *http, void *user_data) { debug_printf("HTTP timeout! (consider increasing HttpLocalTimeout/HttpRemoteTimeout value)\n"); + timeout_reached = 1; return 0; } @@ -4000,6 +4006,10 @@ CUPS broadcast (1) or through DNS-SD (0) */ p->is_legacy = 0; + /* Initialize field for how many timeouts cups-browsed experienced + in a row during creation of this printer's queue */ + p->timeouted = 0; + /* Remote CUPS printer or local queue remaining from previous cups-browsed session */ /* is_cups_queue: -1: Unknown, 0: IPP printer, 1: Remote CUPS queue, @@ -4407,7 +4417,7 @@ int num_jobs; cups_job_t *jobs; ipp_t *request; - time_t current_time = time(NULL); + time_t current_time; int i, new_cupsfilter_line_inserted, ap_remote_queue_id_line_inserted, cont_line_read, want_raw; char *disabled_str, *ptr, *prefix; @@ -4461,6 +4471,20 @@ for (p = (remote_printer_t *)cupsArrayFirst(remote_printers); p; p = (remote_printer_t *)cupsArrayNext(remote_printers)) { + /* We need to get the current time as precise as possible for retries + and reset the timeout flag */ + current_time = time(NULL); + timeout_reached = 0; + + /* cups-browsed tried to add this print queue unsuccessfully for too + many times due to timeouts - Skip print queue creation for this one */ + if (p->timeouted >= HttpMaxRetries) + { + fprintf(stderr, "Max number of retries (%d) for creating print queue %s reached, skipping it.\n", + HttpMaxRetries, p->queue_name); + continue; + } + /* terminating means we have received a signal and should shut down. in_shutdown means we have exited the main loop. update_cups_queues() is called after having exited the main loop @@ -4502,8 +4526,10 @@ if ((q = p->slave_of) == NULL) { if ((http = http_connect_local ()) == NULL) { debug_printf("Unable to connect to CUPS!\n"); - if (in_shutdown == 0) + if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; + } break; } @@ -4537,6 +4563,7 @@ "Printer disappeared or cups-browsed shutdown"); /* Schedule the removal of the queue for later */ if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -4556,6 +4583,7 @@ if (cups_notifier == NULL && is_cups_default_printer(p->queue_name)) { /* Schedule the removal of the queue for later */ if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -4579,6 +4607,7 @@ if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE) { debug_printf("Unable to remove CUPS queue!\n"); if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -4657,6 +4686,7 @@ /* Make sure to have a connection to the local CUPS daemon */ if ((http = http_connect_local ()) == NULL) { debug_printf("Unable to connect to CUPS!\n"); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; break; } @@ -4779,6 +4809,7 @@ cupsFreeJobs(num_jobs, jobs); /* Schedule the removal of the queue for later */ if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -4794,6 +4825,7 @@ if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE) { debug_printf("Unable to remove temporary CUPS queue, retrying later\n"); if (in_shutdown == 0) { + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -4817,6 +4849,7 @@ debug_printf("get-printer-attributes IPP call failed on printer %s (%s).\n", p->queue_name, p->uri); p->status = STATUS_DISAPPEARED; + current_time = time(NULL); p->timeout = current_time + TIMEOUT_IMMEDIATELY; goto cannot_create; } @@ -4834,6 +4867,7 @@ else debug_printf("Unable to create PPD file: %s\n", ppdgenerator_msg); p->status = STATUS_DISAPPEARED; + current_time = time(NULL); p->timeout = current_time + TIMEOUT_IMMEDIATELY; goto cannot_create; } else { @@ -4959,6 +4993,7 @@ if ((fd = cupsTempFd(tempfile, sizeof(tempfile))) < 0) { debug_printf("Unable to create interface script file\n"); p->status = STATUS_DISAPPEARED; + current_time = time(NULL); p->timeout = current_time + TIMEOUT_IMMEDIATELY; goto cannot_create; } @@ -4986,6 +5021,7 @@ if (bytes != strlen(buffer)) { debug_printf("Unable to write interface script into the file\n"); p->status = STATUS_DISAPPEARED; + current_time = time(NULL); p->timeout = current_time + TIMEOUT_IMMEDIATELY; goto cannot_create; } @@ -5061,6 +5097,7 @@ == NULL) { debug_printf("Could not connect to the server %s:%d for %s!\n", p->host, p->port, p->queue_name); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -5071,6 +5108,7 @@ CreateRemoteRawPrinterQueues == 0) { debug_printf("Unable to load PPD file for %s from the server %s:%d!\n", p->queue_name, p->host, p->port); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; httpClose(remote_http); @@ -5104,6 +5142,7 @@ ppd_status_t status = ppdLastError(&linenum); debug_printf("Unable to open PPD \"%s\": %s on line %d.", loadedppd, ppdErrorString(status), linenum); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; unlink(loadedppd); @@ -5113,6 +5152,7 @@ cupsMarkOptions(ppd, p->num_options, p->options); if ((out = cupsTempFile2(buf, sizeof(buf))) == NULL) { debug_printf("Unable to create temporary file!\n"); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; ppdClose(ppd); @@ -5121,6 +5161,7 @@ } if ((in = cupsFileOpen(loadedppd, "r")) == NULL) { debug_printf("Unable to open the downloaded PPD file!\n"); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; cupsFileClose(out); @@ -5323,6 +5364,7 @@ if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE) { debug_printf("Unable to create/modify CUPS queue (%s)!\n", cupsLastErrorString()); + current_time = time(NULL); p->timeout = current_time + TIMEOUT_RETRY; p->no_autosave = 0; break; @@ -5442,6 +5484,27 @@ break; } + + /* Check if an HTTP timeout happened during the print queue creation + If it does - increment p->timeouted and set status to TO_BE_CREATED + because the creation can fall through the process, have state changed to + STATUS_CONFIRMED and experience the timeout */ + /* If no timeout has happened, clear p->timeouted */ + if (timeout_reached == 1) + { + fprintf(stderr, "Timeout happened during creating the queue %s, turn on DebugLogging for more info.\n", p->queue_name); + p->timeouted ++; + + debug_printf("The queue %s already timeouted %d times in a row.\n", + p->queue_name, p->timeouted); + p->status = STATUS_TO_BE_CREATED; + } + else if (p->timeouted != 0) + { + debug_printf("Creating the queue %s went smoothly after %d timeouts.\n", + p->queue_name, p->timeouted); + p->timeouted = 0; + } } log_all_printers(); @@ -7889,8 +7952,11 @@ debug_printf("Invalid %s value: %d\n", line, t); } else if (!strcasecmp(line, "DomainSocket") && value) { - if (DomainSocket == NULL && value[0] != '\0') + if (value[0] != '\0') { + if (DomainSocket != NULL) + free(DomainSocket); DomainSocket = strdup(value); + } } else if ((!strcasecmp(line, "HttpLocalTimeout") || !strcasecmp(line, "HttpRemoteTimeout")) && value) { int t = atoi(value); if (t >= 0) { @@ -7904,6 +7970,16 @@ } else debug_printf("Invalid %s value: %d\n", line, t); + } else if (!strcasecmp(line, "HttpMaxRetries") && value) { + int t = atoi(value); + if (t > 0) { + HttpMaxRetries = t; + + debug_printf("Set %s to %d retries.\n", + line, t); + } else + debug_printf("Invalid %s value: %d\n", + line, t); } else if (!strcasecmp(line, "IPBasedDeviceURIs") && value) { if (!strcasecmp(value, "IPv4") || !strcasecmp(value, "IPv4Only")) IPBasedDeviceURIs = IP_BASED_URIS_IPV4_ONLY; @@ -8466,7 +8542,7 @@ } else { #ifdef CUPS_DEFAULT_DOMAINSOCKET if (DomainSocket == NULL) - DomainSocket = CUPS_DEFAULT_DOMAINSOCKET; + DomainSocket = strdup(CUPS_DEFAULT_DOMAINSOCKET); #endif if (DomainSocket != NULL) { struct stat sockinfo; /* Domain socket information */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/utils/cups-browsed.conf.5 new/cups-filters-1.21.4/utils/cups-browsed.conf.5 --- old/cups-filters-1.21.1/utils/cups-browsed.conf.5 2018-02-26 11:50:25.000000000 +0100 +++ new/cups-filters-1.21.4/utils/cups-browsed.conf.5 2018-11-23 22:18:49.000000000 +0100 @@ -429,6 +429,18 @@ .fam T .fi +Set how many retries (N) should cups-browsed do for creating print +queues for remote printers which receive timeouts during print queue +creation. The printers which are not successfuly set up even after N +retries, are skipped until the next restart of the service. Note that +too many retries can cause high CPU load. +.PP +.nf +.fam C + HttpMaxRetries 5 + +.fam T +.fi The interval between browsing/broadcasting cycles, local and/or remote, can be adjusted with the BrowseInterval directive. .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cups-filters-1.21.1/utils/cups-browsed.conf.in new/cups-filters-1.21.4/utils/cups-browsed.conf.in --- old/cups-filters-1.21.1/utils/cups-browsed.conf.in 2018-02-26 11:50:25.000000000 +0100 +++ new/cups-filters-1.21.4/utils/cups-browsed.conf.in 2018-11-23 22:18:49.000000000 +0100 @@ -310,6 +310,13 @@ # HttpLocalTimeout 5 # HttpRemoteTimeout 10 +# Set how many retries (N) should cups-browsed do for creating print +# queues for remote printers which receive timeouts during print queue +# creation. The printers which are not successfuly set up even after +# N retries, are skipped until the next restart of the service. Note +# that too many retries can cause high CPU load. + +# HttpMaxRetries 5 # Set OnlyUnsupportedByCUPS to "Yes" will make cups-browsed not create # local queues for remote printers for which CUPS creates queues by
