[packages/cups] - up to 2.2.8
arekm
arekm at pld-linux.org
Fri Jul 13 11:21:33 CEST 2018
commit 0f0e09b5eea4f7322de1050c34f89462c6400b92
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Jul 13 11:21:25 2018 +0200
- up to 2.2.8
cups-bug-5289.patch | 54 ---------------
cups-lspp.patch | 172 +++++++++++++++++++++++-----------------------
cups-systemd-socket.patch | 22 +++---
cups.spec | 8 +--
4 files changed, 100 insertions(+), 156 deletions(-)
---
diff --git a/cups.spec b/cups.spec
index 11bf7b4..c33df43 100644
--- a/cups.spec
+++ b/cups.spec
@@ -12,13 +12,13 @@
Summary(pl.UTF-8): Ogólny system druku dla Uniksa
Summary(pt_BR.UTF-8): Sistema Unix de Impressão
Name: cups
-Version: 2.2.7
-Release: 2
+Version: 2.2.8
+Release: 1
Epoch: 1
License: LGPL v2 (libraries), GPL v2 (the rest)
Group: Applications/Printing
Source0: https://github.com/apple/cups/releases/download/v%{version}/%{name}-%{version}-source.tar.gz
-# Source0-md5: ac703bcde223dab6d205a5fff193f716
+# Source0-md5: 33150d08993a04c8e22176e93805a051
Source1: %{name}.init
Source2: %{name}.pamd
Source3: %{name}.logrotate
@@ -61,7 +61,6 @@ Patch114: cups-freebind.patch
Patch115: cups-ipp-multifile.patch
Patch116: cups-web-devices-timeout.patch
Patch117: cups-lspp.patch
-Patch118: cups-bug-5289.patch
URL: http://www.cups.org/
BuildRequires: acl-devel
%{?with_lspp:BuildRequires: audit-libs-devel}
@@ -295,7 +294,6 @@ Wsparcie dla LPD w serwerze wydruków CUPS.
%patch115 -p1
%patch116 -p1
%patch117 -p1
-%patch118 -p1
%build
%{__aclocal} -I config-scripts
diff --git a/cups-bug-5289.patch b/cups-bug-5289.patch
deleted file mode 100644
index 8324229..0000000
--- a/cups-bug-5289.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From bb10adda6f2f41448d809c3fe86175b5b69cba7b Mon Sep 17 00:00:00 2001
-From: Michael R Sweet <michael.r.sweet at gmail.com>
-Date: Mon, 16 Apr 2018 19:19:13 -0400
-Subject: [PATCH] Try again to mirror fix (Issue #5289)
-
----
- scheduler/client.c | 14 +++++++++++++-
- scheduler/client.h | 1 +
- 2 files changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/scheduler/client.c b/scheduler/client.c
-index f68924aa1..1c4760bfd 100644
---- a/scheduler/client.c
-+++ b/scheduler/client.c
-@@ -818,6 +818,18 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
-
- if (status == HTTP_STATUS_OK)
- {
-+ /*
-+ * Record whether the client is a web browser. "Mozilla" was the original
-+ * and it seems that every web browser in existence now uses that as the
-+ * prefix with additional information identifying *which* browser.
-+ *
-+ * Chrome (at least) has problems with multiple WWW-Authenticate values in
-+ * a single header, so we only report Basic or Negotiate to web browsers and
-+ * leave the multiple choices to the native CUPS client...
-+ */
-+
-+ con->is_browser = !strncmp(httpGetField(con->http, HTTP_FIELD_USER_AGENT), "Mozilla/", 8);
-+
- if (httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE)[0])
- {
- /*
-@@ -2361,7 +2373,7 @@ cupsdSendHeader(
- strlcpy(auth_str, "Negotiate", sizeof(auth_str));
- }
-
-- if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE &&
-+ if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE && !con->is_browser &&
- !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost"))
- {
- /*
-diff --git a/scheduler/client.h b/scheduler/client.h
-index 7705f2c59..beddab0cc 100644
---- a/scheduler/client.h
-+++ b/scheduler/client.h
-@@ -30,6 +30,7 @@ struct cupsd_client_s
- struct timeval start; /* Request start time */
- http_state_t operation; /* Request operation */
- off_t bytes; /* Bytes transferred for this request */
-+ int is_browser; /* Is the client a web browser? */
- int type; /* AuthType for username */
- char username[HTTP_MAX_VALUE],
- /* Username from Authorization: line */
diff --git a/cups-lspp.patch b/cups-lspp.patch
index 13cfb16..667cda1 100644
--- a/cups-lspp.patch
+++ b/cups-lspp.patch
@@ -1,6 +1,6 @@
-diff -up cups-2.2.5/config.h.in.lspp cups-2.2.5/config.h.in
---- cups-2.2.5/config.h.in.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/config.h.in 2017-10-17 19:06:19.640228964 +0200
+diff -up cups-2.2.8/config.h.in.lspp cups-2.2.8/config.h.in
+--- cups-2.2.8/config.h.in.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/config.h.in 2018-06-08 17:34:38.682653959 +0200
@@ -730,4 +730,11 @@ static __inline int _cups_abs(int i) { r
# endif /* __GNUC__ || __STDC_VERSION__ */
#endif /* !HAVE_ABS && !abs */
@@ -13,9 +13,9 @@ diff -up cups-2.2.5/config.h.in.lspp cups-2.2.5/config.h.in
+
+
#endif /* !_CUPS_CONFIG_H_ */
-diff -up cups-2.2.5/config-scripts/cups-lspp.m4.lspp cups-2.2.5/config-scripts/cups-lspp.m4
---- cups-2.2.5/config-scripts/cups-lspp.m4.lspp 2017-10-17 19:06:19.640228964 +0200
-+++ cups-2.2.5/config-scripts/cups-lspp.m4 2017-10-17 19:06:19.640228964 +0200
+diff -up cups-2.2.8/config-scripts/cups-lspp.m4.lspp cups-2.2.8/config-scripts/cups-lspp.m4
+--- cups-2.2.8/config-scripts/cups-lspp.m4.lspp 2018-06-08 17:34:38.682653959 +0200
++++ cups-2.2.8/config-scripts/cups-lspp.m4 2018-06-08 17:34:38.682653959 +0200
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
@@ -53,9 +53,9 @@ diff -up cups-2.2.5/config-scripts/cups-lspp.m4.lspp cups-2.2.5/config-scripts/c
+ ;;
+ esac
+fi
-diff -up cups-2.2.5/configure.ac.lspp cups-2.2.5/configure.ac
---- cups-2.2.5/configure.ac.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/configure.ac 2017-10-17 19:06:19.640228964 +0200
+diff -up cups-2.2.8/configure.ac.lspp cups-2.2.8/configure.ac
+--- cups-2.2.8/configure.ac.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/configure.ac 2018-06-08 17:34:38.682653959 +0200
@@ -38,6 +38,8 @@ sinclude(config-scripts/cups-startup.m4)
sinclude(config-scripts/cups-defaults.m4)
sinclude(config-scripts/cups-scripting.m4)
@@ -65,9 +65,9 @@ diff -up cups-2.2.5/configure.ac.lspp cups-2.2.5/configure.ac
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
-diff -up cups-2.2.5/filter/common.c.lspp cups-2.2.5/filter/common.c
---- cups-2.2.5/filter/common.c.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/filter/common.c 2017-10-17 19:06:19.640228964 +0200
+diff -up cups-2.2.8/filter/common.c.lspp cups-2.2.8/filter/common.c
+--- cups-2.2.8/filter/common.c.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/filter/common.c 2018-06-08 17:34:38.682653959 +0200
@@ -17,6 +17,12 @@
* Include necessary headers...
*/
@@ -236,9 +236,9 @@ diff -up cups-2.2.5/filter/common.c.lspp cups-2.2.5/filter/common.c
/*
-diff -up cups-2.2.5/filter/pstops.c.lspp cups-2.2.5/filter/pstops.c
---- cups-2.2.5/filter/pstops.c.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/filter/pstops.c 2017-10-17 19:06:19.641228955 +0200
+diff -up cups-2.2.8/filter/pstops.c.lspp cups-2.2.8/filter/pstops.c
+--- cups-2.2.8/filter/pstops.c.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/filter/pstops.c 2018-06-08 17:34:38.683653951 +0200
@@ -3176,6 +3176,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
@@ -394,9 +394,9 @@ diff -up cups-2.2.5/filter/pstops.c.lspp cups-2.2.5/filter/pstops.c
/*
-diff -up cups-2.2.5/Makedefs.in.lspp cups-2.2.5/Makedefs.in
---- cups-2.2.5/Makedefs.in.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/Makedefs.in 2017-10-17 19:06:19.641228955 +0200
+diff -up cups-2.2.8/Makedefs.in.lspp cups-2.2.8/Makedefs.in
+--- cups-2.2.8/Makedefs.in.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/Makedefs.in 2018-06-08 17:34:38.683653951 +0200
@@ -161,7 +161,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ)
@@ -406,9 +406,9 @@ diff -up cups-2.2.5/Makedefs.in.lspp cups-2.2.5/Makedefs.in
ONDEMANDFLAGS = @ONDEMANDFLAGS@
ONDEMANDLIBS = @ONDEMANDLIBS@
OPTIM = @OPTIM@
-diff -up cups-2.2.5/scheduler/client.c.lspp cups-2.2.5/scheduler/client.c
---- cups-2.2.5/scheduler/client.c.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/scheduler/client.c 2017-10-17 19:06:19.689228556 +0200
+diff -up cups-2.2.8/scheduler/client.c.lspp cups-2.2.8/scheduler/client.c
+--- cups-2.2.8/scheduler/client.c.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/client.c 2018-06-08 17:34:38.729653586 +0200
@@ -22,12 +22,20 @@
#define _HTTP_NO_PRIVATE
#include "cupsd.h"
@@ -504,7 +504,7 @@ diff -up cups-2.2.5/scheduler/client.c.lspp cups-2.2.5/scheduler/client.c
status = HTTP_STATUS_CONTINUE;
-@@ -1926,6 +1994,73 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -1938,6 +2006,73 @@ cupsdReadClient(cupsd_client_t *con) /*
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
}
@@ -578,7 +578,7 @@ diff -up cups-2.2.5/scheduler/client.c.lspp cups-2.2.5/scheduler/client.c
if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
{
if (!httpWait(con->http, 0))
-@@ -3456,6 +3591,49 @@ is_path_absolute(const char *path) /* I
+@@ -3485,6 +3620,49 @@ is_path_absolute(const char *path) /* I
return (1);
}
@@ -628,9 +628,9 @@ diff -up cups-2.2.5/scheduler/client.c.lspp cups-2.2.5/scheduler/client.c
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
-diff -up cups-2.2.5/scheduler/client.h.lspp cups-2.2.5/scheduler/client.h
---- cups-2.2.5/scheduler/client.h.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/scheduler/client.h 2017-10-17 19:06:19.690228548 +0200
+diff -up cups-2.2.8/scheduler/client.h.lspp cups-2.2.8/scheduler/client.h
+--- cups-2.2.8/scheduler/client.h.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/client.h 2018-06-08 17:34:38.729653586 +0200
@@ -16,6 +16,13 @@
#endif /* HAVE_AUTHORIZATION_H */
@@ -645,7 +645,7 @@ diff -up cups-2.2.5/scheduler/client.h.lspp cups-2.2.5/scheduler/client.h
/*
* HTTP client structure...
*/
-@@ -65,6 +72,10 @@ struct cupsd_client_s
+@@ -66,6 +73,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
@@ -656,7 +656,7 @@ diff -up cups-2.2.5/scheduler/client.h.lspp cups-2.2.5/scheduler/client.h
};
#define HTTP(con) ((con)->http)
-@@ -138,6 +149,9 @@ extern void cupsdStartListening(void);
+@@ -139,6 +150,9 @@ extern void cupsdStartListening(void);
extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
@@ -666,9 +666,9 @@ diff -up cups-2.2.5/scheduler/client.h.lspp cups-2.2.5/scheduler/client.h
#ifdef HAVE_SSL
extern int cupsdEndTLS(cupsd_client_t *con);
-diff -up cups-2.2.5/scheduler/conf.c.lspp cups-2.2.5/scheduler/conf.c
---- cups-2.2.5/scheduler/conf.c.lspp 2017-10-17 19:06:19.637228989 +0200
-+++ cups-2.2.5/scheduler/conf.c 2017-10-17 19:06:19.691228540 +0200
+diff -up cups-2.2.8/scheduler/conf.c.lspp cups-2.2.8/scheduler/conf.c
+--- cups-2.2.8/scheduler/conf.c.lspp 2018-06-08 17:34:38.676654007 +0200
++++ cups-2.2.8/scheduler/conf.c 2018-06-08 17:34:38.730653578 +0200
@@ -40,6 +40,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
@@ -700,7 +700,7 @@ diff -up cups-2.2.5/scheduler/conf.c.lspp cups-2.2.5/scheduler/conf.c
/*
-@@ -866,6 +876,25 @@ cupsdReadConfiguration(void)
+@@ -863,6 +873,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@@ -726,7 +726,7 @@ diff -up cups-2.2.5/scheduler/conf.c.lspp cups-2.2.5/scheduler/conf.c
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemotePort ? "enabled" : "disabled");
-@@ -1286,7 +1315,19 @@ cupsdReadConfiguration(void)
+@@ -1274,7 +1303,19 @@ cupsdReadConfiguration(void)
cupsdClearString(&Classification);
if (Classification)
@@ -746,7 +746,7 @@ diff -up cups-2.2.5/scheduler/conf.c.lspp cups-2.2.5/scheduler/conf.c
/*
* Check the MaxClients setting, and then allocate memory for it...
-@@ -3770,6 +3811,18 @@ read_location(cups_file_t *fp, /* I - C
+@@ -3832,6 +3873,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@@ -765,10 +765,10 @@ diff -up cups-2.2.5/scheduler/conf.c.lspp cups-2.2.5/scheduler/conf.c
/*
* 'read_policy()' - Read a <Policy name> definition.
-diff -up cups-2.2.5/scheduler/conf.h.lspp cups-2.2.5/scheduler/conf.h
---- cups-2.2.5/scheduler/conf.h.lspp 2017-10-17 19:06:19.585229421 +0200
-+++ cups-2.2.5/scheduler/conf.h 2017-10-17 19:06:19.691228540 +0200
-@@ -250,6 +250,13 @@ VAR char *ServerKeychain VALUE(NULL);
+diff -up cups-2.2.8/scheduler/conf.h.lspp cups-2.2.8/scheduler/conf.h
+--- cups-2.2.8/scheduler/conf.h.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/conf.h 2018-06-08 17:34:38.730653578 +0200
+@@ -246,6 +246,13 @@ VAR char *ServerKeychain VALUE(NULL);
/* Keychain holding cert + key */
#endif /* HAVE_SSL */
@@ -782,7 +782,7 @@ diff -up cups-2.2.5/scheduler/conf.h.lspp cups-2.2.5/scheduler/conf.h
#ifdef HAVE_ONDEMAND
VAR int IdleExitTimeout VALUE(60);
/* Time after which an idle cupsd will exit */
-@@ -268,6 +275,9 @@ VAR int HaveServerCreds VALUE(0);
+@@ -264,6 +271,9 @@ VAR int HaveServerCreds VALUE(0);
VAR gss_cred_id_t ServerCreds; /* Server's GSS credentials */
#endif /* HAVE_GSSAPI */
@@ -792,9 +792,9 @@ diff -up cups-2.2.5/scheduler/conf.h.lspp cups-2.2.5/scheduler/conf.h
/*
* Prototypes...
-diff -up cups-2.2.5/scheduler/cupsd.h.lspp cups-2.2.5/scheduler/cupsd.h
---- cups-2.2.5/scheduler/cupsd.h.lspp 2017-10-17 19:06:19.626229080 +0200
-+++ cups-2.2.5/scheduler/cupsd.h 2017-10-17 19:06:19.691228540 +0200
+diff -up cups-2.2.8/scheduler/cupsd.h.lspp cups-2.2.8/scheduler/cupsd.h
+--- cups-2.2.8/scheduler/cupsd.h.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/cupsd.h 2018-06-08 17:34:38.730653578 +0200
@@ -11,6 +11,8 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -826,9 +826,9 @@ diff -up cups-2.2.5/scheduler/cupsd.h.lspp cups-2.2.5/scheduler/cupsd.h
/*
* Some OS's don't have hstrerror(), most notably Solaris...
*/
-diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
---- cups-2.2.5/scheduler/ipp.c.lspp 2017-10-17 19:06:19.599229305 +0200
-+++ cups-2.2.5/scheduler/ipp.c 2017-10-17 19:06:19.695228506 +0200
+diff -up cups-2.2.8/scheduler/ipp.c.lspp cups-2.2.8/scheduler/ipp.c
+--- cups-2.2.8/scheduler/ipp.c.lspp 2018-06-08 17:34:38.652654197 +0200
++++ cups-2.2.8/scheduler/ipp.c 2018-06-08 17:37:19.166378937 +0200
@@ -14,6 +14,9 @@
* missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -864,7 +864,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p);
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,
-@@ -1286,6 +1300,21 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1250,6 +1264,21 @@ add_job(cupsd_client_t *con, /* I - Cl
"time-at-creation",
"time-at-processing"
};
@@ -886,9 +886,9 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
-@@ -1597,6 +1626,106 @@ add_job(cupsd_client_t *con, /* I - Cl
- return (NULL);
- }
+@@ -1578,6 +1607,106 @@ add_job(cupsd_client_t *con, /* I - Cl
+
+ attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);
+#ifdef WITH_LSPP
+ if (is_lspp_config())
@@ -993,7 +993,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
-@@ -1605,6 +1734,32 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1586,6 +1715,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
@@ -1026,7 +1026,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
job->attrs = con->request;
job->dirty = 1;
-@@ -1794,6 +1949,29 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1773,6 +1928,29 @@ add_job(cupsd_client_t *con, /* I - Cl
ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
}
@@ -1056,7 +1056,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
job->job_sheets = attr;
-@@ -1824,6 +2002,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1803,6 +1981,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@@ -1066,7 +1066,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
-@@ -1842,6 +2023,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1821,6 +2002,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);
@@ -1076,7 +1076,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
-@@ -1862,6 +2046,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1841,6 +2025,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);
@@ -1086,14 +1086,14 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1902,8 +2089,52 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1881,8 +2068,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
+#ifdef WITH_LSPP
+ override = 1;
+#endif /* WITH_LSPP */
- }
++ }
+#ifdef WITH_LSPP
+ if (is_lspp_config() && AuditLog != -1)
+ {
@@ -1127,7 +1127,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
+ }
+ cupsdClearString(&audit_message);
+ }
-+ }
+ }
+
+ if (userheader)
+ free(userheader);
@@ -1139,7 +1139,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
/*
* See if we need to add the starting sheet...
-@@ -3686,6 +3917,128 @@ check_rss_recipient(
+@@ -3656,6 +3887,128 @@ check_rss_recipient(
}
@@ -1268,7 +1268,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
-@@ -4142,6 +4495,15 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4112,6 +4465,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@@ -1284,7 +1284,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -4177,6 +4539,85 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4147,6 +4509,85 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@@ -1370,7 +1370,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
/*
* Try the localized banner file under the subdirectory...
-@@ -4271,6 +4712,24 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4241,6 +4682,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@@ -1395,7 +1395,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
-@@ -6459,6 +6918,22 @@ get_job_attrs(cupsd_client_t *con, /* I
+@@ -6480,6 +6939,22 @@ get_job_attrs(cupsd_client_t *con, /* I
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
@@ -1418,7 +1418,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
/*
* Copy attributes...
*/
-@@ -6856,6 +7331,11 @@ get_jobs(cupsd_client_t *con, /* I - C
+@@ -6877,6 +7352,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
@@ -1430,7 +1430,7 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
if (count > 0)
ippAddSeparator(con->response);
-@@ -11487,6 +11967,11 @@ validate_user(cupsd_job_t *job, /* I
+@@ -11475,6 +11955,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@@ -1442,9 +1442,9 @@ diff -up cups-2.2.5/scheduler/ipp.c.lspp cups-2.2.5/scheduler/ipp.c
/*
* Check the username against the owner...
*/
-diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
---- cups-2.2.5/scheduler/job.c.lspp 2017-10-17 19:06:19.607229238 +0200
-+++ cups-2.2.5/scheduler/job.c 2017-10-17 19:06:19.696228498 +0200
+diff -up cups-2.2.8/scheduler/job.c.lspp cups-2.2.8/scheduler/job.c
+--- cups-2.2.8/scheduler/job.c.lspp 2018-06-08 17:34:38.657654158 +0200
++++ cups-2.2.8/scheduler/job.c 2018-06-08 17:34:38.733653554 +0200
@@ -11,6 +11,9 @@
* missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -1553,7 +1553,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
-@@ -1908,6 +1988,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
+@@ -1862,6 +1942,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
ippSetString(job->attrs, &job->reasons, 0, "none");
}
@@ -1576,7 +1576,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
job->impressions = ippFindAttribute(job->attrs, "job-impressions-completed", IPP_TAG_INTEGER);
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -2321,6 +2417,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -2275,6 +2371,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@@ -1591,7 +1591,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -2343,6 +2447,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -2297,6 +2401,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchown(cupsFileNumber(fp), RunUser, Group);
@@ -1670,7 +1670,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -3989,6 +4165,19 @@ get_options(cupsd_job_t *job, /* I - Jo
+@@ -3943,6 +4119,19 @@ get_options(cupsd_job_t *job, /* I - Jo
banner_page)
continue;
@@ -1690,7 +1690,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
/*
* Otherwise add them to the list...
*/
-@@ -4750,6 +4939,18 @@ start_job(cupsd_job_t *job, /* I -
+@@ -4704,6 +4893,18 @@ start_job(cupsd_job_t *job, /* I -
cupsd_printer_t *printer) /* I - Printer to print job */
{
const char *filename; /* Support filename */
@@ -1709,7 +1709,7 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
"job-cancel-after",
IPP_TAG_INTEGER);
-@@ -4926,6 +5127,113 @@ start_job(cupsd_job_t *job, /* I -
+@@ -4892,6 +5093,113 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
@@ -1823,9 +1823,9 @@ diff -up cups-2.2.5/scheduler/job.c.lspp cups-2.2.5/scheduler/job.c
/*
* Now start the first file in the job...
*/
-diff -up cups-2.2.5/scheduler/job.h.lspp cups-2.2.5/scheduler/job.h
---- cups-2.2.5/scheduler/job.h.lspp 2017-10-13 20:22:26.000000000 +0200
-+++ cups-2.2.5/scheduler/job.h 2017-10-17 19:06:19.696228498 +0200
+diff -up cups-2.2.8/scheduler/job.h.lspp cups-2.2.8/scheduler/job.h
+--- cups-2.2.8/scheduler/job.h.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/job.h 2018-06-08 17:34:38.733653554 +0200
@@ -11,6 +11,13 @@
* missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -1851,9 +1851,9 @@ diff -up cups-2.2.5/scheduler/job.h.lspp cups-2.2.5/scheduler/job.h
};
typedef struct cupsd_joblog_s /**** Job log message ****/
-diff -up cups-2.2.5/scheduler/main.c.lspp cups-2.2.5/scheduler/main.c
---- cups-2.2.5/scheduler/main.c.lspp 2017-10-17 19:06:19.637228989 +0200
-+++ cups-2.2.5/scheduler/main.c 2017-10-17 19:08:26.642173026 +0200
+diff -up cups-2.2.8/scheduler/main.c.lspp cups-2.2.8/scheduler/main.c
+--- cups-2.2.8/scheduler/main.c.lspp 2018-06-08 17:34:38.663654110 +0200
++++ cups-2.2.8/scheduler/main.c 2018-06-08 17:34:38.734653546 +0200
@@ -56,6 +56,9 @@
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
@@ -1874,7 +1874,7 @@ diff -up cups-2.2.5/scheduler/main.c.lspp cups-2.2.5/scheduler/main.c
#ifdef __APPLE__
int use_sysman = 1; /* Use system management functions? */
#else
-@@ -516,6 +522,25 @@ main(int argc, /* I - Number of comm
+@@ -495,6 +501,25 @@ main(int argc, /* I - Number of comm
exit(errno);
}
@@ -1900,7 +1900,7 @@ diff -up cups-2.2.5/scheduler/main.c.lspp cups-2.2.5/scheduler/main.c
/*
* Let the system know we are busy while we bring up cupsd...
*/
-@@ -1227,6 +1252,11 @@ main(int argc, /* I - Number of comm
+@@ -1188,6 +1213,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
@@ -1912,9 +1912,9 @@ diff -up cups-2.2.5/scheduler/main.c.lspp cups-2.2.5/scheduler/main.c
return (!stop_scheduler);
}
-diff -up cups-2.2.5/scheduler/printers.c.lspp cups-2.2.5/scheduler/printers.c
---- cups-2.2.5/scheduler/printers.c.lspp 2017-10-17 19:06:19.587229404 +0200
-+++ cups-2.2.5/scheduler/printers.c 2017-10-17 19:06:19.697228490 +0200
+diff -up cups-2.2.8/scheduler/printers.c.lspp cups-2.2.8/scheduler/printers.c
+--- cups-2.2.8/scheduler/printers.c.lspp 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/printers.c 2018-06-08 17:34:38.734653546 +0200
@@ -11,6 +11,8 @@
* missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -1935,7 +1935,7 @@ diff -up cups-2.2.5/scheduler/printers.c.lspp cups-2.2.5/scheduler/printers.c
/*
* Local functions...
-@@ -2212,6 +2218,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2202,6 +2208,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
ipp_attribute_t *attr; /* Attribute data */
char *name, /* Current user/group name */
*filter; /* Current filter */
@@ -1949,7 +1949,7 @@ diff -up cups-2.2.5/scheduler/printers.c.lspp cups-2.2.5/scheduler/printers.c
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -2339,6 +2352,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2329,6 +2342,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}
diff --git a/cups-systemd-socket.patch b/cups-systemd-socket.patch
index 9466c36..44228ee 100644
--- a/cups-systemd-socket.patch
+++ b/cups-systemd-socket.patch
@@ -1,7 +1,7 @@
-diff -up cups-2.2.7/scheduler/main.c.systemd-socket cups-2.2.7/scheduler/main.c
---- cups-2.2.7/scheduler/main.c.systemd-socket 2018-04-03 14:23:12.128786025 +0200
-+++ cups-2.2.7/scheduler/main.c 2018-04-03 14:23:12.148785913 +0200
-@@ -691,8 +691,16 @@ main(int argc, /* I - Number of comm
+diff -up cups-2.2.8/scheduler/main.c.systemd-socket cups-2.2.8/scheduler/main.c
+--- cups-2.2.8/scheduler/main.c.systemd-socket 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/main.c 2018-06-08 17:32:39.417600671 +0200
+@@ -681,8 +681,16 @@ main(int argc, /* I - Number of comm
#ifdef HAVE_ONDEMAND
if (OnDemand)
@@ -19,9 +19,9 @@ diff -up cups-2.2.7/scheduler/main.c.systemd-socket cups-2.2.7/scheduler/main.c
#endif /* HAVE_ONDEMAND */
if (fg)
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
-diff -up cups-2.2.7/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.7/scheduler/org.cups.cupsd.path.in
---- cups-2.2.7/scheduler/org.cups.cupsd.path.in.systemd-socket 2018-03-23 04:48:36.000000000 +0100
-+++ cups-2.2.7/scheduler/org.cups.cupsd.path.in 2018-04-03 14:23:12.148785913 +0200
+diff -up cups-2.2.8/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.8/scheduler/org.cups.cupsd.path.in
+--- cups-2.2.8/scheduler/org.cups.cupsd.path.in.systemd-socket 2018-06-05 18:06:54.000000000 +0200
++++ cups-2.2.8/scheduler/org.cups.cupsd.path.in 2018-06-08 17:32:39.417600671 +0200
@@ -3,7 +3,7 @@ Description=CUPS Scheduler
PartOf=org.cups.cupsd.service
@@ -31,9 +31,9 @@ diff -up cups-2.2.7/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.7/s
[Install]
WantedBy=multi-user.target
-diff -up cups-2.2.7/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.7/scheduler/org.cups.cupsd.service.in
---- cups-2.2.7/scheduler/org.cups.cupsd.service.in.systemd-socket 2018-04-03 14:23:12.148785913 +0200
-+++ cups-2.2.7/scheduler/org.cups.cupsd.service.in 2018-04-03 14:25:16.312088802 +0200
+diff -up cups-2.2.8/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.8/scheduler/org.cups.cupsd.service.in
+--- cups-2.2.8/scheduler/org.cups.cupsd.service.in.systemd-socket 2018-06-08 17:32:39.417600671 +0200
++++ cups-2.2.8/scheduler/org.cups.cupsd.service.in 2018-06-08 17:34:09.091888847 +0200
@@ -1,10 +1,11 @@
[Unit]
Description=CUPS Scheduler
@@ -44,6 +44,6 @@ diff -up cups-2.2.7/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.
ExecStart=@sbindir@/cupsd -l
-Type=simple
+Type=notify
- Restart=always
+ Restart=on-failure
[Install]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cups.git/commitdiff/0f0e09b5eea4f7322de1050c34f89462c6400b92
More information about the pld-cvs-commit
mailing list