[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#856387: unblock: mbrola/3.01h+2-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Hello,

The upgrade of libc6 to version 2.23 seems to have triggered a bug
in mbrola, which makes it just always crash at exit, thus making it
unusable (bug #856331).

mbrola is non-free, we don't even have the source code (University of
Mons sent me a source code, but an older version, which does not have
the crash) so we just can't investigate.  However, since it is at exit,
an ugly workaround is possible: just make the exit() function call the
exit() system call, without trying to clean stuff. It happens that
mbrola properly closes its output before calling exit(), so that does
not hurt the purpose of mbrola.

I have attached the debdiff that adds this workaround.

unblock mbrola/3.01h+2-2

Samuel

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.10.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
X-Favorit-Cartoon: Calvin and Hobbes
 -+- Mail header of Wim van Dorst -+-
diff -Nru mbrola-3.01h+2/debian/changelog mbrola-3.01h+2/debian/changelog
--- mbrola-3.01h+2/debian/changelog	2016-09-28 09:21:27.000000000 +0200
+++ mbrola-3.01h+2/debian/changelog	2017-02-28 14:26:24.000000000 +0100
@@ -1,3 +1,17 @@
+mbrola (3.01h+2-2) unstable; urgency=medium
+
+  * Add libstrongexit.so workaround. mbrola crashes on exit() cleanup, so
+    don't bother trying to exit cleanly, mbrola does close the output file
+    fine anyway (Closes: #856331).
+    - install: install libstrongexit.so and wrapper script to use it
+    - control:
+      - build-depend on gcc-multilib on amd64 for cross-compiling 32bit
+      libstrongexit.so
+      - build-depend on dh-exec for multiarch path
+      - depend on dpkg-dev for multiarch path at exec.
+
+ -- Samuel Thibault <sthibault@debian.org>  Tue, 28 Feb 2017 14:26:24 +0100
+
 mbrola (3.01h+2-1) unstable; urgency=medium
 
   * Add armhf build from upstream (Closes: 839021).
diff -Nru mbrola-3.01h+2/debian/control mbrola-3.01h+2/debian/control
--- mbrola-3.01h+2/debian/control	2016-09-28 09:18:02.000000000 +0200
+++ mbrola-3.01h+2/debian/control	2017-02-28 14:19:19.000000000 +0100
@@ -2,7 +2,7 @@
 Section: non-free/sound
 Priority: optional
 Maintainer: Samuel Thibault <sthibault@debian.org>
-Build-Depends: debhelper (>= 10), unzip, libc6-i386 [amd64] | libc6:i386 [amd64]
+Build-Depends: debhelper (>= 10), dh-exec (>= 0.3), unzip, libc6-dev-i386 [amd64] | libc6-dev:i386 [amd64], gcc-multilib [amd64]
 Standards-Version: 3.9.8
 Homepage: http://tcts.fpms.ac.be/synthesis/
 XS-Autobuild: yes
@@ -10,7 +10,7 @@
 Package: mbrola
 Architecture: i386 amd64 alpha powerpc sparc armel armhf
 Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends} [!amd64], libc6:i386 [amd64] | libc6-i386 [amd64]
+Depends: ${misc:Depends}, ${shlibs:Depends} [!amd64], libc6:i386 [amd64] | libc6-i386 [amd64], dpkg-dev
 Suggests: mbrola-voice, espeak, cicero
 Description: Multilingual software speech synthesizer
  Mbrola is Thierry Dutoit's phonemizer for multilingual speech synthesis. The
diff -Nru mbrola-3.01h+2/debian/install mbrola-3.01h+2/debian/install
--- mbrola-3.01h+2/debian/install	2015-12-22 21:39:26.000000000 +0100
+++ mbrola-3.01h+2/debian/install	2017-02-28 14:00:57.000000000 +0100
@@ -1 +1,4 @@
-mbrola /usr/bin
+#! /usr/bin/dh-exec
+mbrola /usr/lib/${DEB_HOST_MULTIARCH}/mbrola
+debian/strongexit/libstrongexit.so /usr/lib/${DEB_HOST_MULTIARCH}/mbrola
+debian/strongexit/mbrola /usr/bin
diff -Nru mbrola-3.01h+2/debian/rules mbrola-3.01h+2/debian/rules
--- mbrola-3.01h+2/debian/rules	2016-09-28 09:15:12.000000000 +0200
+++ mbrola-3.01h+2/debian/rules	2017-02-28 14:22:50.000000000 +0100
@@ -4,6 +4,7 @@
 	dh $@
 
 DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_MULTIARCH?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 README_ZIPBALL=mbr301h_i386-ppc-alpha-ultra.zip
 
 TARBALL=
@@ -17,7 +18,9 @@
 
 ifeq ($(DEB_HOST_ARCH),amd64)
 ZIPBALL=mbr301h_i386-ppc-alpha-ultra.zip
+# See end of README.Debian
 FILENAME=unpacked/mbrola-linux-i386
+CFLAGS+=-m32
 endif
 
 ifeq ($(DEB_HOST_ARCH),alpha)
@@ -65,3 +68,10 @@
 	cp -f $(FILENAME) mbrola
 	chmod u+w,+x mbrola
 	strip mbrola
+	$(MAKE) -C debian/strongexit
+
+override_dh_auto_clean:
+	$(MAKE) clean -C debian/strongexit
+
+override_dh_shlibdeps:
+	dh_shlibdeps -- -e debian/mbrola/usr/lib/$(DEB_HOST_MULTIARCH)/mbrola/mbrola
diff -Nru mbrola-3.01h+2/debian/source/lintian-overrides mbrola-3.01h+2/debian/source/lintian-overrides
--- mbrola-3.01h+2/debian/source/lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ mbrola-3.01h+2/debian/source/lintian-overrides	2017-02-28 14:24:15.000000000 +0100
@@ -0,0 +1 @@
+mbrola source: depends-on-build-essential-package-without-using-version libc6-dev [build-depends: libc6-dev:i386 [amd64]]
diff -Nru mbrola-3.01h+2/debian/strongexit/Makefile mbrola-3.01h+2/debian/strongexit/Makefile
--- mbrola-3.01h+2/debian/strongexit/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ mbrola-3.01h+2/debian/strongexit/Makefile	2017-02-28 12:14:50.000000000 +0100
@@ -0,0 +1,9 @@
+LIB=libstrongexit.so
+
+all: $(LIB)
+
+$(LIB): strongexit.c
+	$(CC) $(CFLAGS) $< -o $@ -shared -fPIC $(LDFLAGS)
+
+clean:
+	rm -f $(LIB)
diff -Nru mbrola-3.01h+2/debian/strongexit/mbrola mbrola-3.01h+2/debian/strongexit/mbrola
--- mbrola-3.01h+2/debian/strongexit/mbrola	1970-01-01 01:00:00.000000000 +0100
+++ mbrola-3.01h+2/debian/strongexit/mbrola	2017-02-28 14:26:24.000000000 +0100
@@ -0,0 +1,5 @@
+#!/bin/bash
+# mbrola crashes on exit() cleanup, so don't bother trying to exit cleanly,
+# mbrola does close the output file fine anyway (see #856331)
+DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
+LD_PRELOAD=/usr/lib/$DEB_HOST_MULTIARCH/mbrola/libstrongexit.so exec /usr/lib/$DEB_HOST_MULTIARCH/mbrola/mbrola "$@"
diff -Nru mbrola-3.01h+2/debian/strongexit/strongexit.c mbrola-3.01h+2/debian/strongexit/strongexit.c
--- mbrola-3.01h+2/debian/strongexit/strongexit.c	1970-01-01 01:00:00.000000000 +0100
+++ mbrola-3.01h+2/debian/strongexit/strongexit.c	2017-02-28 14:15:09.000000000 +0100
@@ -0,0 +1,11 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#ifdef __i386__
+#define SYS_exit 1
+#else
+#include <sys/syscall.h>
+#endif
+void exit(int status) {
+	syscall(SYS_exit, status);
+	while(1);
+}

Reply to: