2027497 - cups-2.4.0 is available

This commit is contained in:
Zdenek Dohnal 2022-01-06 12:24:05 +01:00
parent 21ff364adf
commit ba99b369c4
23 changed files with 198 additions and 899 deletions

1
.gitignore vendored
View File

@ -95,3 +95,4 @@ cups-1.4.4-source.tar.bz2
/cups-2.3.3-source.tar.gz
/cups-2.3.3op1-source.tar.gz
/cups-2.3.3op2-source.tar.gz
/cups-2.4.0-source.tar.gz

View File

@ -1,54 +0,0 @@
From d3bf52f5dc9e465faba69a85eeed5b64916efddd Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Mon, 29 Nov 2021 09:30:26 +0100
Subject: [PATCH] Add --with-idle-exit-timeout configure option
The option enables setting IdleExitTimeout to a desired value - f.e.
setting to zero will disable automatic shutdown, which is useful on servers,
where cupsd is expected to run even if there is no web interface, no jobs
and CUPS doesn't share queues.
---
CHANGES.md | 1 +
conf/cupsd.conf.in | 3 +++
config-scripts/cups-defaults.m4 | 13 +++++++++++++
configure | 30 ++++++++++++++++++++++++++++++
4 files changed, 47 insertions(+)
diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in
index 03d1d5df5..b25884907 100644
--- a/conf/cupsd.conf.in
+++ b/conf/cupsd.conf.in
@@ -28,6 +28,9 @@ DefaultAuthType Basic
# Web interface setting...
WebInterface @CUPS_WEBIF@
+# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
+IdleExitTimeout @EXIT_TIMEOUT@
+
# Restrict access to the server...
<Location />
Order allow,deny
diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4
index 240a95229..9420e1510 100644
--- a/config-scripts/cups-defaults.m4
+++ b/config-scripts/cups-defaults.m4
@@ -428,3 +428,16 @@ AS_IF([test $CUPS_WEBIF = Yes || test $CUPS_BROWSING = Yes], [
SYSTEMD_WANTED_BY="$SYSTEMD_WANTED_BY multi-user.target"], [
])
AC_SUBST([SYSTEMD_WANTED_BY])
+
+dnl Set default value of IdleExitTimeout
+AC_ARG_WITH([idle_exit_timeout], AS_HELP_STRING([--with-idle-exit-timeout], [set the default value for IdleExitTimeout, default=60]), [
+ AS_IF([test "x$withval" = "xno"], [
+ EXIT_TIMEOUT=0
+ ], [
+ EXIT_TIMEOUT=$withval
+ ])
+], [
+ EXIT_TIMEOUT=60
+])
+
+AC_SUBST([EXIT_TIMEOUT])
--
2.31.1

View File

@ -1,33 +0,0 @@
diff -up cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec cups-2.3.3op2/config-scripts/cups-defaults.m4
--- cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec 2021-11-29 13:50:14.568976028 +0100
+++ cups-2.3.3op2/config-scripts/cups-defaults.m4 2021-11-29 13:51:02.785567762 +0100
@@ -482,3 +482,18 @@ AC_ARG_WITH([idle_exit_timeout], AS_HELP
])
AC_SUBST([EXIT_TIMEOUT])
+
+dnl set TimeoutStartSec for cups.service
+dnl - if used as --without-*, it sets TimeoutStartSec to infinity
+AC_ARG_WITH([systemd-timeoutstartsec],
+ AS_HELP_STRING([--with-systemd-timeoutstartsec],
+ [set TimeoutStartSec value in cups.service, default=default value in systemd]), [
+ AS_IF([ test "x$withval" = "xno" ], [
+ TIMEOUTSTARTSEC="TimeoutStartSec=infinity"
+ ], [
+ TIMEOUTSTARTSEC="TimeoutStartSec=$withval"
+ ])
+], [
+ TIMEOUTSTARTSEC=""
+])
+AC_SUBST([TIMEOUTSTARTSEC])
diff -up cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec cups-2.3.3op2/scheduler/cups.service.in
--- cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec 2021-11-29 13:50:14.551976172 +0100
+++ cups-2.3.3op2/scheduler/cups.service.in 2021-11-29 13:50:14.568976028 +0100
@@ -8,6 +8,7 @@ Requires=cups.socket
ExecStart=@sbindir@/cupsd -l
Type=notify
Restart=on-failure
+@TIMEOUTSTARTSEC@
[Install]
Also=cups.socket cups.path

View File

