From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- ...ror-format-string-errors-from-mismatched-.patch | 56 ++++++ .../add-march-i486-into-CFLAGS-automatically.patch | 39 ++++ .../glib-2.0/glib-2.0/configure-libtool.patch | 60 +++++++ .../glib-2.0/glib-2.0/fix-conflicting-rand.patch | 35 ++++ .../glib-2.0/glib-2.0/gio-test-race.patch | 54 ++++++ .../glib-2.0/glib-2.0-configure-readlink.patch | 29 +++ .../glib-2.0/glib-2.0/glib-gettextize-dir.patch | 24 +++ .../glib-2.0/glib-2.0/gtest-skip-fixes.patch | 197 +++++++++++++++++++++ .../glib-2.0/glib-2.0/ptest-dbus.patch | 65 +++++++ .../glib-2.0/glib-2.0/ptest-paths.patch | 30 ++++ meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 3 + meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch | 20 +++ 12 files changed, 612 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/run-ptest create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch (limited to 'meta/recipes-core/glib-2.0/glib-2.0') diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch new file mode 100644 index 0000000000..9b87d9d547 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch @@ -0,0 +1,56 @@ +From 0167c3340d8201dca8e9031b61703bbc5ed6ce33 Mon Sep 17 00:00:00 2001 +From: Jan Schmidt +Date: Wed, 25 Sep 2013 19:22:26 +1000 +Subject: [PATCH] gio: Fix -Werror format string errors from mismatched ints. + +Upstream-Status: Backport + +--- + gio/gdbusmessage.c | 8 ++++---- + gio/gdbusprivate.c | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c +index ac233a3..ad77aa6 100644 +--- a/gio/gdbusmessage.c ++++ b/gio/gdbusmessage.c +@@ -3468,10 +3468,10 @@ g_dbus_message_print (GDBusMessage *message, + statbuf.st_mode); + g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", + (guint64) statbuf.st_ino); +- g_string_append_printf (fs, "%s" "uid=%d", fs->len > 0 ? "," : "", +- statbuf.st_uid); +- g_string_append_printf (fs, "%s" "gid=%d", fs->len > 0 ? "," : "", +- statbuf.st_gid); ++ g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "", ++ (guint) statbuf.st_uid); ++ g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "", ++ (guint) statbuf.st_gid); + g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "", + major (statbuf.st_rdev), minor (statbuf.st_rdev)); + g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", +diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c +index 0e5bef2..785a0c0 100644 +--- a/gio/gdbusprivate.c ++++ b/gio/gdbusprivate.c +@@ -2155,7 +2155,7 @@ write_message_print_transport_debug (gssize bytes_written, + _g_dbus_debug_print_lock (); + g_print ("========================================================================\n" + "GDBus-debug:Transport:\n" +- " >>>> WROTE %" G_GSIZE_FORMAT " bytes of message with serial %d and\n" ++ " >>>> WROTE %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n" + " size %" G_GSIZE_FORMAT " from offset %" G_GSIZE_FORMAT " on a %s\n", + bytes_written, + g_dbus_message_get_serial (data->message), +@@ -2206,7 +2206,7 @@ read_message_print_transport_debug (gssize bytes_read, + _g_dbus_debug_print_lock (); + g_print ("========================================================================\n" + "GDBus-debug:Transport:\n" +- " <<<< READ %" G_GSIZE_FORMAT " bytes of message with serial %d and\n" ++ " <<<< READ %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n" + " size %d to offset %" G_GSIZE_FORMAT " from a %s\n", + bytes_read, + serial, +-- +1.8.3.1 + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch new file mode 100644 index 0000000000..3aac35a5d3 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch @@ -0,0 +1,39 @@ +From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001 +From: Song.Li +Date: Thu, 5 Jul 2012 15:09:41 +0800 +Subject: [PATCH] add -march=i486 into CFLAGS automatically + +Upstream-Status: Inappropriate [configuration] + +glib configure will check if current gcc need -march=i486, +when gcc need -march=i486 but CFLAGS don't have, +glib configure will abort and advise the user to add -march=i486 or later. +This will break the build process,it's not good for automatic build system. +so change this to adding -march=i485 automatically when it is needed. +--- + configure.ac | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +Index: glib-2.36.0/configure.ac +=================================================================== +--- glib-2.36.0.orig/configure.ac ++++ glib-2.36.0/configure.ac +@@ -2378,7 +2378,7 @@ dnl + dnl Note that the atomic ops are only available with GCC on x86 when + dnl using -march=i486 or higher. If we detect that the atomic ops are + dnl not available but would be available given the right flags, we want +-dnl to abort and advise the user to fix their CFLAGS. It's better to do ++dnl to add -march=i486 automatically to fix their CFLAGS. It's better to do + dnl that then to silently fall back on emulated atomic ops just because + dnl the user had the wrong build environment. + +@@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int + AC_TRY_COMPILE([], + [volatile int atomic = 2;\ + __sync_bool_compare_and_swap (&atomic, 2, 3);], +- [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])], ++ [AC_MSG_WARN([GLib must be build with -march=i486 or later.]) ++ SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"], + []) + CFLAGS="${SAVE_CFLAGS}" + fi diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch new file mode 100644 index 0000000000..1d69a3f290 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch @@ -0,0 +1,60 @@ +From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 28 Apr 2012 18:24:50 +0200 +Subject: [PATCH] configure: use $host_alias-libtool instead of libtool + directly + +Poky renames libtool to $host_alias-libtool. +./$host_alias-libtool isn't created until after configure runs with +libtool >= 2.2.2 +so we can't call # it at this point. We can safely assume a version is +available +from PATH though + +Rebased to glib-2.27.3 by Dongxiao Xu +Rebased to glib-2.32.1 by Martin Jansa + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Martin Jansa +--- + configure.ac | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a6478c6..9a93d60 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then + G_MODULE_LDFLAGS= + else + export SED +- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + fi + dnl G_MODULE_IMPL= don't reset, so cmd-line can override + G_MODULE_NEED_USCORE=0 +@@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then + LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" + dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness + echo "void glib_plugin_test(void) { }" > plugin.c +- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ ++ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ + ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1 +- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ ++ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ + ${LDFLAGS} -module -o plugin.la -export-dynamic \ + -shrext ".o" -avoid-version plugin.lo \ + -rpath /dont/care >/dev/null 2>&1 +@@ -1614,7 +1614,7 @@ fi + + AC_MSG_CHECKING(for the suffix of module shared libraries) + export SED +-shrext_cmds=`./libtool --config | grep '^shrext_cmds='` ++shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='` + eval $shrext_cmds + module=yes eval std_shrext=$shrext_cmds + # chop the initial dot +-- +1.7.8.6 + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch new file mode 100644 index 0000000000..1571112b0e --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch @@ -0,0 +1,35 @@ +Rename 'rand' variable to avoid conflict. + +Upstream-Status: pending +Signed-off-by: Björn Stenberg + +diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c +--- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100 ++++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100 +@@ -9,7 +9,7 @@ + #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST)) + #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass)) + +-static GRand *rand; ++static GRand *grand; + + typedef struct _GTest GTest; + typedef struct _GTestClass GTestClass; +@@ -84,7 +84,7 @@ + NULL + }; + +- rand = g_rand_new(); ++ grand = g_rand_new(); + + test_type = g_type_register_static (G_TYPE_OBJECT, "GTest", + &test_info, 0); +@@ -218,7 +218,7 @@ + static void + my_test_do_prop (GTest * test) + { +- test->value = g_rand_int (rand); ++ test->value = g_rand_int (grand); + g_object_notify (G_OBJECT (test), "test-prop"); + } + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch new file mode 100644 index 0000000000..720ea6c328 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch @@ -0,0 +1,54 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton + +From a047a0270ee5faf1d9d6080cbc613defdf52baea Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Tue, 4 Feb 2014 13:15:08 +0000 +Subject: [PATCH] gio/tests: fix race when generating code + +There is a race condition in the makefile that can result in build failures like this in parallel builds: + +| ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef +| #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__ + +This is because a rule like this: + +x.c x.h: prerequisites + @commands + +doesn't consider x.c and x.h together. Instead, it expands to two rules, one to +generate x.c and one to generate x.h, which happen to run the same commands. In +the worst case they execute in parallel, overwriting each other's output. + +Signed-off-by: Ross Burton + +https://bugzilla.gnome.org/show_bug.cgi?id=723616 +--- + gio/tests/Makefile.am | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am +index 0beb239..270faf6 100644 +--- a/gio/tests/Makefile.am ++++ b/gio/tests/Makefile.am +@@ -436,7 +436,7 @@ gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumode + gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c + + gdbus-test-codegen.o: gdbus-test-codegen-generated.h +-gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen ++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 \ +@@ -455,6 +455,8 @@ gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml + --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \ + $(srcdir)/test-codegen.xml \ + $(NULL) ++gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h ++ @: # Generated as side-effect of .h + + EXTRA_DIST += test-codegen.xml + CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml +-- +1.7.10.4 + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch new file mode 100644 index 0000000000..9759d11e3c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch @@ -0,0 +1,29 @@ +configure.ac: change readlink -f to -m + +Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir +may not exist. + +This patch should go to the upstream, I will send it sooner. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir, + [], + [with_runtime_libdir=""]) + GLIB_RUNTIME_LIBDIR="$with_runtime_libdir" +-ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`" ++ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`" + AC_SUBST(GLIB_RUNTIME_LIBDIR) + AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR) + AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"]) +-- +1.8.1.2 + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch new file mode 100644 index 0000000000..ee435111fc --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch @@ -0,0 +1,24 @@ +# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container +# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d +# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4. +# +# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more +# portable here. mark for upstream +# +# by Kevin Tian , 06/25/2010 +# Rebased by Dongxiao Xu , 11/16/2010 + +Upstream-Status: Inappropriate [configuration] + +diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in +--- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800 ++++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800 +@@ -52,7 +52,7 @@ + datadir=@datadir@ + datarootdir=@datarootdir@ + +-gettext_dir=$prefix/share/glib-2.0/gettext ++gettext_dir=@datadir@/glib-2.0/gettext + + while test $# -gt 0; do + case "$1" in diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch new file mode 100644 index 0000000000..3dba0ee31b --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch @@ -0,0 +1,197 @@ +Fix the handling of skipped tests so that it follows what automake does. + +Upstream-Status: Backport [https://bugzilla.gnome.org/show_bug.cgi?id=720263] +Signed-off-by: Ross Burton + +diff --git a/glib/gtestutils.c b/glib/gtestutils.c +index bc7bbcf..feaafa3 100644 +--- a/glib/gtestutils.c ++++ b/glib/gtestutils.c +@@ -607,9 +607,10 @@ static gchar *test_run_name = ""; + static GSList **test_filename_free_list; + static guint test_run_forks = 0; + static guint test_run_count = 0; ++static guint test_skipped_count = 0; + static GTestResult test_run_success = G_TEST_RUN_FAILURE; + static gchar *test_run_msg = NULL; +-static guint test_skip_count = 0; ++static guint test_startup_skip_count = 0; + static GTimer *test_user_timer = NULL; + static double test_user_stamp = 0; + static GSList *test_paths = NULL; +@@ -765,6 +766,8 @@ g_test_log (GTestLogType lbit, + g_print ("Bail out!\n"); + abort(); + } ++ if (largs[0] == G_TEST_RUN_SKIPPED) ++ test_skipped_count++; + break; + case G_TEST_LOG_MIN_RESULT: + if (test_tap_log) +@@ -869,11 +872,11 @@ parse_args (gint *argc_p, + { + gchar *equal = argv[i] + 16; + if (*equal == '=') +- test_skip_count = g_ascii_strtoull (equal + 1, NULL, 0); ++ test_startup_skip_count = g_ascii_strtoull (equal + 1, NULL, 0); + else if (i + 1 < argc) + { + argv[i++] = NULL; +- test_skip_count = g_ascii_strtoull (argv[i], NULL, 0); ++ test_startup_skip_count = g_ascii_strtoull (argv[i], NULL, 0); + } + argv[i] = NULL; + } +@@ -1516,14 +1519,21 @@ g_test_get_root (void) + * g_test_run_suite() or g_test_run() may only be called once + * in a program. + * +- * Returns: 0 on success ++ * Returns: 0 on success, 1 on failure (assuming it returns at all), ++ * 77 if all tests were skipped with g_test_skip(). + * + * Since: 2.16 + */ + int + g_test_run (void) + { +- return g_test_run_suite (g_test_get_root()); ++ if (g_test_run_suite (g_test_get_root()) != 0) ++ return 1; ++ ++ if (test_run_count > 0 && test_run_count == test_skipped_count) ++ return 77; ++ else ++ return 0; + } + + /** +@@ -2063,7 +2073,7 @@ test_case_run (GTestCase *tc) + } + } + +- if (++test_run_count <= test_skip_count) ++ if (++test_run_count <= test_startup_skip_count) + g_test_log (G_TEST_LOG_SKIP_CASE, test_run_name, NULL, 0, NULL); + else if (test_run_list) + { +@@ -2117,7 +2127,8 @@ test_case_run (GTestCase *tc) + g_free (test_uri_base); + test_uri_base = old_base; + +- return success == G_TEST_RUN_SUCCESS; ++ return (success == G_TEST_RUN_SUCCESS || ++ success == G_TEST_RUN_SKIPPED); + } + + static int +diff --git a/glib/tests/testing.c b/glib/tests/testing.c +index 20c2e79..1025f12 100644 +--- a/glib/tests/testing.c ++++ b/glib/tests/testing.c +@@ -575,10 +575,93 @@ test_nonfatal (void) + g_test_trap_assert_stdout ("*The End*"); + } + ++static void ++test_skip (void) ++{ ++ g_test_skip ("Skipped should count as passed, not failed"); ++} ++ ++static void ++test_pass (void) ++{ ++} ++ ++static const char *argv0; ++ ++static void ++test_skip_all (void) ++{ ++ GPtrArray *argv; ++ GError *error = NULL; ++ int status; ++ ++ argv = g_ptr_array_new (); ++ g_ptr_array_add (argv, (char *) argv0); ++ g_ptr_array_add (argv, "--GTestSubprocess"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip"); ++ g_ptr_array_add (argv, NULL); ++ ++ g_spawn_sync (NULL, (char **) argv->pdata, NULL, ++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, ++ NULL, NULL, NULL, NULL, &status, ++ &error); ++ g_assert_no_error (error); ++ ++ g_spawn_check_exit_status (status, &error); ++ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77); ++ g_clear_error (&error); ++ ++ g_ptr_array_set_size (argv, 0); ++ g_ptr_array_add (argv, (char *) argv0); ++ g_ptr_array_add (argv, "--GTestSubprocess"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip2"); ++ g_ptr_array_add (argv, NULL); ++ ++ g_spawn_sync (NULL, (char **) argv->pdata, NULL, ++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, ++ NULL, NULL, NULL, NULL, &status, ++ &error); ++ g_assert_no_error (error); ++ ++ g_spawn_check_exit_status (status, &error); ++ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77); ++ g_clear_error (&error); ++ ++ g_ptr_array_set_size (argv, 0); ++ g_ptr_array_add (argv, (char *) argv0); ++ g_ptr_array_add (argv, "--GTestSubprocess"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/pass"); ++ g_ptr_array_add (argv, "-p"); ++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1"); ++ g_ptr_array_add (argv, NULL); ++ ++ g_spawn_sync (NULL, (char **) argv->pdata, NULL, ++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, ++ NULL, NULL, NULL, NULL, &status, ++ &error); ++ g_assert_no_error (error); ++ ++ g_spawn_check_exit_status (status, &error); ++ g_assert_no_error (error); ++ ++ g_ptr_array_unref (argv); ++} ++ + int + main (int argc, + char *argv[]) + { ++ argv0 = argv[0]; ++ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/random-generator/rand-1", test_rand1); +@@ -633,5 +716,11 @@ main (int argc, + + g_test_add_func ("/misc/nonfatal", test_nonfatal); + ++ g_test_add_func ("/misc/skip", test_skip); ++ g_test_add_func ("/misc/skip-all", test_skip_all); ++ g_test_add_func ("/misc/skip-all/subprocess/skip1", test_skip); ++ g_test_add_func ("/misc/skip-all/subprocess/skip2", test_skip); ++ g_test_add_func ("/misc/skip-all/subprocess/pass", test_pass); ++ + return g_test_run(); + } diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch new file mode 100644 index 0000000000..0db8fd1609 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch @@ -0,0 +1,65 @@ +Fix dbus-appinfo from attempting to use the session's bus, and hanging if there +isn't one present. + +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 940fa98290812789d095d93ff1c550cd86fb2428 Mon Sep 17 00:00:00 2001 +From: Xavier Claessens +Date: Mon, 28 Oct 2013 21:18:54 +0000 +Subject: Tests: add session_bus_run() and use it where possible + +This is to avoid having again the subtil bug in dbus-appinfo.c: +session_bus_down() was called before g_test_run() so the test was +running on the user's dbus session. + +https://bugzilla.gnome.org/show_bug.cgi?id=697348 +--- +diff --git a/gio/tests/dbus-appinfo.c b/gio/tests/dbus-appinfo.c +index ca11e98..7698429 100644 +--- a/gio/tests/dbus-appinfo.c ++++ b/gio/tests/dbus-appinfo.c +@@ -280,11 +280,7 @@ main (int argc, char **argv) + { + g_test_init (&argc, &argv, NULL); + +- session_bus_up (); +- + g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo); + +- session_bus_down (); +- +- return g_test_run (); ++ return session_bus_run (); + } +diff --git a/gio/tests/gdbus-sessionbus.c b/gio/tests/gdbus-sessionbus.c +index 68c4449..13c2edb 100644 +--- a/gio/tests/gdbus-sessionbus.c ++++ b/gio/tests/gdbus-sessionbus.c +@@ -47,3 +47,14 @@ session_bus_down (void) + g_clear_object (&singleton); + } + ++gint ++session_bus_run (void) ++{ ++ gint ret; ++ ++ session_bus_up (); ++ ret = g_test_run (); ++ session_bus_down (); ++ ++ return ret; ++} +diff --git a/gio/tests/gdbus-sessionbus.h b/gio/tests/gdbus-sessionbus.h +index 7ef3abd..284cd00 100644 +--- a/gio/tests/gdbus-sessionbus.h ++++ b/gio/tests/gdbus-sessionbus.h +@@ -30,6 +30,7 @@ G_BEGIN_DECLS + void session_bus_up (void); + void session_bus_stop (void); + void session_bus_down (void); ++gint session_bus_run (void); + + G_END_DECLS + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch new file mode 100644 index 0000000000..f3be02770c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch @@ -0,0 +1,30 @@ +Instead of writing the temporary mapping files in the mappedfile test to the +user runtime directory, write them to $TMP. The runtime directory may not +currently exist if the test is executed on a non-desktop system and the test +doesn't attempt to create the directory structure. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c +index 40e0e60..27a24be 100644 +--- a/glib/tests/mappedfile.c ++++ b/glib/tests/mappedfile.c +@@ -81,7 +81,7 @@ test_writable (void) + const gchar *new = "abcdefghijklmnopqrstuvxyz"; + gchar *tmp_copy_path; + +- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); ++ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); + + g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); + g_assert_no_error (error); +@@ -125,7 +125,7 @@ test_writable_fd (void) + int fd; + gchar *tmp_copy_path; + +- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); ++ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); + + g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); + g_assert_no_error (error); diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest new file mode 100644 index 0000000000..130ae09b6c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner glib diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch new file mode 100644 index 0000000000..2a154fdd4a --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch @@ -0,0 +1,20 @@ +Fix DATADIRNAME on uclibc/Linux + +translation files are always installed under PREFIX/share/locale in uclibc +based systems therefore lets set DATADIRNAME to "share". + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: glib-2.38.2/m4macros/glib-gettext.m4 +=================================================================== +--- glib-2.38.2.orig/m4macros/glib-gettext.m4 2013-11-07 07:29:13.000000000 -0800 ++++ glib-2.38.2/m4macros/glib-gettext.m4 2014-03-15 14:51:54.712135644 -0700 +@@ -239,7 +239,7 @@ + [CATOBJEXT=.mo + DATADIRNAME=lib]) + ;; +- *-*-openbsd*) ++ *-*-openbsd* | *-*-linux-uclibc*) + CATOBJEXT=.mo + DATADIRNAME=share + ;; -- cgit v1.2.3-54-g00ecf