summaryrefslogtreecommitdiff
path: root/net-print/cups/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-print/cups/files')
-rw-r--r--net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch29
-rw-r--r--net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch43
-rw-r--r--net-print/cups/files/cups-2.3.3-manpage.patch23
-rw-r--r--net-print/cups/files/cups-2.3.3-timeout.patch26
-rw-r--r--net-print/cups/files/cupsd.init.d-r422
5 files changed, 143 insertions, 0 deletions
diff --git a/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch b/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch
new file mode 100644
index 000000000000..1782d122ae55
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch
@@ -0,0 +1,29 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:47:37 +0200
+Subject: backend/usb-libusb.c: Revert enforcing read limits
+
+This commit reverts the change introduced by 2.2.12 [1] - its
+implementation caused a regression with Lexmark filters.
+
+[1] https://github.com/apple/cups/commit/35e927f83529cd9b4bc37bcd418c50e307fced35
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/72
+---
+ backend/usb-libusb.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index fbb0d9d..89b5182 100644
+--- a/backend/usb-libusb.c
++++ b/backend/usb-libusb.c
+@@ -1721,7 +1721,8 @@ static void *read_thread(void *reference)
+ * Make sure this loop executes no more than once every 250 miliseconds...
+ */
+
+- if ((g.wait_eof || !g.read_thread_stop))
++ if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
++ (g.wait_eof || !g.read_thread_stop))
+ usleep(250000);
+ }
+ while (g.wait_eof || !g.read_thread_stop);
diff --git a/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch b/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch
new file mode 100644
index 000000000000..a677090cd91c
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch
@@ -0,0 +1,43 @@
+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
+
diff --git a/net-print/cups/files/cups-2.3.3-manpage.patch b/net-print/cups/files/cups-2.3.3-manpage.patch
new file mode 100644
index 000000000000..db22adeeec4d
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-manpage.patch
@@ -0,0 +1,23 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Fri, 12 Feb 2021 13:47:22 +0100
+Subject: Let cups.1 point to client.conf.5, not client.conf.7
+
+Bug: https://github.com/OpenPrinting/cups/pull/92
+Closes: #982303
+---
+ man/cups.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/cups.1 b/man/cups.1
+index 706620d..751ad9a 100644
+--- a/man/cups.1
++++ b/man/cups.1
+@@ -125,7 +125,7 @@ Printers that do not support IPP can be supported using applications such as
+ .BR ippeveprinter (1).
+ .SH SEE ALSO
+ .BR cancel (1),
+-.BR client.conf (7),
++.BR client.conf (5),
+ .BR cupsctl (8),
+ .BR cupsd (8),
+ .BR lp (1),
diff --git a/net-print/cups/files/cups-2.3.3-timeout.patch b/net-print/cups/files/cups-2.3.3-timeout.patch
new file mode 100644
index 000000000000..280f71f2fad2
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-timeout.patch
@@ -0,0 +1,26 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:44:14 +0200
+Subject: backend/usb-libusb.c: Use 60s timeout for reading at backchannel
+
+Some older models malfunction if timeout is too short.
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/160
+Bug-Debian: https://bugs.debian.org/989073
+---
+ backend/usb-libusb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index d6b0eb4..fbb0d9d 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);
diff --git a/net-print/cups/files/cupsd.init.d-r4 b/net-print/cups/files/cupsd.init.d-r4
new file mode 100644
index 000000000000..3f65258fbe43
--- /dev/null
+++ b/net-print/cups/files/cupsd.init.d-r4
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+
+description="The Common Unix Printing System daemon"
+command="/usr/sbin/cupsd"
+command_args="-f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf"
+pidfile="/run/cupsd.pid"
+start_stop_daemon_args="-b -m --pidfile ${pidfile}"
+
+depend() {
+ use net
+ @neededservices@
+ before nfs
+ after logger
+}
+
+start_pre() {
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss
+ checkpath -q -d -m 0755 -o root:lp /run/cups
+ checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs
+}