1.9.65.
This commit is contained in:
parent
c6b51ff32e
commit
e51d2a3302
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
|||||||
/pycups-1.9.61.tar.bz2
|
/pycups-1.9.61.tar.bz2
|
||||||
/pycups-1.9.62.tar.bz2
|
/pycups-1.9.62.tar.bz2
|
||||||
/pycups-1.9.63.tar.bz2
|
/pycups-1.9.63.tar.bz2
|
||||||
|
/pycups-1.9.65.tar.bz2
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.13 (GNU/Linux)
|
|
||||||
|
|
||||||
iQEVAwUAUUnBq+7Fkar03pQsAQKnQQgAjaytKYdPDtAimZf39m4aZGboX1+8t5VA
|
|
||||||
pR4imyImUO9p2LM82XYOzL8Qr2XMLkAnsXEOFew2qK+AjnAtZH6jOMWvLzERwT8X
|
|
||||||
Suhvr1Vbw16T7XRLuPHH35E8Jq4IYVqFYQ/BwhjIBnGhePthUMiTU8GwaF3eEnTx
|
|
||||||
Ea9wIv6obIdX359HNkO0R6l4P25TiyzsDjUgSeTin56zeRJT14GW/T2DFjWYyjum
|
|
||||||
wVevtaaihF+aosURN4yevWtDk9CgDbuEou6C76nZaseT9mu64PThY1SvpPFeCG9R
|
|
||||||
ZJ+mA/fsFxlkTp3NV24hYug2MwR4U89kaTYV7sD2NA95v46IILWlEQ==
|
|
||||||
=mz6L
|
|
||||||
-----END PGP SIGNATURE-----
|
|
11
pycups-1.9.65.tar.bz2.asc
Normal file
11
pycups-1.9.65.tar.bz2.asc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.15 (GNU/Linux)
|
||||||
|
|
||||||
|
iQEVAwUAUpXiH3lVEo2joavTAQIa4ggAwAvRvpC1p6tXTwRFF1K+IgEq/rEZnZlk
|
||||||
|
/OUY8gDhgPEOLBo+iHCOdJbgcjZyrX3ZyWM/HNsm2ECSBkpoh19UbpD5Dz6jMiBQ
|
||||||
|
q45nZdHfLTlKE1otI8Dedgw3xps7dfr42B+mKsZd4rCEFR8fAqlUhTtWORm1mur9
|
||||||
|
vVfk1SaRiAND6pk56ielBwqXqSa/PgMJzzLkW+5ZkSNiV2n+NJpNHGdkFyPHkqh9
|
||||||
|
wUaeMgenWU9bAwo7l0BuFTlDfLn/4WXh8jlaVMbPwcE40o9BDLajjVz5i9bQVugY
|
||||||
|
K6f857vmCMAihvHKdlz3yfAepE2+OLiDPhZoRhd5Pn73/piJrouyEw==
|
||||||
|
=5J4y
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,21 +0,0 @@
|
|||||||
From 2e0078c0bcc4f02aa904cac00028da43cb6f6862 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiri Popelka <jpopelka@redhat.com>
|
|
||||||
Date: Wed, 31 Jul 2013 15:31:15 +0200
|
|
||||||
Subject: [PATCH] Fix getting of boolean values.
|
|
||||||
|
|
||||||
diff --git a/cupsconnection.c b/cupsconnection.c
|
|
||||||
index d386e95..dda9789 100644
|
|
||||||
--- a/cupsconnection.c
|
|
||||||
+++ b/cupsconnection.c
|
|
||||||
@@ -641,7 +641,7 @@ PyObject_from_attr_value (ipp_attribute_t *attr, int i)
|
|
||||||
val = PyInt_FromLong (ippGetInteger (attr, i));
|
|
||||||
break;
|
|
||||||
case IPP_TAG_BOOLEAN:
|
|
||||||
- val = PyBool_FromLong (ippGetInteger (attr, i));
|
|
||||||
+ val = PyBool_FromLong (ippGetBoolean (attr, i));
|
|
||||||
break;
|
|
||||||
case IPP_TAG_RANGE:
|
|
||||||
lower = ippGetRange (attr, i, &upper);
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -U0 pycups-1.9.63/ChangeLog.encoding pycups-1.9.63/ChangeLog
|
|
||||||
diff -up pycups-1.9.63/cupsconnection.c.encoding pycups-1.9.63/cupsconnection.c
|
|
||||||
--- pycups-1.9.63/cupsconnection.c.encoding 2013-04-12 11:35:20.604099365 +0100
|
|
||||||
+++ pycups-1.9.63/cupsconnection.c 2013-04-12 11:35:34.945163243 +0100
|
|
||||||
@@ -129,6 +129,9 @@ UTF8_from_PyObj (char **const utf8, PyOb
|
|
||||||
else if (PyString_Check (obj)) {
|
|
||||||
const char *ret;
|
|
||||||
PyObject *unicodeobj = PyUnicode_FromEncodedObject (obj, NULL, NULL);
|
|
||||||
+ if (unicodeobj == NULL)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
ret = UTF8_from_PyObj (utf8, unicodeobj);
|
|
||||||
Py_DECREF (unicodeobj);
|
|
||||||
return ret;
|
|
@ -1,177 +0,0 @@
|
|||||||
diff -U0 pycups-1.9.63/ChangeLog.uris pycups-1.9.63/ChangeLog
|
|
||||||
diff -up pycups-1.9.63/cupsconnection.c.uris pycups-1.9.63/cupsconnection.c
|
|
||||||
--- pycups-1.9.63/cupsconnection.c.uris 2013-03-20 13:28:37.000000000 +0000
|
|
||||||
+++ pycups-1.9.63/cupsconnection.c 2013-04-11 15:27:49.036679360 +0100
|
|
||||||
@@ -138,6 +138,40 @@ UTF8_from_PyObj (char **const utf8, PyOb
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+construct_uri (char *buffer, size_t buflen, const char *base, const char *value)
|
|
||||||
+{
|
|
||||||
+ char *d = buffer;
|
|
||||||
+ const unsigned char *s = (const unsigned char *) value;
|
|
||||||
+ if (strlen (base) < buflen) {
|
|
||||||
+ strcpy (buffer, base);
|
|
||||||
+ d += strlen (base);
|
|
||||||
+ } else {
|
|
||||||
+ strncpy (buffer, base, buflen);
|
|
||||||
+ d += buflen;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ while (*s && d < buffer + buflen) {
|
|
||||||
+ if (isalpha (*s) || isdigit (*s) || *s == '-')
|
|
||||||
+ *d++ = *s++;
|
|
||||||
+ else if (*s == ' ') {
|
|
||||||
+ *d++ = '+';
|
|
||||||
+ s++;
|
|
||||||
+ } else {
|
|
||||||
+ if (d + 2 < buffer + buflen) {
|
|
||||||
+ *d++ = '%';
|
|
||||||
+ *d++ = "0123456789ABCDEF"[((*s) & 0xf0) >> 4];
|
|
||||||
+ *d++ = "0123456789ABCDEF"[((*s) & 0x0f)];
|
|
||||||
+ s++;
|
|
||||||
+ } else
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (d < buffer + buflen)
|
|
||||||
+ *d = '\0';
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
////////////////
|
|
||||||
// Connection //
|
|
||||||
////////////////
|
|
||||||
@@ -446,7 +480,7 @@ do_printer_request (Connection *self, Py
|
|
||||||
debugprintf ("-> do_printer_request(op:%d, name:%s)\n", (int) op, name);
|
|
||||||
|
|
||||||
request = ippNewRequest (op);
|
|
||||||
- snprintf (uri, sizeof (uri), "ipp://localhost/printers/%s", name);
|
|
||||||
+ construct_uri (uri, sizeof (uri), "ipp://localhost/printers/", name);
|
|
||||||
free (name);
|
|
||||||
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
@@ -1749,7 +1783,8 @@ Connection_cancelAllJobs (Connection *se
|
|
||||||
debugprintf ("-> Connection_cancelAllJobs(%s, my_jobs=%d, purge_jobs=%d)\n",
|
|
||||||
nameobj ? name : uri, my_jobs, purge_jobs);
|
|
||||||
if (nameobj) {
|
|
||||||
- snprintf (consuri, sizeof (consuri), "ipp://localhost/printers/%s", name);
|
|
||||||
+ construct_uri (consuri, sizeof (consuri),
|
|
||||||
+ "ipp://localhost/printers/", name);
|
|
||||||
uri = consuri;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1776,7 +1811,8 @@ Connection_cancelAllJobs (Connection *se
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Perhaps it's a class, not a printer.
|
|
||||||
- snprintf (consuri, sizeof (consuri), "ipp://localhost/classes/%s", name);
|
|
||||||
+ construct_uri (consuri, sizeof (consuri),
|
|
||||||
+ "ipp://localhost/classes/", name);
|
|
||||||
} else break;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2125,7 +2161,7 @@ add_modify_printer_request (const char *
|
|
||||||
{
|
|
||||||
char uri[HTTP_MAX_URI];
|
|
||||||
ipp_t *request = ippNewRequest (CUPS_ADD_MODIFY_PRINTER);
|
|
||||||
- snprintf (uri, sizeof (uri), "ipp://localhost/printers/%s", name);
|
|
||||||
+ construct_uri (uri, sizeof (uri), "ipp://localhost/printers/", name);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, uri);
|
|
||||||
return request;
|
|
||||||
@@ -2136,7 +2172,7 @@ add_modify_class_request (const char *na
|
|
||||||
{
|
|
||||||
char uri[HTTP_MAX_URI];
|
|
||||||
ipp_t *request = ippNewRequest (CUPS_ADD_MODIFY_CLASS);
|
|
||||||
- snprintf (uri, sizeof (uri), "ipp://localhost/classes/%s", name);
|
|
||||||
+ construct_uri (uri, sizeof (uri), "ipp://localhost/classes/", name);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, uri);
|
|
||||||
return request;
|
|
||||||
@@ -3012,7 +3048,8 @@ Connection_getPrinterAttributes (Connect
|
|
||||||
nameobj ? name : uri);
|
|
||||||
|
|
||||||
if (nameobj) {
|
|
||||||
- snprintf (consuri, sizeof (consuri), "ipp://localhost/printers/%s", name);
|
|
||||||
+ construct_uri (consuri, sizeof (consuri),
|
|
||||||
+ "ipp://localhost/printers/", name);
|
|
||||||
uri = consuri;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3034,7 +3071,8 @@ Connection_getPrinterAttributes (Connect
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Perhaps it's a class, not a printer.
|
|
||||||
- snprintf (consuri, sizeof (consuri), "ipp://localhost/classes/%s", name);
|
|
||||||
+ construct_uri (consuri, sizeof (consuri),
|
|
||||||
+ "ipp://localhost/classes/", name);
|
|
||||||
} else break;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3179,8 +3217,9 @@ Connection_addPrinterToClass (Connection
|
|
||||||
|
|
||||||
// Does the class exist, and is the printer already in it?
|
|
||||||
request = ippNewRequest (IPP_GET_PRINTER_ATTRIBUTES);
|
|
||||||
- snprintf (classuri, sizeof (classuri),
|
|
||||||
- "ipp://localhost/classes/%s", classname);
|
|
||||||
+ construct_uri (classuri, sizeof (classuri),
|
|
||||||
+ "ipp://localhost/classes/", classname);
|
|
||||||
+
|
|
||||||
free (classname);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, classuri);
|
|
||||||
@@ -3206,8 +3245,8 @@ Connection_addPrinterToClass (Connection
|
|
||||||
request = ippNewRequest (CUPS_ADD_CLASS);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, classuri);
|
|
||||||
- snprintf (printeruri, sizeof (printeruri),
|
|
||||||
- "ipp://localhost/printers/%s", printername);
|
|
||||||
+ construct_uri (printeruri, sizeof (printeruri),
|
|
||||||
+ "ipp://localhost/printers/", printername);
|
|
||||||
free (printername);
|
|
||||||
if (answer) {
|
|
||||||
ipp_attribute_t *printers;
|
|
||||||
@@ -3283,8 +3322,8 @@ Connection_deletePrinterFromClass (Conne
|
|
||||||
|
|
||||||
// Does the class exist, and is the printer in it?
|
|
||||||
request = ippNewRequest (IPP_GET_PRINTER_ATTRIBUTES);
|
|
||||||
- snprintf (classuri, sizeof (classuri),
|
|
||||||
- "ipp://localhost/classes/%s", classname);
|
|
||||||
+ construct_uri (classuri, sizeof (classuri),
|
|
||||||
+ "ipp://localhost/classes/", classname);
|
|
||||||
free (classname);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, classuri);
|
|
||||||
@@ -3379,8 +3418,8 @@ Connection_deleteClass (Connection *self
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
request = ippNewRequest (CUPS_DELETE_CLASS);
|
|
||||||
- snprintf (classuri, sizeof (classuri),
|
|
||||||
- "ipp://localhost/classes/%s", classname);
|
|
||||||
+ construct_uri (classuri, sizeof (classuri),
|
|
||||||
+ "ipp://localhost/classes/", classname);
|
|
||||||
free (classname);
|
|
||||||
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
|
||||||
"printer-uri", NULL, classuri);
|
|
||||||
@@ -3659,7 +3698,8 @@ Connection_printTestPage (Connection *se
|
|
||||||
if (!userobj)
|
|
||||||
user = (char *) cupsUser();
|
|
||||||
|
|
||||||
- snprintf (uri, sizeof (uri), "ipp://localhost/printers/%s", printer);
|
|
||||||
+ construct_uri (uri, sizeof (uri),
|
|
||||||
+ "ipp://localhost/printers/", printer);
|
|
||||||
resource = uri + strlen ("ipp://localhost");
|
|
||||||
for (i = 0; i < 2; i++) {
|
|
||||||
request = ippNewRequest (IPP_PRINT_JOB);
|
|
||||||
@@ -3679,7 +3719,8 @@ Connection_printTestPage (Connection *se
|
|
||||||
if (answer && ippGetStatusCode (answer) == IPP_NOT_POSSIBLE) {
|
|
||||||
ippDelete (answer);
|
|
||||||
// Perhaps it's a class, not a printer.
|
|
||||||
- snprintf (uri, sizeof (uri), "ipp://localhost/classes/%s", printer);
|
|
||||||
+ construct_uri (uri, sizeof (uri),
|
|
||||||
+ "ipp://localhost/classes/", printer);
|
|
||||||
} else break;
|
|
||||||
}
|
|
||||||
|
|
@ -5,13 +5,10 @@
|
|||||||
|
|
||||||
Summary: Python bindings for CUPS
|
Summary: Python bindings for CUPS
|
||||||
Name: python-cups
|
Name: python-cups
|
||||||
Version: 1.9.63
|
Version: 1.9.65
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
URL: http://cyberelk.net/tim/software/pycups/
|
URL: http://cyberelk.net/tim/software/pycups/
|
||||||
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
|
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
|
||||||
Patch1: python-cups-uris.patch
|
|
||||||
Patch2: python-cups-decoding.patch
|
|
||||||
Patch3: python-cups-booleans.patch
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
@ -33,15 +30,6 @@ Documentation for python-cups.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n pycups-%{version}
|
%setup -q -n pycups-%{version}
|
||||||
|
|
||||||
# Encode generated URIs correctly (patch from upstream) (bug #950162).
|
|
||||||
%patch1 -p1 -b .uris
|
|
||||||
|
|
||||||
# Propagate UTF-8 decoding errors.
|
|
||||||
%patch2 -p1 -b .decoding
|
|
||||||
|
|
||||||
# Fix getting of booleans.
|
|
||||||
%patch3 -p1 -b .booleans
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
make doc
|
make doc
|
||||||
@ -60,6 +48,9 @@ make install DESTDIR="%{buildroot}"
|
|||||||
%doc examples html
|
%doc examples html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 27 2013 Tim Waugh <twaugh@redhat.com> - 1.9.65-1
|
||||||
|
- 1.9.65.
|
||||||
|
|
||||||
* Wed Jul 31 2013 Jiri Popelka <jpopelka@redhat.com> - 1.9.63-4
|
* Wed Jul 31 2013 Jiri Popelka <jpopelka@redhat.com> - 1.9.63-4
|
||||||
- Fix getting of booleans.
|
- Fix getting of booleans.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user