Your message dated Sun, 15 Feb 2009 21:17:05 +0000
with message-id <[email protected]>
and subject line Bug#515207: fixed in pyusb 0.4.1-5
has caused the Debian Bug report #515207,
regarding pyusb: diff for NMU version 0.4.1-4.1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
515207: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515207
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pyusb
Version: 0.4.1-4
Severity: grave
Tags: patch

Hi Petter, Bernd,

build log:

pyusb.c: In function 'getBuffer':
pyusb.c:145: warning: passing argument 3 of 'PyString_AsStringAndSize'
from incompatible pointer type

Might not be too good.
In fact, on the current package, the python 2.5 value will overwrite
the value of index parameter passed to controlMsg. python 2.4 worked.

Mind you, I believe #476796 should be closed as invalid / reassigned
to libusb because the string comes from there and it does the right
thing. I'm saying this here because I could imagine that Tollef was
seeing his problem after a controlMsg failed for the same reason as it
did for me. Note that this bug was very hard to find (I actually added
a lot of debug statements in libusb before I found what happened
because I thought it was a problem with the USB protocol).

Unfortunately, the workaround needs a compatibility #defines (see
below).

Apologies for not auditing all python extensions for this bug when
seeing a previous instance in a different package.

Kind regards

T.

diff -u pyusb-0.4.1/debian/changelog pyusb-0.4.1/debian/changelog
--- pyusb-0.4.1/debian/changelog
+++ pyusb-0.4.1/debian/changelog
@@ -1,3 +1,12 @@
+pyusb (0.4.1-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Don't pass int* where we need Py_ssize_t*.
+    Breaks (overwriting parameters) for python 2.5 on 64 bit arch.
+    Needs the usual PEP353 compatibility bruhaha plus printf.
+
+ -- Thomas Viehmann <[email protected]>  Sat, 14 Feb 2009 20:13:04 +0100
+
 pyusb (0.4.1-4) unstable; urgency=low
 
   [ Piotr Ożarowski ]
only in patch2:
unchanged:
--- pyusb-0.4.1.orig/pyusb.c
+++ pyusb-0.4.1/pyusb.c
@@ -13,6 +13,14 @@
 #include <stdio.h>
 #define DEFAULT_TIMEOUT 100
 
+/* see PEP353 */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+# define PY_FORMAT_SIZE_T ""
+#endif
+
 /*
  * Necessary to compile successfully in python 2.3
  * Thanks to Mark Rages for the patch
@@ -126,7 +134,7 @@
  */
 PYUSB_STATIC char *getBuffer(
        PyObject *obj,
-       int *size
+       Py_ssize_t *size
        )
 {
        char *p = NULL;
@@ -1104,7 +1112,7 @@
        int index = 0;
        char *bytes;
        PyObject *data;
-       int size;
+       Py_ssize_t size;
        int timeout = DEFAULT_TIMEOUT;
        int ret;
        int as_read = 0;
@@ -1162,7 +1170,7 @@
                   timeout);
 
        if (as_read) {
-               fprintf(stderr, "\tbuffer: %d\n", size);
+               fprintf(stderr, "\tbuffer: %" PY_FORMAT_SIZE_T "d\n", size);
        } else {
                fprintf(stderr, "controlMsg buffer param:\n");
                printBuffer(bytes, size);
@@ -1386,7 +1394,7 @@
        int endpoint;
        int timeout = DEFAULT_TIMEOUT;
        char *data;
-       int size;
+       Py_ssize_t size;
        PyObject *bytes;
        int ret;
        PyObject *retObj;
@@ -1493,7 +1501,7 @@
        int endpoint;
        int timeout = DEFAULT_TIMEOUT;
        char *data;
-       int size;
+       Py_ssize_t size;
        PyObject *bytes;
        int ret;
        PyObject *retObj;



--- End Message ---
--- Begin Message ---
Source: pyusb
Source-Version: 0.4.1-5

We believe that the bug you reported is fixed in the latest version of
pyusb, which is due to be installed in the Debian FTP archive:

python-usb_0.4.1-5_amd64.deb
  to pool/main/p/pyusb/python-usb_0.4.1-5_amd64.deb
pyusb_0.4.1-5.diff.gz
  to pool/main/p/pyusb/pyusb_0.4.1-5.diff.gz
pyusb_0.4.1-5.dsc
  to pool/main/p/pyusb/pyusb_0.4.1-5.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bernd Zeimetz <[email protected]> (supplier of updated pyusb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 15 Feb 2009 22:06:00 +0100
Source: pyusb
Binary: python-usb
Architecture: source amd64
Version: 0.4.1-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Modules Team 
<[email protected]>
Changed-By: Bernd Zeimetz <[email protected]>
Description: 
 python-usb - USB interface for Python
Closes: 515207
Changes: 
 pyusb (0.4.1-5) unstable; urgency=medium
 .
   [ Piotr Ożarowski ]
   * Remove myself from uploaders.
 .
   [ Sandro Tosi ]
   * debian/control
     - switch Vcs-Browser field to viewsvn
 .
   [ Bernd Zeimetz ]
   * debian/control:
     - adding dpatch to Build-Depends
     - Removing Petter Reinholdtsen from Uploaders
   * debian/rules:
     - adding dpatch include for cdbs.
   * debian/patches:
     - adding patch from Thomas Viehmann - thanks for that:
       * Don't pass int* where we need Py_ssize_t*.
         Breaks (overwriting parameters) for python 2.5 on 64 bit arch.
         Needs the usual PEP353 compatibility bruhaha plus printf.
       (Closes: #515207)
Checksums-Sha1: 
 7dcd22d9708448ff4e31beae5f2deef9752ff318 1309 pyusb_0.4.1-5.dsc
 2189792c99a0ddd00fe1746405ba190570d5c62b 3873 pyusb_0.4.1-5.diff.gz
 7187d51b1134ad792012f9067f42817943e402c7 32594 python-usb_0.4.1-5_amd64.deb
Checksums-Sha256: 
 1c40679a9b663d963e34796482c7460a72a5f4df94144fc7ceab3a491a4c4edd 1309 
pyusb_0.4.1-5.dsc
 e16659a271baff61bcd0fa548dc4131b05410558c33ccb63ebd22d597f35e3fe 3873 
pyusb_0.4.1-5.diff.gz
 bce3a45f36abd0d25c2a71a7182ae43d52c3c92d4ea0ce44d932456a2da36b3b 32594 
python-usb_0.4.1-5_amd64.deb
Files: 
 6783df911efd5ba76c7d1436ca73510b 1309 python optional pyusb_0.4.1-5.dsc
 42ceae3180873d47b5f09e59b58e29c9 3873 python optional pyusb_0.4.1-5.diff.gz
 652db246040c7e3f1efcec3f9b2be4b1 32594 python optional 
python-usb_0.4.1-5_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmYg/kACgkQBnqtBMk7/3k41gCgohUi/3uK6xfD5NQ8IA75RQOj
oQgAoJJ1JpAs+KjtJhzdVNW+gYKoXDiz
=J1nC
-----END PGP SIGNATURE-----



--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team

Reply via email to