From e51d2a330260715176daf6118ab28fdde648e353 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 27 Nov 2013 12:31:20 +0000 Subject: [PATCH] 1.9.65. --- .gitignore | 1 + pycups-1.9.63.tar.bz2.asc | 11 --- pycups-1.9.65.tar.bz2.asc | 11 +++ python-cups-booleans.patch | 21 ----- python-cups-decoding.patch | 14 --- python-cups-uris.patch | 177 ------------------------------------- python-cups.spec | 19 ++-- sources | 2 +- 8 files changed, 18 insertions(+), 238 deletions(-) delete mode 100644 pycups-1.9.63.tar.bz2.asc create mode 100644 pycups-1.9.65.tar.bz2.asc delete mode 100644 python-cups-booleans.patch delete mode 100644 python-cups-decoding.patch delete mode 100644 python-cups-uris.patch diff --git a/.gitignore b/.gitignore index 2e2a202..55660bd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pycups-1.9.61.tar.bz2 /pycups-1.9.62.tar.bz2 /pycups-1.9.63.tar.bz2 +/pycups-1.9.65.tar.bz2 diff --git a/pycups-1.9.63.tar.bz2.asc b/pycups-1.9.63.tar.bz2.asc deleted file mode 100644 index af965a8..0000000 --- a/pycups-1.9.63.tar.bz2.asc +++ /dev/null @@ -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----- diff --git a/pycups-1.9.65.tar.bz2.asc b/pycups-1.9.65.tar.bz2.asc new file mode 100644 index 0000000..a3036b9 --- /dev/null +++ b/pycups-1.9.65.tar.bz2.asc @@ -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----- diff --git a/python-cups-booleans.patch b/python-cups-booleans.patch deleted file mode 100644 index f3e2991..0000000 --- a/python-cups-booleans.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 2e0078c0bcc4f02aa904cac00028da43cb6f6862 Mon Sep 17 00:00:00 2001 -From: Jiri Popelka -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 - diff --git a/python-cups-decoding.patch b/python-cups-decoding.patch deleted file mode 100644 index 54301ec..0000000 --- a/python-cups-decoding.patch +++ /dev/null @@ -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; diff --git a/python-cups-uris.patch b/python-cups-uris.patch deleted file mode 100644 index 23f4dac..0000000 --- a/python-cups-uris.patch +++ /dev/null @@ -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; - } - diff --git a/python-cups.spec b/python-cups.spec index a638915..98322dd 100644 --- a/python-cups.spec +++ b/python-cups.spec @@ -5,13 +5,10 @@ Summary: Python bindings for CUPS Name: python-cups -Version: 1.9.63 -Release: 4%{?dist} +Version: 1.9.65 +Release: 1%{?dist} URL: http://cyberelk.net/tim/software/pycups/ 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+ Group: Development/Languages BuildRequires: cups-devel @@ -33,15 +30,6 @@ Documentation for python-cups. %prep %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 make CFLAGS="%{optflags} -fno-strict-aliasing" make doc @@ -60,6 +48,9 @@ make install DESTDIR="%{buildroot}" %doc examples html %changelog +* Wed Nov 27 2013 Tim Waugh - 1.9.65-1 +- 1.9.65. + * Wed Jul 31 2013 Jiri Popelka - 1.9.63-4 - Fix getting of booleans. diff --git a/sources b/sources index a532c8f..362bb21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cdee3ef87ac68d435c8ea04384563d15 pycups-1.9.63.tar.bz2 +aa6a181c5b60801ad2434adda6441ea3 pycups-1.9.65.tar.bz2