diff -Nru cups-2.2.9/debian/changelog cups-2.2.9/debian/changelog --- cups-2.2.9/debian/changelog 2018-12-05 16:45:00.000000000 -0500 +++ cups-2.2.9/debian/changelog 2018-12-06 03:14:58.000000000 -0500 @@ -1,3 +1,10 @@ +cups (2.2.9-3ubuntu1) disco; urgency=medium + + [ Dariusz Gadomski ] + * Fix handling of MaxJobTime 0 (LP: #1804576) + + -- Dan Streetman Thu, 06 Dec 2018 09:14:58 +0100 + cups (2.2.9-3) unstable; urgency=medium * debian/control cleanup: diff -Nru cups-2.2.9/debian/control cups-2.2.9/debian/control --- cups-2.2.9/debian/control 2018-12-05 16:45:00.000000000 -0500 +++ cups-2.2.9/debian/control 2018-12-06 03:14:58.000000000 -0500 @@ -1,5 +1,6 @@ Source: cups -Maintainer: Debian Printing Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Printing Team Uploaders: Didier Raboud , Till Kamppeter Section: net 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