Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/cups.git#3beb10c19aa4d525d4c477918fcee7210168d799
This commit is contained in:
parent
2f721cea89
commit
f406b857dd
@ -1,43 +1,39 @@
|
|||||||
diff --git a/cups/ipp-vars.c b/cups/ipp-vars.c
|
diff --git a/cups/ipp-vars.c b/cups/ipp-vars.c
|
||||||
index 395b0eb..60aa991 100644
|
index 395b0eb..d863287 100644
|
||||||
--- a/cups/ipp-vars.c
|
--- a/cups/ipp-vars.c
|
||||||
+++ b/cups/ipp-vars.c
|
+++ b/cups/ipp-vars.c
|
||||||
@@ -13,6 +13,7 @@
|
@@ -12,7 +12,7 @@
|
||||||
|
* Include necessary headers...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cups/cups.h>
|
-#include <cups/cups.h>
|
||||||
+#include <cups/cups-private.h>
|
+#include "cups/cups-private.h"
|
||||||
#include "ipp-private.h"
|
#include "ipp-private.h"
|
||||||
#include "string-private.h"
|
#include "string-private.h"
|
||||||
#include "debug-internal.h"
|
#include "debug-internal.h"
|
||||||
@@ -221,9 +222,29 @@ _ippVarsSet(_ipp_vars_t *v, /* I - IPP variables */
|
@@ -220,10 +220,22 @@ _ippVarsSet(_ipp_vars_t *v, /* I - IPP variables */
|
||||||
|
{
|
||||||
if (!strcmp(name, "uri"))
|
if (!strcmp(name, "uri"))
|
||||||
{
|
{
|
||||||
char uri[1024]; /* New printer URI */
|
- char uri[1024]; /* New printer URI */
|
||||||
+ char resolved[1024]; /* Resolved mDNS URI */
|
- http_uri_status_t uri_status; /* URI status */
|
||||||
+ char value_uri[1024]; /* URI from value */
|
+ char uri[1024]; /* New printer URI */
|
||||||
http_uri_status_t uri_status; /* URI status */
|
+ char resolved[1024]; /* Resolved mDNS URI */
|
||||||
|
|
||||||
- if ((uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, value, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource))) < HTTP_URI_STATUS_OK)
|
- if ((uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, value, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource))) < HTTP_URI_STATUS_OK)
|
||||||
+ snprintf(value_uri, sizeof(value_uri), "%s", value);
|
+ if (strstr(value, "._tcp"))
|
||||||
+ value_uri[1023] = '\0';
|
|
||||||
+
|
|
||||||
+ if (strstr(value_uri, "._tcp"))
|
|
||||||
+ {
|
+ {
|
||||||
+ /*
|
+ /*
|
||||||
+ * Resolve URI...
|
+ * Resolve URI...
|
||||||
+ */
|
+ */
|
||||||
+
|
+
|
||||||
+ if (!_httpResolveURI(value_uri, resolved, sizeof(resolved), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
|
+ if (!_httpResolveURI(value, resolved, sizeof(resolved), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
|
||||||
+ {
|
|
||||||
+ return (0);
|
+ return (0);
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ snprintf(value_uri, sizeof(value_uri), "%s", resolved);
|
+ value = resolved;
|
||||||
+ value_uri[1023] = '\0';
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if ((uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, value_uri, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource))) < HTTP_URI_STATUS_OK)
|
+ if (httpSeparateURI(HTTP_URI_CODING_ALL, value, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource)) < HTTP_URI_STATUS_OK)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (v->username[0])
|
if (v->username[0])
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
|
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
|
||||||
index 5965e38..94a125a 100644
|
index 167e1df..6c05735 100644
|
||||||
--- a/cups/ppd-cache.c
|
--- a/cups/ppd-cache.c
|
||||||
+++ b/cups/ppd-cache.c
|
+++ b/cups/ppd-cache.c
|
||||||
@@ -3735,8 +3735,8 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
@@ -3790,6 +3790,11 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||||
*/
|
PRINTF_COLOROPTION("RGB", _("Color"), CUPS_CSPACE_SRGB, 8)
|
||||||
|
|
||||||
if ((attr = ippFindAttribute(response, "urf-supported", IPP_TAG_KEYWORD)) == NULL)
|
default_color = "RGB";
|
||||||
- if ((attr = ippFindAttribute(response, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD)) == NULL)
|
+
|
||||||
- if ((attr = ippFindAttribute(response, "print-color-mode-supported", IPP_TAG_KEYWORD)) == NULL)
|
+ // Apparently some printers only advertise color support, so make sure
|
||||||
+ if ((attr = ippFindAttribute(response, "print-color-mode-supported", IPP_TAG_KEYWORD)) == NULL)
|
+ // we also do grayscale for these printers...
|
||||||
+ if ((attr = ippFindAttribute(response, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD)) == NULL)
|
+ if (!ippContainsString(attr, "sgray_8") && !ippContainsString(attr, "black_1") && !ippContainsString(attr, "black_8"))
|
||||||
attr = ippFindAttribute(response, "output-mode-supported", IPP_TAG_KEYWORD);
|
+ PRINTF_COLOROPTION("Gray", _("GrayScale"), CUPS_CSPACE_SW, 8)
|
||||||
|
}
|
||||||
if (attr)
|
else if (!strcasecmp(keyword, "adobe-rgb_16") || !strcmp(keyword, "ADOBERGB48") || !strcmp(keyword, "ADOBERGB24-48"))
|
||||||
|
{
|
||||||
|
@ -15,7 +15,7 @@ Summary: CUPS printing system
|
|||||||
Name: cups
|
Name: cups
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.3.3
|
Version: 2.3.3
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Url: http://www.cups.org/
|
Url: http://www.cups.org/
|
||||||
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
|
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
|
||||||
@ -765,6 +765,10 @@ rm -f %{cups_serverbin}/backend/smb
|
|||||||
%{_mandir}/man7/ippevepcl.7.gz
|
%{_mandir}/man7/ippevepcl.7.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 02 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-16
|
||||||
|
- backport cups-ipptool-mdns-uri.patch from upstream
|
||||||
|
- backport cups-prioritize-print-color-mode.patch from upstream
|
||||||
|
|
||||||
* Thu Sep 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-14
|
* Thu Sep 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-14
|
||||||
- revert previous commit - resolved doesn't work with avahi due missing link
|
- revert previous commit - resolved doesn't work with avahi due missing link
|
||||||
in NetworkManager
|
in NetworkManager
|
||||||
|
Loading…
Reference in New Issue
Block a user