From 668a6fd4d43ae3d14599471a6d990fa33c927910 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 3 Nov 2021 14:10:37 +0100 Subject: [PATCH] 2006713 - Trying to restart and hold a job doesn't work Resolves: rhbz#2006713 --- cups-restart-job-hold-until.patch | 20 ++++++++++++++++++++ cups.spec | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 cups-restart-job-hold-until.patch diff --git a/cups-restart-job-hold-until.patch b/cups-restart-job-hold-until.patch new file mode 100644 index 0000000..d235518 --- /dev/null +++ b/cups-restart-job-hold-until.patch @@ -0,0 +1,20 @@ +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 + { diff --git a/cups.spec b/cups.spec index fa5a0a4..9301537 100644 --- a/cups.spec +++ b/cups.spec @@ -82,6 +82,8 @@ Patch17: cups-validate-1st.patch Patch18: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch # 1999955 - Printing of banner before PCL file only prints banner Patch19: 0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch +# 2006713 - Trying to restart and hold a job doesn't work +Patch20: cups-restart-job-hold-until.patch ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal @@ -295,6 +297,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch18 -p1 -b .move-job # 1999955 - Printing of banner before PCL file only prints banner %patch19 -p1 -b .banner-rawfiles +# 2006713 - Trying to restart and hold a job doesn't work +%patch20 -p1 -b .restart-hold-job %if %{lspp} @@ -695,6 +699,7 @@ rm -f %{cups_serverbin}/backend/smb * Wed Nov 03 2021 Zdenek Dohnal - 1:2.3.3op2-9 - 2018948 - Unauthenticated users can't move print jobs in Web UI - 1999955 - Printing of banner before PCL file only prints banner +- 2006713 - Trying to restart and hold a job doesn't work * Mon Aug 09 2021 Mohan Boddu - 1:2.3.3op2-8 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags