Hello community,

here is the log from the commit of package cups-filters for openSUSE:Factory 
checked in at 2015-03-30 19:09:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cups-filters (Old)
 and      /work/SRC/openSUSE:Factory/.cups-filters.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cups-filters"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cups-filters/cups-filters.changes        
2015-03-16 06:59:39.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cups-filters.new/cups-filters.changes   
2015-03-30 19:09:44.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Mar 20 13:57:04 CET 2015 - [email protected]
+
+- For SLE12 build it with traditional CUPS 1.5.4 to ensure
+  it works on SLE12 both with CUPS 1.7.5 and CUPS 1.5.4.
+
+-------------------------------------------------------------------
+Fri Mar 20 10:01:44 CET 2015 - [email protected]
+
+- fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff
+  makes it compile again without errors also for CUPS <= 1.5.4
+  by excluding code that uses CUPS >= 1.6 specific stuff,
+  in particular by skipping create_local_queue for non-CUPS
+  printer broadcasts for CUPS <= 1.5.4, see the upstream bug
+  https://bugs.linuxfoundation.org/show_bug.cgi?id=1268
+
+-------------------------------------------------------------------

New:
----
  fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cups-filters.spec ++++++
--- /var/tmp/diff_new_pack.N9sJre/_old  2015-03-30 19:09:44.000000000 +0200
+++ /var/tmp/diff_new_pack.N9sJre/_new  2015-03-30 19:09:44.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package cups-filters
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -39,6 +39,13 @@
 Version:        1.0.67
 Release:        0
 Source0:        
http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
+# Patch1 fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff
+# makes it compile again without errors also for CUPS <= 1.5.4
+# by excluding code that uses CUPS >= 1.6 specific stuff,
+# in particular by skipping create_local_queue for non-CUPS
+# printer broadcasts for CUPS <= 1.5.4, see the upstream bug
+# https://bugs.linuxfoundation.org/show_bug.cgi?id=1268
+Patch1:         fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff
 # Since cups-filters version 1.0.42 foomatic-rip is also provided by 
cups-filters.
 # The foomatic-rip version that is provided by cups-filters is not specified 
in the cups-filters sources
 # but on http://www.openprinting.org/download/foomatic/ the 
foomatic-filters-4.0-current.tar.gz
@@ -49,7 +56,21 @@
 #   zypper vcmp '4.0.17.256' '4.0.17.256.1' -> 4.0.17.256 is older than 
4.0.17.256.1
 #   zypper vcmp '4.0.17.257' '4.0.17.256.1' -> 4.0.17.257 is newer than 
4.0.17.256.1
 %define foomatic_rip_version 4.0.17.256.1
+# SLE12 needs special BuildRequires.
+# For suse_version values see 
https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
+%if 0%{?suse_version} == 1315
+# For SLE12 by default CUPS 1.7.5 is provided and alternatively CUPS 1.5.4 is 
provided in the "legacy" module.
+# For SLE12 build it with traditional CUPS 1.5.4 to ensure it works on SLE12 
both with CUPS 1.7.5 and CUPS 1.5.4
+# because libcups and libcupsimage in CUPS 1.7.5 are backward compatible with 
CUPS 1.5.4 so that applications
+# that have been built with CUPS 1.5.4 also work under CUPS 1.7.5 but the 
libraries in CUPS 1.7.5 provide
+# some additional functions so that applications that have been built with 
CUPS 1.7.5 and use those
+# additional functions would not work under CUPS 1.7.5.
+# Only in the Printing project for SLE12 use cups154-ddk (a sub package of the 
cups154-SLE12 source package):
+BuildRequires:  cups154-devel
+%else
+# Anything what is not SLE12 (i.e. SLE11 and all openSUSE versions) have 
"normal" BuildRequires:
 BuildRequires:  cups-devel
+%endif
 BuildRequires:  pkgconfig
 # pdftopdf
 BuildRequires:  qpdf-devel
@@ -261,6 +282,13 @@
 
 %prep
 %setup -q
+# Patch1 fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff
+# makes it compile again without errors also for CUPS <= 1.5.4
+# by excluding code that uses CUPS >= 1.6 specific stuff,
+# in particular by skipping create_local_queue for non-CUPS
+# printer broadcasts for CUPS <= 1.5.4, see the upstream bug
+# https://bugs.linuxfoundation.org/show_bug.cgi?id=1268
+%patch1
 
 %build
 # Just do what is described in the upstream INSTALL file

++++++ fix-create_local_queue-ifndef-HAVE_CUPS_1_6.diff ++++++
--- utils/cups-browsed.c.orig   2015-03-11 15:56:23.000000000 +0100
+++ utils/cups-browsed.c        2015-03-17 14:56:06.000000000 +0100
@@ -191,12 +191,20 @@ static void browse_poll_create_subscript
                                             http_t *conn);
 static gboolean browse_poll_get_notifications (browsepoll_t *context,
                                               http_t *conn);
-char            *_ppdCreateFromIPP(char *buffer, size_t bufsize, ipp_t 
*response);
 
 #if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
 #define HAVE_CUPS_1_6 1
 #endif
 
+#ifdef HAVE_CUPS_1_6
+/* The following function uses a lot of CUPS >= 1.6 specific stuff.
+   The following function is only called in create_local_queue()
+   to set up local queues for non-CUPS printer broadcasts
+   that is disabled in create_local_queue() for older CUPS <= 1.5.4.
+   Accordingly the following function is also disabled here for CUPS < 1.6. */
+char            *_ppdCreateFromIPP(char *buffer, size_t bufsize, ipp_t 
*response);
+#endif /* HAVE_CUPS_1_6 */
+
 /*
  * CUPS 1.6 makes various structures private and
  * introduces these ippGet and ippSet functions
@@ -738,6 +746,14 @@ create_local_queue (const char *name,
                   p->name, q->host);
     }
   } else {
+#ifndef HAVE_CUPS_1_6
+    /* The following code uses a lot of CUPS >= 1.6 specific stuff.
+       For older CUPS <= 1.5.4 the following functionality is skipped
+       which means for CUPS <= 1.5.4 only for CUPS printer broadcasts
+       there are local queues created which should be sufficient
+       on systems where traditional CUPS <= 1.5.4 is used. */
+    goto fail;
+#else /* HAVE_CUPS_1_6 */
     /* Non-CUPS printer broadcasts are most probably from printers
        directly connected to the network and using the IPP protocol.
        We check whether we can set them up without a device-specific
@@ -841,6 +857,7 @@ create_local_queue (const char *name,
     /*p->ifscript = "/usr/lib/cups/filter/pdftoippprinter-wrapper";
       debug_printf("cups-browsed: System V Interface script for %s: %s\n", 
p->name, p->ifscript);*/
 
+#endif /* HAVE_CUPS_1_6 */
   }
 
   /* Add the new remote printer entry */
@@ -3307,6 +3324,12 @@ fail:
   return ret;
 }
 
+#ifdef HAVE_CUPS_1_6
+/* The following code uses a lot of CUPS >= 1.6 specific stuff.
+   The following code is only needed for create_local_queue()
+   to set up local queues for non-CUPS printer broadcasts
+   that is disabled in create_local_queue() for older CUPS <= 1.5.4.
+   Accordingly the following code is also disabled here for CUPS < 1.6. */
 
 /*
  * The code below is borrowed from the CUPS 2.1.x upstream repository
@@ -4279,5 +4302,6 @@ pwg_ppdize_resolution(
       snprintf(name, namesize, "%dx%ddpi", *xres, *yres);
   }
 }
+#endif /* HAVE_CUPS_1_6 */
 
 

Reply via email to