diff options
Diffstat (limited to 'poky/meta/recipes-core')
139 files changed, 1578 insertions, 5464 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox-inittab_1.33.0.bb b/poky/meta/recipes-core/busybox/busybox-inittab_1.33.0.bb index 0021e4551..3804f4f7b 100644 --- a/poky/meta/recipes-core/busybox/busybox-inittab_1.33.0.bb +++ b/poky/meta/recipes-core/busybox/busybox-inittab_1.33.0.bb @@ -44,9 +44,6 @@ EOF fi } -do_install_append_qemuppc64 () { - echo "9:12345:respawn:${base_sbindir}/getty 38400 hvc0" >> ${D}${sysconfdir}/inittab -} pkg_postinst_${PN} () { # run this on host and on target diff --git a/poky/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch b/poky/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch new file mode 100644 index 000000000..e0a22c5bb --- /dev/null +++ b/poky/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch @@ -0,0 +1,28 @@ +From bff7f16f7f41de8df67beb03722f235828ef2249 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 3 May 2021 15:48:19 -0700 +Subject: [PATCH] gen_build_files: Use C locale when calling sed on globbed files + +sort order is different based on chosen locale and also default shell +being bash or dash + +This sets the environment variable LC_ALL to the value C, which will +enforce bytewise sorting, irrespective of the shell + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scripts/gen_build_files.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/gen_build_files.sh ++++ b/scripts/gen_build_files.sh +@@ -4,6 +4,8 @@ + # but users complain that many sed implementations + # are misinterpreting --. + ++export LC_ALL=C ++ + test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; } + + # cd to objtree diff --git a/poky/meta/recipes-core/busybox/busybox/longopts.cfg b/poky/meta/recipes-core/busybox/busybox/longopts.cfg new file mode 100644 index 000000000..dcfab9991 --- /dev/null +++ b/poky/meta/recipes-core/busybox/busybox/longopts.cfg @@ -0,0 +1,15 @@ +CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_BC_LONG_OPTIONS=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y diff --git a/poky/meta/recipes-core/busybox/busybox_1.33.0.bb b/poky/meta/recipes-core/busybox/busybox_1.33.1.bb index 1a3f218bc..a71ff530c 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.33.0.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.33.1.bb @@ -31,6 +31,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://sha1sum.cfg \ file://sha256sum.cfg \ file://getopts.cfg \ + file://longopts.cfg \ file://resize.cfg \ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ ${@["", "file://rcS.default"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ @@ -46,7 +47,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ file://rev.cfg \ file://pgrep.cfg \ -" + file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ + " SRC_URI_append_libc-musl = " file://musl.cfg " -SRC_URI[tarball.sha256sum] = "d568681c91a85edc6710770cebc1e80e042ad74d305b5c2e6d57a5f3de3b8fbd" +SRC_URI[tarball.sha256sum] = "12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28" diff --git a/poky/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch b/poky/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch new file mode 100644 index 000000000..06b6307da --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch @@ -0,0 +1,167 @@ +From 3a48610860a9a75692d2cbedde69ac15269d540a Mon Sep 17 00:00:00 2001 +Message-Id: <3a48610860a9a75692d2cbedde69ac15269d540a.1624302273.git.wallinux@gmail.com> +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Wed, 15 Apr 2020 20:50:32 -0700 +Subject: [PATCH] fts: remove NOSTAT_LEAF_OPTIMIZATION +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It caused ‘find’ and ‘du’ to dump core, and it was useful +only for obsolescent Linux filesystems anyway. Problem reported in: +https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html +Quite possibly there is still a serious underlying fts bug with +tight-loop-check and mutating file systems, but if so this patch +should cause the bug to be triggered less often. +* lib/fts.c (enum leaf_optimization): Remove +NOSTAT_LEAF_OPTIMIZATION, as it’s problematic. +(S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed. +(leaf_optimization): Remove special cases for ReiserFS and XFS. +(fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code. +* lib/fts_.h (struct _ftsent.fts_n_dirs_remaining): +Remove. All uses removed. + +Upstream-Status: Backport [upstream gnulib commit: +47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d] + +Signed-off-by: Anders Wallin <wallinux@gmail.com> +--- + lib/fts.c | 56 ++++++++---------------------------------------------- + lib/fts_.h | 5 ----- + 2 files changed, 8 insertions(+), 53 deletions(-) + +diff --git a/lib/fts.c b/lib/fts.c +index d3a0472..ade8c33 100644 +--- a/lib/fts.c ++++ b/lib/fts.c +@@ -445,7 +445,6 @@ fts_open (char * const *argv, + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; +- parent->fts_n_dirs_remaining = -1; + } + + /* The classic fts implementation would call fts_stat with +@@ -634,9 +633,8 @@ fts_close (FTS *sp) + } + + /* Minimum link count of a traditional Unix directory. When leaf +- optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is +- an upper bound on the number of subdirectories (counting "." and +- ".."). */ ++ optimization is OK and a directory's st_nlink == MIN_DIR_NLINK, ++ then the directory has no subdirectories. */ + enum { MIN_DIR_NLINK = 2 }; + + /* Whether leaf optimization is OK for a directory. */ +@@ -645,12 +643,8 @@ enum leaf_optimization + /* st_nlink is not reliable for this directory's subdirectories. */ + NO_LEAF_OPTIMIZATION, + +- /* Leaf optimization is OK, but is not useful for avoiding stat calls. */ +- OK_LEAF_OPTIMIZATION, +- +- /* Leaf optimization is not only OK: it is useful for avoiding +- stat calls, because dirent.d_type does not work. */ +- NOSTAT_LEAF_OPTIMIZATION ++ /* st_nlink == 2 means the directory lacks subdirectories. */ ++ OK_LEAF_OPTIMIZATION + }; + + #if (defined __linux__ || defined __ANDROID__) \ +@@ -663,9 +657,7 @@ enum leaf_optimization + # define S_MAGIC_CIFS 0xFF534D42 + # define S_MAGIC_NFS 0x6969 + # define S_MAGIC_PROC 0x9FA0 +-# define S_MAGIC_REISERFS 0x52654973 + # define S_MAGIC_TMPFS 0x1021994 +-# define S_MAGIC_XFS 0x58465342 + + # ifdef HAVE___FSWORD_T + typedef __fsword_t fsword; +@@ -782,23 +774,15 @@ dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) + } + + /* Given an FTS entry P for a directory with descriptor DIR_FD, +- return true if it is both useful and valid to apply leaf optimization. +- The optimization is useful only for file systems that lack usable +- dirent.d_type info. The optimization is valid if an st_nlink value +- of at least MIN_DIR_NLINK is an upper bound on the number of +- subdirectories of D, counting "." and ".." as subdirectories. ++ return whether it is valid to apply leaf optimization. ++ The optimization is valid if a directory's st_nlink value equal ++ to MIN_DIR_NLINK means the directory has no subdirectories. + DIR_FD is negative if unavailable. */ + static enum leaf_optimization + leaf_optimization (FTSENT const *p, int dir_fd) + { + switch (filesystem_type (p, dir_fd)) + { +- /* List here the file system types that may lack usable dirent.d_type +- info, yet for which the optimization does apply. */ +- case S_MAGIC_REISERFS: +- case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */ +- return NOSTAT_LEAF_OPTIMIZATION; +- + case 0: + /* Leaf optimization is unsafe if the file system type is unknown. */ + FALLTHROUGH; +@@ -1023,26 +1007,7 @@ check_for_dir: + if (p->fts_info == FTS_NSOK) + { + if (p->fts_statp->st_size == FTS_STAT_REQUIRED) +- { +- FTSENT *parent = p->fts_parent; +- if (parent->fts_n_dirs_remaining == 0 +- && ISSET(FTS_NOSTAT) +- && ISSET(FTS_PHYSICAL) +- && (leaf_optimization (parent, sp->fts_cwd_fd) +- == NOSTAT_LEAF_OPTIMIZATION)) +- { +- /* nothing more needed */ +- } +- else +- { +- p->fts_info = fts_stat(sp, p, false); +- if (S_ISDIR(p->fts_statp->st_mode) +- && p->fts_level != FTS_ROOTLEVEL +- && 0 < parent->fts_n_dirs_remaining +- && parent->fts_n_dirs_remaining != (nlink_t) -1) +- parent->fts_n_dirs_remaining--; +- } +- } ++ p->fts_info = fts_stat(sp, p, false); + else + fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); + } +@@ -1826,11 +1791,6 @@ err: memset(sbp, 0, sizeof(struct stat)); + } + + if (S_ISDIR(sbp->st_mode)) { +- p->fts_n_dirs_remaining +- = ((sbp->st_nlink < MIN_DIR_NLINK +- || p->fts_level <= FTS_ROOTLEVEL) +- ? -1 +- : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK)); + if (ISDOT(p->fts_name)) { + /* Command-line "." and ".." are real directories. */ + return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); +diff --git a/lib/fts_.h b/lib/fts_.h +index 6c7d0ce..15c248c 100644 +--- a/lib/fts_.h ++++ b/lib/fts_.h +@@ -219,11 +219,6 @@ typedef struct _ftsent { + + size_t fts_namelen; /* strlen(fts_name) */ + +- /* If not (nlink_t) -1, an upper bound on the number of +- remaining subdirectories of interest. If this becomes +- zero, some work can be avoided. */ +- nlink_t fts_n_dirs_remaining; +- + # define FTS_D 1 /* preorder directory */ + # define FTS_DC 2 /* directory that causes cycles */ + # define FTS_DEFAULT 3 /* none of the above */ +-- +2.32.0 + diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb index c1962ccb9..dd271d496 100644 --- a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb +++ b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb @@ -21,11 +21,16 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://0001-local.mk-fix-cross-compiling-problem.patch \ file://run-ptest \ file://0001-ls-restore-8.31-behavior-on-removed-directories.patch \ + file://0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch \ " SRC_URI[md5sum] = "022042695b7d5bcf1a93559a9735e668" SRC_URI[sha256sum] = "4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa" +# http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 +# runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue. +CVE_CHECK_WHITELIST += "CVE-2016-2781" + EXTRA_OECONF_class-native = "--without-gmp" EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch,hostname" diff --git a/poky/meta/recipes-core/dbus/dbus-glib_0.110.bb b/poky/meta/recipes-core/dbus/dbus-glib_0.112.bb index 0b45805cf..003c3accc 100644 --- a/poky/meta/recipes-core/dbus/dbus-glib_0.110.bb +++ b/poky/meta/recipes-core/dbus/dbus-glib_0.112.bb @@ -3,8 +3,8 @@ DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \ the D-Bus library with the GLib thread abstraction and main loop." HOMEPAGE = "https://www.freedesktop.org/Software/dbus" LICENSE = "AFL-2.1 | GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \ - file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c" +LIC_FILES_CHKSUM = "file://COPYING;md5=c31c73c1d8f5d06784b2ccd22e42d641 \ + file://dbus/dbus-glib.h;beginline=7;endline=21;md5=c374833bd817988323f3a8fda0dc7f48" SECTION = "base" DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus" @@ -14,8 +14,8 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.g file://no-examples.patch \ file://test-install-makefile.patch \ " -SRC_URI[md5sum] = "d7cebf1d69445cbd28b4983392145192" -SRC_URI[sha256sum] = "7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825" +SRC_URI[md5sum] = "021e6c8a288df02c227e4aafbf7e7527" +SRC_URI[sha256sum] = "7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a" inherit autotools pkgconfig gettext bash-completion gtk-doc diff --git a/poky/meta/recipes-core/ell/ell_0.38.bb b/poky/meta/recipes-core/ell/ell_0.41.bb index 7d3a33997..5fd3077bc 100644 --- a/poky/meta/recipes-core/ell/ell_0.38.bb +++ b/poky/meta/recipes-core/ell/ell_0.41.bb @@ -17,7 +17,7 @@ inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \ file://0001-pem.c-do-not-use-rawmemchr.patch \ " -SRC_URI[sha256sum] = "c1b7ae5676eec310f08757b3d8652b8e818776be1897fb5deb59e55f02a012a7" +SRC_URI[sha256sum] = "4e8dba6c53cf152dbd0fd1dc3d4c7b04abf79e20a948895f85943e586870505c" do_configure_prepend () { mkdir -p ${S}/build-aux diff --git a/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch b/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch deleted file mode 100644 index c5c18ead7..000000000 --- a/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch +++ /dev/null @@ -1,83 +0,0 @@ -From aa84835a00bfd65e784d58411e76f60658e939dc Mon Sep 17 00:00:00 2001 -From: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com> -Date: Tue, 18 Feb 2020 19:04:55 +0200 -Subject: [PATCH] Add output of tests result - -Added console output of testing results in form 'RESULT: TEST_NAME'. - -Changed verbose mode of test application set by '-v' ('--verbose') -argument to CK_NORMAL. -Added new supported argument '-vv' ('--extra-verbose') that changes -verbose mode of test application to CK_VERBOSE. Results of each test -are shown in output only if this mode is set. - -Upstream-Status: Denied - -This patch changes potentially deprecated feature that shoud be changed -in upstream. [https://github.com/libexpat/libexpat/issues/382] - -Signed-off-by: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com> ---- - tests/minicheck.c | 10 +++++++++- - tests/runtests.c | 4 +++- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/expat/tests/minicheck.c b/expat/tests/minicheck.c -index a5a1efb..94fa412 100644 ---- a/tests/minicheck.c -+++ b/tests/minicheck.c -@@ -164,6 +164,8 @@ srunner_run_all(SRunner *runner, int verbosity) { - if (tc->setup != NULL) { - /* setup */ - if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("SKIP: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } -@@ -171,6 +173,8 @@ srunner_run_all(SRunner *runner, int verbosity) { - } - /* test */ - if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("FAIL: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } -@@ -178,12 +182,16 @@ srunner_run_all(SRunner *runner, int verbosity) { - - /* teardown */ - if (tc->teardown != NULL) { -- if (setjmp(env)) { -+ if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("PASS: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } - tc->teardown(); - } -+ if (verbosity >= CK_VERBOSE) -+ printf("PASS: %s\n", _check_current_function); - } - tc = tc->next_tcase; - } -diff --git a/tests/runtests.c b/expat/tests/runtests.c -index 7791fe0..75724e5 100644 ---- a/tests/runtests.c -+++ b/tests/runtests.c -@@ -11619,9 +11619,11 @@ main(int argc, char *argv[]) { - for (i = 1; i < argc; ++i) { - char *opt = argv[i]; - if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0) -- verbosity = CK_VERBOSE; -+ verbosity = CK_NORMAL; - else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0) - verbosity = CK_SILENT; -+ else if (strcmp(opt, "-vv") == 0 || strcmp(opt, "--extra-verbose") == 0) -+ verbosity = CK_VERBOSE; - else { - fprintf(stderr, "runtests: unknown option '%s'\n", opt); - return 2; --- -2.17.1 diff --git a/poky/meta/recipes-core/expat/expat/run-ptest b/poky/meta/recipes-core/expat/expat/run-ptest index 1b39cec8e..59d8ab57e 100644 --- a/poky/meta/recipes-core/expat/expat/run-ptest +++ b/poky/meta/recipes-core/expat/expat/run-ptest @@ -18,6 +18,6 @@ TIME=$(which time) echo "Architecture: $(uname -m)" > ${output} echo "Image: $(uname -sr)" >> ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -v" |& tee -a ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -v" |& tee -a ${output} echo diff --git a/poky/meta/recipes-core/expat/expat_2.2.10.bb b/poky/meta/recipes-core/expat/expat_2.4.1.bb index fa263775b..451158a5d 100644 --- a/poky/meta/recipes-core/expat/expat_2.2.10.bb +++ b/poky/meta/recipes-core/expat/expat_2.4.1.bb @@ -8,11 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9" SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \ file://libtool-tag.patch \ - file://run-ptest \ - file://0001-Add-output-of-tests-result.patch \ - " + file://run-ptest \ + " -SRC_URI[sha256sum] = "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5" +SRC_URI[sha256sum] = "2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40" EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF" @@ -25,3 +24,5 @@ do_install_ptest_class-target() { } BBCLASSEXTEND += "native nativesdk" + +CVE_PRODUCT = "expat libexpat" diff --git a/poky/meta/recipes-core/gettext/gettext_0.21.bb b/poky/meta/recipes-core/gettext/gettext_0.21.bb index bc14867bb..b86e8d838 100644 --- a/poky/meta/recipes-core/gettext/gettext_0.21.bb +++ b/poky/meta/recipes-core/gettext/gettext_0.21.bb @@ -174,7 +174,7 @@ do_install_ptest() { fi } -RDEPENDS_${PN}-ptest += "make" +RDEPENDS_${PN}-ptest += "make xz" RDEPENDS_${PN}-ptest_append_libc-glibc = "\ glibc-gconv-big5 \ glibc-charmap-big5 \ diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch index d6765b163..8a6d46df7 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch @@ -17,16 +17,16 @@ diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 3a19c82..b762835 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build -@@ -12,7 +12,7 @@ test_c_args = [ - '-UG_DISABLE_ASSERT', - ] +@@ -27,7 +27,7 @@ test_c_args = [ + endif # libutil.length() > 0 + endif # build_machine.system() == 'linux' -if host_machine.system() == 'windows' +if host_system == 'windows' common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] endif -@@ -133,7 +133,7 @@ else +@@ -148,7 +148,7 @@ else endif # Test programs buildable on UNIX only @@ -35,7 +35,7 @@ index 3a19c82..b762835 100644 gio_tests += { 'file' : {}, 'gdbus-peer' : { -@@ -385,7 +385,7 @@ if host_machine.system() != 'windows' +@@ -402,7 +402,7 @@ if host_machine.system() != 'windows' endif # unix # Test programs buildable on Windows only @@ -44,7 +44,7 @@ index 3a19c82..b762835 100644 gio_tests += {'win32-streams' : {}} endif -@@ -455,7 +455,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' +@@ -472,7 +472,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' } endif @@ -57,7 +57,7 @@ diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 6eb23e8..36eb919 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build -@@ -137,7 +137,7 @@ if glib_conf.has('HAVE_EVENTFD') +@@ -142,7 +142,7 @@ if glib_conf.has('HAVE_EVENTFD') } endif diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch index 508c8c3ba..fbdd4c266 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch @@ -15,8 +15,8 @@ diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py index 51de0ed..ca98c9d 100644 --- a/gio/tests/codegen.py +++ b/gio/tests/codegen.py -@@ -51,7 +51,7 @@ class TestCodegen(unittest.TestCase): - cwd = '' +@@ -55,7 +55,7 @@ class TestCodegen(unittest.TestCase): + cwd = "" def setUp(self): - self.timeout_seconds = 10 # seconds per test diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch deleted file mode 100644 index 485218652..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch +++ /dev/null @@ -1,403 +0,0 @@ -From fab561f8d05794329184cd81f9ab9d9d77dcc22a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:12:22 +0000 -Subject: [PATCH 01/29] gobject: Drop use of volatile from get_type() macros -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -http://isvolatileusefulwiththreads.in/c/ - -It’s possible that the variables here are only marked as volatile -because they’re arguments to `g_once_*()`. Those arguments will be -modified in a subsequent commit. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - docs/reference/gobject/glib-mkenums.xml | 8 ++--- - docs/reference/gobject/tut_gtype.xml | 2 +- - gio/gioenumtypes.c.template | 8 ++--- - gio/tests/gsettings.c | 4 +-- - gobject/gbinding.c | 8 ++--- - gobject/gboxed.c | 8 ++--- - gobject/glib-enumtypes.c.template | 8 ++--- - gobject/gsourceclosure.c | 2 +- - gobject/gtype.h | 48 ++++++++++++------------- - gobject/tests/signals.c | 16 ++++----- - 10 files changed, 56 insertions(+), 56 deletions(-) - -diff --git a/docs/reference/gobject/glib-mkenums.xml b/docs/reference/gobject/glib-mkenums.xml -index 2200328ed..ce250a3ff 100644 ---- a/docs/reference/gobject/glib-mkenums.xml -+++ b/docs/reference/gobject/glib-mkenums.xml -@@ -480,9 +480,9 @@ A C source template file will typically look like this: - GType - @enum_name@_get_type (void) - { -- static volatile gsize g_@type@_type_id__volatile; -+ static gsize static_g_@type@_type_id; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_@type@_type_id)) - { - static const G@Type@Value values[] = { - /*** END value-header ***/ -@@ -498,9 +498,9 @@ GType - GType g_@type@_type_id = - g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); - -- g_once_init_leave (&g_@type@_type_id__volatile, g_@type@_type_id); -+ g_once_init_leave (&static_g_@type@_type_id, g_@type@_type_id); - } -- return g_@type@_type_id__volatile; -+ return static_g_@type@_type_id; - } - - /*** END value-tail ***/ -diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml -index 25e37dc48..ee042889d 100644 ---- a/docs/reference/gobject/tut_gtype.xml -+++ b/docs/reference/gobject/tut_gtype.xml -@@ -852,7 +852,7 @@ viewer_editable_default_init (ViewerEditableInterface *iface) - GType - viewer_editable_get_type (void) - { -- static volatile gsize type_id = 0; -+ static gsize type_id = 0; - if (g_once_init_enter (&type_id)) { - const GTypeInfo info = { - sizeof (ViewerEditableInterface), -diff --git a/gio/gioenumtypes.c.template b/gio/gioenumtypes.c.template -index e9adc4a38..948a01201 100644 ---- a/gio/gioenumtypes.c.template -+++ b/gio/gioenumtypes.c.template -@@ -13,9 +13,9 @@ - GType - @enum_name@_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - static const G@Type@Value values[] = { - /*** END value-header ***/ -@@ -29,10 +29,10 @@ GType - }; - GType g_define_type_id = - g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - /*** END value-tail ***/ -diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c -index 2f81ae6c3..179d0fd2f 100644 ---- a/gio/tests/gsettings.c -+++ b/gio/tests/gsettings.c -@@ -1060,7 +1060,7 @@ test_object_set_property (GObject *object, - static GType - test_enum_get_type (void) - { -- static volatile gsize define_type_id = 0; -+ static gsize define_type_id = 0; - - if (g_once_init_enter (&define_type_id)) - { -@@ -1082,7 +1082,7 @@ test_enum_get_type (void) - static GType - test_flags_get_type (void) - { -- static volatile gsize define_type_id = 0; -+ static gsize define_type_id = 0; - - if (g_once_init_enter (&define_type_id)) - { -diff --git a/gobject/gbinding.c b/gobject/gbinding.c -index 78a883075..662d76b3c 100644 ---- a/gobject/gbinding.c -+++ b/gobject/gbinding.c -@@ -120,9 +120,9 @@ - GType - g_binding_flags_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - static const GFlagsValue values[] = { - { G_BINDING_DEFAULT, "G_BINDING_DEFAULT", "default" }, -@@ -133,10 +133,10 @@ g_binding_flags_get_type (void) - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("GBindingFlags"), values); -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - #define G_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_BINDING, GBindingClass)) -diff --git a/gobject/gboxed.c b/gobject/gboxed.c -index 30ba4e775..194251383 100644 ---- a/gobject/gboxed.c -+++ b/gobject/gboxed.c -@@ -180,19 +180,19 @@ G_DEFINE_BOXED_TYPE (GOptionGroup, g_option_group, g_option_group_ref, g_option_ - GType - g_strv_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - GType g_define_type_id = - g_boxed_type_register_static (g_intern_static_string ("GStrv"), - (GBoxedCopyFunc) g_strdupv, - (GBoxedFreeFunc) g_strfreev); - -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - GType -diff --git a/gobject/glib-enumtypes.c.template b/gobject/glib-enumtypes.c.template -index b7d36728f..1800ca8af 100644 ---- a/gobject/glib-enumtypes.c.template -+++ b/gobject/glib-enumtypes.c.template -@@ -13,9 +13,9 @@ - GType - @enum_name@_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - static const G@Type@Value values[] = { - /*** END value-header ***/ -@@ -29,10 +29,10 @@ GType - }; - GType g_define_type_id = - g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - /*** END value-tail ***/ -diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c -index 0d0d2e87c..d1b1ee4b3 100644 ---- a/gobject/gsourceclosure.c -+++ b/gobject/gsourceclosure.c -@@ -32,7 +32,7 @@ G_DEFINE_BOXED_TYPE (GIOChannel, g_io_channel, g_io_channel_ref, g_io_channel_un - GType - g_io_condition_get_type (void) - { -- static volatile GType etype = 0; -+ static GType etype = 0; - - if (g_once_init_enter (&etype)) - { -diff --git a/gobject/gtype.h b/gobject/gtype.h -index 9de46ac60..666fadb0c 100644 ---- a/gobject/gtype.h -+++ b/gobject/gtype.h -@@ -1727,8 +1727,8 @@ guint g_type_get_type_registration_serial (void); - * GType - * gtk_gadget_get_type (void) - * { -- * static volatile gsize g_define_type_id__volatile = 0; -- * if (g_once_init_enter (&g_define_type_id__volatile)) -+ * static gsize static_g_define_type_id = 0; -+ * if (g_once_init_enter (&static_g_define_type_id)) - * { - * GType g_define_type_id = - * g_type_register_static_simple (GTK_TYPE_WIDGET, -@@ -1748,9 +1748,9 @@ guint g_type_get_type_registration_serial (void); - * }; - * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); - * } -- * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ * g_once_init_leave (&static_g_define_type_id, g_define_type_id); - * } -- * return g_define_type_id__volatile; -+ * return static_g_define_type_id; - * } - * ]| - * The only pieces which have to be manually provided are the definitions of -@@ -1995,17 +1995,17 @@ type_name##_get_instance_private (TypeName *self) \ - GType \ - type_name##_get_type (void) \ - { \ -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - /* Prelude goes here */ - - /* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */ - #define _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ -- if (g_once_init_enter (&g_define_type_id__volatile)) \ -+ if (g_once_init_enter (&static_g_define_type_id)) \ - { \ - GType g_define_type_id = type_name##_get_type_once (); \ -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ - } \ -- return g_define_type_id__volatile; \ -+ return static_g_define_type_id; \ - } /* closes type_name##_get_type() */ \ - \ - G_GNUC_NO_INLINE \ -@@ -2041,8 +2041,8 @@ static void type_name##_default_init (TypeName##Interface *klass); \ - GType \ - type_name##_get_type (void) \ - { \ -- static volatile gsize g_define_type_id__volatile = 0; \ -- if (g_once_init_enter (&g_define_type_id__volatile)) \ -+ static gsize static_g_define_type_id = 0; \ -+ if (g_once_init_enter (&static_g_define_type_id)) \ - { \ - GType g_define_type_id = \ - g_type_register_static_simple (G_TYPE_INTERFACE, \ -@@ -2058,9 +2058,9 @@ type_name##_get_type (void) \ - #define _G_DEFINE_INTERFACE_EXTENDED_END() \ - /* following custom code */ \ - } \ -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ - } \ -- return g_define_type_id__volatile; \ -+ return static_g_define_type_id; \ - } /* closes type_name##_get_type() */ - - /** -@@ -2115,13 +2115,13 @@ static GType type_name##_get_type_once (void); \ - GType \ - type_name##_get_type (void) \ - { \ -- static volatile gsize g_define_type_id__volatile = 0; \ -- if (g_once_init_enter (&g_define_type_id__volatile)) \ -+ static gsize static_g_define_type_id = 0; \ -+ if (g_once_init_enter (&static_g_define_type_id)) \ - { \ - GType g_define_type_id = type_name##_get_type_once (); \ -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ - } \ -- return g_define_type_id__volatile; \ -+ return static_g_define_type_id; \ - } \ - \ - G_GNUC_NO_INLINE \ -@@ -2152,13 +2152,13 @@ static GType type_name##_get_type_once (void); \ - GType \ - type_name##_get_type (void) \ - { \ -- static volatile gsize g_define_type_id__volatile = 0; \ -- if (g_once_init_enter (&g_define_type_id__volatile)) \ -+ static gsize static_g_define_type_id = 0; \ -+ if (g_once_init_enter (&static_g_define_type_id)) \ - { \ - GType g_define_type_id = type_name##_get_type_once (); \ -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ - } \ -- return g_define_type_id__volatile; \ -+ return static_g_define_type_id; \ - } \ - \ - G_GNUC_NO_INLINE \ -@@ -2205,13 +2205,13 @@ static GType type_name##_get_type_once (void); \ - GType \ - type_name##_get_type (void) \ - { \ -- static volatile gsize g_define_type_id__volatile = 0; \ -- if (g_once_init_enter (&g_define_type_id__volatile)) \ -+ static gsize static_g_define_type_id = 0; \ -+ if (g_once_init_enter (&static_g_define_type_id)) \ - { \ - GType g_define_type_id = type_name##_get_type_once (); \ -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ - } \ -- return g_define_type_id__volatile; \ -+ return static_g_define_type_id; \ - } \ - \ - G_GNUC_NO_INLINE \ -diff --git a/gobject/tests/signals.c b/gobject/tests/signals.c -index 120f90b5c..ac0ce5102 100644 ---- a/gobject/tests/signals.c -+++ b/gobject/tests/signals.c -@@ -66,9 +66,9 @@ custom_marshal_VOID__INVOCATIONHINT (GClosure *closure, - static GType - test_enum_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - static const GEnumValue values[] = { - { TEST_ENUM_NEGATIVE, "TEST_ENUM_NEGATIVE", "negative" }, -@@ -79,18 +79,18 @@ test_enum_get_type (void) - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("TestEnum"), values); -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - static GType - test_unsigned_enum_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize static_g_define_type_id = 0; - -- if (g_once_init_enter (&g_define_type_id__volatile)) -+ if (g_once_init_enter (&static_g_define_type_id)) - { - static const GEnumValue values[] = { - { TEST_UNSIGNED_ENUM_FOO, "TEST_UNSIGNED_ENUM_FOO", "foo" }, -@@ -99,10 +99,10 @@ test_unsigned_enum_get_type (void) - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("TestUnsignedEnum"), values); -- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); -+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); - } - -- return g_define_type_id__volatile; -+ return static_g_define_type_id; - } - - typedef enum { --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch deleted file mode 100644 index 40427e0e6..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6178df5658045a6253ef806e018fe80d99a8f5fb Mon Sep 17 00:00:00 2001 -From: Yi Fan Yu <yifan.yu@windriver.com> -Date: Mon, 1 Feb 2021 16:10:28 -0500 -Subject: [PATCH] tests/codegen.py: removing unecessary print statement - -A huge amount of output(boiler-plate code) is -printed to the console screen. -This is not critical to the test results. - -This causes intermittent test failure when another process -has to parse its output. - -Root cause is in ptest-runner, This is a workaround - -Uptream-Status: Inappropriate [other] - - - -Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> ---- - gio/tests/codegen.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py -index 51de0ede4..cfa4db42e 100644 ---- a/gio/tests/codegen.py -+++ b/gio/tests/codegen.py -@@ -250,7 +250,6 @@ class TestCodegen(unittest.TestCase): - - result = Result(info, out, err, subs) - -- print('Output:', result.out) - return result - - def runCodegenWithInterface(self, interface_contents, *args): --- -2.29.2 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch deleted file mode 100644 index fada7cc38..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a6ce0e742a5c75c53a7c702ebb1af1084065160a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:14:29 +0000 -Subject: [PATCH 02/29] tests: Fix non-atomic access to a shared variable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And drop the `volatile` qualifier from the variable, as that doesn’t -help with thread safety. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/tests/642026.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/glib/tests/642026.c b/glib/tests/642026.c -index ef54f14bb..26ab2ed06 100644 ---- a/glib/tests/642026.c -+++ b/glib/tests/642026.c -@@ -25,7 +25,7 @@ static GMutex *mutex; - static GCond *cond; - static guint i; - --static volatile gint freed = 0; -+static gint freed = 0; /* (atomic) */ - - static void - notify (gpointer p) -@@ -63,7 +63,7 @@ testcase (void) - GThread *t1; - - g_static_private_init (&sp); -- freed = 0; -+ g_atomic_int_set (&freed, 0); - - t1 = g_thread_create (thread_func, NULL, TRUE, NULL); - g_assert (t1 != NULL); --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch deleted file mode 100644 index 8bc71a698..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ea746c79faf554d980c21b0e4381753e003d2dc6 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:17:23 +0000 -Subject: [PATCH 03/29] tests: Fix non-atomic access to a shared variable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And drop the `volatile` qualifier from the variable, as that doesn’t -help with thread safety. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/tests/mainloop.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c -index 16763a0ea..563a951de 100644 ---- a/glib/tests/mainloop.c -+++ b/glib/tests/mainloop.c -@@ -918,7 +918,7 @@ test_mainloop_overflow (void) - g_main_context_unref (ctx); - } - --static volatile gint ready_time_dispatched; -+static gint ready_time_dispatched; /* (atomic) */ - - static gboolean - ready_time_dispatch (GSource *source, -@@ -964,7 +964,7 @@ test_ready_time (void) - /* A source with no ready time set should not fire */ - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_false (ready_time_dispatched); -+ g_assert_false (g_atomic_int_get (&ready_time_dispatched)); - - /* The ready time should not have been changed */ - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); -@@ -978,37 +978,37 @@ test_ready_time (void) - */ - g_source_set_ready_time (source, g_get_monotonic_time () + G_TIME_SPAN_DAY); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_false (ready_time_dispatched); -+ g_assert_false (g_atomic_int_get (&ready_time_dispatched)); - /* Make sure it didn't get reset */ - g_assert_cmpint (g_source_get_ready_time (source), !=, -1); - - /* Ready time of -1 -> don't fire */ - g_source_set_ready_time (source, -1); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_false (ready_time_dispatched); -+ g_assert_false (g_atomic_int_get (&ready_time_dispatched)); - /* Not reset, but should still be -1 from above */ - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); - - /* A ready time of the current time should fire immediately */ - g_source_set_ready_time (source, g_get_monotonic_time ()); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_true (ready_time_dispatched); -- ready_time_dispatched = FALSE; -+ g_assert_true (g_atomic_int_get (&ready_time_dispatched)); -+ g_atomic_int_set (&ready_time_dispatched, FALSE); - /* Should have gotten reset by the handler function */ - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); - - /* As well as one in the recent past... */ - g_source_set_ready_time (source, g_get_monotonic_time () - G_TIME_SPAN_SECOND); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_true (ready_time_dispatched); -- ready_time_dispatched = FALSE; -+ g_assert_true (g_atomic_int_get (&ready_time_dispatched)); -+ g_atomic_int_set (&ready_time_dispatched, FALSE); - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); - - /* Zero is the 'official' way to get a source to fire immediately */ - g_source_set_ready_time (source, 0); - while (g_main_context_iteration (NULL, FALSE)); -- g_assert_true (ready_time_dispatched); -- ready_time_dispatched = FALSE; -+ g_assert_true (g_atomic_int_get (&ready_time_dispatched)); -+ g_atomic_int_set (&ready_time_dispatched, FALSE); - g_assert_cmpint (g_source_get_ready_time (source), ==, -1); - - /* Now do some tests of cross-thread wakeups. --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch deleted file mode 100644 index 4b7b6f463..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 3dda662bebb81666d009635df1055ba5c1e17b52 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:16:17 +0000 -Subject: [PATCH 04/29] tests: Drop unnecessary volatile qualifiers from tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/tests/atomic.c | 4 ++-- - glib/tests/cond.c | 2 +- - glib/tests/gwakeuptest.c | 2 +- - glib/tests/hash.c | 2 +- - glib/tests/slice.c | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c -index 6b6cc7f3e..7d2459f3a 100644 ---- a/glib/tests/atomic.c -+++ b/glib/tests/atomic.c -@@ -248,8 +248,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS - #define THREADS 10 - #define ROUNDS 10000 - --volatile gint bucket[THREADS]; --volatile gint atomic; -+gint bucket[THREADS]; /* never contested by threads, not accessed atomically */ -+gint atomic; /* (atomic) */ - - static gpointer - thread_func (gpointer data) -diff --git a/glib/tests/cond.c b/glib/tests/cond.c -index 0f0b3d249..ed338cce3 100644 ---- a/glib/tests/cond.c -+++ b/glib/tests/cond.c -@@ -29,7 +29,7 @@ - - static GCond cond; - static GMutex mutex; --static volatile gint next; -+static gint next; /* locked by @mutex */ - - static void - push_value (gint value) -diff --git a/glib/tests/gwakeuptest.c b/glib/tests/gwakeuptest.c -index 461a7d3de..b37fb43fc 100644 ---- a/glib/tests/gwakeuptest.c -+++ b/glib/tests/gwakeuptest.c -@@ -92,7 +92,7 @@ struct context - static struct context contexts[NUM_THREADS]; - static GThread *threads[NUM_THREADS]; - static GWakeup *last_token_wakeup; --static volatile gint tokens_alive; -+static gint tokens_alive; /* (atomic) */ - - static void - context_init (struct context *ctx) -diff --git a/glib/tests/hash.c b/glib/tests/hash.c -index 4623d18d1..f4ff55ce1 100644 ---- a/glib/tests/hash.c -+++ b/glib/tests/hash.c -@@ -1362,7 +1362,7 @@ struct _GHashTable - - GHashFunc hash_func; - GEqualFunc key_equal_func; -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - - #ifndef G_DISABLE_ASSERT - int version; -diff --git a/glib/tests/slice.c b/glib/tests/slice.c -index f37826f3a..a566280db 100644 ---- a/glib/tests/slice.c -+++ b/glib/tests/slice.c -@@ -107,7 +107,7 @@ thread_allocate (gpointer data) - gint b; - gint size; - gpointer p; -- volatile gpointer *loc; -+ gpointer *loc; /* (atomic) */ - - for (i = 0; i < 10000; i++) - { --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch deleted file mode 100644 index 3aecf4582..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch +++ /dev/null @@ -1,702 +0,0 @@ -From 7f905ff1faf0acbe0d2ce69937e031fcacce9294 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:21:00 +0000 -Subject: [PATCH 05/29] tests: Fix non-atomic access to some shared variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And drop the `volatile` qualifier from the variables, as that doesn’t -help with thread safety. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/tests/gdbus-connection-flush.c | 6 +- - gio/tests/gdbus-connection.c | 40 ++++---- - gio/tests/gdbus-overflow.c | 20 ++-- - gio/tests/socket-service.c | 6 +- - gio/tests/task.c | 150 ++++++++++++++--------------- - 5 files changed, 111 insertions(+), 111 deletions(-) - ---- a/gio/tests/gdbus-connection-flush.c -+++ b/gio/tests/gdbus-connection-flush.c -@@ -43,9 +43,9 @@ G_LOCK_DEFINE_STATIC (write); - typedef struct { - GFilterOutputStream parent; - -- volatile gint started; -- volatile gint finished; -- volatile gint flushed; -+ gint started; /* (atomic) */ -+ gint finished; /* (atomic) */ -+ gint flushed; /* (atomic) */ - - GOutputStream *real_output; - } MyOutputStream; ---- a/gio/tests/gdbus-connection.c -+++ b/gio/tests/gdbus-connection.c -@@ -61,9 +61,9 @@ _log (const gchar *format, ...) - static gboolean - test_connection_quit_mainloop (gpointer user_data) - { -- volatile gboolean *quit_mainloop_fired = user_data; -+ gboolean *quit_mainloop_fired = user_data; /* (atomic) */ - _log ("quit_mainloop_fired"); -- *quit_mainloop_fired = TRUE; -+ g_atomic_int_set (quit_mainloop_fired, TRUE); - g_main_loop_quit (loop); - return TRUE; - } -@@ -113,8 +113,8 @@ on_name_owner_changed (GDBusConnection * - static void - a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop (gpointer user_data) - { -- volatile gboolean *val = user_data; -- *val = TRUE; -+ gboolean *val = user_data; /* (atomic) */ -+ g_atomic_int_set (val, TRUE); - _log ("destroynotify fired for %p", val); - g_main_loop_quit (loop); - } -@@ -143,10 +143,10 @@ test_connection_life_cycle (void) - GDBusConnection *c; - GDBusConnection *c2; - GError *error; -- volatile gboolean on_signal_registration_freed_called; -- volatile gboolean on_filter_freed_called; -- volatile gboolean on_register_object_freed_called; -- volatile gboolean quit_mainloop_fired; -+ gboolean on_signal_registration_freed_called; /* (atomic) */ -+ gboolean on_filter_freed_called; /* (atomic) */ -+ gboolean on_register_object_freed_called; /* (atomic) */ -+ gboolean quit_mainloop_fired; /* (atomic) */ - guint quit_mainloop_id; - guint registration_id; - -@@ -208,7 +208,7 @@ test_connection_life_cycle (void) - g_assert_no_error (error); - g_assert_nonnull (c2); - /* signal registration */ -- on_signal_registration_freed_called = FALSE; -+ g_atomic_int_set (&on_signal_registration_freed_called, FALSE); - g_dbus_connection_signal_subscribe (c2, - "org.freedesktop.DBus", /* bus name */ - "org.freedesktop.DBus", /* interface */ -@@ -220,13 +220,13 @@ test_connection_life_cycle (void) - (gpointer) &on_signal_registration_freed_called, - a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop); - /* filter func */ -- on_filter_freed_called = FALSE; -+ g_atomic_int_set (&on_filter_freed_called, FALSE); - g_dbus_connection_add_filter (c2, - some_filter_func, - (gpointer) &on_filter_freed_called, - a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop); - /* object registration */ -- on_register_object_freed_called = FALSE; -+ g_atomic_int_set (&on_register_object_freed_called, FALSE); - error = NULL; - registration_id = g_dbus_connection_register_object (c2, - "/foo", -@@ -239,7 +239,7 @@ test_connection_life_cycle (void) - g_assert_cmpuint (registration_id, >, 0); - /* ok, finalize the connection and check that all the GDestroyNotify functions are invoked as expected */ - g_object_unref (c2); -- quit_mainloop_fired = FALSE; -+ g_atomic_int_set (&quit_mainloop_fired, FALSE); - quit_mainloop_id = g_timeout_add (30000, test_connection_quit_mainloop, (gpointer) &quit_mainloop_fired); - _log ("destroynotifies for\n" - " register_object %p\n" -@@ -250,21 +250,21 @@ test_connection_life_cycle (void) - &on_signal_registration_freed_called); - while (TRUE) - { -- if (on_signal_registration_freed_called && -- on_filter_freed_called && -- on_register_object_freed_called) -+ if (g_atomic_int_get (&on_signal_registration_freed_called) && -+ g_atomic_int_get (&on_filter_freed_called) && -+ g_atomic_int_get (&on_register_object_freed_called)) - break; -- if (quit_mainloop_fired) -+ if (g_atomic_int_get (&quit_mainloop_fired)) - break; - _log ("entering loop"); - g_main_loop_run (loop); - _log ("exiting loop"); - } - g_source_remove (quit_mainloop_id); -- g_assert_true (on_signal_registration_freed_called); -- g_assert_true (on_filter_freed_called); -- g_assert_true (on_register_object_freed_called); -- g_assert_false (quit_mainloop_fired); -+ g_assert_true (g_atomic_int_get (&on_signal_registration_freed_called)); -+ g_assert_true (g_atomic_int_get (&on_filter_freed_called)); -+ g_assert_true (g_atomic_int_get (&on_register_object_freed_called)); -+ g_assert_false (g_atomic_int_get (&quit_mainloop_fired)); - - /* - * Check for correct behavior when the bus goes away ---- a/gio/tests/gdbus-overflow.c -+++ b/gio/tests/gdbus-overflow.c -@@ -86,8 +86,8 @@ overflow_filter_func (GDBusConnection *c - gboolean incoming, - gpointer user_data) - { -- volatile gint *counter = user_data; -- *counter += 1; -+ gint *counter = user_data; /* (atomic) */ -+ g_atomic_int_inc (counter); - return message; - } - -@@ -108,8 +108,8 @@ test_overflow (void) - GDBusConnection *producer, *consumer; - GError *error; - GTimer *timer; -- volatile gint n_messages_received; -- volatile gint n_messages_sent; -+ gint n_messages_received; /* (atomic) */ -+ gint n_messages_sent; /* (atomic) */ - - g_assert_cmpint (socketpair (AF_UNIX, SOCK_STREAM, 0, sv), ==, 0); - -@@ -129,7 +129,7 @@ test_overflow (void) - g_dbus_connection_set_exit_on_close (producer, TRUE); - g_assert_no_error (error); - g_object_unref (socket_connection); -- n_messages_sent = 0; -+ g_atomic_int_set (&n_messages_sent, 0); - g_dbus_connection_add_filter (producer, overflow_filter_func, (gpointer) &n_messages_sent, NULL); - - /* send enough data that we get an EAGAIN */ -@@ -155,7 +155,7 @@ test_overflow (void) - */ - g_timeout_add (500, overflow_on_500ms_later_func, NULL); - g_main_loop_run (loop); -- g_assert_cmpint (n_messages_sent, <, OVERFLOW_NUM_SIGNALS); -+ g_assert_cmpint (g_atomic_int_get (&n_messages_sent), <, OVERFLOW_NUM_SIGNALS); - - /* now suck it all out as a client, and add it up */ - socket = g_socket_new_from_fd (sv[1], &error); -@@ -171,18 +171,18 @@ test_overflow (void) - &error); - g_assert_no_error (error); - g_object_unref (socket_connection); -- n_messages_received = 0; -+ g_atomic_int_set (&n_messages_received, 0); - g_dbus_connection_add_filter (consumer, overflow_filter_func, (gpointer) &n_messages_received, NULL); - g_dbus_connection_start_message_processing (consumer); - - timer = g_timer_new (); - g_timer_start (timer); - -- while (n_messages_received < OVERFLOW_NUM_SIGNALS && g_timer_elapsed (timer, NULL) < OVERFLOW_TIMEOUT_SEC) -+ while (g_atomic_int_get (&n_messages_received) < OVERFLOW_NUM_SIGNALS && g_timer_elapsed (timer, NULL) < OVERFLOW_TIMEOUT_SEC) - g_main_context_iteration (NULL, FALSE); - -- g_assert_cmpint (n_messages_sent, ==, OVERFLOW_NUM_SIGNALS); -- g_assert_cmpint (n_messages_received, ==, OVERFLOW_NUM_SIGNALS); -+ g_assert_cmpint (g_atomic_int_get (&n_messages_sent), ==, OVERFLOW_NUM_SIGNALS); -+ g_assert_cmpint (g_atomic_int_get (&n_messages_received), ==, OVERFLOW_NUM_SIGNALS); - - g_timer_destroy (timer); - g_object_unref (consumer); ---- a/gio/tests/socket-service.c -+++ b/gio/tests/socket-service.c -@@ -99,7 +99,7 @@ test_start_stop (void) - - GMutex mutex_712570; - GCond cond_712570; --volatile gboolean finalized; -+gboolean finalized; /* (atomic) */ - - GType test_threaded_socket_service_get_type (void); - typedef GThreadedSocketService TestThreadedSocketService; -@@ -120,7 +120,7 @@ test_threaded_socket_service_finalize (G - /* Signal the main thread that finalization completed successfully - * rather than hanging. - */ -- finalized = TRUE; -+ g_atomic_int_set (&finalized, TRUE); - g_cond_signal (&cond_712570); - g_mutex_unlock (&mutex_712570); - } -@@ -235,7 +235,7 @@ test_threaded_712570 (void) - */ - g_object_unref (service); - -- while (!finalized) -+ while (!g_atomic_int_get (&finalized)) - g_cond_wait (&cond_712570, &mutex_712570); - g_mutex_unlock (&mutex_712570); - } ---- a/gio/tests/task.c -+++ b/gio/tests/task.c -@@ -957,7 +957,7 @@ task_weak_notify (gpointer user_data, - gboolean *weak_notify_ran = user_data; - - g_mutex_lock (&run_in_thread_mutex); -- *weak_notify_ran = TRUE; -+ g_atomic_int_set (weak_notify_ran, TRUE); - g_cond_signal (&run_in_thread_cond); - g_mutex_unlock (&run_in_thread_mutex); - } -@@ -1007,7 +1007,7 @@ run_in_thread_thread (GTask *task - g_assert (g_thread_self () != main_thread); - - g_mutex_lock (&run_in_thread_mutex); -- *thread_ran = TRUE; -+ g_atomic_int_set (thread_ran, TRUE); - g_cond_signal (&run_in_thread_cond); - g_mutex_unlock (&run_in_thread_mutex); - -@@ -1018,8 +1018,8 @@ static void - test_run_in_thread (void) - { - GTask *task; -- volatile gboolean thread_ran = FALSE; -- volatile gboolean weak_notify_ran = FALSE; -+ gboolean thread_ran = FALSE; /* (atomic) */ -+ gboolean weak_notify_ran = FALSE; /* (atomic) */ - gboolean notification_emitted = FALSE; - gboolean done = FALSE; - -@@ -1033,12 +1033,12 @@ test_run_in_thread (void) - g_task_run_in_thread (task, run_in_thread_thread); - - g_mutex_lock (&run_in_thread_mutex); -- while (!thread_ran) -+ while (!g_atomic_int_get (&thread_ran)) - g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex); - g_mutex_unlock (&run_in_thread_mutex); - - g_assert (done == FALSE); -- g_assert (weak_notify_ran == FALSE); -+ g_assert_false (g_atomic_int_get (&weak_notify_ran)); - - g_main_loop_run (loop); - -@@ -1050,7 +1050,7 @@ test_run_in_thread (void) - g_object_unref (task); - - g_mutex_lock (&run_in_thread_mutex); -- while (!weak_notify_ran) -+ while (!g_atomic_int_get (&weak_notify_ran)) - g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex); - g_mutex_unlock (&run_in_thread_mutex); - } -@@ -1081,7 +1081,7 @@ run_in_thread_sync_thread (GTask - - g_assert (g_thread_self () != main_thread); - -- *thread_ran = TRUE; -+ g_atomic_int_set (thread_ran, TRUE); - g_task_return_int (task, magic); - } - -@@ -1102,7 +1102,7 @@ test_run_in_thread_sync (void) - g_task_set_task_data (task, &thread_ran, NULL); - g_task_run_in_thread_sync (task, run_in_thread_sync_thread); - -- g_assert (thread_ran == TRUE); -+ g_assert_true (g_atomic_int_get (&thread_ran)); - g_assert (task != NULL); - g_assert (!g_task_had_error (task)); - g_assert_true (g_task_get_completed (task)); -@@ -1487,8 +1487,8 @@ test_return_on_cancel (void) - { - GTask *task; - GCancellable *cancellable; -- volatile ThreadState thread_state; -- volatile gboolean weak_notify_ran = FALSE; -+ ThreadState thread_state; /* (atomic) */ -+ gboolean weak_notify_ran = FALSE; /* (atomic) */ - gboolean callback_ran; - gboolean notification_emitted = FALSE; - -@@ -1498,7 +1498,7 @@ test_return_on_cancel (void) - * early. - */ - callback_ran = FALSE; -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran); - g_signal_connect (task, "notify::completed", - (GCallback) completed_cb, ¬ification_emitted); -@@ -1509,18 +1509,18 @@ test_return_on_cancel (void) - g_task_run_in_thread (task, return_on_cancel_thread); - g_object_unref (task); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - g_assert (callback_ran == FALSE); - - g_cancellable_cancel (cancellable); - g_mutex_unlock (&roc_finish_mutex); - g_main_loop_run (loop); - -- g_assert (thread_state == THREAD_COMPLETED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_COMPLETED); - g_assert (callback_ran == TRUE); - g_assert_true (notification_emitted); - -@@ -1529,7 +1529,7 @@ test_return_on_cancel (void) - /* If return-on-cancel is TRUE, it does return early */ - callback_ran = FALSE; - notification_emitted = FALSE; -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran); - g_object_weak_ref (G_OBJECT (task), task_weak_notify, (gpointer)&weak_notify_ran); - g_signal_connect (task, "notify::completed", -@@ -1542,27 +1542,27 @@ test_return_on_cancel (void) - g_task_run_in_thread (task, return_on_cancel_thread); - g_object_unref (task); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - g_assert (callback_ran == FALSE); - - g_cancellable_cancel (cancellable); - g_main_loop_run (loop); -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - g_assert (callback_ran == TRUE); - -- g_assert (weak_notify_ran == FALSE); -+ g_assert_false (g_atomic_int_get (&weak_notify_ran)); - -- while (thread_state == THREAD_RUNNING) -+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING) - g_cond_wait (&roc_finish_cond, &roc_finish_mutex); - g_mutex_unlock (&roc_finish_mutex); - -- g_assert (thread_state == THREAD_CANCELLED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED); - g_mutex_lock (&run_in_thread_mutex); -- while (!weak_notify_ran) -+ while (!g_atomic_int_get (&weak_notify_ran)) - g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex); - g_mutex_unlock (&run_in_thread_mutex); - -@@ -1574,7 +1574,7 @@ test_return_on_cancel (void) - */ - callback_ran = FALSE; - notification_emitted = FALSE; -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran); - g_signal_connect (task, "notify::completed", - (GCallback) completed_cb, ¬ification_emitted); -@@ -1591,17 +1591,17 @@ test_return_on_cancel (void) - g_main_loop_run (loop); - g_assert (callback_ran == TRUE); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - -- while (thread_state == THREAD_RUNNING) -+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING) - g_cond_wait (&roc_finish_cond, &roc_finish_mutex); - g_mutex_unlock (&roc_finish_mutex); - -- g_assert (thread_state == THREAD_CANCELLED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED); - g_assert_true (notification_emitted); - - g_object_unref (cancellable); -@@ -1621,7 +1621,7 @@ test_return_on_cancel_sync (void) - { - GTask *task; - GCancellable *cancellable; -- volatile ThreadState thread_state; -+ ThreadState thread_state; /* (atomic) */ - GThread *runner_thread; - gssize ret; - GError *error = NULL; -@@ -1630,7 +1630,7 @@ test_return_on_cancel_sync (void) - - /* If return-on-cancel is FALSE, the task does not return early. - */ -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL); - - g_task_set_task_data (task, (gpointer)&thread_state, NULL); -@@ -1639,16 +1639,16 @@ test_return_on_cancel_sync (void) - runner_thread = g_thread_new ("return-on-cancel-sync runner thread", - cancel_sync_runner_thread, task); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - - g_cancellable_cancel (cancellable); - g_mutex_unlock (&roc_finish_mutex); - g_thread_join (runner_thread); -- g_assert (thread_state == THREAD_COMPLETED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_COMPLETED); - - ret = g_task_propagate_int (task, &error); - g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); -@@ -1660,7 +1660,7 @@ test_return_on_cancel_sync (void) - g_cancellable_reset (cancellable); - - /* If return-on-cancel is TRUE, it does return early */ -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL); - g_task_set_return_on_cancel (task, TRUE); - -@@ -1670,15 +1670,15 @@ test_return_on_cancel_sync (void) - runner_thread = g_thread_new ("return-on-cancel-sync runner thread", - cancel_sync_runner_thread, task); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - - g_cancellable_cancel (cancellable); - g_thread_join (runner_thread); -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - - ret = g_task_propagate_int (task, &error); - g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); -@@ -1687,18 +1687,18 @@ test_return_on_cancel_sync (void) - - g_object_unref (task); - -- while (thread_state == THREAD_RUNNING) -+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING) - g_cond_wait (&roc_finish_cond, &roc_finish_mutex); - g_mutex_unlock (&roc_finish_mutex); - -- g_assert (thread_state == THREAD_CANCELLED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED); - - g_cancellable_reset (cancellable); - - /* If the task is already cancelled before it starts, it returns - * immediately, but the thread func still runs. - */ -- thread_state = THREAD_STARTING; -+ g_atomic_int_set (&thread_state, THREAD_STARTING); - task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL); - g_task_set_return_on_cancel (task, TRUE); - -@@ -1711,7 +1711,7 @@ test_return_on_cancel_sync (void) - cancel_sync_runner_thread, task); - - g_thread_join (runner_thread); -- g_assert (thread_state == THREAD_STARTING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_STARTING); - - ret = g_task_propagate_int (task, &error); - g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); -@@ -1720,17 +1720,17 @@ test_return_on_cancel_sync (void) - - g_object_unref (task); - -- while (thread_state == THREAD_STARTING) -+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING) - g_cond_wait (&roc_init_cond, &roc_init_mutex); - g_mutex_unlock (&roc_init_mutex); - -- g_assert (thread_state == THREAD_RUNNING); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING); - -- while (thread_state == THREAD_RUNNING) -+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING) - g_cond_wait (&roc_finish_cond, &roc_finish_mutex); - g_mutex_unlock (&roc_finish_mutex); - -- g_assert (thread_state == THREAD_CANCELLED); -+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED); - - g_object_unref (cancellable); - } -@@ -1776,7 +1776,7 @@ return_on_cancel_atomic_thread (GTask - gpointer task_data, - GCancellable *cancellable) - { -- gint *state = task_data; -+ gint *state = task_data; /* (atomic) */ - - g_assert (source_object == g_task_get_source_object (task)); - g_assert (task_data == g_task_get_task_data (task)); -@@ -1784,34 +1784,34 @@ return_on_cancel_atomic_thread (GTask - g_assert_false (g_task_get_completed (task)); - - g_assert (g_thread_self () != main_thread); -- g_assert_cmpint (*state, ==, 0); -+ g_assert_cmpint (g_atomic_int_get (state), ==, 0); - - g_mutex_lock (&roca_mutex_1); -- *state = 1; -+ g_atomic_int_set (state, 1); - g_cond_signal (&roca_cond_1); - g_mutex_unlock (&roca_mutex_1); - - g_mutex_lock (&roca_mutex_2); - if (g_task_set_return_on_cancel (task, FALSE)) -- *state = 2; -+ g_atomic_int_set (state, 2); - else -- *state = 3; -+ g_atomic_int_set (state, 3); - g_cond_signal (&roca_cond_2); - g_mutex_unlock (&roca_mutex_2); - - g_mutex_lock (&roca_mutex_1); - if (g_task_set_return_on_cancel (task, TRUE)) -- *state = 4; -+ g_atomic_int_set (state, 4); - else -- *state = 5; -+ g_atomic_int_set (state, 5); - g_cond_signal (&roca_cond_1); - g_mutex_unlock (&roca_mutex_1); - - g_mutex_lock (&roca_mutex_2); - if (g_task_set_return_on_cancel (task, TRUE)) -- *state = 6; -+ g_atomic_int_set (state, 6); - else -- *state = 7; -+ g_atomic_int_set (state, 7); - g_cond_signal (&roca_cond_2); - g_mutex_unlock (&roca_mutex_2); - -@@ -1823,7 +1823,7 @@ test_return_on_cancel_atomic (void) - { - GTask *task; - GCancellable *cancellable; -- volatile gint state; -+ gint state; /* (atomic) */ - gboolean notification_emitted = FALSE; - gboolean callback_ran; - -@@ -1832,7 +1832,7 @@ test_return_on_cancel_atomic (void) - g_mutex_lock (&roca_mutex_2); - - /* If we don't cancel it, each set_return_on_cancel() call will succeed */ -- state = 0; -+ g_atomic_int_set (&state, 0); - callback_ran = FALSE; - task = g_task_new (NULL, cancellable, return_on_cancel_atomic_callback, &callback_ran); - g_task_set_return_on_cancel (task, TRUE); -@@ -1843,23 +1843,23 @@ test_return_on_cancel_atomic (void) - g_task_run_in_thread (task, return_on_cancel_atomic_thread); - g_object_unref (task); - -- g_assert_cmpint (state, ==, 0); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 0); - -- while (state == 0) -+ while (g_atomic_int_get (&state) == 0) - g_cond_wait (&roca_cond_1, &roca_mutex_1); -- g_assert (state == 1); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 1); - -- while (state == 1) -+ while (g_atomic_int_get (&state) == 1) - g_cond_wait (&roca_cond_2, &roca_mutex_2); -- g_assert (state == 2); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 2); - -- while (state == 2) -+ while (g_atomic_int_get (&state) == 2) - g_cond_wait (&roca_cond_1, &roca_mutex_1); -- g_assert (state == 4); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 4); - -- while (state == 4) -+ while (g_atomic_int_get (&state) == 4) - g_cond_wait (&roca_cond_2, &roca_mutex_2); -- g_assert (state == 6); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 6); - - /* callback assumes there'll be a cancelled error */ - g_cancellable_cancel (cancellable); -@@ -1876,7 +1876,7 @@ test_return_on_cancel_atomic (void) - * task won't complete right away, and further - * g_task_set_return_on_cancel() calls will return FALSE. - */ -- state = 0; -+ g_atomic_int_set (&state, 0); - callback_ran = FALSE; - notification_emitted = FALSE; - task = g_task_new (NULL, cancellable, return_on_cancel_atomic_callback, &callback_ran); -@@ -1887,16 +1887,16 @@ test_return_on_cancel_atomic (void) - g_task_set_task_data (task, (gpointer)&state, NULL); - g_task_run_in_thread (task, return_on_cancel_atomic_thread); - -- g_assert_cmpint (state, ==, 0); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 0); - -- while (state == 0) -+ while (g_atomic_int_get (&state) == 0) - g_cond_wait (&roca_cond_1, &roca_mutex_1); -- g_assert (state == 1); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 1); - g_assert (g_task_get_return_on_cancel (task)); - -- while (state == 1) -+ while (g_atomic_int_get (&state) == 1) - g_cond_wait (&roca_cond_2, &roca_mutex_2); -- g_assert (state == 2); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 2); - g_assert (!g_task_get_return_on_cancel (task)); - - g_cancellable_cancel (cancellable); -@@ -1904,18 +1904,18 @@ test_return_on_cancel_atomic (void) - g_main_loop_run (loop); - g_assert (callback_ran == FALSE); - -- while (state == 2) -+ while (g_atomic_int_get (&state) == 2) - g_cond_wait (&roca_cond_1, &roca_mutex_1); -- g_assert (state == 5); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 5); - g_assert (!g_task_get_return_on_cancel (task)); - - g_main_loop_run (loop); - g_assert (callback_ran == TRUE); - g_assert_true (notification_emitted); - -- while (state == 5) -+ while (g_atomic_int_get (&state) == 5) - g_cond_wait (&roca_cond_2, &roca_mutex_2); -- g_assert (state == 7); -+ g_assert_cmpint (g_atomic_int_get (&state), ==, 7); - - g_object_unref (cancellable); - g_mutex_unlock (&roca_mutex_1); diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch deleted file mode 100644 index 7f22b4d46..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f4607def1695efb50eb49e0586eed0f5557935f2 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:20:37 +0000 -Subject: [PATCH 06/29] tests: Drop unnecessary volatile qualifiers from tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/tests/g-file-info.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c -index 809b0ec79..1a02b5e0e 100644 ---- a/gio/tests/g-file-info.c -+++ b/gio/tests/g-file-info.c -@@ -221,7 +221,7 @@ test_internal_enhanced_stdio (void) - guint64 size_p0, alsize_p0, size_ps, alsize_ps; - const gchar *id_p0; - const gchar *id_p1; -- volatile guint64 time_p0; -+ guint64 time_p0; - gchar *tmp_dir; - wchar_t *programdata_dir_w; - wchar_t *users_dir_w; --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch deleted file mode 100644 index 78753f821..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 33612404397f87f0cd45da90d3aa9ab60df895ee Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:24:28 +0000 -Subject: [PATCH 07/29] gdbusconnection: Drop unnecessary volatile qualifiers - from variables - -This should introduce no API changes; there are public functions -exported by `GDBusConnection` which still have some (incorrectly) -`volatile` arguments, but dropping those qualifiers would be an API -break. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/gdbusconnection.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c -index ed8cf6219..91c365e80 100644 ---- a/gio/gdbusconnection.c -+++ b/gio/gdbusconnection.c -@@ -393,7 +393,7 @@ struct _GDBusConnection - * FLAG_CLOSED is the closed property. It may be read at any time, but - * may only be written while holding @lock. - */ -- volatile gint atomic_flags; -+ gint atomic_flags; /* (atomic) */ - - /* If the connection could not be established during initable_init(), - * this GError will be set. -@@ -1596,7 +1596,7 @@ static gboolean - g_dbus_connection_send_message_unlocked (GDBusConnection *connection, - GDBusMessage *message, - GDBusSendMessageFlags flags, -- volatile guint32 *out_serial, -+ guint32 *out_serial, - GError **error) - { - guchar *blob; -@@ -1741,7 +1741,7 @@ g_dbus_connection_send_message (GDBusConnection *connection, - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - CONNECTION_LOCK (connection); -- ret = g_dbus_connection_send_message_unlocked (connection, message, flags, out_serial, error); -+ ret = g_dbus_connection_send_message_unlocked (connection, message, flags, (guint32 *) out_serial, error); - CONNECTION_UNLOCK (connection); - return ret; - } -@@ -1901,7 +1901,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect - GDBusMessage *message, - GDBusSendMessageFlags flags, - gint timeout_msec, -- volatile guint32 *out_serial, -+ guint32 *out_serial, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -@@ -1909,7 +1909,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect - GTask *task; - SendMessageData *data; - GError *error = NULL; -- volatile guint32 serial; -+ guint32 serial; - - if (out_serial == NULL) - out_serial = &serial; -@@ -2022,7 +2022,7 @@ g_dbus_connection_send_message_with_reply (GDBusConnection *connection, - message, - flags, - timeout_msec, -- out_serial, -+ (guint32 *) out_serial, - cancellable, - callback, - user_data); -@@ -3082,7 +3082,7 @@ g_dbus_connection_get_peer_credentials (GDBusConnection *connection) - - /* ---------------------------------------------------------------------------------------------------- */ - --static volatile guint _global_filter_id = 1; -+static guint _global_filter_id = 1; /* (atomic) */ - - /** - * g_dbus_connection_add_filter: -@@ -3327,9 +3327,9 @@ args_to_rule (const gchar *sender, - return g_string_free (rule, FALSE); - } - --static volatile guint _global_subscriber_id = 1; --static volatile guint _global_registration_id = 1; --static volatile guint _global_subtree_registration_id = 1; -+static guint _global_subscriber_id = 1; /* (atomic) */ -+static guint _global_registration_id = 1; /* (atomic) */ -+static guint _global_subtree_registration_id = 1; /* (atomic) */ - - /* ---------------------------------------------------------------------------------------------------- */ - -@@ -5992,7 +5992,7 @@ g_dbus_connection_call_sync_internal (GDBusConnection *connection, - message, - send_flags, - timeout_msec, -- NULL, /* volatile guint32 *out_serial */ -+ NULL, /* guint32 *out_serial */ - cancellable, - &local_error); - --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch deleted file mode 100644 index e947a264c..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 7c7623c4a31fb0f2a7176c43acc728093818b58c Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:26:19 +0000 -Subject: [PATCH 08/29] gdbuserror: Drop unnecessary volatile qualifiers from - variables - -This should introduce no API changes. The -`g_dbus_error_register_error_domain()` function still (incorrectly) has -a `volatile` argument, but dropping that qualifier would be an API -break. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/gdbuserror.c | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c -index 682677354..b03a33f27 100644 ---- a/gio/gdbuserror.c -+++ b/gio/gdbuserror.c -@@ -84,12 +84,12 @@ - * GQuark - * foo_bar_error_quark (void) - * { -- * static volatile gsize quark_volatile = 0; -+ * static gsize quark = 0; - * g_dbus_error_register_error_domain ("foo-bar-error-quark", -- * &quark_volatile, -+ * &quark, - * foo_bar_error_entries, - * G_N_ELEMENTS (foo_bar_error_entries)); -- * return (GQuark) quark_volatile; -+ * return (GQuark) quark; - * } - * ]| - * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and -@@ -160,12 +160,12 @@ GQuark - g_dbus_error_quark (void) - { - G_STATIC_ASSERT (G_N_ELEMENTS (g_dbus_error_entries) - 1 == G_DBUS_ERROR_PROPERTY_READ_ONLY); -- static volatile gsize quark_volatile = 0; -+ static gsize quark = 0; - g_dbus_error_register_error_domain ("g-dbus-error-quark", -- &quark_volatile, -+ &quark, - g_dbus_error_entries, - G_N_ELEMENTS (g_dbus_error_entries)); -- return (GQuark) quark_volatile; -+ return (GQuark) quark; - } - - /** -@@ -185,25 +185,31 @@ g_dbus_error_register_error_domain (const gchar *error_domain_quark_na - const GDBusErrorEntry *entries, - guint num_entries) - { -+ gsize *quark; -+ - g_return_if_fail (error_domain_quark_name != NULL); - g_return_if_fail (quark_volatile != NULL); - g_return_if_fail (entries != NULL); - g_return_if_fail (num_entries > 0); - -- if (g_once_init_enter (quark_volatile)) -+ /* Drop the volatile qualifier, which should never have been on the argument -+ * in the first place. */ -+ quark = (gsize *) quark_volatile; -+ -+ if (g_once_init_enter (quark)) - { - guint n; -- GQuark quark; -+ GQuark new_quark; - -- quark = g_quark_from_static_string (error_domain_quark_name); -+ new_quark = g_quark_from_static_string (error_domain_quark_name); - - for (n = 0; n < num_entries; n++) - { -- g_warn_if_fail (g_dbus_error_register_error (quark, -+ g_warn_if_fail (g_dbus_error_register_error (new_quark, - entries[n].error_code, - entries[n].dbus_error_name)); - } -- g_once_init_leave (quark_volatile, quark); -+ g_once_init_leave (quark, new_quark); - } - } - --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch deleted file mode 100644 index 7897d43bb..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch +++ /dev/null @@ -1,207 +0,0 @@ -From 74250cd9c9dfd3ad428e445c095ceac88ba18691 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:28:23 +0000 -Subject: [PATCH 09/29] gio: Drop unnecessary volatile qualifiers from internal - variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/gdbusinterfaceskeleton.c | 2 +- - gio/gdbusintrospection.h | 14 +++++++------- - gio/gdbusnameowning.c | 4 ++-- - gio/gdbusnamewatching.c | 4 ++-- - gio/gdbusprivate.c | 10 +++++----- - gio/gnetworking.c | 2 +- - 6 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c -index 243b4a0a4..76398df36 100644 ---- a/gio/gdbusinterfaceskeleton.c -+++ b/gio/gdbusinterfaceskeleton.c -@@ -458,7 +458,7 @@ dbus_interface_interface_init (GDBusInterfaceIface *iface) - - typedef struct - { -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - GDBusInterfaceSkeleton *interface; - GDBusInterfaceMethodCallFunc method_call_func; - GDBusMethodInvocation *invocation; -diff --git a/gio/gdbusintrospection.h b/gio/gdbusintrospection.h -index 14b171055..f2e291787 100644 ---- a/gio/gdbusintrospection.h -+++ b/gio/gdbusintrospection.h -@@ -43,7 +43,7 @@ G_BEGIN_DECLS - struct _GDBusAnnotationInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *key; - gchar *value; - GDBusAnnotationInfo **annotations; -@@ -63,7 +63,7 @@ struct _GDBusAnnotationInfo - struct _GDBusArgInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *name; - gchar *signature; - GDBusAnnotationInfo **annotations; -@@ -84,7 +84,7 @@ struct _GDBusArgInfo - struct _GDBusMethodInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *name; - GDBusArgInfo **in_args; - GDBusArgInfo **out_args; -@@ -105,7 +105,7 @@ struct _GDBusMethodInfo - struct _GDBusSignalInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *name; - GDBusArgInfo **args; - GDBusAnnotationInfo **annotations; -@@ -126,7 +126,7 @@ struct _GDBusSignalInfo - struct _GDBusPropertyInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *name; - gchar *signature; - GDBusPropertyInfoFlags flags; -@@ -149,7 +149,7 @@ struct _GDBusPropertyInfo - struct _GDBusInterfaceInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *name; - GDBusMethodInfo **methods; - GDBusSignalInfo **signals; -@@ -172,7 +172,7 @@ struct _GDBusInterfaceInfo - struct _GDBusNodeInfo - { - /*< public >*/ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - gchar *path; - GDBusInterfaceInfo **interfaces; - GDBusNodeInfo **nodes; -diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c -index d20e6ffed..1130d6789 100644 ---- a/gio/gdbusnameowning.c -+++ b/gio/gdbusnameowning.c -@@ -55,7 +55,7 @@ typedef enum - - typedef struct - { -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - guint id; - GBusNameOwnerFlags flags; - gchar *name; -@@ -73,7 +73,7 @@ typedef struct - guint name_acquired_subscription_id; - guint name_lost_subscription_id; - -- volatile gboolean cancelled; /* must hold lock when reading or modifying */ -+ gboolean cancelled; /* must hold lock when reading or modifying */ - - gboolean needs_release; - } Client; -diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c -index bc2a9119e..8d24700c5 100644 ---- a/gio/gdbusnamewatching.c -+++ b/gio/gdbusnamewatching.c -@@ -56,7 +56,7 @@ typedef enum - - typedef struct - { -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - guint id; - gchar *name; - GBusNameWatcherFlags flags; -@@ -78,7 +78,7 @@ typedef struct - } Client; - - /* Must be accessed atomically. */ --static volatile guint next_global_id = 1; -+static guint next_global_id = 1; /* (atomic) */ - - /* Must be accessed with @lock held. */ - static GHashTable *map_id_to_client = NULL; -diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c -index 2551e4791..99b37f3eb 100644 ---- a/gio/gdbusprivate.c -+++ b/gio/gdbusprivate.c -@@ -265,7 +265,7 @@ ensure_required_types (void) - - typedef struct - { -- volatile gint refcount; -+ gint refcount; /* (atomic) */ - GThread *thread; - GMainContext *context; - GMainLoop *loop; -@@ -341,12 +341,12 @@ typedef enum { - - struct GDBusWorker - { -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - - SharedThreadData *shared_thread_data; - - /* really a boolean, but GLib 2.28 lacks atomic boolean ops */ -- volatile gint stopped; -+ gint stopped; /* (atomic) */ - - /* TODO: frozen (e.g. G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING) currently - * only affects messages received from the other peer (since GDBusServer is the -@@ -1941,11 +1941,11 @@ _g_dbus_debug_print_unlock (void) - void - _g_dbus_initialize (void) - { -- static volatile gsize initialized = 0; -+ static gsize initialized = 0; - - if (g_once_init_enter (&initialized)) - { -- volatile GQuark g_dbus_error_domain; -+ GQuark g_dbus_error_domain; - const gchar *debug; - - g_dbus_error_domain = G_DBUS_ERROR; -diff --git a/gio/gnetworking.c b/gio/gnetworking.c -index 05507fe70..7bc6d73c4 100644 ---- a/gio/gnetworking.c -+++ b/gio/gnetworking.c -@@ -61,7 +61,7 @@ void - g_networking_init (void) - { - #ifdef G_OS_WIN32 -- static volatile gsize inited = 0; -+ static gsize inited = 0; - - if (g_once_init_enter (&inited)) - { --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch deleted file mode 100644 index e52b70942..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e4e88688a0722237effc56cc21438d0c8e82de88 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:29:26 +0000 -Subject: [PATCH 10/29] kqueue: Fix unlocked access to shared variable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And drop the `volatile` qualifier because it doesn’t help. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/kqueue/kqueue-missing.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/gio/kqueue/kqueue-missing.c b/gio/kqueue/kqueue-missing.c -index 37af82e5b..d1ffdf4bd 100644 ---- a/gio/kqueue/kqueue-missing.c -+++ b/gio/kqueue/kqueue-missing.c -@@ -34,7 +34,7 @@ static gboolean km_debug_enabled = FALSE; - static GSList *missing_subs_list = NULL; - G_LOCK_DEFINE_STATIC (missing_lock); - --static volatile gboolean scan_missing_running = FALSE; -+static gboolean scan_missing_running = FALSE; /* must be accessed under @missing_lock */ - - - static gboolean -@@ -62,7 +62,6 @@ _km_add_missing (kqueue_sub *sub) - - KM_W ("adding %s to missing list\n", sub->filename); - missing_subs_list = g_slist_prepend (missing_subs_list, sub); -- G_UNLOCK (missing_lock); - - if (!scan_missing_running) - { -@@ -73,6 +72,8 @@ _km_add_missing (kqueue_sub *sub) - g_source_attach (source, GLIB_PRIVATE_CALL (g_get_worker_context) ()); - g_source_unref (source); - } -+ -+ G_UNLOCK (missing_lock); - } - - /** --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch deleted file mode 100644 index ea3fd9f6e..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 7cdb68713c1863a27ad82d801756ec74097e8e87 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:30:36 +0000 -Subject: [PATCH 11/29] tests: Drop unnecessary volatile qualifiers from tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - tests/gobject/performance-threaded.c | 2 +- - tests/gobject/performance.c | 4 ++-- - tests/onceinit.c | 16 ++++++++-------- - 3 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/tests/gobject/performance-threaded.c b/tests/gobject/performance-threaded.c -index 30ea5bd80..c98541d66 100644 ---- a/tests/gobject/performance-threaded.c -+++ b/tests/gobject/performance-threaded.c -@@ -52,7 +52,7 @@ static GType liststore_interfaces[6]; - static gpointer - register_types (void) - { -- static volatile gsize inited = 0; -+ static gsize inited = 0; - if (g_once_init_enter (&inited)) - { - liststore_interfaces[0] = simple_register_class ("GtkBuildable", G_TYPE_INTERFACE, 0); -diff --git a/tests/gobject/performance.c b/tests/gobject/performance.c -index 236ffaed0..163be58b4 100644 ---- a/tests/gobject/performance.c -+++ b/tests/gobject/performance.c -@@ -575,8 +575,8 @@ test_type_check_run (PerformanceTest *test, - gpointer _data) - { - struct TypeCheckTest *data = _data; -- volatile GObject *object = data->object; -- volatile GType type, types[5]; -+ GObject *object = data->object; -+ GType type, types[5]; - int i, j; - - types[0] = test_iface1_get_type (); -diff --git a/tests/onceinit.c b/tests/onceinit.c -index 89ba6a136..9788efcbd 100644 ---- a/tests/onceinit.c -+++ b/tests/onceinit.c -@@ -25,13 +25,13 @@ - - static GMutex tmutex; - static GCond tcond; --static volatile int thread_call_count = 0; -+static int thread_call_count = 0; /* (atomic) */ - static char dummy_value = 'x'; - - static void - assert_singleton_execution1 (void) - { -- static volatile int seen_execution = 0; -+ static int seen_execution = 0; /* (atomic) */ - int old_seen_execution = g_atomic_int_add (&seen_execution, 1); - if (old_seen_execution != 0) - g_error ("%s: function executed more than once", G_STRFUNC); -@@ -40,7 +40,7 @@ assert_singleton_execution1 (void) - static void - assert_singleton_execution2 (void) - { -- static volatile int seen_execution = 0; -+ static int seen_execution = 0; /* (atomic) */ - int old_seen_execution = g_atomic_int_add (&seen_execution, 1); - if (old_seen_execution != 0) - g_error ("%s: function executed more than once", G_STRFUNC); -@@ -49,7 +49,7 @@ assert_singleton_execution2 (void) - static void - assert_singleton_execution3 (void) - { -- static volatile int seen_execution = 0; -+ static int seen_execution = 0; /* (atomic) */ - int old_seen_execution = g_atomic_int_add (&seen_execution, 1); - if (old_seen_execution != 0) - g_error ("%s: function executed more than once", G_STRFUNC); -@@ -58,7 +58,7 @@ assert_singleton_execution3 (void) - static void - initializer1 (void) - { -- static volatile gsize initialized = 0; -+ static gsize initialized = 0; - if (g_once_init_enter (&initialized)) - { - gsize initval = 42; -@@ -70,7 +70,7 @@ initializer1 (void) - static gpointer - initializer2 (void) - { -- static volatile gsize initialized = 0; -+ static gsize initialized = 0; - if (g_once_init_enter (&initialized)) - { - void *pointer_value = &dummy_value; -@@ -83,7 +83,7 @@ initializer2 (void) - static void - initializer3 (void) - { -- static volatile gsize initialized = 0; -+ static gsize initialized = 0; - if (g_once_init_enter (&initialized)) - { - gsize initval = 42; -@@ -163,7 +163,7 @@ main (int argc, - static void \ - test_initializer_##N (void) \ - { \ -- static volatile gsize initialized = 0; \ -+ static gsize initialized = 0; \ - if (g_once_init_enter (&initialized)) \ - { \ - g_free (g_strdup_printf ("cpuhog%5d", 1)); \ --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch deleted file mode 100644 index be7fcba8c..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 1a7f0002a052725fb646e136fadd5dad66222d7f Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:31:01 +0000 -Subject: [PATCH 12/29] tests: Fix non-atomic access to some shared variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And drop the `volatile` qualifier from the variables, as that doesn’t -help with thread safety. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - tests/refcount/objects.c | 8 ++++---- - tests/refcount/properties3.c | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c -index 963766d00..0c471a42b 100644 ---- a/tests/refcount/objects.c -+++ b/tests/refcount/objects.c -@@ -26,7 +26,7 @@ struct _GTestClass - }; - - static GType my_test_get_type (void); --static volatile gboolean stopping; -+static gint stopping; /* (atomic) */ - - static void my_test_class_init (GTestClass * klass); - static void my_test_init (GTest * test); -@@ -101,7 +101,7 @@ run_thread (GTest * test) - { - gint i = 1; - -- while (!stopping) { -+ while (!g_atomic_int_get (&stopping)) { - my_test_do_refcount (test); - if ((i++ % 10000) == 0) { - g_print ("."); -@@ -128,7 +128,7 @@ main (int argc, char **argv) - - test_threads = g_array_new (FALSE, FALSE, sizeof (GThread *)); - -- stopping = FALSE; -+ g_atomic_int_set (&stopping, 0); - - for (i = 0; i < n_threads; i++) { - GThread *thread; -@@ -141,7 +141,7 @@ main (int argc, char **argv) - } - g_usleep (5000000); - -- stopping = TRUE; -+ g_atomic_int_set (&stopping, 1); - - g_print ("\nstopping\n"); - -diff --git a/tests/refcount/properties3.c b/tests/refcount/properties3.c -index bc8820661..31f26a46e 100644 ---- a/tests/refcount/properties3.c -+++ b/tests/refcount/properties3.c -@@ -34,7 +34,7 @@ struct _GTestClass - static GType my_test_get_type (void); - G_DEFINE_TYPE (GTest, my_test, G_TYPE_OBJECT) - --static volatile gboolean stopping; -+static gint stopping; /* (atomic) */ - - static void my_test_get_property (GObject *object, - guint prop_id, -@@ -140,7 +140,7 @@ run_thread (GTest * test) - { - gint i = 1; - -- while (!stopping) { -+ while (!g_atomic_int_get (&stopping)) { - my_test_do_property (test); - if ((i++ % 10000) == 0) - { -@@ -170,7 +170,7 @@ main (int argc, char **argv) - - test_threads = g_array_new (FALSE, FALSE, sizeof (GThread *)); - -- stopping = FALSE; -+ g_atomic_int_set (&stopping, 0); - - for (i = 0; i < n_threads; i++) { - GThread *thread; -@@ -180,7 +180,7 @@ main (int argc, char **argv) - } - g_usleep (30000000); - -- stopping = TRUE; -+ g_atomic_int_set (&stopping, 1); - g_print ("\nstopping\n"); - - /* join all threads */ --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch deleted file mode 100644 index efc6817bd..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 3c648457c284b4ba313b8591008d2e18ae4335eb Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:36:37 +0000 -Subject: [PATCH 13/29] gatomic: Drop unnecessary volatile qualifiers from - internal variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It’s not necessary and provides no thread safety guarantees. - -The `volatile` qualifiers on the function arguments have to be kept, as -they are (unfortunately) part of the API. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gatomic.c | 34 +++++++++++++++++----------------- - 1 file changed, 17 insertions(+), 17 deletions(-) - -diff --git a/glib/gatomic.c b/glib/gatomic.c -index 8b8c6453d..67f5ba6b4 100644 ---- a/glib/gatomic.c -+++ b/glib/gatomic.c -@@ -316,7 +316,7 @@ guint - gpointer - (g_atomic_pointer_get) (const volatile void *atomic) - { -- return g_atomic_pointer_get ((const volatile gpointer *) atomic); -+ return g_atomic_pointer_get ((gpointer *) atomic); - } - - /** -@@ -335,7 +335,7 @@ void - (g_atomic_pointer_set) (volatile void *atomic, - gpointer newval) - { -- g_atomic_pointer_set ((volatile gpointer *) atomic, newval); -+ g_atomic_pointer_set ((gpointer *) atomic, newval); - } - - /** -@@ -363,7 +363,7 @@ gboolean - gpointer oldval, - gpointer newval) - { -- return g_atomic_pointer_compare_and_exchange ((volatile gpointer *) atomic, -+ return g_atomic_pointer_compare_and_exchange ((gpointer *) atomic, - oldval, newval); - } - -@@ -387,7 +387,7 @@ gssize - (g_atomic_pointer_add) (volatile void *atomic, - gssize val) - { -- return g_atomic_pointer_add ((volatile gpointer *) atomic, val); -+ return g_atomic_pointer_add ((gpointer *) atomic, val); - } - - /** -@@ -411,7 +411,7 @@ gsize - (g_atomic_pointer_and) (volatile void *atomic, - gsize val) - { -- return g_atomic_pointer_and ((volatile gpointer *) atomic, val); -+ return g_atomic_pointer_and ((gpointer *) atomic, val); - } - - /** -@@ -435,7 +435,7 @@ gsize - (g_atomic_pointer_or) (volatile void *atomic, - gsize val) - { -- return g_atomic_pointer_or ((volatile gpointer *) atomic, val); -+ return g_atomic_pointer_or ((gpointer *) atomic, val); - } - - /** -@@ -459,7 +459,7 @@ gsize - (g_atomic_pointer_xor) (volatile void *atomic, - gsize val) - { -- return g_atomic_pointer_xor ((volatile gpointer *) atomic, val); -+ return g_atomic_pointer_xor ((gpointer *) atomic, val); - } - - #elif defined (G_PLATFORM_WIN32) -@@ -591,7 +591,7 @@ guint - gpointer - (g_atomic_pointer_get) (const volatile void *atomic) - { -- const volatile gpointer *ptr = atomic; -+ const gpointer *ptr = atomic; - - MemoryBarrier (); - return *ptr; -@@ -601,7 +601,7 @@ void - (g_atomic_pointer_set) (volatile void *atomic, - gpointer newval) - { -- volatile gpointer *ptr = atomic; -+ gpointer *ptr = atomic; - - *ptr = newval; - MemoryBarrier (); -@@ -797,7 +797,7 @@ guint - gpointer - (g_atomic_pointer_get) (const volatile void *atomic) - { -- const volatile gpointer *ptr = atomic; -+ const gpointer *ptr = atomic; - gpointer value; - - pthread_mutex_lock (&g_atomic_lock); -@@ -811,7 +811,7 @@ void - (g_atomic_pointer_set) (volatile void *atomic, - gpointer newval) - { -- volatile gpointer *ptr = atomic; -+ gpointer *ptr = atomic; - - pthread_mutex_lock (&g_atomic_lock); - *ptr = newval; -@@ -823,7 +823,7 @@ gboolean - gpointer oldval, - gpointer newval) - { -- volatile gpointer *ptr = atomic; -+ gpointer *ptr = atomic; - gboolean success; - - pthread_mutex_lock (&g_atomic_lock); -@@ -840,7 +840,7 @@ gssize - (g_atomic_pointer_add) (volatile void *atomic, - gssize val) - { -- volatile gssize *ptr = atomic; -+ gssize *ptr = atomic; - gssize oldval; - - pthread_mutex_lock (&g_atomic_lock); -@@ -855,7 +855,7 @@ gsize - (g_atomic_pointer_and) (volatile void *atomic, - gsize val) - { -- volatile gsize *ptr = atomic; -+ gsize *ptr = atomic; - gsize oldval; - - pthread_mutex_lock (&g_atomic_lock); -@@ -870,7 +870,7 @@ gsize - (g_atomic_pointer_or) (volatile void *atomic, - gsize val) - { -- volatile gsize *ptr = atomic; -+ gsize *ptr = atomic; - gsize oldval; - - pthread_mutex_lock (&g_atomic_lock); -@@ -885,7 +885,7 @@ gsize - (g_atomic_pointer_xor) (volatile void *atomic, - gsize val) - { -- volatile gsize *ptr = atomic; -+ gsize *ptr = atomic; - gsize oldval; - - pthread_mutex_lock (&g_atomic_lock); -@@ -915,5 +915,5 @@ gint - g_atomic_int_exchange_and_add (volatile gint *atomic, - gint val) - { -- return (g_atomic_int_add) (atomic, val); -+ return (g_atomic_int_add) ((gint *) atomic, val); - } --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch deleted file mode 100644 index bcc06e05c..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9474655eb21d64519b293e780bb686976cbdb790 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:38:36 +0000 -Subject: [PATCH 14/29] gatomic: Drop unnecessary volatile qualifiers from - macro variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It’s not necessary and provides no thread safety guarantees. - -The `volatile` qualifiers on the function arguments have to be kept, as -they are (unfortunately) part of the API. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gatomic.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/glib/gatomic.h b/glib/gatomic.h -index bb1435c70..e6eccfada 100644 ---- a/glib/gatomic.h -+++ b/glib/gatomic.h -@@ -211,7 +211,7 @@ G_END_DECLS - })) - #define g_atomic_pointer_and(atomic, val) \ - (G_GNUC_EXTENSION ({ \ -- volatile gsize *gapa_atomic = (volatile gsize *) (atomic); \ -+ gsize *gapa_atomic = (gsize *) (atomic); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ - (void) (0 ? (gpointer) *(atomic) : NULL); \ -@@ -220,7 +220,7 @@ G_END_DECLS - })) - #define g_atomic_pointer_or(atomic, val) \ - (G_GNUC_EXTENSION ({ \ -- volatile gsize *gapo_atomic = (volatile gsize *) (atomic); \ -+ gsize *gapo_atomic = (gsize *) (atomic); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ - (void) (0 ? (gpointer) *(atomic) : NULL); \ -@@ -229,7 +229,7 @@ G_END_DECLS - })) - #define g_atomic_pointer_xor(atomic, val) \ - (G_GNUC_EXTENSION ({ \ -- volatile gsize *gapx_atomic = (volatile gsize *) (atomic); \ -+ gsize *gapx_atomic = (gsize *) (atomic); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ - G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ - (void) (0 ? (gpointer) *(atomic) : NULL); \ --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch deleted file mode 100644 index 9468548e3..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 1314ff93fc4d3379483c33da6a7deff27f71ed95 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:40:56 +0000 -Subject: [PATCH 15/29] glib: Drop unnecessary volatile qualifiers from - internal variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gdatetime.c | 2 +- - glib/gkeyfile.c | 2 +- - glib/gmain.c | 8 ++++---- - glib/gmarkup.c | 2 +- - glib/gregex.c | 6 +++--- - glib/gthread.c | 6 +++--- - 6 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/glib/gdatetime.c b/glib/gdatetime.c -index 1755257be..453077f6d 100644 ---- a/glib/gdatetime.c -+++ b/glib/gdatetime.c -@@ -126,7 +126,7 @@ struct _GDateTime - /* 1 is 0001-01-01 in Proleptic Gregorian */ - gint32 days; - -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - }; - - /* Time conversion {{{1 */ -diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c -index 9d0215331..bbe638b74 100644 ---- a/glib/gkeyfile.c -+++ b/glib/gkeyfile.c -@@ -512,7 +512,7 @@ struct _GKeyFile - - gchar **locales; - -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - }; - - typedef struct _GKeyFileKeyValuePair GKeyFileKeyValuePair; -diff --git a/glib/gmain.c b/glib/gmain.c -index 772b8ecfc..9c5f0ef1e 100644 ---- a/glib/gmain.c -+++ b/glib/gmain.c -@@ -272,7 +272,7 @@ struct _GMainContext - guint owner_count; - GSList *waiters; - -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - - GHashTable *sources; /* guint -> GSource */ - -@@ -303,7 +303,7 @@ struct _GMainContext - - struct _GSourceCallback - { -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - GSourceFunc func; - gpointer data; - GDestroyNotify notify; -@@ -313,7 +313,7 @@ struct _GMainLoop - { - GMainContext *context; - gboolean is_running; /* (atomic) */ -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - }; - - struct _GTimeoutSource -@@ -4749,7 +4749,7 @@ g_main_context_get_poll_func (GMainContext *context) - * - * |[<!-- language="C" --> - * #define NUM_TASKS 10 -- * static volatile gint tasks_remaining = NUM_TASKS; -+ * static gint tasks_remaining = NUM_TASKS; // (atomic) - * ... - * - * while (g_atomic_int_get (&tasks_remaining) != 0) -diff --git a/glib/gmarkup.c b/glib/gmarkup.c -index ba4dfd2e4..b8327fb6d 100644 ---- a/glib/gmarkup.c -+++ b/glib/gmarkup.c -@@ -119,7 +119,7 @@ struct _GMarkupParseContext - { - const GMarkupParser *parser; - -- volatile gint ref_count; -+ gint ref_count; /* (atomic) */ - - GMarkupParseFlags flags; - -diff --git a/glib/gregex.c b/glib/gregex.c -index 52416bbb9..5e6ddfb46 100644 ---- a/glib/gregex.c -+++ b/glib/gregex.c -@@ -203,7 +203,7 @@ G_STATIC_ASSERT (G_REGEX_RAW == PCRE_UTF8); - - struct _GMatchInfo - { -- volatile gint ref_count; /* the ref count */ -+ gint ref_count; /* the ref count (atomic) */ - GRegex *regex; /* the regex */ - GRegexMatchFlags match_opts; /* options used at match time on the regex */ - gint matches; /* number of matching sub patterns */ -@@ -218,7 +218,7 @@ struct _GMatchInfo - - struct _GRegex - { -- volatile gint ref_count; /* the ref count for the immutable part */ -+ gint ref_count; /* the ref count for the immutable part (atomic) */ - gchar *pattern; /* the pattern */ - pcre *pcre_re; /* compiled form of the pattern */ - GRegexCompileFlags compile_opts; /* options used at compile time on the pattern */ -@@ -1300,7 +1300,7 @@ g_regex_new (const gchar *pattern, - pcre *re; - const gchar *errmsg; - gboolean optimize = FALSE; -- static volatile gsize initialised = 0; -+ static gsize initialised = 0; - - g_return_val_if_fail (pattern != NULL, NULL); - g_return_val_if_fail (error == NULL || *error == NULL, NULL); -diff --git a/glib/gthread.c b/glib/gthread.c -index 53f3a0848..612a9739f 100644 ---- a/glib/gthread.c -+++ b/glib/gthread.c -@@ -513,7 +513,7 @@ static GMutex g_once_mutex; - static GCond g_once_cond; - static GSList *g_once_init_list = NULL; - --static volatile guint g_thread_n_created_counter = 0; -+static guint g_thread_n_created_counter = 0; /* (atomic) */ - - static void g_thread_cleanup (gpointer data); - static GPrivate g_thread_specific_private = G_PRIVATE_INIT (g_thread_cleanup); -@@ -694,7 +694,7 @@ g_once_impl (GOnce *once, - gboolean - (g_once_init_enter) (volatile void *location) - { -- volatile gsize *value_location = location; -+ gsize *value_location = (gsize *) location; - gboolean need_init = FALSE; - g_mutex_lock (&g_once_mutex); - if (g_atomic_pointer_get (value_location) == 0) -@@ -731,7 +731,7 @@ void - (g_once_init_leave) (volatile void *location, - gsize result) - { -- volatile gsize *value_location = location; -+ gsize *value_location = (gsize *) location; - - g_return_if_fail (g_atomic_pointer_get (value_location) == 0); - g_return_if_fail (result != 0); --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch deleted file mode 100644 index 8111b3b51..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 08d04d0428cc26935a2d42083f1710432465c98a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 18:42:43 +0000 -Subject: [PATCH 16/29] gobject: Drop unnecessary volatile qualifiers from - internal variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gobject/gclosure.c | 2 +- - gobject/gclosure.h | 20 ++++++++++---------- - gobject/gobject.c | 4 ++-- - gobject/gtype.c | 10 +++++----- - 4 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/gobject/gclosure.c b/gobject/gclosure.c -index 1d1f2f48a..6d41e6d8a 100644 ---- a/gobject/gclosure.c -+++ b/gobject/gclosure.c -@@ -98,7 +98,7 @@ - - typedef union { - GClosure closure; -- volatile gint vint; -+ gint vint; - } ClosureInt; - - #define CHANGE_FIELD(_closure, _field, _OP, _value, _must_set, _SET_OLD, _SET_NEW) \ -diff --git a/gobject/gclosure.h b/gobject/gclosure.h -index a0f91f538..884e403a8 100644 ---- a/gobject/gclosure.h -+++ b/gobject/gclosure.h -@@ -175,20 +175,20 @@ struct _GClosureNotifyData - struct _GClosure - { - /*< private >*/ -- volatile guint ref_count : 15; -+ guint ref_count : 15; /* (atomic) */ - /* meta_marshal is not used anymore but must be zero for historical reasons - as it was exposed in the G_CLOSURE_N_NOTIFIERS macro */ -- volatile guint meta_marshal_nouse : 1; -- volatile guint n_guards : 1; -- volatile guint n_fnotifiers : 2; /* finalization notifiers */ -- volatile guint n_inotifiers : 8; /* invalidation notifiers */ -- volatile guint in_inotify : 1; -- volatile guint floating : 1; -+ guint meta_marshal_nouse : 1; /* (atomic) */ -+ guint n_guards : 1; /* (atomic) */ -+ guint n_fnotifiers : 2; /* finalization notifiers (atomic) */ -+ guint n_inotifiers : 8; /* invalidation notifiers (atomic) */ -+ guint in_inotify : 1; /* (atomic) */ -+ guint floating : 1; /* (atomic) */ - /*< protected >*/ -- volatile guint derivative_flag : 1; -+ guint derivative_flag : 1; /* (atomic) */ - /*< public >*/ -- volatile guint in_marshal : 1; -- volatile guint is_invalid : 1; -+ guint in_marshal : 1; /* (atomic) */ -+ guint is_invalid : 1; /* (atomic) */ - - /*< private >*/ void (*marshal) (GClosure *closure, - GValue /*out*/ *return_value, -diff --git a/gobject/gobject.c b/gobject/gobject.c -index 6e9c44a1e..a3a32be9f 100644 ---- a/gobject/gobject.c -+++ b/gobject/gobject.c -@@ -174,9 +174,9 @@ typedef struct - GTypeInstance g_type_instance; - - /*< private >*/ -- volatile guint ref_count; -+ guint ref_count; /* (atomic) */ - #ifdef HAVE_OPTIONAL_FLAGS -- volatile guint optional_flags; -+ guint optional_flags; /* (atomic) */ - #endif - GData *qdata; - } GObjectReal; -diff --git a/gobject/gtype.c b/gobject/gtype.c -index 51dad7690..be5989a3e 100644 ---- a/gobject/gtype.c -+++ b/gobject/gtype.c -@@ -221,9 +221,9 @@ typedef enum - /* --- structures --- */ - struct _TypeNode - { -- guint volatile ref_count; -+ guint ref_count; /* (atomic) */ - #ifdef G_ENABLE_DEBUG -- guint volatile instance_count; -+ guint instance_count; /* (atomic) */ - #endif - GTypePlugin *plugin; - guint n_children; /* writable with lock */ -@@ -233,7 +233,7 @@ struct _TypeNode - guint is_instantiatable : 1; - guint mutatable_check_cache : 1; /* combines some common path checks */ - GType *children; /* writable with lock */ -- TypeData * volatile data; -+ TypeData *data; - GQuark qname; - GData *global_gdata; - union { -@@ -569,8 +569,8 @@ type_node_new_W (TypeNode *pnode, - } - - static inline IFaceEntry* --lookup_iface_entry_I (volatile IFaceEntries *entries, -- TypeNode *iface_node) -+lookup_iface_entry_I (IFaceEntries *entries, -+ TypeNode *iface_node) - { - guint8 *offsets; - guint offset_index; --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch deleted file mode 100644 index 02816a887..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From eee7e3c6688f2f1ee9beed5d6d209973c1df387e Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:14:25 +0000 -Subject: [PATCH 17/29] gmessages: Drop unnecessary volatile qualifiers from - macro variables -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It’s not necessary and provides no thread safety guarantees. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gmessages.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/glib/gmessages.h b/glib/gmessages.h -index 6a28443b4..2e3650baf 100644 ---- a/glib/gmessages.h -+++ b/glib/gmessages.h -@@ -478,7 +478,7 @@ g_debug (const gchar *format, - #if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING - #define g_warning_once(...) \ - G_STMT_START { \ -- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \ -+ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ - if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ - 0, 1)) \ - g_warning (__VA_ARGS__); \ -@@ -487,7 +487,7 @@ g_debug (const gchar *format, - #elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING - #define g_warning_once(format...) \ - G_STMT_START { \ -- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \ -+ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ - if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ - 0, 1)) \ - g_warning (format); \ --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch deleted file mode 100644 index 50cb3c470..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8a87069ff42a0631dce153701cb2ec5e343a958c Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:16:30 +0000 -Subject: [PATCH 18/29] gtypes: Drop volatile qualifier from gatomicrefcount - -This is technically an API break, but since the type is meant to be -opaque (third party code is not meant to treat it like an integer) it -should not cause problems. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gtypes.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/glib/gtypes.h b/glib/gtypes.h -index 23c5a1295..2c4825582 100644 ---- a/glib/gtypes.h -+++ b/glib/gtypes.h -@@ -550,8 +550,8 @@ struct _GTimeVal - glong tv_usec; - } GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); - --typedef gint grefcount; --typedef volatile gint gatomicrefcount; -+typedef gint grefcount; -+typedef gint gatomicrefcount; /* should be accessed only using atomics */ - - G_END_DECLS - --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch deleted file mode 100644 index be3211664..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 46bae4f18dfec8fedda82648091752d270b2dff8 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:19:20 +0000 -Subject: [PATCH 19/29] gatomicarray: Drop volatile qualifier from GAtomicArray - API - -This is an API break, but it should not affect third party code since -that code should not be interacting with the `data` member in a way that -invokes its `volatile` qualifier (such as copying to an intermediate -variable). - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gobject/gatomicarray.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gobject/gatomicarray.h b/gobject/gatomicarray.h -index 9550fa396..89043c5e4 100644 ---- a/gobject/gatomicarray.h -+++ b/gobject/gatomicarray.h -@@ -29,7 +29,7 @@ G_BEGIN_DECLS - - typedef struct _GAtomicArray GAtomicArray; - struct _GAtomicArray { -- volatile gpointer data; /* elements - atomic */ -+ gpointer data; /* elements - atomic */ - }; - - void _g_atomic_array_init (GAtomicArray *array); -@@ -42,7 +42,7 @@ void _g_atomic_array_update (GAtomicArray *array, - #define G_ATOMIC_ARRAY_GET_LOCKED(_array, _type) ((_type *)((_array)->data)) - - #define G_ATOMIC_ARRAY_DO_TRANSACTION(_array, _type, _C_) G_STMT_START { \ -- volatile gpointer *_datap = &(_array)->data; \ -+ gpointer *_datap = &(_array)->data; \ - _type *transaction_data, *__check; \ - \ - __check = g_atomic_pointer_get (_datap); \ --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch deleted file mode 100644 index ae024a9af..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 334f6953364680ddc6c0d3da13fda1d92bf5379d Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:21:07 +0000 -Subject: [PATCH 20/29] gobject: Drop volatile qualifier from GObject.ref_count - -This is an API break, but no third party code should be touching -`GObject.ref_count`, let alone in a way which would be changed by the -removal of the `volatile` qualifier. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gobject/gobject.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gobject/gobject.h b/gobject/gobject.h -index 7f55e1976..a84c183f8 100644 ---- a/gobject/gobject.h -+++ b/gobject/gobject.h -@@ -247,7 +247,7 @@ struct _GObject - GTypeInstance g_type_instance; - - /*< private >*/ -- volatile guint ref_count; -+ guint ref_count; /* (atomic) */ - GData *qdata; - }; - /** --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch deleted file mode 100644 index b8ed99ce1..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8a112c3c6e5fe6838ee29eec7caa62ba32d9bc40 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:22:49 +0000 -Subject: [PATCH 21/29] tests: Drop unnecessary volatile qualifiers from tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These variables were already (correctly) accessed atomically. The -`volatile` qualifier doesn’t help with that. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gobject/tests/qdata.c | 2 +- - gobject/tests/threadtests.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gobject/tests/qdata.c b/gobject/tests/qdata.c -index 528bdc68e..7d46efb15 100644 ---- a/gobject/tests/qdata.c -+++ b/gobject/tests/qdata.c -@@ -17,7 +17,7 @@ gboolean fail; - #define ROUNDS 10000 - - GObject *object; --volatile gint bucket[THREADS]; -+gint bucket[THREADS]; /* accessed from multiple threads, but should never be contested due to the sequence of thread operations */ - - static gpointer - thread_func (gpointer data) -diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c -index e341a9d67..b6f9e17fa 100644 ---- a/gobject/tests/threadtests.c -+++ b/gobject/tests/threadtests.c -@@ -27,8 +27,8 @@ - #include <glib.h> - #include <glib-object.h> - --static volatile int mtsafe_call_counter = 0; /* multi thread safe call counter */ --static int unsafe_call_counter = 0; /* single-threaded call counter */ -+static int mtsafe_call_counter = 0; /* multi thread safe call counter, must be accessed atomically */ -+static int unsafe_call_counter = 0; /* single-threaded call counter */ - static GCond sync_cond; - static GMutex sync_mutex; - --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch deleted file mode 100644 index 5da509d17..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch +++ /dev/null @@ -1,38 +0,0 @@ -From daf90bfa99fc02a253d538c65fbaa12f2e6c1c45 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Wed, 11 Nov 2020 19:23:18 +0000 -Subject: [PATCH 22/29] build: Drop unnecessary volatile qualifiers from - configure tests - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index e0b308a25..ad7f887fb 100644 ---- a/meson.build -+++ b/meson.build -@@ -1773,7 +1773,7 @@ endforeach - # that then to silently fall back on emulated atomic ops just because - # the user had the wrong build environment. - atomictest = '''int main() { -- volatile int atomic = 2; -+ int atomic = 2; - __sync_bool_compare_and_swap (&atomic, 2, 3); - return 0; - } -@@ -1883,6 +1883,7 @@ endif - - # FIXME: we should make it print the result and always return 0, so that - # the output in meson shows up as green -+# volatile is needed here to avoid optimisations in the test - stack_grows_check_prog = ''' - volatile int *a = 0, *b = 0; - void f (int i) { --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch deleted file mode 100644 index 012f9ca87..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0604f5858259c32744e6fc912ed4feb308651a3a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 14:47:23 +0000 -Subject: [PATCH 23/29] gdbusprivate: Avoid a warning about a statement with no - effect - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/gdbusprivate.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c -index 99b37f3eb..4e42c1a4d 100644 ---- a/gio/gdbusprivate.c -+++ b/gio/gdbusprivate.c -@@ -1945,11 +1945,10 @@ _g_dbus_initialize (void) - - if (g_once_init_enter (&initialized)) - { -- GQuark g_dbus_error_domain; - const gchar *debug; - -- g_dbus_error_domain = G_DBUS_ERROR; -- (g_dbus_error_domain); /* To avoid -Wunused-but-set-variable */ -+ /* Ensure the domain is registered. */ -+ g_dbus_error_quark (); - - debug = g_getenv ("G_DBUS_DEBUG"); - if (debug != NULL) --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch deleted file mode 100644 index 7350803c6..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2d03f99ae4de394cac0690717d96c2d884ccdae2 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 14:47:47 +0000 -Subject: [PATCH 24/29] tests: Add comment to volatile atomic tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -`volatile` should not be used to indicate atomic variables, and we -shouldn’t encourage its use. Keep the tests, since they check that we -don’t emit warnings when built against incorrect old code which uses -`volatile`. But add a comment to stop copy/paste use of `volatile` -in the future. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/tests/atomic.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c -index 7d2459f3a..14e6e454e 100644 ---- a/glib/tests/atomic.c -+++ b/glib/tests/atomic.c -@@ -94,6 +94,9 @@ test_types (void) - res = g_atomic_pointer_compare_and_exchange (&vp_str, NULL, str); - g_assert_true (res); - -+ /* Note that atomic variables should almost certainly not be marked as -+ * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists -+ * to make sure that we don’t warn when built against older third party code. */ - g_atomic_pointer_set (&vp_str_vol, NULL); - res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str); - g_assert_true (res); -@@ -210,6 +213,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS - res = g_atomic_pointer_compare_and_exchange (&vp_str, NULL, (char *) str); - g_assert_true (res); - -+ /* Note that atomic variables should almost certainly not be marked as -+ * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists -+ * to make sure that we don’t warn when built against older third party code. */ - g_atomic_pointer_set (&vp_str_vol, NULL); - res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, (char *) str); - g_assert_true (res); --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch deleted file mode 100644 index c15a3b8a5..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 6bd0a4b29753570a2c20b61b5ad2c0068567b7b6 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 16:44:29 +0000 -Subject: [PATCH 25/29] gthread: Use g_atomic() primitives correctly in - destructor list -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In the Windows destructor list, consistently access -`g_private_destructors` using atomic primitives. - -`g_atomic_pointer_compare_and_exchange()` should be equivalent to -`InterlockedCompareExchangePointer()`, but is a bit more understandable -in a general GLib context, and pairs with `g_atomic_pointer_get()`. (I -can’t find a Windows API equivalent for that.) - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - glib/gthread-win32.c | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c -index 0c37dc6c1..20aca6fa1 100644 ---- a/glib/gthread-win32.c -+++ b/glib/gthread-win32.c -@@ -301,7 +301,7 @@ struct _GPrivateDestructor - GPrivateDestructor *next; - }; - --static GPrivateDestructor * volatile g_private_destructors; -+static GPrivateDestructor *g_private_destructors; /* (atomic) prepend-only */ - static CRITICAL_SECTION g_private_lock; - - static DWORD -@@ -329,7 +329,7 @@ g_private_get_impl (GPrivate *key) - g_thread_abort (errno, "malloc"); - destructor->index = impl; - destructor->notify = key->notify; -- destructor->next = g_private_destructors; -+ destructor->next = g_atomic_pointer_get (&g_private_destructors); - - /* We need to do an atomic store due to the unlocked - * access to the destructor list from the thread exit -@@ -337,13 +337,14 @@ g_private_get_impl (GPrivate *key) - * - * It can double as a sanity check... - */ -- if (InterlockedCompareExchangePointer (&g_private_destructors, destructor, -- destructor->next) != destructor->next) -+ if (!g_atomic_pointer_compare_and_exchange (&g_private_destructors, -+ destructor->next, -+ destructor)) - g_thread_abort (0, "g_private_get_impl(1)"); - } - - /* Ditto, due to the unlocked access on the fast path */ -- if (InterlockedCompareExchangePointer (&key->p, impl, NULL) != NULL) -+ if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl)) - g_thread_abort (0, "g_private_get_impl(2)"); - } - LeaveCriticalSection (&g_private_lock); -@@ -635,7 +636,7 @@ g_thread_win32_thread_detach (void) - */ - dtors_called = FALSE; - -- for (dtor = g_private_destructors; dtor; dtor = dtor->next) -+ for (dtor = g_atomic_pointer_get (&g_private_destructors); dtor; dtor = dtor->next) - { - gpointer value; - --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch deleted file mode 100644 index 7090a12a8..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 041dd8b70bd14b041d6a495492eb7a5fc7568bb7 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 16:47:54 +0000 -Subject: [PATCH 26/29] gtype: Fix some typos in comments - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> ---- - gobject/gtype.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/gobject/gtype.c b/gobject/gtype.c -index be5989a3e..ae1af8a05 100644 ---- a/gobject/gtype.c -+++ b/gobject/gtype.c -@@ -2290,7 +2290,7 @@ type_class_init_Wm (TypeNode *node, - * inherited interfaces are already init_state == INITIALIZED, because - * they either got setup in the above base_init loop, or during - * class_init from within type_add_interface_Wm() for this or -- * an anchestor type. -+ * an ancestor type. - */ - i = 0; - while ((entries = CLASSED_NODE_IFACES_ENTRIES_LOCKED (node)) != NULL) -@@ -3462,7 +3462,7 @@ g_type_depth (GType type) - * be used to determine the types and order in which the leaf type is - * descended from the root type. - * -- * Returns: immediate child of @root_type and anchestor of @leaf_type -+ * Returns: immediate child of @root_type and ancestor of @leaf_type - */ - GType - g_type_next_base (GType type, -@@ -3549,8 +3549,8 @@ type_node_conforms_to_U (TypeNode *node, - - /** - * g_type_is_a: -- * @type: type to check anchestry for -- * @is_a_type: possible anchestor of @type or interface that @type -+ * @type: type to check ancestry for -+ * @is_a_type: possible ancestor of @type or interface that @type - * could conform to - * - * If @is_a_type is a derivable type, check whether @type is a --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch deleted file mode 100644 index 9c4e45ff4..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 47da8ec5d9a284e07f77c7d59fc8eacf3ebf188a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 16:57:22 +0000 -Subject: [PATCH 27/29] gtype: Add some missing atomic accesses to init_state -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Half of the references to `init_state` in `gtype.c` already correctly -accessed it atomically, but a couple didn’t. Drop the `volatile` -qualifier from its declaration, as that’s not necessary for atomic -access. - -Note that this is the `init_state` in `TypeData`, *not* the `init_state` -in `IFaceEntry`. - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Helps: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gobject/gtype.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/gobject/gtype.c b/gobject/gtype.c -index ae1af8a05..909faf138 100644 ---- a/gobject/gtype.c -+++ b/gobject/gtype.c -@@ -322,7 +322,7 @@ struct _ClassData - CommonData common; - guint16 class_size; - guint16 class_private_size; -- int volatile init_state; /* atomic - g_type_class_ref reads it unlocked */ -+ int init_state; /* (atomic) - g_type_class_ref reads it unlocked */ - GBaseInitFunc class_init_base; - GBaseFinalizeFunc class_finalize_base; - GClassInitFunc class_init; -@@ -336,7 +336,7 @@ struct _InstanceData - CommonData common; - guint16 class_size; - guint16 class_private_size; -- int volatile init_state; /* atomic - g_type_class_ref reads it unlocked */ -+ int init_state; /* (atomic) - g_type_class_ref reads it unlocked */ - GBaseInitFunc class_init_base; - GBaseFinalizeFunc class_finalize_base; - GClassInitFunc class_init; -@@ -1415,7 +1415,7 @@ type_node_add_iface_entry_W (TypeNode *node, - - if (parent_entry) - { -- if (node->data && node->data->class.init_state >= BASE_IFACE_INIT) -+ if (node->data && g_atomic_int_get (&node->data->class.init_state) >= BASE_IFACE_INIT) - { - entries->entry[i].init_state = INITIALIZED; - entries->entry[i].vtable = parent_entry->vtable; -@@ -1481,7 +1481,7 @@ type_add_interface_Wm (TypeNode *node, - */ - if (node->data) - { -- InitState class_state = node->data->class.init_state; -+ InitState class_state = g_atomic_int_get (&node->data->class.init_state); - - if (class_state >= BASE_IFACE_INIT) - type_iface_vtable_base_init_Wm (iface, node); -@@ -2175,7 +2175,7 @@ type_class_init_Wm (TypeNode *node, - g_assert (node->is_classed && node->data && - node->data->class.class_size && - !node->data->class.class && -- node->data->class.init_state == UNINITIALIZED); -+ g_atomic_int_get (&node->data->class.init_state) == UNINITIALIZED); - if (node->data->class.class_private_size) - class = g_malloc0 (ALIGN_STRUCT (node->data->class.class_size) + node->data->class.class_private_size); - else --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch deleted file mode 100644 index e03fac19f..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7d417f8406b8fa32a25659120738d22be6a1b482 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Mon, 16 Nov 2020 17:17:21 +0000 -Subject: [PATCH 28/29] gresource: Fix a pointer mismatch with an atomic load - -This squashes a warning when compiling with Clang. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> ---- - gio/gresource.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gio/gresource.c b/gio/gresource.c -index 79a49d33d..b495d12ac 100644 ---- a/gio/gresource.c -+++ b/gio/gresource.c -@@ -1398,7 +1398,7 @@ register_lazy_static_resources (void) - void - g_static_resource_init (GStaticResource *static_resource) - { -- gpointer next; -+ GStaticResource *next; - - do - { --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch deleted file mode 100644 index 3311ad65d..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch +++ /dev/null @@ -1,258 +0,0 @@ -From 83e48d8ac1fee98059e2305d8909dca26190bddc Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@endlessos.org> -Date: Tue, 17 Nov 2020 10:15:15 +0000 -Subject: [PATCH 29/29] docs: Document not to use `volatile` qualifiers - -Signed-off-by: Philip Withnall <pwithnall@endlessos.org> - -Fixes: #600 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] ---- - gio/gdbusconnection.c | 12 ++++++++--- - gio/gdbuserror.c | 3 +++ - glib/gatomic.c | 48 +++++++++++++++++++++++++++++++++++++++++++ - glib/gthread.c | 6 ++++++ - 4 files changed, 66 insertions(+), 3 deletions(-) - -diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c -index 91c365e80..65939a4d2 100644 ---- a/gio/gdbusconnection.c -+++ b/gio/gdbusconnection.c -@@ -1708,7 +1708,9 @@ g_dbus_connection_send_message_unlocked (GDBusConnection *connection, - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to -- * submitting the message to the underlying transport. -+ * submitting the message to the underlying transport. While it has a `volatile` -+ * qualifier, this is a historical artifact and the argument passed to it should -+ * not be `volatile`. - * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @message is not well-formed, -@@ -1979,7 +1981,9 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to -- * submitting the message to the underlying transport. -+ * submitting the message to the underlying transport. While it has a `volatile` -+ * qualifier, this is a historical artifact and the argument passed to it should -+ * not be `volatile`. - * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will -@@ -2105,7 +2109,9 @@ send_message_with_reply_sync_cb (GDBusConnection *connection, - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to -- * submitting the message to the underlying transport. -+ * submitting the message to the underlying transport. While it has a `volatile` -+ * qualifier, this is a historical artifact and the argument passed to it should -+ * not be `volatile`. - * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will -diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c -index b03a33f27..4ad97bb6e 100644 ---- a/gio/gdbuserror.c -+++ b/gio/gdbuserror.c -@@ -177,6 +177,9 @@ g_dbus_error_quark (void) - * - * Helper function for associating a #GError error domain with D-Bus error names. - * -+ * While @quark_volatile has a `volatile` qualifier, this is a historical -+ * artifact and the argument passed to it should not be `volatile`. -+ * - * Since: 2.26 - */ - void -diff --git a/glib/gatomic.c b/glib/gatomic.c -index 67f5ba6b4..0bc67aa35 100644 ---- a/glib/gatomic.c -+++ b/glib/gatomic.c -@@ -105,6 +105,9 @@ - * This call acts as a full compiler and hardware - * memory barrier (before the get). - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of the integer - * - * Since: 2.4 -@@ -125,6 +128,9 @@ gint - * This call acts as a full compiler and hardware - * memory barrier (after the set). - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Since: 2.4 - */ - void -@@ -144,6 +150,9 @@ void - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Since: 2.4 - **/ - void -@@ -163,6 +172,9 @@ void - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: %TRUE if the resultant value is zero - * - * Since: 2.4 -@@ -189,6 +201,9 @@ gboolean - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: %TRUE if the exchange took place - * - * Since: 2.4 -@@ -216,6 +231,9 @@ gboolean - * Before version 2.30, this function did not return a value - * (but g_atomic_int_exchange_and_add() did, and had the same meaning). - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the add, signed - * - * Since: 2.4 -@@ -240,6 +258,9 @@ gint - * Think of this operation as an atomic version of - * `{ tmp = *atomic; *atomic &= val; return tmp; }`. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -@@ -264,6 +285,9 @@ guint - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -@@ -288,6 +312,9 @@ guint - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -@@ -309,6 +336,9 @@ guint - * This call acts as a full compiler and hardware - * memory barrier (before the get). - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of the pointer - * - * Since: 2.4 -@@ -329,6 +359,9 @@ gpointer - * This call acts as a full compiler and hardware - * memory barrier (after the set). - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Since: 2.4 - **/ - void -@@ -354,6 +387,9 @@ void - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: %TRUE if the exchange took place - * - * Since: 2.4 -@@ -379,6 +415,9 @@ gboolean - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the add, signed - * - * Since: 2.30 -@@ -403,6 +442,9 @@ gssize - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -@@ -427,6 +469,9 @@ gsize - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -@@ -451,6 +496,9 @@ gsize - * - * This call acts as a full compiler and hardware memory barrier. - * -+ * While @atomic has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: the value of @atomic before the operation, unsigned - * - * Since: 2.30 -diff --git a/glib/gthread.c b/glib/gthread.c -index 612a9739f..29216d7fd 100644 ---- a/glib/gthread.c -+++ b/glib/gthread.c -@@ -686,6 +686,9 @@ g_once_impl (GOnce *once, - * // use initialization_value here - * ]| - * -+ * While @location has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Returns: %TRUE if the initialization section should be entered, - * %FALSE and blocks otherwise - * -@@ -725,6 +728,9 @@ gboolean - * releases concurrent threads blocking in g_once_init_enter() on this - * initialization variable. - * -+ * While @location has a `volatile` qualifier, this is a historical artifact and -+ * the pointer passed to it should not be `volatile`. -+ * - * Since: 2.14 - */ - void --- -2.30.1 - diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch index 4cbcc29a5..f34f30bb3 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch @@ -1,4 +1,4 @@ -From 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001 +From e56cdb8c343dd6a6ed3b10bd54e353d633ad6158 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Fri, 11 Mar 2016 15:35:55 +0000 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds @@ -19,19 +19,19 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index dc4d6d3..da46906 100644 +index a2909a8..1f4ab82 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c -@@ -49,6 +49,8 @@ - #include "gmemorymonitordbus.h" +@@ -51,6 +51,8 @@ #ifdef G_OS_WIN32 #include "gregistrysettingsbackend.h" + #include "giowin32-priv.h" +#else +#include <dlfcn.h> #endif #include <glib/gstdio.h> -@@ -1163,7 +1165,15 @@ get_gio_module_dir (void) +@@ -1213,7 +1215,15 @@ get_gio_module_dir (void) NULL); g_free (install_dir); #else diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb deleted file mode 100644 index 3909b76dd..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb +++ /dev/null @@ -1,86 +0,0 @@ -require glib.inc - -PE = "1" - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ - file://run-ptest \ - file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ - file://Enable-more-tests-while-cross-compiling.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0001-Do-not-ignore-return-value-of-write.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ - file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ - file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ - file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ - file://0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch \ - file://0001-tests-codegen.py-removing-unecessary-print-statement.patch \ - " -SRC_URI += "\ - file://0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch \ - file://0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch \ - file://0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch \ - file://0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch \ - file://0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch \ - file://0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch \ - file://0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch \ - file://0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch \ - file://0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch \ - file://0010-kqueue-Fix-unlocked-access-to-shared-variable.patch \ - file://0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch \ - file://0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch \ - file://0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch \ - file://0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch \ - file://0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch \ - file://0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch \ - file://0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch \ - file://0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch \ - file://0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch \ - file://0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch \ - file://0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch \ - file://0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch \ - file://0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch \ - file://0024-tests-Add-comment-to-volatile-atomic-tests.patch \ - file://0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch \ - file://0026-gtype-Fix-some-typos-in-comments.patch \ - file://0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch \ - file://0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch \ - file://0029-docs-Document-not-to-use-volatile-qualifiers.patch \ -" -SRC_URI_append_class-native = " file://relocate-modules.patch" - -SRC_URI[sha256sum] = "09f158769f6f26b31074e15b1ac80ec39b13b53102dfae66cfe826fb2cc65502" - -# Find any meson cross files in FILESPATH that are relevant for the current -# build (using siteinfo) and add them to EXTRA_OEMESON. -inherit siteinfo -def find_meson_cross_files(d): - if bb.data.inherits_class('native', d): - return "" - - thisdir = os.path.normpath(d.getVar("THISDIR")) - import collections - sitedata = siteinfo_data(d) - # filename -> found - files = collections.OrderedDict() - for path in d.getVar("FILESPATH").split(":"): - for element in sitedata: - filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) - sanitized_path = filename.replace(thisdir, "${THISDIR}") - if sanitized_path == filename: - if os.path.exists(filename): - bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) - continue - files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) - - items = ["--cross-file=" + k for k,v in files.items() if v] - d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) - items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] - d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) - -python () { - find_meson_cross_files(d) -} diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.3.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.3.bb new file mode 100644 index 000000000..2a3a00fad --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.3.bb @@ -0,0 +1,54 @@ +require glib.inc + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://Enable-more-tests-while-cross-compiling.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0001-Do-not-ignore-return-value-of-write.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch \ + " +SRC_URI_append_class-native = " file://relocate-modules.patch" + +SRC_URI[sha256sum] = "e7e1a3c20c026109c45c9ec4a31d8dcebc22e86c69486993e565817d64be3138" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + thisdir = os.path.normpath(d.getVar("THISDIR")) + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + sanitized_path = filename.replace(thisdir, "${THISDIR}") + if sanitized_path == filename: + if os.path.exists(filename): + bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) + continue + files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} diff --git a/poky/meta/recipes-core/glib-networking/glib-networking_2.66.0.bb b/poky/meta/recipes-core/glib-networking/glib-networking_2.68.1.bb index 230932daf..fac04087d 100644 --- a/poky/meta/recipes-core/glib-networking/glib-networking_2.66.0.bb +++ b/poky/meta/recipes-core/glib-networking/glib-networking_2.68.1.bb @@ -9,9 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SECTION = "libs" DEPENDS = "glib-2.0" -SRC_URI[archive.sha256sum] = "c5d7be2437fdd196eebfb70c4517b96d3ba7ec13bd496318b8f02dea383e0099" +SRC_URI[archive.sha256sum] = "d05d8bd124a9f53fc2b93b18f2386d512e4f48bc5a80470a7967224f3bf53b30" -PACKAGECONFIG ??= "gnutls ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG ??= "openssl ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl" @@ -33,4 +33,6 @@ FILES_${PN} += "\ FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la" FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a" +RDEPENDS_${PN}-ptest += "bash" + BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-core/glibc/glibc-package.inc b/poky/meta/recipes-core/glibc/glibc-package.inc index 8d0cc8047..92e5dbac6 100644 --- a/poky/meta/recipes-core/glibc/glibc-package.inc +++ b/poky/meta/recipes-core/glibc/glibc-package.inc @@ -1,6 +1,6 @@ INHIBIT_SYSROOT_STRIP = "1" -PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc" +PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src" # The ld.so in this glibc supports the GNU_HASH RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)" @@ -43,7 +43,7 @@ FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" FILES_${PN}-mtrace = "${bindir}/mtrace" -FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump" +FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${bindir}/zdump" FILES_${PN}-utils = "${bindir}/* ${sbindir}/*" FILES_catchsegv = "${bindir}/catchsegv" RDEPENDS_catchsegv = "libsegfault" diff --git a/poky/meta/recipes-core/glibc/glibc-version.inc b/poky/meta/recipes-core/glibc/glibc-version.inc index 3a9517317..376ead66a 100644 --- a/poky/meta/recipes-core/glibc/glibc-version.inc +++ b/poky/meta/recipes-core/glibc/glibc-version.inc @@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.33/master" PV = "2.33" -SRCREV_glibc ?= "9826b03b747b841f5fc6de2054bf1ef3f5c4bdf3" +SRCREV_glibc ?= "3f5080aedd164c1f92a53552dd3e0b82ac6d2bd3" SRCREV_localedef ?= "bd644c9e6f3e20c5504da1488448173c69c56c28" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" diff --git a/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch b/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch deleted file mode 100644 index 39fde5b78..000000000 --- a/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c4ad832276f4dadfa40904109b26a521468f66bc Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Thu, 4 Feb 2021 15:00:20 +0100 -Subject: [PATCH] nptl: Remove private futex optimization [BZ #27304] - -It is effectively used, unexcept for pthread_cond_destroy, where we do -not want it; see bug 27304. The internal locks do not support a -process-shared mode. - -This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: -Move pthread_cond_destroy implementation into libc"). - -Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> - -Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27304] -Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> ---- - sysdeps/nptl/lowlevellock-futex.h | 14 +------------- - 1 file changed, 1 insertion(+), 13 deletions(-) - -diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h -index ecb729da6b..ca96397a4a 100644 ---- a/sysdeps/nptl/lowlevellock-futex.h -+++ b/sysdeps/nptl/lowlevellock-futex.h -@@ -50,20 +50,8 @@ - #define LLL_SHARED FUTEX_PRIVATE_FLAG - - #ifndef __ASSEMBLER__ -- --# if IS_IN (libc) || IS_IN (rtld) --/* In libc.so or ld.so all futexes are private. */ --# define __lll_private_flag(fl, private) \ -- ({ \ -- /* Prevent warnings in callers of this macro. */ \ -- int __lll_private_flag_priv __attribute__ ((unused)); \ -- __lll_private_flag_priv = (private); \ -- ((fl) | FUTEX_PRIVATE_FLAG); \ -- }) --# else --# define __lll_private_flag(fl, private) \ -+# define __lll_private_flag(fl, private) \ - (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) --# endif - - # define lll_futex_syscall(nargs, futexp, op, ...) \ - ({ \ --- -2.27.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch b/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch deleted file mode 100644 index 3cb60b2e5..000000000 --- a/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch +++ /dev/null @@ -1,116 +0,0 @@ -From b1971f6f1331d738d1d6b376b4741668a7546125 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Tue, 2 Feb 2021 13:45:58 -0800 -Subject: [PATCH] x86: Require full ISA support for x86-64 level marker [BZ #27318] - -Since -march=sandybridge enables ISAs in x86-64 ISA level v3, the v3 -marker is set on libc.so. We couldn't set the needed ISA marker to v2 -since this libc won't run on all v2 machines. Technically, the v3 marker -is correct. But the resulting libc.so won't run on Sandy Brigde, which -is a v2 machine, even when libc is compiled with -march=sandybridge: - -$ ./elf/ld.so ./libc.so -./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3 - -Instead, we require full ISA support for x86-64 level marker and disable -x86-64 level marker for -march=sandybridge which enables ISAs between v2 -and v3. - -Upstream-Status: Submitted [https://sourceware.org/pipermail/libc-alpha/2021-February/122297.html] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - - sysdeps/x86/configure | 7 ++++++- - sysdeps/x86/configure.ac | 2 +- - sysdeps/x86/isa-level.c | 21 ++++++++++++++++++++- - 3 files changed, 27 insertions(+), 3 deletions(-) - -diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure -index 5e32dc62b3..5b20646843 100644 ---- a/sysdeps/x86/configure -+++ b/sysdeps/x86/configure -@@ -133,7 +133,12 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest c - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` -- if test "$count" = 1; then -+ if test "$count" = 1 && { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then - libc_cv_include_x86_isa_level=yes - fi - fi -diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac -index f94088f377..54ecd33d2c 100644 ---- a/sysdeps/x86/configure.ac -+++ b/sysdeps/x86/configure.ac -@@ -100,7 +100,7 @@ EOF - libc_cv_include_x86_isa_level=no - if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S); then - count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` -- if test "$count" = 1; then -+ if test "$count" = 1 && AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c); then - libc_cv_include_x86_isa_level=yes - fi - fi -diff --git a/sysdeps/x86/isa-level.c b/sysdeps/x86/isa-level.c -index aaf524cb56..7f83449061 100644 ---- a/sysdeps/x86/isa-level.c -+++ b/sysdeps/x86/isa-level.c -@@ -25,12 +25,17 @@ - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - --#include <elf.h> -+#ifdef _LIBC -+# include <elf.h> -+#endif - - /* ELF program property for x86 ISA level. */ - #ifdef INCLUDE_X86_ISA_LEVEL - # if defined __x86_64__ || defined __FXSR__ || !defined _SOFT_FLOAT \ - || defined __MMX__ || defined __SSE__ || defined __SSE2__ -+# if !defined __SSE__ || !defined __SSE2__ -+# error "Missing ISAs for x86-64 ISA level baseline" -+# endif - # define ISA_BASELINE GNU_PROPERTY_X86_ISA_1_BASELINE - # else - # define ISA_BASELINE 0 -@@ -40,6 +45,11 @@ - || (defined __x86_64__ && defined __LAHF_SAHF__) \ - || defined __POPCNT__ || defined __SSE3__ \ - || defined __SSSE3__ || defined __SSE4_1__ || defined __SSE4_2__ -+# if !defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 \ -+ || !defined __POPCNT__ || !defined __SSE3__ \ -+ || !defined __SSSE3__ || !defined __SSE4_1__ || !defined __SSE4_2__ -+# error "Missing ISAs for x86-64 ISA level v2" -+# endif - # define ISA_V2 GNU_PROPERTY_X86_ISA_1_V2 - # else - # define ISA_V2 0 -@@ -48,6 +58,10 @@ - # if defined __AVX__ || defined __AVX2__ || defined __F16C__ \ - || defined __FMA__ || defined __LZCNT__ || defined __MOVBE__ \ - || defined __XSAVE__ -+# if !defined __AVX__ || !defined __AVX2__ || !defined __F16C__ \ -+ || !defined __FMA__ || !defined __LZCNT__ -+# error "Missing ISAs for x86-64 ISA level v3" -+# endif - # define ISA_V3 GNU_PROPERTY_X86_ISA_1_V3 - # else - # define ISA_V3 0 -@@ -55,6 +69,11 @@ - - # if defined __AVX512F__ || defined __AVX512BW__ || defined __AVX512CD__ \ - || defined __AVX512DQ__ || defined __AVX512VL__ -+# if !defined __AVX512F__ || !defined __AVX512BW__ \ -+ || !defined __AVX512CD__ || !defined __AVX512DQ__ \ -+ || !defined __AVX512VL__ -+# error "Missing ISAs for x86-64 ISA level v4" -+# endif - # define ISA_V4 GNU_PROPERTY_X86_ISA_1_V4 - # else - # define ISA_V4 0 diff --git a/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch b/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch deleted file mode 100644 index e904b28a0..000000000 --- a/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 044e603b698093cf48f6e6229e0b66acf05227e4 Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Fri, 19 Feb 2021 13:29:00 +0100 -Subject: [PATCH] string: Work around GCC PR 98512 in rawmemchr - -Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=044e603b698093cf48f6e6229e0b66acf05227e4] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - string/rawmemchr.c | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 59bbeeaa42..b8523118e5 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -22,24 +22,28 @@ - # define RAWMEMCHR __rawmemchr - #endif - --/* Find the first occurrence of C in S. */ --void * --RAWMEMCHR (const void *s, int c) --{ -- DIAG_PUSH_NEEDS_COMMENT; -+/* The pragmata should be nested inside RAWMEMCHR below, but that -+ triggers GCC PR 98512. */ -+DIAG_PUSH_NEEDS_COMMENT; - #if __GNUC_PREREQ (7, 0) -- /* GCC 8 warns about the size passed to memchr being larger than -- PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ -- DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); -+/* GCC 8 warns about the size passed to memchr being larger than -+ PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ -+DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); - #endif - #if __GNUC_PREREQ (11, 0) -- /* Likewise GCC 11, with a different warning option. */ -- DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); -+/* Likewise GCC 11, with a different warning option. */ -+DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); - #endif -+ -+/* Find the first occurrence of C in S. */ -+void * -+RAWMEMCHR (const void *s, int c) -+{ - if (c != '\0') - return memchr (s, c, (size_t)-1); -- DIAG_POP_NEEDS_COMMENT; - return (char *)s + strlen (s); - } - libc_hidden_def (__rawmemchr) - weak_alias (__rawmemchr, rawmemchr) -+ -+DIAG_POP_NEEDS_COMMENT; --- -2.30.1 - diff --git a/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch b/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch deleted file mode 100644 index 3a004e227..000000000 --- a/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 750b00a1ddae220403fd892a6fd4e0791ffd154a Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Fri, 18 Sep 2020 07:55:14 -0700 -Subject: [PATCH] x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444] - - x86: Move x86 processor cache info to cpu_features - -missed _SC_LEVEL1_ICACHE_LINESIZE. - -1. Add level1_icache_linesize to struct cpu_features. -2. Initialize level1_icache_linesize by calling handle_intel, -handle_zhaoxin and handle_amd with _SC_LEVEL1_ICACHE_LINESIZE. -3. Return level1_icache_linesize for _SC_LEVEL1_ICACHE_LINESIZE. - -Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27444] -Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> ---- - sysdeps/x86/Makefile | 8 +++ - sysdeps/x86/cacheinfo.c | 3 + - sysdeps/x86/dl-cacheinfo.h | 6 ++ - sysdeps/x86/include/cpu-features.h | 2 + - .../x86/tst-sysconf-cache-linesize-static.c | 1 + - sysdeps/x86/tst-sysconf-cache-linesize.c | 57 +++++++++++++++++++ - 6 files changed, 77 insertions(+) - create mode 100644 sysdeps/x86/tst-sysconf-cache-linesize-static.c - create mode 100644 sysdeps/x86/tst-sysconf-cache-linesize.c - -diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile -index dd82674342..d231263051 100644 ---- a/sysdeps/x86/Makefile -+++ b/sysdeps/x86/Makefile -@@ -208,3 +208,11 @@ $(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ - generated += check-cet.out - endif - endif -+ -+ifeq ($(subdir),posix) -+tests += \ -+ tst-sysconf-cache-linesize \ -+ tst-sysconf-cache-linesize-static -+tests-static += \ -+ tst-sysconf-cache-linesize-static -+endif -diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c -index 7b8df45e3b..5ea4723ca6 100644 ---- a/sysdeps/x86/cacheinfo.c -+++ b/sysdeps/x86/cacheinfo.c -@@ -32,6 +32,9 @@ __cache_sysconf (int name) - case _SC_LEVEL1_ICACHE_SIZE: - return cpu_features->level1_icache_size; - -+ case _SC_LEVEL1_ICACHE_LINESIZE: -+ return cpu_features->level1_icache_linesize; -+ - case _SC_LEVEL1_DCACHE_SIZE: - return cpu_features->level1_dcache_size; - -diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h -index a31fa0783a..7cd00b92f1 100644 ---- a/sysdeps/x86/dl-cacheinfo.h -+++ b/sysdeps/x86/dl-cacheinfo.h -@@ -707,6 +707,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - long int core; - unsigned int threads = 0; - unsigned long int level1_icache_size = -1; -+ unsigned long int level1_icache_linesize = -1; - unsigned long int level1_dcache_size = -1; - unsigned long int level1_dcache_assoc = -1; - unsigned long int level1_dcache_linesize = -1; -@@ -726,6 +727,8 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - - level1_icache_size - = handle_intel (_SC_LEVEL1_ICACHE_SIZE, cpu_features); -+ level1_icache_linesize -+ = handle_intel (_SC_LEVEL1_ICACHE_LINESIZE, cpu_features); - level1_dcache_size = data; - level1_dcache_assoc - = handle_intel (_SC_LEVEL1_DCACHE_ASSOC, cpu_features); -@@ -753,6 +756,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - shared = handle_zhaoxin (_SC_LEVEL3_CACHE_SIZE); - - level1_icache_size = handle_zhaoxin (_SC_LEVEL1_ICACHE_SIZE); -+ level1_icache_linesize = handle_zhaoxin (_SC_LEVEL1_ICACHE_LINESIZE); - level1_dcache_size = data; - level1_dcache_assoc = handle_zhaoxin (_SC_LEVEL1_DCACHE_ASSOC); - level1_dcache_linesize = handle_zhaoxin (_SC_LEVEL1_DCACHE_LINESIZE); -@@ -772,6 +776,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - shared = handle_amd (_SC_LEVEL3_CACHE_SIZE); - - level1_icache_size = handle_amd (_SC_LEVEL1_ICACHE_SIZE); -+ level1_icache_linesize = handle_amd (_SC_LEVEL1_ICACHE_LINESIZE); - level1_dcache_size = data; - level1_dcache_assoc = handle_amd (_SC_LEVEL1_DCACHE_ASSOC); - level1_dcache_linesize = handle_amd (_SC_LEVEL1_DCACHE_LINESIZE); -@@ -833,6 +838,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - } - - cpu_features->level1_icache_size = level1_icache_size; -+ cpu_features->level1_icache_linesize = level1_icache_linesize; - cpu_features->level1_dcache_size = level1_dcache_size; - cpu_features->level1_dcache_assoc = level1_dcache_assoc; - cpu_features->level1_dcache_linesize = level1_dcache_linesize; -diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h -index 624736b40e..39a3f4f311 100644 ---- a/sysdeps/x86/include/cpu-features.h -+++ b/sysdeps/x86/include/cpu-features.h -@@ -874,6 +874,8 @@ struct cpu_features - unsigned long int rep_stosb_threshold; - /* _SC_LEVEL1_ICACHE_SIZE. */ - unsigned long int level1_icache_size; -+ /* _SC_LEVEL1_ICACHE_LINESIZE. */ -+ unsigned long int level1_icache_linesize; - /* _SC_LEVEL1_DCACHE_SIZE. */ - unsigned long int level1_dcache_size; - /* _SC_LEVEL1_DCACHE_ASSOC. */ -diff --git a/sysdeps/x86/tst-sysconf-cache-linesize-static.c b/sysdeps/x86/tst-sysconf-cache-linesize-static.c -new file mode 100644 -index 0000000000..152ae68821 ---- /dev/null -+++ b/sysdeps/x86/tst-sysconf-cache-linesize-static.c -@@ -0,0 +1 @@ -+#include "tst-sysconf-cache-linesize.c" -diff --git a/sysdeps/x86/tst-sysconf-cache-linesize.c b/sysdeps/x86/tst-sysconf-cache-linesize.c -new file mode 100644 -index 0000000000..642dbde5d2 ---- /dev/null -+++ b/sysdeps/x86/tst-sysconf-cache-linesize.c -@@ -0,0 +1,57 @@ -+/* Test system cache line sizes. -+ Copyright (C) 2021 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ <https://www.gnu.org/licenses/>. */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <array_length.h> -+ -+static struct -+{ -+ const char *name; -+ int _SC_val; -+} sc_options[] = -+ { -+#define N(name) { "_SC_"#name, _SC_##name } -+ N (LEVEL1_ICACHE_LINESIZE), -+ N (LEVEL1_DCACHE_LINESIZE), -+ N (LEVEL2_CACHE_LINESIZE) -+ }; -+ -+static int -+do_test (void) -+{ -+ int result = EXIT_SUCCESS; -+ -+ for (int i = 0; i < array_length (sc_options); ++i) -+ { -+ long int scret = sysconf (sc_options[i]._SC_val); -+ if (scret < 0) -+ { -+ printf ("sysconf (%s) returned < 0 (%ld)\n", -+ sc_options[i].name, scret); -+ result = EXIT_FAILURE; -+ } -+ else -+ printf ("sysconf (%s): %ld\n", sc_options[i].name, scret); -+ } -+ -+ return result; -+} -+ -+#include <support/test-driver.c> diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch deleted file mode 100644 index 26c5c0d2a..000000000 --- a/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch +++ /dev/null @@ -1,51 +0,0 @@ -From dca565886b5e8bd7966e15f0ca42ee5cff686673 Mon Sep 17 00:00:00 2001 -From: DJ Delorie <dj@redhat.com> -Date: Thu, 25 Feb 2021 16:08:21 -0500 -Subject: [PATCH] nscd: Fix double free in netgroupcache [BZ #27462] - -In commit 745664bd798ec8fd50438605948eea594179fba1 a use-after-free -was fixed, but this led to an occasional double-free. This patch -tracks the "live" allocation better. - -Tested manually by a third party. - -Related: RHBZ 1927877 - -Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> -Reviewed-by: Carlos O'Donell <carlos@redhat.com> - -Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=dca565886b5e8bd7966e15f0ca42ee5cff686673] - -CVE: CVE-2021-27645 - -Reviewed-by: Carlos O'Donell <carlos@redhat.com> -Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> ---- - nscd/netgroupcache.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c -index dba6ceec1b..ad2daddafd 100644 ---- a/nscd/netgroupcache.c -+++ b/nscd/netgroupcache.c -@@ -248,7 +248,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, - : NULL); - ndomain = (ndomain ? newbuf + ndomaindiff - : NULL); -- buffer = newbuf; -+ *tofreep = buffer = newbuf; - } - - nhost = memcpy (buffer + bufused, -@@ -319,7 +319,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, - else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) - { - buflen *= 2; -- buffer = xrealloc (buffer, buflen); -+ *tofreep = buffer = xrealloc (buffer, buflen); - } - else if (status == NSS_STATUS_RETURN - || status == NSS_STATUS_NOTFOUND --- -2.27.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/check-test-wrapper b/poky/meta/recipes-core/glibc/glibc/check-test-wrapper index f8e04e02d..6ec9b9b29 100644 --- a/poky/meta/recipes-core/glibc/glibc/check-test-wrapper +++ b/poky/meta/recipes-core/glibc/glibc/check-test-wrapper @@ -2,6 +2,7 @@ import sys import os import subprocess +import resource env = os.environ.copy() args = sys.argv[1:] @@ -44,6 +45,14 @@ if targettype == "user": qemuargs += ["-L", sysroot] qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))] command = qemuargs + args + + # We've seen qemu-arm using up all system memory for some glibc + # tests e.g. nptl/tst-pthread-timedlock-lockloop + # Cap at 8GB since no test should need more than that + # (5GB adds 7 failures for qemuarm glibc test run) + limit = 8*1024*1024*1024 + resource.setrlimit(resource.RLIMIT_AS, (limit, limit)) + elif targettype == "ssh": host = os.environ.get("SSH_HOST", None) user = os.environ.get("SSH_HOST_USER", None) diff --git a/poky/meta/recipes-core/glibc/glibc_2.33.bb b/poky/meta/recipes-core/glibc/glibc_2.33.bb index 5e0baa53e..caa2e2ae1 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.33.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.33.bb @@ -1,7 +1,20 @@ require glibc.inc require glibc-version.inc -CVE_CHECK_WHITELIST += "CVE-2020-10029" +CVE_CHECK_WHITELIST += "CVE-2020-10029 CVE-2021-27645" + +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010022 +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010023 +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010024 +# Upstream glibc maintainers dispute there is any issue and have no plans to address it further. +# "this is being treated as a non-security bug and no real threat." +CVE_CHECK_WHITELIST += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024" + +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010025 +# Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow +# easier access for another. "ASLR bypass itself is not a vulnerability." +# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853 +CVE_CHECK_WHITELIST += "CVE-2019-1010025" DEPENDS += "gperf-native bison-native make-native" @@ -43,11 +56,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ - file://0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch \ - file://0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch \ - file://0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch \ - file://CVE-2021-27645.patch \ - file://0001-nptl-Remove-private-futex-optimization-BZ-27304.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" @@ -85,6 +93,7 @@ EXTRA_OECONF_append_x86-64 = " --enable-cet" PACKAGECONFIG ??= "nscd" PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" +PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging" do_patch_append() { bb.build.exec_func('do_fix_readlib_c', d) diff --git a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb index 1aeb952db..32f8d16a4 100644 --- a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb @@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx" inherit core-image setuptools3 -SRCREV ?= "42514ade8bdb9502f49a56752561f6c2e9f23348" +SRCREV ?= "b44849c32c87fbb8c5a465ecc29a6182e6781d78" SRC_URI = "git://git.yoctoproject.org/poky \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ diff --git a/poky/meta/recipes-core/images/core-image-ptest-all.bb b/poky/meta/recipes-core/images/core-image-ptest-all.bb new file mode 100644 index 000000000..c1d6aa28a --- /dev/null +++ b/poky/meta/recipes-core/images/core-image-ptest-all.bb @@ -0,0 +1,25 @@ +inherit features_check +REQUIRED_DISTRO_FEATURES = "ptest" + +require core-image-minimal.bb +require conf/distro/include/ptest-packagelists.inc + +DESCRIPTION += "Also includes ptest packages." +HOMEPAGE = "https://www.yoctoproject.org/" + +# Include the full set of ptests +IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}" + +# This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live +# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the +# box) and explicitly add just 1100MB. +# strace-ptest in particular needs more than 500MB +IMAGE_OVERHEAD_FACTOR = "1.0" +IMAGE_ROOTFS_EXTRA_SPACE = "1124288" + +# ptests need more memory than standard to avoid the OOM killer +# also lttng-tools needs /tmp that has at least 1G +QB_MEM = "-m 2048" + +# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places +PTEST_EXPECT_FAILURE = "1" diff --git a/poky/meta/recipes-core/images/core-image-ptest-fast.bb b/poky/meta/recipes-core/images/core-image-ptest-fast.bb new file mode 100644 index 000000000..40df274c4 --- /dev/null +++ b/poky/meta/recipes-core/images/core-image-ptest-fast.bb @@ -0,0 +1,24 @@ +inherit features_check +REQUIRED_DISTRO_FEATURES = "ptest" + +require core-image-minimal.bb +require conf/distro/include/ptest-packagelists.inc + +# Include only fast (< 30 sec) ptests +IMAGE_INSTALL += "${PTESTS_FAST}" + +DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA." +HOMEPAGE = "https://www.yoctoproject.org/" + +# This image is sufficiently large (~1.8GB) that it can't actually fit in a live +# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the +# box) and explicitly add just 1500MB. +# strace-ptest in particular needs more than 500MB +IMAGE_OVERHEAD_FACTOR = "1.0" +IMAGE_ROOTFS_EXTRA_SPACE = "1524288" + +# ptests need more memory than standard to avoid the OOM killer +QB_MEM = "-m 1024" + +# Sadly at the moment the fast set of ptests is not robust enough and sporadically fails in a couple of places +PTEST_EXPECT_FAILURE = "1" diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs index 10b958317..e0efbe6eb 100644 --- a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs +++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs @@ -56,8 +56,8 @@ rootfs_run() { # It is unlikely to change, but keep trying anyway. # Perhaps we pick a different device next time. umount $ROOTFS_DIR - fi fi + fi fi debug "Sleeping for $delay second(s) to wait root to settle..." sleep $delay diff --git a/poky/meta/recipes-core/libxcrypt/files/0001-configure.ac-do-not-use-compute-symver-floor.patch b/poky/meta/recipes-core/libxcrypt/files/0001-configure.ac-do-not-use-compute-symver-floor.patch deleted file mode 100644 index 4e6b42710..000000000 --- a/poky/meta/recipes-core/libxcrypt/files/0001-configure.ac-do-not-use-compute-symver-floor.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b28bb856ccebe8fded51d11362bf5920699eed59 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 18 Mar 2021 10:52:13 +0000 -Subject: [PATCH] configure.ac: do not use compute-symver-floor - -This script (newly introduced in 4.4.18) sporadically fails, without -failing configure(), which has been reported at -https://github.com/besser82/libxcrypt/issues/123 - -Upstream-Status: Inappropriate -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - configure.ac | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 45b91b4..f3ba945 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -426,11 +426,7 @@ if test x$enable_shared != xyes; then enable_obsolete_api=0; fi - # need to be binary backward compatible with. - if test $enable_obsolete_api = 1; then - AC_MSG_CHECKING([minimum symbol version to use for compatibility symbols]) -- SYMVER_FLOOR=$( -- $PERL ${srcdir}/build-aux/compute-symver-floor \ -- ${srcdir}/lib/libcrypt.minver $host_os $host_cpu \ -- 2>&AS_MESSAGE_LOG_FD -- ) -+ SYMVER_FLOOR=GLIBC_2.0 - AC_MSG_RESULT([$SYMVER_FLOOR]) - case "$SYMVER_FLOOR" in - ERROR) diff --git a/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch b/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch new file mode 100644 index 000000000..0772998c7 --- /dev/null +++ b/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch @@ -0,0 +1,33 @@ +From fd9a46695594c3cd836ecb7d959f03f605e69a2f Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Fri, 30 Apr 2021 10:35:02 +0100 +Subject: [PATCH] libxcrypt: Update to 4.4.19 release and fix symbol version + +If you pass CFLAGS with a leading space, " " gets passed to popen and convinces +gcc to try and open a file called " ". This results in a confusing error message +like: + +x86_64-pokysdk-linux-gcc: error: : No such file or directory + +Avoid this by stripping empty elements out of CFLAGS. + +Upstream-Status: Submitted [https://github.com/besser82/libxcrypt/pull/126] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +--- + build-aux/compute-symver-floor | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/build-aux/compute-symver-floor b/build-aux/compute-symver-floor +index 4ec82e1..8117342 100644 +--- a/build-aux/compute-symver-floor ++++ b/build-aux/compute-symver-floor +@@ -36,6 +36,8 @@ sub preprocessor_check { + die "C compiler not available\n" unless @CC; + + @CFLAGS = sh_split($ENV{CFLAGS} // q{}); ++ # Remove empty elements, particularly leading ones which cause issues with popen below ++ @CFLAGS = grep {$_} @CFLAGS; + + # Remove empty elements, particularly leading ones which + # cause issues with popen below. diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.18.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.22.bb index ba74eb1f9..ba74eb1f9 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.18.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.22.bb diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc index b5ca863d5..e4505a666 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc @@ -3,18 +3,18 @@ DESCRIPTION = "Forked code from glibc libary to extract only crypto part." HOMEPAGE = "https://github.com/besser82/libxcrypt" SECTION = "libs" LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://LICENSING;md5=bd5d9777dfe7076c4f2928f12fed226a \ +LIC_FILES_CHKSUM = "file://LICENSING;md5=afed27a72ae2a8075978299eebaa1f5d \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ " inherit autotools pkgconfig -SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \ - file://0001-configure.ac-do-not-use-compute-symver-floor.patch \ - " -SRCREV = "94d84f92ca123d851586016c4678eb1f21c19029" +SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}" +SRCREV = "3df9620d08db207367c0c5152148665b5ce422e1" SRCBRANCH ?= "develop" +SRC_URI += "file://fix_cflags_handling.patch" + PROVIDES = "virtual/crypt" FILES_${PN} = "${libdir}/libcrypt*.so.* \ diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.18.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.22.bb index 79dba2f6d..79dba2f6d 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.18.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.22.bb diff --git a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch index 5e9a0a506..6d9ede619 100644 --- a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch +++ b/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch @@ -1,4 +1,4 @@ -From 2b5fb416aa275fd2a17a0139a2f783998bcb42cc Mon Sep 17 00:00:00 2001 +From ea1993d1d9a18c5e61b9cb271892b0a48f508d32 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt <pkj@axis.com> Date: Fri, 9 Jun 2017 17:50:46 +0200 Subject: [PATCH] Make ptest run the python tests if python is enabled @@ -8,16 +8,14 @@ be due to the fact that the tests are forced to run with Python 3. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> - --- - Makefile.am | 2 +- - python/Makefile.am | 9 +++++++++ - python/tests/Makefile.am | 10 ++++++++++ - python/tests/tstLastError.py | 2 +- - 4 files changed, 21 insertions(+), 2 deletions(-) + Makefile.am | 2 +- + python/Makefile.am | 9 +++++++++ + python/tests/Makefile.am | 10 ++++++++++ + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am -index ae62274..bd1e425 100644 +index b428452b..dc18d6dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -203,9 +203,9 @@ install-ptest: @@ -32,7 +30,7 @@ index ae62274..bd1e425 100644 runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) diff --git a/python/Makefile.am b/python/Makefile.am -index 34aed96..ba3ec6a 100644 +index 34aed96c..ba3ec6a4 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES) @@ -53,7 +51,7 @@ index 34aed96..ba3ec6a 100644 tests test: all cd tests && $(MAKE) tests diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am -index 227e24d..021bb29 100644 +index 227e24df..3568c2d2 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -59,6 +59,11 @@ XMLS= \ @@ -83,16 +81,6 @@ index 227e24d..021bb29 100644 + tests: endif -diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py -index 81d0acc..162c8db 100755 ---- a/python/tests/tstLastError.py -+++ b/python/tests/tstLastError.py -@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase): - when the exception is raised, check the libxml2.lastError for - expected values.""" - # disable the default error handler -- libxml2.registerErrorHandler(None,None) -+ libxml2.registerErrorHandler(lambda ctx,str: None,None) - try: - f(*args) - except exc: +-- +2.25.1 + diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch deleted file mode 100644 index 88eb65a6a..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7ffcd44d7e6c46704f8af0321d9314cd26e0e18a Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie <xiezhipeng1@huawei.com> -Date: Tue, 20 Aug 2019 16:33:06 +0800 -Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream - -When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun -alloc a new schema for ctxt->schema and set vctxt->xsiAssemble -to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize -vctxt->xsiAssemble to 0 again which cause the alloced schema -can not be freed anymore. - -Found with libFuzzer. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/7ffcd44d7e6c46704f8af0321d9314cd26e0e18a] -CVE: CVE-2019-20388 - -Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> -Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> ---- - xmlschemas.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xmlschemas.c b/xmlschemas.c -index 301c8449..39d92182 100644 ---- a/xmlschemas.c -+++ b/xmlschemas.c -@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { - vctxt->nberrors = 0; - vctxt->depth = -1; - vctxt->skipDepth = -1; -- vctxt->xsiAssemble = 0; - vctxt->hasKeyrefs = 0; - #ifdef ENABLE_IDC_NODE_TABLES_TEST - vctxt->createIDCNodeTables = 1; --- -2.24.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch deleted file mode 100644 index 822434666..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Fri, 7 Aug 2020 21:54:27 +0200 -Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' - -Make sure that truncated UTF-8 sequences don't cause an out-of-bounds -array access. - -Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for -the report. - -Fixes #178. - -CVE: CVE-2020-24977 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/50f06b3efb638efb0abd95dc62dca05ae67882c2] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - xmllint.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/xmllint.c b/xmllint.c -index f6a8e463..c647486f 100644 ---- a/xmllint.c -+++ b/xmllint.c -@@ -528,6 +528,12 @@ static void - xmlHTMLEncodeSend(void) { - char *result; - -+ /* -+ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might -+ * end with a truncated UTF-8 sequence. This is a hack to at least avoid -+ * an out-of-bounds read. -+ */ -+ memset(&buffer[sizeof(buffer)-4], 0, 4); - result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); - if (result) { - xmlGenericError(xmlGenericErrorContext, "%s", result); --- -2.17.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch deleted file mode 100644 index facfefd36..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie <xiezhipeng1@huawei.com> -Date: Thu, 12 Dec 2019 17:30:55 +0800 -Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities - -When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef -return NULL which cause a infinite loop in xmlStringLenDecodeEntities - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c89076] -CVE: CVE-2020-7595 -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - parser.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/parser.c b/parser.c -index d1c31963..a34bb6cd 100644 ---- a/parser.c -+++ b/parser.c -@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - else - c = 0; - while ((c != 0) && (c != end) && /* non input consuming loop */ -- (c != end2) && (c != end3)) { -+ (c != end2) && (c != end3) && -+ (ctxt->instate != XML_PARSER_EOF)) { - - if (c == 0) break; - if ((c == '&') && (str[1] == '#')) { --- -2.24.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch b/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch deleted file mode 100644 index 32590f9dd..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch +++ /dev/null @@ -1,94 +0,0 @@ -From e4fb36841800038c289997432ca547c9bfef9db1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> -Date: Fri, 28 Feb 2020 12:48:14 +0100 -Subject: [PATCH] Parenthesize Py<type>_Check() in ifs - -In C, if expressions should be parenthesized. -PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized -expression before, but that's not API to rely on. - -Since Python 3.9.0a4 it needs to be parenthesized explicitly. - -Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149 -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - python/libxml.c | 4 ++-- - python/types.c | 12 ++++++------ - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/python/libxml.c b/python/libxml.c -index bc676c4e0..81e709f34 100644 ---- a/python/libxml.c -+++ b/python/libxml.c -@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -diff --git a/python/types.c b/python/types.c -index c2bafeb19..ed284ec74 100644 ---- a/python/types.c -+++ b/python/types.c -@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - if (obj == NULL) { - return (NULL); - } -- if PyFloat_Check (obj) { -+ if (PyFloat_Check (obj)) { - ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj)); -- } else if PyLong_Check(obj) { -+ } else if (PyLong_Check(obj)) { - #ifdef PyLong_AS_LONG - ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj)); - #else - ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); - #endif - #ifdef PyBool_Check -- } else if PyBool_Check (obj) { -+ } else if (PyBool_Check (obj)) { - - if (obj == Py_True) { - ret = xmlXPathNewBoolean(1); -@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathNewBoolean(0); - } - #endif -- } else if PyBytes_Check (obj) { -+ } else if (PyBytes_Check (obj)) { - xmlChar *str; - - str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj), - PyBytes_GET_SIZE(obj)); - ret = xmlXPathWrapString(str); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (obj) { -+ } else if (PyUnicode_Check (obj)) { - #if PY_VERSION_HEX >= 0x03030000 - xmlChar *str; - const char *tmp; -@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathWrapString(str); - #endif - #endif -- } else if PyList_Check (obj) { -+ } else if (PyList_Check (obj)) { - int i; - PyObject *node; - xmlNodePtr cur; --- -GitLab - diff --git a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch index e6998f6e6..90fa19377 100644 --- a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch +++ b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch @@ -1,7 +1,8 @@ -From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Sat, 11 May 2019 20:37:12 +0800 +From f57da62218cf72c1342da82abafdac6b0a2e4997 Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Fri, 14 May 2021 11:50:35 -0400 Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through + binconfig-disabled.bbclass, so port it to use pkg-config instead. Upstream-Status: Pending @@ -9,16 +10,22 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> Rebase to 2.9.9 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Updated to apply cleanly to v2.9.12 + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> --- - libxml.m4 | 186 ++------------------------------------------------------------ - 1 file changed, 5 insertions(+), 181 deletions(-) + libxml.m4 | 190 ++---------------------------------------------------- + 1 file changed, 5 insertions(+), 185 deletions(-) diff --git a/libxml.m4 b/libxml.m4 -index 2d7a6f5..1c53585 100644 +index 09de9fe2..1c535853 100644 --- a/libxml.m4 +++ b/libxml.m4 -@@ -1,188 +1,12 @@ +@@ -1,192 +1,12 @@ -# Configure paths for LIBXML2 +-# Simon Josefsson 2020-02-12 +-# Fix autoconf 2.70+ warnings -# Mike Hommey 2004-06-19 -# use CPPFLAGS instead of CFLAGS -# Toshio Kuratomi 2001-04-21 @@ -78,7 +85,8 @@ index 2d7a6f5..1c53585 100644 -dnl (Also sanity checks the results of xml2-config to some extent) -dnl - rm -f conf.xmltest -- AC_TRY_RUN([ +- AC_RUN_IFELSE( +- [AC_LANG_SOURCE([[ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> @@ -148,12 +156,12 @@ index 2d7a6f5..1c53585 100644 - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); - printf("*** correct copy of xml2-config. (In this case, you will have to\n"); -- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; -} --],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +-]])],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - fi @@ -178,10 +186,11 @@ index 2d7a6f5..1c53585 100644 - echo "*** Could not run libxml test program, checking why..." - CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" - LIBS="$LIBS $XML_LIBS" -- AC_TRY_LINK([ +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[ -#include <libxml/xmlversion.h> -#include <stdio.h> --], [ LIBXML_TEST_VERSION; return 0;], +-]], [[ LIBXML_TEST_VERSION; return 0;]])], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding LIBXML or finding the wrong" - echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" diff --git a/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch b/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch new file mode 100644 index 000000000..e80c46054 --- /dev/null +++ b/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch @@ -0,0 +1,43 @@ +From e49a0d4a8f3f725d6f683854e1cad36a3cd02962 Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Wed, 19 May 2021 19:43:56 -0400 +Subject: [PATCH] Remove fuzz testing from executing with ptests. + +Upstream version 2.9.12 introduced new fuzz-testing and a corresponding +folder fuzz. These tests are not required for ptests of this package. + +This patch removes the fuzz testing targets from the Makefile. +Otherwise, running the ptests will fail due to the invalid directory. + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index a9284b95..3d7b344d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,9 +2,9 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = include . doc example fuzz xstc $(PYTHON_SUBDIR) ++SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) + +-DIST_SUBDIRS = include . doc example fuzz python xstc ++DIST_SUBDIRS = include . doc example python xstc + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include + +@@ -210,7 +210,6 @@ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ + $(CHECKER) ./runxmlconf$(EXEEXT) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) +- @cd fuzz; $(MAKE) tests + + check: all runtests + +-- +2.25.1 + diff --git a/poky/meta/recipes-core/libxml/libxml2/runtest.patch b/poky/meta/recipes-core/libxml/libxml2/runtest.patch index 0dbb353c0..c7a90cd3d 100644 --- a/poky/meta/recipes-core/libxml/libxml2/runtest.patch +++ b/poky/meta/recipes-core/libxml/libxml2/runtest.patch @@ -1,28 +1,33 @@ -Add 'install-ptest' rule. Print a standard result line for -each test. +From 6172ccd1e74bc181f5298f19e240234e12876abe Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Tue, 11 May 2021 11:57:46 -0400 +Subject: [PATCH] Add 'install-ptest' rule. + +Print a standard result line for each test. Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Upstream-Status: Backport +Upstream-Status: Pending Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> --- - Makefile.am | 9 ++++ + Makefile.am | 9 +++ runsuite.c | 1 + runtest.c | 2 + runxmlconf.c | 1 + - testapi.c | 122 ++++++++++++++++++++++++++++++--------------- - testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++----------------- + testapi.c | 122 ++++++++++++++++++++++++++------------- + testchar.c | 156 +++++++++++++++++++++++++++++++++++--------------- testdict.c | 1 + testlimits.c | 1 + testrecurse.c | 2 + 9 files changed, 210 insertions(+), 85 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 9c630be..7cfd04b 100644 +index 05d1671f..ae622745 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS) +@@ -198,6 +198,15 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_DEPENDENCIES = $(DEPS) #testOOM_LDADD= $(LDADDS) @@ -39,10 +44,10 @@ index 9c630be..7cfd04b 100644 testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) [ -d test ] || $(LN_S) $(srcdir)/test . diff --git a/runsuite.c b/runsuite.c -index aaab13e..9ba2c5d 100644 +index d24b5ec3..f7ff2521 100644 --- a/runsuite.c +++ b/runsuite.c -@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { +@@ -1147,6 +1147,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { if (logfile != NULL) fclose(logfile); @@ -51,10 +56,10 @@ index aaab13e..9ba2c5d 100644 } #else /* !SCHEMAS */ diff --git a/runtest.c b/runtest.c -index addda5c..8ba5d59 100644 +index ffa98d04..470f95cb 100644 --- a/runtest.c +++ b/runtest.c -@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) { +@@ -4508,6 +4508,7 @@ launchTests(testDescPtr tst) { xmlCharEncCloseFunc(ebcdicHandler); xmlCharEncCloseFunc(eucJpHandler); @@ -62,7 +67,7 @@ index addda5c..8ba5d59 100644 return(err); } -@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { +@@ -4588,6 +4589,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { xmlCleanupParser(); xmlMemoryDump(); @@ -71,7 +76,7 @@ index addda5c..8ba5d59 100644 } diff --git a/runxmlconf.c b/runxmlconf.c -index cef20f4..4f291fb 100644 +index 70f61017..e882b3a1 100644 --- a/runxmlconf.c +++ b/runxmlconf.c @@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { @@ -83,7 +88,7 @@ index cef20f4..4f291fb 100644 } diff --git a/testapi.c b/testapi.c -index 4a751e2..7ccc066 100644 +index ff8b470d..52b51d78 100644 --- a/testapi.c +++ b/testapi.c @@ -1246,49 +1246,91 @@ static int @@ -219,7 +224,7 @@ index 4a751e2..7ccc066 100644 } diff --git a/testchar.c b/testchar.c -index 0d08792..f555d3b 100644 +index 6866a175..7bce0132 100644 --- a/testchar.c +++ b/testchar.c @@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) { @@ -797,7 +802,7 @@ index 0d08792..f555d3b 100644 /* * Cleanup function for the XML library. diff --git a/testdict.c b/testdict.c -index 40bebd0..114b934 100644 +index 40bebd05..114b9347 100644 --- a/testdict.c +++ b/testdict.c @@ -440,5 +440,6 @@ int main(void) @@ -808,7 +813,7 @@ index 40bebd0..114b934 100644 return(ret); } diff --git a/testlimits.c b/testlimits.c -index 68c94db..1584434 100644 +index 059116a6..f0bee68d 100644 --- a/testlimits.c +++ b/testlimits.c @@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { @@ -819,7 +824,7 @@ index 68c94db..1584434 100644 return(ret); } diff --git a/testrecurse.c b/testrecurse.c -index f95ae1c..74c8f8b 100644 +index 0cbe25a6..3ecadb40 100644 --- a/testrecurse.c +++ b/testrecurse.c @@ -892,6 +892,7 @@ launchTests(testDescPtr tst) { @@ -838,5 +843,5 @@ index f95ae1c..74c8f8b 100644 return(ret); } -- -2.7.4 +2.25.1 diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.10.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.12.bb index 07ae68610..955d934d7 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.10.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.9.12.bb @@ -5,9 +5,9 @@ BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ - file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \ - file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \ - file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e" + file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ + file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ + file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f" DEPENDS = "zlib virtual/libiconv" @@ -20,15 +20,10 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ file://libxml-m4-use-pkgconfig.patch \ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ file://fix-execution-of-ptests.patch \ - file://CVE-2020-7595.patch \ - file://CVE-2019-20388.patch \ - file://CVE-2020-24977.patch \ - file://fix-python39.patch \ + file://remove-fuzz-from-ptests.patch \ " -SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5" -SRC_URI[libtar.sha256sum] = "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f" -SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" +SRC_URI[libtar.sha256sum] = "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" BINCONFIG = "${bindir}/xml2-config" @@ -43,7 +38,7 @@ inherit autotools pkgconfig binconfig-disabled ptest inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} -RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" +RDEPENDS_${PN}-ptest += "bash make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb index 25ec6bac7..e5822cee5 100644 --- a/poky/meta/recipes-core/meta/cve-update-db-native.bb +++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb @@ -139,7 +139,12 @@ def parse_node_and_insert(c, node, cveId): for cpe in node.get('cpe_match', ()): if not cpe['vulnerable']: return - cpe23 = cpe['cpe23Uri'].split(':') + cpe23 = cpe.get('cpe23Uri') + if not cpe23: + return + cpe23 = cpe23.split(':') + if len(cpe23) < 6: + return vendor = cpe23[3] product = cpe23[4] version = cpe23[5] diff --git a/poky/meta/recipes-core/musl/gcompat_git.bb b/poky/meta/recipes-core/musl/gcompat_git.bb new file mode 100644 index 000000000..863ba8dbf --- /dev/null +++ b/poky/meta/recipes-core/musl/gcompat_git.bb @@ -0,0 +1,54 @@ +# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "A library which provides glibc-compatible APIs for use on musl libc systems" +HOMEPAGE = "https://git.adelielinux.org/adelie/gcompat" + +LICENSE = "NCSA" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb33ef4af05a9c7602843afb7adfe792" + +SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current" + +PV = "1.0.0+1.1+git${SRCPV}" +SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793" + +S = "${WORKDIR}/git" + +inherit pkgconfig linuxloader siteinfo + +DEPENDS += "musl-obstack" + +GLIBC_LDSO = "${@get_glibc_loader(d)}" +MUSL_LDSO = "${@get_musl_loader(d)}" + +EXTRA_OEMAKE = "LINKER_PATH=${MUSL_LDSO} \ + LOADER_NAME=`basename ${GLIBC_LDSO}` \ + " + +do_configure () { + : +} + +do_compile () { + oe_runmake +} + +do_install () { + oe_runmake install 'DESTDIR=${D}' + if [ "${SITEINFO_BITS}" = "64" ]; then + install -d ${D}/lib64 + lnr ${D}${GLIBC_LDSO} ${D}/lib64/`basename ${GLIBC_LDSO}` + fi +} + +FILES_${PN} += "/lib64" + +INSANE_SKIP_${PN} = "libdir" + +RPROVIDES_${PN} += "musl-glibc-compat" +# +# We will skip parsing for non-musl systems +# +COMPATIBLE_HOST = ".*-musl.*" + +UPSTREAM_CHECK_COMMITS = "1" diff --git a/poky/meta/recipes-core/musl/libssp-nonshared.bb b/poky/meta/recipes-core/musl/libssp-nonshared.bb index bae8c81cc..81c87e8e8 100644 --- a/poky/meta/recipes-core/musl/libssp-nonshared.bb +++ b/poky/meta/recipes-core/musl/libssp-nonshared.bb @@ -2,11 +2,12 @@ # Released under the MIT license (see COPYING.MIT for the terms) SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl" -LICENSE = "GPL-3.0-with-GCC-exception" -LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://stack_chk.c;beginline=1;endline=30;md5=97e59d9deee678a9332c9ddb2ab6360d" SECTION = "libs" -SRC_URI = "file://ssp-local.c" +# Sourced from https://github.com/intel/linux-sgx/blob/master/sdk/compiler-rt/stack_chk.c +SRC_URI = "file://stack_chk.c" INHIBIT_DEFAULT_DEPS = "1" @@ -19,8 +20,8 @@ do_configure[noexec] = "1" S = "${WORKDIR}" do_compile() { - ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c ssp-local.c -o ssp-local.o - ${AR} r libssp_nonshared.a ssp-local.o + ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c stack_chk.c -o stack_chk.o + ${AR} r libssp_nonshared.a stack_chk.o } do_install() { install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a diff --git a/poky/meta/recipes-core/musl/libssp-nonshared/ssp-local.c b/poky/meta/recipes-core/musl/libssp-nonshared/ssp-local.c deleted file mode 100644 index 8f51afa2c..000000000 --- a/poky/meta/recipes-core/musl/libssp-nonshared/ssp-local.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Stack protector support. - Copyright (C) 2005-2018 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -extern void __stack_chk_fail (void); - -/* Some targets can avoid loading a GP for calls to hidden functions. - Using this entry point may avoid the load of a GP entirely for the - function, making the overall code smaller. */ - -void -__attribute__((visibility ("hidden"))) -__stack_chk_fail_local (void) -{ - __stack_chk_fail (); -} diff --git a/poky/meta/recipes-core/musl/libssp-nonshared/stack_chk.c b/poky/meta/recipes-core/musl/libssp-nonshared/stack_chk.c new file mode 100644 index 000000000..097aae24b --- /dev/null +++ b/poky/meta/recipes-core/musl/libssp-nonshared/stack_chk.c @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2011-2021 Intel Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +extern void __attribute__((noreturn)) __stack_chk_fail(void); + +void +__attribute__((noreturn)) +__attribute__((visibility ("hidden"))) +__stack_chk_fail_local (void) +{ + __stack_chk_fail (); +} diff --git a/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch new file mode 100644 index 000000000..1fdc9f739 --- /dev/null +++ b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch @@ -0,0 +1,49 @@ +From a530eed9e7e6872e10fe92efaf1e9739471c30ca Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 30 May 2021 08:30:28 -0700 +Subject: [PATCH] meson: Add option to pass cpu + +This helps with cross compile setups, where host_cpu != target_cpu +therefore detecting it on the fly will end up with wrong cpu to build +for + +Upstream-Status: Submitted [https://github.com/kaniini/libucontext/pull/28] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + meson.build | 6 +++++- + meson_options.txt | 4 +++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index e863780..2b4bdbd 100644 +--- a/meson.build ++++ b/meson.build +@@ -6,7 +6,11 @@ project( + version : run_command('head', files('VERSION')).stdout() + ) + +-cpu = host_machine.cpu_family() ++cpu = get_option('cpu') ++if cpu == '' ++ cpu = host_machine.cpu_family() ++endif ++ + if cpu == 'sh4' + cpu = 'sh' + endif +diff --git a/meson_options.txt b/meson_options.txt +index d4201d1..864d83c 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,4 +1,6 @@ + option('freestanding', type : 'boolean', value : false, + description: 'Do not use system headers') + option('export_unprefixed', type : 'boolean', value : true, +- description: 'Export POSIX 2004 ucontext names as alises') +\ No newline at end of file ++ description: 'Export POSIX 2004 ucontext names as alises') ++option('cpu', type : 'string', value : '', ++ description: 'Target CPU architecture for cross compile') +-- +2.31.1 + diff --git a/poky/meta/recipes-core/musl/libucontext_git.bb b/poky/meta/recipes-core/musl/libucontext_git.bb index 11affebb4..d8ae8242c 100644 --- a/poky/meta/recipes-core/musl/libucontext_git.bb +++ b/poky/meta/recipes-core/musl/libucontext_git.bb @@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d" SECTION = "libs" DEPENDS = "" -PV = "0.10+${SRCPV}" -SRCREV = "19fa1bbfc26efb92147b5e85cc0ca02a0e837561" +PV = "1.1+${SRCPV}" +SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc" SRC_URI = "git://github.com/kaniini/libucontext \ -" + file://0001-meson-Add-option-to-pass-cpu.patch \ + " S = "${WORKDIR}/git" @@ -49,16 +50,5 @@ def map_kernel_arch(a, d): return a bb.error("cannot map '%s' to a linux kernel architecture" % a) -export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" - -CFLAGS += "-Iarch/${ARCH} -Iarch/common" - -EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'" - -do_compile() { - oe_runmake ARCH=${ARCH} -} - -do_install() { - oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install -} +EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" +inherit meson diff --git a/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch new file mode 100644 index 000000000..9d9f16cee --- /dev/null +++ b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch @@ -0,0 +1,32 @@ +From 40732d03990632049d5ba63dd736269a81756b16 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 19 May 2021 00:30:05 -0700 +Subject: [PATCH] riscv: Rename __NR_fstatat __NR_newfstatat + +on riscv64 this syscall is called __NR_newfstatat +this helps the name match kernel UAPI for external +programs + +Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2021/05/19/3] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Cc: zabolcs Nagy <nsz@port70.net> +--- + arch/riscv64/bits/syscall.h.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in +index f9c421d0..39c0d650 100644 +--- a/arch/riscv64/bits/syscall.h.in ++++ b/arch/riscv64/bits/syscall.h.in +@@ -76,7 +76,7 @@ + #define __NR_splice 76 + #define __NR_tee 77 + #define __NR_readlinkat 78 +-#define __NR_fstatat 79 ++#define __NR_newfstatat 79 + #define __NR_fstat 80 + #define __NR_sync 81 + #define __NR_fsync 82 +-- +2.31.1 + diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index e6f9e2441..bd9d5f1d4 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -4,7 +4,7 @@ require musl.inc inherit linuxloader -SRCREV = "e5d2823631bbfebacf48e1a34ed28f28d7cb2570" +SRCREV = "aad50fcd791e009961621ddfbe3d4c245fd689a3" BASEVER = "1.2.2" @@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}" SRC_URI = "git://git.musl-libc.org/musl \ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ + file://0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch \ " S = "${WORKDIR}/git" @@ -67,13 +68,9 @@ do_install() { echo "${libdir}" >> ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO} lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd - lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO} } -PACKAGES =+ "${PN}-glibc-compat" - FILES_${PN} += "/lib/ld-musl-${MUSL_LDSO_ARCH}.so.1 ${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path" -FILES_${PN}-glibc-compat += "${GLIBC_LDSO}" FILES_${PN}-staticdev = "${libdir}/libc.a" FILES_${PN}-dev =+ "${libdir}/libcrypt.a ${libdir}/libdl.a ${libdir}/libm.a \ ${libdir}/libpthread.a ${libdir}/libresolv.a \ @@ -87,3 +84,5 @@ RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)" LEAD_SONAME = "libc.so" INSANE_SKIP_${PN}-dev = "staticdev" INSANE_SKIP_${PN} = "libdir" + +UPSTREAM_CHECK_COMMITS = "1" diff --git a/poky/meta/recipes-core/netbase/netbase_6.2.bb b/poky/meta/recipes-core/netbase/netbase_6.3.bb index a54d2e776..0a7a9d71e 100644 --- a/poky/meta/recipes-core/netbase/netbase_6.2.bb +++ b/poky/meta/recipes-core/netbase/netbase_6.3.bb @@ -10,7 +10,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz" inherit allarch -SRC_URI[sha256sum] = "309a24146a06347d654b261e9e07a82fab844b173674a42e223803dd8258541e" +SRC_URI[sha256sum] = "7c42a6a1cafa0c64103c71cab6431fc8613179b2449a1a00e55e3584e860d81c" UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/" diff --git a/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch b/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch new file mode 100644 index 000000000..d658123b8 --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch @@ -0,0 +1,51 @@ +From 498627ebda6271b59920f43a0b9b6187edeb7b09 Mon Sep 17 00:00:00 2001 +From: Adrian Herrera <adr.her.arc.95@gmail.com> +Date: Mon, 22 Mar 2021 21:06:47 +0000 +Subject: [PATCH] Fix VLA parameter warning + +Make VLA buffer types consistent in declarations and definitions. +Resolves build crash when using -Werror due to "vla-parameter" warning. + +Upstream-Status: Submitted [https://github.com/google/brotli/pull/893] +Signed-off-by: Adrian Herrera <adr.her.arc.95@gmail.com> +--- + c/dec/decode.c | 6 ++++-- + c/enc/encode.c | 5 +++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c +index 114c505..bb6f1ab 100644 +--- a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c ++++ b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c +@@ -2030,8 +2030,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands( + } + + BrotliDecoderResult BrotliDecoderDecompress( +- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size, +- uint8_t* decoded_buffer) { ++ size_t encoded_size, ++ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)], ++ size_t* decoded_size, ++ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) { + BrotliDecoderState s; + BrotliDecoderResult result; + size_t total_out = 0; +diff --git a/c/enc/encode.c b/c/enc/encode.c +index 68548ef..ab0a490 100644 +--- a/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c ++++ c/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c +@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream( + + BROTLI_BOOL BrotliEncoderCompress( + int quality, int lgwin, BrotliEncoderMode mode, size_t input_size, +- const uint8_t* input_buffer, size_t* encoded_size, +- uint8_t* encoded_buffer) { ++ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)], ++ size_t* encoded_size, ++ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) { + BrotliEncoderState* s; + size_t out_size = *encoded_size; + const uint8_t* input_start = input_buffer; +-- +2.31.1 + diff --git a/poky/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch b/poky/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch index c32963a80..89d9ffab5 100644 --- a/poky/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch +++ b/poky/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch @@ -1,7 +1,7 @@ -From 200ff35c6545b4ab85f5ea7a6096fbaec3d82f6d Mon Sep 17 00:00:00 2001 +From 1125f5a02c2f327aeffe2d6b66a9d816ad2eeec0 Mon Sep 17 00:00:00 2001 From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Date: Thu, 9 Jun 2016 02:23:01 -0700 -Subject: [PATCH 1/4] ovmf: update path to native BaseTools +Subject: [PATCH 1/6] ovmf: update path to native BaseTools BaseTools is a set of utilities to build EDK-based firmware. These utilities are used during the build process. Thus, they need to be built natively. @@ -11,7 +11,6 @@ with the appropriate location before building. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Upstream-Status: Pending - --- OvmfPkg/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -30,5 +29,5 @@ index 91b1442ade..1858dae31a 100755 source edksetup.sh BaseTools else -- -2.28.0 +2.32.0 diff --git a/poky/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch b/poky/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch index c61a08f02..f6141c8af 100644 --- a/poky/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch +++ b/poky/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch @@ -1,23 +1,22 @@ -From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001 +From 19d4c7f9812062a683b3ba60b35aac0461190456 Mon Sep 17 00:00:00 2001 From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Date: Fri, 26 Jul 2019 17:34:26 -0400 -Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake +Subject: [PATCH 2/6] BaseTools: makefile: adjust to build in under bitbake Prepend the build flags with those of bitbake. This is to build using the bitbake native sysroot include and library directories. Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com> Upstream-Status: Pending - --- BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile -index 1c105ee7d4..d5eea3864e 100644 +index 0df728f327..1299d47c87 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile -@@ -69,35 +69,36 @@ $(error Bad HOST_ARCH) +@@ -75,35 +75,36 @@ $(error Bad HOST_ARCH) endif
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
@@ -63,5 +62,5 @@ index 1c105ee7d4..d5eea3864e 100644 #
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
-- -2.28.0 +2.32.0 diff --git a/poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch b/poky/meta/recipes-core/ovmf/ovmf/0003-ovmf-Update-to-latest.patch index 128438b20..d71042989 100644 --- a/poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch +++ b/poky/meta/recipes-core/ovmf/ovmf/0003-ovmf-Update-to-latest.patch @@ -1,7 +1,7 @@ -From ad06fcf1e08736e79221cd6863ff2e3c9254f261 Mon Sep 17 00:00:00 2001 +From 67267d8cc31df16a3608cad1a17c5f1470ef8bbd Mon Sep 17 00:00:00 2001 From: Steve Langasek <steve.langasek@ubuntu.com> Date: Sat, 10 Jun 2017 01:39:36 -0700 -Subject: [PATCH 4/4] ovmf: Update to latest +Subject: [PATCH 3/6] ovmf: Update to latest Description: pass -fno-stack-protector to all GCC toolchains The upstream build rules inexplicably pass -fno-stack-protector only @@ -9,16 +9,15 @@ Description: pass -fno-stack-protector to all GCC toolchains generic rules for gcc 4.4 and later. Last-Updated: 2016-04-12 Upstream-Status: Pending - --- BaseTools/Conf/tools_def.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 933b3160fd..c2fbbf0c38 100755 +index 498696e583..36241b6ede 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template -@@ -1952,10 +1952,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv +@@ -1897,10 +1897,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv # GCC Build Flag for included header file list generation
DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps
@@ -32,7 +31,7 @@ index 933b3160fd..c2fbbf0c38 100755 DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
-@@ -1964,7 +1964,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF +@@ -1909,7 +1909,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
@@ -42,5 +41,5 @@ index 933b3160fd..c2fbbf0c38 100755 DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
-- -2.28.0 +2.32.0 diff --git a/poky/meta/recipes-core/ovmf/ovmf/0004-Strip-build-paths.patch b/poky/meta/recipes-core/ovmf/ovmf/0004-Strip-build-paths.patch new file mode 100644 index 000000000..dfb8a7339 --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/0004-Strip-build-paths.patch @@ -0,0 +1,32 @@ +From b7cfe97895e0586d14403ba98e62a0cd9373da96 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 14 Jun 2021 19:55:08 +0200 +Subject: [PATCH 4/6] Strip build paths + +Pass --zero to GenFw in release builds so that the sections that link back to +the intermediate binaries (containing build paths) are removed. + +Upstream-Status: Pending (discussion at https://bugzilla.tianocore.org/show_bug.cgi?id=3256) +Signed-off-by: Ross Burton <ross.burton@arm.com> + +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + OvmfPkg/OvmfPkgIa32.dsc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc +index 33fbd76790..06c6d5ce60 100644 +--- a/OvmfPkg/OvmfPkgIa32.dsc ++++ b/OvmfPkg/OvmfPkgIa32.dsc +@@ -91,6 +91,8 @@ +
+ !include NetworkPkg/NetworkBuildOptions.dsc.inc
+
++ RELEASE_*_*_GENFW_FLAGS = --zero
++
+ [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
+ GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+ XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+-- +2.32.0 + diff --git a/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch new file mode 100644 index 000000000..e467d6f15 --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch @@ -0,0 +1,104 @@ +From 860bb1979f3578bb83257076fe0f3bd33f9d68bf Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 14 Jun 2021 19:56:28 +0200 +Subject: [PATCH 5/6] debug prefix map + +We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in + --debug-prefix-map to nasm (we carry a patch to nasm for this). The +tools definitions file is built by ovmf-native so we need to pass this in +at target build time when we know the right values so we use the environment. + +By using determininistc file paths during the ovmf build, it removes the +opportunitity for gcc/ld to change the output binaries due to path lengths +overflowing section sizes and causing small changes in the binary output. +Previously we relied on the stripped output being the same which isn't always +the case if the size of the debug symbols varies. + +Upstream-Status: Pending [gcc parts may be upstreamable, nasm patch isn't upstream yet] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + BaseTools/Conf/tools_def.template | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template +index 36241b6ede..947fbf2e8d 100755 +--- a/BaseTools/Conf/tools_def.template ++++ b/BaseTools/Conf/tools_def.template +@@ -1863,7 +1863,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N + *_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
+ *_*_*_DTC_PATH = DEF(DTC_BIN)
+
+-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
++DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common ENV(GCC_PREFIX_MAP)
+ DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
+ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
+@@ -1881,8 +1881,8 @@ DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _Ref + DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+-DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h
+-DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
++DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h ENV(GCC_PREFIX_MAP)
++DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h ENV(GCC_PREFIX_MAP)
+ DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
+ DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
+ DEFINE GCC_ASLCC_FLAGS = -x c
+@@ -2027,7 +2027,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A + *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
+ *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC48_IA32_OBJCOPY_FLAGS =
+-*_GCC48_IA32_NASM_FLAGS = -f elf32
++*_GCC48_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
+ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
+@@ -2055,7 +2055,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but + *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
+ *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC48_X64_OBJCOPY_FLAGS =
+-*_GCC48_X64_NASM_FLAGS = -f elf64
++*_GCC48_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
+ RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
+@@ -2167,7 +2167,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s + *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
+ *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC49_IA32_OBJCOPY_FLAGS =
+-*_GCC49_IA32_NASM_FLAGS = -f elf32
++*_GCC49_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
+ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
+@@ -2195,7 +2195,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but + *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
+ *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC49_X64_OBJCOPY_FLAGS =
+-*_GCC49_X64_NASM_FLAGS = -f elf64
++*_GCC49_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
+ RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
+@@ -2313,7 +2313,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 + *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
+ *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC5_IA32_OBJCOPY_FLAGS =
+-*_GCC5_IA32_NASM_FLAGS = -f elf32
++*_GCC5_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
+ DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+@@ -2345,7 +2345,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, + *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
+ *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC5_X64_OBJCOPY_FLAGS =
+-*_GCC5_X64_NASM_FLAGS = -f elf64
++*_GCC5_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
+ DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
+-- +2.32.0 + diff --git a/poky/meta/recipes-core/ovmf/ovmf/0006-reproducible.patch b/poky/meta/recipes-core/ovmf/ovmf/0006-reproducible.patch new file mode 100644 index 000000000..343c21b54 --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/0006-reproducible.patch @@ -0,0 +1,180 @@ +From 27ed9962f5cb3afcc44d6c96c53277132a999712 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 14 Jun 2021 19:57:30 +0200 +Subject: [PATCH 6/6] reproducible + +This patch fixes various things which make the build more reproducible. Some changes +here only change intermediate artefacts but that means when you have two build trees +giving differing results, the differences can be isolated more easily. The issues here +usually become apparent with longer paths. + +This was all debugged with: +TMPDIR = "${TOPDIR}/tmp" +vs. +TMPDIR = "${TOPDIR}/tmp-inital-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath" + +The patch specifically: + + * Sorts output in GNUmakefile + * Always generates indirect flags files used to avoid pathlength issues else the + compile commands suddenly change when using longer paths + * Sorts the AutoGenTimeStamp file contents + * Makes the TargetDescBlock objects from BuildEngine sortable to allow the makefile fix + * Fix ElfConvert within GenFw so that only the basename of the binary being converted + is used, else the output from "GenFw XXX.bin" differs from "GenFw /long/path/XXX.bin" + with sufficiently long paths + +Upstream-Status: Pending [At least some of this might be interesting to upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + BaseTools/Source/C/GenFw/Elf64Convert.c | 8 ++++--- + .../Source/Python/AutoGen/BuildEngine.py | 3 +++ + BaseTools/Source/Python/AutoGen/GenMake.py | 24 +++++++++---------- + .../Source/Python/AutoGen/ModuleAutoGen.py | 5 +++- + 4 files changed, 24 insertions(+), 16 deletions(-) + +diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c +index d097db8632..a87ae6f3d0 100644 +--- a/BaseTools/Source/C/GenFw/Elf64Convert.c ++++ b/BaseTools/Source/C/GenFw/Elf64Convert.c +@@ -14,6 +14,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent + #ifndef __GNUC__
+ #include <windows.h>
+ #include <io.h>
++#else
++#define _GNU_SOURCE
+ #endif
+ #include <assert.h>
+ #include <stdio.h>
+@@ -769,7 +771,7 @@ ScanSections64 ( + }
+ mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) +
+ sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) +
+- strlen(mInImageName) + 1;
++ strlen(basename(mInImageName)) + 1;
+
+ mCoffOffset = CoffAlign(mCoffOffset);
+ if (SectionCount == 0) {
+@@ -1608,7 +1610,7 @@ WriteDebug64 ( + EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir;
+ EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
+
+- Len = strlen(mInImageName) + 1;
++ Len = strlen(basename(mInImageName)) + 1;
+
+ Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(mCoffFile + mDebugOffset);
+ Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW;
+@@ -1618,7 +1620,7 @@ WriteDebug64 ( +
+ Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
+ Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
+- strcpy ((char *)(Nb10 + 1), mInImageName);
++ strcpy ((char *)(Nb10 + 1), basename(mInImageName));
+
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py +index 722fead75a..8f1c236970 100644 +--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py ++++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py +@@ -70,6 +70,9 @@ class TargetDescBlock(object): + else:
+ return str(Other) == self.Target.Path
+
++ def __lt__(self, other):
++ return str(self) < str(other)
++
+ def AddInput(self, Input):
+ if Input not in self.Inputs:
+ self.Inputs.append(Input)
+diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py +index 961b2ab1c3..23c1592025 100755 +--- a/BaseTools/Source/Python/AutoGen/GenMake.py ++++ b/BaseTools/Source/Python/AutoGen/GenMake.py +@@ -575,7 +575,7 @@ cleanlib: + os.remove(RespFileList)
+
+ # convert source files and binary files to build targets
+- self.ResultFileList = [str(T.Target) for T in MyAgo.CodaTargetList]
++ self.ResultFileList = sorted([str(T.Target) for T in MyAgo.CodaTargetList])
+ if len(self.ResultFileList) == 0 and len(MyAgo.SourceFileList) != 0:
+ EdkLogger.error("build", AUTOGEN_ERROR, "Nothing to build",
+ ExtraData="[%s]" % str(MyAgo))
+@@ -726,7 +726,7 @@ cleanlib: + OutputFile = ''
+ DepsFileList = []
+
+- for Cmd in self.GenFfsList:
++ for Cmd in sorted(self.GenFfsList):
+ if Cmd[2]:
+ for CopyCmd in Cmd[2]:
+ Src, Dst = CopyCmd
+@@ -759,7 +759,7 @@ cleanlib: + self.BuildTargetList.append('\t%s' % CmdString)
+
+ self.ParseSecCmd(DepsFileList, Cmd[1])
+- for SecOutputFile, SecDepsFile, SecCmd in self.FfsOutputFileList :
++ for SecOutputFile, SecDepsFile, SecCmd in sorted(self.FfsOutputFileList):
+ self.BuildTargetList.append('%s : %s' % (self.ReplaceMacro(SecOutputFile), self.ReplaceMacro(SecDepsFile)))
+ self.BuildTargetList.append('\t%s' % self.ReplaceMacro(SecCmd))
+ self.FfsOutputFileList = []
+@@ -798,13 +798,13 @@ cleanlib: +
+ def CommandExceedLimit(self):
+ FlagDict = {
+- 'CC' : { 'Macro' : '$(CC_FLAGS)', 'Value' : False},
+- 'PP' : { 'Macro' : '$(PP_FLAGS)', 'Value' : False},
+- 'APP' : { 'Macro' : '$(APP_FLAGS)', 'Value' : False},
+- 'ASLPP' : { 'Macro' : '$(ASLPP_FLAGS)', 'Value' : False},
+- 'VFRPP' : { 'Macro' : '$(VFRPP_FLAGS)', 'Value' : False},
+- 'ASM' : { 'Macro' : '$(ASM_FLAGS)', 'Value' : False},
+- 'ASLCC' : { 'Macro' : '$(ASLCC_FLAGS)', 'Value' : False},
++ 'CC' : { 'Macro' : '$(CC_FLAGS)', 'Value' : True},
++ 'PP' : { 'Macro' : '$(PP_FLAGS)', 'Value' : True},
++ 'APP' : { 'Macro' : '$(APP_FLAGS)', 'Value' : True},
++ 'ASLPP' : { 'Macro' : '$(ASLPP_FLAGS)', 'Value' : True},
++ 'VFRPP' : { 'Macro' : '$(VFRPP_FLAGS)', 'Value' : True},
++ 'ASM' : { 'Macro' : '$(ASM_FLAGS)', 'Value' : True},
++ 'ASLCC' : { 'Macro' : '$(ASLCC_FLAGS)', 'Value' : True},
+ }
+
+ RespDict = {}
+@@ -1007,9 +1007,9 @@ cleanlib: + if not self.ObjTargetDict.get(T.Target.SubDir):
+ self.ObjTargetDict[T.Target.SubDir] = set()
+ self.ObjTargetDict[T.Target.SubDir].add(NewFile)
+- for Type in self._AutoGenObject.Targets:
++ for Type in sorted(self._AutoGenObject.Targets):
+ resp_file_number = 0
+- for T in self._AutoGenObject.Targets[Type]:
++ for T in sorted(self._AutoGenObject.Targets[Type]):
+ # Generate related macros if needed
+ if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros:
+ self.FileListMacros[T.FileListMacro] = []
+diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +index d70b0d7ae8..25dca9a6df 100755 +--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py ++++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +@@ -1484,6 +1484,9 @@ class ModuleAutoGen(AutoGen): + for File in Files:
+ if File.lower().endswith('.pdb'):
+ AsBuiltInfDict['binary_item'].append('DISPOSABLE|' + File)
++
++ AsBuiltInfDict['binary_item'] = sorted(AsBuiltInfDict['binary_item'])
++
+ HeaderComments = self.Module.HeaderComments
+ StartPos = 0
+ for Index in range(len(HeaderComments)):
+@@ -1759,7 +1762,7 @@ class ModuleAutoGen(AutoGen): + if os.path.exists (self.TimeStampPath):
+ os.remove (self.TimeStampPath)
+
+- SaveFileOnChange(self.TimeStampPath, "\n".join(FileSet), False)
++ SaveFileOnChange(self.TimeStampPath, "\n".join(sorted(FileSet)), False)
+
+ # Ignore generating makefile when it is a binary module
+ if self.IsBinaryModule:
+-- +2.32.0 + diff --git a/poky/meta/recipes-core/ovmf/ovmf/zero.patch b/poky/meta/recipes-core/ovmf/ovmf/zero.patch deleted file mode 100644 index af7a9d31f..000000000 --- a/poky/meta/recipes-core/ovmf/ovmf/zero.patch +++ /dev/null @@ -1,84 +0,0 @@ -Pass --zero to GenFw in release builds so that the sections that link back to -the intermediate binaries (containing build paths) are removed. - -Upstream-Status: Pending (discussion at https://bugzilla.tianocore.org/show_bug.cgi?id=3256) -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 6303b065802c9427c718fda129360189b79316e7 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@arm.com> -Date: Tue, 16 Mar 2021 16:49:49 +0000 -Subject: [PATCH] Strip build paths - ---- - OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + - OvmfPkg/Bhyve/BhyveX64.dsc | 1 + - OvmfPkg/OvmfPkgIa32.dsc | 2 ++ - OvmfPkg/OvmfPkgIa32X64.dsc | 1 + - OvmfPkg/OvmfPkgX64.dsc | 1 + - OvmfPkg/OvmfXen.dsc | 1 + - 6 files changed, 7 insertions(+) - -diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc -index 4a1cdf5aca..132f55cf69 100644 ---- a/OvmfPkg/Bhyve/BhyveX64.dsc -+++ b/OvmfPkg/Bhyve/BhyveX64.dsc -@@ -76,6 +76,7 @@
- GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- !endif
-+ RELEASE_*_*_GENFW_FLAGS = --zero
-
- #
- # Disable deprecated APIs.
-diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index 1eaf3e99c6..ce20f09df8 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -90,6 +90,8 @@
-
- !include NetworkPkg/NetworkBuildOptions.dsc.inc
-
-+ RELEASE_*_*_GENFW_FLAGS = --zero
-+
- [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
- GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
- XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
-diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 4a5a430147..97cc438250 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -84,6 +84,7 @@
- GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- !endif
-+ RELEASE_*_*_GENFW_FLAGS = --zero
-
- #
- # Disable deprecated APIs.
-diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index d4d601b444..f544fb04bf 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -84,6 +84,7 @@
- GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- !endif
-+ RELEASE_*_*_GENFW_FLAGS = --zero
-
- #
- # Disable deprecated APIs.
-diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc -index 507029404f..fcaa35acf1 100644 ---- a/OvmfPkg/OvmfXen.dsc -+++ b/OvmfPkg/OvmfXen.dsc -@@ -74,6 +74,7 @@
- GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
- !endif
-+ RELEASE_*_*_GENFW_FLAGS = --zero
-
- #
- # Disable deprecated APIs.
--- -2.25.1 - diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb index 896b3b632..90dae2aed 100644 --- a/poky/meta/recipes-core/ovmf/ovmf_git.bb +++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb @@ -15,12 +15,15 @@ PACKAGECONFIG[secureboot] = ",,," SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0001-ovmf-update-path-to-native-BaseTools.patch \ file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ - file://0004-ovmf-Update-to-latest.patch \ - file://zero.patch \ + file://0003-ovmf-Update-to-latest.patch \ + file://0004-Strip-build-paths.patch \ + file://0005-debug-prefix-map.patch \ + file://0006-reproducible.patch \ + file://0001-Fix-VLA-parameter-warning.patch \ " -PV = "edk2-stable202102" -SRCREV = "ef91b07388e1c0a50c604e5350eeda98428ccea6" +PV = "edk2-stable202105" +SRCREV = "e1999b264f1f9d7230edf2448f757c73da567832" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" inherit deploy @@ -101,9 +104,23 @@ fix_toolchain_append_class-native() { # to make ovmf-native reusable across distros. sed -i \ -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \ + -e 's#-flto#-fno-lto#g' \ + -e 's#-DUSING_LTO##g' \ ${S}/BaseTools/Conf/tools_def.template } +# We disable lto above since the results are not reproducible and make it hard to compare +# binary build aretfacts to debug reproducibility problems. +# Surprisingly, if you disable lto, you see compiler warnings which are fatal. We therefore +# have to hack warnings overrides into GCC_PREFIX_MAP to allow it to build. + +# We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in +# --debug-prefix-map to nasm (we carry a patch to nasm for this). The +# tools definitions are built by ovmf-native so we need to pass this in +# at target build time when we know the right values. +export NASM_PREFIX_MAP = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/ovmf/${EXTENDPE}${PV}-${PR}" +export GCC_PREFIX_MAP = "${DEBUG_PREFIX_MAP} -Wno-stringop-overflow -Wno-maybe-uninitialized" + GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')" fixup_target_tools() { diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb index b8e2c718e..194dca76d 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb @@ -57,6 +57,7 @@ VALGRIND_armv6 = "" VALGRIND_armeb = "" VALGRIND_aarch64 = "" VALGRIND_riscv64 = "" +VALGRIND_riscv32 = "" VALGRIND_powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', '', 'valgrind', d)}" VALGRIND_linux-gnux32 = "" VALGRIND_linux-gnun32 = "" diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb index a5fc15285..015810cb6 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb @@ -16,6 +16,7 @@ KEXECTOOLS_e5500-64b ?= "" KEXECTOOLS_microblaze ?= "" KEXECTOOLS_nios2 ?= "" KEXECTOOLS_riscv64 ?= "" +KEXECTOOLS_riscv32 ?= "" GSTEXAMPLES ?= "gst-examples" GSTEXAMPLES_riscv64 = "" diff --git a/poky/meta/recipes-core/systemd/systemd-boot_247.4.bb b/poky/meta/recipes-core/systemd/systemd-boot_248.3.bb index 249e620f4..249e620f4 100644 --- a/poky/meta/recipes-core/systemd/systemd-boot_247.4.bb +++ b/poky/meta/recipes-core/systemd/systemd-boot_248.3.bb diff --git a/poky/meta/recipes-core/systemd/systemd-conf/wired.network b/poky/meta/recipes-core/systemd/systemd-conf/wired.network index e7b69970d..740628724 100644 --- a/poky/meta/recipes-core/systemd/systemd-conf/wired.network +++ b/poky/meta/recipes-core/systemd/systemd-conf/wired.network @@ -1,5 +1,6 @@ [Match] Type=ether +Name=!veth* KernelCommandLine=!nfsroot KernelCommandLine=!ip diff --git a/poky/meta/recipes-core/systemd/systemd-conf_247.3.bb b/poky/meta/recipes-core/systemd/systemd-conf_1.0.bb index ea35e83f4..235923be8 100644 --- a/poky/meta/recipes-core/systemd/systemd-conf_247.3.bb +++ b/poky/meta/recipes-core/systemd/systemd-conf_1.0.bb @@ -5,6 +5,8 @@ DefaultTimeoutStartSec setting." LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PE = "1" + PACKAGECONFIG ??= "dhcp-ethernet" PACKAGECONFIG[dhcp-ethernet] = "" diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl index de733e255..e8c3d2d1e 100755 --- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -160,7 +160,9 @@ def add_link(path, target): class SystemdUnitNotFoundError(Exception): - pass + def __init__(self, path, unit): + self.path = path + self.unit = unit class SystemdUnit(): @@ -224,7 +226,10 @@ class SystemdUnit(): try: for also in config.get('Install', 'Also'): - SystemdUnit(self.root, also).enable() + try: + SystemdUnit(self.root, also).enable() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) except KeyError: pass @@ -265,7 +270,10 @@ def preset_all(root): state = presets.state(service) if state == "enable" or state is None: - SystemdUnit(root, service).enable() + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError: + sys.exit("Error: Systemctl preset_all issue in %s" % service) # If we populate the systemd links we also create /etc/machine-id, which # allows systemd to boot with the filesystem read-only before generating @@ -307,10 +315,16 @@ def main(): if command == "mask": for service in args.service: - SystemdUnit(root, service).mask() + try: + SystemdUnit(root, service).mask() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main mask issue in %s (%s)" % (service, e.unit)) elif command == "enable": for service in args.service: - SystemdUnit(root, service).enable() + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main enable issue in %s (%s)" % (service, e.unit)) elif command == "preset-all": if len(args.service) != 0: sys.exit("Too many arguments.") diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 098bca98f..0524a2500 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,8 +14,9 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "069525e84a67375e27429cb490e8d28af78e673a" -SRCBRANCH = "v247-stable" -SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" +SRCREV = "37c4cfde0ce613f0f00544d3f4e2e72bf93d9c76" +SRCBRANCH = "v248-stable" +SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \ +" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch b/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch deleted file mode 100644 index fd7f94a61..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b9b7a8e3825f0433e120f7a6d7d5d635a839cab9 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 21 Jan 2021 06:19:44 +0000 -Subject: [PATCH] analyze: resolve executable path if it is relative - -Upstream-Status: Backport [https://github.com/systemd/systemd/commit/f1fb046a985521f7d4a662f02546686ff20b7e5d] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - src/analyze/analyze-verify.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c -index a9c89173bf..969523df18 100644 ---- a/src/analyze/analyze-verify.c -+++ b/src/analyze/analyze-verify.c -@@ -115,14 +115,17 @@ static int verify_socket(Unit *u) { - } - - int verify_executable(Unit *u, const ExecCommand *exec) { -+ int r; -+ - if (!exec) - return 0; - - if (exec->flags & EXEC_COMMAND_IGNORE_FAILURE) - return 0; - -- if (access(exec->path, X_OK) < 0) -- return log_unit_error_errno(u, errno, "Command %s is not executable: %m", exec->path); -+ r = find_executable_full(exec->path, false, NULL); -+ if (r < 0) -+ return log_unit_error_errno(u, r, "Command %s is not executable: %m", exec->path); - - return 0; - } --- -2.26.2 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch b/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch deleted file mode 100644 index 89ef39bc3..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 150d9cade6d475570395cb418b824524dead9577 Mon Sep 17 00:00:00 2001 -From: Joshua Watt <JPEWhacker@gmail.com> -Date: Fri, 30 Oct 2020 08:15:43 -0500 -Subject: [PATCH] logind: Restore chvt as non-root user without polkit - -4acf0cfd2f ("logind: check PolicyKit before allowing VT switch") broke -the ability to write user sessions that run graphical sessions (e.g. -weston/X11). This was partially amended in 19bb87fbfa ("login: allow -non-console sessions to change vt") by changing the default PolicyKit -policy so that non-root users are again allowed to switch the VT. This -makes the policy when PolKit is not enabled (as on many embedded -systems) match the default PolKit policy and allows launching graphical -sessions as a non-root user. - -Closes #17473 ---- - src/login/logind-dbus.c | 11 ++------- - src/login/logind-polkit.c | 26 +++++++++++++++++++++ - src/login/logind-polkit.h | 10 ++++++++ - src/login/logind-seat-dbus.c | 41 ++++----------------------------- - src/login/logind-session-dbus.c | 11 ++------- - src/login/meson.build | 1 + - 6 files changed, 46 insertions(+), 54 deletions(-) - create mode 100644 src/login/logind-polkit.c - create mode 100644 src/login/logind-polkit.h - -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 0f83ed99bc..a3765d88ba 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -30,6 +30,7 @@ - #include "format-util.h" - #include "fs-util.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-session-dbus.h" - #include "logind-user-dbus.h" -@@ -1047,15 +1048,7 @@ static int method_activate_session_on_seat(sd_bus_message *message, void *userda - return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, - "Session %s not on seat %s", session_name, seat_name); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &m->polkit_registry, -- error); -+ r = check_polkit_chvt(message, m, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/logind-polkit.c b/src/login/logind-polkit.c -new file mode 100644 -index 0000000000..9072570cc6 ---- /dev/null -+++ b/src/login/logind-polkit.c -@@ -0,0 +1,26 @@ -+/* SPDX-License-Identifier: LGPL-2.1+ */ -+ -+#include "bus-polkit.h" -+#include "logind-polkit.h" -+#include "missing_capability.h" -+#include "user-util.h" -+ -+int check_polkit_chvt(sd_bus_message *message, Manager *manager, sd_bus_error *error) { -+#if ENABLE_POLKIT -+ return bus_verify_polkit_async( -+ message, -+ CAP_SYS_ADMIN, -+ "org.freedesktop.login1.chvt", -+ NULL, -+ false, -+ UID_INVALID, -+ &manager->polkit_registry, -+ error); -+#else -+ /* Allow chvt when polkit is not present. This allows a service to start a graphical session as a -+ * non-root user when polkit is not compiled in, matching the default polkit policy */ -+ return 1; -+#endif -+} -+ -+ -diff --git a/src/login/logind-polkit.h b/src/login/logind-polkit.h -new file mode 100644 -index 0000000000..476c077a8a ---- /dev/null -+++ b/src/login/logind-polkit.h -@@ -0,0 +1,10 @@ -+/* SPDX-License-Identifier: LGPL-2.1+ */ -+#pragma once -+ -+#include "sd-bus.h" -+ -+#include "bus-object.h" -+#include "logind.h" -+ -+int check_polkit_chvt(sd_bus_message *message, Manager *manager, sd_bus_error *error); -+ -diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c -index a945132284..f22e9e2734 100644 ---- a/src/login/logind-seat-dbus.c -+++ b/src/login/logind-seat-dbus.c -@@ -9,6 +9,7 @@ - #include "bus-polkit.h" - #include "bus-util.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-seat.h" - #include "logind-session-dbus.h" -@@ -179,15 +180,7 @@ static int method_activate_session(sd_bus_message *message, void *userdata, sd_b - if (session->seat != s) - return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, "Session %s not on seat %s", name, s->id); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -215,15 +208,7 @@ static int method_switch_to(sd_bus_message *message, void *userdata, sd_bus_erro - if (to <= 0) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid virtual terminal"); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -243,15 +228,7 @@ static int method_switch_to_next(sd_bus_message *message, void *userdata, sd_bus - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -271,15 +248,7 @@ static int method_switch_to_previous(sd_bus_message *message, void *userdata, sd - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c -index ccc5ac8df2..57c8a4e900 100644 ---- a/src/login/logind-session-dbus.c -+++ b/src/login/logind-session-dbus.c -@@ -11,6 +11,7 @@ - #include "fd-util.h" - #include "logind-brightness.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-session-dbus.h" - #include "logind-session-device.h" -@@ -192,15 +193,7 @@ int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_ - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/meson.build b/src/login/meson.build -index 0a7d3d5440..7e46be2add 100644 ---- a/src/login/meson.build -+++ b/src/login/meson.build -@@ -26,6 +26,7 @@ liblogind_core_sources = files(''' - logind-device.h - logind-inhibit.c - logind-inhibit.h -+ logind-polkit.c - logind-seat-dbus.c - logind-seat-dbus.h - logind-seat.c --- -2.28.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch b/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch new file mode 100644 index 000000000..3af1daac9 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch @@ -0,0 +1,29 @@ +From 1adde6721ead386ccee6efe48038d6944b96319a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 24 May 2021 18:26:27 -0700 +Subject: [PATCH] test-parse-argument: Include signal.h + +Fixes +src/test/test-parse-argument.c:49:29: error: use of undeclared identifier 'SIGABRT' + +Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19718] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/test/test-parse-argument.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test/test-parse-argument.c b/src/test/test-parse-argument.c +index 4081a9f25a..820d69f092 100644 +--- a/src/test/test-parse-argument.c ++++ b/src/test/test-parse-argument.c +@@ -3,6 +3,7 @@ + #include "parse-argument.h" + #include "stdio-util.h" + #include "tests.h" ++#include <signal.h> + + static void test_parse_json_argument(void) { + log_info("/* %s */", __func__); +-- +2.31.1 + diff --git a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index d856bcb58..4cdf66e76 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -1,7 +1,7 @@ -From 66ece0b870b3a34fdabc48b88437e6cc354e9fce Mon Sep 17 00:00:00 2001 +From 159c53612444ec1df492bae528a5a88a275b93bf Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 13:41:41 +0800 -Subject: [PATCH 02/26] don't use glibc-specific qsort_r +Subject: [PATCH] don't use glibc-specific qsort_r Upstream-Status: Inappropriate [musl specific] @@ -12,6 +12,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/basic/sort-util.h | 14 ------------ src/libsystemd/sd-hwdb/hwdb-util.c | 19 +++++++++++----- @@ -19,14 +20,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index 1d194a1f04..3394c9eb72 100644 +index 49586a4a24..d92a5ab0ed 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h -@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ +@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ }) -- + -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { - if (nmemb <= 1) - return; @@ -40,11 +40,13 @@ index 1d194a1f04..3394c9eb72 100644 - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ - }) +- + int cmp_int(const int *a, const int *b); diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c -index 4c94ba9c88..95495dba6d 100644 +index fd45ff0f54..ac4b63c49b 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c -@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) { +@@ -126,9 +126,13 @@ static struct trie* trie_free(struct trie *trie) { DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); @@ -85,10 +87,10 @@ index 4c94ba9c88..95495dba6d 100644 } diff --git a/src/shared/format-table.c b/src/shared/format-table.c -index a13a198b7a..bce10bc607 100644 +index dccb796b26..c3ab8ac296 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c -@@ -1243,30 +1243,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t +@@ -1290,30 +1290,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t return CMP(index_a, index_b); } @@ -131,7 +133,7 @@ index a13a198b7a..bce10bc607 100644 } /* Order identical lines by the order there were originally added in */ -@@ -1844,7 +1846,12 @@ int table_print(Table *t, FILE *f) { +@@ -1952,7 +1954,12 @@ int table_print(Table *t, FILE *f) { for (size_t i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -145,7 +147,7 @@ index a13a198b7a..bce10bc607 100644 } if (t->display_map) -@@ -2440,7 +2447,12 @@ int table_to_json(Table *t, JsonVariant **ret) { +@@ -2580,7 +2587,12 @@ int table_to_json(Table *t, JsonVariant **ret) { for (size_t i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -159,6 +161,3 @@ index a13a198b7a..bce10bc607 100644 } if (t->display_map) --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch index f43a22aa8..9b1768d9c 100644 --- a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch @@ -1,7 +1,7 @@ -From 9f0d5996bbb2db3679a4075fa8301750b786c03b Mon Sep 17 00:00:00 2001 +From 4afb8adc83348bf75964fc10af7902e04dd62637 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH 03/26] missing_type.h: add __compare_fn_t and comparison_fn_t +Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t Make it work with musl where comparison_fn_t and __compare_fn_t is not provided. @@ -13,11 +13,12 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [Rebased for v242] Signed-off-by: Andrej Valek <andrej.valek@siemens.com> + --- - src/basic/missing_type.h | 9 +++++++++ - src/basic/sort-util.h | 1 + - src/core/kmod-setup.c | 1 + - src/journal/catalog.c | 1 + + src/basic/missing_type.h | 9 +++++++++ + src/basic/sort-util.h | 1 + + src/core/kmod-setup.c | 1 + + src/libsystemd/sd-journal/catalog.c | 1 + 4 files changed, 12 insertions(+) diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h @@ -38,7 +39,7 @@ index f6233090a9..aeaf6ad5ec 100644 +typedef int (*__compar_fn_t)(const void *, const void *); +#endif diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index 3394c9eb72..d9cb2aecb6 100644 +index d92a5ab0ed..a63867c716 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h @@ -4,6 +4,7 @@ @@ -61,10 +62,10 @@ index 8a7f82812a..a56f12f47f 100644 #if HAVE_KMOD #include "module-util.h" -diff --git a/src/journal/catalog.c b/src/journal/catalog.c -index 0f6ad8a29e..4e1077ade4 100644 ---- a/src/journal/catalog.c -+++ b/src/journal/catalog.c +diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c +index aea3241d18..75e6c56a28 100644 +--- a/src/libsystemd/sd-journal/catalog.c ++++ b/src/libsystemd/sd-journal/catalog.c @@ -28,6 +28,7 @@ #include "string-util.h" #include "strv.h" @@ -73,6 +74,3 @@ index 0f6ad8a29e..4e1077ade4 100644 const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index bdd64a025..dc40a2fe8 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -1,7 +1,7 @@ -From f3dbe29f7620a063af4d8eb3ea7c48ecd410200d Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Mon, 25 Feb 2019 14:04:21 +0800 -Subject: [PATCH 04/26] add fallback parse_printf_format implementation +From 6c18e5f9373da3e3b38f2c5727e2aefe07fcbbd9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sat, 22 May 2021 20:26:24 +0200 +Subject: [PATCH] [PATCH] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific] @@ -11,21 +11,21 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- - meson.build | 1 + - src/basic/meson.build | 5 + - src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++ - src/basic/parse-printf-format.h | 57 +++++++ - src/basic/stdio-util.h | 2 +- - src/journal/journal-send.c | 2 +- + meson.build | 1 + + src/basic/meson.build | 5 + + src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++ + src/basic/parse-printf-format.h | 57 +++++ + src/basic/stdio-util.h | 2 +- + src/libsystemd/sd-journal/journal-send.c | 2 +- 6 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h diff --git a/meson.build b/meson.build -index f406d595e6..6aa47fc755 100644 +index 27186d63a3..2abb7b3188 100644 --- a/meson.build +++ b/meson.build -@@ -646,6 +646,7 @@ endif +@@ -675,6 +675,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -34,21 +34,21 @@ index f406d595e6..6aa47fc755 100644 'valgrind/memcheck.h', 'valgrind/valgrind.h', diff --git a/src/basic/meson.build b/src/basic/meson.build -index 1183ea83ad..aa5c958850 100644 +index 60ef801a25..aba2172edd 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -322,6 +322,11 @@ foreach item : [['af', af_list_txt, 'af', ''], - endforeach +@@ -341,6 +341,11 @@ endforeach basic_sources += generated_gperf_headers -+ + +if conf.get('HAVE_PRINTF_H') != 1 + basic_sources += [files('parse-printf-format.c')] +endif + - basic_gcrypt_sources = files( - 'gcrypt-util.c', - 'gcrypt-util.h') ++ + ############################################################ + + arch_list = [ diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c new file mode 100644 index 0000000000..49437e5445 @@ -410,10 +410,10 @@ index 6dc1e72312..cea76b36cf 100644 #define snprintf_ok(buf, len, fmt, ...) \ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) -diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c index fd3fd7ef9c..e8e6ad555b 100644 ---- a/src/journal/journal-send.c -+++ b/src/journal/journal-send.c +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@ #include <errno.h> @@ -431,5 +431,5 @@ index fd3fd7ef9c..e8e6ad555b 100644 #define SNDBUF_SIZE (8*1024*1024) -- -2.27.0 +2.24.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index d63e3c0d0..814c28f5b 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch @@ -1,7 +1,7 @@ -From 5aeae0ea89f5af74ed5d95bed1d87a03b3801ff0 Mon Sep 17 00:00:00 2001 +From 6b0732ac7164914ce16e231e35980b849bdfc4c8 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:18:21 +0800 -Subject: [PATCH 05/26] src/basic/missing.h: check for missing strndupa +Subject: [PATCH] src/basic/missing.h: check for missing strndupa include missing.h for definition of strndupa @@ -17,6 +17,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> [rebased for systemd 244] [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- meson.build | 1 + src/backlight/backlight.c | 1 + @@ -25,6 +26,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/basic/log.c | 1 + src/basic/missing_stdlib.h | 12 ++++++++++++ src/basic/mkdir.c | 1 + + src/basic/mountpoint-util.c | 1 + src/basic/parse-util.c | 1 + src/basic/path-lookup.c | 1 + src/basic/proc-cmdline.c | 1 + @@ -41,12 +43,12 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/coredump/coredump-vacuum.c | 1 + src/journal-remote/journal-remote-main.c | 1 + src/journal/journalctl.c | 1 + - src/journal/sd-journal.c | 1 + src/libsystemd/sd-bus/bus-message.c | 1 + src/libsystemd/sd-bus/bus-objects.c | 1 + src/libsystemd/sd-bus/bus-socket.c | 1 + src/libsystemd/sd-bus/sd-bus.c | 1 + src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + + src/libsystemd/sd-journal/sd-journal.c | 1 + src/locale/keymap-util.c | 1 + src/login/pam_systemd.c | 1 + src/network/generator/network-generator.c | 1 + @@ -68,14 +70,14 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/udev/udev-builtin-path_id.c | 1 + src/udev/udev-event.c | 1 + src/udev/udev-rules.c | 1 + - 50 files changed, 61 insertions(+) + 51 files changed, 62 insertions(+) --- a/meson.build +++ b/meson.build -@@ -535,6 +535,7 @@ foreach ident : [ - #include <sys/wait.h>'''], - ['mallinfo', '''#include <malloc.h>'''], +@@ -550,6 +550,7 @@ foreach ident : [ + ['execveat', '''#include <unistd.h>'''], ['close_range', '''#include <unistd.h>'''], + ['epoll_pwait2', '''#include <sys/epoll.h>'''], + ['strndupa' , '''#include <string.h>'''], ] @@ -102,7 +104,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> _cleanup_free_ char *fs = NULL; --- a/src/basic/env-util.c +++ b/src/basic/env-util.c -@@ -15,6 +15,7 @@ +@@ -18,6 +18,7 @@ #include "string-util.h" #include "strv.h" #include "utf8.h" @@ -148,9 +150,19 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> int mkdir_safe_internal( const char *path, +--- a/src/basic/mountpoint-util.c ++++ b/src/basic/mountpoint-util.c +@@ -12,6 +12,7 @@ + #include "missing_stat.h" + #include "missing_syscall.h" + #include "mkdir.h" ++#include "missing_stdlib.h" + #include "mountpoint-util.h" + #include "parse-util.h" + #include "path-util.h" --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c -@@ -22,6 +22,7 @@ +@@ -19,6 +19,7 @@ #include "stat-util.h" #include "string-util.h" #include "strv.h" @@ -197,7 +209,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> +#include "missing_stdlib.h" #if HAVE_SELINUX - DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); + DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(context_t, context_free, NULL); --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -27,6 +27,7 @@ @@ -220,10 +232,10 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c -@@ -16,6 +16,7 @@ - #include "fileio.h" +@@ -17,6 +17,7 @@ #include "limits-util.h" #include "path-util.h" + #include "percent-util.h" +#include "missing_stdlib.h" BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); @@ -240,7 +252,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c -@@ -7,6 +7,7 @@ +@@ -9,6 +9,7 @@ #include "unit-printf.h" #include "user-util.h" #include "unit.h" @@ -251,7 +263,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/core/execute.c +++ b/src/core/execute.c @@ -96,6 +96,7 @@ - #include "unit.h" + #include "unit-serialize.h" #include "user-util.h" #include "utmp-wtmp.h" +#include "missing_stdlib.h" @@ -290,7 +302,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c -@@ -22,6 +22,7 @@ +@@ -24,6 +24,7 @@ #include "stat-util.h" #include "string-table.h" #include "strv.h" @@ -300,7 +312,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c -@@ -73,6 +73,7 @@ +@@ -72,6 +72,7 @@ #include "unit-name.h" #include "user-util.h" #include "varlink.h" @@ -308,19 +320,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ ---- a/src/journal/sd-journal.c -+++ b/src/journal/sd-journal.c -@@ -40,6 +40,7 @@ - #include "string-util.h" - #include "strv.h" - #include "syslog-util.h" -+#include "missing_stdlib.h" - - #define JOURNAL_FILES_MAX 7168 - --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c -@@ -21,6 +21,7 @@ +@@ -20,6 +20,7 @@ #include "strv.h" #include "time-util.h" #include "utf8.h" @@ -330,7 +332,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c -@@ -13,6 +13,7 @@ +@@ -12,6 +12,7 @@ #include "set.h" #include "string-util.h" #include "strv.h" @@ -351,9 +353,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -41,6 +41,7 @@ - #include "process-util.h" #include "string-util.h" #include "strv.h" + #include "user-util.h" +#include "missing_stdlib.h" #define log_debug_bus_message(m) \ @@ -361,16 +363,26 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -14,6 +14,7 @@ - #include "missing_resource.h" + #include "string-util.h" #include "time-util.h" #include "util.h" +#include "missing_stdlib.h" #define MAX_SIZE (2*1024*1024) +--- a/src/libsystemd/sd-journal/sd-journal.c ++++ b/src/libsystemd/sd-journal/sd-journal.c +@@ -40,6 +40,7 @@ + #include "string-util.h" + #include "strv.h" + #include "syslog-util.h" ++#include "missing_stdlib.h" + + #define JOURNAL_FILES_MAX 7168 + --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c -@@ -21,6 +21,7 @@ +@@ -24,6 +24,7 @@ #include "string-util.h" #include "strv.h" #include "tmpfile-util.h" @@ -410,17 +422,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Settings *s; --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c -@@ -19,6 +19,7 @@ +@@ -21,6 +21,7 @@ #include "nss-util.h" #include "signal-util.h" #include "string-util.h" +#include "missing_stdlib.h" - NSS_GETHOSTBYNAME_PROTOTYPES(mymachines); - NSS_GETPW_PROTOTYPES(mymachines); + static void setup_logging(void) { + /* We need a dummy function because log_parse_environment is a macro. */ --- a/src/portable/portable.c +++ b/src/portable/portable.c -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "strv.h" #include "tmpfile-util.h" #include "user-util.h" @@ -430,7 +442,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c -@@ -37,6 +37,7 @@ +@@ -41,6 +41,7 @@ #include "terminal-util.h" #include "utf8.h" #include "verbs.h" @@ -460,7 +472,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> char *cgroup_path; --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c -@@ -44,6 +44,7 @@ +@@ -45,6 +45,7 @@ #include "unit-def.h" #include "user-util.h" #include "utf8.h" @@ -551,16 +563,16 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -22,6 +22,7 @@ - #include "strv.h" #include "sysexits.h" #include "udev-builtin.h" + #include "udev-util.h" +#include "missing_stdlib.h" _printf_(2,3) static void path_prepend(char **path, const char *fmt, ...) { --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c -@@ -34,6 +34,7 @@ +@@ -33,6 +33,7 @@ #include "udev-util.h" #include "udev-watch.h" #include "user-util.h" @@ -570,7 +582,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> sd_device *device; --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c -@@ -30,6 +30,7 @@ +@@ -31,6 +31,7 @@ #include "udev-rules.h" #include "user-util.h" #include "virt.h" @@ -578,13 +590,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") ---- a/src/basic/mountpoint-util.c -+++ b/src/basic/mountpoint-util.c -@@ -10,6 +10,7 @@ - #include "fs-util.h" - #include "missing_stat.h" - #include "missing_syscall.h" -+#include "missing_stdlib.h" - #include "mountpoint-util.h" +--- a/src/basic/percent-util.c ++++ b/src/basic/percent-util.c +@@ -3,6 +3,7 @@ + #include "percent-util.h" + #include "string-util.h" #include "parse-util.h" - #include "path-util.h" ++#include "missing_stdlib.h" + + static int parse_parts_value_whole(const char *p, const char *symbol) { + const char *pc, *n; diff --git a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch index a978558b4..54d714266 100644 --- a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch +++ b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch @@ -1,7 +1,7 @@ -From d3ed0da271738fd0fc3d3e4d82d6f5810334b05e Mon Sep 17 00:00:00 2001 +From 2069f0b0d5ab8f869aeba635a347e0b11d362b30 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 26 Oct 2017 22:10:42 -0700 -Subject: [PATCH 06/26] Include netinet/if_ether.h +Subject: [PATCH] Include netinet/if_ether.h Fixes /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' @@ -31,6 +31,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Scott Murray <scott.murray@konsulko.com> [rebased for systemd 247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/libsystemd-network/sd-dhcp6-client.c | 1 - src/libsystemd/sd-netlink/netlink-types.c | 1 + @@ -56,7 +57,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> 21 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c -index 66f87c4b95..de1264ae46 100644 +index 410bfda10e..e70ed8be92 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,6 @@ @@ -68,7 +69,7 @@ index 66f87c4b95..de1264ae46 100644 #include "sd-dhcp6-client.h" diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c -index 6fb6c147d9..8eda02d202 100644 +index ed7b9a8cd1..112c0b09e4 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -3,6 +3,7 @@ @@ -80,7 +81,7 @@ index 6fb6c147d9..8eda02d202 100644 #include <linux/netlink.h> #include <linux/rtnetlink.h> diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index bb67beb665..f5780f1aec 100644 +index e7c4ed3c7c..3a1e4f9072 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -3,6 +3,7 @@ @@ -92,7 +93,7 @@ index bb67beb665..f5780f1aec 100644 /* When we include libgen.h because we need dirname() we immediately * undefine basename() since libgen.h defines it as a macro to the POSIX diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c -index e27f36067b..8868f1da5d 100644 +index cf7ca88d6f..34ab468191 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -1,5 +1,6 @@ @@ -103,7 +104,7 @@ index e27f36067b..8868f1da5d 100644 #include "bond.h" #include "bond-util.h" diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c -index 1f59cd8b42..5fdbae7e99 100644 +index 38432f1578..79ccfe578e 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -1,5 +1,6 @@ @@ -114,7 +115,7 @@ index 1f59cd8b42..5fdbae7e99 100644 #include "bridge.h" diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c -index 82e71c3920..fbae86e216 100644 +index 77c5f8c4e7..04be1b4ab2 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -1,5 +1,6 @@ @@ -125,19 +126,19 @@ index 82e71c3920..fbae86e216 100644 #include <linux/if_ether.h> #include <linux/if_macsec.h> diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf -index 4e89761f2c..91251fa6ec 100644 +index 8abe044890..3c54c58928 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf -@@ -2,6 +2,7 @@ +@@ -3,6 +3,7 @@ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") #endif +#include <netinet/if_ether.h> #include <stddef.h> #include "bareudp.h" - #include "bond.h" + #include "batadv.h" diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c -index 9f390b5781..62aeafb1e4 100644 +index b31f0fa81a..c80e1ff537 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -1,5 +1,6 @@ @@ -148,7 +149,7 @@ index 9f390b5781..62aeafb1e4 100644 #include <netinet/in.h> #include <unistd.h> diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c -index e53c73c30c..9bf0771b84 100644 +index 2847b336c9..4d6af8c642 100644 --- a/src/network/networkd-brvlan.c +++ b/src/network/networkd-brvlan.c @@ -4,6 +4,7 @@ @@ -160,7 +161,7 @@ index e53c73c30c..9bf0771b84 100644 #include <stdbool.h> diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c -index 9f58121350..554d006cb8 100644 +index 00d055cf8d..65821c1d31 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -1,7 +1,8 @@ @@ -171,9 +172,9 @@ index 9f58121350..554d006cb8 100644 +#include <net/if_arp.h> +#include <net/if.h> + #include "bus-error.h" #include "dhcp-internal.h" - #include "dhcp6-internal.h" -@@ -10,6 +11,7 @@ +@@ -11,6 +12,7 @@ #include "networkd-dhcp-common.h" #include "networkd-link.h" #include "networkd-manager.h" @@ -182,7 +183,7 @@ index 9f58121350..554d006cb8 100644 #include "parse-util.h" #include "socket-util.h" diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c -index cf279c640d..bae541029b 100644 +index 5cdf432c27..93cffb9863 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,8 +1,8 @@ @@ -197,7 +198,7 @@ index cf279c640d..bae541029b 100644 #include "sd-dhcp-server.h" diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c -index f3c1e5f609..e4ef6eca63 100644 +index 23dc3a45db..7ae6c2467a 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -1,9 +1,9 @@ @@ -212,7 +213,7 @@ index f3c1e5f609..e4ef6eca63 100644 #include "escape.h" #include "alloc-util.h" diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c -index 5c077c1ec8..fa98042aa5 100644 +index aa077d6219..4f6ce22059 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -3,9 +3,9 @@ @@ -227,7 +228,7 @@ index 5c077c1ec8..fa98042aa5 100644 #include "sd-dhcp6-client.h" diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 3bfe636691..e0c68c8ad3 100644 +index 8219d95b0d..c92230453b 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1,8 +1,8 @@ @@ -241,7 +242,7 @@ index 3bfe636691..e0c68c8ad3 100644 #include <unistd.h> diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c -index 3254641461..f0ada419fd 100644 +index e5ffd35b6f..871ebb32c6 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -1,5 +1,6 @@ @@ -252,7 +253,7 @@ index 3254641461..f0ada419fd 100644 #include <netinet/in.h> #include <linux/netdevice.h> diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c -index 0ed89584ef..e7e157c201 100644 +index a74541a6c9..a10549b336 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,7 +1,10 @@ @@ -268,7 +269,7 @@ index 0ed89584ef..e7e157c201 100644 #include "alloc-util.h" #include "netlink-util.h" diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c -index 475cac7527..9bae6eda16 100644 +index ce34449554..0b5dc01182 100644 --- a/src/network/test-network-tables.c +++ b/src/network/test-network-tables.c @@ -1,5 +1,6 @@ @@ -279,7 +280,7 @@ index 475cac7527..9bae6eda16 100644 #include "dhcp6-internal.h" #include "dhcp6-protocol.h" diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c -index e6fab262f2..41dd3d7df7 100644 +index 654d36a83a..f4ed42d543 100644 --- a/src/shared/ethtool-util.c +++ b/src/shared/ethtool-util.c @@ -1,5 +1,6 @@ @@ -290,7 +291,7 @@ index e6fab262f2..41dd3d7df7 100644 #include <sys/ioctl.h> #include <linux/ethtool.h> diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h -index f94b3e15bf..08a7e4fa09 100644 +index 11e2906681..a171df0737 100644 --- a/src/shared/ethtool-util.h +++ b/src/shared/ethtool-util.h @@ -3,6 +3,7 @@ @@ -302,7 +303,7 @@ index f94b3e15bf..08a7e4fa09 100644 #include "conf-parser.h" diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c -index d12fd0e299..636806dc23 100644 +index 31e5d0cd67..f25f821364 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -1,5 +1,6 @@ @@ -323,6 +324,3 @@ index 87e1fb133e..13876029d0 100644 #include "alloc-util.h" #include "device-util.h" #include "errno-util.h" --- -2.25.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 686542158..2ff08c7fa 100644 --- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch @@ -1,8 +1,7 @@ -From 87a14dde13c8fa68239a4ab62914a093062b3b29 Mon Sep 17 00:00:00 2001 +From bca73ff2fbff2dc311040a87a4f536f89af07ad6 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH 07/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not - defined +Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined If the standard library doesn't provide brace expansion users just won't get it. @@ -17,6 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/glob-util.c | 12 ++++++++++++ src/test/test-glob-util.c | 16 ++++++++++++++++ @@ -115,10 +115,10 @@ index df6444c433..79a692046e 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index 9906c70eef..5eb63b1d57 100644 +index 6b73d1e6d5..26b3b74275 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c -@@ -63,6 +63,12 @@ +@@ -66,6 +66,12 @@ #include "umask-util.h" #include "user-util.h" @@ -131,7 +131,7 @@ index 9906c70eef..5eb63b1d57 100644 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1936,7 +1942,9 @@ finish: +@@ -1947,7 +1953,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -141,7 +141,7 @@ index 9906c70eef..5eb63b1d57 100644 }; int r = 0, k; char **fn; -@@ -1956,7 +1964,9 @@ static int glob_item(Item *i, action_t action) { +@@ -1967,7 +1975,9 @@ static int glob_item(Item *i, action_t action) { static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -151,6 +151,3 @@ index 9906c70eef..5eb63b1d57 100644 }; int r = 0, k; char **fn; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch index 94cdc2efd..142ca0134 100644 --- a/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch @@ -1,7 +1,7 @@ -From 8caea3fe87d55fd16de7d1b8266239fa954cb498 Mon Sep 17 00:00:00 2001 +From e0d1912f0246c97e5e7b4177691363d2d077e11d Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH 08/26] add missing FTW_ macros for musl +Subject: [PATCH] add missing FTW_ macros for musl This is to avoid build failures like below for musl. @@ -10,6 +10,7 @@ This is to avoid build failures like below for musl. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_type.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) @@ -42,6 +43,3 @@ index aeaf6ad5ec..3df1084ef2 100644 +#ifndef FTW_SKIP_SIBLINGS +#define FTW_SKIP_SIBLINGS 3 +#endif --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch index 76cc75cf6..53f0a1ba6 100644 --- a/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch @@ -1,17 +1,18 @@ -From d8e4f0aa1760e4c7bb8476beecd35025c9cbb95a Mon Sep 17 00:00:00 2001 +From bb41fe773881a8f1d9615d388320b9c6fc47bfe5 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:03:47 +0800 -Subject: [PATCH 09/26] fix missing of __register_atfork for non-glibc builds +Subject: [PATCH] fix missing of __register_atfork for non-glibc builds Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/process-util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 0851613fc9..4417101569 100644 +index 7d4301eadb..caa9dfe3a3 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -18,6 +18,9 @@ @@ -24,7 +25,7 @@ index 0851613fc9..4417101569 100644 #include "alloc-util.h" #include "architecture.h" -@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) { +@@ -1121,11 +1124,15 @@ void reset_cached_pid(void) { cached_pid = CACHED_PID_UNSET; } @@ -40,6 +41,3 @@ index 0851613fc9..4417101569 100644 pid_t getpid_cached(void) { static bool installed = false; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch index aeacd865a..940db4c5c 100644 --- a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch @@ -1,7 +1,7 @@ -From e45bb02174812e4935214f42a18725be320770d5 Mon Sep 17 00:00:00 2001 +From dc40487e0ac26e3ca317429b9c3e8f01772de60a Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH 10/26] Use uintmax_t for handling rlim_t +Subject: [PATCH] Use uintmax_t for handling rlim_t PRIu{32,64} is not right format to represent rlim_t type therefore use %ju and typecast the rlim_t variables to @@ -20,6 +20,7 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/format-util.h | 8 +------- src/basic/rlimit-util.c | 10 +++++----- @@ -46,10 +47,19 @@ index b7e18768e3..3195ab205d 100644 #if SIZEOF_DEV_T == 8 # define DEV_FMT "%" PRIu64 diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c -index 880976312c..9e1b61cd4a 100644 +index 23d108d5df..b037734ee3 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c -@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { +@@ -43,7 +43,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { + fixed.rlim_max == highest.rlim_max) + return 0; + +- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); ++ log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); + + if (setrlimit(resource, &fixed) < 0) + return -errno; +@@ -308,13 +308,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) s = strdup("infinity"); else if (rl->rlim_cur >= RLIM_INFINITY) @@ -67,7 +77,7 @@ index 880976312c..9e1b61cd4a 100644 if (!s) return -ENOMEM; -@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { +@@ -405,7 +405,7 @@ int rlimit_nofile_safe(void) { rl.rlim_cur = FD_SETSIZE; if (setrlimit(RLIMIT_NOFILE, &rl) < 0) @@ -77,10 +87,10 @@ index 880976312c..9e1b61cd4a 100644 return 1; } diff --git a/src/core/execute.c b/src/core/execute.c -index 89632e0582..335283776c 100644 +index f82fc294c0..4696d055a8 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -5288,9 +5288,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { +@@ -5370,9 +5370,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n", @@ -92,6 +102,3 @@ index 89632e0582..335283776c 100644 } if (c->ioprio_set) { --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch index 6d7fdbcb6..b1d782719 100644 --- a/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ b/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch @@ -1,13 +1,13 @@ -From d1db531ddd3bbf94d5e764b7917bcc8684ff6357 Mon Sep 17 00:00:00 2001 +From f8be7b283309e4332eedc088774daac637afef7b Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Wed, 28 Feb 2018 21:25:22 -0800 -Subject: [PATCH 11/26] test-sizeof.c: Disable tests for missing typedefs in - musl +Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/test/test-sizeof.c | 4 ++++ 1 file changed, 4 insertions(+) @@ -37,6 +37,3 @@ index 3c9dc180fa..e1a59d408c 100644 info(pid_t); info(uid_t); info(gid_t); --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index c15b6e7d8..5f2178734 100644 --- a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -1,7 +1,7 @@ -From 03e89da266edf70121a19ffc32a78cc3b97585ef Mon Sep 17 00:00:00 2001 +From 06915b70735caa66987af758ebdc4207757ae758 Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH 12/26] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() +Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to do and it's not portable (not supported by musl). See: @@ -25,20 +25,22 @@ just historical and not actually necessary or desired behaviour? Upstream-Status: Inappropriate [musl specific] Signed-off-by: Andre McCurdy <armccurdy@gmail.com> + --- - src/basic/fs-util.h | 22 +++++++++++++++++++++- + src/basic/fs-util.h | 23 +++++++++++++++++++++-- src/shared/base-filesystem.c | 6 +++--- - 2 files changed, 24 insertions(+), 4 deletions(-) + 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 5dc8853eac..0491b3dae2 100644 +index 027037f7a7..16eb379caf 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h -@@ -43,7 +43,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); +@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st); --#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) +-#define laccess(path, mode) \ +- (faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) < 0 ? -errno : 0) +/* + Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to + do and it's not portable (not supported by musl). See: @@ -94,6 +96,3 @@ index 1d05409086..1ed06c31ab 100644 continue; } --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 89736bcfd..51b145729 100644 --- a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -1,8 +1,7 @@ -From dd134880e9a16595ab473934577e873c748e9c7a Mon Sep 17 00:00:00 2001 +From 0c44af262cfa07c57db4b32de1f7610af47797f4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH 13/26] Define glibc compatible basename() for non-glibc - systems +Subject: [PATCH] Define glibc compatible basename() for non-glibc systems Fixes builds with musl, even though systemd is adamant about using non-posix basename implementation, we have a way out @@ -10,12 +9,13 @@ using non-posix basename implementation, we have a way out Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- src/machine/machine-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index f5780f1aec..aec5825b3e 100644 +index 3a1e4f9072..ab87b9882c 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -11,6 +11,11 @@ @@ -30,6 +30,3 @@ index f5780f1aec..aec5825b3e 100644 #include "alloc-util.h" #include "bus-common-errors.h" #include "bus-get-properties.h" --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index e95d2ae07..7444d4375 100644 --- a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -1,7 +1,7 @@ -From 55af446156da863b5b36a1109845858956a4c274 Mon Sep 17 00:00:00 2001 +From 0f4b60e34a806055c678eb97a7ec7e21291bcf48 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH 14/26] Do not disable buffering when writing to oom_score_adj +Subject: [PATCH] Do not disable buffering when writing to oom_score_adj On musl, disabling buffering when writing to oom_score_adj will cause the following error. @@ -19,15 +19,16 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 4417101569..556dab8ebf 100644 +index caa9dfe3a3..6101f43db5 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) { +@@ -1523,7 +1523,7 @@ int set_oom_score_adjust(int value) { sprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t, @@ -36,6 +37,3 @@ index 4417101569..556dab8ebf 100644 } int pidfd_get_pid(int fd, pid_t *ret) { --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index 5cdcf84dc..90cc70d21 100644 --- a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -1,7 +1,7 @@ -From e382845aed90cfe4496a8351d57d4466dd2e9a9c Mon Sep 17 00:00:00 2001 +From c30ab62d18ce88187f5eb6c236e0977c9337f68d Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH 15/26] distinguish XSI-compliant strerror_r from GNU-specifi +Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi strerror_r XSI-compliant strerror_r and GNU-specifi strerror_r are different. @@ -18,28 +18,12 @@ assigned to (char *) variable, resulting in segment fault. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- - src/journal/journal-send.c | 5 +++++ - src/libsystemd/sd-bus/bus-error.c | 5 +++++ + src/libsystemd/sd-bus/bus-error.c | 5 +++++ + src/libsystemd/sd-journal/journal-send.c | 5 +++++ 2 files changed, 10 insertions(+) -diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c -index e8e6ad555b..8ca5271d02 100644 ---- a/src/journal/journal-send.c -+++ b/src/journal/journal-send.c -@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove - char* j; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+ j = buffer + 8 + k; -+#else - j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+#endif - if (errno == 0) { - char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; - diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index 8da2024a50..9605a9b869 100644 --- a/src/libsystemd/sd-bus/bus-error.c @@ -57,6 +41,20 @@ index 8da2024a50..9605a9b869 100644 if (errno == ERANGE || strlen(x) >= k - 1) { free(m); k *= 2; --- -2.27.0 - +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c +index e8e6ad555b..8ca5271d02 100644 +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c +@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + diff --git a/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch index 9a125de63..de7f9ecfa 100644 --- a/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ b/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch @@ -1,7 +1,7 @@ -From 0c7af5f288231a8c0545e169e01ba5ee173cafe7 Mon Sep 17 00:00:00 2001 +From fa86e5578256dddb296fd30128929ea7c4b792a4 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:18:00 +0800 -Subject: [PATCH 16/26] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP +Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP for currently unknown reasons they get exported to the shared libries even without being listed in the sym file @@ -11,6 +11,7 @@ Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/libsystemd/sd-bus/bus-error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) @@ -30,6 +31,3 @@ index 9605a9b869..38b6cf90c3 100644 /* Additional maps registered with sd_bus_error_add_map() are in this * NULL terminated array */ --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch index 31747c6b4..d9ef2b8a4 100644 --- a/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch +++ b/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch @@ -1,7 +1,7 @@ -From 32dd7a47b87793cd836ab4bb776d1524f24c2d58 Mon Sep 17 00:00:00 2001 +From 11e730694706fa354a0e43c588ef66677a777d9a Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:27:54 +0800 -Subject: [PATCH 17/26] missing_type.h: add __compar_d_fn_t definition +Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition Fix the following compile failure: src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'? @@ -9,6 +9,7 @@ src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_type.h | 1 + 1 file changed, 1 insertion(+) @@ -25,6 +26,3 @@ index 3df1084ef2..697aa7f58a 100644 #endif #ifndef __COMPAR_FN_T --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch index 56d361a21..3b6085423 100644 --- a/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -1,7 +1,7 @@ -From bfc3416edeb69082ac9b9c9e844f12d7b45bb006 Mon Sep 17 00:00:00 2001 +From 45bae28d3da6607d33d54f4b30a500f5249aadde Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH 18/26] avoid redefinition of prctl_mm_map structure +Subject: [PATCH] avoid redefinition of prctl_mm_map structure Fix the following compile failure: error: redefinition of 'struct prctl_mm_map' @@ -9,6 +9,7 @@ error: redefinition of 'struct prctl_mm_map' Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_prctl.h | 2 ++ 1 file changed, 2 insertions(+) @@ -27,6 +28,3 @@ index ab851306ba..5547cad875 100644 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ #ifndef PR_CAP_AMBIENT --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch b/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch index 6ca196489..7d6433f31 100644 --- a/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch +++ b/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch @@ -1,16 +1,17 @@ -From e427f03de2c56e868bb0f24aa231315b2dae1b71 Mon Sep 17 00:00:00 2001 +From 6e593ff2afbe4bfe15eee2ec34e51490a38462f5 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Fri, 7 Aug 2020 15:19:27 +0000 -Subject: [PATCH 19/26] Handle missing LOCK_EX +Subject: [PATCH] Handle missing LOCK_EX Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> + --- src/partition/makefs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/partition/makefs.c b/src/partition/makefs.c -index fd924d2231..b97580fdcc 100644 +index 7c94fbfedb..42f966722d 100644 --- a/src/partition/makefs.c +++ b/src/partition/makefs.c @@ -6,6 +6,7 @@ @@ -21,6 +22,3 @@ index fd924d2231..b97580fdcc 100644 #include "alloc-util.h" #include "blockdev-util.h" --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch index f74de4384..1faee1c05 100644 --- a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch @@ -1,7 +1,7 @@ -From 9abbc5e69e21aef0d4d4567e69302fa660b76c53 Mon Sep 17 00:00:00 2001 +From ac579b296aa29c2f1dad9425c6d795e154ec8f7c Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Fri, 7 Aug 2020 15:20:17 +0000 -Subject: [PATCH 20/26] Fix incompatible pointer type struct sockaddr_un * +Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un * | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns': | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] @@ -18,15 +18,16 @@ Subject: [PATCH 20/26] Fix incompatible pointer type struct sockaddr_un * Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> + --- src/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 0842731c18..3528b7ff14 100644 +index a4ac8ed2bb..0c41a48d4b 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -5084,7 +5084,7 @@ static int cant_be_in_netns(void) { +@@ -5125,7 +5125,7 @@ static int cant_be_in_netns(void) { if (fd < 0) return log_error_errno(errno, "Failed to allocate udev control socket: %m"); @@ -35,6 +36,3 @@ index 0842731c18..3528b7ff14 100644 if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch index fa6652a5b..14c8ff73a 100644 --- a/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch @@ -1,7 +1,7 @@ -From 1f5bc54bed0b365e7e448c26f6c792dbe8b3b198 Mon Sep 17 00:00:00 2001 +From 6bc78df50adb48d24a2abfdf65b44b932cc5a571 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 16:53:06 +0800 -Subject: [PATCH 21/26] test-json.c: define M_PIl +Subject: [PATCH] test-json.c: define M_PIl Fix the following compile failure: src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? @@ -9,6 +9,7 @@ src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this functi Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/test/test-json.c | 4 ++++ 1 file changed, 4 insertions(+) @@ -28,6 +29,3 @@ index 1d4b11945e..572c8cf9d0 100644 static void test_tokenizer(const char *data, ...) { unsigned line = 0, column = 0; void *state = NULL; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch index 675fd20f1..bd627c51e 100644 --- a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch @@ -1,7 +1,7 @@ -From 564dba5ad0cd884e3f69fa19ca64095413578ea5 Mon Sep 17 00:00:00 2001 +From 7cb6579572b50ef44bc0a321a4c73cce55b0c2f2 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Fri, 1 Mar 2019 15:22:15 +0800 -Subject: [PATCH 22/26] do not disable buffer in writing files +Subject: [PATCH] do not disable buffer in writing files Do not disable buffer in writing files, otherwise we get failure at boot for musl like below. @@ -18,10 +18,12 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/cgroup-util.c | 10 +++++----- src/basic/procfs-util.c | 4 ++-- src/basic/smack-util.c | 2 +- + src/basic/sysctl-util.c | 2 +- src/basic/util.c | 2 +- src/binfmt/binfmt.c | 6 +++--- src/core/main.c | 4 ++-- @@ -32,18 +34,15 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> src/nspawn/nspawn-cgroup.c | 2 +- src/nspawn/nspawn.c | 6 +++--- src/shared/cgroup-setup.c | 4 ++-- - src/shared/sysctl-util.c | 2 +- src/sleep/sleep.c | 8 ++++---- - src/udev/udevadm-trigger.c | 2 +- - src/udev/udevd.c | 2 +- src/vconsole/vconsole-setup.c | 2 +- - 18 files changed, 35 insertions(+), 35 deletions(-) + 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index bb960f183c..cb804c5f4b 100644 +index 50c1ae1b2b..5b40e92163 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -759,7 +759,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -765,7 +765,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (isempty(sc)) { @@ -52,7 +51,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -777,7 +777,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -783,7 +783,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (streq(sc, "0")) { @@ -61,7 +60,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -804,7 +804,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -810,7 +810,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -70,7 +69,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -820,7 +820,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -79,7 +78,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -1646,7 +1646,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri if (r < 0) return r; @@ -121,11 +120,24 @@ index 3362ee3924..80c0f2a52e 100644 if (r < 0) return r; +diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c +index c96b5cd77f..d2476d9665 100644 +--- a/src/basic/sysctl-util.c ++++ b/src/basic/sysctl-util.c +@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c + + log_debug("Setting '%s' to '%s'", p, value); + +- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); + } + + int sysctl_read(const char *property, char **ret) { diff --git a/src/basic/util.c b/src/basic/util.c -index f98ecf3858..13e0f7431f 100644 +index 955b18bd2a..6d89c90176 100644 --- a/src/basic/util.c +++ b/src/basic/util.c -@@ -267,7 +267,7 @@ void disable_coredumps(void) { +@@ -234,7 +234,7 @@ void disable_coredumps(void) { if (detect_container() > 0) return; @@ -135,7 +147,7 @@ index f98ecf3858..13e0f7431f 100644 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index 43ed2f385b..37a6f578f7 100644 +index f6b72e0bae..e9fd4d06be 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { @@ -156,7 +168,7 @@ index 43ed2f385b..37a6f578f7 100644 if (r < 0) return log_error_errno(r, "Failed to add binary format: %m"); -@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) { +@@ -222,7 +222,7 @@ static int run(int argc, char *argv[]) { } /* Flush out all rules */ @@ -166,10 +178,10 @@ index 43ed2f385b..37a6f578f7 100644 STRV_FOREACH(f, files) { k = apply_file(*f, true); diff --git a/src/core/main.c b/src/core/main.c -index a280b756ff..334532cd42 100644 +index 3ee8d0a869..ec36e3e80f 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void) { +@@ -1401,7 +1401,7 @@ static int bump_unix_max_dgram_qlen(void) { if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) return 0; @@ -178,7 +190,7 @@ index a280b756ff..334532cd42 100644 if (r < 0) return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); -@@ -1666,7 +1666,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { if (getpid_cached() != 1) return; @@ -188,7 +200,7 @@ index a280b756ff..334532cd42 100644 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); } diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index 1fe592af70..603942a000 100644 +index 8cc1696a4f..ab7b4ba2c3 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c @@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { @@ -214,7 +226,7 @@ index 1fe592af70..603942a000 100644 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); #endif diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c -index d8f91f4e66..a088e6e2d8 100644 +index 58e35e403e..1d0beb4008 100644 --- a/src/hibernate-resume/hibernate-resume.c +++ b/src/hibernate-resume/hibernate-resume.c @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { @@ -227,20 +239,20 @@ index d8f91f4e66..a088e6e2d8 100644 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); return EXIT_FAILURE; diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index d06f90ce1d..43d0a58750 100644 +index d82f01a164..b8fd63346c 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -1976,7 +1976,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -1987,7 +1987,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, if (!value) return -ENOMEM; - r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); + r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); if (r < 0) { - if (r == -ELOOP) - return -EINVAL; + /* On failure, clear cache entry, as we do not know how it fails. */ + device_remove_cached_sysattr_value(device, sysattr); diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 7d757aa286..a5d9da5b7e 100644 +index 3bc424b83b..5f5eef0843 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1330,7 +1330,7 @@ static int trigger_device(Manager *m, sd_device *d) { @@ -266,10 +278,10 @@ index cb01b25bc6..e92051268b 100644 log_error_errno(r, "Failed to move process: %m"); goto finish; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 3528b7ff14..11b0c20f95 100644 +index 0c41a48d4b..9c893b18e4 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2667,7 +2667,7 @@ static int reset_audit_loginuid(void) { +@@ -2695,7 +2695,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -278,7 +290,7 @@ index 3528b7ff14..11b0c20f95 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -3920,13 +3920,13 @@ static int setup_uid_map(pid_t pid) { +@@ -3948,13 +3948,13 @@ static int setup_uid_map(pid_t pid) { xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); @@ -316,21 +328,8 @@ index f197f715c7..077f893177 100644 if (r < 0) { log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); -diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c -index 670c33108b..7c7c3dcfb6 100644 ---- a/src/shared/sysctl-util.c -+++ b/src/shared/sysctl-util.c -@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c - - log_debug("Setting '%s' to '%s'", p, value); - -- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - } - - int sysctl_read(const char *property, char **content) { diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 39ab554290..d0e566645d 100644 +index 262d4cea66..0523e8dc9b 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -48,7 +48,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca @@ -369,34 +368,8 @@ index 39ab554290..d0e566645d 100644 if (k >= 0) return 0; log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c -index 5c74184c33..65f528314e 100644 ---- a/src/udev/udevadm-trigger.c -+++ b/src/udev/udevadm-trigger.c -@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set **settle_s - if (!filename) - return log_oom(); - -- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, action, 0); - if (r < 0) { - bool ignore = IN_SET(r, -ENOENT, -ENODEV); - -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index d24b8d4398..d123a43904 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -1192,7 +1192,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { - - filename = strjoina(syspath, "/uevent"); - log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); -- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, "change", 0); - if (r < 0) - return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); - return 0; diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index b28e2853e1..115b7233a0 100644 +index d1c3febdd5..1cc68694d1 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { @@ -408,6 +381,3 @@ index b28e2853e1..115b7233a0 100644 if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch b/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch index 1cc3985d1..7d1bd6025 100644 --- a/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch +++ b/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch @@ -1,7 +1,7 @@ -From bbda4a48a34662393117fc677c3a678d4ce4c2ec Mon Sep 17 00:00:00 2001 +From d73755cc60f401f0f20f357752e45aeeeef8e83f Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH 25/26] Handle __cpu_mask usage +Subject: [PATCH] Handle __cpu_mask usage Fixes errors: @@ -18,6 +18,7 @@ add a typedef to cpu-set-util.h defining __cpu_mask appropriately. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/shared/cpu-set-util.h | 2 ++ src/test/test-sizeof.c | 2 +- @@ -55,6 +56,3 @@ index e1a59d408c..c269ea6e8c 100644 /* Print information about various types. Useful when diagnosing * gcc diagnostics on an unfamiliar architecture. */ --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index 4180afb08..068600fa4 100644 --- a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch @@ -1,7 +1,7 @@ -From 47bf88f74717b417e4adbcc04256334b2335c873 Mon Sep 17 00:00:00 2001 +From 04e94f9a15101daa8f65a9af269d26cda2a24056 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH 26/26] Handle missing gshadow +Subject: [PATCH] Handle missing gshadow gshadow usage is now present in the userdb code. Mask all uses of it to allow compilation on musl @@ -10,6 +10,7 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/shared/user-record-nss.c | 20 ++++++++++++++++++++ src/shared/user-record-nss.h | 4 ++++ @@ -138,10 +139,10 @@ index 22ab04d6ee..4e52e7a911 100644 #include <shadow.h> diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index 2d480283d1..0d19764f2e 100644 +index 613350bd46..5c821d28cd 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c -@@ -929,13 +929,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -938,13 +938,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { if (gr) { _cleanup_free_ char *buffer = NULL; bool incomplete = false; @@ -155,10 +156,10 @@ index 2d480283d1..0d19764f2e 100644 iterator->synthesize_nobody = false; +#if ENABLE_GSHADOW - r = nss_sgrp_for_group(gr, &sgrp, &buffer); - if (r < 0) { - log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name); -@@ -943,6 +946,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + if (!FLAGS_SET(iterator->flags, USERDB_AVOID_SHADOW)) { + r = nss_sgrp_for_group(gr, &sgrp, &buffer); + if (r < 0) { +@@ -957,6 +960,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { } r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); @@ -168,6 +169,3 @@ index 2d480283d1..0d19764f2e 100644 if (r < 0) return r; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch b/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch deleted file mode 100644 index 94a4c307b..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 297aba739cd689e4dc9f43bb1422ec88d481099a Mon Sep 17 00:00:00 2001 -From: Paul Gortmaker <paul.gortmaker@windriver.com> -Date: Wed, 13 Jan 2021 21:09:33 +0000 -Subject: [PATCH] proc: dont trigger mount error with invalid options on old - kernels - -As of commit 4e39995371738b04d98d27b0d34ea8fe09ec9fab ("core: introduce -ProtectProc= and ProcSubset= to expose hidepid= and subset= procfs -mount options") kernels older than v5.8 generate multple warnings at -boot, as seen in this Yocto build from today: - - qemux86-64 login: root - [ 65.829009] proc: Bad value for 'hidepid' - root@qemux86-64:~# dmesg|grep proc: - [ 16.990706] proc: Bad value for 'hidepid' - [ 28.060178] proc: Bad value for 'hidepid' - [ 28.874229] proc: Bad value for 'hidepid' - [ 32.685107] proc: Bad value for 'hidepid' - [ 65.829009] proc: Bad value for 'hidepid' - root@qemux86-64:~# - -The systemd maintainer has dismissed this as something people should -simply ignore[1] and has no interest in trying to avoid it by -proactively checking the kernel version, so people can safely assume -that they will never see this version check commit upstream. - -However, as can be seen above, telling people to just ignore it is not -an option, as we'll end up answering the same question and dealing with -the same bug over and over again. - -The commit that triggers this is systemd v247-rc1~378^2~3 -- so any -systemd 247 and above plus kernel v5.7 or older will need this. - -[1] https://github.com/systemd/systemd/issues/16896 - -Upstream-Status: Denied [https://github.com/systemd/systemd/issues/16896] -Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> - -Index: git/src/core/namespace.c -=================================================================== ---- git.orig/src/core/namespace.c -+++ git/src/core/namespace.c -@@ -4,7 +4,9 @@ - #include <linux/loop.h> - #include <sched.h> - #include <stdio.h> -+#include <stdlib.h> - #include <sys/mount.h> -+#include <sys/utsname.h> - #include <unistd.h> - #include <linux/fs.h> - -@@ -860,13 +862,32 @@ static int mount_sysfs(const MountEntry - - static int mount_procfs(const MountEntry *m, const NamespaceInfo *ns_info) { - const char *entry_path; -- int r; -+ int r, major, minor; -+ struct utsname uts; -+ bool old = false; - - assert(m); - assert(ns_info); - - entry_path = mount_entry_path(m); - -+ /* If uname says that the system is older than v5.8, then the textual hidepid= stuff is not -+ * supported by the kernel, and thus the per-instance hidepid= neither, which means we -+ * really don't want to use it, since it would affect our host's /proc * mount. Hence let's -+ * gracefully fallback to a classic, unrestricted version. */ -+ -+ r = uname(&uts); -+ if (r < 0) -+ return errno; -+ -+ major = atoi(uts.release); -+ minor = atoi(strchr(uts.release, '.') + 1); -+ -+ if (major < 5 || (major == 5 && minor < 8)) { -+ log_debug("Pre v5.8 kernel detected [v%d.%d] - skipping hidepid=", major, minor); -+ old = true; -+ } -+ - /* Mount a new instance, so that we get the one that matches our user namespace, if we are running in - * one. i.e we don't reuse existing mounts here under any condition, we want a new instance owned by - * our user namespace and with our hidepid= settings applied. Hence, let's get rid of everything -@@ -875,8 +896,8 @@ static int mount_procfs(const MountEntry - (void) mkdir_p_label(entry_path, 0755); - (void) umount_recursive(entry_path, 0); - -- if (ns_info->protect_proc != PROTECT_PROC_DEFAULT || -- ns_info->proc_subset != PROC_SUBSET_ALL) { -+ if (!old && (ns_info->protect_proc != PROTECT_PROC_DEFAULT || -+ ns_info->proc_subset != PROC_SUBSET_ALL)) { - _cleanup_free_ char *opts = NULL; - - /* Starting with kernel 5.8 procfs' hidepid= logic is truly per-instance (previously it diff --git a/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch new file mode 100644 index 000000000..2289404d8 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch @@ -0,0 +1,34 @@ +From 366cd28f5f93ba7c861cd32a718251770d74830e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 12 Apr 2021 23:44:53 -0700 +Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl + +musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 +unlike glibc where these are provided by libc headers, therefore define +them here in case they are undefined + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/basic/missing_syscall.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h +index 1384324804..0202d00372 100644 +--- a/src/basic/missing_syscall.h ++++ b/src/basic/missing_syscall.h +@@ -20,6 +20,12 @@ + #include <asm/sgidefs.h> + #endif + ++#ifndef _MIPS_SIM_ABI32 ++#define _MIPS_SIM_ABI32 1 ++#define _MIPS_SIM_NABI32 2 ++#define _MIPS_SIM_ABI64 3 ++#endif ++ + #include "missing_keyctl.h" + #include "missing_stat.h" + #include "missing_syscall_def.h" diff --git a/poky/meta/recipes-core/systemd/systemd_247.4.bb b/poky/meta/recipes-core/systemd/systemd_248.3.bb index cd67e65ab..37607708f 100644 --- a/poky/meta/recipes-core/systemd/systemd_247.4.bb +++ b/poky/meta/recipes-core/systemd/systemd_248.3.bb @@ -14,7 +14,8 @@ inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu # that we don't build both udev and systemd in world builds. REQUIRED_DISTRO_FEATURES = "systemd" -SRC_URI += "file://touchscreen.rules \ +SRC_URI += " \ + file://touchscreen.rules \ file://00-create-volatile.conf \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ @@ -24,9 +25,7 @@ SRC_URI += "file://touchscreen.rules \ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0003-implment-systemd-sysv-install-for-OE.patch \ file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ - file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \ - file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \ - file://0001-analyze-resolve-executable-path-if-it-is-relative.patch \ + file://0001-test-parse-argument-Include-signal.h.patch \ " # patches needed by musl @@ -55,6 +54,7 @@ SRC_URI_MUSL = "\ file://0022-do-not-disable-buffer-in-writing-files.patch \ file://0025-Handle-__cpu_mask-usage.patch \ file://0026-Handle-missing-gshadow.patch \ + file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ " PAM_PLUGINS = " \ @@ -64,7 +64,7 @@ PAM_PLUGINS = " \ " PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ backlight \ @@ -176,7 +176,6 @@ PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" -# libseccomp is found in meta-security PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" @@ -474,6 +473,7 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c ${rootlibexecdir}/systemd/systemd-machined \ ${rootlibexecdir}/systemd/systemd-pull \ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ + ${exec_prefix}/lib/tmpfiles.d/README \ ${systemd_system_unitdir}/systemd-nspawn@.service \ ${libdir}/libnss_mymachines.so.2 \ ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ @@ -507,6 +507,7 @@ FILES_${PN}-extra-utils = "\ ${bindir}/systemd-cgls \ ${bindir}/systemd-cgtop \ ${bindir}/systemd-stdio-bridge \ + ${bindir}/systemd-sysext \ ${base_bindir}/systemd-ask-password \ ${base_bindir}/systemd-tty-ask-password-agent \ ${systemd_unitdir}/system/systemd-ask-password-console.path \ @@ -605,6 +606,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${exec_prefix}/lib/environment.d \ ${localstatedir} \ ${rootlibexecdir}/modprobe.d/systemd.conf \ + ${rootlibexecdir}/modprobe.d/README \ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ @@ -647,6 +649,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/ata_id \ ${rootlibexecdir}/udev/cdrom_id \ ${rootlibexecdir}/udev/collect \ + ${rootlibexecdir}/udev/dmi_memory_id \ ${rootlibexecdir}/udev/fido_id \ ${rootlibexecdir}/udev/findkeyboards \ ${rootlibexecdir}/udev/keyboard-force-release.sh \ @@ -674,6 +677,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ + ${rootlibexecdir}/udev/rules.d/70-memory.rules \ ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ @@ -683,6 +687,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ + ${rootlibexecdir}/udev/rules.d/README \ ${sysconfdir}/udev \ ${sysconfdir}/init.d/systemd-udevd \ ${systemd_unitdir}/system/*udev* \ diff --git a/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty index dfa799ada..699a1ead1 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +++ b/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty @@ -1,17 +1,4 @@ #!/bin/sh -############################################################################### -# This script is used to automatically set up the serial console(s) on startup. -# The variable SERIAL_CONSOLES can be set in meta/conf/machine/*.conf. -# Script enhancement has been done based on Bug YOCTO #10844. -# Most of the information is retrieved from /proc virtual filesystem containing -# all the runtime system information (eg. system memory, device mount, etc). -############################################################################### - -# Get active serial filename. -active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//") - -# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc). -runtime_tty=$(echo $2 | grep -oh '[0-9]\+') # busybox' getty does this itself, util-linux' agetty needs extra help getty="/sbin/getty" @@ -25,31 +12,6 @@ case $(readlink -f "${getty}") in ;; esac -# Backup $IFS. -DEFAULT_IFS=$IFS -# Customize Internal Field Separator. -IFS="$(printf '\n\t')" - -for line in $active_serial; do - # Check we have the file containing current active serial target index. - if [ -e "/proc/tty/driver/$line" ] - then - # Remove all unknown entries and discard the first line (desc). - activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \ - | tail -n +2 | grep -oh "^\s*\S*[0-9]\+") - for active in $activetty; do - # If indexes do match then enable the serial console. - if [ $active -eq $runtime_tty ] - then - if [ -c /dev/$2 ] - then - ${setsid:-} ${getty} -L $1 $2 $3 - fi - break - fi - done - fi -done - -# Restore $IFS. -IFS=$DEFAULT_IFS +if [ -e /sys/class/tty/$2 -a -c /dev/$2 ]; then + ${setsid:-} ${getty} -L $1 $2 $3 +fi diff --git a/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index 0af116f35..d95d1a63f 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -53,10 +53,6 @@ EOF fi } -do_install_append_qemuppc64 () { - echo "9:12345:respawn:${base_sbindir}/getty 38400 hvc0" >> ${D}${sysconfdir}/inittab -} - pkg_postinst_${PN} () { # run this on host and on target if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then diff --git a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.36.2.bb b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.37.bb index 9612c491c..9612c491c 100644 --- a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.36.2.bb +++ b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.37.bb diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc index cbf6102ee..9d7d8a23a 100644 --- a/poky/meta/recipes-core/util-linux/util-linux.inc +++ b/poky/meta/recipes-core/util-linux/util-linux.inc @@ -27,8 +27,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" -BPN = "util-linux" -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ file://configure-sbindir.patch \ file://runuser.pamd \ file://runuser-l.pamd \ @@ -36,6 +35,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ - file://Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch \ + file://8a3a74160b96498d672e3652827aa7e6d7f3a120.patch \ " -SRC_URI[sha256sum] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f" +SRC_URI[sha256sum] = "bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5" diff --git a/poky/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch b/poky/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch new file mode 100644 index 000000000..a5bb00ab6 --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch @@ -0,0 +1,29 @@ +From 8a3a74160b96498d672e3652827aa7e6d7f3a120 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Tue, 15 Jun 2021 12:04:43 +0200 +Subject: [PATCH] mkswap: fix holes detection (infinite loop and/or + stack-buffer-underflow) + +Reported-by: Brian Lane <bcl@redhat.com> +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877 +Fix: https://github.com/karelzak/util-linux/issues/1348 +Signed-off-by: Karel Zak <kzak@redhat.com> +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + disk-utils/mkswap.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c +index 27374fd72..c45a3a317 100644 +--- a/disk-utils/mkswap.c ++++ b/disk-utils/mkswap.c +@@ -267,6 +267,8 @@ static void check_extents(struct mkswap_control *ctl) + return; + + n = fiemap->fm_mapped_extents; ++ if (n == 0) ++ break; + + for (i = 0; i < n; i++) { + struct fiemap_extent *e = &fiemap->fm_extents[i]; diff --git a/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch b/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch deleted file mode 100644 index 272518914..000000000 --- a/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch +++ /dev/null @@ -1,49 +0,0 @@ -Author: Luca Boccassi <luca.boccassi@microsoft.com> -Description: Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES - noinst_LTLIBRARIES causes the libraries to be always built - unconditionally. EXTRA_LTLIBRARIES causes them to be built - only if other build target needs them. - In other words, avoid building libcommon.a and libtcolors.a - unless they are needed by another library/executable and - save some build time. -Upstream-Status: backport, commit:c65953d72bbc7412f32e566d9fa6e780d84f0696 ---- a/Makefile.am -+++ b/Makefile.am -@@ -39,7 +39,7 @@ bashcompletiondir = @bashcompletiondir@ - - dist_noinst_HEADERS = - noinst_PROGRAMS = --noinst_LTLIBRARIES = -+EXTRA_LTLIBRARIES = - usrbin_exec_PROGRAMS = - usrsbin_exec_PROGRAMS = - dist_man_MANS = -@@ -169,7 +169,7 @@ else - edit_cmd += -e 's|@vendordir[@]||g' - endif - --CLEANFILES += $(PATHFILES) -+CLEANFILES += $(PATHFILES) $(EXTRA_LTLIBRARIES) - EXTRA_DIST += $(PATHFILES:=.in) - - $(PATHFILES): Makefile ---- a/lib/Makemodule.am -+++ b/lib/Makemodule.am -@@ -9,7 +9,7 @@ - # Note that you need "make install-strip" (or proper rpm / Debian build) - # to generate binaries with only relevant stuff. - # --noinst_LTLIBRARIES += libcommon.la -+EXTRA_LTLIBRARIES += libcommon.la - libcommon_la_CFLAGS = $(AM_CFLAGS) - libcommon_la_SOURCES = \ - lib/blkdev.c \ -@@ -59,7 +59,7 @@ libcommon_la_SOURCES += lib/sysfs.c - endif - endif - --noinst_LTLIBRARIES += libtcolors.la -+EXTRA_LTLIBRARIES += libtcolors.la - libtcolors_la_CFLAGS = $(AM_CFLAGS) - libtcolors_la_SOURCES = lib/colors.c lib/color-names.c include/colors.h include/color-names.h - libtcolors_la_LIBADD = diff --git a/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch index 748b6ef09..f1cbdb3be 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch @@ -1,20 +1,29 @@ +From ee3c7812e1efa6719af68b994804f0e6caceabd8 Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Mon, 14 Jun 2021 14:00:31 +0200 +Subject: [PATCH] util-linux: Add ptest + Ptest needs buildtest-TESTS and runtest-TESTS targets. serial-tests is required to generate those targets. -Revert run.sh script accordingly to serialize running tests +Revert run.sh script accordingly to serialize running tests Signed-off-by: Tudor Florea <tudor.florea@enea.com> -Upstream-Status: Inappropriate +Upstream-Status: Inappropriate + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -Index: util-linux-2.32/configure.ac -=================================================================== ---- util-linux-2.32.orig/configure.ac -+++ util-linux-2.32/configure.ac +diff --git a/configure.ac b/configure.ac +index 5664f9f..075ef27 100644 +--- a/configure.ac ++++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run - dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors. + dnl the compiler (like LT_INIT) to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONS --AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects]) -+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests]) +-AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) diff --git a/poky/meta/recipes-core/util-linux/util-linux/ptest.patch b/poky/meta/recipes-core/util-linux/util-linux/ptest.patch index 0537f7d85..ba2bd3f6a 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/ptest.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/ptest.patch @@ -1,23 +1,24 @@ -Define TESTS variable +From af073c13ef184ca75811df688e0a0a25827b36c3 Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Thu, 3 Dec 2015 04:08:00 +0100 +Subject: [PATCH] Define TESTS variable Signed-off-by: Tudor Florea <tudor.florea@enea.com> Upstream-Status: Pending + --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am -index bbaccb1..7d5a6bb 100644 +index 886598d..1cf4346 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -48,6 +48,7 @@ systemdsystemunit_DATA = +@@ -57,6 +57,7 @@ systemdsystemunit_DATA = dist_bashcompletion_DATA = check_PROGRAMS = dist_check_SCRIPTS = +TESTS = $(check_PROGRAMS) PATHFILES = - --- -2.8.3 - + ADOCFILES_COMMON = diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/poky/meta/recipes-core/util-linux/util-linux_2.37.bb index c79cf782d..9a50c75e7 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.36.2.bb +++ b/poky/meta/recipes-core/util-linux/util-linux_2.37.bb @@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff" @@ -92,9 +92,6 @@ EXTRA_OECONF_append = " --disable-hwclock-gplv3" # PACKAGECONFIG ?= "pcre2" PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -# inherit manpages requires this to be present, however util-linux does not have -# configuration options, and installs manpages always -PACKAGECONFIG[manpages] = "" PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," # Respect the systemd feature for uuidd PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" @@ -263,33 +260,6 @@ ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" -ALTERNATIVE_${PN}-doc = "\ -blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ -mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ -" -ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" - -ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" -ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" -ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" -ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" -ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" -ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" -ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" -ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" -ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" -ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" -ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" -ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" -ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" -ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" -ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" -ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" -ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" -ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" -ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" - - BBCLASSEXTEND = "native nativesdk" PTEST_BINDIR = "1" |