diff mbox series

cups: fix temporary queues for discovered printers

Message ID 20261121160050.1531479-2-f_l_k@t-online.de
State New
Headers show
Series cups: fix temporary queues for discovered printers | expand

Commit Message

Markus Volk Nov. 21, 2026, 3:59 p.m. UTC
Since 2.4.20 cupsd stores the device URI "://" for every temporary
queue: create_local_printer() reads the URI into device_uri_ptr but
still splits and stores the former printer-name pointer. Discovered
IPP Everywhere printers without a configured queue can no longer be
used. Backport the two upstream fixes from the 2.4.x branch.

Tested by printing to a discovered IPP Everywhere printer without a
configured queue.

AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-extended/cups/cups.inc           |  1 +
 ...Fix-regression-with-temporary-queues.patch | 42 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-extended/cups/cups/0005-Fix-regression-with-temporary-queues.patch

Comments

patchtest@automation.yoctoproject.org Nov. 21, 2026, 4:16 p.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/cups-fix-temporary-queues-for-discovered-printers.patch

FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: '0005-Fix-regression-with-temporary-queues.patch' (test_patch.TestPatch.test_signed_off_by_presence)

PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test auh changelog truncation notice (test_mbox.TestMbox.test_auh_changelog_truncation_notice)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping test (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
diff mbox series

Patch

diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index f82fc0a1aa..b7579ff70a 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -13,6 +13,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
            file://0002-don-t-try-to-run-generated-binaries.patch \
            file://libexecdir.patch \
            file://0004-cups-fix-multilib-install-file-conflicts.patch \
+           file://0005-Fix-regression-with-temporary-queues.patch \
            file://volatiles.99_cups \
            file://cups-volatiles.conf \
            "
diff --git a/meta/recipes-extended/cups/cups/0005-Fix-regression-with-temporary-queues.patch b/meta/recipes-extended/cups/cups/0005-Fix-regression-with-temporary-queues.patch
new file mode 100644
index 0000000000..e72a9eecf4
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0005-Fix-regression-with-temporary-queues.patch
@@ -0,0 +1,42 @@ 
+From 67dcee9f60a2a1410993510ab00c7203af5c5804 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <msweet@msweet.org>
+Date: Fri, 9 Oct 2026 12:01:20 -0400
+Subject: [PATCH] Fix regression with temporary queues (Issue #1751)
+
+create_local_printer() took the device URI into device_uri_ptr, but still
+split and stored the former printer-name pointer, so every temporary queue
+got the device URI "://" and failed.
+
+Combines the upstream commits 67dcee9f60 and e11ff1a9e8 on the 2.4.x
+branch, without the CHANGES.md entry.
+
+Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/67dcee9f60a2a1410993510ab00c7203af5c5804, https://github.com/OpenPrinting/cups/commit/e11ff1a9e8c6ec71edbaac5d5e5590d11aff64ef]
+---
+diff --git a/scheduler/ipp.c b/scheduler/ipp.c
+index af8cf12..96364f4 100644
+--- a/scheduler/ipp.c
++++ b/scheduler/ipp.c
+@@ -5796,11 +5796,11 @@ create_local_printer(
+ 
+   if (nameptr)
+   {
+-    size_t host_len,
+-        server_name_len;
++    size_t	host_len,		/* Length of hostname */
++		server_name_len;	/* Length of server name */
+ 
+     /* Get host name of device URI */
+-    httpSeparateURI(HTTP_URI_CODING_ALL, ptr,
++    httpSeparateURI(HTTP_URI_CODING_ALL, device_uri_ptr,
+ 		    scheme, sizeof(scheme), userpass, sizeof(userpass), host,
+ 		    sizeof(host), &port, resource, sizeof(resource));
+ 
+@@ -5832,7 +5832,7 @@ create_local_printer(
+     cupsdSetDeviceURI(printer, uri);
+   }
+   else
+-    cupsdSetDeviceURI(printer, ptr);
++    cupsdSetDeviceURI(printer, device_uri_ptr);
+ 
+   if (printer_geo_location)
+     cupsdSetString(&printer->geo_location, ippGetString(printer_geo_location, 0, NULL));