@ -1,43 +0,0 @@
From 6e6999b1f74457b7fd6057a31f1d3606de19a05b Mon Sep 17 00:00:00 2001
From: Michael R Sweet <michael.r.sweet@gmail.com>
Date: Fri, 9 Apr 2021 10:20:04 -0400
Subject: [PATCH] Retry Validate-Job once, if needed (Issue #132)
---
CHANGES.md | 1 +
backend/ipp.c | 14 +++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/backend/ipp.c b/backend/ipp.c
index 63353a66d..020ab7fd4 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -256,6 +257,7 @@ main(int argc, /* I - Number of command-line args */
get_job_attrs = 0, /* Does printer support Get-Job-Attributes? */
send_document = 0, /* Does printer support Send-Document? */
validate_job = 0, /* Does printer support Validate-Job? */
+ validate_retried = 0, /* Was Validate-Job request retried? */
copies, /* Number of copies for job */
copies_remaining; /* Number of copies remaining */
const char *content_type, /* CONTENT_TYPE environment variable */
@@ -1559,7 +1561,17 @@ main(int argc, /* I - Number of command-line args */
ipp_status == IPP_STATUS_ERROR_BAD_REQUEST)
break;
else if (job_auth == NULL && ipp_status > IPP_STATUS_ERROR_BAD_REQUEST)
+ {
+ if (!validate_retried)
+ {
+ // Retry Validate-Job operation once, to work around known printer bug...
+ validate_retried = 1;
+ sleep(10);
+ continue;
+ }
+
goto cleanup;
+ }
}
/*
--
2.26.3

View File

@ -1,28 +0,0 @@
From c37d71b1a31d26a4790166e2508822b18934a5c0 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 13 Apr 2021 15:44:14 +0200
Subject: [PATCH] backend/usb-libusb.c: Use 60s timeout for reading at
backchannel
Some older models malfunction if timeout is too short.
---
CHANGES.md | 1 +
backend/usb-libusb.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index d6b0eb423..fbb0d9d89 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
readstatus = libusb_bulk_transfer(g.printer->handle,
g.printer->read_endp,
readbuffer, rbytes,
- &rbytes, 250);
+ &rbytes, 60000);
if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
{
fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
--
2.26.3

View File

@ -1,16 +0,0 @@
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
index 92f1501..7edc058 100644
--- a/cgi-bin/ipp-var.c
+++ b/cgi-bin/ipp-var.c
@@ -275,10 +275,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
*/
if ((user = getenv("REMOTE_USER")) == NULL)
- {
- puts("Status: 401\n");
- exit(0);
- }
+ user = "guest";
/*
* See if the user has already selected a new destination...

View File

@ -1,36 +0,0 @@
From 887041aaa3f61b87c55b2a746a8813be3d584034 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Fri, 19 Nov 2021 12:23:08 +0100
Subject: [PATCH] cups/http-support.c: Apply DigestOptions to RFC 2069 support
Earlier we applied DigestOptions only for devices which implement RFC
2617 or RFC 7616, this commit applies it even for RFC 2069 support.
This issue came up during CentOS Stream/RHEL 9 development, where MD5
digest is marked as insecure for authentication/authorization, so it
should be turned off in default configurations to prevent security
issues.
---
cups/http-support.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cups/http-support.c b/cups/http-support.c
index 209235ee6..3d1208789 100644
--- a/cups/http-support.c
+++ b/cups/http-support.c
@@ -1430,6 +1430,12 @@ _httpSetDigestAuthString(
* Use old RFC 2069 Digest method...
*/
+ if (cg->digestoptions == _CUPS_DIGESTOPTIONS_DENYMD5)
+ {
+ DEBUG_puts("3_httpSetDigestAuthString: MD5 Digest is disabled.");
+ return (0);
+ }
+
/* H(A1) = H(username:realm:password) */
snprintf(temp, sizeof(temp), "%s:%s:%s", username, http->realm, password);
hashsize = (size_t)cupsHashData("md5", (unsigned char *)temp, strlen(temp), hash, sizeof(hash));
--
2.31.1

View File

@ -1,120 +0,0 @@
From 3e217bff90829cf7d53ceacb553a7abaad3cb4db Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Thu, 26 Aug 2021 15:45:40 +0200
Subject: [PATCH] cups/md5passwd.c: Stub out httpMD5* functions
---
CHANGES.md | 1 +
cups/md5passwd.c | 60 +++++++++++++++++++-----------------------------
2 files changed, 25 insertions(+), 36 deletions(-)
diff --git a/cups/md5passwd.c b/cups/md5passwd.c
index 9af5de23c..5c9a64e06 100644
--- a/cups/md5passwd.c
+++ b/cups/md5passwd.c
@@ -19,6 +19,9 @@
/*
* 'httpMD5()' - Compute the MD5 sum of the username:group:password.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -28,22 +31,13 @@ httpMD5(const char *username, /* I - User name */
const char *passwd, /* I - Password string */
char md5[33]) /* O - MD5 string */
{
- unsigned char sum[16]; /* Sum data */
- char line[256]; /* Line to sum */
-
-
- /*
- * Compute the MD5 sum of the user name, group name, and password.
- */
+ (void)username;
+ (void)realm;
+ (void)passwd;
- snprintf(line, sizeof(line), "%s:%s:%s", username, realm, passwd);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
+ md5[0] = '\0';
- /*
- * Return the sum...
- */
-
- return ((char *)cupsHashString(sum, sizeof(sum), md5, 33));
+ return (NULL);
}
@@ -52,6 +46,9 @@ httpMD5(const char *username, /* I - User name */
* with the server-supplied nonce value, method, and
* request-uri.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -61,35 +58,22 @@ httpMD5Final(const char *nonce, /* I - Server nonce value */
const char *resource, /* I - Resource path */
char md5[33]) /* IO - MD5 sum */
{
- unsigned char sum[16]; /* Sum data */
- char line[1024]; /* Line of data */
- char a2[33]; /* Hash of method and resource */
-
+ (void)nonce;
+ (void)method;
+ (void)resource;
- /*
- * First compute the MD5 sum of the method and resource...
- */
+ md5[0] = '\0';
- snprintf(line, sizeof(line), "%s:%s", method, resource);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
- cupsHashString(sum, sizeof(sum), a2, sizeof(a2));
-
- /*
- * Then combine A1 (MD5 of username, realm, and password) with the nonce
- * and A2 (method + resource) values to get the final MD5 sum for the
- * request...
- */
-
- snprintf(line, sizeof(line), "%s:%s:%s", md5, nonce, a2);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
-
- return ((char *)cupsHashString(sum, sizeof(sum), md5, 33));
+ return (NULL);
}
/*
* 'httpMD5String()' - Convert an MD5 sum to a character string.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -98,5 +82,9 @@ httpMD5String(const unsigned char *sum, /* I - MD5 sum data */
char md5[33])
/* O - MD5 sum in hex */
{
- return ((char *)cupsHashString(sum, 16, md5, 33));
+ (void)sum;
+
+ md5[0] = '\0';
+
+ return (NULL);
}
--
2.31.1

View File

@ -1,33 +0,0 @@
diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4
index 9e05bd4..505d272 100644
--- a/config-scripts/cups-defaults.m4
+++ b/config-scripts/cups-defaults.m4
@@ -8,6 +8,9 @@ dnl Licensed under Apache License v2.0. See the file "LICENSE" for more
dnl information.
dnl
+dnl Set a default systemd WantedBy directive
+SYSTEMD_WANTED_BY="printers.target"
+
dnl Default languages...
LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
@@ -461,3 +464,8 @@ esac
AC_SUBST(CUPS_WEBIF)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
+
+AS_IF([test $CUPS_WEBIF = Yes || test $CUPS_BROWSING = Yes], [
+ SYSTEMD_WANTED_BY="$SYSTEMD_WANTED_BY multi-user.target"], [
+ ])
+AC_SUBST([SYSTEMD_WANTED_BY])
diff --git a/scheduler/cups.service.in b/scheduler/cups.service.in
index baff51b..f0d7e2f 100644
--- a/scheduler/cups.service.in
+++ b/scheduler/cups.service.in
@@ -11,4 +11,4 @@ Restart=on-failure
[Install]
Also=cups.socket cups.path
-WantedBy=printer.target
+WantedBy=@SYSTEMD_WANTED_BY@

View File

