diff --git a/.cups.metadata b/.cups.metadata new file mode 100644 index 0000000..6d7a1ff --- /dev/null +++ b/.cups.metadata @@ -0,0 +1 @@ +23108e0f6ca7d8caa1a6a6224f5322e21ba0a27d cups-2.3.3op2-source.tar.gz diff --git a/0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch b/0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch new file mode 100644 index 0000000..0c7f8c3 --- /dev/null +++ b/0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch @@ -0,0 +1,36 @@ +From db9cecdd932e58c51d2d659f63415ad47d151717 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Fri, 1 Sep 2023 17:11:54 +0200 +Subject: [PATCH] scheduler/conf.c: Print to stderr if we don't open + cups-files.conf + +In case cupsd can't open the cups-files.conf, the error message is lost +if journal and syslog don't exist or work on system (usually in +containers). + +Log the error into stderr at this place to get the error message if +needed. +--- + scheduler/conf.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/scheduler/conf.c b/scheduler/conf.c +index b18535162..4fa7eb1df 100644 +--- a/scheduler/conf.c ++++ b/scheduler/conf.c +@@ -811,11 +811,7 @@ cupsdReadConfiguration(void) + cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile); + else + { +-#ifdef HAVE_SYSTEMD_SD_JOURNAL_H +- sd_journal_print(LOG_ERR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno)); +-#else +- syslog(LOG_LPR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno)); +-#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */ ++ fprintf(stderr, "Unable to read \"%s\" - %s\n", CupsFilesFile, strerror(errno)); + + return (0); + } +-- +2.41.0 + diff --git a/cups.spec b/cups.spec index 1aa335d..a8816a6 100644 --- a/cups.spec +++ b/cups.spec @@ -128,6 +128,8 @@ Patch35: 0001-cups-strlcpy-handle-zero-size.patch Patch36: 0001-Require-authentication-for-CUPS-Get-Document.patch # RHEL-14931 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off" Patch37: cups-preservejobfiles-leak.patch +# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost +Patch38: 0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch ##### Patches removed because IMHO they aren't no longer needed @@ -385,6 +387,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch36 -p1 -b .get-document-auth # RHEL-14931 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off" %patch37 -p1 -b .preservejobfiles-leak +# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost +%patch38 -p1 -b .log-stderr %if %{lspp} # LSPP support. @@ -821,6 +825,7 @@ rm -f %{cups_serverbin}/backend/smb %changelog * Thu Nov 02 2023 Zdenek Dohnal - 1:2.3.3op2-22 - RHEL-14931 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off" +- RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost * Tue Aug 29 2023 Zdenek Dohnal - 1:2.3.3op2-21 - bump the spec because the previous build was made with buildroot 9.2