[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2024-01-21 Thread Sam James
commit: 11641c3d40b399e3eacef4cecf256b5f2b4b5aa3
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan 22 05:51:57 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan 22 05:51:57 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11641c3d

dev-libs/glib: fix Python 3.12 build w/o setuptools

Closes: https://bugs.gentoo.org/922654
Signed-off-by: Sam James  gentoo.org>

 dev-libs/glib/files/glib-2.78.4-distutils.patch| 36 ++
 .../{glib-2.78.4.ebuild => glib-2.78.4-r1.ebuild}  |  8 +
 2 files changed, 44 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.78.4-distutils.patch 
b/dev-libs/glib/files/glib-2.78.4-distutils.patch
new file mode 100644
index ..70ceebcf7095
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.78.4-distutils.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/922654
+https://gitlab.gnome.org/GNOME/glib/-/issues/3134
+https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291
+
+[sam: Trimmed the CI changes.]
+
+From 6ef967a0f930ce37a8c9b5aff969693b34714291 Mon Sep 17 00:00:00 2001
+From: Jordan Williams 
+Date: Fri, 1 Dec 2023 09:53:50 -0600
+Subject: [PATCH] Switch from the deprecated distutils module to the packaging
+ module
+
+The distutils module was removed in Python 3.12.
+---
+
+--- a/gio/gdbus-2.0/codegen/utils.py
 b/gio/gdbus-2.0/codegen/utils.py
+@@ -19,7 +19,7 @@
+ #
+ # Author: David Zeuthen 
+ 
+-import distutils.version
++import packaging.version
+ import os
+ import sys
+ 
+@@ -166,4 +166,4 @@ def version_cmp_key(key):
+ v = str(key[0])
+ else:
+ v = "0"
+-return (distutils.version.LooseVersion(v), key[1])
++return (packaging.version.Version(v), key[1])
+-- 
+GitLab
+
+

diff --git a/dev-libs/glib/glib-2.78.4.ebuild 
b/dev-libs/glib/glib-2.78.4-r1.ebuild
similarity index 98%
rename from dev-libs/glib/glib-2.78.4.ebuild
rename to dev-libs/glib/glib-2.78.4-r1.ebuild
index 6fdf95422485..ec81f416256d 100644
--- a/dev-libs/glib/glib-2.78.4.ebuild
+++ b/dev-libs/glib/glib-2.78.4-r1.ebuild
@@ -51,6 +51,9 @@ BDEPEND="
app-text/docbook-xml-dtd:4.5 )
systemtap? ( >=dev-debug/systemtap-1.3 )
${PYTHON_DEPS}
+   $(python_gen_any_dep '
+   dev-python/packaging[${PYTHON_USEDEP}]
+   ')
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
 "
@@ -69,8 +72,13 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+   "${FILESDIR}"/${PN}-2.78.4-distutils.patch
 )
 
+python_check_deps() {
+   python_has_version "dev-python/packaging[${PYTHON_USEDEP}]"
+}
+
 pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"



[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2023-03-16 Thread Sam James
commit: 494fdf6d476ec4dfa6b6c801b66709765bdce45a
Author: Sam James  gentoo  org>
AuthorDate: Thu Mar 16 23:47:33 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar 16 23:50:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494fdf6d

dev-libs/glib: backport fix for building C++ applications

Closes: https://bugs.gentoo.org/901211
Closes: https://bugs.gentoo.org/901035
Signed-off-by: Sam James  gentoo.org>

 dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch | 132 ++
 dev-libs/glib/glib-2.76.0-r1.ebuild| 284 +
 2 files changed, 416 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch 
b/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch
new file mode 100644
index ..23b0a1b641c1
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch
@@ -0,0 +1,132 @@
+https://bugs.gentoo.org/901035
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3322
+https://gitlab.gnome.org/GNOME/glib/-/commit/cc7f2f81cc59751fcc689731dcd60af5da5723ba
+
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao 
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+--- a/glib/gstrfuncs.h
 b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean (g_str_has_prefix) (const gchar *str,
+ (g_str_has_suffix) (STR, SUFFIX)  
\
+   )
+ 
+-#define g_strdup(STR) 
\
+-  (__builtin_constant_p ((STR)) ? 
\
+-(G_LIKELY ((STR) != NULL) ?   
\
+-  G_GNUC_EXTENSION ({ 
\
+-const char *const ___str = ((STR));   
\
+-const char *const __str = _G_STR_NONNULL (___str);
\
+-const size_t __str_len = strlen (__str) + 1;  
\
+-char *__dup_str = (char *) g_malloc (__str_len);  
\
+-(char *) memcpy (__dup_str, __str, __str_len);
\
+-  })  
\
+-  :   
\
+-  (char *) (NULL) 
\
+-) 
\
+-: 
\
+-(g_strdup) ((STR))
\
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*g_strjoin  (const gchar  *separator,
+   ...) G_GNUC_MALLOC 
G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen 
(str)))
++{
++  const size_t len = strlen (str) + 1;
++  char *dup_str = (char *) g_malloc (len);
++  return (char *) memcpy (dup_str, str, len);
++}
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+--- a/glib/tests/cxx.cpp
 b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2023-03-03 Thread Matt Turner
commit: c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277
Author: Matt Turner  gentoo  org>
AuthorDate: Sat Mar  4 00:47:55 2023 +
Commit: Matt Turner  gentoo  org>
CommitDate: Sat Mar  4 00:48:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c759e131

dev-libs/glib: Add patch to skip test

The assert-msg-test.py test doesn't work under sandbox.

Closes: https://bugs.gentoo.org/871330
Signed-off-by: Matt Turner  gentoo.org>

 ...ests-Skip-assert-msg-test.py-if-gdb-fails.patch | 33 ++
 dev-libs/glib/glib-2.74.5.ebuild   |  2 ++
 2 files changed, 35 insertions(+)

diff --git 
a/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
 
b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
new file mode 100644
index ..ed8fc97b3992
--- /dev/null
+++ 
b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
@@ -0,0 +1,33 @@
+From 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 Mon Sep 17 00:00:00 2001
+From: Matt Turner 
+Date: Thu, 2 Mar 2023 00:13:22 -0500
+Subject: [PATCH] tests: Skip assert-msg-test.py if gdb fails
+
+Similar to commit 6e44151bf74d, skip the test if gdb is unable to read
+/proc/PID/mem, which gdb does as a fallback if ptrace is unavailable.
+
+This allows the test to skip when run under Gentoo's sandbox.
+---
+ glib/tests/assert-msg-test.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py
+index 4936fa083..33aa2249e 100755
+--- a/glib/tests/assert-msg-test.py
 b/glib/tests/assert-msg-test.py
