diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/glib-2.0')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch | 70 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch | 42 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch | 59 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb) | 7 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc | 34 |
5 files changed, 96 insertions, 116 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch new file mode 100644 index 000000000..c6e4966bb --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch @@ -0,0 +1,70 @@ +From f627fe16099a2b08d8b4e9023ae6b4f352451967 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 6 Nov 2016 08:59:08 -0800 +Subject: [PATCH] Test for pthread_getname_np before using it + +Its a GNU extention and not all libc implement it +musl e.g. implements the setname API but not getname +in any case, it seems to be safer to check for the +function before using it. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + + config.h.in | 3 +++ + configure.ac | 10 ++++++++++ + glib/tests/thread.c | 2 +- + 3 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/config.h.in b/config.h.in +index 2c35ff1..da7ac30 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -326,6 +326,9 @@ + #undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP + + /* Have function pthread_setname_np(const char*) */ ++#undef HAVE_PTHREAD_GETNAME_NP ++ ++/* Have function pthread_setname_np(const char*) */ + #undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID + + /* Have function pthread_setname_np(pthread_t, const char*) */ +diff --git a/configure.ac b/configure.ac +index 4309671..209770a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2121,6 +2121,16 @@ AS_IF([ test x"$have_threads" = xposix], [ + AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP,1, + [Have function pthread_cond_timedwait_relative_np])], + [AC_MSG_RESULT(no)]) ++ dnl gets thread names ++ AC_MSG_CHECKING(for pthread_getname_np(pthread_t, char*, size_t)) ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [#include <pthread.h>], ++ [pthread_getname_np(pthread_self(),"example",0)])], ++ [AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_PTHREAD_GETNAME_NP,1, ++ [Have function pthread_setname_np(const char*)])], ++ [AC_MSG_RESULT(no)]) + dnl Sets thread names on OS X 10.6, iOS 3.2 (and higher) + AC_MSG_CHECKING(for pthread_setname_np(const char*)) + AC_LINK_IFELSE( +diff --git a/glib/tests/thread.c b/glib/tests/thread.c +index 5447836..2f248a6 100644 +--- a/glib/tests/thread.c ++++ b/glib/tests/thread.c +@@ -174,7 +174,7 @@ test_thread5 (void) + static gpointer + thread6_func (gpointer data) + { +-#ifdef HAVE_PTHREAD_SETNAME_NP_WITH_TID ++#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) && defined(HAVE_PTHREAD_GETNAME_NP) + char name[16]; + + pthread_getname_np (pthread_self(), name, 16); +-- +2.10.2 + diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch deleted file mode 100644 index f61fa0ae6..000000000 --- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 16 Apr 2016 13:43:54 -0700 -Subject: [PATCH 2/2] tests: Ignore y2k warnings - -silences -| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime': -| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k] -| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M " - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - glib/tests/gdatetime.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c -index 16a163c..e6062fc 100644 ---- a/glib/tests/gdatetime.c -+++ b/glib/tests/gdatetime.c -@@ -1326,6 +1326,9 @@ test_z (void) - g_time_zone_unref (tz); - } - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-y2k" -+ - static void - test_strftime (void) - { -@@ -1351,6 +1354,7 @@ test_strftime (void) - } - #endif - } -+#pragma GCC diagnostic pop - - static void - test_find_interval (void) --- -2.8.0 - diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch deleted file mode 100644 index dc62b92ef..000000000 --- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch +++ /dev/null @@ -1,59 +0,0 @@ -The autoptr types should be excluded from gobject-introspection parsing as -they're not user-facing. - -Upstream-Status: Submitted -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/gio/gio-autocleanups.h b/gio/gio-autocleanups.h -index a95ba65..24ccc2d 100644 ---- a/gio/gio-autocleanups.h -+++ b/gio/gio-autocleanups.h -@@ -21,6 +21,8 @@ - #error "Only <gio/gio.h> can be included directly." - #endif - -+#ifndef __GI_SCANNER__ -+ - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref) -@@ -146,3 +148,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref) -+ -+#endif -diff --git a/glib/glib-autocleanups.h b/glib/glib-autocleanups.h -index 6355f75..09d28be 100644 ---- a/glib/glib-autocleanups.h -+++ b/glib/glib-autocleanups.h -@@ -21,6 +21,8 @@ - #error "Only <glib.h> can be included directly." - #endif - -+#ifndef __GI_SCANNER__ -+ - static inline void - g_autoptr_cleanup_generic_gfree (void *p) - { -@@ -87,3 +89,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref) - G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free) - G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) -+ -+#endif -diff --git a/gobject/gobject-autocleanups.h b/gobject/gobject-autocleanups.h -index 980203f..a1d4ba1 100644 ---- a/gobject/gobject-autocleanups.h -+++ b/gobject/gobject-autocleanups.h -@@ -21,6 +21,10 @@ - #error "Only <glib-object.h> can be included directly." - #endif - -+#ifndef __GI_SCANNER__ -+ - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref) - G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset) -+ -+#endif diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb index a45f64444..22ea347e1 100644 --- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb +++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb @@ -13,14 +13,13 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://allow-run-media-sdX-drive-mount-if-username-root.patch \ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ file://Enable-more-tests-while-cross-compiling.patch \ - file://gi-exclude.patch \ file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ file://0001-Do-not-ignore-return-value-of-write.patch \ - file://0002-tests-Ignore-y2k-warnings.patch \ + file://0001-Test-for-pthread_getname_np-before-using-it.patch \ " SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \ file://relocate-modules.patch" -SRC_URI[md5sum] = "f4ac1aa2efd4f5798c37625ea697ac57" -SRC_URI[sha256sum] = "f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4" +SRC_URI[md5sum] = "381ab22934f296750d036aa55a397ded" +SRC_URI[sha256sum] = "82ee94bf4c01459b6b00cb9db0545c2237921e3060c0b74cff13fbc020cfd999" diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc index 906e0d4d5..2b30e372d 100644 --- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc +++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc @@ -15,6 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ BUGTRACKER = "http://bugzilla.gnome.org" SECTION = "libs" +CVE_PRODUCT = "glib" + BBCLASSEXTEND = "native nativesdk" DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native" @@ -26,15 +28,17 @@ PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native +inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native manpages S = "${WORKDIR}/glib-${PV}" -PACKAGECONFIG ??= "system-pcre" +PACKAGECONFIG ??= "system-pcre libmount" # To use the system pcre it must be configured with --enable-unicode-properties PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre" +PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux" +PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native" -CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man" +CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap" PRINTF = "--enable-included-printf=no" PRINTF_darwin = "--enable-included-printf=yes" @@ -43,6 +47,9 @@ EXTRA_OECONF = "${PRINTF} ${CORECONF}" EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux" EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu" +# Tell configure that we'll have dbus-daemon on the target for the tests +EXTRA_OECONF_class-target_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}" + do_configure_prepend() { sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in } @@ -90,23 +97,28 @@ do_install_append () { sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums fi + if [ -e ${D}${libdir}/charset.alias ]; then + rm -f ${D}${libdir}/charset.alias + fi +} + +do_install_append_class-target () { + # Tests are only installed on targets, not native builds. Separating this out + # keeps glib-2.0-native from depending on ${DISTRO_FEATURES} if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test fi fi - # Make sure gio-querymodules is unique among multilibs - if test "x${MLPREFIX}" != "x"; then - mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules - fi -} - -do_install_append_libc-musl () { - rm -f ${D}${libdir}/charset.alias + # Make sure gio-querymodules is unique among multilibs + if test "x${MLPREFIX}" != "x"; then + mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules + fi } RDEPENDS_${PN}-ptest += "\ + dbus \ gnome-desktop-testing \ tzdata \ tzdata-americas \ |