diff --git a/.gitignore b/.gitignore index a5e2820..97369e2 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ cups-1.4.4-source.tar.bz2 /cups-2.2.11-source.tar.gz /cups-2.2.12-source.tar.gz /cups-2.3.0-source.tar.gz +/cups-2.3.1-source.tar.gz diff --git a/0001-Add-workaround-for-systemd-s-lack-of-true-launch-on-.patch b/0001-Add-workaround-for-systemd-s-lack-of-true-launch-on-.patch deleted file mode 100644 index dcd6ad9..0000000 --- a/0001-Add-workaround-for-systemd-s-lack-of-true-launch-on-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f8688d733bc1ecf86e5b7af7c40b758c0c9c4f28 Mon Sep 17 00:00:00 2001 -From: Michael R Sweet -Date: Thu, 5 Sep 2019 12:43:58 -0400 -Subject: [PATCH] Add workaround for systemd's lack of true launch-on-demand - support (Issue #5640) - -diff --git a/scheduler/main.c b/scheduler/main.c -index 842b00a42..d5fdf971a 100644 ---- a/scheduler/main.c -+++ b/scheduler/main.c -@@ -757,7 +757,9 @@ main(int argc, /* I - Number of command-line args */ - #ifdef HAVE_ONDEMAND - if (OnDemand) - { -+# ifndef HAVE_SYSTEMD /* Issue #5640: systemd doesn't actually support launch-on-demand services, need to fake it */ - stop_scheduler = 1; -+# endif /* HAVE_SYSTEMD */ - break; - } - #endif /* HAVE_ONDEMAND */ --- -2.20.1 - diff --git a/0001-Fix-handling-of-printer-resource-files-Issue-5652.patch b/0001-Fix-handling-of-printer-resource-files-Issue-5652.patch deleted file mode 100644 index 382f5ce..0000000 --- a/0001-Fix-handling-of-printer-resource-files-Issue-5652.patch +++ /dev/null @@ -1,110 +0,0 @@ -From eff8c82f6a43ee1816e3b5899381d525c3231d37 Mon Sep 17 00:00:00 2001 -From: Michael R Sweet -Date: Wed, 2 Oct 2019 14:06:02 -0400 -Subject: [PATCH] Fix handling of printer resource files (Issue #5652) -diff --git a/scheduler/client.c b/scheduler/client.c -index f693e7c49..c2ee8f12a 100644 ---- a/scheduler/client.c -+++ b/scheduler/client.c -@@ -1099,7 +1099,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ - } - } - } -- else if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/printers", 9) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5)) -+ else if (!buf[0] && (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9))) - { - if (!WebInterface) - { -@@ -1125,14 +1125,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ - cupsdSetStringf(&con->command, "%s/cgi-bin/admin.cgi", ServerBin); - cupsdSetString(&con->options, strchr(con->uri + 6, '?')); - } -- else if (!strncmp(con->uri, "/printers", 9)) -- { -- cupsdSetStringf(&con->command, "%s/cgi-bin/printers.cgi", ServerBin); -- if (con->uri[9] && con->uri[10]) -- cupsdSetString(&con->options, con->uri + 9); -- else -- cupsdSetString(&con->options, NULL); -- } - else if (!strncmp(con->uri, "/classes", 8)) - { - cupsdSetStringf(&con->command, "%s/cgi-bin/classes.cgi", ServerBin); -@@ -1149,6 +1141,14 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ - else - cupsdSetString(&con->options, NULL); - } -+ else if (!strncmp(con->uri, "/printers", 9)) -+ { -+ cupsdSetStringf(&con->command, "%s/cgi-bin/printers.cgi", ServerBin); -+ if (con->uri[9] && con->uri[10]) -+ cupsdSetString(&con->options, con->uri + 9); -+ else -+ cupsdSetString(&con->options, NULL); -+ } - else - { - cupsdSetStringf(&con->command, "%s/cgi-bin/help.cgi", ServerBin); -@@ -1458,7 +1458,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ - break; - } - -- if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/printers", 9) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5)) -+ if (!buf[0] && (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9))) - { - /* - * CGI output... -@@ -2701,6 +2701,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */ - * Figure out the real filename... - */ - -+ filename[0] = '\0'; - language[0] = '\0'; - - if (!strncmp(con->uri, "/help", 5) && (con->uri[5] == '/' || !con->uri[5])) -@@ -2718,6 +2719,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */ - - if ((p = cupsdFindDest(dest)) == NULL) - { -+ strlcpy(filename, "/", len); - cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest); - return (NULL); - } -@@ -2754,6 +2756,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */ - - if ((p = cupsdFindDest(dest)) == NULL) - { -+ strlcpy(filename, "/", len); - cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest); - return (NULL); - } -@@ -2786,6 +2789,14 @@ get_file(cupsd_client_t *con, /* I - Client connection */ - - perm_check = 0; - } -+ else if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9)) -+ { -+ /* -+ * Admin/class/job/printer pages are served by CGI... -+ */ -+ -+ return (NULL); -+ } - else if (!strncmp(con->uri, "/rss/", 5) && !strchr(con->uri + 5, '/')) - snprintf(filename, len, "%s/rss/%s", CacheDir, con->uri + 5); - else if (!strncmp(con->uri, "/strings/", 9) && !strcmp(con->uri + strlen(con->uri) - 8, ".strings")) -@@ -2795,12 +2806,14 @@ get_file(cupsd_client_t *con, /* I - Client connection */ - - if ((p = cupsdFindDest(dest)) == NULL) - { -+ strlcpy(filename, "/", len); - cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest); - return (NULL); - } - - if (!p->strings) - { -+ strlcpy(filename, "/", len); - cupsdLogClient(con, CUPSD_LOG_INFO, "No strings files for \"%s\".", dest); - return (NULL); - } diff --git a/0001-PPD-files-containing-custom-option-keywords-did-not-.patch b/0001-PPD-files-containing-custom-option-keywords-did-not-.patch deleted file mode 100644 index 32b9d0a..0000000 --- a/0001-PPD-files-containing-custom-option-keywords-did-not-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2a06655e5c1925f09d5a2e38cd073eb1b6f069ad Mon Sep 17 00:00:00 2001 -From: Michael R Sweet -Date: Tue, 15 Oct 2019 17:05:55 -0400 -Subject: [PATCH] PPD files containing custom option keywords did not work - (Issue #5639) - -diff --git a/cups/ppd.c b/cups/ppd.c -index fae19c42e..ff52df2e1 100644 ---- a/cups/ppd.c -+++ b/cups/ppd.c -@@ -1874,9 +1874,9 @@ _ppdOpen( - { - if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7)) - { -- pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD; -- -- goto error; -+ char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */ -+ snprintf(cname, sizeof(cname), "_%s", name); -+ strlcpy(name, cname, sizeof(name)); - } - - if ((size = ppdPageSize(ppd, name)) == NULL) -@@ -1903,9 +1903,9 @@ _ppdOpen( - { - if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7)) - { -- pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD; -- -- goto error; -+ char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */ -+ snprintf(cname, sizeof(cname), "_%s", name); -+ strlcpy(name, cname, sizeof(name)); - } - - if ((size = ppdPageSize(ppd, name)) == NULL) -@@ -1939,9 +1939,9 @@ _ppdOpen( - - if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7)) - { -- pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD; -- -- goto error; -+ char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */ -+ snprintf(cname, sizeof(cname), "_%s", name); -+ strlcpy(name, cname, sizeof(name)); - } - - if (!strcmp(keyword, "PageSize")) diff --git a/0001-SIGSEGV-in-CUPS-web-ui-when-adding-a-printer.patch b/0001-SIGSEGV-in-CUPS-web-ui-when-adding-a-printer.patch deleted file mode 100644 index 0428793..0000000 --- a/0001-SIGSEGV-in-CUPS-web-ui-when-adding-a-printer.patch +++ /dev/null @@ -1,19 +0,0 @@ -From eda46e3aac94d42e4199d95befe99ff83afb098f Mon Sep 17 00:00:00 2001 -From: Zdenek Dohnal -Date: Mon, 29 Jul 2019 10:33:06 +0200 -Subject: [PATCH] SIGSEGV in CUPS web ui when adding a printer - -diff --git a/cgi-bin/var.c b/cgi-bin/var.c -index 306375bd6..fb9d051c0 100644 ---- a/cgi-bin/var.c -+++ b/cgi-bin/var.c -@@ -170,6 +170,9 @@ cgiGetArray(const char *name, /* I - Name of array variable */ - if (element < 0 || element >= var->nvalues) - return (NULL); - -+ if (var->values[element] == NULL) -+ return (NULL); -+ - return (strdup(var->values[element])); - } - diff --git a/cups-dymo-deviceid.patch b/cups-dymo-deviceid.patch index cc2995d..3ff1ffd 100644 --- a/cups-dymo-deviceid.patch +++ b/cups-dymo-deviceid.patch @@ -1,11 +1,11 @@ -diff -up cups-1.6.2/ppdc/sample.drv.dymo-deviceid cups-1.6.2/ppdc/sample.drv ---- cups-1.6.2/ppdc/sample.drv.dymo-deviceid 2013-06-18 16:57:02.110662953 +0100 -+++ cups-1.6.2/ppdc/sample.drv 2013-06-18 16:58:56.513989117 +0100 -@@ -125,6 +125,7 @@ Version "1.5" +diff -up cups-2.3.1/ppdc/sample.drv.dymo-deviceid cups-2.3.1/ppdc/sample.drv +--- cups-2.3.1/ppdc/sample.drv.dymo-deviceid 2019-12-16 09:22:34.476492212 +0100 ++++ cups-2.3.1/ppdc/sample.drv 2019-12-16 09:23:44.665003895 +0100 +@@ -129,6 +129,7 @@ Version "2.3" { - Manufacturer "Dymo" + Manufacturer "DYMO" ModelName "Label Printer" + Attribute "1284DeviceID" "" "MFG:DYMO;MDL:LabelWriter 400;" - Attribute NickName "" "Dymo Label Printer" + Attribute NickName "" "DYMO Label Printer" PCFileName "dymo.ppd" DriverType label diff --git a/cups.spec b/cups.spec index a0d573d..4d1ddf5 100644 --- a/cups.spec +++ b/cups.spec @@ -14,8 +14,8 @@ Summary: CUPS printing system Name: cups Epoch: 1 -Version: 2.3.0 -Release: 2%{?dist} +Version: 2.3.1 +Release: 1%{?dist} License: ASL 2.0 with exceptions for GPL2/LGPL2 Url: http://www.cups.org/ Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz @@ -92,16 +92,6 @@ Patch21: cups-dymo-deviceid.patch Patch100: cups-lspp.patch #### UPSTREAM PATCHES #### -# cupsctl does not work in 2.2.12, because systemd does not have launch-on-demand feature -Patch1001: 0001-Add-workaround-for-systemd-s-lack-of-true-launch-on-.patch -# cannot modify printer uri or create raw print queue -Patch1002: 0001-Fix-handling-of-printer-resource-files-Issue-5652.patch -# some ppds use custom keyword, which is incorrect - the correct is 'Custom Size' and ppd -# parser ended with error when encountered it. Now the parser adds underscore to incorrect -# keyword and continues -Patch1003: 0001-PPD-files-containing-custom-option-keywords-did-not-.patch -# SIGSEGV in web ui -Patch1004: 0001-SIGSEGV-in-CUPS-web-ui-when-adding-a-printer.patch ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal @@ -297,13 +287,6 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch21 -p1 -b .dymo-deviceid #### UPSTREAMED PATCHES #### -%patch1001 -p1 -b .cupsctl-not-working -# unable to modify device uri -%patch1002 -p1 -b .cannot-modify-uri -# 1750904 - cups is unable to add ppd with custom/Custom option -%patch1003 -p1 -b .ppd-custom-option -# 1720688 - [abrt] cups: __strlen_avx2(): printers.cgi killed by SIGSEGV -%patch1004 -p1 -b .webui-sigsegv # removed dbus patch - seems breaking things # Fix implementation of com.redhat.PrinterSpooler D-Bus object. @@ -616,6 +599,7 @@ rm -f %{cups_serverbin}/backend/smb %{_bindir}/cupstestppd #%%{_bindir}/cupstestdsc %{_bindir}/ppd* +%attr{755,root,root} %{cups_serverbin}/backend/ipp %{cups_serverbin}/backend/* %{cups_serverbin}/cgi-bin %dir %{cups_serverbin}/daemon @@ -724,6 +708,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippevepcl.7.gz %changelog +* Mon Dec 16 2019 Zdenek Dohnal - 1:2.3.1-1 +- 2.3.1 + * Fri Nov 29 2019 Zdenek Dohnal - 1:2.3.0-2 - 1777921 - cups unit file makes systemd to complain diff --git a/sources b/sources index 9bcc845..501cc1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cups-2.3.0-source.tar.gz) = c51f173b5fbae1554a3f4a3786fb3b5566e50d9f775473788ee3553922ac7e02e4785492c87c93fd46f159f50d97cc10ff6feafb3397cd9c1840840f3a9cdfae +SHA512 (cups-2.3.1-source.tar.gz) = e3f3ad9e78c1c723d46cc2276957ac67495483882f639421203d9dad227eacbb1259717a92489e710995fdc89e2d575202e4b43117aff08ff1230dcf06674376