Package: gstreamer0.10
Version: 0.10.35-1
Followup-For: Bug #647481
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch
Hi guys,
In Ubuntu, the attached patch was applied to make gstreamer compatible with
multiarch, as described at
<http://wiki.debian.org/Multiarch/Implementation>.
gstreamer is one of the last major bits needed to have a multiarch-friendly
wine package in Ubuntu; I presume it will be useful to Debian for the same
reason. Following this upload, I will be converting the various gstreamer
plugin packages over to use the multiarch path as well, with a hard-coded
versioned dependency on libgstreamer0.10-0 (>= 0.10.35-1ubuntu1) to ensure
that these plugins are always installed against a version of libgst that
knows to look in that directory. I don't see a good way to forcibly bump
the dependency for plugins without also bumping it for applications since
libgst is using shlibs (no symbols files), but I'm open to working with you
to find a more automated solution for dependency generation if you think
that's important here.
This adds a new patch to the upstream source to look in the multiarch
library path with a fallback to the legacy /usr/lib/gstreamer-0.10 path;
this way we don't have to declare breaks: against an arbitrary set of
packages using the legacy path. I also have modified the ia32-libs hack
d dpatch to regard /usr/lib32 as only a fallback equivalent to /usr/lib - so
plugins in the multiarch directory will always take precedence, which I
believe is the optimal behavior. I have tested that totem is able to load
plugins from both directories with this change applied.
The changelog for the Ubuntu upload is:
* Build for multiarch.
* debian/patches/79_multiarch-backwards-compat.patch,
debian/patches/80_ia32-hack.patch: PLUGINDIR now always points to the
multiarch path, so look in /usr/lib/gstreamer-0.10 as a fallback (and
/usr/lib32/gstreamer-0.10, in case ia32-libs is still around).
Thanks for considering the patch.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
=== modified file 'debian/compat'
--- debian/compat 2010-11-01 20:11:56 +0000
+++ debian/compat 2011-12-08 00:43:02 +0000
@@ -1 +1 @@
-7
+9
=== modified file 'debian/control'
--- debian/control 2011-05-14 11:41:04 +0000
+++ debian/control 2011-12-09 05:58:22 +0000
@@ -6,8 +6,8 @@
Sebastien Bacher <[email protected]>,
Sebastian Dröge <[email protected]>,
Sjoerd Simons <[email protected]>
-Build-Depends: debhelper (>= 7),
- cdbs (>= 0.4.20),
+Build-Depends: debhelper (>= 8.1.3~),
+ cdbs (>= 0.4.93~),
gnome-pkg-tools (>= 0.7),
autotools-dev,
dh-autoreconf,
@@ -44,7 +44,9 @@
Package: libgstreamer0.10-0
Architecture: any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Suggests: gstreamer0.10-tools,
@@ -64,6 +66,7 @@
Package: libgstreamer0.10-0-dbg
Architecture: any
+Multi-Arch: same
Section: debug
Priority: extra
Depends: libgstreamer0.10-0 (= ${binary:Version}),
@@ -134,7 +137,7 @@
Depends: ${shlibs:Depends},
${misc:Depends},
pkg-config,
- libgstreamer0.10-0 (>= 0.10.33)
+ libgstreamer0.10-0 (>= 0.10.35)
Suggests: gstreamer0.10-plugins-base
Description: Tools for use with GStreamer
GStreamer is a streaming media framework, based on graphs of filters
=== modified file 'debian/control.in'
--- debian/control.in 2011-04-27 14:04:36 +0000
+++ debian/control.in 2011-12-09 05:58:22 +0000
@@ -6,8 +6,8 @@
Sebastien Bacher <[email protected]>,
Sebastian Dröge <[email protected]>,
Sjoerd Simons <[email protected]>
-Build-Depends: debhelper (>= 7),
- cdbs (>= 0.4.20),
+Build-Depends: debhelper (>= 8.1.3~),
+ cdbs (>= 0.4.93~),
gnome-pkg-tools (>= 0.7),
autotools-dev,
dh-autoreconf,
@@ -44,7 +44,9 @@
Package: @GST_LIB@
Architecture: any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Suggests: @GST_PKGNAME@-tools,
@@ -64,6 +66,7 @@
Package: @GST_LIB@-dbg
Architecture: any
+Multi-Arch: same
Section: debug
Priority: extra
Depends: @GST_LIB@ (= ${binary:Version}),
=== modified file 'debian/gir1.2-gstreamer.install'
--- debian/gir1.2-gstreamer.install 2010-12-12 19:45:03 +0000
+++ debian/gir1.2-gstreamer.install 2011-12-08 01:08:26 +0000
@@ -1 +1 @@
-debian/tmp/usr/lib/girepository-*
+debian/tmp/usr/lib/*/girepository-1.0 usr/lib
=== modified file 'debian/libgstreamer-dev.install'
--- debian/libgstreamer-dev.install 2009-09-12 12:23:52 +0000
+++ debian/libgstreamer-dev.install 2011-12-08 01:05:22 +0000
@@ -1,7 +1,7 @@
debian/tmp/usr/include
-debian/tmp/usr/lib/*.{a,la,so}
-debian/tmp/usr/lib/gstreamer-@GST_ABI@/*.{a,la}
-debian/tmp/usr/lib/pkgconfig
+debian/tmp/usr/lib/*/*.{a,la,so}
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/*.{a,la}
+debian/tmp/usr/lib/*/pkgconfig
debian/tmp/usr/share/aclocal
debian/tmp/usr/share/gir-*
debian/tmp/usr/bin/gst-codec-info-@GST_ABI@
=== modified file 'debian/libgstreamer.install'
--- debian/libgstreamer.install 2010-01-27 10:38:21 +0000
+++ debian/libgstreamer.install 2011-12-08 01:05:38 +0000
@@ -1,4 +1,4 @@
-debian/tmp/usr/lib/gstreamer-@GST_ABI@/*.so
-debian/tmp/usr/lib/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-plugin-scanner
-debian/tmp/usr/lib/*.so.*
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/*.so
+debian/tmp/usr/lib/*/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-plugin-scanner
+debian/tmp/usr/lib/*/*.so.*
debian/tmp/usr/share/locale
=== added file 'debian/patches/79_multiarch-backwards-compat.patch'
--- debian/patches/79_multiarch-backwards-compat.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/79_multiarch-backwards-compat.patch 2011-12-08 22:17:19 +0000
@@ -0,0 +1,28 @@
+=== modified file 'gst/gstregistry.c'
+Index: trunk/gst/gstregistry.c
+===================================================================
+--- trunk.orig/gst/gstregistry.c
++++ trunk/gst/gstregistry.c
+@@ -1503,7 +1503,7 @@
+ * path, and the plugins installed in the user's home directory */
+ plugin_path = g_getenv ("GST_PLUGIN_SYSTEM_PATH");
+ if (plugin_path == NULL) {
+- char *home_plugins;
++ char *home_plugins, *backwards_compat_plugins;
+
+ GST_DEBUG ("GST_PLUGIN_SYSTEM_PATH not set");
+
+@@ -1519,6 +1519,13 @@
+ GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
+ changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
+
++ /* finally, look in the /usr/lib backwards-compatibility path. */
++ backwards_compat_plugins = g_build_filename ("/usr/lib",
++ "gstreamer-" GST_MAJORMINOR, NULL);
++ GST_DEBUG ("scanning plugins %s", backwards_compat_plugins);
++ changed |= gst_registry_scan_path_internal (&context, backwards_compat_plugins);
++ g_free (backwards_compat_plugins);
++
+ #ifdef G_OS_WIN32
+ {
+ char *base_dir;
=== modified file 'debian/patches/80_ia32-hack.patch'
--- debian/patches/80_ia32-hack.patch 2011-01-08 17:05:50 +0000
+++ debian/patches/80_ia32-hack.patch 2011-12-08 22:17:32 +0000
@@ -1,7 +1,7 @@
-Index: gstreamer0.10-0.10.31.2/gst/gstregistry.c
+Index: trunk/gst/gstregistry.c
===================================================================
---- gstreamer0.10-0.10.31.2.orig/gst/gstregistry.c 2011-01-06 20:35:59.000000000 +0100
-+++ gstreamer0.10-0.10.31.2/gst/gstregistry.c 2011-01-08 17:05:28.959841191 +0100
+--- trunk.orig/gst/gstregistry.c
++++ trunk/gst/gstregistry.c
@@ -121,6 +121,10 @@
#include <stdio.h>
#include <string.h>
@@ -13,31 +13,30 @@
/* For g_stat () */
#include <glib/gstdio.h>
-@@ -1493,6 +1497,10 @@
+@@ -1503,6 +1507,9 @@
* path, and the plugins installed in the user's home directory */
plugin_path = g_getenv ("GST_PLUGIN_SYSTEM_PATH");
if (plugin_path == NULL) {
+#if defined(__linux__) && defined (__i386__)
+ struct utsname uts;
+#endif
-+ char *plugindir = PLUGINDIR;
- char *home_plugins;
+ char *home_plugins, *backwards_compat_plugins;
GST_DEBUG ("GST_PLUGIN_SYSTEM_PATH not set");
-@@ -1506,8 +1514,14 @@
- g_free (home_plugins);
-
- /* add the main (installed) library path */
-- GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
-- changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
+@@ -1522,6 +1529,16 @@
+ /* finally, look in the /usr/lib backwards-compatibility path. */
+ backwards_compat_plugins = g_build_filename ("/usr/lib",
+ "gstreamer-" GST_MAJORMINOR, NULL);
+#if defined(__linux__) && defined (__i386__)
+ uname(&uts);
+ if (!strcmp("x86_64", uts.machine)
+ && !access("/usr/lib32/gstreamer-0.10", R_OK|X_OK))
-+ plugindir = "/usr/lib32/gstreamer-0.10";
++ {
++ g_free (backwards_compat_plugins);
++ backwards_compat_plugins = g_build_filename ("/usr/lib32",
++ "gstreamer-" GST_MAJORMINOR, NULL);
++ }
+#endif
-+ GST_DEBUG ("scanning main plugins %s", plugindir);
-+ changed |= gst_registry_scan_path_internal (&context, plugindir);
-
- #ifdef G_OS_WIN32
- {
+ GST_DEBUG ("scanning plugins %s", backwards_compat_plugins);
+ changed |= gst_registry_scan_path_internal (&context, backwards_compat_plugins);
+ g_free (backwards_compat_plugins);
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-04-27 14:04:36 +0000
+++ debian/patches/series 2011-12-08 22:10:33 +0000
@@ -1,2 +1,3 @@
+79_multiarch-backwards-compat.patch
80_ia32-hack.patch
99_ltmain_as-needed.patch
=== modified file 'debian/rules'
--- debian/rules 2011-04-27 14:04:36 +0000
+++ debian/rules 2011-12-08 01:42:47 +0000
@@ -182,6 +182,8 @@
--disable-examples \
--enable-DEBUG \
--enable-debug \
+ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+ --libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/gstreamer0.10 \
--with-package-name=$(GST_PACKAGE_NAME) \
--with-package-origin=$(GST_PACKAGE_ORIGIN)
@@ -208,9 +210,9 @@
mkdir -p debian/$(gst_pkgname)-doc/usr/share/lintian/overrides/
cp -a debian/$(gst_pkgname)-doc.lintian debian/$(gst_pkgname)-doc/usr/share/lintian/overrides/$(gst_pkgname)-doc
-DEB_DH_MAKESHLIBS_ARGS_$(gst_lib) += -X "/usr/lib/gstreamer-$(gst_abi)" -V $(gst_shlibs_dep) -- -c4
+DEB_DH_MAKESHLIBS_ARGS_$(gst_lib) += -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)" -V $(gst_shlibs_dep) -- -c4
DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS
-DEB_SHLIBDEPS_INCLUDE += debian/$(gst_lib)/usr/lib
+DEB_SHLIBDEPS_INCLUDE += debian/$(gst_lib)/usr/lib/$(DEB_HOST_MULTIARCH)
# override shlibs for libraries from this source before computing dependencies
# of packages generated from this source; we already have inter-dependencies
@@ -232,7 +234,7 @@
-rm -f debian/shlibs.local
install/$(gst_lib_dev)::
- gcc -o debian/tmp/usr/bin/gst-codec-info-0.10 debian/gst-codec-info.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config --libs --cflags glib-2.0 gthread-2.0 gmodule-no-export-2.0 gobject-2.0 libxml-2.0` debian/tmp/usr/lib/libgstreamer-0.10.so -Idebian/tmp/usr/include/gstreamer-0.10
+ gcc -o debian/tmp/usr/bin/gst-codec-info-0.10 debian/gst-codec-info.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config --libs --cflags glib-2.0 gthread-2.0 gmodule-no-export-2.0 gobject-2.0 libxml-2.0` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgstreamer-0.10.so -Idebian/tmp/usr/include/gstreamer-0.10
perldoc -o man debian/dh_gstscancodecs > debian/tmp/usr/share/man/man1/dh_gstscancodecs.1
.PHONY: maint