Merge lp:~logan/ubuntu/raring/pyvorbis/debian-merge into lp:ubuntu/raring/pyvorbis

Proposed by Logan Rosen
Status: Merged
Merge reported by: Dimitri John Ledkov
Merged at revision: not available
Proposed branch: lp:~logan/ubuntu/raring/pyvorbis/debian-merge
Merge into: lp:ubuntu/raring/pyvorbis
Diff against target: 230 lines (+123/-24)
6 files modified
.pc/applied-patches (+1/-0)
debian/changelog (+16/-0)
debian/control (+2/-1)
debian/patches/03_fix_call_to_ov_read.patch (+90/-0)
debian/patches/series (+1/-0)
src/pyvorbisfile.c (+13/-23)
To merge this branch: bzr merge lp:~logan/ubuntu/raring/pyvorbis/debian-merge
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+141443@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Logan Rosen (logan) wrote :

I have forwarded the Ubuntu delta to Debian here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696902

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

.pc/03_fix_call_to_ov_read.patch is missing from the branch, yet is actually patched in the tree & present in .pc/applied-patches.
Hence the branch is broken, the merge is fine though. Will upload that, but not merge this branch =(

One should always do
$ quilt push -a && bzr add .pc
before commiting =/

Oh well, bzr-bd workflow sometimes sucks.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

i am so sorry, it looks like cjwatson uploaded this merge in the mean time.

Revision history for this message
Logan Rosen (logan) wrote :

There are still some kinks to work out with UDD, I'm afraid. :/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/applied-patches'
2--- .pc/applied-patches 2011-08-17 17:47:50 +0000
3+++ .pc/applied-patches 2012-12-29 00:24:23 +0000
4@@ -1,2 +1,3 @@
5 01_previous_changes.patch
6 02_whrandom_gone.patch
7+03_fix_call_to_ov_read.patch
8
9=== modified file 'debian/changelog'
10--- debian/changelog 2012-10-08 22:00:21 +0000
11+++ debian/changelog 2012-12-29 00:24:23 +0000
12@@ -1,3 +1,19 @@
13+pyvorbis (1.5-2ubuntu1) raring; urgency=low
14+
15+ * Merge from Debian unstable. Remaining changes:
16+ - Build using dh_python2.
17+
18+ -- Logan Rosen <logatronico@gmail.com> Fri, 28 Dec 2012 19:12:53 -0500
19+
20+pyvorbis (1.5-2) unstable; urgency=low
21+
22+ * debian/patches/03_fix_call_to_ov_read.patch
23+ - fix a crash ("Floating point exception") when calling read(); thanks to
24+ Alessio Gaeta for the report and to Emmanuel Anne for the patch;
25+ Closes: #696640
26+
27+ -- Sandro Tosi <morph@debian.org> Wed, 26 Dec 2012 12:37:57 +0100
28+
29 pyvorbis (1.5-1ubuntu2) quantal; urgency=low
30
31 * Rebuild for new armel compiler default of ARMv5t.
32
33=== modified file 'debian/control'
34--- debian/control 2011-12-17 14:30:48 +0000
35+++ debian/control 2012-12-29 00:24:23 +0000
36@@ -1,7 +1,8 @@
37 Source: pyvorbis
38 Section: python
39 Priority: optional
40-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
41+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
42+XSBC-Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
43 Uploaders: Sandro Tosi <morph@debian.org>
44 Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.6.6-3~),
45 python-all-dbg, python-ogg-dbg (>= 1.3-1.1),
46
47=== added file 'debian/patches/03_fix_call_to_ov_read.patch'
48--- debian/patches/03_fix_call_to_ov_read.patch 1970-01-01 00:00:00 +0000
49+++ debian/patches/03_fix_call_to_ov_read.patch 2012-12-29 00:24:23 +0000
50@@ -0,0 +1,90 @@
51+Description: Fix the crash/no sound while trying to play fofix/guitar hero
52+ This mod was trying to force a prototype on an array of callbacks, it's a
53+ miracle that it ever worked, maybe older versions of python were more
54+ forgiving, or recent versions of libc don't let this kind of thing to
55+ pass...
56+ .
57+ Also changed the memory allocation of py_ov_read to something simpler
58+Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670062#10
59+Bug-Debian: http://bugs.debian.org/696640
60+Forwarded: https://groups.google.com/d/topic/pyogg/IuvxXV5UgP4/discussion
61+
62+--- pyvorbis-1.5.orig/src/pyvorbisfile.c
63++++ pyvorbis-1.5/src/pyvorbisfile.c
64+@@ -35,7 +35,7 @@ length is the number of bytes to read\n\
65+ \tbigendian is the endianness you want (defaults to host endianness)\n\
66+ \tword is the word size\n\tnot sure what signed does\n";
67+
68+-static PyObject *py_ov_read(PyObject *, PyObject *, PyObject *);
69++static PyObject *py_ov_read(PyObject *, PyObject *); // , PyObject *);
70+
71+ FDEF(ov_streams) "Returns the number of logical streams in this VorbisFile";
72+ FDEF(ov_seekable) "Returns whether this VorbisFile is seekable.";
73+@@ -119,7 +119,7 @@ PyTypeObject py_vorbisfile_type = {
74+
75+
76+ static PyMethodDef OggVorbis_File_methods[] = {
77+- {"read", (PyCFunction) py_ov_read,
78++ {"read", py_ov_read,
79+ METH_VARARGS | METH_KEYWORDS, py_ov_read_doc},
80+ {"info", py_ov_info,
81+ METH_VARARGS, py_ov_info_doc},
82+@@ -288,7 +288,7 @@ static int is_big_endian() {
83+ }
84+
85+ static PyObject *
86+-py_ov_read(PyObject *self, PyObject *args, PyObject *kwdict)
87++py_ov_read(PyObject *self, PyObject *args) // , PyObject *kwdict)
88+ {
89+ py_vorbisfile * ov_self = (py_vorbisfile *) self;
90+ PyObject *retobj;
91+@@ -298,7 +298,7 @@ py_ov_read(PyObject *self, PyObject *arg
92+ PyObject *tuple;
93+ char *buff;
94+
95+- int length, word, sgned, bitstream;
96++ int length, word, sgned, bitstream = 0;
97+ int bigendianp;
98+
99+ // Default to host order
100+@@ -307,33 +307,23 @@ py_ov_read(PyObject *self, PyObject *arg
101+ word = 2;
102+ sgned = 1;
103+
104+- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|llll", read_kwlist,
105++/* if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|llll", read_kwlist,
106+ &length, &bigendianp, &word, &sgned))
107+- return NULL;
108+-
109+- buffobj = PyBuffer_New(length);
110+-
111+- tuple = PyTuple_New(1);
112+- Py_INCREF(buffobj);
113+- PyTuple_SET_ITEM(tuple, 0, buffobj);
114++ return NULL; */
115+
116+- if (!(PyArg_ParseTuple(tuple, "t#", &buff, &length))) {
117+- return NULL;
118+- }
119+- Py_DECREF(tuple);
120++ buff = malloc(length);
121++ if (!buff) return NULL;
122+
123+- Py_BEGIN_ALLOW_THREADS
124+ retval = ov_read(ov_self->ovf, buff, length,
125+ bigendianp, word, sgned, &bitstream);
126+- Py_END_ALLOW_THREADS
127+
128+ if (retval < 0) {
129+- Py_DECREF(buffobj);
130++ free(buff);
131+ return v_error_from_code(retval, "Error reading file: ");
132+ }
133+
134+- retobj = Py_BuildValue("Oii", buffobj, retval, bitstream);
135+- Py_DECREF(buffobj);
136++ retobj = Py_BuildValue("s#ii", buff, retval, retval, bitstream);
137++ free(buff);
138+ return retobj;
139+ }
140+
141
142=== modified file 'debian/patches/series'
143--- debian/patches/series 2011-08-17 17:47:50 +0000
144+++ debian/patches/series 2012-12-29 00:24:23 +0000
145@@ -1,2 +1,3 @@
146 01_previous_changes.patch
147 02_whrandom_gone.patch
148+03_fix_call_to_ov_read.patch
149
150=== modified file 'src/pyvorbisfile.c'
151--- src/pyvorbisfile.c 2011-08-17 17:47:50 +0000
152+++ src/pyvorbisfile.c 2012-12-29 00:24:23 +0000
153@@ -35,7 +35,7 @@
154 \tbigendian is the endianness you want (defaults to host endianness)\n\
155 \tword is the word size\n\tnot sure what signed does\n";
156
157-static PyObject *py_ov_read(PyObject *, PyObject *, PyObject *);
158+static PyObject *py_ov_read(PyObject *, PyObject *); // , PyObject *);
159
160 FDEF(ov_streams) "Returns the number of logical streams in this VorbisFile";
161 FDEF(ov_seekable) "Returns whether this VorbisFile is seekable.";
162@@ -119,7 +119,7 @@
163
164
165 static PyMethodDef OggVorbis_File_methods[] = {
166- {"read", (PyCFunction) py_ov_read,
167+ {"read", py_ov_read,
168 METH_VARARGS | METH_KEYWORDS, py_ov_read_doc},
169 {"info", py_ov_info,
170 METH_VARARGS, py_ov_info_doc},
171@@ -288,7 +288,7 @@
172 }
173
174 static PyObject *
175-py_ov_read(PyObject *self, PyObject *args, PyObject *kwdict)
176+py_ov_read(PyObject *self, PyObject *args) // , PyObject *kwdict)
177 {
178 py_vorbisfile * ov_self = (py_vorbisfile *) self;
179 PyObject *retobj;
180@@ -298,7 +298,7 @@
181 PyObject *tuple;
182 char *buff;
183
184- int length, word, sgned, bitstream;
185+ int length, word, sgned, bitstream = 0;
186 int bigendianp;
187
188 // Default to host order
189@@ -307,33 +307,23 @@
190 word = 2;
191 sgned = 1;
192
193- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|llll", read_kwlist,
194+/* if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|llll", read_kwlist,
195 &length, &bigendianp, &word, &sgned))
196- return NULL;
197-
198- buffobj = PyBuffer_New(length);
199-
200- tuple = PyTuple_New(1);
201- Py_INCREF(buffobj);
202- PyTuple_SET_ITEM(tuple, 0, buffobj);
203-
204- if (!(PyArg_ParseTuple(tuple, "t#", &buff, &length))) {
205- return NULL;
206- }
207- Py_DECREF(tuple);
208-
209- Py_BEGIN_ALLOW_THREADS
210+ return NULL; */
211+
212+ buff = malloc(length);
213+ if (!buff) return NULL;
214+
215 retval = ov_read(ov_self->ovf, buff, length,
216 bigendianp, word, sgned, &bitstream);
217- Py_END_ALLOW_THREADS
218
219 if (retval < 0) {
220- Py_DECREF(buffobj);
221+ free(buff);
222 return v_error_from_code(retval, "Error reading file: ");
223 }
224
225- retobj = Py_BuildValue("Oii", buffobj, retval, bitstream);
226- Py_DECREF(buffobj);
227+ retobj = Py_BuildValue("s#ii", buff, retval, retval, bitstream);
228+ free(buff);
229 return retobj;
230 }
231

Subscribers

People subscribed via source and target branches

to all changes: