Bug#982669: buster-pu: package portaudio19/19.6.0-1

2021-03-20 Thread Thorsten Glaser
Adam D. Barratt dixit:

>Please go ahead.

Thanks, I’ve done so.

bye,
//mirabilos



Bug#982669: buster-pu: package portaudio19/19.6.0-1

2021-03-20 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Sat, 2021-02-13 at 07:43 +0100, Thorsten Glaser wrote:
> I would like to upload the contents of portaudio19 19.6.0-1.1
> to buster.
[...]
> [ Impact ]
> Applications using portaudio randomly crash.
> 
> [ Tests ]
> No automated tests but without it applied, polyphone
> crashes after a bit, maybe a minute or two, of using.
> 

Please go ahead.

Regards,

Adam



Bug#982669: buster-pu: package portaudio19/19.6.0-1

2021-02-12 Thread Thorsten Glaser
Dixi quod…

>built. Without the crash fix backporting polyphone makes
>no sense

I must correct myself here: polyphone is usable without
it *if* the user manually starts jackd first. (It will
still crash upon terminating, but that’s after saving
all data. I’m documenting this.)

>[ Tests ]
>No automated tests but without it applied, polyphone
>crashes after a bit, maybe a minute or two, of using.

I’m uploading the backport so this can be tested more
easily. To test, start Polyphone, open a soundfont and
click around a bit (maybe try to play back one of the
samples). Soundfonts in Debian are installed under
/usr/share/sounds/sf2/ and timgm6mb-soundfont is the
smallest package with one to test with.

bye,
//mirabilos
-- 
[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...



Bug#982669: buster-pu: package portaudio19/19.6.0-1

2021-02-12 Thread Thorsten Glaser
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian@packages.debian.org
Usertags: pu
X-Debbugs-Cc: t...@mirbsd.de

I would like to upload the contents of portaudio19 19.6.0-1.1
to buster.

[ Reason ]
The current library makes applications crash. Please see
Debian #944509 for the bugreport, but this is also seen
e.g. when testing a polyphone backport which I’ve just
built. Without the crash fix backporting polyphone makes
no sense, and since it is a rather important fix entering
via stable-updates seems sensible (instead of via bpo).

[ Impact ]
Applications using portaudio randomly crash.

[ Tests ]
No automated tests but without it applied, polyphone
crashes after a bit, maybe a minute or two, of using.

[ Risks ]
The patch is rather small and “obvious enough”, so I
consider this zero risk. It has been tested in unstable
and testing for 7 months now.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Apply a patch from the upstream mailing list to fix the crash.

[ Other info ]
The resulting package is, except for the changelog difference
and being recompiled in buster, identical to the one in
bullseye/sid.
diff -Nru portaudio19-19.6.0/debian/changelog 
portaudio19-19.6.0/debian/changelog
--- portaudio19-19.6.0/debian/changelog 2016-12-25 22:08:34.0 +0100
+++ portaudio19-19.6.0/debian/changelog 2021-02-13 07:42:27.0 +0100
@@ -1,3 +1,9 @@
+portaudio19 (19.6.0-1+deb10u1) buster; urgency=medium
+
+  * Apply crash fix patch (Closes: #944509)
+
+ -- Thorsten Glaser   Sat, 13 Feb 2021 07:42:27 +0100
+
 portaudio19 (19.6.0-1) unstable; urgency=medium
 
   * New upstream release v190600_20161030
diff -Nru portaudio19-19.6.0/debian/patches/944509-crash.patch 
portaudio19-19.6.0/debian/patches/944509-crash.patch
--- portaudio19-19.6.0/debian/patches/944509-crash.patch1970-01-01 
01:00:00.0 +0100
+++ portaudio19-19.6.0/debian/patches/944509-crash.patch2020-07-30 
16:26:55.0 +0200
@@ -0,0 +1,59 @@
+Description: handle EPIPE from alsa_snd_pcm_poll_descriptors
+ was: pa_linux_alsa.c:3636 Assertion failed
+Origin: https://lists.columbia.edu/pipermail/portaudio/2019-July/001888.html
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944509
+Forwarded: not-needed
+Justification: taken from upstream dev mailing list post
+Author: Sam Mason 
+Reviewed-by: Norbert Preining 
+Applied-Upstream: no
+
+--- a/src/hostapi/alsa/pa_linux_alsa.c
 b/src/hostapi/alsa/pa_linux_alsa.c
+@@ -3633,12 +3633,18 @@ error:
+ 
+ /** Fill in pollfd objects.
+  */
+-static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent* 
self, struct pollfd* pfds )
++static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent* 
self, struct pollfd* pfds, int *xrunOccurred )
+ {
+ PaError result = paNoError;
+ int ret = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
+-(void)ret;  /* Prevent unused variable warning if asserts are turned off 
*/
+-assert( ret == self->nfds );
++if( -EPIPE == ret )
++{
++  *xrunOccurred = 1;
++}
++else
++{
++  assert( ret == self->nfds );
++}
+ 
+ self->ready = 0;
+ 
+@@ -3799,17 +3805,22 @@ static PaError PaAlsaStream_WaitForFrame
+ if( pollCapture )
+ {
+ capturePfds = self->pfds;
+-PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture, 
capturePfds ) );
++PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture, 
capturePfds, &xrun ) );
+ totalFds += self->capture.nfds;
+ }
+ if( pollPlayback )
+ {
+ /* self->pfds is in effect an array of fds; if necessary, index 
past the capture fds */
+ playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 
0);
+-PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback, 
playbackPfds ) );
++PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback, 
playbackPfds, &xrun ) );
+ totalFds += self->playback.nfds;
+ }
+ 
++if ( xrun )
++{
++  break;
++}
++
+ #ifdef PTHREAD_CANCELED
+ if( self->callbackMode )
+ {
diff -Nru portaudio19-19.6.0/debian/patches/series 
portaudio19-19.6.0/debian/patches/series
--- portaudio19-19.6.0/debian/patches/series2016-12-25 21:37:53.0 
+0100
+++ portaudio19-19.6.0/debian/patches/series2021-02-13 07:42:08.0 
+0100
@@ -1 +1,2 @@
 audacity-portmixer.patch
+944509-crash.patch