From 46d8c633c4b1184a961a42f3b7d4abb26fbe9a3a Mon Sep 17 00:00:00 2001 From: Rosa Date: Mon, 14 May 2012 04:51:26 +0400 Subject: [PATCH] Automatic import for version 1.5.2 --- .abf.yml | 2 +- cups-CVE-2011-2896.patch | 33 ----- cups-avahi-1-config.patch | 12 +- cups-avahi-2-backend.patch | 20 ++-- cups-avahi-3-timeouts.patch | 28 ++--- cups-avahi-4-poll.patch | 18 +-- cups-avahi-5-services.patch | 161 ++++++++++++++++++------- cups-driverd-timeout.patch | 12 -- cups-polld-reconnect.patch | 11 ++ cups-ps-command-filter.patch | 13 -- cups-revision10277.patch | 43 +++++++ cups-snmp-quirks.patch | 8 +- cups-str3921.patch | 14 --- cups-str3947.patch | 26 ---- cups-str3985.patch | 74 ++++++++++++ cups-str4014.patch | 16 +++ cups-systemd-socket.patch | 225 +++++++++++++++++++++++++++-------- cups-translation.patch | 12 ++ cups.spec | 44 +++++-- 19 files changed, 530 insertions(+), 242 deletions(-) delete mode 100644 cups-CVE-2011-2896.patch create mode 100644 cups-polld-reconnect.patch delete mode 100644 cups-ps-command-filter.patch create mode 100644 cups-revision10277.patch delete mode 100644 cups-str3921.patch delete mode 100644 cups-str3947.patch create mode 100644 cups-str3985.patch create mode 100644 cups-str4014.patch create mode 100644 cups-translation.patch diff --git a/.abf.yml b/.abf.yml index 63a2224..db1e235 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,4 +1,4 @@ sources: - "cups-1.5.0-source.tar.bz2": 628f549867751e373fc20c7558fec422f9eb942b + "cups-1.5.2-source.tar.bz2": 56fdb4f58e676607845321c0296c1e90e416883f "pap-backend.tar.bz2": 89e1e7eb4258d47069d2a60c383b8bd555a11e63 "pap-docu.pdf.bz2": 7e7d44bb58532ab2fc4c1ca3581787877f1b5733 diff --git a/cups-CVE-2011-2896.patch b/cups-CVE-2011-2896.patch deleted file mode 100644 index a949b9d..0000000 --- a/cups-CVE-2011-2896.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up cups-1.4.8/filter/image-gif.c.CVE-2011-2896 cups-1.4.8/filter/image-gif.c ---- cups-1.4.8/filter/image-gif.c.CVE-2011-2896 2011-06-20 21:37:51.000000000 +0100 -+++ cups-1.4.8/filter/image-gif.c 2011-08-19 11:33:37.547911212 +0100 -@@ -648,11 +648,13 @@ gif_read_lzw(FILE *fp, /* I - File to - - if (code == max_code) - { -- *sp++ = firstcode; -- code = oldcode; -+ if (sp < (stack + 8192)) -+ *sp++ = firstcode; -+ -+ code = oldcode; - } - -- while (code >= clear_code) -+ while (code >= clear_code && sp < (stack + 8192)) - { - *sp++ = table[1][code]; - if (code == table[0][code]) -@@ -661,8 +663,10 @@ gif_read_lzw(FILE *fp, /* I - File to - code = table[0][code]; - } - -- *sp++ = firstcode = table[1][code]; -- code = max_code; -+ if (sp < (stack + 8192)) -+ *sp++ = firstcode = table[1][code]; -+ -+ code = max_code; - - if (code < 4096) - { diff --git a/cups-avahi-1-config.patch b/cups-avahi-1-config.patch index 663eb39..516e01f 100644 --- a/cups-avahi-1-config.patch +++ b/cups-avahi-1-config.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/config.h.in.avahi-1-config cups-1.5.0/config.h.in ---- cups-1.5.0/config.h.in.avahi-1-config 2011-06-16 21:12:16.000000000 +0100 -+++ cups-1.5.0/config.h.in 2011-08-05 15:04:09.535759988 +0100 +diff -up cups-1.5.2/config.h.in.avahi-1-config cups-1.5.2/config.h.in +--- cups-1.5.2/config.h.in.avahi-1-config 2011-06-16 21:12:16.000000000 +0100 ++++ cups-1.5.2/config.h.in 2012-03-14 15:04:51.365347165 +0000 @@ -390,6 +390,13 @@ @@ -15,9 +15,9 @@ diff -up cups-1.5.0/config.h.in.avahi-1-config cups-1.5.0/config.h.in * Do we have ? */ -diff -up cups-1.5.0/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.0/config-scripts/cups-dnssd.m4 ---- cups-1.5.0/config-scripts/cups-dnssd.m4.avahi-1-config 2011-05-12 06:21:56.000000000 +0100 -+++ cups-1.5.0/config-scripts/cups-dnssd.m4 2011-08-05 15:04:09.525760307 +0100 +diff -up cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.2/config-scripts/cups-dnssd.m4 +--- cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config 2011-05-12 06:21:56.000000000 +0100 ++++ cups-1.5.2/config-scripts/cups-dnssd.m4 2012-03-14 15:04:51.365347165 +0000 @@ -23,6 +23,21 @@ AC_ARG_WITH(dnssd-includes, [ --with-dn DNSSDLIBS="" DNSSD_BACKEND="" diff --git a/cups-avahi-2-backend.patch b/cups-avahi-2-backend.patch index c576043..08f6186 100644 --- a/cups-avahi-2-backend.patch +++ b/cups-avahi-2-backend.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/backend/dnssd.c.avahi-2-backend cups-1.5.0/backend/dnssd.c ---- cups-1.5.0/backend/dnssd.c.avahi-2-backend 2011-08-05 15:04:46.182591844 +0100 -+++ cups-1.5.0/backend/dnssd.c 2011-08-05 15:05:13.868710181 +0100 +diff -up cups-1.5.2/backend/dnssd.c.avahi-2-backend cups-1.5.2/backend/dnssd.c +--- cups-1.5.2/backend/dnssd.c.avahi-2-backend 2012-03-14 15:04:17.692305593 +0000 ++++ cups-1.5.2/backend/dnssd.c 2012-03-14 15:05:38.966405938 +0000 @@ -15,14 +15,21 @@ * * Contents: @@ -174,7 +174,7 @@ diff -up cups-1.5.0/backend/dnssd.c.avahi-2-backend cups-1.5.0/backend/dnssd.c + */ + + datalen = *data++; -+ if (!datalen || (data + datalen) >= txt->dataend) ++ if (!datalen || (data + datalen) > txt->dataend) + return NULL; + txt->datanext = data + datalen; + @@ -779,7 +779,7 @@ diff -up cups-1.5.0/backend/dnssd.c.avahi-2-backend cups-1.5.0/backend/dnssd.c - - datalen = *data++; - -- if (!datalen || (data + datalen) >= dataend) +- if (!datalen || (data + datalen) > dataend) - break; - - datanext = data + datalen; @@ -841,9 +841,9 @@ diff -up cups-1.5.0/backend/dnssd.c.avahi-2-backend cups-1.5.0/backend/dnssd.c /* * 'sigterm_handler()' - Handle termination signals... */ -diff -up cups-1.5.0/cups/http-support.c.avahi-2-backend cups-1.5.0/cups/http-support.c ---- cups-1.5.0/cups/http-support.c.avahi-2-backend 2011-06-10 23:06:26.000000000 +0100 -+++ cups-1.5.0/cups/http-support.c 2011-08-05 15:05:13.870710117 +0100 +diff -up cups-1.5.2/cups/http-support.c.avahi-2-backend cups-1.5.2/cups/http-support.c +--- cups-1.5.2/cups/http-support.c.avahi-2-backend 2011-09-26 19:46:46.000000000 +0100 ++++ cups-1.5.2/cups/http-support.c 2012-03-14 15:05:38.997405971 +0000 @@ -43,6 +43,10 @@ * http_copy_decode() - Copy and decode a URI. * http_copy_encode() - Copy and encode a URI. @@ -998,7 +998,7 @@ diff -up cups-1.5.0/cups/http-support.c.avahi-2-backend cups-1.5.0/cups/http-sup if ((options & _HTTP_RESOLVE_STDERR) && !uri) _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer.")); -@@ -1895,6 +1974,116 @@ http_resolve_cb( +@@ -1914,6 +1993,116 @@ http_resolve_cb( #endif /* HAVE_DNSSD */ @@ -1113,5 +1113,5 @@ diff -up cups-1.5.0/cups/http-support.c.avahi-2-backend cups-1.5.0/cups/http-sup + + /* - * End of "$Id: http-support.c 9820 2011-06-10 22:06:26Z mike $". + * End of "$Id: http-support.c 10017 2011-09-26 18:46:46Z mike $". */ diff --git a/cups-avahi-3-timeouts.patch b/cups-avahi-3-timeouts.patch index 1c547c0..daf852a 100644 --- a/cups-avahi-3-timeouts.patch +++ b/cups-avahi-3-timeouts.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/scheduler/cupsd.h.avahi-3-timeouts cups-1.5.0/scheduler/cupsd.h ---- cups-1.5.0/scheduler/cupsd.h.avahi-3-timeouts 2011-05-11 23:17:34.000000000 +0100 -+++ cups-1.5.0/scheduler/cupsd.h 2011-10-07 13:20:41.522867324 +0100 +diff -up cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts cups-1.5.2/scheduler/cupsd.h +--- cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts 2011-05-11 23:17:34.000000000 +0100 ++++ cups-1.5.2/scheduler/cupsd.h 2012-03-14 15:06:36.509476983 +0000 @@ -140,6 +140,15 @@ extern const char *cups_hstrerror(int); typedef void (*cupsd_selfunc_t)(void *data); @@ -50,9 +50,9 @@ diff -up cups-1.5.0/scheduler/cupsd.h.avahi-3-timeouts cups-1.5.0/scheduler/cups /* * End of "$Id: cupsd.h 9766 2011-05-11 22:17:34Z mike $". -diff -up cups-1.5.0/scheduler/main.c.avahi-3-timeouts cups-1.5.0/scheduler/main.c ---- cups-1.5.0/scheduler/main.c.avahi-3-timeouts 2011-10-07 13:20:36.875954675 +0100 -+++ cups-1.5.0/scheduler/main.c 2011-10-07 13:20:41.524867282 +0100 +diff -up cups-1.5.2/scheduler/main.c.avahi-3-timeouts cups-1.5.2/scheduler/main.c +--- cups-1.5.2/scheduler/main.c.avahi-3-timeouts 2012-03-14 15:04:17.655305548 +0000 ++++ cups-1.5.2/scheduler/main.c 2012-03-14 15:06:36.511476986 +0000 @@ -146,6 +146,10 @@ main(int argc, /* I - Number of comm int launchd_idle_exit; /* Idle exit on select timeout? */ @@ -116,8 +116,8 @@ diff -up cups-1.5.0/scheduler/main.c.avahi-3-timeouts cups-1.5.0/scheduler/main. + * See if there are any scheduled timed callbacks to run. + */ + -+ tmo = cupsdNextTimeout (&tmo_delay); -+ if (tmo) ++ if ((tmo = cupsdNextTimeout(&tmo_delay)) != NULL && ++ (now + tmo_delay) < timeout) + { + timeout = tmo_delay; + why = "run a timed callback"; @@ -127,9 +127,9 @@ diff -up cups-1.5.0/scheduler/main.c.avahi-3-timeouts cups-1.5.0/scheduler/main. /* * Check whether we are accepting new connections... */ -diff -up cups-1.5.0/scheduler/Makefile.avahi-3-timeouts cups-1.5.0/scheduler/Makefile ---- cups-1.5.0/scheduler/Makefile.avahi-3-timeouts 2011-10-07 13:20:36.955953170 +0100 -+++ cups-1.5.0/scheduler/Makefile 2011-10-07 13:20:41.521867343 +0100 +diff -up cups-1.5.2/scheduler/Makefile.avahi-3-timeouts cups-1.5.2/scheduler/Makefile +--- cups-1.5.2/scheduler/Makefile.avahi-3-timeouts 2012-03-14 15:04:17.685305586 +0000 ++++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:06:36.508476980 +0000 @@ -39,7 +39,8 @@ CUPSDOBJS = \ server.o \ statbuf.o \ @@ -140,9 +140,9 @@ diff -up cups-1.5.0/scheduler/Makefile.avahi-3-timeouts cups-1.5.0/scheduler/Mak LIBOBJS = \ filter.o \ mime.o \ -diff -up cups-1.5.0/scheduler/timeout.c.avahi-3-timeouts cups-1.5.0/scheduler/timeout.c ---- cups-1.5.0/scheduler/timeout.c.avahi-3-timeouts 2011-10-07 13:20:41.525867259 +0100 -+++ cups-1.5.0/scheduler/timeout.c 2011-10-07 13:20:41.525867259 +0100 +diff -up cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts cups-1.5.2/scheduler/timeout.c +--- cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts 2012-03-14 15:06:36.552477037 +0000 ++++ cups-1.5.2/scheduler/timeout.c 2012-03-14 15:06:36.552477037 +0000 @@ -0,0 +1,235 @@ +/* + * "$Id$" diff --git a/cups-avahi-4-poll.patch b/cups-avahi-4-poll.patch index 189e83d..d7fa5fd 100644 --- a/cups-avahi-4-poll.patch +++ b/cups-avahi-4-poll.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/scheduler/avahi.c.avahi-4-poll cups-1.5.0/scheduler/avahi.c ---- cups-1.5.0/scheduler/avahi.c.avahi-4-poll 2011-10-11 10:56:50.102288037 +0100 -+++ cups-1.5.0/scheduler/avahi.c 2011-10-11 10:56:50.102288037 +0100 +diff -up cups-1.5.2/scheduler/avahi.c.avahi-4-poll cups-1.5.2/scheduler/avahi.c +--- cups-1.5.2/scheduler/avahi.c.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 ++++ cups-1.5.2/scheduler/avahi.c 2012-03-14 15:07:29.477542381 +0000 @@ -0,0 +1,441 @@ +/* + * "$Id$" @@ -443,9 +443,9 @@ diff -up cups-1.5.0/scheduler/avahi.c.avahi-4-poll cups-1.5.0/scheduler/avahi.c +/* + * End of "$Id$". + */ -diff -up cups-1.5.0/scheduler/avahi.h.avahi-4-poll cups-1.5.0/scheduler/avahi.h ---- cups-1.5.0/scheduler/avahi.h.avahi-4-poll 2011-10-11 10:56:50.102288037 +0100 -+++ cups-1.5.0/scheduler/avahi.h 2011-10-11 10:56:50.119287724 +0100 +diff -up cups-1.5.2/scheduler/avahi.h.avahi-4-poll cups-1.5.2/scheduler/avahi.h +--- cups-1.5.2/scheduler/avahi.h.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 ++++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:07:29.477542381 +0000 @@ -0,0 +1,69 @@ +/* + * "$Id$" @@ -516,9 +516,9 @@ diff -up cups-1.5.0/scheduler/avahi.h.avahi-4-poll cups-1.5.0/scheduler/avahi.h +/* + * End of "$Id$". + */ -diff -up cups-1.5.0/scheduler/Makefile.avahi-4-poll cups-1.5.0/scheduler/Makefile ---- cups-1.5.0/scheduler/Makefile.avahi-4-poll 2011-10-11 10:56:45.868365861 +0100 -+++ cups-1.5.0/scheduler/Makefile 2011-10-11 10:56:50.101288055 +0100 +diff -up cups-1.5.2/scheduler/Makefile.avahi-4-poll cups-1.5.2/scheduler/Makefile +--- cups-1.5.2/scheduler/Makefile.avahi-4-poll 2012-03-14 15:06:36.508476980 +0000 ++++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:07:29.476542380 +0000 @@ -17,6 +17,7 @@ include ../Makedefs CUPSDOBJS = \ diff --git a/cups-avahi-5-services.patch b/cups-avahi-5-services.patch index 9713bbc..820b3c3 100644 --- a/cups-avahi-5-services.patch +++ b/cups-avahi-5-services.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/cgi-bin/admin.c.avahi-5-services cups-1.5.0/cgi-bin/admin.c ---- cups-1.5.0/cgi-bin/admin.c.avahi-5-services 2011-05-20 04:49:49.000000000 +0100 -+++ cups-1.5.0/cgi-bin/admin.c 2011-10-19 11:53:32.123177998 +0100 +diff -up cups-1.5.2/cgi-bin/admin.c.avahi-5-services cups-1.5.2/cgi-bin/admin.c +--- cups-1.5.2/cgi-bin/admin.c.avahi-5-services 2011-08-17 22:01:53.000000000 +0100 ++++ cups-1.5.2/cgi-bin/admin.c 2012-03-14 15:08:25.701611799 +0000 @@ -1643,7 +1643,7 @@ do_config_server(http_t *http) /* I - H else local_protocols[0] = '\0'; @@ -31,10 +31,75 @@ diff -up cups-1.5.0/cgi-bin/admin.c.avahi-5-services cups-1.5.0/cgi-bin/admin.c #ifdef HAVE_LDAP cgiSetVariable("HAVE_LDAP", "1"); -diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/client.c ---- cups-1.5.0/scheduler/client.c.avahi-5-services 2011-06-10 22:16:18.000000000 +0100 -+++ cups-1.5.0/scheduler/client.c 2011-10-19 11:53:32.127177926 +0100 -@@ -4987,7 +4987,7 @@ valid_host(cupsd_client_t *con) /* I - +diff -up cups-1.5.2/scheduler/avahi.h.avahi-5-services cups-1.5.2/scheduler/avahi.h +--- cups-1.5.2/scheduler/avahi.h.avahi-5-services 2012-03-14 15:07:29.477542381 +0000 ++++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:08:25.701611799 +0000 +@@ -3,7 +3,7 @@ + * + * Avahi poll implementation for the CUPS scheduler. + * +- * Copyright (C) 2010, 2011 Red Hat, Inc. ++ * Copyright (C) 2010, 2011, 2012 Red Hat, Inc. + * Authors: + * Tim Waugh + * +@@ -32,37 +32,40 @@ + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include ++#ifndef _CUPS_AVAHI_H_ ++# define _CUPS_AVAHI_H_ + +-#ifdef HAVE_AVAHI +-# include +-# include +-#endif /* HAVE_AVAHI */ ++/* ++ * Include necessary headers... ++ */ + +-#ifdef HAVE_AUTHORIZATION_H +-# include +-#endif /* HAVE_AUTHORIZATION_H */ ++# include + ++# ifdef HAVE_AVAHI ++# include ++# include ++# endif /* HAVE_AVAHI */ + +-#ifdef HAVE_AVAHI ++# ifdef HAVE_AVAHI + typedef struct + { + AvahiPoll api; + cups_array_t *watched_fds; + cups_array_t *timeouts; + } AvahiCupsPoll; +-#endif /* HAVE_AVAHI */ ++# endif /* HAVE_AVAHI */ + + /* + * Prototypes... + */ + +-#ifdef HAVE_AVAHI ++# ifdef HAVE_AVAHI + extern AvahiCupsPoll * avahi_cups_poll_new(void); + extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); + extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); +-#endif /* HAVE_AVAHI */ ++# endif /* HAVE_AVAHI */ + ++#endif /* !_CUPS_AVAHI_H_ */ + + /* + * End of "$Id$". +diff -up cups-1.5.2/scheduler/client.c.avahi-5-services cups-1.5.2/scheduler/client.c +--- cups-1.5.2/scheduler/client.c.avahi-5-services 2012-01-13 23:00:22.000000000 +0000 ++++ cups-1.5.2/scheduler/client.c 2012-03-14 15:08:25.703611797 +0000 +@@ -4989,7 +4989,7 @@ valid_host(cupsd_client_t *con) /* I - !strncmp(host, "[::1]:", 6)); } @@ -43,7 +108,7 @@ diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/cli /* * Check if the hostname is something.local (Bonjour); if so, allow it. */ -@@ -4996,7 +4996,7 @@ valid_host(cupsd_client_t *con) /* I - +@@ -4998,7 +4998,7 @@ valid_host(cupsd_client_t *con) /* I - (!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) || !_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) return (1); @@ -52,10 +117,10 @@ diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/cli /* * Check if the hostname is an IP address... -diff -up cups-1.5.0/scheduler/conf.c.avahi-5-services cups-1.5.0/scheduler/conf.c ---- cups-1.5.0/scheduler/conf.c.avahi-5-services 2011-10-19 11:53:31.895182225 +0100 -+++ cups-1.5.0/scheduler/conf.c 2011-10-19 11:53:32.131177850 +0100 -@@ -651,7 +651,7 @@ cupsdReadConfiguration(void) +diff -up cups-1.5.2/scheduler/conf.c.avahi-5-services cups-1.5.2/scheduler/conf.c +--- cups-1.5.2/scheduler/conf.c.avahi-5-services 2012-03-14 15:04:17.636305526 +0000 ++++ cups-1.5.2/scheduler/conf.c 2012-03-14 15:08:25.706611803 +0000 +@@ -652,7 +652,7 @@ cupsdReadConfiguration(void) Browsing = CUPS_DEFAULT_BROWSING; DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED; @@ -64,9 +129,9 @@ diff -up cups-1.5.0/scheduler/conf.c.avahi-5-services cups-1.5.0/scheduler/conf. cupsdSetString(&DNSSDRegType, "_ipp._tcp,_cups"); #endif /* HAVE_DNSSD */ -diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dirsvc.c ---- cups-1.5.0/scheduler/dirsvc.c.avahi-5-services 2011-10-19 11:53:32.011180075 +0100 -+++ cups-1.5.0/scheduler/dirsvc.c 2011-10-19 11:53:58.916681461 +0100 +diff -up cups-1.5.2/scheduler/dirsvc.c.avahi-5-services cups-1.5.2/scheduler/dirsvc.c +--- cups-1.5.2/scheduler/dirsvc.c.avahi-5-services 2012-03-14 15:04:17.674305572 +0000 ++++ cups-1.5.2/scheduler/dirsvc.c 2012-03-14 15:08:25.709611806 +0000 @@ -27,6 +27,7 @@ * ldap_connect() - Start new LDAP connection * ldap_reconnect() - Reconnect to LDAP Server @@ -799,15 +864,31 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * De-register the individual printers -@@ -2906,6 +3292,7 @@ dnssdStop(void) - p = (cupsd_printer_t *)cupsArrayNext(Printers)) - dnssdDeregisterPrinter(p); - -+#ifdef HAVE_DNSSD - /* +@@ -2910,12 +3296,23 @@ dnssdStop(void) * Shutdown the rest of the service refs... */ -@@ -2926,14 +3313,17 @@ dnssdStop(void) + ++#ifdef HAVE_DNSSD + if (WebIFRef) + { + DNSServiceRefDeallocate(WebIFRef); + WebIFRef = NULL; + } ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ if (AvahiWebIFGroup) ++ { ++ avahi_entry_group_reset (AvahiWebIFGroup); ++ avahi_entry_group_free (AvahiWebIFGroup); ++ AvahiWebIFGroup = NULL; ++ } ++#endif /* HAVE_AVAHI */ + ++#ifdef HAVE_DNSSD + if (RemoteRef) + { + DNSServiceRefDeallocate(RemoteRef); +@@ -2926,14 +3323,17 @@ dnssdStop(void) DNSServiceRefDeallocate(DNSSDRef); DNSSDRef = NULL; @@ -825,7 +906,7 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * 'dnssdUpdate()' - Handle DNS-SD queries. */ -@@ -2955,6 +3345,153 @@ dnssdUpdate(void) +@@ -2955,6 +3355,153 @@ dnssdUpdate(void) #endif /* HAVE_DNSSD */ @@ -979,9 +1060,9 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * 'get_auth_info_required()' - Get the auth-info-required value to advertise. */ -diff -up cups-1.5.0/scheduler/dirsvc.h.avahi-5-services cups-1.5.0/scheduler/dirsvc.h ---- cups-1.5.0/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 -+++ cups-1.5.0/scheduler/dirsvc.h 2011-10-19 11:53:32.138177721 +0100 +diff -up cups-1.5.2/scheduler/dirsvc.h.avahi-5-services cups-1.5.2/scheduler/dirsvc.h +--- cups-1.5.2/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 ++++ cups-1.5.2/scheduler/dirsvc.h 2012-03-14 15:08:25.711611808 +0000 @@ -31,6 +31,10 @@ # endif /* HAVE_LDAP_SSL_H */ #endif /* HAVE_LDAP */ @@ -1054,10 +1135,10 @@ diff -up cups-1.5.0/scheduler/dirsvc.h.avahi-5-services cups-1.5.0/scheduler/dir #ifdef HAVE_LDAP extern void cupsdUpdateLDAPBrowse(void); #endif /* HAVE_LDAP */ -diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c ---- cups-1.5.0/scheduler/ipp.c.avahi-5-services 2011-10-19 11:53:31.978180686 +0100 -+++ cups-1.5.0/scheduler/ipp.c 2011-10-19 11:53:32.147177555 +0100 -@@ -6096,7 +6096,7 @@ copy_printer_attrs( +diff -up cups-1.5.2/scheduler/ipp.c.avahi-5-services cups-1.5.2/scheduler/ipp.c +--- cups-1.5.2/scheduler/ipp.c.avahi-5-services 2012-03-14 15:04:17.665305560 +0000 ++++ cups-1.5.2/scheduler/ipp.c 2012-03-14 15:08:25.715611813 +0000 +@@ -6099,7 +6099,7 @@ copy_printer_attrs( ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", ippTimeToDate(curtime)); @@ -1066,7 +1147,7 @@ diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c if (!ra || cupsArrayFind(ra, "printer-dns-sd-name")) { if (printer->reg_name) -@@ -6106,7 +6106,7 @@ copy_printer_attrs( +@@ -6109,7 +6109,7 @@ copy_printer_attrs( ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, "printer-dns-sd-name", 0); } @@ -1075,9 +1156,9 @@ diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c if (!ra || cupsArrayFind(ra, "printer-error-policy")) ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, -diff -up cups-1.5.0/scheduler/main.c.avahi-5-services cups-1.5.0/scheduler/main.c ---- cups-1.5.0/scheduler/main.c.avahi-5-services 2011-10-19 11:53:32.101178406 +0100 -+++ cups-1.5.0/scheduler/main.c 2011-10-19 11:53:32.151177479 +0100 +diff -up cups-1.5.2/scheduler/main.c.avahi-5-services cups-1.5.2/scheduler/main.c +--- cups-1.5.2/scheduler/main.c.avahi-5-services 2012-03-14 15:06:36.511476986 +0000 ++++ cups-1.5.2/scheduler/main.c 2012-03-14 15:08:25.718611817 +0000 @@ -120,6 +120,10 @@ main(int argc, /* I - Number of comm cupsd_listener_t *lis; /* Current listener */ time_t current_time, /* Current time */ @@ -1116,9 +1197,9 @@ diff -up cups-1.5.0/scheduler/main.c.avahi-5-services cups-1.5.0/scheduler/main. #endif /* HAVE_AVAHI */ #ifndef __APPLE__ -diff -up cups-1.5.0/scheduler/printers.c.avahi-5-services cups-1.5.0/scheduler/printers.c ---- cups-1.5.0/scheduler/printers.c.avahi-5-services 2011-10-19 11:53:31.916181835 +0100 -+++ cups-1.5.0/scheduler/printers.c 2011-10-19 11:53:32.156177388 +0100 +diff -up cups-1.5.2/scheduler/printers.c.avahi-5-services cups-1.5.2/scheduler/printers.c +--- cups-1.5.2/scheduler/printers.c.avahi-5-services 2012-03-14 15:04:17.646305537 +0000 ++++ cups-1.5.2/scheduler/printers.c 2012-03-14 15:08:25.720611819 +0000 @@ -883,9 +883,9 @@ cupsdDeletePrinter( cupsdClearString(&p->alert); cupsdClearString(&p->alert_description); @@ -1149,9 +1230,9 @@ diff -up cups-1.5.0/scheduler/printers.c.avahi-5-services cups-1.5.0/scheduler/p } -diff -up cups-1.5.0/scheduler/printers.h.avahi-5-services cups-1.5.0/scheduler/printers.h ---- cups-1.5.0/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 -+++ cups-1.5.0/scheduler/printers.h 2011-10-19 11:53:32.157177369 +0100 +diff -up cups-1.5.2/scheduler/printers.h.avahi-5-services cups-1.5.2/scheduler/printers.h +--- cups-1.5.2/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 ++++ cups-1.5.2/scheduler/printers.h 2012-03-14 15:08:25.721611820 +0000 @@ -16,6 +16,9 @@ #ifdef HAVE_DNSSD # include diff --git a/cups-driverd-timeout.patch b/cups-driverd-timeout.patch index fac583b..cb9e5cf 100644 --- a/cups-driverd-timeout.patch +++ b/cups-driverd-timeout.patch @@ -1,15 +1,3 @@ -diff -up cups-1.5.0/cups/http.c.driverd-timeout cups-1.5.0/cups/http.c ---- cups-1.5.0/cups/http.c.driverd-timeout 2011-10-10 17:03:54.181458460 +0100 -+++ cups-1.5.0/cups/http.c 2011-10-10 17:04:01.452321912 +0100 -@@ -1314,7 +1314,7 @@ httpGets(char *line, /* I - Line to - * No newline; see if there is more data to be read... - */ - -- while (!_httpWait(http, http->blocking ? 30000 : 10000, 1)) -+ while (!_httpWait(http, http->blocking ? 70000 : 10000, 1)) - { - if (http->timeout_cb && (*http->timeout_cb)(http, http->timeout_data)) - continue; diff -up cups-1.5.0/scheduler/ipp.c.driverd-timeout cups-1.5.0/scheduler/ipp.c --- cups-1.5.0/scheduler/ipp.c.driverd-timeout 2011-10-10 17:03:41.801690962 +0100 +++ cups-1.5.0/scheduler/ipp.c 2011-10-10 17:03:41.861689834 +0100 diff --git a/cups-polld-reconnect.patch b/cups-polld-reconnect.patch new file mode 100644 index 0000000..5e966d1 --- /dev/null +++ b/cups-polld-reconnect.patch @@ -0,0 +1,11 @@ +diff -up cups-1.5.2/scheduler/cups-polld.c.polld-reconnect cups-1.5.2/scheduler/cups-polld.c +--- cups-1.5.2/scheduler/cups-polld.c.polld-reconnect 2011-05-07 00:07:28.000000000 +0100 ++++ cups-1.5.2/scheduler/cups-polld.c 2012-02-23 10:50:57.272513141 +0000 +@@ -291,6 +291,7 @@ poll_server(http_t *http, /* I - H + fprintf(stderr, "ERROR: %s CUPS-Get-Printers failed: %s\n", prefix, + cupsLastErrorString()); + ippDelete(response); ++ restart_polling = 1; + return (-1); + } + diff --git a/cups-ps-command-filter.patch b/cups-ps-command-filter.patch deleted file mode 100644 index 88cd18b..0000000 --- a/cups-ps-command-filter.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up cups-1.5.0/cups/ppd-cache.c.ps-command-filter cups-1.5.0/cups/ppd-cache.c ---- cups-1.5.0/cups/ppd-cache.c.ps-command-filter 2011-11-04 13:10:34.405729542 +0000 -+++ cups-1.5.0/cups/ppd-cache.c 2011-11-04 13:11:58.502184096 +0000 -@@ -1272,7 +1272,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) - - if (filter) - cupsArrayAdd(pc->filters, -- "application/vnd.cups-command application/postscript 0 -"); -+ "application/vnd.cups-command application/postscript 100 " -+ "commandtops"); - } - - if ((ppd_attr = ppdFindAttr(ppd, "cupsPreFilter", NULL)) != NULL) diff --git a/cups-revision10277.patch b/cups-revision10277.patch new file mode 100644 index 0000000..4c6e418 --- /dev/null +++ b/cups-revision10277.patch @@ -0,0 +1,43 @@ +From 19e2adf8307c8a908da80ceef335517139e5bf64 Mon Sep 17 00:00:00 2001 +From: mike +Date: Mon, 13 Feb 2012 23:43:07 +0000 +Subject: [PATCH] Detect authentication errors for all requests. + +git-svn-id: http://svn.easysw.com/public/cups/trunk@10277 7a7537e8-13f0-0310-91df-b6672ffda945 +--- + backend/ipp.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/backend/ipp.c b/backend/ipp.c +index bcaab37..d4719e4 100644 +--- a/backend/ipp.c ++++ b/backend/ipp.c +@@ -898,7 +898,9 @@ main(int argc, /* I - Number of command-line args */ + + return (CUPS_BACKEND_STOP); + } +- else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) ++ else if (ipp_status == IPP_NOT_AUTHORIZED || ++ ipp_status == IPP_FORBIDDEN || ++ ipp_status == IPP_AUTHENTICATION_CANCELED) + { + const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); + /* WWW-Authenticate field value */ +@@ -1472,11 +1474,12 @@ main(int argc, /* I - Number of command-line args */ + _cupsLangPrintFilter(stderr, "ERROR", + _("Print file was not accepted.")); + +- if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) ++ if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN || ++ ipp_status == IPP_AUTHENTICATION_CANCELED) + { + const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); + /* WWW-Authenticate field value */ +- ++ + if (!strncmp(www_auth, "Negotiate", 9)) + auth_info_required = "negotiate"; + else if (www_auth[0]) +-- +1.7.7.6 + diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch index fdc7cc5..535f6c0 100644 --- a/cups-snmp-quirks.patch +++ b/cups-snmp-quirks.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5b1/backend/snmp-supplies.c.snmp-quirks cups-1.5b1/backend/snmp-supplies.c ---- cups-1.5b1/backend/snmp-supplies.c.snmp-quirks 2011-05-20 05:49:49.000000000 +0200 -+++ cups-1.5b1/backend/snmp-supplies.c 2011-05-24 17:15:55.000000000 +0200 +diff -up cups-1.5.2/backend/snmp-supplies.c.snmp-quirks cups-1.5.2/backend/snmp-supplies.c +--- cups-1.5.2/backend/snmp-supplies.c.snmp-quirks 2011-10-07 23:41:07.000000000 +0200 ++++ cups-1.5.2/backend/snmp-supplies.c 2012-02-06 10:48:47.543906526 +0100 @@ -47,6 +47,13 @@ @@ -59,7 +59,7 @@ diff -up cups-1.5b1/backend/snmp-supplies.c.snmp-quirks cups-1.5b1/backend/snmp- + if (quirks & QUIRK_CAPACITY) + supplies[i].max_capacity = 100; + - if (supplies[i].max_capacity > 0) + if (supplies[i].max_capacity > 0 && supplies[i].level >= 0) percent = 100 * supplies[i].level / supplies[i].max_capacity; else @@ -401,6 +427,7 @@ backend_init_supplies( diff --git a/cups-str3921.patch b/cups-str3921.patch deleted file mode 100644 index d370e38..0000000 --- a/cups-str3921.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up cups-1.5.0/scheduler/cups-driverd.cxx.str3921 cups-1.5.0/scheduler/cups-driverd.cxx ---- cups-1.5.0/scheduler/cups-driverd.cxx.str3921 2011-06-08 22:19:11.000000000 +0100 -+++ cups-1.5.0/scheduler/cups-driverd.cxx 2011-10-11 12:07:34.979538544 +0100 -@@ -1411,9 +1411,7 @@ load_drv(const char *filename, /* I - - * Add a dummy entry for the file... - */ - -- httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0, -- "/%s", name); -- add_ppd(name, uri, "", "", "", "", "", "", mtime, size, 0, -+ add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0, - PPD_TYPE_DRV, "drv"); - ChangedPPD = 1; - diff --git a/cups-str3947.patch b/cups-str3947.patch deleted file mode 100644 index 9bff194..0000000 --- a/cups-str3947.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up cups-1.5.0/notifier/dbus.c.str3947 cups-1.5.0/notifier/dbus.c ---- cups-1.5.0/notifier/dbus.c.str3947 2011-03-04 16:55:59.000000000 +0000 -+++ cups-1.5.0/notifier/dbus.c 2011-09-28 10:42:56.298760622 +0100 -@@ -4,7 +4,7 @@ - * D-Bus notifier for CUPS. - * - * Copyright 2008-2010 by Apple Inc. -- * Copyright (C) 2007 Red Hat, Inc. -+ * Copyright (C) 2011 Red Hat, Inc. - * Copyright (C) 2007 Tim Waugh - * Copyright 1997-2005 by Easy Software Products. - * -@@ -423,10 +423,11 @@ main(int argc, /* I - Number of comm - p = printer_reasons; - for (i = 0; i < attr->num_values; i++) - { -- strcpy(p, attr->values[i].string.text); -- p += strlen(p); - if (i) - *p++ = ','; -+ -+ strcpy(p, attr->values[i].string.text); -+ p += strlen(p); - } - dbus_message_iter_append_string(&iter, &printer_reasons); - } diff --git a/cups-str3985.patch b/cups-str3985.patch new file mode 100644 index 0000000..4c7da14 --- /dev/null +++ b/cups-str3985.patch @@ -0,0 +1,74 @@ +diff -up cups-1.5.2/backend/ipp.c.str3985 cups-1.5.2/backend/ipp.c +--- cups-1.5.2/backend/ipp.c.str3985 2012-04-05 10:28:12.568898781 +0200 ++++ cups-1.5.2/backend/ipp.c 2012-04-05 10:32:07.165612536 +0200 +@@ -957,9 +957,13 @@ main(int argc, /* I - Number of comm + } + else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) + { +- if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), +- "Negotiate", 9)) ++ const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); ++ /* WWW-Authenticate field value */ ++ ++ if (!strncmp(www_auth, "Negotiate", 9)) + auth_info_required = "negotiate"; ++ else if (www_auth[0]) ++ auth_info_required = "username,password"; + + fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); + return (CUPS_BACKEND_AUTH_REQUIRED); +@@ -1315,23 +1319,13 @@ main(int argc, /* I - Number of comm + else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN || + ipp_status == IPP_AUTHENTICATION_CANCELED) + { +- /* +- * Update auth-info-required as needed... +- */ +- +- fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n", +- httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)); +- +- /* +- * Normal authentication goes through the password callback, which sets +- * auth_info_required to "username,password". Kerberos goes directly +- * through GSSAPI, so look for Negotiate in the WWW-Authenticate header +- * here and set auth_info_required as needed... +- */ ++ const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); ++ /* WWW-Authenticate field value */ + +- if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), +- "Negotiate", 9)) ++ if (!strncmp(www_auth, "Negotiate", 9)) + auth_info_required = "negotiate"; ++ else if (www_auth[0]) ++ auth_info_required = "username,password"; + + goto cleanup; + } +@@ -1486,19 +1480,13 @@ main(int argc, /* I - Number of comm + + if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) + { +- fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n", +- httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)); +- +- /* +- * Normal authentication goes through the password callback, which sets +- * auth_info_required to "username,password". Kerberos goes directly +- * through GSSAPI, so look for Negotiate in the WWW-Authenticate header +- * here and set auth_info_required as needed... +- */ +- +- if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), +- "Negotiate", 9)) ++ const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); ++ /* WWW-Authenticate field value */ ++ ++ if (!strncmp(www_auth, "Negotiate", 9)) + auth_info_required = "negotiate"; ++ else if (www_auth[0]) ++ auth_info_required = "username,password"; + } + else + sleep(10); diff --git a/cups-str4014.patch b/cups-str4014.patch new file mode 100644 index 0000000..6e50c25 --- /dev/null +++ b/cups-str4014.patch @@ -0,0 +1,16 @@ +diff -up cups-1.5.2/scheduler/subscriptions.c.str4014 cups-1.5.2/scheduler/subscriptions.c +--- cups-1.5.2/scheduler/subscriptions.c.str4014 2012-02-15 13:17:24.065004731 +0000 ++++ cups-1.5.2/scheduler/subscriptions.c 2012-02-15 13:17:34.021009331 +0000 +@@ -146,7 +146,11 @@ cupsdAddEvent( + temp->time = time(NULL); + temp->attrs = ippNew(); + temp->job = job; +- temp->dest = dest; ++ ++ if (dest) ++ temp->dest = dest; ++ else if (job) ++ temp->dest = dest = cupsdFindPrinter(job->dest); + + /* + * Add common event notification attributes... diff --git a/cups-systemd-socket.patch b/cups-systemd-socket.patch index 8e5147d..09d17d4 100644 --- a/cups-systemd-socket.patch +++ b/cups-systemd-socket.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/config.h.in.systemd-socket cups-1.5.0/config.h.in ---- cups-1.5.0/config.h.in.systemd-socket 2011-10-18 15:32:40.741672460 +0100 -+++ cups-1.5.0/config.h.in 2011-10-18 15:32:40.843670530 +0100 +diff -up cups-1.5.2/config.h.in.systemd-socket cups-1.5.2/config.h.in +--- cups-1.5.2/config.h.in.systemd-socket 2012-03-16 14:50:57.089449755 +0000 ++++ cups-1.5.2/config.h.in 2012-03-16 14:50:57.146449787 +0000 @@ -503,6 +503,13 @@ @@ -15,9 +15,9 @@ diff -up cups-1.5.0/config.h.in.systemd-socket cups-1.5.0/config.h.in * Various scripting languages... */ -diff -up cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.0/config-scripts/cups-systemd.m4 ---- cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket 2011-10-18 15:32:40.844670511 +0100 -+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-10-18 15:33:16.861989058 +0100 +diff -up cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.2/config-scripts/cups-systemd.m4 +--- cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket 2012-03-16 14:50:57.146449787 +0000 ++++ cups-1.5.2/config-scripts/cups-systemd.m4 2012-03-16 14:50:57.146449787 +0000 @@ -0,0 +1,36 @@ +dnl +dnl "$Id$" @@ -55,9 +55,9 @@ diff -up cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.0/con +dnl +dnl "$Id$" +dnl -diff -up cups-1.5.0/configure.in.systemd-socket cups-1.5.0/configure.in ---- cups-1.5.0/configure.in.systemd-socket 2010-11-20 01:03:46.000000000 +0000 -+++ cups-1.5.0/configure.in 2011-10-18 15:32:40.844670511 +0100 +diff -up cups-1.5.2/configure.in.systemd-socket cups-1.5.2/configure.in +--- cups-1.5.2/configure.in.systemd-socket 2011-08-31 02:36:33.000000000 +0100 ++++ cups-1.5.2/configure.in 2012-03-16 14:50:57.146449787 +0000 @@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4) sinclude(config-scripts/cups-largefile.m4) sinclude(config-scripts/cups-dnssd.m4) @@ -76,10 +76,10 @@ diff -up cups-1.5.0/configure.in.systemd-socket cups-1.5.0/configure.in desktop/cups.desktop doc/help/ref-cupsd-conf.html doc/help/standard.html -diff -up cups-1.5.0/cups/usersys.c.systemd-socket cups-1.5.0/cups/usersys.c ---- cups-1.5.0/cups/usersys.c.systemd-socket 2011-10-18 15:32:40.645674277 +0100 -+++ cups-1.5.0/cups/usersys.c 2011-10-18 15:32:40.845670492 +0100 -@@ -770,7 +770,7 @@ cups_read_client_conf( +diff -up cups-1.5.2/cups/usersys.c.systemd-socket cups-1.5.2/cups/usersys.c +--- cups-1.5.2/cups/usersys.c.systemd-socket 2012-03-16 14:50:57.054449734 +0000 ++++ cups-1.5.2/cups/usersys.c 2012-03-16 14:50:57.148449788 +0000 +@@ -778,7 +778,7 @@ cups_read_client_conf( struct stat sockinfo; /* Domain socket information */ if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) && @@ -88,9 +88,9 @@ diff -up cups-1.5.0/cups/usersys.c.systemd-socket cups-1.5.0/cups/usersys.c cups_server = CUPS_DEFAULT_DOMAINSOCKET; else #endif /* CUPS_DEFAULT_DOMAINSOCKET */ -diff -up cups-1.5.0/data/cups.path.in.systemd-socket cups-1.5.0/data/cups.path.in ---- cups-1.5.0/data/cups.path.in.systemd-socket 2011-10-18 15:32:40.846670473 +0100 -+++ cups-1.5.0/data/cups.path.in 2011-10-18 15:32:40.846670473 +0100 +diff -up cups-1.5.2/data/cups.path.in.systemd-socket cups-1.5.2/data/cups.path.in +--- cups-1.5.2/data/cups.path.in.systemd-socket 2012-03-16 14:50:57.148449788 +0000 ++++ cups-1.5.2/data/cups.path.in 2012-03-16 14:50:57.148449788 +0000 @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printer Service Spool @@ -100,36 +100,38 @@ diff -up cups-1.5.0/data/cups.path.in.systemd-socket cups-1.5.0/data/cups.path.i + +[Install] +WantedBy=multi-user.target -diff -up cups-1.5.0/data/cups.service.in.systemd-socket cups-1.5.0/data/cups.service.in ---- cups-1.5.0/data/cups.service.in.systemd-socket 2011-10-18 15:32:40.846670473 +0100 -+++ cups-1.5.0/data/cups.service.in 2011-10-18 15:32:40.846670473 +0100 -@@ -0,0 +1,9 @@ +diff -up cups-1.5.2/data/cups.service.in.systemd-socket cups-1.5.2/data/cups.service.in +--- cups-1.5.2/data/cups.service.in.systemd-socket 2012-03-16 14:50:57.149449788 +0000 ++++ cups-1.5.2/data/cups.service.in 2012-03-16 14:50:57.149449788 +0000 +@@ -0,0 +1,10 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=@sbindir@/cupsd -f ++PrivateTmp=true + +[Install] +Also=cups.socket cups.path +WantedBy=printer.target -diff -up cups-1.5.0/data/cups.socket.in.systemd-socket cups-1.5.0/data/cups.socket.in ---- cups-1.5.0/data/cups.socket.in.systemd-socket 2011-10-18 15:32:40.847670454 +0100 -+++ cups-1.5.0/data/cups.socket.in 2011-10-18 15:32:40.847670454 +0100 -@@ -0,0 +1,10 @@ +diff -up cups-1.5.2/data/cups.socket.in.systemd-socket cups-1.5.2/data/cups.socket.in +--- cups-1.5.2/data/cups.socket.in.systemd-socket 2012-03-16 14:50:57.150449788 +0000 ++++ cups-1.5.2/data/cups.socket.in 2012-03-16 14:50:57.150449788 +0000 +@@ -0,0 +1,11 @@ +[Unit] +Description=CUPS Printing Service Sockets + +[Socket] +ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@ +ListenStream=631 ++ListenDatagram=0.0.0.0:631 +BindIPv6Only=ipv6-only + +[Install] +WantedBy=sockets.target -diff -up cups-1.5.0/data/Makefile.systemd-socket cups-1.5.0/data/Makefile ---- cups-1.5.0/data/Makefile.systemd-socket 2011-05-12 06:21:56.000000000 +0100 -+++ cups-1.5.0/data/Makefile 2011-10-18 15:32:40.847670454 +0100 +diff -up cups-1.5.2/data/Makefile.systemd-socket cups-1.5.2/data/Makefile +--- cups-1.5.2/data/Makefile.systemd-socket 2011-05-12 06:21:56.000000000 +0100 ++++ cups-1.5.2/data/Makefile 2012-03-16 14:50:57.151449789 +0000 @@ -112,6 +112,12 @@ install-data: $(INSTALL_DATA) $$file $(DATADIR)/ppdc; \ done @@ -153,9 +155,9 @@ diff -up cups-1.5.0/data/Makefile.systemd-socket cups-1.5.0/data/Makefile # -diff -up cups-1.5.0/Makedefs.in.systemd-socket cups-1.5.0/Makedefs.in ---- cups-1.5.0/Makedefs.in.systemd-socket 2011-10-18 15:32:40.719672876 +0100 -+++ cups-1.5.0/Makedefs.in 2011-10-18 15:32:40.848670435 +0100 +diff -up cups-1.5.2/Makedefs.in.systemd-socket cups-1.5.2/Makedefs.in +--- cups-1.5.2/Makedefs.in.systemd-socket 2012-03-16 14:50:57.081449751 +0000 ++++ cups-1.5.2/Makedefs.in 2012-03-16 14:50:57.152449790 +0000 @@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ CXXLIBS = @CXXLIBS@ DBUS_NOTIFIER = @DBUS_NOTIFIER@ @@ -180,9 +182,9 @@ diff -up cups-1.5.0/Makedefs.in.systemd-socket cups-1.5.0/Makedefs.in # -diff -up cups-1.5.0/scheduler/client.h.systemd-socket cups-1.5.0/scheduler/client.h ---- cups-1.5.0/scheduler/client.h.systemd-socket 2011-03-25 21:25:38.000000000 +0000 -+++ cups-1.5.0/scheduler/client.h 2011-10-18 15:32:40.848670435 +0100 +diff -up cups-1.5.2/scheduler/client.h.systemd-socket cups-1.5.2/scheduler/client.h +--- cups-1.5.2/scheduler/client.h.systemd-socket 2011-03-25 21:25:38.000000000 +0000 ++++ cups-1.5.2/scheduler/client.h 2012-03-16 14:50:57.153449791 +0000 @@ -75,6 +75,9 @@ typedef struct int fd; /* File descriptor for this server */ http_addr_t address; /* Bind address of socket */ @@ -193,9 +195,99 @@ diff -up cups-1.5.0/scheduler/client.h.systemd-socket cups-1.5.0/scheduler/clien } cupsd_listener_t; -diff -up cups-1.5.0/scheduler/listen.c.systemd-socket cups-1.5.0/scheduler/listen.c ---- cups-1.5.0/scheduler/listen.c.systemd-socket 2011-04-16 00:38:13.000000000 +0100 -+++ cups-1.5.0/scheduler/listen.c 2011-10-18 15:32:40.849670416 +0100 +diff -up cups-1.5.2/scheduler/dirsvc.c.systemd-socket cups-1.5.2/scheduler/dirsvc.c +--- cups-1.5.2/scheduler/dirsvc.c.systemd-socket 2012-03-16 14:50:57.112449768 +0000 ++++ cups-1.5.2/scheduler/dirsvc.c 2012-03-16 14:50:57.155449792 +0000 +@@ -1512,7 +1512,7 @@ cupsdStartBrowsing(void) + } + } + +- if (BrowseSocket >= 0) ++ if (BrowseSocket >= 0 && !BrowseSocketIsSystemd) + { + /* + * Bind the socket to browse port... +@@ -1556,13 +1556,17 @@ cupsdStartBrowsing(void) + cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to set broadcast mode - %s.", + strerror(errno)); + ++ if (!BrowseSocketIsSystemd) ++ { + #ifdef WIN32 +- closesocket(BrowseSocket); ++ closesocket(BrowseSocket); + #else +- close(BrowseSocket); ++ close(BrowseSocket); + #endif /* WIN32 */ + +- BrowseSocket = -1; ++ BrowseSocket = -1; ++ } ++ + BrowseLocalProtocols &= ~BROWSE_CUPS; + BrowseRemoteProtocols &= ~BROWSE_CUPS; + +@@ -1885,15 +1889,22 @@ cupsdStopBrowsing(void) + if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS) && + BrowseSocket >= 0) + { +- /* +- * Close the socket and remove it from the input selection set. +- */ ++ if (!BrowseSocketIsSystemd) ++ { ++ /* ++ * Close the socket. ++ */ + + #ifdef WIN32 +- closesocket(BrowseSocket); ++ closesocket(BrowseSocket); + #else +- close(BrowseSocket); ++ close(BrowseSocket); + #endif /* WIN32 */ ++ } ++ ++ /* ++ * Remove it from the input selection set. ++ */ + + cupsdRemoveSelect(BrowseSocket); + BrowseSocket = -1; +@@ -5693,11 +5704,14 @@ update_cups_browse(void) + strerror(errno)); + cupsdLogMessage(CUPSD_LOG_ERROR, "CUPS browsing turned off."); + ++ if (!BrowseSocketIsSystemd) ++ { + #ifdef WIN32 +- closesocket(BrowseSocket); ++ closesocket(BrowseSocket); + #else +- close(BrowseSocket); ++ close(BrowseSocket); + #endif /* WIN32 */ ++ } + + cupsdRemoveSelect(BrowseSocket); + BrowseSocket = -1; +diff -up cups-1.5.2/scheduler/dirsvc.h.systemd-socket cups-1.5.2/scheduler/dirsvc.h +--- cups-1.5.2/scheduler/dirsvc.h.systemd-socket 2012-03-16 14:50:57.113449769 +0000 ++++ cups-1.5.2/scheduler/dirsvc.h 2012-03-16 14:50:57.157449792 +0000 +@@ -100,6 +100,8 @@ VAR int Browsing VALUE(TRUE), + /* Short names for remote printers? */ + BrowseSocket VALUE(-1), + /* Socket for browsing */ ++ BrowseSocketIsSystemd VALUE(0), ++ /* BrowseSocket is systemd-provided? */ + BrowsePort VALUE(IPP_PORT), + /* Port number for broadcasts */ + BrowseInterval VALUE(DEFAULT_INTERVAL), +diff -up cups-1.5.2/scheduler/listen.c.systemd-socket cups-1.5.2/scheduler/listen.c +--- cups-1.5.2/scheduler/listen.c.systemd-socket 2011-04-16 00:38:13.000000000 +0100 ++++ cups-1.5.2/scheduler/listen.c 2012-03-16 14:50:57.158449792 +0000 @@ -401,7 +401,11 @@ cupsdStopListening(void) lis; lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) @@ -209,9 +301,9 @@ diff -up cups-1.5.0/scheduler/listen.c.systemd-socket cups-1.5.0/scheduler/liste { #ifdef WIN32 closesocket(lis->fd); -diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c ---- cups-1.5.0/scheduler/main.c.systemd-socket 2011-10-18 15:32:40.802671306 +0100 -+++ cups-1.5.0/scheduler/main.c 2011-10-18 15:32:40.851670379 +0100 +diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c +--- cups-1.5.2/scheduler/main.c.systemd-socket 2012-03-16 14:50:57.121449773 +0000 ++++ cups-1.5.2/scheduler/main.c 2012-03-16 14:51:55.409483636 +0000 @@ -26,6 +26,8 @@ * launchd_checkin() - Check-in with launchd and collect the listening * fds. @@ -272,7 +364,7 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c /* * Startup the server... */ -@@ -1584,6 +1609,100 @@ launchd_checkout(void) +@@ -1584,6 +1609,139 @@ launchd_checkout(void) } #endif /* HAVE_LAUNCHD */ @@ -304,14 +396,53 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c + char s[256]; + + r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1); -+ if (r < 0) { ++ if (r < 0) ++ { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to verify socket type - %s", + strerror(-r)); + continue; + } + -+ if (!r) { ++ if (!r) ++ { ++ if (Browsing && ++ ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS)) ++ { ++ r = sd_is_socket(fd, AF_UNSPEC, SOCK_DGRAM, 0); ++ if (r < 0) ++ { ++ cupsdLogMessage(CUPSD_LOG_ERROR, ++ "systemd_checkin: Unable to verify socket type - %s", ++ strerror(-r)); ++ continue; ++ } ++ ++ if (r) ++ { ++ /* ++ * This is the browse socket. ++ */ ++ ++ char addrstr[256]; ++ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen)) ++ { ++ cupsdLogMessage(CUPSD_LOG_ERROR, ++ "systemd_checkin: Unable to get local address - %s", ++ strerror(errno)); ++ continue; ++ } ++ ++ httpAddrString (&addr, addrstr, sizeof (addrstr)); ++ BrowseSocket = fd; ++ BrowseSocketIsSystemd = 1; ++ cupsdLogMessage(CUPSD_LOG_DEBUG, ++ "systemd_checkin: Matched browse (port %d) with fd %d:%s...", ++ BrowsePort, fd, addrstr); ++ continue; ++ } ++ ++ } + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Socket not of the right type"); + continue; @@ -325,7 +456,7 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c + continue; + } + -+ /* ++ /* + * Try to match the systemd socket address to one of the listeners... + */ + @@ -333,7 +464,7 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c + lis; + lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) + if (httpAddrEqual(&lis->address, &addr)) -+ break; ++ break; + + if (lis) + { @@ -373,9 +504,9 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c /* * 'parent_handler()' - Catch USR1/CHLD signals... -diff -up cups-1.5.0/scheduler/Makefile.systemd-socket cups-1.5.0/scheduler/Makefile ---- cups-1.5.0/scheduler/Makefile.systemd-socket 2011-10-18 15:32:40.817671022 +0100 -+++ cups-1.5.0/scheduler/Makefile 2011-10-18 15:32:40.852670360 +0100 +diff -up cups-1.5.2/scheduler/Makefile.systemd-socket cups-1.5.2/scheduler/Makefile +--- cups-1.5.2/scheduler/Makefile.systemd-socket 2012-03-16 14:50:57.130449778 +0000 ++++ cups-1.5.2/scheduler/Makefile 2012-03-16 14:50:57.160449794 +0000 @@ -382,7 +382,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \ $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ diff --git a/cups-translation.patch b/cups-translation.patch new file mode 100644 index 0000000..69ccc62 --- /dev/null +++ b/cups-translation.patch @@ -0,0 +1,12 @@ +diff -up cups-1.5.2/cups/language.c.translation cups-1.5.2/cups/language.c +--- cups-1.5.2/cups/language.c.translation 2011-11-01 07:06:15.000000000 +0100 ++++ cups-1.5.2/cups/language.c 2012-02-28 10:54:58.448744034 +0100 +@@ -1134,7 +1134,7 @@ _cupsMessageLookup(cups_array_t *a, /* I + } + #endif /* __APPLE__ && CUPS_BUNDLEDIR */ + +- if (match && match->str) ++ if (match && match->str && (strlen(match->str) > 0)) + return (match->str); + else + return (m); diff --git a/cups.spec b/cups.spec index 71a5f70..3293b4b 100644 --- a/cups.spec +++ b/cups.spec @@ -13,12 +13,12 @@ Summary: Common Unix Printing System - Server package Name: cups -Version: 1.5.0 -Release: 2 +Version: 1.5.2 +Release: 1 License: GPLv2 and LGPLv2 Group: System/Printing -Url: http://www.cups.org -Source0: ftp://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2 +Url: http://www.cups.org +Source0: ftp://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2 # Small C program to get list of all installed PPD files Source1: poll_ppd_base.c @@ -83,7 +83,7 @@ Patch1020: cups-filter-debug.patch Patch1021: cups-uri-compat.patch Patch1022: cups-cups-get-classes.patch Patch1023: cups-str3382.patch -Patch1024: cups-str3947.patch +#NOT_IN_FEDPatch1024: cups-str3947.patch #same as mdv patch cups-1.4-permissions.patch #Patch1025: cups-0755.patch Patch1026: cups-snmp-quirks.patch @@ -99,9 +99,13 @@ Patch1034: cups-avahi-5-services.patch Patch1035: cups-icc.patch Patch1036: cups-systemd-socket.patch -Patch1037: cups-CVE-2011-2896.patch -Patch1038: cups-str3921.patch -Patch1039: cups-ps-command-filter.patch +Patch1037: cups-str4014.patch +Patch1038: cups-polld-reconnect.patch +Patch1039: cups-translation.patch +Patch1040: cups-str3985.patch +Patch1041: cups-revision10277.patch +# selinux +#Patch1100: cups-lspp.patch BuildRequires: htmldoc BuildRequires: php-cli @@ -109,7 +113,7 @@ BuildRequires: xdg-utils Buildrequires: xinetd BuildRequires: acl-devel BuildRequires: jpeg-devel -BuildRequires: krb-devel +BuildRequires: krb5-devel BuildRequires: libldap-devel BuildRequires: openslp-devel BuildRequires: pam-devel @@ -117,10 +121,11 @@ BuildRequires: php-devel >= 5.1.0 BuildRequires: tiff-devel BuildRequires: pkgconfig(avahi-compat-libdns_sd) BuildRequires: pkgconfig(dbus-1) >= 0.50 -BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(gnutls) >= 3.0 BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libssl) +BuildRequires: pkgconfig(libusb) < 1.0 BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(zlib) %if !%{bootstrap} @@ -130,7 +135,6 @@ BuildRequires: systemd-units %endif %endif -Requires: %{libname} >= %{version}-%{release} Requires: %{name}-common >= %{version}-%{release} Requires: net-tools %if !%{bootstrap} @@ -356,7 +360,6 @@ EOF %endif %install -rm -rf %{buildroot} # Debug mode %if %{debug} export DONT_STRIP=1 @@ -672,7 +675,7 @@ fi %{_libdir}/cups %endif %if %{_with_systemd} -/lib/systemd/system/cups.service +/lib/systemd/system/cups.* %endif %files common @@ -723,6 +726,21 @@ fi %changelog +* Sat May 12 2012 Matthew Dawkins 1.5.2-1 ++ Revision: 798495 +- new version 1.5.2 +- sync'd patchset with fedora + +* Mon Mar 19 2012 Bernhard Rosenkraenzer 1.5.0-4 ++ Revision: 785746 +- Build for gnutls 3.x +- Fix missing files when building with current systemd +- Fix BuildRequires: line, nothing provides krb-devel these days + +* Wed Feb 01 2012 Bernhard Rosenkraenzer 1.5.0-3 ++ Revision: 770462 +- Adjust build requirements. cups needs libusb 0.x, not 1.x for now + * Thu Dec 22 2011 Oden Eriksson 1.5.0-2 + Revision: 744391 - rebuilt against libtiff.so.5