--- Begin Message ---
Package: cups
Version: 2.2.9-3
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch
Dear Maintainer,
Setting the cupsd option MaxJobTime to 0 should make the server wait
indefinitely for the job to be ready for print. Instead, after
updating job-cancel-after option with MaxJobTime=0 value it results
in immediate cancelling.
In Ubuntu, the attached patch was applied to achieve the following:
[ Dariusz Gadomski ]
* Fix handling of MaxJobTime 0 (LP: #1804576)
Thanks for considering the patch.
-- System Information:
Debian Release: buster/sid
APT prefers cosmic-updates
APT policy: (500, 'cosmic-updates'), (500, 'cosmic-security'), (500, 'cosmic'), (100, 'cosmic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.18.0-11-generic (SMP w/24 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru cups-2.2.9/debian/patches/fix-handling-of-MaxJobTime.patch cups-2.2.9/debian/patches/fix-handling-of-MaxJobTime.patch
--- cups-2.2.9/debian/patches/fix-handling-of-MaxJobTime.patch 1969-12-31 19:00:00.000000000 -0500
+++ cups-2.2.9/debian/patches/fix-handling-of-MaxJobTime.patch 2018-12-06 03:14:58.000000000 -0500
@@ -0,0 +1,36 @@
+Description: Fix handling of MaxJobTime 0
+ Setting MaxJobTime to 0 resulted in immediate job cancellation
+ instead of disabling timeout-based cancelation (as per documentation).
+ .
+ cups (2.2.9-3ubuntu1) disco; urgency=medium
+ .
+ * Fix handling of MaxJobTime 0 (LP: #1804576)
+Origin: upstream, https://github.com/apple/cups/commit/8c7143551ab03423990c62923209363d760f925f
+Bug: https://github.com/apple/cups/issues/5438
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1804576
+
+--- cups-2.2.9.orig/scheduler/job.c
++++ cups-2.2.9/scheduler/job.c
+@@ -5130,8 +5130,10 @@ update_job(cupsd_job_t *job) /* I - Job
+
+ if (cancel_after)
+ job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
+- else
++ else if (MaxJobTime > 0)
+ job->cancel_time = time(NULL) + MaxJobTime;
++ else
++ job->cancel_time = 0;
+ }
+ }
+ }
+--- cups-2.2.9.orig/scheduler/printers.c
++++ cups-2.2.9/scheduler/printers.c
+@@ -3445,7 +3445,7 @@ add_printer_defaults(cupsd_printer_t *p)
+ "document-format-default", NULL, "application/octet-stream");
+
+ if (!cupsGetOption("job-cancel-after", p->num_options, p->options))
+- ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
++ ippAddInteger(p->attrs, IPP_TAG_PRINTER, MaxJobTime > 0 ? IPP_TAG_INTEGER : IPP_TAG_NOVALUE,
+ "job-cancel-after-default", MaxJobTime);
+
+ if (!cupsGetOption("job-hold-until", p->num_options, p->options))
diff -Nru cups-2.2.9/debian/patches/series cups-2.2.9/debian/patches/series
--- cups-2.2.9/debian/patches/series 2018-12-05 16:45:00.000000000 -0500
+++ cups-2.2.9/debian/patches/series 2018-12-06 03:14:58.000000000 -0500
@@ -38,3 +38,4 @@
0038-The-lp-and-lpr-commands-now-provide-better-error-mes.patch
0039-Fix-E-option-Issue-5440.patch
manpage-translations.patch
+fix-handling-of-MaxJobTime.patch
--- End Message ---
--- Begin Message ---
Source: cups
Source-Version: 2.2.9-4
We believe that the bug you reported is fixed in the latest version of
cups, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 915724@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Didier Raboud <odyx@debian.org> (supplier of updated cups package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Thu, 06 Dec 2018 19:05:22 +0100
Source: cups
Binary: libcups2 libcupsimage2 cups cups-core-drivers cups-daemon cups-client cups-ipp-utils libcups2-dev libcupsimage2-dev cups-bsd cups-common cups-server-common cups-ppdc
Architecture: source
Version: 2.2.9-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
Changed-By: Didier Raboud <odyx@debian.org>
Description:
cups - Common UNIX Printing System(tm) - PPD/driver support, web interfa
cups-bsd - Common UNIX Printing System(tm) - BSD commands
cups-client - Common UNIX Printing System(tm) - client programs (SysV)
cups-common - Common UNIX Printing System(tm) - common files
cups-core-drivers - Common UNIX Printing System(tm) - driverless printing
cups-daemon - Common UNIX Printing System(tm) - daemon
cups-ipp-utils - Common UNIX Printing System(tm) - IPP developer/admin utilities
cups-ppdc - Common UNIX Printing System(tm) - PPD manipulation utilities
cups-server-common - Common UNIX Printing System(tm) - server common files
libcups2 - Common UNIX Printing System(tm) - Core library
libcups2-dev - Common UNIX Printing System(tm) - Development files CUPS library
libcupsimage2 - Common UNIX Printing System(tm) - Raster image library
libcupsimage2-dev - Common UNIX Printing System(tm) - Development files CUPS image li
Closes: 915724
Changes:
cups (2.2.9-4) unstable; urgency=medium
.
* Cherry-pick from upstream:
- Fix handling of MaxJobTime 0
(Issue #5438, LP: #1804576, Closes: #915724)
Checksums-Sha1:
da25c15ce94ef390f7a07ee43eaa00653ddb94f9 3257 cups_2.2.9-4.dsc
7a49e31b6c44817f10448d92a3a0a5c946694ccc 350044 cups_2.2.9-4.debian.tar.xz
Checksums-Sha256:
939ab83f0d2d23e93fca5b72666915ec35e435426f4aee934c7962b08320983b 3257 cups_2.2.9-4.dsc
24691eeb6944c0cedb80256cc6a013d37b4ef2bf38487ba32b69fa142b03fa60 350044 cups_2.2.9-4.debian.tar.xz
Files:
512492b6e3dae1c0089372771497babc 3257 net optional cups_2.2.9-4.dsc
401146e34a553319abc11c8755e91c2e 350044 net optional cups_2.2.9-4.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEEe+WPIRpjNw1/GSB7i8+nHsoWNFUFAlwJZkQACgkQi8+nHsoW
NFXAqQwAgRhjUB0xHz98vnWXq0V+d4kS/pQXsKC6XApG0wVVQ331XXBX7VSvPq4n
Uqmo8T3iQ8KG4B8OxTKW8h+fwcvajkTGDMTX/UUzpm3W1Z5qLwnaP6cKiZbbrq/3
d8zcx5F6cJsxC9Gb7LXPg7gnC9bzmIPISrcKrvMVlGhkdiKmGTO0YTl+oit2dcNk
NnG6B76FfB2hAgCBAT+TVr8uDgd2qp2QJhFGuIsjKKU8u4Y1ZYS6TicqCAPtZKms
JSF06MiTZTooip8vS9vteWOwRqvxf66udPehEJl83xl6UtANpffX0LStUR3FCLMa
+MNXMlNF+ERvLKKS359v5akheYZtuSKAJmhbE1oPGNL2zVUFbVzmj+P256B3RrfF
iOaRqzU6dFHvsyviURsXKrvmsSAp4vw1D/CX5T7JQX9Oym0crFYhbBtiKOkSeBPt
Shtt7emmZPgTs7cxe6BOEEf5kE2oXNmPT1I4ZGuFBVw2dXidw31ju/Lth5gFuf9G
8qjQ6o0P
=aOKn
-----END PGP SIGNATURE-----
--- End Message ---