public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2016-03-26 21:25 Alexandre Rostovtsev
  0 siblings, 0 replies; 11+ messages in thread
From: Alexandre Rostovtsev @ 2016-03-26 21:25 UTC (permalink / raw
  To: gentoo-commits

commit:     64f08e0afb484687f48529d5f194244d882cc20b
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 20:51:16 2016 +0000
Commit:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 20:51:16 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64f08e0a

dev-libs/glib: gobject.stp.in missing from tarball, bug #578238

Already fixed upstream: https://bugzilla.gnome.org/show_bug.cgi?id=763821

Package-Manager: portage-2.2.28

 dev-libs/glib/files/glib-2.48.0-gobject.stp.in | 199 +++++++++++++++++++++++++
 dev-libs/glib/glib-2.48.0.ebuild               |   3 +
 2 files changed, 202 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.48.0-gobject.stp.in b/dev-libs/glib/files/glib-2.48.0-gobject.stp.in
new file mode 100644
index 0000000..edcdb50
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.48.0-gobject.stp.in
@@ -0,0 +1,199 @@
+global gtypes
+global gtypenames
+global gsignalnames
+
+/* These are needed to keep track of gtype and signal names for the below
+ * probes.
+ */
+probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("type__new")
+{
+  gtypes[pid(),user_string($arg1)] = $arg3;
+  gtypenames[pid(),$arg3] = user_string($arg1);
+}
+probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__new")
+{
+  gsignalnames[pid(),$arg1] = user_string($arg2);
+}
+
+/**
+ * probe gobject.type_new - Called when any entity registered with the #GType system is created
+ * @name: String name of type
+ * @parent_gtype: The parent #GType of this type
+ * @gtype: The #GType for this type
+ */
+probe gobject.type_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("type__new")
+{
+  name = user_string($arg1); 
+  parent_gtype = $arg2; 
+  gtype = $arg3; 
+  probestr = sprintf("gobject.type_new(%s, %d) -> %d", name, parent_gtype, gtype);
+}
+
+/**
+ * probe gobject.object_new - Called when a #GObject is created
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ */
+probe gobject.object_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__new")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),$arg2]; 
+  probestr = sprintf("gobject.object_new(%s) -> %p", type, object);
+}
+
+/**
+ * probe gobject.object_ref - Called when a new reference is added to a #GObject
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ * @old_refcount: Original value of the reference count
+ * @refcount: New value of the reference count
+ */
+probe gobject.object_ref = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__ref")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),gtype]; 
+  old_refcount = $arg3; 
+  refcount = old_refcount+1; 
+  probestr = sprintf("gobject.object_ref(%p[%s]) -> %d", object, type, refcount);
+}
+
+/**
+ * probe gobject.object_unref - Called when a reference is removed from a #GObject
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ * @old_refcount: Original value of the reference count
+ */
+probe gobject.object_unref = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__unref")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),gtype]; 
+  old_refcount = $arg3; 
+  refcount = old_refcount-1; 
+  probestr = sprintf("gobject.object_unref(%p [%s]) -> %d", object, type, refcount);
+}
+
+/**
+ * probe gobject.object_dispose - Called when a g_object_dispose() run for a #GObject is initiated
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ * @last_unref: FIXME
+ */
+probe gobject.object_dispose = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__dispose")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),$arg2]; 
+  last_unref = $arg3; 
+  probestr = sprintf("gobject.object_dispose(%p[%s])", object, type);
+}
+
+/**
+ * probe gobject.object_dispose_end - Called when a g_object_dispose() run for a #GObject is completed
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ * @last_unref: FIXME
+ */
+probe gobject.object_dispose_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__dispose__end")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),$arg2]; 
+  last_unref = $arg3; 
+  probestr = sprintf("gobject.object_dispose_end(%p[%s])", object, type);
+}
+
+/**
+ * probe gobject.object_finalize - Called when finalization for a #GObject is started
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ */
+probe gobject.object_finalize = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__finalize")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),$arg2]; 
+  probestr = sprintf("gobject.object_finalize(%p[%s])", object, type);
+}
+
+/**
+ * probe gobject.object_finalize - Called when finalization for a #GObject is completed
+ * @object: Raw pointer to object
+ * @gtype: #GType for this object
+ * @type: String name of object type
+ */
+probe gobject.object_finalize_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__finalize__end")
+{
+  object = $arg1; 
+  gtype = $arg2; 
+  type = gtypenames[pid(),$arg2]; 
+  probestr = sprintf("gobject.object_finalize_end(%p[%s])", object, type);
+}
+
+/**
+ * probe gobject.signal_new - Called when a new signal is registered for a #GObject
+ * @gsignal: Integer value for this signal
+ * @name: String name for this signal
+ * @gtype: #GType for the type which will gain the new signal
+ * @type: String name of the type which will gain the new signal
+ */
+probe gobject.signal_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__new")
+{
+  gsignal = $arg1; 
+  name = user_string($arg2); 
+  gtype = $arg3; 
+  type = gtypenames[pid(),$arg3]; 
+  probestr = sprintf("gobject.signal_new(%s, %s) -> %d", name, type, gsignal);
+}
+
+/**
+ * probe gobject.signal_emit - Called when a signal emission for a #GObject is started
+ * @gsignal: Integer value for this signal
+ * @detail: String containing signal "detail"
+ * @signal: String name of the signal
+ * @object: Raw pointer for object emitting signal
+ * @gtype: #GType for the type emitting the signal
+ * @type: String name of the type emitting the signal
+ */
+probe gobject.signal_emit = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__emit")
+{
+  gsignal = $arg1; 
+  detail = $arg2; 
+  signal = gsignalnames[pid(),$arg1]; 
+  if (detail != 0)
+    signal = signal . "::" . gquarks[pid(), detail]
+  object = $arg3; 
+  gtype = $arg4; 
+  type = gtypenames[pid(),$arg4]; 
+  probestr = sprintf("gobject.signal_emit(%p[%s], %s)", object, type, signal);
+}
+
+/**
+ * probe gobject.signal_emit_end - Called when a signal emission for a #GObject is completed
+ * @gsignal: Integer value for this signal
+ * @detail: String containing signal "detail"
+ * @signal: String name of the signal
+ * @object: Raw pointer for object emitting signal
+ * @gtype: #GType for the type emitting the signal
+ * @type: String name of the type emitting the signal
+ */
+probe gobject.signal_emit_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__emit__end")
+{
+  gsignal = $arg1; 
+  detail = $arg2; 
+  signal = gsignalnames[pid(),$arg1]; 
+  if (detail != 0)
+    signal = signal . "::" . gquarks[pid(), detail]
+  object = $arg3; 
+  gtype = $arg4; 
+  type = gtypenames[pid(),$arg4]; 
+  probestr = sprintf("gobject.signal_emit_end(%p[%s], %s)", object, type, signal);
+}

diff --git a/dev-libs/glib/glib-2.48.0.ebuild b/dev-libs/glib/glib-2.48.0.ebuild
index b1ce2b6..c1d5a50 100644
--- a/dev-libs/glib/glib-2.48.0.ebuild
+++ b/dev-libs/glib/glib-2.48.0.ebuild
@@ -125,6 +125,9 @@ src_prepare() {
 	# gdbus-codegen is a separate package
 	epatch "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
 
+	# missing from 2.48.0 tarball, should be fixed in 2.48.1; bug #578238
+	cp "${FILESDIR}"/${P}-gobject.stp.in gobject/gobject.stp.in || die
+
 	# leave python shebang alone
 	# sed -e '/${PYTHON}/d' \
 	# 	-i glib/Makefile.{am,in} || die


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2016-11-11 12:47 Gilles Dartiguelongue
  0 siblings, 0 replies; 11+ messages in thread
From: Gilles Dartiguelongue @ 2016-11-11 12:47 UTC (permalink / raw
  To: gentoo-commits

commit:     6e62dd42fcccc9f12a966bf47957ac26be82a40a
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 11 11:07:28 2016 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Fri Nov 11 12:46:32 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e62dd42

dev-libs/glib: cleanup old revisions

Package-Manager: portage-2.3.2

 dev-libs/glib/Manifest                             |   1 -
 .../files/glib-2.34.0-testsuite-skip-thread4.patch |  44 ----
 dev-libs/glib/glib-2.44.1-r1.ebuild                |   7 +-
 dev-libs/glib/glib-2.48.1-r1.ebuild                | 281 ---------------------
 4 files changed, 1 insertion(+), 332 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 170d516..3e1c068 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -2,7 +2,6 @@ DIST glib-1.2.10-r1-as-needed.patch.bz2 9099 SHA256 3bb8c45706f97b526da851061c89
 DIST glib-1.2.10.tar.gz 421480 SHA256 6e1ce7eedae713b11db82f11434d455d8a1379f783a79812cd2e05fc024a8d9f SHA512 4452b741382194d4ca425f084fa60e1a9e30040ac2e839c9136047d0461cf4b1ebcc16aac4e65998d1b9329ead8f617966b3d09317a83634f14d556a7e14b7a8 WHIRLPOOL 478957ce8e49228d022bae50b042cdfc6d522d0d4880a0328b5695471295450c81c5e186e1760e56e317a4c4c95aabc5f2010d7a9b912fc451d04e14610e7dca
 DIST glib-2.44.1.tar.xz 7132940 SHA256 8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07 SHA512 c24d307408e061b2657f7e7d1b8245c55605ebda26ee2dcc3497ee9d90bfc137d8e5f42f0cd5acf4b49ea28c424fa901e81f75ecf81833f6d0fe51d5e36e5888 WHIRLPOOL 6a1eef94b3ffed4d5cb551f4def6859ddff8ea0aac50048e706863f2bd4957c40b7034946852fa4604a109eb121c55b94ec51b3708a325ace5692f61fd1babb7
 DIST glib-2.46.2.tar.xz 7344636 SHA256 5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db SHA512 8b5298712710d77b4a47367071f782d2bb3042b149ec8fde8c065f80bf3c5375c94318d19665c0092572e4895e590231a47324d25f371310f02b43feb3009588 WHIRLPOOL 700b69360110351544780ace4dcb14f29505f63d8840882532a4b7c017860b6da86e09cbabca691b7b24cb08b8722e772555de044b8b21e4b0952c8a8e4e6ecb
-DIST glib-2.48.1.tar.xz 7441032 SHA256 74411bff489cb2a3527bac743a51018841a56a4d896cc1e0d0d54f8166a14612 SHA512 5bbea7d07ba6d75c35c6be8f1ebc685aa2549bd20030741b2d6e2c30e9b2d476c2afa50a974bbdad98c305666c8b04357b51619c97fe50d3e9965700088aad9b WHIRLPOOL 2f08854815fee79b6246accedb62a714845b7f0bc67bcd6cde48aa0147a957e6c9cbbc424100d651ee5573f31a3db89ee1935e3ffdc97c5bf1d5711a85545eb2
 DIST glib-2.48.2.tar.xz 6408644 SHA256 f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 SHA512 2eac104eb2207d0a6488992e48069a34b417f51e141364f281ab7b0953a6de88be177b1c694dd9464a856c9a5d8021e3cf0193a8d9c5aaf6ea11f1f9ff743c43 WHIRLPOOL cba211000d5597e93d01113e5f2b6736e47f4daa00935a53af182b3304fef9a1ac25f78995c7a53cc1234261433a1bbd1ec751c87b556845a15da720af5b971b
 DIST glib-2.50.0.tar.xz 7513808 SHA256 830b551fa626bda06e12729205b3c5bb0d82b924a8cf64d948945878f01b7d70 SHA512 ad711cac11bb4e3a2c5cfa315f67ea252f2f91249bb00daf708653ad50895f0ebe874d491e6052b67c8e13bd153910105358964d0b7f86463b512a3ee2967b3c WHIRLPOOL a7a0010b8949744b2410a5ea47b7975e960246294c6947d4804dc504c0509aefa0fb883e20f889d08a238c39ab1e2626e2d71bc5947f9bebfefe42bf1d00d61e
 DIST glib-2.50.1.tar.xz 7521832 SHA256 2ef87a78f37c1eb5b95f4cc95efd5b66f69afad9c9c0899918d04659cf6df7dd SHA512 68c327179a786eb50f6f2c036dd71415143604bc12787be992e0b25bd691cd480aca4b2c284802bbcf94865ccef8776b03f98a45db3463b008adb602c208c090 WHIRLPOOL 818f76ba2ad58ff9a8e3b78ce4a2ea15e94e65518704729f1b425da6a465331e1b4f82136883455ae54cab1b48c9536566d281d0e74e27bc2d2bd431d31a6aa1

diff --git a/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch b/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch
deleted file mode 100644
index 584b56f..00000000
--- a/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4881b5d303512208b55f5bf78b91cd6a85e5034c Mon Sep 17 00:00:00 2001
-From: Priit Laes <plaes@plaes.org>
-Date: Tue, 3 Jul 2012 11:21:56 +0300
-Subject: [PATCH 2/4] Gentoo: skip over thread/thread4 test failure
-
-https://bugzilla.gnome.org/show_bug.cgi?id=679306
----
- glib/tests/thread.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/glib/tests/thread.c b/glib/tests/thread.c
-index 539782e..179ec06 100644
---- a/glib/tests/thread.c
-+++ b/glib/tests/thread.c
-@@ -124,6 +124,8 @@ test_thread3 (void)
-   g_assert_cmpint (GPOINTER_TO_INT(result), ==, 9);
- }
- 
-+#if 0
-+// https://bugzilla.gnome.org/show_bug.cgi?id=679306
- /* test that thread creation fails as expected,
-  * by setting RLIMIT_NPROC ridiculously low
-  */
-@@ -158,6 +160,7 @@ test_thread4 (void)
-     g_error ("resetting RLIMIT_NPROC failed: %s\n", g_strerror (ret));
- #endif
- }
-+#endif
- 
- static void
- test_thread5 (void)
-@@ -203,7 +206,9 @@ main (int argc, char *argv[])
-   g_test_add_func ("/thread/thread1", test_thread1);
-   g_test_add_func ("/thread/thread2", test_thread2);
-   g_test_add_func ("/thread/thread3", test_thread3);
-+#if 0
-   g_test_add_func ("/thread/thread4", test_thread4);
-+#endif
-   g_test_add_func ("/thread/thread5", test_thread5);
-   g_test_add_func ("/thread/thread6", test_thread6);
- 
--- 
-1.8.3.2
-

diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild b/dev-libs/glib/glib-2.44.1-r1.ebuild
index 6565a1b..b4b3d74 100644
--- a/dev-libs/glib/glib-2.44.1-r1.ebuild
+++ b/dev-libs/glib/glib-2.44.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -132,11 +132,6 @@ src_prepare() {
 			sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c || die
 		fi
 
-		# thread test fails, upstream bug #679306
-		# FIXME: we need to check if it's still failing as upstream thinks something
-		# is wrong in our setups
-		#epatch "${FILESDIR}/${PN}-2.34.0-testsuite-skip-thread4.patch"
-
 		# This test is prone to fail, bug #504024, upstream bug #723719
 		sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die
 	else

diff --git a/dev-libs/glib/glib-2.48.1-r1.ebuild b/dev-libs/glib/glib-2.48.1-r1.ebuild
deleted file mode 100644
index ab12fee..00000000
--- a/dev-libs/glib/glib-2.48.1-r1.ebuild
+++ /dev/null
@@ -1,281 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-# Completely useless with or without USE static-libs, people need to use
-# pkg-config
-GNOME2_LA_PUNT="yes"
-
-inherit autotools bash-completion-r1 gnome2 libtool eutils flag-o-matic	multilib \
-	pax-utils python-r1 toolchain-funcs versionator virtualx linux-info multilib-minimal
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="http://www.gtk.org/"
-SRC_URI="${SRC_URI}
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2+"
-SLOT="2"
-IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-REQUIRED_USE="
-	utils? ( ${PYTHON_REQUIRED_USE} )
-	test? ( ${PYTHON_REQUIRED_USE} )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP}]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	utils? (
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	test? (
-		sys-devel/gdb
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-PDEPEND="!<gnome-base/gvfs-1.6.4-r990
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-# Earlier versions of gvfs do not work with glib
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
-
-	# Leave python shebang alone - handled by python_replicate_script
-	# We could call python_setup and give configure a valid --with-python
-	# arg, but that would mean a build dep on python when USE=utils.
-	sed -e '/${PYTHON}/d' \
-		-i glib/Makefile.{am,in} || die
-
-	# Also needed to prevent cross-compile failures, see bug #267603
-	eautoreconf
-
-	gnome2_src_prepare
-
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(usex debug --enable-debug=yes ' ') \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=system \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	virtx emake check
-}
-
-multilib_src_install() {
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	if use utils ; then
-		python_replicate_script "${ED}"/usr/bin/gtester-report
-	else
-		rm "${ED}usr/bin/gtester-report"
-		rm "${ED}usr/share/man/man1/gtester-report.1"
-	fi
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/lib/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	multilib_foreach_abi multilib_pkg_preinst
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	multilib_foreach_abi multilib_pkg_postinst
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2017-03-19 14:43 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2017-03-19 14:43 UTC (permalink / raw
  To: gentoo-commits

commit:     8e364f869f1a642b412122e94261b7ccbc380118
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 14:32:12 2017 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 14:42:35 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e364f86

dev-libs/glib: fix gdatetime tests with timezone-data-2017a

The tests were using one of the invented BRT timezones that was removed
in favor of just using the offset in timezone-data, the glib upstream patch
makes it use a real PST timezone for these tests instead.

 .../files/glib-2.50.3-fix-gdatetime-tests.patch    | 52 ++++++++++++++++++++++
 dev-libs/glib/glib-2.48.2.ebuild                   |  2 +
 dev-libs/glib/glib-2.50.3.ebuild                   |  3 ++
 3 files changed, 57 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
new file mode 100644
index 00000000000..6c41c5cf7e5
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
@@ -0,0 +1,52 @@
+From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain@orangesquash.org.uk>
+Date: Mon, 13 Mar 2017 16:52:11 +0000
+Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
+
+The tzdata maintainers had previously invented abbreviations for
+timezones. As of their 2017a release, the one we were testing ("BRT")
+has been dropped.
+
+Switch to testing PST, which is a real timezone abbreviation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=779799
+---
+ glib/tests/gdatetime.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index dcb8a8f..c54031d 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
+   g_date_time_unref (dt);
+ 
+ #ifdef G_OS_UNIX
+-  tz = g_time_zone_new ("America/Recife");
++  tz = g_time_zone_new ("America/Tijuana");
+ #elif defined G_OS_WIN32
+-  tz = g_time_zone_new ("E. South America Standard Time");
++  tz = g_time_zone_new ("Pacific Standard Time");
+ #endif
+-  dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
++  dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
+   g_time_zone_unref (tz);
+   g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
+-  g_assert_cmpint (5, ==, g_date_time_get_month (dt));
++  g_assert_cmpint (11, ==, g_date_time_get_month (dt));
+   g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
+   g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
+   g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
+   g_assert_cmpint (0, ==, g_date_time_get_second (dt));
+ #ifdef G_OS_UNIX
+-  g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
++  g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
+ #elif defined G_OS_WIN32
+-  g_assert_cmpstr ("E. South America Standard Time", ==,
++  g_assert_cmpstr ("Pacific Standard Time", ==,
+                     g_date_time_get_timezone_abbreviation (dt));
+ #endif
+   g_assert (!g_date_time_is_daylight_savings (dt));
+-- 
+2.10.1
+

diff --git a/dev-libs/glib/glib-2.48.2.ebuild b/dev-libs/glib/glib-2.48.2.ebuild
index f1a6e57edd9..d4ff8c694df 100644
--- a/dev-libs/glib/glib-2.48.2.ebuild
+++ b/dev-libs/glib/glib-2.48.2.ebuild
@@ -112,6 +112,8 @@ src_prepare() {
 		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
 	fi
 
+	eapply "${FILESDIR}"/${PN}-2.50.3-fix-gdatetime-tests.patch
+
 	# gdbus-codegen is a separate package
 	eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
 

diff --git a/dev-libs/glib/glib-2.50.3.ebuild b/dev-libs/glib/glib-2.50.3.ebuild
index 50aa9b3736b..324be550924 100644
--- a/dev-libs/glib/glib-2.50.3.ebuild
+++ b/dev-libs/glib/glib-2.50.3.ebuild
@@ -117,6 +117,9 @@ src_prepare() {
 		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
 	fi
 
+	# Fix tests with timezone-data-2017a and newer
+	eapply "${FILESDIR}"/${P}-fix-gdatetime-tests.patch
+
 	# gdbus-codegen is a separate package
 	eapply "${FILESDIR}"/${PN}-2.50.0-external-gdbus-codegen.patch
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2018-06-10  8:25 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2018-06-10  8:25 UTC (permalink / raw
  To: gentoo-commits

commit:     3a6f4d90b062f19aba3651e01b934763ff677e03
Author:     Sobhan Mohammadpour <sobhan <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  4 10:46:41 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Jun 10 08:25:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a6f4d90

dev-libs/glib: bump to 2.54.3

Bug: https://bugs.gentoo.org/651830
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-libs/glib/Manifest                             |   1 +
 .../files/glib-2.54.3-external-gdbus-codegen.patch | 116 ++++++++
 dev-libs/glib/glib-2.54.3-r4.ebuild                | 301 +++++++++++++++++++++
 3 files changed, 418 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 0b45d15f21e..90cf5fa953b 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,4 @@
 DIST glib-2.50.3.tar.xz 7589284 BLAKE2B 8648e5d9e8f4c943ca3ec5a5ec01f380f55f76555bf4ec731e211b33d0e23c29ea2a9323e2e839f35f89f292863df76d4e8c622fc44c0e5905eb904576618dbd SHA512 ef35806c15170b6608445f255136c0bebd2d433adf903c2af2865f6a57b4f2fcfc1e4a7cea1a0dac48ff5fe26248fbf7886dba4a8d209506f0a94160df8fb7af
 DIST glib-2.52.3.tar.xz 7679972 BLAKE2B 8d9f6b714571bd04ab9717fbf9ded8556664e43dcdb7dd59436b8b7f1a8a5cdf98e9ce60ca1ead941af1d57688044fefb6c749fa735084622a3482b058864ff6 SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017
+DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82f3cf5f0fd3ecb2ed6b1f62a90f8b4c0bc2f655e297f91394f771f6ecad210357e31f104ee49ca178be6b9d76 SHA512 23eb4458684624f80c17aa784eab42a38eec87bb5979fcfe56f0bc63b5c7bcf8251a0d4ea916fe2c8109ff5b14a4b60c6260755d079ff984c0d8e6a2871d307d
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b SHA512 6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
new file mode 100644
index 00000000000..45025b65551
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
@@ -0,0 +1,116 @@
+From 2e47d49bc91d83cd0abea4c1944bfca4336040fa Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <sobhan@gentoo.org>
+Date: Fri, 23 Feb 2018 15:27:33 +0330
+Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
+
+---
+ configure.ac                                       | 17 ++++++++---------
+ docs/reference/gio/Makefile.am                     |  1 -
+ gio/Makefile.am                                    |  2 +-
+ gio/tests/Makefile.am                              |  6 ++----
+ gio/tests/gdbus-object-manager-example/Makefile.am |  8 +++-----
+ 5 files changed, 14 insertions(+), 20 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0457c90..07166c9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -382,14 +382,14 @@ AC_SUBST(PERL_PATH)
+ # option to specify python interpreter to use; this just sets $PYTHON, so that
+ # we will fallback to reading $PYTHON if --with-python is not given, and
+ # python.m4 will get the expected input
+-AC_ARG_WITH(python,
+-            AS_HELP_STRING([--with-python=PATH],
+-                           [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
+-            [PYTHON="$withval"], [])
+-if test x"$PYTHON" = xyes; then
+-  AC_MSG_ERROR([--with-python option requires a path or program argument])
+-fi
+-AM_PATH_PYTHON(2.7,,PYTHON="python2.7")
++#AC_ARG_WITH(python,
++#            AS_HELP_STRING([--with-python=PATH],
++#                           [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
++#            [PYTHON="$withval"], [])
++#if test x"$PYTHON" = xyes; then
++#  AC_MSG_ERROR([--with-python option requires a path or program argument])
++#fi
++#AM_PATH_PYTHON(2.7,,PYTHON="python2.7")
+ 
+ 
+ dnl ***********************
+@@ -3469,7 +3469,6 @@ gobject/glib-mkenums
+ gobject/tests/Makefile
+ gthread/Makefile
+ gio/Makefile
+-gio/gdbus-2.0/codegen/Makefile
+ gio/gdbus-2.0/codegen/config.py
+ gio/gnetworking.h
+ gio/xdgmime/Makefile
+diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
+index 5741a3e..d38e768 100644
+--- a/docs/reference/gio/Makefile.am
++++ b/docs/reference/gio/Makefile.am
+@@ -177,7 +177,6 @@ man_MANS +=				\
+ 	gsettings.1			\
+ 	gresource.1			\
+ 	gdbus.1				\
+-	gdbus-codegen.1			\
+ 	gio.1				\
+ 	$(NULL)
+ 
+diff --git a/gio/Makefile.am b/gio/Makefile.am
+index b2db995..53d7162 100644
+--- a/gio/Makefile.am
++++ b/gio/Makefile.am
+@@ -1,6 +1,6 @@
+ include $(top_srcdir)/glib.mk
+ 
+-SUBDIRS = gdbus-2.0/codegen
++SUBDIRS = 
+ 
+ if OS_UNIX
+ if !OS_COCOA
+diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
+index acc1da4..7c51eab 100644
+--- a/gio/tests/Makefile.am
++++ b/gio/tests/Makefile.am
+@@ -460,10 +460,8 @@ gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotifica
+ 
+ BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
+ gdbus-test-codegen.o: gdbus-test-codegen-generated.h
+-gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
+-	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+-		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+-		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
++gdbus-test-codegen-generated.h: test-codegen.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-prefix org.project. \
+ 		--generate-c-code gdbus-test-codegen-generated \
+ 		--c-generate-object-manager \
+diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
+index 1d0464c..f390dca 100644
+--- a/gio/tests/gdbus-object-manager-example/Makefile.am
++++ b/gio/tests/gdbus-object-manager-example/Makefile.am
+@@ -11,10 +11,8 @@ GDBUS_GENERATED = \
+ 	gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml	\
+ 	$(NULL)
+ 
+-$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
+-	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+-		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+-		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
++$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile
++	$(AM_V_GEN) gdbus-codegen \
+ 		--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
+ 		--c-namespace Example \
+ 		--c-generate-object-manager \
+@@ -46,4 +44,4 @@ EXTRA_DIST += gdbus-example-objectmanager.xml
+ 
+ CLEANFILES += $(GDBUS_GENERATED)
+ 
+-check-TESTS:
+\ No newline at end of file
++check-TESTS: 
+-- 
+2.16.1
+

diff --git a/dev-libs/glib/glib-2.54.3-r4.ebuild b/dev-libs/glib/glib-2.54.3-r4.ebuild
new file mode 100644
index 00000000000..8238048790f
--- /dev/null
+++ b/dev-libs/glib/glib-2.54.3-r4.ebuild
@@ -0,0 +1,301 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
+# adding new dependencies end up making stage3 to grow. Every addition needs
+# then to be think very closely.
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+# Completely useless with or without USE static-libs, people need to use
+# pkg-config
+GNOME2_LA_PUNT="yes"
+
+inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
+	multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+SRC_URI="${SRC_URI}
+	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
+REQUIRED_USE="
+	utils? ( ${PYTHON_REQUIRED_USE} )
+	test? ( ${PYTHON_REQUIRED_USE} )
+"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+
+# Added util-linux multilib dependency to have libmount support (which
+# is always turned on on linux systems, unless explicitly disabled, but
+# this ebuild does not do that anyway) (bug #599586)
+
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	utils? (
+		${PYTHON_DEPS}
+		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
+		virtual/libelf:0=
+	)
+"
+DEPEND="${RDEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	>=dev-libs/libxslt-1.0
+	>=sys-devel/gettext-0.11
+	>=dev-util/gtk-doc-am-1.20
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	test? (
+		sys-devel/gdb
+		${PYTHON_DEPS}
+		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
+		>=sys-apps/dbus-1.2.14 )
+	!<dev-util/gtk-doc-1.15-r2
+"
+PDEPEND="!<gnome-base/gvfs-1.6.4-r990
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+# Earlier versions of gvfs do not work with glib
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
+	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
+
+	if use test; then
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+			ewarn "Some tests will be skipped due to missing terminal program"
+			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
+	fi
+
+	# gdbus-codegen is a separate package
+	eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
+
+	# Leave python shebang alone - handled by python_replicate_script
+	# We could call python_setup and give configure a valid --with-python
+	# arg, but that would mean a build dep on python when USE=utils.
+	sed -e '/${PYTHON}/d' \
+		-i glib/Makefile.{am,in} || die
+	sed -e 's:@PYTHON@:python:' \
+		-i gobject/glib-{genmarshal.in,mkenums.in} || die
+	# Also needed to prevent cross-compile failures, see bug #267603
+	eautoreconf
+
+	gnome2_src_prepare
+
+	epunt_cxx
+}
+
+multilib_src_configure() {
+	# Avoid circular depend with dev-util/pkgconfig and
+	# native builds (cross-compiles won't need pkg-config
+	# in the target ROOT to work here)
+	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
+		if has_version sys-apps/dbus; then
+			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
+			export DBUS1_LIBS="-ldbus-1"
+		fi
+		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
+		export LIBFFI_LIBS="-lffi"
+		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
+		export PCRE_LIBS="-lpcre"
+	fi
+
+	# These configure tests don't work when cross-compiling.
+	if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		case ${CHOST} in
+		hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		*)            export glib_cv_stack_grows=no ;;
+		esac
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
+		export glib_cv_uscore=no
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
+		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
+	fi
+
+	local myconf
+
+	case "${CHOST}" in
+		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
+		*)        myconf="${myconf} --with-threads=posix" ;;
+	esac
+
+	# libelf used only by the gresource bin
+	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
+		$(usex debug --enable-debug=yes ' ') \
+		$(use_enable xattr) \
+		$(use_enable fam) \
+		$(use_enable kernel_linux libmount) \
+		$(use_enable selinux) \
+		$(use_enable static-libs static) \
+		$(use_enable systemtap dtrace) \
+		$(use_enable systemtap systemtap) \
+		$(multilib_native_use_enable utils libelf) \
+		--disable-compile-warnings \
+		--enable-man \
+		--with-pcre=system \
+		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
+
+	if multilib_is_native_abi; then
+		local d
+		for d in glib gio gobject; do
+			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	# Hardened: gdb needs this, bug #338891
+	if host-is-pax ; then
+		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
+			|| die "Hardened adjustment failed"
+	fi
+
+	# Need X for dbus-launch session X11 initialization
+	virtx emake check
+}
+
+multilib_src_install() {
+	gnome2_src_install completiondir="$(get_bashcompdir)"
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	if use utils ; then
+		python_replicate_script "${ED}"/usr/bin/gtester-report
+	else
+		rm "${ED}usr/bin/gtester-report"
+		rm "${ED}usr/share/man/man1/gtester-report.1"
+	fi
+
+	# Do not install charset.alias even if generated, leave it to libiconv
+	rm -f "${ED}/usr/lib/charset.alias"
+
+	# Don't install gdb python macros, bug 291328
+	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
+}
+
+pkg_preinst() {
+	gnome2_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"/${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"/${cache} || die
+		else
+			touch "${ED}"/${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	# force (re)generation of gschemas.compiled
+	GNOME2_ECLASS_GLIB_SCHEMAS="force"
+
+	gnome2_pkg_postinst
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2018-06-28 18:33 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2018-06-28 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     409700a1e4a57b5bd9b87bf52bbf4b432e8180ec
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 28 18:24:33 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Thu Jun 28 18:32:24 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=409700a1

dev-libs/glib: remove old

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-libs/glib/Manifest                             |   1 -
 .../files/glib-2.50.3-fix-gdatetime-tests.patch    |  52 ----
 dev-libs/glib/glib-2.50.3-r1.ebuild                | 303 ---------------------
 3 files changed, 356 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index b840e13b7cd..d4cc80bc6fe 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,4 +1,3 @@
-DIST glib-2.50.3.tar.xz 7589284 BLAKE2B 8648e5d9e8f4c943ca3ec5a5ec01f380f55f76555bf4ec731e211b33d0e23c29ea2a9323e2e839f35f89f292863df76d4e8c622fc44c0e5905eb904576618dbd SHA512 ef35806c15170b6608445f255136c0bebd2d433adf903c2af2865f6a57b4f2fcfc1e4a7cea1a0dac48ff5fe26248fbf7886dba4a8d209506f0a94160df8fb7af
 DIST glib-2.52.3.tar.xz 7679972 BLAKE2B 8d9f6b714571bd04ab9717fbf9ded8556664e43dcdb7dd59436b8b7f1a8a5cdf98e9ce60ca1ead941af1d57688044fefb6c749fa735084622a3482b058864ff6 SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017
 DIST glib-2.54.3-patchset.tar.xz 39488 BLAKE2B 0bebd1f8eadd1796c355dbad20739ec2428a5b67e363e6ea61e2bab1e672506c438c80c602e87ec7d221ad92ad5c52adf7b57fb13441835e41f1e1208c26c6db SHA512 3d880c2681893da9267c8b2ba9a695eddbb1cef63f4ea26e052ce2f69e1e9d78eccdb27b235cbf0693ecd262bd70d020b24f82fc72ab11a4dbc2c929cfb72942
 DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82f3cf5f0fd3ecb2ed6b1f62a90f8b4c0bc2f655e297f91394f771f6ecad210357e31f104ee49ca178be6b9d76 SHA512 23eb4458684624f80c17aa784eab42a38eec87bb5979fcfe56f0bc63b5c7bcf8251a0d4ea916fe2c8109ff5b14a4b60c6260755d079ff984c0d8e6a2871d307d

diff --git a/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
deleted file mode 100644
index 6c41c5cf7e5..00000000000
--- a/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
-From: Iain Lane <iain@orangesquash.org.uk>
-Date: Mon, 13 Mar 2017 16:52:11 +0000
-Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
-
-The tzdata maintainers had previously invented abbreviations for
-timezones. As of their 2017a release, the one we were testing ("BRT")
-has been dropped.
-
-Switch to testing PST, which is a real timezone abbreviation.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=779799
----
- glib/tests/gdatetime.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
-index dcb8a8f..c54031d 100644
---- a/glib/tests/gdatetime.c
-+++ b/glib/tests/gdatetime.c
-@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
-   g_date_time_unref (dt);
- 
- #ifdef G_OS_UNIX
--  tz = g_time_zone_new ("America/Recife");
-+  tz = g_time_zone_new ("America/Tijuana");
- #elif defined G_OS_WIN32
--  tz = g_time_zone_new ("E. South America Standard Time");
-+  tz = g_time_zone_new ("Pacific Standard Time");
- #endif
--  dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
-+  dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
-   g_time_zone_unref (tz);
-   g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
--  g_assert_cmpint (5, ==, g_date_time_get_month (dt));
-+  g_assert_cmpint (11, ==, g_date_time_get_month (dt));
-   g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
-   g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
-   g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
-   g_assert_cmpint (0, ==, g_date_time_get_second (dt));
- #ifdef G_OS_UNIX
--  g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
-+  g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
- #elif defined G_OS_WIN32
--  g_assert_cmpstr ("E. South America Standard Time", ==,
-+  g_assert_cmpstr ("Pacific Standard Time", ==,
-                     g_date_time_get_timezone_abbreviation (dt));
- #endif
-   g_assert (!g_date_time_is_daylight_savings (dt));
--- 
-2.10.1
-

diff --git a/dev-libs/glib/glib-2.50.3-r1.ebuild b/dev-libs/glib/glib-2.50.3-r1.ebuild
deleted file mode 100644
index b7ab8d4b96b..00000000000
--- a/dev-libs/glib/glib-2.50.3-r1.ebuild
+++ /dev/null
@@ -1,303 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
-# adding new dependencies end up making stage3 to grow. Every addition needs
-# then to be think very closely.
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-# Completely useless with or without USE static-libs, people need to use
-# pkg-config
-GNOME2_LA_PUNT="yes"
-
-inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
-	multilib multilib-minimal pax-utils python-r1 toolchain-funcs versionator virtualx
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-SRC_URI="${SRC_URI}
-	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
-
-LICENSE="LGPL-2+"
-SLOT="2"
-IUSE="dbus debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
-REQUIRED_USE="
-	utils? ( ${PYTHON_REQUIRED_USE} )
-	test? ( ${PYTHON_REQUIRED_USE} )
-"
-
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-
-# Added util-linux multilib dependency to have libmount support (which
-# is always turned on on linux systems, unless explicitly disabled, but
-# this ebuild does not do that anyway) (bug #599586)
-
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=dev-libs/libpcre-8.13:3[${MULTILIB_USEDEP},static-libs?]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	kernel_linux? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	utils? (
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		virtual/libelf:0=
-	)
-"
-DEPEND="${RDEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=dev-libs/libxslt-1.0
-	>=sys-devel/gettext-0.11
-	>=dev-util/gtk-doc-am-1.20
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	test? (
-		sys-devel/gdb
-		${PYTHON_DEPS}
-		>=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
-		>=sys-apps/dbus-1.2.14 )
-	!<dev-util/gtk-doc-1.15-r2
-"
-PDEPEND="!<gnome-base/gvfs-1.6.4-r990
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-# Earlier versions of gvfs do not work with glib
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
-	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
-
-	if use test; then
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-			ewarn "Some tests will be skipped due to missing terminal program"
-			sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
-	fi
-
-	# Fix tests with timezone-data-2017a and newer
-	eapply "${FILESDIR}"/${P}-fix-gdatetime-tests.patch
-
-	# gdbus-codegen is a separate package
-	eapply "${FILESDIR}"/${PN}-2.50.0-external-gdbus-codegen.patch
-
-	# Leave python shebang alone - handled by python_replicate_script
-	# We could call python_setup and give configure a valid --with-python
-	# arg, but that would mean a build dep on python when USE=utils.
-	sed -e '/${PYTHON}/d' \
-		-i glib/Makefile.{am,in} || die
-
-	# Also needed to prevent cross-compile failures, see bug #267603
-	eautoreconf
-
-	gnome2_src_prepare
-
-	epunt_cxx
-}
-
-multilib_src_configure() {
-	# Avoid circular depend with dev-util/pkgconfig and
-	# native builds (cross-compiles won't need pkg-config
-	# in the target ROOT to work here)
-	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
-		if has_version sys-apps/dbus; then
-			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-			export DBUS1_LIBS="-ldbus-1"
-		fi
-		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
-		export LIBFFI_LIBS="-lffi"
-		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
-		export PCRE_LIBS="-lpcre"
-	fi
-
-	# These configure tests don't work when cross-compiling.
-	if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		case ${CHOST} in
-		hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		*)            export glib_cv_stack_grows=no ;;
-		esac
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
-		export glib_cv_uscore=no
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
-		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
-	fi
-
-	local myconf
-
-	case "${CHOST}" in
-		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
-		*)        myconf="${myconf} --with-threads=posix" ;;
-	esac
-
-	# libelf used only by the gresource bin
-	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
-		$(usex debug --enable-debug=yes ' ') \
-		$(use_enable xattr) \
-		$(use_enable fam) \
-		$(use_enable kernel_linux libmount) \
-		$(use_enable selinux) \
-		$(use_enable static-libs static) \
-		$(use_enable systemtap dtrace) \
-		$(use_enable systemtap systemtap) \
-		$(multilib_native_use_enable utils libelf) \
-		--disable-compile-warnings \
-		--enable-man \
-		--with-pcre=system \
-		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
-
-	if multilib_is_native_abi; then
-		local d
-		for d in glib gio gobject; do
-			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	# Hardened: gdb needs this, bug #338891
-	if host-is-pax ; then
-		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
-			|| die "Hardened adjustment failed"
-	fi
-
-	# Need X for dbus-launch session X11 initialization
-	virtx emake check
-}
-
-multilib_src_install() {
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	if use utils ; then
-		python_replicate_script "${ED}"/usr/bin/gtester-report
-	else
-		rm "${ED}usr/bin/gtester-report"
-		rm "${ED}usr/share/man/man1/gtester-report.1"
-	fi
-
-	# Do not install charset.alias even if generated, leave it to libiconv
-	rm -f "${ED}/usr/lib/charset.alias"
-
-	# Don't install gdb python macros, bug 291328
-	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
-}
-
-pkg_preinst() {
-	gnome2_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"/${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"/${cache} || die
-		else
-			touch "${ED}"/${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	# force (re)generation of gschemas.compiled
-	GNOME2_ECLASS_GLIB_SCHEMAS="force"
-
-	gnome2_pkg_postinst
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2019-07-23 13:03 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2019-07-23 13:03 UTC (permalink / raw
  To: gentoo-commits

commit:     f584ca053067b4aa6fb09cfe655ab260035366d2
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 23 13:00:09 2019 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Tue Jul 23 13:00:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f584ca05

dev-libs/glib: fix CVE-2019-12450

plus an unrelated small patch from upstream 2-58 branch.

Bug: https://bugs.gentoo.org/690498
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/files/2.58.3-CVE-2019-12450.patch    |  53 ++++
 .../glib/files/2.58.3-gdbusmessage-limit-fix.patch | 120 ++++++++
 dev-libs/glib/glib-2.58.3-r1.ebuild                | 315 +++++++++++++++++++++
 3 files changed, 488 insertions(+)

diff --git a/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch b/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch
new file mode 100644
index 00000000000..949ac56431f
--- /dev/null
+++ b/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch
@@ -0,0 +1,53 @@
+From e6b769819d63d2b24b251dbc9f902fe6fd614da3 Mon Sep 17 00:00:00 2001
+From: Ondrej Holy <oholy@redhat.com>
+Date: Thu, 23 May 2019 10:41:53 +0200
+Subject: [PATCH] gfile: Limit access to files when copying
+
+file_copy_fallback creates new files with default permissions and
+set the correct permissions after the operation is finished. This
+might cause that the files can be accessible by more users during
+the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
+files to limit access to those files.
+---
+ gio/gfile.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/gio/gfile.c b/gio/gfile.c
+index 1cc69166a..13b435480 100644
+--- a/gio/gfile.c
++++ b/gio/gfile.c
+@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile                  *source,
+         out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+                                                                    FALSE, NULL,
+                                                                    flags & G_FILE_COPY_BACKUP,
+-                                                                   G_FILE_CREATE_REPLACE_DESTINATION,
+-                                                                   info,
++                                                                   G_FILE_CREATE_REPLACE_DESTINATION |
++                                                                   G_FILE_CREATE_PRIVATE, info,
+                                                                    cancellable, error);
+       else
+         out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+-                                                                  FALSE, 0, info,
++                                                                  FALSE, G_FILE_CREATE_PRIVATE, info,
+                                                                   cancellable, error);
+     }
+   else if (flags & G_FILE_COPY_OVERWRITE)
+@@ -3297,12 +3297,13 @@ file_copy_fallback (GFile                  *source,
+       out = (GOutputStream *)g_file_replace (destination,
+                                              NULL,
+                                              flags & G_FILE_COPY_BACKUP,
+-                                             G_FILE_CREATE_REPLACE_DESTINATION,
++                                             G_FILE_CREATE_REPLACE_DESTINATION |
++                                             G_FILE_CREATE_PRIVATE,
+                                              cancellable, error);
+     }
+   else
+     {
+-      out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
++      out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error);
+     }
+ 
+   if (!out)
+-- 
+2.20.1
+

diff --git a/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch b/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch
new file mode 100644
index 00000000000..0828132003d
--- /dev/null
+++ b/dev-libs/glib/files/2.58.3-gdbusmessage-limit-fix.patch
@@ -0,0 +1,120 @@
+From 2d655ef8954695cabf9e99cc61411de2bb4cb847 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <withnall@endlessm.com>
+Date: Mon, 28 Jan 2019 14:36:42 +0000
+Subject: [PATCH] gdbusmessage: Fix check on upper limit of message size
+
+There was a typo in the figure checked against. Add a unit test.
+
+Signed-off-by: Philip Withnall <withnall@endlessm.com>
+
+https://gitlab.gnome.org/GNOME/glib/issues/1642
+---
+ gio/gdbusmessage.c        |  2 +-
+ gio/tests/gdbus-message.c | 72 ++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 72 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
+index 169e6fd15..2ad51f888 100644
+--- a/gio/gdbusmessage.c
++++ b/gio/gdbusmessage.c
+@@ -1984,7 +1984,7 @@ g_dbus_message_bytes_needed (guchar  *blob,
+                    "Unable to determine message blob length - given blob is malformed");
+     }
+ 
+-  if (ret > (2<<27))
++  if (ret > (1<<27))
+     {
+       g_set_error (error,
+                    G_IO_ERROR,
+diff --git a/gio/tests/gdbus-message.c b/gio/tests/gdbus-message.c
+index 88a9c5d86..74e0f712e 100644
+--- a/gio/tests/gdbus-message.c
++++ b/gio/tests/gdbus-message.c
+@@ -141,6 +141,74 @@ message_copy (void)
+ 
+ /* ---------------------------------------------------------------------------------------------------- */
+ 
++/* Test g_dbus_message_bytes_needed() returns correct results for a variety of
++ * arbitrary binary inputs.*/
++static void
++message_bytes_needed (void)
++{
++  const struct
++    {
++      const guint8 blob[16];
++      gssize expected_bytes_needed;
++    }
++  vectors[] =
++    {
++      /* Little endian with header rounding */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          50, 0, 0, 0,  /* body length */
++          1, 0, 0, 0,  /* message serial */
++          7, 0, 0, 0  /* header length */}, 74 },
++      /* Little endian without header rounding */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          50, 0, 0, 0,  /* body length */
++          1, 0, 0, 0,  /* message serial */
++          8, 0, 0, 0  /* header length */}, 74 },
++      /* Big endian with header rounding */
++      { { 'B', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 7  /* header length */}, 74 },
++      /* Big endian without header rounding */
++      { { 'B', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 8  /* header length */}, 74 },
++      /* Invalid endianness */
++      { { '!', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 50,  /* body length */
++          0, 0, 0, 1,  /* message serial */
++          0, 0, 0, 8  /* header length */}, -1 },
++      /* Oversized */
++      { { 'l', 0, 0, 1,  /* endianness, message type, flags, protocol version */
++          0, 0, 0, 0x08,  /* body length (128MiB) */
++          1, 0, 0, 0,  /* message serial */
++          7, 0, 0, 0  /* header length */}, -1 },
++    };
++  gsize i;
++
++  for (i = 0; i < G_N_ELEMENTS (vectors); i++)
++    {
++      gssize bytes_needed;
++      GError *local_error = NULL;
++
++      g_test_message ("Vector: %" G_GSIZE_FORMAT, i);
++
++      bytes_needed = g_dbus_message_bytes_needed ((guchar *) vectors[i].blob,
++                                                  G_N_ELEMENTS (vectors[i].blob),
++                                                  &local_error);
++
++      if (vectors[i].expected_bytes_needed < 0)
++        g_assert_error (local_error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
++      else
++        g_assert_no_error (local_error);
++      g_assert_cmpint (bytes_needed, ==, vectors[i].expected_bytes_needed);
++
++      g_clear_error (&local_error);
++    }
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
+ int
+ main (int   argc,
+       char *argv[])
+@@ -151,6 +219,8 @@ main (int   argc,
+ 
+   g_test_add_func ("/gdbus/message/lock", message_lock);
+   g_test_add_func ("/gdbus/message/copy", message_copy);
+-  return g_test_run();
++  g_test_add_func ("/gdbus/message/bytes-needed", message_bytes_needed);
++
++  return g_test_run ();
+ }
+ 
+-- 
+2.20.1
+

diff --git a/dev-libs/glib/glib-2.58.3-r1.ebuild b/dev-libs/glib/glib-2.58.3-r1.ebuild
new file mode 100644
index 00000000000..310e79a8cf4
--- /dev/null
+++ b/dev-libs/glib/glib-2.58.3-r1.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+GNOME2_EAUTORECONF=yes
+
+inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
+	multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
+
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
+# adding new dependencies end up making stage3 to grow. Every addition needs
+# then to be think very closely.
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+SRC_URI="${SRC_URI}
+	https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+# Added util-linux multilib dependency to have libmount support (which
+# is always turned on on linux systems, unless explicitly disabled, but
+# this ebuild does not do that anyway) (bug #599586)
+
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
+	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
+	utils? (
+		>=dev-util/gdbus-codegen-${PV}
+		virtual/libelf:0=
+	)
+"
+DEPEND="${RDEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	app-text/docbook-xsl-stylesheets
+	>=dev-libs/libxslt-1.0
+	>=sys-devel/gettext-0.11
+	gtk-doc? ( >=dev-util/gtk-doc-1.20 )
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	${PYTHON_DEPS}
+	test? (
+		sys-devel/gdb
+		>=dev-util/gdbus-codegen-${PV}
+		>=sys-apps/dbus-1.2.14 )
+"
+# configure.ac has gtk-doc-am stuff behind m4_ifdef, so we don't need a gtk-doc-am build dep
+
+# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
+# python depending package, which can be buildtime depended in packages that
+# need these tools, without pulling in python at runtime.
+RDEPEND="${RDEPEND}
+	>=dev-util/glib-utils-${PV}"
+PDEPEND="
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	# Prevent build failure in stage3 where pkgconfig is not available, bug #481056
+	mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
+
+	if use test; then
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+		#	ewarn "Some tests will be skipped due to missing terminal program"
+		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
+		# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
+		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		# desktop-app-info/launch* might fail similarly
+		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
+		#fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
+	fi
+
+	# gdbus-codegen is a separate package
+	eapply "${FILESDIR}"/${PN}-2.58.2-external-gdbus-codegen.patch
+
+	# gdbus message upper limit check fix from glib-2-58
+	eapply "${FILESDIR}"/${PV}-gdbusmessage-limit-fix.patch
+	# gfile copy fallback security fix (wrong permissions at start)
+	eapply "${FILESDIR}"/${PV}-CVE-2019-12450.patch
+
+	# Tarball doesn't come with gtk-doc.make and we can't unconditionally depend on dev-util/gtk-doc due
+	# to circular deps during bootstramp. If actually not building gtk-doc, an almost empty file will do
+	# fine as well - this is also what upstream autogen.sh does if gtkdocize is not found. If gtk-doc is
+	# installed, eautoreconf will call gtkdocize, which overwrites the empty gtk-doc.make with a full copy.
+	cat > gtk-doc.make << EOF
+EXTRA_DIST =
+CLEANFILES =
+EOF
+
+	gnome2_src_prepare
+	epunt_cxx
+}
+
+multilib_src_configure() {
+	# Avoid circular depend with dev-util/pkgconfig and
+	# native builds (cross-compiles won't need pkg-config
+	# in the target ROOT to work here)
+	if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
+		if has_version sys-apps/dbus; then
+			export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
+			export DBUS1_LIBS="-ldbus-1"
+		fi
+		export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
+		export LIBFFI_LIBS="-lffi"
+		export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
+		export PCRE_LIBS="-lpcre"
+	fi
+
+	# These configure tests don't work when cross-compiling.
+	if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		case ${CHOST} in
+		hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		*)            export glib_cv_stack_grows=no ;;
+		esac
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756474
+		export glib_cv_uscore=no
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756475
+		export ac_cv_func_posix_get{pwuid,grgid}_r=yes
+	fi
+
+	local myconf
+
+	case "${CHOST}" in
+		*-mingw*) myconf="${myconf} --with-threads=win32" ;;
+		*)        myconf="${myconf} --with-threads=posix" ;;
+	esac
+
+	# libelf used only by the gresource bin
+	ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
+		$(usex debug --enable-debug=yes ' ') \
+		$(use_enable xattr) \
+		$(use_enable fam) \
+		$(multilib_native_use_enable gtk-doc) \
+		$(use_enable kernel_linux libmount) \
+		$(use_enable selinux) \
+		$(use_enable static-libs static) \
+		$(use_enable systemtap dtrace) \
+		$(use_enable systemtap systemtap) \
+		$(multilib_native_use_enable utils libelf) \
+		--with-python=${EPYTHON} \
+		--disable-compile-warnings \
+		--enable-man \
+		--with-pcre=system \
+		--with-xml-catalog="${EPREFIX}/etc/xml/catalog"
+
+	if multilib_is_native_abi; then
+		local d
+		for d in glib gio gobject; do
+			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	# Hardened: gdb needs this, bug #338891
+	if host-is-pax ; then
+		pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
+			|| die "Hardened adjustment failed"
+	fi
+
+	# Need X for dbus-launch session X11 initialization
+	virtx emake check
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	# These are installed by dev-util/glib-utils
+	# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit with meson
+	rm "${ED}usr/bin/glib-genmarshal" || die
+	rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
+	rm "${ED}usr/bin/glib-mkenums" || die
+	rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
+	rm "${ED}usr/bin/gtester-report" || die
+	rm "${ED}usr/share/man/man1/gtester-report.1" || die
+
+	# Do not install charset.alias even if generated, leave it to libiconv
+	rm -f "${ED}/usr/$(get_libdir)/charset.alias"
+
+	# Don't install gdb python macros, bug 291328
+	rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
+
+	# Completely useless with or without USE static-libs, people need to use pkg-config
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	gnome2_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"/${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"/${cache} || die
+		else
+			touch "${ED}"/${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	# force (re)generation of gschemas.compiled
+	GNOME2_ECLASS_GLIB_SCHEMAS="force"
+
+	gnome2_pkg_postinst
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2020-06-07 21:28 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2020-06-07 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     0729575e73cb2069e997446852cf12bea48026af
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  7 21:14:47 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Jun  7 21:28:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0729575e

dev-libs/glib: remove old

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/Manifest                       |   1 -
 dev-libs/glib/files/2.60.7-gdbus-fixes.patch | 301 -----------
 dev-libs/glib/files/CVE-2020-6750.patch      | 763 ---------------------------
 dev-libs/glib/glib-2.60.7-r2.ebuild          | 280 ----------
 4 files changed, 1345 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 0bc6c77c82b..13461a99ddd 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,2 @@
-DIST glib-2.60.7.tar.xz 4590568 BLAKE2B a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15 SHA512 d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
 DIST glib-2.62.6.tar.xz 4703424 BLAKE2B 0a27245be2575c574dcc730dd051a8c284f421dbc46579aadc5fbbacb8f934af4374b61bb26085e5c9ab78a868c567818f3fb9d67adddce37f5c4fec00e0d276 SHA512 8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5
 DIST glib-2.64.3.tar.xz 4778964 BLAKE2B 98ec6e15a8ff642fbccd4809d749234d5adae8abcab7a3619caed0aa60370d0409a76a2c64a95998401e8a339dcc264f4f808f3d7be457ff40e38d70b0a8076b SHA512 a3828c37a50e86eb8791be53bd8af848d144e4580841ffab28f3b6eae5144f5cdf4a5d4b43130615b97488e700b274c2468fc7d561b3701a1fc686349501a1db

diff --git a/dev-libs/glib/files/2.60.7-gdbus-fixes.patch b/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
deleted file mode 100644
index e2a066beec7..00000000000
--- a/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From 1cfab12a28d97716ad581c30fbbf3e94e4d7f303 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Mon, 14 Oct 2019 08:22:24 +0100
-Subject: [PATCH 1/3] gcredentialsprivate: Document the various private macros
-
-Signed-off-by: Simon McVittie <smcv@collabora.com>
----
- gio/gcredentialsprivate.h | 59 +++++++++++++++++++++++++++++++++++++++
- 1 file changed, 59 insertions(+)
-
-diff --git a/gio/gcredentialsprivate.h b/gio/gcredentialsprivate.h
-index 4d1c420a8..06f0aed19 100644
---- a/gio/gcredentialsprivate.h
-+++ b/gio/gcredentialsprivate.h
-@@ -22,6 +22,65 @@
- #include "gio/gcredentials.h"
- #include "gio/gnetworking.h"
- 
-+/*
-+ * G_CREDENTIALS_SUPPORTED:
-+ *
-+ * Defined to 1 if GCredentials works.
-+ */
-+#undef G_CREDENTIALS_SUPPORTED
-+
-+/*
-+ * G_CREDENTIALS_USE_LINUX_UCRED, etc.:
-+ *
-+ * Defined to 1 if GCredentials uses Linux `struct ucred`, etc.
-+ */
-+#undef G_CREDENTIALS_USE_LINUX_UCRED
-+#undef G_CREDENTIALS_USE_FREEBSD_CMSGCRED
-+#undef G_CREDENTIALS_USE_NETBSD_UNPCBID
-+#undef G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED
-+#undef G_CREDENTIALS_USE_SOLARIS_UCRED
-+
-+/*
-+ * G_CREDENTIALS_NATIVE_TYPE:
-+ *
-+ * Defined to one of G_CREDENTIALS_TYPE_LINUX_UCRED, etc.
-+ */
-+#undef G_CREDENTIALS_NATIVE_TYPE
-+
-+/*
-+ * G_CREDENTIALS_NATIVE_SIZE:
-+ *
-+ * Defined to the size of the %G_CREDENTIALS_NATIVE_TYPE
-+ */
-+#undef G_CREDENTIALS_NATIVE_SIZE
-+
-+/*
-+ * G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED:
-+ *
-+ * Defined to 1 if we have a message-passing API in which credentials
-+ * are attached to a particular message, such as `SCM_CREDENTIALS` on Linux
-+ * or `SCM_CREDS` on FreeBSD.
-+ */
-+#undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED
-+
-+/*
-+ * G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED:
-+ *
-+ * Defined to 1 if we have a `getsockopt()`-style API in which one end of
-+ * a socket connection can directly query the credentials of the process
-+ * that initiated the other end, such as `getsockopt SO_PEERCRED` on Linux
-+ * or `getpeereid()` on multiple operating systems.
-+ */
-+#undef G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED
-+
-+/*
-+ * G_CREDENTIALS_SPOOFING_SUPPORTED:
-+ *
-+ * Defined to 1 if privileged processes can spoof their credentials when
-+ * using the message-passing API.
-+ */
-+#undef G_CREDENTIALS_SPOOFING_SUPPORTED
-+
- #ifdef __linux__
- #define G_CREDENTIALS_SUPPORTED 1
- #define G_CREDENTIALS_USE_LINUX_UCRED 1
--- 
-2.20.1
-
-
-From 5f9318af8f19756685c1b79cf8b76f3e66614d84 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Fri, 18 Oct 2019 10:55:09 +0100
-Subject: [PATCH 2/3] credentials: Invalid Linux struct ucred means "no
- information"
-
-On Linux, if getsockopt SO_PEERCRED is used on a TCP socket, one
-might expect it to fail with an appropriate error like ENOTSUP or
-EPROTONOSUPPORT. However, it appears that in fact it succeeds, but
-yields a credentials structure with pid 0, uid -1 and gid -1. These
-are not real process, user and group IDs that can be allocated to a
-real process (pid 0 needs to be reserved to give kill(0) its documented
-special semantics, and similarly uid and gid -1 need to be reserved for
-setresuid() and setresgid()) so it is not meaningful to signal them to
-high-level API users.
-
-An API user with Linux-specific knowledge can still inspect these fields
-via g_credentials_get_native() if desired.
-
-Similarly, if SO_PASSCRED is used to receive a SCM_CREDENTIALS message
-on a receiving Unix socket, but the sending socket had not enabled
-SO_PASSCRED at the time that the message was sent, it is possible
-for it to succeed but yield a credentials structure with pid 0, uid
-/proc/sys/kernel/overflowuid and gid /proc/sys/kernel/overflowgid. Even
-if we were to read those pseudo-files, we cannot distinguish between
-the overflow IDs and a real process that legitimately has the same IDs
-(typically they are set to 'nobody' and 'nogroup', which can be used
-by a real process), so we detect this situation by noticing that
-pid == 0, and to save syscalls we do not read the overflow IDs from
-/proc at all.
-
-This results in a small API change: g_credentials_is_same_user() now
-returns FALSE if we compare two credentials structures that are both
-invalid. This seems like reasonable, conservative behaviour: if we cannot
-prove that they are the same user, we should assume they are not.
-
-(Dropped new translatable string when backporting to `glib-2-62`.)
-
-Signed-off-by: Simon McVittie <smcv@collabora.com>
----
- gio/gcredentials.c | 42 +++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 39 insertions(+), 3 deletions(-)
-
-diff --git a/gio/gcredentials.c b/gio/gcredentials.c
-index 57a39f2a2..ff9b7e0b8 100644
---- a/gio/gcredentials.c
-+++ b/gio/gcredentials.c
-@@ -265,6 +265,35 @@ g_credentials_to_string (GCredentials *credentials)
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
-+#if G_CREDENTIALS_USE_LINUX_UCRED
-+/*
-+ * Check whether @native contains invalid data. If getsockopt SO_PEERCRED
-+ * is used on a TCP socket, it succeeds but yields a credentials structure
-+ * with pid 0, uid -1 and gid -1. Similarly, if SO_PASSCRED is used on a
-+ * receiving Unix socket when the sending socket did not also enable
-+ * SO_PASSCRED, it can succeed but yield a credentials structure with
-+ * pid 0, uid /proc/sys/kernel/overflowuid and gid
-+ * /proc/sys/kernel/overflowgid.
-+ */
-+static gboolean
-+linux_ucred_check_valid (struct ucred  *native,
-+                         GError       **error)
-+{
-+  if (native->pid == 0
-+      || native->uid == -1
-+      || native->gid == -1)
-+    {
-+      g_set_error_literal (error,
-+                           G_IO_ERROR,
-+                           G_IO_ERROR_INVALID_DATA,
-+                           "GCredentials contains invalid data");
-+      return FALSE;
-+    }
-+
-+  return TRUE;
-+}
-+#endif
-+
- /**
-  * g_credentials_is_same_user:
-  * @credentials: A #GCredentials.
-@@ -294,7 +323,8 @@ g_credentials_is_same_user (GCredentials  *credentials,
- 
-   ret = FALSE;
- #if G_CREDENTIALS_USE_LINUX_UCRED
--  if (credentials->native.uid == other_credentials->native.uid)
-+  if (linux_ucred_check_valid (&credentials->native, NULL)
-+      && credentials->native.uid == other_credentials->native.uid)
-     ret = TRUE;
- #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
-   if (credentials->native.cmcred_euid == other_credentials->native.cmcred_euid)
-@@ -453,7 +483,10 @@ g_credentials_get_unix_user (GCredentials    *credentials,
-   g_return_val_if_fail (error == NULL || *error == NULL, -1);
- 
- #if G_CREDENTIALS_USE_LINUX_UCRED
--  ret = credentials->native.uid;
-+  if (linux_ucred_check_valid (&credentials->native, error))
-+    ret = credentials->native.uid;
-+  else
-+    ret = -1;
- #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
-   ret = credentials->native.cmcred_euid;
- #elif G_CREDENTIALS_USE_NETBSD_UNPCBID
-@@ -499,7 +532,10 @@ g_credentials_get_unix_pid (GCredentials    *credentials,
-   g_return_val_if_fail (error == NULL || *error == NULL, -1);
- 
- #if G_CREDENTIALS_USE_LINUX_UCRED
--  ret = credentials->native.pid;
-+  if (linux_ucred_check_valid (&credentials->native, error))
-+    ret = credentials->native.pid;
-+  else
-+    ret = -1;
- #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
-   ret = credentials->native.cmcred_pid;
- #elif G_CREDENTIALS_USE_NETBSD_UNPCBID
--- 
-2.20.1
-
-
-From c7618cce3752e1f3681f75d0a26c7e07c15bd6a2 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Mon, 14 Oct 2019 08:47:39 +0100
-Subject: [PATCH 3/3] GDBus: prefer getsockopt()-style credentials-passing APIs
-
-Closes: https://gitlab.gnome.org/GNOME/glib/issues/1831
----
- gio/gcredentialsprivate.h | 18 ++++++++++++++++++
- gio/gdbusauth.c           | 27 +++++++++++++++++++++++++--
- 2 files changed, 43 insertions(+), 2 deletions(-)
-
-diff --git a/gio/gcredentialsprivate.h b/gio/gcredentialsprivate.h
-index 06f0aed19..e9ec09b9f 100644
---- a/gio/gcredentialsprivate.h
-+++ b/gio/gcredentialsprivate.h
-@@ -81,6 +81,18 @@
-  */
- #undef G_CREDENTIALS_SPOOFING_SUPPORTED
- 
-+/*
-+ * G_CREDENTIALS_PREFER_MESSAGE_PASSING:
-+ *
-+ * Defined to 1 if the data structure transferred by the message-passing
-+ * API is strictly more informative than the one transferred by the
-+ * `getsockopt()`-style API, and hence should be preferred, even for
-+ * protocols like D-Bus that are defined in terms of the credentials of
-+ * the (process that opened the) socket, as opposed to the credentials
-+ * of an individual message.
-+ */
-+#undef G_CREDENTIALS_PREFER_MESSAGE_PASSING
-+
- #ifdef __linux__
- #define G_CREDENTIALS_SUPPORTED 1
- #define G_CREDENTIALS_USE_LINUX_UCRED 1
-@@ -100,6 +112,12 @@
- #define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct cmsgcred))
- #define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1
- #define G_CREDENTIALS_SPOOFING_SUPPORTED 1
-+/* GLib doesn't implement it yet, but FreeBSD's getsockopt()-style API
-+ * is getpeereid(), which is not as informative as struct cmsgcred -
-+ * it does not tell us the PID. As a result, libdbus prefers to use
-+ * SCM_CREDS, and if we implement getpeereid() in future, we should
-+ * do the same. */
-+#define G_CREDENTIALS_PREFER_MESSAGE_PASSING 1
- 
- #elif defined(__NetBSD__)
- #define G_CREDENTIALS_SUPPORTED 1
-diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
-index 752ec23fc..14cc5d70e 100644
---- a/gio/gdbusauth.c
-+++ b/gio/gdbusauth.c
-@@ -31,6 +31,7 @@
- #include "gdbusutils.h"
- #include "gioenumtypes.h"
- #include "gcredentials.h"
-+#include "gcredentialsprivate.h"
- #include "gdbusprivate.h"
- #include "giostream.h"
- #include "gdatainputstream.h"
-@@ -969,9 +970,31 @@ _g_dbus_auth_run_server (GDBusAuth              *auth,
- 
-   g_data_input_stream_set_newline_type (dis, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
- 
--  /* first read the NUL-byte */
-+  /* read the NUL-byte, possibly with credentials attached */
- #ifdef G_OS_UNIX
--  if (G_IS_UNIX_CONNECTION (auth->priv->stream))
-+#ifndef G_CREDENTIALS_PREFER_MESSAGE_PASSING
-+  if (G_IS_SOCKET_CONNECTION (auth->priv->stream))
-+    {
-+      GSocket *sock = g_socket_connection_get_socket (G_SOCKET_CONNECTION (auth->priv->stream));
-+
-+      local_error = NULL;
-+      credentials = g_socket_get_credentials (sock, &local_error);
-+
-+      if (credentials == NULL && !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
-+        {
-+          g_propagate_error (error, local_error);
-+          goto out;
-+        }
-+      else
-+        {
-+          /* Clear the error indicator, so we can retry with
-+           * g_unix_connection_receive_credentials() if necessary */
-+          g_clear_error (&local_error);
-+        }
-+    }
-+#endif
-+
-+  if (credentials == NULL && G_IS_UNIX_CONNECTION (auth->priv->stream))
-     {
-       local_error = NULL;
-       credentials = g_unix_connection_receive_credentials (G_UNIX_CONNECTION (auth->priv->stream),
--- 
-2.20.1
-

diff --git a/dev-libs/glib/files/CVE-2020-6750.patch b/dev-libs/glib/files/CVE-2020-6750.patch
deleted file mode 100644
index fe39914f920..00000000000
--- a/dev-libs/glib/files/CVE-2020-6750.patch
+++ /dev/null
@@ -1,763 +0,0 @@
-From cc3cf6b8b2ad12d54f3474113f0ccfa7dcf66b7b Mon Sep 17 00:00:00 2001
-From: Michael Catanzaro <mcatanzaro@gnome.org>
-Date: Sat, 4 Jan 2020 20:46:25 -0600
-Subject: [PATCH] gsocketclient: run timeout source on the task's main context
-
-This shouldn't make any difference, because this code should only ever
-be running in the main context that was thread-default at the time the
-task was created, so it should already match the task's context. But
-let's make sure, just in case.
----
- gio/gsocketclient.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
-index 6adeee299..81721795b 100644
---- a/gio/gsocketclient.c
-+++ b/gio/gsocketclient.c
-@@ -1794,7 +1794,7 @@ g_socket_client_enumerator_callback (GObject      *object,
-   attempt->connection = (GIOStream *)g_socket_connection_factory_create_connection (socket);
-   attempt->timeout_source = g_timeout_source_new (HAPPY_EYEBALLS_CONNECTION_ATTEMPT_TIMEOUT_MS);
-   g_source_set_callback (attempt->timeout_source, on_connection_attempt_timeout, attempt, NULL);
--  g_source_attach (attempt->timeout_source, g_main_context_get_thread_default ());
-+  g_source_attach (attempt->timeout_source, g_task_get_context (data->task));
-   data->connection_attempts = g_slist_append (data->connection_attempts, attempt);
- 
-   if (g_task_get_cancellable (data->task))
--- 
-2.24.1
-
-From d4fcf91460696b09bb2b55c352a023f6dd71c7fe Mon Sep 17 00:00:00 2001
-From: Patrick Griffis <tingping@tingping.se>
-Date: Thu, 23 Jan 2020 19:58:41 -0800
-Subject: [PATCH] Refactor g_socket_client_connect_async()
-
-This is a fairly large refactoring. The highlights are:
-
-- Removing in-progress connections/addresses from GSocketClientAsyncConnectData:
-
-  This caused issues where multiple ConnectionAttempt's would step over eachother
-  and modify shared state causing bugs like accidentally bypassing a set proxy.
-
-  Fixes #1871
-  Fixes #1989
-  Fixes #1902
-
-- Cancelling address enumeration on error/completion
-
-- Queuing successful TCP connections and doing application layer work serially:
-
-  This is more in the spirit of Happy Eyeballs but it also greatly simplifies
-  the flow of connection handling so fewer tasks are happening in parallel
-  when they don't need to be.
-
-  The behavior also should more closely match that of g_socket_client_connect().
-
-- Better track the state of address enumeration:
-
-  Previously we were over eager to treat enumeration finishing as an error.
-
-  Fixes #1872
-  See also #1982
-
-- Add more detailed documentation and logging.
-
-Closes #1995
----
- gio/gsocketclient.c | 459 ++++++++++++++++++++++++++++----------------
- 1 file changed, 296 insertions(+), 163 deletions(-)
-
-diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
-index 81721795b..c9943309c 100644
---- a/gio/gsocketclient.c
-+++ b/gio/gsocketclient.c
-@@ -1337,13 +1337,15 @@ typedef struct
- 
-   GSocketConnectable *connectable;
-   GSocketAddressEnumerator *enumerator;
--  GProxyAddress *proxy_addr;
--  GSocket *socket;
--  GIOStream *connection;
-+  GCancellable *enumeration_cancellable;
- 
-   GSList *connection_attempts;
-+  GSList *successful_connections;
-   GError *last_error;
- 
-+  gboolean enumerated_at_least_once;
-+  gboolean enumeration_completed;
-+  gboolean connection_in_progress;
-   gboolean completed;
- } GSocketClientAsyncConnectData;
- 
-@@ -1355,10 +1357,9 @@ g_socket_client_async_connect_data_free (GSocketClientAsyncConnectData *data)
-   data->task = NULL;
-   g_clear_object (&data->connectable);
-   g_clear_object (&data->enumerator);
--  g_clear_object (&data->proxy_addr);
--  g_clear_object (&data->socket);
--  g_clear_object (&data->connection);
-+  g_clear_object (&data->enumeration_cancellable);
-   g_slist_free_full (data->connection_attempts, connection_attempt_unref);
-+  g_slist_free_full (data->successful_connections, connection_attempt_unref);
- 
-   g_clear_error (&data->last_error);
- 
-@@ -1370,6 +1371,7 @@ typedef struct
-   GSocketAddress *address;
-   GSocket *socket;
-   GIOStream *connection;
-+  GProxyAddress *proxy_addr;
-   GSocketClientAsyncConnectData *data; /* unowned */
-   GSource *timeout_source;
-   GCancellable *cancellable;
-@@ -1401,6 +1403,7 @@ connection_attempt_unref (gpointer pointer)
-       g_clear_object (&attempt->socket);
-       g_clear_object (&attempt->connection);
-       g_clear_object (&attempt->cancellable);
-+      g_clear_object (&attempt->proxy_addr);
-       if (attempt->timeout_source)
-         {
-           g_source_destroy (attempt->timeout_source);
-@@ -1418,37 +1421,59 @@ connection_attempt_remove (ConnectionAttempt *attempt)
- }
- 
- static void
--g_socket_client_async_connect_complete (GSocketClientAsyncConnectData *data)
-+cancel_all_attempts (GSocketClientAsyncConnectData *data)
- {
--  g_assert (data->connection);
-+  GSList *l;
- 
--  if (!G_IS_SOCKET_CONNECTION (data->connection))
-+  for (l = data->connection_attempts; l; l = g_slist_next (l))
-     {
--      GSocketConnection *wrapper_connection;
--
--      wrapper_connection = g_tcp_wrapper_connection_new (data->connection, data->socket);
--      g_object_unref (data->connection);
--      data->connection = (GIOStream *)wrapper_connection;
-+      ConnectionAttempt *attempt_entry = l->data;
-+      g_cancellable_cancel (attempt_entry->cancellable);
-+      connection_attempt_unref (attempt_entry);
-     }
-+  g_slist_free (data->connection_attempts);
-+  data->connection_attempts = NULL;
- 
--  if (!data->completed)
-+  g_slist_free_full (data->successful_connections, connection_attempt_unref);
-+  data->successful_connections = NULL;
-+
-+  g_cancellable_cancel (data->enumeration_cancellable);
-+}
-+
-+static void
-+g_socket_client_async_connect_complete (ConnectionAttempt *attempt)
-+{
-+  GSocketClientAsyncConnectData *data = attempt->data;
-+  GError *error = NULL;
-+  g_assert (attempt->connection);
-+  g_assert (!data->completed);
-+
-+  if (!G_IS_SOCKET_CONNECTION (attempt->connection))
-     {
--      GError *error = NULL;
-+      GSocketConnection *wrapper_connection;
- 
--      if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable (data->task), &error))
--        {
--          g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
--          g_task_return_error (data->task, g_steal_pointer (&error));
--        }
--      else
--        {
--          g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, data->connection);
--          g_task_return_pointer (data->task, g_steal_pointer (&data->connection), g_object_unref);
--        }
-+      wrapper_connection = g_tcp_wrapper_connection_new (attempt->connection, attempt->socket);
-+      g_object_unref (attempt->connection);
-+      attempt->connection = (GIOStream *)wrapper_connection;
-+    }
- 
--      data->completed = TRUE;
-+  data->completed = TRUE;
-+  cancel_all_attempts (data);
-+
-+  if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable (data->task), &error))
-+    {
-+      g_debug ("GSocketClient: Connection cancelled!");
-+      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
-+      g_task_return_error (data->task, g_steal_pointer (&error));
-+    }
-+  else
-+    {
-+      g_debug ("GSocketClient: Connection successful!");
-+      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, attempt->connection);
-+      g_task_return_pointer (data->task, g_steal_pointer (&attempt->connection), g_object_unref);
-     }
- 
-+  connection_attempt_unref (attempt);
-   g_object_unref (data->task);
- }
- 
-@@ -1470,59 +1495,63 @@ static void
- enumerator_next_async (GSocketClientAsyncConnectData *data,
-                        gboolean                       add_task_ref)
- {
--  /* We need to cleanup the state */
--  g_clear_object (&data->socket);
--  g_clear_object (&data->proxy_addr);
--  g_clear_object (&data->connection);
--
-   /* Each enumeration takes a ref. This arg just avoids repeated unrefs when
-      an enumeration starts another enumeration */
-   if (add_task_ref)
-     g_object_ref (data->task);
- 
-   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_RESOLVING, data->connectable, NULL);
-+  g_debug ("GSocketClient: Starting new address enumeration");
-   g_socket_address_enumerator_next_async (data->enumerator,
--					  g_task_get_cancellable (data->task),
-+					  data->enumeration_cancellable,
- 					  g_socket_client_enumerator_callback,
- 					  data);
- }
- 
-+static void try_next_connection_or_finish (GSocketClientAsyncConnectData *, gboolean);
-+
- static void
- g_socket_client_tls_handshake_callback (GObject      *object,
- 					GAsyncResult *result,
- 					gpointer      user_data)
- {
--  GSocketClientAsyncConnectData *data = user_data;
-+  ConnectionAttempt *attempt = user_data;
-+  GSocketClientAsyncConnectData *data = attempt->data;
- 
-   if (g_tls_connection_handshake_finish (G_TLS_CONNECTION (object),
- 					 result,
- 					 &data->last_error))
-     {
--      g_object_unref (data->connection);
--      data->connection = G_IO_STREAM (object);
-+      g_object_unref (attempt->connection);
-+      attempt->connection = G_IO_STREAM (object);
- 
--      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_TLS_HANDSHAKED, data->connectable, data->connection);
--      g_socket_client_async_connect_complete (data);
-+      g_debug ("GSocketClient: TLS handshake succeeded");
-+      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_TLS_HANDSHAKED, data->connectable, attempt->connection);
-+      g_socket_client_async_connect_complete (attempt);
-     }
-   else
-     {
-       g_object_unref (object);
--      enumerator_next_async (data, FALSE);
-+      connection_attempt_unref (attempt);
-+      g_debug ("GSocketClient: TLS handshake failed: %s", data->last_error->message);
-+      try_next_connection_or_finish (data, TRUE);
-     }
- }
- 
- static void
--g_socket_client_tls_handshake (GSocketClientAsyncConnectData *data)
-+g_socket_client_tls_handshake (ConnectionAttempt *attempt)
- {
-+  GSocketClientAsyncConnectData *data = attempt->data;
-   GIOStream *tlsconn;
- 
-   if (!data->client->priv->tls)
-     {
--      g_socket_client_async_connect_complete (data);
-+      g_socket_client_async_connect_complete (attempt);
-       return;
-     }
- 
--  tlsconn = g_tls_client_connection_new (data->connection,
-+  g_debug ("GSocketClient: Starting TLS handshake");
-+  tlsconn = g_tls_client_connection_new (attempt->connection,
- 					 data->connectable,
- 					 &data->last_error);
-   if (tlsconn)
-@@ -1534,11 +1563,12 @@ g_socket_client_tls_handshake (GSocketClientAsyncConnectData *data)
- 					G_PRIORITY_DEFAULT,
- 					g_task_get_cancellable (data->task),
- 					g_socket_client_tls_handshake_callback,
--					data);
-+					attempt);
-     }
-   else
-     {
--      enumerator_next_async (data, FALSE);
-+      connection_attempt_unref (attempt);
-+      try_next_connection_or_finish (data, TRUE);
-     }
- }
- 
-@@ -1547,23 +1577,38 @@ g_socket_client_proxy_connect_callback (GObject      *object,
- 					GAsyncResult *result,
- 					gpointer      user_data)
- {
--  GSocketClientAsyncConnectData *data = user_data;
-+  ConnectionAttempt *attempt = user_data;
-+  GSocketClientAsyncConnectData *data = attempt->data;
- 
--  g_object_unref (data->connection);
--  data->connection = g_proxy_connect_finish (G_PROXY (object),
--					     result,
--					     &data->last_error);
--  if (data->connection)
-+  g_object_unref (attempt->connection);
-+  attempt->connection = g_proxy_connect_finish (G_PROXY (object),
-+                                                result,
-+                                                &data->last_error);
-+  if (attempt->connection)
-     {
--      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATED, data->connectable, data->connection);
-+      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATED, data->connectable, attempt->connection);
-     }
-   else
-     {
--      enumerator_next_async (data, FALSE);
-+      connection_attempt_unref (attempt);
-+      try_next_connection_or_finish (data, TRUE);
-       return;
-     }
- 
--  g_socket_client_tls_handshake (data);
-+  g_socket_client_tls_handshake (attempt);
-+}
-+
-+static void
-+complete_connection_with_error (GSocketClientAsyncConnectData *data,
-+                                GError                        *error)
-+{
-+  g_debug ("GSocketClient: Connection failed: %s", error->message);
-+  g_assert (!data->completed);
-+
-+  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
-+  data->completed = TRUE;
-+  cancel_all_attempts (data);
-+  g_task_return_error (data->task, error);
- }
- 
- static gboolean
-@@ -1577,15 +1622,114 @@ task_completed_or_cancelled (GSocketClientAsyncConnectData *data)
-     return TRUE;
-   else if (g_cancellable_set_error_if_cancelled (cancellable, &error))
-     {
--      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
--      g_task_return_error (task, g_steal_pointer (&error));
--      data->completed = TRUE;
-+      complete_connection_with_error (data, g_steal_pointer (&error));
-       return TRUE;
-     }
-   else
-     return FALSE;
- }
- 
-+static gboolean
-+try_next_successful_connection (GSocketClientAsyncConnectData *data)
-+{
-+  ConnectionAttempt *attempt;
-+  const gchar *protocol;
-+  GProxy *proxy;
-+
-+  if (data->connection_in_progress)
-+    return FALSE;
-+
-+  g_assert (data->successful_connections != NULL);
-+  attempt = data->successful_connections->data;
-+  g_assert (attempt != NULL);
-+  data->successful_connections = g_slist_remove (data->successful_connections, attempt);
-+  data->connection_in_progress = TRUE;
-+
-+  g_debug ("GSocketClient: Starting application layer connection");
-+
-+  if (!attempt->proxy_addr)
-+    {
-+      g_socket_client_tls_handshake (g_steal_pointer (&attempt));
-+      return TRUE;
-+    }
-+
-+  protocol = g_proxy_address_get_protocol (attempt->proxy_addr);
-+
-+  /* The connection should not be anything other than TCP,
-+   * but let's put a safety guard in case
-+   */
-+  if (!G_IS_TCP_CONNECTION (attempt->connection))
-+    {
-+      g_critical ("Trying to proxy over non-TCP connection, this is "
-+          "most likely a bug in GLib IO library.");
-+
-+      g_set_error_literal (&data->last_error,
-+          G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-+          _("Proxying over a non-TCP connection is not supported."));
-+    }
-+  else if (g_hash_table_contains (data->client->priv->app_proxies, protocol))
-+    {
-+      /* Simply complete the connection, we don't want to do TLS handshake
-+       * as the application proxy handling may need proxy handshake first */
-+      g_socket_client_async_connect_complete (g_steal_pointer (&attempt));
-+      return TRUE;
-+    }
-+  else if ((proxy = g_proxy_get_default_for_protocol (protocol)))
-+    {
-+      GIOStream *connection = attempt->connection;
-+      GProxyAddress *proxy_addr = attempt->proxy_addr;
-+
-+      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATING, data->connectable, attempt->connection);
-+      g_debug ("GSocketClient: Starting proxy connection");
-+      g_proxy_connect_async (proxy,
-+                             connection,
-+                             proxy_addr,
-+                             g_task_get_cancellable (data->task),
-+                             g_socket_client_proxy_connect_callback,
-+                             g_steal_pointer (&attempt));
-+      g_object_unref (proxy);
-+      return TRUE;
-+    }
-+  else
-+    {
-+      g_clear_error (&data->last_error);
-+
-+      g_set_error (&data->last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-+          _("Proxy protocol “%s” is not supported."),
-+          protocol);
-+    }
-+
-+  data->connection_in_progress = FALSE;
-+  g_clear_pointer (&attempt, connection_attempt_unref);
-+  return FALSE; /* All non-return paths are failures */
-+}
-+
-+static void
-+try_next_connection_or_finish (GSocketClientAsyncConnectData *data,
-+                               gboolean                       end_current_connection)
-+{
-+  if (end_current_connection)
-+    data->connection_in_progress = FALSE;
-+
-+  if (data->connection_in_progress)
-+    return;
-+
-+  /* Keep trying successful connections until one works, each iteration pops one */
-+  while (data->successful_connections)
-+    {
-+      if (try_next_successful_connection (data))
-+        return;
-+    }
-+
-+  if (!data->enumeration_completed)
-+    {
-+      enumerator_next_async (data, FALSE);
-+      return;
-+    }
-+
-+  complete_connection_with_error (data, data->last_error);
-+}
-+
- static void
- g_socket_client_connected_callback (GObject      *source,
- 				    GAsyncResult *result,
-@@ -1593,10 +1737,7 @@ g_socket_client_connected_callback (GObject      *source,
- {
-   ConnectionAttempt *attempt = user_data;
-   GSocketClientAsyncConnectData *data = attempt->data;
--  GSList *l;
-   GError *error = NULL;
--  GProxy *proxy;
--  const gchar *protocol;
- 
-   if (task_completed_or_cancelled (data) || g_cancellable_is_cancelled (attempt->cancellable))
-     {
-@@ -1618,11 +1759,12 @@ g_socket_client_connected_callback (GObject      *source,
-         {
-           clarify_connect_error (error, data->connectable, attempt->address);
-           set_last_error (data, error);
-+          g_debug ("GSocketClient: Connection attempt failed: %s", error->message);
-           connection_attempt_remove (attempt);
--          enumerator_next_async (data, FALSE);
-           connection_attempt_unref (attempt);
-+          try_next_connection_or_finish (data, FALSE);
-         }
--      else
-+      else /* Silently ignore cancelled attempts */
-         {
-           g_clear_error (&error);
-           g_object_unref (data->task);
-@@ -1632,74 +1774,21 @@ g_socket_client_connected_callback (GObject      *source,
-       return;
-     }
- 
--  data->socket = g_steal_pointer (&attempt->socket);
--  data->connection = g_steal_pointer (&attempt->connection);
--
--  for (l = data->connection_attempts; l; l = g_slist_next (l))
--    {
--      ConnectionAttempt *attempt_entry = l->data;
--      g_cancellable_cancel (attempt_entry->cancellable);
--      connection_attempt_unref (attempt_entry);
--    }
--  g_slist_free (data->connection_attempts);
--  data->connection_attempts = NULL;
--  connection_attempt_unref (attempt);
--
--  g_socket_connection_set_cached_remote_address ((GSocketConnection*)data->connection, NULL);
--  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTED, data->connectable, data->connection);
-+  g_socket_connection_set_cached_remote_address ((GSocketConnection*)attempt->connection, NULL);
-+  g_debug ("GSocketClient: TCP connection successful");
-+  g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTED, data->connectable, attempt->connection);
- 
-   /* wrong, but backward compatible */
--  g_socket_set_blocking (data->socket, TRUE);
-+  g_socket_set_blocking (attempt->socket, TRUE);
- 
--  if (!data->proxy_addr)
--    {
--      g_socket_client_tls_handshake (data);
--      return;
--    }
--
--  protocol = g_proxy_address_get_protocol (data->proxy_addr);
--
--  /* The connection should not be anything other than TCP,
--   * but let's put a safety guard in case
-+  /* This ends the parallel "happy eyeballs" portion of connecting.
-+     Now that we have a successful tcp connection we will attempt to connect
-+     at the TLS/Proxy layer. If those layers fail we will move on to the next
-+     connection.
-    */
--  if (!G_IS_TCP_CONNECTION (data->connection))
--    {
--      g_critical ("Trying to proxy over non-TCP connection, this is "
--          "most likely a bug in GLib IO library.");
--
--      g_set_error_literal (&data->last_error,
--          G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
--          _("Proxying over a non-TCP connection is not supported."));
--
--      enumerator_next_async (data, FALSE);
--    }
--  else if (g_hash_table_contains (data->client->priv->app_proxies, protocol))
--    {
--      /* Simply complete the connection, we don't want to do TLS handshake
--       * as the application proxy handling may need proxy handshake first */
--      g_socket_client_async_connect_complete (data);
--    }
--  else if ((proxy = g_proxy_get_default_for_protocol (protocol)))
--    {
--      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_PROXY_NEGOTIATING, data->connectable, data->connection);
--      g_proxy_connect_async (proxy,
--                             data->connection,
--                             data->proxy_addr,
--                             g_task_get_cancellable (data->task),
--                             g_socket_client_proxy_connect_callback,
--                             data);
--      g_object_unref (proxy);
--    }
--  else
--    {
--      g_clear_error (&data->last_error);
--
--      g_set_error (&data->last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
--          _("Proxy protocol “%s” is not supported."),
--          protocol);
--
--      enumerator_next_async (data, FALSE);
--    }
-+  connection_attempt_remove (attempt);
-+  data->successful_connections = g_slist_append (data->successful_connections, g_steal_pointer (&attempt));
-+  try_next_connection_or_finish (data, FALSE);
- }
- 
- static gboolean
-@@ -1707,7 +1796,11 @@ on_connection_attempt_timeout (gpointer data)
- {
-   ConnectionAttempt *attempt = data;
- 
--  enumerator_next_async (attempt->data, TRUE);
-+  if (!attempt->data->enumeration_completed)
-+    {
-+      g_debug ("GSocketClient: Timeout reached, trying another enumeration");
-+      enumerator_next_async (attempt->data, TRUE);
-+    }
- 
-   g_clear_pointer (&attempt->timeout_source, g_source_unref);
-   return G_SOURCE_REMOVE;
-@@ -1717,9 +1810,9 @@ static void
- on_connection_cancelled (GCancellable *cancellable,
-                          gpointer      data)
- {
--  GCancellable *attempt_cancellable = data;
-+  GCancellable *linked_cancellable = G_CANCELLABLE (data);
- 
--  g_cancellable_cancel (attempt_cancellable);
-+  g_cancellable_cancel (linked_cancellable);
- }
- 
- static void
-@@ -1743,39 +1836,49 @@ g_socket_client_enumerator_callback (GObject      *object,
- 						     result, &error);
-   if (address == NULL)
-     {
--      if (data->connection_attempts)
-+      if (G_UNLIKELY (data->enumeration_completed))
-+        return;
-+
-+      data->enumeration_completed = TRUE;
-+      g_debug ("GSocketClient: Address enumeration completed (out of addresses)");
-+
-+      /* As per API docs: We only care about error if its the first call,
-+         after that the enumerator is done.
-+
-+         Note that we don't care about cancellation errors because
-+         task_completed_or_cancelled() above should handle that.
-+
-+         If this fails and nothing is in progress then we will complete task here.
-+       */
-+      if ((data->enumerated_at_least_once && !data->connection_attempts && !data->connection_in_progress) ||
-+          !data->enumerated_at_least_once)
-         {
--          g_object_unref (data->task);
--          return;
-+          g_debug ("GSocketClient: Address enumeration failed: %s", error ? error->message : NULL);
-+          if (data->last_error)
-+            {
-+              g_clear_error (&error);
-+              error = data->last_error;
-+              data->last_error = NULL;
-+            }
-+          else if (!error)
-+            {
-+              g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                _("Unknown error on connect"));
-+            }
-+
-+          complete_connection_with_error (data, error);
-         }
- 
--      g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
--      data->completed = TRUE;
--      if (!error)
--	{
--	  if (data->last_error)
--	    {
--	      error = data->last_error;
--	      data->last_error = NULL;
--	    }
--	  else
--	    {
--	      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
--				   _("Unknown error on connect"));
--	    }
--	}
--      g_task_return_error (data->task, error);
-+      /* Enumeration should never trigger again, drop our ref */
-       g_object_unref (data->task);
-       return;
-     }
- 
-+  data->enumerated_at_least_once = TRUE;
-+  g_debug ("GSocketClient: Address enumeration succeeded");
-   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_RESOLVED,
- 			      data->connectable, NULL);
- 
--  if (G_IS_PROXY_ADDRESS (address) &&
--      data->client->priv->enable_proxy)
--    data->proxy_addr = g_object_ref (G_PROXY_ADDRESS (address));
--
-   g_clear_error (&data->last_error);
- 
-   socket = create_socket (data->client, address, &data->last_error);
-@@ -1793,6 +1896,10 @@ g_socket_client_enumerator_callback (GObject      *object,
-   attempt->cancellable = g_cancellable_new ();
-   attempt->connection = (GIOStream *)g_socket_connection_factory_create_connection (socket);
-   attempt->timeout_source = g_timeout_source_new (HAPPY_EYEBALLS_CONNECTION_ATTEMPT_TIMEOUT_MS);
-+
-+  if (G_IS_PROXY_ADDRESS (address) && data->client->priv->enable_proxy)
-+    attempt->proxy_addr = g_object_ref (G_PROXY_ADDRESS (address));
-+
-   g_source_set_callback (attempt->timeout_source, on_connection_attempt_timeout, attempt, NULL);
-   g_source_attach (attempt->timeout_source, g_task_get_context (data->task));
-   data->connection_attempts = g_slist_append (data->connection_attempts, attempt);
-@@ -1802,6 +1909,7 @@ g_socket_client_enumerator_callback (GObject      *object,
-                            g_object_ref (attempt->cancellable), g_object_unref);
- 
-   g_socket_connection_set_cached_remote_address ((GSocketConnection *)attempt->connection, address);
-+  g_debug ("GSocketClient: Starting TCP connection attempt");
-   g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_CONNECTING, data->connectable, attempt->connection);
-   g_socket_connection_connect_async (G_SOCKET_CONNECTION (attempt->connection),
- 				     address,
-@@ -1854,24 +1962,48 @@ g_socket_client_connect_async (GSocketClient       *client,
-   else
-     data->enumerator = g_socket_connectable_enumerate (connectable);
- 
--  /* The flow and ownership here isn't quite obvious:
--    - The task starts an async attempt to connect.
--      - Each attempt holds a single ref on task.
--      - Each attempt may create new attempts by timing out (not a failure) so
--        there are multiple attempts happening in parallel.
--      - Upon failure an attempt will start a new attempt that steals its ref
--        until there are no more attempts left and it drops its ref.
--      - Upon success it will cancel all other attempts and continue on
--        to the rest of the connection (tls, proxies, etc) which do not
--        happen in parallel and at the very end drop its ref.
--      - Upon cancellation an attempt drops its ref.
--   */
-+  /* This function tries to match the behavior of g_socket_client_connect ()
-+     which is simple enough but much of it is done in parallel to be as responsive
-+     as possible as per Happy Eyeballs (RFC 8305). This complicates flow quite a
-+     bit but we can describe it in 3 sections:
-+
-+     Firstly we have address enumeration (DNS):
-+       - This may be triggered multiple times by enumerator_next_async().
-+       - It also has its own cancellable (data->enumeration_cancellable).
-+       - Enumeration is done lazily because GNetworkAddressAddressEnumerator
-+         also does work in parallel and may lazily add new addresses.
-+       - If the first enumeration errors then the task errors. Otherwise all enumerations
-+         will potentially be used (until task or enumeration is cancelled).
-+
-+      Then we start attempting connections (TCP):
-+        - Each connection is independent and kept in a ConnectionAttempt object.
-+          - They each hold a ref on the main task and have their own cancellable.
-+        - Multiple attempts may happen in parallel as per Happy Eyeballs.
-+        - Upon failure or timeouts more connection attempts are made.
-+          - If no connections succeed the task errors.
-+        - Upon success they are kept in a list of successful connections.
-+
-+      Lastly we connect at the application layer (TLS, Proxies):
-+        - These are done in serial.
-+          - The reasoning here is that Happy Eyeballs is about making bad connections responsive
-+            at the IP/TCP layers. Issues at the application layer are generally not due to
-+            connectivity issues but rather misconfiguration.
-+        - Upon failure it will try the next TCP connection until it runs out and
-+          the task errors.
-+        - Upon success it cancels everything remaining (enumeration and connections)
-+          and returns the connection.
-+  */
- 
-   data->task = g_task_new (client, cancellable, callback, user_data);
-   g_task_set_check_cancellable (data->task, FALSE); /* We handle this manually */
-   g_task_set_source_tag (data->task, g_socket_client_connect_async);
-   g_task_set_task_data (data->task, data, (GDestroyNotify)g_socket_client_async_connect_data_free);
- 
-+  data->enumeration_cancellable = g_cancellable_new ();
-+  if (cancellable)
-+    g_cancellable_connect (cancellable, G_CALLBACK (on_connection_cancelled),
-+                           g_object_ref (data->enumeration_cancellable), g_object_unref);
-+
-   enumerator_next_async (data, FALSE);
- }
- 
-@@ -1990,6 +2122,7 @@ g_socket_client_connect_to_uri_async (GSocketClient        *client,
-     }
-   else
-     {
-+      g_debug("g_socket_client_connect_to_uri_async");
-       g_socket_client_connect_async (client,
- 				     connectable, cancellable,
- 				     callback, user_data);
--- 
-2.24.1
-

diff --git a/dev-libs/glib/glib-2.60.7-r2.ebuild b/dev-libs/glib/glib-2.60.7-r2.ebuild
deleted file mode 100644
index 2324497e275..00000000000
--- a/dev-libs/glib/glib-2.60.7-r2.ebuild
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson multilib multilib-minimal python-any-r1 toolchain-funcs xdg
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
-
-# * libelf isn't strictly necessary, but makes gresource tool more useful, and
-# the check is automagic in gio/meson.build. gresource is not a multilib tool
-# right now, thus it doesn't matter if non-native ABI libelf exists or not
-# (non-native binary is overwritten, it doesn't matter if libelf was linked to).
-# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
-# these are used by GIO, which glib[static-libs] consumers don't really seem
-# to need at all, thus not imposing the deps for now and once some consumers
-# are actually found to static link libgio-2.0.a, we can revisit and either add
-# them or just put the (build) deps in that rare consumer instead of recursive
-# RDEPEND here (due to lack of recursive DEPEND).
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
-	>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
-	virtual/libelf:0=
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-# libxml2 used for optional tests that get automatically skipped
-BDEPEND="
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	>=sys-devel/gettext-0.19.8
-	gtk-doc? ( >=dev-util/gtk-doc-1.20
-		app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5 )
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? ( >=sys-apps/dbus-1.2.14 )
-	virtual/pkgconfig[${MULTILIB_USEDEP}]
-"
-# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
-
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}"/${PV}-gdbus-fixes.patch #700538, included in 2.62.3+
-	eapply "${FILESDIR}"/CVE-2020-6750.patch
-
-	if use test; then
-		# TODO: Review the test exclusions, especially now with meson
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-		#	ewarn "Some tests will be skipped due to missing terminal program"
-		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
-		# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
-		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		# desktop-app-info/launch* might fail similarly
-		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
-		#fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/meson.build || die
-
-		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
-		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
-	fi
-
-	# Don't build fuzzing binaries - not used
-	sed -i -e '/subdir.*fuzzing/d' meson.build || die
-
-	# gdbus-codegen is a separate package
-	sed -i -e 's/install.*true/install : false/g' gio/gdbus-2.0/codegen/meson.build || die
-	# Older than meson-0.50 doesn't know about install kwarg for configure_file; for that we need to remove the install_dir kwarg.
-	# Upstream will remove the install kwarg in a future version to require only meson-0.49.2 or newer, at which point the
-	# install_dir removal only should be kept.
-	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
-
-	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
-	sed -i -e '/install_dir/d' gio/tests/meson.build || die
-
-	cat > "${T}/glib-test-ld-wrapper" <<-EOF
-		#!/usr/bin/env sh
-		exec \${LD:-ld} "\$@"
-	EOF
-	chmod a+x "${T}/glib-test-ld-wrapper" || die
-	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
-
-	xdg_src_prepare
-	gnome2_environment_reset
-	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
-}
-
-multilib_src_configure() {
-	if use debug; then
-		append-cflags -DG_ENABLE_DEBUG
-	else
-		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
-	fi
-
-	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
-	#if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
-		#case ${CHOST} in
-		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		#*)            export glib_cv_stack_grows=no ;;
-		#esac
-	#fi
-
-	local emesonargs=(
-		-Ddefault_library=$(usex static-libs both shared)
-		$(meson_feature selinux)
-		$(meson_use xattr)
-		-Dlibmount=true # only used if host_system == 'linux'
-		-Dinternal_pcre=false
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		-Dgtk_doc=$(multilib_native_usex gtk-doc true false)
-		$(meson_use fam)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-	)
-	meson_src_configure
-}
-
-multilib_src_compile() {
-	meson_src_compile
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	meson_src_test --timeout-multiplier 2 --no-suite flaky
-}
-
-multilib_src_install() {
-	meson_src_install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	# These are installed by dev-util/glib-utils
-	# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit now with meson
-	rm "${ED}/usr/bin/glib-genmarshal" || die
-	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}/usr/bin/glib-mkenums" || die
-	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}/usr/bin/gtester-report" || die
-	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
-	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
-	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"${cache} || die
-		else
-			touch "${ED}"${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	# glib installs no schemas itself, but we force update for fresh install in case
-	# something has dropped in a schemas file without direct glib dep; and for upgrades
-	# in case the compiled schema format could have changed
-	gnome2_schemas_update
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_schemas_update
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2021-08-05  1:56 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2021-08-05  1:56 UTC (permalink / raw
  To: gentoo-commits

commit:     99996faf6804d281f7a543541d4007919baa82be
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  5 01:54:15 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug  5 01:54:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99996faf

dev-libs/glib: fix build with glibc-2.34

Closes: https://bugs.gentoo.org/803632
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/glib-2.68.3-glibc-2.34-close_range.patch | 32 ++++++++++++++++++++++
 dev-libs/glib/glib-2.68.3-r1.ebuild                |  1 +
 2 files changed, 33 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch b/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch
new file mode 100644
index 00000000000..a84ccaaccbb
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/803632
+https://gitlab.gnome.org/GNOME/glib/-/commit/63e7864d1a0ddbead3c18872e95116e3843e81be.patch
+
+From 6e59d21b273f026e82adc56fecbec67d1ffa72a4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 8 Jul 2021 17:26:43 -0700
+Subject: [PATCH] correctly use 3 parameters for close_range
+
+libc implementation has 3 parameter e.g.
+https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2&format=html
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ glib/gspawn.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glib/gspawn.c b/glib/gspawn.c
+index 95f5b868e..a15fb1ca1 100644
+--- a/glib/gspawn.c
++++ b/glib/gspawn.c
+@@ -1494,7 +1494,7 @@ safe_closefrom (int lowfd)
+    *
+    * Handle ENOSYS in case it’s supported in libc but not the kernel; if so,
+    * fall back to safe_fdwalk(). */
+-  if (close_range (lowfd, G_MAXUINT) != 0 && errno == ENOSYS)
++  if (close_range (lowfd, G_MAXUINT, 0) != 0 && errno == ENOSYS)
+ #endif  /* HAVE_CLOSE_RANGE */
+   (void) safe_fdwalk (close_func, GINT_TO_POINTER (lowfd));
+ #endif
+-- 
+GitLab
+

diff --git a/dev-libs/glib/glib-2.68.3-r1.ebuild b/dev-libs/glib/glib-2.68.3-r1.ebuild
index 4491252a2ce..ff067ae12a1 100644
--- a/dev-libs/glib/glib-2.68.3-r1.ebuild
+++ b/dev-libs/glib/glib-2.68.3-r1.ebuild
@@ -69,6 +69,7 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+	"${FILESDIR}"/${PN}-2.68.3-glibc-2.34-close_range.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2021-12-11 13:34 Mart Raudsepp
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2021-12-11 13:34 UTC (permalink / raw
  To: gentoo-commits

commit:     8e556ece9500f36e9701763eee9cc91826f0b5a8
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 11 12:59:05 2021 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Dec 11 13:27:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e556ece

dev-libs/glib: remove old

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/glib/Manifest                             |   2 -
 .../files/glib-2.68.3-glibc-2.34-close_range.patch |  32 ---
 dev-libs/glib/glib-2.68.2-r1.ebuild                | 283 --------------------
 dev-libs/glib/glib-2.68.3-r1.ebuild                | 284 ---------------------
 4 files changed, 601 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index f1ab05cc8156..509ef67232b3 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,4 +1,2 @@
-DIST glib-2.68.2.tar.xz 4944192 BLAKE2B d35489dcfe9d57d8bd6ecf4f893b7c8e93a5b8108765791071fc811598d1f41287e03d95f20591d50d51a78db34f11833cc7970b1bf29299385357a14977ba0b SHA512 74d481552629cab67d22f8a440a7263a4e4b83adb6f3b772d368e255c17321b206aafd3af4653e5efbb2c3c14ca67d35f453728cbc5cd68728275d0b56789019
-DIST glib-2.68.3.tar.xz 4945236 BLAKE2B 6086b7490f418cb98119ab25670766e3a84de81fd180dbc6e8f929d8f8ab748b0ae7ad6a85f5419ab3c00589c3afba95972d8b4541b310acdf6b6dc9b460a07d SHA512 fb120105c4cb582491a53a0e4c61fe4bdd1f94b279bb7c362afd591369ede50a196c706375564ededf3550d4062a285b038e20b605e6d5dfe36f5d208f4bad3f
 DIST glib-2.68.4.tar.xz 4945212 BLAKE2B 2135e2bea778714494b9f3ef140f20639f95dd347c9025e5663ca8f493092cd2723aba6520bb4f85687491794353685eccacc4dd34339962e5cb717e6130c025 SHA512 be17d79b41d17fd2b144184d6e793180667b7d9ba299215ea6d4948b4c05f6d888b4868c48643e25935a34ee2f85ee1d03e53325151b7a61819437cbd3c84b10
 DIST glib-2.70.0.tar.xz 4796812 BLAKE2B de393961c8c2b98fadc1cc0a3647de4fb9d54193e000005c847468e48baa30abcc518d94e1aaa69e09414ee0218c5502f872e08818bcc404aa0c61f94fe2c156 SHA512 fd3fcaebd34aebe0e63f9dc915b2df026a3f88a5c2254e9f17beea0a59ab0ac563976fca54eb57bd2f7af183c4ae76fb86f05951216bf4159d258b5e7b29696f

diff --git a/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch b/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch
deleted file mode 100644
index a84ccaaccbb9..000000000000
--- a/dev-libs/glib/files/glib-2.68.3-glibc-2.34-close_range.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://bugs.gentoo.org/803632
-https://gitlab.gnome.org/GNOME/glib/-/commit/63e7864d1a0ddbead3c18872e95116e3843e81be.patch
-
-From 6e59d21b273f026e82adc56fecbec67d1ffa72a4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 8 Jul 2021 17:26:43 -0700
-Subject: [PATCH] correctly use 3 parameters for close_range
-
-libc implementation has 3 parameter e.g.
-https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2&format=html
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- glib/gspawn.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/glib/gspawn.c b/glib/gspawn.c
-index 95f5b868e..a15fb1ca1 100644
---- a/glib/gspawn.c
-+++ b/glib/gspawn.c
-@@ -1494,7 +1494,7 @@ safe_closefrom (int lowfd)
-    *
-    * Handle ENOSYS in case it’s supported in libc but not the kernel; if so,
-    * fall back to safe_fdwalk(). */
--  if (close_range (lowfd, G_MAXUINT) != 0 && errno == ENOSYS)
-+  if (close_range (lowfd, G_MAXUINT, 0) != 0 && errno == ENOSYS)
- #endif  /* HAVE_CLOSE_RANGE */
-   (void) safe_fdwalk (close_func, GINT_TO_POINTER (lowfd));
- #endif
--- 
-GitLab
-

diff --git a/dev-libs/glib/glib-2.68.2-r1.ebuild b/dev-libs/glib/glib-2.68.2-r1.ebuild
deleted file mode 100644
index aa1479e53d82..000000000000
--- a/dev-libs/glib/glib-2.68.2-r1.ebuild
+++ /dev/null
@@ -1,283 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug +elf elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs sysprof systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-# * elfutils (via libelf) does not build on Windows. gresources are not embedded
-# within ELF binaries on that platform anyway and inspecting ELF binaries from
-# other platforms is not that useful so exclude the dependency in this case.
-# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
-# these are used by GIO, which glib[static-libs] consumers don't really seem
-# to need at all, thus not imposing the deps for now and once some consumers
-# are actually found to static link libgio-2.0.a, we can revisit and either add
-# them or just put the (build) deps in that rare consumer instead of recursive
-# RDEPEND here (due to lack of recursive DEPEND).
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
-	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
-	!kernel_Winnt? ( virtual/libelf:0= )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-# libxml2 used for optional tests that get automatically skipped
-BDEPEND="
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	>=sys-devel/gettext-0.19.8
-	gtk-doc? ( >=dev-util/gtk-doc-1.33
-		app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5 )
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? ( >=sys-apps/dbus-1.2.14 )
-	virtual/pkgconfig
-"
-# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
-
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	if use test; then
-		# TODO: Review the test exclusions, especially now with meson
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-		#	ewarn "Some tests will be skipped due to missing terminal program"
-		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
-		# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
-		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		# desktop-app-info/launch* might fail similarly
-		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
-		#fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/meson.build || die
-
-		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
-		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
-	fi
-
-	# Don't build fuzzing binaries - not used
-	sed -i -e '/subdir.*fuzzing/d' meson.build || die
-
-	# gdbus-codegen is a separate package
-	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
-
-	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
-	sed -i -e '/install_dir/d' gio/tests/meson.build || die
-
-	cat > "${T}/glib-test-ld-wrapper" <<-EOF
-		#!/usr/bin/env sh
-		exec \${LD:-ld} "\$@"
-	EOF
-	chmod a+x "${T}/glib-test-ld-wrapper" || die
-	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
-
-	xdg_src_prepare
-	gnome2_environment_reset
-	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
-}
-
-multilib_src_configure() {
-	if use debug; then
-		append-cflags -DG_ENABLE_DEBUG
-	else
-		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
-	fi
-
-	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
-	#if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
-		#case ${CHOST} in
-		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		#*)            export glib_cv_stack_grows=no ;;
-		#esac
-	#fi
-
-	local emesonargs=(
-		-Ddefault_library=$(usex static-libs both shared)
-		$(meson_feature selinux)
-		$(meson_use xattr)
-		-Dlibmount=enabled # only used if host_system == 'linux'
-		-Dinternal_pcre=false
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		$(meson_feature sysprof)
-		$(meson_native_use_bool gtk-doc gtk_doc)
-		$(meson_use fam)
-		$(meson_use test tests)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-		$(meson_native_use_feature elf libelf)
-	)
-	meson_src_configure
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	meson_src_test --timeout-multiplier 2 --no-suite flaky
-}
-
-multilib_src_install() {
-	meson_src_install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	# These are installed by dev-util/glib-utils
-	# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit now with meson
-	rm "${ED}/usr/bin/glib-genmarshal" || die
-	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}/usr/bin/glib-mkenums" || die
-	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}/usr/bin/gtester-report" || die
-	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
-	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
-	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"${cache} || die
-		else
-			touch "${ED}"${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	# glib installs no schemas itself, but we force update for fresh install in case
-	# something has dropped in a schemas file without direct glib dep; and for upgrades
-	# in case the compiled schema format could have changed
-	gnome2_schemas_update
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ver_test "$v" "-lt" "2.63.6"; then
-			ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
-			ewarn "to restart your session for \"Open With\" dialogs to work."
-		fi
-	done
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_schemas_update
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}

diff --git a/dev-libs/glib/glib-2.68.3-r1.ebuild b/dev-libs/glib/glib-2.68.3-r1.ebuild
deleted file mode 100644
index 1ac19210fd64..000000000000
--- a/dev-libs/glib/glib-2.68.3-r1.ebuild
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
-
-DESCRIPTION="The GLib library of C routines"
-HOMEPAGE="https://www.gtk.org/"
-
-LICENSE="LGPL-2.1+"
-SLOT="2"
-IUSE="dbus debug +elf elibc_glibc fam gtk-doc kernel_linux +mime selinux static-libs sysprof systemtap test utils xattr"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-# * elfutils (via libelf) does not build on Windows. gresources are not embedded
-# within ELF binaries on that platform anyway and inspecting ELF binaries from
-# other platforms is not that useful so exclude the dependency in this case.
-# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
-# these are used by GIO, which glib[static-libs] consumers don't really seem
-# to need at all, thus not imposing the deps for now and once some consumers
-# are actually found to static link libgio-2.0.a, we can revisit and either add
-# them or just put the (build) deps in that rare consumer instead of recursive
-# RDEPEND here (due to lack of recursive DEPEND).
-RDEPEND="
-	!<dev-util/gdbus-codegen-${PV}
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
-	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
-	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
-	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
-	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
-	elf? ( virtual/libelf:0= )
-	fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
-	sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-# libxml2 used for optional tests that get automatically skipped
-BDEPEND="
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	>=sys-devel/gettext-0.19.8
-	gtk-doc? ( >=dev-util/gtk-doc-1.33
-		app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5 )
-	systemtap? ( >=dev-util/systemtap-1.3 )
-	${PYTHON_DEPS}
-	test? ( >=sys-apps/dbus-1.2.14 )
-	virtual/pkgconfig
-"
-# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
-
-PDEPEND="
-	dbus? ( gnome-base/dconf )
-	mime? ( x11-misc/shared-mime-info )
-"
-# shared-mime-info needed for gio/xdgmime, bug #409481
-# dconf is needed to be able to save settings, bug #498436
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gio-querymodules$(get_exeext)
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
-	"${FILESDIR}"/${PN}-2.68.3-glibc-2.34-close_range.patch
-)
-
-pkg_setup() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~INOTIFY_USER"
-		if use test ; then
-			CONFIG_CHECK="~IPV6"
-			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
-		fi
-		linux-info_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	if use test; then
-		# TODO: Review the test exclusions, especially now with meson
-		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
-		if ! has_version dev-util/desktop-file-utils ; then
-			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
-			ewarn "think on installing it to get these tests run."
-			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
-			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
-		fi
-
-		# gdesktopappinfo requires existing terminal (gnome-terminal or any
-		# other), falling back to xterm if one doesn't exist
-		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
-		#	ewarn "Some tests will be skipped due to missing terminal program"
-		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
-		# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
-		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
-		# desktop-app-info/launch* might fail similarly
-		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
-		#fi
-
-		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
-		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
-		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
-
-		ewarn "Tests for search-utils have been skipped"
-		sed -i -e "/search-utils/d" glib/tests/meson.build || die
-
-		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
-		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
-	else
-		# Don't build tests, also prevents extra deps, bug #512022
-		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
-	fi
-
-	# Don't build fuzzing binaries - not used
-	sed -i -e '/subdir.*fuzzing/d' meson.build || die
-
-	# gdbus-codegen is a separate package
-	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
-
-	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
-	sed -i -e '/install_dir/d' gio/tests/meson.build || die
-
-	cat > "${T}/glib-test-ld-wrapper" <<-EOF
-		#!/usr/bin/env sh
-		exec \${LD:-ld} "\$@"
-	EOF
-	chmod a+x "${T}/glib-test-ld-wrapper" || die
-	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
-
-	xdg_src_prepare
-	gnome2_environment_reset
-	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
-}
-
-multilib_src_configure() {
-	if use debug; then
-		append-cflags -DG_ENABLE_DEBUG
-	else
-		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
-	fi
-
-	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
-	#if tc-is-cross-compiler ; then
-		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
-		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
-		#case ${CHOST} in
-		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
-		#*)            export glib_cv_stack_grows=no ;;
-		#esac
-	#fi
-
-	local emesonargs=(
-		-Ddefault_library=$(usex static-libs both shared)
-		$(meson_feature selinux)
-		$(meson_use xattr)
-		-Dlibmount=enabled # only used if host_system == 'linux'
-		-Dinternal_pcre=false
-		-Dman=true
-		$(meson_use systemtap dtrace)
-		$(meson_use systemtap)
-		$(meson_feature sysprof)
-		$(meson_native_use_bool gtk-doc gtk_doc)
-		$(meson_use fam)
-		$(meson_use test tests)
-		-Dinstalled_tests=false
-		-Dnls=enabled
-		-Doss_fuzz=disabled
-		$(meson_native_use_feature elf libelf)
-	)
-	meson_src_configure
-}
-
-multilib_src_test() {
-	export XDG_CONFIG_DIRS=/etc/xdg
-	export XDG_DATA_DIRS=/usr/local/share:/usr/share
-	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
-	export LC_TIME=C # bug #411967
-	unset GSETTINGS_BACKEND # bug #596380
-	python_setup
-
-	# Related test is a bit nitpicking
-	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
-
-	meson_src_test --timeout-multiplier 2 --no-suite flaky
-}
-
-multilib_src_install() {
-	meson_src_install
-	keepdir /usr/$(get_libdir)/gio/modules
-}
-
-multilib_src_install_all() {
-	# These are installed by dev-util/glib-utils
-	# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit now with meson
-	rm "${ED}/usr/bin/glib-genmarshal" || die
-	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
-	rm "${ED}/usr/bin/glib-mkenums" || die
-	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
-	rm "${ED}/usr/bin/gtester-report" || die
-	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
-	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
-	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-
-	# Make gschemas.compiled belong to glib alone
-	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
-
-	if [[ -e ${EROOT}${cache} ]]; then
-		cp "${EROOT}"${cache} "${ED}"/${cache} || die
-	else
-		touch "${ED}"${cache} || die
-	fi
-
-	multilib_pkg_preinst() {
-		# Make giomodule.cache belong to glib alone
-		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
-
-		if [[ -e ${EROOT}${cache} ]]; then
-			cp "${EROOT}"${cache} "${ED}"${cache} || die
-		else
-			touch "${ED}"${cache} || die
-		fi
-	}
-
-	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
-	# file due to inability to create it and GIO might not look at any of the modules there
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_preinst
-	fi
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	# glib installs no schemas itself, but we force update for fresh install in case
-	# something has dropped in a schemas file without direct glib dep; and for upgrades
-	# in case the compiled schema format could have changed
-	gnome2_schemas_update
-
-	multilib_pkg_postinst() {
-		gnome2_giomodule_cache_update \
-			|| die "Update GIO modules cache failed (for ${ABI})"
-	}
-	if ! tc-is-cross-compiler ; then
-		multilib_foreach_abi multilib_pkg_postinst
-	else
-		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
-		ewarn "You might want to run gio-querymodules manually on the target for"
-		ewarn "your final image for performance reasons and re-run it when packages"
-		ewarn "installing GIO modules get upgraded or added to the image."
-	fi
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ver_test "$v" "-lt" "2.63.6"; then
-			ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
-			ewarn "to restart your session for \"Open With\" dialogs to work."
-		fi
-	done
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_schemas_update
-
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
-		multilib_pkg_postrm() {
-			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
-		}
-		multilib_foreach_abi multilib_pkg_postrm
-		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2022-09-27 18:17 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-09-27 18:17 UTC (permalink / raw
  To: gentoo-commits

commit:     0a9a261cfe28fd20a512dfeb705b9fb4a5b3dbc2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 27 18:16:09 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 18:16:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a9a261c

dev-libs/glib: backport crash fix

As requested by e.g. GIMP maintainers
at https://twitter.com/zemarmot/status/1574362564015841281.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../glib/files/glib-2.74.0-crash-gparamspec.patch  |  27 ++
 dev-libs/glib/glib-2.74.0-r1.ebuild                | 289 +++++++++++++++++++++
 2 files changed, 316 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch b/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch
new file mode 100644
index 000000000000..84edcde4189d
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch
@@ -0,0 +1,27 @@
+https://gitlab.gnome.org/GNOME/glib/-/commit/ea3f17d598d550345e94e4571130e429443e91cb
+https://gitlab.gnome.org/GNOME/glib/-/issues/2770
+
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Sun, 25 Sep 2022 14:20:24 +0100
+Subject: [PATCH] Empty values are not valid GParamSpec
+
+The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
+which means the is_valid() vfunc should do the same.
+
+This avoids a segfault when calling g_param_value_is_valid() on a
+GParamSpecParam.
+
+Fixes: #2770
+--- a/gobject/gparamspecs.c
++++ b/gobject/gparamspecs.c
+@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
+ {
+   GParamSpec *param = value->data[0].v_pointer;
+ 
++  if (param == NULL)
++    return FALSE;
++
+   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
+ }
+ 
+GitLab

diff --git a/dev-libs/glib/glib-2.74.0-r1.ebuild b/dev-libs/glib/glib-2.74.0-r1.ebuild
new file mode 100644
index 000000000000..9c91688a8c0a
--- /dev/null
+++ b/dev-libs/glib/glib-2.74.0-r1.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+IUSE="dbus debug +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# * elfutils (via libelf) does not build on Windows. gresources are not embedded
+# within ELF binaries on that platform anyway and inspecting ELF binaries from
+# other platforms is not that useful so exclude the dependency in this case.
+# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
+# these are used by GIO, which glib[static-libs] consumers don't really seem
+# to need at all, thus not imposing the deps for now and once some consumers
+# are actually found to static link libgio-2.0.a, we can revisit and either add
+# them or just put the (build) deps in that rare consumer instead of recursive
+# RDEPEND here (due to lack of recursive DEPEND).
+RDEPEND="
+	!<dev-util/gdbus-codegen-${PV}
+	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},static-libs?]
+	>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
+	selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+	xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
+	elf? ( virtual/libelf:0= )
+	sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+# libxml2 used for optional tests that get automatically skipped
+BDEPEND="
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	>=sys-devel/gettext-0.19.8
+	gtk-doc? ( >=dev-util/gtk-doc-1.33
+		app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5 )
+	systemtap? ( >=dev-util/systemtap-1.3 )
+	${PYTHON_DEPS}
+	test? ( >=sys-apps/dbus-1.2.14 )
+	virtual/pkgconfig
+"
+# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
+
+PDEPEND="
+	dbus? ( gnome-base/dconf )
+	mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/gio-querymodules$(get_exeext)
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+	"${FILESDIR}"/${P}-clang-build.patch
+	"${FILESDIR}"/${P}-crash-gparamspec.patch
+)
+
+pkg_setup() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~INOTIFY_USER"
+		if use test ; then
+			CONFIG_CHECK="~IPV6"
+			WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+		fi
+		linux-info_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	if use test; then
+		# TODO: Review the test exclusions, especially now with meson
+		# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+		if ! has_version dev-util/desktop-file-utils ; then
+			ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+			ewarn "think on installing it to get these tests run."
+			sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+			sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+		fi
+
+		# gdesktopappinfo requires existing terminal (gnome-terminal or any
+		# other), falling back to xterm if one doesn't exist
+		#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+		#	ewarn "Some tests will be skipped due to missing terminal program"
+		# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
+		# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
+		sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+		# desktop-app-info/launch* might fail similarly
+		sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
+		#fi
+
+		# https://bugzilla.gnome.org/show_bug.cgi?id=722604
+		sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+		sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+		ewarn "Tests for search-utils have been skipped"
+		sed -i -e "/search-utils/d" glib/tests/meson.build || die
+
+		# Play nice with network-sandbox, but this approach would defeat the purpose of the test
+		#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
+	else
+		# Don't build tests, also prevents extra deps, bug #512022
+		sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
+	fi
+
+	# Don't build fuzzing binaries - not used
+	sed -i -e '/subdir.*fuzzing/d' meson.build || die
+
+	# gdbus-codegen is a separate package
+	sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
+
+	# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
+	sed -i -e '/install_dir/d' gio/tests/meson.build || die
+
+	cat > "${T}/glib-test-ld-wrapper" <<-EOF
+		#!/usr/bin/env sh
+		exec \${LD:-ld} "\$@"
+	EOF
+	chmod a+x "${T}/glib-test-ld-wrapper" || die
+	sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
+
+	default
+	gnome2_environment_reset
+	# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
+}
+
+multilib_src_configure() {
+	if use debug; then
+		append-cflags -DG_ENABLE_DEBUG
+	else
+		append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
+	fi
+
+	# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
+	#if tc-is-cross-compiler ; then
+		# https://bugzilla.gnome.org/show_bug.cgi?id=756473
+		# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
+		#case ${CHOST} in
+		#hppa*|metag*) export glib_cv_stack_grows=yes ;;
+		#*)            export glib_cv_stack_grows=no ;;
+		#esac
+	#fi
+
+	local emesonargs=(
+		-Ddefault_library=$(usex static-libs both shared)
+		$(meson_feature selinux)
+		$(meson_use xattr)
+		-Dlibmount=enabled # only used if host_system == 'linux'
+		-Dman=true
+		$(meson_use systemtap dtrace)
+		$(meson_use systemtap)
+		$(meson_feature sysprof)
+		$(meson_native_use_bool gtk-doc gtk_doc)
+		$(meson_use test tests)
+		-Dinstalled_tests=false
+		-Dnls=enabled
+		-Doss_fuzz=disabled
+		$(meson_native_use_feature elf libelf)
+		-Dmultiarch=false
+	)
+	meson_src_configure
+}
+
+multilib_src_test() {
+	export XDG_CONFIG_DIRS=/etc/xdg
+	export XDG_DATA_DIRS=/usr/local/share:/usr/share
+	export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+	export LC_TIME=C # bug #411967
+	export TZ=UTC
+	unset GSETTINGS_BACKEND # bug #596380
+	python_setup
+
+	# https://bugs.gentoo.org/839807
+	local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+	addpredict /usr/b
+
+	# Related test is a bit nitpicking
+	mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+	chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
+
+	meson_src_test --timeout-multiplier 2 --no-suite flaky
+}
+
+multilib_src_install() {
+	meson_src_install
+	keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+	# These are installed by dev-util/glib-utils
+	# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit now with meson
+	rm "${ED}/usr/bin/glib-genmarshal" || die
+	rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
+	rm "${ED}/usr/bin/glib-mkenums" || die
+	rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
+	rm "${ED}/usr/bin/gtester-report" || die
+	rm "${ED}/usr/share/man/man1/gtester-report.1" || die
+	# gdbus-codegen manpage installed by dev-util/gdbus-codegen
+	rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+
+	# Make gschemas.compiled belong to glib alone
+	local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
+
+	if [[ -e ${EROOT}${cache} ]]; then
+		cp "${EROOT}"${cache} "${ED}"/${cache} || die
+	else
+		touch "${ED}"${cache} || die
+	fi
+
+	multilib_pkg_preinst() {
+		# Make giomodule.cache belong to glib alone
+		local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+		if [[ -e ${EROOT}${cache} ]]; then
+			cp "${EROOT}"${cache} "${ED}"${cache} || die
+		else
+			touch "${ED}"${cache} || die
+		fi
+	}
+
+	# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+	# file due to inability to create it and GIO might not look at any of the modules there
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_preinst
+	fi
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	# glib installs no schemas itself, but we force update for fresh install in case
+	# something has dropped in a schemas file without direct glib dep; and for upgrades
+	# in case the compiled schema format could have changed
+	gnome2_schemas_update
+
+	multilib_pkg_postinst() {
+		gnome2_giomodule_cache_update \
+			|| die "Update GIO modules cache failed (for ${ABI})"
+	}
+	if ! tc-is-cross-compiler ; then
+		multilib_foreach_abi multilib_pkg_postinst
+	else
+		ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+		ewarn "You might want to run gio-querymodules manually on the target for"
+		ewarn "your final image for performance reasons and re-run it when packages"
+		ewarn "installing GIO modules get upgraded or added to the image."
+	fi
+
+	for v in ${REPLACING_VERSIONS}; do
+		if ver_test "$v" "-lt" "2.63.6"; then
+			ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
+			ewarn "to restart your session for \"Open With\" dialogs to work."
+		fi
+	done
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+	gnome2_schemas_update
+
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+		multilib_pkg_postrm() {
+			rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
+		}
+		multilib_foreach_abi multilib_pkg_postrm
+		rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/
@ 2024-03-25 10:53 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2024-03-25 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     af86f0b8d5440a8926218c7ccc5ab20f60fb471e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 10:45:40 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 10:46:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af86f0b8

dev-libs/glib: backport fix for tests w/ >=dev-libs/libpcre2-10.43

Test-only fix.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../glib/files/glib-2.78.4-libpcre2-10.43.patch    | 45 ++++++++++++++++++++++
 dev-libs/glib/glib-2.78.4-r1.ebuild                |  1 +
 2 files changed, 46 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.78.4-libpcre2-10.43.patch b/dev-libs/glib/files/glib-2.78.4-libpcre2-10.43.patch
new file mode 100644
index 000000000000..27dce8f40607
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.78.4-libpcre2-10.43.patch
@@ -0,0 +1,45 @@
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3945
+
+From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <pwithnall@gnome.org>
+Date: Mon, 26 Feb 2024 16:55:44 +0000
+Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+PCRE2 10.43 has now introduced support for variable-length lookbehind,
+so these tests now fail if GLib is built against PCRE2 10.43 or higher.
+
+See
+https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94.
+
+Rather than making the tests conditional on the version of PCRE2 in use,
+just remove them. They are mostly testing the PCRE2 code rather than
+any code in GLib, so don’t have much value.
+
+This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2
+days ago.
+
+Signed-off-by: Philip Withnall <pwithnall@gnome.org>
+--- a/glib/tests/regex.c
++++ b/glib/tests/regex.c
+@@ -1885,16 +1885,6 @@ test_lookbehind (void)
+   g_match_info_free (match);
+   g_regex_unref (regex);
+ 
+-  regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+-  g_assert (regex == NULL);
+-  g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+-  g_clear_error (&error);
+-
+-  regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+-  g_assert (regex == NULL);
+-  g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+-  g_clear_error (&error);
+-
+   regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+   g_assert (regex);
+   g_assert_no_error (error);
+-- 
+GitLab

diff --git a/dev-libs/glib/glib-2.78.4-r1.ebuild b/dev-libs/glib/glib-2.78.4-r1.ebuild
index a6f0241faaa9..7bd791bf5334 100644
--- a/dev-libs/glib/glib-2.78.4-r1.ebuild
+++ b/dev-libs/glib/glib-2.78.4-r1.ebuild
@@ -73,6 +73,7 @@ MULTILIB_CHOST_TOOLS=(
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
 	"${FILESDIR}"/${PN}-2.78.4-distutils.patch
+	"${FILESDIR}"/${PN}-2.78.4-libpcre2-10.43.patch
 )
 
 python_check_deps() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-25 10:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 12:47 [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/, dev-libs/glib/files/ Gilles Dartiguelongue
  -- strict thread matches above, loose matches on Subject: below --
2024-03-25 10:53 Sam James
2022-09-27 18:17 Sam James
2021-12-11 13:34 Mart Raudsepp
2021-08-05  1:56 Sam James
2020-06-07 21:28 Mart Raudsepp
2019-07-23 13:03 Mart Raudsepp
2018-06-28 18:33 Mart Raudsepp
2018-06-10  8:25 Mart Raudsepp
2017-03-19 14:43 Mart Raudsepp
2016-03-26 21:25 Alexandre Rostovtsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox