From bbec5b807ed87eb4632918090a6611b610a5114e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 14 May 2021 08:33:21 +0200 Subject: [PATCH] 1949067 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP Resolves: rhbz#1949067 --- cups-validate-1st.patch | 27 +++++++++++++++++++++++++++ cups.spec | 9 ++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 cups-validate-1st.patch diff --git a/cups-validate-1st.patch b/cups-validate-1st.patch new file mode 100644 index 0000000..36ca30c --- /dev/null +++ b/cups-validate-1st.patch @@ -0,0 +1,27 @@ +diff -up cups-2.3.3op2/backend/ipp.c.validate-retry cups-2.3.3op2/backend/ipp.c +--- cups-2.3.3op2/backend/ipp.c.validate-retry 2021-03-11 12:55:46.461135739 +0100 ++++ cups-2.3.3op2/backend/ipp.c 2021-03-11 13:29:09.312859343 +0100 +@@ -256,6 +256,7 @@ main(int argc, /* I - Number of comm + 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? */ ++ validation_retried = 0, /* Indicate whether Validate-Job was retried */ + copies, /* Number of copies for job */ + copies_remaining; /* Number of copies remaining */ + const char *content_type, /* CONTENT_TYPE environment variable */ +@@ -1559,7 +1560,15 @@ main(int argc, /* I - Number of comm + ipp_status == IPP_STATUS_ERROR_BAD_REQUEST) + break; + else if (job_auth == NULL && ipp_status > IPP_STATUS_ERROR_BAD_REQUEST) ++ { ++ if (!validation_retried) ++ { ++ validation_retried = 1; ++ sleep(10); ++ continue; ++ } + goto cleanup; ++ } + } + + /* diff --git a/cups.spec b/cups.spec index 85ef5fa..14568e3 100644 --- a/cups.spec +++ b/cups.spec @@ -17,7 +17,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.3.3%{OP_VER} -Release: 6%{?dist} +Release: 7%{?dist} License: ASL 2.0 Url: http://www.cups.org/ # Apple stopped uploading the new versions into github, use OpenPrinting fork @@ -76,6 +76,8 @@ Patch15: cups-nssuserlookup-target.patch # 1960160 - PreserveJobHistory/JobFiles aren't applied after # the first cupsd restart right after successful print Patch16: cups-cleanfiles.patch +# 1949067 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP +Patch17: cups-validate-1st.patch ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal @@ -283,6 +285,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in # 1960160 - PreserveJobHistory/JobFiles aren't applied after # the first cupsd restart right after successful print %patch16 -p1 -b .cleanfiles +# 1949067 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP +%patch17 -p1 -b .validate-retry %if %{lspp} @@ -680,6 +684,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippeveps.7.gz %changelog +* Fri May 14 2021 Zdenek Dohnal - 1:2.3.3op2-7 +- 1949067 - Print queue is paused after ipp backend ends with CUPS_BACKEND_STOP + * Thu May 13 2021 Zdenek Dohnal - 1:2.3.3op2-6 - 1960160 - PreserveJobHistory/JobFiles aren't applied after the first cupsd restart right after successful print