diff --git a/cups-0755.patch b/cups-0755.patch index 7835592..8e66476 100644 --- a/cups-0755.patch +++ b/cups-0755.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.5/Makedefs.in.0755 cups-1.4.5/Makedefs.in ---- cups-1.4.5/Makedefs.in.0755 2010-12-06 17:19:03.335315249 +0000 -+++ cups-1.4.5/Makedefs.in 2010-12-06 17:19:03.416307263 +0000 +diff -up cups-1.5b1/Makedefs.in.0755 cups-1.5b1/Makedefs.in +--- cups-1.5b1/Makedefs.in.0755 2011-05-24 16:43:27.000000000 +0200 ++++ cups-1.5b1/Makedefs.in 2011-05-24 16:43:27.000000000 +0200 @@ -41,13 +41,13 @@ SHELL = /bin/sh # Installation programs... # @@ -18,10 +18,10 @@ diff -up cups-1.4.5/Makedefs.in.0755 cups-1.4.5/Makedefs.in # # Default user, group, and system groups for the scheduler... -diff -up cups-1.4.5/scheduler/Makefile.0755 cups-1.4.5/scheduler/Makefile ---- cups-1.4.5/scheduler/Makefile.0755 2010-12-06 17:28:58.562552167 +0000 -+++ cups-1.4.5/scheduler/Makefile 2010-12-06 17:29:07.087756415 +0000 -@@ -174,7 +174,7 @@ install-data: +diff -up cups-1.5b1/scheduler/Makefile.0755 cups-1.5b1/scheduler/Makefile +--- cups-1.5b1/scheduler/Makefile.0755 2011-05-12 00:17:34.000000000 +0200 ++++ cups-1.5b1/scheduler/Makefile 2011-05-24 16:43:27.000000000 +0200 +@@ -213,7 +213,7 @@ install-data: install-exec: echo Installing programs in $(SBINDIR)... $(INSTALL_DIR) -m 755 $(SBINDIR) diff --git a/cups-autotype-crash.patch b/cups-autotype-crash.patch deleted file mode 100644 index ed6cb15..0000000 --- a/cups-autotype-crash.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up cups-1.4.4/scheduler/ipp.c.autotype-crash cups-1.4.4/scheduler/ipp.c ---- cups-1.4.4/scheduler/ipp.c.autotype-crash 2010-10-15 15:25:15.093421917 +0100 -+++ cups-1.4.4/scheduler/ipp.c 2010-10-15 15:25:49.645296947 +0100 -@@ -10481,8 +10481,9 @@ send_document(cupsd_client_t *con, /* I - if (!filetype) - filetype = mimeType(MimeDatabase, super, type); - -- cupsdLogJob(job, CUPSD_LOG_DEBUG, "Request file type is %s/%s.", -- filetype->super, filetype->type); -+ if (filetype) -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Request file type is %s/%s.", -+ filetype->super, filetype->type); - } - else - filetype = mimeType(MimeDatabase, super, type); diff --git a/cups-banners.patch b/cups-banners.patch index 6907c91..aa19282 100644 --- a/cups-banners.patch +++ b/cups-banners.patch @@ -1,6 +1,7 @@ ---- cups-1.2rc2/scheduler/banners.c.banners 2006-04-19 16:12:07.000000000 +0100 -+++ cups-1.2rc2/scheduler/banners.c 2006-04-19 16:12:42.000000000 +0100 -@@ -119,6 +119,8 @@ +diff -up cups-1.5b1/scheduler/banners.c.banners cups-1.5b1/scheduler/banners.c +--- cups-1.5b1/scheduler/banners.c.banners 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/banners.c 2011-05-23 17:35:30.000000000 +0200 +@@ -110,6 +110,8 @@ cupsdLoadBanners(const char *d) /* I - if ((ext = strrchr(dent->filename, '.')) != NULL) if (!strcmp(ext, ".bck") || !strcmp(ext, ".bak") || diff --git a/cups-build.patch b/cups-build.patch index 727deb2..c229a76 100644 --- a/cups-build.patch +++ b/cups-build.patch @@ -1,19 +1,19 @@ -diff -up cups-1.4rc1/Makedefs.in.build cups-1.4rc1/Makedefs.in ---- cups-1.4rc1/Makedefs.in.build 2009-05-27 00:27:06.000000000 +0100 -+++ cups-1.4rc1/Makedefs.in 2009-06-17 11:18:27.185443255 +0100 -@@ -124,7 +124,7 @@ ARFLAGS = @ARFLAGS@ - BACKLIBS = @BACKLIBS@ +diff -up cups-1.5b1/Makedefs.in.build cups-1.5b1/Makedefs.in +--- cups-1.5b1/Makedefs.in.build 2011-05-04 06:28:00.000000000 +0200 ++++ cups-1.5b1/Makedefs.in 2011-05-24 15:54:03.000000000 +0200 +@@ -138,7 +138,7 @@ BACKLIBS = @BACKLIBS@ BANNERTOPS = @BANNERTOPS@ + BUILDDIRS = @BUILDDIRS@ CFLAGS = @CPPFLAGS@ @CFLAGS@ -COMMONLIBS = @LIBS@ +COMMONLIBS = @LIBS@ $(DNSSDLIBS) - CUPSDLIBS = @CUPSDLIBS@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ CXXLIBS = @CXXLIBS@ -diff -up cups-1.4rc1/scheduler/dirsvc.c.build cups-1.4rc1/scheduler/dirsvc.c ---- cups-1.4rc1/scheduler/dirsvc.c.build 2009-05-14 18:54:37.000000000 +0100 -+++ cups-1.4rc1/scheduler/dirsvc.c 2009-06-17 11:23:23.366318546 +0100 -@@ -2042,7 +2042,7 @@ cupsdUpdateDNSSDName(void) + DBUS_NOTIFIER = @DBUS_NOTIFIER@ +diff -up cups-1.5b1/scheduler/dirsvc.c.build cups-1.5b1/scheduler/dirsvc.c +--- cups-1.5b1/scheduler/dirsvc.c.build 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/dirsvc.c 2011-05-24 15:55:26.000000000 +0200 +@@ -2047,7 +2047,7 @@ cupsdUpdateDNSSDName(void) WebIFRef = DNSSDRef; if ((error = DNSServiceRegister(&WebIFRef, @@ -22,7 +22,7 @@ diff -up cups-1.4rc1/scheduler/dirsvc.c.build cups-1.4rc1/scheduler/dirsvc.c 0, webif, "_http._tcp", NULL, NULL, htons(DNSSDPort), 7, "\006path=/", dnssdRegisterCallback, -@@ -2765,7 +2765,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) +@@ -2769,7 +2769,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) do { p->ipp_ref = DNSSDRef; @@ -31,12 +31,12 @@ diff -up cups-1.4rc1/scheduler/dirsvc.c.build cups-1.4rc1/scheduler/dirsvc.c 0, name, regtype, NULL, NULL, htons(DNSSDPort), ipp_len, ipp_txt, dnssdRegisterCallback, -@@ -2854,7 +2854,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) +@@ -2866,7 +2866,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - p->printer_ref = DNSSDRef; - if ((se = DNSServiceRegister(&p->printer_ref, -- kDNSServiceFlagsShareConnection, -+ 0, - 0, name, "_printer._tcp", NULL, NULL, - htons(515), printer_len, printer_txt, - dnssdRegisterCallback, + p->printer_ref = DNSSDRef; + if ((se = DNSServiceRegister(&p->printer_ref, +- kDNSServiceFlagsShareConnection, ++ 0, + 0, name, "_printer._tcp", NULL, NULL, + htons(printer_port), printer_len, printer_txt, + dnssdRegisterCallback, diff --git a/cups-cups-get-classes.patch b/cups-cups-get-classes.patch index 196f5f1..484cf14 100644 --- a/cups-cups-get-classes.patch +++ b/cups-cups-get-classes.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4rc1/cups/dest.c.cups-get-classes cups-1.4rc1/cups/dest.c ---- cups-1.4rc1/cups/dest.c.cups-get-classes 2009-05-13 22:39:17.000000000 +0100 -+++ cups-1.4rc1/cups/dest.c 2009-07-28 22:17:40.285709944 +0100 -@@ -1735,6 +1735,7 @@ cups_get_sdests(http_t *http, /* I +diff -up cups-1.5b1/cups/dest.c.cups-get-classes cups-1.5b1/cups/dest.c +--- cups-1.5b1/cups/dest.c.cups-get-classes 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/cups/dest.c 2011-05-24 16:03:08.000000000 +0200 +@@ -534,6 +534,7 @@ _cupsGetDests(http_t *http, /* I - char uri[1024]; /* printer-uri value */ int num_options; /* Number of options */ cups_option_t *options; /* Options */ @@ -9,7 +9,7 @@ diff -up cups-1.4rc1/cups/dest.c.cups-get-classes cups-1.4rc1/cups/dest.c #ifdef __APPLE__ char media_default[41]; /* Default paper size */ #endif /* __APPLE__ */ -@@ -1791,6 +1792,8 @@ cups_get_sdests(http_t *http, /* I +@@ -590,6 +591,8 @@ _cupsGetDests(http_t *http, /* I - * printer-uri [for IPP_GET_PRINTER_ATTRIBUTES] */ @@ -18,7 +18,7 @@ diff -up cups-1.4rc1/cups/dest.c.cups-get-classes cups-1.4rc1/cups/dest.c request = ippNewRequest(op); ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, -@@ -1848,6 +1851,23 @@ cups_get_sdests(http_t *http, /* I +@@ -647,6 +650,23 @@ _cupsGetDests(http_t *http, /* I - attr->value_tag != IPP_TAG_URI) continue; @@ -42,7 +42,7 @@ diff -up cups-1.4rc1/cups/dest.c.cups-get-classes cups-1.4rc1/cups/dest.c if (!strcmp(attr->name, "auth-info-required") || !strcmp(attr->name, "device-uri") || !strcmp(attr->name, "marker-change-time") || -@@ -1939,6 +1959,28 @@ cups_get_sdests(http_t *http, /* I +@@ -738,6 +758,28 @@ _cupsGetDests(http_t *http, /* I - continue; } @@ -71,7 +71,7 @@ diff -up cups-1.4rc1/cups/dest.c.cups-get-classes cups-1.4rc1/cups/dest.c if ((dest = cups_add_dest(printer_name, NULL, &num_dests, dests)) != NULL) { dest->num_options = num_options; -@@ -1955,6 +1997,16 @@ cups_get_sdests(http_t *http, /* I +@@ -754,6 +796,16 @@ _cupsGetDests(http_t *http, /* I - } /* diff --git a/cups-direct-usb.patch b/cups-direct-usb.patch index 2724fad..4e25ce7 100644 --- a/cups-direct-usb.patch +++ b/cups-direct-usb.patch @@ -1,8 +1,8 @@ -diff -up cups-1.3.7/backend/usb-unix.c.direct-usb cups-1.3.7/backend/usb-unix.c ---- cups-1.3.7/backend/usb-unix.c.direct-usb 2008-03-26 16:02:45.000000000 +0000 -+++ cups-1.3.7/backend/usb-unix.c 2008-07-15 13:25:56.000000000 +0100 -@@ -94,6 +94,9 @@ print_device(const char *uri, /* I - De - strncasecmp(hostname, "Minolta", 7); +diff -up cups-1.5b1/backend/usb-unix.c.direct-usb cups-1.5b1/backend/usb-unix.c +--- cups-1.5b1/backend/usb-unix.c.direct-usb 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/usb-unix.c 2011-05-23 17:52:14.000000000 +0200 +@@ -102,6 +102,9 @@ print_device(const char *uri, /* I - De + _cups_strncasecmp(hostname, "Minolta", 7); #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ + if (use_bc && !strncmp(uri, "usb:/dev/", 9)) @@ -11,7 +11,7 @@ diff -up cups-1.3.7/backend/usb-unix.c.direct-usb cups-1.3.7/backend/usb-unix.c if ((device_fd = open_device(uri, &use_bc)) == -1) { if (getenv("CLASS") != NULL) -@@ -320,12 +323,7 @@ open_device(const char *uri, /* I - Dev +@@ -331,12 +334,7 @@ open_device(const char *uri, /* I - Dev if (!strncmp(uri, "usb:/dev/", 9)) #ifdef __linux { diff --git a/cups-dnssd-deviceid.patch b/cups-dnssd-deviceid.patch index abb8366..dedbcb2 100644 --- a/cups-dnssd-deviceid.patch +++ b/cups-dnssd-deviceid.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch cups-1.4.3/backend/dnssd.c ---- cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch 2010-04-16 19:36:12.226148774 +0100 -+++ cups-1.4.3/backend/dnssd.c 2010-04-16 19:39:53.314148240 +0100 -@@ -1192,15 +1192,22 @@ find_device (cups_array_t *devices, +diff -up cups-1.5b1/backend/dnssd.c.dnssd-deviceid cups-1.5b1/backend/dnssd.c +--- cups-1.5b1/backend/dnssd.c.dnssd-deviceid 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/dnssd.c 2011-05-24 17:28:18.000000000 +0200 +@@ -817,15 +817,22 @@ query_callback( if (device->device_id) free(device->device_id); @@ -18,16 +18,16 @@ diff -up cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch cups-1.4.3/backend/dnss - snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;", + snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", make_and_model, model); - else if (!strncasecmp(model, "designjet ", 10)) + else if (!_cups_strncasecmp(model, "designjet ", 10)) - snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10); + snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10); - else if (!strncasecmp(model, "stylus ", 7)) + else if (!_cups_strncasecmp(model, "stylus ", 7)) - snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7); + snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7); else if ((ptr = strchr(model, ' ')) != NULL) { /* -@@ -1210,7 +1217,7 @@ find_device (cups_array_t *devices, +@@ -835,7 +842,7 @@ query_callback( memcpy(make_and_model, model, ptr - model); make_and_model[ptr - model] = '\0'; diff --git a/cups-driverd-timeout.patch b/cups-driverd-timeout.patch index 222fb09..a8b6ae5 100644 --- a/cups-driverd-timeout.patch +++ b/cups-driverd-timeout.patch @@ -1,7 +1,7 @@ -diff -up cups-1.3.7/scheduler/ipp.c.driverd-timeout cups-1.3.7/scheduler/ipp.c ---- cups-1.3.7/scheduler/ipp.c.driverd-timeout 2008-07-15 13:40:51.000000000 +0100 -+++ cups-1.3.7/scheduler/ipp.c 2008-07-15 13:40:51.000000000 +0100 -@@ -4293,7 +4293,7 @@ copy_model(cupsd_client_t *con, /* I - +diff -up cups-1.5b1/scheduler/ipp.c.driverd-timeout cups-1.5b1/scheduler/ipp.c +--- cups-1.5b1/scheduler/ipp.c.driverd-timeout 2011-05-24 15:44:55.000000000 +0200 ++++ cups-1.5b1/scheduler/ipp.c 2011-05-24 15:44:56.000000000 +0200 +@@ -5720,7 +5720,7 @@ copy_model(cupsd_client_t *con, /* I - close(temppipe[1]); /* @@ -10,7 +10,7 @@ diff -up cups-1.3.7/scheduler/ipp.c.driverd-timeout cups-1.3.7/scheduler/ipp.c */ total = 0; -@@ -4315,7 +4315,7 @@ copy_model(cupsd_client_t *con, /* I - +@@ -5740,7 +5740,7 @@ copy_model(cupsd_client_t *con, /* I - FD_SET(temppipe[0], &input); FD_SET(CGIPipes[0], &input); diff --git a/cups-eggcups.patch b/cups-eggcups.patch index fde1e07..8ad10a9 100644 --- a/cups-eggcups.patch +++ b/cups-eggcups.patch @@ -1,9 +1,9 @@ -diff -up cups-1.4b1/backend/ipp.c.eggcups cups-1.4b1/backend/ipp.c ---- cups-1.4b1/backend/ipp.c.eggcups 2008-10-15 19:27:45.000000000 +0100 -+++ cups-1.4b1/backend/ipp.c 2008-11-11 15:43:30.000000000 +0000 -@@ -51,6 +51,70 @@ static char pstmpname[1024] = ""; /* Tem - static char tmpfilename[1024] = ""; /* Temporary spool file name */ - static int job_cancelled = 0; /* Job cancelled? */ +diff -up cups-1.5b1/backend/ipp.c.eggcups cups-1.5b1/backend/ipp.c +--- cups-1.5b1/backend/ipp.c.eggcups 2011-05-21 06:02:41.000000000 +0200 ++++ cups-1.5b1/backend/ipp.c 2011-05-23 18:07:45.000000000 +0200 +@@ -133,6 +133,70 @@ static cups_array_t *state_reasons; /* A + static char tmpfilename[1024] = ""; + /* Temporary spool file name */ +#if HAVE_DBUS +#include @@ -72,8 +72,8 @@ diff -up cups-1.4b1/backend/ipp.c.eggcups cups-1.4b1/backend/ipp.c /* * Local functions... -@@ -1058,6 +1122,15 @@ main(int argc, /* I - Number of comm - job_id); +@@ -1461,6 +1525,15 @@ main(int argc, /* I - Number of comm + _("Print file accepted - job ID %d."), job_id); } +#if HAVE_DBUS @@ -87,11 +87,11 @@ diff -up cups-1.4b1/backend/ipp.c.eggcups cups-1.4b1/backend/ipp.c + ippDelete(response); - if (job_cancelled) -diff -up cups-1.4b1/backend/Makefile.eggcups cups-1.4b1/backend/Makefile ---- cups-1.4b1/backend/Makefile.eggcups 2008-10-06 22:08:27.000000000 +0100 -+++ cups-1.4b1/backend/Makefile 2008-11-11 15:45:31.000000000 +0000 -@@ -188,7 +188,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbac + if (job_canceled) +diff -up cups-1.5b1/backend/Makefile.eggcups cups-1.5b1/backend/Makefile +--- cups-1.5b1/backend/Makefile.eggcups 2011-05-04 06:28:00.000000000 +0200 ++++ cups-1.5b1/backend/Makefile 2011-05-23 18:03:22.000000000 +0200 +@@ -212,7 +212,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbac ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a echo Linking $@... @@ -100,10 +100,10 @@ diff -up cups-1.4b1/backend/Makefile.eggcups cups-1.4b1/backend/Makefile $(RM) http $(LN) ipp http -diff -up cups-1.4b1/scheduler/subscriptions.c.eggcups cups-1.4b1/scheduler/subscriptions.c ---- cups-1.4b1/scheduler/subscriptions.c.eggcups 2008-08-01 22:11:55.000000000 +0100 -+++ cups-1.4b1/scheduler/subscriptions.c 2008-11-11 15:43:30.000000000 +0000 -@@ -1302,13 +1302,13 @@ cupsd_send_dbus(cupsd_eventmask_t event, +diff -up cups-1.5b1/scheduler/subscriptions.c.eggcups cups-1.5b1/scheduler/subscriptions.c +--- cups-1.5b1/scheduler/subscriptions.c.eggcups 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/subscriptions.c 2011-05-23 18:03:22.000000000 +0200 +@@ -1310,13 +1310,13 @@ cupsd_send_dbus(cupsd_eventmask_t event, what = "PrinterAdded"; else if (event & CUPSD_EVENT_PRINTER_DELETED) what = "PrinterRemoved"; @@ -119,7 +119,7 @@ diff -up cups-1.4b1/scheduler/subscriptions.c.eggcups cups-1.4b1/scheduler/subsc else return; -@@ -1344,7 +1344,7 @@ cupsd_send_dbus(cupsd_eventmask_t event, +@@ -1352,7 +1352,7 @@ cupsd_send_dbus(cupsd_eventmask_t event, dbus_message_append_iter_init(message, &iter); if (dest) dbus_message_iter_append_string(&iter, dest->name); diff --git a/cups-filter-debug.patch b/cups-filter-debug.patch index 38053e6..2a42343 100644 --- a/cups-filter-debug.patch +++ b/cups-filter-debug.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4rc1/scheduler/job.c.filter-debug cups-1.4rc1/scheduler/job.c ---- cups-1.4rc1/scheduler/job.c.filter-debug 2009-06-23 18:10:57.125572911 +0100 -+++ cups-1.4rc1/scheduler/job.c 2009-06-23 18:11:31.495572481 +0100 -@@ -544,10 +544,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I +diff -up cups-1.5b1/scheduler/job.c.filter-debug cups-1.5b1/scheduler/job.c +--- cups-1.5b1/scheduler/job.c.filter-debug 2011-05-24 15:58:07.000000000 +0200 ++++ cups-1.5b1/scheduler/job.c 2011-05-24 15:58:07.000000000 +0200 +@@ -557,10 +557,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I if (!filters) { diff --git a/cups-force-gnutls.patch b/cups-force-gnutls.patch deleted file mode 100644 index 85adaa8..0000000 --- a/cups-force-gnutls.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -up cups-1.4.4/config-scripts/cups-ssl.m4.force-gnutls cups-1.4.4/config-scripts/cups-ssl.m4 ---- cups-1.4.4/config-scripts/cups-ssl.m4.force-gnutls 2010-09-15 16:49:22.343502552 +0100 -+++ cups-1.4.4/config-scripts/cups-ssl.m4 2010-09-15 16:49:42.347502595 +0100 -@@ -65,23 +65,21 @@ if test x$enable_ssl != xno; then - if $PKGCONFIG --exists gnutls; then - if test "x$have_pthread" = xyes; then - AC_MSG_WARN([The current version of GNU TLS cannot be made thread-safe.]) -- else -- have_ssl=1 -- SSLLIBS=`$PKGCONFIG --libs gnutls` -- SSLFLAGS=`$PKGCONFIG --cflags gnutls` -- AC_DEFINE(HAVE_SSL) -- AC_DEFINE(HAVE_GNUTLS) - fi -+ have_ssl=1 -+ SSLLIBS=`$PKGCONFIG --libs gnutls` -+ SSLFLAGS=`$PKGCONFIG --cflags gnutls` -+ AC_DEFINE(HAVE_SSL) -+ AC_DEFINE(HAVE_GNUTLS) - elif test "x$LIBGNUTLSCONFIG" != x; then - if test "x$have_pthread" = xyes; then - AC_MSG_WARN([The current version of GNU TLS cannot be made thread-safe.]) -- else -- have_ssl=1 -- SSLLIBS=`$LIBGNUTLSCONFIG --libs` -- SSLFLAGS=`$LIBGNUTLSCONFIG --cflags` -- AC_DEFINE(HAVE_SSL) -- AC_DEFINE(HAVE_GNUTLS) - fi -+ have_ssl=1 -+ SSLLIBS=`$LIBGNUTLSCONFIG --libs` -+ SSLFLAGS=`$LIBGNUTLSCONFIG --cflags` -+ AC_DEFINE(HAVE_SSL) -+ AC_DEFINE(HAVE_GNUTLS) - fi - - if test $have_ssl = 1; then -diff -up cups-1.4.4/configure.force-gnutls cups-1.4.4/configure ---- cups-1.4.4/configure.force-gnutls 2010-06-17 19:25:47.000000000 +0100 -+++ cups-1.4.4/configure 2010-09-15 16:50:01.689503165 +0100 -@@ -17542,36 +17542,34 @@ fi - if test "x$have_pthread" = xyes; then - { echo "$as_me:$LINENO: WARNING: The current version of GNU TLS cannot be made thread-safe." >&5 - echo "$as_me: WARNING: The current version of GNU TLS cannot be made thread-safe." >&2;} -- else -- have_ssl=1 -- SSLLIBS=`$PKGCONFIG --libs gnutls` -- SSLFLAGS=`$PKGCONFIG --cflags gnutls` -- cat >>confdefs.h <<\_ACEOF -+ fi -+ have_ssl=1 -+ SSLLIBS=`$PKGCONFIG --libs gnutls` -+ SSLFLAGS=`$PKGCONFIG --cflags gnutls` -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SSL 1 - _ACEOF - -- cat >>confdefs.h <<\_ACEOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_GNUTLS 1 - _ACEOF - -- fi - elif test "x$LIBGNUTLSCONFIG" != x; then - if test "x$have_pthread" = xyes; then - { echo "$as_me:$LINENO: WARNING: The current version of GNU TLS cannot be made thread-safe." >&5 - echo "$as_me: WARNING: The current version of GNU TLS cannot be made thread-safe." >&2;} -- else -- have_ssl=1 -- SSLLIBS=`$LIBGNUTLSCONFIG --libs` -- SSLFLAGS=`$LIBGNUTLSCONFIG --cflags` -- cat >>confdefs.h <<\_ACEOF -+ fi -+ have_ssl=1 -+ SSLLIBS=`$LIBGNUTLSCONFIG --libs` -+ SSLFLAGS=`$LIBGNUTLSCONFIG --cflags` -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SSL 1 - _ACEOF - -- cat >>confdefs.h <<\_ACEOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_GNUTLS 1 - _ACEOF - -- fi - fi - - if test $have_ssl = 1; then diff --git a/cups-getpass.patch b/cups-getpass.patch index 1c1da96..7b089a7 100644 --- a/cups-getpass.patch +++ b/cups-getpass.patch @@ -1,8 +1,8 @@ -diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c ---- cups-1.4.4/cups/usersys.c.getpass 2010-03-30 23:07:33.000000000 +0100 -+++ cups-1.4.4/cups/usersys.c 2010-06-18 09:38:08.368096897 +0100 -@@ -41,6 +41,8 @@ - #include "globals.h" +diff -up cups-1.5b1/cups/usersys.c.getpass cups-1.5b1/cups/usersys.c +--- cups-1.5b1/cups/usersys.c.getpass 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/cups/usersys.c 2011-05-24 15:41:33.000000000 +0200 +@@ -43,6 +43,8 @@ + #include "cups-private.h" #include #include +#include @@ -10,11 +10,16 @@ diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c #ifdef WIN32 # include #else -@@ -406,7 +408,29 @@ _cupsGetPassword(const char *prompt) /* - * Use the standard getpass function to get a password from the console. +@@ -501,13 +503,31 @@ _cupsGetPassword(const char *prompt) /* + * empty password is treated as canceling the authentication request. */ -- return (getpass(prompt)); +- const char *password = getpass(prompt); +- /* Password string */ +- +- if (!password || !password[0]) +- return (NULL); +- else + static char password[100]; + struct termios oldtio, newtio; + sigset_t oldset, newset; @@ -34,10 +39,12 @@ diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c + fputc ('\n', stdout); + sigprocmask (SIG_SETMASK, &oldset, NULL); + if (nread > 0) ++ { + password[nread - 1] = '\0'; + return (password); ++ } + else -+ password[0] ='\0'; -+ return password; ++ return (NULL); #endif /* WIN32 */ } diff --git a/cups-hostnamelookups.patch b/cups-hostnamelookups.patch deleted file mode 100644 index 75b6abf..0000000 --- a/cups-hostnamelookups.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up cups-1.4.4/scheduler/network.c.hostnamelookups cups-1.4.4/scheduler/network.c ---- cups-1.4.4/scheduler/network.c.hostnamelookups 2010-04-09 23:42:09.000000000 +0100 -+++ cups-1.4.4/scheduler/network.c 2010-06-18 11:13:02.331979867 +0100 -@@ -154,11 +154,7 @@ cupsdNetIFUpdate(void) - * Try looking up the hostname for the address as needed... - */ - --#ifdef __APPLE__ - if (HostNameLookups) --#else -- if (HostNameLookups || RemotePort) --#endif /* __APPLE__ */ - httpAddrLookup((http_addr_t *)(addr->ifa_addr), hostname, - sizeof(hostname)); - else -@@ -166,7 +162,7 @@ cupsdNetIFUpdate(void) - /* - * Map the default server address and localhost to the server name - * and localhost, respectively; for all other addresses, use the -- * dotted notation... -+ * numeric address... - */ - - if (httpAddrLocalhost((http_addr_t *)(addr->ifa_addr))) diff --git a/cups-hp-deviceid-oid.patch b/cups-hp-deviceid-oid.patch index 29f0781..da5136a 100644 --- a/cups-hp-deviceid-oid.patch +++ b/cups-hp-deviceid-oid.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/backend/snmp.c.hp-deviceid-oid cups-1.4.3/backend/snmp.c ---- cups-1.4.3/backend/snmp.c.hp-deviceid-oid 2009-12-08 02:13:42.000000000 +0000 -+++ cups-1.4.3/backend/snmp.c 2010-04-13 15:00:26.486148914 +0100 -@@ -194,6 +194,7 @@ static const int UriOID[] = { CUPS_OID_p +diff -up cups-1.5b1/backend/snmp.c.hp-deviceid-oid cups-1.5b1/backend/snmp.c +--- cups-1.5b1/backend/snmp.c.hp-deviceid-oid 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/snmp.c 2011-05-24 17:24:48.000000000 +0200 +@@ -187,6 +187,7 @@ static const int UriOID[] = { CUPS_OID_p static const int LexmarkProductOID[] = { 1,3,6,1,4,1,641,2,1,2,1,2,1,-1 }; static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; @@ -9,7 +9,7 @@ diff -up cups-1.4.3/backend/snmp.c.hp-deviceid-oid cups-1.4.3/backend/snmp.c static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; static cups_array_t *DeviceURIs = NULL; static int HostNameLookups = 0; -@@ -1003,6 +1004,9 @@ read_snmp_response(int fd) /* I - SNMP +@@ -1006,6 +1007,9 @@ read_snmp_response(int fd) /* I - SNMP _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, packet.community, CUPS_ASN1_GET_REQUEST, DEVICE_PRODUCT, XeroxProductOID); diff --git a/cups-job-state-changed.patch b/cups-job-state-changed.patch deleted file mode 100644 index 16b5677..0000000 --- a/cups-job-state-changed.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.6/notifier/dbus.c.job-state-changed cups-1.4.6/notifier/dbus.c ---- cups-1.4.6/notifier/dbus.c.job-state-changed 2011-02-25 12:42:11.084127808 +0000 -+++ cups-1.4.6/notifier/dbus.c 2011-02-25 12:42:31.312811947 +0000 -@@ -332,7 +332,7 @@ main(int argc, /* I - Number of comm - const char *word2 = event + 4; /* Second word */ - - params = PARAMS_JOB; -- if (!strcmp(word2, "state")) -+ if (!strcmp(word2, "state-changed")) - signame = "JobState"; - else if (!strcmp(word2, "created")) - signame = "JobCreated"; diff --git a/cups-logrotate.patch b/cups-logrotate.patch index 559cbdc..a6485a9 100644 --- a/cups-logrotate.patch +++ b/cups-logrotate.patch @@ -1,7 +1,7 @@ -diff -up cups-1.3.5/scheduler/log.c.logrotate cups-1.3.5/scheduler/log.c ---- cups-1.3.5/scheduler/log.c.logrotate 2008-02-14 12:21:25.000000000 +0000 -+++ cups-1.3.5/scheduler/log.c 2008-02-14 12:24:16.000000000 +0000 -@@ -29,6 +29,9 @@ +diff -up cups-1.5b1/scheduler/log.c.logrotate cups-1.5b1/scheduler/log.c +--- cups-1.5b1/scheduler/log.c.logrotate 2011-05-14 01:04:16.000000000 +0200 ++++ cups-1.5b1/scheduler/log.c 2011-05-24 15:47:20.000000000 +0200 +@@ -32,6 +32,9 @@ #include "cupsd.h" #include #include @@ -11,7 +11,7 @@ diff -up cups-1.3.5/scheduler/log.c.logrotate cups-1.3.5/scheduler/log.c /* -@@ -467,12 +470,10 @@ check_log_file(cups_file_t **lf, /* IO - +@@ -71,12 +74,10 @@ cupsdCheckLogFile(cups_file_t **lf, /* I return (1); /* @@ -26,7 +26,7 @@ diff -up cups-1.3.5/scheduler/log.c.logrotate cups-1.3.5/scheduler/log.c { /* * Handle format strings... -@@ -565,6 +566,34 @@ check_log_file(cups_file_t **lf, /* IO - +@@ -186,6 +187,34 @@ cupsdCheckLogFile(cups_file_t **lf, /* I } /* diff --git a/cups-lpr-help.patch b/cups-lpr-help.patch index 1a68297..c42434d 100644 --- a/cups-lpr-help.patch +++ b/cups-lpr-help.patch @@ -1,8 +1,8 @@ -diff -up cups-1.4b1/berkeley/lpr.c.lpr-help cups-1.4b1/berkeley/lpr.c ---- cups-1.4b1/berkeley/lpr.c.lpr-help 2008-07-11 23:46:21.000000000 +0100 -+++ cups-1.4b1/berkeley/lpr.c 2008-11-11 16:20:32.000000000 +0000 -@@ -30,6 +30,31 @@ - #include +diff -up cups-1.5b1/berkeley/lpr.c.lpr-help cups-1.5b1/berkeley/lpr.c +--- cups-1.5b1/berkeley/lpr.c.lpr-help 2011-03-21 23:02:00.000000000 +0100 ++++ cups-1.5b1/berkeley/lpr.c 2011-05-23 17:58:06.000000000 +0200 +@@ -24,6 +24,31 @@ + #include +static void @@ -33,15 +33,7 @@ diff -up cups-1.4b1/berkeley/lpr.c.lpr-help cups-1.4b1/berkeley/lpr.c /* * 'main()' - Parse options and send files for printing. */ -@@ -54,7 +79,6 @@ main(int argc, /* I - Number of comm - int deletefile; /* Delete file after print? */ - char buffer[8192]; /* Copy buffer */ - -- - _cupsSetLocale(argv); - - deletefile = 0; -@@ -282,6 +306,12 @@ main(int argc, /* I - Number of comm +@@ -270,6 +294,12 @@ main(int argc, /* I - Number of comm break; default : @@ -52,5 +44,5 @@ diff -up cups-1.4b1/berkeley/lpr.c.lpr-help cups-1.4b1/berkeley/lpr.c + } + _cupsLangPrintf(stderr, - _("%s: Error - unknown option \'%c\'!\n"), - argv[0], argv[i][1]); + _("%s: Error - unknown option \"%c\"."), argv[0], + argv[i][1]); diff --git a/cups-lspp.patch b/cups-lspp.patch index 5ab87bd..bb2d8d8 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,9 +1,9 @@ -diff -urNp cups-1.4.6.old/config.h.in cups-1.4.6/config.h.in ---- cups-1.4.6.old/config.h.in 2011-03-07 13:34:52.585876279 +0000 -+++ cups-1.4.6/config.h.in 2011-03-07 13:35:07.138875913 +0000 -@@ -672,6 +672,12 @@ - #undef HAVE_SYS_STATVFS_H - #undef HAVE_SYS_VFS_H +diff -up cups-1.5b1/config.h.in.lspp cups-1.5b1/config.h.in +--- cups-1.5b1/config.h.in.lspp 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/config.h.in 2011-05-24 18:22:51.000000000 +0200 +@@ -733,6 +733,12 @@ + + #undef HAVE_XPC +/* + * Are we trying to meet LSPP requirements? @@ -14,9 +14,9 @@ diff -urNp cups-1.4.6.old/config.h.in cups-1.4.6/config.h.in #endif /* !_CUPS_CONFIG_H_ */ -diff -urNp cups-1.4.6.old/config-scripts/cups-lspp.m4 cups-1.4.6/config-scripts/cups-lspp.m4 ---- cups-1.4.6.old/config-scripts/cups-lspp.m4 1970-01-01 01:00:00.000000000 +0100 -+++ cups-1.4.6/config-scripts/cups-lspp.m4 2011-03-07 13:35:07.139875938 +0000 +diff -up cups-1.5b1/config-scripts/cups-lspp.m4.lspp cups-1.5b1/config-scripts/cups-lspp.m4 +--- cups-1.5b1/config-scripts/cups-lspp.m4.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/config-scripts/cups-lspp.m4 2011-05-24 18:20:36.000000000 +0200 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -54,10 +54,10 @@ diff -urNp cups-1.4.6.old/config-scripts/cups-lspp.m4 cups-1.4.6/config-scripts/ + ;; + esac +fi -diff -urNp cups-1.4.6.old/configure.in cups-1.4.6/configure.in ---- cups-1.4.6.old/configure.in 2011-03-07 13:34:52.521876279 +0000 -+++ cups-1.4.6/configure.in 2011-03-07 13:35:07.139875938 +0000 -@@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) +diff -up cups-1.5b1/configure.in.lspp cups-1.5b1/configure.in +--- cups-1.5b1/configure.in.lspp 2010-11-20 02:03:46.000000000 +0100 ++++ cups-1.5b1/configure.in 2011-05-24 18:20:36.000000000 +0200 +@@ -41,6 +41,8 @@ sinclude(config-scripts/cups-defaults.m4 sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -66,9 +66,9 @@ diff -urNp cups-1.4.6.old/configure.in cups-1.4.6/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -urNp cups-1.4.6.old/cups/cups.h cups-1.4.6/cups/cups.h ---- cups-1.4.6.old/cups/cups.h 2011-03-07 13:34:53.042876279 +0000 -+++ cups-1.4.6/cups/cups.h 2011-03-07 13:35:07.140875960 +0000 +diff -up cups-1.5b1/cups/cups.h.lspp cups-1.5b1/cups/cups.h +--- cups-1.5b1/cups/cups.h.lspp 2011-05-12 07:46:30.000000000 +0200 ++++ cups-1.5b1/cups/cups.h 2011-05-24 18:20:36.000000000 +0200 @@ -15,6 +15,9 @@ * This file is subject to the Apple OS-Developed Software exception. */ @@ -79,7 +79,7 @@ diff -urNp cups-1.4.6.old/cups/cups.h cups-1.4.6/cups/cups.h #ifndef _CUPS_CUPS_H_ # define _CUPS_CUPS_H_ -@@ -86,6 +89,12 @@ extern "C" { +@@ -85,6 +88,12 @@ extern "C" { # define CUPS_WHICHJOBS_COMPLETED 1 @@ -92,10 +92,10 @@ diff -urNp cups-1.4.6.old/cups/cups.h cups-1.4.6/cups/cups.h /* * Types and structures... */ -diff -urNp cups-1.4.6.old/data/Makefile cups-1.4.6/data/Makefile ---- cups-1.4.6.old/data/Makefile 2011-03-07 13:34:52.596876279 +0000 -+++ cups-1.4.6/data/Makefile 2011-03-07 13:35:07.140875960 +0000 -@@ -25,7 +25,10 @@ BANNERS = \ +diff -up cups-1.5b1/data/Makefile.lspp cups-1.5b1/data/Makefile +--- cups-1.5b1/data/Makefile.lspp 2011-05-12 07:21:56.000000000 +0200 ++++ cups-1.5b1/data/Makefile 2011-05-24 18:23:28.000000000 +0200 +@@ -25,7 +25,11 @@ BANNERS = \ secret \ standard \ topsecret \ @@ -104,12 +104,13 @@ diff -urNp cups-1.4.6.old/data/Makefile cups-1.4.6/data/Makefile + selinux \ + mls \ + te ++ - CHARMAPS = \ - euc-cn.txt \ -diff -urNp cups-1.4.6.old/data/mls cups-1.4.6/data/mls ---- cups-1.4.6.old/data/mls 1970-01-01 01:00:00.000000000 +0100 -+++ cups-1.4.6/data/mls 2011-03-07 13:35:07.141875981 +0000 + CHARSETS = \ + utf-8 +diff -up cups-1.5b1/data/mls.lspp cups-1.5b1/data/mls +--- cups-1.5b1/data/mls.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/data/mls 2011-05-24 18:20:36.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -372,9 +373,9 @@ diff -urNp cups-1.4.6.old/data/mls cups-1.4.6/data/mls +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -urNp cups-1.4.6.old/data/selinux cups-1.4.6/data/selinux ---- cups-1.4.6.old/data/selinux 1970-01-01 01:00:00.000000000 +0100 -+++ cups-1.4.6/data/selinux 2011-03-07 13:35:07.141875981 +0000 +diff -up cups-1.5b1/data/selinux.lspp cups-1.5b1/data/selinux +--- cups-1.5b1/data/selinux.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/data/selinux 2011-05-24 18:20:36.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -637,9 +638,9 @@ diff -urNp cups-1.4.6.old/data/selinux cups-1.4.6/data/selinux +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -urNp cups-1.4.6.old/data/te cups-1.4.6/data/te ---- cups-1.4.6.old/data/te 1970-01-01 01:00:00.000000000 +0100 -+++ cups-1.4.6/data/te 2011-03-07 13:35:07.142875996 +0000 +diff -up cups-1.5b1/data/te.lspp cups-1.5b1/data/te +--- cups-1.5b1/data/te.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/data/te 2011-05-24 18:20:36.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -902,9 +903,9 @@ diff -urNp cups-1.4.6.old/data/te cups-1.4.6/data/te +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -urNp cups-1.4.6.old/filter/common.c cups-1.4.6/filter/common.c ---- cups-1.4.6.old/filter/common.c 2011-03-07 13:34:53.361876279 +0000 -+++ cups-1.4.6/filter/common.c 2011-03-07 13:35:07.143876025 +0000 +diff -up cups-1.5b1/filter/common.c.lspp cups-1.5b1/filter/common.c +--- cups-1.5b1/filter/common.c.lspp 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/filter/common.c 2011-05-24 18:20:36.000000000 +0200 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -1073,10 +1074,10 @@ diff -urNp cups-1.4.6.old/filter/common.c cups-1.4.6/filter/common.c /* -diff -urNp cups-1.4.6.old/filter/pstops.c cups-1.4.6/filter/pstops.c ---- cups-1.4.6.old/filter/pstops.c 2011-03-07 13:34:53.372876279 +0000 -+++ cups-1.4.6/filter/pstops.c 2011-03-07 13:35:07.144876057 +0000 -@@ -3326,6 +3326,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.5b1/filter/pstops.c.lspp cups-1.5b1/filter/pstops.c +--- cups-1.5b1/filter/pstops.c.lspp 2011-05-20 08:52:23.000000000 +0200 ++++ cups-1.5b1/filter/pstops.c 2011-05-24 18:20:36.000000000 +0200 +@@ -3258,6 +3258,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -1095,7 +1096,7 @@ diff -urNp cups-1.4.6.old/filter/pstops.c cups-1.4.6/filter/pstops.c /* -@@ -3348,6 +3360,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3280,6 +3292,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -1220,7 +1221,7 @@ diff -urNp cups-1.4.6.old/filter/pstops.c cups-1.4.6/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3426,7 +3556,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3358,7 +3488,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -1231,21 +1232,21 @@ diff -urNp cups-1.4.6.old/filter/pstops.c cups-1.4.6/filter/pstops.c /* -diff -urNp cups-1.4.6.old/Makedefs.in cups-1.4.6/Makedefs.in ---- cups-1.4.6.old/Makedefs.in 2011-03-07 13:34:53.424876279 +0000 -+++ cups-1.4.6/Makedefs.in 2011-03-07 13:35:07.145876086 +0000 -@@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ - LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ - LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) +diff -up cups-1.5b1/Makedefs.in.lspp cups-1.5b1/Makedefs.in +--- cups-1.5b1/Makedefs.in.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/Makedefs.in 2011-05-24 18:24:42.000000000 +0200 +@@ -157,7 +157,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f + LEGACY_BACKENDS = @LEGACY_BACKENDS@ + LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) LINKCUPSIMAGE = @LINKCUPSIMAGE@ -LIBS = $(LINKCUPS) $(COMMONLIBS) +LIBS = $(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@ OPTIM = @OPTIM@ OPTIONS = PAMLIBS = @PAMLIBS@ -diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c ---- cups-1.4.6.old/scheduler/client.c 2011-03-07 13:34:53.733876279 +0000 -+++ cups-1.4.6/scheduler/client.c 2011-03-07 13:35:07.150876188 +0000 +diff -up cups-1.5b1/scheduler/client.c.lspp cups-1.5b1/scheduler/client.c +--- cups-1.5b1/scheduler/client.c.lspp 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/client.c 2011-05-24 18:28:17.000000000 +0200 @@ -44,6 +44,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -1254,15 +1255,12 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c */ /* -@@ -52,6 +53,7 @@ +@@ -52,10 +53,17 @@ #include "cupsd.h" +#define _GNU_SOURCE - #ifdef HAVE_CDSASSL - # include - # include -@@ -90,6 +92,12 @@ extern const char *cssmErrorString(int e + #ifdef HAVE_TCPD_H # include #endif /* HAVE_TCPD_H */ @@ -1275,7 +1273,7 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c /* * Local functions... -@@ -391,6 +399,57 @@ cupsdAcceptClient(cupsd_listener_t *lis) +@@ -352,6 +360,57 @@ cupsdAcceptClient(cupsd_listener_t *lis) } #endif /* HAVE_TCPD_H */ @@ -1330,10 +1328,10 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c + } +#endif /* WITH_LSPP */ + - #ifdef AF_INET6 - if (con->http.hostaddr->addr.sa_family == AF_INET6) - cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s:%d (IPv6)", -@@ -781,6 +840,13 @@ cupsdReadClient(cupsd_client_t *con) /* + #ifdef AF_LOCAL + if (con->http.hostaddr->addr.sa_family == AF_LOCAL) + cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s (Domain)", +@@ -712,6 +771,13 @@ cupsdReadClient(cupsd_client_t *con) /* mime_type_t *type; /* MIME type of file */ cupsd_printer_t *p; /* Printer */ static unsigned request_id = 0; /* Request ID for temp files */ @@ -1347,7 +1345,7 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c status = HTTP_CONTINUE; -@@ -2135,6 +2201,67 @@ cupsdReadClient(cupsd_client_t *con) /* +@@ -2138,6 +2204,67 @@ cupsdReadClient(cupsd_client_t *con) /* fchmod(con->file, 0640); fchown(con->file, RunUser, Group); fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC); @@ -1415,7 +1413,7 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c } if (con->http.state != HTTP_POST_SEND) -@@ -4641,6 +4768,50 @@ make_certificate(cupsd_client_t *con) /* +@@ -4548,6 +4675,50 @@ make_certificate(cupsd_client_t *con) /* #endif /* HAVE_SSL */ @@ -1466,9 +1464,9 @@ diff -urNp cups-1.4.6.old/scheduler/client.c cups-1.4.6/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. */ -diff -urNp cups-1.4.6.old/scheduler/client.h cups-1.4.6/scheduler/client.h ---- cups-1.4.6.old/scheduler/client.h 2011-03-07 13:34:53.708876279 +0000 -+++ cups-1.4.6/scheduler/client.h 2011-03-07 13:35:07.155876256 +0000 +diff -up cups-1.5b1/scheduler/client.h.lspp cups-1.5b1/scheduler/client.h +--- cups-1.5b1/scheduler/client.h.lspp 2011-03-25 22:25:38.000000000 +0100 ++++ cups-1.5b1/scheduler/client.h 2011-05-24 18:20:36.000000000 +0200 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -1483,7 +1481,7 @@ diff -urNp cups-1.4.6.old/scheduler/client.h cups-1.4.6/scheduler/client.h /* * HTTP client structure... */ -@@ -64,6 +71,10 @@ struct cupsd_client_s +@@ -61,6 +68,10 @@ struct cupsd_client_s #ifdef HAVE_AUTHORIZATION_H AuthorizationRef authref; /* Authorization ref */ #endif /* HAVE_AUTHORIZATION_H */ @@ -1494,7 +1492,7 @@ diff -urNp cups-1.4.6.old/scheduler/client.h cups-1.4.6/scheduler/client.h }; #define HTTP(con) &((con)->http) -@@ -133,6 +144,9 @@ extern void cupsdStartListening(void); +@@ -130,6 +141,9 @@ extern void cupsdStartListening(void); extern void cupsdStopListening(void); extern void cupsdUpdateCGI(void); extern void cupsdWriteClient(cupsd_client_t *con); @@ -1504,18 +1502,18 @@ diff -urNp cups-1.4.6.old/scheduler/client.h cups-1.4.6/scheduler/client.h /* -diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c ---- cups-1.4.6.old/scheduler/conf.c 2011-03-07 13:34:53.540876279 +0000 -+++ cups-1.4.6/scheduler/conf.c 2011-03-07 13:35:07.157876274 +0000 -@@ -29,6 +29,7 @@ - * read_configuration() - Read a configuration file. +diff -up cups-1.5b1/scheduler/conf.c.lspp cups-1.5b1/scheduler/conf.c +--- cups-1.5b1/scheduler/conf.c.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/conf.c 2011-05-24 18:31:23.000000000 +0200 +@@ -31,6 +31,7 @@ * read_location() - Read a definition. * read_policy() - Read a definition. + * set_policy_defaults() - Set default policy values as needed. + * is_lspp_config() - Is the system configured for LSPP */ /* -@@ -54,6 +55,9 @@ +@@ -56,6 +57,9 @@ # define INADDR_NONE 0xffffffff #endif /* !INADDR_NONE */ @@ -1525,7 +1523,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c /* * Configuration variable structure... -@@ -172,6 +176,10 @@ static const cupsd_var_t variables[] = +@@ -173,6 +177,10 @@ static const cupsd_var_t variables[] = # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS) { "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME }, # endif /* HAVE_LIBSSL || HAVE_GNUTLS */ @@ -1536,7 +1534,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c #endif /* HAVE_SSL */ { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, { "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME }, -@@ -430,6 +438,9 @@ cupsdReadConfiguration(void) +@@ -434,6 +442,9 @@ cupsdReadConfiguration(void) const char *tmpdir; /* TMPDIR environment variable */ struct stat tmpinfo; /* Temporary directory info */ cupsd_policy_t *p; /* Policy */ @@ -1546,7 +1544,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c /* -@@ -713,6 +724,25 @@ cupsdReadConfiguration(void) +@@ -722,6 +733,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -1572,12 +1570,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1081,11 +1111,23 @@ cupsdReadConfiguration(void) - * Update classification setting as needed... - */ - -- if (Classification && !strcasecmp(Classification, "none")) -+ if (Classification && strcasecmp(Classification, "none") == 0) +@@ -1107,7 +1137,19 @@ cupsdReadConfiguration(void) cupsdClearString(&Classification); if (Classification) @@ -1597,7 +1590,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3657,6 +3699,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3765,6 +3807,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -1616,9 +1609,9 @@ diff -urNp cups-1.4.6.old/scheduler/conf.c cups-1.4.6/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -urNp cups-1.4.6.old/scheduler/conf.h cups-1.4.6/scheduler/conf.h ---- cups-1.4.6.old/scheduler/conf.h 2011-03-07 13:34:53.561876277 +0000 -+++ cups-1.4.6/scheduler/conf.h 2011-03-07 13:35:07.158876277 +0000 +diff -up cups-1.5b1/scheduler/conf.h.lspp cups-1.5b1/scheduler/conf.h +--- cups-1.5b1/scheduler/conf.h.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/conf.h 2011-05-24 18:20:36.000000000 +0200 @@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL); VAR int SSLOptions VALUE(CUPSD_SSL_NONE); /* SSL/TLS options */ @@ -1632,7 +1625,7 @@ diff -urNp cups-1.4.6.old/scheduler/conf.h cups-1.4.6/scheduler/conf.h #ifdef HAVE_LAUNCHD VAR int LaunchdTimeout VALUE(DEFAULT_KEEPALIVE); -@@ -266,6 +272,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL +@@ -261,6 +267,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL /* System group auth key */ #endif /* HAVE_AUTHORIZATION_H */ @@ -1642,18 +1635,18 @@ diff -urNp cups-1.4.6.old/scheduler/conf.h cups-1.4.6/scheduler/conf.h /* * Prototypes... -diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c ---- cups-1.4.6.old/scheduler/ipp.c 2011-03-07 13:34:53.720876279 +0000 -+++ cups-1.4.6/scheduler/ipp.c 2011-03-07 13:35:07.167876275 +0000 +diff -up cups-1.5b1/scheduler/ipp.c.lspp cups-1.5b1/scheduler/ipp.c +--- cups-1.5b1/scheduler/ipp.c.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/ipp.c 2011-05-24 18:37:00.000000000 +0200 @@ -41,6 +41,7 @@ - * cancel_all_jobs() - Cancel all print jobs. + * cancel_all_jobs() - Cancel all or selected print jobs. * cancel_job() - Cancel a print job. * cancel_subscription() - Cancel a subscription. + * check_context() - Check the SELinux context for a user and job - * check_quotas() - Check quotas for a printer and user. * check_rss_recipient() - Check that we do not have a duplicate RSS * feed URI. -@@ -102,6 +103,9 @@ + * check_quotas() - Check quotas for a printer and user. +@@ -106,6 +107,9 @@ * validate_user() - Validate the user for the request. */ @@ -1663,7 +1656,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * Include necessary headers... */ -@@ -124,6 +128,14 @@ extern int mbr_check_membership_by_id(uu +@@ -131,6 +135,14 @@ extern int mbr_check_membership_by_id(uu # endif /* HAVE_MEMBERSHIPPRIV_H */ #endif /* __APPLE__ */ @@ -1678,7 +1671,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * Local functions... -@@ -157,6 +169,9 @@ static void cancel_all_jobs(cupsd_client +@@ -168,6 +180,9 @@ static void cancel_all_jobs(cupsd_client static void cancel_job(cupsd_client_t *con, ipp_attribute_t *uri); static void cancel_subscription(cupsd_client_t *con, int id); static int check_rss_recipient(const char *recipient); @@ -1688,7 +1681,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr, int quickcopy); -@@ -1354,6 +1369,21 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1365,6 +1380,21 @@ add_job(cupsd_client_t *con, /* I - Cl ipp_attribute_t *media_col, /* media-col attribute */ *media_margin; /* media-*-margin attribute */ ipp_t *unsup_col; /* media-col in unsupported response */ @@ -1710,7 +1703,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1612,6 +1642,106 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1622,6 +1652,106 @@ add_job(cupsd_client_t *con, /* I - Cl ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, "Untitled"); @@ -1817,7 +1810,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1620,6 +1750,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1630,6 +1760,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1850,7 +1843,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE); job->attrs = con->request; -@@ -1825,6 +1981,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1835,6 +1991,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1880,7 +1873,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c job->job_sheets = attr; -@@ -1855,6 +2034,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1865,6 +2044,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1890,7 +1883,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1873,6 +2055,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1883,6 +2065,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1900,7 +1893,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1893,6 +2078,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1903,6 +2088,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1910,7 +1903,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1933,8 +2121,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1943,8 +2131,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1963,7 +1956,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -4295,6 +4527,111 @@ check_rss_recipient( +@@ -4700,6 +4932,111 @@ check_rss_recipient( } @@ -2075,7 +2068,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4849,6 +5182,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -5337,6 +5674,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -2091,7 +2084,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4884,6 +5226,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -5372,6 +5718,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -2174,7 +2167,7 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4978,6 +5396,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -5466,6 +5888,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -2199,9 +2192,9 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6957,6 +7393,22 @@ get_job_attrs(cupsd_client_t *con, /* I - return; - } +@@ -7457,6 +7897,22 @@ get_job_attrs(cupsd_client_t *con, /* I + + exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username); + +#ifdef WITH_LSPP @@ -2222,19 +2215,19 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * Copy attributes... */ -@@ -7187,6 +7639,11 @@ get_jobs(cupsd_client_t *con, /* I - C - if (username[0] && strcasecmp(username, job->username)) - continue; +@@ -7810,6 +8266,11 @@ get_jobs(cupsd_client_t *con, /* I - C + if (username[0] && _cups_strcasecmp(username, job->username)) + continue; +#ifdef WITH_LSPP -+ if (is_lspp_config() && check_context(con, job) != 1) -+ continue; ++ if (is_lspp_config() && check_context(con, job) != 1) ++ continue; +#endif /* WITH_LSPP */ + - if (count > 0) - ippAddSeparator(con->response); + if (count > 0) + ippAddSeparator(con->response); -@@ -11606,6 +12063,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -12249,6 +12710,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -2246,10 +2239,10 @@ diff -urNp cups-1.4.6.old/scheduler/ipp.c cups-1.4.6/scheduler/ipp.c /* * Check the username against the owner... */ -diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c ---- cups-1.4.6.old/scheduler/job.c 2011-03-07 13:34:53.553876279 +0000 -+++ cups-1.4.6/scheduler/job.c 2011-03-07 13:35:07.175876275 +0000 -@@ -66,6 +66,9 @@ +diff -up cups-1.5b1/scheduler/job.c.lspp cups-1.5b1/scheduler/job.c +--- cups-1.5b1/scheduler/job.c.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/job.c 2011-05-24 18:44:14.000000000 +0200 +@@ -64,6 +64,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -2259,9 +2252,9 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c /* * Include necessary headers... */ -@@ -75,6 +78,14 @@ - #include - #include +@@ -79,6 +82,14 @@ + # endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */ + #endif /* __APPLE__ */ +#ifdef WITH_LSPP +#include @@ -2274,8 +2267,8 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c /* * Design Notes for Job Management -@@ -508,6 +519,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I - /* PRINTER env variable */ +@@ -518,6 +529,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I + /* PRINTER_STATE_REASONS env var */ rip_max_cache[255]; /* RIP_MAX_CACHE env variable */ +#ifdef WITH_LSPP @@ -2289,7 +2282,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -932,6 +951,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I +@@ -1000,6 +1019,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I } } @@ -2357,7 +2350,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c if (Classification && !banner_page) { if ((attr = ippFindAttribute(job->attrs, "job-sheets", -@@ -1629,6 +1709,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J +@@ -1716,6 +1796,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J goto error; } @@ -2378,9 +2371,9 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER); job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME); -@@ -2016,6 +2110,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J - { - char filename[1024]; /* Job control filename */ +@@ -2104,6 +2198,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J + char filename[1024], /* Job control filename */ + newfile[1024]; /* New job control filename */ cups_file_t *fp; /* Job file */ +#ifdef WITH_LSPP + security_context_t spoolcon; /* context of the job control file */ @@ -2393,7 +2386,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p", -@@ -2034,6 +2136,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2123,6 +2225,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J fchmod(cupsFileNumber(fp), 0600); fchown(cupsFileNumber(fp), RunUser, Group); @@ -2470,7 +2463,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3341,6 +3513,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3509,6 +3681,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -2489,7 +2482,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -4029,6 +4213,19 @@ static void +@@ -4143,6 +4327,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -2509,7 +2502,7 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -4151,6 +4348,108 @@ start_job(cupsd_job_t *job, /* I - +@@ -4272,6 +4469,108 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -2618,9 +2611,9 @@ diff -urNp cups-1.4.6.old/scheduler/job.c cups-1.4.6/scheduler/job.c /* * Now start the first file in the job... */ -diff -urNp cups-1.4.6.old/scheduler/job.h cups-1.4.6/scheduler/job.h ---- cups-1.4.6.old/scheduler/job.h 2011-03-07 13:34:53.530876279 +0000 -+++ cups-1.4.6/scheduler/job.h 2011-03-07 13:35:07.177876275 +0000 +diff -up cups-1.5b1/scheduler/job.h.lspp cups-1.5b1/scheduler/job.h +--- cups-1.5b1/scheduler/job.h.lspp 2011-05-18 04:27:11.000000000 +0200 ++++ cups-1.5b1/scheduler/job.h 2011-05-24 18:45:43.000000000 +0200 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -2635,10 +2628,10 @@ diff -urNp cups-1.4.6.old/scheduler/job.h cups-1.4.6/scheduler/job.h /* * Constants... */ -@@ -83,6 +90,10 @@ struct cupsd_job_s /**** Job request * - krb5_ccache ccache; /* Kerberos credential cache */ - char *ccname; /* KRB5CCNAME environment variable */ - #endif /* HAVE_GSSAPI */ +@@ -76,6 +83,10 @@ struct cupsd_job_s /**** Job request * + void *profile; /* Security profile */ + cups_array_t *history; /* Debug log history */ + int progress; /* Printing progress */ +#ifdef WITH_LSPP + security_context_t scon; /* Security context of job */ + uid_t auid; /* Audit loginuid for this job */ @@ -2646,10 +2639,10 @@ diff -urNp cups-1.4.6.old/scheduler/job.h cups-1.4.6/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c ---- cups-1.4.6.old/scheduler/main.c 2011-03-07 13:34:53.671876279 +0000 -+++ cups-1.4.6/scheduler/main.c 2011-03-07 13:35:07.179876275 +0000 -@@ -37,6 +37,8 @@ +diff -up cups-1.5b1/scheduler/main.c.lspp cups-1.5b1/scheduler/main.c +--- cups-1.5b1/scheduler/main.c.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/main.c 2011-05-24 18:46:29.000000000 +0200 +@@ -36,6 +36,8 @@ * usage() - Show scheduler usage. */ @@ -2658,9 +2651,9 @@ diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c /* * Include necessary headers... */ -@@ -76,6 +78,9 @@ - # include - #endif /* __APPLE__ && HAVE_DLFCN_H */ +@@ -69,6 +71,9 @@ + # include + #endif /* HAVE_NOTIFY_H */ +#ifdef WITH_LSPP +# include @@ -2668,7 +2661,7 @@ diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c /* * Local functions... -@@ -149,6 +154,9 @@ main(int argc, /* I - Number of comm +@@ -130,6 +135,9 @@ main(int argc, /* I - Number of comm #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) struct sigaction action; /* Actions for POSIX signals */ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ @@ -2678,7 +2671,7 @@ diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c #ifdef __sgi cups_file_t *fp; /* Fake lpsched lock file */ struct stat statbuf; /* Needed for checking lpsched FIFO */ -@@ -478,6 +486,25 @@ main(int argc, /* I - Number of comm +@@ -455,6 +463,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -2704,7 +2697,7 @@ diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c /* * Set the timezone info... */ -@@ -1258,6 +1285,11 @@ main(int argc, /* I - Number of comm +@@ -1182,6 +1209,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -2716,10 +2709,10 @@ diff -urNp cups-1.4.6.old/scheduler/main.c cups-1.4.6/scheduler/main.c return (!stop_scheduler); } -diff -urNp cups-1.4.6.old/scheduler/printers.c cups-1.4.6/scheduler/printers.c ---- cups-1.4.6.old/scheduler/printers.c 2011-03-07 13:34:53.708876279 +0000 -+++ cups-1.4.6/scheduler/printers.c 2011-03-07 13:35:07.182876275 +0000 -@@ -59,6 +59,8 @@ +diff -up cups-1.5b1/scheduler/printers.c.lspp cups-1.5b1/scheduler/printers.c +--- cups-1.5b1/scheduler/printers.c.lspp 2011-05-24 18:20:36.000000000 +0200 ++++ cups-1.5b1/scheduler/printers.c 2011-05-24 18:47:43.000000000 +0200 +@@ -56,6 +56,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -2728,7 +2721,7 @@ diff -urNp cups-1.4.6.old/scheduler/printers.c cups-1.4.6/scheduler/printers.c /* * Include necessary headers... */ -@@ -81,6 +83,11 @@ +@@ -77,6 +79,10 @@ # include #endif /* HAVE_SYS_VFS_H */ @@ -2736,11 +2729,10 @@ diff -urNp cups-1.4.6.old/scheduler/printers.c cups-1.4.6/scheduler/printers.c +# include +# include +#endif /* WITH_LSPP */ -+ - #ifdef HAVE_DBUS - # include "colord.h" - #endif /* HAVE_DBUS */ -@@ -2329,6 +2336,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) + + /* + * Local functions... +@@ -2143,6 +2149,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) "username", "password" }; @@ -2754,7 +2746,7 @@ diff -urNp cups-1.4.6.old/scheduler/printers.c cups-1.4.6/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2459,6 +2473,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2280,6 +2293,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2800,7 +2792,7 @@ diff -urNp cups-1.4.6.old/scheduler/printers.c cups-1.4.6/scheduler/printers.c } p->raw = 0; -@@ -5605,7 +5658,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -5404,7 +5456,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-multilib.patch b/cups-multilib.patch index 21db4cb..3c6bc39 100644 --- a/cups-multilib.patch +++ b/cups-multilib.patch @@ -1,6 +1,7 @@ ---- cups-1.2.3/cups-config.in.multilib 2006-08-03 01:54:38.000000000 +0100 -+++ cups-1.2.3/cups-config.in 2006-08-30 15:47:35.000000000 +0100 -@@ -30,8 +30,10 @@ +diff -up cups-1.5b1/cups-config.in.multilib cups-1.5b1/cups-config.in +--- cups-1.5b1/cups-config.in.multilib 2010-06-16 02:48:25.000000000 +0200 ++++ cups-1.5b1/cups-config.in 2011-05-23 17:33:31.000000000 +0200 +@@ -22,8 +22,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ includedir=@includedir@ diff --git a/cups-no-export-ssllibs.patch b/cups-no-export-ssllibs.patch index 9effc8e..9be3c81 100644 --- a/cups-no-export-ssllibs.patch +++ b/cups-no-export-ssllibs.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4b2-svn8404/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.4b2-svn8404/config-scripts/cups-ssl.m4 ---- cups-1.4b2-svn8404/config-scripts/cups-ssl.m4.no-export-ssllibs 2009-02-17 17:45:27.000000000 +0000 -+++ cups-1.4b2-svn8404/config-scripts/cups-ssl.m4 2009-03-05 11:12:59.000000000 +0000 -@@ -110,7 +110,7 @@ fi +diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-ssl.m4 +--- cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200 ++++ cups-1.5b1/config-scripts/cups-ssl.m4 2011-05-23 17:47:27.000000000 +0200 +@@ -164,7 +164,7 @@ AC_SUBST(IPPALIASES) AC_SUBST(SSLFLAGS) AC_SUBST(SSLLIBS) diff --git a/cups-no-gzip-man.patch b/cups-no-gzip-man.patch index 4a08503..6786c44 100644 --- a/cups-no-gzip-man.patch +++ b/cups-no-gzip-man.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4b2-svn8404/config-scripts/cups-manpages.m4.no-gzip-man cups-1.4b2-svn8404/config-scripts/cups-manpages.m4 ---- cups-1.4b2-svn8404/config-scripts/cups-manpages.m4.no-gzip-man 2009-01-16 08:58:42.000000000 +0000 -+++ cups-1.4b2-svn8404/config-scripts/cups-manpages.m4 2009-03-05 11:11:12.000000000 +0000 +diff -up cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.5b1/config-scripts/cups-manpages.m4 +--- cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man 2011-05-12 07:21:56.000000000 +0200 ++++ cups-1.5b1/config-scripts/cups-manpages.m4 2011-05-23 17:25:50.000000000 +0200 @@ -69,10 +69,10 @@ case "$uname" in ;; Linux* | GNU* | Darwin*) diff --git a/cups-page-label.patch b/cups-page-label.patch deleted file mode 100644 index 518bc8e..0000000 --- a/cups-page-label.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff -up cups-1.4.4/filter/pstops.c.page-label cups-1.4.4/filter/pstops.c ---- cups-1.4.4/filter/pstops.c.page-label 2010-03-30 23:07:33.000000000 +0100 -+++ cups-1.4.4/filter/pstops.c 2010-06-18 09:36:18.239126341 +0100 -@@ -108,6 +108,7 @@ typedef struct /**** Document informa - int num_options; /* Number of document-wide options */ - cups_option_t *options; /* Document-wide options */ - int normal_landscape, /* Normal rotation for landscape? */ -+ orientation, /* Original orientation of the document */ - saw_eof, /* Saw the %%EOF comment? */ - slow_collate, /* Collate copies by hand? */ - slow_duplex, /* Duplex pages slowly? */ -@@ -2083,7 +2084,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu - * of the pages... - */ - -- if (Orientation & 1) -+ if (doc->orientation & 1) - write_label_prolog(doc, doc->page_label, PageBottom, - PageWidth - PageLength + PageTop, PageLength); - else -@@ -2091,7 +2092,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu - PageLength); - } - else -- write_label_prolog(doc, doc->page_label, PageBottom, PageTop, PageWidth); -+ { -+ switch (doc->orientation) -+ { -+ case 0 : -+ write_label_prolog(doc, doc->page_label, PageBottom, PageTop, -+ PageWidth); -+ break; -+ -+ case 1 : -+ write_label_prolog(doc, doc->page_label, PageLeft, PageRight, -+ PageLength); -+ break; -+ -+ case 2 : -+ write_label_prolog(doc, doc->page_label, PageLength - PageTop, -+ PageLength - PageBottom, PageWidth); -+ break; -+ -+ case 3 : -+ write_label_prolog(doc, doc->page_label, PageWidth - PageRight, -+ PageWidth - PageLeft, PageLength); -+ break; -+ } -+ } - } - - -@@ -2176,7 +2200,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum - case 1 : - if (doc->use_ESPshowpage) - { -- write_labels(doc, Orientation); -+ write_labels(doc, doc->orientation); - doc_puts(doc, "ESPshowpage\n"); - } - break; -@@ -2191,7 +2215,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum - * Rotate the labels back to portrait... - */ - -- write_labels(doc, Orientation - 1); -+ write_labels(doc, doc->orientation - 1); - } - else if (Orientation == 0) - { -@@ -2217,7 +2241,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum - default : - if (is_last_page(number) && doc->use_ESPshowpage) - { -- write_labels(doc, Orientation); -+ write_labels(doc, doc->orientation); - doc_puts(doc, "ESPshowpage\n"); - } - break; -@@ -2420,6 +2444,12 @@ set_pstops_options( - doc->new_bounding_box[3] = INT_MIN; - - /* -+ * Save original orientation of the document -+ */ -+ -+ doc->orientation = Orientation; -+ -+ /* - * AP_FIRSTPAGE_* and the corresponding non-first-page options. - */ - diff --git a/cups-peercred.patch b/cups-peercred.patch index 4e579b4..a106abb 100644 --- a/cups-peercred.patch +++ b/cups-peercred.patch @@ -1,7 +1,7 @@ -diff -up cups-1.3.5/scheduler/auth.c.peercred cups-1.3.5/scheduler/auth.c ---- cups-1.3.5/scheduler/auth.c.peercred 2008-02-05 16:52:20.000000000 +0000 -+++ cups-1.3.5/scheduler/auth.c 2008-02-05 18:20:06.000000000 +0000 -@@ -54,6 +54,7 @@ +diff -up cups-1.5b1/scheduler/auth.c.peercred cups-1.5b1/scheduler/auth.c +--- cups-1.5b1/scheduler/auth.c.peercred 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/auth.c 2011-05-23 18:00:18.000000000 +0200 +@@ -52,6 +52,7 @@ * Include necessary headers... */ diff --git a/cups-pid.patch b/cups-pid.patch index ab4ff84..23ffd47 100644 --- a/cups-pid.patch +++ b/cups-pid.patch @@ -1,6 +1,7 @@ ---- cups-1.1.21/scheduler/main.c.pid 2004-09-24 11:29:05.073748138 +0100 -+++ cups-1.1.21/scheduler/main.c 2004-09-24 11:44:35.826446564 +0100 -@@ -349,6 +349,8 @@ +diff -up cups-1.5b1/scheduler/main.c.pid cups-1.5b1/scheduler/main.c +--- cups-1.5b1/scheduler/main.c.pid 2011-05-18 22:44:16.000000000 +0200 ++++ cups-1.5b1/scheduler/main.c 2011-05-23 18:01:20.000000000 +0200 +@@ -311,6 +311,8 @@ main(int argc, /* I - Number of comm * Setup signal handlers for the parent... */ @@ -9,7 +10,7 @@ #ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */ sigset(SIGUSR1, parent_handler); sigset(SIGCHLD, parent_handler); -@@ -372,7 +374,7 @@ +@@ -334,7 +336,7 @@ main(int argc, /* I - Number of comm signal(SIGHUP, SIG_IGN); #endif /* HAVE_SIGSET */ @@ -18,7 +19,7 @@ { /* * OK, wait for the child to startup and send us SIGUSR1 or to crash -@@ -384,7 +386,15 @@ +@@ -346,7 +348,15 @@ main(int argc, /* I - Number of comm sleep(1); if (parent_signal == SIGUSR1) diff --git a/cups-res_init.patch b/cups-res_init.patch index 5dccf02..1dc110e 100644 --- a/cups-res_init.patch +++ b/cups-res_init.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.6/cups/http-addr.c.res_init cups-1.4.6/cups/http-addr.c ---- cups-1.4.6/cups/http-addr.c.res_init 2009-04-20 22:37:14.000000000 +0100 -+++ cups-1.4.6/cups/http-addr.c 2011-01-10 16:08:49.506358955 +0000 -@@ -253,7 +253,8 @@ httpAddrLookup( +diff -up cups-1.5b1/cups/http-addr.c.res_init cups-1.5b1/cups/http-addr.c +--- cups-1.5b1/cups/http-addr.c.res_init 2011-04-16 01:38:13.000000000 +0200 ++++ cups-1.5b1/cups/http-addr.c 2011-05-24 15:56:50.000000000 +0200 +@@ -256,7 +256,8 @@ httpAddrLookup( if (error) { @@ -11,10 +11,10 @@ diff -up cups-1.4.6/cups/http-addr.c.res_init cups-1.4.6/cups/http-addr.c cg->need_res_init = 1; return (httpAddrString(addr, name, namelen)); -diff -up cups-1.4.6/cups/http-addrlist.c.res_init cups-1.4.6/cups/http-addrlist.c ---- cups-1.4.6/cups/http-addrlist.c.res_init 2009-04-20 22:37:14.000000000 +0100 -+++ cups-1.4.6/cups/http-addrlist.c 2011-01-10 16:08:22.375947909 +0000 -@@ -373,7 +373,8 @@ httpAddrGetList(const char *hostname, /* +diff -up cups-1.5b1/cups/http-addrlist.c.res_init cups-1.5b1/cups/http-addrlist.c +--- cups-1.5b1/cups/http-addrlist.c.res_init 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/cups/http-addrlist.c 2011-05-24 15:56:50.000000000 +0200 +@@ -386,7 +386,8 @@ httpAddrGetList(const char *hostname, /* freeaddrinfo(results); } diff --git a/cups-ricoh-deviceid-oid.patch b/cups-ricoh-deviceid-oid.patch index 6a5b6a9..c148f95 100644 --- a/cups-ricoh-deviceid-oid.patch +++ b/cups-ricoh-deviceid-oid.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid cups-1.4.3/backend/snmp.c ---- cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid 2010-05-11 17:30:57.266120467 +0100 -+++ cups-1.4.3/backend/snmp.c 2010-05-11 17:31:16.267120141 +0100 -@@ -195,6 +195,7 @@ static const int LexmarkProductOID[] = { +diff -up cups-1.5b1/backend/snmp.c.ricoh-deviceid-oid cups-1.5b1/backend/snmp.c +--- cups-1.5b1/backend/snmp.c.ricoh-deviceid-oid 2011-05-24 17:29:48.000000000 +0200 ++++ cups-1.5b1/backend/snmp.c 2011-05-24 17:29:48.000000000 +0200 +@@ -188,6 +188,7 @@ static const int LexmarkProductOID[] = { static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; @@ -9,7 +9,7 @@ diff -up cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid cups-1.4.3/backend/snmp.c static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; static cups_array_t *DeviceURIs = NULL; static int HostNameLookups = 0; -@@ -1002,6 +1003,9 @@ read_snmp_response(int fd) /* I - SNMP +@@ -1005,6 +1006,9 @@ read_snmp_response(int fd) /* I - SNMP packet.community, CUPS_ASN1_GET_REQUEST, DEVICE_ID, LexmarkDeviceIdOID); _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, diff --git a/cups-serial.patch b/cups-serial.patch index 6e111f2..d17c9cb 100644 --- a/cups-serial.patch +++ b/cups-serial.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4b2/backend/serial.c.serial cups-1.4b2/backend/serial.c ---- cups-1.4b2/backend/serial.c.serial 2008-12-16 16:25:02.000000000 +0000 -+++ cups-1.4b2/backend/serial.c 2008-12-16 16:25:21.000000000 +0000 -@@ -74,6 +74,7 @@ +diff -up cups-1.5b1/backend/serial.c.serial cups-1.5b1/backend/serial.c +--- cups-1.5b1/backend/serial.c.serial 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/serial.c 2011-05-23 17:34:33.000000000 +0200 +@@ -75,6 +75,7 @@ #endif /* __APPLE__ */ #if defined(__linux) && defined(TIOCGSERIAL) diff --git a/cups-serverbin-compat.patch b/cups-serverbin-compat.patch index bf1bc99..0ca72fd 100644 --- a/cups-serverbin-compat.patch +++ b/cups-serverbin-compat.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.6/scheduler/conf.c.serverbin-compat cups-1.4.6/scheduler/conf.c ---- cups-1.4.6/scheduler/conf.c.serverbin-compat 2010-08-31 05:18:38.000000000 +0100 -+++ cups-1.4.6/scheduler/conf.c 2011-01-12 16:28:47.233270999 +0000 -@@ -488,6 +488,9 @@ cupsdReadConfiguration(void) +diff -up cups-1.5b1/scheduler/conf.c.serverbin-compat cups-1.5b1/scheduler/conf.c +--- cups-1.5b1/scheduler/conf.c.serverbin-compat 2011-05-20 06:24:54.000000000 +0200 ++++ cups-1.5b1/scheduler/conf.c 2011-05-23 17:20:33.000000000 +0200 +@@ -491,6 +491,9 @@ cupsdReadConfiguration(void) cupsdClearString(&ServerName); cupsdClearString(&ServerAdmin); cupsdSetString(&ServerBin, CUPS_SERVERBIN); @@ -11,7 +11,7 @@ diff -up cups-1.4.6/scheduler/conf.c.serverbin-compat cups-1.4.6/scheduler/conf. cupsdSetString(&RequestRoot, CUPS_REQUESTS); cupsdSetString(&CacheDir, CUPS_CACHEDIR); cupsdSetString(&DataDir, CUPS_DATADIR); -@@ -1331,7 +1334,12 @@ cupsdReadConfiguration(void) +@@ -1378,7 +1381,12 @@ cupsdReadConfiguration(void) * Read the MIME type and conversion database... */ @@ -23,10 +23,10 @@ diff -up cups-1.4.6/scheduler/conf.c.serverbin-compat cups-1.4.6/scheduler/conf. +#endif snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir); - MimeDatabase = mimeLoadTypes(NULL, mimedir); -diff -up cups-1.4.6/scheduler/conf.h.serverbin-compat cups-1.4.6/scheduler/conf.h ---- cups-1.4.6/scheduler/conf.h.serverbin-compat 2010-04-23 19:56:34.000000000 +0100 -+++ cups-1.4.6/scheduler/conf.h 2011-01-12 16:28:47.233270999 +0000 + MimeDatabase = mimeNew(); +diff -up cups-1.5b1/scheduler/conf.h.serverbin-compat cups-1.5b1/scheduler/conf.h +--- cups-1.5b1/scheduler/conf.h.serverbin-compat 2011-04-22 19:47:03.000000000 +0200 ++++ cups-1.5b1/scheduler/conf.h 2011-05-23 15:34:25.000000000 +0200 @@ -105,6 +105,10 @@ VAR char *ConfigurationFile VALUE(NULL) /* Root directory for scheduler */ *ServerBin VALUE(NULL), @@ -38,27 +38,27 @@ diff -up cups-1.4.6/scheduler/conf.h.serverbin-compat cups-1.4.6/scheduler/conf. *StateDir VALUE(NULL), /* Root directory for state data */ *RequestRoot VALUE(NULL), -diff -up cups-1.4.6/scheduler/env.c.serverbin-compat cups-1.4.6/scheduler/env.c ---- cups-1.4.6/scheduler/env.c.serverbin-compat 2009-06-15 18:13:52.000000000 +0100 -+++ cups-1.4.6/scheduler/env.c 2011-01-12 16:28:47.234270949 +0000 -@@ -87,8 +87,13 @@ cupsdInitEnv(void) - cupsdSetEnv("LD_LIBRARY_PATH", NULL); - cupsdSetEnv("LD_PRELOAD", NULL); - cupsdSetEnv("NLSPATH", NULL); +diff -up cups-1.5b1/scheduler/env.c.serverbin-compat cups-1.5b1/scheduler/env.c +--- cups-1.5b1/scheduler/env.c.serverbin-compat 2011-01-11 04:48:42.000000000 +0100 ++++ cups-1.5b1/scheduler/env.c 2011-05-23 17:07:17.000000000 +0200 +@@ -218,8 +218,13 @@ cupsdUpdateEnv(void) + set_if_undefined("LD_PRELOAD", NULL); + set_if_undefined("NLSPATH", NULL); + if (find_env("PATH") < 0) +#ifdef __x86_64__ -+ cupsdSetEnvf("PATH", "%s/filter:%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR -+ ":/bin:/usr/bin", ServerBin, ServerBin_compat); ++ cupsdSetEnvf("PATH", "%s/filter:%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR ++ ":/bin:/usr/bin", ServerBin, ServerBin_compat); +#else /* ! defined(__x86_64__) */ - cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR - ":/bin:/usr/bin", ServerBin); + cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR + ":/bin:/usr/bin", ServerBin); +#endif - cupsdSetEnv("SERVER_ADMIN", ServerAdmin); - cupsdSetEnv("SHLIB_PATH", NULL); - cupsdSetEnv("SOFTWARE", CUPS_MINIMAL); -diff -up cups-1.4.6/scheduler/ipp.c.serverbin-compat cups-1.4.6/scheduler/ipp.c ---- cups-1.4.6/scheduler/ipp.c.serverbin-compat 2010-10-06 21:07:44.000000000 +0100 -+++ cups-1.4.6/scheduler/ipp.c 2011-01-12 16:28:47.246270349 +0000 -@@ -2602,9 +2602,18 @@ add_printer(cupsd_client_t *con, /* I - + set_if_undefined("SERVER_ADMIN", ServerAdmin); + set_if_undefined("SHLIB_PATH", NULL); + set_if_undefined("SOFTWARE", CUPS_MINIMAL); +diff -up cups-1.5b1/scheduler/ipp.c.serverbin-compat cups-1.5b1/scheduler/ipp.c +--- cups-1.5b1/scheduler/ipp.c.serverbin-compat 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/ipp.c 2011-05-23 16:09:57.000000000 +0200 +@@ -2586,9 +2586,18 @@ add_printer(cupsd_client_t *con, /* I - * Could not find device in list! */ @@ -68,8 +68,8 @@ diff -up cups-1.4.6/scheduler/ipp.c.serverbin-compat cups-1.4.6/scheduler/ipp.c + if (access(srcfile, X_OK)) + { +#endif /* __x86_64__ */ - send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad device-uri scheme \"%s\"!"), - scheme); + send_ipp_status(con, IPP_NOT_POSSIBLE, + _("Bad device-uri scheme \"%s\"."), scheme); return; +#ifdef __x86_64__ + } @@ -77,10 +77,10 @@ diff -up cups-1.4.6/scheduler/ipp.c.serverbin-compat cups-1.4.6/scheduler/ipp.c } } -diff -up cups-1.4.6/scheduler/job.c.serverbin-compat cups-1.4.6/scheduler/job.c ---- cups-1.4.6/scheduler/job.c.serverbin-compat 2010-11-30 22:35:02.000000000 +0000 -+++ cups-1.4.6/scheduler/job.c 2011-01-12 16:31:43.515443755 +0000 -@@ -975,8 +975,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I +diff -up cups-1.5b1/scheduler/job.c.serverbin-compat cups-1.5b1/scheduler/job.c +--- cups-1.5b1/scheduler/job.c.serverbin-compat 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/job.c 2011-05-23 16:18:57.000000000 +0200 +@@ -1047,8 +1047,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I i ++, filter = (mime_filter_t *)cupsArrayNext(filters)) { if (filter->filter[0] != '/') @@ -115,8 +115,8 @@ diff -up cups-1.4.6/scheduler/job.c.serverbin-compat cups-1.4.6/scheduler/job.c else strlcpy(command, filter->filter, sizeof(command)); -@@ -1122,6 +1146,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I - cupsdClosePipe(job->print_pipes); +@@ -1199,6 +1223,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I + { cupsdClosePipe(job->back_pipes); cupsdClosePipe(job->side_pipes); +#ifdef __x86_64__ @@ -144,10 +144,10 @@ diff -up cups-1.4.6/scheduler/job.c.serverbin-compat cups-1.4.6/scheduler/job.c close(job->status_pipes[1]); job->status_pipes[1] = -1; -diff -up cups-1.4.6/scheduler/printers.c.serverbin-compat cups-1.4.6/scheduler/printers.c ---- cups-1.4.6/scheduler/printers.c.serverbin-compat 2010-09-22 19:35:07.000000000 +0100 -+++ cups-1.4.6/scheduler/printers.c 2011-01-12 16:28:47.261269599 +0000 -@@ -1114,9 +1114,19 @@ cupsdLoadAllPrinters(void) +diff -up cups-1.5b1/scheduler/printers.c.serverbin-compat cups-1.5b1/scheduler/printers.c +--- cups-1.5b1/scheduler/printers.c.serverbin-compat 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/scheduler/printers.c 2011-05-23 17:09:04.000000000 +0200 +@@ -1030,9 +1030,19 @@ cupsdLoadAllPrinters(void) * Backend does not exist, stop printer... */ @@ -167,28 +167,24 @@ diff -up cups-1.4.6/scheduler/printers.c.serverbin-compat cups-1.4.6/scheduler/p } } -@@ -3658,6 +3668,14 @@ add_printer_filter( +@@ -3621,8 +3631,20 @@ add_printer_filter( + else + snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program); - if (stat(filename, &fileinfo)) - { +#ifdef __x86_64__ ++ if (_cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser, ++ cupsdLogFCMessage, p) == _CUPS_FILE_CHECK_MISSING) { + snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat, -+ program); -+ if (stat(filename, &fileinfo)) -+ { ++ program); ++ if (_cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser, ++ cupsdLogFCMessage, p) == _CUPS_FILE_CHECK_MISSING) + snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, + program); -+#endif /* __x86_64__ */ - memset(&fileinfo, 0, sizeof(fileinfo)); ++ } ++#else /* ! defined(__x86_64__) */ + _cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser, + cupsdLogFCMessage, p); ++#endif + } - snprintf(p->state_message, sizeof(p->state_message), -@@ -3666,6 +3684,9 @@ add_printer_filter( - cupsdSetPrinterReasons(p, "+cups-missing-filter-warning"); - - cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message); -+#ifdef __x86_64__ -+ } -+#endif /* __x86_64__ */ - } - - /* + /* diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch index 0308676..02d46c9 100644 --- a/cups-snmp-quirks.patch +++ b/cups-snmp-quirks.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp-supplies.c ---- cups-1.4.3/backend/snmp-supplies.c.snmp-quirks 2009-11-20 01:27:57.000000000 +0000 -+++ cups-1.4.3/backend/snmp-supplies.c 2010-06-09 16:27:05.515019804 +0100 -@@ -38,6 +38,13 @@ +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 +@@ -47,6 +47,13 @@ /* @@ -15,7 +15,7 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- * Local structures... */ -@@ -57,6 +64,12 @@ typedef struct /**** Printer state ta +@@ -66,6 +73,12 @@ typedef struct /**** Printer state ta const char *keyword; /* IPP printer-state-reasons keyword */ } backend_state_t; @@ -28,16 +28,16 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- /* * Local globals... -@@ -68,6 +81,7 @@ static int current_state = -1; +@@ -77,6 +90,7 @@ static int current_state = -1; static int charset = -1; /* Character set for supply names */ static int num_supplies = 0; /* Number of supplies found */ -+static int quirks = 0; /* Printer quirks */ +++static int quirks = 0; /* Printer quirks */ static backend_supplies_t supplies[CUPS_MAX_SUPPLIES]; /* Supply information */ - -@@ -153,6 +167,15 @@ static const backend_state_t const print - { CUPS_TC_outputFull, "output-area-full-warning" } + static int supply_state = -1; +@@ -176,6 +190,15 @@ static const backend_state_t const suppl + { CUPS_TONER_EMPTY, "toner-empty-warning" } }; +static const quirk_name_t const quirk_names[] = @@ -52,17 +52,17 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- /* * Local functions... -@@ -208,6 +231,9 @@ backendSNMPSupplies( - if (i) - *ptr++ = ','; +@@ -229,6 +252,9 @@ backendSNMPSupplies( + for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr)) + { + if (quirks & QUIRK_CAPACITY) + supplies[i].max_capacity = 100; + if (supplies[i].max_capacity > 0) - sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity); + percent = 100 * supplies[i].level / supplies[i].max_capacity; else -@@ -305,6 +331,7 @@ backend_init_supplies( +@@ -401,6 +427,7 @@ backend_init_supplies( http_addr_t *addr) /* I - Printer address */ { int i, /* Looping var */ @@ -70,7 +70,7 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- type; /* Current marker type */ cups_file_t *cachefile; /* Cache file */ const char *cachedir; /* CUPS_CACHEDIR value */ -@@ -366,6 +393,7 @@ backend_init_supplies( +@@ -462,6 +489,7 @@ backend_init_supplies( current_state = -1; num_supplies = -1; charset = -1; @@ -78,7 +78,7 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- memset(supplies, 0, sizeof(supplies)); -@@ -381,6 +409,34 @@ backend_init_supplies( +@@ -477,6 +505,34 @@ backend_init_supplies( return; } diff --git a/cups-str3382.patch b/cups-str3382.patch index 14e9b27..2e8736d 100644 --- a/cups-str3382.patch +++ b/cups-str3382.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/cups/tempfile.c.str3382 cups-1.4.3/cups/tempfile.c ---- cups-1.4.3/cups/tempfile.c.str3382 2010-01-18 19:47:12.000000000 +0100 -+++ cups-1.4.3/cups/tempfile.c 2010-03-31 13:26:52.000000000 +0200 -@@ -35,6 +35,7 @@ +diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c +--- cups-1.5b1/cups/tempfile.c.str3382 2010-03-24 01:45:34.000000000 +0100 ++++ cups-1.5b1/cups/tempfile.c 2011-05-24 16:04:47.000000000 +0200 +@@ -33,6 +33,7 @@ # include #else # include @@ -9,7 +9,7 @@ diff -up cups-1.4.3/cups/tempfile.c.str3382 cups-1.4.3/cups/tempfile.c #endif /* WIN32 || __EMX__ */ -@@ -56,7 +57,7 @@ cupsTempFd(char *filename, /* I - Point +@@ -54,7 +55,7 @@ cupsTempFd(char *filename, /* I - Point char tmppath[1024]; /* Windows temporary directory */ DWORD curtime; /* Current time */ #else @@ -18,7 +18,7 @@ diff -up cups-1.4.3/cups/tempfile.c.str3382 cups-1.4.3/cups/tempfile.c #endif /* WIN32 */ -@@ -107,33 +108,25 @@ cupsTempFd(char *filename, /* I - Point +@@ -105,33 +106,25 @@ cupsTempFd(char *filename, /* I - Point snprintf(filename, len - 1, "%s/%05lx%08lx", tmpdir, GetCurrentProcessId(), curtime); diff --git a/cups-str3754.patch b/cups-str3754.patch deleted file mode 100644 index 148575a..0000000 --- a/cups-str3754.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up cups-1.4.5/scheduler/printers.c.printer-timeout cups-1.4.5/scheduler/printers.c ---- cups-1.4.5/scheduler/printers.c.printer-timeout 2010-12-16 14:42:07.048865052 +0000 -+++ cups-1.4.5/scheduler/printers.c 2010-12-16 14:43:05.325684376 +0000 -@@ -785,6 +785,7 @@ cupsdDeletePrinter( - */ - - cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, update); -+ p->state = IPP_PRINTER_STOPPED; - - if (p->job) - cupsdSetJobState(p->job, IPP_JOB_PENDING, CUPSD_JOB_FORCE, diff --git a/cups-strict-ppd-line-length.patch b/cups-strict-ppd-line-length.patch index d393728..b2697ec 100644 --- a/cups-strict-ppd-line-length.patch +++ b/cups-strict-ppd-line-length.patch @@ -1,7 +1,7 @@ -diff -up cups-1.3.5/cups/ppd.c~ cups-1.3.5/cups/ppd.c ---- cups-1.3.5/cups/ppd.c~ 2007-11-30 19:29:50.000000000 +0000 -+++ cups-1.3.5/cups/ppd.c 2008-01-09 12:08:48.000000000 +0000 -@@ -2801,7 +2801,7 @@ ppd_read(cups_file_t *fp, /* I - Fil +diff -up cups-1.5b1/cups/ppd.c.strict-ppd-line-length cups-1.5b1/cups/ppd.c +--- cups-1.5b1/cups/ppd.c.strict-ppd-line-length 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/cups/ppd.c 2011-05-24 15:46:13.000000000 +0200 +@@ -2786,7 +2786,7 @@ ppd_read(cups_file_t *fp, /* I - Fil *lineptr++ = ch; col ++; @@ -10,7 +10,7 @@ diff -up cups-1.3.5/cups/ppd.c~ cups-1.3.5/cups/ppd.c { /* * Line is too long... -@@ -2868,7 +2868,7 @@ ppd_read(cups_file_t *fp, /* I - Fil +@@ -2847,7 +2847,7 @@ ppd_read(cups_file_t *fp, /* I - Fil { col ++; @@ -19,7 +19,7 @@ diff -up cups-1.3.5/cups/ppd.c~ cups-1.3.5/cups/ppd.c { /* * Line is too long... -@@ -2931,7 +2931,7 @@ ppd_read(cups_file_t *fp, /* I - Fil +@@ -2906,7 +2906,7 @@ ppd_read(cups_file_t *fp, /* I - Fil { col ++; diff --git a/cups-1.1.16-system-auth.patch b/cups-system-auth.patch similarity index 59% rename from cups-1.1.16-system-auth.patch rename to cups-system-auth.patch index 7ce17e5..60117a9 100644 --- a/cups-1.1.16-system-auth.patch +++ b/cups-system-auth.patch @@ -1,22 +1,21 @@ -diff -up /dev/null cups-1.4.2/conf/cups.password-auth ---- /dev/null 2009-11-10 09:17:06.284031490 +0000 -+++ cups-1.4.2/conf/cups.password-auth 2009-11-10 11:15:42.750666738 +0000 +diff -up cups-1.5b1/conf/cups.password-auth.system-auth cups-1.5b1/conf/cups.password-auth +--- cups-1.5b1/conf/cups.password-auth.system-auth 2011-05-23 17:27:27.000000000 +0200 ++++ cups-1.5b1/conf/cups.password-auth 2011-05-23 17:27:27.000000000 +0200 @@ -0,0 +1,4 @@ +#%PAM-1.0 +# Use password-auth common PAM configuration for the daemon +auth include password-auth +account include password-auth -diff -up cups-1.4.2/conf/cups.system-auth cups-1.4.2/conf/cups -diff -up /dev/null cups-1.4.2/conf/cups.system-auth ---- /dev/null 2009-11-10 09:17:06.284031490 +0000 -+++ cups-1.4.2/conf/cups.system-auth 2009-11-10 11:15:42.750666738 +0000 +diff -up cups-1.5b1/conf/cups.system-auth.system-auth cups-1.5b1/conf/cups.system-auth +--- cups-1.5b1/conf/cups.system-auth.system-auth 2011-05-23 17:27:27.000000000 +0200 ++++ cups-1.5b1/conf/cups.system-auth 2011-05-23 17:27:27.000000000 +0200 @@ -0,0 +1,3 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth -diff -up cups-1.4.2/conf/Makefile.system-auth cups-1.4.2/conf/Makefile ---- cups-1.4.2/conf/Makefile.system-auth 2009-09-22 22:53:31.000000000 +0100 -+++ cups-1.4.2/conf/Makefile 2009-11-10 11:18:44.188791989 +0000 +diff -up cups-1.5b1/conf/Makefile.system-auth cups-1.5b1/conf/Makefile +--- cups-1.5b1/conf/Makefile.system-auth 2011-05-12 07:21:56.000000000 +0200 ++++ cups-1.5b1/conf/Makefile 2011-05-23 17:27:27.000000000 +0200 @@ -90,10 +90,16 @@ install-data: done -if test x$(PAMDIR) != x; then \ diff --git a/cups-texttops-rotate-page.patch b/cups-texttops-rotate-page.patch deleted file mode 100644 index 2b048cd..0000000 --- a/cups-texttops-rotate-page.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up cups-1.4.3/filter/texttops.c.texttops-rotate-page cups-1.4.3/filter/texttops.c ---- cups-1.4.3/filter/texttops.c.texttops-rotate-page 2008-11-06 16:42:18.000000000 +0000 -+++ cups-1.4.3/filter/texttops.c 2010-05-18 16:42:23.669940884 +0100 -@@ -97,6 +97,13 @@ WritePage(void) - - puts("gsave"); - -+ /* If we're opereating in Landscape (Orientation == 1 or Orientation == 3) -+ then rotate and translate the page */ -+ if ( Orientation & 1 ) { -+ printf ("%d rotate\n", (Orientation & 3) * 90 ); -+ printf("0 %.0f neg translate\n", PageLength); -+ } -+ - if (PrettyPrint) - printf("%d H\n", NumPages); - -@@ -212,7 +219,7 @@ WriteProlog(const char *title, /* I - T - - puts("%!PS-Adobe-3.0"); - printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength); -- printf("%%cupsRotation: %d\n", (Orientation & 3) * 90); -+ puts("%cupsRotation: 0"); - puts("%%Creator: texttops/" CUPS_SVERSION); - printf("%%%%CreationDate: %s\n", curdate); - WriteTextComment("Title", title); -@@ -549,6 +556,8 @@ WriteProlog(const char *title, /* I - T - puts("%%EndComments"); - - puts("%%BeginProlog"); -+ printf("%%%%Orientation: %s\n", -+ Orientation & 1 ? "Landscape" : "Portrait"); - - /* - * Download any missing fonts... diff --git a/cups-uri-compat.patch b/cups-uri-compat.patch index dd55b66..2520a5b 100644 --- a/cups-uri-compat.patch +++ b/cups-uri-compat.patch @@ -1,9 +1,9 @@ -diff -up cups-1.4rc1/backend/usb-unix.c.uri-compat cups-1.4rc1/backend/usb-unix.c ---- cups-1.4rc1/backend/usb-unix.c.uri-compat 2009-07-15 10:48:46.992133677 +0100 -+++ cups-1.4rc1/backend/usb-unix.c 2009-07-15 10:49:05.305008114 +0100 +diff -up cups-1.5b1/backend/usb-unix.c.uri-compat cups-1.5b1/backend/usb-unix.c +--- cups-1.5b1/backend/usb-unix.c.uri-compat 2011-05-24 15:59:05.000000000 +0200 ++++ cups-1.5b1/backend/usb-unix.c 2011-05-24 16:02:03.000000000 +0200 @@ -63,11 +63,34 @@ print_device(const char *uri, /* I - De int device_fd; /* USB device */ - size_t tbytes; /* Total number of bytes written */ + ssize_t tbytes; /* Total number of bytes written */ struct termios opts; /* Parallel port options */ + char *fixed_uri = strdup (uri); + char *p; @@ -37,7 +37,7 @@ diff -up cups-1.4rc1/backend/usb-unix.c.uri-compat cups-1.4rc1/backend/usb-unix. * Open the USB port device... */ @@ -107,10 +130,10 @@ print_device(const char *uri, /* I - De - strncasecmp(hostname, "Minolta", 7); + _cups_strncasecmp(hostname, "Minolta", 7); #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ - if (use_bc && !strncmp(uri, "usb:/dev/", 9)) diff --git a/cups-usb-paperout.patch b/cups-usb-paperout.patch index fb69145..f1f73f0 100644 --- a/cups-usb-paperout.patch +++ b/cups-usb-paperout.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4b1/backend/usb-unix.c.usb-paperout cups-1.4b1/backend/usb-unix.c ---- cups-1.4b1/backend/usb-unix.c.usb-paperout 2008-11-12 09:30:03.000000000 +0000 -+++ cups-1.4b1/backend/usb-unix.c 2008-11-12 09:30:03.000000000 +0000 +diff -up cups-1.5b1/backend/usb-unix.c.usb-paperout cups-1.5b1/backend/usb-unix.c +--- cups-1.5b1/backend/usb-unix.c.usb-paperout 2011-05-24 15:51:39.000000000 +0200 ++++ cups-1.5b1/backend/usb-unix.c 2011-05-24 15:51:39.000000000 +0200 @@ -30,6 +30,11 @@ #include @@ -13,7 +13,7 @@ diff -up cups-1.4b1/backend/usb-unix.c.usb-paperout cups-1.4b1/backend/usb-unix. /* * Local functions... -@@ -324,7 +329,19 @@ open_device(const char *uri, /* I - Dev +@@ -334,7 +339,19 @@ open_device(const char *uri, /* I - Dev if (!strncmp(uri, "usb:/dev/", 9)) #ifdef __linux { @@ -34,7 +34,7 @@ diff -up cups-1.4b1/backend/usb-unix.c.usb-paperout cups-1.4b1/backend/usb-unix. } else if (!strncmp(uri, "usb://", 6)) { -@@ -390,7 +407,14 @@ open_device(const char *uri, /* I - Dev +@@ -400,7 +417,14 @@ open_device(const char *uri, /* I - Dev if (!strcmp(uri, device_uri)) { /* diff --git a/cups-usb-parallel.patch b/cups-usb-parallel.patch index c683d89..96d6931 100644 --- a/cups-usb-parallel.patch +++ b/cups-usb-parallel.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.6/backend/ieee1284.c.usb-parallel cups-1.4.6/backend/ieee1284.c ---- cups-1.4.6/backend/ieee1284.c.usb-parallel 2010-04-10 00:42:09.000000000 +0200 -+++ cups-1.4.6/backend/ieee1284.c 2011-02-01 16:13:44.000000000 +0100 -@@ -55,7 +55,7 @@ backendGetDeviceID( +diff -up cups-1.5b1/backend/ieee1284.c.usb-parallel cups-1.5b1/backend/ieee1284.c +--- cups-1.5b1/backend/ieee1284.c.usb-parallel 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/ieee1284.c 2011-05-24 17:56:40.000000000 +0200 +@@ -65,7 +65,7 @@ backendGetDeviceID( # if defined(__sun) && defined(ECPPIOC_GETDEVID) struct ecpp_device_id did; /* Device ID buffer */ # endif /* __sun && ECPPIOC_GETDEVID */ @@ -10,7 +10,7 @@ diff -up cups-1.4.6/backend/ieee1284.c.usb-parallel cups-1.4.6/backend/ieee1284. DEBUG_printf(("backendGetDeviceID(fd=%d, device_id=%p, device_id_size=%d, " "make_model=%p, make_model_size=%d, scheme=\"%s\", " -@@ -176,7 +176,7 @@ backendGetDeviceID( +@@ -186,7 +186,7 @@ backendGetDeviceID( * and then limit the length to the size of our buffer... */ @@ -19,7 +19,7 @@ diff -up cups-1.4.6/backend/ieee1284.c.usb-parallel cups-1.4.6/backend/ieee1284. length = (((unsigned)device_id[1] & 255) << 8) + ((unsigned)device_id[0] & 255); -@@ -214,11 +214,16 @@ backendGetDeviceID( +@@ -224,11 +224,16 @@ backendGetDeviceID( device_id[length] = '\0'; } } @@ -37,7 +37,7 @@ diff -up cups-1.4.6/backend/ieee1284.c.usb-parallel cups-1.4.6/backend/ieee1284. # endif /* __linux */ # if defined(__sun) && defined(ECPPIOC_GETDEVID) -@@ -246,14 +251,24 @@ backendGetDeviceID( +@@ -256,14 +261,24 @@ backendGetDeviceID( # endif /* __sun && ECPPIOC_GETDEVID */ } diff --git a/cups.spec b/cups.spec index c9c6f93..d5ee7ad 100644 --- a/cups.spec +++ b/cups.spec @@ -10,13 +10,15 @@ # but we use lib for compatibility with 3rd party drivers (at upstream request). %global cups_serverbin %{_exec_prefix}/lib/cups +%global alphatag b1 + Summary: Common Unix Printing System Name: cups -Version: 1.4.6 -Release: 17%{?dist} +Version: 1.5 +Release: 0.1.%{alphatag}%{?dist} License: GPLv2 Group: System Environment/Daemons -Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 +Source: http://ftp.easysw.com/pub/cups/%{version}%{alphatag}/cups-%{version}%{alphatag}-source.tar.bz2 # Our initscript Source1: cups.init # Pixmap for desktop file @@ -37,7 +39,7 @@ Source8: cups.cron Source9: textonly.filter Source10: textonly.ppd Patch1: cups-no-gzip-man.patch -Patch2: cups-1.1.16-system-auth.patch +Patch2: cups-system-auth.patch Patch3: cups-multilib.patch Patch4: cups-serial.patch Patch5: cups-banners.patch @@ -47,34 +49,27 @@ Patch8: cups-direct-usb.patch Patch9: cups-lpr-help.patch Patch10: cups-peercred.patch Patch11: cups-pid.patch -Patch12: cups-page-label.patch -Patch13: cups-eggcups.patch -Patch14: cups-getpass.patch -Patch15: cups-driverd-timeout.patch -Patch16: cups-strict-ppd-line-length.patch -Patch17: cups-logrotate.patch -Patch18: cups-usb-paperout.patch -Patch19: cups-build.patch -Patch20: cups-res_init.patch -Patch21: cups-filter-debug.patch -Patch22: cups-uri-compat.patch -Patch23: cups-cups-get-classes.patch -Patch25: cups-str3382.patch -Patch26: cups-force-gnutls.patch -Patch27: cups-serialize-gnutls.patch -Patch29: cups-0755.patch -Patch31: cups-hostnamelookups.patch -Patch33: cups-snmp-quirks.patch -Patch34: cups-hp-deviceid-oid.patch -Patch35: cups-dnssd-deviceid.patch -Patch36: cups-ricoh-deviceid-oid.patch -Patch37: cups-texttops-rotate-page.patch -Patch38: cups-autotype-crash.patch -Patch39: cups-str3754.patch -Patch40: cups-avahi.patch -Patch41: cups-icc.patch -Patch42: cups-usb-parallel.patch -Patch43: cups-job-state-changed.patch +Patch12: cups-eggcups.patch +Patch13: cups-getpass.patch +Patch14: cups-driverd-timeout.patch +Patch15: cups-strict-ppd-line-length.patch +Patch16: cups-logrotate.patch +Patch17: cups-usb-paperout.patch +Patch18: cups-build.patch +Patch19: cups-res_init.patch +Patch20: cups-filter-debug.patch +Patch21: cups-uri-compat.patch +Patch22: cups-cups-get-classes.patch +Patch23: cups-str3382.patch +Patch24: cups-serialize-gnutls.patch +Patch25: cups-0755.patch +Patch26: cups-snmp-quirks.patch +Patch27: cups-hp-deviceid-oid.patch +Patch28: cups-dnssd-deviceid.patch +Patch29: cups-ricoh-deviceid-oid.patch +Patch30: cups-usb-parallel.patch +Patch31: cups-avahi.patch +Patch32: cups-icc.patch Patch100: cups-lspp.patch @@ -212,7 +207,7 @@ UNIX® operating systems. This is the package that provides a PHP module. %prep -%setup -q +%setup -q -n %{name}-%{version}%{alphatag} # Don't gzip man pages in the Makefile, let rpmbuild do it. %patch1 -p1 -b .no-gzip-man # Use the system pam configuration. @@ -235,66 +230,50 @@ module. %patch10 -p1 -b .peercred # Maintain a cupsd.pid file. %patch11 -p1 -b .pid -# Fix orientation of page labels. -%patch12 -p1 -b .page-label # Fix implementation of com.redhat.PrinterSpooler D-Bus object. -%patch13 -p1 -b .eggcups +%patch12 -p1 -b .eggcups # More sophisticated implementation of cupsGetPassword than getpass. -%patch14 -p1 -b .getpass +%patch13 -p1 -b .getpass # Increase driverd timeout to 70s to accommodate foomatic. -%patch15 -p1 -b .driverd-timeout +%patch14 -p1 -b .driverd-timeout # Only enforce maximum PPD line length when in strict mode. -%patch16 -p1 -b .strict-ppd-line-length +%patch15 -p1 -b .strict-ppd-line-length # Re-open the log if it has been logrotated under us. -%patch17 -p1 -b .logrotate +%patch16 -p1 -b .logrotate # Support for errno==ENOSPACE-based USB paper-out reporting. -%patch18 -p1 -b .usb-paperout +%patch17 -p1 -b .usb-paperout # Simplify the DNSSD parts so they can build using the compat library. -%patch19 -p1 -b .build +%patch18 -p1 -b .build # Re-initialise the resolver on failure in httpAddrGetList(). -%patch20 -p1 -b .res_init +%patch19 -p1 -b .res_init # Log extra debugging information if no filters are available. -%patch21 -p1 -b .filter-debug +%patch20 -p1 -b .filter-debug # Allow the usb backend to understand old-style URI formats. -%patch22 -p1 -b .uri-compat +%patch21 -p1 -b .uri-compat # Fix support for older CUPS servers in cupsGetDests. -%patch23 -p1 -b .cups-get-classes +%patch22 -p1 -b .cups-get-classes # Fix temporary filename creation. -%patch25 -p1 -b .str3382 -# Force the use of gnutls despite thread-safety concerns (bug #607159). -%patch26 -p1 -b .force-gnutls +%patch23 -p1 -b .str3382 # Perform locking for gnutls and avoid libgcrypt's broken # locking (bug #607159). -%patch27 -p1 -b .serialize-gnutls +#%patch24 -p1 -b .serialize-gnutls # Use mode 0755 for binaries and libraries where appropriate. -%patch29 -p1 -b .0755 -# Use numeric addresses for interfaces unless HostNameLookups are -# turned on (bug #583054). -%patch31 -p1 -b .hostnamelookups +%patch25 -p1 -b .0755 # Handle SNMP supply level quirks (bug #581825). -%patch33 -p1 -b .snmp-quirks +%patch26 -p1 -b .snmp-quirks # Add an SNMP query for HP's device ID OID (STR #3552). -%patch34 -p1 -b .hp-deviceid-oid +%patch27 -p1 -b .hp-deviceid-oid # Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". -%patch35 -p1 -b .dnssd-deviceid +%patch28 -p1 -b .dnssd-deviceid # Add an SNMP query for Ricoh's device ID OID (STR #3552). -%patch36 -p1 -b .ricoh-deviceid-oid -# Adjust texttops output to be in natural orientation (STR #3563). -# This fixes page-label orientation when texttops is used in the -# filter chain (bug #572338). -%patch37 -p1 -b .texttops-rotate-page -# Don't crash when MIME database could not be loaded (bug #610088). -%patch38 -p1 -b .autotype-crash -# Don't crash when job queued for printer that times out (bug #660604). -%patch39 -p1 -b .str3754 -# Avahi support in the dnssd backend. -%patch40 -p1 -b .avahi -# ICC colord support. -%patch41 -p1 -b .icc +%patch29 -p1 -b .ricoh-deviceid-oid # Till's patch to fix USB-Parallel adapter cable problem (bug #624564). -%patch42 -p1 -b .usb-parallel -# Fixed dbus notifier support for job-state-changed. -%patch43 -p1 -b .job-state-changed +%patch30 -p1 -b .usb-parallel + +# Avahi support in the dnssd backend. +#%patch31 -p1 -b .avahi +# ICC colord support. +#%patch32 -p1 -b .icc %if %lspp # LSPP support. @@ -321,6 +300,7 @@ rm "$f"~ aclocal -I config-scripts autoconf -I config-scripts + %build export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" # --enable-debug to avoid stripping binaries @@ -614,6 +594,16 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue May 24 2011 Jiri Popelka 1:1.5-0.1.b1 +- 1.5b1 + - removed cups-texttops-rotate-page.patch (#572338 is CANTFIX) + - removed cups-page-label.patch (#520141 seems to be CANTFIX) +- TODO: + - work-around STR#3846 + - remove OR port cups-serialize-gnutls.patch ??? (STR#3605) + - port avahi.patch + - port icc.patch + * Wed May 18 2011 Tim Waugh 1:1.4.6-17 - Package parallel port printer device nodes (bug #678804).