@ -0,0 +1,27 @@
From aa2507530076eaff042b096de55442dc8b665abb Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Wed, 1 Dec 2021 12:00:16 +0100
Subject: [PATCH] de/index.html: Fix missing bracket (fixes issue #299)
The bracket was unintentionally removed by commit b76a97a.
---
CHANGES.md | 5 +++++
doc/de/index.html.in | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/doc/de/index.html.in b/doc/de/index.html.in
index 30f7d288e..2b3f3a6b1 100644
--- a/doc/de/index.html.in
+++ b/doc/de/index.html.in
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta name="viewport" content="width=device-width">
- <title>Startseite - CUPS @CUPS_VERSION@/title>
+ <title>Startseite - CUPS @CUPS_VERSION@</title>
</head>
<body>
<div class="header">
--
2.33.1

View File

@ -1,38 +0,0 @@
From 08e9b6e1f8497a8159d6bd7cd6dc96ae79a2e704 Mon Sep 17 00:00:00 2001
From: Bryan Mason <bmason@redhat.com>
Date: Thu, 15 Jul 2021 16:26:27 -0700
Subject: [PATCH] scheduler/job.c: use gziptoany for raw files (not just raw
printers)
---
scheduler/job.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scheduler/job.c b/scheduler/job.c
index d8c2efcc6..b448acda5 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
int backroot; /* Run backend as root? */
int pid; /* Process ID of new filter process */
int banner_page; /* 1 if banner page, 0 otherwise */
+ int raw_file; /* 1 if file type is vnd.cups-raw */
int filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
/* Pipes used between filters */
int envc; /* Number of environment variables */
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
* Add decompression/raw filter as needed...
*/
+ raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
+ !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
+
if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
- (!job->printer->remote && job->printer->raw && job->num_files > 1))
+ (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
{
/*
* Add gziptoany filter to the front of the list...
--
2.31.1

View File

@ -1,16 +0,0 @@
diff --git a/scheduler/main.c b/scheduler/main.c
index e1fa357..53ca94a 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -1760,6 +1760,11 @@ select_timeout(int fds) /* I - Number of descriptors returned */
/*
* Check for any job activity...
*/
+ if (JobHistoryUpdate && timeout > JobHistoryUpdate)
+ {
+ timeout = JobHistoryUpdate;
+ why = "update job history";
+ }
for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
job;

View File

@ -1,164 +0,0 @@
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index 02b9d9d..669cb65 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -619,6 +619,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
*oldinfo; /* Old printer information */
const cgi_file_t *file; /* Uploaded file, if any */
const char *var; /* CGI variable */
+ char *ppd_name = NULL; /* Pointer to PPD name */
char uri[HTTP_MAX_URI], /* Device or printer URI */
*uriptr, /* Pointer into URI */
evefile[1024] = ""; /* IPP Everywhere PPD file */
@@ -1124,12 +1125,12 @@ do_am_printer(http_t *http, /* I - HTTP connection */
if (!file)
{
- var = cgiGetVariable("PPD_NAME");
- if (!strcmp(var, "everywhere"))
+ ppd_name = cgiGetVariable("PPD_NAME");
+ if (!strcmp(ppd_name, "everywhere"))
get_printer_ppd(cgiGetVariable("DEVICE_URI"), evefile, sizeof(evefile));
- else if (strcmp(var, "__no_change__"))
+ else if (strcmp(ppd_name, "__no_change__"))
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
- NULL, var);
+ NULL, ppd_name);
}
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-location",
@@ -1219,7 +1220,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
cgiCopyTemplateLang("printer-modified.tmpl");
}
- else
+ else if (ppd_name && (strcmp(ppd_name, "everywhere") == 0 || strstr(ppd_name, "driverless")))
{
/*
* Set the printer options...
@@ -1229,6 +1230,16 @@ do_am_printer(http_t *http, /* I - HTTP connection */
do_set_options(http, 0);
return;
}
+ else
+ {
+ /*
+ * If we don't have an everywhere model, show printer-added
+ * template with warning about drivers going away...
+ */
+
+ cgiStartHTML(title);
+ cgiCopyTemplateLang("printer-added.tmpl");
+ }
cgiEndHTML();
}
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 3bfe4a8..248bdba 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -950,6 +950,8 @@ cupsdLoadAllPrinters(void)
*value, /* Pointer to value */
*valueptr; /* Pointer into value */
cupsd_printer_t *p; /* Current printer */
+ int found_raw = 0; /* Flag whether raw queue is installed */
+ int found_driver = 0; /* Flag whether queue with classic driver is installed */
/*
@@ -1025,6 +1027,30 @@ cupsdLoadAllPrinters(void)
cupsdSetPrinterAttrs(p);
+ if ((p->device_uri && strncmp(p->device_uri, "ipp:", 4) && strncmp(p->device_uri, "ipps:", 5) && strncmp(p->device_uri, "implicitclass:", 14)) ||
+ !p->make_model ||
+ (p->make_model && strstr(p->make_model, "IPP Everywhere") == NULL && strstr(p->make_model, "driverless") == NULL))
+ {
+ /*
+ * Warn users about printer drivers and raw queues will be deprecated.
+ * It will warn users in the following scenarios:
+ * - the queue doesn't use ipp, ipps or implicitclass backend, which means
+ * it doesn't communicate via IPP and is raw or uses a driver for sure
+ * - the queue doesn't have make_model - it is raw
+ * - the queue uses a correct backend, but the model is not IPP Everywhere/driverless
+ */
+ if (!p->make_model)
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Queue %s is a raw queue, which is deprecated.", p->name);
+ found_raw = 1;
+ }
+ else
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Queue %s uses a printer driver, which is deprecated.", p->name);
+ found_driver = 1;
+ }
+ }
+
if (strncmp(p->device_uri, "file:", 5) && p->state != IPP_PRINTER_STOPPED)
{
/*
@@ -1415,6 +1441,12 @@ cupsdLoadAllPrinters(void)
}
}
+ if (found_raw)
+ cupsdLogMessage(CUPSD_LOG_WARN, "Raw queues are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103");
+
+ if (found_driver)
+ cupsdLogMessage(CUPSD_LOG_WARN, "Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103");
+
cupsFileClose(fp);
}
diff --git a/templates/choose-model.tmpl b/templates/choose-model.tmpl
index e916cf8..9c9b71f 100644
--- a/templates/choose-model.tmpl
+++ b/templates/choose-model.tmpl
@@ -39,7 +39,7 @@
<TD>
<SELECT NAME="PPD_NAME" SIZE="10">
{op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Current Driver - {current_make_and_model}</OPTION>:}
-{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>{current_make_and_model} - IPP Everywhere &trade;</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>{current_make_and_model?{current_make_and_model} -:} IPP Everywhere &trade;</OPTION>:}
{[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
}</SELECT>
</TD>
diff --git a/templates/printer-added.tmpl b/templates/printer-added.tmpl
index 0ccf6d3..9ebc835 100644
--- a/templates/printer-added.tmpl
+++ b/templates/printer-added.tmpl
@@ -1,4 +1,15 @@
-<H2 CLASS="title">Add Printer</H2>
+<H2 CLASS="title">Add Printer {printer_name}</H2>
<P>Printer <A HREF="/printers/{printer_name}">{printer_name}</A> has been added
successfully.
+
+<blockquote>
+<b>Note:<b>Printer drivers and raw queues are deprecated and will stop working in a future version of CUPS.
+</blockquote>
+
+<FORM ACTION="admin/" METHOD="POST">
+<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-printer-options">
+<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="SUBMIT" VALUE="Set Printer Options">
+</FORM>
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 4498a8c..8776874 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -1049,10 +1049,10 @@ fi
# Warning log messages
count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | $GREP -v 'libusb error' | $GREP -v ColorManager | $GREP -v 'Avahi client failed' | wc -l | awk '{print $1}'`
-if test $count != 8; then
- echo "FAIL: $count warning messages, expected 8."
+if test $count != 10; then
+ echo "FAIL: $count warning messages, expected 10."
$GREP '^W ' $BASE/log/error_log
- echo " <p>FAIL: $count warning messages, expected 8.</p>" >>$strfile
+ echo " <p>FAIL: $count warning messages, expected 10.</p>" >>$strfile
echo " <pre>" >>$strfile
$GREP '^W ' $BASE/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo " </pre>" >>$strfile

View File

@ -1,6 +1,6 @@
diff -up cups-2.3.3/backend/failover.c.failover cups-2.3.3/backend/failover.c
--- cups-2.3.3/backend/failover.c.failover 2020-06-11 08:49:20.515264358 +0200
+++ cups-2.3.3/backend/failover.c 2020-06-11 08:49:20.515264358 +0200
diff -up cups-2.4.0/backend/failover.c.failover cups-2.4.0/backend/failover.c
--- cups-2.4.0/backend/failover.c.failover 2021-12-15 11:06:14.274967317 +0100
+++ cups-2.4.0/backend/failover.c 2021-12-15 11:06:14.274967317 +0100
@@ -0,0 +1,837 @@
+/*
+ * Failover Backend for the Common UNIX Printing System (CUPS).
@ -839,13 +839,13 @@ diff -up cups-2.3.3/backend/failover.c.failover cups-2.3.3/backend/failover.c
+ else
+ return (NULL);
+}
diff -up cups-2.3.3/backend/Makefile.failover cups-2.3.3/backend/Makefile
--- cups-2.3.3/backend/Makefile.failover 2020-04-27 20:04:29.000000000 +0200
+++ cups-2.3.3/backend/Makefile 2020-06-11 08:52:31.212642019 +0200
@@ -22,6 +22,7 @@ include ../Makedefs
RBACKENDS = \
diff -up cups-2.4.0/backend/Makefile.failover cups-2.4.0/backend/Makefile
--- cups-2.4.0/backend/Makefile.failover 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/backend/Makefile 2021-12-15 11:08:27.433009704 +0100
@@ -25,6 +25,7 @@ RBACKENDS = \
ipp \
lpd \
usb \
+ failover \
$(DNSSD_BACKEND)
UBACKENDS = \
@ -858,7 +858,7 @@ diff -up cups-2.3.3/backend/Makefile.failover cups-2.3.3/backend/Makefile
dnssd.o \
snmp.o \
socket.o \
@@ -276,6 +278,15 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend
@@ -264,6 +266,15 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend
#

View File

@ -1,49 +0,0 @@
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index 733b06c..bb770f0 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -123,21 +123,35 @@ if test -n "$GCC"; then
OPTIM="-fPIC $OPTIM"
fi
- # The -fstack-protector option is available with some versions of
- # GCC and adds "stack canaries" which detect when the return address
- # has been overwritten, preventing many types of exploit attacks.
- AC_MSG_CHECKING(whether compiler supports -fstack-protector)
+ # The -fstack-protector-strong and -fstack-protector options are available
+ # with some versions of# GCC and adds "stack canaries" which detect
+ # when the return address has been overwritten, preventing many types of exploit attacks.
+ # First check for -fstack-protector-strong, then for -fstack-protector...
+ AC_MSG_CHECKING([whether compiler supports -fstack-protector-strong])
OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
- AC_TRY_LINK(,,
+ CFLAGS="$CFLAGS -fstack-protector-strong"
+ AC_TRY_LINK(,,[
if test "x$LSB_BUILD" = xy; then
# Can't use stack-protector with LSB binaries...
OPTIM="$OPTIM -fno-stack-protector"
else
- OPTIM="$OPTIM -fstack-protector"
+ OPTIM="$OPTIM -fstack-protector-strong"
fi
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(yes)
+ ], [
+ AC_MSG_CHECKING([whether compiler supports -fstack-protector])
+ CFLAGS="$OLDCFLAGS -fstack-protector"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()], [
+ AS_IF([test "x$LSB_BUILD" = xy], [
+ # Can't use stack-protector with LSB binaries...
+ OPTIM="$OPTIM -fno-stack-protector"
+ ], [
+ OPTIM="$OPTIM -fstack-protector"
+ ])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ ])
CFLAGS="$OLDCFLAGS"
if test "x$LSB_BUILD" != xy; then

View File

@ -1,16 +0,0 @@
diff --git a/scheduler/log.c b/scheduler/log.c
index 17331ff02..41ddb4cb9 100644
--- a/scheduler/log.c
+++ b/scheduler/log.c
@@ -569,11 +569,7 @@ cupsdLogJob(cupsd_job_t *job, /* I - Job */
* Format and write the log message...
*/
-#ifdef HAVE_SYSTEMD_SD_JOURNAL_H
- if (job && strcmp(ErrorLog, "syslog"))
-#else
if (job)
-#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */
snprintf(jobmsg, sizeof(jobmsg), "[Job %d] %s", job->id, message);
else
strlcpy(jobmsg, message, sizeof(jobmsg));

View File

@ -1,21 +1,23 @@
diff -up cups-2.3.0/config.h.in.lspp cups-2.3.0/config.h.in
--- cups-2.3.0/config.h.in.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/config.h.in 2019-10-07 12:24:43.058597468 +0200
@@ -684,4 +684,11 @@ static __inline int _cups_abs(int i) { r
# endif /* __GNUC__ || __STDC_VERSION__ */
#endif /* !HAVE_ABS && !abs */
diff -up cups-2.4.0/config.h.in.lspp cups-2.4.0/config.h.in
--- cups-2.4.0/config.h.in.lspp 2021-12-15 11:08:46.240015694 +0100
+++ cups-2.4.0/config.h.in 2021-12-15 11:10:32.956049666 +0100
@@ -684,6 +684,13 @@ static __inline int _cups_abs(int i) { r
+/*
/*
+ * Are we trying to meet LSPP requirements?
+ */
+
+#undef WITH_LSPP
+
+
#endif /* !_CUPS_CONFIG_H_ */
diff -up cups-2.3.0/config-scripts/cups-lspp.m4.lspp cups-2.3.0/config-scripts/cups-lspp.m4
--- cups-2.3.0/config-scripts/cups-lspp.m4.lspp 2019-10-07 12:24:43.058597468 +0200
+++ cups-2.3.0/config-scripts/cups-lspp.m4 2019-10-07 12:24:43.058597468 +0200
+/*
* Building as a snap (snapcraft.io)?
*/
diff -up cups-2.4.0/config-scripts/cups-lspp.m4.lspp cups-2.4.0/config-scripts/cups-lspp.m4
--- cups-2.4.0/config-scripts/cups-lspp.m4.lspp 2021-12-15 11:08:46.240015694 +0100
+++ cups-2.4.0/config-scripts/cups-lspp.m4 2021-12-15 11:08:46.240015694 +0100
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
@ -53,21 +55,21 @@ diff -up cups-2.3.0/config-scripts/cups-lspp.m4.lspp cups-2.3.0/config-scripts/c
+ ;;
+ esac
+fi
diff -up cups-2.3.0/configure.ac.lspp cups-2.3.0/configure.ac
--- cups-2.3.0/configure.ac.lspp 2019-10-07 12:24:43.058597468 +0200
+++ cups-2.3.0/configure.ac 2019-10-07 12:39:20.122546282 +0200
@@ -34,6 +34,8 @@ sinclude(config-scripts/cups-dnssd.m4)
diff -up cups-2.4.0/configure.ac.lspp cups-2.4.0/configure.ac
--- cups-2.4.0/configure.ac.lspp 2021-12-15 11:08:46.240015694 +0100
+++ cups-2.4.0/configure.ac 2021-12-15 11:11:10.204061528 +0100
@@ -40,6 +40,8 @@ sinclude(config-scripts/cups-container.m
sinclude(config-scripts/cups-startup.m4)
sinclude(config-scripts/cups-defaults.m4)
+sinclude(config-scripts/cups-lspp.m4)
+
dnl See what languages are available and make sure we generate the localization
dnl files as needed...
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
--- cups-2.3.0/filter/common.c.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/filter/common.c 2019-10-07 12:24:43.059597461 +0200
diff -up cups-2.4.0/filter/common.c.lspp cups-2.4.0/filter/common.c
--- cups-2.4.0/filter/common.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/filter/common.c 2021-12-15 11:08:46.240015694 +0100
@@ -11,6 +11,12 @@
* Include necessary headers...
*/
@ -236,9 +238,9 @@ diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
/*
diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
--- cups-2.3.0/filter/pstops.c.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/filter/pstops.c 2019-10-07 12:24:43.059597461 +0200
diff -up cups-2.4.0/filter/pstops.c.lspp cups-2.4.0/filter/pstops.c
--- cups-2.4.0/filter/pstops.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/filter/pstops.c 2021-12-15 11:08:46.241015694 +0100
@@ -3170,6 +3170,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
@ -394,22 +396,11 @@ diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
/*
diff -up cups-2.3.0/Makedefs.in.lspp cups-2.3.0/Makedefs.in
--- cups-2.3.0/Makedefs.in.lspp 2019-10-07 12:24:43.059597461 +0200
+++ cups-2.3.0/Makedefs.in 2019-10-07 12:37:19.200565805 +0200
@@ -174,7 +174,7 @@ IPPFIND_MAN = @IPPFIND_MAN@
LDFLAGS = @LDFLAGS@
LINKCUPS = @LINKCUPS@
LINKCUPSSTATIC = ../cups/$(LIBCUPSSTATIC) $(LIBS)
-LIBS = $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS)
+LIBS = $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
ONDEMANDFLAGS = @ONDEMANDFLAGS@
ONDEMANDLIBS = @ONDEMANDLIBS@
OPTIM = @OPTIM@
diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
--- cups-2.3.0/scheduler/client.c.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/client.c 2019-10-07 12:33:10.459693580 +0200
@@ -19,12 +19,20 @@
diff -up cups-2.4.0/Makedefs.in.lspp cups-2.4.0/Makedefs.in
diff -up cups-2.4.0/scheduler/client.c.lspp cups-2.4.0/scheduler/client.c
--- cups-2.4.0/scheduler/client.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/client.c 2021-12-15 11:08:46.242015694 +0100
@@ -20,12 +20,20 @@
#define _HTTP_NO_PRIVATE
#include "cupsd.h"
@ -430,7 +421,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
/*
@@ -265,6 +273,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
@@ -266,6 +274,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
}
#endif /* HAVE_TCPD_H */
@ -490,7 +481,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
#ifdef AF_LOCAL
if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
{
@@ -558,6 +619,13 @@ cupsdReadClient(cupsd_client_t *con) /*
@@ -559,6 +620,13 @@ cupsdReadClient(cupsd_client_t *con) /*
struct stat filestats; /* File information */
mime_type_t *type; /* MIME type of file */
static unsigned request_id = 0; /* Request ID for temp files */
@ -504,7 +495,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
status = HTTP_STATUS_CONTINUE;
@@ -1679,6 +1747,73 @@ cupsdReadClient(cupsd_client_t *con) /*
@@ -1680,6 +1748,73 @@ cupsdReadClient(cupsd_client_t *con) /*
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
}
@ -578,7 +569,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
{
if (!httpWait(con->http, 0))
@@ -3174,6 +3309,49 @@ is_path_absolute(const char *path) /* I
@@ -3183,6 +3318,49 @@ is_path_absolute(const char *path) /* I
return (1);
}
@ -628,10 +619,10 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
--- cups-2.3.0/scheduler/client.h.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/client.h 2019-10-07 12:24:43.113597079 +0200
@@ -13,6 +13,13 @@
diff -up cups-2.4.0/scheduler/client.h.lspp cups-2.4.0/scheduler/client.h
--- cups-2.4.0/scheduler/client.h.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/client.h 2021-12-15 11:12:47.620092552 +0100
@@ -14,6 +14,13 @@
#endif /* HAVE_AUTHORIZATION_H */
@ -645,7 +636,7 @@ diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
/*
* HTTP client structure...
*/
@@ -63,6 +70,10 @@ struct cupsd_client_s
@@ -64,6 +71,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
@ -656,20 +647,21 @@ diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
};
#define HTTP(con) ((con)->http)
@@ -136,6 +147,9 @@ extern void cupsdStartListening(void);
extern void cupsdStopListening(void);
@@ -136,6 +147,10 @@ extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
+#ifdef WITH_LSPP
+extern uid_t client_pid_to_auid(pid_t clipid);
+#endif /* WITH_LSPP */
#ifdef HAVE_SSL
+
#ifdef HAVE_TLS
extern int cupsdEndTLS(cupsd_client_t *con);
diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
--- cups-2.3.0/scheduler/conf.c.lspp 2019-10-07 12:24:43.049597531 +0200
+++ cups-2.3.0/scheduler/conf.c 2019-10-07 12:24:43.113597079 +0200
@@ -37,6 +37,9 @@
extern int cupsdStartTLS(cupsd_client_t *con);
diff -up cups-2.4.0/scheduler/conf.c.lspp cups-2.4.0/scheduler/conf.c
--- cups-2.4.0/scheduler/conf.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/conf.c 2021-12-15 11:08:46.242015694 +0100
@@ -38,6 +38,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
@ -679,7 +671,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
/*
* Configuration variable structure...
@@ -131,6 +134,10 @@ static const cupsd_var_t cupsd_vars[] =
@@ -129,6 +132,10 @@ static const cupsd_var_t cupsd_vars[] =
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN },
{ "Timeout", &Timeout, CUPSD_VARTYPE_TIME },
@ -690,7 +682,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
{ "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN }
};
static const cupsd_var_t cupsfiles_vars[] =
@@ -544,6 +551,9 @@ cupsdReadConfiguration(void)
@@ -539,6 +546,9 @@ cupsdReadConfiguration(void)
const char *tmpdir; /* TMPDIR environment variable */
struct stat tmpinfo; /* Temporary directory info */
cupsd_policy_t *p; /* Policy */
@ -700,7 +692,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
/*
@@ -864,6 +874,25 @@ cupsdReadConfiguration(void)
@@ -858,6 +868,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@ -726,7 +718,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemotePort ? "enabled" : "disabled");
@@ -1275,7 +1304,19 @@ cupsdReadConfiguration(void)
@@ -1286,7 +1315,19 @@ cupsdReadConfiguration(void)
cupsdClearString(&Classification);
if (Classification)
@ -746,7 +738,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
/*
* Check the MaxClients setting, and then allocate memory for it...
@@ -3830,6 +3871,18 @@ read_location(cups_file_t *fp, /* I - C
@@ -3874,6 +3915,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@ -765,12 +757,12 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
/*
* 'read_policy()' - Read a <Policy name> definition.
diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
--- cups-2.3.0/scheduler/conf.h.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/conf.h 2019-10-07 12:24:43.113597079 +0200
@@ -243,6 +243,13 @@ VAR char *ServerKeychain VALUE(NULL);
diff -up cups-2.4.0/scheduler/conf.h.lspp cups-2.4.0/scheduler/conf.h
--- cups-2.4.0/scheduler/conf.h.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/conf.h 2021-12-15 11:13:42.460110008 +0100
@@ -242,6 +242,13 @@ VAR char *ServerKeychain VALUE(NULL);
/* Keychain holding cert + key */
#endif /* HAVE_SSL */
#endif /* HAVE_TLS */
+#ifdef WITH_LSPP
+VAR int AuditLog VALUE(-1),
@ -782,7 +774,7 @@ diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
#ifdef HAVE_ONDEMAND
VAR int IdleExitTimeout VALUE(60);
/* Time after which an idle cupsd will exit */
@@ -261,6 +268,9 @@ VAR int HaveServerCreds VALUE(0);
@@ -260,6 +267,9 @@ VAR int HaveServerCreds VALUE(0);
VAR gss_cred_id_t ServerCreds; /* Server's GSS credentials */
#endif /* HAVE_GSSAPI */
@ -792,9 +784,9 @@ diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
/*
* Prototypes...
diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
--- cups-2.3.0/scheduler/cupsd.h.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/cupsd.h 2019-10-07 12:31:38.458480578 +0200
diff -up cups-2.4.0/scheduler/cupsd.h.lspp cups-2.4.0/scheduler/cupsd.h
--- cups-2.4.0/scheduler/cupsd.h.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/cupsd.h 2021-12-15 11:08:46.243015695 +0100
@@ -8,6 +8,8 @@
* information.
*/
@ -819,10 +811,10 @@ diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
#include "mime.h"
#if defined(HAVE_CDSASSL)
diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
--- cups-2.3.0/scheduler/ipp.c.lspp 2019-10-07 12:24:43.016597764 +0200
+++ cups-2.3.0/scheduler/ipp.c 2019-10-07 12:31:01.243798920 +0200
@@ -11,6 +11,9 @@
diff -up cups-2.4.0/scheduler/ipp.c.lspp cups-2.4.0/scheduler/ipp.c
--- cups-2.4.0/scheduler/ipp.c.lspp 2021-12-15 11:08:46.230015691 +0100
+++ cups-2.4.0/scheduler/ipp.c 2021-12-15 11:08:46.247015696 +0100
@@ -12,6 +12,9 @@
* information.
*/
@ -832,7 +824,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* Include necessary headers...
*/
@@ -27,6 +30,14 @@ extern int mbr_group_name_to_uuid(const
@@ -28,6 +31,14 @@ extern int mbr_group_name_to_uuid(const
extern int mbr_check_membership_by_id(uuid_t user, gid_t group, int* ismember);
#endif /* __APPLE__ */
@ -847,7 +839,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* Local functions...
@@ -51,6 +62,9 @@ static void cancel_all_jobs(cupsd_client
@@ -52,6 +63,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);
@ -857,7 +849,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/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,
@@ -1240,6 +1254,21 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1242,6 +1256,21 @@ add_job(cupsd_client_t *con, /* I - Cl
"time-at-creation",
"time-at-processing"
};
@ -879,7 +871,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
@@ -1568,6 +1597,106 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1570,6 +1599,106 @@ add_job(cupsd_client_t *con, /* I - Cl
attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);
@ -986,7 +978,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
@@ -1576,6 +1705,32 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1578,6 +1707,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
@ -1019,7 +1011,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
job->attrs = con->request;
job->dirty = 1;
@@ -1763,6 +1918,29 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1765,6 +1920,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]);
}
@ -1049,7 +1041,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
job->job_sheets = attr;
@@ -1793,6 +1971,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1795,6 +1973,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1059,7 +1051,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
@@ -1811,6 +1992,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1813,6 +1994,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);
@ -1069,7 +1061,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
@@ -1831,6 +2015,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1833,6 +2017,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);
@ -1079,7 +1071,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
@@ -1871,8 +2058,52 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1873,8 +2060,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1132,7 +1124,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* See if we need to add the starting sheet...
@@ -3648,6 +3879,128 @@ check_rss_recipient(
@@ -3664,6 +3895,128 @@ check_rss_recipient(
}
@ -1261,7 +1253,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
@@ -4103,6 +4456,15 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4119,6 +4472,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@ -1277,7 +1269,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -4138,6 +4500,85 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4154,6 +4516,85 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@ -1363,7 +1355,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* Try the localized banner file under the subdirectory...
@@ -4232,6 +4673,24 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4248,6 +4689,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@ -1388,7 +1380,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
@@ -6439,6 +6898,22 @@ get_job_attrs(cupsd_client_t *con, /* I
@@ -6475,6 +6934,22 @@ get_job_attrs(cupsd_client_t *con, /* I
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
@ -1411,7 +1403,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* Copy attributes...
*/
@@ -6836,6 +7311,11 @@ get_jobs(cupsd_client_t *con, /* I - C
@@ -6873,6 +7348,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
@ -1423,7 +1415,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
if (count > 0)
ippAddSeparator(con->response);
@@ -11445,6 +11925,11 @@ validate_user(cupsd_job_t *job, /* I
@@ -11474,6 +11954,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@ -1435,9 +1427,9 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
/*
* Check the username against the owner...
*/
diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
--- cups-2.3.0/scheduler/job.c.lspp 2019-10-07 12:24:43.024597707 +0200
+++ cups-2.3.0/scheduler/job.c 2019-10-07 12:30:13.092210820 +0200
diff -up cups-2.4.0/scheduler/job.c.lspp cups-2.4.0/scheduler/job.c
--- cups-2.4.0/scheduler/job.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/job.c 2021-12-15 11:08:46.248015696 +0100
@@ -8,6 +8,9 @@
* information.
*/
@ -1463,7 +1455,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
/*
* Design Notes for Job Management
@@ -544,6 +555,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -545,6 +556,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
/* PRINTER_STATE_REASONS env var */
rip_max_cache[255];
/* RIP_MAX_CACHE env variable */
@ -1478,7 +1470,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -1080,6 +1099,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -1065,6 +1084,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
if (final_content_type[0])
envp[envc ++] = final_content_type;
@ -1546,7 +1538,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
@@ -1858,6 +1938,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
@@ -1843,6 +1923,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
ippSetString(job->attrs, &job->reasons, 0, "none");
}
@ -1569,7 +1561,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/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);
@@ -2273,6 +2369,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
@@ -2251,6 +2347,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@ -1584,7 +1576,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
@@ -2295,6 +2399,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
@@ -2273,6 +2377,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchown(cupsFileNumber(fp), RunUser, Group);
@ -1663,7 +1655,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
@@ -3995,6 +4171,19 @@ get_options(cupsd_job_t *job, /* I - Jo
@@ -3972,6 +4148,19 @@ get_options(cupsd_job_t *job, /* I - Jo
banner_page)
continue;
@ -1683,7 +1675,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
/*
* Otherwise add them to the list...
*/
@@ -4805,6 +4994,18 @@ start_job(cupsd_job_t *job, /* I -
@@ -4782,6 +4971,18 @@ start_job(cupsd_job_t *job, /* I -
cupsd_printer_t *printer) /* I - Printer to print job */
{
const char *filename; /* Support filename */
@ -1702,7 +1694,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
"job-cancel-after",
IPP_TAG_INTEGER);
@@ -4993,6 +5194,113 @@ start_job(cupsd_job_t *job, /* I -
@@ -4970,6 +5171,113 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
@ -1816,9 +1808,9 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
/*
* Now start the first file in the job...
*/
diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
--- cups-2.3.0/scheduler/job.h.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/job.h 2019-10-07 12:29:54.364371023 +0200
diff -up cups-2.4.0/scheduler/job.h.lspp cups-2.4.0/scheduler/job.h
--- cups-2.4.0/scheduler/job.h.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/job.h 2021-12-15 11:08:46.249015697 +0100
@@ -7,6 +7,13 @@
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
@ -1844,10 +1836,10 @@ diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
};
typedef struct cupsd_joblog_s /**** Job log message ****/
diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
--- cups-2.3.0/scheduler/main.c.lspp 2019-10-07 12:24:43.037597616 +0200
+++ cups-2.3.0/scheduler/main.c 2019-10-07 12:24:43.119597037 +0200
@@ -57,6 +57,9 @@
diff -up cups-2.4.0/scheduler/main.c.lspp cups-2.4.0/scheduler/main.c
--- cups-2.4.0/scheduler/main.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/main.c 2021-12-15 11:08:46.249015697 +0100
@@ -58,6 +58,9 @@
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
@ -1857,7 +1849,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
/*
* Local functions...
@@ -123,6 +126,9 @@ main(int argc, /* I - Number of comm
@@ -124,6 +127,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 */
@ -1867,7 +1859,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
#ifdef __APPLE__
int use_sysman = 1; /* Use system management functions? */
#else
@@ -495,6 +501,25 @@ main(int argc, /* I - Number of comm
@@ -494,6 +500,25 @@ main(int argc, /* I - Number of comm
exit(errno);
}
@ -1893,7 +1885,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
/*
* Let the system know we are busy while we bring up cupsd...
*/
@@ -1201,6 +1226,11 @@ main(int argc, /* I - Number of comm
@@ -1203,6 +1228,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
@ -1905,10 +1897,10 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
return (!stop_scheduler);
}
diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
--- cups-2.3.0/scheduler/printers.c.lspp 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/printers.c 2019-10-07 12:29:17.956658129 +0200
@@ -8,6 +8,8 @@
diff -up cups-2.4.0/scheduler/printers.c.lspp cups-2.4.0/scheduler/printers.c
--- cups-2.4.0/scheduler/printers.c.lspp 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/scheduler/printers.c 2021-12-15 11:08:46.249015697 +0100
@@ -9,6 +9,8 @@
* information.
*/
@ -1917,7 +1909,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
/*
* Include necessary headers...
*/
@@ -32,6 +34,10 @@
@@ -33,6 +35,10 @@
# include <asl.h>
#endif /* __APPLE__ */
@ -1928,7 +1920,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
/*
* Local functions...
@@ -2252,6 +2258,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
@@ -2281,6 +2287,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
ipp_attribute_t *attr; /* Attribute data */
char *name, /* Current user/group name */
*filter; /* Current filter */
@ -1942,7 +1934,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
/*
@@ -2378,6 +2391,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
@@ -2405,6 +2418,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}

View File

@ -1,10 +1,10 @@
diff -up cups-2.2b2/config-scripts/cups-ssl.m4.no-export-ssllibs cups-2.2b2/config-scripts/cups-ssl.m4
--- cups-2.2b2/config-scripts/cups-ssl.m4.no-export-ssllibs 2016-06-27 15:06:22.299980753 +0200
+++ cups-2.2b2/config-scripts/cups-ssl.m4 2016-06-27 15:08:00.953154042 +0200
@@ -102,5 +102,5 @@ AC_SUBST(IPPALIASES)
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
diff -up cups-2.2b2/config-scripts/cups-tls.m4.no-export-ssllibs cups-2.2b2/config-scripts/cups-tls.m4
--- cups-2.2b2/config-scripts/cups-tls.m4.no-export-ssllibs 2016-06-27 15:06:22.299980753 +0200
+++ cups-2.2b2/config-scripts/cups-tls.m4 2016-06-27 15:08:00.953154042 +0200
@@ -102,5 +102,5 @@ AC_SUBST([IPPALIASES])
AC_SUBST([TLSFLAGS])
AC_SUBST([TLSLIBS])
-EXPORT_SSLLIBS="$SSLLIBS"
+EXPORT_SSLLIBS=""
AC_SUBST(EXPORT_SSLLIBS)
-EXPORT_TLSLIBS="$TLSLIBS"
+EXPORT_TLSLIBS=""
AC_SUBST([EXPORT_TLSLIBS])

View File

@ -1,13 +0,0 @@
diff --git a/scheduler/cups.service.in b/scheduler/cups.service.in
index a3fa0e8..baff51b 100644
--- a/scheduler/cups.service.in
+++ b/scheduler/cups.service.in
@@ -1,7 +1,7 @@
[Unit]
Description=CUPS Scheduler
Documentation=man:cupsd(8)
-After=network.target sssd.service ypbind.service nslcd.service
+After=network.target nss-user-lookup.target nslcd.service
Requires=cups.socket
[Service]

View File

@ -1,20 +0,0 @@
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index e0dbc4a..5e9a985 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -9891,11 +9891,10 @@ restart_job(cupsd_client_t *con, /* I - Client connection */
cupsdLogJob(job, CUPSD_LOG_DEBUG,
"Restarted by \"%s\" with job-hold-until=%s.",
username, attr->values[0].string.text);
- cupsdSetJobHoldUntil(job, attr->values[0].string.text, 0);
-
- cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE,
- NULL, job, "Job restarted by user with job-hold-until=%s",
- attr->values[0].string.text);
+ cupsdSetJobHoldUntil(job, attr->values[0].string.text, 1);
+ cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT,
+ "Job restarted by user with job-hold-until=%s",
+ attr->values[0].string.text);
}
else
{

13
cups-service-typo.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4
index d153fbc..ecbb291 100644
--- a/config-scripts/cups-defaults.m4
+++ b/config-scripts/cups-defaults.m4
@@ -10,7 +10,7 @@ dnl information.
dnl
dnl Set a default systemd WantedBy directive
-SYSTEMD_WANTED_BY="printers.target"
+SYSTEMD_WANTED_BY="printer.target"
dnl Default languages...
LANGUAGES="$(ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' ')"

109
cups.spec
View File

@ -10,14 +10,12 @@
#%%global prever rc1
#%%global VERSION %%{version}%%{prever}
%global VERSION %{version}
# Openprinting version
%global OP_VER op2
Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 2.3.3%{OP_VER}
Release: 11%{?dist}
Version: 2.4.0
Release: 1%{?dist}
License: ASL 2.0
Url: https://openprinting.github.io/cups/
# Apple stopped uploading the new versions into github, use OpenPrinting fork
@ -69,40 +67,8 @@ Patch100: cups-lspp.patch
%endif
#### UPSTREAM PATCHES (starts with 1000) ####
# add [Job N] in logs
Patch14: cups-logs.patch
# 1935318 - old samsung USB devices malfunction with the current
# (250ms) timeout for usb bulk transaction
# https://github.com/OpenPrinting/cups/pull/174
Patch15: 0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch
# 1949054 - Use nss-user-lookup.target instead of sssd.service and ypbind.service
# https://github.com/OpenPrinting/cups/pull/141
Patch16: cups-nssuserlookup-target.patch
# 1949068 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP
# https://github.com/OpenPrinting/cups/pull/132
Patch17: 0001-Retry-Validate-Job-once-if-needed-Issue-132.patch
# https://github.com/OpenPrinting/cups/pull/143
Patch18: 0001-cups.service.in-Add-SYSTEMD_WANTED_BY-variable.patch
# 1960170 - PreserveJobHistory/JobFiles aren't applied after the first cupsd restart right after successful print
Patch19: cups-cleanfiles.patch
# 2018950 - Unauthenticated users can't move print jobs in Web UI
Patch20: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch
# 1999957 - Printing of banner before PCL file only prints banner
Patch21: 0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch
# 2006715 - Trying to restart and hold a job doesn't work
Patch22: cups-restart-job-hold-until.patch
# stub out httpMD5 functions
Patch23: 0001-cups-md5passwd.c-Stub-out-httpMD5-functions.patch
# 2019845 - Add more warning messages about drivers going deprecated
Patch24: cups-deprecate-drivers.patch
# 2022610 - compile with -fstack-protector-strong if available
Patch25: cups-fstack-strong.patch
# Applying DigestOptions to MD5 Digest authentication defined by RFC 2069
Patch26: 0001-cups-http-support.c-Apply-DigestOptions-to-RFC-2069-.patch
# 2018957 - RFE: Implement IdleExitTimeout configuration during build
Patch27: 0001-Add-with-idle-exit-timeout-configure-option.patch
# 2018953 - RFE: Implement TimeoutStartSec configuration during build
Patch28: 0001-Add-with-systemd-timeoutstartsec-configure-option.patch
Patch1000: cups-service-typo.patch
Patch1001: 0001-de-index.html-Fix-missing-bracket-fixes-issue-299.patch
##### Patches removed because IMHO they aren't no longer needed
##### but still I'll leave them in git in case their removal
@ -303,37 +269,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch13 -p1 -b .dymo-deviceid
# UPSTREAM PATCHES
# add [Job N] to logs
%patch14 -p1 -b .logs
# 1935318 - old samsung USB devices malfunction with the current
#(250ms) timeout for usb bulk transaction
%patch15 -p1 -b .usb-read-timeout
# 1949054 - Use nss-user-lookup.target instead of sssd.service and ypbind.service
%patch16 -p1 -b .nssuserlookup-target
# 1949068 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP
%patch17 -p1 -b .validate-retry
# put multi-user.target into service file if configured with web interface
%patch18 -p1 -b .multiuser-target
# 1960170 - PreserveJobHistory/JobFiles aren't applied after the first cupsd restart right after successful print
%patch19 -p1 -b .cleanfiles
# 2018950 - Unauthenticated users can't move print jobs in Web UI
%patch20 -p1 -b .move-job
# 1999957 - Printing of banner before PCL file only prints banner
%patch21 -p1 -b .banner-rawfile
# 2006715 - Trying to restart and hold a job doesn't work
%patch22 -p1 -b .restart-hold-job
# stubbed out httpMD5 functions
%patch23 -p1 -b .no-httpmd5
# 2019845 - Add more warning messages about drivers going deprecated
%patch24 -p1 -b .deprecated-drivers
# 2022610 - compile with fstack-protector-strong if available
%patch25 -p1 -b .fstack-strong
# apply DigestOptions for MD5 Digest authentication defined by RFC 2069
%patch26 -p1 -b .no-digest-rfc2069
# 2018957 - RFE: Implement IdleExitTimeout configuration during build
%patch27 -p1 -b .conf-idleexittimeout
# 2018953 - RFE: Implement TimeoutStartSec configuration during build
%patch28 -p1 -b .conf-timeoutstartsec
%patch1000 -p1 -b .service-typo
%patch1001 -p1 -b .de-index-missing-bracket
%if %{lspp}
@ -368,25 +305,25 @@ export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS -Wall -fstack-clash-protection -D_FORTIFY
%if %{lspp}
--enable-lspp \
%endif
--with-exe-file-perm=0755 \
--with-cupsd-file-perm=0755 \
--with-log-file-perm=0600 \
--enable-relro \
--with-dbusdir=%{_sysconfdir}/dbus-1 \
--enable-avahi \
--enable-threads \
--enable-gnutls \
--enable-webif \
--with-xinetd=no \
--with-access-log-level=actions \
--enable-page-logging \
--with-rundir=%{_rundir}/cups \
--enable-relro \
--enable-sync-on-close \
--enable-webif \
--with-access-log-level=actions \
--with-cupsd-file-perm=0755 \
--with-dbusdir=%{_sysconfdir}/dbus-1 \
--with-dnssd=avahi \
--with-log-file-perm=0600 \
--with-ondemand=systemd \
--with-pkgconfpath=%{_libdir}/pkgconfig \
--with-rundir=%{_rundir}/cups \
--with-tls=gnutls \
--with-xinetd=no \
%if 0%{?rhel}
--without-idle-exit-timeout \
--without-systemd-timeoutstartsec \
%endif
localedir=%{_datadir}/locale
--localedir=%{_datadir}/locale
# If we got this far, all prerequisite libraries must be here.
%make_build
@ -574,6 +511,8 @@ rm -f %{cups_serverbin}/backend/smb
%{_datadir}/cups/ppdc/*.h
%dir %{_datadir}/cups/templates
%{_datadir}/cups/templates/*.tmpl
%dir %{_datadir}/cups/templates/da
%{_datadir}/cups/templates/da/*.tmpl
%dir %{_datadir}/cups/templates/de
%{_datadir}/cups/templates/de/*.tmpl
%dir %{_datadir}/cups/templates/es
@ -597,8 +536,10 @@ rm -f %{cups_serverbin}/backend/smb
%{_datadir}/%{name}/www/index.html
%{_datadir}/%{name}/www/help
%{_datadir}/%{name}/www/robots.txt
%{_datadir}/%{name}/www/da/index.html
%{_datadir}/%{name}/www/de/index.html
%{_datadir}/%{name}/www/es/index.html
%{_datadir}/%{name}/www/fr/index.html
%{_datadir}/%{name}/www/ja/index.html
%{_datadir}/%{name}/www/ru/index.html
%{_datadir}/%{name}/www/pt_BR/index.html
@ -683,6 +624,7 @@ rm -f %{cups_serverbin}/backend/smb
%{_bindir}/cups-config
%{_includedir}/cups
%{_libdir}/*.so
%{_libdir}/pkgconfig/cups.pc
%{_mandir}/man1/cups-config.1.gz
%{_rpmconfigdir}/macros.d/macros.cups
@ -710,6 +652,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man7/ippeveps.7.gz
%changelog
* Tue Jan 04 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.4.0-1
- 2027497 - cups-2.4.0 is available
* Mon Nov 29 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-11
- 2018957 - RFE: Implement IdleExitTimeout configuration during build
- 2018953 - RFE: Implement TimeoutStartSec configuration during build

View File

@ -1 +1 @@
SHA512 (cups-2.3.3op2-source.tar.gz) = db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117
SHA512 (cups-2.4.0-source.tar.gz) = f86daaee5a3be76f5643bfb59b862de80d821256e16c74a82b0c37b5f488a422c76775ecd23554367ea62e61119386afe3f1e2660813b732ef66bea69a5eec9f