[packages/glib2] - take patch from git which fixes vlc segfaults - rel 2

atler atler at pld-linux.org
Fri May 2 14:20:29 CEST 2014


commit 85d686a7dcb417eb2d10b3910a8424f976c9550f
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri May 2 14:18:55 2014 +0200

    - take patch from git which fixes vlc segfaults
    - rel 2
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=707298 for more info.

 glib2-vlc-segfault.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++++++
 glib2.spec               |  4 ++-
 2 files changed, 74 insertions(+), 1 deletion(-)
---
diff --git a/glib2.spec b/glib2.spec
index fda5649..84d687d 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -20,13 +20,14 @@ Summary(tr.UTF-8):	Yararlı ufak yordamlar kitaplığı
 Summary(zh_CN.UTF-8):	实用工具函数库
 Name:		glib2
 Version:	2.40.0
-Release:	1
+Release:	2
 Epoch:		1
 License:	LGPL v2+
 Group:		Libraries
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/glib/2.40/glib-%{version}.tar.xz
 # Source0-md5:	05fb7cb17eacbc718e90366a1eae60d9
 Patch0:		%{name}-makefile.patch
+Patch1:		%{name}-vlc-segfault.patch
 URL:		http://www.gtk.org/
 BuildRequires:	autoconf >= 2.62
 BuildRequires:	automake >= 1:1.11
@@ -227,6 +228,7 @@ Sondy systemtap/dtrace dla GLib 2.
 %prep
 %setup -q -n glib-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %if %{without apidocs}
 %{__sed} -e '/SUBDIRS/s/docs//' -i Makefile.am
diff --git a/glib2-vlc-segfault.patch b/glib2-vlc-segfault.patch
new file mode 100644
index 0000000..a394fc7
--- /dev/null
+++ b/glib2-vlc-segfault.patch
@@ -0,0 +1,71 @@
+From 3662eb9759fe225d1c214db6927c667a1b733e8a Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino at gentoo.org>
+Date: Mon, 2 Sep 2013 13:59:18 -0400
+Subject: gobject: try to link with -Wl,-z,nodelete
+
+Since the type system does not support reloading its data and assumes
+that libgobject remains loaded for the lifetime of the process, we
+should link libgobject with a flag indicating that it can't be unloaded.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=707298
+
+diff --git a/configure.ac b/configure.ac
+index a01e58d..bdf34b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3465,6 +3465,40 @@ fi
+ AC_SUBST(GLIB_LINK_FLAGS)
+ 
+ dnl
++dnl Check for -z,nodelete linker flag: the type system assumes that
++dnl libgobject stays loaded for the lifetime of the process.
++dnl Since ld.bfd does not treat wrong -z options as fatal by default,
++dnl we also try to check for the --fatal-warnings linker flag if
++dnl auto-detecting.
++dnl
++
++AC_ARG_ENABLE([znodelete],
++              [AS_HELP_STRING([--disable-znodelete],
++                              [avoid linking with -z,nodelete])],,
++              [SAVED_LDFLAGS="${LDFLAGS}"
++               AC_MSG_CHECKING([for --fatal-warnings linker flag])
++               LDFLAGS=-Wl,--fatal-warnings
++               AC_TRY_LINK([], [int main (void) { return 0; }],
++                           AC_MSG_RESULT(yes)
++                           [ldflags_fatal=-Wl,--fatal-warnings],
++                           AC_MSG_RESULT(no)
++                           ldflags_fatal=)
++               AC_MSG_CHECKING([for -z,nodelete linker flag])
++               LDFLAGS="$ldflags_fatal -Wl,-z,nodelete"
++               AC_TRY_LINK([], [int main (void) { return 0; }],
++                           AC_MSG_RESULT(yes)
++                           enable_znodelete=yes,
++                           AC_MSG_RESULT(no)
++                           enable_znodelete=no)
++               LDFLAGS="${SAVED_LDFLAGS}"])
++
++if test "x${enable_znodelete}" = "xyes"; then
++  GOBJECT_LINK_FLAGS=-Wl,-z,nodelete
++fi
++
++AC_SUBST(GOBJECT_LINK_FLAGS)
++
++dnl
+ dnl Check for -fvisibility=hidden to determine if we can do GNU-style
+ dnl visibility attributes for symbol export control
+ dnl
+diff --git a/gobject/Makefile.am b/gobject/Makefile.am
+index c683e84..02e9c25 100644
+--- a/gobject/Makefile.am
++++ b/gobject/Makefile.am
+@@ -45,6 +45,7 @@ endif
+ 
+ libgobjectincludedir = $(includedir)/glib-2.0/gobject
+ libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
++  $(GOBJECT_LINK_FLAGS) \
+   $(gobject_win32_res_ldflag) \
+   -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+   -export-dynamic $(no_undefined)
+-- 
+cgit v0.10.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glib2.git/commitdiff/85d686a7dcb417eb2d10b3910a8424f976c9550f



More information about the pld-cvs-commit mailing list