summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2013-09-02 18:29:14 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2013-09-02 18:29:14 +0000
commitbe260ed8292a6dff49a89fdfba1ae3f902824342 (patch)
tree2495236c9bdfc0a4807c0d24bf651657fece1480 /dev-libs/glib/files
parentFix QA warning (bug #483350) and remove useless inherit. (diff)
downloadhistorical-be260ed8292a6dff49a89fdfba1ae3f902824342.tar.gz
historical-be260ed8292a6dff49a89fdfba1ae3f902824342.tar.bz2
historical-be260ed8292a6dff49a89fdfba1ae3f902824342.zip
Fix segfaults in vlc and other applications that try to unload libgobject at runtime (bug #405173, thanks to Cédric D. for finding a good solution). Drop old ebuilds.
Package-Manager: portage-2.2.1/cvs/Linux x86_64 Manifest-Sign-Key: 0xCF0ADD61
Diffstat (limited to 'dev-libs/glib/files')
-rw-r--r--dev-libs/glib/files/glib-2.36.3-revert-ext34.patch37
-rw-r--r--dev-libs/glib/files/glib-2.36.4-znodelete.patch65
2 files changed, 65 insertions, 37 deletions
diff --git a/dev-libs/glib/files/glib-2.36.3-revert-ext34.patch b/dev-libs/glib/files/glib-2.36.3-revert-ext34.patch
deleted file mode 100644
index 041419791273..000000000000
--- a/dev-libs/glib/files/glib-2.36.3-revert-ext34.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 05d430065da918051a97e3384c4b2252af47503d Mon Sep 17 00:00:00 2001
-From: Colin Walters <walters@verbum.org>
-Date: Thu, 20 Jun 2013 17:13:29 +0000
-Subject: Revert "g_file_set_contents(): don't fsync on ext3/4"
-
-We didn't actually do any real-world testing of this, and
-unsurprisingly it turns out to break in at least one widely-used
-configuration (Fedora 19 x86_64, ext4 on LVM).
-
-This reverts commit 9d0c17b50102267a5029b58b1f44efbad82d8f03.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=701560
----
-diff --git a/glib/gfileutils.c b/glib/gfileutils.c
-index b6ca3bb..2980098 100644
---- a/glib/gfileutils.c
-+++ b/glib/gfileutils.c
-@@ -1088,16 +1088,9 @@ write_to_temp_file (const gchar *contents,
- /* On Linux, on btrfs, skip the fsync since rename-over-existing is
- * guaranteed to be atomic and this is the only case in which we
- * would fsync() anyway.
-- *
-- * ext3 and ext4 are also safe in this respect under the default
-- * mount options (and if someone picks non-default options to
-- * improve their performance at the cost of reliability, who are we
-- * to argue?)
-- *
-- * Note: EXT[234]_SUPER_MAGIC are equal.
- */
-
-- if (fstatfs (fd, &buf) == 0 && (buf.f_type == BTRFS_SUPER_MAGIC || buf.f_type == EXT3_SUPER_MAGIC))
-+ if (fstatfs (fd, &buf) == 0 && buf.f_type == BTRFS_SUPER_MAGIC)
- goto no_fsync;
- }
- #endif
---
-cgit v0.9.2
diff --git a/dev-libs/glib/files/glib-2.36.4-znodelete.patch b/dev-libs/glib/files/glib-2.36.4-znodelete.patch
new file mode 100644
index 000000000000..e84e76f28b2f
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.36.4-znodelete.patch
@@ -0,0 +1,65 @@
+From 242de638a030e1fb3b467af182d985d7c3bbf185 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Mon, 2 Sep 2013 13:59:18 -0400
+Subject: [PATCH] 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
+---
+ configure.ac | 24 ++++++++++++++++++++++++
+ gobject/Makefile.am | 1 +
+ 2 files changed, 25 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0a63601..dd1045a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3668,6 +3668,30 @@ 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
++
++AC_ARG_ENABLE([znodelete],
++ [AS_HELP_STRING([--disable-znodelete],
++ [avoid linking with -z,nodelete])],,
++ [SAVED_LDFLAGS="${LDFLAGS}"
++ AC_MSG_CHECKING([for -z,nodelete linker flag])
++ LDFLAGS=-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 1509616..181ad7d 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)
+--
+1.8.3.2
+