[cups] 1.6.1
Jiří Popelka
jpopelka at fedoraproject.org
Wed Aug 8 12:07:18 UTC 2012
commit 47ca1c0ae4f6e2291c670bc0e802e3bd0cf94fd6
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Wed Aug 8 13:28:28 2012 +0200
1.6.1
.gitignore | 1 +
cups-0755.patch | 22 +-
cups-avahi-1-config.patch | 42 --
cups-avahi-2-backend.patch | 1118 -------------------------------------
cups-avahi-3-timeouts.patch | 381 -------------
cups-avahi-4-poll.patch | 529 ------------------
cups-avahi-5-services.patch | 1272 -------------------------------------------
cups-cups-get-classes.patch | 2 +-
cups-dnssd-deviceid.patch | 70 ++--
cups-filter-debug.patch | 10 +-
cups-getpass.patch | 50 --
cups-icc.patch | 1042 -----------------------------------
cups-lspp.patch | 293 +++++-----
cups-no-gzip-man.patch | 8 +-
cups-res_init.patch | 30 +-
cups-serial.patch | 11 -
cups-snmp-quirks.patch | 115 ----
cups-systemd-socket.patch | 245 ++-------
cups.spec | 265 ++++------
pstopdf | 54 --
sources | 2 +-
textonly.filter | 124 -----
textonly.ppd | 47 --
23 files changed, 370 insertions(+), 5363 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bad004b..480bd49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,3 +52,4 @@ cups-1.4.4-source.tar.bz2
/cups-1.5.2-source.tar.bz2
/cups-1.5.3-source.tar.bz2
/cups-1.5.4-source.tar.bz2
+/cups-1.6.1-source.tar.bz2
diff --git a/cups-0755.patch b/cups-0755.patch
index dcb6255..b0df3a0 100644
--- a/cups-0755.patch
+++ b/cups-0755.patch
@@ -1,14 +1,14 @@
-diff -up cups-1.5.3/Makedefs.in.0755 cups-1.5.3/Makedefs.in
---- cups-1.5.3/Makedefs.in.0755 2012-05-15 16:51:31.000000000 +0200
-+++ cups-1.5.3/Makedefs.in 2012-05-15 16:52:59.246906315 +0200
-@@ -41,14 +41,14 @@ SHELL = /bin/sh
+diff -up cups-1.6b1/Makedefs.in.0755 cups-1.6b1/Makedefs.in
+--- cups-1.6b1/Makedefs.in.0755 2012-05-23 01:58:31.000000000 +0200
++++ cups-1.6b1/Makedefs.in 2012-05-25 16:09:40.545463214 +0200
+@@ -40,14 +40,14 @@ SHELL = /bin/sh
# Installation programs...
#
-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
+INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@
- INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
+ INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
INSTALL_DATA = $(INSTALL) -c -m 444
INSTALL_DIR = $(INSTALL) -d
-INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
@@ -19,15 +19,3 @@ diff -up cups-1.5.3/Makedefs.in.0755 cups-1.5.3/Makedefs.in
#
# Default user, group, and system groups for the scheduler...
-diff -up cups-1.5.3/scheduler/Makefile.0755 cups-1.5.3/scheduler/Makefile
---- cups-1.5.3/scheduler/Makefile.0755 2011-05-12 00:17:34.000000000 +0200
-+++ cups-1.5.3/scheduler/Makefile 2012-05-15 16:51:31.703516547 +0200
-@@ -213,7 +213,7 @@ install-data:
- install-exec:
- echo Installing programs in $(SBINDIR)...
- $(INSTALL_DIR) -m 755 $(SBINDIR)
-- $(INSTALL_BIN) -m 500 cupsd $(SBINDIR)
-+ $(INSTALL_BIN) -m 755 cupsd $(SBINDIR)
- $(INSTALL_BIN) cupsfilter $(SBINDIR)
- -if test "x`uname`" = xDarwin; then \
- $(INSTALL_DIR) $(BUILDROOT)/System/Library/Printers/Libraries; \
diff --git a/cups-cups-get-classes.patch b/cups-cups-get-classes.patch
index c998852..b0ffe1c 100644
--- a/cups-cups-get-classes.patch
+++ b/cups-cups-get-classes.patch
@@ -81,7 +81,7 @@ diff -up cups-1.5.0/cups/dest.c.cups-get-classes cups-1.5.0/cups/dest.c
+ */
+
+ if (get_classes)
-+ num_dests = _cupsGetDests (http, CUPS_GET_CLASSES, name, dests);
++ num_dests = _cupsGetDests (http, CUPS_GET_CLASSES, name, dests, 0, 0);
+
+ /*
* Return the count...
diff --git a/cups-dnssd-deviceid.patch b/cups-dnssd-deviceid.patch
index dedbcb2..b3c2b8e 100644
--- a/cups-dnssd-deviceid.patch
+++ b/cups-dnssd-deviceid.patch
@@ -1,38 +1,38 @@
-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);
+diff -up cups-1.6b1/backend/dnssd.c.dnssd-deviceid cups-1.6b1/backend/dnssd.c
+--- cups-1.6b1/backend/dnssd.c.dnssd-deviceid 2012-05-21 18:05:58.000000000 +0200
++++ cups-1.6b1/backend/dnssd.c 2012-05-25 16:27:49.226874427 +0200
+@@ -1181,15 +1181,22 @@ query_callback(
+ if (device->device_id)
+ free(device->device_id);
-+ if (device_id[0])
-+ {
-+ /* Mark this as the real device ID. */
-+ ptr = device_id + strlen(device_id);
-+ snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;");
-+ }
++ if (device_id[0])
++ {
++ /* Mark this as the real device ID. */
++ ptr = device_id + strlen(device_id);
++ snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;");
++ }
+
- if (!device_id[0] && strcmp(model, "Unknown"))
- {
- if (make_and_model[0])
-- 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 (!_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 (!_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)
- {
- /*
-@@ -835,7 +842,7 @@ query_callback(
- memcpy(make_and_model, model, ptr - model);
- make_and_model[ptr - model] = '\0';
+ if (!device_id[0] && strcmp(model, "Unknown"))
+ {
+ if (make_and_model[0])
+- 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 (!_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 (!_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)
+ {
+ /*
+@@ -1199,7 +1206,7 @@ query_callback(
+ memcpy(make_and_model, model, ptr - model);
+ make_and_model[ptr - model] = '\0';
-- 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, ptr + 1);
- }
- }
+- 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, ptr + 1);
+ }
+ }
diff --git a/cups-filter-debug.patch b/cups-filter-debug.patch
index 2a42343..96c82da 100644
--- a/cups-filter-debug.patch
+++ b/cups-filter-debug.patch
@@ -1,14 +1,14 @@
-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
+diff -up cups-1.6b1/scheduler/job.c.filter-debug cups-1.6b1/scheduler/job.c
+--- cups-1.6b1/scheduler/job.c.filter-debug 2012-05-25 16:06:01.000000000 +0200
++++ cups-1.6b1/scheduler/job.c 2012-05-25 16:07:46.309259511 +0200
+@@ -625,10 +625,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I
if (!filters)
{
+ mime_filter_t *current;
+
cupsdLogJob(job, CUPSD_LOG_ERROR,
- "Unable to convert file %d to printable format!",
+ "Unable to convert file %d to printable format.",
job->current_file);
+ cupsdLogJob(job, CUPSD_LOG_ERROR,
diff --git a/cups-lspp.patch b/cups-lspp.patch
index dbab270..d81ef06 100644
--- a/cups-lspp.patch
+++ b/cups-lspp.patch
@@ -1,9 +1,9 @@
-diff -up cups-1.5.2/config.h.in.lspp cups-1.5.2/config.h.in
---- cups-1.5.2/config.h.in.lspp 2012-02-15 13:02:38.423776301 +0000
-+++ cups-1.5.2/config.h.in 2012-02-15 13:02:38.438776307 +0000
-@@ -754,6 +754,12 @@
-
- #undef HAVE_XPC
+diff -up cups-1.6b1/config.h.in.lspp cups-1.6b1/config.h.in
+--- cups-1.6b1/config.h.in.lspp 2012-05-25 17:01:32.000000000 +0200
++++ cups-1.6b1/config.h.in 2012-05-25 17:03:16.889043298 +0200
+@@ -768,6 +768,13 @@ static __inline int _cups_abs(int i) { r
+ # endif /* __GNUC__ || __STDC_VERSION__ */
+ #endif /* !HAVE_ABS && !abs */
+/*
+ * Are we trying to meet LSPP requirements?
@@ -11,12 +11,13 @@ diff -up cups-1.5.2/config.h.in.lspp cups-1.5.2/config.h.in
+
+#undef WITH_LSPP
+
-
++
#endif /* !_CUPS_CONFIG_H_ */
-diff -up cups-1.5.2/config-scripts/cups-lspp.m4.lspp cups-1.5.2/config-scripts/cups-lspp.m4
---- cups-1.5.2/config-scripts/cups-lspp.m4.lspp 2012-02-15 13:02:38.438776307 +0000
-+++ cups-1.5.2/config-scripts/cups-lspp.m4 2012-02-15 13:02:38.438776307 +0000
+ /*
+diff -up cups-1.6b1/config-scripts/cups-lspp.m4.lspp cups-1.6b1/config-scripts/cups-lspp.m4
+--- cups-1.6b1/config-scripts/cups-lspp.m4.lspp 2012-05-25 17:01:32.852768495 +0200
++++ cups-1.6b1/config-scripts/cups-lspp.m4 2012-05-25 17:01:32.853768488 +0200
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
@@ -54,11 +55,11 @@ diff -up cups-1.5.2/config-scripts/cups-lspp.m4.lspp cups-1.5.2/config-scripts/c
+ ;;
+ esac
+fi
-diff -up cups-1.5.2/configure.in.lspp cups-1.5.2/configure.in
---- cups-1.5.2/configure.in.lspp 2012-02-15 13:02:38.424776301 +0000
-+++ cups-1.5.2/configure.in 2012-02-15 13:02:38.439776308 +0000
-@@ -42,6 +42,8 @@ sinclude(config-scripts/cups-defaults.m4
- sinclude(config-scripts/cups-pdf.m4)
+diff -up cups-1.6b1/configure.in.lspp cups-1.6b1/configure.in
+--- cups-1.6b1/configure.in.lspp 2012-05-25 17:01:32.000000000 +0200
++++ cups-1.6b1/configure.in 2012-05-25 17:04:03.994714943 +0200
+@@ -37,6 +37,8 @@ sinclude(config-scripts/cups-systemd.m4)
+ sinclude(config-scripts/cups-defaults.m4)
sinclude(config-scripts/cups-scripting.m4)
+sinclude(config-scripts/cups-lspp.m4)
@@ -66,9 +67,9 @@ diff -up cups-1.5.2/configure.in.lspp cups-1.5.2/configure.in
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
-diff -up cups-1.5.2/filter/common.c.lspp cups-1.5.2/filter/common.c
---- cups-1.5.2/filter/common.c.lspp 2011-05-20 04:49:49.000000000 +0100
-+++ cups-1.5.2/filter/common.c 2012-02-15 13:02:38.441776309 +0000
+diff -up cups-1.6b1/filter/common.c.lspp cups-1.6b1/filter/common.c
+--- cups-1.6b1/filter/common.c.lspp 2011-05-20 05:49:49.000000000 +0200
++++ cups-1.6b1/filter/common.c 2012-05-25 17:01:32.854768481 +0200
@@ -30,6 +30,12 @@
* Include necessary headers...
*/
@@ -237,10 +238,10 @@ diff -up cups-1.5.2/filter/common.c.lspp cups-1.5.2/filter/common.c
/*
-diff -up cups-1.5.2/filter/pstops.c.lspp cups-1.5.2/filter/pstops.c
---- cups-1.5.2/filter/pstops.c.lspp 2011-09-02 19:14:34.000000000 +0100
-+++ cups-1.5.2/filter/pstops.c 2012-02-15 13:02:38.441776310 +0000
-@@ -3259,6 +3259,18 @@ write_label_prolog(pstops_doc_t *doc, /*
+diff -up cups-1.6b1/filter/pstops.c.lspp cups-1.6b1/filter/pstops.c
+--- cups-1.6b1/filter/pstops.c.lspp 2012-04-23 21:19:19.000000000 +0200
++++ cups-1.6b1/filter/pstops.c 2012-05-25 17:01:32.855768474 +0200
+@@ -3202,6 +3202,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
@@ -259,7 +260,7 @@ diff -up cups-1.5.2/filter/pstops.c.lspp cups-1.5.2/filter/pstops.c
/*
-@@ -3281,6 +3293,124 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3224,6 +3236,124 @@ write_label_prolog(pstops_doc_t *doc, /*
return;
}
@@ -384,7 +385,7 @@ diff -up cups-1.5.2/filter/pstops.c.lspp cups-1.5.2/filter/pstops.c
/*
* Set the classification + page label string...
*/
-@@ -3359,7 +3489,10 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3302,7 +3432,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");
@@ -395,11 +396,11 @@ diff -up cups-1.5.2/filter/pstops.c.lspp cups-1.5.2/filter/pstops.c
/*
-diff -up cups-1.5.2/Makedefs.in.lspp cups-1.5.2/Makedefs.in
---- cups-1.5.2/Makedefs.in.lspp 2012-02-15 13:02:38.429776302 +0000
-+++ cups-1.5.2/Makedefs.in 2012-02-15 13:02:38.442776310 +0000
-@@ -159,7 +159,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f
- LEGACY_BACKENDS = @LEGACY_BACKENDS@
+diff -up cups-1.6b1/Makedefs.in.lspp cups-1.6b1/Makedefs.in
+--- cups-1.6b1/Makedefs.in.lspp 2012-05-25 17:01:32.000000000 +0200
++++ cups-1.6b1/Makedefs.in 2012-05-25 17:07:57.325088484 +0200
+@@ -146,7 +146,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f
+ @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ)
LINKCUPSIMAGE = @LINKCUPSIMAGE@
-LIBS = $(LINKCUPS) $(COMMONLIBS)
@@ -407,18 +408,18 @@ diff -up cups-1.5.2/Makedefs.in.lspp cups-1.5.2/Makedefs.in
OPTIM = @OPTIM@
OPTIONS =
PAMLIBS = @PAMLIBS@
-diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
---- cups-1.5.2/scheduler/client.c.lspp 2012-02-15 13:02:38.394776287 +0000
-+++ cups-1.5.2/scheduler/client.c 2012-02-15 13:02:38.444776310 +0000
-@@ -45,6 +45,7 @@
- * valid_host() - Is the Host: field valid?
- * write_file() - Send a file via HTTP.
- * write_pipe() - Flag that data is available on the CGI pipe.
-+ * client_pid_to_auid() - Get the audit login uid of the client.
+diff -up cups-1.6b1/scheduler/client.c.lspp cups-1.6b1/scheduler/client.c
+--- cups-1.6b1/scheduler/client.c.lspp 2012-05-08 00:41:30.000000000 +0200
++++ cups-1.6b1/scheduler/client.c 2012-05-25 17:13:38.947707163 +0200
+@@ -41,6 +41,7 @@
+ * valid_host() - Is the Host: field valid?
+ * write_file() - Send a file via HTTP.
+ * write_pipe() - Flag that data is available on the CGI pipe.
++ * client_pid_to_auid() - Get the audit login uid of the client.
*/
/*
-@@ -53,10 +54,17 @@
+@@ -49,10 +50,16 @@
#include "cupsd.h"
@@ -432,11 +433,10 @@ diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
+#include <selinux/context.h>
+#include <fcntl.h>
+#endif /* WITH_LSPP */
-+
/*
- * Local functions...
-@@ -354,6 +362,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
+ * Local globals...
+@@ -371,6 +378,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
}
#endif /* HAVE_TCPD_H */
@@ -493,8 +493,8 @@ diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
+
#ifdef AF_LOCAL
if (con->http.hostaddr->addr.sa_family == AF_LOCAL)
- cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s (Domain)",
-@@ -714,6 +773,13 @@ cupsdReadClient(cupsd_client_t *con) /*
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Accepted from %s (Domain)",
+@@ -678,6 +736,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 */
@@ -508,7 +508,7 @@ diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
status = HTTP_CONTINUE;
-@@ -2140,6 +2206,67 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -2126,6 +2191,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);
@@ -576,9 +576,9 @@ diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
}
if (con->http.state != HTTP_POST_SEND)
-@@ -4550,6 +4677,50 @@ make_certificate(cupsd_client_t *con) /*
- #endif /* HAVE_SSL */
-
+@@ -3581,6 +3707,49 @@ is_path_absolute(const char *path) /* I
+ return (1);
+ }
+#ifdef WITH_LSPP
+/*
@@ -623,13 +623,12 @@ diff -up cups-1.5.2/scheduler/client.c.lspp cups-1.5.2/scheduler/client.c
+ return uid;
+}
+#endif /* WITH_LSPP */
-+
+
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
- */
-diff -up cups-1.5.2/scheduler/client.h.lspp cups-1.5.2/scheduler/client.h
---- cups-1.5.2/scheduler/client.h.lspp 2012-02-15 13:02:38.430776303 +0000
-+++ cups-1.5.2/scheduler/client.h 2012-02-15 13:02:38.446776310 +0000
+diff -up cups-1.6b1/scheduler/client.h.lspp cups-1.6b1/scheduler/client.h
+--- cups-1.6b1/scheduler/client.h.lspp 2012-05-25 17:01:32.847768530 +0200
++++ cups-1.6b1/scheduler/client.h 2012-05-25 17:14:12.963470050 +0200
@@ -18,6 +18,13 @@
#endif /* HAVE_AUTHORIZATION_H */
@@ -644,7 +643,7 @@ diff -up cups-1.5.2/scheduler/client.h.lspp cups-1.5.2/scheduler/client.h
/*
* HTTP client structure...
*/
-@@ -61,6 +68,10 @@ struct cupsd_client_s
+@@ -63,6 +70,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
@@ -655,7 +654,7 @@ diff -up cups-1.5.2/scheduler/client.h.lspp cups-1.5.2/scheduler/client.h
};
#define HTTP(con) &((con)->http)
-@@ -133,6 +144,9 @@ extern void cupsdStartListening(void);
+@@ -135,6 +146,9 @@ extern void cupsdStartListening(void);
extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
@@ -663,12 +662,12 @@ diff -up cups-1.5.2/scheduler/client.h.lspp cups-1.5.2/scheduler/client.h
+extern uid_t client_pid_to_auid(pid_t clipid);
+#endif /* WITH_LSPP */
-
- /*
-diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
---- cups-1.5.2/scheduler/conf.c.lspp 2012-02-15 13:02:38.397776287 +0000
-+++ cups-1.5.2/scheduler/conf.c 2012-02-15 13:02:38.448776311 +0000
-@@ -31,6 +31,7 @@
+ #ifdef HAVE_SSL
+ extern int cupsdEndTLS(cupsd_client_t *con);
+diff -up cups-1.6b1/scheduler/conf.c.lspp cups-1.6b1/scheduler/conf.c
+--- cups-1.6b1/scheduler/conf.c.lspp 2012-05-25 17:01:32.778769011 +0200
++++ cups-1.6b1/scheduler/conf.c 2012-05-25 17:01:32.860768439 +0200
+@@ -32,6 +32,7 @@
* read_location() - Read a <Location path> definition.
* read_policy() - Read a <Policy name> definition.
* set_policy_defaults() - Set default policy values as needed.
@@ -676,7 +675,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
*/
/*
-@@ -56,6 +57,9 @@
+@@ -57,6 +58,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
@@ -686,7 +685,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
/*
* Configuration variable structure...
-@@ -173,6 +177,10 @@ static const cupsd_var_t variables[] =
+@@ -164,6 +168,10 @@ static const cupsd_var_t variables[] =
# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
{ "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME },
# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
@@ -697,7 +696,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
#endif /* HAVE_SSL */
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME },
-@@ -434,6 +442,9 @@ cupsdReadConfiguration(void)
+@@ -537,6 +545,9 @@ cupsdReadConfiguration(void)
const char *tmpdir; /* TMPDIR environment variable */
struct stat tmpinfo; /* Temporary directory info */
cupsd_policy_t *p; /* Policy */
@@ -707,7 +706,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
/*
-@@ -726,6 +737,25 @@ cupsdReadConfiguration(void)
+@@ -801,6 +812,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@@ -733,7 +732,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemotePort ? "enabled" : "disabled");
-@@ -1116,7 +1146,19 @@ cupsdReadConfiguration(void)
+@@ -1185,7 +1215,19 @@ cupsdReadConfiguration(void)
cupsdClearString(&Classification);
if (Classification)
@@ -753,7 +752,7 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
/*
* Check the MaxClients setting, and then allocate memory for it...
-@@ -3781,6 +3823,18 @@ read_location(cups_file_t *fp, /* I - C
+@@ -3423,6 +3465,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@@ -772,35 +771,36 @@ diff -up cups-1.5.2/scheduler/conf.c.lspp cups-1.5.2/scheduler/conf.c
/*
* 'read_policy()' - Read a <Policy name> definition.
-diff -up cups-1.5.2/scheduler/conf.h.lspp cups-1.5.2/scheduler/conf.h
---- cups-1.5.2/scheduler/conf.h.lspp 2012-02-15 13:02:38.320776250 +0000
-+++ cups-1.5.2/scheduler/conf.h 2012-02-15 13:02:38.450776313 +0000
-@@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL);
- VAR int SSLOptions VALUE(CUPSD_SSL_NONE);
+diff -up cups-1.6b1/scheduler/conf.h.lspp cups-1.6b1/scheduler/conf.h
+--- cups-1.6b1/scheduler/conf.h.lspp 2012-05-25 17:01:32.000000000 +0200
++++ cups-1.6b1/scheduler/conf.h 2012-05-25 17:16:20.522580884 +0200
+@@ -247,6 +247,13 @@ VAR int SSLOptions VALUE(CUPSD_SSL_NO
/* SSL/TLS options */
#endif /* HAVE_SSL */
+
+#ifdef WITH_LSPP
+VAR int AuditLog VALUE(-1),
+ /* File descriptor for audit */
+ PerPageLabels VALUE(TRUE);
+ /* Put the label on each page */
+#endif /* WITH_LSPP */
-
++
#ifdef HAVE_LAUNCHD
- VAR int LaunchdTimeout VALUE(DEFAULT_KEEPALIVE);
-@@ -261,6 +267,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL
- /* System group auth key */
- #endif /* HAVE_AUTHORIZATION_H */
+ VAR int LaunchdTimeout VALUE(10);
+ /* Time after which an idle cupsd will exit */
+@@ -265,6 +272,9 @@ int HaveServerCreds VALUE(0);
+ gss_cred_id_t ServerCreds; /* Server's GSS credentials */
+ #endif /* HAVE_GSSAPI */
+#ifdef WITH_LSPP
-+extern int is_lspp_config(void);
++extern int is_lspp_config(void);
+#endif /* WITH_LSPP */
/*
* Prototypes...
-diff -up cups-1.5.2/scheduler/cupsd.h.lspp cups-1.5.2/scheduler/cupsd.h
---- cups-1.5.2/scheduler/cupsd.h.lspp 2012-02-15 13:02:38.383776281 +0000
-+++ cups-1.5.2/scheduler/cupsd.h 2012-02-15 13:02:38.450776313 +0000
+diff -up cups-1.6b1/scheduler/cupsd.h.lspp cups-1.6b1/scheduler/cupsd.h
+--- cups-1.6b1/scheduler/cupsd.h.lspp 2012-05-21 19:40:22.000000000 +0200
++++ cups-1.6b1/scheduler/cupsd.h 2012-05-25 17:01:32.861768432 +0200
@@ -13,6 +13,8 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -832,10 +832,10 @@ diff -up cups-1.5.2/scheduler/cupsd.h.lspp cups-1.5.2/scheduler/cupsd.h
/*
* Some OS's don't have hstrerror(), most notably Solaris...
*/
-diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
---- cups-1.5.2/scheduler/ipp.c.lspp 2012-02-15 13:02:38.417776295 +0000
-+++ cups-1.5.2/scheduler/ipp.c 2012-02-15 13:02:38.454776315 +0000
-@@ -41,6 +41,7 @@
+diff -up cups-1.6b1/scheduler/ipp.c.lspp cups-1.6b1/scheduler/ipp.c
+--- cups-1.6b1/scheduler/ipp.c.lspp 2012-05-25 17:01:32.810768787 +0200
++++ cups-1.6b1/scheduler/ipp.c 2012-05-25 17:18:06.620841313 +0200
+@@ -35,6 +35,7 @@
* cancel_all_jobs() - Cancel all or selected print jobs.
* cancel_job() - Cancel a print job.
* cancel_subscription() - Cancel a subscription.
@@ -843,7 +843,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
* check_rss_recipient() - Check that we do not have a duplicate RSS
* feed URI.
* check_quotas() - Check quotas for a printer and user.
-@@ -106,6 +107,9 @@
+@@ -99,6 +100,9 @@
* validate_user() - Validate the user for the request.
*/
@@ -853,7 +853,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* Include necessary headers...
*/
-@@ -131,6 +135,14 @@ extern int mbr_check_membership_by_id(uu
+@@ -122,6 +126,14 @@ extern int mbr_check_membership_by_id(uu
# endif /* HAVE_MEMBERSHIPPRIV_H */
#endif /* __APPLE__ */
@@ -868,7 +868,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* Local functions...
-@@ -168,6 +180,9 @@ static void cancel_all_jobs(cupsd_client
+@@ -146,6 +158,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);
@@ -876,9 +876,9 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
+static int check_context(cupsd_client_t *con, cupsd_job_t *job);
+#endif /* WITH_LSPP */
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);
-@@ -1365,6 +1380,21 @@ add_job(cupsd_client_t *con, /* I - Cl
+ static void close_job(cupsd_client_t *con, ipp_attribute_t *uri);
+ static void copy_attrs(ipp_t *to, ipp_t *from, cups_array_t *ra,
+@@ -1285,6 +1300,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 */
@@ -900,7 +900,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
-@@ -1622,6 +1652,106 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1542,6 +1572,106 @@ add_job(cupsd_client_t *con, /* I - Cl
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
"Untitled");
@@ -1007,7 +1007,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
-@@ -1630,6 +1760,32 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1550,6 +1680,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
@@ -1037,10 +1037,10 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
+ }
+#endif /* WITH_LSPP */
+
- job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
- CUPS_PRINTER_REMOTE);
+ job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
job->attrs = con->request;
-@@ -1835,6 +1991,29 @@ add_job(cupsd_client_t *con, /* I - Cl
+ job->dirty = 1;
+@@ -1759,6 +1915,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]);
}
@@ -1070,7 +1070,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
job->job_sheets = attr;
-@@ -1865,6 +2044,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1789,6 +1968,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@@ -1080,7 +1080,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
-@@ -1883,6 +2065,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1807,6 +1989,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);
@@ -1090,7 +1090,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
-@@ -1903,6 +2088,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1827,6 +2012,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);
@@ -1100,7 +1100,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1943,8 +2131,52 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1867,8 +2055,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@@ -1153,7 +1153,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* See if we need to add the starting sheet...
-@@ -4709,6 +4941,111 @@ check_rss_recipient(
+@@ -3615,6 +3847,111 @@ check_rss_recipient(
}
@@ -1265,7 +1265,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
-@@ -5349,6 +5686,15 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4067,6 +4404,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@@ -1281,7 +1281,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -5384,6 +5730,82 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4102,6 +4448,82 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@@ -1364,7 +1364,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* Try the localized banner file under the subdirectory...
-@@ -5478,6 +5900,24 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4196,6 +4618,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@@ -1389,7 +1389,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
-@@ -7475,6 +7915,22 @@ get_job_attrs(cupsd_client_t *con, /* I
+@@ -6273,6 +6713,22 @@ get_job_attrs(cupsd_client_t *con, /* I
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
@@ -1412,7 +1412,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* Copy attributes...
*/
-@@ -7828,6 +8284,11 @@ get_jobs(cupsd_client_t *con, /* I - C
+@@ -6626,6 +7082,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
@@ -1424,7 +1424,7 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
if (count > 0)
ippAddSeparator(con->response);
-@@ -12287,6 +12748,11 @@ validate_user(cupsd_job_t *job, /* I
+@@ -11106,6 +11567,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@@ -1436,11 +1436,11 @@ diff -up cups-1.5.2/scheduler/ipp.c.lspp cups-1.5.2/scheduler/ipp.c
/*
* Check the username against the owner...
*/
-diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
---- cups-1.5.2/scheduler/job.c.lspp 2012-02-15 13:02:38.362776272 +0000
-+++ cups-1.5.2/scheduler/job.c 2012-02-15 13:02:38.457776315 +0000
-@@ -64,6 +64,9 @@
- * update_job_attrs() - Update the job-printer-* attributes.
+diff -up cups-1.6b1/scheduler/job.c.lspp cups-1.6b1/scheduler/job.c
+--- cups-1.6b1/scheduler/job.c.lspp 2012-05-25 17:01:32.824768691 +0200
++++ cups-1.6b1/scheduler/job.c 2012-05-25 17:22:50.856860012 +0200
+@@ -68,6 +68,9 @@
+ * update_job_attrs() - Update the job-printer-* attributes.
*/
+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
@@ -1449,7 +1449,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
/*
* Include necessary headers...
*/
-@@ -79,6 +82,14 @@
+@@ -83,6 +86,14 @@
# endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */
#endif /* __APPLE__ */
@@ -1464,7 +1464,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
/*
* Design Notes for Job Management
-@@ -519,6 +530,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
+@@ -580,6 +591,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
/* PRINTER_STATE_REASONS env var */
rip_max_cache[255];
/* RIP_MAX_CACHE env variable */
@@ -1479,7 +1479,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -1007,6 +1026,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
+@@ -1071,6 +1090,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
}
}
@@ -1547,8 +1547,8 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
-@@ -1728,6 +1808,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
- goto error;
+@@ -1845,6 +1925,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
+ ippSetString(job->attrs, &job->reasons, 0, "none");
}
+#ifdef WITH_LSPP
@@ -1568,9 +1568,9 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/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);
-@@ -2116,6 +2210,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
- char filename[1024], /* Job control filename */
- newfile[1024]; /* New job control filename */
+@@ -2235,6 +2329,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+ {
+ char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
+#ifdef WITH_LSPP
+ security_context_t spoolcon; /* context of the job control file */
@@ -1583,8 +1583,8 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -2135,6 +2237,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
- fchmod(cupsFileNumber(fp), 0600);
+@@ -2247,6 +2349,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+
fchown(cupsFileNumber(fp), RunUser, Group);
+#ifdef WITH_LSPP
@@ -1660,7 +1660,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -3525,6 +3697,18 @@ get_options(cupsd_job_t *job, /* I - Jo
+@@ -3735,6 +3907,18 @@ get_options(cupsd_job_t *job, /* I - Jo
banner_page)
continue;
@@ -1679,7 +1679,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
/*
* Otherwise add them to the list...
*/
-@@ -4159,6 +4343,19 @@ static void
+@@ -4457,6 +4641,19 @@ static void
start_job(cupsd_job_t *job, /* I - Job ID */
cupsd_printer_t *printer) /* I - Printer to print job */
{
@@ -1699,7 +1699,7 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))",
job, job->id, printer, printer->name);
-@@ -4288,6 +4485,108 @@ start_job(cupsd_job_t *job, /* I -
+@@ -4599,6 +4796,108 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
@@ -1808,9 +1808,9 @@ diff -up cups-1.5.2/scheduler/job.c.lspp cups-1.5.2/scheduler/job.c
/*
* Now start the first file in the job...
*/
-diff -up cups-1.5.2/scheduler/job.h.lspp cups-1.5.2/scheduler/job.h
---- cups-1.5.2/scheduler/job.h.lspp 2011-05-18 03:27:11.000000000 +0100
-+++ cups-1.5.2/scheduler/job.h 2012-02-15 13:02:38.459776316 +0000
+diff -up cups-1.6b1/scheduler/job.h.lspp cups-1.6b1/scheduler/job.h
+--- cups-1.6b1/scheduler/job.h.lspp 2012-05-23 03:36:50.000000000 +0200
++++ cups-1.6b1/scheduler/job.h 2012-05-25 17:23:41.802504888 +0200
@@ -13,6 +13,13 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -1825,10 +1825,10 @@ diff -up cups-1.5.2/scheduler/job.h.lspp cups-1.5.2/scheduler/job.h
/*
* Constants...
*/
-@@ -76,6 +83,10 @@ struct cupsd_job_s /**** Job request *
- void *profile; /* Security profile */
- cups_array_t *history; /* Debug log history */
+@@ -82,6 +89,10 @@ struct cupsd_job_s /**** Job request *
int progress; /* Printing progress */
+ int num_keywords; /* Number of PPD keywords */
+ cups_option_t *keywords; /* PPD keywords */
+#ifdef WITH_LSPP
+ security_context_t scon; /* Security context of job */
+ uid_t auid; /* Audit loginuid for this job */
@@ -1836,9 +1836,9 @@ diff -up cups-1.5.2/scheduler/job.h.lspp cups-1.5.2/scheduler/job.h
};
typedef struct cupsd_joblog_s /**** Job log message ****/
-diff -up cups-1.5.2/scheduler/main.c.lspp cups-1.5.2/scheduler/main.c
---- cups-1.5.2/scheduler/main.c.lspp 2012-02-15 13:02:38.436776304 +0000
-+++ cups-1.5.2/scheduler/main.c 2012-02-15 13:02:38.461776318 +0000
+diff -up cups-1.6b1/scheduler/main.c.lspp cups-1.6b1/scheduler/main.c
+--- cups-1.6b1/scheduler/main.c.lspp 2012-05-25 17:01:32.849768516 +0200
++++ cups-1.6b1/scheduler/main.c 2012-05-25 17:01:32.868768383 +0200
@@ -38,6 +38,8 @@
* usage() - Show scheduler usage.
*/
@@ -1858,7 +1858,7 @@ diff -up cups-1.5.2/scheduler/main.c.lspp cups-1.5.2/scheduler/main.c
/*
* Local functions...
-@@ -143,6 +148,9 @@ main(int argc, /* I - Number of comm
+@@ -138,6 +143,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 */
@@ -1868,7 +1868,7 @@ diff -up cups-1.5.2/scheduler/main.c.lspp cups-1.5.2/scheduler/main.c
#ifdef __sgi
cups_file_t *fp; /* Fake lpsched lock file */
struct stat statbuf; /* Needed for checking lpsched FIFO */
-@@ -472,6 +480,25 @@ main(int argc, /* I - Number of comm
+@@ -463,6 +471,25 @@ main(int argc, /* I - Number of comm
#endif /* DEBUG */
}
@@ -1894,7 +1894,7 @@ diff -up cups-1.5.2/scheduler/main.c.lspp cups-1.5.2/scheduler/main.c
/*
* Set the timezone info...
*/
-@@ -1246,6 +1273,11 @@ main(int argc, /* I - Number of comm
+@@ -1180,6 +1207,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
@@ -1906,9 +1906,9 @@ diff -up cups-1.5.2/scheduler/main.c.lspp cups-1.5.2/scheduler/main.c
return (!stop_scheduler);
}
-diff -up cups-1.5.2/scheduler/printers.c.lspp cups-1.5.2/scheduler/printers.c
---- cups-1.5.2/scheduler/printers.c.lspp 2012-02-15 13:02:38.420776300 +0000
-+++ cups-1.5.2/scheduler/printers.c 2012-02-15 13:02:38.463776320 +0000
+diff -up cups-1.6b1/scheduler/printers.c.lspp cups-1.6b1/scheduler/printers.c
+--- cups-1.6b1/scheduler/printers.c.lspp 2012-05-25 17:01:32.786768955 +0200
++++ cups-1.6b1/scheduler/printers.c 2012-05-25 17:24:11.144300359 +0200
@@ -56,6 +56,8 @@
* write_xml_string() - Write a string with XML escaping.
*/
@@ -1918,19 +1918,18 @@ diff -up cups-1.5.2/scheduler/printers.c.lspp cups-1.5.2/scheduler/printers.c
/*
* Include necessary headers...
*/
-@@ -84,6 +86,11 @@
- # include "colord.h"
- #endif /* HAVE_DBUS */
+@@ -80,6 +82,10 @@
+ # include <asl.h>
+ #endif /* __APPLE__ */
+#ifdef WITH_LSPP
+# include <libaudit.h>
+# include <selinux/context.h>
+#endif /* WITH_LSPP */
-+
+
/*
* Local functions...
- */
-@@ -2199,6 +2206,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2101,6 +2107,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
"username",
"password"
};
@@ -1944,7 +1943,7 @@ diff -up cups-1.5.2/scheduler/printers.c.lspp cups-1.5.2/scheduler/printers.c
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -2336,6 +2350,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2234,6 +2247,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}
@@ -1990,7 +1989,7 @@ diff -up cups-1.5.2/scheduler/printers.c.lspp cups-1.5.2/scheduler/printers.c
}
p->raw = 0;
-@@ -5546,7 +5599,6 @@ write_irix_state(cupsd_printer_t *p) /*
+@@ -5320,7 +5372,6 @@ write_irix_state(cupsd_printer_t *p) /*
}
#endif /* __sgi */
diff --git a/cups-no-gzip-man.patch b/cups-no-gzip-man.patch
index 6786c44..cabfcf1 100644
--- a/cups-no-gzip-man.patch
+++ b/cups-no-gzip-man.patch
@@ -1,10 +1,10 @@
-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
+diff -up cups-1.6b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.6b1/config-scripts/cups-manpages.m4
+--- cups-1.6b1/config-scripts/cups-manpages.m4.no-gzip-man 2012-04-23 19:26:57.000000000 +0200
++++ cups-1.6b1/config-scripts/cups-manpages.m4 2012-05-25 14:57:01.959845267 +0200
@@ -69,10 +69,10 @@ case "$uname" in
;;
Linux* | GNU* | Darwin*)
- # Linux, GNU Hurd, and Mac OS X
+ # Linux, GNU Hurd, and OS X
- MAN1EXT=1.gz
- MAN5EXT=5.gz
- MAN7EXT=7.gz
diff --git a/cups-res_init.patch b/cups-res_init.patch
index 1dc110e..94a81a4 100644
--- a/cups-res_init.patch
+++ b/cups-res_init.patch
@@ -1,7 +1,7 @@
-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(
+diff -up cups-1.6b1/cups/http-addr.c.res_init cups-1.6b1/cups/http-addr.c
+--- cups-1.6b1/cups/http-addr.c.res_init 2012-05-17 00:57:03.000000000 +0200
++++ cups-1.6b1/cups/http-addr.c 2012-05-25 15:51:51.323916352 +0200
+@@ -254,7 +254,8 @@ httpAddrLookup(
if (error)
{
@@ -11,16 +11,16 @@ diff -up cups-1.5b1/cups/http-addr.c.res_init cups-1.5b1/cups/http-addr.c
cg->need_res_init = 1;
return (httpAddrString(addr, name, namelen));
-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 -up cups-1.6b1/cups/http-addrlist.c.res_init cups-1.6b1/cups/http-addrlist.c
+--- cups-1.6b1/cups/http-addrlist.c.res_init 2012-04-23 19:26:57.000000000 +0200
++++ cups-1.6b1/cups/http-addrlist.c 2012-05-25 16:05:05.930377452 +0200
+@@ -540,7 +540,8 @@ httpAddrGetList(const char *hostname, /*
}
-- else if (error == EAI_FAIL)
-+ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA ||
-+ error == EAI_NONAME)
- cg->need_res_init = 1;
+ else
+ {
+- if (error == EAI_FAIL)
++ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA ||
++ error == EAI_NONAME)
+ cg->need_res_init = 1;
- #else
+ _cupsSetError(IPP_INTERNAL_ERROR, gai_strerror(error), 0);
diff --git a/cups-systemd-socket.patch b/cups-systemd-socket.patch
index 234555f..83fabdb 100644
--- a/cups-systemd-socket.patch
+++ b/cups-systemd-socket.patch
@@ -1,7 +1,7 @@
-diff -up cups-1.5.2/config.h.in.systemd-socket cups-1.5.2/config.h.in
---- cups-1.5.2/config.h.in.systemd-socket 2012-03-16 14:50:57.089449755 +0000
-+++ cups-1.5.2/config.h.in 2012-03-16 14:50:57.146449787 +0000
-@@ -503,6 +503,13 @@
+diff -up cups-1.6b1/config.h.in.systemd-socket cups-1.6b1/config.h.in
+--- cups-1.6b1/config.h.in.systemd-socket 2012-05-17 00:57:03.000000000 +0200
++++ cups-1.6b1/config.h.in 2012-05-28 11:16:35.657250584 +0200
+@@ -506,6 +506,13 @@
/*
@@ -15,9 +15,9 @@ diff -up cups-1.5.2/config.h.in.systemd-socket cups-1.5.2/config.h.in
* Various scripting languages...
*/
-diff -up cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.2/config-scripts/cups-systemd.m4
---- cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket 2012-03-16 14:50:57.146449787 +0000
-+++ cups-1.5.2/config-scripts/cups-systemd.m4 2012-03-16 14:50:57.146449787 +0000
+diff -up cups-1.6b1/config-scripts/cups-systemd.m4.systemd-socket cups-1.6b1/config-scripts/cups-systemd.m4
+--- cups-1.6b1/config-scripts/cups-systemd.m4.systemd-socket 2012-05-28 11:16:35.658250577 +0200
++++ cups-1.6b1/config-scripts/cups-systemd.m4 2012-05-28 11:16:35.658250577 +0200
@@ -0,0 +1,36 @@
+dnl
+dnl "$Id$"
@@ -55,18 +55,18 @@ diff -up cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.2/con
+dnl
+dnl "$Id$"
+dnl
-diff -up cups-1.5.2/configure.in.systemd-socket cups-1.5.2/configure.in
---- cups-1.5.2/configure.in.systemd-socket 2011-08-31 02:36:33.000000000 +0100
-+++ cups-1.5.2/configure.in 2012-03-16 14:50:57.146449787 +0000
-@@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4)
+diff -up cups-1.6b1/configure.in.systemd-socket cups-1.6b1/configure.in
+--- cups-1.6b1/configure.in.systemd-socket 2012-04-23 19:26:57.000000000 +0200
++++ cups-1.6b1/configure.in 2012-05-28 11:16:35.658250577 +0200
+@@ -33,6 +33,7 @@ sinclude(config-scripts/cups-pam.m4)
sinclude(config-scripts/cups-largefile.m4)
sinclude(config-scripts/cups-dnssd.m4)
sinclude(config-scripts/cups-launchd.m4)
+sinclude(config-scripts/cups-systemd.m4)
sinclude(config-scripts/cups-defaults.m4)
- sinclude(config-scripts/cups-pdf.m4)
sinclude(config-scripts/cups-scripting.m4)
-@@ -71,6 +72,9 @@ AC_OUTPUT(Makedefs
+
+@@ -66,6 +67,9 @@ AC_OUTPUT(Makedefs
conf/snmp.conf
cups-config
data/testprint
@@ -76,10 +76,10 @@ diff -up cups-1.5.2/configure.in.systemd-socket cups-1.5.2/configure.in
desktop/cups.desktop
doc/help/ref-cupsd-conf.html
doc/help/standard.html
-diff -up cups-1.5.2/cups/usersys.c.systemd-socket cups-1.5.2/cups/usersys.c
---- cups-1.5.2/cups/usersys.c.systemd-socket 2012-03-16 14:50:57.054449734 +0000
-+++ cups-1.5.2/cups/usersys.c 2012-03-16 14:50:57.148449788 +0000
-@@ -778,7 +778,7 @@ cups_read_client_conf(
+diff -up cups-1.6b1/cups/usersys.c.systemd-socket cups-1.6b1/cups/usersys.c
+--- cups-1.6b1/cups/usersys.c.systemd-socket 2012-04-23 19:26:57.000000000 +0200
++++ cups-1.6b1/cups/usersys.c 2012-05-28 11:16:35.659250570 +0200
+@@ -975,7 +975,7 @@ cups_read_client_conf(
struct stat sockinfo; /* Domain socket information */
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
@@ -88,9 +88,9 @@ diff -up cups-1.5.2/cups/usersys.c.systemd-socket cups-1.5.2/cups/usersys.c
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
else
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
-diff -up cups-1.5.2/data/cups.path.in.systemd-socket cups-1.5.2/data/cups.path.in
---- cups-1.5.2/data/cups.path.in.systemd-socket 2012-03-16 14:50:57.148449788 +0000
-+++ cups-1.5.2/data/cups.path.in 2012-03-16 14:50:57.148449788 +0000
+diff -up cups-1.6b1/data/cups.path.in.systemd-socket cups-1.6b1/data/cups.path.in
+--- cups-1.6b1/data/cups.path.in.systemd-socket 2012-05-28 11:16:35.659250570 +0200
++++ cups-1.6b1/data/cups.path.in 2012-05-28 11:16:35.659250570 +0200
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
@@ -100,9 +100,9 @@ diff -up cups-1.5.2/data/cups.path.in.systemd-socket cups-1.5.2/data/cups.path.i
+
+[Install]
+WantedBy=multi-user.target
-diff -up cups-1.5.2/data/cups.service.in.systemd-socket cups-1.5.2/data/cups.service.in
---- cups-1.5.2/data/cups.service.in.systemd-socket 2012-03-16 14:50:57.149449788 +0000
-+++ cups-1.5.2/data/cups.service.in 2012-03-16 14:50:57.149449788 +0000
+diff -up cups-1.6b1/data/cups.service.in.systemd-socket cups-1.6b1/data/cups.service.in
+--- cups-1.6b1/data/cups.service.in.systemd-socket 2012-05-28 11:16:35.659250570 +0200
++++ cups-1.6b1/data/cups.service.in 2012-05-28 11:16:35.659250570 +0200
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
@@ -114,9 +114,9 @@ diff -up cups-1.5.2/data/cups.service.in.systemd-socket cups-1.5.2/data/cups.ser
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
-diff -up cups-1.5.2/data/cups.socket.in.systemd-socket cups-1.5.2/data/cups.socket.in
---- cups-1.5.2/data/cups.socket.in.systemd-socket 2012-03-16 14:50:57.150449788 +0000
-+++ cups-1.5.2/data/cups.socket.in 2012-03-16 14:50:57.150449788 +0000
+diff -up cups-1.6b1/data/cups.socket.in.systemd-socket cups-1.6b1/data/cups.socket.in
+--- cups-1.6b1/data/cups.socket.in.systemd-socket 2012-05-28 11:16:35.660250563 +0200
++++ cups-1.6b1/data/cups.socket.in 2012-05-28 11:16:35.660250563 +0200
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printing Service Sockets
@@ -126,10 +126,10 @@ diff -up cups-1.5.2/data/cups.socket.in.systemd-socket cups-1.5.2/data/cups.sock
+
+[Install]
+WantedBy=sockets.target
-diff -up cups-1.5.2/data/Makefile.systemd-socket cups-1.5.2/data/Makefile
---- cups-1.5.2/data/Makefile.systemd-socket 2011-05-12 06:21:56.000000000 +0100
-+++ cups-1.5.2/data/Makefile 2012-03-16 14:50:57.151449789 +0000
-@@ -112,6 +112,12 @@ install-data:
+diff -up cups-1.6b1/data/Makefile.systemd-socket cups-1.6b1/data/Makefile
+--- cups-1.6b1/data/Makefile.systemd-socket 2011-08-27 11:23:01.000000000 +0200
++++ cups-1.6b1/data/Makefile 2012-05-28 11:16:35.660250563 +0200
+@@ -100,6 +100,12 @@ install-data:
$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
done
$(INSTALL_DIR) -m 755 $(DATADIR)/profiles
@@ -142,8 +142,8 @@ diff -up cups-1.5.2/data/Makefile.systemd-socket cups-1.5.2/data/Makefile
#
-@@ -159,6 +165,9 @@ uninstall:
- -$(RMDIR) $(DATADIR)/charsets
+@@ -143,6 +149,9 @@ uninstall:
+ -$(RMDIR) $(DATADIR)/data
-$(RMDIR) $(DATADIR)/banners
-$(RMDIR) $(DATADIR)
+ for file in $(SYSTEMD_UNITS); do \
@@ -152,10 +152,10 @@ diff -up cups-1.5.2/data/Makefile.systemd-socket cups-1.5.2/data/Makefile
#
-diff -up cups-1.5.2/Makedefs.in.systemd-socket cups-1.5.2/Makedefs.in
---- cups-1.5.2/Makedefs.in.systemd-socket 2012-03-16 14:50:57.081449751 +0000
-+++ cups-1.5.2/Makedefs.in 2012-03-16 14:50:57.152449790 +0000
-@@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
+diff -up cups-1.6b1/Makedefs.in.systemd-socket cups-1.6b1/Makedefs.in
+--- cups-1.6b1/Makedefs.in.systemd-socket 2012-05-28 11:16:35.648250647 +0200
++++ cups-1.6b1/Makedefs.in 2012-05-28 11:16:35.660250563 +0200
+@@ -134,11 +134,13 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
CXXLIBS = @CXXLIBS@
DBUS_NOTIFIER = @DBUS_NOTIFIER@
DBUS_NOTIFIERLIBS = @DBUS_NOTIFIERLIBS@
@@ -163,15 +163,13 @@ diff -up cups-1.5.2/Makedefs.in.systemd-socket cups-1.5.2/Makedefs.in
DNSSD_BACKEND = @DNSSD_BACKEND@
DSOFLAGS = -L../cups @DSOFLAGS@
DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
-@@ -151,6 +152,7 @@ FONTS = @FONTS@
- IMGLIBS = @IMGLIBS@
- IMGFILTERS = @IMGFILTERS@
+ DNSSDLIBS = @DNSSDLIBS@
LAUNCHDLIBS = @LAUNCHDLIBS@
+SDLIBS = @SDLIBS@
LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
-L../scheduler @LDARCHFLAGS@ \
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
-@@ -267,6 +269,7 @@ PAMFILE = @PAMFILE@
+@@ -229,6 +231,7 @@ PAMFILE = @PAMFILE@
DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@
DBUSDIR = @DBUSDIR@
@@ -179,10 +177,10 @@ diff -up cups-1.5.2/Makedefs.in.systemd-socket cups-1.5.2/Makedefs.in
#
-diff -up cups-1.5.2/scheduler/client.h.systemd-socket cups-1.5.2/scheduler/client.h
---- cups-1.5.2/scheduler/client.h.systemd-socket 2011-03-25 21:25:38.000000000 +0000
-+++ cups-1.5.2/scheduler/client.h 2012-03-16 14:50:57.153449791 +0000
-@@ -75,6 +75,9 @@ typedef struct
+diff -up cups-1.6b1/scheduler/client.h.systemd-socket cups-1.6b1/scheduler/client.h
+--- cups-1.6b1/scheduler/client.h.systemd-socket 2012-03-22 21:30:20.000000000 +0100
++++ cups-1.6b1/scheduler/client.h 2012-05-28 11:16:35.661250556 +0200
+@@ -77,6 +77,9 @@ typedef struct
int fd; /* File descriptor for this server */
http_addr_t address; /* Bind address of socket */
http_encryption_t encryption; /* To encrypt or not to encrypt... */
@@ -192,99 +190,9 @@ diff -up cups-1.5.2/scheduler/client.h.systemd-socket cups-1.5.2/scheduler/clien
} cupsd_listener_t;
-diff -up cups-1.5.2/scheduler/dirsvc.c.systemd-socket cups-1.5.2/scheduler/dirsvc.c
---- cups-1.5.2/scheduler/dirsvc.c.systemd-socket 2012-03-16 14:50:57.112449768 +0000
-+++ cups-1.5.2/scheduler/dirsvc.c 2012-03-16 14:50:57.155449792 +0000
-@@ -1512,7 +1512,7 @@ cupsdStartBrowsing(void)
- }
- }
-
-- if (BrowseSocket >= 0)
-+ if (BrowseSocket >= 0 && !BrowseSocketIsSystemd)
- {
- /*
- * Bind the socket to browse port...
-@@ -1556,13 +1556,17 @@ cupsdStartBrowsing(void)
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to set broadcast mode - %s.",
- strerror(errno));
-
-+ if (!BrowseSocketIsSystemd)
-+ {
- #ifdef WIN32
-- closesocket(BrowseSocket);
-+ closesocket(BrowseSocket);
- #else
-- close(BrowseSocket);
-+ close(BrowseSocket);
- #endif /* WIN32 */
-
-- BrowseSocket = -1;
-+ BrowseSocket = -1;
-+ }
-+
- BrowseLocalProtocols &= ~BROWSE_CUPS;
- BrowseRemoteProtocols &= ~BROWSE_CUPS;
-
-@@ -1885,15 +1889,22 @@ cupsdStopBrowsing(void)
- if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS) &&
- BrowseSocket >= 0)
- {
-- /*
-- * Close the socket and remove it from the input selection set.
-- */
-+ if (!BrowseSocketIsSystemd)
-+ {
-+ /*
-+ * Close the socket.
-+ */
-
- #ifdef WIN32
-- closesocket(BrowseSocket);
-+ closesocket(BrowseSocket);
- #else
-- close(BrowseSocket);
-+ close(BrowseSocket);
- #endif /* WIN32 */
-+ }
-+
-+ /*
-+ * Remove it from the input selection set.
-+ */
-
- cupsdRemoveSelect(BrowseSocket);
- BrowseSocket = -1;
-@@ -5693,11 +5704,14 @@ update_cups_browse(void)
- strerror(errno));
- cupsdLogMessage(CUPSD_LOG_ERROR, "CUPS browsing turned off.");
-
-+ if (!BrowseSocketIsSystemd)
-+ {
- #ifdef WIN32
-- closesocket(BrowseSocket);
-+ closesocket(BrowseSocket);
- #else
-- close(BrowseSocket);
-+ close(BrowseSocket);
- #endif /* WIN32 */
-+ }
-
- cupsdRemoveSelect(BrowseSocket);
- BrowseSocket = -1;
-diff -up cups-1.5.2/scheduler/dirsvc.h.systemd-socket cups-1.5.2/scheduler/dirsvc.h
---- cups-1.5.2/scheduler/dirsvc.h.systemd-socket 2012-03-16 14:50:57.113449769 +0000
-+++ cups-1.5.2/scheduler/dirsvc.h 2012-03-16 14:50:57.157449792 +0000
-@@ -100,6 +100,8 @@ VAR int Browsing VALUE(TRUE),
- /* Short names for remote printers? */
- BrowseSocket VALUE(-1),
- /* Socket for browsing */
-+ BrowseSocketIsSystemd VALUE(0),
-+ /* BrowseSocket is systemd-provided? */
- BrowsePort VALUE(IPP_PORT),
- /* Port number for broadcasts */
- BrowseInterval VALUE(DEFAULT_INTERVAL),
-diff -up cups-1.5.2/scheduler/listen.c.systemd-socket cups-1.5.2/scheduler/listen.c
---- cups-1.5.2/scheduler/listen.c.systemd-socket 2011-04-16 00:38:13.000000000 +0100
-+++ cups-1.5.2/scheduler/listen.c 2012-03-16 14:50:57.158449792 +0000
+diff -up cups-1.6b1/scheduler/listen.c.systemd-socket cups-1.6b1/scheduler/listen.c
+--- cups-1.6b1/scheduler/listen.c.systemd-socket 2011-04-16 01:38:13.000000000 +0200
++++ cups-1.6b1/scheduler/listen.c 2012-05-28 11:16:35.661250556 +0200
@@ -401,7 +401,11 @@ cupsdStopListening(void)
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
@@ -298,9 +206,9 @@ diff -up cups-1.5.2/scheduler/listen.c.systemd-socket cups-1.5.2/scheduler/liste
{
#ifdef WIN32
closesocket(lis->fd);
-diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
---- cups-1.5.2/scheduler/main.c.systemd-socket 2012-03-16 14:50:57.121449773 +0000
-+++ cups-1.5.2/scheduler/main.c 2012-03-16 14:51:55.409483636 +0000
+diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c
+--- cups-1.6b1/scheduler/main.c.systemd-socket 2012-05-28 11:16:35.612250897 +0200
++++ cups-1.6b1/scheduler/main.c 2012-05-28 12:49:32.698375139 +0200
@@ -26,6 +26,8 @@
* launchd_checkin() - Check-in with launchd and collect the listening
* fds.
@@ -331,7 +239,7 @@ diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
static void parent_handler(int sig);
static void process_children(void);
static void sigchld_handler(int sig);
-@@ -537,6 +546,13 @@ main(int argc, /* I - Number of comm
+@@ -528,6 +537,13 @@ main(int argc, /* I - Number of comm
}
#endif /* HAVE_LAUNCHD */
@@ -345,7 +253,7 @@ diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
/*
* Startup the server...
*/
-@@ -759,6 +775,15 @@ main(int argc, /* I - Number of comm
+@@ -738,6 +754,15 @@ main(int argc, /* I - Number of comm
}
#endif /* HAVE_LAUNCHD */
@@ -361,7 +269,7 @@ diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
/*
* Startup the server...
*/
-@@ -1584,6 +1609,139 @@ launchd_checkout(void)
+@@ -1516,6 +1541,102 @@ launchd_checkout(void)
}
#endif /* HAVE_LAUNCHD */
@@ -403,43 +311,6 @@ diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
+
+ if (!r)
+ {
-+ if (Browsing &&
-+ ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS))
-+ {
-+ r = sd_is_socket(fd, AF_UNSPEC, SOCK_DGRAM, 0);
-+ if (r < 0)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Unable to verify socket type - %s",
-+ strerror(-r));
-+ continue;
-+ }
-+
-+ if (r)
-+ {
-+ /*
-+ * This is the browse socket.
-+ */
-+
-+ char addrstr[256];
-+ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen))
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Unable to get local address - %s",
-+ strerror(errno));
-+ continue;
-+ }
-+
-+ httpAddrString (&addr, addrstr, sizeof (addrstr));
-+ BrowseSocket = fd;
-+ BrowseSocketIsSystemd = 1;
-+ cupsdLogMessage(CUPSD_LOG_DEBUG,
-+ "systemd_checkin: Matched browse (port %d) with fd %d:%s...",
-+ BrowsePort, fd, addrstr);
-+ continue;
-+ }
-+
-+ }
+ cupsdLogMessage(CUPSD_LOG_ERROR,
+ "systemd_checkin: Socket not of the right type");
+ continue;
@@ -501,10 +372,10 @@ diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c
/*
* 'parent_handler()' - Catch USR1/CHLD signals...
-diff -up cups-1.5.2/scheduler/Makefile.systemd-socket cups-1.5.2/scheduler/Makefile
---- cups-1.5.2/scheduler/Makefile.systemd-socket 2012-03-16 14:50:57.130449778 +0000
-+++ cups-1.5.2/scheduler/Makefile 2012-03-16 14:50:57.160449794 +0000
-@@ -382,7 +382,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
+diff -up cups-1.6b1/scheduler/Makefile.systemd-socket cups-1.6b1/scheduler/Makefile
+--- cups-1.6b1/scheduler/Makefile.systemd-socket 2012-05-21 19:40:22.000000000 +0200
++++ cups-1.6b1/scheduler/Makefile 2012-05-28 11:16:35.663250542 +0200
+@@ -371,7 +371,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
$(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
$(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
@@ -513,12 +384,12 @@ diff -up cups-1.5.2/scheduler/Makefile.systemd-socket cups-1.5.2/scheduler/Makef
cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
-@@ -390,7 +390,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
+@@ -379,7 +379,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
$(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
- $(LIBWRAP)
-+ $(LIBWRAP) $(SDLIBS)
++ $(LIBWRAP) $(SDLIBS)
+ tls.o: tls-darwin.c tls-gnutls.c tls-openssl.c
- #
diff --git a/cups.spec b/cups.spec
index fc8178a..1601e45 100644
--- a/cups.spec
+++ b/cups.spec
@@ -1,5 +1,3 @@
-%global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
-
%global use_alternatives 1
%global lspp 1
@@ -11,15 +9,13 @@
Summary: Common Unix Printing System
Name: cups
-Version: 1.5.4
+Version: 1.6.1
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
# Pixmap for desktop file
Source2: cupsprinter.png
-# LSPP-required ps->pdf filter
-Source4: pstopdf
# xinetd config file for cups-lpd service
Source5: cups-lpd
# Logrotate configuration
@@ -28,14 +24,11 @@ Source6: cups.logrotate
Source7: ncp.backend
# Cron-based tmpwatch for /var/spool/cups/tmp
Source8: cups.cron
-# Filter and PPD for textonly printing
-Source9: textonly.filter
-Source10: textonly.ppd
Source11: macros.cups
Patch1: cups-no-gzip-man.patch
Patch2: cups-system-auth.patch
Patch3: cups-multilib.patch
-Patch4: cups-serial.patch
+
Patch5: cups-banners.patch
Patch6: cups-serverbin-compat.patch
Patch7: cups-no-export-ssllibs.patch
@@ -44,31 +37,24 @@ Patch9: cups-lpr-help.patch
Patch10: cups-peercred.patch
Patch11: cups-pid.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
+#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
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-avahi-1-config.patch
-Patch31: cups-avahi-2-backend.patch
-Patch32: cups-avahi-3-timeouts.patch
-Patch33: cups-avahi-4-poll.patch
-Patch34: cups-avahi-5-services.patch
-
-Patch35: cups-icc.patch
-Patch36: cups-systemd-socket.patch
+Patch30: cups-systemd-socket.patch
Patch100: cups-lspp.patch
@@ -76,6 +62,7 @@ Epoch: 1
Url: http://www.cups.org/
Requires: /sbin/chkconfig /sbin/service
+Requires: %{name}-filesystem = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%if %use_alternatives
Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat
@@ -97,16 +84,12 @@ Conflicts: kdelibs < 6:3.5.2-6
BuildRequires: pam-devel pkgconfig
BuildRequires: gnutls-devel libacl-devel
BuildRequires: openldap-devel
-BuildRequires: make >= 1:3.80
-BuildRequires: php-devel, pcre-devel
-BuildRequires: libjpeg-devel
-BuildRequires: libpng-devel
-BuildRequires: libtiff-devel
BuildRequires: libusb1-devel
BuildRequires: krb5-devel
BuildRequires: avahi-devel
-BuildRequires: poppler-utils
BuildRequires: systemd-units, systemd-devel
+BuildRequires: dbus-devel
+BuildRequires: automake
# Make sure we get postscriptdriver tags.
BuildRequires: python-cups
@@ -116,13 +99,7 @@ BuildRequires: libselinux-devel >= 1.23
BuildRequires: audit-libs-devel >= 1.1
%endif
-# -fstack-protector-all requires GCC 4.0.1
-BuildRequires: gcc >= 4.0.1
-
-BuildRequires: automake
-
-BuildRequires: dbus-devel >= 0.90
-Requires: dbus >= 0.90
+Requires: dbus
# Requires tmpwatch for the cron.daily script (bug #218901).
Requires: tmpwatch
@@ -136,8 +113,6 @@ Requires(post): systemd-sysv
# Requires working PrivateTmp (bug #807672)
Requires(pre): systemd >= 37-14
-Requires: poppler-utils
-
# We ship udev rules which use setfacl.
Requires: systemd
Requires: acl
@@ -161,6 +136,11 @@ Summary: Common Unix Printing System - libraries
Group: System Environment/Libraries
License: LGPLv2
+%package filesystem
+Summary: Common Unix Printing System - directory layout
+Group: System Environment/Base
+BuildArch: noarch
+
%package lpd
Summary: Common Unix Printing System - lpd emulation
Group: System Environment/Daemons
@@ -168,47 +148,39 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: xinetd
-%package php
-Summary: Common Unix Printing System - php module
-Group: Development/Languages
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: %{name}-libs = %{epoch}:%{version}-%{release}
-Requires: php(zend-abi) = %{php_zend_api}
-Requires: php(api) = %{php_core_api}
-
%package ipptool
Summary: Common Unix Printing System - tool for performing IPP requests
Group: System Environment/Daemons
-Requires: %{name}-libs = %{epoch}:%{version}-%{release}
+Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description
-The Common UNIX Printing System provides a portable printing layer for
-UNIX® operating systems. It has been developed by Easy Software Products
-to promote a standard printing solution for all UNIX vendors and users.
-CUPS provides the System V and Berkeley command-line interfaces.
+The Common UNIX Printing System provides a portable printing layer for
+UNIX® operating systems. It has been developed by Easy Software Products
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
%description devel
-The Common UNIX Printing System provides a portable printing layer for
+The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This is the development package for creating
additional printer drivers, and other CUPS services.
%description libs
-The Common UNIX Printing System provides a portable printing layer for
-UNIX® operating systems. It has been developed by Easy Software Products
-to promote a standard printing solution for all UNIX vendors and users.
-CUPS provides the System V and Berkeley command-line interfaces.
+The Common UNIX Printing System provides a portable printing layer for
+UNIX® operating systems. It has been developed by Easy Software Products
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
The cups-libs package provides libraries used by applications to use CUPS
natively, without needing the lp/lpr commands.
-%description lpd
-The Common UNIX Printing System provides a portable printing layer for
-UNIX® operating systems. This is the package that provides standard
-lpd emulation.
+%description filesystem
+The Common UNIX Printing System provides a portable printing layer for
+UNIX® operating systems. This package provides some directories which are
+required by other packages that add CUPS drivers (i.e. filters, backends etc.).
-%description php
+%description lpd
The Common UNIX Printing System provides a portable printing layer for
-UNIX® operating systems. This is the package that provides a PHP
-module.
+UNIX® operating systems. This is the package that provides standard
+lpd emulation.
%description ipptool
Sends IPP requests to the specified URI and tests and/or displays the results.
@@ -221,8 +193,7 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch2 -p1 -b .system-auth
# Prevent multilib conflict in cups-config script.
%patch3 -p1 -b .multilib
-# Fix compilation of serial backend.
-%patch4 -p1 -b .serial
+
# Ignore rpm save/new files in the banners directory.
%patch5 -p1 -b .banners
# Use compatibility fallback path for ServerBin.
@@ -239,8 +210,7 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch11 -p1 -b .pid
# Fix implementation of com.redhat.PrinterSpooler D-Bus object.
%patch12 -p1 -b .eggcups
-# More sophisticated implementation of cupsGetPassword than getpass.
-%patch13 -p1 -b .getpass
+
# Increase driverd timeout to 70s to accommodate foomatic (bug #744715).
%patch14 -p1 -b .driverd-timeout
# Only enforce maximum PPD line length when in strict mode.
@@ -250,8 +220,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
# Support for errno==ENOSPACE-based USB paper-out reporting.
%patch17 -p1 -b .usb-paperout
# Simplify the DNSSD parts so they can build using the compat library.
-%patch18 -p1 -b .build
-# Re-initialise the resolver on failure in httpAddrGetList().
+#%%patch18 -p1 -b .build
+# Re-initialise the resolver on failure in httpAddrGetList() (bug #567353).
%patch19 -p1 -b .res_init
# Log extra debugging information if no filters are available.
%patch20 -p1 -b .filter-debug
@@ -263,8 +233,7 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch23 -p1 -b .str3382
# Use mode 0755 for binaries and libraries where appropriate.
%patch25 -p1 -b .0755
-# Handle SNMP supply level quirks (bug #581825).
-%patch26 -p1 -b .snmp-quirks
+
# Add an SNMP query for HP's device ID OID (STR #3552).
%patch27 -p1 -b .hp-deviceid-oid
# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
@@ -272,27 +241,23 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
# Add an SNMP query for Ricoh's device ID OID (STR #3552).
%patch29 -p1 -b .ricoh-deviceid-oid
-# Avahi support:
-# - discovery in the dnssd backend
-# - service announcement in the scheduler
-%patch30 -p1 -b .avahi-1-config
-%patch31 -p1 -b .avahi-2-backend
-%patch32 -p1 -b .avahi-3-timeouts
-%patch33 -p1 -b .avahi-4-poll
-%patch34 -p1 -b .avahi-5-services
-
-# ICC colord support.
-%patch35 -p1 -b .icc
-
# Add support for systemd socket activation (patch from Lennart
# Poettering).
-%patch36 -p1 -b .systemd-socket
+%patch30 -p1 -b .systemd-socket
%if %lspp
# LSPP support.
%patch100 -p1 -b .lspp
%endif
+# We want to use the PDF workflow in principle with one exception when the input
+# is PostScript and the printer is a native PostScript printer.
+# To avoid the PS -> PDF -> PS conversion (costs 66),
+# set the cost factor of pstops to 65.
+# This forth-and-back conversion sometimes produces PostScript files which are
+# too big for the printer's memory resulting in not getting printed.
+sed -i -r -e '/\spstops$/ { s/66/65/ }' conf/mime.convs.in
+
sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
cp %{SOURCE5} cups-lpd.real
@@ -301,15 +266,11 @@ perl -pi -e "s,\@LIBDIR\@,%{_libdir},g" cups-lpd.real
# Let's look at the compilation command lines.
perl -pi -e "s,^.SILENT:,," Makedefs.in
-# Fix locale code for Norwegian (bug #520379).
-mv locale/cups_no.po locale/cups_nb.po
-
f=CREDITS.txt
mv "$f" "$f"~
iconv -f MACINTOSH -t UTF-8 "$f"~ > "$f"
rm "$f"~
-# Rebuild configure script for --enable-avahi.
aclocal -I config-scripts
autoconf -I config-scripts
@@ -320,10 +281,12 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1"
%if %lspp
--enable-lspp \
%endif
- --with-log-file-perm=0600 --enable-relro \
- --with-pdftops=pdftops \
+ --with-cupsd-file-perm=0755 \
+ --with-log-file-perm=0600 \
+ --enable-relro \
--with-dbusdir=%{_sysconfdir}/dbus-1 \
- --with-php=/usr/bin/php-cgi --enable-avahi \
+ --with-php=/usr/bin/php-cgi \
+ --enable-avahi \
--enable-threads --enable-gnutls \
localedir=%{_datadir}/locale
@@ -333,9 +296,6 @@ make %{?_smp_mflags}
%install
make BUILDROOT=$RPM_BUILD_ROOT install
-# Serial backend needs to run as root (bug #212577).
-chmod 700 $RPM_BUILD_ROOT%{cups_serverbin}/backend/serial
-
rm -rf $RPM_BUILD_ROOT%{_initddir} \
$RPM_BUILD_ROOT%{_sysconfdir}/init.d \
$RPM_BUILD_ROOT%{_sysconfdir}/rc?.d
@@ -365,13 +325,6 @@ install -c -m 644 cups-lpd.real $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd
install -c -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups
install -c -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp
install -c -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups
-install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{cups_serverbin}/filter/textonly
-install -c -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd
-
-# Ship pstopdf for LSPP systems to deal with malicious postscript
-%if %lspp
-install -c -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{cups_serverbin}/filter
-%endif
# Ship an rpm macro for where to put driver executables.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
@@ -394,13 +347,9 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ppd
rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat?
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop
rm -rf $RPM_BUILD_ROOT%{_datadir}/icons
-
-# Put the php config bit into place
-%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/php.d
-%{__cat} << __EOF__ > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/%{name}.ini
-; Enable %{name} extension module
-extension=phpcups.so
-__EOF__
+# these are shipped with cups-filters
+rm -rf $RPM_BUILD_ROOT%{_datadir}/cups/banners
+rm -f $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint
# install /usr/lib/tmpfiles.d/cups.conf (bug #656566)
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d
@@ -430,20 +379,9 @@ s:.*\('%{_datadir}'/\)\([^/_]\+\)\(.*\.po$\):%lang(\2) \1\2\3:
/^\([^%].*\)/d
' > %{name}.lang
-%check
-# Minimal load test of php extension
-LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir} \
-php --no-php-ini \
- --define extension_dir=${RPM_BUILD_ROOT}%{php_extdir} \
- --define extension=phpcups.so \
- --modules | grep phpcups
-
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl enable cups.{service,socket,path} >/dev/null 2>&1 || :
-fi
+%{systemd_post} %{name}.path %{name}.socket %{name}.service
# Remove old-style certs directory; new-style is /var/run
# (see bug #194581 for why this is necessary).
@@ -472,24 +410,21 @@ exit 0
%postun libs -p /sbin/ldconfig
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable %{name}.path %{name}.socket %{name}.service >/dev/null 2>&1 || :
- /bin/systemctl stop %{name}.path %{name}.socket %{name}.service >/dev/null 2>&1 || :
+%{systemd_preun} %{name}.path %{name}.socket %{name}.service
+
%if %use_alternatives
+if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --remove print %{_bindir}/lpr.cups
-%endif
fi
+%endif
+
exit 0
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ]; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+%{systemd_postun_with_restart} %{name}.service
exit 0
+
%triggerun -- %{name} < 1:1.5.0-22
# This package is allowed to autostart; however, the upgrade trigger
# in Fedora 16 final failed to actually do this. Do it now as a
@@ -546,26 +481,17 @@ rm -f %{cups_serverbin}/backend/smb
%config(noreplace) %{_sysconfdir}/pam.d/cups
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
%dir %{_datadir}/%{name}/www
+%dir %{_datadir}/%{name}/www/ca
%dir %{_datadir}/%{name}/www/es
-%dir %{_datadir}/%{name}/www/eu
%dir %{_datadir}/%{name}/www/ja
-%dir %{_datadir}/%{name}/www/pl
-%dir %{_datadir}/%{name}/www/ru
%{_datadir}/%{name}/www/images
%{_datadir}/%{name}/www/*.css
%doc %{_datadir}/%{name}/www/index.html
%doc %{_datadir}/%{name}/www/help
%doc %{_datadir}/%{name}/www/robots.txt
-%doc %{_datadir}/%{name}/www/de/index.html
+%doc %{_datadir}/%{name}/www/ca/index.html
%doc %{_datadir}/%{name}/www/es/index.html
-%doc %{_datadir}/%{name}/www/eu/index.html
-%doc %{_datadir}/%{name}/www/fr/index.html
-%doc %{_datadir}/%{name}/www/hu/index.html
-%doc %{_datadir}/%{name}/www/id/index.html
-%doc %{_datadir}/%{name}/www/it/index.html
%doc %{_datadir}/%{name}/www/ja/index.html
-%doc %{_datadir}/%{name}/www/pl/index.html
-%doc %{_datadir}/%{name}/www/ru/index.html
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%{_unitdir}/%{name}.path
@@ -574,54 +500,34 @@ rm -f %{cups_serverbin}/backend/smb
%{_bindir}/cancel*
%{_bindir}/lp*
%{_bindir}/ppd*
-%dir %{cups_serverbin}
-%{cups_serverbin}/backend
+%{cups_serverbin}/backend/*
%{cups_serverbin}/cgi-bin
%dir %{cups_serverbin}/daemon
-%{cups_serverbin}/daemon/cups-polld
%{cups_serverbin}/daemon/cups-deviced
%{cups_serverbin}/daemon/cups-driverd
%{cups_serverbin}/daemon/cups-exec
%{cups_serverbin}/notifier
-%{cups_serverbin}/filter
+%{cups_serverbin}/filter/*
%{cups_serverbin}/monitor
-%{cups_serverbin}/driver
%{_mandir}/man1/cancel*
%{_mandir}/man1/cupstest*
%{_mandir}/man1/lp*
%{_mandir}/man1/ppd*
%{_mandir}/man[578]/*
%{_sbindir}/*
-%dir %{_datadir}/cups
-%dir %{_datadir}/cups/banners
-%{_datadir}/cups/banners/*
-%{_datadir}/cups/charsets
-%{_datadir}/cups/data
-%{_datadir}/cups/fonts
-%{_datadir}/cups/model
%dir %{_datadir}/cups/templates
%{_datadir}/cups/templates/*.tmpl
-%{_datadir}/cups/templates/de/*.tmpl
+%{_datadir}/cups/templates/ca/*.tmpl
%{_datadir}/cups/templates/es/*.tmpl
-%{_datadir}/cups/templates/eu/*.tmpl
-%{_datadir}/cups/templates/fr/*.tmpl
-%{_datadir}/cups/templates/hu/*.tmpl
-%{_datadir}/cups/templates/id/*.tmpl
-%{_datadir}/cups/templates/it/*.tmpl
%{_datadir}/cups/templates/ja/*.tmpl
-%{_datadir}/cups/templates/pl/*.tmpl
-%{_datadir}/cups/templates/ru/*.tmpl
-%{_datadir}/locale/*/*.po
-%{_datadir}/ppd
%dir %attr(1770,root,lp) %{_localstatedir}/spool/cups/tmp
%dir %attr(0710,root,lp) %{_localstatedir}/spool/cups
%dir %attr(0755,lp,sys) %{_localstatedir}/log/cups
%{_datadir}/pixmaps/cupsprinter.png
%{_sysconfdir}/cron.daily/cups
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/cups.conf
-%{_datadir}/cups/drv
+%{_datadir}/cups/drv/sample.drv
%{_datadir}/cups/examples
-%dir %{_datadir}/cups/mime
%{_datadir}/cups/mime/mime.types
%{_datadir}/cups/mime/mime.convs
%dir %{_datadir}/cups/ppdc
@@ -632,6 +538,20 @@ rm -f %{cups_serverbin}/backend/smb
%doc LICENSE.txt
%{_libdir}/*.so.*
+%files filesystem
+%dir %{cups_serverbin}
+%dir %{cups_serverbin}/backend
+%dir %{cups_serverbin}/driver
+%dir %{cups_serverbin}/filter
+%dir %{_datadir}/cups
+#%%dir %%{_datadir}/cups/banners
+#%%dir %%{_datadir}/cups/charsets
+%dir %{_datadir}/cups/data
+%dir %{_datadir}/cups/drv
+%dir %{_datadir}/cups/mime
+%dir %{_datadir}/cups/model
+%dir %{_datadir}/ppd
+
%files devel
%{_bindir}/cups-config
%{_libdir}/*.so
@@ -645,10 +565,6 @@ rm -f %{cups_serverbin}/backend/smb
%dir %{cups_serverbin}/daemon
%{cups_serverbin}/daemon/cups-lpd
-%files php
-%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
-%{php_extdir}/phpcups.so
-
%files ipptool
%{_bindir}/ipptool
%dir %{_datadir}/cups/ipptool
@@ -656,6 +572,23 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man1/ipptool.1.gz
%changelog
+* Wed Aug 08 2012 Jiri Popelka <jpopelka at redhat.com> 1:1.6.1-1
+- 1.6.1
+ - simplified systemd.patch due to removed CUPS Browsing protocol (STR #3922)
+ - removed:
+ textonly filter - moved to cups-filters
+ pstopdf filter - cups-filters also has pstopdf (different)
+ PHP module - moved to cups-filters (STR #3932)
+ serial.patch - moved to cups-filters
+ getpass.patch - r10140 removed the getpass() use
+ snmp-quirks.patch - fixed upstream (r10493)
+ avahi patches - merged upstream (STR #3066)
+ icc.patch - merged upstream (STR #3808)
+ - TODO:
+ - do we need cups-build.patch ?
+- added filesystem sub-package (#624695)
+- use macroized systemd scriptlets
+
* Thu Jul 26 2012 Jiri Popelka <jpopelka at redhat.com> 1:1.5.4-1
- 1.5.4
diff --git a/sources b/sources
index bb2ced0..a744de6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-de3006e5cf1ee78a9c6145ce62c4e982 cups-1.5.4-source.tar.bz2
+87ade07e3d1efd03c9c3add949cf9c00 cups-1.6.1-source.tar.bz2
More information about the scm-commits
mailing list