summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/base-files/base-files/share/dot.profile3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc40
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/syslog.cfg11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.26.bb)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb (renamed from import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.14.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb (renamed from import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.14.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0003-configure.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2017.75.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch1368
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts/stdint.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.25.bb)24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.25.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.25.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.25.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.25.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-Include-locale_t.h-compatibility-header.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch)36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Rework-fno-omit-frame-pointer-support-on-i386.patch268
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch194
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch150
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch80
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.25.bb)55
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/setup-live64
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb20
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/run-ptest1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-go-toolchain.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/package-index.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/wic-tools.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/files/0001-tic-hang.patch (renamed from import-layers/yocto-poky/meta/recipes-core/ncurses/files/tic-hang.patch)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch (renamed from import-layers/yocto-poky/meta/recipes-core/ncurses/files/configure-reproducible.patch)21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch541
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf-shell-image.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb5
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/psplash/files/psplash-init6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/readline/readline.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-machine-units_1.0.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb5
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch89
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch433
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-load-fragment-refuse-units-with-errors-in-certa.patch329
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch163
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch104
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch157
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch86
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch105
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch99
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-make-test-dir-configurable.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb)308
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty46
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev/init49
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache75
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.1.bb)32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc67
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch99
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb (renamed from import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.29.1.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb5
194 files changed, 4221 insertions, 3777 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
index ceaf15f79..a06202822 100644
--- a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
+++ b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
@@ -3,15 +3,13 @@
PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="vi" # needed for packages like cron, git-commit
-test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
+[ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc.
-if [ "$HOME" = "ROOTHOME" ]; then
- PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
-fi
-if [ "$PS1" ]; then
- # works for bash and ash (no other shells known to be in use here)
- PS1='\u@\h:\w\$ '
-fi
+# Add /sbin & co to $PATH for the root user
+[ "$HOME" != "ROOTHOME" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
+
+# Set the prompt for bash and ash (no other shells known to be in use here)
+[ -z "$PS1" ] || PS1='\u@\h:\w\$ '
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
diff --git a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/share/dot.profile b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/share/dot.profile
index 979793e8b..a87316077 100644
--- a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/share/dot.profile
+++ b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/share/dot.profile
@@ -7,4 +7,5 @@ fi
# path set by /etc/profile
# export PATH
-mesg n
+# Might fail after "su - myuser" when /dev/tty* is not writable by "myuser".
+mesg n 2>/dev/null
diff --git a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
index ca7bf0635..1c0863b1c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
${localstatedir}/backups ${localstatedir}/lib \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
- ${localstatedir}/volatile/log \
+ ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
/home ${prefix}/src ${localstatedir}/local \
/media"
@@ -53,7 +53,7 @@ dirs755-lsb = "/srv \
${prefix}/lib/locale"
dirs2775-lsb = "/var/mail"
-volatiles = "log tmp"
+volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
${sysconfdir}/issue /${sysconfdir}/issue.net \
${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
index adc6e9a71..48910ca33 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -39,9 +39,11 @@ INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
SYSTEMD_PACKAGES = "${PN}-syslog"
-SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service"
+SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}"
+
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
+RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng"
-CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
@@ -71,7 +73,7 @@ def features_to_busybox_settings(d):
busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'bluetooth', True, False, d), 'CONFIG_RFKILL', cnf, rem)
return "\n".join(cnf), "\n".join(rem)
-# X, Y = ${@features_to_uclibc_settings(d)}
+# X, Y = ${@features_to_busybox_settings(d)}
# unfortunately doesn't seem to work with bitbake, workaround:
def features_to_busybox_conf(d):
cnf, rem = features_to_busybox_settings(d)
@@ -102,6 +104,9 @@ python () {
}
do_prepare_config () {
+ if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ export KCONFIG_NOTIMESTAMP=1
+ fi
sed -e '/CONFIG_STATIC/d' \
< ${WORKDIR}/defconfig > ${S}/.config
echo "# CONFIG_STATIC is not set" >> .config
@@ -118,6 +123,7 @@ do_prepare_config () {
${S}/.config.oe-tmp > ${S}/.config
fi
sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config
+ sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config
}
# returns all the elements from the src uri that are .cfg files
@@ -138,6 +144,9 @@ do_configure () {
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ export KCONFIG_NOTIMESTAMP=1
+ fi
if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
# split the .config into two parts, and make two busybox binaries
if [ -e .config.orig ]; then
@@ -241,9 +250,9 @@ do_install () {
fi
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
- install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog
+ install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
fi
if grep "CONFIG_CROND=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
@@ -304,7 +313,6 @@ do_install () {
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
fi
- ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
fi
if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
install -d ${D}${systemd_unitdir}/system
@@ -315,7 +323,7 @@ do_install () {
# Remove the sysvinit specific configuration file for systemd systems to avoid confusion
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
- rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN}
+ rm -f ${D}${sysconfdir}/syslog-startup.conf
fi
}
@@ -329,20 +337,6 @@ inherit update-alternatives
ALTERNATIVE_PRIORITY = "50"
-ALTERNATIVE_${PN}-syslog += "syslog-conf"
-ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
-
-python () {
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- pn = d.getVar('PN')
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir')))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir')))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
-}
-
python do_package_prepend () {
# We need to load the full set of busybox provides from the /etc/busybox.links
# Use this to see the update-alternatives with the right information
@@ -439,3 +433,5 @@ pkg_prerm_${PN}-syslog () {
fi
fi
}
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
index 8803b52ac..cc68bea98 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -820,9 +820,9 @@ CONFIG_FEATURE_IFCONFIG_HW=y
# CONFIG_IFPLUGD is not set
CONFIG_IFUPDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
-# CONFIG_FEATURE_IFUPDOWN_IP is not set
-# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
-CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IP=y
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
@@ -1053,17 +1053,15 @@ CONFIG_FEATURE_SH_HISTFILESIZE=y
#
# System Logging Utilities
#
-CONFIG_SYSLOGD=y
-CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_FEATURE_REMOTE_LOG=y
-CONFIG_FEATURE_SYSLOGD_DUP=y
-CONFIG_FEATURE_SYSLOGD_CFG=y
-CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
-CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
-CONFIG_LOGREAD=y
-CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
-CONFIG_FEATURE_KMSG_SYSLOG=y
+# CONFIG_SYSLOGD is not set
+# CONFIG_FEATURE_ROTATE_LOGFILE is not set
+# CONFIG_FEATURE_REMOTE_LOG is not set
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+# CONFIG_FEATURE_SYSLOGD_CFG is not set
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+# CONFIG_LOGREAD is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+# CONFIG_FEATURE_KMSG_SYSLOG is not set
CONFIG_KLOGD=y
#
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/syslog.cfg b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/syslog.cfg
new file mode 100644
index 000000000..e2425ed80
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/syslog.cfg
@@ -0,0 +1,11 @@
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_SYSLOGD_DUP=y
+CONFIG_FEATURE_SYSLOGD_CFG=y
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_FEATURE_KMSG_SYSLOG=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
index 6ccbffd97..1c8580876 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -40,6 +40,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://resize.cfg \
${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
+ file://syslog.cfg \
file://inittab \
file://rcS \
file://rcK \
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
index ba1a4bab4..ba1a4bab4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
index 66f9a716c..66f9a716c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch
index 3c43e1d5d..3c43e1d5d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch
index e68c21355..e68c21355 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch
index 9d1ae55d4..9d1ae55d4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
index 3c896a11b..3c896a11b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch
index 2ef8a548a..2ef8a548a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.26.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
index 52ef1013c..ea8740a2d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
@@ -23,10 +23,10 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
file://0001-local.mk-fix-cross-compiling-problem.patch \
"
-SRC_URI[tarball.md5sum] = "d5aa2072f662d4118b9f4c63b94601a6"
-SRC_URI[tarball.sha256sum] = "155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e"
-SRC_URI[manpages.md5sum] = "b58107f532f7beffcb2f38e2ac1f2da3"
-SRC_URI[manpages.sha256sum] = "9324ec412ffca3b0431e6299720c33ac98e749e430f72a7c6e65f3635c86aa29"
+SRC_URI[tarball.md5sum] = "502795792c212932365e077946d353ae"
+SRC_URI[tarball.sha256sum] = "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
+SRC_URI[manpages.md5sum] = "1b31a688d06764e0e94aa20b7ea08222"
+SRC_URI[manpages.sha256sum] = "1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3"
EXTRA_OECONF_class-native = "--without-gmp"
EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
@@ -99,7 +99,7 @@ do_install_append() {
install -t ${D}/${mandir}/man1 ${S}/man/*.1
# prebuilt man pages don't do a separate man page for [ vs test.
# see comment above r.e. sed and update-alternatives
- cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
+ cp -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
}
inherit update-alternatives
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
index 691dc86e9..4afb90c20 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
@@ -11,6 +11,7 @@ PV = "0.1+git${SRCPV}"
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
+UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.14.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
index 539481472..eeadb7d35 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.14.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
@@ -17,8 +17,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
"
-SRC_URI[md5sum] = "3f7b013ce8f641cd4c897acda0ef3467"
-SRC_URI[sha256sum] = "23238f70353e38ce5ca183ebc9525c0d97ac00ef640ad29cf794782af6e6a083"
+SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
+SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
S="${WORKDIR}/dbus-${PV}"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.14.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
index e1d735630..9ddedc15f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.14.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
@@ -20,8 +20,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://0001-configure.ac-explicitely-check-stdint.h.patch \
"
-SRC_URI[md5sum] = "3f7b013ce8f641cd4c897acda0ef3467"
-SRC_URI[sha256sum] = "23238f70353e38ce5ca183ebc9525c0d97ac00ef640ad29cf794782af6e6a083"
+SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
+SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0003-configure.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0003-configure.patch
index c53ab01dd..8469a50ef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0003-configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0003-configure.patch
@@ -1,19 +1,20 @@
-From c5f5c5054c1b15539dccf866e2c3faba7ed68456 Mon Sep 17 00:00:00 2001
+From 58dd24a80ca0f400d0761afd9ce2b7f684fc9125 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
Date: Thu, 25 Apr 2013 00:27:25 +0200
-Subject: [PATCH 3/6] configure: add a variable to allow openpty check to be cached
+Subject: [PATCH] configure: add a variable to allow openpty check to be cached
-Upstream-Status: Pending
+Upstream-Status: Submitted [ https://github.com/mkj/dropbear/pull/48 ]
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
configure.ac | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 05461f3..9c16d90 100644
+index 893b904..245408d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -166,15 +166,20 @@ AC_ARG_ENABLE(openpty,
+@@ -177,15 +177,20 @@ AC_ARG_ENABLE(openpty,
AC_MSG_NOTICE(Not using openpty)
else
AC_MSG_NOTICE(Using openpty if available)
@@ -38,5 +39,5 @@ index 05461f3..9c16d90 100644
AC_ARG_ENABLE(syslog,
[ --disable-syslog Don't include syslog support],
--
-1.7.11.7
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
index de930f29d..2b05e1893 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
@@ -1,4 +1,4 @@
-From 2fd8d2aedad0c50cdf1e43edd2387874b720ad4c Mon Sep 17 00:00:00 2001
+From f37fa9a41f248fa41dd74a41c66cb41a291c03d2 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Fri, 16 Sep 2016 12:18:23 -0700
Subject: [PATCH] fix libtomcrypt/libtommath ordering
@@ -11,18 +11,19 @@ prepended to LIBTOM_LIBS as they are found, not appended.
Note that LIBTOM_LIBS is not used when linking with the bundled
libtom libs.
-Upstream-Status: Pending
+Upstream-Status: Backport [ https://github.com/mkj/dropbear/commit/f9e6bc2aecab0f4b5b529e07a92cc63c8a66cd4b ]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index b6abe4c..85bb8bc 100644
+index 245408d..d624853 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -390,16 +390,16 @@ AC_ARG_ENABLE(bundled-libtom,
+@@ -393,16 +393,16 @@ AC_ARG_ENABLE(bundled-libtom,
AC_MSG_NOTICE(Forcing bundled libtom*)
else
BUNDLED_LIBTOM=0
@@ -44,5 +45,5 @@ index b6abe4c..85bb8bc 100644
)
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
deleted file mode 100644
index df6efb453..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= <henrik@knc.nu>
-Date: Wed, 11 May 2016 12:35:06 +0200
-Subject: [PATCH] Support out-of-tree builds usign bundled libtom
-
-When building out-of-tree we need both source and generated
-folders in include paths to find both distributed and generated
-headers.
-
-
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Backport
----
- libtomcrypt/Makefile.in | 2 +-
- libtommath/Makefile.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in
-index 3056ef0..7970700 100644
---- a/libtomcrypt/Makefile.in
-+++ b/libtomcrypt/Makefile.in
-@@ -19,7 +19,7 @@ srcdir=@srcdir@
-
- # Compilation flags. Note the += does not write over the user's CFLAGS!
- # The rest of the flags come from the parent Dropbear makefile
--CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -DLTC_SOURCE -I$(srcdir)/../libtommath/
-+CFLAGS += -c -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/
-
- # additional warnings (newer GCC 3.4 and higher)
- ifdef GCC_34
-diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
-index 06aba68..019c50b 100644
---- a/libtommath/Makefile.in
-+++ b/libtommath/Makefile.in
-@@ -9,7 +9,7 @@ VPATH=@srcdir@
- srcdir=@srcdir@
-
- # So that libtommath can include Dropbear headers for options and m_burn()
--CFLAGS += -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../
-+CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
-
- ifndef IGNORE_SPEED
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb
deleted file mode 100644
index a7020978a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require dropbear.inc
-
-SRC_URI += "file://support-out-of-tree-builds.patch"
-
-SRC_URI[md5sum] = "9ad0172731e0f16623937804643b5bd8"
-SRC_URI[sha256sum] = "2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891"
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2017.75.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2017.75.bb
new file mode 100644
index 000000000..cfb0d199b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2017.75.bb
@@ -0,0 +1,5 @@
+require dropbear.inc
+
+SRC_URI[md5sum] = "e57e9b9d25705dcb073ba15c416424fd"
+SRC_URI[sha256sum] = "6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
index 9fa0ca2eb..0ee6c276d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
@@ -6,7 +6,11 @@ LICENSE = "MIT"
SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
file://autotools.patch \
+ file://libtool-tag.patch \
"
+
+SRC_URI_append_class-native = " file://no_getrandom.patch"
+
inherit autotools lib_package
# This package uses an archive format known to have issue with some
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
new file mode 100644
index 000000000..3ef4197ce
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
@@ -0,0 +1,18 @@
+Add CC tag to build
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: expat-2.2.2/Makefile.in
+===================================================================
+--- expat-2.2.2.orig/Makefile.in
++++ expat-2.2.2/Makefile.in
+@@ -109,7 +109,7 @@ mkdir-init:
+
+ CC = @CC@
+ CXX = @CXX@
+-LIBTOOL = @LIBTOOL@
++LIBTOOL = @LIBTOOL@ --tag CC
+
+ INCLUDES = -I$(srcdir)/lib -I.
+ LDFLAGS = @LDFLAGS@
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
new file mode 100644
index 000000000..d64f1bf11
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
@@ -0,0 +1,23 @@
+The native version of expat may be used on older systems which dont have glibc 2.25
+and hence don't have getrandom() thanks to uninative. Disable the libc call and
+use the syscall instead to avoid a compatibility issue until we have 2.25 everywhere
+we support with uninative.
+
+RP
+2017/8/14
+
+Upstream-Status: Inappropriate
+
+Index: expat-2.2.3/configure.ac
+===================================================================
+--- expat-2.2.3.orig/configure.ac
++++ expat-2.2.3/configure.ac
+@@ -151,7 +151,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
+ #include <stdlib.h> /* for NULL */
+ #include <sys/random.h>
+ int main() {
+- return getrandom(NULL, 0U, 0U);
++ return getrandomBREAKME(NULL, 0U, 0U);
+ }
+ ])], [
+ AC_DEFINE([HAVE_GETRANDOM], [1],
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb
deleted file mode 100644
index ef21a111a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require expat.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=9c3ee559c6f9dcee1043ead112139f4f"
-
-SRC_URI[md5sum] = "2f47841c829facb346eb6e3fab5212e2"
-SRC_URI[sha256sum] = "d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
new file mode 100644
index 000000000..abf845084
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
@@ -0,0 +1,4 @@
+require expat.inc
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+SRC_URI[md5sum] = "f053af63ef5f39bd9b78d01fbc203334"
+SRC_URI[sha256sum] = "b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f"
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb b/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
index de9297ebe..02f54086a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
@@ -3,38 +3,18 @@
SUMMARY = "POSIX file tree stream operations library"
HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
-LICENSE = "BSD-4-Clause"
-LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5ffe358174aad383f1b69ce3b53da982"
SECTION = "libs"
-SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
- file://fts-header-correctness.patch \
- file://fts-uclibc.patch \
- file://remove_cdefs.patch \
- file://stdint.patch \
- file://gcc5.patch \
-"
-
-SRC_URI[md5sum] = "120c14715485ec6ced14f494d059d20a"
-SRC_URI[sha256sum] = "3df9b9b5a45aeaf16f33bb84e692a10dc662e22ec8a51748f98767d67fb6f342"
-
-S = "${WORKDIR}/${BPN}"
+SRCREV = "944333aed9dc24cfa76cc64bfe70c75d25652753"
+PV = "1.2+git${SRCPV}"
-do_configure[noexec] = "1"
-
-HASHSTYLE_mipsarch = "sysv"
-HASHSTYLE = "gnu"
-
-VER = "0"
-do_compile () {
- ${CC} -I${S} -fPIC -shared -Wl,--hash-style=${HASHSTYLE} -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
-}
+SRC_URI = "git://github.com/voidlinux/musl-fts \
+"
+S = "${WORKDIR}/git"
-do_install() {
- install -Dm755 ${B}/libfts.so.${VER} ${D}${libdir}/libfts.so.${VER}
- ln -sf libfts.so.${VER} ${D}${libdir}/libfts.so
- install -Dm644 ${S}/fts.h ${D}${includedir}/fts.h
-}
+inherit autotools pkgconfig
#
# We will skip parsing for non-musl systems
#
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch b/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch
deleted file mode 100644
index c73ddc95d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Included needed headers for compiling with musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- fts.orig/fts.h
-+++ fts/fts.h
-@@ -38,6 +38,17 @@
- #ifndef _FTS_H_
- #define _FTS_H_
-
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/stat.h>
-+
-+#include <dirent.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+
- typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch b/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch
deleted file mode 100644
index 397654bf5..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Add missing defines for uclibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -31,6 +31,10 @@
- * SUCH DAMAGE.
- */
-
-+#define alignof(TYPE) ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
-+#define ALIGNBYTES (alignof(long double) - 1)
-+#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-+
- #if defined(LIBC_SCCS) && !defined(lint)
- static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
- #endif /* LIBC_SCCS and not lint */
-@@ -652,10 +656,10 @@
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
-- if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
-+ if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_reclen)) == NULL)
- goto mem1;
-- if (dp->d_namlen > maxlen) {
-- if (fts_palloc(sp, (size_t)dp->d_namlen)) {
-+ if (dp->d_reclen > maxlen) {
-+ if (fts_palloc(sp, (size_t)dp->d_reclen)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
-@@ -675,7 +679,7 @@
- maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
- }
-
-- p->fts_pathlen = len + dp->d_namlen + 1;
-+ p->fts_pathlen = len + dp->d_reclen + 1;
- p->fts_parent = sp->fts_cur;
- p->fts_level = level;
-
-@@ -784,7 +788,7 @@
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
--#ifdef DT_WHT
-+#ifdef S_IFWHT
- /*
- * Whited-out files don't really exist. However, there's stat(2) file
- * mask for them, so we set it so that programs (i.e., find) don't have
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch b/import-layers/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch
deleted file mode 100644
index f5b948edc..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch
+++ /dev/null
@@ -1,1368 +0,0 @@
-Forward port the sources to be able to compile with c99/gcc5
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
-Index: fts/fts.c
-===================================================================
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -51,16 +51,6 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
- #include <string.h>
- #include <unistd.h>
-
--static FTSENT *fts_alloc __P(FTS *, char *, int);
--static FTSENT *fts_build __P(FTS *, int);
--static void fts_lfree __P(FTSENT *);
--static void fts_load __P(FTS *, FTSENT *);
--static size_t fts_maxarglen __P(char * const *);
--static void fts_padjust __P(FTS *, void *);
--static int fts_palloc __P(FTS *, size_t);
--static FTSENT *fts_sort __P(FTS *, FTSENT *, int);
--static u_short fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
--
- #define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
-
- #define ISSET(opt) (sp->fts_options & opt)
-@@ -73,119 +63,16 @@ static u_short fts_stat __P(FTS *, stru
- #define BCHILD 1 /* fts_children */
- #define BNAMES 2 /* fts_children, names only */
- #define BREAD 3 /* fts_read */
--
--FTS *
--fts_open(argv, options, compar)
-- char * const *argv;
-- register int options;
-- int (*compar)();
--{
-- register FTS *sp;
-- register FTSENT *p, *root;
-- register int nitems;
-- FTSENT *parent, *tmp;
-- int len;
--
-- /* Options check. */
-- if (options & ~FTS_OPTIONMASK) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Allocate/initialize the stream */
-- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-- return (NULL);
-- memset(sp, 0, sizeof(FTS));
-- sp->fts_compar = compar;
-- sp->fts_options = options;
--
-- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-- if (ISSET(FTS_LOGICAL))
-- SET(FTS_NOCHDIR);
--
-- /*
-- * Start out with 1K of path space, and enough, in any case,
-- * to hold the user's paths.
-- */
-- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-- goto mem1;
--
-- /* Allocate/initialize root's parent. */
-- if ((parent = fts_alloc(sp, "", 0)) == NULL)
-- goto mem2;
-- parent->fts_level = FTS_ROOTPARENTLEVEL;
--
-- /* Allocate/initialize root(s). */
-- for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
-- /* Don't allow zero-length paths. */
-- if ((len = strlen(*argv)) == 0) {
-- errno = EINVAL;
-- goto mem3;
-- }
--
-- p = fts_alloc(sp, *argv, len);
-- p->fts_level = FTS_ROOTLEVEL;
-- p->fts_parent = parent;
-- p->fts_accpath = p->fts_name;
-- p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
--
-- /* Command-line "." and ".." are real directories. */
-- if (p->fts_info == FTS_DOT)
-- p->fts_info = FTS_D;
--
-- /*
-- * If comparison routine supplied, traverse in sorted
-- * order; otherwise traverse in the order specified.
-- */
-- if (compar) {
-- p->fts_link = root;
-- root = p;
-- } else {
-- p->fts_link = NULL;
-- if (root == NULL)
-- tmp = root = p;
-- else {
-- tmp->fts_link = p;
-- tmp = p;
-- }
-- }
-- }
-- if (compar && nitems > 1)
-- root = fts_sort(sp, root, nitems);
--
-- /*
-- * Allocate a dummy pointer and make fts_read think that we've just
-- * finished the node before the root(s); set p->fts_info to FTS_INIT
-- * so that everything about the "current" node is ignored.
-- */
-- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-- goto mem3;
-- sp->fts_cur->fts_link = root;
-- sp->fts_cur->fts_info = FTS_INIT;
--
-- /*
-- * If using chdir(2), grab a file descriptor pointing to dot to insure
-- * that we can get back here; this could be avoided for some paths,
-- * but almost certainly not worth the effort. Slashes, symbolic links,
-- * and ".." are all fairly nasty problems. Note, if we can't get the
-- * descriptor we run anyway, just more slowly.
-- */
-- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-- SET(FTS_NOCHDIR);
--
-- return (sp);
--
--mem3: fts_lfree(root);
-- free(parent);
--mem2: free(sp->fts_path);
--mem1: free(sp);
-- return (NULL);
--}
-+/*
-+ * Special case a root of "/" so that slashes aren't appended which would
-+ * cause paths to be written as "//foo".
-+ */
-+#define NAPPEND(p) \
-+ (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \
-+ p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
-
- static void
--fts_load(sp, p)
-- FTS *sp;
-- register FTSENT *p;
-+fts_load(FTS *sp, register FTSENT *p)
- {
- register int len;
- register char *cp;
-@@ -208,332 +95,214 @@ fts_load(sp, p)
- sp->fts_dev = p->fts_dev;
- }
-
--int
--fts_close(sp)
-- FTS *sp;
-+static void
-+fts_lfree(register FTSENT *head)
- {
-- register FTSENT *freep, *p;
-- int saved_errno;
-+ register FTSENT *p;
-
-- /*
-- * This still works if we haven't read anything -- the dummy structure
-- * points to the root list, so we step through to the end of the root
-- * list which has a valid parent pointer.
-- */
-- if (sp->fts_cur) {
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- freep = p;
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-- free(freep);
-- }
-+ /* Free a linked list of structures. */
-+ while (p = head) {
-+ head = head->fts_link;
- free(p);
- }
-+}
-
-- /* Free up child linked list, sort array, path buffer. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
-- if (sp->fts_array)
-- free(sp->fts_array);
-- free(sp->fts_path);
-+static size_t
-+fts_maxarglen(char * const *argv)
-+{
-+ size_t len, max;
-
-- /* Return to original directory, save errno if necessary. */
-- if (!ISSET(FTS_NOCHDIR)) {
-- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-- (void)close(sp->fts_rfd);
-- }
-+ for (max = 0; *argv; ++argv)
-+ if ((len = strlen(*argv)) > max)
-+ max = len;
-+ return (max);
-+}
-
-- /* Free up the stream pointer. */
-- free(sp);
-
-- /* Set errno and return. */
-- if (!ISSET(FTS_NOCHDIR) && saved_errno) {
-- errno = saved_errno;
-- return (-1);
-+/*
-+ * When the path is realloc'd, have to fix all of the pointers in structures
-+ * already returned.
-+ */
-+static void
-+fts_padjust(FTS *sp, void *addr)
-+{
-+ FTSENT *p;
-+
-+#define ADJUST(p) { \
-+ (p)->fts_accpath = \
-+ (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-+ (p)->fts_path = addr; \
-+}
-+ /* Adjust the current set of children. */
-+ for (p = sp->fts_child; p; p = p->fts_link)
-+ ADJUST(p);
-+
-+ /* Adjust the rest of the tree. */
-+ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-+ ADJUST(p);
-+ p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-- return (0);
- }
-
- /*
-- * Special case a root of "/" so that slashes aren't appended which would
-- * cause paths to be written as "//foo".
-+ * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-+ * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-+ * though the kernel won't resolve them. Add the size (not just what's needed)
-+ * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
--#define NAPPEND(p) \
-- (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \
-- p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
-+static int
-+fts_palloc(FTS *sp, size_t more)
-+{
-+ sp->fts_pathlen += more + 256;
-+ sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
-+ return (sp->fts_path == NULL);
-+}
-
--FTSENT *
--fts_read(sp)
-- register FTS *sp;
-+static FTSENT *
-+fts_alloc(FTS *sp, char *name, register int namelen)
- {
-- register FTSENT *p, *tmp;
-- register int instr;
-- register char *t;
-- int saved_errno;
-+ register FTSENT *p;
-+ size_t len;
-
-- /* If finished or unrecoverable error, return NULL. */
-- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-+ /*
-+ * The file name is a variable length array and no stat structure is
-+ * necessary if the user has set the nostat bit. Allocate the FTSENT
-+ * structure, the file name and the stat structure in one chunk, but
-+ * be careful that the stat structure is reasonably aligned. Since the
-+ * fts_name field is declared to be of size 1, the fts_name pointer is
-+ * namelen + 2 before the first possible address of the stat structure.
-+ */
-+ len = sizeof(FTSENT) + namelen;
-+ if (!ISSET(FTS_NOSTAT))
-+ len += sizeof(struct stat) + ALIGNBYTES;
-+ if ((p = malloc(len)) == NULL)
- return (NULL);
-
-- /* Set current node pointer. */
-- p = sp->fts_cur;
-+ /* Copy the name plus the trailing NULL. */
-+ memmove(p->fts_name, name, namelen + 1);
-
-- /* Save and zero out user instructions. */
-- instr = p->fts_instr;
-+ if (!ISSET(FTS_NOSTAT))
-+ p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-+ p->fts_namelen = namelen;
-+ p->fts_path = sp->fts_path;
-+ p->fts_errno = 0;
-+ p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
-+ p->fts_number = 0;
-+ p->fts_pointer = NULL;
-+ return (p);
-+}
-
-- /* Any type of file may be re-visited; re-stat and re-turn. */
-- if (instr == FTS_AGAIN) {
-- p->fts_info = fts_stat(sp, NULL, p, 0);
-- return (p);
-- }
-
-+static u_short
-+fts_stat(FTS *sp, register FTSENT *p, struct dirent *dp, int follow)
-+{
-+ register FTSENT *t;
-+ register dev_t dev;
-+ register ino_t ino;
-+ struct stat *sbp, sb;
-+ int saved_errno;
-+
-+ /* If user needs stat info, stat buffer already allocated. */
-+ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-+
-+#ifdef S_IFWHT
- /*
-- * Following a symlink -- SLNONE test allows application to see
-- * SLNONE and recover. If indirecting through a symlink, have
-- * keep a pointer to current location. If unable to get that
-- * pointer, follow fails.
-- */
-- if (instr == FTS_FOLLOW &&
-- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-- p->fts_info = fts_stat(sp, NULL, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- return (p);
-+ * Whited-out files don't really exist. However, there's stat(2) file
-+ * mask for them, so we set it so that programs (i.e., find) don't have
-+ * to test FTS_W separately from other file types.
-+ */
-+ if (dp != NULL && dp->d_type == DT_WHT) {
-+ memset(sbp, 0, sizeof(struct stat));
-+ sbp->st_mode = S_IFWHT;
-+ return (FTS_W);
- }
--
-- /* Directory in pre-order. */
-- if (p->fts_info == FTS_D) {
-- /* If skipped or crossed mount point, do post-order visit. */
-- if (instr == FTS_SKIP ||
-- ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
-- if (p->fts_flags & FTS_SYMFOLLOW)
-- (void)close(p->fts_symfd);
-- if (sp->fts_child) {
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
-- p->fts_info = FTS_DP;
-- return (p);
-- }
--
-- /* Rebuild if only read the names and now traversing. */
-- if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
-- sp->fts_options &= ~FTS_NAMEONLY;
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
--
-- /*
-- * Cd to the subdirectory.
-- *
-- * If have already read and now fail to chdir, whack the list
-- * to make the names come out right, and set the parent errno
-- * so the application will eventually get an error condition.
-- * Set the FTS_DONTCHDIR flag so that when we logically change
-- * directories back to the parent we don't do a chdir.
-- *
-- * If haven't read do so. If the read fails, fts_build sets
-- * FTS_STOP or the fts_info field of the node.
-- */
-- if (sp->fts_child) {
-- if (CHDIR(sp, p->fts_accpath)) {
-- p->fts_errno = errno;
-- p->fts_flags |= FTS_DONTCHDIR;
-- for (p = sp->fts_child; p; p = p->fts_link)
-- p->fts_accpath =
-- p->fts_parent->fts_accpath;
-- }
-- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-- if (ISSET(FTS_STOP))
-- return (NULL);
-- return (p);
-+#endif
-+
-+ /*
-+ * If doing a logical walk, or application requested FTS_FOLLOW, do
-+ * a stat(2). If that fails, check for a non-existent symlink. If
-+ * fail, set the errno from the stat call.
-+ */
-+ if (ISSET(FTS_LOGICAL) || follow) {
-+ if (stat(p->fts_accpath, sbp)) {
-+ saved_errno = errno;
-+ if (!lstat(p->fts_accpath, sbp)) {
-+ errno = 0;
-+ return (FTS_SLNONE);
-+ }
-+ p->fts_errno = saved_errno;
-+ goto err;
- }
-- p = sp->fts_child;
-- sp->fts_child = NULL;
-- goto name;
-+ } else if (lstat(p->fts_accpath, sbp)) {
-+ p->fts_errno = errno;
-+err: memset(sbp, 0, sizeof(struct stat));
-+ return (FTS_NS);
- }
-
-- /* Move to the next node on this level. */
--next: tmp = p;
-- if (p = p->fts_link) {
-- free(tmp);
--
-- /*
-- * If reached the top, return to the original directory, and
-- * load the paths for the next root.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- fts_load(sp, p);
-- return (sp->fts_cur = p);
-- }
--
-+ if (S_ISDIR(sbp->st_mode)) {
- /*
-- * User may have called fts_set on the node. If skipped,
-- * ignore. If followed, get a file descriptor so we can
-- * get back if necessary.
-+ * Set the device/inode. Used to find cycles and check for
-+ * crossing mount points. Also remember the link count, used
-+ * in fts_build to limit the number of stat calls. It is
-+ * understood that these fields are only referenced if fts_info
-+ * is set to FTS_D.
- */
-- if (p->fts_instr == FTS_SKIP)
-- goto next;
-- if (p->fts_instr == FTS_FOLLOW) {
-- p->fts_info = fts_stat(sp, NULL, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-- if ((p->fts_symfd =
-- open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- p->fts_instr = FTS_NOINSTR;
-- }
--
--name: t = sp->fts_path + NAPPEND(p->fts_parent);
-- *t++ = '/';
-- memmove(t, p->fts_name, p->fts_namelen + 1);
-- return (sp->fts_cur = p);
-- }
-+ dev = p->fts_dev = sbp->st_dev;
-+ ino = p->fts_ino = sbp->st_ino;
-+ p->fts_nlink = sbp->st_nlink;
-
-- /* Move up to the parent node. */
-- p = tmp->fts_parent;
-- free(tmp);
-+ if (ISDOT(p->fts_name))
-+ return (FTS_DOT);
-
-- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
-- * Done; free everything up and set errno to 0 so the user
-- * can distinguish between error and EOF.
-+ * Cycle detection is done by brute force when the directory
-+ * is first encountered. If the tree gets deep enough or the
-+ * number of symbolic links to directories is high enough,
-+ * something faster might be worthwhile.
- */
-- free(p);
-- errno = 0;
-- return (sp->fts_cur = NULL);
-- }
--
-- /* Nul terminate the pathname. */
-- sp->fts_path[p->fts_pathlen] = '\0';
--
-- /*
-- * Return to the parent directory. If at a root node or came through
-- * a symlink, go back through the file descriptor. Otherwise, cd up
-- * one directory.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- } else if (p->fts_flags & FTS_SYMFOLLOW) {
-- if (FCHDIR(sp, p->fts_symfd)) {
-- saved_errno = errno;
-- (void)close(p->fts_symfd);
-- errno = saved_errno;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- (void)close(p->fts_symfd);
-- } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
-- if (CHDIR(sp, "..")) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- }
-- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-- return (sp->fts_cur = p);
--}
--
--/*
-- * Fts_set takes the stream as an argument although it's not used in this
-- * implementation; it would be necessary if anyone wanted to add global
-- * semantics to fts using fts_set. An error return is allowed for similar
-- * reasons.
-- */
--/* ARGSUSED */
--int
--fts_set(sp, p, instr)
-- FTS *sp;
-- FTSENT *p;
-- int instr;
--{
-- if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-- instr != FTS_NOINSTR && instr != FTS_SKIP) {
-- errno = EINVAL;
-- return (1);
-+ for (t = p->fts_parent;
-+ t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-+ if (ino == t->fts_ino && dev == t->fts_dev) {
-+ p->fts_cycle = t;
-+ return (FTS_DC);
-+ }
-+ return (FTS_D);
- }
-- p->fts_instr = instr;
-- return (0);
-+ if (S_ISLNK(sbp->st_mode))
-+ return (FTS_SL);
-+ if (S_ISREG(sbp->st_mode))
-+ return (FTS_F);
-+ return (FTS_DEFAULT);
- }
-
--FTSENT *
--fts_children(sp, instr)
-- register FTS *sp;
-- int instr;
-+static FTSENT *
-+fts_sort(FTS *sp, FTSENT *head, register int nitems)
- {
-- register FTSENT *p;
-- int fd;
--
-- if (instr && instr != FTS_NAMEONLY) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Set current node pointer. */
-- p = sp->fts_cur;
--
-- /*
-- * Errno set to 0 so user can distinguish empty directory from
-- * an error.
-- */
-- errno = 0;
--
-- /* Fatal errors stop here. */
-- if (ISSET(FTS_STOP))
-- return (NULL);
--
-- /* Return logical hierarchy of user's arguments. */
-- if (p->fts_info == FTS_INIT)
-- return (p->fts_link);
--
-- /*
-- * If not a directory being visited in pre-order, stop here. Could
-- * allow FTS_DNR, assuming the user has fixed the problem, but the
-- * same effect is available with FTS_AGAIN.
-- */
-- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
-- return (NULL);
--
-- /* Free up any previous child list. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
--
-- if (instr == FTS_NAMEONLY) {
-- sp->fts_options |= FTS_NAMEONLY;
-- instr = BNAMES;
-- } else
-- instr = BCHILD;
-+ register FTSENT **ap, *p;
-
- /*
-- * If using chdir on a relative path and called BEFORE fts_read does
-- * its chdir to the root of a traversal, we can lose -- we need to
-- * chdir into the subdirectory, and we don't know where the current
-- * directory is, so we can't get back so that the upcoming chdir by
-- * fts_read will work.
-+ * Construct an array of pointers to the structures and call qsort(3).
-+ * Reassemble the array in the order returned by qsort. If unable to
-+ * sort for memory reasons, return the directory entries in their
-+ * current order. Allocate enough space for the current needs plus
-+ * 40 so don't realloc one entry at a time.
- */
-- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
-- ISSET(FTS_NOCHDIR))
-- return (sp->fts_child = fts_build(sp, instr));
--
-- if ((fd = open(".", O_RDONLY, 0)) < 0)
-- return (NULL);
-- sp->fts_child = fts_build(sp, instr);
-- if (fchdir(fd))
-- return (NULL);
-- (void)close(fd);
-- return (sp->fts_child);
-+ if (nitems > sp->fts_nitems) {
-+ sp->fts_nitems = nitems + 40;
-+ if ((sp->fts_array = realloc(sp->fts_array,
-+ (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-+ sp->fts_nitems = 0;
-+ return (head);
-+ }
-+ }
-+ for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-+ *ap++ = p;
-+ qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-+ for (head = *(ap = sp->fts_array); --nitems; ++ap)
-+ ap[0]->fts_link = ap[1];
-+ ap[0]->fts_link = NULL;
-+ return (head);
- }
-
- /*
-@@ -551,9 +320,7 @@ fts_children(sp, instr)
- * been found, cutting the stat calls by about 2/3.
- */
- static FTSENT *
--fts_build(sp, type)
-- register FTS *sp;
-- int type;
-+fts_build(register FTS *sp, int type)
- {
- register struct dirent *dp;
- register FTSENT *p, *head;
-@@ -716,283 +483,479 @@ mem1: saved_errno = errno;
- --nlinks;
- }
-
-- /* We walk in directory order so "ls -f" doesn't get upset. */
-- p->fts_link = NULL;
-- if (head == NULL)
-- head = tail = p;
-- else {
-- tail->fts_link = p;
-- tail = p;
-+ /* We walk in directory order so "ls -f" doesn't get upset. */
-+ p->fts_link = NULL;
-+ if (head == NULL)
-+ head = tail = p;
-+ else {
-+ tail->fts_link = p;
-+ tail = p;
-+ }
-+ ++nitems;
-+ }
-+ (void)closedir(dirp);
-+
-+ /*
-+ * If had to realloc the path, adjust the addresses for the rest
-+ * of the tree.
-+ */
-+ if (adjaddr)
-+ fts_padjust(sp, adjaddr);
-+
-+ /*
-+ * If not changing directories, reset the path back to original
-+ * state.
-+ */
-+ if (ISSET(FTS_NOCHDIR)) {
-+ if (cp - 1 > sp->fts_path)
-+ --cp;
-+ *cp = '\0';
-+ }
-+
-+ /*
-+ * If descended after called from fts_children or after called from
-+ * fts_read and nothing found, get back. At the root level we use
-+ * the saved fd; if one of fts_open()'s arguments is a relative path
-+ * to an empty directory, we wind up here with no other way back. If
-+ * can't get back, we're done.
-+ */
-+ if (descend && (type == BCHILD || !nitems) &&
-+ (cur->fts_level == FTS_ROOTLEVEL ?
-+ FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
-+ cur->fts_info = FTS_ERR;
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+
-+ /* If didn't find anything, return NULL. */
-+ if (!nitems) {
-+ if (type == BREAD)
-+ cur->fts_info = FTS_DP;
-+ return (NULL);
-+ }
-+
-+ /* Sort the entries. */
-+ if (sp->fts_compar && nitems > 1)
-+ head = fts_sort(sp, head, nitems);
-+ return (head);
-+}
-+
-+
-+FTS *
-+fts_open(char * const *argv, register int options, int (*compar)())
-+{
-+ register FTS *sp;
-+ register FTSENT *p, *root;
-+ register int nitems;
-+ FTSENT *parent, *tmp;
-+ int len;
-+
-+ /* Options check. */
-+ if (options & ~FTS_OPTIONMASK) {
-+ errno = EINVAL;
-+ return (NULL);
-+ }
-+
-+ /* Allocate/initialize the stream */
-+ if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-+ return (NULL);
-+ memset(sp, 0, sizeof(FTS));
-+ sp->fts_compar = compar;
-+ sp->fts_options = options;
-+
-+ /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-+ if (ISSET(FTS_LOGICAL))
-+ SET(FTS_NOCHDIR);
-+
-+ /*
-+ * Start out with 1K of path space, and enough, in any case,
-+ * to hold the user's paths.
-+ */
-+ if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-+ goto mem1;
-+
-+ /* Allocate/initialize root's parent. */
-+ if ((parent = fts_alloc(sp, "", 0)) == NULL)
-+ goto mem2;
-+ parent->fts_level = FTS_ROOTPARENTLEVEL;
-+
-+ /* Allocate/initialize root(s). */
-+ for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
-+ /* Don't allow zero-length paths. */
-+ if ((len = strlen(*argv)) == 0) {
-+ errno = EINVAL;
-+ goto mem3;
-+ }
-+
-+ p = fts_alloc(sp, *argv, len);
-+ p->fts_level = FTS_ROOTLEVEL;
-+ p->fts_parent = parent;
-+ p->fts_accpath = p->fts_name;
-+ p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
-+
-+ /* Command-line "." and ".." are real directories. */
-+ if (p->fts_info == FTS_DOT)
-+ p->fts_info = FTS_D;
-+
-+ /*
-+ * If comparison routine supplied, traverse in sorted
-+ * order; otherwise traverse in the order specified.
-+ */
-+ if (compar) {
-+ p->fts_link = root;
-+ root = p;
-+ } else {
-+ p->fts_link = NULL;
-+ if (root == NULL)
-+ tmp = root = p;
-+ else {
-+ tmp->fts_link = p;
-+ tmp = p;
-+ }
- }
-- ++nitems;
- }
-- (void)closedir(dirp);
--
-- /*
-- * If had to realloc the path, adjust the addresses for the rest
-- * of the tree.
-- */
-- if (adjaddr)
-- fts_padjust(sp, adjaddr);
-+ if (compar && nitems > 1)
-+ root = fts_sort(sp, root, nitems);
-
- /*
-- * If not changing directories, reset the path back to original
-- * state.
-+ * Allocate a dummy pointer and make fts_read think that we've just
-+ * finished the node before the root(s); set p->fts_info to FTS_INIT
-+ * so that everything about the "current" node is ignored.
- */
-- if (ISSET(FTS_NOCHDIR)) {
-- if (cp - 1 > sp->fts_path)
-- --cp;
-- *cp = '\0';
-- }
-+ if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-+ goto mem3;
-+ sp->fts_cur->fts_link = root;
-+ sp->fts_cur->fts_info = FTS_INIT;
-
- /*
-- * If descended after called from fts_children or after called from
-- * fts_read and nothing found, get back. At the root level we use
-- * the saved fd; if one of fts_open()'s arguments is a relative path
-- * to an empty directory, we wind up here with no other way back. If
-- * can't get back, we're done.
-+ * If using chdir(2), grab a file descriptor pointing to dot to insure
-+ * that we can get back here; this could be avoided for some paths,
-+ * but almost certainly not worth the effort. Slashes, symbolic links,
-+ * and ".." are all fairly nasty problems. Note, if we can't get the
-+ * descriptor we run anyway, just more slowly.
- */
-- if (descend && (type == BCHILD || !nitems) &&
-- (cur->fts_level == FTS_ROOTLEVEL ?
-- FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-+ if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-+ SET(FTS_NOCHDIR);
-
-- /* If didn't find anything, return NULL. */
-- if (!nitems) {
-- if (type == BREAD)
-- cur->fts_info = FTS_DP;
-- return (NULL);
-- }
-+ return (sp);
-
-- /* Sort the entries. */
-- if (sp->fts_compar && nitems > 1)
-- head = fts_sort(sp, head, nitems);
-- return (head);
-+mem3: fts_lfree(root);
-+ free(parent);
-+mem2: free(sp->fts_path);
-+mem1: free(sp);
-+ return (NULL);
- }
-
--static u_short
--fts_stat(sp, dp, p, follow)
-- FTS *sp;
-- register FTSENT *p;
-- struct dirent *dp;
-- int follow;
-+FTSENT *
-+fts_read(register FTS *sp)
- {
-- register FTSENT *t;
-- register dev_t dev;
-- register ino_t ino;
-- struct stat *sbp, sb;
-+ register FTSENT *p, *tmp;
-+ register int instr;
-+ register char *t;
- int saved_errno;
-
-- /* If user needs stat info, stat buffer already allocated. */
-- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-+ /* If finished or unrecoverable error, return NULL. */
-+ if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-+ return (NULL);
-
--#ifdef S_IFWHT
-- /*
-- * Whited-out files don't really exist. However, there's stat(2) file
-- * mask for them, so we set it so that programs (i.e., find) don't have
-- * to test FTS_W separately from other file types.
-- */
-- if (dp != NULL && dp->d_type == DT_WHT) {
-- memset(sbp, 0, sizeof(struct stat));
-- sbp->st_mode = S_IFWHT;
-- return (FTS_W);
-+ /* Set current node pointer. */
-+ p = sp->fts_cur;
-+
-+ /* Save and zero out user instructions. */
-+ instr = p->fts_instr;
-+ p->fts_instr = FTS_NOINSTR;
-+
-+ /* Any type of file may be re-visited; re-stat and re-turn. */
-+ if (instr == FTS_AGAIN) {
-+ p->fts_info = fts_stat(sp, NULL, p, 0);
-+ return (p);
- }
--#endif
--
-+
- /*
-- * If doing a logical walk, or application requested FTS_FOLLOW, do
-- * a stat(2). If that fails, check for a non-existent symlink. If
-- * fail, set the errno from the stat call.
-+ * Following a symlink -- SLNONE test allows application to see
-+ * SLNONE and recover. If indirecting through a symlink, have
-+ * keep a pointer to current location. If unable to get that
-+ * pointer, follow fails.
- */
-- if (ISSET(FTS_LOGICAL) || follow) {
-- if (stat(p->fts_accpath, sbp)) {
-- saved_errno = errno;
-- if (!lstat(p->fts_accpath, sbp)) {
-- errno = 0;
-- return (FTS_SLNONE);
-- }
-- p->fts_errno = saved_errno;
-- goto err;
-+ if (instr == FTS_FOLLOW &&
-+ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-+ p->fts_info = fts_stat(sp, NULL, p, 1);
-+ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-+ if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-+ p->fts_errno = errno;
-+ p->fts_info = FTS_ERR;
-+ } else
-+ p->fts_flags |= FTS_SYMFOLLOW;
-+ return (p);
-+ }
-+
-+ /* Directory in pre-order. */
-+ if (p->fts_info == FTS_D) {
-+ /* If skipped or crossed mount point, do post-order visit. */
-+ if (instr == FTS_SKIP ||
-+ ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
-+ if (p->fts_flags & FTS_SYMFOLLOW)
-+ (void)close(p->fts_symfd);
-+ if (sp->fts_child) {
-+ fts_lfree(sp->fts_child);
-+ sp->fts_child = NULL;
-+ }
-+ p->fts_info = FTS_DP;
-+ return (p);
- }
-- } else if (lstat(p->fts_accpath, sbp)) {
-- p->fts_errno = errno;
--err: memset(sbp, 0, sizeof(struct stat));
-- return (FTS_NS);
-+
-+ /* Rebuild if only read the names and now traversing. */
-+ if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
-+ sp->fts_options &= ~FTS_NAMEONLY;
-+ fts_lfree(sp->fts_child);
-+ sp->fts_child = NULL;
-+ }
-+
-+ /*
-+ * Cd to the subdirectory.
-+ *
-+ * If have already read and now fail to chdir, whack the list
-+ * to make the names come out right, and set the parent errno
-+ * so the application will eventually get an error condition.
-+ * Set the FTS_DONTCHDIR flag so that when we logically change
-+ * directories back to the parent we don't do a chdir.
-+ *
-+ * If haven't read do so. If the read fails, fts_build sets
-+ * FTS_STOP or the fts_info field of the node.
-+ */
-+ if (sp->fts_child) {
-+ if (CHDIR(sp, p->fts_accpath)) {
-+ p->fts_errno = errno;
-+ p->fts_flags |= FTS_DONTCHDIR;
-+ for (p = sp->fts_child; p; p = p->fts_link)
-+ p->fts_accpath =
-+ p->fts_parent->fts_accpath;
-+ }
-+ } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-+ if (ISSET(FTS_STOP))
-+ return (NULL);
-+ return (p);
-+ }
-+ p = sp->fts_child;
-+ sp->fts_child = NULL;
-+ goto name;
- }
-
-- if (S_ISDIR(sbp->st_mode)) {
-+ /* Move to the next node on this level. */
-+next: tmp = p;
-+ if (p = p->fts_link) {
-+ free(tmp);
-+
- /*
-- * Set the device/inode. Used to find cycles and check for
-- * crossing mount points. Also remember the link count, used
-- * in fts_build to limit the number of stat calls. It is
-- * understood that these fields are only referenced if fts_info
-- * is set to FTS_D.
-+ * If reached the top, return to the original directory, and
-+ * load the paths for the next root.
- */
-- dev = p->fts_dev = sbp->st_dev;
-- ino = p->fts_ino = sbp->st_ino;
-- p->fts_nlink = sbp->st_nlink;
-+ if (p->fts_level == FTS_ROOTLEVEL) {
-+ if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ fts_load(sp, p);
-+ return (sp->fts_cur = p);
-+ }
-+
-+ /*
-+ * User may have called fts_set on the node. If skipped,
-+ * ignore. If followed, get a file descriptor so we can
-+ * get back if necessary.
-+ */
-+ if (p->fts_instr == FTS_SKIP)
-+ goto next;
-+ if (p->fts_instr == FTS_FOLLOW) {
-+ p->fts_info = fts_stat(sp, NULL, p, 1);
-+ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
-+ if ((p->fts_symfd =
-+ open(".", O_RDONLY, 0)) < 0) {
-+ p->fts_errno = errno;
-+ p->fts_info = FTS_ERR;
-+ } else
-+ p->fts_flags |= FTS_SYMFOLLOW;
-+ p->fts_instr = FTS_NOINSTR;
-+ }
-
-- if (ISDOT(p->fts_name))
-- return (FTS_DOT);
-+name: t = sp->fts_path + NAPPEND(p->fts_parent);
-+ *t++ = '/';
-+ memmove(t, p->fts_name, p->fts_namelen + 1);
-+ return (sp->fts_cur = p);
-+ }
-
-+ /* Move up to the parent node. */
-+ p = tmp->fts_parent;
-+ free(tmp);
-+
-+ if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
-- * Cycle detection is done by brute force when the directory
-- * is first encountered. If the tree gets deep enough or the
-- * number of symbolic links to directories is high enough,
-- * something faster might be worthwhile.
-+ * Done; free everything up and set errno to 0 so the user
-+ * can distinguish between error and EOF.
- */
-- for (t = p->fts_parent;
-- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-- if (ino == t->fts_ino && dev == t->fts_dev) {
-- p->fts_cycle = t;
-- return (FTS_DC);
-- }
-- return (FTS_D);
-+ free(p);
-+ errno = 0;
-+ return (sp->fts_cur = NULL);
- }
-- if (S_ISLNK(sbp->st_mode))
-- return (FTS_SL);
-- if (S_ISREG(sbp->st_mode))
-- return (FTS_F);
-- return (FTS_DEFAULT);
--}
-
--static FTSENT *
--fts_sort(sp, head, nitems)
-- FTS *sp;
-- FTSENT *head;
-- register int nitems;
--{
-- register FTSENT **ap, *p;
-+ /* Nul terminate the pathname. */
-+ sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
-- * Construct an array of pointers to the structures and call qsort(3).
-- * Reassemble the array in the order returned by qsort. If unable to
-- * sort for memory reasons, return the directory entries in their
-- * current order. Allocate enough space for the current needs plus
-- * 40 so don't realloc one entry at a time.
-+ * Return to the parent directory. If at a root node or came through
-+ * a symlink, go back through the file descriptor. Otherwise, cd up
-+ * one directory.
- */
-- if (nitems > sp->fts_nitems) {
-- sp->fts_nitems = nitems + 40;
-- if ((sp->fts_array = realloc(sp->fts_array,
-- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-- sp->fts_nitems = 0;
-- return (head);
-+ if (p->fts_level == FTS_ROOTLEVEL) {
-+ if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ } else if (p->fts_flags & FTS_SYMFOLLOW) {
-+ if (FCHDIR(sp, p->fts_symfd)) {
-+ saved_errno = errno;
-+ (void)close(p->fts_symfd);
-+ errno = saved_errno;
-+ SET(FTS_STOP);
-+ return (NULL);
-+ }
-+ (void)close(p->fts_symfd);
-+ } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
-+ if (CHDIR(sp, "..")) {
-+ SET(FTS_STOP);
-+ return (NULL);
- }
- }
-- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-- *ap++ = p;
-- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-- for (head = *(ap = sp->fts_array); --nitems; ++ap)
-- ap[0]->fts_link = ap[1];
-- ap[0]->fts_link = NULL;
-- return (head);
-+ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-+ return (sp->fts_cur = p);
- }
-
--static FTSENT *
--fts_alloc(sp, name, namelen)
-- FTS *sp;
-- char *name;
-- register int namelen;
-+/*
-+ * Fts_set takes the stream as an argument although it's not used in this
-+ * implementation; it would be necessary if anyone wanted to add global
-+ * semantics to fts using fts_set. An error return is allowed for similar
-+ * reasons.
-+ */
-+/* ARGSUSED */
-+int
-+fts_set(FTS *sp, FTSENT *p, int instr)
-+{
-+ if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-+ instr != FTS_NOINSTR && instr != FTS_SKIP) {
-+ errno = EINVAL;
-+ return (1);
-+ }
-+ p->fts_instr = instr;
-+ return (0);
-+}
-+
-+FTSENT *
-+fts_children(register FTS *sp, int instr)
- {
- register FTSENT *p;
-- size_t len;
-+ int fd;
-+
-+ if (instr && instr != FTS_NAMEONLY) {
-+ errno = EINVAL;
-+ return (NULL);
-+ }
-+
-+ /* Set current node pointer. */
-+ p = sp->fts_cur;
-
- /*
-- * The file name is a variable length array and no stat structure is
-- * necessary if the user has set the nostat bit. Allocate the FTSENT
-- * structure, the file name and the stat structure in one chunk, but
-- * be careful that the stat structure is reasonably aligned. Since the
-- * fts_name field is declared to be of size 1, the fts_name pointer is
-- * namelen + 2 before the first possible address of the stat structure.
-+ * Errno set to 0 so user can distinguish empty directory from
-+ * an error.
- */
-- len = sizeof(FTSENT) + namelen;
-- if (!ISSET(FTS_NOSTAT))
-- len += sizeof(struct stat) + ALIGNBYTES;
-- if ((p = malloc(len)) == NULL)
-+ errno = 0;
-+
-+ /* Fatal errors stop here. */
-+ if (ISSET(FTS_STOP))
- return (NULL);
-
-- /* Copy the name plus the trailing NULL. */
-- memmove(p->fts_name, name, namelen + 1);
-+ /* Return logical hierarchy of user's arguments. */
-+ if (p->fts_info == FTS_INIT)
-+ return (p->fts_link);
-
-- if (!ISSET(FTS_NOSTAT))
-- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-- p->fts_namelen = namelen;
-- p->fts_path = sp->fts_path;
-- p->fts_errno = 0;
-- p->fts_flags = 0;
-- p->fts_instr = FTS_NOINSTR;
-- p->fts_number = 0;
-- p->fts_pointer = NULL;
-- return (p);
-+ /*
-+ * If not a directory being visited in pre-order, stop here. Could
-+ * allow FTS_DNR, assuming the user has fixed the problem, but the
-+ * same effect is available with FTS_AGAIN.
-+ */
-+ if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
-+ return (NULL);
-+
-+ /* Free up any previous child list. */
-+ if (sp->fts_child)
-+ fts_lfree(sp->fts_child);
-+
-+ if (instr == FTS_NAMEONLY) {
-+ sp->fts_options |= FTS_NAMEONLY;
-+ instr = BNAMES;
-+ } else
-+ instr = BCHILD;
-+
-+ /*
-+ * If using chdir on a relative path and called BEFORE fts_read does
-+ * its chdir to the root of a traversal, we can lose -- we need to
-+ * chdir into the subdirectory, and we don't know where the current
-+ * directory is, so we can't get back so that the upcoming chdir by
-+ * fts_read will work.
-+ */
-+ if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
-+ ISSET(FTS_NOCHDIR))
-+ return (sp->fts_child = fts_build(sp, instr));
-+
-+ if ((fd = open(".", O_RDONLY, 0)) < 0)
-+ return (NULL);
-+ sp->fts_child = fts_build(sp, instr);
-+ if (fchdir(fd))
-+ return (NULL);
-+ (void)close(fd);
-+ return (sp->fts_child);
- }
-
--static void
--fts_lfree(head)
-- register FTSENT *head;
-+int
-+fts_close(FTS *sp)
- {
-- register FTSENT *p;
-+ register FTSENT *freep, *p;
-+ int saved_errno;
-
-- /* Free a linked list of structures. */
-- while (p = head) {
-- head = head->fts_link;
-+ /*
-+ * This still works if we haven't read anything -- the dummy structure
-+ * points to the root list, so we step through to the end of the root
-+ * list which has a valid parent pointer.
-+ */
-+ if (sp->fts_cur) {
-+ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-+ freep = p;
-+ p = p->fts_link ? p->fts_link : p->fts_parent;
-+ free(freep);
-+ }
- free(p);
- }
--}
-
--/*
-- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-- * though the kernel won't resolve them. Add the size (not just what's needed)
-- * plus 256 bytes so don't realloc the path 2 bytes at a time.
-- */
--static int
--fts_palloc(sp, more)
-- FTS *sp;
-- size_t more;
--{
-- sp->fts_pathlen += more + 256;
-- sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
-- return (sp->fts_path == NULL);
--}
-+ /* Free up child linked list, sort array, path buffer. */
-+ if (sp->fts_child)
-+ fts_lfree(sp->fts_child);
-+ if (sp->fts_array)
-+ free(sp->fts_array);
-+ free(sp->fts_path);
-
--/*
-- * When the path is realloc'd, have to fix all of the pointers in structures
-- * already returned.
-- */
--static void
--fts_padjust(sp, addr)
-- FTS *sp;
-- void *addr;
--{
-- FTSENT *p;
-+ /* Return to original directory, save errno if necessary. */
-+ if (!ISSET(FTS_NOCHDIR)) {
-+ saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-+ (void)close(sp->fts_rfd);
-+ }
-
--#define ADJUST(p) { \
-- (p)->fts_accpath = \
-- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-- (p)->fts_path = addr; \
--}
-- /* Adjust the current set of children. */
-- for (p = sp->fts_child; p; p = p->fts_link)
-- ADJUST(p);
-+ /* Free up the stream pointer. */
-+ free(sp);
-
-- /* Adjust the rest of the tree. */
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- ADJUST(p);
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-+ /* Set errno and return. */
-+ if (!ISSET(FTS_NOCHDIR) && saved_errno) {
-+ errno = saved_errno;
-+ return (-1);
- }
-+ return (0);
- }
-
--static size_t
--fts_maxarglen(argv)
-- char * const *argv;
--{
-- size_t len, max;
--
-- for (max = 0; *argv; ++argv)
-- if ((len = strlen(*argv)) > max)
-- max = len;
-- return (max);
--}
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch b/import-layers/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch
deleted file mode 100644
index c152704d4..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Replace use of macros from sys/cdefs.h since cdefs.h is missing on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
-Index: fts/fts.h
-===================================================================
---- fts.orig/fts.h
-+++ fts/fts.h
-@@ -126,15 +126,21 @@ typedef struct _ftsent {
- char fts_name[1]; /* file name */
- } FTSENT;
-
--#include <sys/cdefs.h>
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
--__BEGIN_DECLS
--FTSENT *fts_children __P((FTS *, int));
--int fts_close __P((FTS *));
--FTS *fts_open __P((char * const *, int,
-- int (*)(const FTSENT **, const FTSENT **)));
--FTSENT *fts_read __P((FTS *));
--int fts_set __P((FTS *, FTSENT *, int));
--__END_DECLS
-+#ifndef __P
-+#define __P
-+#endif
-+FTSENT *fts_children (FTS *p, int opts);
-+int fts_close (FTS *p);
-+FTS *fts_open (char * const * path, int opts,
-+ int (*compfn)(const FTSENT **, const FTSENT **));
-+FTSENT *fts_read (FTS *p);
-+int fts_set (FTS *p, FTSENT *f, int opts);
-
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* !_FTS_H_ */
-Index: fts/fts.c
-===================================================================
---- fts.orig/fts.c
-+++ fts/fts.c
-@@ -50,15 +50,15 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
- #include <string.h>
- #include <unistd.h>
-
--static FTSENT *fts_alloc __P((FTS *, char *, int));
--static FTSENT *fts_build __P((FTS *, int));
--static void fts_lfree __P((FTSENT *));
--static void fts_load __P((FTS *, FTSENT *));
--static size_t fts_maxarglen __P((char * const *));
--static void fts_padjust __P((FTS *, void *));
--static int fts_palloc __P((FTS *, size_t));
--static FTSENT *fts_sort __P((FTS *, FTSENT *, int));
--static u_short fts_stat __P((FTS *, struct dirent *, FTSENT *, int));
-+static FTSENT *fts_alloc __P(FTS *, char *, int);
-+static FTSENT *fts_build __P(FTS *, int);
-+static void fts_lfree __P(FTSENT *);
-+static void fts_load __P(FTS *, FTSENT *);
-+static size_t fts_maxarglen __P(char * const *);
-+static void fts_padjust __P(FTS *, void *);
-+static int fts_palloc __P(FTS *, size_t);
-+static FTSENT *fts_sort __P(FTS *, FTSENT *, int);
-+static u_short fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
-
- #define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts/stdint.patch b/import-layers/yocto-poky/meta/recipes-core/fts/fts/stdint.patch
deleted file mode 100644
index 89e6097fc..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts/stdint.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Include stdint.h for u_* typedefs
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate
-
---- ./fts.c.orig
-+++ ./fts.c
-@@ -46,6 +46,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <fts.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index 83edffe53..c2059e608 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -24,8 +24,6 @@ SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c
PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
inherit autotools texinfo
EXTRA_OECONF += "--without-lispdir \
@@ -86,15 +84,9 @@ FILES_gettext-runtime = "${bindir}/gettext \
${libdir}/libasprintf.so* \
${libdir}/GNU.Gettext.dll \
"
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
- ${libdir}/charset.alias \
- "
FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
${includedir}/autosprintf.h \
"
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
- ${includedir}/libintl.h \
- "
FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
${mandir}/man1/ngettext.* \
${mandir}/man1/envsubst.* \
@@ -119,6 +111,10 @@ do_install_append_class-native () {
rm ${D}${datadir}/gettext/config.rpath
rm ${D}${datadir}/gettext/po/Makefile.in.in
rm ${D}${datadir}/gettext/po/remove-potcdate.sin
+
+ create_wrapper ${D}${bindir}/msgfmt \
+ GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/"
+
}
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
deleted file mode 100644
index 1571112b0..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Rename 'rand' variable to avoid conflict.
-
-Upstream-Status: pending
-Signed-off-by: Björn Stenberg <bjst@enea.com>
-
-diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c
---- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100
-+++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100
-@@ -9,7 +9,7 @@
- #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
- #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
-
--static GRand *rand;
-+static GRand *grand;
-
- typedef struct _GTest GTest;
- typedef struct _GTestClass GTestClass;
-@@ -84,7 +84,7 @@
- NULL
- };
-
-- rand = g_rand_new();
-+ grand = g_rand_new();
-
- test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
- &test_info, 0);
-@@ -218,7 +218,7 @@
- static void
- my_test_do_prop (GTest * test)
- {
-- test->value = g_rand_int (rand);
-+ test->value = g_rand_int (grand);
- g_object_notify (G_OBJECT (test), "test-prop");
- }
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
deleted file mode 100644
index ee435111f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
-# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
-# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
-#
-# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
-# portable here. mark for upstream
-#
-# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
-# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
-
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
---- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
-+++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
-@@ -52,7 +52,7 @@
- datadir=@datadir@
- datarootdir=@datarootdir@
-
--gettext_dir=$prefix/share/glib-2.0/gettext
-+gettext_dir=@datadir@/glib-2.0/gettext
-
- while test $# -gt 0; do
- case "$1" in
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
index 22ea347e1..b1fe60099 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
@@ -6,7 +6,6 @@ SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://configure-libtool.patch \
- file://fix-conflicting-rand.patch \
file://run-ptest \
file://ptest-paths.patch \
file://uclibc_musl_translation.patch \
@@ -18,8 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://0001-Test-for-pthread_getname_np-before-using-it.patch \
"
-SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
- file://relocate-modules.patch"
+SRC_URI_append_class-native = " file://relocate-modules.patch"
-SRC_URI[md5sum] = "381ab22934f296750d036aa55a397ded"
-SRC_URI[sha256sum] = "82ee94bf4c01459b6b00cb9db0545c2237921e3060c0b74cff13fbc020cfd999"
+SRC_URI[md5sum] = "89265d0289a436e99cad54491eb21ef4"
+SRC_URI[sha256sum] = "25ee7635a7c0fcd4ec91cbc3ae07c7f8f5ce621d8183511f414ded09e7e4e128"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index 2b30e372d..4cdf1411e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -45,7 +45,6 @@ PRINTF_darwin = "--enable-included-printf=yes"
PRINTF_mingw32 = "--enable-included-printf=yes"
EXTRA_OECONF = "${PRINTF} ${CORECONF}"
EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
-EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
# Tell configure that we'll have dbus-daemon on the target for the tests
EXTRA_OECONF_class-target_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
@@ -67,12 +66,17 @@ FILES_${PN}-dev += "${libdir}/glib-2.0/include \
${bindir}/glib-compile-resources \
${datadir}/glib-2.0/gettext/po/Makefile.in.in \
${datadir}/glib-2.0/schemas/gschema.dtd \
+ ${datadir}/glib-2.0/valgrind/glib.supp \
${datadir}/gettext/its"
FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
${bindir}/gdbus-codegen"
FILES_${PN}-utils = "${bindir}/*"
+RRECOMMENDS_${PN} += "shared-mime-info"
+# When cross compiling for Windows we don't want to include this
+RRECOMMENDS_${PN}_remove_mingw32 = "shared-mime-info"
+
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
# Valgrind runtime detection works using hand-written assembly, which
@@ -117,6 +121,12 @@ do_install_append_class-target () {
fi
}
+RDEPENDS_${PN}-codegen += "\
+ python3 \
+ python3-distutils \
+ python3-xml \
+ "
+
RDEPENDS_${PN}-ptest += "\
dbus \
gnome-desktop-testing \
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
index fae8683ee..fc5d70dbb 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
@@ -21,22 +21,20 @@ SRCBRANCH ?= "release/${PV}/master"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-SRCREV_glibc ?= "db0242e3023436757bbc7c488a779e6e3343db04"
-SRCREV_localedef ?= "29869b6dc11427c5bab839bdb155c85a7c644c71"
+SRCREV_glibc ?= "1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369"
+SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843"
SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
- file://0001-Include-locale_t.h-compatibility-header.patch \
+ file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0021-eglibc-Install-PIC-archives.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
"
# Makes for a rather long rev (22 characters), but...
#
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
index 37f27ca44..de859d5ce 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
@@ -18,5 +18,4 @@ do_compile[noexec] = "1"
do_install[depends] += "virtual/${MLPREFIX}libc:do_stash_locale"
COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb
index e86770e12..e86770e12 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
index 75ababea6..b3cb10b87 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
@@ -12,7 +12,7 @@ BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
do_package[depends] += "${BINUTILSDEP}"
-# localedef links with libc.so and glibc-collateral.incinhibits all default deps
+# localedef links with libc.so and glibc-collateral.inc inhibits all default deps
# cannot add virtual/libc to DEPENDS, because it would conflict with libc-initial in RSS
RDEPENDS_localedef += "glibc"
@@ -39,7 +39,6 @@ PACKAGES = "localedef ${PN}-dbg"
PACKAGES_DYNAMIC = "^locale-base-.* \
^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
- ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
^${MLPREFIX}glibc-gconv$"
# Create a glibc-binaries package
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb
index f7702e035..f7702e035 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb
index 0b69bad46..0b69bad46 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
index 9f7fa62a3..df3db2cc4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
@@ -1,19 +1,3 @@
-#
-# For now, we will skip building of a gcc package if it is a uclibc one
-# and our build is not a uclibc one, and we skip a glibc one if our build
-# is a uclibc build.
-#
-# See the note in gcc/gcc_3.4.0.oe
-#
-
-python __anonymous () {
- import bb, re
- uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS')) != None)
- if uc_os:
- raise bb.parse.SkipPackage("incompatible with target %s" %
- d.getVar('TARGET_OS'))
-}
-
INHIBIT_SYSROOT_STRIP = "1"
PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
@@ -147,11 +131,15 @@ do_install_append_arm () {
do_install_armmultilib
}
+do_install_append_armeb () {
+ do_install_armmultilib
+}
+
do_install_armmultilib () {
oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
- oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/sem.h bits/semaphore.h bits/setjmp.h
- oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/string.h bits/typesizes.h
+ oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/pthreadtypes-arch.h bits/sem.h bits/semaphore.h bits/setjmp.h
+ oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/typesizes.h
oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb
index 5a89bd802..5a89bd802 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-Include-locale_t.h-compatibility-header.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-Include-locale_t.h-compatibility-header.patch
deleted file mode 100644
index a13c428e1..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-Include-locale_t.h-compatibility-header.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From abfeb0cf4e3261a66a7a23abc9aed33c034c850d Mon Sep 17 00:00:00 2001
-From: Joshua Watt <Joshua.Watt@garmin.com>
-Date: Wed, 6 Dec 2017 13:26:19 -0600
-Subject: [PATCH] Include locale_t.h compatibility header
-
-Newer versions of glibc (since 2.26) moved the locale typedefs from
-xlocale.h to bits/types/locale_t.h. Create a compatibility header for
-these newer versions of glibc
-
-See f0be25b6336db7492e47d2e8e72eb8af53b5506d in glibc
-
-Upstream-Status: Inappropriate compatibility with newer host glibc
-Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-
----
- locale/bits/types/locale_t.h | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 locale/bits/types/locale_t.h
-
-diff --git a/locale/bits/types/locale_t.h b/locale/bits/types/locale_t.h
-new file mode 100644
-index 0000000000..b519a6c5f8
---- /dev/null
-+++ b/locale/bits/types/locale_t.h
-@@ -0,0 +1 @@
-+#include <xlocale.h>
---
-2.14.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 0553f8a47..19c1d9bf1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 2727e58d1d269994de17cadb12195001b14585e7 Mon Sep 17 00:00:00 2001
+From 81346b2f7735698078d5bf919a78b6c0269d6fee Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/26] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,7 +31,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 51fb0d0..f503dbc 100644
+index c1b6d4ba0f..d7af9ebcbc 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2054,6 +2054,14 @@ _dl_map_object (struct link_map *loader, const char *name,
@@ -65,5 +65,5 @@ index 51fb0d0..f503dbc 100644
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index e5ef3410e..2ce240be6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 1578f52647ec8804186d1944d4cd2095132efc39 Mon Sep 17 00:00:00 2001
+From 82f2e910ec0e2de6a9e2b007825bddfc5850575d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/26] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index f503dbc..3a3d112 100644
+index d7af9ebcbc..19c1db9948 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1753,7 +1753,19 @@ open_path (const char *name, size_t namelen, int mode,
@@ -46,5 +46,5 @@ index f503dbc..3a3d112 100644
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 9e207e44d..397e8b316 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From e53968d61804b6bab32ec6e13cc0b3cd57214796 Mon Sep 17 00:00:00 2001
+From 490a0eb4da1af726ea5d68e3efc0d18ba94c4054 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/26] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -26,10 +26,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
7 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index cfa335e..daa12ec 100644
+index e9632da0b3..4de529d2cf 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
-@@ -132,6 +132,10 @@ do \
+@@ -133,6 +133,10 @@ do \
while (0)
@@ -41,7 +41,7 @@ index cfa335e..daa12ec 100644
internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 3a3d112..a1410e4 100644
+index 19c1db9948..70c259b400 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
@@ -56,7 +56,7 @@ index 3a3d112..a1410e4 100644
SYSTEM_DIRS_LEN
};
diff --git a/elf/interp.c b/elf/interp.c
-index 9448802..e7e8c70 100644
+index b6e8f04444..47c20415bc 100644
--- a/elf/interp.c
+++ b/elf/interp.c
@@ -18,5 +18,5 @@
@@ -67,7 +67,7 @@ index 9448802..e7e8c70 100644
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 467ca82..631a2a9 100644
+index 99caf9e9bb..36ea5df5f1 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -168,6 +168,9 @@ static struct argp argp =
@@ -81,18 +81,18 @@ index 467ca82..631a2a9 100644
a platform. */
static int
diff --git a/elf/rtld.c b/elf/rtld.c
-index 4ec25d7..e159c12 100644
+index 65647fb1c8..cd8381cb33 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
-@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
- strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
- #endif
-
+@@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p)
+ }
+ return *p != '\0';
+ }
+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
- /* List of auditing DSOs. */
- static struct audit_list
-@@ -854,12 +855,12 @@ of this helper program; chances are you did not intend to run this program.\n\
+ /* LD_AUDIT variable contents. Must be processed before the
+ audit_list below. */
+@@ -999,12 +1000,12 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -108,7 +108,7 @@ index 4ec25d7..e159c12 100644
++_dl_skip_args;
--_dl_argc;
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
-index e235188..569f72e 100644
+index 5aa055de6e..b9a14b9bd3 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -36,7 +36,7 @@
@@ -121,7 +121,7 @@ index e235188..569f72e 100644
/* The path elements, as determined by the __gconv_get_path function.
All path elements end in a slash. */
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
-index eb2f900..505804e 100644
+index 1f0b8f629d..acbe68399d 100644
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
@@ -136,5 +136,5 @@ index eb2f900..505804e 100644
# define add_system_dir(dir) add_dir (dir)
#endif
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index b981f7bf7..8db47bca7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,12 +1,14 @@
-From 0b95f34207ffed3aa53fa949662bfbccc7c864a4 Mon Sep 17 00:00:00 2001
+From 8fe1b56180c30d237cc2ab9a5a9c97a0311f41da Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/26] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
It also makes the synchronization more efficient.
+Upstream-Status: Inappropriate [OE-Specific]
+
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -15,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index ce62b33..4fe44ea 100644
+index 0e24200617..1532f52dec 100644
--- a/sysdeps/i386/atomic-machine.h
+++ b/sysdeps/i386/atomic-machine.h
@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
@@ -25,8 +27,8 @@ index ce62b33..4fe44ea 100644
-#define __HAVE_64B_ATOMICS 0
+#define __HAVE_64B_ATOMICS 1
#define USE_ATOMIC_COMPILER_BUILTINS 0
-
+ #define ATOMIC_EXCHANGE_USES_CAS 0
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index ee5000031..956b2aae7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From 77a7495376c7d0c5507c0ec99bf1568150339ef4 Mon Sep 17 00:00:00 2001
+From b9edcc845641956b7286c60c833f05a9f70cfab9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/26] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -49,7 +49,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -189,7 +189,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -296,7 +296,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -436,7 +436,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -543,7 +543,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -683,7 +683,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -790,7 +790,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -930,7 +930,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1037,7 +1037,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -1177,7 +1177,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1284,7 +1284,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -1424,7 +1424,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1531,14 +1531,14 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
new file mode 100644
-index 0000000..b103b4d
+index 0000000000..b103b4dea5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/603e/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
new file mode 100644
-index 0000000..64db17f
+index 0000000000..64db17fada
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
@@ -0,0 +1,2 @@
@@ -1546,39 +1546,39 @@ index 0000000..64db17f
+powerpc/powerpc32/603e/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
new file mode 100644
-index 0000000..7eac5fc
+index 0000000000..7eac5fcf02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e500mc/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
new file mode 100644
-index 0000000..264b2a7
+index 0000000000..264b2a7700
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e5500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
new file mode 100644
-index 0000000..a259344
+index 0000000000..a25934467b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e6500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
new file mode 100644
-index 0000000..a7bc854
+index 0000000000..a7bc854be8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e5500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
new file mode 100644
-index 0000000..04ff8cc
+index 0000000000..04ff8cc181
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index 9088d29c4..c74fead62 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From 520cb9e746af637cf01fea385b7f4ee4aadbdfdd Mon Sep 17 00:00:00 2001
+From 324202488a1c2439be345745722f5cb04c0e0847 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/26] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
names
This bolts in a hook for OE to pass its own version of interpreter
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/elf/readlib.c b/elf/readlib.c
-index 8a66ffe..08d56fc 100644
+index d278a189b2..a84cb85158 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@ index 8a66ffe..08d56fc 100644
static struct known_names known_libs[] =
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index f33defe07..b64327667 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From 64130262787d54e2e6695ae4ed8783bfec14ffef Mon Sep 17 00:00:00 2001
+From cf00bf9de8128171e79a019de809e35f3aeed281 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/26] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
on ppc fixes the errors like below
| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -36,7 +36,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
+index 71e516d1c8..1795fd6c3e 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
@@ -60,7 +60,7 @@ index 71e516d..1795fd6 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
+index 26fa067abf..a917f313ab 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
@@ -84,7 +84,7 @@ index 26fa067..a917f31 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -93,7 +93,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -102,7 +102,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -111,7 +111,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -120,7 +120,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -129,7 +129,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -138,7 +138,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
+index 71e516d1c8..1795fd6c3e 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
@@ -162,7 +162,7 @@ index 71e516d..1795fd6 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
+index 26fa067abf..a917f313ab 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
@@ -186,7 +186,7 @@ index 26fa067..a917f31 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -195,7 +195,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -204,5 +204,5 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 26f65c5b1..3aeec5288 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 5afb0147e3e49c3b474404524014efe51b2bca5a Mon Sep 17 00:00:00 2001
+From babe311deca9ee2730278f13b061b914b5286dc3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/26] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -23,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 114 insertions(+), 21 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 1795fd6..daa83f3 100644
+index 1795fd6c3e..daa83f3fe8 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
@@ -58,7 +58,7 @@ index 1795fd6..daa83f3 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index a917f31..b812cf1 100644
+index a917f313ab..b812cf1705 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
@@ -82,7 +82,7 @@ index a917f31..b812cf1 100644
+}
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -121,7 +121,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -151,7 +151,7 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -190,7 +190,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -220,7 +220,7 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index fc4a749..1c34244 100644
+index fc4a74990e..1c34244bd8 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
@@ -237,7 +237,7 @@ index fc4a749..1c34244 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 9d17512..8126535 100644
+index 9d175122a8..812653558f 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
@@ -254,7 +254,7 @@ index 9d17512..8126535 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 1795fd6..13a8197 100644
+index 1795fd6c3e..13a81973e3 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
@@ -289,7 +289,7 @@ index 1795fd6..13a8197 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index a917f31..fae2d81 100644
+index a917f313ab..fae2d81210 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
@@ -314,7 +314,7 @@ index a917f31..fae2d81 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -353,7 +353,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -383,5 +383,5 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index d416acde3..7d5c2e31f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From ddd51bb4e005432cb3c0f8f33822954408a9fee1 Mon Sep 17 00:00:00 2001
+From 93b5d6bed19939039031c45b777d29619db06184 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/26] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
:
We build some random program and link it with -lust. When we run it,
@@ -45,10 +45,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 60eee00..7d54d5e 100644
+index 7053ead16e..0b1e1716b0 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
-@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+@@ -500,7 +500,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@@ -58,5 +58,5 @@ index 60eee00..7d54d5e 100644
case R_ARM_TLS_TPOFF32:
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 276f1fa4c..7275c3e96 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From d7e74670825330f5421a55f5aa2a1ce6fda7d7fb Mon Sep 17 00:00:00 2001
+From 1a6e0f4ee8584b04226156df1a3de3e467f0ef6f Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/26] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
libm-err-tab.pl will parse all the files named "libm-test-ulps"
in the given dir recursively. To avoid parsing the one in
@@ -18,7 +18,7 @@ Signed-off-by: Ting Liu <b28495@freescale.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manual/Makefile b/manual/Makefile
-index f2f694f..e062833 100644
+index 4ed63a8ef3..e89919eb19 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
@@ -32,5 +32,5 @@ index f2f694f..e062833 100644
touch $@
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 096dab547..84f2ca523 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From d6e2076571263e45c48889896d3d94ff576df2be Mon Sep 17 00:00:00 2001
+From 9b2af6cbf68d3353d72519e7f6c46becb7bd1d0f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/26] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 1c34244..7038a70 100644
+index 1c34244bd8..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -40,7 +40,7 @@ index 1c34244..7038a70 100644
#define FMADD(a_, c_, b_) \
({ double __r; \
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 8126535..10de1f0 100644
+index 812653558f..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -57,5 +57,5 @@ index 8126535..10de1f0 100644
#endif
{
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
deleted file mode 100644
index 7728c61a9..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c0974c746e026650bef5d1940eb3f519765c77af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:25:45 +0000
-Subject: [PATCH 12/26] Make ld --version output matching grok gold's output
-
-adapted from from upstream branch roland/gold-vs-libc
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 5cf3230..391f29d 100755
---- a/configure
-+++ b/configure
-@@ -4555,7 +4555,7 @@ else
- # Found it, now check the version.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
- $as_echo_n "checking version of $LD... " >&6; }
-- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
-+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
-diff --git a/configure.ac b/configure.ac
-index d719fad..5b5877c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -990,7 +990,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- AS=: critic_missing="$critic_missing as")
- AC_CHECK_PROG_VER(LD, $LD, --version,
-- [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
-+ [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)],
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- LD=: critic_missing="$critic_missing ld")
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 1c81c729d..2bf6b23ad 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From 2a12eadfd7940b6b0913de8e95d851254cce7953 Mon Sep 17 00:00:00 2001
+From ffd3c5a04d8f2f26fea71fed4ce41e88b6f51086 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 13/26] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 12/25] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 71243ad..f578187 100644
+index 71243ad0c6..f578187576 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
@@ -26,7 +26,7 @@ index 71243ad..f578187 100644
;;
esac
diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac
-index 634fe4d..3db1697 100644
+index 634fe4de2a..3db1697f4f 100644
--- a/sysdeps/gnu/configure.ac
+++ b/sysdeps/gnu/configure.ac
@@ -21,6 +21,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@ index 634fe4d..3db1697 100644
;;
esac
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
index b23e104ff..099fe50ee 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From ec4f7763b30603b7ba0b70bd7750e34d442821b3 Mon Sep 17 00:00:00 2001
+From 049cce82f35e0d864d98075b83888dbba4d68afd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 14/26] Add unused attribute
+Subject: [PATCH 13/25] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
@@ -17,7 +17,7 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 95cbce7..191a0dd 100644
+index 18d8bd6ae7..eb729da5d3 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@ index 95cbce7..191a0dd 100644
{
int slash_count = 0;
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
index 98d425a7b..ddc70e0e6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 18d64951cbb68d8d75e8ef347cbd0e0a5c14604b Mon Sep 17 00:00:00 2001
+From 3b904bee81a1cfe81e3f437b5f3296efd54a51ac Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 15/26] 'yes' within the path sets wrong config variables
+Subject: [PATCH 14/25] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
-index 5bd355a..3bc5537 100644
+index 5bd355a691..3bc5537bc0 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -148,12 +148,12 @@ else
@@ -48,7 +48,7 @@ index 5bd355a..3bc5537 100644
else
libc_cv_aarch64_be=no
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
-index 7851dd4..6e92381 100644
+index 7851dd4dac..6e9238171f 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -63,7 +63,7 @@ index 7851dd4..6e92381 100644
], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
if test $libc_cv_aarch64_be = yes; then
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
-index 431e843..e152461 100644
+index 431e843b2b..e152461138 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -151,12 +151,12 @@ else
@@ -82,7 +82,7 @@ index 431e843..e152461 100644
else
libc_cv_arm_pcs_vfp=no
diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
-index 90cdd69..05a262b 100644
+index 90cdd69c75..05a262ba00 100644
--- a/sysdeps/arm/configure.ac
+++ b/sysdeps/arm/configure.ac
@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
@@ -97,7 +97,7 @@ index 90cdd69..05a262b 100644
], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
if test $libc_cv_arm_pcs_vfp = yes; then
diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
-index 4e13248..f14af95 100644
+index 4e13248c03..f14af952d0 100644
--- a/sysdeps/mips/configure
+++ b/sysdeps/mips/configure
@@ -143,11 +143,11 @@ else
@@ -115,7 +115,7 @@ index 4e13248..f14af95 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
-index bcbdaff..ad3057f 100644
+index bcbdaffd9f..ad3057f4cc 100644
--- a/sysdeps/mips/configure.ac
+++ b/sysdeps/mips/configure.ac
@@ -6,9 +6,9 @@ dnl position independent way.
@@ -131,7 +131,7 @@ index bcbdaff..ad3057f 100644
if test x$libc_cv_mips_nan2008 = xyes; then
AC_DEFINE(HAVE_MIPS_NAN2008)
diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
-index 14c8a3a..dde3814 100644
+index 14c8a3a014..dde3814ef2 100644
--- a/sysdeps/nios2/configure
+++ b/sysdeps/nios2/configure
@@ -142,12 +142,12 @@ else
@@ -150,7 +150,7 @@ index 14c8a3a..dde3814 100644
else
libc_cv_nios2_be=no
diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
-index f05f438..dc86399 100644
+index f05f43802b..dc8639902d 100644
--- a/sysdeps/nios2/configure.ac
+++ b/sysdeps/nios2/configure.ac
@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -165,7 +165,7 @@ index f05f438..dc86399 100644
], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index a5513fa..283b293 100644
+index a5513fad48..283b293ff3 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -183,7 +183,7 @@ index a5513fa..283b293 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
-index 9147aa4..7898e24 100644
+index 9147aa4582..7898e24738 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.ac
+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
@@ -199,7 +199,7 @@ index 9147aa4..7898e24 100644
libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index af06970..27b8c1b 100644
+index 4e7fcf1d97..44a9cb3791 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -155,12 +155,12 @@ else
@@ -233,7 +233,7 @@ index af06970..27b8c1b 100644
else
libc_cv_ppc64_def_call_elf=no
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-index 0822915..9a32fdd 100644
+index f9cba6e15d..b21f72f1e4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
@@ -259,5 +259,5 @@ index 0822915..9a32fdd 100644
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
index 426a2c0c2..b5feffa06 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From 2bed515b9f9f613ae0db9b9607d8fa60a4afca5b Mon Sep 17 00:00:00 2001
+From b8cb8cb242cb751d888feb1ada5c4d0f05cbc1d7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 16/26] timezone: re-written tzselect as posix sh
+Subject: [PATCH 15/25] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
-index dee7568..66a50be 100644
+index d6cc7ba357..e4ead6e1a7 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
-@@ -120,7 +120,7 @@ $(testdata)/XT%: testdata/XT%
+@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
@@ -28,7 +28,7 @@ index dee7568..66a50be 100644
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
-index 2c3b2f4..0c04a61 100755
+index d2c3a6d1dd..089679f306 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
@@ -41,5 +41,5 @@ index 2c3b2f4..0c04a61 100755
# Output one argument as-is to standard output.
# Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
index 6c2506ccc..1d9983b8e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,11 +1,13 @@
-From c8814875b362efbfd778345d0d2777478bf11a30 Mon Sep 17 00:00:00 2001
+From 69d378001adfe9a359d2f4b069c1ed2d36de4480 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 17/26] Remove bash dependency for nscd init script
+Subject: [PATCH 16/25] Remove bash dependency for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #!/bin/sh.
+Upstream-Status: Pending
+
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
@@ -13,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/nscd/nscd.init b/nscd/nscd.init
-index a882da7..b02986e 100644
+index a882da7d8b..b02986ec15 100644
--- a/nscd/nscd.init
+++ b/nscd/nscd.init
@@ -1,4 +1,4 @@
@@ -69,5 +71,5 @@ index a882da7..b02986e 100644
;;
esac
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
index 2ec01f05c..3e39d7458 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From df96d6b61bb60f13cd3d4989d1afc56d705f4a33 Mon Sep 17 00:00:00 2001
+From cdc88dffa226815e3a218604655459e33dc86483 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 18/26] eglibc: Cross building and testing instructions
+Subject: [PATCH 17/25] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
@@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
diff --git a/GLIBC.cross-building b/GLIBC.cross-building
new file mode 100644
-index 0000000..e6e0da1
+index 0000000000..e6e0da1aaf
--- /dev/null
+++ b/GLIBC.cross-building
@@ -0,0 +1,383 @@
@@ -405,7 +405,7 @@ index 0000000..e6e0da1
+ Hello, C++ world!
diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing
new file mode 100644
-index 0000000..b67b468
+index 0000000000..b67b468466
--- /dev/null
+++ b/GLIBC.cross-testing
@@ -0,0 +1,205 @@
@@ -615,5 +615,5 @@ index 0000000..b67b468
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
index f5921bb7b..02f35f4e7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From 2cb7e3cae4020f431d426ad1740bb25506cde899 Mon Sep 17 00:00:00 2001
+From 1161cd1c683547d29a03626d9d7de7f9cc03b74a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 19/26] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 18/25] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
-index 1ae3281..26ab7bf 100644
+index 3e0ae6f43b..24dc66d17c 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,18 @@ subdir-dirs = include
@@ -79,7 +79,7 @@ index 1ae3281..26ab7bf 100644
# Since stubs.h is never needed when building the library, we simplify the
diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
new file mode 100644
-index 0000000..1d2b669
+index 0000000000..1d2b669aff
--- /dev/null
+++ b/include/stubs-bootstrap.h
@@ -0,0 +1,12 @@
@@ -96,5 +96,5 @@ index 0000000..1d2b669
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
index a9a73916f..adb28cfd3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -1,7 +1,7 @@
-From 000ab518aa1269714bc0a9a4633b0a538fae91d9 Mon Sep 17 00:00:00 2001
+From 1732c7f25453c879c17701839ef34876a7357008 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 21/26] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 19/25] eglibc: Clear cache lines on ppc8xx
2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index 98ec2b3..b384ae0 100644
+index 23f5d5d388..7e45288db7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
@@ -48,7 +48,7 @@ index 98ec2b3..b384ae0 100644
break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index 0efd297..8cc0ef8 100644
+index ad036c1e4b..afee56a3da 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
@@ -79,5 +79,5 @@ index 0efd297..8cc0ef8 100644
break;
#ifndef SHARED
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
index c0cd5b0d1..f835d871a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From a50c6e80543fb4cbc589978c11fe846bf4a94492 Mon Sep 17 00:00:00 2001
+From 108b3a1df96a85522c52a0dec032fc2c106f5f2d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 22/26] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 20/25] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 12 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
-index e0938c4..ca1d7da 100644
+index e0938c4165..ca1d7da339 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@ libc {
@@ -33,7 +33,7 @@ index e0938c4..ca1d7da 100644
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 0024d79..d1db7e4 100644
+index 5f11bc737b..2fd217b00b 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
@@ -52,5 +52,5 @@ index 0024d79..d1db7e4 100644
+weak_alias (___fpscr_values, __fpscr_values)
+
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
deleted file mode 100644
index 43445739b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From b2ed906ec864583b43379ef9ad2b5630c1232565 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 15:10:33 -0800
-Subject: [PATCH 20/26] eglibc: cherry-picked from
-
-http://www.eglibc.org/archives/patches/msg00772.html
-
-Not yet merged into glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- resolv/res_libc.c | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index a4b376f..3256e12 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -21,11 +21,13 @@
- #include <atomic.h>
- #include <limits.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <netinet/in.h>
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <libc-lock.h>
-
-+__libc_lock_define_initialized (static, lock);
- extern unsigned long long int __res_initstamp attribute_hidden;
- /* We have atomic increment operations on 64-bit platforms. */
- #if __WORDSIZE == 64
-@@ -33,7 +35,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
- # define atomicincunlock(lock) (void) 0
- # define atomicinc(var) catomic_increment (&(var))
- #else
--__libc_lock_define_initialized (static, lock);
- # define atomicinclock(lock) __libc_lock_lock (lock)
- # define atomicincunlock(lock) __libc_lock_unlock (lock)
- # define atomicinc(var) ++var
-@@ -92,7 +93,18 @@ res_init(void) {
- int
- __res_maybe_init (res_state resp, int preinit)
- {
-+ static time_t last_mtime;
-+ struct stat statbuf;
-+ int ret;
-+
- if (resp->options & RES_INIT) {
-+ ret = stat (_PATH_RESCONF, &statbuf);
-+ __libc_lock_lock (lock);
-+ if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinc (__res_initstamp);
-+ }
-+ __libc_lock_unlock (lock);
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
index c3e571f8a..6ee397bf7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
@@ -1,7 +1,7 @@
-From 101568daf48d99e71b280a2fdd85460fe740d583 Mon Sep 17 00:00:00 2001
+From 3392ee83b0132c089dffb1e9892b4b252ce1ec0e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 23/26] eglibc: Install PIC archives
+Subject: [PATCH 21/25] eglibc: Install PIC archives
Forward port from eglibc
@@ -29,10 +29,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/Makerules b/Makerules
-index 61a0240..373e628 100644
+index 9bb707c168..74cbefb9ba 100644
--- a/Makerules
+++ b/Makerules
-@@ -762,6 +762,9 @@ ifeq ($(build-shared),yes)
+@@ -775,6 +775,9 @@ ifeq ($(build-shared),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
endif
common-generated += libc.so libc_pic.os
@@ -42,7 +42,7 @@ index 61a0240..373e628 100644
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
$(make-link)
-@@ -1004,6 +1007,7 @@ endif
+@@ -1026,6 +1029,7 @@ endif
install: check-install-supported
@@ -50,7 +50,7 @@ index 61a0240..373e628 100644
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
-@@ -1032,6 +1036,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
+@@ -1054,6 +1058,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
@@ -73,7 +73,7 @@ index 61a0240..373e628 100644
# For versioned libraries, we install three files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
-@@ -1275,9 +1295,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
+@@ -1298,9 +1318,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
endif # headers-nonh
endif # headers
@@ -97,7 +97,7 @@ index 61a0240..373e628 100644
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
-@@ -1290,6 +1323,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
+@@ -1313,6 +1346,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
install-others-nosubdir: $(install-others)
install-others-programs-nosubdir: $(install-others-programs)
@@ -108,7 +108,7 @@ index 61a0240..373e628 100644
# We need all the `-nosubdir' targets so that `install' in the parent
# doesn't depend on several things which each iterate over the subdirs.
-@@ -1299,7 +1336,8 @@ install-%:: install-%-nosubdir ;
+@@ -1322,7 +1359,8 @@ install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
@@ -119,5 +119,5 @@ index 61a0240..373e628 100644
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index 3399890de..2a8a20ac8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,7 +1,7 @@
-From 82516e3ed372f618c886a2de4f9498f597aa8a8b Mon Sep 17 00:00:00 2001
+From d97533dc201cfd863765b1a67a27fde3e2622da7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 24/26] eglibc: Forward port cross locale generation support
+Subject: [PATCH 22/25] eglibc: Forward port cross locale generation support
Upstream-Status: Pending
@@ -23,11 +23,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 locale/catnames.c
diff --git a/locale/Makefile b/locale/Makefile
-index c5379e6..c98c675 100644
+index 98ee76272d..bc3afb2248 100644
--- a/locale/Makefile
+++ b/locale/Makefile
-@@ -25,7 +25,8 @@ include ../Makeconfig
- headers = locale.h bits/locale.h langinfo.h xlocale.h
+@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
+ bits/types/locale_t.h bits/types/__locale_t.h
routines = setlocale findlocale loadlocale loadarchive \
localeconv nl_langinfo nl_langinfo_l mb_cur_max \
- newlocale duplocale freelocale uselocale
@@ -38,7 +38,7 @@ index c5379e6..c98c675 100644
address telephone measurement identification collate
diff --git a/locale/catnames.c b/locale/catnames.c
new file mode 100644
-index 0000000..9fad357
+index 0000000000..9fad357db1
--- /dev/null
+++ b/locale/catnames.c
@@ -0,0 +1,48 @@
@@ -91,10 +91,10 @@ index 0000000..9fad357
+ [LC_ALL] = sizeof ("LC_ALL") - 1
+ };
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 1f4da92..7f68935 100644
+index 4e1c8c568a..f7ed946f1c 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
-@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
+@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
unused. We can manage this playing some tricks with weak references.
But with thread-local locale settings, it becomes quite ungainly unless
we can use __thread variables. So only in that case do we attempt this. */
@@ -104,7 +104,7 @@ index 1f4da92..7f68935 100644
# define NL_CURRENT_INDIRECT 1
#endif
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index 99fcd35..5e528dc 100644
+index e55ab86e28..0f87e6dd28 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
@@ -19,7 +19,9 @@
@@ -150,7 +150,7 @@ index 99fcd35..5e528dc 100644
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index 1e125f6..3b2867f 100644
+index cec848cb7c..fcd768eb7d 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
@@ -199,7 +199,7 @@ index 1e125f6..3b2867f 100644
== runp->wcnext->wcs[runp->nwcs - 1] + 1));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index 0fd141c..68136e6 100644
+index df266c20d6..05c0152ec9 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
@@ -281,7 +281,7 @@ index 0fd141c..68136e6 100644
srunp = srunp->next;
}
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 87531bc..5f2c266 100644
+index 32e9c41e35..6a61fcedeb 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
@@ -350,7 +350,7 @@ index 87531bc..5f2c266 100644
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index b885f65..0afb631 100644
+index 52b340963a..1a8bce17b4 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
@@ -363,7 +363,7 @@ index b885f65..0afb631 100644
size_t bufmax = 56;
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index b4c48f1..ed08d48 100644
+index 6acc1342c7..df87740f8b 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
@@ -409,7 +409,7 @@ index b4c48f1..ed08d48 100644
force_output = 1;
break;
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 32f5cd2..02967b0 100644
+index 0990ef11be..683422c908 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
@@ -432,7 +432,7 @@ index 32f5cd2..02967b0 100644
/* Record that FILE's next element is the 32-bit integer VALUE. */
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index a3dd904..2c7763a 100644
+index 3407e13c13..0bb556caf8 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
@@ -521,7 +521,7 @@ index a3dd904..2c7763a 100644
+
#endif /* locfile.h */
diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 69b3141..1cef0be 100644
+index 19acc4b2c7..c89d3b87ad 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
@@ -562,5 +562,5 @@ index 69b3141..1cef0be 100644
# define WEAK_POSTLOAD(postload) weak_extern (postload)
#else
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
index 1f0f5d4da..9e580d44b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -1,7 +1,7 @@
-From c2d8cdeab116caacdfedb35eeb3e743b44807bec Mon Sep 17 00:00:00 2001
+From cb4d00eac7f84092314de593626eea40f9529038 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH 25/26] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 23/25] Define DUMMY_LOCALE_T if not defined
This is a hack to fix building the locale bits on an older
CentOs 5.X machine
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 3 insertions(+)
diff --git a/locale/programs/config.h b/locale/programs/config.h
-index f606365..0e5f8c3 100644
+index 5b416be0d8..79e66eed5e 100644
--- a/locale/programs/config.h
+++ b/locale/programs/config.h
@@ -19,6 +19,9 @@
@@ -28,5 +28,5 @@ index f606365..0e5f8c3 100644
#define PACKAGE _libc_intl_domainname
#ifndef VERSION
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 852f5304c..0b5935253 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
-From fb315c197cca61299a6f6588ea3460145c255d06 Mon Sep 17 00:00:00 2001
+From a784742739c90eea0d4ccbbd073a067d55ca95e8 Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@windriver.com>
Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH 26/26] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 24/25] elf/dl-deps.c: Make _dl_build_local_scope breadth first
According to the ELF specification:
@@ -24,7 +24,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 6a82987..53be824 100644
+index 1b8bac6593..c616808f31 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
@@ -52,5 +52,5 @@ index 6a82987..53be824 100644
}
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
index 71c0bdcae..09ad04a4d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
@@ -1,7 +1,7 @@
-From a2fc86cb8d0366171f100ebd033aeb9609fa40de Mon Sep 17 00:00:00 2001
+From f3a670496c8fe6d4acf045f5b167a19cf41b044e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
Date: Mon, 22 Aug 2016 16:09:25 +0200
-Subject: [PATCH 27/27] locale: fix hard-coded reference to gcc -E
+Subject: [PATCH 25/25] locale: fix hard-coded reference to gcc -E
When new version of compilers are published, they may not be compatible with
older versions of software. This is particularly common when software is built
@@ -17,13 +17,13 @@ environment.
This patch replaces the hard-coded reference to the gcc binary with the proper
environment variable, thus allowing a user to override it.
-Upstream-Status : Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
+Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
---
locale/gen-translit.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
-index 30d3f2f..e976530 100644
+index 30d3f2f195..e97653017c 100644
--- a/locale/gen-translit.pl
+++ b/locale/gen-translit.pl
@@ -1,5 +1,5 @@
@@ -34,5 +34,5 @@ index 30d3f2f..e976530 100644
sub cstrlen {
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
new file mode 100644
index 000000000..b2bb96b81
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
@@ -0,0 +1,90 @@
+From 037283cbc74739b72f36dfec827d120faa243406 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer at redhat dot com>
+Date: Thu, 6 Jul 2017 11:50:55 +0200
+Subject: [PATCH 26/26] assert: Suppress pedantic warning caused by statement
+ expression [BZ# 21242]
+
+On 07/05/2017 10:15 PM, Zack Weinberg wrote:
+> On Wed, Jul 5, 2017 at 11:51 AM, Florian Weimer <fweimer@redhat.com> wrote:
+>> On 07/05/2017 05:46 PM, Zack Weinberg wrote:
+>>> A problem occurs to me: expressions involving VLAs _are_ evaluated
+>>> inside sizeof.
+>>
+>> The type of the sizeof argument would still be int (due to the
+>> comparison against 0), so this doesn't actually occur.
+>
+> I rechecked what C99 says about sizeof and VLAs, and you're right -
+> the operand of sizeof is only evaluated when sizeof is _directly_
+> applied to a VLA. So this is indeed safe, but I think this wrinkle
+> should be mentioned in the comment. Perhaps
+>
+> /* The first occurrence of EXPR is not evaluated due to the sizeof,
+> but will trigger any pedantic warnings masked by the __extension__
+> for the second occurrence. The explicit comparison against zero
+> ensures that sizeof is not directly applied to a function pointer or
+> bit-field (which would be ill-formed) or VLA (which would be evaluated). */
+>
+> zw
+
+What about the attached patch?
+
+Siddhesh, is this okay during the freeze? I'd like to backport it to
+2.25 as well.
+
+Thanks,
+Florian
+
+assert: Suppress pedantic warning caused by statement expression
+
+2017-07-06 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #21242]
+ * assert/assert.h [__GNUC__ && !__STRICT_ANSI__] (assert):
+ Suppress pedantic warning resulting from statement expression.
+ (__ASSERT_FUNCTION): Add missing __extendsion__.
+---
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ assert/assert.h | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/assert/assert.h b/assert/assert.h
+index 22f019537c..6801cfeb10 100644
+--- a/assert/assert.h
++++ b/assert/assert.h
+@@ -91,13 +91,19 @@ __END_DECLS
+ ? __ASSERT_VOID_CAST (0) \
+ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
+ # else
++/* The first occurrence of EXPR is not evaluated due to the sizeof,
++ but will trigger any pedantic warnings masked by the __extension__
++ for the second occurrence. The explicit comparison against zero is
++ required to support function pointers and bit fields in this
++ context, and to suppress the evaluation of variable length
++ arrays. */
+ # define assert(expr) \
+- ({ \
++ ((void) sizeof ((expr) == 0), __extension__ ({ \
+ if (expr) \
+ ; /* empty */ \
+ else \
+ __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
+- })
++ }))
+ # endif
+
+ # ifdef __USE_GNU
+@@ -113,7 +119,7 @@ __END_DECLS
+ C9x has a similar variable called __func__, but prefer the GCC one since
+ it demangles C++ function names. */
+ # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
+-# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
++# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
+ # else
+ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+ # define __ASSERT_FUNCTION __func__
+--
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
new file mode 100644
index 000000000..777b25340
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
@@ -0,0 +1,37 @@
+From a6bb73d1cfd20a73fbbe6076008376fb87879d1b Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <yuanjie.huang@windriver.com>
+Date: Thu, 18 Aug 2016 17:59:13 +0800
+Subject: [PATCH] reset dl_load_write_lock after forking
+
+The patch in this Bugzilla entry was requested by a customer:
+
+ https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
+
+The __libc_fork() code reset dl_load_lock, but it also needed to reset
+dl_load_write_lock. The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ Not Author See bugzilla]
+
+Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+---
+ sysdeps/nptl/fork.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index 2b9ae4b..3d0b8da 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
+@@ -174,8 +174,9 @@ __libc_fork (void)
+ /* Reset locks in the I/O code. */
+ _IO_list_resetlock ();
+
+- /* Reset the lock the dynamic loader uses to protect its data. */
++ /* Reset the locks the dynamic loader uses to protect its data. */
+ __rtld_lock_initialize (GL(dl_load_lock));
++ __rtld_lock_initialize (GL(dl_load_write_lock));
+
+ /* Run the handlers registered for the child. */
+ while (allp != NULL)
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
new file mode 100644
index 000000000..f76237a46
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
@@ -0,0 +1,57 @@
+The patch in this Bugzilla entry was requested by a customer:
+ https://sourceware.org/bugzilla/show_bug.cgi?id=4578
+
+If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
+RT_DELETE at the time another thread calls fork(), then the child exit code
+from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
+dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
+subsequently requires ld.so functionality before calling exec(), then the
+assertion will fire.
+
+The patch acquires dl_load_lock on entry to fork() and releases it on exit
+from the parent path. The child path is initialized as currently done.
+This is essentially pthreads_atfork, but forced to be first because the
+acquisition of dl_load_lock must happen before malloc_atfork is active
+to avoid a deadlock.
+The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ Not Author See bugzilla]
+
+Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+
+Index: git/sysdeps/nptl/fork.c
+===================================================================
+--- git.orig/sysdeps/nptl/fork.c 2017-08-03 16:02:15.674704080 +0800
++++ git/sysdeps/nptl/fork.c 2017-08-04 18:15:02.463362015 +0800
+@@ -25,6 +25,7 @@
+ #include <tls.h>
+ #include <hp-timing.h>
+ #include <ldsodefs.h>
++#include <libc-lock.h>
+ #include <stdio-lock.h>
+ #include <atomic.h>
+ #include <nptl/pthreadP.h>
+@@ -60,6 +61,10 @@
+ but our current fork implementation is not. */
+ bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
+
++ /* grab ld.so lock BEFORE switching to malloc_atfork */
++ __rtld_lock_lock_recursive (GL(dl_load_lock));
++ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
++
+ /* Run all the registered preparation handlers. In reverse order.
+ While doing this we build up a list of all the entries. */
+ struct fork_handler *runp;
+@@ -247,6 +252,10 @@
+
+ allp = allp->next;
+ }
++
++ /* unlock ld.so last, because we locked it first */
++ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
++ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+ }
+
+ return pid;
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Rework-fno-omit-frame-pointer-support-on-i386.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Rework-fno-omit-frame-pointer-support-on-i386.patch
deleted file mode 100644
index 7ed2b902d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Rework-fno-omit-frame-pointer-support-on-i386.patch
+++ /dev/null
@@ -1,268 +0,0 @@
-From 1ea003d4fccc4646fd1848a182405a1c7000ab18 Mon Sep 17 00:00:00 2001
-From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-Date: Sun, 8 Jan 2017 11:38:23 -0200
-Subject: [PATCH 28/28] Rework -fno-omit-frame-pointer support on i386
-
-Commit 6b1df8b27f fixed the -OS build issue on i386 (BZ#20729) by
-expliciting disabling frame pointer (-fomit-frame-pointer) on the
-faulty objects. Although it does fix the issue, it is a subpar
-workaround that adds complexity in build process (a rule for each
-object to add the required compiler option and pontentially more
-rules for objects that call {INLINE,INTERNAL}_SYSCALL) and does not
-allow the implementations to get all the possible debug/calltrack
-information possible (used mainly in debuggers and performance
-measurement tools).
-
-This patch fixes it by adding an explicit configure check to see
-if -fno-omit-frame-pointer is set and to act accordingly (set or
-not OPTIMIZE_FOR_GCC_5). The make rules is simplified and only
-one is required: to add libc-do-syscall on loader due mmap
-(which will be empty anyway for default build with
--fomit-frame-pointer).
-
-Checked on i386-linux-gnu with GCC 6.2.1 with CFLAGS sets as
-'-Os', '-O2 -fno-omit-frame-pointer', and '-O2 -fomit-frame-pointer'.
-For '-Os' the testsuite issues described by BZ#19463 and BZ#15105
-still applied.
-
-It fixes BZ #21029, although it is marked as duplicated of #20729
-(I reopened to track this cleanup).
-
- [BZ #21029]
- * config.h.in [CAN_USE_REGISTER_ASM_EBP]: New define.
- * sysdeps/unix/sysv/linux/i386/Makefile
- [$(subdir) = elf] (sysdep-dl-routines): Add libc-do-syscall.
- (uses-6-syscall-arguments): Remove.
- [$(subdir) = misc] (CFLAGS-epoll_pwait.o): Likewise.
- [$(subdir) = misc] (CFLAGS-epoll_pwait.os): Likewise.
- [$(subdir) = misc] (CFLAGS-mmap.o): Likewise.
- [$(subdir) = misc] (CFLAGS-mmap.os): Likewise.
- [$(subdir) = misc] (CFLAGS-mmap64.o): Likewise.
- [$(subdir) = misc] (CFLAGS-mmap64.os): Likewise.
- [$(subdir) = misc] (CFLAGS-pselect.o): Likewise.
- [$(subdir) = misc] (cflags-pselect.o): Likewise.
- [$(subdir) = misc] (cflags-pselect.os): Likewise.
- [$(subdir) = misc] (cflags-rtld-mmap.os): Likewise.
- [$(subdir) = sysvipc] (cflags-semtimedop.o): Likewise.
- [$(subdir) = sysvipc] (cflags-semtimedop.os): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fadvise64.o): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fadvise64.os): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fallocate.o): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fallocate.os): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fallocate64.o): Likewise.
- [$(subdir) = io] (CFLAGS-posix_fallocate64.os): Likewise.
- [$(subdir) = io] (CFLAGS-sync_file_range.o): Likewise.
- [$(subdir) = io] (CFLAGS-sync_file_range.os): Likewise.
- [$(subdir) = io] (CFLAGS-fallocate.o): Likewise.
- [$(subdir) = io] (CFLAGS-fallocate.os): Likewise.
- [$(subdir) = io] (CFLAGS-fallocate64.o): Likewise.
- [$(subdir) = io] (CFLAGS-fallocate64.os): Likewise.
- [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.o):
- Likewise.
- [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.os):
- Likewise.
- [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.o):
- Likewise.
- [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.os):
- Likewise.
- [$(subdir) = nptl] (CFLAGS-sem_wait.o): Likewise.
- [$(subdir) = nptl] (CFLAGS-sem_wait.os): Likewise.
- [$(subdir) = nptl] (CFLAGS-sem_timedwait.o): Likewise.
- [$(subdir) = nptl] (CFLAGS-sem_timedwait.os): Likewise.
- * sysdeps/unix/sysv/linux/i386/configure.ac: Add check if compiler allows
- ebp on inline assembly.
- * sysdeps/unix/sysv/linux/i386/configure: Regenerate.
- * sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
- Set if CAN_USE_REGISTER_ASM_EBP is set.
- (check_consistency): Likewise.
-
-Upstream-Status: Backport
-
- https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=3b33d6ed6096c1d20d05a650b06026d673f7399a
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- config.h.in | 4 ++++
- sysdeps/unix/sysv/linux/i386/Makefile | 39 +------------------------------
- sysdeps/unix/sysv/linux/i386/configure | 39 +++++++++++++++++++++++++++++++
- sysdeps/unix/sysv/linux/i386/configure.ac | 17 ++++++++++++++
- sysdeps/unix/sysv/linux/i386/sysdep.h | 6 ++---
- 5 files changed, 64 insertions(+), 41 deletions(-)
-
-diff --git a/config.h.in b/config.h.in
-index 7bfe923..fb2cc51 100644
---- a/config.h.in
-+++ b/config.h.in
-@@ -259,4 +259,8 @@
- /* Build glibc with tunables support. */
- #define HAVE_TUNABLES 0
-
-+/* Some compiler options may now allow to use ebp in __asm__ (used mainly
-+ in i386 6 argument syscall issue). */
-+#define CAN_USE_REGISTER_ASM_EBP 0
-+
- #endif
-diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
-index 9609752..6aac0df 100644
---- a/sysdeps/unix/sysv/linux/i386/Makefile
-+++ b/sysdeps/unix/sysv/linux/i386/Makefile
-@@ -1,47 +1,18 @@
- # The default ABI is 32.
- default-abi := 32
-
--# %ebp is used to pass the 6th argument to system calls, so these
--# system calls are incompatible with a frame pointer.
--uses-6-syscall-arguments = -fomit-frame-pointer
--
- ifeq ($(subdir),misc)
- sysdep_routines += ioperm iopl vm86
--CFLAGS-epoll_pwait.o += $(uses-6-syscall-arguments)
--CFLAGS-epoll_pwait.os += $(uses-6-syscall-arguments)
--CFLAGS-mmap.o += $(uses-6-syscall-arguments)
--CFLAGS-mmap.os += $(uses-6-syscall-arguments)
--CFLAGS-mmap64.o += $(uses-6-syscall-arguments)
--CFLAGS-mmap64.os += $(uses-6-syscall-arguments)
--CFLAGS-pselect.o += $(uses-6-syscall-arguments)
--CFLAGS-pselect.os += $(uses-6-syscall-arguments)
--CFLAGS-rtld-mmap.os += $(uses-6-syscall-arguments)
--endif
--
--ifeq ($(subdir),sysvipc)
--CFLAGS-semtimedop.o += $(uses-6-syscall-arguments)
--CFLAGS-semtimedop.os += $(uses-6-syscall-arguments)
- endif
-
- ifeq ($(subdir),elf)
-+sysdep-dl-routines += libc-do-syscall
- sysdep-others += lddlibc4
- install-bin += lddlibc4
- endif
-
- ifeq ($(subdir),io)
- sysdep_routines += libc-do-syscall
--CFLAGS-posix_fadvise64.o += $(uses-6-syscall-arguments)
--CFLAGS-posix_fadvise64.os += $(uses-6-syscall-arguments)
--CFLAGS-posix_fallocate.o += $(uses-6-syscall-arguments)
--CFLAGS-posix_fallocate.os += $(uses-6-syscall-arguments)
--CFLAGS-posix_fallocate64.o += $(uses-6-syscall-arguments)
--CFLAGS-posix_fallocate64.os += $(uses-6-syscall-arguments)
--CFLAGS-sync_file_range.o += $(uses-6-syscall-arguments)
--CFLAGS-sync_file_range.os += $(uses-6-syscall-arguments)
--CFLAGS-fallocate.o += $(uses-6-syscall-arguments)
--CFLAGS-fallocate.os += $(uses-6-syscall-arguments)
--CFLAGS-fallocate64.o += $(uses-6-syscall-arguments)
--CFLAGS-fallocate64.os += $(uses-6-syscall-arguments)
- endif
-
- ifeq ($(subdir),nptl)
-@@ -61,14 +32,6 @@ ifeq ($(subdir),nptl)
- # pull in __syscall_error routine
- libpthread-routines += sysdep
- libpthread-shared-only-routines += sysdep
--CFLAGS-pthread_rwlock_timedrdlock.o += $(uses-6-syscall-arguments)
--CFLAGS-pthread_rwlock_timedrdlock.os += $(uses-6-syscall-arguments)
--CFLAGS-pthread_rwlock_timedwrlock.o += $(uses-6-syscall-arguments)
--CFLAGS-pthread_rwlock_timedwrlock.os += $(uses-6-syscall-arguments)
--CFLAGS-sem_wait.o += $(uses-6-syscall-arguments)
--CFLAGS-sem_wait.os += $(uses-6-syscall-arguments)
--CFLAGS-sem_timedwait.o += $(uses-6-syscall-arguments)
--CFLAGS-sem_timedwait.os += $(uses-6-syscall-arguments)
- endif
-
- ifeq ($(subdir),rt)
-diff --git a/sysdeps/unix/sysv/linux/i386/configure b/sysdeps/unix/sysv/linux/i386/configure
-index eb72659..ae2c356 100644
---- a/sysdeps/unix/sysv/linux/i386/configure
-+++ b/sysdeps/unix/sysv/linux/i386/configure
-@@ -3,5 +3,44 @@
-
- arch_minimum_kernel=2.6.32
-
-+# Check if CFLAGS allows compiler to use ebp register in inline assembly.
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flags allows ebp in inline assembly" >&5
-+$as_echo_n "checking if compiler flags allows ebp in inline assembly... " >&6; }
-+if ${libc_cv_can_use_register_asm_ebp+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+ void foo (int i)
-+ {
-+ register int reg asm ("ebp") = i;
-+ asm ("# %0" : : "r" (reg));
-+ }
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ libc_cv_can_use_register_asm_ebp=yes
-+else
-+ libc_cv_can_use_register_asm_ebp=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_can_use_register_asm_ebp" >&5
-+$as_echo "$libc_cv_can_use_register_asm_ebp" >&6; }
-+if test $libc_cv_can_use_register_asm_ebp = yes; then
-+ $as_echo "#define CAN_USE_REGISTER_ASM_EBP 1" >>confdefs.h
-+
-+fi
-+
- libc_cv_gcc_unwind_find_fde=yes
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
-diff --git a/sysdeps/unix/sysv/linux/i386/configure.ac b/sysdeps/unix/sysv/linux/i386/configure.ac
-index 1a11da6..1cd632e 100644
---- a/sysdeps/unix/sysv/linux/i386/configure.ac
-+++ b/sysdeps/unix/sysv/linux/i386/configure.ac
-@@ -3,5 +3,22 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
- arch_minimum_kernel=2.6.32
-
-+# Check if CFLAGS allows compiler to use ebp register in inline assembly.
-+AC_CACHE_CHECK([if compiler flags allows ebp in inline assembly],
-+ libc_cv_can_use_register_asm_ebp, [
-+AC_COMPILE_IFELSE(
-+ [AC_LANG_PROGRAM([
-+ void foo (int i)
-+ {
-+ register int reg asm ("ebp") = i;
-+ asm ("# %0" : : "r" (reg));
-+ }])],
-+ [libc_cv_can_use_register_asm_ebp=yes],
-+ [libc_cv_can_use_register_asm_ebp=no])
-+])
-+if test $libc_cv_can_use_register_asm_ebp = yes; then
-+ AC_DEFINE(CAN_USE_REGISTER_ASM_EBP)
-+fi
-+
- libc_cv_gcc_unwind_find_fde=yes
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
-diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
-index baf4642..449b23e 100644
---- a/sysdeps/unix/sysv/linux/i386/sysdep.h
-+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
-@@ -44,9 +44,9 @@
- /* Since GCC 5 and above can properly spill %ebx with PIC when needed,
- we can inline syscalls with 6 arguments if GCC 5 or above is used
- to compile glibc. Disable GCC 5 optimization when compiling for
-- profiling since asm ("ebp") can't be used to put the 6th argument
-- in %ebp for syscall. */
--#if __GNUC_PREREQ (5,0) && !defined PROF
-+ profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
-+ can't be used to put the 6th argument in %ebp for syscall. */
-+#if __GNUC_PREREQ (5,0) && !defined PROF && CAN_USE_REGISTER_ASM_EBP
- # define OPTIMIZE_FOR_GCC_5
- #endif
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
new file mode 100644
index 000000000..3c7050f07
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
@@ -0,0 +1,194 @@
+Upstream-Status: Backport
+
+* fixes "lambda-expression in unevaluated context" compile failures such as
+ https://github.com/nlohmann/json/issues/705
+
+* fixes "no match for 'operator==" compile failures such as
+ https://bugzilla.redhat.com/show_bug.cgi?id=1482990
+
+* Changelog edit was removed from upstream commit because it caused conflict
+
+Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
+
+From b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 21 Aug 2017 13:03:29 +0200
+Subject: [PATCH] assert: Support types without operator== (int) [BZ #21972]
+
+---
+ assert/Makefile | 11 ++++++-
+ assert/assert.h | 16 ++++++----
+ assert/tst-assert-c++.cc | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
+ assert/tst-assert-g++.cc | 19 ++++++++++++
+ 4 files changed, 128 insertions(+), 7 deletions(-)
+ create mode 100644 assert/tst-assert-c++.cc
+ create mode 100644 assert/tst-assert-g++.cc
+
+diff --git a/assert/Makefile b/assert/Makefile
+index 1c3be9b..9ec1be8 100644
+--- a/assert/Makefile
++++ b/assert/Makefile
+@@ -25,6 +25,15 @@ include ../Makeconfig
+ headers := assert.h
+
+ routines := assert assert-perr __assert
+-tests := test-assert test-assert-perr
++tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++
+
+ include ../Rules
++
++ifeq ($(have-cxx-thread_local),yes)
++CFLAGS-tst-assert-c++.o = -std=c++11
++LDLIBS-tst-assert-c++ = -lstdc++
++CFLAGS-tst-assert-g++.o = -std=gnu++11
++LDLIBS-tst-assert-g++ = -lstdc++
++else
++tests-unsupported += tst-assert-c++ tst-assert-g++
++endif
+diff --git a/assert/assert.h b/assert/assert.h
+index 6801cfe..640c95c 100644
+--- a/assert/assert.h
++++ b/assert/assert.h
+@@ -85,7 +85,12 @@ __END_DECLS
+ /* When possible, define assert so that it does not add extra
+ parentheses around EXPR. Otherwise, those added parentheses would
+ suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
+-# if !defined __GNUC__ || defined __STRICT_ANSI__
++# if defined __cplusplus
++# define assert(expr) \
++ (static_cast <bool> (expr) \
++ ? void (0) \
++ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
++# elif !defined __GNUC__ || defined __STRICT_ANSI__
+ # define assert(expr) \
+ ((expr) \
+ ? __ASSERT_VOID_CAST (0) \
+@@ -93,12 +98,11 @@ __END_DECLS
+ # else
+ /* The first occurrence of EXPR is not evaluated due to the sizeof,
+ but will trigger any pedantic warnings masked by the __extension__
+- for the second occurrence. The explicit comparison against zero is
+- required to support function pointers and bit fields in this
+- context, and to suppress the evaluation of variable length
+- arrays. */
++ for the second occurrence. The ternary operator is required to
++ support function pointers and bit fields in this context, and to
++ suppress the evaluation of variable length arrays. */
+ # define assert(expr) \
+- ((void) sizeof ((expr) == 0), __extension__ ({ \
++ ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
+ if (expr) \
+ ; /* empty */ \
+ else \
+diff --git a/assert/tst-assert-c++.cc b/assert/tst-assert-c++.cc
+new file mode 100644
+index 0000000..12a5e69
+--- /dev/null
++++ b/assert/tst-assert-c++.cc
+@@ -0,0 +1,78 @@
++/* Tests for interactions between C++ and assert.
++ Copyright (C) 2017 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
++ <http://www.gnu.org/licenses/>. */
++
++#include <assert.h>
++
++/* The C++ standard requires that if the assert argument is a constant
++ subexpression, then the assert itself is one, too. */
++constexpr int
++check_constexpr ()
++{
++ return (assert (true), 1);
++}
++
++/* Objects of this class can be contextually converted to bool, but
++ cannot be compared to int. */
++struct no_int
++{
++ no_int () = default;
++ no_int (const no_int &) = delete;
++
++ explicit operator bool () const
++ {
++ return true;
++ }
++
++ bool operator! () const; /* No definition. */
++ template <class T> bool operator== (T) const; /* No definition. */
++ template <class T> bool operator!= (T) const; /* No definition. */
++};
++
++/* This class tests that operator== is not used by assert. */
++struct bool_and_int
++{
++ bool_and_int () = default;
++ bool_and_int (const no_int &) = delete;
++
++ explicit operator bool () const
++ {
++ return true;
++ }
++
++ bool operator! () const; /* No definition. */
++ template <class T> bool operator== (T) const; /* No definition. */
++ template <class T> bool operator!= (T) const; /* No definition. */
++};
++
++static int
++do_test ()
++{
++ {
++ no_int value;
++ assert (value);
++ }
++
++ {
++ bool_and_int value;
++ assert (value);
++ }
++
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff --git a/assert/tst-assert-g++.cc b/assert/tst-assert-g++.cc
+new file mode 100644
+index 0000000..8c06402
+--- /dev/null
++++ b/assert/tst-assert-g++.cc
+@@ -0,0 +1,19 @@
++/* Tests for interactions between C++ and assert. GNU C++11 version.
++ Copyright (C) 2017 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
++ <http://www.gnu.org/licenses/>. */
++
++#include <tst-assert-c++.cc>
+--
+1.9.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
new file mode 100644
index 000000000..ae050a522
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
@@ -0,0 +1,61 @@
+From a76376df7c07e577a9515c3faa5dbd50bda5da07 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Fri, 20 Oct 2017 18:41:14 +0200
+Subject: [PATCH] CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320]
+
+(cherry picked from commit c369d66e5426a30e4725b100d5cd28e372754f90)
+
+Upstream-Status: Backport
+CVE: CVE-2017-15670
+Affects: glibc < 2.27
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 6 ++++++
+ NEWS | 5 +++++
+ posix/glob.c | 2 +-
+ 3 files changed, 12 insertions(+), 1 deletion(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -206,6 +206,11 @@ Security related changes:
+ * A use-after-free vulnerability in clntudp_call in the Sun RPC system has been
+ fixed (CVE-2017-12133).
+
++ CVE-2017-15670: The glob function, when invoked with GLOB_TILDE,
++ suffered from a one-byte overflow during ~ operator processing (either
++ on the stack or the heap, depending on the length of the user name).
++ Reported by Tim RĂĽhsen.
++
+ The following bugs are resolved with this release:
+
+ [984] network: Respond to changed resolv.conf in gethostbyname
+Index: git/posix/glob.c
+===================================================================
+--- git.orig/posix/glob.c
++++ git/posix/glob.c
+@@ -843,7 +843,7 @@ glob (const char *pattern, int flags, in
+ *p = '\0';
+ }
+ else
+- *((char *) mempcpy (newp, dirname + 1, end_name - dirname))
++ *((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
+ = '\0';
+ user_name = newp;
+ }
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,9 @@
++2017-10-20 Paul Eggert <eggert@cs.ucla.edu>
++
++ [BZ #22320]
++ CVE-2017-15670
++ * posix/glob.c (__glob): Fix one-byte overflow.
++
+ 2017-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
+
+ * version.h (RELEASE): Set to "stable"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch
new file mode 100644
index 000000000..35692820d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch
@@ -0,0 +1,66 @@
+From f1cf98b583787cfb6278baea46e286a0ee7567fd Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 22 Oct 2017 10:00:57 +0200
+Subject: [PATCH] glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ
+ #22332]
+
+(cherry picked from commit a159b53fa059947cc2548e3b0d5bdcf7b9630ba8)
+
+Upstream-Status: Backport
+CVE: CVE-2017-15671
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 6 ++++++
+ NEWS | 4 ++++
+ posix/glob.c | 4 ++--
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -211,6 +211,10 @@ Security related changes:
+ on the stack or the heap, depending on the length of the user name).
+ Reported by Tim RĂĽhsen.
+
++ The glob function, when invoked with GLOB_TILDE and without
++ GLOB_NOESCAPE, could write past the end of a buffer while
++ unescaping user names. Reported by Tim RĂĽhsen.
++
+ The following bugs are resolved with this release:
+
+ [984] network: Respond to changed resolv.conf in gethostbyname
+Index: git/posix/glob.c
+===================================================================
+--- git.orig/posix/glob.c
++++ git/posix/glob.c
+@@ -823,11 +823,11 @@ glob (const char *pattern, int flags, in
+ char *p = mempcpy (newp, dirname + 1,
+ unescape - dirname - 1);
+ char *q = unescape;
+- while (*q != '\0')
++ while (q != end_name)
+ {
+ if (*q == '\\')
+ {
+- if (q[1] == '\0')
++ if (q + 1 == end_name)
+ {
+ /* "~fo\\o\\" unescape to user_name "foo\\",
+ but "~fo\\o\\/" unescape to user_name
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,5 +1,10 @@
++
+ 2017-10-20 Paul Eggert <eggert@cs.ucla.edu>
+
++ [BZ #22332]
++ * posix/glob.c (__glob): Fix buffer overflow during GLOB_TILDE
++ unescaping.
++
+ [BZ #22320]
+ CVE-2017-15670
+ * posix/glob.c (__glob): Fix one-byte overflow.
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch
new file mode 100644
index 000000000..38731e412
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch
@@ -0,0 +1,150 @@
+From 4ebd0c4191c6073cc8a7c5fdcf1d182c4719bcbb Mon Sep 17 00:00:00 2001
+From: Aurelien Jarno <aurelien@aurel32.net>
+Date: Sat, 30 Dec 2017 10:54:23 +0100
+Subject: [PATCH] elf: Check for empty tokens before dynamic string token
+ expansion [BZ #22625]
+
+The fillin_rpath function in elf/dl-load.c loops over each RPATH or
+RUNPATH tokens and interprets empty tokens as the current directory
+("./"). In practice the check for empty token is done *after* the
+dynamic string token expansion. The expansion process can return an
+empty string for the $ORIGIN token if __libc_enable_secure is set
+or if the path of the binary can not be determined (/proc not mounted).
+
+Fix that by moving the check for empty tokens before the dynamic string
+token expansion. In addition, check for NULL pointer or empty strings
+return by expand_dynamic_string_token.
+
+The above changes highlighted a bug in decompose_rpath, an empty array
+is represented by the first element being NULL at the fillin_rpath
+level, but by using a -1 pointer in decompose_rpath and other functions.
+
+Changelog:
+ [BZ #22625]
+ * elf/dl-load.c (fillin_rpath): Check for empty tokens before dynamic
+ string token expansion. Check for NULL pointer or empty string possibly
+ returned by expand_dynamic_string_token.
+ (decompose_rpath): Check for empty path after dynamic string
+ token expansion.
+(cherry picked from commit 3e3c904daef69b8bf7d5cc07f793c9f07c3553ef)
+
+Upstream-Status: Backport
+CVE: CVE-2017-16997
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 10 ++++++++++
+ NEWS | 4 ++++
+ elf/dl-load.c | 49 +++++++++++++++++++++++++++++++++----------------
+ 3 files changed, 47 insertions(+), 16 deletions(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -215,6 +215,10 @@ Security related changes:
+ GLOB_NOESCAPE, could write past the end of a buffer while
+ unescaping user names. Reported by Tim RĂĽhsen.
+
++ CVE-2017-16997: Incorrect handling of RPATH or RUNPATH containing $ORIGIN
++ for AT_SECURE or SUID binaries could be used to load libraries from the
++ current directory.
++
+ The following bugs are resolved with this release:
+
+ [984] network: Respond to changed resolv.conf in gethostbyname
+Index: git/elf/dl-load.c
+===================================================================
+--- git.orig/elf/dl-load.c
++++ git/elf/dl-load.c
+@@ -433,32 +433,41 @@ fillin_rpath (char *rpath, struct r_sear
+ {
+ char *cp;
+ size_t nelems = 0;
+- char *to_free;
+
+ while ((cp = __strsep (&rpath, sep)) != NULL)
+ {
+ struct r_search_path_elem *dirp;
++ char *to_free = NULL;
++ size_t len = 0;
+
+- to_free = cp = expand_dynamic_string_token (l, cp, 1);
++ /* `strsep' can pass an empty string. */
++ if (*cp != '\0')
++ {
++ to_free = cp = expand_dynamic_string_token (l, cp, 1);
+
+- size_t len = strlen (cp);
++ /* expand_dynamic_string_token can return NULL in case of empty
++ path or memory allocation failure. */
++ if (cp == NULL)
++ continue;
++
++ /* Compute the length after dynamic string token expansion and
++ ignore empty paths. */
++ len = strlen (cp);
++ if (len == 0)
++ {
++ free (to_free);
++ continue;
++ }
+
+- /* `strsep' can pass an empty string. This has to be
+- interpreted as `use the current directory'. */
+- if (len == 0)
+- {
+- static const char curwd[] = "./";
+- cp = (char *) curwd;
++ /* Remove trailing slashes (except for "/"). */
++ while (len > 1 && cp[len - 1] == '/')
++ --len;
++
++ /* Now add one if there is none so far. */
++ if (len > 0 && cp[len - 1] != '/')
++ cp[len++] = '/';
+ }
+
+- /* Remove trailing slashes (except for "/"). */
+- while (len > 1 && cp[len - 1] == '/')
+- --len;
+-
+- /* Now add one if there is none so far. */
+- if (len > 0 && cp[len - 1] != '/')
+- cp[len++] = '/';
+-
+ /* Make sure we don't use untrusted directories if we run SUID. */
+ if (__glibc_unlikely (check_trusted) && !is_trusted_path (cp, len))
+ {
+@@ -621,6 +630,14 @@ decompose_rpath (struct r_search_path_st
+ necessary. */
+ free (copy);
+
++ /* There is no path after expansion. */
++ if (result[0] == NULL)
++ {
++ free (result);
++ sps->dirs = (struct r_search_path_elem **) -1;
++ return false;
++ }
++
+ sps->dirs = result;
+ /* The caller will change this value if we haven't used a real malloc. */
+ sps->malloced = 1;
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,12 @@
++2017-12-30 Aurelien Jarno <aurelien@aurel32.net>
++ Dmitry V. Levin <ldv@altlinux.org>
++
++ [BZ #22625]
++ * elf/dl-load.c (fillin_rpath): Check for empty tokens before dynamic
++ string token expansion. Check for NULL pointer or empty string possibly
++ returned by expand_dynamic_string_token.
++ (decompose_rpath): Check for empty path after dynamic string
++ token expansion.
+
+ 2017-10-20 Paul Eggert <eggert@cs.ucla.edu>
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
new file mode 100644
index 000000000..c7d1cb86d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
@@ -0,0 +1,80 @@
+From df8c219cb987cfe85c550efa693a1383a11e38aa Mon Sep 17 00:00:00 2001
+From: Arjun Shankar <arjun@redhat.com>
+Date: Thu, 30 Nov 2017 13:31:45 +0100
+Subject: [PATCH] Fix integer overflow in malloc when tcache is enabled [BZ
+ #22375]
+
+When the per-thread cache is enabled, __libc_malloc uses request2size (which
+does not perform an overflow check) to calculate the chunk size from the
+requested allocation size. This leads to an integer overflow causing malloc
+to incorrectly return the last successfully allocated block when called with
+a very large size argument (close to SIZE_MAX).
+
+This commit uses checked_request2size instead, removing the overflow.
+
+(cherry picked from commit 34697694e8a93b325b18f25f7dcded55d6baeaf6)
+
+Upstream-Status: Backport
+CVE: CVE-2017-17426
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 7 +++++++
+ NEWS | 6 ++++++
+ malloc/malloc.c | 3 ++-
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -4,6 +4,8 @@ See the end for copying conditions.
+
+ Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
+ using `glibc' in the "product" field.
++
++[22375] malloc returns pointer from tcache instead of NULL (CVE-2017-17426)
+
+ Version 2.26
+
+@@ -215,6 +217,11 @@ Security related changes:
+ for AT_SECURE or SUID binaries could be used to load libraries from the
+ current directory.
+
++ CVE-2017-17426: The malloc function, when called with an object size near
++ the value SIZE_MAX, would return a pointer to a buffer which is too small,
++ instead of NULL. This was a regression introduced with the new malloc
++ thread cache in glibc 2.26. Reported by Iain Buclaw.
++
+ The following bugs are resolved with this release:
+
+ [984] network: Respond to changed resolv.conf in gethostbyname
+Index: git/malloc/malloc.c
+===================================================================
+--- git.orig/malloc/malloc.c
++++ git/malloc/malloc.c
+@@ -3050,7 +3050,8 @@ __libc_malloc (size_t bytes)
+ return (*hook)(bytes, RETURN_ADDRESS (0));
+ #if USE_TCACHE
+ /* int_free also calls request2size, be careful to not pad twice. */
+- size_t tbytes = request2size (bytes);
++ size_t tbytes;
++ checked_request2size (bytes, tbytes);
+ size_t tc_idx = csize2tidx (tbytes);
+
+ MAYBE_INIT_TCACHE ();
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,10 @@
++2017-11-30 Arjun Shankar <arjun@redhat.com>
++
++ [BZ #22375]
++ CVE-2017-17426
++ * malloc/malloc.c (__libc_malloc): Use checked_request2size
++ instead of request2size.
++
+ 2017-12-30 Aurelien Jarno <aurelien@aurel32.net>
+ Dmitry V. Levin <ldv@altlinux.org>
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.25.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
index 0f1ec0c14..8c0eb98af 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
@@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-DEPENDS += "gperf-native"
+DEPENDS += "gperf-native bison-native"
-SRCREV ?= "db0242e3023436757bbc7c488a779e6e3343db04"
+SRCREV ?= "1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369"
SRCBRANCH ?= "release/${PV}/master"
@@ -26,23 +26,28 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
- file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
- file://0014-Add-unused-attribute.patch \
- file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
- file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
- file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
- file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
+ file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+ file://0013-Add-unused-attribute.patch \
+ file://0014-yes-within-the-path-sets-wrong-config-variables.patch \
+ file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0021-eglibc-Install-PIC-archives.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+ file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
+ file://0026-assert-Suppress-pedantic-warning-caused-by-statement.patch \
+ file://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
+ file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
+ file://CVE-2017-15670.patch \
+ file://CVE-2017-15671.patch \
+ file://0029-assert-Support-types-without-operator-int-BZ-21972.patch \
+ file://CVE-2017-16997.patch \
+ file://CVE-2017-17426.patch \
"
NATIVESDKFIXES ?= ""
@@ -68,16 +73,20 @@ GLIBC_BROKEN_LOCALES = ""
# this helps in easing out parsing for non-glibc system libraries
#
COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile \
--disable-debug --without-gd \
--enable-clocale=gnu \
- --enable-add-ons \
+ --enable-add-ons=libidn \
--with-headers=${STAGING_INCDIR} \
--without-selinux \
--enable-obsolete-rpc \
+ --enable-obsolete-nsl \
+ --enable-tunables \
+ --enable-bind-now \
+ --enable-stack-protector=strong \
+ --enable-stackguard-randomization \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
@@ -99,6 +108,10 @@ do_configure () {
# version check and doesn't really help with anything
(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
find ${S} -name "configure" | xargs touch
+ # "plural.c" may or may not get regenerated from "plural.y" so we
+ # touch "plural.y" to make sure it does. (This should not be needed
+ # for glibc version 2.26+)
+ find ${S}/intl -name "plural.y" | xargs touch
CPPFLAGS="" oe_runconf
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch b/import-layers/yocto-poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
index 8c4d953a2..a24b8cda6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
@@ -12,6 +12,7 @@ arch specific methods, and the end result will be strangeness
like the loopback device not being configured/enabled.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Upstream-Status: Pending
---
defn2c.pl | 6 +++---
defn2man.pl | 6 +++---
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 045781c21..bd441aef6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -3,8 +3,7 @@ DESCRIPTION = "An image containing the build system that you can boot and run us
HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted \
kernel-dev kernel-devsrc connman connman-plugin-ethernet dhcp-client \
@@ -19,12 +18,12 @@ IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
APPEND += "rootfstype=ext4 quiet"
DEPENDS = "zip-native python3-pip-native"
-IMAGE_FSTYPES = "vmdk"
+IMAGE_FSTYPES = "wic.vmdk"
inherit core-image module-base setuptools3
-SRCREV ?= "b859272ad4053185d4980cac05481b430e05345f"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=pyro \
+SRCREV ?= "a9588646fcec17e53199e1ea7e7b8dccf140817e"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=rocko \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \
@@ -101,7 +100,11 @@ fakeroot do_populate_poky_src () {
export STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
export HOME=${IMAGE_ROOTFS}/home/builder
mkdir -p ${IMAGE_ROOTFS}/home/builder/.cache/pip
- pip3 install --user -I -U -v -r ${IMAGE_ROOTFS}/home/builder/poky/bitbake/toaster-requirements.txt
+ pip3_install_params="--user -I -U -v -r ${IMAGE_ROOTFS}/home/builder/poky/bitbake/toaster-requirements.txt"
+ if [ -n "${http_proxy}" ]; then
+ pip3_install_params="${pip3_install_params} --proxy ${http_proxy}"
+ fi
+ pip3 install ${pip3_install_params}
chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.local
chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.cache
}
@@ -120,7 +123,7 @@ create_bundle_files () {
cd ${WORKDIR}
mkdir -p Yocto_Build_Appliance
cp *.vmx* Yocto_Build_Appliance
- ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.wic.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
zip -r ${IMGDEPLOYDIR}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${IMGDEPLOYDIR}/Yocto_Build_Appliance.zip
}
@@ -130,4 +133,4 @@ python do_bundle_files() {
bb.build.exec_func('create_bundle_files', d)
}
-addtask bundle_files after do_vmimg before do_image_complete
+addtask bundle_files after do_image_wic before do_image_complete
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 5794a2595..c446e87bd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -8,7 +8,7 @@ PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-ins
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
-export IMAGE_BASENAME = "core-image-minimal-initramfs"
+export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs"
IMAGE_LINGUAS = ""
LICENSE = "MIT"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 184727ddf..16995e658 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -1,10 +1,9 @@
# Simple initramfs image artifact generation for tiny images.
DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
-first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
+first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
actually generate an image but rather generates boot and rootfs artifacts \
-into a common location that can subsequently be picked up by external image \
-generation tools such as wic."
+that can subsequently be picked up by external image generation tools such as wic."
PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
@@ -17,7 +16,7 @@ IMAGE_LINGUAS = ""
LICENSE = "MIT"
# don't actually generate an image, just the artifacts needed for one
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} wic"
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
@@ -40,3 +39,5 @@ python tinyinitrd () {
}
IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
+
+QB_KERNEL_CMDLINE_APPEND += "debugshell=3 init=/bin/busybox sh init"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 5ad3a60c0..706418fa9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -186,6 +186,13 @@ parted ${device} mkpart swap linux-swap $swap_start 100%
parted ${device} print
+echo "Waiting for device nodes..."
+C=0
+while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
+ C=$(( C + 1 ))
+ sleep 1
+done
+
echo "Formatting $bootfs to vfat..."
mkfs.vfat $bootfs
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
index 572613ecd..dade059c8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -132,7 +132,7 @@ fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
-grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')
+grub_version=$(grub-install -V|sed 's/.* \([0-9]\).*/\1/')
if [ $grub_version -eq 0 ] ; then
bios_boot_size=0
@@ -211,6 +211,13 @@ parted ${device} mkpart $pname linux-swap $swap_start 100%
parted ${device} print
+echo "Waiting for device nodes..."
+C=0
+while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
+ C=$(( C + 1 ))
+ sleep 1
+done
+
echo "Formatting $bootfs to ext3..."
mkfs.ext3 $bootfs
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
index 441b41c9d..46cab6cc7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -84,6 +84,10 @@ boot_live_root() {
# device node creation events were handled, to avoid unexpected behavior
killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # Don't run systemd-update-done on systemd-based live systems
+ # because it triggers a slow rebuild of ldconfig caches.
+ touch ${ROOT_MOUNT}/etc/.updated ${ROOT_MOUNT}/var/.updated
+
# Allow for identification of the real root even after boot
mkdir -p ${ROOT_MOUNT}/media/realroot
mount -n --move "/run/media/${ROOT_DISK}" ${ROOT_MOUNT}/media/realroot
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev
index a5df1d717..9814d9764 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Copyright (C) 2011, 2017 O.S. Systems Software LTDA.
# Licensed on MIT
mdev_enabled() {
@@ -25,6 +25,6 @@ mdev_run() {
# load modules for devices
find /sys -name modalias | while read m; do
- load_kernel_module $(cat $m)
+ load_kernel_module $(cat "$m")
done
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/setup-live b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
new file mode 100644
index 000000000..4c79f4128
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
@@ -0,0 +1,64 @@
+#/bin/sh
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+setup_enabled() {
+ return 0
+}
+
+setup_run() {
+ROOT_IMAGE="rootfs.img"
+ISOLINUX=""
+ROOT_DISK=""
+shelltimeout=30
+
+ if [ -z "$bootparam_root" -o "$bootparam_root" = "/dev/ram0" ]; then
+ echo "Waiting for removable media..."
+ C=0
+ while true
+ do
+ for i in `ls /run/media 2>/dev/null`; do
+ if [ -f /run/media/$i/$ROOT_IMAGE ] ; then
+ found="yes"
+ ROOT_DISK="$i"
+ break
+ elif [ -f /run/media/$i/isolinux/$ROOT_IMAGE ]; then
+ found="yes"
+ ISOLINUX="isolinux"
+ ROOT_DISK="$i"
+ break
+ fi
+ done
+ if [ "$found" = "yes" ]; then
+ break;
+ fi
+ # don't wait for more than $shelltimeout seconds, if it's set
+ if [ -n "$shelltimeout" ]; then
+ echo -n " " $(( $shelltimeout - $C ))
+ if [ $C -ge $shelltimeout ]; then
+ echo "..."
+ echo "Mounted filesystems"
+ mount | grep media
+ echo "Available block devices"
+ cat /proc/partitions
+ fatal "Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell "
+ fi
+ C=$(( C + 1 ))
+ fi
+ sleep 1
+ done
+ # The existing rootfs module has no support for rootfs images. Assign the rootfs image.
+ bootparam_root="/run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE"
+ fi
+
+ if [ "$bootparam_LABEL" != "boot" -a -f /init.d/$bootparam_LABEL.sh ] ; then
+ if [ -f /run/media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
+ ./init.d/$bootparam_LABEL.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params
+ else
+ fatal "Could not find $bootparam_LABEL script"
+ fi
+
+ # If we're getting here, we failed...
+ fatal "Target $bootparam_LABEL failed"
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 67a1b04d2..2afc37ee7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -3,7 +3,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
-PR = "r2"
+PR = "r4"
inherit allarch
@@ -13,7 +13,8 @@ SRC_URI = "file://init \
file://mdev \
file://udev \
file://e2fs \
- file://debug"
+ file://debug \
+ "
S = "${WORKDIR}"
@@ -48,7 +49,8 @@ PACKAGES = "${PN}-base \
initramfs-module-udev \
initramfs-module-e2fs \
initramfs-module-rootfs \
- initramfs-module-debug"
+ initramfs-module-debug \
+ "
FILES_${PN}-base = "/init /init.d/99-finish /dev"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index 32c1fce76..2a7f84ddc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -21,4 +21,4 @@ INHIBIT_DEFAULT_DEPS = "1"
FILES_${PN} = " /install-efi.sh "
-COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+COMPATIBLE_HOST = "(i.86.*|x86_64.*|aarch64.*)-linux"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index 88b3b3019..a553a0d8b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -21,4 +21,4 @@ INHIBIT_DEFAULT_DEPS = "1"
FILES_${PN} = " /install.sh "
-COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+COMPATIBLE_HOST = "(i.86.*|x86_64.*|aarch64.*)-linux"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
new file mode 100644
index 000000000..1e7f76fd5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "initramfs-framework module for EFI installation option"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+
+PR = "r4"
+
+SRC_URI = "file://init-install-efi.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/init.d/install-efi.sh
+}
+
+FILES_${PN} = "/init.d/install-efi.sh"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
new file mode 100644
index 000000000..02b69f37a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "initramfs-framework module for installation option"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid"
+
+# The same restriction as grub
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST_armv7a = 'null'
+COMPATIBLE_HOST_armv7ve = 'null'
+
+PR = "r1"
+
+SRC_URI = "file://init-install.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/init-install.sh ${D}/init.d/install.sh
+}
+
+FILES_${PN} = "/init.d/install.sh"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
new file mode 100644
index 000000000..4d2fe9dd2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "initramfs-framework module for live booting"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS_${PN} = "initramfs-framework-base udev-extraconf"
+
+PR = "r4"
+
+inherit allarch
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/initramfs-framework:"
+SRC_URI = "file://setup-live"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live
+}
+
+FILES_${PN} = "/init.d/80-setup-live"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 22a71ecaa..35316ec2b 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -25,8 +25,18 @@ COREDEF="00_core"
[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
create_file() {
+ EXEC=""
+ [ -z "$2" ] && {
+ EXEC="
+ touch \"$1\";
+ "
+ } || {
+ EXEC="
+ cp \"$2\" \"$1\";
+ "
+ }
EXEC="
- touch \"$1\";
+ ${EXEC}
chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
@@ -187,7 +197,9 @@ apply_cfgfile() {
case "${TTYPE}" in
"f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
- create_file "${TNAME}"
+ TSOURCE="$TLTARGET"
+ [ "${TSOURCE}" = "none" ] && TSOURCE=""
+ create_file "${TNAME}" "${TSOURCE}" &
;;
"d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
mk_dir "${TNAME}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index bc17c4553..201106645 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -27,7 +27,6 @@ d root root 1777 /run/lock none
d root root 0755 /var/volatile/log none
d root root 1777 /var/volatile/tmp none
l root root 1777 /var/lock /run/lock
-l root root 0755 /var/log /var/volatile/log
l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
index 2e4f7e466..91eea4b8c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -1,4 +1,5 @@
SUMMARY = "SysV init scripts"
+HOMEPAGE = "https://github.com/fedora-sysv/initscripts"
DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
SECTION = "base"
LICENSE = "GPLv2"
@@ -42,19 +43,19 @@ SRC_URI_append_arm = " file://alignment.sh"
KERNEL_VERSION = ""
-inherit update-alternatives
DEPENDS_append = " update-rc.d-native"
PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
-PACKAGES =+ "${PN}-functions"
-RDEPENDS_${PN} = "${PN}-functions \
- ${@bb.utils.contains('DISTRO_FEATURES','selinux','bash','',d)} \
+PACKAGES =+ "${PN}-functions ${PN}-sushell"
+RDEPENDS_${PN} = "initd-functions \
+ ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
"
+# Recommend pn-functions so that it will be a preferred default provider for initd-functions
+RRECOMMENDS_${PN} = "${PN}-functions"
+RPROVIDES_${PN}-functions = "initd-functions"
+RCONFLICTS_${PN}-functions = "lsbinitscripts"
FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
-
-ALTERNATIVE_PRIORITY_${PN}-functions = "90"
-ALTERNATIVE_${PN}-functions = "functions"
-ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
+FILES_${PN}-sushell = "${base_sbindir}/sushell"
HALTARGS ?= "-d -f"
@@ -102,6 +103,9 @@ do_install () {
install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
+ if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then
+ echo "l root root 0755 /var/log /var/volatile/log" >> ${D}${sysconfdir}/default/volatiles/00_core
+ fi
install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
@@ -134,7 +138,7 @@ do_install () {
update-rc.d -r ${D} mountall.sh start 03 S .
update-rc.d -r ${D} hostname.sh start 39 S .
update-rc.d -r ${D} mountnfs.sh start 15 2 3 4 5 .
- update-rc.d -r ${D} bootmisc.sh start 55 S .
+ update-rc.d -r ${D} bootmisc.sh start 36 S .
update-rc.d -r ${D} sysfs.sh start 02 S .
update-rc.d -r ${D} populate-volatile.sh start 37 S .
update-rc.d -r ${D} read-only-rootfs-hook.sh start 29 S .
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
index 65325c0ea..423b47a07 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
@@ -1,4 +1,5 @@
SUMMARY = "Keytable files and keyboard utilities"
+HOMEPAGE = "http://www.kbd-project.org/"
# everything minus console-fonts is GPLv2+
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
index 95979630a..e4b1782ad 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
@@ -1,4 +1,5 @@
SUMMARY = "Linux control group abstraction library"
+HOMEPAGE = "http://libcg.sourceforge.net/"
DESCRIPTION = "libcgroup is a library that abstracts the control group file system \
in Linux. Control groups allow you to limit, account and isolate resource usage \
(CPU, memory, disk I/O, etc.) of groups of processes."
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
index 5412e8c02..bb55eed17 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
@@ -8,7 +8,7 @@ Namespace nodes must be copied to avoid use-after-free errors.
But they don't necessarily have a physical representation in a
document, so simply disallow them in XPointer ranges.
-Upstream-Status: Backported
+Upstream-Status: Backport
- [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- [https://git.gnome.org/browse/libxml2/commit/?id=3f8a91036d338e51c059d54397a42d645f019c65]
CVE: CVE-2016-4658
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
index 83552ca3e..c60e32f65 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
@@ -2,8 +2,7 @@ libxml2-2.9.4: Fix more NULL pointer derefs
xpointer: Fix more NULL pointer derefs
-Upstream-Status: Backported [https://git.gnome.org/browse/libxml2/commit/?id=e905f08123e4a6e7731549e6f09dadff4cab65bd]
-CVE: -
+Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=e905f08123e4a6e7731549e6f09dadff4cab65bd]
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
index 11718bb2b..65f6bef1e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
@@ -5,10 +5,10 @@ xpath:
- Add sanity check for empty stack.
- Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes
-Upstream-Status: Backported
+Upstream-Status: Backport
- [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- [https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8]
-CVE: necessary changes for fixing CVE-2016-5131
+CVE: CVE-2016-5131
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/run-ptest b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/run-ptest
index 473d0b67a..c313d8326 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/run-ptest
@@ -1,3 +1,4 @@
#!/bin/sh
+export LC_ALL=en_US.UTF-8
make -k runtests
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
index 107539b50..9adb29cfd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
DEPENDS = "zlib virtual/libiconv"
-SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
+SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
file://libxml-64bit.patch \
file://ansidecl.patch \
@@ -53,11 +53,11 @@ RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'l
RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-# WARNING: zlib is require for RPM use
+# WARNING: zlib is required for RPM use
EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
@@ -89,6 +89,17 @@ do_install_ptest () {
grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
fi
+ #Remove build host references from various Makefiles
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -e '/^RELDATE/d' \
+ {} +
}
do_install_append_class-native () {
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
index abdc7feeb..be37c4421 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
@@ -46,8 +46,6 @@ inherit toolchain-scripts-base
inherit nopackages
deltask install
-deltask package
-deltask packagedata
deltask populate_sysroot
do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-go-toolchain.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-go-toolchain.bb
new file mode 100644
index 000000000..dde385c1b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-go-toolchain.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Meta package for building a installable Go toolchain"
+LICENSE = "MIT"
+
+inherit populate_sdk
+
+TOOLCHAIN_HOST_TASK_append = " \
+ packagegroup-go-cross-canadian-${MACHINE} \
+"
+
+TOOLCHAIN_TARGET_TASK_append = " \
+ ${@multilib_pkg_extend(d, 'packagegroup-go-sdk-target')} \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/package-index.bb b/import-layers/yocto-poky/meta/recipes-core/meta/package-index.bb
index fe022ffeb..a4123b762 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/package-index.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/package-index.bb
@@ -4,17 +4,14 @@ LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
PACKAGES = ""
+inherit nopackages
+
deltask do_fetch
deltask do_unpack
deltask do_patch
deltask do_configure
deltask do_compile
deltask do_install
-deltask do_package
-deltask do_packagedata
-deltask do_package_write_ipk
-deltask do_package_write_rpm
-deltask do_package_write_deb
deltask do_populate_sysroot
do_package_index[nostamp] = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
index aaa01d0c3..2c1cc3845 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
@@ -44,25 +44,25 @@ addtask get_public_keys before do_install
do_install () {
if [ -f "${B}/rpm-key" ]; then
- install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/ipk-key" ]; then
- install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/pf-key" ]; then
- install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
}
do_deploy () {
if [ -f "${B}/rpm-key" ]; then
- install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/ipk-key" ]; then
- install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
if [ -f "${B}/pf-key" ]; then
- install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+ install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
fi
}
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
@@ -71,3 +71,11 @@ do_deploy[cleandirs] = "${DEPLOYDIR}"
# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
do_deploy[stamp-extra-info] = ""
addtask deploy after do_get_public_keys
+
+# Delete unnecessary tasks. In particular, "do_unpack" _must_ be deleted because
+# it cleans ${B} and will wipe any keys exported by do_get_public_keys.
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
index f3fc1ebe6..5fabf7fa3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -34,8 +34,6 @@ inherit populate_sdk
inherit nopackages
deltask install
-deltask package
-deltask packagedata
deltask populate_sysroot
do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/wic-tools.bb b/import-layers/yocto-poky/meta/recipes-core/meta/wic-tools.bb
index cd494ec23..09eb409e8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/wic-tools.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/wic-tools.bb
@@ -5,12 +5,15 @@ LICENSE = "MIT"
DEPENDS = "\
parted-native syslinux-native gptfdisk-native dosfstools-native \
mtools-native bmap-tools-native grub-efi-native cdrtools-native \
- btrfs-tools-native squashfs-tools-native \
+ btrfs-tools-native squashfs-tools-native pseudo-native \
+ e2fsprogs-native util-linux-native \
"
DEPENDS_append_x86 = " syslinux grub-efi systemd-boot"
DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot"
+DEPENDS_append_x86-x32 = " syslinux grub-efi"
INHIBIT_DEFAULT_DEPS = "1"
+
inherit nopackages
# The sysroot of wic-tools is needed for wic, but if rm_work is enabled, it will
@@ -19,14 +22,5 @@ RM_WORK_EXCLUDE += "${PN}"
python do_build_sysroot () {
bb.build.exec_func("extend_recipe_sysroot", d)
-
- # Write environment variables used by wic
- # to tmp/sysroots/<machine>/imgdata/wictools.env
- outdir = os.path.join(d.getVar('STAGING_DIR'), d.getVar('MACHINE'), 'imgdata')
- bb.utils.mkdirhier(outdir)
- with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf:
- for var in ('RECIPE_SYSROOT_NATIVE', 'STAGING_DATADIR', 'STAGING_LIBDIR'):
- envf.write('%s="%s"\n' % (var, d.getVar(var).strip()))
-
}
addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
index 56c9d7fe1..9af1172ae 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -26,3 +26,8 @@ INSANE_SKIP_${PN} = "dev-so"
# Doesn't compile in MIPS16e mode due to use of hand-written
# assembly
MIPS_INSTRUCTION_SET = "mips"
+
+# thumb1 is unsupported
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
index a88bc4d42..db26b4fef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
@@ -3,9 +3,9 @@
require musl.inc
-SRCREV = "54807d47acecab778498ced88ce8f62bfa16e379"
+SRCREV = "eb03bde2f24582874cb72b56c7811bf51da0c817"
-PV = "1.1.16+git${SRCPV}"
+PV = "1.1.18+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
@@ -28,6 +28,14 @@ export CROSS_COMPILE="${TARGET_PREFIX}"
LDFLAGS += "-Wl,-soname,libc.so"
+# When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the
+# Thumb frame pointer in r7 clashes with musl's use of inline asm to make syscalls
+# (where r7 is used for the syscall NR). In most cases, frame pointers will be
+# disabled automatically due to the optimisation level, but append an explicit
+# -fomit-frame-pointer to handle cases where optimisation is set to -O0 or frame
+# pointers have been enabled by -fno-omit-frame-pointer earlier in CFLAGS, etc.
+CFLAGS_append_arm = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+
CONFIGUREOPTS = " \
--prefix=${prefix} \
--exec-prefix=${exec_prefix} \
@@ -49,10 +57,11 @@ do_install() {
oe_runmake install DESTDIR='${D}'
install -d ${D}${bindir}
+ rm -f ${D}${bindir}/ldd
lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
for l in crypt dl m pthread resolv rt util xnet
do
- ln -s libc.so ${D}${libdir}/lib$l.so
+ ln -sf libc.so ${D}${libdir}/lib$l.so
done
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/tic-hang.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/0001-tic-hang.patch
index cba89d26f..4a970561d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/tic-hang.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/0001-tic-hang.patch
@@ -1,13 +1,26 @@
+From a95590f676209832fe0b27226e6de3cb50e2b97c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 14:31:51 +0800
+Subject: [PATCH 1/2] tic hang
+
Upstream-Status: Inappropriate [configuration]
'tic' of some linux distributions (e.g. fedora 11) hang in an infinite
loop when processing the original file.
-Index: ncurses-5.7/misc/terminfo.src
-===================================================================
---- ncurses-5.7.orig/misc/terminfo.src
-+++ ncurses-5.7/misc/terminfo.src
-@@ -3706,12 +3706,11 @@ konsole-xf3x|KDE console window with key
+Signed-off-by: anonymous
+
+Rebase to 6.0+20170715
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ misc/terminfo.src | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/misc/terminfo.src b/misc/terminfo.src
+index ee3fab3..176d593 100644
+--- a/misc/terminfo.src
++++ b/misc/terminfo.src
+@@ -5177,12 +5177,11 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm,
# The value for kbs reflects local customization rather than the settings used
# for XFree86 xterm.
konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
@@ -25,3 +38,6 @@ Index: ncurses-5.7/misc/terminfo.src
# KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
# it is still useful for deriving the other entries.
konsole-vt100|KDE console window with vt100 (sic) keyboard,
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/configure-reproducible.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch
index 54a8bdc6b..c47ce6a8c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/configure-reproducible.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch
@@ -1,15 +1,27 @@
+From 939c994f3756c2d6d3cab2e6a04d05fa7c2b1d56 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 14:45:27 +0800
+Subject: [PATCH 2/2] configure: reproducible
+
"configure" enforces -U for ar flags, breaking deterministic builds.
The flag was added to fix some vaguely specified "recent POSIX binutil
-build problems" in 2015.
+build problems" in 2015.
Upstream-Status: Pending
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Rebase to Rebase to 6.0+20170715
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
diff --git a/configure b/configure
-index 7f31208..aa80911 100755
+index 7d7d2c1..f444354 100755
--- a/configure
+++ b/configure
-@@ -4428,7 +4428,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
+@@ -4458,7 +4458,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
else
cf_cv_ar_flags=unknown
@@ -18,3 +30,6 @@ index 7f31208..aa80911 100755
do
# check if $ARFLAGS already contains this choice
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
new file mode 100644
index 000000000..a19332c4b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
@@ -0,0 +1,541 @@
+From 4bf72cb8f1d3aa5f33c31eb817a5f0338f4aaf6f Mon Sep 17 00:00:00 2001
+From: Ovidiu Panait <ovidiu.panait@windriver.com>
+Date: Wed, 20 Sep 2017 05:02:00 +0000
+Subject: [PATCH] Import upstream patch 20170826
+
+20170826
+ + fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD
+ + corrected a warning from tic about keys which are the same, to skip
+ over missing/cancelled values.
+ + add check in tic for unnecessary use of "2" to denote a shifted
+ special key.
+ + improve checks in trim_sgr0, comp_parse.c and parse_entry.c, for
+ cancelled string capabilities.
+ + add check in _nc_parse_entry() for invalid entry name, setting the
+ name to "invalid" to avoid problems storing entries.
+ + add/improve checks in tic's parser to address invalid input
+ + add a check in comp_scan.c to handle the special case where a
+ nontext file ending with a NUL rather than newline is given to tic
+ as input (Redhat #1484274).
+ + allow for cancelled capabilities in _nc_save_str (Redhat #1484276).
+ + add validity checks for "use=" target in _nc_parse_entry (Redhat
+ #1484284).
+ + check for invalid strings in postprocess_termcap (Redhat #1484285)
+ + reset secondary pointers on EOF in next_char() (Redhat #1484287).
+ + guard _nc_safe_strcpy() and _nc_safe_strcat() against calls using
+ cancelled strings (Redhat #1484291).
+ + correct typo in curs_memleaks.3x (Sven Joachim).
+ + improve test/configure checks for some curses variants not based on
+ X/Open Curses.
+ + add options for test/configure to disable checks for form, menu and
+ panel libraries.
+
+Upstream-Status: Backport
+CVE: CVE-2017-13732, CVE-2017-13734, CVE-2017-13730, CVE-2017-13729, CVE-2017-13728, CVE-2017-13731
+
+
+Author: Sven Joachim <svenjoac@gmx.de>
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ dist.mk | 4 +-
+ include/ncurses_defs | 4 +-
+ ncurses/tinfo/alloc_entry.c | 4 +-
+ ncurses/tinfo/comp_parse.c | 10 ++---
+ ncurses/tinfo/comp_scan.c | 6 ++-
+ ncurses/tinfo/parse_entry.c | 91 ++++++++++++++++++++++++++++++---------------
+ ncurses/tinfo/strings.c | 9 +++--
+ ncurses/tinfo/trim_sgr0.c | 4 +-
+ progs/tic.c | 75 ++++++++++++++++++++++++++++++++++++-
+ 9 files changed, 157 insertions(+), 50 deletions(-)
+
+diff --git a/dist.mk b/dist.mk
+index 9af2699..2c70472 100644
+--- a/dist.mk
++++ b/dist.mk
+@@ -25,7 +25,7 @@
+ # use or other dealings in this Software without prior written #
+ # authorization. #
+ ##############################################################################
+-# $Id: dist.mk,v 1.1172 2017/07/13 00:15:27 tom Exp $
++# $Id: dist.mk,v 1.1179 2017/08/20 15:33:41 tom Exp $
+ # Makefile for creating ncurses distributions.
+ #
+ # This only needs to be used directly as a makefile by developers, but
+@@ -37,7 +37,7 @@ SHELL = /bin/sh
+ # These define the major/minor/patch versions of ncurses.
+ NCURSES_MAJOR = 6
+ NCURSES_MINOR = 0
+-NCURSES_PATCH = 20170715
++NCURSES_PATCH = 20170826
+
+ # We don't append the patch to the version, since this only applies to releases
+ VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
+diff --git a/include/ncurses_defs b/include/ncurses_defs
+index e6611b7..d237db1 100644
+--- a/include/ncurses_defs
++++ b/include/ncurses_defs
+@@ -1,4 +1,4 @@
+-# $Id: ncurses_defs,v 1.73 2017/06/24 14:20:57 tom Exp $
++# $Id: ncurses_defs,v 1.75 2017/08/20 16:50:04 tom Exp $
+ ##############################################################################
+ # Copyright (c) 2000-2016,2017 Free Software Foundation, Inc. #
+ # #
+@@ -50,7 +50,9 @@ HAVE_BSD_STRING_H
+ HAVE_BTOWC
+ HAVE_BUILTIN_H
+ HAVE_CHGAT 1
++HAVE_COLOR_CONTENT 1
+ HAVE_COLOR_SET 1
++HAVE_CURSCR 1
+ HAVE_DIRENT_H
+ HAVE_ERRNO
+ HAVE_FCNTL_H
+diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c
+index 5de09f1..09374d6 100644
+--- a/ncurses/tinfo/alloc_entry.c
++++ b/ncurses/tinfo/alloc_entry.c
+@@ -47,7 +47,7 @@
+
+ #include <tic.h>
+
+-MODULE_ID("$Id: alloc_entry.c,v 1.60 2017/06/27 23:48:55 tom Exp $")
++MODULE_ID("$Id: alloc_entry.c,v 1.61 2017/08/25 09:09:08 tom Exp $")
+
+ #define ABSENT_OFFSET -1
+ #define CANCELLED_OFFSET -2
+@@ -98,7 +98,7 @@ _nc_save_str(const char *const string)
+ size_t old_next_free = next_free;
+ size_t len;
+
+- if (string == 0)
++ if (!VALID_STRING(string))
+ return _nc_save_str("");
+ len = strlen(string) + 1;
+
+diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c
+index 34e6216..580d4df 100644
+--- a/ncurses/tinfo/comp_parse.c
++++ b/ncurses/tinfo/comp_parse.c
+@@ -47,7 +47,7 @@
+
+ #include <tic.h>
+
+-MODULE_ID("$Id: comp_parse.c,v 1.96 2017/04/15 15:36:58 tom Exp $")
++MODULE_ID("$Id: comp_parse.c,v 1.99 2017/08/26 16:15:50 tom Exp $")
+
+ static void sanity_check2(TERMTYPE2 *, bool);
+ NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
+@@ -510,9 +510,9 @@ static void
+ fixup_acsc(TERMTYPE2 *tp, int literal)
+ {
+ if (!literal) {
+- if (acs_chars == 0
+- && enter_alt_charset_mode != 0
+- && exit_alt_charset_mode != 0)
++ if (acs_chars == ABSENT_STRING
++ && PRESENT(enter_alt_charset_mode)
++ && PRESENT(exit_alt_charset_mode))
+ acs_chars = strdup(VT_ACSC);
+ }
+ }
+@@ -568,9 +568,7 @@ sanity_check2(TERMTYPE2 *tp, bool literal)
+ PAIRED(enter_xon_mode, exit_xon_mode);
+ PAIRED(enter_am_mode, exit_am_mode);
+ ANDMISSING(label_off, label_on);
+-#ifdef remove_clock
+ PAIRED(display_clock, remove_clock);
+-#endif
+ ANDMISSING(set_color_pair, initialize_pair);
+ }
+
+diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c
+index 40d7f6a..b207257 100644
+--- a/ncurses/tinfo/comp_scan.c
++++ b/ncurses/tinfo/comp_scan.c
+@@ -50,7 +50,7 @@
+ #include <ctype.h>
+ #include <tic.h>
+
+-MODULE_ID("$Id: comp_scan.c,v 1.106 2017/04/22 11:41:12 tom Exp $")
++MODULE_ID("$Id: comp_scan.c,v 1.108 2017/08/25 22:57:21 tom Exp $")
+
+ /*
+ * Maximum length of string capability we'll accept before raising an error.
+@@ -168,6 +168,8 @@ next_char(void)
+ if (result != 0) {
+ FreeAndNull(result);
+ FreeAndNull(pushname);
++ bufptr = 0;
++ bufstart = 0;
+ allocated = 0;
+ }
+ /*
+@@ -222,6 +224,8 @@ next_char(void)
+ }
+ if ((bufptr = bufstart) != 0) {
+ used = strlen(bufptr);
++ if (used == 0)
++ return (EOF);
+ while (iswhite(*bufptr)) {
+ if (*bufptr == '\t') {
+ _nc_curr_col = (_nc_curr_col | 7) + 1;
+diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
+index 3fa2f25..bbbfcb2 100644
+--- a/ncurses/tinfo/parse_entry.c
++++ b/ncurses/tinfo/parse_entry.c
+@@ -47,7 +47,7 @@
+ #include <ctype.h>
+ #include <tic.h>
+
+-MODULE_ID("$Id: parse_entry.c,v 1.86 2017/06/28 00:53:12 tom Exp $")
++MODULE_ID("$Id: parse_entry.c,v 1.91 2017/08/26 16:13:34 tom Exp $")
+
+ #ifdef LINT
+ static short const parametrized[] =
+@@ -180,6 +180,20 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
+ }
+ #endif /* NCURSES_XNAMES */
+
++static bool
++valid_entryname(const char *name)
++{
++ bool result = TRUE;
++ int ch;
++ while ((ch = UChar(*name++)) != '\0') {
++ if (ch <= ' ' || ch > '~' || ch == '/') {
++ result = FALSE;
++ break;
++ }
++ }
++ return result;
++}
++
+ /*
+ * int
+ * _nc_parse_entry(entry, literal, silent)
+@@ -211,6 +225,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
+ int token_type;
+ struct name_table_entry const *entry_ptr;
+ char *ptr, *base;
++ const char *name;
+ bool bad_tc_usage = FALSE;
+
+ token_type = _nc_get_token(silent);
+@@ -261,7 +276,12 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
+ * results in the terminal type getting prematurely set to correspond
+ * to that of the next entry.
+ */
+- _nc_set_type(_nc_first_name(entryp->tterm.term_names));
++ name = _nc_first_name(entryp->tterm.term_names);
++ if (!valid_entryname(name)) {
++ _nc_warning("invalid entry name \"%s\"", name);
++ name = "invalid";
++ }
++ _nc_set_type(name);
+
+ /* check for overly-long names and aliases */
+ for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
+@@ -283,13 +303,24 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
+ bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
+ bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
+ if (is_use || is_tc) {
++ if (!VALID_STRING(_nc_curr_token.tk_valstring)
++ || _nc_curr_token.tk_valstring[0] == '\0') {
++ _nc_warning("missing name for use-clause");
++ continue;
++ } else if (!valid_entryname(_nc_curr_token.tk_valstring)) {
++ _nc_warning("invalid name for use-clause \"%s\"",
++ _nc_curr_token.tk_valstring);
++ continue;
++ } else if (entryp->nuses >= MAX_USES) {
++ _nc_warning("too many use-clauses, ignored \"%s\"",
++ _nc_curr_token.tk_valstring);
++ continue;
++ }
+ entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
+ entryp->uses[entryp->nuses].line = _nc_curr_line;
+- if (VALID_STRING(entryp->uses[entryp->nuses].name)) {
+- entryp->nuses++;
+- if (entryp->nuses > 1 && is_tc) {
+- BAD_TC_USAGE
+- }
++ entryp->nuses++;
++ if (entryp->nuses > 1 && is_tc) {
++ BAD_TC_USAGE
+ }
+ } else {
+ /* normal token lookup */
+@@ -641,13 +672,6 @@ static const char C_BS[] = "\b";
+ static const char C_HT[] = "\t";
+
+ /*
+- * Note that WANTED and PRESENT are not simple inverses! If a capability
+- * has been explicitly cancelled, it's not considered WANTED.
+- */
+-#define WANTED(s) ((s) == ABSENT_STRING)
+-#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
+-
+-/*
+ * This bit of legerdemain turns all the terminfo variable names into
+ * references to locations in the arrays Booleans, Numbers, and Strings ---
+ * precisely what's needed.
+@@ -672,10 +696,10 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
+
+ /* if there was a tc entry, assume we picked up defaults via that */
+ if (!has_base) {
+- if (WANTED(init_3string) && termcap_init2)
++ if (WANTED(init_3string) && PRESENT(termcap_init2))
+ init_3string = _nc_save_str(termcap_init2);
+
+- if (WANTED(reset_2string) && termcap_reset)
++ if (WANTED(reset_2string) && PRESENT(termcap_reset))
+ reset_2string = _nc_save_str(termcap_reset);
+
+ if (WANTED(carriage_return)) {
+@@ -790,7 +814,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
+ if (init_tabs != 8 && init_tabs != ABSENT_NUMERIC)
+ _nc_warning("hardware tabs with a width other than 8: %d", init_tabs);
+ else {
+- if (tab && _nc_capcmp(tab, C_HT))
++ if (PRESENT(tab) && _nc_capcmp(tab, C_HT))
+ _nc_warning("hardware tabs with a non-^I tab string %s",
+ _nc_visbuf(tab));
+ else {
+@@ -867,17 +891,22 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
+ * The magic moment -- copy the mapped key string over,
+ * stripping out padding.
+ */
+- for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
+- if (bp[0] == '$' && bp[1] == '<') {
+- while (*bp && *bp != '>') {
+- ++bp;
+- }
+- } else
+- *dp++ = *bp;
+- }
+- *dp = '\0';
++ bp = tp->Strings[from_ptr->nte_index];
++ if (VALID_STRING(bp)) {
++ for (dp = buf2; *bp; bp++) {
++ if (bp[0] == '$' && bp[1] == '<') {
++ while (*bp && *bp != '>') {
++ ++bp;
++ }
++ } else
++ *dp++ = *bp;
++ }
++ *dp = '\0';
+
+- tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
++ tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
++ } else {
++ tp->Strings[to_ptr->nte_index] = bp;
++ }
+ }
+
+ /*
+@@ -886,7 +915,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
+ * got mapped to kich1 and im to kIC to avoid a collision.
+ * If the description has im but not ic, hack kIC back to kich1.
+ */
+- if (foundim && WANTED(key_ic) && key_sic) {
++ if (foundim && WANTED(key_ic) && PRESENT(key_sic)) {
+ key_ic = key_sic;
+ key_sic = ABSENT_STRING;
+ }
+@@ -938,9 +967,9 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
+ acs_chars = _nc_save_str(buf2);
+ _nc_warning("acsc string synthesized from XENIX capabilities");
+ }
+- } else if (acs_chars == 0
+- && enter_alt_charset_mode != 0
+- && exit_alt_charset_mode != 0) {
++ } else if (acs_chars == ABSENT_STRING
++ && PRESENT(enter_alt_charset_mode)
++ && PRESENT(exit_alt_charset_mode)) {
+ acs_chars = _nc_save_str(VT_ACSC);
+ }
+ }
+diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c
+index 393d8e7..10ec6c8 100644
+--- a/ncurses/tinfo/strings.c
++++ b/ncurses/tinfo/strings.c
+@@ -1,5 +1,5 @@
+ /****************************************************************************
+- * Copyright (c) 2000-2007,2012 Free Software Foundation, Inc. *
++ * Copyright (c) 2000-2012,2017 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+@@ -35,8 +35,9 @@
+ **/
+
+ #include <curses.priv.h>
++#include <tic.h>
+
+-MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $")
++MODULE_ID("$Id: strings.c,v 1.9 2017/08/26 13:16:11 tom Exp $")
+
+ /****************************************************************************
+ * Useful string functions (especially for mvcur)
+@@ -105,7 +106,7 @@ _nc_str_copy(string_desc * dst, string_desc * src)
+ NCURSES_EXPORT(bool)
+ _nc_safe_strcat(string_desc * dst, const char *src)
+ {
+- if (src != 0) {
++ if (PRESENT(src)) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+@@ -126,7 +127,7 @@ _nc_safe_strcat(string_desc * dst, const char *src)
+ NCURSES_EXPORT(bool)
+ _nc_safe_strcpy(string_desc * dst, const char *src)
+ {
+- if (src != 0) {
++ if (PRESENT(src)) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c
+index 4cbcb65..4d92d15 100644
+--- a/ncurses/tinfo/trim_sgr0.c
++++ b/ncurses/tinfo/trim_sgr0.c
+@@ -36,7 +36,7 @@
+
+ #include <tic.h>
+
+-MODULE_ID("$Id: trim_sgr0.c,v 1.16 2017/04/05 22:33:07 tom Exp $")
++MODULE_ID("$Id: trim_sgr0.c,v 1.17 2017/08/26 14:54:16 tom Exp $")
+
+ #undef CUR
+ #define CUR tp->
+@@ -263,7 +263,7 @@ _nc_trim_sgr0(TERMTYPE2 *tp)
+ /*
+ * If rmacs is a substring of sgr(0), remove that chunk.
+ */
+- if (exit_alt_charset_mode != 0) {
++ if (PRESENT(exit_alt_charset_mode)) {
+ TR(TRACE_DATABASE, ("scan for rmacs %s", _nc_visbuf(exit_alt_charset_mode)));
+ j = strlen(off);
+ k = strlen(exit_alt_charset_mode);
+diff --git a/progs/tic.c b/progs/tic.c
+index c5d78e5..6dd4678 100644
+--- a/progs/tic.c
++++ b/progs/tic.c
+@@ -48,7 +48,7 @@
+ #include <parametrized.h>
+ #include <transform.h>
+
+-MODULE_ID("$Id: tic.c,v 1.233 2017/07/15 17:40:19 tom Exp $")
++MODULE_ID("$Id: tic.c,v 1.243 2017/08/26 20:56:55 tom Exp $")
+
+ #define STDIN_NAME "<stdin>"
+
+@@ -62,6 +62,10 @@ static bool showsummary = FALSE;
+ static char **namelst = 0;
+ static const char *to_remove;
+
++#if NCURSES_XNAMES
++static bool using_extensions = FALSE;
++#endif
++
+ static void (*save_check_termtype) (TERMTYPE2 *, bool);
+ static void check_termtype(TERMTYPE2 *tt, bool);
+
+@@ -850,6 +854,7 @@ main(int argc, char *argv[])
+ /* FALLTHRU */
+ case 'x':
+ use_extended_names(TRUE);
++ using_extensions = TRUE;
+ break;
+ #endif
+ default:
+@@ -2405,10 +2410,17 @@ check_conflict(TERMTYPE2 *tp)
+ const char *a = given[j].value;
+ bool first = TRUE;
+
++ if (!VALID_STRING(a))
++ continue;
++
+ for (k = j + 1; given[k].keycode; k++) {
+ const char *b = given[k].value;
++
++ if (!VALID_STRING(b))
++ continue;
+ if (check[k])
+ continue;
++
+ if (!_nc_capcmp(a, b)) {
+ check[j] = 1;
+ check[k] = 1;
+@@ -2431,6 +2443,67 @@ check_conflict(TERMTYPE2 *tp)
+ if (!first)
+ fprintf(stderr, "\n");
+ }
++#if NCURSES_XNAMES
++ if (using_extensions) {
++ /* *INDENT-OFF* */
++ static struct {
++ const char *xcurses;
++ const char *shifted;
++ } table[] = {
++ { "kDC", NULL },
++ { "kDN", "kind" },
++ { "kEND", NULL },
++ { "kHOM", NULL },
++ { "kLFT", NULL },
++ { "kNXT", NULL },
++ { "kPRV", NULL },
++ { "kRIT", NULL },
++ { "kUP", "kri" },
++ { NULL, NULL },
++ };
++ /* *INDENT-ON* */
++
++ /*
++ * SVr4 curses defines the "xcurses" names listed above except for
++ * the special cases in the "shifted" column. When using these
++ * names for xterm's extensions, that was confusing, and resulted
++ * in adding extended capabilities with "2" (shift) suffix. This
++ * check warns about unnecessary use of extensions for this quirk.
++ */
++ for (j = 0; given[j].keycode; ++j) {
++ const char *find = given[j].name;
++ int value;
++ char ch;
++
++ if (!VALID_STRING(given[j].value))
++ continue;
++
++ for (k = 0; table[k].xcurses; ++k) {
++ const char *test = table[k].xcurses;
++ size_t size = strlen(test);
++
++ if (!strncmp(find, test, size) && strcmp(find, test)) {
++ switch (sscanf(find + size, "%d%c", &value, &ch)) {
++ case 1:
++ if (value == 2) {
++ _nc_warning("expected '%s' rather than '%s'",
++ (table[k].shifted
++ ? table[k].shifted
++ : test), find);
++ } else if (value < 2 || value > 15) {
++ _nc_warning("expected numeric 2..15 '%s'", find);
++ }
++ break;
++ default:
++ _nc_warning("expected numeric suffix for '%s'", find);
++ break;
++ }
++ break;
++ }
++ }
++ }
++ }
++#endif
+ free(given);
+ free(check);
+ }
+--
+2.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
deleted file mode 100644
index e9447c5b8..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-configure has a piece of logic to detect users "abusing" CC to hold compiler
-flags (which we do). It also has logic to "correct" this by moving the flags
-from CC to CFLAGS, but the sed only handles a single argument in CC.
-
-Replace the sed with awk to filter out all words that start with a hyphen.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure b/configure
-index 7f31208..1a29cfc 100755
---- a/configure
-+++ b/configure
-@@ -2191,2 +2191,2 @@ echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/C
-- cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
-- CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
-+ cf_flags=`echo "$CC" | awk 'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
-+ CC=`echo "$CC " | awk 'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
deleted file mode 100644
index ace310800..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ncurses.inc
-
-SRC_URI += "file://tic-hang.patch \
- file://fix-cflags-mangle.patch \
- file://config.cache \
- file://configure-reproducible.patch \
-"
-# commit id corresponds to the revision in package version
-SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
-S = "${WORKDIR}/git"
-EXTRA_OECONF += "--with-abi-version=5"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
new file mode 100644
index 000000000..d1da5d16e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
@@ -0,0 +1,12 @@
+require ncurses.inc
+
+SRC_URI += "file://0001-tic-hang.patch \
+ file://0002-configure-reproducible.patch \
+ file://config.cache \
+ file://CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "52681a6a1a18b4d6eb1a716512d0dd827bd71c87"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf-shell-image.bb b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf-shell-image.bb
index 029547b94..0d2b8bf52 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf-shell-image.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf-shell-image.bb
@@ -1,10 +1,13 @@
DESCRIPTION = "boot image with UEFI shell and tools"
# For this image recipe, only the wic format with a
-# single vfat partition makes sense.
+# single vfat partition makes sense. Because we have no
+# boot loader and no rootfs partition, not additional
+# tools are needed for this .wks file.
IMAGE_FSTYPES_forcevariable = 'wic'
-
WKS_FILE = "ovmf/ovmf-shell-image.wks"
+WKS_FILE_DEPENDS = ""
+
inherit image
# We want a minimal image with just ovmf-shell-efi unpacked in it. We
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
deleted file mode 100644
index fcd7a4690..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 73692710d50da1f421b0e6ddff784ca3135389b3 Mon Sep 17 00:00:00 2001
-From: Dandan Bi <dandan.bi@intel.com>
-Date: Sat, 1 Apr 2017 10:31:14 +0800
-Subject: [PATCH] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression
-
-Fix the incorrect comparison between pointer and constant zero character.
-
-https://bugzilla.tianocore.org/show_bug.cgi?id=416
-
-V2: The pointer StringPtr points to a string returned
-by ExtractConfig/ExportConfig, if it is NULL, function
-InternalHiiIfrValueAction will return FALSE. So in
-current usage model, the StringPtr can not be NULL before
-using it, so we can add ASSERT here.
-
-Cc: Eric Dong <eric.dong@intel.com>
-Cc: Liming Gao <liming.gao@intel.com>
-Contributed-under: TianoCore Contribution Agreement 1.0
-Signed-off-by: Dandan Bi <dandan.bi@intel.com>
-Reviewed-by: Eric Dong <eric.dong@intel.com>
----
-Upstream-Status: Backport
-
- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-Index: git/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-===================================================================
---- git.orig/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-+++ git/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-@@ -2180,6 +2180,8 @@ InternalHiiIfrValueAction (
- }
-
- StringPtr = ConfigAltResp;
-+
-+ ASSERT (StringPtr != NULL);
-
- while (StringPtr != L'\0') {
- //
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch
new file mode 100644
index 000000000..5bb418b95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch
@@ -0,0 +1,46 @@
+From f65e9cc025278387b494c2383c5d9ff3bed98687 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 11 Jun 2017 00:47:24 -0700
+Subject: [PATCH] ia32: Dont use -pie
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ BaseTools/Conf/tools_def.template | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/BaseTools/Conf/tools_def.template
+===================================================================
+--- git.orig/BaseTools/Conf/tools_def.template
++++ git/BaseTools/Conf/tools_def.template
+@@ -4336,7 +4336,7 @@ RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG =
+ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
+
+ 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_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
++DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe -fno-PIE -no-pie
+ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
+ 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
+@@ -4369,9 +4369,9 @@ DEFINE GCC_ARM_RC_FLAGS = -I
+ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+
+ DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+-DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables
++DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
+ DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
+-DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
++DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie
+ DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
+ DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ DEFINE GCC44_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
+@@ -4451,7 +4451,7 @@ DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = D
+
+ DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS)
+ DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
+-DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
++DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 -no-pie
+ DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
+ DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ DEFINE GCC49_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
index 94029a562..94ae5d449 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
@@ -10,6 +10,7 @@ tools. The BBAKE_EDK_TOOLS_PATH string is used as a pattern to be replaced
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(-)
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
index 0fdc278ce..65b5c16dc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
@@ -7,33 +7,33 @@ 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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
-index 821d114..fe0f08b 100644
---- a/BaseTools/Source/C/Makefiles/header.makefile
-+++ b/BaseTools/Source/C/Makefiles/header.makefile
-@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
+Index: git/BaseTools/Source/C/Makefiles/header.makefile
+===================================================================
+--- git.orig/BaseTools/Source/C/Makefiles/header.makefile
++++ git/BaseTools/Source/C/Makefiles/header.makefile
+@@ -44,15 +44,15 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AA
endif
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
-BUILD_CPPFLAGS = $(INCLUDE) -O2
-+BUILD_CPPFLAGS := $(BUILD_CPPFLAGS) $(INCLUDE) -O2
++BUILD_CPPFLAGS += $(INCLUDE) -O2
ifeq ($(DARWIN),Darwin)
# assume clang or clang compatible flags on OS X
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
else
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
endif
-BUILD_LFLAGS =
-+BUILD_LFLAGS := $(LDFLAGS)
- BUILD_CXXFLAGS =
+-BUILD_CXXFLAGS = -Wno-unused-result
++BUILD_LFLAGS = $(LDFLAGS)
++BUILD_CXXFLAGS += -Wno-unused-result
ifeq ($(ARCH), IA32)
---
-2.9.3
-
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch
new file mode 100644
index 000000000..d954fbe31
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/0004-ovmf-enable-long-path-file.patch
@@ -0,0 +1,18 @@
+From 032fc6b1f7691bd537fd2a6bd13821fcf3c45e64 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Mon, 11 Sep 2017 02:21:55 -0400
+Subject: [PATCH] ovmf: enable long path file
+
+Upstream-Status: Pending
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ BaseTools/Source/C/Common/CommonLib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
+index 2041b89e2d..8116aa2e35 100644
+--- a/BaseTools/Source/C/Common/CommonLib.h
++++ b/BaseTools/Source/C/Common/CommonLib.h
+@@ -22 +22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+-#define MAX_LONG_FILE_PATH 500
++#define MAX_LONG_FILE_PATH 1023
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
new file mode 100644
index 000000000..959b1c649
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
@@ -0,0 +1,20 @@
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Description: pass -fno-stack-protector to all GCC toolchains
+ The upstream build rules inexplicably pass -fno-stack-protector only
+ when building for i386 and amd64. Add this essential argument to the
+ generic rules for gcc 4.4 and later.
+Last-Updated: 2016-04-12
+Upstream-Status: Pending
+Index: git/BaseTools/Conf/tools_def.template
+===================================================================
+--- git.orig/BaseTools/Conf/tools_def.template
++++ git/BaseTools/Conf/tools_def.template
+@@ -4368,7 +4368,7 @@ DEFINE GCC_IPF_RC_FLAGS = -I
+ DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
+ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+
+-DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
++DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+ DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
+ DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
+ DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
index 9d988e9d4..fa0d66291 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
@@ -1,5 +1,7 @@
-DESCRIPTION = "OVMF - UEFI firmware for Qemu and KVM"
-HOMEPAGE = "http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF"
+SUMMARY = "OVMF - UEFI firmware for Qemu and KVM"
+DESCRIPTION = "OVMF is an EDK II based project to enable UEFI support for \
+Virtual Machines. OVMF contains sample UEFI firmware for QEMU and KVM"
+HOMEPAGE = "https://github.com/tianocore/tianocore.github.io/wiki/OVMF"
LICENSE = "BSD"
LICENSE_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'BSD & OpenSSL', 'BSD', d)}"
LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=343dc88e82ff33d042074f62050c3496"
@@ -11,20 +13,25 @@ PACKAGECONFIG ??= ""
PACKAGECONFIG[secureboot] = ",,,"
SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
+ file://0001-ia32-Dont-use-pie.patch \
file://0002-ovmf-update-path-to-native-BaseTools.patch \
file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
+ file://0004-ovmf-enable-long-path-file.patch \
file://VfrCompile-increase-path-length-limit.patch \
- file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \
+ file://no-stack-protector-all-archs.patch \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+OPENSSL_RELEASE = "openssl-1.1.0e"
SRC_URI_append_class-target = " \
- ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'http://www.openssl.org/source/openssl-1.0.2j.tar.gz;name=openssl;subdir=${S}/CryptoPkg/Library/OpensslLib', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'http://www.openssl.org/source/${OPENSSL_RELEASE}.tar.gz;name=openssl;subdir=${S}/CryptoPkg/Library/OpensslLib', '', d)} \
file://0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch \
"
-SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
-SRC_URI[openssl.md5sum] = "96322138f0b69e61b7212bc53d5e912b"
-SRC_URI[openssl.sha256sum] = "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
+SRCREV="ec4910cd3336565fdb61dafdd9ec4ae7a6160ba3"
+SRC_URI[openssl.md5sum] = "51c42d152122e474754aea96f66928c6"
+SRC_URI[openssl.sha256sum] = "57be8618979d80c910728cfc99369bf97b2a1abd8f366ab6ebdee8975ad3874c"
inherit deploy
@@ -144,7 +151,7 @@ do_compile_class-native() {
do_compile_class-target() {
export LFLAGS="${LDFLAGS}"
- PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n')}"
+ PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n ')}"
OVMF_ARCH="X64"
if [ "${TARGET_ARCH}" != "x86_64" ] ; then
OVMF_ARCH="IA32"
@@ -186,10 +193,7 @@ do_compile_class-target() {
# building with Secure Boot enabled.
bbnote "Building with Secure Boot."
rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
- if ! [ -f ${S}/CryptoPkg/Library/OpensslLib/openssl-*/edk2-patch-applied ]; then
- ( cd ${S}/CryptoPkg/Library/OpensslLib/openssl-* && patch -p1 <$(echo ../EDKII_openssl-*.patch) && touch edk2-patch-applied )
- fi
- ( cd ${S}/CryptoPkg/Library/OpensslLib/ && ./Install.sh )
+ ln -sf ${OPENSSL_RELEASE} ${S}/CryptoPkg/Library/OpensslLib/openssl
${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS}
ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd
ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd
@@ -241,3 +245,4 @@ do_deploy_class-target() {
addtask do_deploy after do_compile before do_build
BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 2ca639294..aee4a0371 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -4,7 +4,6 @@
SUMMARY = "Host packages for the standalone SDK or external toolchain"
PR = "r12"
-LICENSE = "MIT"
inherit packagegroup nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
index 0069e3e0f..f9e6e2edd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -204,7 +204,7 @@ RRECOMMENDS_packagegroup-base-pcmcia = "\
SUMMARY_packagegroup-base-bluetooth = "Bluetooth support"
RDEPENDS_packagegroup-base-bluetooth = "\
${BLUEZ} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'libasound-module-bluez', '',d)} \
+ ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', bb.utils.contains('BLUEZ', 'bluez4', 'libasound-module-bluez', '', d), '',d)} \
"
RRECOMMENDS_packagegroup-base-bluetooth = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 7d6d41473..af0ce2013 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -33,7 +33,6 @@ SANITIZERS_nios2 = ""
SANITIZERS_powerpc64 = ""
SANITIZERS_sparc = ""
SANITIZERS_libc-musl = ""
-SANITIZERS_libc-uclibc = ""
RRECOMMENDS_packagegroup-core-sdk = "\
libgomp \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index 946c947c8..a8e47da40 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -31,23 +31,15 @@ PROFILETOOLS = "\
PERF = "perf"
PERF_libc-musl = ""
-# systemtap needs elfutils which is not fully buildable on uclibc
-# hence we exclude it from uclibc based builds
+# systemtap needs elfutils which is not fully buildable on some arches/libcs
SYSTEMTAP = "systemtap"
-SYSTEMTAP_libc-uclibc = ""
SYSTEMTAP_libc-musl = ""
SYSTEMTAP_mipsarch = ""
SYSTEMTAP_nios2 = ""
SYSTEMTAP_aarch64 = ""
-# lttng-ust uses sched_getcpu() which is not there on uclibc
-# for some of the architectures it can be patched to call the
-# syscall directly but for x86_64 __NR_getcpu is a vsyscall
-# which means we can not use syscall() to call it. So we ignore
-# it for x86_64/uclibc
-
+# lttng-ust uses sched_getcpu() which is not there on for some platforms.
LTTNGUST = "lttng-ust"
-LTTNGUST_libc-uclibc = ""
LTTNGUST_libc-musl = ""
LTTNGTOOLS = "lttng-tools"
@@ -60,13 +52,13 @@ BABELTRACE = "babeltrace"
# valgrind does not work on the following configurations/architectures
VALGRIND = "valgrind"
-VALGRIND_libc-uclibc = ""
VALGRIND_libc-musl = ""
VALGRIND_mipsarch = ""
VALGRIND_nios2 = ""
VALGRIND_armv4 = ""
VALGRIND_armv5 = ""
VALGRIND_armv6 = ""
+VALGRIND_armeb = ""
VALGRIND_aarch64 = ""
VALGRIND_linux-gnux32 = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb
new file mode 100644
index 000000000..3daace1a4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-cross-canadian.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Host SDK package for Go cross canadian toolchain"
+PN = "packagegroup-go-cross-canadian-${MACHINE}"
+
+inherit cross-canadian packagegroup
+
+PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
+
+GO = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+
+RDEPENDS_${PN} = " \
+ ${@all_multilib_tune_values(d, 'GO')} \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
new file mode 100644
index 000000000..3e190770a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
@@ -0,0 +1,8 @@
+SUMMARY = "Target packages for the Go SDK"
+
+inherit packagegroup goarch
+
+RDEPENDS_${PN} = " \
+ go-runtime \
+ go-runtime-dev \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index c1bbdfcf3..ff42866e3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -42,7 +42,6 @@ RDEPENDS_packagegroup-self-hosted-host-tools = "\
mc-fish \
mc-helpers \
mc-helpers-perl \
- mc-helpers-python \
parted \
${PSEUDO} \
screen \
@@ -141,17 +140,19 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
nfs-utils \
nfs-utils-client \
openssl \
+ openssh-scp \
openssh-sftp-server \
+ openssh-ssh \
opkg \
opkg-utils \
patch \
perl \
perl-dev \
+ perl-misc \
perl-modules \
perl-pod \
python \
python-modules \
- python-git \
python3 \
python3-modules \
python3-git \
diff --git a/import-layers/yocto-poky/meta/recipes-core/psplash/files/psplash-init b/import-layers/yocto-poky/meta/recipes-core/psplash/files/psplash-init
index 66c85e933..0bce1de53 100755
--- a/import-layers/yocto-poky/meta/recipes-core/psplash/files/psplash-init
+++ b/import-layers/yocto-poky/meta/recipes-core/psplash/files/psplash-init
@@ -7,6 +7,12 @@
# Default-Stop:
### END INIT INFO
+if [ ! -e /dev/fb0 ]; then
+ echo "Framebuffer /dev/fb0 not detected"
+ echo "Boot splashscreen disabled"
+ exit 0;
+fi
+
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
diff --git a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
index 44297e1a6..3b7f818fc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
@@ -5,13 +5,14 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
-SRCREV = "88343ad23c90fa1dd8d79ac0d784a691aa0c6d2b"
+SRCREV = "2015f7073e98dd9562db0936a254af5ef56356cf"
PV = "0.1+git${SRCPV}"
PR = "r15"
SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
${SPLASH_IMAGES}"
+UPSTREAM_VERSION_UNKNOWN = "1"
SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
diff --git a/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc b/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
index 1a0a1558d..e9665228d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
@@ -4,6 +4,7 @@ command lines as they are typed in. Both Emacs and vi editing modes are availabl
additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
lines, and perform csh-like history expansion on previous commands."
SECTION = "libs"
+HOMEPAGE = "https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
# GPLv2+ (< 6.0), GPLv3+ (>= 6.0)
LICENSE = "GPLv3+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
new file mode 100644
index 000000000..7b18b25e3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
@@ -0,0 +1,43 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+
+SRC_URI += "file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
+
+inherit autotools pkgconfig gettext
+inherit deploy
+
+EFI_CC ?= "${CC}"
+# Man pages are packaged through the main systemd recipe
+EXTRA_OECONF = " --enable-gnuefi \
+ --with-efi-includedir=${STAGING_INCDIR} \
+ --with-efi-ldsdir=${STAGING_LIBDIR} \
+ --with-efi-libdir=${STAGING_LIBDIR} \
+ --disable-manpages \
+ EFI_CC='${EFI_CC}' \
+ "
+
+# Imported from the old gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_linux-gnux32 = "null"
+
+do_compile() {
+ SYSTEMD_BOOT_EFI_ARCH="ia32"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ SYSTEMD_BOOT_EFI_ARCH="x64"
+ fi
+
+ oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
+}
+
+do_install() {
+ # Bypass systemd installation with a NOP
+ :
+}
+
+do_deploy () {
+ install ${B}/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
index fe9a521d7..d228a51c1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -1,5 +1,5 @@
SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
-
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
LICENSE = "MIT"
PR = "r29"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
new file mode 100644
index 000000000..02756f43d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Machine specific systemd units"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r19"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN} = ""
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
index 768b1308f..d9347163b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -1,4 +1,5 @@
SUMMARY = "Serial terminal support for systemd"
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/systemd/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
@@ -38,8 +39,6 @@ do_install() {
fi
}
-RDEPENDS_${PN} = "systemd"
-
# This is a machine specific file
FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -49,3 +48,5 @@ python () {
if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
}
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
index efad14ce1..6e5a1b718 100755
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -108,7 +108,7 @@ for service in $services; do
# If any new unit types are added to systemd they should be added
# to this regular expression.
- unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)\s*$'
+ unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|target\.wants\|path\|timer\|snapshot\)\s*$'
if [ "$action" = "preset" ]; then
action=`egrep -sh $service $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '`
if [ -z "$action" ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
index 29e0be6ae..d99d1506d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
@@ -14,10 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "a1e2ef7ec912902d8142e7cb5830cbfb47dba86c"
+SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395"
SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
S = "${WORKDIR}/git"
-
-LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
new file mode 100644
index 000000000..35599d44c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
@@ -0,0 +1,43 @@
+From 3ca5326485cb19e775af6de615c17be66e44e472 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 24 Oct 2017 23:08:24 -0700
+Subject: [PATCH] Define _PATH_WTMPX and _PATH_UTMPX if not defined
+
+Musl needs these defines
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/shared/utmp-wtmp.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
+index 9750dcd81..bd55d74a1 100644
+--- a/src/shared/utmp-wtmp.c
++++ b/src/shared/utmp-wtmp.c
+@@ -27,6 +27,7 @@
+ #include <sys/time.h>
+ #include <sys/utsname.h>
+ #include <unistd.h>
++#include <utmp.h>
+ #include <utmpx.h>
+
+ #include "alloc-util.h"
+@@ -41,6 +42,13 @@
+ #include "util.h"
+ #include "utmp-wtmp.h"
+
++#if defined _PATH_UTMP && !defined _PATH_UTMPX
++# define _PATH_UTMPX _PATH_UTMP
++#endif
++#if defined _PATH_WTMP && !defined _PATH_WTMPX
++# define _PATH_WTMPX _PATH_WTMP
++#endif
++
+ int utmp_get_runlevel(int *runlevel, int *previous) {
+ struct utmpx *found, lookup = { .ut_type = RUN_LVL };
+ int r;
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644
index 000000000..779dc78fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
@@ -0,0 +1,89 @@
+From b2d4171c6e521cf1e70331fb769234d63a4a6d44 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Oct 2017 13:00:41 -0700
+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
+uintmax_t.
+
+Fixes portablility errors like
+
+execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
+| fprintf(f, "%s%s: " RLIM_FMT "\n",
+| ^~~~~~~~
+| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+| ~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/7199]
+
+ src/basic/format-util.h | 8 --------
+ src/basic/rlimit-util.c | 8 ++++----
+ src/core/execute.c | 8 ++++----
+ 3 files changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/src/basic/format-util.h b/src/basic/format-util.h
+index ae42a8f89..144249cd6 100644
+--- a/src/basic/format-util.h
++++ b/src/basic/format-util.h
+@@ -60,14 +60,6 @@
+ # define PRI_TIMEX "li"
+ #endif
+
+-#if SIZEOF_RLIM_T == 8
+-# define RLIM_FMT "%" PRIu64
+-#elif SIZEOF_RLIM_T == 4
+-# define RLIM_FMT "%" PRIu32
+-#else
+-# error Unknown rlim_t size
+-#endif
+-
+ #if SIZEOF_DEV_T == 8
+ # define DEV_FMT "%" PRIu64
+ #elif SIZEOF_DEV_T == 4
+diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
+index ca834df62..41fcebb74 100644
+--- a/src/basic/rlimit-util.c
++++ b/src/basic/rlimit-util.c
+@@ -284,13 +284,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)
+- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
++ (void) asprintf(&s, "infinity:%ju", (uintmax_t)rl->rlim_max);
+ else if (rl->rlim_max >= RLIM_INFINITY)
+- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
++ (void) asprintf(&s, "%ju:infinity", (uintmax_t)rl->rlim_cur);
+ else if (rl->rlim_cur == rl->rlim_max)
+- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
++ (void) asprintf(&s, "%ju", (uintmax_t)rl->rlim_cur);
+ else
+- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
++ (void) asprintf(&s, "%ju:%ju", (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
+
+ if (!s)
+ return -ENOMEM;
+diff --git a/src/core/execute.c b/src/core/execute.c
+index d72e5bf08..d38946002 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -3443,10 +3443,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
+
+ for (i = 0; i < RLIM_NLIMITS; i++)
+ if (c->rlimit[i]) {
+- fprintf(f, "%s%s: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+- fprintf(f, "%s%sSoft: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
++ fprintf(f, "%s%s: %ju\n",
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
++ fprintf(f, "%s%sSoft: %ju\n",
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
+ }
+
+ if (c->ioprio_set) {
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
new file mode 100644
index 000000000..e2f7458ab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
@@ -0,0 +1,433 @@
+From 0933ca6251808f856b92b0ce8da8696d5febc333 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 10:41:39 -0700
+Subject: [PATCH 01/12] add fallback parse_printf_format implementation
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 4 +
+ configure.ac | 2 +
+ 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 +-
+ 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/Makefile.am b/Makefile.am
+index 692d7bb95..3cc8f3451 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -997,6 +997,10 @@ libbasic_la_SOURCES = \
+ src/basic/journal-importer.h \
+ src/basic/journal-importer.c
+
++if !HAVE_PRINTF_H
++libbasic_la_SOURCES += src/basic/parse-printf-format.c
++endif
++
+ nodist_libbasic_la_SOURCES = \
+ src/basic/errno-from-name.h \
+ src/basic/errno-to-name.h \
+diff --git a/configure.ac b/configure.ac
+index 60e7df5ee..efcdc6c16 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -308,8 +308,10 @@ AC_CHECK_HEADERS([uchar.h], [], [])
+ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
+ AC_CHECK_HEADERS([linux/btrfs.h], [], [])
+ AC_CHECK_HEADERS([linux/memfd.h], [], [])
++AC_CHECK_HEADERS([printf.h], [], [])
+ AC_CHECK_HEADERS([linux/vm_sockets.h], [], [], [#include <sys/socket.h>])
+
++AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_printf_h" = xyes])
+ # unconditionally pull-in librt with old glibc versions
+ AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
+
+diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
+new file mode 100644
+index 000000000..49437e544
+--- /dev/null
++++ b/src/basic/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd 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.
++
++ systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
+new file mode 100644
+index 000000000..4371177b0
+--- /dev/null
++++ b/src/basic/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd 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.
++
++ systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#ifdef HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
+index bd1144b4c..c9c95eb54 100644
+--- a/src/basic/stdio-util.h
++++ b/src/basic/stdio-util.h
+@@ -19,12 +19,12 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+
+ #include "macro.h"
++#include "parse-printf-format.h"
+
+ #define xsprintf(buf, fmt, ...) \
+ assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
+diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
+index 440fba67c..0236c43c4 100644
+--- a/src/journal/journal-send.c
++++ b/src/journal/journal-send.c
+@@ -19,7 +19,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <printf.h>
+ #include <stddef.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+@@ -38,6 +37,7 @@
+ #include "stdio-util.h"
+ #include "string-util.h"
+ #include "util.h"
++#include "parse-printf-format.h"
+
+ #define SNDBUF_SIZE (8*1024*1024)
+
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
index ee2cd6c45..7f1bc447f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -1,7 +1,7 @@
-From a544d6d15f5c418084f322349aafe341128d5fca Mon Sep 17 00:00:00 2001
+From f1b5a6f717bda6f80a6b5e3e4d50b450f6cc7b09 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 01/19] core/device.c: Change the default device timeout to 240
+Subject: [PATCH 14/14] core/device.c: Change the default device timeout to 240
sec.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -11,23 +11,24 @@ Upstream-Status: Inappropriate [Specific case QEMU/AB]
Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/core/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/device.c b/src/core/device.c
-index c572a67..f90774e 100644
+index 77601c552..98bf49ba2 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
* indefinitely for plugged in devices, something which cannot
* happen for the other units since their operations time out
* anyway. */
-- u->job_timeout = u->manager->default_timeout_start_usec;
-+ u->job_timeout = (240 * USEC_PER_SEC);
+- u->job_running_timeout = u->manager->default_timeout_start_usec;
++ u->job_running_timeout = (240 * USEC_PER_SEC);
u->ignore_on_isolate = true;
}
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
new file mode 100644
index 000000000..df100e587
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
@@ -0,0 +1,69 @@
+From 28dd66ecfce743b1ea9046c7bb501e0fcaeff724 Mon Sep 17 00:00:00 2001
+From: Luca Bruno <luca.bruno@coreos.com>
+Date: Sun, 6 Aug 2017 13:24:24 +0000
+Subject: [PATCH] core: evaluate presets after generators have run (#6526)
+
+This commit moves the first-boot system preset-settings evaluation out
+of main and into the manager startup logic itself. Notably, it reverses
+the order between generators and presets evaluation, so that any changes
+performed by first-boot generators are taken into the account by presets
+logic.
+
+After this change, units created by a generator can be enabled as part
+of a preset.
+
+Upstream-Status: Backport
+
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ src/core/main.c | 12 ++----------
+ src/core/manager.c | 8 ++++++++
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index dfedc3d..11ac9cf 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1809,18 +1809,10 @@ int main(int argc, char *argv[]) {
+ if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
+ log_warning_errno(errno, "Failed to make us a subreaper: %m");
+
+- if (arg_system) {
++ if (arg_system)
++ /* Bump up RLIMIT_NOFILE for systemd itself */
+ (void) bump_rlimit_nofile(&saved_rlimit_nofile);
+
+- if (empty_etc) {
+- r = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
+- if (r < 0)
+- log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r, "Failed to populate /etc with preset unit settings, ignoring: %m");
+- else
+- log_info("Populated /etc with preset unit settings.");
+- }
+- }
+-
+ r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
+ if (r < 0) {
+ log_emergency_errno(r, "Failed to allocate manager object: %m");
+diff --git a/src/core/manager.c b/src/core/manager.c
+index 1aadb70..fb5e2b5 100644
+--- a/src/core/manager.c
++++ b/src/core/manager.c
+@@ -1328,6 +1328,14 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
+ if (r < 0)
+ return r;
+
++ if (m->first_boot && m->unit_file_scope == UNIT_FILE_SYSTEM) {
++ q = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
++ if (q < 0)
++ log_full_errno(q == -EEXIST ? LOG_NOTICE : LOG_WARNING, q, "Failed to populate /etc with preset unit settings, ignoring: %m");
++ else
++ log_info("Populated /etc with preset unit settings.");
++ }
++
+ lookup_paths_reduce(&m->lookup_paths);
+ manager_build_unit_path_cache(m);
+
+--
+2.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-load-fragment-refuse-units-with-errors-in-certa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-load-fragment-refuse-units-with-errors-in-certa.patch
deleted file mode 100644
index 80948b2ce..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-load-fragment-refuse-units-with-errors-in-certa.patch
+++ /dev/null
@@ -1,329 +0,0 @@
-If a user is created with a strictly-speaking invalid name such as '0day' and a
-unit created to run as that user, systemd rejects the username and runs the unit
-as root.
-
-CVE: CVE-2017-1000082
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From d8e1310e1ed7b6f122bc7eb8ba061fbd088783c0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Thu, 6 Jul 2017 13:28:19 -0400
-Subject: [PATCH] core/load-fragment: refuse units with errors in certain
- directives
-
-If an error is encountered in any of the Exec* lines, WorkingDirectory,
-SELinuxContext, ApparmorProfile, SmackProcessLabel, Service (in .socket
-units), User, or Group, refuse to load the unit. If the config stanza
-has support, ignore the failure if '-' is present.
-
-For those configuration directives, even if we started the unit, it's
-pretty likely that it'll do something unexpected (like write files
-in a wrong place, or with a wrong context, or run with wrong permissions,
-etc). It seems better to refuse to start the unit and have the admin
-clean up the configuration without giving the service a chance to mess
-up stuff.
-
-Note that all "security" options that restrict what the unit can do
-(Capabilities, AmbientCapabilities, Restrict*, SystemCallFilter, Limit*,
-PrivateDevices, Protect*, etc) are _not_ treated like this. Such options are
-only supplementary, and are not always available depending on the architecture
-and compilation options, so unit authors have to make sure that the service
-runs correctly without them anyway.
-
-Fixes #6237, #6277.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- src/core/load-fragment.c | 104 ++++++++++++++++++++++++++++------------------
- src/test/test-unit-file.c | 14 +++----
- 2 files changed, 70 insertions(+), 48 deletions(-)
-
-diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
-index cbc826809..2047974f4 100644
---- a/src/core/load-fragment.c
-+++ b/src/core/load-fragment.c
-@@ -630,20 +630,28 @@ int config_parse_exec(
-
- if (isempty(f)) {
- /* First word is either "-" or "@" with no command. */
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Empty path in command line, ignoring: \"%s\"", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Empty path in command line%s: \"%s\"",
-+ ignore ? ", ignoring" : "", rvalue);
-+ return ignore ? 0 : -ENOEXEC;
- }
- if (!string_is_safe(f)) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path contains special characters, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Executable path contains special characters%s: %s",
-+ ignore ? ", ignoring" : "", rvalue);
-+ return ignore ? 0 : -ENOEXEC;
- }
- if (!path_is_absolute(f)) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path is not absolute, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Executable path is not absolute%s: %s",
-+ ignore ? ", ignoring" : "", rvalue);
-+ return ignore ? 0 : -ENOEXEC;
- }
- if (endswith(f, "/")) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path specifies a directory, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Executable path specifies a directory%s: %s",
-+ ignore ? ", ignoring" : "", rvalue);
-+ return ignore ? 0 : -ENOEXEC;
- }
-
- if (f == firstword) {
-@@ -699,7 +707,7 @@ int config_parse_exec(
- if (r == 0)
- break;
- else if (r < 0)
-- return 0;
-+ return ignore ? 0 : -ENOEXEC;
-
- if (!GREEDY_REALLOC(n, nbufsize, nlen + 2))
- return log_oom();
-@@ -709,8 +717,10 @@ int config_parse_exec(
- }
-
- if (!n || !n[0]) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Empty executable name or zeroeth argument, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Empty executable name or zeroeth argument%s: %s",
-+ ignore ? ", ignoring" : "", rvalue);
-+ return ignore ? 0 : -ENOEXEC;
- }
-
- nce = new0(ExecCommand, 1);
-@@ -1315,8 +1325,10 @@ int config_parse_exec_selinux_context(
-
- r = unit_name_printf(u, rvalue, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r,
-+ "Failed to resolve specifiers%s: %m",
-+ ignore ? ", ignoring" : "");
-+ return ignore ? 0 : -ENOEXEC;
- }
-
- free(c->selinux_context);
-@@ -1363,8 +1375,10 @@ int config_parse_exec_apparmor_profile(
-
- r = unit_name_printf(u, rvalue, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r,
-+ "Failed to resolve specifiers%s: %m",
-+ ignore ? ", ignoring" : "");
-+ return ignore ? 0 : -ENOEXEC;
- }
-
- free(c->apparmor_profile);
-@@ -1411,8 +1425,10 @@ int config_parse_exec_smack_process_label(
-
- r = unit_name_printf(u, rvalue, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r,
-+ "Failed to resolve specifiers%s: %m",
-+ ignore ? ", ignoring" : "");
-+ return ignore ? 0 : -ENOEXEC;
- }
-
- free(c->smack_process_label);
-@@ -1630,19 +1646,19 @@ int config_parse_socket_service(
-
- r = unit_name_printf(UNIT(s), rvalue, &p);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers: %s", rvalue);
-+ return -ENOEXEC;
- }
-
- if (!endswith(p, ".service")) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Unit must be of type service, ignoring: %s", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0, "Unit must be of type service: %s", rvalue);
-+ return -ENOEXEC;
- }
-
- r = manager_load_unit(UNIT(s)->manager, p, NULL, &error, &x);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s: %s", rvalue, bus_error_message(&error, r));
-+ return -ENOEXEC;
- }
-
- unit_ref_set(&s->service, x);
-@@ -1893,13 +1909,13 @@ int config_parse_user_group(
-
- r = unit_full_printf(u, rvalue, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s, ignoring: %m", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s: %m", rvalue);
-+ return -ENOEXEC;
- }
-
- if (!valid_user_group_name_or_id(k)) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID, ignoring: %s", k);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID: %s", k);
-+ return -ENOEXEC;
- }
-
- n = k;
-@@ -1957,19 +1973,19 @@ int config_parse_user_group_strv(
- if (r == -ENOMEM)
- return log_oom();
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
-- break;
-+ log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax: %s", rvalue);
-+ return -ENOEXEC;
- }
-
- r = unit_full_printf(u, word, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s, ignoring: %m", word);
-- continue;
-+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s: %m", word);
-+ return -ENOEXEC;
- }
-
- if (!valid_user_group_name_or_id(k)) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID, ignoring: %s", k);
-- continue;
-+ log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID: %s", k);
-+ return -ENOEXEC;
- }
-
- r = strv_push(users, k);
-@@ -2128,25 +2144,28 @@ int config_parse_working_directory(
-
- r = unit_full_printf(u, rvalue, &k);
- if (r < 0) {
-- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in working directory path '%s', ignoring: %m", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, r,
-+ "Failed to resolve unit specifiers in working directory path '%s'%s: %m",
-+ rvalue, missing_ok ? ", ignoring" : "");
-+ return missing_ok ? 0 : -ENOEXEC;
- }
-
- path_kill_slashes(k);
-
- if (!utf8_is_valid(k)) {
- log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue);
-- return 0;
-+ return missing_ok ? 0 : -ENOEXEC;
- }
-
- if (!path_is_absolute(k)) {
-- log_syntax(unit, LOG_ERR, filename, line, 0, "Working directory path '%s' is not absolute, ignoring.", rvalue);
-- return 0;
-+ log_syntax(unit, LOG_ERR, filename, line, 0,
-+ "Working directory path '%s' is not absolute%s.",
-+ rvalue, missing_ok ? ", ignoring" : "");
-+ return missing_ok ? 0 : -ENOEXEC;
- }
-
-- free_and_replace(c->working_directory, k);
--
- c->working_directory_home = false;
-+ free_and_replace(c->working_directory, k);
- }
-
- c->working_directory_missing_ok = missing_ok;
-@@ -4228,8 +4247,11 @@ int unit_load_fragment(Unit *u) {
- return r;
-
- r = load_from_path(u, k);
-- if (r < 0)
-+ if (r < 0) {
-+ if (r == -ENOEXEC)
-+ log_unit_notice(u, "Unit configuration has fatal error, unit will not be started.");
- return r;
-+ }
-
- if (u->load_state == UNIT_STUB) {
- SET_FOREACH(t, u->names, i) {
-diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
-index 12f48bf43..fd797b587 100644
---- a/src/test/test-unit-file.c
-+++ b/src/test/test-unit-file.c
-@@ -146,7 +146,7 @@ static void test_config_parse_exec(void) {
- r = config_parse_exec(NULL, "fake", 4, "section", 1,
- "LValue", 0, "/RValue/ argv0 r1",
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
-
- log_info("/* honour_argv0 */");
-@@ -161,7 +161,7 @@ static void test_config_parse_exec(void) {
- r = config_parse_exec(NULL, "fake", 3, "section", 1,
- "LValue", 0, "@/RValue",
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
-
- log_info("/* no command, whitespace only, reset */");
-@@ -220,7 +220,7 @@ static void test_config_parse_exec(void) {
- "-@/RValue argv0 r1 ; ; "
- "/goo/goo boo",
- &c, u);
-- assert_se(r >= 0);
-+ assert_se(r == -ENOEXEC);
- c1 = c1->command_next;
- check_execcommand(c1, "/RValue", "argv0", "r1", NULL, true);
-
-@@ -374,7 +374,7 @@ static void test_config_parse_exec(void) {
- r = config_parse_exec(NULL, "fake", 4, "section", 1,
- "LValue", 0, path,
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
- }
-
-@@ -401,21 +401,21 @@ static void test_config_parse_exec(void) {
- r = config_parse_exec(NULL, "fake", 4, "section", 1,
- "LValue", 0, "/path\\",
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
-
- log_info("/* missing ending ' */");
- r = config_parse_exec(NULL, "fake", 4, "section", 1,
- "LValue", 0, "/path 'foo",
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
-
- log_info("/* missing ending ' with trailing backslash */");
- r = config_parse_exec(NULL, "fake", 4, "section", 1,
- "LValue", 0, "/path 'foo\\",
- &c, u);
-- assert_se(r == 0);
-+ assert_se(r == -ENOEXEC);
- assert_se(c1->command_next == NULL);
-
- log_info("/* invalid space between modifiers */");
---
-2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
new file mode 100644
index 000000000..a033b04b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
@@ -0,0 +1,163 @@
+From dea374e898a749a0474b72b2015cca9009b1432b Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Wed, 13 Sep 2017 10:31:40 +0200
+Subject: [PATCH] main: skip many initialization steps when running in --test
+ mode
+
+Most importantly, don't collect open socket activation fds when in
+--test mode. This specifically created a problem because we invoke
+pager_open() beforehand (which these days makes copies of the original
+stdout/stderr in order to be able to restore them when the pager goes
+away) and we might mistakenly the fd copies it creates as socket
+activation fds.
+
+Fixes: #6383
+
+Upstream-Status: Backport
+
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ src/core/main.c | 108 +++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 56 insertions(+), 52 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 11ac9cf..d1a53a5 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1679,20 +1679,22 @@ int main(int argc, char *argv[]) {
+ log_close();
+
+ /* Remember open file descriptors for later deserialization */
+- r = fdset_new_fill(&fds);
+- if (r < 0) {
+- log_emergency_errno(r, "Failed to allocate fd set: %m");
+- error_message = "Failed to allocate fd set";
+- goto finish;
+- } else
+- fdset_cloexec(fds, true);
++ if (arg_action == ACTION_RUN) {
++ r = fdset_new_fill(&fds);
++ if (r < 0) {
++ log_emergency_errno(r, "Failed to allocate fd set: %m");
++ error_message = "Failed to allocate fd set";
++ goto finish;
++ } else
++ fdset_cloexec(fds, true);
+
+- if (arg_serialization)
+- assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
++ if (arg_serialization)
++ assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
+
+- if (arg_system)
+- /* Become a session leader if we aren't one yet. */
+- setsid();
++ if (arg_system)
++ /* Become a session leader if we aren't one yet. */
++ setsid();
++ }
+
+ /* Move out of the way, so that we won't block unmounts */
+ assert_se(chdir("/") == 0);
+@@ -1762,56 +1764,58 @@ int main(int argc, char *argv[]) {
+ arg_action == ACTION_TEST ? " test" : "", getuid(), t);
+ }
+
+- if (arg_system && !skip_setup) {
+- if (arg_show_status > 0)
+- status_welcome();
++ if (arg_action == ACTION_RUN) {
++ if (arg_system && !skip_setup) {
++ if (arg_show_status > 0)
++ status_welcome();
+
+- hostname_setup();
+- machine_id_setup(NULL, arg_machine_id, NULL);
+- loopback_setup();
+- bump_unix_max_dgram_qlen();
++ hostname_setup();
++ machine_id_setup(NULL, arg_machine_id, NULL);
++ loopback_setup();
++ bump_unix_max_dgram_qlen();
+
+- test_usr();
+- }
++ test_usr();
++ }
+
+- if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
+- watchdog_set_timeout(&arg_runtime_watchdog);
++ if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
++ watchdog_set_timeout(&arg_runtime_watchdog);
+
+- if (arg_timer_slack_nsec != NSEC_INFINITY)
+- if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
+- log_error_errno(errno, "Failed to adjust timer slack: %m");
++ if (arg_timer_slack_nsec != NSEC_INFINITY)
++ if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
++ log_error_errno(errno, "Failed to adjust timer slack: %m");
+
+- if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
+- r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
+- if (r < 0) {
+- log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
+- error_message = "Failed to drop capability bounding set of usermode helpers";
+- goto finish;
+- }
+- r = capability_bounding_set_drop(arg_capability_bounding_set, true);
+- if (r < 0) {
+- log_emergency_errno(r, "Failed to drop capability bounding set: %m");
+- error_message = "Failed to drop capability bounding set";
+- goto finish;
++ if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
++ r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
++ if (r < 0) {
++ log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
++ error_message = "Failed to drop capability bounding set of usermode helpers";
++ goto finish;
++ }
++ r = capability_bounding_set_drop(arg_capability_bounding_set, true);
++ if (r < 0) {
++ log_emergency_errno(r, "Failed to drop capability bounding set: %m");
++ error_message = "Failed to drop capability bounding set";
++ goto finish;
++ }
+ }
+- }
+
+- if (arg_syscall_archs) {
+- r = enforce_syscall_archs(arg_syscall_archs);
+- if (r < 0) {
+- error_message = "Failed to set syscall architectures";
+- goto finish;
++ if (arg_syscall_archs) {
++ r = enforce_syscall_archs(arg_syscall_archs);
++ if (r < 0) {
++ error_message = "Failed to set syscall architectures";
++ goto finish;
++ }
+ }
+- }
+
+- if (!arg_system)
+- /* Become reaper of our children */
+- if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
+- log_warning_errno(errno, "Failed to make us a subreaper: %m");
++ if (!arg_system)
++ /* Become reaper of our children */
++ if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
++ log_warning_errno(errno, "Failed to make us a subreaper: %m");
+
+- if (arg_system)
+- /* Bump up RLIMIT_NOFILE for systemd itself */
+- (void) bump_rlimit_nofile(&saved_rlimit_nofile);
++ if (arg_system)
++ /* Bump up RLIMIT_NOFILE for systemd itself */
++ (void) bump_rlimit_nofile(&saved_rlimit_nofile);
++ }
+
+ r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
+ if (r < 0) {
+--
+2.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 000000000..94c136b0d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,104 @@
+From 585abd891a56409915314304101cac26b42c076b Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 10:45:46 -0700
+Subject: [PATCH 02/12] src/basic/missing.h: check for missing strndupa
+
+include missing.h for definition of strndupa
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 1 +
+ src/basic/missing.h | 11 +++++++++++
+ src/basic/mkdir.c | 1 +
+ src/basic/parse-util.c | 1 +
+ src/shared/pager.c | 1 +
+ src/shared/uid-range.c | 1 +
+ 6 files changed, 16 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index efcdc6c16..cd035a971 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -329,6 +329,7 @@ AC_CHECK_DECLS([
+ pivot_root,
+ name_to_handle_at,
+ setns,
++ strndupa,
+ renameat2,
+ kcmp,
+ keyctl,
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 04912bf52..8009888ad 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1104,6 +1104,17 @@ typedef int32_t key_serial_t;
+ #define KEYCTL_DESCRIBE 6
+ #endif
+
++#if !HAVE_DECL_STRNDUPA
++#define strndupa(s, n) \
++ ({ \
++ const char *__old = (s); \
++ size_t __len = strnlen(__old, (n)); \
++ char *__new = (char *)alloca(__len + 1); \
++ __new[__len] = '\0'; \
++ (char *)memcpy(__new, __old, __len); \
++ })
++#endif
++
+ #ifndef KEYCTL_READ
+ #define KEYCTL_READ 11
+ #endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index 6b1a98402..d1388df48 100644
+--- a/src/basic/mkdir.c
++++ b/src/basic/mkdir.c
+@@ -28,6 +28,7 @@
+ #include "path-util.h"
+ #include "stat-util.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) {
+ struct stat st;
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 4532f222c..7a30a0e06 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -30,6 +30,7 @@
+ #include "parse-util.h"
+ #include "process-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int parse_boolean(const char *v) {
+ assert(v);
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 4d7b02c63..854efc0c9 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -38,6 +38,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "terminal-util.h"
++#include "missing.h"
+
+ static pid_t pager_pid = 0;
+
+diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
+index b6ec47439..91ce9fb7f 100644
+--- a/src/shared/uid-range.c
++++ b/src/shared/uid-range.c
+@@ -24,6 +24,7 @@
+ #include "macro.h"
+ #include "uid-range.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
+ assert(range);
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
deleted file mode 100644
index 951a28d4f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8736d9b9bb492f60e8f3a1a7fb5a05ba3201d86b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:29:15 +0000
-Subject: [PATCH 02/19] units: Prefer getty to agetty in console setup systemd
- units
-
-Upstream-Status: Inappropriate [configuration specific]
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- units/getty@.service.m4 | 2 +-
- units/serial-getty@.service.m4 | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
-index 5b82c13..e729469 100644
---- a/units/getty@.service.m4
-+++ b/units/getty@.service.m4
-@@ -33,7 +33,7 @@ ConditionPathExists=/dev/tty0
-
- [Service]
- # the VT is cleared by TTYVTDisallocate
--ExecStart=-/sbin/agetty --noclear %I $TERM
-+ExecStart=-/sbin/getty -L %I $TERM
- Type=idle
- Restart=always
- RestartSec=0
-diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
-index 4522d0d..e6d499d 100644
---- a/units/serial-getty@.service.m4
-+++ b/units/serial-getty@.service.m4
-@@ -22,7 +22,7 @@ Before=getty.target
- IgnoreOnIsolate=yes
-
- [Service]
--ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
-+ExecStart=-/sbin/getty -L 115200 %I $TERM
- Type=idle
- Restart=always
- UtmpIdentifier=%I
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
deleted file mode 100644
index 37c6ac5d1..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b383c286f58184575216b2bf6f185ba2ad648956 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:25:45 -0800
-Subject: [PATCH 03/19] define exp10 if missing
-
-Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
-
-exp10 extension is not part of uClibc, so compute it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/basic/missing.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 4c013be..4a3fd9c 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1078,4 +1078,9 @@ typedef int32_t key_serial_t;
-
- #endif
-
-+#ifdef __UCLIBC__
-+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
-+#define exp10(x) (exp((x) * log(10)))
-+#endif /* __UCLIBC__ */
-+
- #include "missing_syscall.h"
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
new file mode 100644
index 000000000..9a2d2c8e0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -0,0 +1,157 @@
+From 5bbbc2a08a3b4283ec04af0e77e25fb205aa8b82 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 10:50:14 -0700
+Subject: [PATCH 03/12] 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.
+
+Dont use GNU GLOB extentions on non-glibc systems
+
+Conditionalize use of GLOB_ALTDIRFUNC
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/glob-util.c | 20 +++++++++++++++++---
+ src/test/test-glob-util.c | 17 +++++++++++++++--
+ src/tmpfiles/tmpfiles.c | 8 ++++++++
+ 3 files changed, 40 insertions(+), 5 deletions(-)
+
+diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
+index f611c42e4..ad6e2be8d 100644
+--- a/src/basic/glob-util.c
++++ b/src/basic/glob-util.c
+@@ -27,13 +27,18 @@
+ #include "macro.h"
+ #include "path-util.h"
+ #include "strv.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+
+ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ int k;
+
++#ifdef GLOB_ALTDIRFUNC
+ /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
+ assert(!(flags & GLOB_ALTDIRFUNC));
+-
+ if (!pglob->gl_closedir)
+ pglob->gl_closedir = (void (*)(void *)) closedir;
+ if (!pglob->gl_readdir)
+@@ -44,10 +49,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ pglob->gl_lstat = lstat;
+ if (!pglob->gl_stat)
+ pglob->gl_stat = stat;
+-
++#endif
+ errno = 0;
++#ifdef GLOB_ALTDIRFUNC
+ k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
+-
++#else
++ k = glob(path, flags, NULL, pglob);
++#endif
+ if (k == GLOB_NOMATCH)
+ return -ENOENT;
+ if (k == GLOB_NOSPACE)
+@@ -60,6 +68,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ return 0;
+ }
+
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ int glob_exists(const char *path) {
+ _cleanup_globfree_ glob_t g = {};
+ int k;
+diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
+index af866e004..3afa09ada 100644
+--- a/src/test/test-glob-util.c
++++ b/src/test/test-glob-util.c
+@@ -29,6 +29,11 @@
+ #include "glob-util.h"
+ #include "macro.h"
+ #include "rm-rf.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+
+ static void test_glob_exists(void) {
+ char name[] = "/tmp/test-glob_exists.XXXXXX";
+@@ -51,25 +56,33 @@ static void test_glob_exists(void) {
+ static void test_glob_no_dot(void) {
+ char template[] = "/tmp/test-glob-util.XXXXXXX";
+ const char *fn;
+-
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_closedir = (void (*)(void *)) closedir,
+ .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
+ .gl_opendir = (void *(*)(const char *)) opendir,
+ .gl_lstat = lstat,
+ .gl_stat = stat,
++#endif
+ };
+-
+ int r;
+
+ assert_se(mkdtemp(template));
+
+ fn = strjoina(template, "/*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ fn = strjoina(template, "/.*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 9419c99e2..07027a765 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -71,6 +71,12 @@
+ #include "umask-util.h"
+ #include "user-util.h"
+ #include "util.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+
+ /* 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
+@@ -1092,7 +1098,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
+
+ static int glob_item(Item *i, action_t action, bool recursive) {
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_opendir = (void *(*)(const char *)) opendir_nomod,
++#endif
+ };
+ int r = 0, k;
+ char **fn;
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
new file mode 100644
index 000000000..cb5ae99a4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
@@ -0,0 +1,47 @@
+From c850b654e71677e0d6292f1345207b9b5acffc33 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 11:31:03 -0700
+Subject: [PATCH 04/12] src/basic/missing.h: check for missing __compar_fn_t
+ typedef
+
+include missing.h for missing __compar_fn_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/missing.h | 5 +++++
+ src/basic/strbuf.c | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 8009888ad..671f341c6 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1063,6 +1063,11 @@ struct input_mask {
+ #define RENAME_NOREPLACE (1 << 0)
+ #endif
+
++#ifndef __COMPAR_FN_T
++#define __COMPAR_FN_T
++typedef int (*__compar_fn_t)(const void *, const void *);
++#endif
++
+ #ifndef KCMP_FILE
+ #define KCMP_FILE 0
+ #endif
+diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
+index 00aaf9e62..9dc4a584a 100644
+--- a/src/basic/strbuf.c
++++ b/src/basic/strbuf.c
+@@ -23,6 +23,7 @@
+
+ #include "alloc-util.h"
+ #include "strbuf.h"
++#include "missing.h"
+
+ /*
+ * Strbuf stores given strings in a single continuous allocated memory
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
new file mode 100644
index 000000000..55887ee82
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
@@ -0,0 +1,86 @@
+From 21080b6a40d0a4ddd2db8f0fa37686f6fa885d1c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 11:38:33 -0700
+Subject: [PATCH 06/12] Include netinet/if_ether.h
+
+Fixes
+/mnt/a/oe/build/tmp/work/mips32r2-bec-linux-musl/systemd/1_234-r0/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
+ struct ethhdr {
+ ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/libsystemd/sd-netlink/netlink-types.c | 1 +
+ src/network/netdev/tuntap.c | 1 +
+ src/network/networkd-brvlan.c | 1 +
+ src/udev/net/ethtool-util.c | 2 +-
+ src/udev/udev-builtin-net_setup_link.c | 2 +-
+ 5 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
+index 923f7dd10..b95b1e4b2 100644
+--- a/src/libsystemd/sd-netlink/netlink-types.c
++++ b/src/libsystemd/sd-netlink/netlink-types.c
+@@ -19,6 +19,7 @@
+
+ #include <stdint.h>
+ #include <sys/socket.h>
++#include <netinet/if_ether.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/can/netlink.h>
+diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
+index 3d6280884..40e58c38f 100644
+--- a/src/network/netdev/tuntap.c
++++ b/src/network/netdev/tuntap.c
+@@ -18,6 +18,7 @@
+ ***/
+
+ #include <fcntl.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_tun.h>
+ #include <net/if.h>
+ #include <netinet/if_ether.h>
+diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
+index fa5d3ee7f..e0828962a 100644
+--- a/src/network/networkd-brvlan.c
++++ b/src/network/networkd-brvlan.c
+@@ -18,6 +18,7 @@
+ ***/
+
+ #include <netinet/in.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_bridge.h>
+ #include <stdbool.h>
+
+diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
+index 201fc2343..5f7cc2a0a 100644
+--- a/src/udev/net/ethtool-util.c
++++ b/src/udev/net/ethtool-util.c
+@@ -16,7 +16,7 @@
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+-
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+ #include <linux/ethtool.h>
+diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
+index 8e4777513..d01fff2a4 100644
+--- a/src/udev/udev-builtin-net_setup_link.c
++++ b/src/udev/udev-builtin-net_setup_link.c
+@@ -16,7 +16,7 @@
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+-
++#include <netinet/if_ether.h>
+ #include "alloc-util.h"
+ #include "link-config.h"
+ #include "log.h"
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
deleted file mode 100644
index 43a0d3f61..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 82d837b76618a773485b96e38b7b91083a7437e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:05:45 +0000
-Subject: [PATCH 06/19] configure: Check for additional features that uclibc
- doesnt support
-
-This helps in supporting uclibc which does not have all features that
-glibc might have
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 7f6b3b9..7c4b5a2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
-
- AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
-
-+# check for few functions not implemented in uClibc
-+
-+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
-+
-+# check for %ms format support - assume always no if cross compiling
-+
-+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
-+
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM([
-+ #include <stdio.h>
-+ ],[
-+ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
-+ int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
-+ return (rc==3)?0:1;])],
-+ [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
-+ [AC_MSG_RESULT([no])])
-+
- M4_DEFINES=
-
- AC_CHECK_TOOL(OBJCOPY, objcopy)
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
new file mode 100644
index 000000000..5234c59a7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
@@ -0,0 +1,63 @@
+From 05dffe67919ffc72be5c017bc6cf82f164b2e8f9 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 11:42:03 -0700
+Subject: [PATCH 07/12] check for missing canonicalize_file_name
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 2 ++
+ src/basic/missing.h | 1 +
+ src/basic/missing_syscall.h | 6 ++++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index cd035a971..3674190fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -333,6 +333,7 @@ AC_CHECK_DECLS([
+ renameat2,
+ kcmp,
+ keyctl,
++ canonicalize_file_name,
+ LO_FLAGS_PARTSCAN,
+ copy_file_range,
+ explicit_bzero],
+@@ -343,6 +344,7 @@ AC_CHECK_DECLS([
+ #include <fcntl.h>
+ #include <sched.h>
+ #include <string.h>
++#include <stdlib.h>
+ #include <linux/loop.h>
+ ]])
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 671f341c6..8ae4964e1 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1246,3 +1246,4 @@ struct ethtool_link_settings {
+ #endif
+
+ #include "missing_syscall.h"
++
+diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
+index 898116c7b..4d44ee4fa 100644
+--- a/src/basic/missing_syscall.h
++++ b/src/basic/missing_syscall.h
+@@ -28,6 +28,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ }
+ #endif
+
++#if !HAVE_DECL_CANONICALIZE_FILE_NAME
++static inline char *canonicalize_file_name(const char *path) {
++ return realpath(path, NULL);
++}
++#endif
++
+ /* ======================================================================= */
+
+ #if !HAVE_DECL_MEMFD_CREATE
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
index fad69a51a..bc92db746 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
configure.ac | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
-diff --git a/Makefile.am b/Makefile.am
-index 29ed1dd..02f4017 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am
++++ git/Makefile.am
@@ -320,7 +320,7 @@ define install-relative-aliases
while [ -n "$$1" ]; do \
$(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
@@ -25,19 +25,16 @@ index 29ed1dd..02f4017 100644
shift 2 || exit $$?; \
done
endef
-diff --git a/configure.ac b/configure.ac
-index 7c4b5a2..b10c952 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -108,8 +108,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr
AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
-
- # check for few functions not implemented in uClibc
+ M4_DEFINES=
- AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
---
-2.10.2
-
+ AC_CHECK_TOOL(OBJCOPY, objcopy)
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
new file mode 100644
index 000000000..67a4f8e03
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
@@ -0,0 +1,35 @@
+From 48e7c0f5b2f5d777a16ac5584dc4f50f1dfa832c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 12:27:53 -0700
+Subject: [PATCH 08/12] Do not enable nss tests
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 3cc8f3451..df20a9a11 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5290,6 +5290,7 @@ EXTRA_DIST += \
+ src/timesync/timesyncd.conf.in
+
+ # ------------------------------------------------------------------------------
++if ENABLE_NSS_SYSTEMD
+ test_nss_SOURCES = \
+ src/test/test-nss.c
+
+@@ -5302,7 +5303,6 @@ manual_tests += \
+ test-nss
+
+ # ------------------------------------------------------------------------------
+-if ENABLE_NSS_SYSTEMD
+ libnss_systemd_la_SOURCES = \
+ src/nss-systemd/nss-systemd.sym \
+ src/nss-systemd/nss-systemd.c
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
deleted file mode 100644
index 586b5aab7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 96026a3763264eb41a2c3e374f232f6e543284a8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:33:49 -0800
-Subject: [PATCH 08/19] nspawn: Use execvpe only when libc supports it
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/nspawn/nspawn.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 9b9ae90..19b47cd 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -123,6 +123,8 @@ typedef enum LinkJournal {
- LINK_GUEST
- } LinkJournal;
-
-+#include "config.h"
-+
- static char *arg_directory = NULL;
- static char *arg_template = NULL;
- static char *arg_chdir = NULL;
-@@ -2871,7 +2873,12 @@ static int inner_child(
- a[0] = (char*) "/sbin/init";
- execve(a[0], a, env_use);
- } else if (!strv_isempty(arg_parameters))
-+#ifdef HAVE_EXECVPE
- execvpe(arg_parameters[0], arg_parameters, env_use);
-+#else
-+ environ = env_use;
-+ execvp(arg_parameters[0], arg_parameters);
-+#endif /* HAVE_EXECVPE */
- else {
- if (!arg_chdir)
- /* If we cannot change the directory, we'll end up in /, that is expected. */
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
new file mode 100644
index 000000000..d3694dcbd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
@@ -0,0 +1,27 @@
+From 75f4e7f167de533a160ee1af2a03fba4c5a5ffc6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 12:33:22 -0700
+Subject: [PATCH 09/12] test-hexdecoct.c: Include missing.h form strndupa
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/test/test-hexdecoct.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index fcae427e7..5eb5e2ed7 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -21,6 +21,7 @@
+ #include "hexdecoct.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
deleted file mode 100644
index f150bb087..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 085c8b6f253726ad547e7be84ff3f2b99701488b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:38:07 -0800
-Subject: [PATCH 09/19] util: bypass unimplemented _SC_PHYS_PAGES system
- configuration API on uclibc
-
-Upstream-Status: Inappropriate [uclibc-specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/basic/util.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/src/basic/util.c b/src/basic/util.c
-index c1b5ca1..4c62d43 100644
---- a/src/basic/util.c
-+++ b/src/basic/util.c
-@@ -742,6 +742,20 @@ uint64_t physical_memory(void) {
- * In order to support containers nicely that have a configured memory limit we'll take the minimum of the
- * physically reported amount of memory and the limit configured for the root cgroup, if there is any. */
-
-+#ifdef __UCLIBC__
-+ char line[128];
-+ FILE *f = fopen("/proc/meminfo", "r");
-+ if (f == NULL)
-+ return 0;
-+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
-+ if (sscanf(line, "MemTotal: %li kB", &mem) == 1) {
-+ mem *= 1024;
-+ break;
-+ }
-+ }
-+ fclose(f);
-+ return (uint64_t) mem;
-+#else
- sc = sysconf(_SC_PHYS_PAGES);
- assert(sc > 0);
-
-@@ -762,6 +776,7 @@ uint64_t physical_memory(void) {
- lim *= ps;
-
- return MIN(mem, lim);
-+#endif
- }
-
- uint64_t physical_memory_scale(uint64_t v, uint64_t max) {
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
new file mode 100644
index 000000000..808c83aba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -0,0 +1,49 @@
+From 6e9d2bcaa6f886b2384c1c35a04e4ebc148aea68 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 12:40:25 -0700
+Subject: [PATCH 10/12] test-sizeof.c: Disable tests for missing typedefs in
+ musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/test/test-sizeof.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index 269adfd18..ba7855dff 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -18,7 +18,6 @@
+ ***/
+
+ #include <stdio.h>
+-
+ #include "time-util.h"
+
+ /* Print information about various types. Useful when diagnosing
+@@ -48,8 +47,10 @@ int main(void) {
+ info(unsigned);
+ info(long unsigned);
+ info(long long unsigned);
++#ifdef __GLIBC__
+ info(__syscall_ulong_t);
+ info(__syscall_slong_t);
++#endif
+
+ info(float);
+ info(double);
+@@ -59,7 +60,9 @@ int main(void) {
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
++#ifdef __GLIBC__
+ info(__time_t);
++#endif
+
+ info(enum Enum);
+ info(enum BigEnum);
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
new file mode 100644
index 000000000..7cfe829e8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
@@ -0,0 +1,105 @@
+From 2eb45f5a0a8bfb8bdca084587ad28e5001f3cc4b Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Thu, 18 Sep 2014 15:24:56 +0200
+Subject: [PATCH 11/12] don't use glibc-specific qsort_r
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/hwdb/hwdb.c | 18 +++++++++++-------
+ src/udev/udevadm-hwdb.c | 16 ++++++++++------
+ 2 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
+index 793398ca6..669b00818 100644
+--- a/src/hwdb/hwdb.c
++++ b/src/hwdb/hwdb.c
+@@ -151,13 +151,12 @@ static void trie_free(struct trie *trie) {
+
+ DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
+
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+ const struct trie_value_entry *val1 = v1;
+ const struct trie_value_entry *val2 = v2;
+- struct trie *trie = arg;
+-
+- return strcmp(trie->strings->buf + val1->key_off,
+- trie->strings->buf + val2->key_off);
++ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++ trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -182,7 +181,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .value_off = v,
+ };
+
+- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
++
+ if (val) {
+ /* At this point we have 2 identical properties on the same match-string.
+ * Since we process files in order, we just replace the previous value.
+@@ -207,7 +209,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ node->values[node->values_count].file_priority = file_priority;
+ node->values[node->values_count].line_number = line_number;
+ node->values_count++;
+- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
+diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
+index 69b0b9025..fbd213300 100644
+--- a/src/udev/udevadm-hwdb.c
++++ b/src/udev/udevadm-hwdb.c
+@@ -128,13 +128,13 @@ static void trie_node_cleanup(struct trie_node *node) {
+ free(node);
+ }
+
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+ const struct trie_value_entry *val1 = v1;
+ const struct trie_value_entry *val2 = v2;
+- struct trie *trie = arg;
+
+- return strcmp(trie->strings->buf + val1->key_off,
+- trie->strings->buf + val2->key_off);
++ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++ trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -155,7 +155,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .value_off = v,
+ };
+
+- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ if (val) {
+ /* replace existing earlier key with new value */
+ val->value_off = v;
+@@ -172,7 +174,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ node->values[node->values_count].key_off = k;
+ node->values[node->values_count].value_off = v;
+ node->values_count++;
+- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
new file mode 100644
index 000000000..1a6db654f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -0,0 +1,99 @@
+From 9621618c701a2d5eb3e26f40c68354d4dfb8f872 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/12] 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:
+
+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
+ http://www.openwall.com/lists/musl/2015/02/05/2
+
+Note that laccess() is never passing AT_EACCESS so a lot of the
+discussion in the links above doesn't apply. Note also that
+(currently) all systemd callers of laccess() pass mode as F_OK, so
+only check for existence of a file, not access permissions.
+Therefore, in this case, the only distiction between faccessat()
+with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
+for broken symlinks; laccess() on a broken symlink will succeed with
+(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
+
+The laccess() macros was added to systemd some time ago and it's not
+clear if or why it needs to return success for broken symlinks. Maybe
+just historical and not actually necessary or desired behaviour?
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/fs-util.h | 22 +++++++++++++++++++++-
+ src/shared/base-filesystem.c | 6 +++---
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index 094acf179..cdbc0ae72 100644
+--- a/src/basic/fs-util.h
++++ b/src/basic/fs-util.h
+@@ -48,7 +48,27 @@ int fchmod_umask(int fd, mode_t mode);
+
+ int fd_warn_permissions(const char *path, int fd);
+
+-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
++/*
++ 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:
++
++ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
++ http://www.openwall.com/lists/musl/2015/02/05/2
++
++ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
++ the links above doesn't apply. Note also that (currently) all systemd callers
++ of laccess() pass mode as F_OK, so only check for existence of a file, not
++ access permissions. Therefore, in this case, the only distiction between
++ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
++ behaviour for broken symlinks; laccess() on a broken symlink will succeed
++ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
++
++ The laccess() macros was added to systemd some time ago and it's not clear if
++ or why it needs to return success for broken symlinks. Maybe just historical
++ and not actually necessary or desired behaviour?
++*/
++
++#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
+
+ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
+ int touch(const char *path);
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index 903a18786..2f6052ee7 100644
+--- a/src/shared/base-filesystem.c
++++ b/src/shared/base-filesystem.c
+@@ -70,7 +70,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ return log_error_errno(errno, "Failed to open root file system: %m");
+
+ for (i = 0; i < ELEMENTSOF(table); i ++) {
+- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
++ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
+ continue;
+
+ if (table[i].target) {
+@@ -78,7 +78,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+
+ /* check if one of the targets exists */
+ NULSTR_FOREACH(s, table[i].target) {
+- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, s, F_OK, 0) < 0)
+ continue;
+
+ /* check if a specific file exists at the target path */
+@@ -89,7 +89,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ if (!p)
+ return log_oom();
+
+- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, p, F_OK, 0) < 0)
+ continue;
+ }
+
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
index 8666bdc65..eb380ce78 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
@@ -1,7 +1,7 @@
-From 8cc1ae11f54dcc38ee2168b0f99703b835dd3942 Mon Sep 17 00:00:00 2001
+From ab5a27040133f7cdf062ac8cfeb94e081d3567b3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Nov 2016 19:41:13 -0800
-Subject: [PATCH 12/19] rules: whitelist hd* devices
+Subject: [PATCH 07/14] rules: whitelist hd* devices
qemu by default emulates IDE and the linux-yocto kernel(s) use
CONFIG_IDE instead of the more modern libsata, so disks appear as
@@ -11,23 +11,24 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
rules/60-persistent-storage.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index c13d05c..b14fbed 100644
+index d2745f65f..63f472be8 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
--KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*", GOTO="persistent_storage_end"
-+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|hd*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*", GOTO="persistent_storage_end"
+-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*", GOTO="persistent_storage_end"
++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|hd*", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk
TEST=="whole_disk", GOTO="persistent_storage_end"
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
index 2b333375b..aeebbfb8f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
@@ -1,7 +1,7 @@
-From 79e64a07840e0d97d66e46111f1c086bf83981b7 Mon Sep 17 00:00:00 2001
+From 479e1f4aa2b9f1c911a4d0dd18e222d241a978ea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Nov 2016 20:35:30 -0800
-Subject: [PATCH 13/19] Make root's home directory configurable
+Subject: [PATCH 42/48] Make root's home directory configurable
OpenEmbedded has a configurable home directory for root. Allow
systemd to be built using its idea of what root's home directory
@@ -14,6 +14,7 @@ https://github.com/systemd/systemd/issues/541
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
Makefile.am | 2 ++
configure.ac | 7 +++++++
@@ -24,18 +25,18 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 420e0e0..3010b01 100644
+index 1bcd932c2..c2b4a99d2 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -213,6 +213,7 @@ AM_CPPFLAGS = \
+@@ -226,6 +226,7 @@ AM_CPPFLAGS = \
-DLIBDIR=\"$(libdir)\" \
-DROOTLIBDIR=\"$(rootlibdir)\" \
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
+ -DROOTHOMEDIR=\"$(roothomedir)\" \
- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
-I $(top_srcdir)/src \
-I $(top_builddir)/src/basic \
-@@ -6057,6 +6058,7 @@ substitutions = \
+ -I $(top_srcdir)/src/basic \
+@@ -6356,6 +6357,7 @@ substitutions = \
'|rootlibdir=$(rootlibdir)|' \
'|rootlibexecdir=$(rootlibexecdir)|' \
'|rootbindir=$(rootbindir)|' \
@@ -44,10 +45,10 @@ index 420e0e0..3010b01 100644
'|SYSTEMCTL=$(rootbindir)/systemctl|' \
'|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
diff --git a/configure.ac b/configure.ac
-index b10c952..dfc0bd3 100644
+index 0354ffe6a..b53ca1f1a 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1513,6 +1513,11 @@ AC_ARG_WITH([rootlibdir],
+@@ -1641,6 +1641,11 @@ AC_ARG_WITH([rootlibdir],
[with_rootlibdir=${libdir}])
AX_NORMALIZE_PATH([with_rootlibdir])
@@ -57,29 +58,29 @@ index b10c952..dfc0bd3 100644
+ [with_roothomedir=/root])
+
AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
+ AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
[],
-@@ -1598,6 +1603,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
- AC_SUBST([pamconfdir], [$with_pamconfdir])
+@@ -1733,6 +1738,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
+ AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
+AC_SUBST([roothomedir], [$with_roothomedir])
AC_CONFIG_FILES([
Makefile
-@@ -1688,6 +1694,7 @@ AC_MSG_RESULT([
+@@ -1829,6 +1835,7 @@ AC_MSG_RESULT([
includedir: ${includedir}
lib dir: ${libdir}
rootlib dir: ${with_rootlibdir}
+ root home dir: ${with_roothomedir}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
+ build Python: ${PYTHON}
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index 938533d..3f9fdc4 100644
+index c619dad52..662682adf 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
-@@ -127,7 +127,7 @@ int get_user_creds(
+@@ -129,7 +129,7 @@ int get_user_creds(
*gid = 0;
if (home)
@@ -88,7 +89,7 @@ index 938533d..3f9fdc4 100644
if (shell)
*shell = "/bin/sh";
-@@ -387,7 +387,7 @@ int get_home_dir(char **_h) {
+@@ -389,7 +389,7 @@ int get_home_dir(char **_h) {
/* Hardcode home directory for root to avoid NSS */
u = getuid();
if (u == 0) {
@@ -98,10 +99,10 @@ index 938533d..3f9fdc4 100644
return -ENOMEM;
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 19b47cd..e42bf19 100644
+index 8a5fedd4b..7b01ec078 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
-@@ -2798,7 +2798,7 @@ static int inner_child(
+@@ -2291,7 +2291,7 @@ static int inner_child(
if (envp[n_env])
n_env++;
@@ -110,8 +111,8 @@ index 19b47cd..e42bf19 100644
(asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
(asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
return log_oom();
-@@ -2882,7 +2882,7 @@ static int inner_child(
- else {
+@@ -2373,7 +2373,7 @@ static int inner_child(
+ } else {
if (!arg_chdir)
/* If we cannot change the directory, we'll end up in /, that is expected. */
- (void) chdir(home ?: "/root");
@@ -120,7 +121,7 @@ index 19b47cd..e42bf19 100644
execle("/bin/bash", "-bash", NULL, env_use);
execle("/bin/sh", "-sh", NULL, env_use);
diff --git a/units/emergency.service.in b/units/emergency.service.in
-index da68eb8..e25f879 100644
+index e9eb238b9..32588e48a 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -15,8 +15,8 @@ Conflicts=syslog.socket
@@ -131,11 +132,11 @@ index da68eb8..e25f879 100644
-WorkingDirectory=-/root
+Environment=HOME=@roothomedir@
+WorkingDirectory=-@roothomedir@
- ExecStartPre=-/bin/plymouth --wait quit
- ExecStartPre=-/bin/echo -e 'You are in emergency mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+ ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
+ Type=idle
+ StandardInput=tty-force
diff --git a/units/rescue.service.in b/units/rescue.service.in
-index 5feff69..a83439e 100644
+index 4ab66f485..bd9898f2c 100644
--- a/units/rescue.service.in
+++ b/units/rescue.service.in
@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
@@ -146,9 +147,9 @@ index 5feff69..a83439e 100644
-WorkingDirectory=-/root
+Environment=HOME=@roothomedir@
+WorkingDirectory=-@roothomedir@
- ExecStartPre=-/bin/plymouth --wait quit
- ExecStartPre=-/bin/echo -e 'You are in rescue mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+ ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
+ Type=idle
+ StandardInput=tty-force
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 000000000..e219981ab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,31 @@
+From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Sep 2015 18:53:31 +0000
+Subject: [PATCH 13/13] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+make it work with musl where comparison_fn_t is not provided
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/util.h b/src/basic/util.h
+index c7da6c39b..87f62b891 100644
+--- a/src/basic/util.h
++++ b/src/basic/util.h
+@@ -98,7 +98,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
index f31d211e7..95871bb05 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -1,7 +1,7 @@
-From 4d28d9a7d8d69fb429955d770e53e7a81640da24 Mon Sep 17 00:00:00 2001
+From 7883985a3a78677e9a1d5d61fe7fa8badf39f565 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Nov 2016 20:45:23 -0800
-Subject: [PATCH 15/19] Revert "udev: remove userspace firmware loading
+Subject: [PATCH 10/14] Revert "udev: remove userspace firmware loading
support"
This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
@@ -11,23 +11,24 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
Makefile.am | 12 +++
- README | 6 +-
+ README | 4 +-
TODO | 1 +
configure.ac | 18 +++++
src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
src/udev/udev-builtin.c | 3 +
src/udev/udev.h | 6 ++
src/udev/udevd.c | 13 ++++
- 8 files changed, 210 insertions(+), 3 deletions(-)
+ 8 files changed, 209 insertions(+), 2 deletions(-)
create mode 100644 src/udev/udev-builtin-firmware.c
diff --git a/Makefile.am b/Makefile.am
-index 3010b01..229492a 100644
+index c2b4a99d2..692d7bb95 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -3791,6 +3791,18 @@ libudev_core_la_LIBADD = \
+@@ -3985,6 +3985,18 @@ libudev_core_la_LIBADD = \
$(BLKID_LIBS) \
$(KMOD_LIBS)
@@ -47,17 +48,10 @@ index 3010b01..229492a 100644
libudev_core_la_SOURCES += \
src/udev/udev-builtin-kmod.c
diff --git a/README b/README
-index 9f5bc93..f60ae11 100644
+index 60388eebe..e21976393 100644
--- a/README
+++ b/README
-@@ -50,14 +50,14 @@ REQUIREMENTS:
- CONFIG_PROC_FS
- CONFIG_FHANDLE (libudev, mount and bind mount handling)
-
-- udev will fail to work with the legacy sysfs layout:
-+ Udev will fail to work with the legacy sysfs layout:
- CONFIG_SYSFS_DEPRECATED=n
-
+@@ -61,8 +61,8 @@ REQUIREMENTS:
Legacy hotplug slows down the system and confuses udev:
CONFIG_UEVENT_HELPER_PATH=""
@@ -69,10 +63,10 @@ index 9f5bc93..f60ae11 100644
Some udev rules and virtualization detection relies on it:
diff --git a/TODO b/TODO
-index baaac94..1ab1691 100644
+index 61efa5e9f..67ccac224 100644
--- a/TODO
+++ b/TODO
-@@ -658,6 +658,7 @@ Features:
+@@ -740,6 +740,7 @@ Features:
* initialize the hostname from the fs label of /, if /etc/hostname does not exist?
* udev:
@@ -81,11 +75,11 @@ index baaac94..1ab1691 100644
- kill scsi_id
- add trigger --subsystem-match=usb/usb_device device
diff --git a/configure.ac b/configure.ac
-index dfc0bd3..1de0066 100644
+index b53ca1f1a..1150ca50e 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1394,6 +1394,23 @@ AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
- AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
+@@ -1522,6 +1522,23 @@ AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
+ AC_ARG_ENABLE(hwdb, [AS_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
+AC_ARG_WITH(firmware-path,
@@ -108,17 +102,17 @@ index dfc0bd3..1de0066 100644
# ------------------------------------------------------------------------------
have_manpages=no
-@@ -1698,6 +1715,7 @@ AC_MSG_RESULT([
+@@ -1839,6 +1856,7 @@ AC_MSG_RESULT([
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
+ build Python: ${PYTHON}
+ firmware path: ${FIRMWARE_PATH}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
- D-Bus policy dir: ${with_dbuspolicydir}
+ RPM macros dir: ${with_rpmmacrosdir}
diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
new file mode 100644
-index 0000000..bd8c2fb
+index 000000000..bd8c2fb96
--- /dev/null
+++ b/src/udev/udev-builtin-firmware.c
@@ -0,0 +1,154 @@
@@ -277,7 +271,7 @@ index 0000000..bd8c2fb
+ .run_once = true,
+};
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index e6b36f1..cd9947e 100644
+index e6b36f124..cd9947e2a 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
@@ -291,10 +285,10 @@ index e6b36f1..cd9947e 100644
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
[UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
diff --git a/src/udev/udev.h b/src/udev/udev.h
-index 8433e8d..d32366d 100644
+index c0cb7eae8..9f0f1cf13 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
-@@ -148,6 +148,9 @@ enum udev_builtin_cmd {
+@@ -150,6 +150,9 @@ enum udev_builtin_cmd {
UDEV_BUILTIN_BLKID,
#endif
UDEV_BUILTIN_BTRFS,
@@ -304,7 +298,7 @@ index 8433e8d..d32366d 100644
UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID,
UDEV_BUILTIN_KEYBOARD,
-@@ -176,6 +179,9 @@ struct udev_builtin {
+@@ -178,6 +181,9 @@ struct udev_builtin {
extern const struct udev_builtin udev_builtin_blkid;
#endif
extern const struct udev_builtin udev_builtin_btrfs;
@@ -315,7 +309,7 @@ index 8433e8d..d32366d 100644
extern const struct udev_builtin udev_builtin_input_id;
extern const struct udev_builtin udev_builtin_keyboard;
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index d336ee0..81e5dc5 100644
+index acbddd418..20347b402 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -125,6 +125,9 @@ struct event {
@@ -353,5 +347,5 @@ index d336ee0..81e5dc5 100644
if (event->devpath[common] == '/') {
event->delaying_seqnum = loop_event->seqnum;
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-make-test-dir-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-make-test-dir-configurable.patch
deleted file mode 100644
index 10d1df5d5..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-make-test-dir-configurable.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 218bbc555a37f9373fbb7f03c744eb65109d3470 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:47:37 -0800
-Subject: [PATCH 16/19] make test dir configurable
-
-Upstream-Status: Pending
-
-test maybe be run on target in cross-compile environment, and test dir
-is not the compilation dir, so make it configurable
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 +-
- configure.ac | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 229492a..e997d82 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,7 +214,7 @@ AM_CPPFLAGS = \
- -DROOTLIBDIR=\"$(rootlibdir)\" \
- -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
- -DROOTHOMEDIR=\"$(roothomedir)\" \
-- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
-+ -DTEST_DIR=\"$(testdir)/test\" \
- -I $(top_srcdir)/src \
- -I $(top_builddir)/src/basic \
- -I $(top_srcdir)/src/basic \
-diff --git a/configure.ac b/configure.ac
-index 1de0066..b12e320 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1535,6 +1535,11 @@ AC_ARG_WITH([roothomedir],
- [],
- [with_roothomedir=/root])
-
-+AC_ARG_WITH([testdir],
-+ AS_HELP_STRING([--with-testdir=DIR], [test file directory]),
-+ [],
-+ [with_testdir=${abs_top_srcdir}])
-+
- AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
- [],
-@@ -1621,6 +1626,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
- AC_SUBST([roothomedir], [$with_roothomedir])
-+AC_SUBST([testdir], [$with_testdir])
-
- AC_CONFIG_FILES([
- Makefile
-@@ -1712,6 +1718,7 @@ AC_MSG_RESULT([
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
- root home dir: ${with_roothomedir}
-+ test dir: ${with_testdir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
index 77dbd6eec..d2006351d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
@@ -6,6 +6,7 @@ Subject: [PATCH 17/19] remove duplicate include uchar.h
missing.h already includes it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
---
src/basic/escape.h | 1 -
src/basic/utf8.h | 1 -
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
index 5824033b4..067b73ff3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
@@ -1,21 +1,23 @@
-From 7cc0b19d244023c7b3e557765b03b7971e047f29 Mon Sep 17 00:00:00 2001
+From 1355457092b02a15c646fc1c72e68b694a86dd99 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 22 Feb 2016 06:02:38 +0000
-Subject: [PATCH 18/19] check for uchar.h in configure
+Subject: [PATCH 12/14] check for uchar.h in configure
Use ifdef to include uchar.h
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
---
configure.ac | 1 +
src/basic/missing.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
-index b12e320..4e6dfdf 100644
+index 1150ca50e..60e7df5ee 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -298,6 +298,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
+@@ -304,6 +304,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
# ------------------------------------------------------------------------------
@@ -24,12 +26,12 @@ index b12e320..4e6dfdf 100644
AC_CHECK_HEADERS([linux/btrfs.h], [], [])
AC_CHECK_HEADERS([linux/memfd.h], [], [])
diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 4936873..ce79404 100644
+index 25a11f351..d631b7e3e 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
-@@ -35,7 +35,9 @@
- #include <stdlib.h>
+@@ -37,7 +37,9 @@
#include <sys/resource.h>
+ #include <sys/socket.h>
#include <sys/syscall.h>
+#ifdef HAVE_UCHAR_H
#include <uchar.h>
@@ -38,5 +40,5 @@ index 4936873..ce79404 100644
#ifdef HAVE_AUDIT
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
index 66aa4cab8..b60927620 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
@@ -1,18 +1,19 @@
-From 289554d87e4fd96cae08c0fb449bf41d5641cd24 Mon Sep 17 00:00:00 2001
+From b7c6bfe2ec5ae426e586e1d6ecadb52a97128a3f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Nov 2016 20:49:53 -0800
-Subject: [PATCH 19/19] socket-util: don't fail if libc doesn't support IDN
+Subject: [PATCH 13/14] socket-util: don't fail if libc doesn't support IDN
Upstream-Status: Pending
Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/basic/socket-util.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 4ebf106..53b9a12 100644
+index 016e64aa0..d4658826e 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -47,6 +47,15 @@
@@ -29,8 +30,8 @@ index 4ebf106..53b9a12 100644
+#define NI_IDN_USE_STD3_ASCII_RULES 0
+#endif
- int socket_address_parse(SocketAddress *a, const char *s) {
- char *e, *n;
+ #ifdef ENABLE_IDN
+ # define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
--
-2.10.2
+2.13.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
deleted file mode 100644
index ef2d86804..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-This is a direct backport from systemd-233's stream to fix lxc/docker.
-
-% lxc-start -n container -F
-lxc-start: cgfsng.c: parse_hierarchies: 825 Failed to find current cgroup for controller 'name=systemd'
-lxc-start: cgfsng.c: all_controllers_found: 431 no systemd controller mountpoint found
-lxc-start: start.c: lxc_spawn: 1082 failed initializing cgroup support
-lxc-start: start.c: __lxc_start: 1332 failed to spawn 'container'
-lxc-start: lxc_start.c: main: 344 The container failed to start.
-lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
-
-## begin backport ##
-
-From 843d5baf6aad6c53fc00ea8d95d83209a4f92de1 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu, 10 Nov 2016 05:33:13 +0100
-Subject: [PATCH] core: don't use the unified hierarchy for the systemd cgroup
- yet (#4628)
-
-Too many things don't get along with the unified hierarchy yet:
-
- * https://github.com/opencontainers/runc/issues/1175
- * https://github.com/docker/docker/issues/28109
- * https://github.com/lxc/lxc/issues/1280
-
-So revert the default to the legacy hierarchy for now. Developers of the above
-software can opt into the unified hierarchy with
-"systemd.legacy_systemd_cgroup_controller=0".
----
- src/basic/cgroup-util.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
-index 5e73753..dc13025 100644
---- a/src/basic/cgroup-util.c
-+++ b/src/basic/cgroup-util.c
-@@ -2423,10 +2423,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
-
- r = get_proc_cmdline_key("systemd.legacy_systemd_cgroup_controller=", &value);
- if (r < 0)
-- return true;
-+ return false;
-
- if (r == 0)
-- wanted = true;
-+ wanted = false;
- else
- wanted = parse_boolean(value) <= 0;
- }
---
-2.10.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
index 25fe49641..9ce27bf67 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
@@ -10,164 +10,189 @@ SECTION = "base/shell"
inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages
-SRC_URI += " \
+SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
file://touchscreen.rules \
file://00-create-volatile.conf \
file://init \
file://run-ptest \
- file://0003-define-exp10-if-missing.patch \
file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
- file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
- file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
- file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
file://0010-implment-systemd-sysv-install-for-OE.patch \
file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
file://0012-rules-whitelist-hd-devices.patch \
file://0013-Make-root-s-home-directory-configurable.patch \
file://0014-Revert-rules-remove-firmware-loading-rules.patch \
file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
- file://0016-make-test-dir-configurable.patch \
file://0017-remove-duplicate-include-uchar.h.patch \
file://0018-check-for-uchar.h-in-configure.patch \
file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
- file://0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch \
- file://0001-core-load-fragment-refuse-units-with-errors-in-certa.patch \
+ file://0001-add-fallback-parse_printf_format-implementation.patch \
+ file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \
+ file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
+ file://0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
+ file://0006-Include-netinet-if_ether.h.patch \
+ file://0007-check-for-missing-canonicalize_file_name.patch \
+ file://0008-Do-not-enable-nss-tests.patch \
+ file://0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch \
+ file://0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
+ file://0011-don-t-use-glibc-specific-qsort_r.patch \
+ file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
+ file://0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
+ file://0001-Use-uintmax_t-for-handling-rlim_t.patch \
+ file://0001-core-evaluate-presets-after-generators-have-run-6526.patch \
+ file://0001-main-skip-many-initialization-steps-when-running-in-.patch \
+ "
+SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+
+PAM_PLUGINS = " \
+ pam-plugin-unix \
+ pam-plugin-loginuid \
+ pam-plugin-keyinit \
"
-SRC_URI_append_libc-uclibc = "\
- file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
+
+PACKAGECONFIG ??= " \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ backlight \
+ binfmt \
+ firstboot \
+ hibernate \
+ hostnamed \
+ ima \
+ localed \
+ logind \
+ machined \
+ myhostname \
+ networkd \
+ nss \
+ polkit \
+ quotacheck \
+ randomseed \
+ resolved \
+ smack \
+ sysusers \
+ timedated \
+ timesyncd \
+ utmp \
+ vconsole \
+ xz \
"
-SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
-PACKAGECONFIG ??= "xz \
- ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
- binfmt \
- randomseed \
- machined \
- backlight \
- vconsole \
- quotacheck \
- hostnamed \
- ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
- hibernate \
- timedated \
- timesyncd \
- localed \
- ima \
- smack \
- logind \
- firstboot \
- utmp \
- polkit \
+PACKAGECONFIG_remove_libc-musl = " \
+ localed \
+ myhostname \
+ nss \
+ resolved \
+ selinux \
+ smack \
+ sysusers \
+ utmp \
"
-PACKAGECONFIG_remove_libc-musl = "selinux"
-PACKAGECONFIG_remove_libc-musl = "smack"
# Use the upstream systemd serial-getty@.service and rely on
# systemd-getty-generator instead of using the OE-core specific
# systemd-serialgetty.bb - not enabled by default.
PACKAGECONFIG[serial-getty-generator] = ""
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
+PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
+PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
+PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
+PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
+PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
+PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
+PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
+PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
+PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
+PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
+PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
+PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
-PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
-PACKAGECONFIG[vconsole] = "--enable-vconsole,--disable-vconsole,,${PN}-vconsole-setup"
+PACKAGECONFIG[nss] = "--enable-nss-systemd,--disable-nss-systemd"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
+PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
+PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
-PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
-PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
-PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
# libseccomp is found in meta-security
PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
-PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
+PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
+PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
+PACKAGECONFIG[usrmerge] = "--disable-split-usr,--enable-split-usr"
PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
-# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
+PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no,valgrind"
+PACKAGECONFIG[vconsole] = "--enable-vconsole,--disable-vconsole,,${PN}-vconsole-setup"
# Verify keymaps on locale change
PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
-PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
-CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
-CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
+# Hardcode target binary paths to avoid AC_PROG_PATH in the systemd
+# configure script detecting and setting paths from sysroot or host.
+CACHED_CONFIGUREVARS_class-target = " \
+ ac_cv_path_KEXEC=${sbindir}/kexec \
+ ac_cv_path_KILL=${base_bindir}/kill \
+ ac_cv_path_KMOD=${base_bindir}/kmod \
+ ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
+ ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
+ ac_cv_path_QUOTAON=${sbindir}/quotaon \
+ ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
+ ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
+"
# Helper variables to clarify locations. This mirrors the logic in systemd's
# build system.
-rootprefix ?= "${base_prefix}"
+rootprefix ?= "${root_prefix}"
rootlibdir ?= "${base_libdir}"
rootlibexecdir = "${rootprefix}/lib"
-CACHED_CONFIGUREVARS_class-target = "\
- ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
- ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
- ac_cv_path_KMOD=${base_bindir}/kmod \
- ac_cv_path_KILL=${base_bindir}/kill \
- ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
- ac_cv_path_KEXEC=${sbindir}/kexec \
- ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
- ac_cv_path_QUOTAON=${sbindir}/quotaon \
- "
-
-EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
- --with-rootlibdir=${rootlibdir} \
- --with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
- --without-python \
- --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
- --with-testdir=${PTEST_PATH} \
- "
+EXTRA_OECONF = " \
+ --without-python \
+ --with-roothomedir=${ROOT_HOME} \
+ --with-rootlibdir=${rootlibdir} \
+ --with-rootprefix=${rootprefix} \
+ --with-sysvrcnd-path=${sysconfdir} \
+ --with-firmware-path=${nonarch_base_libdir}/firmware \
+"
+
# per the systemd README, define VALGRIND=1 to run under valgrind
CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
# disable problematic GCC 5.2 optimizations [YOCTO #8291]
FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-# Avoid login failure on qemumips64 when pam is enabled
-FULL_OPTIMIZATION_append_mips64 = " -fno-tree-switch-conversion -fno-tree-tail-merge"
+COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
+COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
+COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
do_configure_prepend() {
- export NM="${HOST_PREFIX}gcc-nm"
- export AR="${HOST_PREFIX}gcc-ar"
- export RANLIB="${HOST_PREFIX}gcc-ranlib"
+ export NM="${COMPILER_NM}"
+ export AR="${COMPILER_AR}"
+ export RANLIB="${COMPILER_RANLIB}"
export KMOD="${base_bindir}/kmod"
if [ -d ${S}/units.pre_sed ] ; then
cp -r ${S}/units.pre_sed ${S}/units
@@ -194,7 +219,6 @@ do_install() {
# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
touch ${D}${sysconfdir}/machine-id
-
install -d ${D}${sysconfdir}/udev/rules.d/
install -d ${D}${sysconfdir}/tmpfiles.d
install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
@@ -243,37 +267,46 @@ do_install() {
echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
else
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
fi
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+
+ # If polkit is setup fixup permissions and ownership
+ if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+ if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
+ chmod 700 ${D}${datadir}/polkit-1/rules.d
+ chown polkitd:root ${D}${datadir}/polkit-1/rules.d
+ fi
+ fi
}
do_install_ptest () {
- # install data files needed for tests
- install -d ${D}${PTEST_PATH}/tests/test
- cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
- # python is disabled for systemd, thus removing these python testing scripts
- rm ${D}${PTEST_PATH}/tests/test/*.py
- sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
+ # install data files needed for tests
+ install -d ${D}${PTEST_PATH}/tests/test
+ cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
+ # python is disabled for systemd, thus removing these python testing scripts
+ rm ${D}${PTEST_PATH}/tests/test/*.py
+ sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
- install -d ${D}${PTEST_PATH}/tests/catalog
- install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
+ install -d ${D}${PTEST_PATH}/tests/catalog
+ install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
- install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
+ install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
- install -d ${D}${PTEST_PATH}/tests/rules
- install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
+ install -d ${D}${PTEST_PATH}/tests/rules
+ install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
- # This directory needs to be there for udev-test.pl to work.
- install -d ${D}${libdir}/udev/rules.d
+ # This directory needs to be there for udev-test.pl to work.
+ install -d ${D}${libdir}/udev/rules.d
- # install actual test binaries
- install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
- install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
+ # install actual test binaries
+ install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
+ install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
- install ${B}/Makefile ${D}${PTEST_PATH}/tests/
+ install ${B}/Makefile ${D}${PTEST_PATH}/tests/
}
python populate_packages_prepend (){
@@ -290,7 +323,6 @@ PACKAGES =+ "\
${PN}-kernel-install \
${PN}-rpm-macros \
${PN}-binfmt \
- ${PN}-pam \
${PN}-zsh-completion \
${PN}-xorg-xinitrc \
${PN}-container \
@@ -311,6 +343,7 @@ USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--sy
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
@@ -382,6 +415,7 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
${libdir}/libnss_mymachines.so.2 \
${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+ ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
"
@@ -450,7 +484,7 @@ FILES_${PN} = " ${base_bindir}/* \
${sysconfdir}/tmpfiles.d/ \
${sysconfdir}/xdg/ \
${sysconfdir}/init.d/README \
- ${sysconfdir}/resolv.conf \
+ ${sysconfdir}/resolv-conf.systemd \
${rootlibexecdir}/systemd/* \
${systemd_unitdir}/* \
${base_libdir}/security/*.so \
@@ -468,22 +502,30 @@ FILES_${PN} = " ${base_bindir}/* \
${exec_prefix}/lib/modules-load.d \
${exec_prefix}/lib/sysctl.d \
${exec_prefix}/lib/sysusers.d \
+ ${exec_prefix}/lib/environment.d \
${localstatedir} \
${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+ ${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 \
+ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
"
FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
RDEPENDS_${PN} += "volatile-binds update-rc.d"
-RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
- systemd-extra-utils \
+RRECOMMENDS_${PN} += "systemd-extra-utils \
systemd-compat-units udev-hwdb \
- util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
+ util-linux-fsck e2fsprogs-e2fsck \
kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
os-release \
"
@@ -534,7 +576,7 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -560,6 +602,10 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
+ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
+
pkg_postinst_${PN} () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
@@ -592,8 +638,4 @@ pkg_prerm_udev-hwdb () {
python () {
if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-
- import re
- if re.match('.*musl*', d.getVar('TARGET_OS')) != None:
- raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index e3d052a84..e15ae35f9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -1,5 +1,43 @@
#!/bin/sh
-if [ -c /dev/$2 ]
-then
- /sbin/getty -L $1 $2 $3
-fi
+###############################################################################
+# 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]')
+
+# 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
+ /sbin/getty -L $1 $2 $3
+ fi
+ break
+ fi
+ done
+ fi
+done
+
+# Restore $IFS.
+IFS=$DEFAULT_IFS
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 884857a96..22a0ecf83 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -68,7 +68,7 @@ FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
-RDEPENDS_${PN} += "sysvinit-pidof initscripts-functions"
+RDEPENDS_${PN} += "sysvinit-pidof initd-functions"
CFLAGS_prepend = "-D_GNU_SOURCE "
export LCRYPT = "-lcrypt"
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/init b/import-layers/yocto-poky/meta/recipes-core/udev/eudev/init
index 0ab028b39..0455ade25 100644
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/init
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev/init
@@ -14,25 +14,7 @@ export TZ=/etc/localtime
[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x @UDEVD@ ] || exit 1
-SYSCONF_CACHED="/etc/udev/cache.data"
-SYSCONF_TMP="/dev/shm/udev.cache"
-DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
-# A list of files which are used as a criteria to judge whether the udev cache could be reused.
-CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
-[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
-
-# List of files whose metadata (size/mtime/name) will be included in cached
-# system state.
-META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
-
-# Command to compute system configuration.
-sysconf_cmd () {
- cat -- $CMP_FILE_LIST
- stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
-}
-
-[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
[ -f /etc/default/rcS ] && . /etc/default/rcS
@@ -66,37 +48,6 @@ case "$1" in
# /var/volatile/tmp directory to be available.
mkdir -m 1777 -p /var/volatile/tmp
- # Cache handling.
- if [ "$DEVCACHE" != "" ]; then
- if [ -e $DEVCACHE ]; then
- sysconf_cmd > "$SYSCONF_TMP"
- if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then
- tar xmf $DEVCACHE -C / -m
- not_first_boot=1
- [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
- [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
- [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
- else
- # Output detailed reason why the cached /dev is not used
- cat <<EOF
-udev: Not using udev cache because of changes detected in the following files:
-udev: $CMP_FILE_LIST
-udev: $META_FILE_LIST
-udev: The udev cache will be regenerated. To identify the detected changes,
-udev: compare the cached sysconf at $SYSCONF_CACHED
-udev: against the current sysconf at $SYSCONF_TMP
-EOF
- touch "$DEVCACHE_REGEN"
- fi
- else
- if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
- # If rootfs is not read-only, it's possible that a new udev cache would be generated;
- # otherwise, we do not bother to read files.
- touch "$DEVCACHE_REGEN"
- fi
- fi
- fi
-
# make_extra_nodes
kill_udevd > "/dev/null" 2>&1
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache b/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache
deleted file mode 100644
index dcfff1cb4..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh -e
-
-### BEGIN INIT INFO
-# Provides: udev-cache
-# Required-Start: mountall
-# Required-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: cache /dev to speedup the udev next boot
-### END INIT INFO
-
-export TZ=/etc/localtime
-
-[ -r /proc/mounts ] || exit 1
-[ -x @UDEVD@ ] || exit 1
-[ -d /sys/class ] || exit 1
-
-[ -f /etc/default/rcS ] && . /etc/default/rcS
-DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
-SYSCONF_CACHED="/etc/udev/cache.data"
-SYSCONF_TMP="/dev/shm/udev.cache"
-DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
-
-# A list of files which are used as a criteria to judge whether the udev cache could be reused.
-CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
-[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
-
-# List of files whose metadata (size/mtime/name) will be included in cached
-# system state.
-META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
-
-# Command to compute system configuration.
-sysconf_cmd () {
- cat -- $CMP_FILE_LIST
- stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
-}
-
-[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
-
-if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
- [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache"
- exit 0
-fi
-
-[ "$DEVCACHE" != "" ] || exit 0
-[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... "
-if ! [ -e "$DEVCACHE_REGEN" ]; then
- [ "${VERBOSE}" == "no" ] || echo "not found."
- exit 0
-fi
-[ "${VERBOSE}" == "no" ] || echo "found."
-echo "Populating dev cache"
-
-err_cleanup () {
- echo "udev-cache: update failed!"
- udevadm control --start-exec-queue
- rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED"
-}
-
-(
- set -e
- trap 'err_cleanup' EXIT
- udevadm control --stop-exec-queue
- sysconf_cmd > "$SYSCONF_TMP"
- find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
- | xargs tar cf "${DEVCACHE_TMP}"
- gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
- rm -f "${DEVCACHE_TMP}"
- mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
- udevadm control --start-exec-queue
- rm -f "$DEVCACHE_REGEN"
- trap - EXIT
-) &
-
-exit 0
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default b/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default
deleted file mode 100644
index a3b732698..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default
+++ /dev/null
@@ -1,5 +0,0 @@
-# Default for /etc/init.d/udev
-
-# Comment this out to disable device cache
-DEVCACHE="/etc/udev-cache.tar.gz"
-PROBE_PLATFORM_BUS="yes"
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.1.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
index bdfb5441a..02fb23ac5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
@@ -8,7 +8,7 @@ DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
PROVIDES = "udev"
-SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
file://0014-Revert-rules-remove-firmware-loading-rules.patch \
file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
file://devfs-udev.rules \
@@ -17,14 +17,12 @@ SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz;downloadfilena
file://local.rules \
file://permissions.rules \
file://run.rules \
- file://udev-cache \
- file://udev-cache.default \
file://udev.rules \
"
UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-SRC_URI[md5sum] = "a2aae16bc432eac0e71c1267c384e295"
-SRC_URI[sha256sum] = "88f530c1540750e6daa91b5eaeebf88e761e6f0c86515c1c28eedfd871f027c6"
+SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e"
+SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63"
inherit autotools update-rc.d qemu pkgconfig
@@ -40,14 +38,7 @@ PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
- install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
-
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
-
- touch ${D}${sysconfdir}/udev/cache.data
install -d ${D}${sysconfdir}/udev/rules.d
install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
@@ -59,14 +50,16 @@ do_install_append() {
rm -f ${D}${base_libdir}/udev/hid2hci
}
-INITSCRIPT_PACKAGES = "eudev udev-cache"
-INITSCRIPT_NAME_eudev = "udev"
-INITSCRIPT_PARAMS_eudev = "start 04 S ."
-INITSCRIPT_NAME_udev-cache = "udev-cache"
-INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
+do_install_prepend_class-target () {
+ # Remove references to buildmachine
+ sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ ${B}/src/udev/keyboard-keys-from-name.h
+}
+
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
PACKAGES =+ "libudev"
-PACKAGES =+ "udev-cache"
PACKAGES =+ "eudev-hwdb"
@@ -76,13 +69,10 @@ FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
${includedir}/udev.h ${libdir}/libudev.la \
${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
RDEPENDS_eudev-hwdb += "eudev"
-RRECOMMENDS_${PN} += "udev-cache"
-
RPROVIDES_${PN} = "hotplug udev"
RPROVIDES_eudev-hwdb += "udev-hwdb"
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb b/import-layers/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
index ae125507b..43a1cff73 100644
--- a/import-layers/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -1,4 +1,5 @@
SUMMARY = "Extra machine specific configuration files"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
index 3b965c50b..6fc6f6e1a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
@@ -1,4 +1,5 @@
SUMMARY = "manage symlinks in /etc/rcN.d"
+HOMEPAGE = "http://github.com/philb/update-rc.d/"
DESCRIPTION = "update-rc.d is a utility that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
SECTION = "base"
@@ -15,6 +16,7 @@ SRC_URI = "git://github.com/philb/update-rc.d.git \
file://check-if-symlinks-are-valid.patch \
file://fix-to-handle-priority-numbers-correctly.patch \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
index 63302a9fe..f0ffd255f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
@@ -1,4 +1,5 @@
SUMMARY = "A suite of basic system administration utilities"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
commonly found on most Linux systems. Some of the more important utilities include \
disk partitioning, kernel message management, filesystem creation, and system login."
@@ -33,9 +34,10 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
util-linux-partx util-linux-hwclock util-linux-mountpoint \
- util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"
+ util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit \
+ util-linux-ionice util-linux-switch-root"
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
-PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
+PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
PACKAGES_DYNAMIC = "^util-linux-lib.*"
@@ -91,6 +93,9 @@ FILES_util-linux-findfs = "${sbindir}/findfs"
FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
FILES_util-linux-runuser = "${sbindir}/runuser"
FILES_util-linux-prlimit = "${bindir}/prlimit"
+FILES_util-linux-ionice = "${bindir}/ionice"
+FILES_util-linux-su = "${bindir}/su.util-linux ${sysconfdir}/pam.d/su-l"
+CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
@@ -107,6 +112,8 @@ FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
+FILES_util-linux-switch-root = "${base_sbindir}/switch_root.${BPN}"
+
# Util-linux' blkid replaces the e2fsprogs one
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -116,11 +123,12 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
RDEPENDS_util-linux-reset += "ncurses"
RDEPENDS_util-linux-runuser += "libpam"
+RDEPENDS_util-linux-su += "libpam"
RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
-RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
-RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit"
+RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit util-linux-ionice util-linux-switch-root"
RRECOMMENDS_${PN}_class-native = ""
RRECOMMENDS_${PN}_class-nativesdk = ""
@@ -182,6 +190,12 @@ do_install () {
install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
fi
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
+ # Required for "su -" aka "su --login" because
+ # otherwise it uses "other", which has "auth pam_deny.so"
+ # and thus prevents the operation.
+ ln -s su ${D}${sysconfdir}/pam.d/su-l
+ fi
}
# reset and nologin causes a conflict with ncurses-native and shadow-native
@@ -290,7 +304,7 @@ python populate_packages_prepend() {
}
RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
-RDEPENDS_${PN}-ptest = "bash grep coreutils"
+RDEPENDS_${PN}-ptest = "bash grep coreutils which util-linux-blkid util-linux-fsck btrfs-tools"
do_compile_ptest() {
oe_runmake buildtest-TESTS
@@ -298,23 +312,30 @@ do_compile_ptest() {
do_install_ptest() {
mkdir -p ${D}${PTEST_PATH}/tests/ts
- find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
- cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
- cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
- cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
- cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+ find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+ find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+ find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
- list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
- # The following tests are not installed yet:
- # blkid scsi_debug module dependent
- # cramfs gcc dependent
- # eject gcc dependent
- # fdisk scsi_debug module and gcc dependent
- # lscpu gcc dependant
- # libmount uuidgen dependent
- # mount gcc dependant
- # partx blkid dependant
- for d in $list; do
- cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
- done
+ cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/
+ cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+ cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/
+ cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH}
+
+ # The original paths of executables to be tested point to a local folder containing
+ # the executables. We want to test the installed executables, not the local copies.
+ # So strip the paths, the executables will be located via "which"
+ sed -i \
+ -e '/^TS_CMD/ s|$top_builddir/||g' \
+ -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
+
+ # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]'
+ sed -i -e \
+ '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \
+ ${D}${PTEST_PATH}/tests/functions.sh
+
+ # "kill -L" behaves differently than "/bin/kill -L" so we need an additional fix
+ sed -i -e \
+ '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
new file mode 100644
index 000000000..b9fa1cace
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
@@ -0,0 +1,21 @@
+getrandom() is only available in glibc 2.25+ and uninative may relocate
+binaries onto systems that don't have this function. For now, force the
+code to the older codepath until we can come up with a better solution
+for this kind of issue.
+
+Upstream-Status: Inappropriate
+RP
+2016/8/15
+
+Index: util-linux-2.30/configure.ac
+===================================================================
+--- util-linux-2.30.orig/configure.ac
++++ util-linux-2.30/configure.ac
+@@ -399,7 +399,6 @@ AC_CHECK_FUNCS([ \
+ getdtablesize \
+ getexecname \
+ getmntinfo \
+- getrandom \
+ getrlimit \
+ getsgnam \
+ inotify_init \
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
deleted file mode 100644
index a6fde5d9c..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-This patch adds error() API implementation for non-glibc system C libs
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- misc-utils/test_uuidd.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 61 insertions(+), 1 deletion(-)
-
-diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c
-index 36f3b3d..7d579ce 100644
---- a/misc-utils/test_uuidd.c
-+++ b/misc-utils/test_uuidd.c
-@@ -23,7 +23,6 @@
- *
- * make uuidd uuidgen localstatedir=/var
- */
--#include <error.h>
- #include <pthread.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -38,6 +37,17 @@
- #include "xalloc.h"
- #include "strutils.h"
-
-+#ifdef __GLIBC__
-+#include <error.h>
-+#else
-+extern void (*error_print_progname)(void);
-+extern unsigned int error_message_count;
-+extern int error_one_per_line;
-+
-+void error(int, int, const char *, ...);
-+void error_at_line(int, int, const char *, unsigned int, const char *, ...);
-+#endif
-+
- #define LOG(level,args) if (loglev >= level) { fprintf args; }
-
- size_t nprocesses = 4;
-@@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj)
- fprintf(stderr, "}\n");
- }
-
-+#ifndef __GLIBC__
-+extern char *__progname;
-+
-+void (*error_print_progname)(void) = 0;
-+unsigned int error_message_count = 0;
-+int error_one_per_line = 0;
-+
-+static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
-+{
-+ if (file && error_one_per_line) {
-+ static const char *oldfile;
-+ static unsigned int oldline;
-+ if (line == oldline && strcmp(file, oldfile) == 0)
-+ return;
-+ oldfile = file;
-+ oldline = line;
-+ }
-+ if (error_print_progname)
-+ error_print_progname();
-+ else
-+ fprintf(stderr, "%s: ", __progname);
-+ if (file)
-+ fprintf(stderr, "%s:%u: ", file, line);
-+ vfprintf(stderr, fmt, ap);
-+ if (e)
-+ fprintf(stderr, ": %s", strerror(e));
-+ putc('\n', stderr);
-+ fflush(stderr);
-+ error_message_count++;
-+ if (status)
-+ exit(status);
-+}
-+
-+void error(int status, int e, const char *fmt, ...)
-+{
-+ va_list ap;
-+ va_start(ap,fmt);
-+ eprint(status, e, 0, 0, fmt, ap);
-+ va_end(ap);
-+}
-+
-+void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...)
-+{
-+ va_list ap;
-+ va_start(ap,fmt);
-+ eprint(status, e, file, line, fmt, ap);
-+ va_end(ap);
-+}
-+#endif /* __GLIBC__ */
-+
- int main(int argc, char *argv[])
- {
- size_t i, nfailed = 0, nignored = 0;
---
-2.8.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
index 1395b473f..39449d9ac 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.29.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
@@ -1,4 +1,4 @@
-MAJOR_VERSION = "2.29"
+MAJOR_VERSION = "2.30"
require util-linux.inc
# To support older hosts, we need to patch and/or revert
@@ -14,10 +14,10 @@ SRC_URI += "file://configure-sbindir.patch \
file://run-ptest \
file://display_testname_for_subtest.patch \
file://avoid_parallel_tests.patch \
- file://uuid-test-error-api.patch \
"
-SRC_URI[md5sum] = "0cbb6d16ab9c5736e5649ef1264bee6e"
-SRC_URI[sha256sum] = "0ce40600b934ec2fecfa6bfc4efe6982d051ba96c2832b05201347aec582f54f"
+SRC_URI_append_class-native = " file://no_getrandom.patch"
+SRC_URI[md5sum] = "eaa3429150268027908a1b8ae6ee9a62"
+SRC_URI[sha256sum] = "c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d"
CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
diff --git a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb
index ba216f679..641051988 100644
--- a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb
@@ -45,6 +45,11 @@ do_install_ptest() {
install ${B}/minigzip ${D}${PTEST_PATH}
install ${B}/examplesh ${D}${PTEST_PATH}
install ${B}/minigzipsh ${D}${PTEST_PATH}
+
+ # Remove buildhost references...
+ sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ ${D}${PTEST_PATH}/Makefile
}
# Move zlib shared libraries for target builds to $base_libdir so the library
OpenPOWER on IntegriCloud