+@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase):
+ 
+ # Some CI environments disable ptrace (as they’re running in a
+ # container). If so, skip the test as there’s nothing we can do.
+-if (
+-result.info.returncode != 0
+-and "ptrace: Operation not permitted" in result.err
++if result.info.returncode != 0 and (
++"ptrace: Operation not permitted" in result.err
++or "warning: opening /proc/PID/mem file for lwp" in result.err
+ ):
+ self.skipTest("GDB is not functional due to ptrace being 
disabled")
+ 
+-- 
+2.39.2
+

diff --git a/dev-libs/glib/glib-2.74.5.ebuild b/dev-libs/glib/glib-2.74.5.ebuild
index 678d48cb72dd..f0c142206738 100644
--- a/dev-libs/glib/glib-2.74.5.ebuild
+++ b/dev-libs/glib/glib-2.74.5.ebuild
@@ -69,6 +69,8 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+
+   "${FILESDIR}"/${P}-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2022-12-21 Thread Sam James
commit: d017b0631b6bf1acbafc9480a6ea07d1a1870a91
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 21 23:27:42 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 21 23:27:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d017b063

dev-libs/glib: add 2.74.4

Bug: https://bugs.gentoo.org/887807
Signed-off-by: Sam James  gentoo.org>

 dev-libs/glib/Manifest |   1 +
 .../files/glib-2.74.4-implicit-func-decl.patch |  24 ++
 dev-libs/glib/glib-2.74.4.ebuild   | 288 +
 3 files changed, 313 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 26c04fce0287..12c33f3713be 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,4 @@
 DIST glib-2.74.1.tar.xz 5189452 BLAKE2B 
58d977a5d2a100aa9125f2009ae66c6f27232dff70159433076552bdb64f9a6a93d7cb705feba890ee43d6f16d4766f6f1d5502c2e01eeb7e88d5ed0dd205d5c
 SHA512 
21176cb95fcab49a781d02789bf21191a96a34a6391f066699b3c20b414b3169c958bd86623deb34ca55912083862885f7a7d12b67cc041467da2ba94d9e83c3
 DIST glib-2.74.3-patches-2.tar.xz 23576 BLAKE2B 
f3746bdf961890d9f4e7ad20b107b83b7ceb8dcc36e288c1d526bac31a0e1dd9d1f13323f512355085c77d186ad66c3f52c1154f34c1d6fd6a5e64a074b2920c
 SHA512 
945c131c27f02044db6154f0a63f458d6317c8a4e841fb392947b16756e25d92adeb2b34d793c9e19441b825d1aee71ae9b08fdcbefa1bc9de1d5af9e903e82c
 DIST glib-2.74.3.tar.xz 5181732 BLAKE2B 
46c37be9519866af040b2aaf35129a9cfae6e2c74636c01755b901002fa77f4e2305025691d7a8279acfbae1298a4b5b1e095b333bed3b067e9820547b6eca97
 SHA512 
a9aa7e84187abb57aeeff9c7f4c4125be742a510ae5d39b6b62696ad1a715c36b353c6c14222caeb1e87bed930fb54184dba77118b991c42f1857a292c6aa77b
+DIST glib-2.74.4.tar.xz 5208484 BLAKE2B 
01a2818e63469019abcd1215fa85521b9a2e55644040e8fe2797f68cabe897a191ae2c1cc2ab75d5ba9980d63adbfc00636b295ee942d70579e7eba1e1f49502
 SHA512 
912f6b0559fcb5ad55fa36837a348228b8e2498c490271204ced9f2e4a9eab804de4745f3ec439a198eb275d7263f18bc670f45460e2be55a2cbe45466b02fc6

diff --git a/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch 
b/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch
new file mode 100644
index ..9cd48a26453e
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.4-implicit-func-decl.patch
@@ -0,0 +1,24 @@
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3165
+
+From 6626765a79f125cf0ec9cdaefa51ceef718d41e7 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro 
+Date: Tue, 20 Dec 2022 17:10:41 -0600
+Subject: [PATCH] gthread-posix: need to #include 
+
+a79c6af23eff5ee978db62e048828c9a992a1261 uses errno without the required
+header.
+
+
+(cherry picked from commit 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd)
+--- a/glib/gthreadprivate.h
 b/glib/gthreadprivate.h
+@@ -41,6 +41,7 @@ struct  _GRealThread
+ /* system thread implementation (gthread-posix.c, gthread-win32.c) */
+ 
+ #if defined(HAVE_FUTEX) || defined(HAVE_FUTEX_TIME64)
++#include 
+ #include 
+ #include 
+ #include 
+-- 
+GitLab

diff --git a/dev-libs/glib/glib-2.74.4.ebuild b/dev-libs/glib/glib-2.74.4.ebuild
new file mode 100644
index ..4da035ddf9e3
--- /dev/null
+++ b/dev-libs/glib/glib-2.74.4.ebuild
@@ -0,0 +1,288 @@
+# 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="
+   !=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+   >=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),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? ( 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2022-11-26 Thread Matt Turner
commit: 90faffceb3b073b8f24d7dfebe489abecf2f8535
Author: Matt Turner  gentoo  org>
AuthorDate: Sat Nov 26 16:31:26 2022 +
Commit: Matt Turner  gentoo  org>
CommitDate: Sat Nov 26 17:19:34 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90faffce

dev-libs/glib: Drop old versions

Signed-off-by: Matt Turner  gentoo.org>

 dev-libs/glib/Manifest |   1 -
 dev-libs/glib/files/glib-2.74.0-clang-build.patch  |  26 --
 .../glib/files/glib-2.74.0-crash-gparamspec.patch  |  27 --
 dev-libs/glib/glib-2.74.0-r1.ebuild| 289 -
 dev-libs/glib/glib-2.74.1.ebuild   | 283 
 5 files changed, 626 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 878c1cbe294d..e298847984d8 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,4 +1,3 @@
 DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 
1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6
 SHA512 
8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638
-DIST glib-2.74.0.tar.xz 5183072 BLAKE2B 
b21e5a72e2ce3390cbf13601aa902104f1ac1cfbd75181d30cd340f24b5875753f898b229f99c71d47d499be86cddb0191a0072c0c2decc82956a46c16255905
 SHA512 
5cdadd2f4568c0c3d45083b4d39699abf651e42e020f7bc880cce3ff33d28943118388d17a0632777e843f48009c1f97d5634fde3cb8c69c7c7f35b278ac8225
 DIST glib-2.74.1.tar.xz 5189452 BLAKE2B 
58d977a5d2a100aa9125f2009ae66c6f27232dff70159433076552bdb64f9a6a93d7cb705feba890ee43d6f16d4766f6f1d5502c2e01eeb7e88d5ed0dd205d5c
 SHA512 
21176cb95fcab49a781d02789bf21191a96a34a6391f066699b3c20b414b3169c958bd86623deb34ca55912083862885f7a7d12b67cc041467da2ba94d9e83c3
 DIST glib-2.74.2.tar.xz 5182312 BLAKE2B 
319a8fb793adb7343b77119d7b7839efad6f91b9c7af079f53d54b435067ab12162c4791ca6b8e9b7fd6d269975e9559951cbf80a065072541f407a0d8e2ce74
 SHA512 
90bb2410f038e47401fc985ff7fe6d1abecec9417254e039ac18e6b0d77e0b8539b975bef84d5f933be8e43c8ceca236bd466622504491e08e71d079d8804895

diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch 
b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
deleted file mode 100644
index 23bb0630d028..
--- a/dev-libs/glib/files/glib-2.74.0-clang-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
-https://bugs.gentoo.org/871174
-
-From: Kjell Ahlstedt 
-Date: Thu, 15 Sep 2022 12:55:18 +0200
-Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
- clang
-
-The clang compiler requires the static_assert expression to be an integral
-constant expression. `"text"` is not, but `sizeof "text"` is.
-
-Fixes #2740
 a/gio/gio-launch-desktop.c
-+++ b/gio/gio-launch-desktop.c
-@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
-   /* Arbitrary large size for the sending buffer, from systemd */
-   int large_buffer_size = 8 * 1024 * 1024;
- 
--  G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
--  G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
-+  G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
-+  G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
- 
-   fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
- 
-GitLab

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
deleted file mode 100644
index 84edcde4189d..
--- a/dev-libs/glib/files/glib-2.74.0-crash-gparamspec.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.gnome.org/GNOME/glib/-/commit/ea3f17d598d550345e94e4571130e429443e91cb
-https://gitlab.gnome.org/GNOME/glib/-/issues/2770
-
-From: Emmanuele Bassi 
-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
deleted file mode 100644
index 505345d23969..
--- a/dev-libs/glib/glib-2.74.0-r1.ebuild
+++ /dev/null
@@ -1,289 +0,0 @@
-# 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 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2022-11-01 Thread Sam James
commit: 92e1c534401aa14856d4f4e0887934bd24882d8c
Author: Sam James  gentoo  org>
AuthorDate: Tue Nov  1 22:10:00 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Nov  1 22:10:00 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92e1c534

dev-libs/glib: backport gnome-keyring CPU peg fix

Bug: https://bugs.gentoo.org/878995
Bug: https://bugs.gentoo.org/878351
Signed-off-by: Sam James  gentoo.org>

 .../glib/files/glib-2.74.1-gnome-keyring-cpu.patch | 131 ++
 dev-libs/glib/glib-2.74.1-r1.ebuild| 288 +
 2 files changed, 419 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch 
b/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch
new file mode 100644
index ..8cb07a2803f3
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.1-gnome-keyring-cpu.patch
@@ -0,0 +1,131 @@
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3029
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3039 (backport PR we've 
used)
+https://bugs.gentoo.org/878995
+https://bugs.gentoo.org/878351
+
+From e2f283d7c8c5ab3aeb2f281a27ec7c0f24b86868 Mon Sep 17 00:00:00 2001
+From: Ray Strode 
+Date: Fri, 28 Oct 2022 11:21:04 -0400
+Subject: [PATCH 1/2] Revert "Handling collision between standard i/o file
+ descriptors and newly created ones"
+
+g_unix_open_pipe tries to avoid the standard io fd range
+when getting pipe fds. This turns out to be a bad idea because
+certain buggy programs rely on it using that range.
+
+This reverts commit d9ba6150909818beb05573f54f26232063492c5b
+--- a/glib/glib-unix.c
 b/glib/glib-unix.c
+@@ -108,17 +108,6 @@ g_unix_open_pipe (int *fds,
+ ecode = pipe2 (fds, pipe2_flags);
+ if (ecode == -1 && errno != ENOSYS)
+   return g_unix_set_error_from_errno (error, errno);
+-/* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
+-else if (fds[0] < 3 || fds[1] < 3)
+-  {
+-int old_fds[2] = { fds[0], fds[1] };
+-gboolean result = g_unix_open_pipe (fds, flags, error);
+-close (old_fds[0]);
+-close (old_fds[1]);
+-
+-if (!result)
+-  g_unix_set_error_from_errno (error, errno);
+-  }
+ else if (ecode == 0)
+   return TRUE;
+ /* Fall through on -ENOSYS, we must be running on an old kernel */
+@@ -127,19 +116,6 @@ g_unix_open_pipe (int *fds,
+   ecode = pipe (fds);
+   if (ecode == -1)
+ return g_unix_set_error_from_errno (error, errno);
+-  /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
+-  else if (fds[0] < 3 || fds[1] < 3)
+-{
+-  int old_fds[2] = { fds[0], fds[1] };
+-  gboolean result = g_unix_open_pipe (fds, flags, error);
+-  close (old_fds[0]);
+-  close (old_fds[1]);
+-
+-  if (!result)
+-g_unix_set_error_from_errno (error, errno);
+-
+-  return result;
+-}
+ 
+   if (flags == 0)
+ return TRUE;
+GitLab
+From 4526620d8c485f5dfba6ddca33f91670982f82eb Mon Sep 17 00:00:00 2001
+From: Ray Strode 
+Date: Mon, 31 Oct 2022 09:17:55 -0400
+Subject: [PATCH 2/2] glib-unix: Add test to make sure g_unix_open_pipe will
+ intrude standard range
+
+Now that we know it's a bad idea to avoid the standard io fd range
+when getting pipe fds for g_unix_open_pipe, we should test to make sure
+we don't inadvertently try to do it again.
+
+This commit adds that test.
+--- a/glib/tests/unix.c
 b/glib/tests/unix.c
+@@ -24,8 +24,11 @@
+ #include "config.h"
+ 
+ #include "glib-unix.h"
++#include "gstdio.h"
++
+ #include 
+ #include 
++#include 
+ 
+ static void
+ test_pipe (void)
+@@ -52,6 +55,39 @@ test_pipe (void)
+   g_assert (g_str_has_prefix (buf, "hello"));
+ }
+ 
++static void
++test_pipe_stdio_overwrite (void)
++{
++  GError *error = NULL;
++  int pipefd[2], ret;
++  gboolean res;
++  int stdin_fd;
++
++  stdin_fd = dup (STDIN_FILENO);
++  g_assert_cmpint (stdin_fd, >, 0);
++
++  g_close (STDIN_FILENO, );
++  g_assert_no_error (error);
++
++  res = g_unix_open_pipe (pipefd, FD_CLOEXEC, );
++  g_assert_no_error (error);
++  g_assert_true (res);
++
++  g_assert_cmpint (pipefd[0], ==, STDIN_FILENO);
++
++  g_close (pipefd[0], );
++  g_assert_no_error (error);
++
++  g_close (pipefd[1], );
++  g_assert_no_error (error);
++
++  ret = dup2 (stdin_fd, STDIN_FILENO);
++  g_assert_cmpint (ret, >=, 0);
++
++  g_close (stdin_fd, );
++  g_assert_no_error (error);
++}
++
+ static void
+ test_error (void)
+ {
+@@ -337,6 +373,7 @@ main (int   argc,
+   g_test_init (, , NULL);
+ 
+   g_test_add_func ("/glib-unix/pipe", test_pipe);
++  g_test_add_func ("/glib-unix/pipe-stdio-overwrite", 
test_pipe_stdio_overwrite);
+   g_test_add_func ("/glib-unix/error", test_error);
+   g_test_add_func ("/glib-unix/nonblocking", test_nonblocking);
+   g_test_add_func ("/glib-unix/sighup", test_sighup);
+GitLab

diff --git a/dev-libs/glib/glib-2.74.1-r1.ebuild 
b/dev-libs/glib/glib-2.74.1-r1.ebuild
new file mode 100644
index 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2022-09-21 Thread Sam James
commit: bab72b72ddea0be05aa764df10093086e01cbc13
Author: Sam James  gentoo  org>
AuthorDate: Thu Sep 22 04:13:25 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Sep 22 04:13:25 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab72b72

dev-libs/glib: fix build w/ Clang

Closes: https://bugs.gentoo.org/871174
Signed-off-by: Sam James  gentoo.org>

 dev-libs/glib/files/glib-2.74.0-clang-build.patch | 26 +++
 dev-libs/glib/glib-2.74.0.ebuild  |  1 +
 2 files changed, 27 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch 
b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
new file mode 100644
index ..23bb0630d028
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
@@ -0,0 +1,26 @@
+https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
+https://bugs.gentoo.org/871174
+
+From: Kjell Ahlstedt 
+Date: Thu, 15 Sep 2022 12:55:18 +0200
+Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
+ clang
+
+The clang compiler requires the static_assert expression to be an integral
+constant expression. `"text"` is not, but `sizeof "text"` is.
+
+Fixes #2740
+--- a/gio/gio-launch-desktop.c
 b/gio/gio-launch-desktop.c
+@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
+   /* Arbitrary large size for the sending buffer, from systemd */
+   int large_buffer_size = 8 * 1024 * 1024;
+ 
+-  G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
+-  G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
++  G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
++  G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
+ 
+   fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+ 
+GitLab

diff --git a/dev-libs/glib/glib-2.74.0.ebuild b/dev-libs/glib/glib-2.74.0.ebuild
index db17ff43554c..2afacc7da2a4 100644
--- a/dev-libs/glib/glib-2.74.0.ebuild
+++ b/dev-libs/glib/glib-2.74.0.ebuild
@@ -69,6 +69,7 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+   "${FILESDIR}"/${P}-clang-build.patch
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2020-03-24 Thread Matt Turner
commit: 596b0ccea3bd58cff19d13a80a7529a7798bb38f
Author: Matt Turner  gentoo  org>
AuthorDate: Tue Mar 24 05:24:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed Mar 25 02:20:16 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=596b0cce

dev-libs/glib: Version bump to 2.64.1

Signed-off-by: Matt Turner  gentoo.org>

 dev-libs/glib/Manifest |   1 +
 ...-2.64.1-mark-gdbus-server-auth-test-flaky.patch |  32 +++
 dev-libs/glib/glib-2.64.1.ebuild   | 278 +
 3 files changed, 311 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index c484d0b783f..115723e3d8e 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,4 @@
 DIST glib-2.60.7.tar.xz 4590568 BLAKE2B 
a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15
 SHA512 
d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
 DIST glib-2.62.5.tar.xz 4702492 BLAKE2B 
03e04cb149b3301959013c5db20b1f3606951ed80105e0580d40177586a5834afb975ace0d25d5311fd63d29a48129128bdddf29a808e371f1400c00033be1a3
 SHA512 
2f99422ff8245524aabdb52f5d388ef4bde0fc075eab24499b4023f6ca143b80a74e265117b9e7a9de68a347b0c7eaa8655c836d7bbb63d54cad5c6dda630371
 DIST glib-2.62.6.tar.xz 4703424 BLAKE2B 
0a27245be2575c574dcc730dd051a8c284f421dbc46579aadc5fbbacb8f934af4374b61bb26085e5c9ab78a868c567818f3fb9d67adddce37f5c4fec00e0d276
 SHA512 
8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5
+DIST glib-2.64.1.tar.xz 4758548 BLAKE2B 
5585d23fee28d7c32b1bb9e1defbc31ba469aa259e3c328760d1e702d98706cf251bfb50b5e2aed37b2cdfa6ab4319372ddcd0a9937c97a2614741b504af17a5
 SHA512 
1cefe49a42233f24ac6bd09c134ceea7119f4f74f42204a731be56100a180eec69c8224674f0b08d1538ad0859896ed08260a6af0fed469c7d10b4508116a6bc

diff --git 
a/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch 
b/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
new file mode 100644
index 000..d1a41ecb793
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.64.1-mark-gdbus-server-auth-test-flaky.patch
@@ -0,0 +1,32 @@
+From 95b22035f6151ab465c37fe5e3e340713cb74e23 Mon Sep 17 00:00:00 2001
+From: Matt Turner 
+Date: Tue, 24 Mar 2020 18:44:54 -0700
+Subject: [PATCH] Mark gdbus-server-auth test flaky
+
+See https://gitlab.gnome.org/GNOME/glib/-/issues/1954
+---
+ gio/tests/meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index 788cf978b..7f45d0191 100644
+--- a/gio/tests/meson.build
 b/gio/tests/meson.build
+@@ -122,12 +122,13 @@ if dbus1_dep.found()
+ },
+ 'gdbus-server-auth' : {
+   'dependencies' : [dbus1_dep],
++  'suite' : ['flaky'],
+ },
+   }
+ else
+   # We can build a cut-down version of this test without libdbus
+   gio_tests += {
+-'gdbus-server-auth' : {},
++'gdbus-server-auth' : {'suite' : ['flaky']},
+   }
+ endif
+ 
+-- 
+2.24.1
+

diff --git a/dev-libs/glib/glib-2.64.1.ebuild b/dev-libs/glib/glib-2.64.1.ebuild
new file mode 100644
index 000..33ba76e4199
--- /dev/null
+++ b/dev-libs/glib/glib-2.64.1.ebuild
@@ -0,0 +1,278 @@
+# 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 ~sh ~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="
+   !=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+   >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
+   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2020-02-22 Thread Mart Raudsepp
commit: cc0b8aab3c139570fb2459c9c08905ba2963068b
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sat Feb 22 18:28:15 2020 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sat Feb 22 18:30:35 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc0b8aab

dev-libs/glib: fix CVE-2020-6750 (proxy settings sometimes ignored)

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

 dev-libs/glib/files/CVE-2020-6750.patch | 763 
 dev-libs/glib/glib-2.60.7-r2.ebuild | 280 
 2 files changed, 1043 insertions(+)

diff --git a/dev-libs/glib/files/CVE-2020-6750.patch 
b/dev-libs/glib/files/CVE-2020-6750.patch
new file mode 100644
index 000..fe39914f920
--- /dev/null
+++ b/dev-libs/glib/files/CVE-2020-6750.patch
@@ -0,0 +1,763 @@
+From cc3cf6b8b2ad12d54f3474113f0ccfa7dcf66b7b Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro 
+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 
+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 (>connectable);
+   g_clear_object (>enumerator);
+-  g_clear_object (>proxy_addr);
+-  g_clear_object (>socket);
+-  g_clear_object (>connection);
++  g_clear_object (>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 (>last_error);
+ 
+@@ -1370,6 +1371,7 @@ typedef struct
+   GSocketAddress *address;
+   GSocket *socket;
+   GIOStream *connection;
++  GProxyAddress *proxy_addr;
+   GSocketClientAsyncConnectData *data; /* unowned */
+   GSource 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2020-01-11 Thread Mart Raudsepp
commit: 0b605b42363650b0b8dcd49bb1b9787d317eceec
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sat Jan 11 18:11:39 2020 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sat Jan 11 18:12:17 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b605b42

dev-libs/glib: remove old

Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp  gentoo.org>

 dev-libs/glib/Manifest |   2 -
 dev-libs/glib/files/2.58.3-CVE-2019-12450.patch|  53 
 .../glib/files/2.58.3-gdbusmessage-limit-fix.patch | 120 
 .../files/glib-2.58.2-external-gdbus-codegen.patch | 124 
 dev-libs/glib/glib-2.58.3-r1.ebuild| 316 -
 5 files changed, 615 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index bb414b1e7f6..35f017b7582 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1 @@
-DIST glib-2.58.3.tar.xz 4863648 BLAKE2B 
4269bd6e80869f39d567917438f750561debb1b45d40ecea487d2e76e2468e07dc8d80a23678699f7b8f7778c2ed9d29e866ae5e33770f51ed00709dd5fe97eb
 SHA512 
1e1cb5b607367dcbadb95563d463e81702cf396b28f1173f6d933707f4f3d5595a70225423e918807a05994a24f16fa3ac87d2ec67e4b670244ea99836634cce
 DIST glib-2.60.7.tar.xz 4590568 BLAKE2B 
a3f2a3bd0443a27326e8359c2ad1e6022ca1634f5c7cb4502a8011fbe85df690fff7d67665cf160bf4ed426214b87f6501a69158fb1656bdb86cacdcf076ee15
 SHA512 
d56d805a5abf6f7aeb8bf5be06b60ad049177ee23f78eacef4ce2ea88a8be49966a95e48fed17c752649f6e80937fd0ebc8f959709f623ec1f2f43ffd42d078a
-DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B 
bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b
 SHA512 
6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

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
deleted file mode 100644
index 949ac56431f..000
--- a/dev-libs/glib/files/2.58.3-CVE-2019-12450.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e6b769819d63d2b24b251dbc9f902fe6fd614da3 Mon Sep 17 00:00:00 2001
-From: Ondrej Holy 
-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
-


[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2020-01-01 Thread Mart Raudsepp
commit: 1ed2ea2d465969fba6a72c270d712287d2e3e116
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Wed Jan  1 15:40:23 2020 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Wed Jan  1 15:40:41 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ed2ea2d

dev-libs/glib: backport GDBus fixes necessary for ibus security fixes

Closes: https://bugs.gentoo.org/700538
Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp  gentoo.org>

 dev-libs/glib/files/2.60.7-gdbus-fixes.patch | 301 +++
 dev-libs/glib/glib-2.60.7-r1.ebuild  | 279 +
 2 files changed, 580 insertions(+)

diff --git a/dev-libs/glib/files/2.60.7-gdbus-fixes.patch 
b/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
new file mode 100644
index 000..e2a066beec7
--- /dev/null
+++ b/dev-libs/glib/files/2.60.7-gdbus-fixes.patch
@@ -0,0 +1,301 @@
+From 1cfab12a28d97716ad581c30fbbf3e94e4d7f303 Mon Sep 17 00:00:00 2001
+From: Simon McVittie 
+Date: Mon, 14 Oct 2019 08:22:24 +0100
+Subject: [PATCH 1/3] gcredentialsprivate: Document the various private macros
+
+Signed-off-by: Simon McVittie 
+---
+ 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 
+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 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2019-04-08 Thread Mart Raudsepp
commit: 6cae567896078ca6373b8d667af7835030438d12
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Mon Apr  8 08:38:59 2019 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Mon Apr  8 08:38:59 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cae5678

dev-libs/glib: remove old

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp  gentoo.org>

 dev-libs/glib/Manifest |   1 -
 ...56.2-network-monitor-race-test-iterations.patch |  36 ---
 .../files/glib-2.54.3-external-gdbus-codegen.patch |  86 --
 .../glib/files/glib-2.58.2-gvariant-test-fix.patch |  96 ---
 dev-libs/glib/glib-2.56.4.ebuild   | 300 -
 5 files changed, 519 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 9f539cd8493..aa0ad833c86 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,3 +1,2 @@
-DIST glib-2.56.4.tar.xz 7029768 BLAKE2B 
21cf840128e468151eeac55f0323f8f643973422b70bb65655e24c0a6b2f7ee72d5ae879bfae73df84fa2281fc425cc98328597910ba8fd99d7a52024e1b3ab6
 SHA512 
280a46c2af13283a08c15ff0b4f5492659c2884521930600ad45310ed181c44a878ad8f9b36bae68ed6e7d92db6f1630f7bf015148c513dc317d25807f13abb0
 DIST glib-2.58.3.tar.xz 4863648 BLAKE2B 
4269bd6e80869f39d567917438f750561debb1b45d40ecea487d2e76e2468e07dc8d80a23678699f7b8f7778c2ed9d29e866ae5e33770f51ed00709dd5fe97eb
 SHA512 
1e1cb5b607367dcbadb95563d463e81702cf396b28f1173f6d933707f4f3d5595a70225423e918807a05994a24f16fa3ac87d2ec67e4b670244ea99836634cce
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B 
bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b
 SHA512 
6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git 
a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch 
b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
deleted file mode 100644
index 1ddec6db946..000
--- a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a90c578952219e740f24d9f2560f54f19ae7e906 Mon Sep 17 00:00:00 2001
-From: Philip Withnall 
-Date: Wed, 11 Apr 2018 15:45:10 +0100
-Subject: [PATCH] tests: Lower number of iterations in network-monitor-race
-
-While 333 runs is very likely to reproduce the bug, Milan has previously
-reproduced it with as few as 9 runs. Since this test will be run by the
-CI machinery quite often, a lower number of runs each CI run will still
-probably catch any regressions over time.
-
-This reduces the total test runtime from 33s to 2s.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=793727
-
-Signed-off-by: Philip Withnall 
-Reviewed-by: nobody

- gio/tests/network-monitor-race.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/tests/network-monitor-race.c 
b/gio/tests/network-monitor-race.c
-index 4b92c87a5..cadd62cee 100644
 a/gio/tests/network-monitor-race.c
-+++ b/gio/tests/network-monitor-race.c
-@@ -18,7 +18,7 @@
- #include 
- #include 
- 
--#define MAX_RUNS 333
-+#define MAX_RUNS 20
- 
- static gboolean
- quit_loop (gpointer user_data)
--- 
-2.17.0
-

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
deleted file mode 100644
index a27966e0391..000
--- a/dev-libs/glib/files/glib-2.54.3-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 2e47d49bc91d83cd0abea4c1944bfca4336040fa Mon Sep 17 00:00:00 2001
-From: Sobhan Mohammadpour 
-Date: Fri, 23 Feb 2018 15:27:33 +0330
-Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
-

- configure.ac   |  1 -
- docs/reference/gio/Makefile.am |  1 -
- gio/Makefile.am|  2 +-
- gio/tests/Makefile.am  |  6 ++
- gio/tests/gdbus-object-manager-example/Makefile.am |  6 ++
- 5 files changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0457c90..07166c9 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -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 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2018-12-30 Thread Mart Raudsepp
commit: a73230d7a2d94b7417b835d0976208d81e24d167
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sun Dec 30 11:05:35 2018 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sun Dec 30 11:11:55 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a73230d7

dev-libs/glib: remove old

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp  gentoo.org>

 dev-libs/glib/Manifest |   5 -
 .../files/glib-2.50.0-external-gdbus-codegen.patch |  93 --
 dev-libs/glib/glib-2.52.3.ebuild   | 300 
 dev-libs/glib/glib-2.54.3-r6.ebuild| 304 
 dev-libs/glib/glib-2.58.1.ebuild   | 315 -
 5 files changed, 1017 deletions(-)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 5d266bbd874..da752322e9e 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -1,9 +1,4 @@
-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
 DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 
1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51
 SHA512 
8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
 DIST glib-2.56.4.tar.xz 7029768 BLAKE2B 
21cf840128e468151eeac55f0323f8f643973422b70bb65655e24c0a6b2f7ee72d5ae879bfae73df84fa2281fc425cc98328597910ba8fd99d7a52024e1b3ab6
 SHA512 
280a46c2af13283a08c15ff0b4f5492659c2884521930600ad45310ed181c44a878ad8f9b36bae68ed6e7d92db6f1630f7bf015148c513dc317d25807f13abb0
-DIST glib-2.58.1-patchset.tar.xz 17292 BLAKE2B 
c95de62f61f9dac8acbf20f83e95bced99f566c512ec43d46b1ad08356b86c9f5d75a96faa971ed89ae23c9534b03a85058751a40421f2b216612e94493bc9a2
 SHA512 
08833e58cce26412545e380d5c92448f77651c466b236108d5ee9451e30ad6e6bd796ddd30c3c81ca2d5219ea0f6269f9738f57a7438ed0db18c5c1f04a18e10
-DIST glib-2.58.1.tar.xz 4906444 BLAKE2B 
022da8624a8ae2ec7fdc45777556a518d056e7389158d96db36baccdb238ed6fbdb6f224ec8b1c1bfec78001aa0348d3fc1fd43d20908a8c4690a0e03038bf61
 SHA512 
115b74fcd43241e3c4b4babfb8170453b2a002ff02d5996f3c097876199cadccc1cf67b017c10c14c0d2a1bb4228027b743f4926bda0ef7d74012ed712ccd155
 DIST glib-2.58.2.tar.xz 4862612 BLAKE2B 
e94d3dfc5d4b6d100c2425fda34c90fdf643fdb71b8bd65df691e34d11bfaf79fdc4c844eb215df24b0f680991fb0d0c08c3bb3dea61f5157ccd8bec200e2059
 SHA512 
4017ae308f2ef6313abbff2eb9b21ec6f8fa38935007491ca0cb4d1ffac6fedab6f50e911ac088995d6212323ba1767399f18529a2620d60378ecade193b4b1a
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B 
bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b
 SHA512 
6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch 
b/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch
deleted file mode 100644
index 2c942d559f5..000
--- a/dev-libs/glib/files/glib-2.50.0-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index e8e7553..216e59d 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -385,14 +385,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.5,,PYTHON="/usr/bin/env python2.5")
-+# AC_ARG_WITH(python,
-+# AS_HELP_STRING([--with-python=PATH],
-+#   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2018-12-19 Thread Mart Raudsepp
commit: 6a20897df0a747f8772f80cbce679760e72b0834
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Wed Dec 19 14:04:05 2018 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Wed Dec 19 16:18:10 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a20897d

dev-libs/glib: bump to 2.58.2

Signed-off-by: Mart Raudsepp  gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.11

 dev-libs/glib/Manifest |   1 +
 .../files/glib-2.58.2-external-gdbus-codegen.patch | 124 
 .../glib/files/glib-2.58.2-gvariant-test-fix.patch |  96 +++
 dev-libs/glib/glib-2.58.2.ebuild   | 313 +
 4 files changed, 534 insertions(+)

diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index ab7f23afe98..f933dc66ac4 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -4,4 +4,5 @@ DIST glib-2.54.3.tar.xz 7836536 BLAKE2B 
140e7cf09a41b72a5b22e5b87e9674cbfdfe1b82
 DIST glib-2.56.2.tar.xz 8041756 BLAKE2B 
1af5bb37378856e959602bcb9299266bba46b990839c923f6b9881624aed306af0779005281b3e3a46b5994c54812edc86aade9cb782c596fd63b6fd91baba51
 SHA512 
8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
 DIST glib-2.58.1-patchset.tar.xz 17292 BLAKE2B 
c95de62f61f9dac8acbf20f83e95bced99f566c512ec43d46b1ad08356b86c9f5d75a96faa971ed89ae23c9534b03a85058751a40421f2b216612e94493bc9a2
 SHA512 
08833e58cce26412545e380d5c92448f77651c466b236108d5ee9451e30ad6e6bd796ddd30c3c81ca2d5219ea0f6269f9738f57a7438ed0db18c5c1f04a18e10
 DIST glib-2.58.1.tar.xz 4906444 BLAKE2B 
022da8624a8ae2ec7fdc45777556a518d056e7389158d96db36baccdb238ed6fbdb6f224ec8b1c1bfec78001aa0348d3fc1fd43d20908a8c4690a0e03038bf61
 SHA512 
115b74fcd43241e3c4b4babfb8170453b2a002ff02d5996f3c097876199cadccc1cf67b017c10c14c0d2a1bb4228027b743f4926bda0ef7d74012ed712ccd155
+DIST glib-2.58.2.tar.xz 4862612 BLAKE2B 
e94d3dfc5d4b6d100c2425fda34c90fdf643fdb71b8bd65df691e34d11bfaf79fdc4c844eb215df24b0f680991fb0d0c08c3bb3dea61f5157ccd8bec200e2059
 SHA512 
4017ae308f2ef6313abbff2eb9b21ec6f8fa38935007491ca0cb4d1ffac6fedab6f50e911ac088995d6212323ba1767399f18529a2620d60378ecade193b4b1a
 DIST pkg-config-0.28.tar.gz 1931203 BLAKE2B 
bafdd4e838623965c6bd454421ddd9051fc43fc29948e1615b49fef463c3c3a18807aabe6416f96cfdf58d6b1c9e114d77f97bd985facee7c14284a8a64a768b
 SHA512 
6eafa5ca77c5d44cd15f48457a5e96fcea2555b66d8e35ada5ab59864a0aa03d441e15f54ab9c6343693867b3b490f392c75b7d9312f024c9b7ec6a0194d8320

diff --git a/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch 
b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
new file mode 100644
index 000..7615dbb248b
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.58.2-external-gdbus-codegen.patch
@@ -0,0 +1,124 @@
+From 69da419c33c24a05126d21fb3098139d30ba9093 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp 
+Date: Wed, 19 Dec 2018 14:01:43 +0200
+Subject: [PATCH] build: don't build gdbus-codegen and rely on external
+ gdbus-codegen for tests
+
+---
+ configure.ac  |  1 -
+ docs/reference/gio/Makefile.am|  1 -
+ gio/Makefile.am   |  2 +-
+ gio/tests/Makefile.am | 22 ++-
+ .../gdbus-object-manager-example/Makefile.am  |  6 ++---
+ 5 files changed, 10 insertions(+), 22 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4b15b69b8..9187a12bb 100644
+--- a/configure.ac
 b/configure.ac
+@@ -3481,7 +3481,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 08093e8a0..9ce11f824 100644
+--- a/docs/reference/gio/Makefile.am
 b/docs/reference/gio/Makefile.am
+@@ -212,7 +212,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 05b20cdef..ed5d7d4cb 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
+ SUBDIRS += xdgmime
+diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
+index c4e7a9257..4b538b1e9 100644
+--- a/gio/tests/Makefile.am
 b/gio/tests/Makefile.am
+@@ -253,9 +253,7 @@ gdbus-daemon-impl.c: $(top_srcdir)/gio/gdbusdaemon.c
+ # These files are only generated on Windows builds inside GIO,
+ # but we want them on non-Windows builds for the tests
+ gdbus-daemon-generated.h gdbus-daemon-generated.c: 
$(top_srcdir)/gio/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
+-  $(AM_V_GEN) 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2018-11-29 Thread Mart Raudsepp
commit: 549542cf21eb81eb75ce4f526f6a0da92b686c26
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Thu Nov 29 15:24:07 2018 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Thu Nov 29 15:24:41 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=549542cf

dev-libs/glib: fix potential issues in network-monitor-race test

Closes: https://bugs.gentoo.org/664106
Signed-off-by: Mart Raudsepp  gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.11

 ...56.2-network-monitor-race-test-iterations.patch | 36 ++
 dev-libs/glib/glib-2.56.2.ebuild   |  3 ++
 2 files changed, 39 insertions(+)

diff --git 
a/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch 
b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
new file mode 100644
index 000..1ddec6db946
--- /dev/null
+++ b/dev-libs/glib/files/2.56.2-network-monitor-race-test-iterations.patch
@@ -0,0 +1,36 @@
+From a90c578952219e740f24d9f2560f54f19ae7e906 Mon Sep 17 00:00:00 2001
+From: Philip Withnall 
+Date: Wed, 11 Apr 2018 15:45:10 +0100
+Subject: [PATCH] tests: Lower number of iterations in network-monitor-race
+
+While 333 runs is very likely to reproduce the bug, Milan has previously
+reproduced it with as few as 9 runs. Since this test will be run by the
+CI machinery quite often, a lower number of runs each CI run will still
+probably catch any regressions over time.
+
+This reduces the total test runtime from 33s to 2s.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=793727
+
+Signed-off-by: Philip Withnall 
+Reviewed-by: nobody
+---
+ gio/tests/network-monitor-race.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gio/tests/network-monitor-race.c 
b/gio/tests/network-monitor-race.c
+index 4b92c87a5..cadd62cee 100644
+--- a/gio/tests/network-monitor-race.c
 b/gio/tests/network-monitor-race.c
+@@ -18,7 +18,7 @@
+ #include 
+ #include 
+ 
+-#define MAX_RUNS 333
++#define MAX_RUNS 20
+ 
+ static gboolean
+ quit_loop (gpointer user_data)
+-- 
+2.17.0
+

diff --git a/dev-libs/glib/glib-2.56.2.ebuild b/dev-libs/glib/glib-2.56.2.ebuild
index d8adde6c4e2..ea796fb9470 100644
--- a/dev-libs/glib/glib-2.56.2.ebuild
+++ b/dev-libs/glib/glib-2.56.2.ebuild
@@ -115,6 +115,9 @@ src_prepare() {
sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
fi
 
+   # Less max runs in network monitor race test to avoid hitting timeout 
limits
+   eapply "${FILESDIR}"/${PV}-network-monitor-race-test-iterations.patch # 
included in 2.57.1
+
# gdbus-codegen is a separate package
eapply "${FILESDIR}"/${PN}-2.54.3-external-gdbus-codegen.patch
 



[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2018-06-10 Thread Mart Raudsepp
commit: c2b5a3364405a40881ed2ecb776821213d163171
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sun Jun 10 07:00:38 2018 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sun Jun 10 08:25:19 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2b5a336

dev-libs/glib-2.54: port to python-single-r1

Use python-single-r1 instead of python_replicate_script and let
upstream --with-python do its work (don't patch it out anymore in
gdbus-codegen patch). We pass --with-python to end up with proper
/usr/bin/env based shebangs (otherwise it is based on $PYTHON,
which includes absolute path, unlike EPYTHON)

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

 .../files/glib-2.54.3-external-gdbus-codegen.patch | 27 ++
 dev-libs/glib/glib-2.54.3-r5.ebuild| 14 ---
 2 files changed, 6 insertions(+), 35 deletions(-)

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
index 45025b65551..4f3e1784c88 100644
--- 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
@@ -4,40 +4,17 @@ Date: Fri, 23 Feb 2018 15:27:33 +0330
 Subject: [PATCH] glib-2.54.3-external-gdbus-codegen-for-autotools
 
 ---
- configure.ac   | 17 -
+ configure.ac   |  1 -
  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(-)
+ 5 files changed, 6 insertions(+), 12 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

diff --git a/dev-libs/glib/glib-2.54.3-r5.ebuild 
b/dev-libs/glib/glib-2.54.3-r5.ebuild
index 31c751756ab..6f4824c6ad8 100644
--- a/dev-libs/glib/glib-2.54.3-r5.ebuild
+++ b/dev-libs/glib/glib-2.54.3-r5.ebuild
@@ -12,7 +12,7 @@ PYTHON_COMPAT=( python{2_7,3_5,3_6} )
 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
+   multilib multilib-minimal pax-utils python-single-r1 toolchain-funcs 
versionator virtualx
 
 DESCRIPTION="The GLib library of C routines"
 HOMEPAGE="https://www.gtk.org/;
@@ -84,6 +84,8 @@ pkg_setup() {
fi
linux-info_pkg_setup
fi
+   # FIXME: Move python deps that are only required at build time of other 
packages to a split package
+   python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -120,11 +122,6 @@ src_prepare() {
# 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 's:@PYTHON@:python:' \
-   -i gobject/glib-{genmarshal.in,mkenums.in} || die
# Also needed to prevent cross-compile failures, see bug #267603
eautoreconf
 
@@ -179,6 +176,7 @@ multilib_src_configure() {
$(use_enable systemtap dtrace) \
$(use_enable systemtap systemtap) \
$(multilib_native_use_enable utils libelf) \
+   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2016-05-01 Thread Alexandre Rostovtsev
commit: b5b12009bb9ee5e6ddfcceae47c3d96bd6656023
Author: Alexandre Rostovtsev  gentoo  org>
AuthorDate: Sun May  1 14:34:26 2016 +
Commit: Alexandre Rostovtsev  gentoo  org>
CommitDate: Sun May  1 14:37:08 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b12009

dev-libs/glib: fix firefox crash (bug #577686)

Thanks to Franz Fellner.

Package-Manager: portage-2.2.28

 .../files/glib-2.48.0-GContextSpecificGroup.patch  |  44 +++
 dev-libs/glib/glib-2.48.0-r1.ebuild| 300 +
 2 files changed, 344 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch 
b/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
new file mode 100644
index 000..be7ad3d
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.48.0-GContextSpecificGroup.patch
@@ -0,0 +1,44 @@
+From 62f320e6bb09b4e6454e6a49dc3a844b13b9cc34 Mon Sep 17 00:00:00 2001
+From: Allison Ryan Lortie 
+Date: Tue, 26 Apr 2016 10:39:42 +0200
+Subject: [PATCH] GContextSpecificGroup: detach sources
+
+GContextSpecificGroup has been somewhat broken for a rather long time:
+when we remove the last reference on an object held in the group, we try
+to clean up the source, but fail to actually remove it from the
+mainloop.
+
+We will soon stop emitting signals on the source (due to it having been
+removed from the hash table) but any "in flight" signals will still be
+delivered on the source, which continues to exist.  This is a problem if
+the event is being delivered just as the object is being destroyed.
+
+This also means that we leave the source attached to the mainloop
+forever (and next time will create a new one)...
+
+This is demonstrated with the GtkAppChooser dialog which writes an
+update to the mimeapps.list file just as it is closing, triggering the
+app info monitor to fire just as it is being destroyed.
+
+Karl Tomlinson correctly analysed the problem and proposed this fix.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=762994
+---
+ gio/gcontextspecificgroup.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gio/gcontextspecificgroup.c b/gio/gcontextspecificgroup.c
+index b0eb279..211d765 100644
+--- a/gio/gcontextspecificgroup.c
 b/gio/gcontextspecificgroup.c
+@@ -234,6 +234,7 @@ g_context_specific_group_remove (GContextSpecificGroup 
*group,
+ 
+   g_assert (css->instance == instance);
+ 
++  g_source_destroy ((GSource *) css);
+   g_source_unref ((GSource *) css);
+   g_main_context_unref (context);
+ }
+-- 
+2.8.1
+

diff --git a/dev-libs/glib/glib-2.48.0-r1.ebuild 
b/dev-libs/glib/glib-2.48.0-r1.ebuild
new file mode 100644
index 000..2862a56
--- /dev/null
+++ b/dev-libs/glib/glib-2.48.0-r1.ebuild
@@ -0,0 +1,300 @@
+# 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="5"
+PYTHON_COMPAT=( python2_7 )
+# Building with --disable-debug highly unrecommended.  It will build glib in
+# an unusable form as it disables some commonly used API.  Please do not
+# convert this to the use_enable form, as it results in a broken build.
+GCONF_DEBUG="yes"
+# 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 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="
+   !=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+   >=virtual/libffi-3.0.13-r1[${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}]
+   || (
+   >=dev-libs/elfutils-0.142
+   >=dev-libs/libelf-0.8.12
+   >=sys-freebsd/freebsd-lib-9.2_rc1
+   )
+   )
+"
+DEPEND="${RDEPEND}
+   app-text/docbook-xml-dtd:4.1.2
+   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2016-02-28 Thread Pacho Ramos
commit: 499cf8cf9d63d6b3ae14e721ca9ba07b582bcd25
Author: Pacho Ramos  gentoo  org>
AuthorDate: Sun Feb 28 11:59:13 2016 +
Commit: Pacho Ramos  gentoo  org>
CommitDate: Sun Feb 28 12:02:31 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=499cf8cf

dev-libs/glib: Fix memory leak (#575018 by Rick Harris), skip more broken tests

Package-Manager: portage-2.2.27

 dev-libs/glib/files/glib-2.46.2-memleak.patch |  25 ++
 dev-libs/glib/glib-2.46.2-r2.ebuild   | 318 ++
 2 files changed, 343 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.46.2-memleak.patch 
b/dev-libs/glib/files/glib-2.46.2-memleak.patch
new file mode 100644
index 000..e9eca2a
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.46.2-memleak.patch
@@ -0,0 +1,25 @@
+From e98e1eff83c742c73a148dd7b75c00d77e0cee40 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras 
+Date: Wed, 25 Nov 2015 23:29:18 +0200
+Subject: GDBusProxy: Fix a memory leak during initialization
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758641
+---
+ gio/gdbusproxy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
+index 52a22fb..7b1140f 100644
+--- a/gio/gdbusproxy.c
 b/gio/gdbusproxy.c
+@@ -1720,6 +1720,7 @@ async_initable_init_second_finish (GAsyncInitable  
*initable,
+   if (result != NULL)
+ {
+   process_get_all_reply (proxy, result);
++  g_variant_unref (result);
+ }
+ 
+   proxy->priv->initialized = TRUE;
+-- 
+cgit v0.12
+

diff --git a/dev-libs/glib/glib-2.46.2-r2.ebuild 
b/dev-libs/glib/glib-2.46.2-r2.ebuild
new file mode 100644
index 000..759b811
--- /dev/null
+++ b/dev-libs/glib/glib-2.46.2-r2.ebuild
@@ -0,0 +1,318 @@
+# 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="5"
+PYTHON_COMPAT=( python2_7 )
+# Building with --disable-debug highly unrecommended.  It will build glib in
+# an unusable form as it disables some commonly used API.  Please do not
+# convert this to the use_enable form, as it results in a broken build.
+GCONF_DEBUG="yes"
+# 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}
+   http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz; # 
pkg.m4 for eautoreconf
+
+LICENSE="LGPL-2+"
+SLOT="2"
+IUSE="dbus 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="
+   !=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+   >=virtual/libffi-3.0.13-r1[${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}]
+   || (
+   >=dev-libs/elfutils-0.142
+   >=dev-libs/libelf-0.8.12
+   >=sys-freebsd/freebsd-lib-9.2_rc1
+   )
+   )
+"
+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 )
+   !https://bugs.gentoo.org/show_bug.cgi?id=508752
+   if [[ ! -f /proc/net/if_net6 ]]; then
+   sed -i -e "/gdbus\/peer-to-peer/d" 
gio/tests/gdbus-peer.c || die
+   sed -i -e "/gdbus\/delayed-message-processing/d" 
gio/tests/gdbus-peer.c || die
+   sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c 
|| die
+   fi
+
+   # This test is prone to fail, bug #504024, upstream bug #723719
+   sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die
+
+   # https://bugzilla.gnome.org/show_bug.cgi?id=722604
+   sed -i -e "/timer\/stop/d" 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/

2015-10-12 Thread Mike Frysinger
commit: c9a77e1ab93d5af9968d3e449569832aff61c2df
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Oct 13 03:23:40 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Oct 13 03:24:01 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9a77e1a

dev-libs/glib: fix builds w/newer bionic versions

 dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch | 15 +++
 dev-libs/glib/glib-2.44.1-r1.ebuild  |  2 ++
 2 files changed, 17 insertions(+)

diff --git a/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch 
b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch
new file mode 100644
index 000..259b572
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch
@@ -0,0 +1,15 @@
+https://bugzilla.gnome.org/756477
+
+fix build w/newer releases of bionic (android)
+
+--- a/gio/gthreadedresolver.c
 b/gio/gthreadedresolver.c
+@@ -263,7 +263,7 @@ lookup_by_address_finish (GResolver *resolver,
+ 
+ #if defined(G_OS_UNIX)
+ 
+-#ifdef __BIONIC__
++#if defined __BIONIC__ && !defined BIND_4_COMPAT
+ /* Copy from bionic/libc/private/arpa_nameser_compat.h
+  * and bionic/libc/private/arpa_nameser.h */
+ typedef struct {

diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild 
b/dev-libs/glib/glib-2.44.1-r1.ebuild
index d5302bc..25be870 100644
--- a/dev-libs/glib/glib-2.44.1-r1.ebuild
+++ b/dev-libs/glib/glib-2.44.1-r1.ebuild
@@ -151,6 +151,8 @@ src_prepare() {
# gdbus-codegen is a separate package
epatch "${FILESDIR}/${PN}-2.40.0-external-gdbus-codegen.patch"
 
+   epatch "${FILESDIR}/${PN}-2.44.1-bionic-nameser.patch"
+
# leave python shebang alone
sed -e '/${PYTHON}/d' \
-i glib/Makefile.{am,in} || die