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/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch122
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch134
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch53
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch481
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch95
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch81
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch143
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig572
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb (renamed from import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb)29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb)36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch35
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb)13
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch34
-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.3.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb (renamed from import-layers/yocto-poky/meta/recipes-core/expat/expat.inc)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch321
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb)5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc60
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch6
-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.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch6
-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.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch6
-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/0026-reset-dl_load_write_lock-after-forking.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch)29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch)27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch40
-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/0030-plural_c_no_preprocessor_lines.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch419
-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_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh58
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb21
-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.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch269
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch180
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch103
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch291
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch590
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch67
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb (renamed from import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb)21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb (renamed from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h (renamed from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h (renamed from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h (renamed from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch (renamed from import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb6
-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/ncurses.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb (renamed from import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb)3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb2
-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-boot_237.bb70
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch)21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch12
-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-main-skip-many-initialization-steps-when-running-in-.patch163
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch81
-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/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch)9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch78
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch)8
-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.patch40
-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-Revert-udev-remove-userspace-firmware-loading-suppor.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch)204
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch45
-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-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch155
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch)86
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch)18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch)55
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch)22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch)16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch)22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch272
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch203
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch173
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb (renamed from import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb)286
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb (renamed from import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb)14
-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.inc29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch10
-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_2.32.bb (renamed from import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb)7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch13
231 files changed, 4990 insertions, 6354 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
deleted file mode 100644
index 5715378af..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Tue, 28 Feb 2017 10:40:37 +0800
-Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
-
-IPv6 routes need the device argument for link-local routes, or they
-cannot be used at all. E.g. "gateway fe80::def" seems to be used in
-some places, but kernel refuses to insert the route unless device
-name is explicitly specified in the route addition.
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- networking/ifupdown.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/networking/ifupdown.c b/networking/ifupdown.c
-index 17bc4e9..a00f68d 100644
---- a/networking/ifupdown.c
-+++ b/networking/ifupdown.c
-@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
- # if ENABLE_FEATURE_IFUPDOWN_IP
- result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec);
- result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec);
-- /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */
-- result += execute("[[ip route add ::/0 via %gateway%]][[ metric %metric%]]", ifd, exec);
-+ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec);
- # else
- result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
- result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec);
-@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
- "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec);
- result += execute("ip link set %iface% up", ifd, exec);
- result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec);
-- result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
-+ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec);
- return ((result == 4) ? 4 : 0);
- }
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
index a83620e85..a83620e85 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
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 a6bfd46b6..d1675c37a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -106,7 +106,7 @@ python () {
}
do_prepare_config () {
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
export KCONFIG_NOTIMESTAMP=1
fi
sed -e '/CONFIG_STATIC/d' \
@@ -146,7 +146,7 @@ do_configure () {
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ 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
@@ -158,6 +158,12 @@ do_compile() {
cp .config .config.orig
oe_runmake busybox.cfg.suid
oe_runmake busybox.cfg.nosuid
+
+ # workaround for suid bug 10346
+ if ! grep -q "CONFIG_SH_IS_NONE" busybox.cfg.nosuid; then
+ echo "CONFIG_SH_IS_NONE" >> busybox.cfg.suid
+ fi
+
for i in `cat busybox.cfg.suid busybox.cfg.nosuid`; do
echo "# $i is not set" >> .config.disable.apps
done
@@ -167,12 +173,24 @@ do_compile() {
cat busybox.cfg.$s | while read item; do
grep -w "$item" .config.orig
done > .config.app.$s
+
+ # workaround for suid bug 10346
+ if [ "$s" = "suid" ] ; then
+ sed "s/.*CONFIG_SH_IS_NONE.*$/CONFIG_SH_IS_NONE=y/" -i .config.app.suid
+ fi
+
merge_config.sh -m .config.nonapps .config.app.$s
oe_runmake busybox_unstripped
mv busybox_unstripped busybox.$s
oe_runmake busybox.links
mv busybox.links busybox.links.$s
done
+
+ # hard fail if sh is being linked to the suid busybox (detects bug 10346)
+ if grep -q -x "/bin/sh" busybox.links.suid; then
+ bbfatal "busybox suid binary incorrectly provides /bin/sh"
+ fi
+
# copy .config.orig back to .config, because the install process may check this file
cp .config.orig .config
# cleanup
@@ -206,7 +224,7 @@ do_install () {
install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox.nosuid ${D}${base_bindir}/sh
fi
# Keep a default busybox for people who want to invoke busybox directly.
@@ -220,7 +238,7 @@ do_install () {
install -m 0755 ${B}/busybox ${D}${base_bindir}
fi
install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox ${D}${base_bindir}/sh
fi
# We make this symlink here to eliminate the error when upgrading together
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
deleted file mode 100644
index 78520f0d9..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From e1d426fd65c00a6d01a10d85edf8a294ae8a2d2b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 24 Apr 2016 18:19:49 +0200
-Subject: [PATCH] flock: fix -c; improve error handling of fork+exec
-
-function old new delta
-flock_main 254 334 +80
-
-Upstream-Status: Backport
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util-linux/flock.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/util-linux/flock.c b/util-linux/flock.c
-index 05a747f..539a835 100644
---- a/util-linux/flock.c
-+++ b/util-linux/flock.c
-@@ -57,7 +57,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- /* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
- * we use "+" in order to support "flock -opt FILE PROG -with-opts",
- * we need to remove -c by hand.
-- * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
- */
- if (argv[0]
- && argv[0][0] == '-'
-@@ -66,6 +65,9 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- )
- ) {
- argv++;
-+ if (argv[1])
-+ bb_error_msg_and_die("-c takes only one argument");
-+ opt |= OPT_c;
- }
-
- if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
-@@ -90,8 +92,21 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- bb_perror_nomsg_and_die();
- }
-
-- if (argv[0])
-+ if (argv[0]) {
-+ if (!(opt & OPT_c)) {
-+ int rc = spawn_and_wait(argv);
-+ if (rc < 0)
-+ bb_simple_perror_msg(argv[0]);
-+ return rc;
-+ }
-+ /* -c 'PROG ARGS' means "run sh -c 'PROG ARGS'" */
-+ argv -= 2;
-+ argv[0] = (char*)get_shell_name();
-+ argv[1] = (char*)"-c";
-+ /* argv[2] = "PROG ARGS"; */
-+ /* argv[3] = NULL; */
- return spawn_and_wait(argv);
-+ }
-
- return EXIT_SUCCESS;
- }
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
deleted file mode 100644
index 812a50748..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 01:30:34 +0200
-Subject: [PATCH] ip: fix an improper optimization: req.r.rtm_scope may be
- nonzero here
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
-Upstream-Status: Backport
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-
- networking/libiproute/iproute.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index e674e9a0d..48dc6e3d9 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -362,10 +362,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-
- if (cmd != RTM_DELROUTE) {
-+ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- if (RTPROT_BOOT != 0)
- req.r.rtm_protocol = RTPROT_BOOT;
-- if (RT_SCOPE_UNIVERSE != 0)
-- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- if (RTN_UNICAST != 0)
- req.r.rtm_type = RTN_UNICAST;
- }
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
deleted file mode 100644
index 66bc76e65..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From ce4bc1ed048233e89ee4cb95830bf6f01d523d1e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Wed, 30 Dec 2015 17:32:51 +0100
-Subject: [PATCH] iproute: support "scope". Closes 8561
-
-function old new delta
-iproute_modify 1051 1120 +69
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Modified patch to build against busybox 1.24.1:
-- s/invarg_1_to_2/invarg
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
- networking/libiproute/iproute.c | 52 ++++++++++++++++++++++++++---------------
- 1 file changed, 33 insertions(+), 19 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index d232ee6fd..82827488f 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -313,12 +313,13 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- static int iproute_modify(int cmd, unsigned flags, char **argv)
- {
- static const char keywords[] ALIGN1 =
-- "src\0""via\0""mtu\0""lock\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
-+ "src\0""via\0""mtu\0""lock\0""scope\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
- "dev\0""oif\0""to\0""metric\0""onlink\0";
- enum {
- ARG_src,
- ARG_via,
- ARG_mtu, PARM_lock,
-+ ARG_scope,
- ARG_protocol,
- IF_FEATURE_IP_RULE(ARG_table,)
- ARG_dev,
-@@ -344,6 +345,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
- unsigned mxlock = 0;
- char *d = NULL;
- smalluint ok = 0;
-+ smalluint scope_ok = 0;
- int arg;
-
- memset(&req, 0, sizeof(req));
-@@ -352,15 +354,18 @@ IF_FEATURE_IP_RULE(ARG_table,)
- req.n.nlmsg_flags = NLM_F_REQUEST | flags;
- req.n.nlmsg_type = cmd;
- req.r.rtm_family = preferred_family;
-- if (RT_TABLE_MAIN) /* if it is zero, memset already did it */
-+ if (RT_TABLE_MAIN != 0) /* if it is zero, memset already did it */
- req.r.rtm_table = RT_TABLE_MAIN;
-- if (RT_SCOPE_NOWHERE)
-+ if (RT_SCOPE_NOWHERE != 0)
- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-
- if (cmd != RTM_DELROUTE) {
-- req.r.rtm_protocol = RTPROT_BOOT;
-- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
-- req.r.rtm_type = RTN_UNICAST;
-+ if (RTPROT_BOOT != 0)
-+ req.r.rtm_protocol = RTPROT_BOOT;
-+ if (RT_SCOPE_UNIVERSE != 0)
-+ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
-+ if (RTN_UNICAST != 0)
-+ req.r.rtm_type = RTN_UNICAST;
- }
-
- mxrta->rta_type = RTA_METRICS;
-@@ -393,6 +398,13 @@ IF_FEATURE_IP_RULE(ARG_table,)
- }
- mtu = get_unsigned(*argv, "mtu");
- rta_addattr32(mxrta, sizeof(mxbuf), RTAX_MTU, mtu);
-+ } else if (arg == ARG_scope) {
-+ uint32_t scope;
-+ NEXT_ARG();
-+ if (rtnl_rtscope_a2n(&scope, *argv))
-+ invarg(*argv, "scope");
-+ req.r.rtm_scope = scope;
-+ scope_ok = 1;
- } else if (arg == ARG_protocol) {
- uint32_t prot;
- NEXT_ARG();
-@@ -469,20 +481,22 @@ IF_FEATURE_IP_RULE(ARG_table,)
- addattr_l(&req.n, sizeof(req), RTA_METRICS, RTA_DATA(mxrta), RTA_PAYLOAD(mxrta));
- }
-
-- if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
-- req.r.rtm_scope = RT_SCOPE_HOST;
-- else
-- if (req.r.rtm_type == RTN_BROADCAST
-- || req.r.rtm_type == RTN_MULTICAST
-- || req.r.rtm_type == RTN_ANYCAST
-- ) {
-- req.r.rtm_scope = RT_SCOPE_LINK;
-- }
-- else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
-- if (cmd == RTM_DELROUTE)
-- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-- else if (!(ok & gw_ok))
-+ if (!scope_ok) {
-+ if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
-+ req.r.rtm_scope = RT_SCOPE_HOST;
-+ else
-+ if (req.r.rtm_type == RTN_BROADCAST
-+ || req.r.rtm_type == RTN_MULTICAST
-+ || req.r.rtm_type == RTN_ANYCAST
-+ ) {
- req.r.rtm_scope = RT_SCOPE_LINK;
-+ }
-+ else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
-+ if (cmd == RTM_DELROUTE)
-+ req.r.rtm_scope = RT_SCOPE_NOWHERE;
-+ else if (!(ok & gw_ok))
-+ req.r.rtm_scope = RT_SCOPE_LINK;
-+ }
- }
-
- if (req.r.rtm_family == AF_UNSPEC) {
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
deleted file mode 100644
index aac5b4029..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From b5a9234272e6084557224c73ab7737ed47f09848 Mon Sep 17 00:00:00 2001
-From: Lukasz Nowak <lnowak@tycoint.com>
-Date: Wed, 23 Nov 2016 12:48:21 +0000
-Subject: [PATCH v2] libiproute: handle table ids larger than 255
-
-Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
-In order to preserve compatibility, the old 8-bit field: rtm_table is still
-in use when table id is lower than 256.
-
-Add support for the 32-bit table id (RTA_TABLE attribute) in:
-- ip route print
-- ip route modify
-- ip rule print
-- ip rule modify
-
-Add printing of table ids to ip route.
-
-Changes are compatible with the mainline iproute2 utilities.
-
-These changes are required for compatibility with ConnMan, which by default
-uses table ids greater than 255.
-
-Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2016-December/084989.html]
-
-Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
----
- networking/libiproute/iproute.c | 24 ++++++++++++++++++++----
- networking/libiproute/iprule.c | 11 +++++++++--
- 2 files changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index 6ecd5f7..d5af498 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -87,6 +87,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- inet_prefix dst;
- inet_prefix src;
- int host_len = -1;
-+ uint32_t tid;
-
- if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -99,6 +100,14 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- if (len < 0)
- bb_error_msg_and_die("wrong nlmsg len %d", len);
-
-+ memset(tb, 0, sizeof(tb));
-+ parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-+
-+ if (tb[RTA_TABLE])
-+ tid = *(uint32_t *)RTA_DATA(tb[RTA_TABLE]);
-+ else
-+ tid = r->rtm_table;
-+
- if (r->rtm_family == AF_INET6)
- host_len = 128;
- else if (r->rtm_family == AF_INET)
-@@ -128,7 +137,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- }
- }
- } else {
-- if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
-+ if (G_filter.tb > 0 && G_filter.tb != tid) {
- return 0;
- }
- }
-@@ -157,10 +166,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- return 0;
- }
-
-- memset(tb, 0, sizeof(tb));
- memset(&src, 0, sizeof(src));
- memset(&dst, 0, sizeof(dst));
-- parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-
- if (tb[RTA_SRC]) {
- src.bitlen = r->rtm_src_len;
-@@ -283,6 +290,10 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- if (tb[RTA_OIF]) {
- printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
- }
-+#if ENABLE_FEATURE_IP_RULE
-+ if (tid && tid != RT_TABLE_MAIN && !G_filter.tb)
-+ printf("table %s ", rtnl_rttable_n2a(tid));
-+#endif
-
- /* Todo: parse & show "proto kernel", "scope link" here */
-
-@@ -434,7 +445,12 @@ IF_FEATURE_IP_RULE(ARG_table,)
- NEXT_ARG();
- if (rtnl_rttable_a2n(&tid, *argv))
- invarg(*argv, "table");
-- req.r.rtm_table = tid;
-+ if (tid < 256)
-+ req.r.rtm_table = tid;
-+ else {
-+ req.r.rtm_table = RT_TABLE_UNSPEC;
-+ addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+ }
- #endif
- } else if (arg == ARG_dev || arg == ARG_oif) {
- NEXT_ARG();
-diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
-index 774a3e2..3fac7c5 100644
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
- printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- }
-
-- if (r->rtm_table)
-+ if (tb[RTA_TABLE])
-+ printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+ else if (r->rtm_table)
- printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
-
- if (tb[RTA_FLOW]) {
-@@ -259,7 +261,12 @@ static int iprule_modify(int cmd, char **argv)
- NEXT_ARG();
- if (rtnl_rttable_a2n(&tid, *argv))
- invarg(*argv, "table ID");
-- req.r.rtm_table = tid;
-+ if (tid < 256)
-+ req.r.rtm_table = tid;
-+ else {
-+ req.r.rtm_table = RT_TABLE_UNSPEC;
-+ addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+ }
- table_ok = 1;
- } else if (key == ARG_dev ||
- key == ARG_iif
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
deleted file mode 100644
index 4f539848c..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 Aug 2016 23:40:43 -0400
-Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
- testcase failure
-
-This patch fix "sed n (flushes pattern space, terminates early)"
-testcase failure. We can see it at:
-
- https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- editors/sed.c | 19 ++++++++++---------
- testsuite/sed.tests | 6 +-----
- 2 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/editors/sed.c b/editors/sed.c
-index 7bbf820..259c39c 100644
---- a/editors/sed.c
-+++ b/editors/sed.c
-@@ -1274,16 +1274,17 @@ static void process_files(void)
- case 'n':
- if (!G.be_quiet)
- sed_puts(pattern_space, last_gets_char);
-- if (next_line) {
-- free(pattern_space);
-- pattern_space = next_line;
-- last_gets_char = next_gets_char;
-- next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-- substituted = 0;
-- linenum++;
-- break;
-+ if (next_line == NULL) {
-+ /* If no next line, jump to end of script and exit. */
-+ goto discard_line;
- }
-- /* fall through */
-+ free(pattern_space);
-+ pattern_space = next_line;
-+ last_gets_char = next_gets_char;
-+ next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-+ substituted = 0;
-+ linenum++;
-+ break;
-
- /* Quit. End of script, end of input. */
- case 'q':
-diff --git a/testsuite/sed.tests b/testsuite/sed.tests
-index 34479e5..96ff7a5 100755
---- a/testsuite/sed.tests
-+++ b/testsuite/sed.tests
-@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
- testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
- "1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
-
--test x"$SKIP_KNOWN_BUGS" = x"" && {
--# Normal sed end-of-script doesn't print "c" because n flushed the pattern
--# space. If n hits EOF, pattern space is empty when script ends.
--# Query: how does this interact with no newline at EOF?
- testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
- "a\nb\nb\nc\n" "" "a\nb\nc\n"
--}
-+
- # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
- # GNU sed: N flushes pattern space, therefore c is printed too @ script end
- testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
deleted file mode 100644
index 828694cbb..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-busybox1.24.1: Fix busybox - (local) cmdline stack buffer overwrite
-
-[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=9071
-
-busybox - (local) cmdline stack buffer overwrite
-
-Busybox provides an `arp` applet which is missing an array bounds check for
-command-line parameter `IFNAME`. It is therefore vulnerable to a command-line
-based local stack buffer overwrite effectively allowing local users to write
-past a 16 bytes fixed stack buffer. This leads to two scenarios, one (A) where
-an IOCTL for GET_HW_ADDRESS (`SIOCGIFHWADDR`) fails and results in a corrupted
-`va_list` being passed to `*printf()` and one (B) where an attacker might provide
-valid params for the IOCTL and trick the program to proceed and result in a
-`RET eip overwrite` eventually gaining code execution.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/networking/arp.c?id=88e2b1cb626761b1924305b761a5dfc723613c4e]
-BUG: BUG9071
-Signed-off-by: Martin Balik <martin.balik@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
---
-
-diff --git a/networking/arp.c b/networking/arp.c
-index 0099aa5..87eb327 100644
---- a/networking/arp.c
-+++ b/networking/arp.c
-@@ -176,7 +176,7 @@ static int arp_del(char **args)
- if (flags == 0)
- flags = 3;
-
-- strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+ strncpy_IFNAMSIZ(req.arp_dev, device);
-
- err = -1;
-
-@@ -217,7 +217,7 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa)
- struct ifreq ifr;
- const struct hwtype *xhw;
-
-- strcpy(ifr.ifr_name, ifname);
-+ strncpy_IFNAMSIZ(ifr.ifr_name, ifname);
- ioctl_or_perror_and_die(sockfd, SIOCGIFHWADDR, &ifr,
- "can't get HW-Address for '%s'", ifname);
- if (hw_set && (ifr.ifr_hwaddr.sa_family != hw->type)) {
-@@ -330,7 +330,7 @@ static int arp_set(char **args)
- /* Fill in the remainder of the request. */
- req.arp_flags = flags;
-
-- strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+ strncpy_IFNAMSIZ(req.arp_dev, device);
-
- /* Call the kernel. */
- if (option_mask32 & ARP_OPT_v)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
new file mode 100755
index 000000000..0926107be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
@@ -0,0 +1,481 @@
+busybox-1.27.2: Fix CVE-2011-5325
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=8411
+
+libarchive: do not extract unsafe symlinks
+
+Prevent unsafe links extracting unless env variable $EXTRACT_UNSAFE_SYMLINKS=1
+is not set. Untarring file with -C DESTDIR parameter could be extracted with
+unwanted symlinks. This doesn't feel right, and IIRC GNU tar doesn't do that.
+Include necessary changes from previous commits.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7]
+CVE: CVE-2011-5325
+bug: 8411
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+
+diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src
+index 942e755..e1a8a75 100644
+--- a/archival/libarchive/Kbuild.src
++++ b/archival/libarchive/Kbuild.src
+@@ -12,6 +12,8 @@ COMMON_FILES:= \
+ data_extract_all.o \
+ data_extract_to_stdout.o \
+ \
++ unsafe_symlink_target.o \
++\
+ filter_accept_all.o \
+ filter_accept_list.o \
+ filter_accept_reject_list.o \
+diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
+index 1830ffb..b828b65 100644
+--- a/archival/libarchive/data_extract_all.c
++++ b/archival/libarchive/data_extract_all.c
+@@ -128,10 +128,9 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ res = link(hard_link, dst_name);
+ if (res != 0 && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) {
+ /* shared message */
+- bb_perror_msg("can't create %slink "
+- "%s to %s", "hard",
+- dst_name,
+- hard_link);
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "hard", dst_name, hard_link
++ );
+ }
+ /* Hardlinks have no separate mode/ownership, skip chown/chmod */
+ goto ret;
+@@ -178,15 +177,17 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ case S_IFLNK:
+ /* Symlink */
+ //TODO: what if file_header->link_target == NULL (say, corrupted tarball?)
+- res = symlink(file_header->link_target, dst_name);
+- if (res != 0
+- && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
+- ) {
+- /* shared message */
+- bb_perror_msg("can't create %slink "
+- "%s to %s", "sym",
+- dst_name,
+- file_header->link_target);
++ if (!unsafe_symlink_target(file_header->link_target)) {
++ res = symlink(file_header->link_target, dst_name);
++ if (res != 0
++ && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
++ ) {
++ /* shared message */
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "sym",
++ dst_name, file_header->link_target
++ );
++ }
+ }
+ break;
+ case S_IFSOCK:
+diff --git a/archival/libarchive/unsafe_symlink_target.c b/archival/libarchive/unsafe_symlink_target.c
+new file mode 100644
+index 0000000..ee46e28
+--- /dev/null
++++ b/archival/libarchive/unsafe_symlink_target.c
+@@ -0,0 +1,48 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
++ */
++#include "libbb.h"
++#include "bb_archive.h"
++
++int FAST_FUNC unsafe_symlink_target(const char *target)
++{
++ const char *dot;
++
++ if (target[0] == '/') {
++ const char *var;
++unsafe:
++ var = getenv("EXTRACT_UNSAFE_SYMLINKS");
++ if (var) {
++ if (LONE_CHAR(var, '1'))
++ return 0; /* pretend it's safe */
++ return 1; /* "UNSAFE!" */
++ }
++ bb_error_msg("skipping unsafe symlink to '%s' in archive,"
++ " set %s=1 to extract",
++ target,
++ "EXTRACT_UNSAFE_SYMLINKS"
++ );
++ /* Prevent further messages */
++ setenv("EXTRACT_UNSAFE_SYMLINKS", "0", 0);
++ return 1; /* "UNSAFE!" */
++ }
++
++ dot = target;
++ for (;;) {
++ dot = strchr(dot, '.');
++ if (!dot)
++ return 0; /* safe target */
++
++ /* Is it a path component starting with ".."? */
++ if ((dot[1] == '.')
++ && (dot == target || dot[-1] == '/')
++ /* Is it exactly ".."? */
++ && (dot[2] == '/' || dot[2] == '\0')
++ ) {
++ goto unsafe;
++ }
++ /* NB: it can even be trailing ".", should only add 1 */
++ dot += 1;
++ }
++}
+\ No newline at end of file
+diff --git a/archival/unzip.c b/archival/unzip.c
+index 9037262..270e261 100644
+--- a/archival/unzip.c
++++ b/archival/unzip.c
+@@ -335,6 +335,44 @@ static void unzip_create_leading_dirs(const char *fn)
+ free(name);
+ }
+
++static void unzip_extract_symlink(zip_header_t *zip, const char *dst_fn)
++{
++ char *target;
++
++ if (zip->fmt.ucmpsize > 0xfff) /* no funny business please */
++ bb_error_msg_and_die("bad archive");
++
++ if (zip->fmt.method == 0) {
++ /* Method 0 - stored (not compressed) */
++ target = xzalloc(zip->fmt.ucmpsize + 1);
++ xread(zip_fd, target, zip->fmt.ucmpsize);
++ } else {
++#if 1
++ bb_error_msg_and_die("compressed symlink is not supported");
++#else
++ transformer_state_t xstate;
++ init_transformer_state(&xstate);
++ xstate.mem_output_size_max = zip->fmt.ucmpsize;
++ /* ...unpack... */
++ if (!xstate.mem_output_buf)
++ WTF();
++ target = xstate.mem_output_buf;
++ target = xrealloc(target, xstate.mem_output_size + 1);
++ target[xstate.mem_output_size] = '\0';
++#endif
++ }
++ if (!unsafe_symlink_target(target)) {
++//TODO: libbb candidate
++ if (symlink(target, dst_fn)) {
++ /* shared message */
++ bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++ "sym", dst_fn, target
++ );
++ }
++ }
++ free(target);
++}
++
+ static void unzip_extract(zip_header_t *zip, int dst_fd)
+ {
+ transformer_state_t xstate;
+@@ -813,7 +851,7 @@ int unzip_main(int argc, char **argv)
+ }
+ check_file:
+ /* Extract file */
+- if (stat(dst_fn, &stat_buf) == -1) {
++ if (lstat(dst_fn, &stat_buf) == -1) {
+ /* File does not exist */
+ if (errno != ENOENT) {
+ bb_perror_msg_and_die("can't stat '%s'", dst_fn);
+@@ -834,6 +872,7 @@ int unzip_main(int argc, char **argv)
+ goto do_open_and_extract;
+ printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
+ my_fgets80(key_buf);
++//TODO: redo lstat + ISREG check! user input could have taken a long time!
+
+ switch (key_buf[0]) {
+ case 'A':
+@@ -842,7 +881,8 @@ int unzip_main(int argc, char **argv)
+ do_open_and_extract:
+ unzip_create_leading_dirs(dst_fn);
+ #if ENABLE_FEATURE_UNZIP_CDF
+- dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
++ if (!S_ISLNK(file_mode))
++ dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
+ #else
+ dst_fd = xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC);
+ #endif
+@@ -852,10 +892,18 @@ int unzip_main(int argc, char **argv)
+ ? " extracting: %s\n"
+ : */ " inflating: %s\n", dst_fn);
+ }
+- unzip_extract(&zip, dst_fd);
+- if (dst_fd != STDOUT_FILENO) {
+- /* closing STDOUT is potentially bad for future business */
+- close(dst_fd);
++#if ENABLE_FEATURE_UNZIP_CDF
++ if (S_ISLNK(file_mode)) {
++ if (dst_fd != STDOUT_FILENO) /* no -p */
++ unzip_extract_symlink(&zip, dst_fn);
++ } else
++#endif
++ {
++ unzip_extract(&zip, dst_fd);
++ if (dst_fd != STDOUT_FILENO) {
++ /* closing STDOUT is potentially bad for future business */
++ close(dst_fd);
++ };
+ }
+ break;
+
+diff --git a/coreutils/link.c b/coreutils/link.c
+index ac3ef85..aab249d 100644
+--- a/coreutils/link.c
++++ b/coreutils/link.c
+@@ -32,9 +32,8 @@ int link_main(int argc UNUSED_PARAM, char **argv)
+ argv += optind;
+ if (link(argv[0], argv[1]) != 0) {
+ /* shared message */
+- bb_perror_msg_and_die("can't create %slink "
+- "%s to %s", "hard",
+- argv[1], argv[0]
++ bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++ "hard", argv[1], argv[0]
+ );
+ }
+ return EXIT_SUCCESS;
+diff --git a/include/bb_archive.h b/include/bb_archive.h
+index 2b9c5f0..1e4da3c 100644
+--- a/include/bb_archive.h
++++ b/include/bb_archive.h
+@@ -196,6 +196,7 @@ void seek_by_jump(int fd, off_t amount) FAST_FUNC;
+ void seek_by_read(int fd, off_t amount) FAST_FUNC;
+
+ const char *strip_unsafe_prefix(const char *str) FAST_FUNC;
++int unsafe_symlink_target(const char *target) FAST_FUNC;
+
+ void data_align(archive_handle_t *archive_handle, unsigned boundary) FAST_FUNC;
+ const llist_t *find_list_entry(const llist_t *list, const char *filename) FAST_FUNC;
+diff --git a/libbb/copy_file.c b/libbb/copy_file.c
+index 23c0f83..be90066 100644
+--- a/libbb/copy_file.c
++++ b/libbb/copy_file.c
+@@ -371,7 +371,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
+ int r = symlink(lpath, dest);
+ free(lpath);
+ if (r < 0) {
+- bb_perror_msg("can't create symlink '%s'", dest);
++ /* shared message */
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "sym", dest, lpath
++ );
+ return -1;
+ }
+ if (flags & FILEUTILS_PRESERVE_STATUS)
+diff --git a/testsuite/tar.tests b/testsuite/tar.tests
+index 9f7ce15..b7cd74c 100755
+--- a/testsuite/tar.tests
++++ b/testsuite/tar.tests
+@@ -10,9 +10,6 @@ unset LC_COLLATE
+ unset LC_ALL
+ umask 022
+
+-rm -rf tar.tempdir 2>/dev/null
+-mkdir tar.tempdir && cd tar.tempdir || exit 1
+-
+ # testing "test name" "script" "expected result" "file input" "stdin"
+
+ testing "Empty file is not a tarball" '\
+@@ -53,6 +50,7 @@ dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $?
+ "" ""
+ SKIP=
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input":
+ # GNU tar 1.26 records as hardlinks:
+ # input_hard2 -> input_hard1
+@@ -64,7 +62,6 @@ SKIP=
+ # We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing.
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks and repeated files" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ ln input_hard1 input_hard2
+ mkdir input_dir
+@@ -95,10 +92,11 @@ drwxr-xr-x input_dir
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ chmod 741 input_hard1
+ ln input_hard1 input_hard2
+@@ -128,10 +126,11 @@ Ok: 0
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar symlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_file
+ chmod 741 input_file
+ ln -s input_file input_soft
+@@ -159,10 +158,11 @@ lrwxrwxrwx input_file
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_TAR_LONG_OPTIONS
+ testing "tar --overwrite" "\
+-rm -rf input_* test.tar 2>/dev/null
+ ln input input_hard
+ tar cf test.tar input_hard
+ echo WRONG >input
+@@ -174,12 +174,13 @@ Ok
+ " \
+ "Ok\n" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ test x"$SKIP_KNOWN_BUGS" = x"" && {
+ # Needs to be run under non-root for meaningful test
+ optional FEATURE_TAR_CREATE
+ testing "tar writing into read-only dir" '\
+-rm -rf input_* test.tar 2>/dev/null
+ mkdir input_dir
+ >input_dir/input_file
+ chmod 550 input_dir
+@@ -201,7 +202,9 @@ dr-xr-x--- input_dir
+ "" ""
+ SKIP=
+ }
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Had a bug where on extract autodetect first "switched off" -z
+ # and then failed to recognize .tgz extension
+ optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ GUNZIP
+@@ -217,7 +220,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Do we detect XZ-compressed data (even w/o .tar.xz or txz extension)?
+ # (the uuencoded hello_world.txz contains one empty file named "hello_world")
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_XZ
+@@ -236,7 +241,9 @@ AAAEWVo=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # On extract, everything up to and including last ".." component is stripped
+ optional FEATURE_TAR_CREATE
+ testing "tar strips /../ on extract" "\
+@@ -255,7 +262,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # attack.tar.bz2 has symlink pointing to a system file
+ # followed by a regular file with the same name
+ # containing "root::0:0::/root:/bin/sh":
+@@ -270,6 +279,7 @@ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -281,12 +291,15 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
++
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # And same with -k
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar -k does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input -k 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
+-tar: can't open 'passwd': File exists
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -298,7 +311,9 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional UNICODE_SUPPORT FEATURE_TAR_GNU_EXTENSIONS FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
+ testing "Pax-encoded UTF8 names and symlinks" '\
+ tar xvf ../tar.utf8.tar.bz2 2>&1; echo $?
+@@ -309,17 +324,45 @@ rm -rf etc usr
+ ' "\
+ etc/ssl/certs/3b2716e5.0
+ etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
++tar: skipping unsafe symlink to '/usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ etc/ssl/certs/f80cc7f6.0
+ usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ 0
+ etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+-etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ etc/ssl/certs/f80cc7f6.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+-
+-cd .. && rm -rf tar.tempdir || exit 1
++mkdir tar.tempdir && cd tar.tempdir || exit 1
++optional UUDECODE FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
++testing "Symlink attack: create symlink and then write through it" '\
++exec 2>&1
++uudecode -o input && tar xvf input; echo $?
++ls /tmp/bb_test_evilfile
++ls bb_test_evilfile
++ls symlink/bb_test_evilfile
++' "\
++anything.txt
++symlink
++tar: skipping unsafe symlink to '/tmp' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
++symlink/bb_test_evilfile
++0
++ls: /tmp/bb_test_evilfile: No such file or directory
++ls: bb_test_evilfile: No such file or directory
++symlink/bb_test_evilfile
++" \
++"" "\
++begin-base64 644 tar_symlink_attack.tar.bz2
++QlpoOTFBWSZTWZgs7bQAALT/hMmQAFBAAf+AEMAGJPPv32AAAIAIMAC5thlR
++omAjAmCMADQT1BqNE0AEwAAjAEwElTKeo9NTR6h6gaeoA0DQNLVdwZZ5iNTk
++AQwCAV6S00QFJYhrlfFkVCEDEGtgNVqYrI0uK3ggnt30gqk4e1TTQm5QIAKa
++SJqzRGSFLMmOloHSAcvLiFxxRiQtQZF+qPxbo173ZDISOAoNoPN4PQPhBhKS
++n8fYaKlioCTzL2oXYczyUUIP4u5IpwoSEwWdtoA=
++====
++"
++SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+ exit $FAILCOUNT
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
deleted file mode 100644
index 84cae6aa2..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2147
-
-https://git.busybox.net/busybox/commit/?id=d474ffc
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/domain_codec.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
-+++ busybox-1.23.2/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- if (crtpos + *c + 1 > clen) /* label too long? abort */
- return NULL;
- if (dst)
-- memcpy(dst + len, c + 1, *c);
-+ /* \3com ---> "com." */
-+ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
- len += *c + 1;
- crtpos += *c + 1;
-- if (dst)
-- dst[len - 1] = '.';
- } else {
- /* NUL: end of current domain name */
- if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- crtpos = retpos;
- retpos = depth = 0;
- }
-- if (dst)
-+ if (dst && len != 0)
-+ /* \4host\3com\0\4host and we are at \0:
-+ * \3com was converted to "com.", change dot to space.
-+ */
- dst[len - 1] = ' ';
- }
-
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
- int len;
- uint8_t *encoded;
-
-+ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+ printf("NUL:'%s'\n", dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
- printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:"));
- printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
deleted file mode 100644
index b8349c04a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 11 Mar 2016 00:26:58 +0100
-Subject: [PATCH] udhcpc: fix a warning in debug code
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Upstream-Status: Backport
-CVE: CVE-2016-2147 regression fix
-
-https://git.busybox.net/busybox/commit/?id=1b7c17
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index cee31f1..5a923cc 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -7,6 +7,7 @@
- * Licensed under GPLv2 or later, see file LICENSE in this source tree.
- */
- #ifdef DNS_COMPR_TESTING
-+# define _GNU_SOURCE
- # define FAST_FUNC /* nothing */
- # define xmalloc malloc
- # include <stdlib.h>
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
deleted file mode 100644
index af04a7f5b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2148
-https://git.busybox.net/busybox/commit/?id=352f79
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c | 4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/common.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/common.c
-+++ busybox-1.23.2/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
- * udhcp_str2optset: to determine how many bytes to allocate.
- * xmalloc_optname_optval: to estimate string length
- * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
- * (len_of_option_as_string[opt_type]) and you know how wide string you need.
- */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
- [OPTION_S32] = 4,
- /* Just like OPTION_STRING, we use minimum length here */
- [OPTION_STATIC_ROUTES] = 5,
-- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */
-+ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */
-+ /* The above value was chosen as follows:
-+ * len_of_option_as_string[] for this option is >60: it's a string of the form
-+ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+ * Each additional ipv4 address takes 4 bytes in binary option and appends
-+ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
-+ * but this severely overestimates string length: instead of 16 bytes,
-+ * it adds >60 for every 4 bytes in binary option.
-+ * We cheat and declare here that option is in units of 12 bytes.
-+ * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
-+ * (Even 16 instead of 12 should work, but let's be paranoid).
-+ */
- };
-
-
-Index: busybox-1.23.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.23.2/networking/udhcp/dhcpc.c
-@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
- [OPTION_IP ] = sizeof("255.255.255.255 "),
- [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
-- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
- [OPTION_STRING ] = 1,
- [OPTION_STRING_HOST ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
- type = optflag->flags & OPTION_TYPE_MASK;
- optlen = dhcp_option_lengths[type];
- upper_length = len_of_option_as_string[type]
-- * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+ * ((unsigned)(len + optlen) / (unsigned)optlen);
-
- dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
- dest += sprintf(ret, "%s=", opt_name);
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
deleted file mode 100644
index 851bc20f7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-busybox1.24.1: Fix CVE-2016-6301
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1363710
-
-ntpd: NTP server denial of service flaw
-
-The busybox NTP implementation doesn't check the NTP mode of packets
-received on the server port and responds to any packet with the right
-size. This includes responses from another NTP server. An attacker can
-send a packet with a spoofed source address in order to create an
-infinite loop of responses between two busybox NTP servers. Adding
-more packets to the loop increases the traffic between the servers
-until one of them has a fully loaded CPU and/or network.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=150dc7a2b483b8338a3e185c478b4b23ee884e71]
-CVE: CVE-2016-6301
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/networking/ntpd.c b/networking/ntpd.c
-index 9732c9b..0f6a55f 100644
---- a/networking/ntpd.c
-+++ b/networking/ntpd.c
-@@ -1985,6 +1985,13 @@ recv_and_process_client_pkt(void /*int fd*/)
- goto bail;
- }
-
-+ /* Respond only to client and symmetric active packets */
-+ if ((msg.m_status & MODE_MASK) != MODE_CLIENT
-+ && (msg.m_status & MODE_MASK) != MODE_SYM_ACT
-+ ) {
-+ goto bail;
-+ }
-+
- query_status = msg.m_status;
- query_xmttime = msg.m_xmttime;
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
new file mode 100644
index 000000000..5a027c9bc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
@@ -0,0 +1,95 @@
+busybox-1.27.2: Fix CVE-2017-15873
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=10431
+
+bunzip2: fix runCnt overflow
+
+The get_next_block function in archival/libarchive/decompress_bunzip2.c
+in BusyBox 1.27.2 has an Integer Overflow that may lead to a write
+access violation.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=0402cb32df015d9372578e3db27db47b33d5c7b0]
+CVE: CVE-2017-15873
+bug: 10431
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+
+diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c
+index 7cd18f5..bec89ed 100644
+--- a/archival/libarchive/decompress_bunzip2.c
++++ b/archival/libarchive/decompress_bunzip2.c
+@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted)
+ static int get_next_block(bunzip_data *bd)
+ {
+ struct group_data *hufGroup;
+- int dbufCount, dbufSize, groupCount, *base, *limit, selector,
+- i, j, runPos, symCount, symTotal, nSelectors, byteCount[256];
+- int runCnt = runCnt; /* for compiler */
++ int groupCount, *base, *limit, selector,
++ i, j, symCount, symTotal, nSelectors, byteCount[256];
+ uint8_t uc, symToByte[256], mtfSymbol[256], *selectors;
+ uint32_t *dbuf;
+ unsigned origPtr, t;
++ unsigned dbufCount, runPos;
++ unsigned runCnt = runCnt; /* for compiler */
+
+ dbuf = bd->dbuf;
+- dbufSize = bd->dbufSize;
+ selectors = bd->selectors;
+
+ /* In bbox, we are ok with aborting through setjmp which is set up in start_bunzip */
+@@ -187,7 +187,7 @@ static int get_next_block(bunzip_data *bd)
+ it didn't actually work. */
+ if (get_bits(bd, 1)) return RETVAL_OBSOLETE_INPUT;
+ origPtr = get_bits(bd, 24);
+- if ((int)origPtr > dbufSize) return RETVAL_DATA_ERROR;
++ if (origPtr > bd->dbufSize) return RETVAL_DATA_ERROR;
+
+ /* mapping table: if some byte values are never used (encoding things
+ like ascii text), the compression code removes the gaps to have fewer
+@@ -435,7 +435,14 @@ static int get_next_block(bunzip_data *bd)
+ symbols, but a run of length 0 doesn't mean anything in this
+ context). Thus space is saved. */
+ runCnt += (runPos << nextSym); /* +runPos if RUNA; +2*runPos if RUNB */
+- if (runPos < dbufSize) runPos <<= 1;
++//The 32-bit overflow of runCnt wasn't yet seen, but probably can happen.
++//This would be the fix (catches too large count way before it can overflow):
++// if (runCnt > bd->dbufSize) {
++// dbg("runCnt:%u > dbufSize:%u RETVAL_DATA_ERROR",
++// runCnt, bd->dbufSize);
++// return RETVAL_DATA_ERROR;
++// }
++ if (runPos < bd->dbufSize) runPos <<= 1;
+ goto end_of_huffman_loop;
+ }
+
+@@ -445,14 +452,15 @@ static int get_next_block(bunzip_data *bd)
+ literal used is the one at the head of the mtfSymbol array.) */
+ if (runPos != 0) {
+ uint8_t tmp_byte;
+- if (dbufCount + runCnt > dbufSize) {
+- dbg("dbufCount:%d+runCnt:%d %d > dbufSize:%d RETVAL_DATA_ERROR",
+- dbufCount, runCnt, dbufCount + runCnt, dbufSize);
++ if (dbufCount + runCnt > bd->dbufSize) {
++ dbg("dbufCount:%u+runCnt:%u %u > dbufSize:%u RETVAL_DATA_ERROR",
++ dbufCount, runCnt, dbufCount + runCnt, bd->dbufSize);
+ return RETVAL_DATA_ERROR;
+ }
+ tmp_byte = symToByte[mtfSymbol[0]];
+ byteCount[tmp_byte] += runCnt;
+- while (--runCnt >= 0) dbuf[dbufCount++] = (uint32_t)tmp_byte;
++ while ((int)--runCnt >= 0)
++ dbuf[dbufCount++] = (uint32_t)tmp_byte;
+ runPos = 0;
+ }
+
+@@ -466,7 +474,7 @@ static int get_next_block(bunzip_data *bd)
+ first symbol in the mtf array, position 0, would have been handled
+ as part of a run above. Therefore 1 unused mtf position minus
+ 2 non-literal nextSym values equals -1.) */
+- if (dbufCount >= dbufSize) return RETVAL_DATA_ERROR;
++ if (dbufCount >= bd->dbufSize) return RETVAL_DATA_ERROR;
+ i = nextSym - 1;
+ uc = mtfSymbol[i];
+
+--
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
deleted file mode 100644
index cdc91082b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
- https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
-From: Ari Sundholm <ari@tuxera.com>
-Date: Mon, 4 Jan 2016 15:40:37 +0200
-Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
- errors
-
-Busybox crashes due to no mode being given when opening:
-$ ./busybox truncate -s 1M foo
-*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
-======= Backtrace: =========
-/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
-/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
-/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
-./busybox[0x4899f9]
-======= Memory map: ========
-00400000-004d0000 r-xp 00000000 00:1a 137559 /home/ari/busybox/busybox
-006cf000-006d0000 r--p 000cf000 00:1a 137559 /home/ari/busybox/busybox
-006d0000-006d1000 rw-p 000d0000 00:1a 137559 /home/ari/busybox/busybox
-006d1000-006d4000 rw-p 00000000 00:00 0
-014e7000-01508000 rw-p 00000000 00:00 0 [heap]
-7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
-7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
-7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
-7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
-7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0 [stack]
-7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0 [vdso]
-ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
-Aborted (core dumped)
-$
-
-Fix this by simply always setting the mode, as it doesn't hurt even
-when O_CREAT is not specified.
-
-This bug is a regression introduced in fc3e40e, as xopen(), which
-was originally used, would automatically set the mode.
-
-Signed-off-by: Ari Sundholm <ari@tuxera.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
----
- coreutils/truncate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/truncate.c b/coreutils/truncate.c
-index e5fa656..4c997bf 100644
---- a/coreutils/truncate.c
-+++ b/coreutils/truncate.c
-@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
-
- argv += optind;
- while (*argv) {
-- int fd = open(*argv, flags);
-+ int fd = open(*argv, flags, 0666);
- if (fd < 0) {
- if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
- bb_perror_msg("%s: open", *argv);
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index e3c502091..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests | 1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
-- unsigned v[N_MAX]; /* values in order of bit length */
-- unsigned v_end;
-+ unsigned v[N_MAX + 1]; /* values in order of bit length. last v[] is never used */
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
- *xp++ = j;
- }
-
-- /* Make a table of values in order of bit lengths */
-+ /* Make a table of values in order of bit lengths.
-+ * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+ * In particular, last v[i] is never filled and must not be accessed.
-+ */
-+ memset(v, 0xff, sizeof(v));
- p = b;
- i = 0;
-- v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-- v_end = x[j];
- }
- } while (++i < n);
-
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
-+ if (/*p >= v + n || -- redundant, caught by the second check: */
-+ *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
-+ ) {
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-- abort_unzip(PASS_STATE_ONLY);;
-+ if (e == 99) {
-+ abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-+ if (e == 99) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
-
- b_dynamic >>= 4;
- k_dynamic -= 4;
-- if (nl > 286 || nd > 30)
-+ if (nl > 286 || nd > 30) {
- abort_unzip(PASS_STATE_ONLY); /* bad lengths */
-+ }
-
- /* read in bit-length-code lengths */
- for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
- bl = lbits;
-
- i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bd = dbits;
- i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
-
- /* set up data for inflate_codes() */
- inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
- error_msg = "corrupted data";
- if (setjmp(error_jmp)) {
- /* Error from deep inside zip machinery */
-+ bb_error_msg(error_msg);
- n = -1;
- goto ret;
- }
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive: bad.zip
- inflating: ]3j½r«IK-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 718672695..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function old new delta
-huft_build 1296 1300 +4
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
- unsigned i; /* counter, current code */
- unsigned j; /* counter */
- int k; /* number of bits in current code */
-- unsigned *p; /* pointer into c[], b[], or v[] */
-+ const unsigned *p; /* pointer into c[], b[], or v[] */
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
- unsigned v[N_MAX]; /* values in order of bit length */
-+ unsigned v_end;
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* Generate counts for each bit length */
- memset(c, 0, sizeof(c));
-- p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+ p = b;
- i = n;
- do {
- c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
- }
-
- /* Make a table of values in order of bit lengths */
-- p = (unsigned *) b;
-+ p = b;
- i = 0;
-+ v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-+ v_end = x[j];
- }
- } while (++i < n);
-
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + n) {
-+ if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
-
- . ./testing.sh
-
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- # file input will be file called "input"
- # test can create a file "actual" instead of writing to stdout
-
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
- rmdir foo
- rm foo.zip
-
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive: bad.zip
-+ inflating: ]3j½r«IK-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
-
- cd ..
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
new file mode 100644
index 000000000..fc19ee335
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
@@ -0,0 +1,43 @@
+From c3797d40a1c57352192c6106cc0f435e7d9c11e8 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Tue, 7 Nov 2017 18:09:29 +0100
+Subject: lineedit: do not tab-complete any strings which have control
+ characters
+
+function old new delta
+add_match 41 68 +27
+
+CVE: CVE-2017-16544
+Upstream-Status: Backport
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ libbb/lineedit.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/libbb/lineedit.c b/libbb/lineedit.c
+index c0e35bb..56e8140 100644
+--- a/libbb/lineedit.c
++++ b/libbb/lineedit.c
+@@ -645,6 +645,18 @@ static void free_tab_completion_data(void)
+
+ static void add_match(char *matched)
+ {
++ unsigned char *p = (unsigned char*)matched;
++ while (*p) {
++ /* ESC attack fix: drop any string with control chars */
++ if (*p < ' '
++ || (!ENABLE_UNICODE_SUPPORT && *p >= 0x7f)
++ || (ENABLE_UNICODE_SUPPORT && *p == 0x7f)
++ ) {
++ free(matched);
++ return;
++ }
++ p++;
++ }
+ matches = xrealloc_vector(matches, 4, num_matches);
+ matches[num_matches] = matched;
+ num_matches++;
+--
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
index bda86859d..6faca227f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -33,7 +33,7 @@ cc: linux-kbuild@vger.kernel.org
scripts/kconfig/lxdialog/Makefile | 2 +-
scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-
+
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,6 +4,10 @@
@@ -44,10 +44,10 @@ cc: linux-kbuild@vger.kernel.org
+ echo "$CROSS_CURSES_LIB"
+ exit
+ fi
- for ext in so a dylib ; do
- for lib in ncursesw ncurses curses ; do
- $cc -print-file-name=lib${lib}.${ext} | grep -q /
-@@ -19,6 +23,10 @@ ldflags()
+ pkg-config --libs ncursesw 2>/dev/null && exit
+ pkg-config --libs ncurses 2>/dev/null && exit
+ for ext in so a dll.a dylib ; do
+@@ -21,6 +25,10 @@
# Where is ncurses.h?
ccflags()
{
@@ -55,12 +55,12 @@ cc: linux-kbuild@vger.kernel.org
+ echo "$CROSS_CURSES_INC"
+ exit
+ fi
- if [ -f /usr/include/ncursesw/ncurses.h ]; then
- echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- elif [ -f /usr/include/ncursesw/curses.h ]; then
+ if pkg-config --cflags ncursesw 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ elif pkg-config --cflags ncurses 2>/dev/null; then
--- a/scripts/kconfig/lxdialog/Makefile
+++ b/scripts/kconfig/lxdialog/Makefile
-@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
+@@ -5,7 +5,7 @@
# Use reursively expanded variables so we do not call gcc unless
# we really need to do so. (Do not call gcc as part of make mrproper)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
deleted file mode 100644
index 38302e0b6..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 21 Aug 2016 22:00:20 +0200
-Subject: build system: different fix for
- include/applet_tables.h/include/NUM_APPLETS.h
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index 5cc1827..3aedbbf 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
- $(call cmd,gen_usage_compressed)
-
--quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
-+quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
-+include/NUM_APPLETS.h: applets/applet_tables
-+ $(call cmd,gen_applet_tables)
-+
-+# In fact, include/applet_tables.h depends only on applets/applet_tables,
-+# and is generated by it. But specifying only it can run
-+# applets/applet_tables twice, possibly in parallel.
-+# We say that it also needs NUM_APPLETS.h
-+#
-+# Unfortunately, we need to list the same command,
-+# and it can be executed twice (sequentially).
-+# The alternative is to not list any command,
-+# and then if include/applet_tables.h is deleted, it won't be rebuilt.
-+#
-+include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
- $(call cmd,gen_applet_tables)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
deleted file mode 100644
index 0c3c9c0f4..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From f94412f6bb49136694c5478d0aecb19118d1b08d Mon Sep 17 00:00:00 2001
-From: Ming Liu <peter.x.liu@external.atlascopco.com>
-Date: Wed, 31 May 2017 11:48:09 +0200
-Subject: [PATCH] tar: add IF_FEATURE_* checks
-
-A following linking error was observed:
-| ==========
-| archival/lib.a(tar.o): In function `tar_main':
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
-| ld: final link failed: Bad value
-
-this happened with clang compiler, with the following configs:
-| CONFIG_TAR=y
-| # CONFIG_FEATURE_SEAMLESS_Z is not set
-
-which can be fixed by adding IF_FEATURE_* checks in.
-
-Upstream-Status: Pending [ Sent to busybox upstream on 2017-06-02 ]
-
-Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
----
- archival/tar.c | 25 +++++++++++++++----------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/archival/tar.c b/archival/tar.c
-index b70e00a..7598b71 100644
---- a/archival/tar.c
-+++ b/archival/tar.c
-@@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
- USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);)
- USE_FOR_NOMMU(const char *xformer_prog;)
-
-- if (opt & OPT_COMPRESS)
-- USE_FOR_MMU(xformer = unpack_Z_stream;)
-+ if (opt & OPT_COMPRESS) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;))
- USE_FOR_NOMMU(xformer_prog = "uncompress";)
-- if (opt & OPT_GZIP)
-- USE_FOR_MMU(xformer = unpack_gz_stream;)
-+ }
-+ if (opt & OPT_GZIP) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;))
- USE_FOR_NOMMU(xformer_prog = "gunzip";)
-- if (opt & OPT_BZIP2)
-- USE_FOR_MMU(xformer = unpack_bz2_stream;)
-+ }
-+ if (opt & OPT_BZIP2) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;))
- USE_FOR_NOMMU(xformer_prog = "bunzip2";)
-- if (opt & OPT_LZMA)
-- USE_FOR_MMU(xformer = unpack_lzma_stream;)
-+ }
-+ if (opt & OPT_LZMA) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;))
- USE_FOR_NOMMU(xformer_prog = "unlzma";)
-- if (opt & OPT_XZ)
-- USE_FOR_MMU(xformer = unpack_xz_stream;)
-+ }
-+ if (opt & OPT_XZ) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;))
- USE_FOR_NOMMU(xformer_prog = "unxz";)
-+ }
-
- fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
- /* Can't lseek over pipes */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b71..582a25893 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -28,24 +28,23 @@ Fixed options -b, -a and -P.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
- networking/udhcp/dhcpc.c | 29 +++++++++++++++++++++--------
- 1 files changed, 21 insertions(+), 8 deletions(-)
+ networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
-Index: busybox-1.20.2/networking/udhcp/dhcpc.c
+Index: busybox-1.27.2/networking/udhcp/dhcpc.c
===================================================================
---- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.20.2/networking/udhcp/dhcpc.c
-@@ -29,6 +29,9 @@
- #include <netpacket/packet.h>
- #include <linux/filter.h>
+--- busybox-1.27.2.orig/networking/udhcp/dhcpc.c
++++ busybox-1.27.2/networking/udhcp/dhcpc.c
+@@ -49,6 +49,8 @@ struct tpacket_auxdata {
+ };
+ #endif
+/* option whether to down the interface when reconfiguring */
+static int allow_deconfig = 1;
-+
- /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
+ /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
-@@ -81,8 +84,9 @@ enum {
+@@ -104,8 +106,9 @@ enum {
OPT_x = 1 << 18,
OPT_f = 1 << 19,
OPT_B = 1 << 20,
@@ -56,7 +55,7 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
USE_FOR_MMU( OPTBIT_b,)
IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
-@@ -1040,7 +1044,8 @@ static void perform_renew(void)
+@@ -1110,7 +1113,8 @@ static void perform_renew(void)
state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -66,36 +65,37 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
case REQUESTING:
case RELEASED:
change_listen_mode(LISTEN_RAW);
-@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
- bb_info_msg("Unicasting a release of %s to %s",
- inet_ntoa(temp_addr), buffer);
- send_release(server_addr, requested_ip); /* unicast */
-- udhcp_run_script(NULL, "deconfig");
-+ if (allow_deconfig)
-+ udhcp_run_script(NULL, "deconfig");
- }
- bb_info_msg("Entering released state");
+@@ -1146,7 +1150,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
+ * Users requested to be notified in all cases, even if not in one
+ * of the states above.
+ */
+- udhcp_run_script(NULL, "deconfig");
++ if (allow_deconfig)
++ udhcp_run_script(NULL, "deconfig");
-@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+ change_listen_mode(LISTEN_NONE);
+ state = RELEASED;
+@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
/* O,x: list; -T,-t,-A take numeric param */
- opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
+ IF_UDHCP_VERBOSE(opt_complementary = "vv";)
IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
-- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
-+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
+- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
++ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
USE_FOR_MMU("b")
- IF_FEATURE_UDHCPC_ARPING("a")
+ IF_FEATURE_UDHCPC_ARPING("a::")
IF_FEATURE_UDHCP_PORT("P:")
-@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1409,6 +1414,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
logmode |= LOGMODE_SYSLOG;
}
-+ if (opt & OPT_D)
++ if (opt & OPT_D) {
+ allow_deconfig = 0;
++ }
+
/* Make sure fd 0,1,2 are open */
bb_sanitize_stdio();
/* Equivalent of doing a fflush after every \n */
-@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1423,7 +1432,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
srand(monotonic_us());
state = INIT_SELECTING;
@@ -105,17 +105,17 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
change_listen_mode(LISTEN_RAW);
packet_num = 0;
timeout = 0;
-@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1577,7 +1587,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
}
/* Timed out, enter init state */
- bb_info_msg("Lease lost, entering init state");
+ bb_error_msg("lease lost, entering init state");
- udhcp_run_script(NULL, "deconfig");
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
state = INIT_SELECTING;
client_config.first_secs = 0; /* make secs field count from 0 */
/*timeout = 0; - already is */
-@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1770,7 +1781,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
send_decline(/*xid,*/ server_addr, packet.yiaddr);
if (state != REQUESTING)
@@ -125,8 +125,8 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
change_listen_mode(LISTEN_RAW);
state = INIT_SELECTING;
client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- bb_info_msg("Received DHCP NAK");
+@@ -1840,7 +1852,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
+ bb_error_msg("received %s", "DHCP NAK");
udhcp_run_script(&packet, "nak");
if (state != REQUESTING)
- udhcp_run_script(NULL, "deconfig");
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
deleted file mode 100644
index 7f80a1d91..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 23 Aug 2016 20:21:36 +0200
-Subject: build system: always rewrite NUM_APPLETS.h
-
-Conditional rewrite can keep NUM_APPLETS.h mtime old,
-this causes make to try to regenerate it at every invocation.
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/applet_tables.c b/applets/applet_tables.c
-index 8401a15..ef911a4 100644
---- a/applets/applet_tables.c
-+++ b/applets/applet_tables.c
-@@ -192,27 +192,28 @@ int main(int argc, char **argv)
- printf("};\n");
- #endif
- //printf("#endif /* SKIP_definitions */\n");
-+
- // printf("\n");
- // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
-
- if (argv[2]) {
-- char line_old[80];
-- char line_new[80];
- FILE *fp;
-+ char line_new[80];
-+// char line_old[80];
-
-- line_old[0] = 0;
-- fp = fopen(argv[2], "r");
-- if (fp) {
-- fgets(line_old, sizeof(line_old), fp);
-- fclose(fp);
-- }
- sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
-- if (strcmp(line_old, line_new) != 0) {
-+// line_old[0] = 0;
-+// fp = fopen(argv[2], "r");
-+// if (fp) {
-+// fgets(line_old, sizeof(line_old), fp);
-+// fclose(fp);
-+// }
-+// if (strcmp(line_old, line_new) != 0) {
- fp = fopen(argv[2], "w");
- if (!fp)
- return 1;
- fputs(line_new, fp);
-- }
-+// }
- }
-
- return 0;
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 cc68bea98..fbb5fd852 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -1,43 +1,25 @@
#
# Automatically generated make config: don't edit
-# Busybox version: 1.24.1
-# Tue Oct 31 11:00:00 2015
+# Busybox version: 1.27.2
+# Wed Sep 27 08:56:13 2017
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
-
-#
-# General Configuration
-#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
+# CONFIG_FEDORA_COMPAT is not set
# CONFIG_INCLUDE_SUSv2 is not set
# CONFIG_USE_PORTABLE_CODE is not set
-CONFIG_PLATFORM_LINUX=y
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_SHOW_USAGE=y
# CONFIG_FEATURE_VERBOSE_USAGE is not set
CONFIG_FEATURE_COMPRESS_USAGE=y
+CONFIG_BUSYBOX=y
# CONFIG_FEATURE_INSTALLER is not set
# CONFIG_INSTALL_NO_USR is not set
-# CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_UNICODE_SUPPORT is not set
-# CONFIG_UNICODE_USING_LOCALE is not set
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-CONFIG_SUBST_WCHAR=0
-CONFIG_LAST_SUPPORTED_WCHAR=0
-# CONFIG_UNICODE_COMBINING_WCHARS is not set
-# CONFIG_UNICODE_WIDE_WCHARS is not set
-# CONFIG_UNICODE_BIDI_SUPPORT is not set
-# CONFIG_UNICODE_NEUTRAL_TABLE is not set
-# CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_PAM is not set
-CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_LONG_OPTS=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
@@ -53,6 +35,7 @@ CONFIG_FEATURE_SUID_CONFIG_QUIET=y
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_HAVE_RPC is not set
+CONFIG_PLATFORM_LINUX=y
#
# Build Options
@@ -71,17 +54,6 @@ CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
-# CONFIG_UNIT_TEST is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-
-#
# Installation Options ("make install" behavior)
#
CONFIG_INSTALL_APPLET_SYMLINKS=y
@@ -94,16 +66,30 @@ CONFIG_INSTALL_APPLET_SYMLINKS=y
CONFIG_PREFIX="./_install"
#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_DEBUG_SANITIZE is not set
+# CONFIG_UNIT_TEST is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
# Busybox Library Tuning
#
-CONFIG_FEATURE_SYSTEMD=y
+# CONFIG_FEATURE_USE_BSS_TAIL is not set
CONFIG_FEATURE_RTMINMAX=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
@@ -115,8 +101,20 @@ CONFIG_FEATURE_TAB_COMPLETION=y
CONFIG_FEATURE_USERNAME_COMPLETION=y
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+# CONFIG_LOCALE_SUPPORT is not set
+# CONFIG_UNICODE_SUPPORT is not set
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=0
+CONFIG_LAST_SUPPORTED_WCHAR=0
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
CONFIG_FEATURE_NON_POSIX_CP=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
CONFIG_MONOTONIC_SYSCALL=y
@@ -140,76 +138,59 @@ CONFIG_FEATURE_SEAMLESS_Z=y
# CONFIG_FEATURE_AR_CREATE is not set
# CONFIG_UNCOMPRESS is not set
CONFIG_GUNZIP=y
+CONFIG_ZCAT=y
+CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y
CONFIG_BUNZIP2=y
+CONFIG_BZCAT=y
# CONFIG_UNLZMA is not set
-# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_LZCAT=y
# CONFIG_LZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
# CONFIG_UNXZ is not set
+CONFIG_XZCAT=y
# CONFIG_XZ is not set
# CONFIG_BZIP2 is not set
+CONFIG_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_CPIO=y
# CONFIG_FEATURE_CPIO_O is not set
# CONFIG_FEATURE_CPIO_P is not set
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GZIP=y
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
CONFIG_GZIP_FAST=0
# CONFIG_FEATURE_GZIP_LEVELS is not set
+CONFIG_FEATURE_GZIP_DECOMPRESS=y
# CONFIG_LZOP is not set
+# CONFIG_UNLZOP is not set
+# CONFIG_LZOPCAT is not set
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM is not set
# CONFIG_RPM2CPIO is not set
CONFIG_TAR=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y
+CONFIG_FEATURE_UNZIP_CDF=y
+# CONFIG_FEATURE_UNZIP_BZIP2 is not set
+# CONFIG_FEATURE_UNZIP_LZMA is not set
+# CONFIG_FEATURE_UNZIP_XZ is not set
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
-CONFIG_DATE=y
-# CONFIG_FEATURE_DATE_ISOFMT is not set
-# CONFIG_FEATURE_DATE_NANO is not set
-CONFIG_FEATURE_DATE_COMPAT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-# CONFIG_FEATURE_DD_IBS_OBS is not set
-# CONFIG_FEATURE_DD_STATUS is not set
-# CONFIG_HOSTID is not set
-CONFIG_ID=y
-CONFIG_GROUPS=y
-CONFIG_SHUF=y
-CONFIG_SYNC=y
-# CONFIG_FEATURE_SYNC_FANCY is not set
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_FEATURE_TOUCH_NODEREF=y
-CONFIG_FEATURE_TOUCH_SUSV3=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-# CONFIG_FEATURE_TR_EQUIV is not set
-# CONFIG_TRUNCATE is not set
-CONFIG_UNLINK=y
-# CONFIG_BASE64 is not set
-CONFIG_WHO=y
-CONFIG_USERS=y
-# CONFIG_CAL is not set
-# CONFIG_CATV is not set
+# CONFIG_FEATURE_CATV is not set
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
@@ -220,6 +201,15 @@ CONFIG_CHROOT=y
CONFIG_CP=y
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+# CONFIG_FEATURE_DATE_NANO is not set
+CONFIG_FEATURE_DATE_COMPAT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+# CONFIG_FEATURE_DD_STATUS is not set
CONFIG_DF=y
# CONFIG_FEATURE_DF_FANCY is not set
CONFIG_DIRNAME=y
@@ -233,36 +223,57 @@ CONFIG_ENV=y
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
# CONFIG_EXPAND is not set
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+# CONFIG_UNEXPAND is not set
+# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
+# CONFIG_FACTOR is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
# CONFIG_FSYNC is not set
CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+CONFIG_GROUPS=y
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LINK is not set
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_WIDTH=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
CONFIG_MD5SUM=y
+# CONFIG_SHA1SUM is not set
+# CONFIG_SHA256SUM is not set
+# CONFIG_SHA512SUM is not set
+# CONFIG_SHA3SUM is not set
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
+CONFIG_MKTEMP=y
CONFIG_MV=y
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
# CONFIG_NICE is not set
+# CONFIG_NL is not set
CONFIG_NOHUP=y
+CONFIG_NPROC=y
CONFIG_OD=y
+# CONFIG_PASTE is not set
# CONFIG_PRINTENV is not set
CONFIG_PRINTF=y
CONFIG_PWD=y
@@ -273,10 +284,8 @@ CONFIG_RM=y
CONFIG_RMDIR=y
# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
CONFIG_SEQ=y
-# CONFIG_SHA1SUM is not set
-# CONFIG_SHA256SUM is not set
-# CONFIG_SHA512SUM is not set
-# CONFIG_SHA3SUM is not set
+# CONFIG_SHRED is not set
+CONFIG_SHUF=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
@@ -286,25 +295,43 @@ CONFIG_FEATURE_SORT_BIG=y
# CONFIG_FEATURE_SPLIT_FANCY is not set
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_FEATURE_STAT_FILESYSTEM=y
CONFIG_STTY=y
# CONFIG_SUM is not set
+CONFIG_SYNC=y
+# CONFIG_FEATURE_SYNC_FANCY is not set
# CONFIG_TAC is not set
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+CONFIG_TEST1=y
+CONFIG_TEST2=y
+CONFIG_FEATURE_TEST_64=y
+# CONFIG_TIMEOUT is not set
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_NODEREF=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
CONFIG_TRUE=y
+# CONFIG_TRUNCATE is not set
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNAME_OSNAME="GNU/Linux"
-# CONFIG_UNEXPAND is not set
-# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
CONFIG_UNIQ=y
+CONFIG_UNLINK=y
CONFIG_USLEEP=y
# CONFIG_UUDECODE is not set
+# CONFIG_BASE64 is not set
# CONFIG_UUENCODE is not set
CONFIG_WC=y
# CONFIG_FEATURE_WC_LARGE is not set
+CONFIG_WHO=y
+# CONFIG_W is not set
+CONFIG_USERS=y
CONFIG_WHOAMI=y
CONFIG_YES=y
@@ -319,30 +346,29 @@ CONFIG_FEATURE_VERBOSE=y
# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
#
-# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
# Console Utilities
#
CONFIG_CHVT=y
-# CONFIG_FGCONSOLE is not set
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
+# CONFIG_FGCONSOLE is not set
# CONFIG_KBD_MODE is not set
CONFIG_LOADFONT=y
+# CONFIG_SETFONT is not set
+# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
+CONFIG_DEFAULT_SETFONT_DIR=""
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+# CONFIG_FEATURE_LOADFONT_RAW is not set
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
@@ -350,30 +376,20 @@ CONFIG_RESET=y
# CONFIG_FEATURE_RESIZE_PRINT is not set
CONFIG_SETCONSOLE=y
# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETFONT is not set
-# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
-CONFIG_DEFAULT_SETFONT_DIR=""
# CONFIG_SETKEYCODES is not set
# CONFIG_SETLOGCONS is not set
# CONFIG_SHOWKEY is not set
#
-# Common options for loadfont and setfont
-#
-# CONFIG_FEATURE_LOADFONT_PSF2 is not set
-# CONFIG_FEATURE_LOADFONT_RAW is not set
-
-#
# Debian Utilities
#
-CONFIG_MKTEMP=y
# CONFIG_PIPE_PROGRESS is not set
CONFIG_RUN_PARTS=y
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_WHICH=y
#
@@ -436,8 +452,8 @@ CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_FIND_LINKS is not set
CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_EGREP=y
+CONFIG_FGREP=y
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
@@ -453,40 +469,45 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
CONFIG_HALT=y
+CONFIG_POWEROFF=y
+CONFIG_REBOOT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_INIT is not set
+# CONFIG_LINUXRC is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
-# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_FEATURE_INITRD is not set
CONFIG_INIT_TERMINAL_TYPE=""
-CONFIG_MESG=y
-# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set
#
# Login/Password Management Utilities
#
-# CONFIG_ADD_SHELL is not set
-# CONFIG_REMOVE_SHELL is not set
# CONFIG_FEATURE_SHADOWPASSWDS is not set
# CONFIG_USE_BB_PWD_GRP is not set
# CONFIG_USE_BB_SHADOW is not set
CONFIG_USE_BB_CRYPT=y
# CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_ADD_SHELL is not set
+# CONFIG_REMOVE_SHELL is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_LAST_ID=60000
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
-# CONFIG_ADDGROUP is not set
-# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
-# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_CHPASSWD is not set
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
+# CONFIG_CRYPTPW is not set
+# CONFIG_MKPASSWD is not set
# CONFIG_DELUSER is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
@@ -498,12 +519,10 @@ CONFIG_LAST_SYSTEM_ID=999
# CONFIG_FEATURE_SECURETTY is not set
# CONFIG_PASSWD is not set
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
-# CONFIG_CRYPTPW is not set
-# CONFIG_CHPASSWD is not set
-CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
# CONFIG_SU is not set
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
@@ -518,29 +537,29 @@ CONFIG_FSCK=y
#
# Linux Module Utilities
#
-# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_DEPMOD=y
CONFIG_INSMOD=y
-CONFIG_RMMOD=y
CONFIG_LSMOD=y
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+# CONFIG_MODINFO is not set
CONFIG_MODPROBE=y
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
-CONFIG_DEPMOD=y
+CONFIG_RMMOD=y
#
# Options common to multiple modutils
#
+CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS=y
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# CONFIG_FEATURE_2_4_MODULES is not set
-# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
@@ -549,40 +568,23 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
#
# Linux System Utilities
#
-# CONFIG_BLOCKDEV is not set
-# CONFIG_FATATTR is not set
-CONFIG_FSTRIM=y
-# CONFIG_MDEV is not set
-# CONFIG_FEATURE_MDEV_CONF is not set
-# CONFIG_FEATURE_MDEV_RENAME is not set
-# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
-# CONFIG_FEATURE_MDEV_EXEC is not set
-# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
-CONFIG_MOUNT=y
-# CONFIG_FEATURE_MOUNT_FAKE is not set
-# CONFIG_FEATURE_MOUNT_VERBOSE is not set
-# CONFIG_FEATURE_MOUNT_HELPERS is not set
-# CONFIG_FEATURE_MOUNT_LABEL is not set
-# CONFIG_FEATURE_MOUNT_NFS is not set
-# CONFIG_FEATURE_MOUNT_CIFS is not set
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
-# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
-# CONFIG_REV is not set
-# CONFIG_UEVENT is not set
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
+# CONFIG_BLKDISCARD is not set
# CONFIG_BLKID is not set
# CONFIG_FEATURE_BLKID_TYPE is not set
+# CONFIG_BLOCKDEV is not set
+# CONFIG_CAL is not set
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
+# CONFIG_FALLOCATE is not set
+# CONFIG_FATATTR is not set
CONFIG_FBSET=y
CONFIG_FEATURE_FBSET_FANCY=y
CONFIG_FEATURE_FBSET_READMODE=y
-# CONFIG_FDFLUSH is not set
# CONFIG_FDFORMAT is not set
CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_AIX_LABEL is not set
# CONFIG_FEATURE_SGI_LABEL is not set
@@ -592,43 +594,82 @@ CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_FDISK_ADVANCED is not set
# CONFIG_FINDFS is not set
CONFIG_FLOCK=y
+# CONFIG_FDFLUSH is not set
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
-# CONFIG_MKFS_EXT2 is not set
-# CONFIG_MKFS_MINIX is not set
-# CONFIG_FEATURE_MINIX2 is not set
-# CONFIG_MKFS_REISER is not set
-# CONFIG_MKFS_VFAT is not set
+# CONFIG_FSFREEZE is not set
+CONFIG_FSTRIM=y
# CONFIG_GETOPT is not set
# CONFIG_FEATURE_GETOPT_LONG is not set
CONFIG_HEXDUMP=y
# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
# CONFIG_HD is not set
+# CONFIG_XXD is not set
CONFIG_HWCLOCK=y
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
+# CONFIG_LAST is not set
+# CONFIG_FEATURE_LAST_FANCY is not set
CONFIG_LOSETUP=y
# CONFIG_LSPCI is not set
# CONFIG_LSUSB is not set
+# CONFIG_MDEV is not set
+# CONFIG_FEATURE_MDEV_CONF is not set
+# CONFIG_FEATURE_MDEV_RENAME is not set
+# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
+# CONFIG_FEATURE_MDEV_EXEC is not set
+# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MESG=y
+# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_MKFS_EXT2 is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_FEATURE_MINIX2 is not set
+# CONFIG_MKFS_REISER is not set
+# CONFIG_MKDOSFS is not set
+# CONFIG_MKFS_VFAT is not set
CONFIG_MKSWAP=y
# CONFIG_FEATURE_MKSWAP_UUID is not set
CONFIG_MORE=y
+CONFIG_MOUNT=y
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+# CONFIG_FEATURE_MOUNT_NFS is not set
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
+# CONFIG_NSENTER is not set
+# CONFIG_FEATURE_NSENTER_LONG_OPTS is not set
CONFIG_PIVOT_ROOT=y
CONFIG_RDATE=y
# CONFIG_RDEV is not set
# CONFIG_READPROFILE is not set
+CONFIG_RENICE=y
+# CONFIG_REV is not set
# CONFIG_RTCWAKE is not set
# CONFIG_SCRIPT is not set
# CONFIG_SCRIPTREPLAY is not set
# CONFIG_SETARCH is not set
-CONFIG_SWAPONOFF=y
+# CONFIG_LINUX32 is not set
+# CONFIG_LINUX64 is not set
+# CONFIG_SETPRIV is not set
+CONFIG_SWAPON=y
CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWAPOFF=y
CONFIG_SWITCH_ROOT=y
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+# CONFIG_UEVENT is not set
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
+# CONFIG_UNSHARE is not set
+# CONFIG_WALL is not set
#
# Common options for mount/umount
@@ -637,6 +678,7 @@ CONFIG_FEATURE_MOUNT_LOOP=y
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_MTAB_SUPPORT is not set
# CONFIG_VOLUMEID is not set
+# CONFIG_FEATURE_VOLUMEID_BCACHE is not set
# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
# CONFIG_FEATURE_VOLUMEID_EXFAT is not set
@@ -656,17 +698,33 @@ CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
+# CONFIG_FEATURE_VOLUMEID_UBIFS is not set
# CONFIG_FEATURE_VOLUMEID_UDF is not set
# CONFIG_FEATURE_VOLUMEID_XFS is not set
#
# Miscellaneous Utilities
#
+# CONFIG_BEEP is not set
+CONFIG_FEATURE_BEEP_FREQ=0
+CONFIG_FEATURE_BEEP_LENGTH_MS=0
# CONFIG_CONSPY is not set
# CONFIG_CROND is not set
# CONFIG_FEATURE_CROND_D is not set
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
# CONFIG_I2CGET is not set
# CONFIG_I2CSET is not set
# CONFIG_I2CDUMP is not set
@@ -682,19 +740,19 @@ CONFIG_FEATURE_LESS_FLAGS=y
# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
# CONFIG_FEATURE_LESS_DASHCMD is not set
# CONFIG_FEATURE_LESS_LINENUMS is not set
+# CONFIG_LSSCSI is not set
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
+# CONFIG_PARTPROBE is not set
CONFIG_RFKILL=y
# CONFIG_SETSERIAL is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set
# CONFIG_UBIMKVOL is not set
# CONFIG_UBIRMVOL is not set
# CONFIG_UBIRSVOL is not set
# CONFIG_UBIUPDATEVOL is not set
-# CONFIG_WALL is not set
+# CONFIG_UBIRENAME is not set
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
@@ -729,7 +787,6 @@ CONFIG_DC=y
# CONFIG_IONICE is not set
# CONFIG_INOTIFYD is not set
# CONFIG_LAST is not set
-# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY is not set
# CONFIG_HDPARM is not set
# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
@@ -760,24 +817,6 @@ CONFIG_TIME=y
#
# Networking Utilities
#
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-# CONFIG_NBDCLIENT is not set
-CONFIG_NC=y
-# CONFIG_NC_SERVER is not set
-# CONFIG_NC_EXTRA is not set
-# CONFIG_NC_110_COMPAT is not set
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_FEATURE_WGET_TIMEOUT=y
-# CONFIG_FEATURE_WGET_OPENSSL is not set
-# CONFIG_FEATURE_WGET_SSL_HELPER is not set
-# CONFIG_WHOIS is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
@@ -789,15 +828,15 @@ CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_FEATURE_BRCTL_SHOW is not set
# CONFIG_DNSD is not set
# CONFIG_ETHER_WAKE is not set
-# CONFIG_FAKEIDENTD is not set
# CONFIG_FTPD is not set
-# CONFIG_FEATURE_FTP_WRITE is not set
+# CONFIG_FEATURE_FTPD_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
-# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
+# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
CONFIG_HOSTNAME=y
+CONFIG_DNSDOMAINNAME=y
# CONFIG_HTTPD is not set
# CONFIG_FEATURE_HTTPD_RANGES is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
@@ -818,11 +857,10 @@ CONFIG_FEATURE_IFCONFIG_HW=y
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
-CONFIG_IFUPDOWN=y
+CONFIG_IFUP=y
+CONFIG_IFDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
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
@@ -835,22 +873,31 @@ CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPNEIGH is not set
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_FEATURE_IP_TUNNEL=y
# CONFIG_FEATURE_IP_RULE is not set
-# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_FEATURE_IP_NEIGH is not set
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_IPADDR is not set
-# CONFIG_IPLINK is not set
-# CONFIG_IPROUTE is not set
-# CONFIG_IPTUNNEL is not set
-# CONFIG_IPRULE is not set
# CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_NAMEIF is not set
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+# CONFIG_NBDCLIENT is not set
+CONFIG_NC=y
+# CONFIG_NC_SERVER is not set
+# CONFIG_NC_EXTRA is not set
+# CONFIG_NC_110_COMPAT is not set
CONFIG_NETSTAT=y
# CONFIG_FEATURE_NETSTAT_WIDE is not set
# CONFIG_FEATURE_NETSTAT_PRG is not set
@@ -858,13 +905,19 @@ CONFIG_NSLOOKUP=y
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
+# CONFIG_SSL_CLIENT is not set
# CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
CONFIG_TELNET=y
# CONFIG_FEATURE_TELNET_TTYPE is not set
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_FEATURE_TELNET_WIDTH=y
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
@@ -879,33 +932,43 @@ CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTP_DEBUG is not set
+CONFIG_TLS=y
CONFIG_TRACEROUTE=y
# CONFIG_TRACEROUTE6 is not set
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
# CONFIG_TUNCTL is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_FEATURE_WGET_HTTPS=y
+# CONFIG_FEATURE_WGET_OPENSSL is not set
+# CONFIG_WHOIS is not set
+# CONFIG_ZCIP is not set
# CONFIG_UDHCPC6 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
CONFIG_UDHCPD=y
-# CONFIG_DHCPRELAY is not set
-CONFIG_DUMPLEASES=y
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
+CONFIG_DUMPLEASES=y
+# CONFIG_DHCPRELAY is not set
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
+CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
# CONFIG_FEATURE_UDHCP_8021Q is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
-# CONFIG_UDPSVD is not set
-# CONFIG_VCONFIG is not set
-# CONFIG_ZCIP is not set
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"
#
# Print Utilities
@@ -918,26 +981,45 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
# Mail Utilities
#
# CONFIG_MAKEMIME is not set
-CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
# CONFIG_REFORMIME is not set
# CONFIG_FEATURE_REFORMIME_COMPAT is not set
# CONFIG_SENDMAIL is not set
+CONFIG_FEATURE_MIME_CHARSET=""
#
# Process Utilities
#
+CONFIG_FREE=y
+CONFIG_FUSER=y
# CONFIG_IOSTAT is not set
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+# CONFIG_KILLALL5 is not set
# CONFIG_LSOF is not set
# CONFIG_MPSTAT is not set
# CONFIG_NMETER is not set
+# CONFIG_PGREP is not set
+# CONFIG_PKILL is not set
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
# CONFIG_PMAP is not set
# CONFIG_POWERTOP is not set
+# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_FEATURE_PS_LONG=y
+# CONFIG_FEATURE_PS_TIME is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_PSTREE is not set
# CONFIG_PWDX is not set
# CONFIG_SMEMCAP is not set
+CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
+# CONFIG_FEATURE_TOP_INTERACTIVE is not set
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
# CONFIG_FEATURE_TOP_SMP_CPU is not set
@@ -946,84 +1028,69 @@ CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
# CONFIG_FEATURE_TOPMEM is not set
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-# CONFIG_KILLALL5 is not set
-# CONFIG_PGREP is not set
-CONFIG_PIDOF=y
-# CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_PKILL is not set
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_FEATURE_PS_LONG=y
-# CONFIG_FEATURE_PS_TIME is not set
-# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
-# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-# CONFIG_FEATURE_SHOW_THREADS is not set
CONFIG_WATCH=y
+# CONFIG_FEATURE_SHOW_THREADS is not set
#
# Runit Utilities
#
+# CONFIG_CHPST is not set
+# CONFIG_SETUIDGID is not set
+# CONFIG_ENVUIDGID is not set
+# CONFIG_ENVDIR is not set
+# CONFIG_SOFTLIMIT is not set
# CONFIG_RUNSV is not set
# CONFIG_RUNSVDIR is not set
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
# CONFIG_SV is not set
CONFIG_SV_DEFAULT_SERVICE_DIR=""
+# CONFIG_SVC is not set
# CONFIG_SVLOGD is not set
-# CONFIG_CHPST is not set
-# CONFIG_SETUIDGID is not set
-# CONFIG_ENVUIDGID is not set
-# CONFIG_ENVDIR is not set
-# CONFIG_SOFTLIMIT is not set
-
-#
-# SELinux utilities
-#
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
+# CONFIG_SESTATUS is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_RESTORECON is not set
# CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
#
# Shells
#
+CONFIG_SH_IS_ASH=y
+# CONFIG_SH_IS_HUSH is not set
+# CONFIG_SH_IS_NONE is not set
+# CONFIG_BASH_IS_ASH is not set
+# CONFIG_BASH_IS_HUSH is not set
+CONFIG_BASH_IS_NONE=y
CONFIG_ASH=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_INTERNAL_GLOB=y
CONFIG_ASH_BASH_COMPAT=y
-# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
-CONFIG_ASH_GETOPTS=y
-CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_ASH_BUILTIN_PRINTF=y
-CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_ASH_HELP=y
-CONFIG_ASH_CMDCMD=y
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_ASH_RANDOM_SUPPORT is not set
CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_ECHO=y
+CONFIG_ASH_PRINTF=y
+CONFIG_ASH_TEST=y
+CONFIG_ASH_HELP=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_CMDCMD=y
# CONFIG_CTTYHACK is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
-# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_SAVEHISTORY is not set
# CONFIG_HUSH_JOB is not set
@@ -1034,17 +1101,30 @@ CONFIG_ASH_EXPAND_PRMT=y
# CONFIG_HUSH_FUNCTIONS is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
-# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_MODE_X is not set
+# CONFIG_HUSH_ECHO is not set
+# CONFIG_HUSH_PRINTF is not set
+# CONFIG_HUSH_TEST is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_EXPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_KILL is not set
+# CONFIG_HUSH_WAIT is not set
+# CONFIG_HUSH_TRAP is not set
+# CONFIG_HUSH_TYPE is not set
+# CONFIG_HUSH_READ is not set
+# CONFIG_HUSH_SET is not set
+# CONFIG_HUSH_UNSET is not set
+# CONFIG_HUSH_ULIMIT is not set
+# CONFIG_HUSH_UMASK is not set
+# CONFIG_HUSH_MEMLEAK is not set
# CONFIG_MSH is not set
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_HUSH is not set
-CONFIG_FEATURE_BASH_IS_NONE=y
-CONFIG_SH_MATH_SUPPORT=y
-# CONFIG_SH_MATH_SUPPORT_64 is not set
+
+#
+# Options common to all shells
+#
+CONFIG_FEATURE_SH_MATH=y
+# CONFIG_FEATURE_SH_MATH_64 is not set
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
@@ -1053,19 +1133,17 @@ CONFIG_FEATURE_SH_HISTFILESIZE=y
#
# System Logging Utilities
#
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_LOGGER=y
+# CONFIG_LOGREAD is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
# 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_SYSLOGD_READ_BUFFER_SIZE=0
# CONFIG_FEATURE_IPC_SYSLOG is not set
-# CONFIG_LOGREAD is not set
-# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_FEATURE_KMSG_SYSLOG is not set
-CONFIG_KLOGD=y
-
-#
-# klogd should not be used together with syslog to kernel printk buffer
-#
-CONFIG_FEATURE_KLOGD_KLOGCTL=y
-CONFIG_LOGGER=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
deleted file mode 100644
index 41c565658..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sun, 24 Apr 2016 17:39:02 +0200
-Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
-
-Use designated initializers for struct msghdr.
-The struct layout is non-portable and musl libc does not match what busybox expects.
-
-Signed-off-by: Szabolcs Nagy <nsz@port70.net>
-Tested-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-
-https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
-index c7533a4..cbb5daf 100644
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
- struct nlmsghdr nlh;
- struct sockaddr_nl nladdr;
- struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- iov, 2,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = iov,
-+ .msg_iovlen = 2,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
-@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
- while (1) {
- int status;
- struct nlmsghdr *h;
--
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- status = recvmsg(rth->fd, &msg, 0);
-@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct sockaddr_nl nladdr;
- struct iovec iov = { (void*)n, n->nlmsg_len };
- char *buf = xmalloc(8*1024); /* avoid big stack buffer */
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
deleted file mode 100644
index 2e9842e5e..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 02:54:27 +0200
-Subject: build system: fix include/NUM_APPLETS.h generation
-
-TBH, it's more like "work around my bad makefile-fu" than "fix"...
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- applets/Kbuild.src | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-Upstream-Status: Backport
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index b612399..5cc1827 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applet_tables.h include/applets.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
- quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h: applets/applet_tables
-- $(call cmd,gen_applet_tables)
--
--include/NUM_APPLETS.h: applets/applet_tables
-+include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
- $(call cmd,gen_applet_tables)
---
-cgit v0.12
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
index facfe8544..6fffc9109 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
@@ -2,7 +2,6 @@
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_HAVE_RPC is not set
# CONFIG_WERROR is not set
-# CONFIG_FEATURE_SYSTEMD is not set
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
# CONFIG_PAM is not set
# CONFIG_FEATURE_INETD_RPC is not set
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.27.2.bb
index 1c8580876..36a6342aa 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.27.2.bb
@@ -29,10 +29,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://recognize_connmand.patch \
file://busybox-cross-menuconfig.patch \
file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
- file://busybox-1.24.1-unzip.patch \
- file://busybox-1.24.1-unzip-regression.patch \
- file://busybox-1.24.1-truncate-open-mode.patch \
- file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
file://mount-via-label.cfg \
file://sha1sum.cfg \
file://sha256sum.cfg \
@@ -45,24 +41,12 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://rcS \
file://rcK \
file://runlevel \
- file://CVE-2016-2148.patch \
- file://CVE-2016-2147.patch \
- file://CVE-2016-2147_2.patch \
- file://CVE-2016-6301.patch \
- file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
- file://makefile-fix-backport.patch \
- file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
- file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
- file://commit-applet_tables-fix-commit-0dddbc1.patch \
file://makefile-libbb-race.patch \
- file://0001-libiproute-handle-table-ids-larger-than-255.patch \
- file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
- file://BUG9071_buffer_overflow_arp.patch \
- file://busybox-tar-add-IF_FEATURE_-checks.patch \
- file://0001-iproute-support-scope-.-Closes-8561.patch \
- file://0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch \
+ file://CVE-2011-5325.patch \
+ file://CVE-2017-15873.patch \
+ file://busybox-CVE-2017-16544.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
-SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
-SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
+SRC_URI[tarball.md5sum] = "476186f4bab81781dab2369bfd42734e"
+SRC_URI[tarball.sha256sum] = "9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
deleted file mode 100644
index 3c896a11b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Sun, 8 Feb 2015 16:51:57 -0500
-Subject: [PATCH] man: decouple manpages from build
-
-The use of "help2man" doesn't work at all for cross compile, in
-addition to the extra requirement of perl it adds.
-
-Just decouple the manpages from the build in order to pave the way for
-importing prebuilt manpages that can be used in a cross build situation.
-
-Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index fb4af27..7576b2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
- include $(top_srcdir)/lib/local.mk
- include $(top_srcdir)/src/local.mk
- include $(top_srcdir)/doc/local.mk
--include $(top_srcdir)/man/local.mk
- include $(top_srcdir)/tests/local.mk
---
-2.2.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
index ea8740a2d..0b8acc588 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
@@ -6,15 +6,13 @@ HOMEPAGE = "http://www.gnu.org/software/coreutils/"
BUGTRACKER = "http://debbugs.gnu.org/coreutils"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
+ file://src/ls.c;beginline=1;endline=15;md5=1c3f9411e1842a062ce5ce9210beee0e"
DEPENDS = "gmp libcap"
DEPENDS_class-native = ""
inherit autotools gettext texinfo
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
- http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
- file://man-decouple-manpages-from-build.patch \
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
file://remove-usr-local-lib-from-m4.patch \
file://fix-selinux-flask.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
@@ -23,13 +21,11 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
file://0001-local.mk-fix-cross-compiling-problem.patch \
"
-SRC_URI[tarball.md5sum] = "502795792c212932365e077946d353ae"
-SRC_URI[tarball.sha256sum] = "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
-SRC_URI[manpages.md5sum] = "1b31a688d06764e0e94aa20b7ea08222"
-SRC_URI[manpages.sha256sum] = "1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3"
+SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303"
+SRC_URI[sha256sum] = "92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e"
EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
+EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
# acl and xattr are not default features
@@ -45,6 +41,7 @@ PACKAGECONFIG_class-native ??= "xattr"
#
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
# [ df mktemp base64 gets a special treatment and is not included in this
bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
@@ -55,7 +52,7 @@ bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname
tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
sbindir_progs= "chroot"
@@ -93,20 +90,15 @@ do_install_append() {
# in update-alternatives to fail, therefore use lbracket - the name used
# for the actual source file.
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
- # prebuilt man pages
- install -d ${D}/${mandir}/man1
- 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 -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
+# Make hostname's priority higher than busybox but lower than net-tools
+ALTERNATIVE_PRIORITY[hostname] = "90"
ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
@@ -124,7 +116,6 @@ ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
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 4afb90c20..c24295b53 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,7 +11,7 @@ PV = "0.1+git${SRCPV}"
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb496782..32e761171 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
@@ -5,11 +5,13 @@ Upstream-Status: Inappropriate [disable feature]
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
-+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
+Index: dbus-glib-0.108/dbus/Makefile.am
+===================================================================
+--- dbus-glib-0.108.orig/dbus/Makefile.am
++++ dbus-glib-0.108/dbus/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . examples
+SUBDIRS = .
- INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
-
+ AM_CPPFLAGS = \
+ -I$(top_srcdir) \
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb
index eeadb7d35..dce047a13 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.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] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
S="${WORKDIR}/dbus-${PV}"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
@@ -34,25 +34,49 @@ EXTRA_OECONF = "--enable-tests \
--enable-checks \
--enable-asserts \
--enable-verbose-mode \
+ --enable-largefile \
--disable-xml-docs \
--disable-doxygen-docs \
--disable-libaudit \
- --disable-systemd \
- --without-systemdsystemunitdir \
--with-dbus-test-dir=${PTEST_PATH} \
${EXTRA_OECONF_X}"
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
do_install() {
:
}
do_install_ptest() {
install -d ${D}${PTEST_PATH}/test
- l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
+ l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
+ variant uid-permissions syntax spawn sd-activation names monitor message fdpass "
for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
l="bus bus-system bus-launch-helper"
for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
- install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+ install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
+ install -d ${D}${PTEST_PATH}/test/.libs
+ cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+
+ # Remove build host references...
+ find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
+ sed -i \
+ -e 's:${B}:${PTEST_PATH}:g' \
+ {} +
}
+
RDEPENDS_${PN}-ptest += "bash"
+
+PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
deleted file mode 100644
index 85acb7b1c..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1bfde222926be624a30a6e4b2cdc2c5064a36298 Mon Sep 17 00:00:00 2001
-From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-Date: Fri, 29 Jul 2016 01:19:37 +0300
-Subject: [PATCH] configure.ac: explicitely check stdint.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Otherwise HAVE_STDINT_H will not be defined or the var will not be
-picked up from cache so builds could fail with errors like:
-| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: ‘uintptr_t’ undeclared (first use in this function)
-
-Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-[smcv: fix Autoconf underquoting]
-Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-
-Upstream-Status: Backport [from dbus-1.10]
-
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cf5c5b9..a228d63 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -699,6 +699,8 @@ AC_CHECK_HEADERS(byteswap.h)
-
- AC_CHECK_HEADERS(unistd.h)
-
-+AC_CHECK_HEADERS([stdint.h])
-+
- AC_CHECK_HEADERS(ws2tcpip.h)
-
- AC_CHECK_HEADERS(alloca.h)
---
-2.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
deleted file mode 100644
index 54c257f81..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-dbus: remove build host test in configure script
-
-The dbus build tests the build host to detect what initscript
-environment it expects. Remove the test and set it to "redhat"
-unconditionally as the oe-core initscript has a redhat-style pid file
-path.
-
-Signed-off-by: Andy Ross <andy.ross@windriver.com>
-Upstream-Status: Inappropriate [embedded]
-
-diff -u a/configure.ac b/configure.ac
---- a/configure.ac 2012-08-28 11:23:43.040609874 -0700
-+++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700
-@@ -1348,19 +1348,8 @@
- AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
- AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
-
--#### Check our operating system
--operating_system=unknown
--if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
-- operating_system=redhat
--fi
--
--if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
-- operating_system=slackware
--fi
--
--if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
-- operating_system=cygwin
--fi
-+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
-+operating_system=redhat
-
- #### Sort out init scripts
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
index c72d083a9..8a8970ee2 100755
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,10 +1,24 @@
#!/bin/sh
output() {
- if [ $? -eq 0 ]
+ retcode=$?
+ if [ $retcode -eq 0 ]
then echo "PASS: $i"
- else echo "FAIL: $i"
+ elif [ $retcode -eq 77 ]
+ then echo "SKIP: $i"
+ else echo "FAIL: $i"
fi
}
-for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done
+export DBUS_TEST_HOMEDIR=./test
+export XDG_RUNTIME_DIR=./test
+export LD_LIBRARY_PATH=/usr/lib/dbus-test/ptest/test/.libs
+
+files=`ls test/test-*`
+
+for i in $files
+ do
+ ./$i ./test/data >/dev/null
+ output
+ done
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
index 9ddedc15f..fb5b69aa4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
@@ -5,7 +5,7 @@ SECTION = "base"
LICENSE = "AFL-2 | GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
+DEPENDS = "expat virtual/libintl autoconf-archive"
RDEPENDS_dbus_class-native = ""
RDEPENDS_dbus_class-nativesdk = ""
PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
@@ -15,13 +15,11 @@ RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://tmpdir.patch \
file://dbus-1.init \
- file://os-test.patch \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- file://0001-configure.ac-explicitely-check-stdint.h.patch \
"
-SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
@@ -69,12 +67,15 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
${datadir}/dbus-1/session.conf \
${datadir}/dbus-1/system.d \
${datadir}/dbus-1/system.conf \
+ ${datadir}/xml/dbus-1 \
${systemd_system_unitdir} \
${systemd_user_unitdir} \
+ ${nonarch_libdir}/sysusers.d/dbus.conf \
+ ${nonarch_libdir}/tmpfiles.d/dbus.conf \
"
FILES_${PN}-lib = "${libdir}/lib*.so.*"
RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
pkg_postinst_dbus() {
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
index 7539d2034..60c6a29d6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
@@ -5,18 +5,15 @@ Upstream-Status: Inappropriate [configuration]
kex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/kex.h b/kex.h
-index 72430e9..375c677 100644
---- a/kex.h
-+++ b/kex.h
-@@ -67,6 +67,6 @@ struct KEXState {
- };
+Index: dropbear-2017.75/kex.h
+===================================================================
+--- dropbear-2017.75.orig/kex.h
++++ dropbear-2017.75/kex.h
+@@ -106,6 +106,6 @@ int curve25519_donna(unsigned char *out,
+ #endif
-#define MAX_KEXHASHBUF 2000
+#define MAX_KEXHASHBUF 3000
- #endif /* _KEX_H_ */
---
-1.7.11.7
-
+ #endif /* DROPBEAR_KEX_H_ */
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
index 3d3c5bad9..104717eab 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
@@ -10,11 +10,12 @@ Updated to apply over expat 2.1.0
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
---- expat-2.1.0/configure.ac 2012-03-04 01:45:53.000000000 +0200
-+++ expat-2.1.0/configure.ac 2012-05-10 21:04:44.000000000 +0300
-@@ -51,8 +51,6 @@
-
+Index: expat-2.2.5/configure.ac
+===================================================================
+--- expat-2.2.5.orig/configure.ac
++++ expat-2.2.5/configure.ac
+@@ -53,8 +53,6 @@ LIBAGE=6 # CMakeLists.txt!
+ CPPFLAGS="${CPPFLAGS} -DHAVE_EXPAT_CONFIG_H"
AC_CONFIG_HEADER(expat_config.h)
-sinclude(conftools/ac_c_bigendian_cross.m4)
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
index 3ef4197ce..0a0aed23e 100644
--- 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
@@ -1,18 +1,30 @@
+From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Nov 2017 18:20:57 +0800
+Subject: [PATCH] Add CC tag to build
+
Add CC tag to build
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-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@
+diff --git a/Makefile.in b/Makefile.in
+index 9560a95..d444bd6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@
+ LIBOBJS = @LIBOBJS@
+ LIBREVISION = @LIBREVISION@
+ LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
+LIBTOOL = @LIBTOOL@ --tag CC
-
- INCLUDES = -I$(srcdir)/lib -I.
- LDFLAGS = @LDFLAGS@
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+--
+2.7.4
+
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
deleted file mode 100644
index d64f1bf11..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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.3.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
deleted file mode 100644
index abf845084..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-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/expat/expat.inc b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
index 0ee6c276d..c68a2ef36 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
@@ -4,20 +4,18 @@ HOMEPAGE = "http://expat.sourceforge.net/"
SECTION = "libs"
LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+
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"
+SRC_URI[md5sum] = "789e297f547980fc9ecc036f9a070d49"
+SRC_URI[sha256sum] = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6"
inherit autotools lib_package
-# This package uses an archive format known to have issue with some
-# versions of gzip
-DEPENDS += "pigz-native"
-do_unpack[depends] += "pigz-native:do_populate_sysroot"
-
do_configure_prepend () {
rm -f ${S}/conftools/libtool.m4
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
new file mode 100644
index 000000000..6156a153f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
@@ -0,0 +1,321 @@
+For reasons which I just can't fathom gnulib doesn't use the expected tools to
+find libraries but badly reinvents the wheel. This will trivially lead to host
+contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad
+canonicalisation resulting in relative paths).
+
+Simply delete all the crazy, and replace with a single call to pkg-config.
+
+Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4
+index f79ea82f1..1f67274db 100644
+--- a/gettext-tools/gnulib-m4/libcroco.m4
++++ b/gettext-tools/gnulib-m4/libcroco.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBCROCO],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ dnl libcroco depends on libglib.
+ AC_REQUIRE([gl_LIBGLIB])
+
+@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO],
+ LTLIBCROCO=
+ INCCROCO=
+ if test "$gl_cv_libcroco_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to
+- dnl use the included one.
+- AC_CACHE_VAL([gl_cv_libcroco], [
+- gl_cv_libcroco=no
+- gl_cv_LIBCROCO=
+- gl_cv_LTLIBCROCO=
+- gl_cv_INCCROCO=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and
+- dnl INCCROCO_0_6 accordingly.
+- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
+- LIBS="$gl_save_LIBS $LIBCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="$INCCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- dnl Often the include files are installed in
+- dnl /usr/include/libcroco-0.6/libcroco.
+- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
+- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
+- if test -d "$libcroco_include_dir"; then
+- gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="-I$libcroco_include_dir"
+- fi
+- ])
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libcroco])
+- AC_MSG_RESULT([$gl_cv_libcroco])
+- if test $gl_cv_libcroco = yes; then
+- LIBCROCO="$gl_cv_LIBCROCO"
+- LTLIBCROCO="$gl_cv_LTLIBCROCO"
+- INCCROCO="$gl_cv_INCCROCO"
+- else
+- gl_cv_libcroco_use_included=yes
+- fi
++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6])
++ LIBCROCO=$CROCO_LIBS
++ LTLIBCROCO=$CROCO_LIBS
++ INCCROCO=$CROCO_CFLAGS
+ fi
+ AC_SUBST([LIBCROCO])
+ AC_SUBST([LTLIBCROCO])
+diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4
+index 42e55e6fd..ab25a5b22 100644
+--- a/gettext-tools/gnulib-m4/libglib.m4
++++ b/gettext-tools/gnulib-m4/libglib.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBGLIB],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_MSG_CHECKING([whether included glib is requested])
+ AC_ARG_WITH([included-glib],
+ [ --with-included-glib use the glib2 included here],
+@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB],
+ LTLIBGLIB=
+ INCGLIB=
+ if test "$gl_cv_libglib_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libglib], [
+- gl_cv_libglib=no
+- gl_cv_LIBGLIB=
+- gl_cv_LTLIBGLIB=
+- gl_cv_INCGLIB=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and
+- dnl INCGLIB_2_0 accordingly.
+- dnl Don't use glib-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([glib-2.0])
+- LIBS="$gl_save_LIBS $LIBGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="$INCGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- dnl Often the include files are installed in /usr/include/glib-2.0
+- dnl and /usr/lib/glib-2.0/include.
+- if test -n "$LIBGLIB_2_0_PREFIX"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for glib])
+- AC_MSG_RESULT([$gl_cv_libglib])
+- if test $gl_cv_libglib = yes; then
+- LIBGLIB="$gl_cv_LIBGLIB"
+- LTLIBGLIB="$gl_cv_LTLIBGLIB"
+- INCGLIB="$gl_cv_INCGLIB"
+- else
+- gl_cv_libglib_use_included=yes
+- fi
++ PKG_CHECK_MODULES([GLIB], [glib-2.0])
++ LIBGLIB="$GLIB_LIBS"
++ LTLIBGLIB="$GLIB_LIBS"
++ INCGLIB="$GLIB_CFLAGS"
+ fi
+ AC_SUBST([LIBGLIB])
+ AC_SUBST([LTLIBGLIB])
+diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4
+index 480c700d2..cb39309d5 100644
+--- a/gettext-tools/gnulib-m4/libxml.m4
++++ b/gettext-tools/gnulib-m4/libxml.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBXML],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_REQUIRE([AM_ICONV_LINK])
+
+ AC_MSG_CHECKING([whether included libxml is requested])
+@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML],
+ LTLIBXML=
+ INCXML=
+ if test "$gl_cv_libxml_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libxml2, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libxml], [
+- gl_cv_libxml=no
+- gl_cv_LIBXML=
+- gl_cv_LTLIBXML=
+- gl_cv_INCXML=
+- gl_save_LIBS="$LIBS"
+- LIBS="$LIBS $LIBICONV"
+- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2
+- dnl accordingly.
+- dnl Don't use xml2-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x,
+- dnl libxml2 is built in such a way that uses of xmlFree work fine with
+- dnl -Wl,--enable-auto-import but lead to a link error with
+- dnl -Wl,--disable-auto-import.
+- AC_LIB_LINKFLAGS_BODY([xml2])
+- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCXML2"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="$INCXML2"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- dnl Often the include files are installed in /usr/include/libxml2.
+- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained.
+- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
+- dnl self-contained.
+- libxml2_include_dir=
+- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
+- ])
+- if test -z "$libxml2_include_dir"; then
+- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
+- ])
+- fi
+- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="-I$libxml2_include_dir"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libxml])
+- AC_MSG_RESULT([$gl_cv_libxml])
+- if test $gl_cv_libxml = yes; then
+- LIBXML="$gl_cv_LIBXML"
+- LTLIBXML="$gl_cv_LTLIBXML"
+- INCXML="$gl_cv_INCXML"
+- else
+- gl_cv_libxml_use_included=yes
+- fi
++ PKG_CHECK_MODULES([XML], [libxml-2.0])
++ LIBXML=$XML_LIBS
++ LTLIBXML=$XML_LIBS
++ INCXML=$XML_CFLAGS
+ fi
+ AC_SUBST([LIBXML])
+ AC_SUBST([LTLIBXML])
+diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c
+index 81a407467..218565329 100644
+--- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
++++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
+@@ -25,4 +25,4 @@
+-#include <cr-om-parser.h>
+-#include <cr-sel-eng.h>
+-#include <cr-style.h>
+-#include <cr-rgb.h>
++#include <libcroco/cr-om-parser.h>
++#include <libcroco/cr-sel-eng.h>
++#include <libcroco/cr-style.h>
++#include <libcroco/cr-rgb.h>
+@@ -31 +31 @@
+-# include <cr-fonts.h>
++# include <libcroco/cr-fonts.h>
+@@ -33 +33 @@
+-#include <cr-string.h>
++#include <libcroco/cr-string.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 c2059e608..68f5cc329 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
@@ -8,7 +8,7 @@ SECTION = "libs"
LICENSE = "GPLv3+ & LGPL-2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS = "gettext-native virtual/libiconv"
DEPENDS_class-native = "gettext-minimal-native"
PROVIDES = "virtual/libintl virtual/gettext"
PROVIDES_class-native = "virtual/gettext-native"
@@ -17,14 +17,13 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://parallel.patch \
file://add-with-bisonlocaledir.patch \
file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
+ file://use-pkgconfig.patch \
"
SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-inherit autotools texinfo
+inherit autotools texinfo pkgconfig
EXTRA_OECONF += "--without-lispdir \
--disable-csharp \
@@ -33,18 +32,26 @@ EXTRA_OECONF += "--without-lispdir \
--disable-native-java \
--disable-openmp \
--disable-acl \
- --with-included-glib \
--without-emacs \
--without-cvs \
--without-git \
- --with-included-libxml \
- --with-included-libcroco \
- --with-included-libunistring \
"
EXTRA_OECONF_append_class-target = " \
--with-bisonlocaledir=${datadir}/locale \
"
+PACKAGECONFIG ??= "croco glib libxml"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"
+# Need paths here to avoid host contamination but this can cause RPATH warnings
+# or problems if $libdir isn't $prefix/lib.
+PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring"
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
acpaths = '-I ${S}/gettext-runtime/m4 \
-I ${S}/gettext-tools/m4'
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 41a190edd..67ca6240b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,7 +1,7 @@
-From 41534253b6b61ed4769eb6a3966698a50ee73b71 Mon Sep 17 00:00:00 2001
+From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 12 Jun 2015 17:08:46 +0300
-Subject: [PATCH] Remove the warning about deprecated paths in schemas
+Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas
Some schemas in gsettings-desktop-schemas (such as proxy and locale)
are still using deprecated paths, as of 3.16.1. This causes warning
@@ -11,26 +11,33 @@ Upstream-Status: Inappropriate
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- gio/glib-compile-schemas.c | 6 ------
- 1 file changed, 6 deletions(-)
+ gio/glib-compile-schemas.c | 13 -------------
+ 1 file changed, 13 deletions(-)
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
-index e42949b..ec79d7c 100644
+index b8de090..130f89b 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
-@@ -1202,12 +1202,6 @@ parse_state_start_schema (ParseState *state,
+@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state,
return;
}
- if (path && (g_str_has_prefix (path, "/apps/") ||
- g_str_has_prefix (path, "/desktop/") ||
- g_str_has_prefix (path, "/system/")))
-- g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with "
-- "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
+- {
+- gchar *message = NULL;
+- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. "
+- "Paths starting with "
+- "“/apps/”, “/desktop/” or “/system/” are deprecated."),
+- id, path);
+- g_printerr ("%s\n", message);
+- g_free (message);
+- }
-
state->schema_state = schema_state_new (path, gettext_domain,
extends, extends_name, list_of);
--
-2.1.4
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
new file mode 100644
index 000000000..697d63d5f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -0,0 +1,46 @@
+From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 3 Oct 2017 10:45:55 +0300
+Subject: [PATCH 10/10] Do not hardcode python path into various tools
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
+ gobject/glib-genmarshal.in | 2 +-
+ gobject/glib-mkenums.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+index 8050981..e693ef3 100644
+--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # GDBus - GLib D-Bus Library
+ #
+diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
+index 09e8408..b2f9d99 100755
+--- a/gobject/glib-genmarshal.in
++++ b/gobject/glib-genmarshal.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # pylint: disable=too-many-lines, missing-docstring, invalid-name
+
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index d4bfd11..051fce4 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # If the code below looks horrible and unpythonic, do not panic.
+ #
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index 9b4ded14d..b98f933da 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,7 +1,7 @@
-From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
+From d762907d33b81cf7469b5696c87f2188d2050afb Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Mon, 9 Nov 2015 11:07:27 +0200
-Subject: [PATCH] Enable more tests while cross-compiling
+Subject: [PATCH 06/10] Enable more tests while cross-compiling
Upstream disables a few tests while cross-compiling because their build requires
running other built binaries. This usually makes sense but in the cross-compile
@@ -9,16 +9,17 @@ case we can depend on glib-2.0-native.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- gio/tests/Makefile.am | 8 +++-----
- tests/gobject/Makefile.am | 8 +++-----
- 2 files changed, 6 insertions(+), 10 deletions(-)
+ gio/tests/Makefile.am | 10 ++++++----
+ tests/gobject/Makefile.am | 8 +++++---
+ 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index 868873f..533e454 100644
+index acc1da4..9176640 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
-@@ -503,10 +503,9 @@ test_programs += \
+@@ -516,10 +516,9 @@ test_programs += \
endif
# -----------------------------------------------------------------------------
@@ -31,7 +32,7 @@ index 868873f..533e454 100644
test_programs += resources
resources_SOURCES = resources.c
nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
-@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
+@@ -543,7 +542,11 @@ if !ENABLE_INSTALLED_TESTS
libresourceplugin_la_LDFLAGS += -rpath /
endif
@@ -41,18 +42,18 @@ index 868873f..533e454 100644
+glib_compile_resources=glib-compile-resources
+endif
- resources.o: test_resources2.h
- test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
-@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
+ test-generated.txt: test1.txt
+ $(AM_V_GEN) echo "Generated" > $@ && \
+@@ -564,7 +567,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
-endif # !CROSS_COMPILING
- BUILT_SOURCES += giotypefuncs.c
+ BUILT_SOURCES += giotypefuncs.inc
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
-index 16f2827..4c2208e 100644
+index 656941d..68555ff 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
@@ -79,3 +80,6 @@ index 16f2827..4c2208e 100644
dist-hook: $(BUILT_EXTRA_DIST)
files='$(BUILT_EXTRA_DIST)'; \
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
index aa5de27d1..59b891347 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -1,7 +1,7 @@
-From e8740833336c59d6f616a1781b256e648e338c26 Mon Sep 17 00:00:00 2001
+From 1dd1e6ddca5deada049bac2e1ee1fe4ecc5342c5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 28 Apr 2012 18:24:50 +0200
-Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
+Subject: [PATCH 01/10] configure: use $host_alias-libtool instead of libtool
directly
Poky renames libtool to $host_alias-libtool.
@@ -18,24 +18,16 @@ Rebased to glib-2.31.20+ by Andre McCurdy <armccurdy@gmail.com>
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
- configure.ac | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 1af90c5..f6b7a73 100644
+index 6fa6eb0..b6f78a6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1378,7 +1378,7 @@ if test x"$glib_native_win32" = xyes; then
- G_MODULE_LDFLAGS=
- else
- export SED
-- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1427,13 +1427,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
+@@ -1428,9 +1428,9 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
echo "void glib_plugin_test(void) { }" > plugin.c
@@ -47,20 +39,6 @@ index 1af90c5..f6b7a73 100644
${LDFLAGS} -module -o plugin.la -export-dynamic \
-shrext ".o" -avoid-version plugin.lo \
-rpath /dont/care >/dev/null 2>&1
-- eval `./libtool --config | grep ^objdir`
-+ eval `./$host_alias-libtool --config | grep ^objdir`
- AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- glib_cv_rtldglobal_broken,[
- AC_TRY_RUN([
-@@ -1506,7 +1506,7 @@ fi
-
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
--
-1.9.1
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
index b1fe60099..faf594569 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
@@ -15,9 +15,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
file://0001-Do-not-ignore-return-value-of-write.patch \
file://0001-Test-for-pthread_getname_np-before-using-it.patch \
+ file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
"
SRC_URI_append_class-native = " file://relocate-modules.patch"
-SRC_URI[md5sum] = "89265d0289a436e99cad54491eb21ef4"
-SRC_URI[sha256sum] = "25ee7635a7c0fcd4ec91cbc3ae07c7f8f5ce621d8183511f414ded09e7e4e128"
+SRC_URI[md5sum] = "16e886ad677bf07b7d48eb8188bcf759"
+SRC_URI[sha256sum] = "963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8"
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 4cdf1411e..f645ed6f0 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
@@ -3,12 +3,12 @@ DESCRIPTION = "GLib is a general-purpose utility library, which provides many us
HOMEPAGE = "https://developer.gnome.org/glib/"
# pcre is under BSD;
-# docs/reference/COPYING is with a 'public domai'-like license!
-LICENSE = "LGPLv2+ & BSD & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://glib/glib.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
- file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gmodule/gmodule.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
+# docs/reference/COPYING is with a 'public domain'-like license!
+LICENSE = "LGPLv2.1+ & BSD & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
+ file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
@@ -19,16 +19,18 @@ CVE_PRODUCT = "glib"
BBCLASSEXTEND = "native nativesdk"
-DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native"
-DEPENDS_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' dbus', '', d)}"
-DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib glib-2.0-native"
+DEPENDS = "glib-2.0-native \
+ virtual/libintl \
+ virtual/libiconv \
+ libffi \
+ zlib \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus', '', d)}"
PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native manpages
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages
S = "${WORKDIR}/glib-${PV}"
@@ -47,7 +49,7 @@ EXTRA_OECONF = "${PRINTF} ${CORECONF}"
EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
# 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)}"
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -83,7 +85,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
# doesn't support mips16e
CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
-USE_NLS = "yes"
+# GLib generally requires gettext to be present so for USE_NLS to yes. For
+# native builds as i18n is disabled globally we can tell it to use a fake msgfmt.
+USE_NLS_class-target = "yes"
+USE_NLS_class-nativesdk = "yes"
+CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
+
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
@@ -95,15 +104,14 @@ do_install_append () {
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
- # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
- # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
- if [ -f ${D}${bindir}/glib-mkenums ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
- fi
-
if [ -e ${D}${libdir}/charset.alias ]; then
rm -f ${D}${libdir}/charset.alias
fi
+
+ # Make sure gio-querymodules is unique among multilibs
+ if test "x${MLPREFIX}" != "x"; then
+ mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
+ fi
}
do_install_append_class-target () {
@@ -114,18 +122,12 @@ do_install_append_class-target () {
rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
-
- # Make sure gio-querymodules is unique among multilibs
- if test "x${MLPREFIX}" != "x"; then
- mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
- fi
}
-RDEPENDS_${PN}-codegen += "\
- python3 \
- python3-distutils \
- python3-xml \
- "
+CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
+CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
+
+RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
RDEPENDS_${PN}-ptest += "\
dbus \
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
index 2782bd95c..2a6f8af2b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
SECTION = "libs"
DEPENDS = "glib-2.0"
-SRC_URI[archive.md5sum] = "4d06d0224646f274918b1cb6da9a07f6"
-SRC_URI[archive.sha256sum] = "3f1a442f3c2a734946983532ce59ed49120319fdb10c938447c373d5e5286bee"
+SRC_URI[archive.md5sum] = "99867463f182c2767bce0c74bc9cc981"
+SRC_URI[archive.sha256sum] = "eaa787b653015a0de31c928e9a17eb57b4ce23c8cf6f277afaec0d685335012f"
PACKAGECONFIG ??= "ca-certificates gnutls"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
index 744085f41..5e92eb71d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
@@ -19,10 +19,10 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
SRCBRANCH ?= "release/${PV}/master"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
-SRCREV_glibc ?= "d300041c533a3d837c9f37a099bcc95466860e98"
-SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843"
+SRCREV_glibc ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
+SRCREV_localedef ?= "de5bdbd5e76b5403a4151b9b9f958b6cca36b3e7"
SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
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 de859d5ce..aa871ac83 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
@@ -7,7 +7,8 @@ HOMEPAGE = "http://www.gnu.org/software/libc/index.html"
# This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale
# will fail to find main glibc, for details see
# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
deltask do_fetch
deltask do_unpack
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
index e86770e12..e86770e12 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
index f7702e035..f7702e035 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
index 0b69bad46..0b69bad46 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.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 b6d80745c..728bc5381 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
@@ -66,7 +66,7 @@ do_install_append () {
rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
fi
- oe_multilib_header bits/syscall.h bits/long-double.h
+ oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h
if [ -f ${D}${bindir}/mtrace ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
@@ -97,6 +97,7 @@ do_install_append () {
install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
+ sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
@@ -117,10 +118,10 @@ do_install_append_aarch64 () {
# The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
install -d ${D}${nonarch_base_libdir}
if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
- ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
+ ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
${D}${nonarch_base_libdir}/ld-linux-aarch64.so.1
elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
- ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+ ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
${D}${nonarch_base_libdir}/ld-linux-aarch64_be.so.1
fi
fi
@@ -206,8 +207,11 @@ do_poststash_install_cleanup () {
rm -rf ${D}/${localedir}
rm -rf ${D}${datadir}/locale
if [ "${libdir}" != "${exec_prefix}/lib" ]; then
- # This dir only exists to hold locales
- rm -rf ${D}${exec_prefix}/lib
+ if [ -d ${D}${exec_prefix}/lib/locale ] ; then
+ rm -rf ${D}${exec_prefix}/lib/locale
+ # error out if directory isn't empty
+ rm -f ${D}${exec_prefix}/lib
+ fi
fi
}
addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
index 5a89bd802..5a89bd802 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
index 21bbdc2ad..ce1222be6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
@@ -35,7 +35,10 @@ siteconfig_do_siteconfig_gencache_prepend = " \
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+
+CRYPTPROVIDES = "virtual/crypt"
+CRYPTPROVIDES_class-nativesdk = ""
+PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc ${CRYPTPROVIDES}"
PROVIDES += "virtual/libintl virtual/libiconv"
inherit autotools texinfo distro_features_check systemd
@@ -47,6 +50,7 @@ CACHED_CONFIGUREVARS += " \
libc_cv_rootsbindir=${base_sbindir} \
libc_cv_localedir=${localedir} \
libc_cv_ssp_strong=no \
+ libc_cv_ssp_all=no \
libc_cv_ssp=no \
"
@@ -57,7 +61,8 @@ INHIBIT_DEFAULT_DEPS = "1"
# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale
# will fail to find main glibc, for details see
# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
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 19c1d9bf1..86234c9d2 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 81346b2f7735698078d5bf919a78b6c0269d6fee Mon Sep 17 00:00:00 2001
+From bd91b60ce6ff01f49b173b6b45e23ce94911b2a6 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/25] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@ 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 c1b6d4ba0f..d7af9ebcbc 100644
+index 7554a99b5a..a73d11a62f 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,
+@@ -2007,6 +2007,14 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
@@ -49,7 +49,7 @@ index c1b6d4ba0f..d7af9ebcbc 100644
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2112,14 +2120,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2065,14 +2073,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -65,5 +65,5 @@ index c1b6d4ba0f..d7af9ebcbc 100644
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.13.2
+2.16.1
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 2ce240be6..899481f05 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 82f2e910ec0e2de6a9e2b007825bddfc5850575d Mon Sep 17 00:00:00 2001
+From 50736f7fc1fdc9e1f7c05f1fec75c977d9be9228 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/25] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/27] 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,10 +22,10 @@ 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 d7af9ebcbc..19c1db9948 100644
+index a73d11a62f..62e3eee478 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,
+@@ -1707,7 +1707,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -46,5 +46,5 @@ index d7af9ebcbc..19c1db9948 100644
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.13.2
+2.16.1
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 397e8b316..03f99916f 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 490a0eb4da1af726ea5d68e3efc0d18ba94c4054 Mon Sep 17 00:00:00 2001
+From 695e1cbff6ee6db3435c33e55311c67adf44476d 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/25] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -26,7 +26,7 @@ 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 e9632da0b3..4de529d2cf 100644
+index 6ee5153ff9..37a5f701fa 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -133,6 +133,10 @@ do \
@@ -38,14 +38,14 @@ index e9632da0b3..4de529d2cf 100644
+
+
int
- internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
+ {
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 19c1db9948..70c259b400 100644
+index 62e3eee478..6ddba73650 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
- /* Get the generated information about the trusted directories. */
+@@ -109,8 +109,8 @@ static size_t max_capstrlen attribute_relro;
+ gen-trusted-dirs.awk. */
#include "trusted-dirs.h"
-static const char system_dirs[] = SYSTEM_DIRS;
@@ -56,7 +56,7 @@ index 19c1db9948..70c259b400 100644
SYSTEM_DIRS_LEN
};
diff --git a/elf/interp.c b/elf/interp.c
-index b6e8f04444..47c20415bc 100644
+index 9cd50c7291..fc2f39d73c 100644
--- a/elf/interp.c
+++ b/elf/interp.c
@@ -18,5 +18,5 @@
@@ -67,7 +67,7 @@ index b6e8f04444..47c20415bc 100644
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 99caf9e9bb..36ea5df5f1 100644
+index fbdd814edf..9f4d8d69b1 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -168,6 +168,9 @@ static struct argp argp =
@@ -81,7 +81,7 @@ index 99caf9e9bb..36ea5df5f1 100644
a platform. */
static int
diff --git a/elf/rtld.c b/elf/rtld.c
-index 65647fb1c8..cd8381cb33 100644
+index 453f56eb15..08e0c4c94b 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p)
@@ -92,7 +92,7 @@ index 65647fb1c8..cd8381cb33 100644
/* 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\
+@@ -1000,12 +1001,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 65647fb1c8..cd8381cb33 100644
++_dl_skip_args;
--_dl_argc;
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
-index 5aa055de6e..b9a14b9bd3 100644
+index d6cf9d2a3e..9fcf970144 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -36,7 +36,7 @@
@@ -121,7 +121,7 @@ index 5aa055de6e..b9a14b9bd3 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 1f0b8f629d..acbe68399d 100644
+index cf43f1cf3b..7f07adde53 100644
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
@@ -136,5 +136,5 @@ index 1f0b8f629d..acbe68399d 100644
# define add_system_dir(dir) add_dir (dir)
#endif
--
-2.13.2
+2.16.1
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 8db47bca7..f9d70c2a0 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,7 +1,7 @@
-From 8fe1b56180c30d237cc2ab9a5a9c97a0311f41da Mon Sep 17 00:00:00 2001
+From 2bafdbd7067794c6a24e5e85608c0ec4638c5667 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/25] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/27] 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.
@@ -17,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 0e24200617..1532f52dec 100644
+index 272da5dd8f..409c759f14 100644
--- a/sysdeps/i386/atomic-machine.h
+++ b/sysdeps/i386/atomic-machine.h
@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
@@ -30,5 +30,5 @@ index 0e24200617..1532f52dec 100644
#define ATOMIC_EXCHANGE_USES_CAS 0
--
-2.13.2
+2.16.1
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 956b2aae7..ad9106eef 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 b9edcc845641956b7286c60c833f05a9f70cfab9 Mon Sep 17 00:00:00 2001
+From 661adfe9c220d10617bf6bb283827471c3956b01 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/25] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1580,5 +1580,5 @@ index 0000000000..04ff8cc181
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
-2.13.2
+2.16.1
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 c74fead62..a3d50fd05 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 324202488a1c2439be345745722f5cb04c0e0847 Mon Sep 17 00:00:00 2001
+From 615598fcca64461a71d84f756d75374f02d914ad 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/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/27] 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 d278a189b2..a84cb85158 100644
+index 573c01476c..d8c7412287 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@ index d278a189b2..a84cb85158 100644
static struct known_names known_libs[] =
--
-2.13.2
+2.16.1
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 b64327667..1234df0a0 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 cf00bf9de8128171e79a019de809e35f3aeed281 Mon Sep 17 00:00:00 2001
+From 804b73ae295bdfda29341e89f2d0c1b99492dc9a 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/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/27] 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'
@@ -204,5 +204,5 @@ index 26fa067abf..9d175122a8 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.13.2
+2.16.1
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 3aeec5288..1b4364751 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 babe311deca9ee2730278f13b061b914b5286dc3 Mon Sep 17 00:00:00 2001
+From 1a53084249d9dae1ef4281246efc899c8f9d63ed 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/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -383,5 +383,5 @@ index 9d175122a8..10de1f0cc3 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.13.2
+2.16.1
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 7d5c2e31f..ea498569b 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 93b5d6bed19939039031c45b777d29619db06184 Mon Sep 17 00:00:00 2001
+From 48262b6dda935278a40374ddf0080ab6cc999582 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/25] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/27] 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 7053ead16e..0b1e1716b0 100644
+index 8a00eab5e3..623edcb1bd 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
-@@ -500,7 +500,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+@@ -510,7 +510,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 7053ead16e..0b1e1716b0 100644
case R_ARM_TLS_TPOFF32:
--
-2.13.2
+2.16.1
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 7275c3e96..17513185d 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 1a6e0f4ee8584b04226156df1a3de3e467f0ef6f Mon Sep 17 00:00:00 2001
+From 72ea5410909aef6b6aee70e7f9a88d534583aa00 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/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/27] 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,10 +18,10 @@ Signed-off-by: Ting Liu <b28495@freescale.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manual/Makefile b/manual/Makefile
-index 4ed63a8ef3..e89919eb19 100644
+index c2756640a7..1b5bb16a96 100644
--- a/manual/Makefile
+++ b/manual/Makefile
-@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+@@ -102,7 +102,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
$(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(dir)/libm-test-ulps))
pwd=`pwd`; \
@@ -32,5 +32,5 @@ index 4ed63a8ef3..e89919eb19 100644
touch $@
--
-2.13.2
+2.16.1
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 84f2ca523..1e70b2a30 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 9b2af6cbf68d3353d72519e7f6c46becb7bd1d0f Mon Sep 17 00:00:00 2001
+From 8ae998a10b24545e0c12f1f3d8be97b191178204 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/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -57,5 +57,5 @@ index 812653558f..10de1f0cc3 100644
#endif
{
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-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 2bf6b23ad..c35b759a2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-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 ffd3c5a04d8f2f26fea71fed4ce41e88b6f51086 Mon Sep 17 00:00:00 2001
+From 4f9f39761909e67bd6d29b970b7165863e33e565 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 12/25] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 12/27] 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 71243ad0c6..f578187576 100644
+index c15d1087e8..37cc983f2a 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@ index 634fe4de2a..3db1697f4f 100644
;;
esac
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
index 099fe50ee..62c65253d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 049cce82f35e0d864d98075b83888dbba4d68afd Mon Sep 17 00:00:00 2001
+From bba7a647b636618d5fd083e904f995f7736b9168 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 13/25] Add unused attribute
+Subject: [PATCH 13/27] 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 18d8bd6ae7..eb729da5d3 100644
+index 123e2a62ce..63cc83ec84 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@ index 18d8bd6ae7..eb729da5d3 100644
{
int slash_count = 0;
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-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 ddc70e0e6..66911285a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-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 3b904bee81a1cfe81e3f437b5f3296efd54a51ac Mon Sep 17 00:00:00 2001
+From 62f44ce3dd01a257cf67116e355492cb1659a917 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 14/25] 'yes' within the path sets wrong config variables
+Subject: [PATCH 14/27] '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
@@ -165,7 +165,7 @@ index f05f43802b..dc8639902d 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 a5513fad48..283b293ff3 100644
+index 1ee7f41a36..77e38bebde 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -199,7 +199,7 @@ index 9147aa4582..7898e24738 100644
libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index 4e7fcf1d97..44a9cb3791 100644
+index ae7f254da4..874519000b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -155,12 +155,12 @@ else
@@ -259,5 +259,5 @@ index f9cba6e15d..b21f72f1e4 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.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-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 b5feffa06..66bf4fdab 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-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 b8cb8cb242cb751d888feb1ada5c4d0f05cbc1d7 Mon Sep 17 00:00:00 2001
+From ac240fb01f6470ac207968adfbe20ccc93b16f8b 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 15/25] timezone: re-written tzselect as posix sh
+Subject: [PATCH 15/27] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,7 +15,7 @@ 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 d6cc7ba357..e4ead6e1a7 100644
+index 0194aba4a1..58e5405a05 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
@@ -41,5 +41,5 @@ index d2c3a6d1dd..089679f306 100755
# Output one argument as-is to standard output.
# Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-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 1d9983b8e..0b1ee9687 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-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,7 +1,7 @@
-From 69d378001adfe9a359d2f4b069c1ed2d36de4480 Mon Sep 17 00:00:00 2001
+From 790b133ff2bc5b77ed8533b8999abc65ed0da02b 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 16/25] Remove bash dependency for nscd init script
+Subject: [PATCH 16/27] 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.
@@ -71,5 +71,5 @@ index a882da7d8b..b02986ec15 100644
;;
esac
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-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 3e39d7458..fd821323d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-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 cdc88dffa226815e3a218604655459e33dc86483 Mon Sep 17 00:00:00 2001
+From 897430bbb65a0f22284d7957206b5fd4efd6607f 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 17/25] eglibc: Cross building and testing instructions
+Subject: [PATCH 17/27] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
@@ -615,5 +615,5 @@ index 0000000000..b67b468466
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
index 02f35f4e7..80d547c80 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-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 1161cd1c683547d29a03626d9d7de7f9cc03b74a Mon Sep 17 00:00:00 2001
+From fcfa19b69e8749477022161a808a201807ef72ec 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 18/25] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 18/27] 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 3e0ae6f43b..24dc66d17c 100644
+index bea4e27f8d..8c83cfadc6 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,18 @@ subdir-dirs = include
@@ -96,5 +96,5 @@ index 0000000000..1d2b669aff
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-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 adb28cfd3..17bfe4fe8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-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 1732c7f25453c879c17701839ef34876a7357008 Mon Sep 17 00:00:00 2001
+From c6f2db0d7c5c65bfa19766a0e1ce8210111f9c7d 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 19/25] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 19/27] 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 23f5d5d388..7e45288db7 100644
+index 78051bc7bc..e24f442320 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 23f5d5d388..7e45288db7 100644
break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index ad036c1e4b..afee56a3da 100644
+index f2ad0c355d..3e6773795e 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 ad036c1e4b..afee56a3da 100644
break;
#ifndef SHARED
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-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 f835d871a..09f767075 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-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 108b3a1df96a85522c52a0dec032fc2c106f5f2d Mon Sep 17 00:00:00 2001
+From 577085016bb926a687abec145557fe8cb8f5af0e 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 20/25] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 20/27] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@@ -33,7 +33,7 @@ index e0938c4165..ca1d7da339 100644
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 5f11bc737b..2fd217b00b 100644
+index c4e28ffb98..648bae03d5 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 5f11bc737b..2fd217b00b 100644
+weak_alias (___fpscr_values, __fpscr_values)
+
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
index 6ee397bf7..530f4e108 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-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 3392ee83b0132c089dffb1e9892b4b252ce1ec0e Mon Sep 17 00:00:00 2001
+From c1beab8a11985f96f5eb644e7103d343b705afc6 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 21/25] eglibc: Install PIC archives
+Subject: [PATCH 21/27] 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 9bb707c168..74cbefb9ba 100644
+index ef6abeac6d..eeaa667f49 100644
--- a/Makerules
+++ b/Makerules
-@@ -775,6 +775,9 @@ ifeq ($(build-shared),yes)
+@@ -778,6 +778,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 9bb707c168..74cbefb9ba 100644
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
$(make-link)
-@@ -1026,6 +1029,7 @@ endif
+@@ -1029,6 +1032,7 @@ endif
install: check-install-supported
@@ -50,7 +50,7 @@ index 9bb707c168..74cbefb9ba 100644
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
-@@ -1054,6 +1058,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
+@@ -1057,6 +1061,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 9bb707c168..74cbefb9ba 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
-@@ -1298,9 +1318,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
+@@ -1311,9 +1331,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
endif # headers-nonh
endif # headers
@@ -97,7 +97,7 @@ index 9bb707c168..74cbefb9ba 100644
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
-@@ -1313,6 +1346,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
+@@ -1326,6 +1359,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 9bb707c168..74cbefb9ba 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.
-@@ -1322,7 +1359,8 @@ install-%:: install-%-nosubdir ;
+@@ -1335,7 +1372,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 9bb707c168..74cbefb9ba 100644
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-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 2a8a20ac8..a629ce141 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-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 d97533dc201cfd863765b1a67a27fde3e2622da7 Mon Sep 17 00:00:00 2001
+From e019fe6a2b410db6043e21803f497b5cbdd90a83 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 22/25] eglibc: Forward port cross locale generation support
+Subject: [PATCH 22/27] eglibc: Forward port cross locale generation support
Upstream-Status: Pending
@@ -23,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 locale/catnames.c
diff --git a/locale/Makefile b/locale/Makefile
-index 98ee76272d..bc3afb2248 100644
+index fd9972279b..176b3946de 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
@@ -91,7 +91,7 @@ index 0000000000..9fad357db1
+ [LC_ALL] = sizeof ("LC_ALL") - 1
+ };
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 4e1c8c568a..f7ed946f1c 100644
+index 68822a6319..fa36123776 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
@@ -104,11 +104,11 @@ index 4e1c8c568a..f7ed946f1c 100644
# define NL_CURRENT_INDIRECT 1
#endif
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index e55ab86e28..0f87e6dd28 100644
+index 34a8d32c92..cbb9436cd1 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
+@@ -18,7 +18,9 @@
+ #include <errno.h>
#include <fcntl.h>
#include <libintl.h>
+#ifndef NO_UNCOMPRESS
@@ -117,7 +117,7 @@ index e55ab86e28..0f87e6dd28 100644
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+@@ -154,6 +156,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
return closedir (dir);
}
@@ -125,7 +125,7 @@ index e55ab86e28..0f87e6dd28 100644
/* Creates a subprocess decompressing the given pathname, and returns
a stream reading its output (the decompressed data). */
static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+@@ -202,6 +205,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
}
return NULL;
}
@@ -133,7 +133,7 @@ index e55ab86e28..0f87e6dd28 100644
/* Opens a charmap for reading, given its name (not an alias name). */
FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+@@ -224,6 +228,7 @@ charmap_open (const char *directory, const char *name)
if (stream != NULL)
return stream;
@@ -141,7 +141,7 @@ index e55ab86e28..0f87e6dd28 100644
memcpy (p, ".gz", 4);
stream = fopen_uncompressed (pathname, "gzip");
if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+@@ -233,6 +238,7 @@ charmap_open (const char *directory, const char *name)
stream = fopen_uncompressed (pathname, "bzip2");
if (stream != NULL)
return stream;
@@ -150,10 +150,10 @@ index e55ab86e28..0f87e6dd28 100644
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index cec848cb7c..fcd768eb7d 100644
+index d2eebcfdbb..c3718d6589 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,
+@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
}
if (wcs != NULL)
{
@@ -162,7 +162,7 @@ index cec848cb7c..fcd768eb7d 100644
uint32_t zero = 0;
/* Handle <U0000> as a single character. */
if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
if ((*eptr)->nwcs == runp->nwcs)
{
@@ -172,7 +172,7 @@ index cec848cb7c..fcd768eb7d 100644
if (c == 0)
{
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
one consecutive entry. */
if (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -185,7 +185,7 @@ index cec848cb7c..fcd768eb7d 100644
&& (runp->wcs[runp->nwcs - 1]
== runp->wcnext->wcs[runp->nwcs - 1] + 1))
{
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
runp = runp->wcnext;
while (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -199,10 +199,10 @@ index cec848cb7c..fcd768eb7d 100644
== runp->wcnext->wcs[runp->nwcs - 1] + 1));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index df266c20d6..05c0152ec9 100644
+index f791e6b7e9..d809d6db7f 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,
+@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
allocate_arrays (ctype, charmap, ctype->repertoire);
default_missing_len = (ctype->default_missing
@@ -211,7 +211,7 @@ index df266c20d6..05c0152ec9 100644
: 0);
init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+@@ -1926,7 +1926,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
ignore = 1;
else
/* This value is usable. */
@@ -220,7 +220,7 @@ index df266c20d6..05c0152ec9 100644
first = 0;
}
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+@@ -2460,8 +2460,8 @@ with character code range values one must use the absolute ellipsis `...'"));
}
handle_tok_digit:
@@ -231,7 +231,7 @@ index df266c20d6..05c0152ec9 100644
handle_digits = 1;
goto read_charclass;
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3901,8 +3901,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
while (idx < number)
{
@@ -241,7 +241,7 @@ index df266c20d6..05c0152ec9 100644
if (res == 0)
{
replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3939,11 +3938,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
for (size_t cnt = 0; cnt < number; ++cnt)
{
struct translit_to_t *srunp;
@@ -255,7 +255,7 @@ index df266c20d6..05c0152ec9 100644
srunp = srunp->next;
}
/* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3967,18 +3966,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
ctype->translit_from_idx[cnt] = from_len;
ctype->translit_to_idx[cnt] = to_len;
@@ -281,10 +281,10 @@ index df266c20d6..05c0152ec9 100644
srunp = srunp->next;
}
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 32e9c41e35..6a61fcedeb 100644
+index a755792363..e8b2f85522 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"));
+@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
}
else
{
@@ -296,7 +296,7 @@ index 32e9c41e35..6a61fcedeb 100644
}
}
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+@@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME");
const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
31, 31, 30, 31 ,30, 31 };
size_t idx;
@@ -305,7 +305,7 @@ index 32e9c41e35..6a61fcedeb 100644
time->era_entries =
(struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+@@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME");
}
/* Now generate the wide character name and format. */
@@ -331,7 +331,7 @@ index 32e9c41e35..6a61fcedeb 100644
}
else
time->era_entries[idx].wname =
-@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
+@@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME");
if (time->date_fmt == NULL)
time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
if (time->wdate_fmt == NULL)
@@ -350,7 +350,7 @@ index 32e9c41e35..6a61fcedeb 100644
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index 52b340963a..1a8bce17b4 100644
+index 3525c8a43d..f8a7fd9c24 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,18 +363,18 @@ index 52b340963a..1a8bce17b4 100644
size_t bufmax = 56;
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 6acc1342c7..df87740f8b 100644
+index d718d2e9f4..e0a3ad5a83 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;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
+@@ -105,6 +105,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
#define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
+ #define OPT_NO_WARN 402
+ #define OPT_WARN 403
++#define OPT_UINT32_ALIGN 404
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
-@@ -143,6 +144,8 @@ static const struct argp_option options[] =
+@@ -147,6 +148,8 @@ static const struct argp_option options[] =
N_("Generate little-endian output") },
{ "big-endian", OPT_BIG_ENDIAN, NULL, 0,
N_("Generate big-endian output") },
@@ -383,7 +383,7 @@ index 6acc1342c7..df87740f8b 100644
{ NULL, 0, NULL, 0, NULL }
};
-@@ -232,12 +235,14 @@ main (int argc, char *argv[])
+@@ -236,12 +239,14 @@ main (int argc, char *argv[])
ctype locale. (P1003.2 4.35.5.2) */
setlocale (LC_CTYPE, "POSIX");
@@ -392,15 +392,15 @@ index 6acc1342c7..df87740f8b 100644
defines error code 3 for this situation so I think it must be
a fatal error (see P1003.2 4.35.8). */
if (sysconf (_SC_2_LOCALEDEF) < 0)
- WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
+ record_error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'"));
+#endif
/* Process charmap file. */
charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -328,6 +333,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case OPT_BIG_ENDIAN:
- set_big_endian (true);
+@@ -389,6 +394,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ /* Enable the warnings. */
+ set_warnings (arg, true);
break;
+ case OPT_UINT32_ALIGN:
+ uint32_align_mask = strtol (arg, NULL, 0) - 1;
@@ -409,7 +409,7 @@ index 6acc1342c7..df87740f8b 100644
force_output = 1;
break;
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 0990ef11be..683422c908 100644
+index 32e5f761f2..b41e77bd8d 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 0990ef11be..683422c908 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 3407e13c13..0bb556caf8 100644
+index 89b347c72d..a636fc2960 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 3407e13c13..0bb556caf8 100644
+
#endif /* locfile.h */
diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 19acc4b2c7..c89d3b87ad 100644
+index e4de907e1f..b5d8f5c17d 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
@@ -562,5 +562,5 @@ index 19acc4b2c7..c89d3b87ad 100644
# define WEAK_POSTLOAD(postload) weak_extern (postload)
#else
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-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 9e580d44b..ae708ef83 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-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 cb4d00eac7f84092314de593626eea40f9529038 Mon Sep 17 00:00:00 2001
+From 9d71526be21abe68dd8ca3a5a219445851bbc2f4 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 23/25] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 23/27] 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 5b416be0d8..79e66eed5e 100644
+index 9956cd8446..04342f3644 100644
--- a/locale/programs/config.h
+++ b/locale/programs/config.h
@@ -19,6 +19,9 @@
@@ -28,5 +28,5 @@ index 5b416be0d8..79e66eed5e 100644
#define PACKAGE _libc_intl_domainname
#ifndef VERSION
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-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 0b5935253..42ff66781 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-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 a784742739c90eea0d4ccbbd073a067d55ca95e8 Mon Sep 17 00:00:00 2001
+From 03873af286f1dab1062f598d6deb774ce513421d 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 24/25] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 24/27] elf/dl-deps.c: Make _dl_build_local_scope breadth first
According to the ELF specification:
@@ -24,10 +24,10 @@ 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 1b8bac6593..c616808f31 100644
+index c975fcffd7..6ee58c74e0 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)
+@@ -72,13 +72,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
{
struct link_map **p = list;
struct link_map **q;
@@ -52,5 +52,5 @@ index 1b8bac6593..c616808f31 100644
}
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-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 09ad04a4d..7f5d1421d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-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 f3a670496c8fe6d4acf045f5b167a19cf41b044e Mon Sep 17 00:00:00 2001
+From 56dab024751941c07eb479f47ef6682e2168c86a 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 25/25] locale: fix hard-coded reference to gcc -E
+Subject: [PATCH 25/27] 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
@@ -34,5 +34,5 @@ index 30d3f2f195..e97653017c 100644
sub cstrlen {
--
-2.13.2
+2.16.1
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
deleted file mode 100644
index b2bb96b81..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-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/0026-reset-dl_load_write_lock-after-forking.patch
index 777b25340..eca1193dd 100644
--- 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/0026-reset-dl_load_write_lock-after-forking.patch
@@ -1,7 +1,7 @@
-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
+From 847d37d5a34e4bf294de4ba98de3668950e28bc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:05:07 -0800
+Subject: [PATCH 26/27] reset dl_load_write_lock after forking
The patch in this Bugzilla entry was requested by a customer:
@@ -10,28 +10,31 @@ The patch in this Bugzilla entry was requested by a customer:
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]
+Upstream-Status: Pending [ No Author See bugzilla]
Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- sysdeps/nptl/fork.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ sysdeps/nptl/fork.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
-index 2b9ae4b..3d0b8da 100644
+index 846fa49ef2..f87506f398 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 ();
+@@ -194,9 +194,9 @@ __libc_fork (void)
+ _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
+2.16.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/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
index f76237a46..9ec234bd5 100644
--- 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/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
@@ -1,4 +1,9 @@
-The patch in this Bugzilla entry was requested by a customer:
+From 94225ab4bcc1613531558a632270b5edce779bc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:08:04 -0800
+Subject: [PATCH 27/27] Acquire ld.so lock before switching to malloc_atfork
+
+The patch is from
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
@@ -13,6 +18,7 @@ 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]
@@ -20,11 +26,15 @@ 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>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/nptl/fork.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
-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
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index f87506f398..225e7b51f8 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
@@ -25,6 +25,7 @@
#include <tls.h>
#include <hp-timing.h>
@@ -33,7 +43,7 @@ Index: git/sysdeps/nptl/fork.c
#include <stdio-lock.h>
#include <atomic.h>
#include <nptl/pthreadP.h>
-@@ -60,6 +61,10 @@
+@@ -60,6 +61,10 @@ __libc_fork (void)
but our current fork implementation is not. */
bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
@@ -44,7 +54,7 @@ Index: git/sysdeps/nptl/fork.c
/* 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 @@
+@@ -246,6 +251,10 @@ __libc_fork (void)
allp = allp->next;
}
@@ -55,3 +65,6 @@ Index: git/sysdeps/nptl/fork.c
}
return pid;
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
index 436c84778..436c84778 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
new file mode 100644
index 000000000..fa29f4165
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
@@ -0,0 +1,40 @@
+From 113e0516fbd3ce18253f0423762416d4c4b38fb0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 17:57:37 -0700
+Subject: [PATCH 29/29] Replace strncpy with memccpy to fix
+ -Wstringop-truncation.
+
+ * nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to
+ avoid -Wstringop-truncation.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2018-03/msg00531.html]
+
+ nis/nss_nisplus/nisplus-parser.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
+index 8dc021e73d..b53284f889 100644
+--- a/nis/nss_nisplus/nisplus-parser.c
++++ b/nis/nss_nisplus/nisplus-parser.c
+@@ -87,7 +87,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+ if (len >= room_left)
+ goto no_more_room;
+
+- strncpy (first_unused, numstr, len);
++ memcpy (first_unused, numstr, len);
+ first_unused[len] = '\0';
+ numstr = first_unused;
+ }
+@@ -103,7 +103,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+ if (len >= room_left)
+ goto no_more_room;
+
+- strncpy (first_unused, numstr, len);
++ memcpy (first_unused, numstr, len);
+ first_unused[len] = '\0';
+ numstr = first_unused;
+ }
+--
+2.16.2
+
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
deleted file mode 100644
index 3c7050f07..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-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/0030-plural_c_no_preprocessor_lines.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
new file mode 100644
index 000000000..6f03e1c62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
@@ -0,0 +1,21 @@
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 2219717..a203780 100644
+--- a/intl/Makefile
++++ b/intl/Makefile
+@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+ -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+ $(do-install)
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
new file mode 100644
index 000000000..a9132ed3d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
@@ -0,0 +1,419 @@
+Background information:
+
+https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html
+https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+
+Upstream-Status: Submitted [libc-alpha@sourceware.org]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+From: Zack Weinberg <zackw@panix.com>
+Subject: [PATCH] Deprecate libcrypt and don't build it by default
+
+Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
+support to our implementation of crypt(3), and Zack Weinberg replied
+that it might actually make more sense to _remove_ libcrypt from
+glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
+separate project that could move faster. (For instance, libxcrypt:
+https://github.com/besser82/libxcrypt)
+
+This patch disables build and installation of libcrypt by default. It
+can be re-enabled with --enable-obsolete-crypt to configure. Unlike
+libnsl, we do *not* install a runtime shared library; that's left to
+the replacement. (Unlike the SunRPC situation, I think we can
+probably drop this code altogether in a release or two.)
+
+The function prototypes for crypt and encrypt are removed from
+unistd.h, and the function prototype for setkey is removed from
+stdlib.h; they do *not* come back with --enable-obsolete-crypt. This
+means glibc no longer provides the POSIX CRYPT option, and the macro
+_XOPEN_CRYPT is also removed from unistd.h to indicate that.
+(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will
+return -1 at runtime.) These functions are also unconditionally
+removed from conform/data/{stdlib,unistd}.h-data.
+
+ * posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.
+ * stdlib/stdlib.h (setkey): Don't declare.
+
+ * configure.ac (--enable-obsolete-crypt): New configure option.
+ * configure: Regenerate.
+ * config.make.in (build-obsolete-crypt): New makefile variable.
+ * crypt/Banner: Delete file.
+ * crypt/Makefile: Don't build anything unless
+ $(build-obsolete-crypt) is 'yes'.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things
+ to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
+
+ * conform/Makefile: Only include libcrypt.a in linknamespace tests
+ when $(build-obsolete-crypt) is 'yes'.
+ * conform/data/stdlib.h-data (setkey): Don't expect.
+ * conform/data/unistd.h-data (crypt, encrypt): Don't expect.
+ * elf/Makefile: Only perform various tests of libcrypt.so/libcrypt.a
+ when $(build-obsolete-crypt) is 'yes'.
+ * elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT
+ is false.
+---
+ NEWS | 18 ++++++++++++++++++
+ config.make.in | 1 +
+ configure | 13 +++++++++++++
+ configure.ac | 8 ++++++++
+ conform/Makefile | 14 ++++++++++----
+ conform/data/stdlib.h-data | 3 ---
+ conform/data/unistd.h-data | 6 ------
+ crypt/Makefile | 5 +++++
+ elf/Makefile | 16 ++++++++++++----
+ elf/tst-linkall-static.c | 2 ++
+ posix/unistd.h | 16 ----------------
+ stdlib/stdlib.h | 6 ------
+ sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 ++
+ sysdeps/sparc/sparc64/multiarch/Makefile | 2 ++
+ sysdeps/unix/sysv/linux/arm/Makefile | 2 ++
+ 15 files changed, 75 insertions(+), 39 deletions(-)
+
+diff --git a/config.make.in b/config.make.in
+index 9e5e24b2c6..8fe610d04d 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@
+
+ experimental-malloc = @experimental_malloc@
+
++build-obsolete-crypt = @build_obsolete_crypt@
+ nss-crypt = @libc_cv_nss_crypt@
+ static-nss-crypt = @libc_cv_static_nss_crypt@
+
+diff --git a/configure b/configure
+index 7a8bd3f817..46f6bd7f86 100755
+--- a/configure
++++ b/configure
+@@ -672,6 +672,7 @@ base_machine
+ have_tunables
+ build_pt_chown
+ build_nscd
++build_obsolete_crypt
+ build_obsolete_nsl
+ link_obsolete_rpc
+ libc_cv_static_nss_crypt
+@@ -782,6 +783,7 @@ enable_experimental_malloc
+ enable_nss_crypt
+ enable_obsolete_rpc
+ enable_obsolete_nsl
++enable_obsolete_crypt
+ enable_systemtap
+ enable_build_nscd
+ enable_nscd
+@@ -1453,6 +1455,7 @@ Optional Features:
+ link-time usage
+ --enable-obsolete-nsl build and install the obsolete libnsl library and
+ depending NSS modules
++ --enable-obsolete-crypt build and install the obsolete libcrypt library
+ --enable-systemtap enable systemtap static probe points [default=no]
+ --disable-build-nscd disable building and installing the nscd daemon
+ --disable-nscd library functions will not contact the nscd daemon
+@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then
+
+ fi
+
++# Check whether --enable-obsolete-crypt was given.
++if test "${enable_obsolete_crypt+set}" = set; then :
++ enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval
++else
++ build_obsolete_crypt=no
++fi
++
++
++
++
+ # Check whether --enable-systemtap was given.
+ if test "${enable_systemtap+set}" = set; then :
+ enableval=$enable_systemtap; systemtap=$enableval
+diff --git a/configure.ac b/configure.ac
+index ca1282a6b3..0142353740 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then
+ AC_DEFINE(LINK_OBSOLETE_NSL)
+ fi
+
++AC_ARG_ENABLE([obsolete-crypt],
++ AC_HELP_STRING([--enable-obsolete-crypt],
++ [build and install the obsolete libcrypt library]),
++ [build_obsolete_crypt=$enableval],
++ [build_obsolete_crypt=no])
++AC_SUBST(build_obsolete_crypt)
++
++
+ AC_ARG_ENABLE([systemtap],
+ [AS_HELP_STRING([--enable-systemtap],
+ [enable systemtap static probe points @<:@default=no@:>@])],
+diff --git a/conform/Makefile b/conform/Makefile
+index 864fdeca21..5ef474fb24 100644
+--- a/conform/Makefile
++++ b/conform/Makefile
+@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \
+ $(common-objpfx)rt/librt.a $(static-thread-library)
+ linknamespace-libs-posix = $(linknamespace-libs-thr) \
+ $(common-objpfx)dlfcn/libdl.a
+-linknamespace-libs-xsi = $(linknamespace-libs-posix) \
+- $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-xsi = $(linknamespace-libs-posix)
+ linknamespace-libs-ISO = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
+-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
+- $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
+ linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
+ linknamespace-libs-POSIX = $(linknamespace-libs-thr)
+ linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
+ linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
+ linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
+ linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
++
++ifeq ($(build-obsolete-crypt),yes)
++linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a
++endif
++
+ linknamespace-libs = $(foreach std,$(conformtest-standards),\
+ $(linknamespace-libs-$(std)))
+
++
++
+ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
+ $(linknamespace-libs)
+ LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
+diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
+index d8fcccc2fb..6913828196 100644
+--- a/conform/data/stdlib.h-data
++++ b/conform/data/stdlib.h-data
+@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
+ function int setenv (const char*, const char*, int)
+ #endif
+-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+-function void setkey (const char*)
+-#endif
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
+ function {char*} setstate (char*)
+ #endif
+diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
+index ddf4f25132..aa070528e8 100644
+--- a/conform/data/unistd.h-data
++++ b/conform/data/unistd.h-data
+@@ -437,9 +437,6 @@ function int chroot (const char*)
+ function int chown (const char*, uid_t, gid_t)
+ function int close (int)
+ function size_t confstr (int, char*, size_t)
+-#if !defined POSIX && !defined POSIX2008
+-function {char*} crypt (const char*, const char*)
+-#endif
+ #if defined XPG4 || defined XPG42 || defined UNIX98
+ function {char*} ctermid (char*)
+ function {char*} cuserid (char*)
+@@ -449,9 +446,6 @@ allow cuserid
+ #endif
+ function int dup (int)
+ function int dup2 (int, int)
+-#if !defined POSIX && !defined POSIX2008
+-function void encrypt (char[64], int)
+-#endif
+ function int execl (const char*, const char*, ...)
+ function int execle (const char*, const char*, ...)
+ function int execlp (const char*, const char*, ...)
+diff --git a/crypt/Makefile b/crypt/Makefile
+index 303800df73..024ec2c6ab 100644
+--- a/crypt/Makefile
++++ b/crypt/Makefile
+@@ -22,6 +22,8 @@ subdir := crypt
+
+ include ../Makeconfig
+
++ifeq ($(build-obsolete-crypt),yes)
++
+ headers := crypt.h
+
+ extra-libs := libcrypt
+@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test
+ # machine over a minute.
+ xtests = md5test-giant
+ endif
++endif
+
+ include ../Rules
+
++ifeq ($(build-obsolete-crypt),yes)
+ ifneq ($(nss-crypt),yes)
+ md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
+ sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
+@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
+ else
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
+ endif
++endif
+diff --git a/elf/Makefile b/elf/Makefile
+index 2a432d8bee..366f7b80ec 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
+ CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
+ endif
+
+-# By default tst-linkall-static should try to use crypt routines to test
+-# static libcrypt use.
+-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
++ifeq ($(build-obsolete-crypt),yes)
++# If the libcrypt library is being built, tst-linkall-static should
++# try to use crypt routines to test static libcrypt use.
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1
+ # However, if we are using NSS crypto and we don't have a static
+ # library, then we exclude the use of crypt functions in the test.
+ # We similarly exclude libcrypt.a from the static link (see below).
+ ifeq (yesno,$(nss-crypt)$(static-nss-crypt))
+ CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0
+ endif
++else
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0
++endif
+
+ include ../Rules
+
+@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\
+ rt/librt.so \
+ dlfcn/libdl.so \
+ resolv/libresolv.so \
+- crypt/libcrypt.so \
+ )
++ifeq ($(build-obsolete-crypt),yes)
++localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
++endif
+ ifeq ($(build-mathvec),yes)
+ localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
+ endif
+@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \
+ $(common-objpfx)resolv/libanl.a \
+ $(static-thread-library)
+
++ifeq ($(build-obsolete-crypt),yes)
+ # If we are using NSS crypto and we have the ability to link statically
+ # then we include libcrypt.a, otherwise we leave out libcrypt.a and
+ # link as much as we can into the tst-linkall-static test. This assumes
+@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))
+ $(objpfx)tst-linkall-static: \
+ $(common-objpfx)crypt/libcrypt.a
+ endif
++endif
+
+ # The application depends on the DSO, and the DSO loads the plugin.
+ # The plugin also depends on the DSO. This creates the circular
+diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
+index e8df38f74e..0ffae7c723 100644
+--- a/elf/tst-linkall-static.c
++++ b/elf/tst-linkall-static.c
+@@ -18,7 +18,9 @@
+
+ #include <math.h>
+ #include <pthread.h>
++#if USE_CRYPT
+ #include <crypt.h>
++#endif
+ #include <resolv.h>
+ #include <dlfcn.h>
+ #include <utmp.h>
+diff --git a/posix/unistd.h b/posix/unistd.h
+index 4d149f9945..e75ce4d4ec 100644
+--- a/posix/unistd.h
++++ b/posix/unistd.h
+@@ -107,9 +107,6 @@ __BEGIN_DECLS
+ /* The X/Open Unix extensions are available. */
+ #define _XOPEN_UNIX 1
+
+-/* Encryption is present. */
+-#define _XOPEN_CRYPT 1
+-
+ /* The enhanced internationalization capabilities according to XPG4.2
+ are present. */
+ #define _XOPEN_ENH_I18N 1
+@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
+ extern int fdatasync (int __fildes);
+ #endif /* Use POSIX199309 */
+
+-
+-/* XPG4.2 specifies that prototypes for the encryption functions must
+- be defined here. */
+ #ifdef __USE_XOPEN
+-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
+-extern char *crypt (const char *__key, const char *__salt)
+- __THROW __nonnull ((1, 2));
+-
+-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
+- block in place. */
+-extern void encrypt (char *__glibc_block, int __edflag)
+- __THROW __nonnull ((1));
+-
+-
+ /* Swab pairs bytes in the first N bytes of the area pointed to by
+ FROM and copy the result to TO. The value of TO must not be in the
+ range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
+diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
+index 6b1ead31e0..8e23e93557 100644
+--- a/stdlib/stdlib.h
++++ b/stdlib/stdlib.h
+@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,
+ #endif
+
+
+-#ifdef __USE_XOPEN
+-/* Setup DES tables according KEY. */
+-extern void setkey (const char *__key) __THROW __nonnull ((1));
+-#endif
+-
+-
+ /* X/Open pseudo terminal handling. */
+
+ #ifdef __USE_XOPEN2KXSI
+diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+index a6d08f3a00..d8b8297fb0 100644
+--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
++++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
+index eaf758e7aa..0198f9886f 100644
+--- a/sysdeps/sparc/sparc64/multiarch/Makefile
++++ b/sysdeps/sparc/sparc64/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
+index 4adc35de04..6cab4f3a31 100644
+--- a/sysdeps/unix/sysv/linux/arm/Makefile
++++ b/sysdeps/unix/sysv/linux/arm/Makefile
+@@ -19,8 +19,10 @@ endif
+ # Add a syscall function to each library that needs one.
+
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += libc-do-syscall
+ endif
++endif
+
+ ifeq ($(subdir),rt)
+ librt-sysdep_routines += libc-do-syscall
+--
+2.16.0
+
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
deleted file mode 100644
index ae050a522..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-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_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
index 9d1e636bb..c814798bb 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
@@ -7,12 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
DEPENDS += "gperf-native bison-native"
-SRCREV ?= "d300041c533a3d837c9f37a099bcc95466860e98"
+SRCREV ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
SRCBRANCH ?= "release/${PV}/master"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://etc/ld.so.conf \
@@ -40,9 +40,11 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
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://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
- file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
- file://0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
+ file://0026-reset-dl_load_write_lock-after-forking.patch \
+ file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
+ file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
+ file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \
+ file://0030-plural_c_no_preprocessor_lines.patch \
"
NATIVESDKFIXES ?= ""
@@ -52,6 +54,7 @@ NATIVESDKFIXES_class-nativesdk = "\
file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
file://relocate-locales.patch \
+ file://0031-nativesdk-deprecate-libcrypt.patch \
"
S = "${WORKDIR}/git"
@@ -70,6 +73,8 @@ GLIBC_BROKEN_LOCALES = ""
#
COMPATIBLE_HOST_libc-musl_class-target = "null"
+GLIBCPIE ??= ""
+
EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile \
--disable-debug --without-gd \
@@ -83,6 +88,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--enable-bind-now \
--enable-stack-protector=strong \
--enable-stackguard-randomization \
+ ${GLIBCPIE} \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
@@ -104,10 +110,6 @@ 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/glibc/site_config/headers b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
index 609ab5379..69fedea4e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
@@ -9,7 +9,6 @@ asm/page.h
asm/types.h
assert.h
byteswap.h
-crypt.h
ctype.h
dirent.h
dlfcn.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
index 5654528ae..e9f3a2aee 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
@@ -6,7 +6,7 @@ the file /etc/network/interfaces."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git \
+SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \
file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
file://99_network \
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 bd441aef6..db2f58dfb 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
@@ -22,8 +22,8 @@ IMAGE_FSTYPES = "wic.vmdk"
inherit core-image module-base setuptools3
-SRCREV ?= "a9588646fcec17e53199e1ea7e7b8dccf140817e"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=rocko \
+SRCREV ?= "14d62d5c14e3552f2aeabdbd80d1504bb2c6ed64"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=sumo \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \
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 c446e87bd..6de860e43 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
@@ -3,7 +3,15 @@ DESCRIPTION = "Small 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."
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+INITRAMFS_SCRIPTS ?= "\
+ initramfs-framework-base \
+ initramfs-module-setup-live \
+ initramfs-module-udev \
+ initramfs-module-install \
+ initramfs-module-install-efi \
+ "
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
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 16995e658..51d08a0cd 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
@@ -5,7 +5,7 @@ first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
actually generate an image but rather generates boot and rootfs artifacts \
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}"
+PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
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 706418fa9..82b0aa819 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
@@ -8,8 +8,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for swap
swap_ratio=5
@@ -179,7 +190,7 @@ parted ${device} mkpart boot fat32 0% $boot_size
parted ${device} set 1 boot on
echo "Creating rootfs partition on $rootfs"
-parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart root ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
parted ${device} mkpart swap linux-swap $swap_start 100%
@@ -196,8 +207,8 @@ done
echo "Formatting $bootfs to vfat..."
mkfs.vfat $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -244,10 +255,9 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
sed -i "/initrd /d" $GRUBCFG
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
- # Delete any root= strings
- sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
- # Add the root= and other standard boot options
- sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
+ # Replace root= and add additional standard boot options
+ # We use root as a sentinel value, as vmlinuz is no longer guaranteed
+ sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
fi
if [ -d /run/media/$1/loader ]; then
@@ -269,7 +279,13 @@ fi
umount /tgt_root
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
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 dade059c8..28e8f09d1 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
@@ -7,8 +7,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for the swap
swap_ratio=5
@@ -203,7 +214,7 @@ fi
echo "Creating rootfs partition on $rootfs"
[ $grub_version -eq 0 ] && pname='primary' || pname='root'
-parted ${device} mkpart $pname ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart $pname ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
[ $grub_version -eq 0 ] && pname='primary' || pname='swap'
@@ -221,8 +232,8 @@ done
echo "Formatting $bootfs to ext3..."
mkfs.ext3 $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -256,9 +267,34 @@ fi
umount /tgt_root
umount /src_root
+echo "Looking for kernels to use as boot target.."
+# Find kernel to boot to
+# Give user options if multiple are found
+kernels="$(find /run/media/$1/ -type f \
+ -name bzImage* -o -name zImage* \
+ -o -name vmlinux* -o -name vmlinuz* \
+ -o -name fitImage* \
+ | sed s:.*/::)"
+if [ -n "$(echo $kernels)" ]; then
+ # only one kernel entry if no space
+ if [ -z "$(echo $kernels | grep " ")" ]; then
+ kernel=$kernels
+ echo "$kernel will be used as the boot target"
+ else
+ echo "Which kernel do we want to boot by default? The following kernels were found:"
+ echo $kernels
+ read answer
+ kernel=$answer
+ fi
+else
+ echo "No kernels found, exiting..."
+ exit 1
+fi
+
# Handling of the target boot partition
mount $bootfs /boot
echo "Preparing boot partition..."
+
if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
echo "Preparing custom grub2 menu..."
root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
@@ -268,7 +304,7 @@ if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
cat >$GRUBCFG <<_EOF
menuentry "Linux" {
search --no-floppy --fs-uuid $boot_uuid --set root
- linux /vmlinuz root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
+ linux /$kernel root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
}
_EOF
chmod 0444 $GRUBCFG
@@ -282,10 +318,16 @@ if [ $grub_version -eq 0 ] ; then
echo "timeout 30" >> /boot/grub/menu.lst
echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
echo "root (hd0,0)" >> /boot/grub/menu.lst
- echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
+ echo "kernel /$kernel root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
fi
-cp /run/media/$1/vmlinuz /boot/
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
new file mode 100644
index 000000000..a8e2432bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2017 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+EXEC_DIR=/exec.d # place to look for modules
+
+exec_enabled() {
+ return 0
+}
+
+exec_run() {
+ if [ ! -d $EXEC_DIR ]; then
+ msg "No contents to exec in $EXEC_DIR. Starting shell ..."
+ sh
+ fi
+
+ # Load and run modules
+ for m in $EXEC_DIR/*; do
+ # Skip backup files
+ if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+ continue
+ fi
+
+ debug "Starting $m"
+
+ # process module
+ ./$m
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1cd..76fa84d35 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -31,6 +31,11 @@ rootfs_run() {
bootparam_root="/dev/disk/by-partuuid/$root_uuid"
fi
+ if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
+ root_label=`echo $bootparam_root | cut -c7-`
+ bootparam_root="/dev/disk/by-label/$root_label"
+ fi
+
if [ -e "$bootparam_root" ]; then
flags=""
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
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 2afc37ee7..75d965f06 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
@@ -8,6 +8,7 @@ PR = "r4"
inherit allarch
SRC_URI = "file://init \
+ file://exec \
file://rootfs \
file://finish \
file://mdev \
@@ -26,6 +27,9 @@ do_install() {
install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
+ # exec
+ install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec
+
# mdev
install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev
@@ -45,6 +49,7 @@ do_install() {
}
PACKAGES = "${PN}-base \
+ initramfs-module-exec \
initramfs-module-mdev \
initramfs-module-udev \
initramfs-module-e2fs \
@@ -62,6 +67,10 @@ FILES_${PN}-base = "/init /init.d/99-finish /dev"
# and mounts the rootfs. Then 90-rootfs will proceed immediately.
RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
+SUMMARY_initramfs-module-exec = "initramfs support for easy execution of applications"
+RDEPENDS_initramfs-module-exec = "${PN}-base"
+FILES_initramfs-module-exec = "/init.d/89-exec"
+
SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
FILES_initramfs-module-mdev = "/init.d/01-mdev"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
new file mode 100644
index 000000000..7a9a8ecae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Live image init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+RDEPENDS_${PN} = "busybox-mdev"
+SRC_URI = "file://init-live.sh"
+
+PR = "r12"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES_${PN} += " /init /dev "
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"
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 2a7f84ddc..f588a1077 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
@@ -5,7 +5,7 @@ SRC_URI = "file://init-install-efi.sh"
PR = "r1"
-RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
S = "${WORKDIR}"
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 a553a0d8b..9222d57c1 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
@@ -7,7 +7,7 @@ PR = "r9"
S = "${WORKDIR}"
-RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
do_install() {
install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
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
index 1e7f76fd5..78a61cde2 100644
--- 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
@@ -1,7 +1,7 @@
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"
+RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
PR = "r4"
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
index 02b69f37a..04e90cd30 100644
--- 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
@@ -1,7 +1,7 @@
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"
+RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
# The same restriction as grub
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
index 27d6f42aa..a9a3ab8ab 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -13,10 +13,10 @@ run as expected.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 1976333..b36aef3 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
+Index: kbd-2.0.4/tests/Makefile.am
+===================================================================
+--- kbd-2.0.4.orig/tests/Makefile.am
++++ kbd-2.0.4/tests/Makefile.am
@@ -1,7 +1,7 @@
AM_CPPFLAGS = \
-I$(srcdir)/../src/libkeymap \
@@ -25,11 +25,11 @@ index 1976333..b36aef3 100644
+ -DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\"
AM_CFLAGS = $(CHECK_CFLAGS)
- LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS)
-diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
-index ddd5ed8..772fb51 100755
---- a/tests/alt-is-meta.in
-+++ b/tests/alt-is-meta.in
+ LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@
+Index: kbd-2.0.4/tests/alt-is-meta.in
+===================================================================
+--- kbd-2.0.4.orig/tests/alt-is-meta.in
++++ kbd-2.0.4/tests/alt-is-meta.in
@@ -7,8 +7,8 @@ cd "$cwd"
rc=0
temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
@@ -41,10 +41,10 @@ index ddd5ed8..772fb51 100755
if [ "$rc" != 0 ]; then
printf 'failed\n'
-diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
-index 7c856e5..14d92c1 100755
---- a/tests/dumpkeys-fulltable.in
-+++ b/tests/dumpkeys-fulltable.in
+Index: kbd-2.0.4/tests/dumpkeys-fulltable.in
+===================================================================
+--- kbd-2.0.4.orig/tests/dumpkeys-fulltable.in
++++ kbd-2.0.4/tests/dumpkeys-fulltable.in
@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
cd "$cwd"
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 423b47a07..4af3256ff 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
@@ -3,7 +3,6 @@ HOMEPAGE = "http://www.kbd-project.org/"
# everything minus console-fonts is GPLv2+
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
-DEPENDS = "libcheck"
inherit autotools gettext ptest pkgconfig
@@ -19,8 +18,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
SRC_URI[md5sum] = "c1635a5a83b63aca7f97a3eab39ebaa6"
SRC_URI[sha256sum] = "5fd90af6beb225a9bb9b9fb414c090fba53c9a55793e172f508cd43652e59a88"
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
+ "
+
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
do_compile_ptest() {
oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
@@ -29,6 +32,13 @@ do_compile_ptest() {
do_install_ptest() {
install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -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:${S}/config/missing::g' \
+ -e 's:${WORKDIR}::g' \
-e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
@@ -48,7 +58,7 @@ RDEPENDS_${PN}-ptest = "make"
inherit update-alternatives
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey"
ALTERNATIVE_PRIORITY = "100"
BBCLASSEXTEND = "native"
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 e4b1782ad..7ddc81e9b 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
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
inherit autotools pkgconfig
-DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+DEPENDS = "bison-native flex-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
@@ -20,9 +20,10 @@ SRC_URI[sha256sum] = "e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+EXTRA_OEMAKE_append_libc-musl = " LIBS=-lfts"
-EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
+PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam"
PACKAGES =+ "cgroups-pam-plugin"
FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
@@ -33,8 +34,8 @@ do_install_append() {
if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
mkdir -p ${D}/${base_libdir}/
mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
- rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
- ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+ rm -f ${D}${libdir}/libcgroup.so
+ lnr ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
fi
# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
new file mode 100644
index 000000000..6ed67a676
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Extended cryptographic library (from glibc)"
+DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
+HOMEPAGE = "https://github.com/besser82/libxcrypt"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=d1cc18f512ded3bd6000f3729f31be08 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+inherit autotools
+
+SRCREV ?= "089479bb24acd168613757a6f12d63caa95416b4"
+SRCBRANCH ?= "master"
+
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+ "
+
+PROVIDES = "virtual/crypt"
+
+FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so"
+
+S = "${WORKDIR}/git"
+
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+python () {
+ if not bb.data.inherits_class('nativesdk', d):
+ raise bb.parse.SkipRecipe("Recipe only applies in nativesdk case for now")
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
index d1ad55116..2b92dbc8d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
@@ -15,12 +15,12 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
python/tests/tstLastError.py | 2 +-
4 files changed, 21 insertions(+), 4 deletions(-)
-diff --git a/Makefile.am b/Makefile.am
-index e181ee0..7960e7d 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
@@ -207,9 +207,9 @@ install-ptest:
- install $(noinst_PROGRAMS) $(DESTDIR))
+ install $(check_PROGRAMS) $(DESTDIR))
cp -r $(srcdir)/test $(DESTDIR)
cp -r $(srcdir)/result $(DESTDIR)
- cp -r $(srcdir)/python $(DESTDIR)
@@ -28,13 +28,13 @@ index e181ee0..7960e7d 100644
sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
- runtests:
- [ -d test ] || $(LN_S) $(srcdir)/test .
-diff --git a/python/Makefile.am b/python/Makefile.am
-index 34aed96..ba3ec6a 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
+Index: libxml2-2.9.7/python/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/Makefile.am
++++ libxml2-2.9.7/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class
$(GENERATED): $(srcdir)/generator.py $(API_DESC)
$(PYTHON) $(srcdir)/generator.py $(srcdir)
@@ -51,10 +51,10 @@ index 34aed96..ba3ec6a 100644
+.PHONY: tests test
tests test: all
cd tests && $(MAKE) tests
-diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
-index 95ebead..418e21e 100644
---- a/python/tests/Makefile.am
-+++ b/python/tests/Makefile.am
+Index: libxml2-2.9.7/python/tests/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/Makefile.am
++++ libxml2-2.9.7/python/tests/Makefile.am
@@ -59,6 +59,11 @@ XMLS= \
CLEANFILES = core tmp.xml *.pyc
@@ -81,10 +81,10 @@ index 95ebead..418e21e 100644
+
tests:
endif
-diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
-index d5f9be7..3e5bef8 100755
---- a/python/tests/tstLastError.py
-+++ b/python/tests/tstLastError.py
+Index: libxml2-2.9.7/python/tests/tstLastError.py
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/tstLastError.py
++++ libxml2-2.9.7/python/tests/tstLastError.py
@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
when the exception is raised, check the libxml2.lastError for
expected values."""
@@ -94,6 +94,3 @@ index d5f9be7..3e5bef8 100755
try:
f(*args)
except exc:
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
new file mode 100644
index 000000000..51a9e1935
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
@@ -0,0 +1,21 @@
+Make sure that Makefile doesn't try to compile these tests again
+on the target where the source dependencies won't be available.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
+@@ -211,8 +211,7 @@ install-ptest:
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
+
+-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+- testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
++runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && \
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
index 327716561..d9ed1516f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -183,7 +183,7 @@ index 68cd824..5fa0a9b 100644
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
-- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
- CPPFLAGS="$ac_save_CPPFLAGS"
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
deleted file mode 100644
index bb55eed17..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-libxml2-2.9.4: Fix CVE-2016-4658
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-4658
-
-xpointer: Disallow namespace nodes in XPointer points and ranges
-
-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: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=3f8a91036d338e51c059d54397a42d645f019c65]
-CVE: CVE-2016-4658
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..911680d 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
- }
-
- /**
-+ * xmlXPtrNewRangeInternal:
-+ * @start: the starting node
-+ * @startindex: the start index
-+ * @end: the ending point
-+ * @endindex: the ending index
-+ *
-+ * Internal function to create a new xmlXPathObjectPtr of type range
-+ *
-+ * Returns the newly created object.
-+ */
-+static xmlXPathObjectPtr
-+xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex,
-+ xmlNodePtr end, int endindex) {
-+ xmlXPathObjectPtr ret;
-+
-+ /*
-+ * Namespace nodes must be copied (see xmlXPathNodeSetDupNs).
-+ * Disallow them for now.
-+ */
-+ if ((start != NULL) && (start->type == XML_NAMESPACE_DECL))
-+ return(NULL);
-+ if ((end != NULL) && (end->type == XML_NAMESPACE_DECL))
-+ return(NULL);
-+
-+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-+ if (ret == NULL) {
-+ xmlXPtrErrMemory("allocating range");
-+ return(NULL);
-+ }
-+ memset(ret, 0, sizeof(xmlXPathObject));
-+ ret->type = XPATH_RANGE;
-+ ret->user = start;
-+ ret->index = startindex;
-+ ret->user2 = end;
-+ ret->index2 = endindex;
-+ return(ret);
-+}
-+
-+/**
- * xmlXPtrNewRange:
- * @start: the starting node
- * @startindex: the start index
-@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex,
- if (endindex < 0)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = startindex;
-- ret->user2 = end;
-- ret->index2 = endindex;
-+ ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
- if (end->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start->user;
-- ret->index = start->index;
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user,
-+ end->index);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
- if (start->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start->user;
-- ret->index = start->index;
-- ret->user2 = end;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
- if (end->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-+ ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
- if (end == NULL)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = end;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start, -1, end, -1);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
- if (start == NULL)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = NULL;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
- return(ret);
- }
-
-@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
- */
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
-+ xmlNodePtr endNode;
-+ int endIndex;
- xmlXPathObjectPtr ret;
-
- if (start == NULL)
-@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- return(NULL);
- switch (end->type) {
- case XPATH_POINT:
-+ endNode = end->user;
-+ endIndex = end->index;
-+ break;
- case XPATH_RANGE:
-+ endNode = end->user2;
-+ endIndex = end->index2;
- break;
- case XPATH_NODESET:
- /*
-@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- */
- if (end->nodesetval->nodeNr <= 0)
- return(NULL);
-+ endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
-+ endIndex = -1;
- break;
- default:
- /* TODO */
- return(NULL);
- }
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- switch (end->type) {
-- case XPATH_POINT:
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-- break;
-- case XPATH_RANGE:
-- ret->user2 = end->user2;
-- ret->index2 = end->index2;
-- break;
-- case XPATH_NODESET: {
-- ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
-- ret->index2 = -1;
-- break;
-- }
-- default:
-- STRANGE
-- return(NULL);
-- }
-+ ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -1835,8 +1798,8 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- case XPATH_RANGE: {
- xmlNodePtr node = tmp->user;
- if (node != NULL) {
-- if (node->type == XML_ATTRIBUTE_NODE) {
-- /* TODO: Namespace Nodes ??? */
-+ if ((node->type == XML_ATTRIBUTE_NODE) ||
-+ (node->type == XML_NAMESPACE_DECL)) {
- xmlXPathFreeObject(obj);
- xmlXPtrFreeLocationSet(newset);
- XP_ERROR(XPTR_SYNTAX_ERROR);
-@@ -1931,8 +1894,8 @@ xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- case XPATH_RANGE: {
- xmlNodePtr node = tmp->user2;
- if (node != NULL) {
-- if (node->type == XML_ATTRIBUTE_NODE) {
-- /* TODO: Namespace Nodes ??? */
-+ if ((node->type == XML_ATTRIBUTE_NODE) ||
-+ (node->type == XML_NAMESPACE_DECL)) {
- xmlXPathFreeObject(obj);
- xmlXPtrFreeLocationSet(newset);
- XP_ERROR(XPTR_SYNTAX_ERROR);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
deleted file mode 100644
index 9d47d023a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 28 Jun 2016 14:22:23 +0200
-Subject: [PATCH] Fix XPointer paths beginning with range-to
-
-The old code would invoke the broken xmlXPtrRangeToFunction. range-to
-isn't really a function but a special kind of location step. Remove
-this function and always handle range-to in the XPath code.
-
-The old xmlXPtrRangeToFunction could also be abused to trigger a
-use-after-free error with the potential for remote code execution.
-
-Found with afl-fuzz.
-
-Fixes CVE-2016-5131.
-
-CVE: CVE-2016-5131
-Upstream-Status: Backport
-https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
----
- result/XPath/xptr/vidbase | 13 ++++++++
- test/XPath/xptr/vidbase | 1 +
- xpath.c | 7 ++++-
- xpointer.c | 76 ++++-------------------------------------------
- 4 files changed, 26 insertions(+), 71 deletions(-)
-
-diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase
-index 8b9e92d..f19193e 100644
---- a/result/XPath/xptr/vidbase
-+++ b/result/XPath/xptr/vidbase
-@@ -17,3 +17,16 @@ Object is a Location Set:
- To node
- ELEMENT p
-
-+
-+========================
-+Expression: xpointer(range-to(id('chapter2')))
-+Object is a Location Set:
-+1 : Object is a range :
-+ From node
-+ /
-+ To node
-+ ELEMENT chapter
-+ ATTRIBUTE id
-+ TEXT
-+ content=chapter2
-+
-diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase
-index b146383..884b106 100644
---- a/test/XPath/xptr/vidbase
-+++ b/test/XPath/xptr/vidbase
-@@ -1,2 +1,3 @@
- xpointer(id('chapter1')/p)
- xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2]))
-+xpointer(range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index d992841..5a01b1b 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
- lc = 1;
- break;
- } else if ((NXT(len) == '(')) {
-- /* Note Type or Function */
-+ /* Node Type or Function */
- if (xmlXPathIsNodeType(name)) {
- #ifdef DEBUG_STEP
- xmlGenericError(xmlGenericErrorContext,
- "PathExpr: Type search\n");
- #endif
- lc = 1;
-+#ifdef LIBXML_XPTR_ENABLED
-+ } else if (ctxt->xptr &&
-+ xmlStrEqual(name, BAD_CAST "range-to")) {
-+ lc = 1;
-+#endif
- } else {
- #ifdef DEBUG_STEP
- xmlGenericError(xmlGenericErrorContext,
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..d74174a 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
- ret->here = here;
- ret->origin = origin;
-
-- xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
-- xmlXPtrRangeToFunction);
- xmlXPathRegisterFunc(ret, (xmlChar *)"range",
- xmlXPtrRangeFunction);
- xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
-@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- * @nargs: the number of args
- *
- * Implement the range-to() XPointer function
-+ *
-+ * Obsolete. range-to is not a real function but a special type of location
-+ * step which is handled in xpath.c.
- */
- void
--xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
-- xmlXPathObjectPtr range;
-- const xmlChar *cur;
-- xmlXPathObjectPtr res, obj;
-- xmlXPathObjectPtr tmp;
-- xmlLocationSetPtr newset = NULL;
-- xmlNodeSetPtr oldset;
-- int i;
--
-- if (ctxt == NULL) return;
-- CHECK_ARITY(1);
-- /*
-- * Save the expression pointer since we will have to evaluate
-- * it multiple times. Initialize the new set.
-- */
-- CHECK_TYPE(XPATH_NODESET);
-- obj = valuePop(ctxt);
-- oldset = obj->nodesetval;
-- ctxt->context->node = NULL;
--
-- cur = ctxt->cur;
-- newset = xmlXPtrLocationSetCreate(NULL);
--
-- for (i = 0; i < oldset->nodeNr; i++) {
-- ctxt->cur = cur;
--
-- /*
-- * Run the evaluation with a node list made of a single item
-- * in the nodeset.
-- */
-- ctxt->context->node = oldset->nodeTab[i];
-- tmp = xmlXPathNewNodeSet(ctxt->context->node);
-- valuePush(ctxt, tmp);
--
-- xmlXPathEvalExpr(ctxt);
-- CHECK_ERROR;
--
-- /*
-- * The result of the evaluation need to be tested to
-- * decided whether the filter succeeded or not
-- */
-- res = valuePop(ctxt);
-- range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res);
-- if (range != NULL) {
-- xmlXPtrLocationSetAdd(newset, range);
-- }
--
-- /*
-- * Cleanup
-- */
-- if (res != NULL)
-- xmlXPathFreeObject(res);
-- if (ctxt->value == tmp) {
-- res = valuePop(ctxt);
-- xmlXPathFreeObject(res);
-- }
--
-- ctxt->context->node = NULL;
-- }
--
-- /*
-- * The result is used as the new evaluation set.
-- */
-- xmlXPathFreeObject(obj);
-- ctxt->context->node = NULL;
-- ctxt->context->contextSize = -1;
-- ctxt->context->proximityPosition = -1;
-- valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
-+xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
-+ int nargs ATTRIBUTE_UNUSED) {
-+ XP_ERROR(XPATH_EXPR_ERROR);
- }
-
- /**
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
deleted file mode 100644
index 010826585..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-libxml2: Fix CVE-2017-0663
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=780228
-
-valid: Fix type confusion in xmlValidateOneNamespace
-
-Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types
-on namespace declarations make no practical sense anyway.
-
-Fixes bug 780228
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=92b9e8c8b3787068565a1820ba575d042f9eec66]
-CVE: CVE-2017-0663
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..e03d35e 100644
---- a/valid.c
-+++ b/valid.c
-@@ -4621,6 +4621,12 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- }
- }
-
-+ /*
-+ * Casting ns to xmlAttrPtr is wrong. We'd need separate functions
-+ * xmlAddID and xmlAddRef for namespace declarations, but it makes
-+ * no practical sense to use ID types anyway.
-+ */
-+#if 0
- /* Validity Constraint: ID uniqueness */
- if (attrDecl->atype == XML_ATTRIBUTE_ID) {
- if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-@@ -4632,6 +4638,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
- ret = 0;
- }
-+#endif
-
- /* Validity Constraint: Notation Attributes */
- if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
deleted file mode 100644
index 571b05c08..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-5969
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=758422
-
-valid: Fix NULL pointer deref in xmlDumpElementContent
-
-Can only be triggered in recovery mode.
-
-Fixes bug 758422
-
-Upstream-Status: Backport - [https://git.gnome.org/browse/libxml2/commit/?id=94691dc884d1a8ada39f073408b4bb92fe7fe882]
-CVE: CVE-2017-5969
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..0a8e58a 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1172,29 +1172,33 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
- xmlBufferWriteCHAR(buf, content->name);
- break;
- case XML_ELEMENT_CONTENT_SEQ:
-- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+ if ((content->c1 != NULL) &&
-+ ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- xmlDumpElementContent(buf, content->c1, 1);
- else
- xmlDumpElementContent(buf, content->c1, 0);
- xmlBufferWriteChar(buf, " , ");
-- if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-- ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-- (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+ if ((content->c2 != NULL) &&
-+ ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-+ ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- xmlDumpElementContent(buf, content->c2, 1);
- else
- xmlDumpElementContent(buf, content->c2, 0);
- break;
- case XML_ELEMENT_CONTENT_OR:
-- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+ if ((content->c1 != NULL) &&
-+ ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- xmlDumpElementContent(buf, content->c1, 1);
- else
- xmlDumpElementContent(buf, content->c1, 0);
- xmlBufferWriteChar(buf, " | ");
-- if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-- ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-- (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+ if ((content->c2 != NULL) &&
-+ ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-+ ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- xmlDumpElementContent(buf, content->c2, 1);
- else
- xmlDumpElementContent(buf, content->c2, 0);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
deleted file mode 100644
index 26779aa57..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d2f873a541c72b0f67e15562819bf98b884b30b7 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 23 Aug 2017 16:04:49 +0800
-Subject: [PATCH] fix CVE-2017-8872
-
-this makes xmlHaltParser "empty" the buffer, as it resets cur and ava
-il too here.
-
-this seems to cure this specific issue, and also passes the testsuite
-
-Signed-off-by: Marcus Meissner <meissner@suse.de>
-
-https://bugzilla.gnome.org/show_bug.cgi?id=775200
-Upstream-Status: Backport [https://bugzilla.gnome.org/attachment.cgi?id=355527&action=diff]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- parser.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index 9506ead..6c07ffd 100644
---- a/parser.c
-+++ b/parser.c
-@@ -12664,6 +12664,10 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
- }
- ctxt->input->cur = BAD_CAST"";
- ctxt->input->base = ctxt->input->cur;
-+ if (ctxt->input->buf) {
-+ xmlBufEmpty (ctxt->input->buf->buffer);
-+ } else
-+ ctxt->input->length = 0;
- }
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
deleted file mode 100644
index 8b034560f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9047 and CVE-2017-9048
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781333
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781701
-
-valid: Fix buffer size checks in xmlSnprintfElementContent
-
-xmlSnprintfElementContent failed to correctly check the available
-buffer space in two locations.
-
-Fixes bug 781333 and bug 781701
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9047 CVE-2017-9048
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/result/valid/781333.xml b/result/valid/781333.xml
-new file mode 100644
-index 0000000..01baf11
---- /dev/null
-+++ b/result/valid/781333.xml
-@@ -0,0 +1,5 @@
-+<?xml version="1.0"?>
-+<!DOCTYPE a [
-+<!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/result/valid/781333.xml.err b/result/valid/781333.xml.err
-new file mode 100644
-index 0000000..2176200
---- /dev/null
-+++ b/result/valid/781333.xml.err
-@@ -0,0 +1,3 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got
-+<a/>
-+ ^
-diff --git a/result/valid/781333.xml.err.rdr b/result/valid/781333.xml.err.rdr
-new file mode 100644
-index 0000000..1195a04
---- /dev/null
-+++ b/result/valid/781333.xml.err.rdr
-@@ -0,0 +1,6 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got
-+<a/>
-+ ^
-+./test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child
-+
-+^
-diff --git a/test/valid/781333.xml b/test/valid/781333.xml
-new file mode 100644
-index 0000000..bceac9c
---- /dev/null
-+++ b/test/valid/781333.xml
-@@ -0,0 +1,4 @@
-+<!DOCTYPE a [
-+ <!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/valid.c b/valid.c
-index 19f84b8..aaa30f6 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1262,22 +1262,23 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- case XML_ELEMENT_CONTENT_PCDATA:
- strcat(buf, "#PCDATA");
- break;
-- case XML_ELEMENT_CONTENT_ELEMENT:
-+ case XML_ELEMENT_CONTENT_ELEMENT: {
-+ int qnameLen = xmlStrlen(content->name);
-+
-+ if (content->prefix != NULL)
-+ qnameLen += xmlStrlen(content->prefix) + 1;
-+ if (size - len < qnameLen + 10) {
-+ strcat(buf, " ...");
-+ return;
-+ }
- if (content->prefix != NULL) {
-- if (size - len < xmlStrlen(content->prefix) + 10) {
-- strcat(buf, " ...");
-- return;
-- }
- strcat(buf, (char *) content->prefix);
- strcat(buf, ":");
- }
-- if (size - len < xmlStrlen(content->name) + 10) {
-- strcat(buf, " ...");
-- return;
-- }
- if (content->name != NULL)
- strcat(buf, (char *) content->name);
- break;
-+ }
- case XML_ELEMENT_CONTENT_SEQ:
- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-@@ -1319,6 +1320,7 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- xmlSnprintfElementContent(buf, size, content->c2, 0);
- break;
- }
-+ if (size - strlen(buf) <= 2) return;
- if (englob)
- strcat(buf, ")");
- switch (content->ocur) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
deleted file mode 100644
index 591075de3..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9049 and CVE-2017-9050
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781205
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781361
-
-parser: Fix handling of parameter-entity references
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-Percent sign in DTD Names
-=========================
-
-The NEXTL macro used to call xmlParserHandlePEReference. When parsing
-"complex" names inside the DTD, this could result in entity expansion
-which created a new input buffer. The fix is to simply remove the call
-to xmlParserHandlePEReference from the NEXTL macro. This is safe because
-no users of the macro require expansion of parameter entities.
-
-- xmlParseNameComplex
-- xmlParseNCNameComplex
-- xmlParseNmtoken
-
-The percent sign is not allowed in names, which are grammatical tokens.
-
-- xmlParseEntityValue
-
-Parameter-entity references in entity values are expanded but this
-happens in a separate step in this function.
-
-- xmlParseSystemLiteral
-
-Parameter-entity references are ignored in the system literal.
-
-- xmlParseAttValueComplex
-- xmlParseCharDataComplex
-- xmlParseCommentComplex
-- xmlParsePI
-- xmlParseCDSect
-
-Parameter-entity references are ignored outside the DTD.
-
-- xmlLoadEntityContent
-
-This function is only called from xmlStringLenDecodeEntities and
-entities are replaced in a separate step immediately after the function
-call.
-
-This bug could also be triggered with an internal subset and double
-entity expansion.
-
-This fixes bug 766956 initially reported by Wei Lei and independently by
-Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
-involved.
-
-xmlParseNameComplex with XML_PARSE_OLD10
-========================================
-
-When parsing Names inside an expanded parameter entity with the
-XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
-GROW macro if the input buffer was exhausted. At the end of the
-parameter entity's replacement text, this function would then call
-xmlPopInput which invalidated the input buffer.
-
-There should be no need to invoke GROW in this situation because the
-buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
-at least for UTF-8, in xmlCurrentChar. This also matches the code path
-executed when XML_PARSE_OLD10 is not set.
-
-This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
-Thanks to Marcel Böhme and Thuan Pham for the report.
-
-Additional hardening
-====================
-
-A separate check was added in xmlParseNameComplex to validate the
-buffer size.
-
-Fixes bug 781205 and bug 781361
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9049 CVE-2017-9050
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index 9f988b0..dab15a4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -422,6 +422,24 @@ Errtests : xmllint$(EXEEXT)
- if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
- rm result.$$name error.$$name ; \
- fi ; fi ; done)
-+ @echo "## Error cases regression tests (old 1.0)"
-+ -@(for i in $(srcdir)/test/errors10/*.xml ; do \
-+ name=`basename $$i`; \
-+ if [ ! -d $$i ] ; then \
-+ if [ ! -f $(srcdir)/result/errors10/$$name ] ; then \
-+ echo New test file $$name ; \
-+ $(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i \
-+ 2> $(srcdir)/result/errors10/$$name.err \
-+ > $(srcdir)/result/errors10/$$name ; \
-+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
-+ else \
-+ log=`$(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i 2> error.$$name > result.$$name ; \
-+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
-+ diff $(srcdir)/result/errors10/$$name result.$$name ; \
-+ diff $(srcdir)/result/errors10/$$name.err error.$$name` ; \
-+ if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
-+ rm result.$$name error.$$name ; \
-+ fi ; fi ; done)
- @echo "## Error cases stream regression tests"
- -@(for i in $(srcdir)/test/errors/*.xml ; do \
- name=`basename $$i`; \
-diff --git a/parser.c b/parser.c
-index 609a270..8e11c12 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2115,7 +2115,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
- ctxt->input->line++; ctxt->input->col = 1; \
- } else ctxt->input->col++; \
- ctxt->input->cur += l; \
-- if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
- } while (0)
-
- #define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
-@@ -3406,13 +3405,6 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- len += l;
- NEXTL(l);
- c = CUR_CHAR(l);
-- if (c == 0) {
-- count = 0;
-- GROW;
-- if (ctxt->instate == XML_PARSER_EOF)
-- return(NULL);
-- c = CUR_CHAR(l);
-- }
- }
- }
- if ((len > XML_MAX_NAME_LENGTH) &&
-@@ -3420,6 +3412,16 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
- return(NULL);
- }
-+ if (ctxt->input->cur - ctxt->input->base < len) {
-+ /*
-+ * There were a couple of bugs where PERefs lead to to a change
-+ * of the buffer. Check the buffer size to avoid passing an invalid
-+ * pointer to xmlDictLookup.
-+ */
-+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
-+ "unexpected change of input buffer");
-+ return (NULL);
-+ }
- if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
-diff --git a/result/errors10/781205.xml b/result/errors10/781205.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781205.xml.err b/result/errors10/781205.xml.err
-new file mode 100644
-index 0000000..da15c3f
---- /dev/null
-+++ b/result/errors10/781205.xml.err
-@@ -0,0 +1,21 @@
-+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+ %a;
-+ ^
-+Entity: line 1:
-+<:0000
-+^
-+Entity: line 1: parser error : DOCTYPE improperly terminated
-+ %a;
-+ ^
-+Entity: line 1:
-+<:0000
-+^
-+namespace error : Failed to parse QName ':0000'
-+ %a;
-+ ^
-+<:0000
-+ ^
-+./test/errors10/781205.xml:4: parser error : Couldn't find end of Start Tag :0000 line 1
-+
-+^
-diff --git a/result/errors10/781361.xml b/result/errors10/781361.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781361.xml.err b/result/errors10/781361.xml.err
-new file mode 100644
-index 0000000..655f41a
---- /dev/null
-+++ b/result/errors10/781361.xml.err
-@@ -0,0 +1,13 @@
-+./test/errors10/781361.xml:4: parser error : xmlParseElementDecl: 'EMPTY', 'ANY' or '(' expected
-+
-+^
-+./test/errors10/781361.xml:4: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+
-+^
-+./test/errors10/781361.xml:4: parser error : DOCTYPE improperly terminated
-+
-+^
-+./test/errors10/781361.xml:4: parser error : Start tag expected, '<' not found
-+
-+^
-diff --git a/result/valid/766956.xml b/result/valid/766956.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/valid/766956.xml.err b/result/valid/766956.xml.err
-new file mode 100644
-index 0000000..34b1dae
---- /dev/null
-+++ b/result/valid/766956.xml.err
-@@ -0,0 +1,9 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+ ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent;
-+ ^
-+Entity: line 1:
-+value
-+^
-diff --git a/result/valid/766956.xml.err.rdr b/result/valid/766956.xml.err.rdr
-new file mode 100644
-index 0000000..7760346
---- /dev/null
-+++ b/result/valid/766956.xml.err.rdr
-@@ -0,0 +1,10 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+ ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent;
-+ ^
-+Entity: line 1:
-+value
-+^
-+./test/valid/766956.xml : failed to parse
-diff --git a/runtest.c b/runtest.c
-index bb74d2a..63e8c20 100644
---- a/runtest.c
-+++ b/runtest.c
-@@ -4202,6 +4202,9 @@ testDesc testDescriptions[] = {
- { "Error cases regression tests",
- errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
- 0 },
-+ { "Error cases regression tests (old 1.0)",
-+ errParseTest, "./test/errors10/*.xml", "result/errors10/", "", ".err",
-+ XML_PARSE_OLD10 },
- #ifdef LIBXML_READER_ENABLED
- { "Error cases stream regression tests",
- streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
-diff --git a/test/errors10/781205.xml b/test/errors10/781205.xml
-new file mode 100644
-index 0000000..d9e9e83
---- /dev/null
-+++ b/test/errors10/781205.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE D [
-+ <!ENTITY % a "<:0000">
-+ %a;
-diff --git a/test/errors10/781361.xml b/test/errors10/781361.xml
-new file mode 100644
-index 0000000..67476bc
---- /dev/null
-+++ b/test/errors10/781361.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE doc [
-+ <!ENTITY % elem "<!ELEMENT e0000000000">
-+ %elem;
-diff --git a/test/valid/766956.xml b/test/valid/766956.xml
-new file mode 100644
-index 0000000..19a95a0
---- /dev/null
-+++ b/test/valid/766956.xml
-@@ -0,0 +1,2 @@
-+<!DOCTYPE test SYSTEM "dtds/766956.dtd">
-+<test/>
-diff --git a/test/valid/dtds/766956.dtd b/test/valid/dtds/766956.dtd
-new file mode 100644
-index 0000000..dddde68
---- /dev/null
-+++ b/test/valid/dtds/766956.dtd
-@@ -0,0 +1,2 @@
-+<!ENTITY % ent "value">
-+%ä%ent;
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
deleted file mode 100644
index c60e32f65..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-libxml2-2.9.4: Fix more NULL pointer derefs
-
-xpointer: Fix more NULL pointer derefs
-
-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/xpointer.c b/xpointer.c
-index 676c510..074db24 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -555,7 +555,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- /*
- * Empty set ...
- */
-- if (end->nodesetval->nodeNr <= 0)
-+ if ((end->nodesetval == NULL) || (end->nodesetval->nodeNr <= 0))
- return(NULL);
- break;
- default:
-@@ -1400,7 +1400,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
- */
- xmlNodeSetPtr set;
- set = tmp->nodesetval;
-- if ((set->nodeNr != 1) ||
-+ if ((set == NULL) || (set->nodeNr != 1) ||
- (set->nodeTab[0] != (xmlNodePtr) ctx->doc))
- stack++;
- } else
-@@ -2073,9 +2073,11 @@ xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- xmlXPathFreeObject(set);
- XP_ERROR(XPATH_MEMORY_ERROR);
- }
-- for (i = 0;i < oldset->locNr;i++) {
-- xmlXPtrLocationSetAdd(newset,
-- xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+ if (oldset != NULL) {
-+ for (i = 0;i < oldset->locNr;i++) {
-+ xmlXPtrLocationSetAdd(newset,
-+ xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+ }
- }
-
- /*
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
deleted file mode 100644
index faa57701f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
+++ /dev/null
@@ -1,590 +0,0 @@
-libxml2-2.9.4: Avoid reparsing and simplify control flow in xmlParseStartTag2
-
-[No upstream tracking]
-
-parser: Avoid reparsing in xmlParseStartTag2
-
-The code in xmlParseStartTag2 must handle the case that the input
-buffer was grown and reallocated which can invalidate pointers to
-attribute values. Before, this was handled by detecting changes of
-the input buffer "base" pointer and, in case of a change, jumping
-back to the beginning of the function and reparsing the start tag.
-
-The major problem of this approach is that whether an input buffer is
-reallocated is nondeterministic, resulting in seemingly random test
-failures. See the mailing list thread "runtest mystery bug: name2.xml
-error case regression test" from 2012, for example.
-
-If a reallocation was detected, the code also made no attempts to
-continue parsing in case of errors which makes a difference in
-the lax "recover" mode.
-
-Now we store the current input buffer "base" pointer for each (not
-separately allocated) attribute in the namespace URI field, which isn't
-used until later. After the whole start tag was parsed, the pointers to
-the attribute values are reconstructed using the offset between the
-new and the old input buffer. This relies on arithmetic on dangling
-pointers which is technically undefined behavior. But it seems like
-the easiest and most efficient fix and a similar approach is used in
-xmlParserInputGrow.
-
-This changes the error output of several tests, typically making it
-more verbose because we try harder to continue parsing in case of errors.
-
-(Another possible solution is to check not only the "base" pointer
-but the size of the input buffer as well. But this would result in
-even more reparsing.)
-
-Remove some goto labels and deduplicate a bit of code after handling
-namespaces.
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=07b7428b69c368611d215a140fe630b2d1e61349]
- - [https://git.gnome.org/browse/libxml2/commit/?id=855c19efb7cd30d927d673b3658563c4959ca6f0]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/parser.c b/parser.c
-index 609a270..74016e3 100644
---- a/parser.c
-+++ b/parser.c
-@@ -43,6 +43,7 @@
- #include <limits.h>
- #include <string.h>
- #include <stdarg.h>
-+#include <stddef.h>
- #include <libxml/xmlmemory.h>
- #include <libxml/threads.h>
- #include <libxml/globals.h>
-@@ -9377,8 +9378,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
- const xmlChar **atts = ctxt->atts;
- int maxatts = ctxt->maxatts;
- int nratts, nbatts, nbdef;
-- int i, j, nbNs, attval, oldline, oldcol, inputNr;
-- const xmlChar *base;
-+ int i, j, nbNs, attval;
- unsigned long cur;
- int nsNr = ctxt->nsNr;
-
-@@ -9392,13 +9392,8 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
- * The Shrinking is only possible once the full set of attribute
- * callbacks have been done.
- */
--reparse:
- SHRINK;
-- base = ctxt->input->base;
- cur = ctxt->input->cur - ctxt->input->base;
-- inputNr = ctxt->inputNr;
-- oldline = ctxt->input->line;
-- oldcol = ctxt->input->col;
- nbatts = 0;
- nratts = 0;
- nbdef = 0;
-@@ -9422,8 +9417,6 @@ reparse:
- */
- SKIP_BLANKS;
- GROW;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-
- while (((RAW != '>') &&
- ((RAW != '/') || (NXT(1) != '>')) &&
-@@ -9434,203 +9427,174 @@ reparse:
-
- attname = xmlParseAttribute2(ctxt, prefix, localname,
- &aprefix, &attvalue, &len, &alloc);
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr)) {
-- if ((attvalue != NULL) && (alloc != 0))
-- xmlFree(attvalue);
-- attvalue = NULL;
-- goto base_changed;
-- }
-- if ((attname != NULL) && (attvalue != NULL)) {
-- if (len < 0) len = xmlStrlen(attvalue);
-- if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
-- const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-- xmlURIPtr uri;
--
-- if (URL == NULL) {
-- xmlErrMemory(ctxt, "dictionary allocation failure");
-- if ((attvalue != NULL) && (alloc != 0))
-- xmlFree(attvalue);
-- return(NULL);
-- }
-- if (*URL != 0) {
-- uri = xmlParseURI((const char *) URL);
-- if (uri == NULL) {
-- xmlNsErr(ctxt, XML_WAR_NS_URI,
-- "xmlns: '%s' is not a valid URI\n",
-- URL, NULL, NULL);
-- } else {
-- if (uri->scheme == NULL) {
-- xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-- "xmlns: URI %s is not absolute\n",
-- URL, NULL, NULL);
-- }
-- xmlFreeURI(uri);
-- }
-- if (URL == ctxt->str_xml_ns) {
-- if (attname != ctxt->str_xml) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace URI cannot be the default namespace\n",
-- NULL, NULL, NULL);
-- }
-- goto skip_default_ns;
-- }
-- if ((len == 29) &&
-- (xmlStrEqual(URL,
-- BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "reuse of the xmlns namespace name is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_default_ns;
-- }
-- }
-- /*
-- * check that it's not a defined namespace
-- */
-- for (j = 1;j <= nbNs;j++)
-- if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
-- break;
-- if (j <= nbNs)
-- xmlErrAttributeDup(ctxt, NULL, attname);
-- else
-- if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
--skip_default_ns:
-- if ((attvalue != NULL) && (alloc != 0)) {
-- xmlFree(attvalue);
-- attvalue = NULL;
-- }
-- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
-- break;
-- if (!IS_BLANK_CH(RAW)) {
-- xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
-- "attributes construct error\n");
-- break;
-- }
-- SKIP_BLANKS;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-- continue;
-- }
-- if (aprefix == ctxt->str_xmlns) {
-- const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-- xmlURIPtr uri;
--
-- if (attname == ctxt->str_xml) {
-- if (URL != ctxt->str_xml_ns) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace prefix mapped to wrong URI\n",
-- NULL, NULL, NULL);
-- }
-- /*
-- * Do not keep a namespace definition node
-- */
-- goto skip_ns;
-- }
-+ if ((attname == NULL) || (attvalue == NULL))
-+ goto next_attr;
-+ if (len < 0) len = xmlStrlen(attvalue);
-+
-+ if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
-+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+ xmlURIPtr uri;
-+
-+ if (URL == NULL) {
-+ xmlErrMemory(ctxt, "dictionary allocation failure");
-+ if ((attvalue != NULL) && (alloc != 0))
-+ xmlFree(attvalue);
-+ return(NULL);
-+ }
-+ if (*URL != 0) {
-+ uri = xmlParseURI((const char *) URL);
-+ if (uri == NULL) {
-+ xmlNsErr(ctxt, XML_WAR_NS_URI,
-+ "xmlns: '%s' is not a valid URI\n",
-+ URL, NULL, NULL);
-+ } else {
-+ if (uri->scheme == NULL) {
-+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+ "xmlns: URI %s is not absolute\n",
-+ URL, NULL, NULL);
-+ }
-+ xmlFreeURI(uri);
-+ }
- if (URL == ctxt->str_xml_ns) {
-- if (attname != ctxt->str_xml) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace URI mapped to wrong prefix\n",
-- NULL, NULL, NULL);
-- }
-- goto skip_ns;
-- }
-- if (attname == ctxt->str_xmlns) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "redefinition of the xmlns prefix is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_ns;
-- }
-- if ((len == 29) &&
-- (xmlStrEqual(URL,
-- BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "reuse of the xmlns namespace name is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_ns;
-- }
-- if ((URL == NULL) || (URL[0] == 0)) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xmlns:%s: Empty XML namespace is not allowed\n",
-- attname, NULL, NULL);
-- goto skip_ns;
-- } else {
-- uri = xmlParseURI((const char *) URL);
-- if (uri == NULL) {
-- xmlNsErr(ctxt, XML_WAR_NS_URI,
-- "xmlns:%s: '%s' is not a valid URI\n",
-- attname, URL, NULL);
-- } else {
-- if ((ctxt->pedantic) && (uri->scheme == NULL)) {
-- xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-- "xmlns:%s: URI %s is not absolute\n",
-- attname, URL, NULL);
-- }
-- xmlFreeURI(uri);
-- }
-- }
--
-- /*
-- * check that it's not a defined namespace
-- */
-- for (j = 1;j <= nbNs;j++)
-- if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
-- break;
-- if (j <= nbNs)
-- xmlErrAttributeDup(ctxt, aprefix, attname);
-- else
-- if (nsPush(ctxt, attname, URL) > 0) nbNs++;
--skip_ns:
-- if ((attvalue != NULL) && (alloc != 0)) {
-- xmlFree(attvalue);
-- attvalue = NULL;
-- }
-- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
-- break;
-- if (!IS_BLANK_CH(RAW)) {
-- xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
-- "attributes construct error\n");
-- break;
-- }
-- SKIP_BLANKS;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-- continue;
-- }
-+ if (attname != ctxt->str_xml) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace URI cannot be the default namespace\n",
-+ NULL, NULL, NULL);
-+ }
-+ goto next_attr;
-+ }
-+ if ((len == 29) &&
-+ (xmlStrEqual(URL,
-+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "reuse of the xmlns namespace name is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ }
-+ /*
-+ * check that it's not a defined namespace
-+ */
-+ for (j = 1;j <= nbNs;j++)
-+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
-+ break;
-+ if (j <= nbNs)
-+ xmlErrAttributeDup(ctxt, NULL, attname);
-+ else
-+ if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
-+
-+ } else if (aprefix == ctxt->str_xmlns) {
-+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+ xmlURIPtr uri;
-+
-+ if (attname == ctxt->str_xml) {
-+ if (URL != ctxt->str_xml_ns) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace prefix mapped to wrong URI\n",
-+ NULL, NULL, NULL);
-+ }
-+ /*
-+ * Do not keep a namespace definition node
-+ */
-+ goto next_attr;
-+ }
-+ if (URL == ctxt->str_xml_ns) {
-+ if (attname != ctxt->str_xml) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace URI mapped to wrong prefix\n",
-+ NULL, NULL, NULL);
-+ }
-+ goto next_attr;
-+ }
-+ if (attname == ctxt->str_xmlns) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "redefinition of the xmlns prefix is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ if ((len == 29) &&
-+ (xmlStrEqual(URL,
-+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "reuse of the xmlns namespace name is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ if ((URL == NULL) || (URL[0] == 0)) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xmlns:%s: Empty XML namespace is not allowed\n",
-+ attname, NULL, NULL);
-+ goto next_attr;
-+ } else {
-+ uri = xmlParseURI((const char *) URL);
-+ if (uri == NULL) {
-+ xmlNsErr(ctxt, XML_WAR_NS_URI,
-+ "xmlns:%s: '%s' is not a valid URI\n",
-+ attname, URL, NULL);
-+ } else {
-+ if ((ctxt->pedantic) && (uri->scheme == NULL)) {
-+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+ "xmlns:%s: URI %s is not absolute\n",
-+ attname, URL, NULL);
-+ }
-+ xmlFreeURI(uri);
-+ }
-+ }
-
-- /*
-- * Add the pair to atts
-- */
-- if ((atts == NULL) || (nbatts + 5 > maxatts)) {
-- if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
-- if (attvalue[len] == 0)
-- xmlFree(attvalue);
-- goto failed;
-- }
-- maxatts = ctxt->maxatts;
-- atts = ctxt->atts;
-- }
-- ctxt->attallocs[nratts++] = alloc;
-- atts[nbatts++] = attname;
-- atts[nbatts++] = aprefix;
-- atts[nbatts++] = NULL; /* the URI will be fetched later */
-- atts[nbatts++] = attvalue;
-- attvalue += len;
-- atts[nbatts++] = attvalue;
-- /*
-- * tag if some deallocation is needed
-- */
-- if (alloc != 0) attval = 1;
-- } else {
-- if ((attvalue != NULL) && (attvalue[len] == 0))
-- xmlFree(attvalue);
-- }
-+ /*
-+ * check that it's not a defined namespace
-+ */
-+ for (j = 1;j <= nbNs;j++)
-+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
-+ break;
-+ if (j <= nbNs)
-+ xmlErrAttributeDup(ctxt, aprefix, attname);
-+ else
-+ if (nsPush(ctxt, attname, URL) > 0) nbNs++;
-+
-+ } else {
-+ /*
-+ * Add the pair to atts
-+ */
-+ if ((atts == NULL) || (nbatts + 5 > maxatts)) {
-+ if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
-+ goto next_attr;
-+ }
-+ maxatts = ctxt->maxatts;
-+ atts = ctxt->atts;
-+ }
-+ ctxt->attallocs[nratts++] = alloc;
-+ atts[nbatts++] = attname;
-+ atts[nbatts++] = aprefix;
-+ /*
-+ * The namespace URI field is used temporarily to point at the
-+ * base of the current input buffer for non-alloced attributes.
-+ * When the input buffer is reallocated, all the pointers become
-+ * invalid, but they can be reconstructed later.
-+ */
-+ if (alloc)
-+ atts[nbatts++] = NULL;
-+ else
-+ atts[nbatts++] = ctxt->input->base;
-+ atts[nbatts++] = attvalue;
-+ attvalue += len;
-+ atts[nbatts++] = attvalue;
-+ /*
-+ * tag if some deallocation is needed
-+ */
-+ if (alloc != 0) attval = 1;
-+ attvalue = NULL; /* moved into atts */
-+ }
-
--failed:
-+next_attr:
-+ if ((attvalue != NULL) && (alloc != 0)) {
-+ xmlFree(attvalue);
-+ attvalue = NULL;
-+ }
-
- GROW
- if (ctxt->instate == XML_PARSER_EOF)
- break;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
- break;
- if (!IS_BLANK_CH(RAW)) {
-@@ -9646,8 +9610,20 @@ failed:
- break;
- }
- GROW;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-+ }
-+
-+ /* Reconstruct attribute value pointers. */
-+ for (i = 0, j = 0; j < nratts; i += 5, j++) {
-+ if (atts[i+2] != NULL) {
-+ /*
-+ * Arithmetic on dangling pointers is technically undefined
-+ * behavior, but well...
-+ */
-+ ptrdiff_t offset = ctxt->input->base - atts[i+2];
-+ atts[i+2] = NULL; /* Reset repurposed namespace URI */
-+ atts[i+3] += offset; /* value */
-+ atts[i+4] += offset; /* valuend */
-+ }
- }
-
- /*
-@@ -9804,34 +9780,6 @@ failed:
- }
-
- return(localname);
--
--base_changed:
-- /*
-- * the attribute strings are valid iif the base didn't changed
-- */
-- if (attval != 0) {
-- for (i = 3,j = 0; j < nratts;i += 5,j++)
-- if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
-- xmlFree((xmlChar *) atts[i]);
-- }
--
-- /*
-- * We can't switch from one entity to another in the middle
-- * of a start tag
-- */
-- if (inputNr != ctxt->inputNr) {
-- xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
-- "Start tag doesn't start and stop in the same entity\n");
-- return(NULL);
-- }
--
-- ctxt->input->cur = ctxt->input->base + cur;
-- ctxt->input->line = oldline;
-- ctxt->input->col = oldcol;
-- if (ctxt->wellFormed == 1) {
-- goto reparse;
-- }
-- return(NULL);
- }
-
- /**
-diff --git a/result/errors/759398.xml.err b/result/errors/759398.xml.err
-index e08d9bf..f6036a3 100644
---- a/result/errors/759398.xml.err
-+++ b/result/errors/759398.xml.err
-@@ -1,9 +1,12 @@
- ./test/errors/759398.xml:210: parser error : StartTag: invalid element name
- need to worry about parsers whi<! don't expand PErefs finding
- ^
--./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: spec line 50 and termdef
-+./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: №№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№m line 308 and termdef
- and provide access to their content and structure.</termdef> <termdef
- ^
--./test/errors/759398.xml:309: parser error : Extra content at the end of the document
--and provide access to their content and structure.</termdef> <termdef
-- ^
-+./test/errors/759398.xml:314: parser error : Opening and ending tag mismatch: spec line 50 and p
-+data and the information it must provide to the application.</p>
-+ ^
-+./test/errors/759398.xml:316: parser error : Extra content at the end of the document
-+<div2 id='sec-origin-goals'>
-+^
-diff --git a/result/errors/attr1.xml.err b/result/errors/attr1.xml.err
-index 4f08538..c4c4fc8 100644
---- a/result/errors/attr1.xml.err
-+++ b/result/errors/attr1.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr1.xml:2: parser error : AttValue: ' expected
-
- ^
--./test/errors/attr1.xml:1: parser error : Extra content at the end of the document
--<foo foo="oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr1.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr1.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/attr2.xml.err b/result/errors/attr2.xml.err
-index c8a9c7d..77e342e 100644
---- a/result/errors/attr2.xml.err
-+++ b/result/errors/attr2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr2.xml:2: parser error : AttValue: ' expected
-
- ^
--./test/errors/attr2.xml:1: parser error : Extra content at the end of the document
--<foo foo=">ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/name2.xml.err b/result/errors/name2.xml.err
-index a6649a1..8a6acee 100644
---- a/result/errors/name2.xml.err
-+++ b/result/errors/name2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/name2.xml:2: parser error : Specification mandate value for attribute foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-
- ^
--./test/errors/name2.xml:1: parser error : Extra content at the end of the document
--<foo foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/name2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/name2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
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
deleted file mode 100644
index 65f6bef1e..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-libxml2-2.9.4: Fix comparison with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
-
-xpath:
- - Check for errors after evaluating first operand.
- - Add sanity check for empty stack.
- - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8]
-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/result/XPath/xptr/viderror b/result/XPath/xptr/viderror
-new file mode 100644
-index 0000000..d589882
---- /dev/null
-+++ b/result/XPath/xptr/viderror
-@@ -0,0 +1,4 @@
-+
-+========================
-+Expression: xpointer(non-existing-fn()/range-to(id('chapter2')))
-+Object is empty (NULL)
-diff --git a/test/XPath/xptr/viderror b/test/XPath/xptr/viderror
-new file mode 100644
-index 0000000..da8c53b
---- /dev/null
-+++ b/test/XPath/xptr/viderror
-@@ -0,0 +1 @@
-+xpointer(non-existing-fn()/range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index 113bce6..d992841 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
- * compute depth to root
- */
- for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
-- if (cur == node1)
-+ if (cur->parent == node1)
- return(1);
- depth2++;
- }
- root = cur;
- for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
-- if (cur == node2)
-+ if (cur->parent == node2)
- return(-1);
- depth1++;
- }
-@@ -14005,9 +14005,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
- xmlNodeSetPtr oldset;
- int i, j;
-
-- if (op->ch1 != -1)
-+ if (op->ch1 != -1) {
- total +=
- xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
-+ CHECK_ERROR0;
-+ }
-+ if (ctxt->value == NULL) {
-+ XP_ERROR0(XPATH_INVALID_OPERAND);
-+ }
- if (op->ch2 == -1)
- return (total);
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
index 6e56857ca..cb171d5b3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -2,47 +2,29 @@ Add 'install-ptest' rule.
Print a standard result line for each test.
Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
-Signed-off-by: Andrej Valek <andrej.valek@enea.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Upstream-Status: Backport
diff -uNr a/Makefile.am b/Makefile.am
---- a/Makefile.am 2016-05-22 03:49:02.000000000 +0200
-+++ b/Makefile.am 2017-06-14 10:38:43.381305385 +0200
-@@ -202,10 +202,24 @@
+--- a/Makefile.am 2017-08-28 15:01:14.000000000 +0200
++++ b/Makefile.am 2017-09-05 08:06:05.752287323 +0200
+@@ -202,6 +202,15 @@
#testOOM_DEPENDENCIES = $(DEPS)
#testOOM_LDADD= $(LDADDS)
+install-ptest:
+ @(if [ -d .libs ] ; then cd .libs; fi; \
-+ install $(noinst_PROGRAMS) $(DESTDIR))
++ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+ cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+
- runtests:
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
[ -d test ] || $(LN_S) $(srcdir)/test .
- [ -d result ] || $(LN_S) $(srcdir)/result .
-- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
-+ $(CHECKER) ./runtest$(EXEEXT) && \
-+ $(CHECKER) ./testrecurse$(EXEEXT) && \
-+ ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT) && \
-+ $(CHECKER) ./testchar$(EXEEXT) && \
-+ $(CHECKER) ./testdict$(EXEEXT) && \
-+ $(CHECKER) ./runxmlconf$(EXEEXT)
- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
- $(MAKE) tests ; fi)
-
-@@ -229,7 +243,7 @@
-
- APItests: testapi$(EXEEXT)
- @echo "## Running the API regression tests this may take a little while"
-- -@($(CHECKER) $(top_builddir)/testapi -q)
-+ -@(ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) $(top_builddir)/testapi -q)
-
- HTMLtests : testHTML$(EXEEXT)
- @(echo > .memdump)
+
diff -uNr a/runsuite.c b/runsuite.c
--- a/runsuite.c 2013-04-12 16:17:11.462823238 +0200
+++ b/runsuite.c 2013-04-17 14:07:24.352693211 +0200
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.7.bb
index 9adb29cfd..2fb90a68a 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.7.bb
@@ -19,21 +19,12 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
file://run-ptest \
file://python-sitepackages-dir.patch \
file://libxml-m4-use-pkgconfig.patch \
- file://libxml2-fix_node_comparison.patch \
- file://libxml2-CVE-2016-5131.patch \
- file://libxml2-CVE-2016-4658.patch \
- file://libxml2-fix_NULL_pointer_derefs.patch \
- file://libxml2-fix_and_simplify_xmlParseStartTag2.patch \
- file://libxml2-CVE-2017-9047_CVE-2017-9048.patch \
- file://libxml2-CVE-2017-9049_CVE-2017-9050.patch \
- file://libxml2-CVE-2017-5969.patch \
- file://libxml2-CVE-2017-0663.patch \
- file://libxml2-CVE-2017-8872.patch \
file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
+ file://fix-execution-of-ptests.patch \
"
-SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
-SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
+SRC_URI[libtar.md5sum] = "896608641a08b465098a40ddf51cefba"
+SRC_URI[libtar.sha256sum] = "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
@@ -49,7 +40,7 @@ inherit autotools pkgconfig binconfig-disabled ptest
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
-RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-argparse python3-logging python3-shell python3-signal python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
@@ -81,6 +72,10 @@ do_configure_prepend () {
find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
}
+do_compile_ptest() {
+ oe_runmake check-am
+}
+
do_install_ptest () {
cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
new file mode 100644
index 000000000..ed83dd77d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -0,0 +1,24 @@
+SUMMARY = "Dummy packages which handle excluding packages from the sdk, e.g. ensuring perl is excluded from buildtools"
+LICENSE = "MIT"
+
+inherit allarch
+
+python() {
+ # Put the package somewhere separate to ensure it's never used except
+ # when we want it
+ # (note that we have to do this in anonymous python here to avoid
+ # allarch.bbclass disabling itself)
+ d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PR[vardeps] += "DUMMYPROVIDES"
+
+python populate_packages_prepend() {
+ p = d.getVar("PN")
+ d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
+ #d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+ #d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
index 29da121a3..09f757a08 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
@@ -55,6 +55,8 @@ create_sdk_files() {
# Add version information
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh
}
do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
index 02abd8aff..b29986137 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -3,6 +3,8 @@ LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
addtask do_allpackagedata before do_build
do_allpackagedata() {
:
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 0b58a027f..f5bcb8254 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -1,26 +1,11 @@
-SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
-LICENSE = "MIT"
+DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
-inherit allarch
+DUMMYPROVIDES = "\
+ nativesdk-perl \
+ nativesdk-perl-module-file-path"
PR = "r2"
-python() {
- # Put the package somewhere separate to ensure it's never used except
- # when we want it
- # (note that we have to do this in anonymous python here to avoid
- # allarch.bbclass disabling itself)
- d.setVar('PACKAGE_ARCH', 'buildtools-dummy-${SDKPKGSUFFIX}')
-}
-
-PERLPACKAGES = "nativesdk-perl \
- nativesdk-perl-module-file-path"
-
-ALLOW_EMPTY_${PN} = "1"
-
-python populate_packages_prepend() {
- d.appendVar(d.expand('RPROVIDES_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RCONFLICTS_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RREPLACES_${PN}'), '${PERLPACKAGES}')
-}
+require dummy-sdk-package.inc
+inherit nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
new file mode 100644
index 000000000..11a727d48
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -0,0 +1,15 @@
+DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
+# Add /bin/sh?
+DUMMYPROVIDES = "\
+ /bin/bash \
+ /usr/bin/env \
+ /usr/bin/perl \
+ pkgconfig \
+ libGL.so()(64bit) \
+ libGL.so \
+"
+
+require dummy-sdk-package.inc
+
+inherit nativesdk
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 2c1cc3845..1e1c7e345 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
@@ -41,6 +41,7 @@ python do_get_public_keys () {
}
do_get_public_keys[cleandirs] = "${B}"
addtask get_public_keys before do_install
+do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot"
do_install () {
if [ -f "${B}/rpm-key" ]; then
@@ -68,7 +69,8 @@ do_deploy () {
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
# cleandirs should possibly be in deploy.bbclass but we need it
do_deploy[cleandirs] = "${DEPLOYDIR}"
-# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
+# clear stamp-extra-info since MACHINE_ARCH is normally put there by
+# deploy.bbclass
do_deploy[stamp-extra-info] = ""
addtask deploy after do_get_public_keys
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
new file mode 100644
index 000000000..714d15d8b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -0,0 +1,11 @@
+DUMMYARCH = "sdk-provides-dummy-target"
+
+DUMMYPROVIDES = "\
+ /bin/sh \
+ /bin/bash \
+ /usr/bin/env \
+ /usr/bin/perl \
+ pkgconfig \
+"
+
+require dummy-sdk-package.inc
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
index 72f5531c5..c38ac902a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
@@ -10,7 +10,13 @@ TOOLCHAIN_TARGET_TASK ?= ""
TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
-SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
+SDK_PACKAGE_ARCHS += "testexport-tools-${SDKPKGSUFFIX}"
TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
@@ -22,7 +28,15 @@ EXCLUDE_FROM_WORLD = "1"
inherit meta
inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
+
+REAL_MULTIMACH_TARGET_SYS = "none"
create_sdk_files_append () {
rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
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 5fabf7fa3..38c3a314e 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
@@ -13,6 +13,7 @@ TOOLCHAIN_HOST_TASK = "\
nativesdk-glibc-gconv-utf-16 \
nativesdk-glibc-gconv-cp1252 \
nativesdk-patchelf \
+ nativesdk-libxcrypt \
"
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
index c9945d45e..c9945d45e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
index 209a623c0..209a623c0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
index 99d01a55b..99d01a55b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
index eaea56aae..eaea56aae 100644
--- a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
new file mode 100644
index 000000000..74b846df5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
@@ -0,0 +1,25 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "getconf, getent and iconv implementations for musl"
+HOMEPAGE = "https://git.alpinelinux.org/cgit/aports/tree/main/musl"
+LICENSE = "BSD-2-Clause & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9d08215e611db87b357e8674b4b42564"
+SECTION = "utils"
+
+# Date of the commit in SRCREV
+PV = "20170421"
+
+SRCREV = "fb5630138ccabbbc14a19d372096a04e42573c7d"
+SRC_URI = "git://github.com/boltlinux/musl-utils"
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "${PN}-iconv"
+
+FILES_${PN}-iconv = "${bindir}/iconv"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
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 9af1172ae..ba9b1a046 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -9,7 +9,7 @@ standards-conformance and safety."
HOMEPAGE = "http://www.musl-libc.org/"
LICENSE = "MIT"
SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=2b9032093c4765e49ae85ddeba29afff"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
index 462d338b9..462d338b9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
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 db26b4fef..9f8c5126e 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 = "eb03bde2f24582874cb72b56c7811bf51da0c817"
+SRCREV = "55df09bfccbfe21fc9dd7d8f94550c0ff25ace04"
-PV = "1.1.18+git${SRCPV}"
+PV = "1.1.19+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
@@ -15,7 +15,7 @@ SRC_URI = "git://git.musl-libc.org/musl \
S = "${WORKDIR}/git"
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl virtual/crypt"
DEPENDS = "virtual/${TARGET_PREFIX}binutils \
virtual/${TARGET_PREFIX}gcc-initial \
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
deleted file mode 100644
index a19332c4b..000000000
--- 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
+++ /dev/null
@@ -1,541 +0,0 @@
-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/ncurses.inc b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
index 1f21cd413..01e41d5f7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
@@ -13,7 +13,7 @@ BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \
inherit autotools binconfig-disabled multilib_header pkgconfig
# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git"
+SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https"
EXTRA_AUTORECONF = "-I m4"
CONFIG_SITE =+ "${WORKDIR}/config.cache"
@@ -59,6 +59,7 @@ EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap"
EX_TERMINFO = ""
EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+EX_TERMLIB ?= "tinfo"
# Helper function for do_configure to allow multiple configurations
# $1 the directory to run configure in
@@ -80,7 +81,7 @@ ncurses_configure() {
--disable-big-core \
--program-prefix= \
--with-ticlib \
- --with-termlib=tinfo \
+ --with-termlib=${EX_TERMLIB} \
--enable-sigwinch \
--enable-pc-files \
--disable-rpath-hack \
@@ -201,7 +202,10 @@ do_install() {
ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
fi
- rm -f ${D}${libdir}/terminfo
+ # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses
+ # still installs '/usr/lib/terminfo', so try to rm both
+ # the proper path and a slightly hardcoded one
+ rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo
# create linker scripts for libcurses.so and libncurses to
# link against -ltinfo when needed. Some builds might break
@@ -227,7 +231,7 @@ do_install() {
if [ ! -d "${D}${base_libdir}" ]; then
# Setting base_libdir to libdir as is done in the -native
# case will skip this code
- mkdir ${D}${base_libdir}
+ mkdir -p ${D}${base_libdir}
mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir}
! ${ENABLE_WIDEC} || \
mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir}
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+20171125.bb
index d1da5d16e..6c4b96f42 100644
--- 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+20171125.bb
@@ -3,10 +3,9 @@ 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"
+SRCREV = "5d849e836052459901cfe0b85a0b2939ff8d2b2a"
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/no-stack-protector-all-archs.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
index 959b1c649..25e5b58e7 100644
--- 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
@@ -17,4 +17,4 @@ Index: git/BaseTools/Conf/tools_def.template
+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
+ DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie
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 fa0d66291..8750b3c52 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
@@ -151,7 +151,7 @@ do_compile_class-native() {
do_compile_class-target() {
export LFLAGS="${LDFLAGS}"
- PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n ')}"
+ PARALLEL_JOBS="${@oe.utils.parallel_make_argument(d, '-n %d')}"
OVMF_ARCH="X64"
if [ "${TARGET_ARCH}" != "x86_64" ] ; then
OVMF_ARCH="IA32"
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 aee4a0371..e2f616999 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
@@ -23,8 +23,8 @@ RDEPENDS_${PN} = "\
nativesdk-makedevs \
nativesdk-dnf \
nativesdk-cmake \
- nativesdk-postinst-intercept \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
+ nativesdk-sdk-provides-dummy \
"
RDEPENDS_${PN}_darwin = "\
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 f9e6e2edd..bb192aed2 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
@@ -54,7 +54,6 @@ RDEPENDS_packagegroup-base = "\
packagegroup-distro-base \
packagegroup-machine-base \
\
- sysfsutils \
module-init-tools \
${@bb.utils.contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
@@ -152,8 +151,7 @@ RDEPENDS_packagegroup-base-pci = "\
SUMMARY_packagegroup-base-acpi = "ACPI support"
RDEPENDS_packagegroup-base-acpi = "\
- acpid \
- libacpi "
+ acpid"
SUMMARY_packagegroup-base-apm = "APM support"
RDEPENDS_packagegroup-base-apm = "\
@@ -292,8 +290,6 @@ RRECOMMENDS_packagegroup-base-ipsec = "\
SUMMARY_packagegroup-base-wifi = "WiFi support"
RDEPENDS_packagegroup-base-wifi = "\
${VIRTUAL-RUNTIME_wireless-tools} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \
wpa-supplicant"
RRECOMMENDS_packagegroup-base-wifi = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 04bc0f2b6..76cd7fc4e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -23,6 +23,8 @@ VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
+EFI_PROVIDER ??= "grub-efi"
+
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
modutils-initscripts \
init-ifupdown \
@@ -35,6 +37,7 @@ RDEPENDS_${PN} = "\
${VIRTUAL-RUNTIME_base-utils} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+ ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
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 af0ce2013..45e8c1358 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
@@ -27,11 +27,10 @@ RDEPENDS_packagegroup-core-sdk = "\
tcl"
SANITIZERS = "libasan-dev libubsan-dev"
-SANITIZERS_aarch64 = ""
+SANITIZERS_microblaze = ""
SANITIZERS_mipsarch = ""
SANITIZERS_nios2 = ""
-SANITIZERS_powerpc64 = ""
-SANITIZERS_sparc = ""
+SANITIZERS_riscv64 = ""
SANITIZERS_libc-musl = ""
RRECOMMENDS_packagegroup-core-sdk = "\
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 a8e47da40..fa0e363d8 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
@@ -26,7 +26,6 @@ RRECOMMENDS_${PN} = "\
PROFILETOOLS = "\
powertop \
- latencytop \
"
PERF = "perf"
PERF_libc-musl = ""
@@ -34,16 +33,16 @@ PERF_libc-musl = ""
# systemtap needs elfutils which is not fully buildable on some arches/libcs
SYSTEMTAP = "systemtap"
SYSTEMTAP_libc-musl = ""
-SYSTEMTAP_mipsarch = ""
SYSTEMTAP_nios2 = ""
-SYSTEMTAP_aarch64 = ""
# lttng-ust uses sched_getcpu() which is not there on for some platforms.
LTTNGUST = "lttng-ust"
LTTNGUST_libc-musl = ""
+LTTNGUST_riscv64 = ""
LTTNGTOOLS = "lttng-tools"
LTTNGTOOLS_libc-musl = ""
+LTTNGTOOLS_riscv64 = ""
LTTNGMODULES = "lttng-modules"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 317097854..b8e507073 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -10,9 +10,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
-# kexec-tools doesn't work on e5500-64b and nios2 yet
+# kexec-tools doesn't work on e5500-64b, microblaze and nios2 yet
KEXECTOOLS ?= "kexec"
KEXECTOOLS_e5500-64b ?= ""
+KEXECTOOLS_microblaze ?= ""
KEXECTOOLS_nios2 ?= ""
X11GLTOOLS = "\
@@ -25,7 +26,7 @@ X11GLTOOLS = "\
X11TOOLS = "\
fstests \
- gst-player \
+ gst-examples \
x11perf \
xrestop \
xwininfo \
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
index 3e190770a..7d2ccbda2 100644
--- 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
@@ -5,4 +5,5 @@ inherit packagegroup goarch
RDEPENDS_${PN} = " \
go-runtime \
go-runtime-dev \
+ go-runtime-staticdev \
"
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 ff42866e3..adb0c56c3 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
@@ -136,7 +136,6 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
mtools \
ncurses \
ncurses-terminfo-base \
- neon \
nfs-utils \
nfs-utils-client \
openssl \
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 3b7f818fc..aab2c0360 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
@@ -12,7 +12,7 @@ PR = "r15"
SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
${SPLASH_IMAGES}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
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
deleted file mode 100644
index 7b18b25e3..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-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-boot_237.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
new file mode 100644
index 000000000..afd3848f2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
@@ -0,0 +1,70 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+
+SRC_URI += "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0027-remove-nobody-user-group-checking.patch \
+ file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \
+ file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
+ "
+
+inherit meson pkgconfig gettext
+inherit deploy
+
+EFI_CC ?= "${CC}"
+EXTRA_OEMESON += "-Defi=true \
+ -Dgnu-efi=true \
+ -Defi-includedir=${STAGING_INCDIR}/efi \
+ -Defi-ldsdir=${STAGING_LIBDIR} \
+ -Defi-libdir=${STAGING_LIBDIR} \
+ -Dman=false \
+ -Defi-cc='${EFI_CC}' \
+ -Defi-ld='${LD}' \
+ "
+
+# install to the image as boot*.efi if its the EFI_PROVIDER,
+# otherwise install as the full name.
+# This allows multiple bootloaders to coexist in a single image.
+python __anonymous () {
+ import re
+ target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
+ if target == "x86_64":
+ systemdimage = prefix + "bootx64.efi"
+ else:
+ systemdimage = prefix + "bootia32.efi"
+ d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+ prefix = "systemd-" if prefix == "" else ""
+ d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
+
+RDEPENDS_${PN} += "virtual/systemd-bootconf"
+
+# Imported from the old gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_x86-x32 = "null"
+
+do_compile() {
+ SYSTEMD_BOOT_EFI_ARCH="ia32"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ SYSTEMD_BOOT_EFI_ARCH="x64"
+ fi
+
+ ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
+}
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/EFI
+ install -d ${D}/boot/EFI/BOOT
+ install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
+}
+
+do_deploy () {
+ install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
new file mode 100644
index 000000000..e9c246645
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -0,0 +1,31 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic systemd-boot configuration files"
+
+RPROVIDES_${PN} += "virtual/systemd-bootconf"
+
+inherit systemd-boot-cfg
+
+S = "${WORKDIR}"
+
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+APPEND_append = " ${ROOT}"
+
+python do_configure() {
+ bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND"
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/loader
+ install -d ${D}/boot/loader/entries
+ install loader.conf ${D}/boot/loader/
+ rm loader.conf
+ install *.conf ${D}/boot/loader/entries/
+}
+
+FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
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 d9347163b..d67a3c91b 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
@@ -11,6 +11,10 @@ SRC_URI = "file://serial-getty@.service"
S = "${WORKDIR}"
+# As this package is tied to systemd, only build it when we're also building systemd.
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
do_install() {
if [ ! -z "${SERIAL_CONSOLES}" ] ; then
default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
@@ -43,10 +47,4 @@ do_install() {
FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# As this package is tied to systemd, only build it when we're also building systemd.
-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.inc b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
index d99d1506d..5fa48e7ab 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395"
+SRCREV = "46659f7deb962f55c728e70597e37c2a3ab6326d"
SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
new file mode 100644
index 000000000..877bb1c65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
@@ -0,0 +1,28 @@
+From 3e8c19bb1bbc4493c591f75c00c1fefe3b1c8a69 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 20:42:41 -0800
+Subject: [PATCH] Also check i386, i586 and i686 for ia32
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 28cb8b60e..489531a43 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1217,7 +1217,7 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
+ if get_option('efi')
+ efi_arch = host_machine.cpu_family()
+
+- if efi_arch == 'x86'
++ if efi_arch == 'x86' or efi_arch == 'i386' or efi_arch == 'i586' or efi_arch == 'i686'
+ EFI_MACHINE_TYPE_NAME = 'ia32'
+ gnu_efi_arch = 'ia32'
+ elif efi_arch == 'x86_64'
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
new file mode 100644
index 000000000..e2e19ba06
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
@@ -0,0 +1,62 @@
+From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 21:42:23 -0800
+Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
+
+When cross-compiling, efi_cc and efi_ld may take the form of
+'xxx-gcc --sysroot=xxx', and this would cause run_command and
+the alike fail.
+
+Fix to split them to make commands run correctly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/boot/efi/meson.build | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 992a3ba4c..9f9ec4911 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -157,7 +157,7 @@ if have_gnu_efi
+ o_file = custom_target(file + '.o',
+ input : file,
+ output : file + '.o',
+- command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
++ command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
+ + compile_args,
+ depend_files : efi_headers)
+ if (common_sources + systemd_boot_sources).contains(file)
+@@ -168,7 +168,17 @@ if have_gnu_efi
+ endif
+ endforeach
+
+- libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
++ find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
++ find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
++ find_libgcc_args = []
++ cmd_args_all = find_libgcc_cmd_all.split()
++ foreach arg : cmd_args_all
++ if arg != find_libgcc_cmd
++ find_libgcc_args += arg
++ endif
++ endforeach
++
++ libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
+ systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+ stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
+ no_undefined_symbols = find_program('no-undefined-symbols.sh')
+@@ -179,7 +189,7 @@ if have_gnu_efi
+ tuple[0],
+ input : tuple[2],
+ output : tuple[0],
+- command : [efi_ld, '-o', '@OUTPUT@'] +
++ command : efi_ld.split() + ['-o', '@OUTPUT@'] +
+ efi_ldflags + tuple[2] +
+ ['-lefi', '-lgnuefi', libgcc_file_name])
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
new file mode 100644
index 000000000..2cffc426e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -0,0 +1,34 @@
+From 687a5af8dc5d38f918a6ce08fed5297234bf8346 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Mar 2018 18:00:17 -0800
+Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
+
+for currently unknown reasons they get exported to the shared libries
+even without being listed in the sym file
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+
+Upstream-Status: Pending [ Conditional on master needing this, 234 does need it ]
+
+ src/libsystemd/sd-bus/bus-error.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index 378f7a377..49d797abd 100644
+--- a/src/libsystemd/sd-bus/bus-error.c
++++ b/src/libsystemd/sd-bus/bus-error.c
+@@ -71,8 +71,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
+ };
+
+ /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
+-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
+-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
++extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
++extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
+
+ /* Additional maps registered with sd_bus_error_add_map() are in this
+ * NULL terminated array */
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
new file mode 100644
index 000000000..e913e3f7b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
@@ -0,0 +1,33 @@
+From e361f6b4aefae57efff7e457df8db4d1067bec23 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:50:23 -0800
+Subject: [PATCH] Remove fstack-protector flags to workaround musl build
+
+Remove fstack-protector and fstack-protector-strong flags to fix
+the following build failure for qemux86 and qemuppc with musl.
+
+ undefined reference to `__stack_chk_fail_local'
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 7610ab12b..591b9cbab 100644
+--- a/meson.build
++++ b/meson.build
+@@ -329,8 +329,6 @@ foreach arg : ['-Wextra',
+ '-fdiagnostics-show-option',
+ '-fno-strict-aliasing',
+ '-fvisibility=hidden',
+- '-fstack-protector',
+- '-fstack-protector-strong',
+ '--param=ssp-buffer-size=4',
+ ]
+ if cc.has_argument(arg)
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
index ab2cbe035..f4c15e1c4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
@@ -1,23 +1,26 @@
-From 5765cda4f7243e240b1e8723dc536fb20503d544 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:28:32 -0800
-Subject: [PATCH 04/19] Use getenv when secure versions are not available
+From b1192a6e171413291d9d64fafc04773c6bbc9cab Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:04:48 +0800
+Subject: [PATCH 01/31] Use getenv when secure versions are not available
musl doesnt implement secure version, so we default
-to it if configure does not detect a secure imeplementation
+to it if configure does not detect a secure implementation
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Denied
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/basic/missing.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 4a3fd9c..4936873 100644
+index 1280e6c41..39c1fb700 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
-@@ -529,7 +529,7 @@ struct btrfs_ioctl_quota_ctl_args {
- # ifdef HAVE___SECURE_GETENV
+@@ -605,7 +605,7 @@ struct btrfs_ioctl_quota_ctl_args {
+ # if HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
-# error "neither secure_getenv nor __secure_getenv are available"
@@ -26,5 +29,5 @@ index 4a3fd9c..4936873 100644
#endif
--
-2.10.2
+2.13.0
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 7f1bc447f..98c83620f 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,8 +1,7 @@
-From f1b5a6f717bda6f80a6b5e3e4d50b450f6cc7b09 Mon Sep 17 00:00:00 2001
+From 7844e070745611a52e355b73e7890f360dd540d0 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 14/14] core/device.c: Change the default device timeout to 240
- sec.
+Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -17,10 +16,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/device.c b/src/core/device.c
-index 77601c552..98bf49ba2 100644
+index a43664d3b..4b16a8aec 100644
--- a/src/core/device.c
+++ b/src/core/device.c
-@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
+@@ -113,7 +113,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. */
@@ -29,6 +28,3 @@ index 77601c552..98bf49ba2 100644
u->ignore_on_isolate = true;
}
---
-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
deleted file mode 100644
index df100e587..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-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-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
deleted file mode 100644
index a033b04b2..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-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-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 000000000..c3f4b3934
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,81 @@
+From c93eb6cdec03f5e243e59e95dc49273fcb90e7c1 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:23:40 +0800
+Subject: [PATCH 02/31] binfmt: Don't install dependency links at install time
+ for the binfmt services
+
+use [Install] blocks so that they get created when the service is enabled
+like a traditional service.
+
+The [Install] blocks were rejected upstream as they don't have a way to
+"enable" it on install without static symlinks which can't be disabled,
+only masked. We however can do that in a postinst.
+
+Upstream-Status: Denied
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ units/meson.build | 6 ++----
+ units/proc-sys-fs-binfmt_misc.automount | 3 +++
+ units/systemd-binfmt.service.in | 4 ++++
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/units/meson.build b/units/meson.build
+index 814ee7885..49ace0d0f 100644
+--- a/units/meson.build
++++ b/units/meson.build
+@@ -60,8 +60,7 @@ units = [
+ ['poweroff.target', '',
+ 'runlevel0.target'],
+ ['printer.target', ''],
+- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'],
+ ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
+ ['reboot.target', '',
+ 'runlevel6.target ctrl-alt-del.target'],
+@@ -144,8 +143,7 @@ in_units = [
+ ['systemd-ask-password-console.service', ''],
+ ['systemd-ask-password-wall.service', ''],
+ ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
+- ['systemd-binfmt.service', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['systemd-binfmt.service', 'ENABLE_BINFMT'],
+ ['systemd-coredump@.service', 'ENABLE_COREDUMP'],
+ ['systemd-exit.service', ''],
+ ['systemd-firstboot.service', 'ENABLE_FIRSTBOOT',
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 30a6bc991..4231f3b70 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
+
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index df9396d89..0687f4648 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -13,6 +13,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+ Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
+ After=proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -27,3 +28,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
+ TimeoutSec=90s
++
++[Install]
++WantedBy=sysinit.target
+--
+2.13.0
+
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
deleted file mode 100644
index 94c136b0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-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/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 000000000..28f1b217e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,64 @@
+From 8b9d194e956848e0d1fb35ef2fba714b2691ebe6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 20:47:49 -0800
+Subject: [PATCH 03/31] use lnr wrapper instead of looking for --relative
+ option for ln
+
+Remove file manually to avoid the 'File Exists' error when creating
+symlink. This is because the original 'ln' command uses '-f' option.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 4 ----
+ tools/meson-make-symlink.sh | 3 ++-
+ units/meson-add-wants.sh | 7 ++++++-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 36a62d280..7347ea880 100644
+--- a/meson.build
++++ b/meson.build
+@@ -570,10 +570,6 @@ endforeach
+
+ conf.set_quoted('TELINIT', get_option('telinit-path'))
+
+-if run_command('ln', '--relative', '--help').returncode() != 0
+- error('ln does not support --relative')
+-endif
+-
+ ############################################################
+
+ gperf = find_program('gperf')
+diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
+index 501cd43d4..f4e4ac9ac 100755
+--- a/tools/meson-make-symlink.sh
++++ b/tools/meson-make-symlink.sh
+@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
+ if [ "$(dirname $1)" = . ]; then
+ ln -vfs -T "$1" "${DESTDIR:-}$2"
+ else
+- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
++ rm -f "${DESTDIR:-}$2"
++ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ fi
+diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
+index 70f7172ae..a42666aac 100755
+--- a/units/meson-add-wants.sh
++++ b/units/meson-add-wants.sh
+@@ -25,4 +25,9 @@ case "$target" in
+ ;;
+ esac
+
+-ln -vfs --relative "$unitpath" "$dir"
++if [ -d "$dir" ]; then
++ rm -f "$dir/$unit"
++ lnr "$unitpath" "$dir/$unit"
++else
++ lnr "$unitpath" "$dir"
++fi
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
index 8828d6ec3..83fdb530b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
@@ -1,7 +1,7 @@
-From 52726be92e2b841f744a96c378cc872ae0033a2b Mon Sep 17 00:00:00 2001
+From 70d456fb21de2a80697fa364f08475339d6396c1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH 10/19] implment systemd-sysv-install for OE
+Subject: [PATCH 04/31] implment systemd-sysv-install for OE
Use update-rc.d for enabling/disabling and status command
to check the status of the sysv service
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
-index a53a3e6..5d877b0 100755
+index a53a3e622..5d877b06e 100755
--- a/src/systemctl/systemd-sysv-install.SKELETON
+++ b/src/systemctl/systemd-sysv-install.SKELETON
@@ -30,17 +30,17 @@ case "$1" in
@@ -39,5 +39,5 @@ index a53a3e6..5d877b0 100755
*)
usage ;;
--
-2.10.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
deleted file mode 100644
index 7016e986b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 74450f0dbad2f8478c26eeaa46d4e4a987858f45 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 05/19] binfmt: Don't install dependency links at install time
- for the binfmt services
-
-use [Install] blocks so that they get created when the service is enabled
-like a traditional service.
-
-The [Install] blocks were rejected upstream as they don't have a way to
-"enable"
-it on install without static symlinks which can't be disabled, only
-masked. We
-however can do that in a postinst.
-
-Upstream-Status: Denied
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 4 ----
- units/proc-sys-fs-binfmt_misc.automount | 3 +++
- units/systemd-binfmt.service.in | 5 +++++
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 50da458..29ed1dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4635,10 +4635,6 @@ INSTALL_DIRS += \
- $(prefix)/lib/binfmt.d \
- $(sysconfdir)/binfmt.d
-
--SYSINIT_TARGET_WANTS += \
-- systemd-binfmt.service \
-- proc-sys-fs-binfmt_misc.automount
--
- endif
-
- EXTRA_DIST += \
-diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
-index 6be3893..709adef 100644
---- a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
-@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
-
- [Automount]
- Where=/proc/sys/fs/binfmt_misc
-+
-+[Install]
-+WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index d53073e..8c57ee0 100644
---- a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
- Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
- DefaultDependencies=no
- Conflicts=shutdown.target
-+Wants=proc-sys-fs-binfmt_misc.automount
-+
- After=proc-sys-fs-binfmt_misc.automount
- Before=sysinit.target shutdown.target
- ConditionPathIsReadWrite=/proc/sys/
-@@ -25,3 +27,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- TimeoutSec=90s
-+
-+[Install]
-+WantedBy=sysinit.target
---
-2.10.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/0005-rules-whitelist-hd-devices.patch
index eb380ce78..e4421c826 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/0005-rules-whitelist-hd-devices.patch
@@ -1,7 +1,7 @@
-From ab5a27040133f7cdf062ac8cfeb94e081d3567b3 Mon Sep 17 00:00:00 2001
+From 7b5b34993002b4418ba8a3c2ae661a7337fd8ed0 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 07/14] rules: whitelist hd* devices
+Subject: [PATCH 05/31] 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,13 +11,12 @@ 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 d2745f65f..63f472be8 100644
+index 0de8cf3a1..d3f58f153 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
@@ -30,5 +29,5 @@ index d2745f65f..63f472be8 100644
# ignore partitions that span the entire disk
TEST=="whole_disk", GOTO="persistent_storage_end"
--
-2.13.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 000000000..5ba966168
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,78 @@
+From 9d63227420f0c4f093c1c2066eafe2b6152070cf Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 13:47:37 +0800
+Subject: [PATCH 06/31] 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
+should be.
+
+Upstream-Status: Denied
+Upstream wants to have a unified hierarchy where everyone is
+using the same root folder.
+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>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 8 ++++++++
+ meson_options.txt | 2 ++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 7347ea880..918101d6b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,11 @@ if rootlibdir == ''
+ rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1])
+ endif
+
++roothomedir = get_option('roothomedir')
++if roothomedir == ''
++ roothomedir = '/root'
++endif
++
+ # Dirs of external packages
+ pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
+ pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
+@@ -205,6 +210,7 @@ conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
+ conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent'))
+ conf.set_quoted('LIBDIR', libdir)
+ conf.set_quoted('ROOTLIBDIR', rootlibdir)
++conf.set_quoted('ROOTHOMEDIR', roothomedir)
+ conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
+ conf.set_quoted('BOOTLIBDIR', bootlibdir)
+ conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull'))
+@@ -221,6 +227,7 @@ substs.set('prefix', prefixdir)
+ substs.set('exec_prefix', prefixdir)
+ substs.set('libdir', libdir)
+ substs.set('rootlibdir', rootlibdir)
++substs.set('roothomedir', roothomedir)
+ substs.set('includedir', includedir)
+ substs.set('pkgsysconfdir', pkgsysconfdir)
+ substs.set('bindir', bindir)
+@@ -2705,6 +2712,7 @@ status = [
+ 'include directory: @0@'.format(includedir),
+ 'lib directory: @0@'.format(libdir),
+ 'rootlib directory: @0@'.format(rootlibdir),
++ 'roothome directory: @0@'.format(roothomedir),
+ 'SysV init scripts: @0@'.format(sysvinit_path),
+ 'SysV rc?.d directories: @0@'.format(sysvrcnd_path),
+ 'PAM modules directory: @0@'.format(pamlibdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 39822d6cd..0b24f0e0f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -22,6 +22,8 @@ option('rootlibdir', type : 'string',
+ description : '''[/usr]/lib/x86_64-linux-gnu or such''')
+ option('rootprefix', type : 'string',
+ description : '''override the root prefix''')
++option('roothomedir', type : 'string',
++ description : '''override the root home directory''')
+ option('link-udev-shared', type : 'boolean',
+ description : 'link systemd-udev and its helpers to libsystemd-shared.so')
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
index ed7c68fe7..bb12d30a4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
@@ -1,7 +1,7 @@
-From 0f47cfcb16e8e40a90a9221f9995f8cd8a915c22 Mon Sep 17 00:00:00 2001
+From 35d6d384e83ac38077603611bb791969ef95fe68 Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH 14/19] Revert "rules: remove firmware loading rules"
+Subject: [PATCH 07/31] Revert "rules: remove firmware loading rules"
This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
Userspace firmware loading support is needed for Linux < 3.7.
@@ -16,7 +16,7 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
new file mode 100644
-index 0000000..f0ae684
+index 000000000..f0ae68451
--- /dev/null
+++ b/rules/50-firmware.rules
@@ -0,0 +1,3 @@
@@ -24,5 +24,5 @@ index 0000000..f0ae684
+
+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
--
-2.10.2
+2.13.0
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
deleted file mode 100644
index 5234c59a7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-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
deleted file mode 100644
index bc92db746..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a3482c91642cf568b3ac27fa6c0cb3c6b30669b7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:32:14 -0800
-Subject: [PATCH 07/19] use lnr wrapper instead of looking for --relative
- option for ln
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 +-
- configure.ac | 2 --
- 2 files changed, 1 insertion(+), 3 deletions(-)
-
-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` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
-- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
-+ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
- endef
-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 ***])])
--
- M4_DEFINES=
-
- 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
deleted file mode 100644
index 67a4f8e03..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
index 95871bb05..15d7e0290 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/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -1,7 +1,7 @@
-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 10/14] Revert "udev: remove userspace firmware loading
+From 5cce7626f33e92f624ac06b613125813fb47d445 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:05:39 -0800
+Subject: [PATCH 08/31] Revert "udev: remove userspace firmware loading
support"
This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
@@ -11,47 +11,26 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- Makefile.am | 12 +++
README | 4 +-
TODO | 1 +
- configure.ac | 18 +++++
+ meson.build | 9 +++
+ meson_options.txt | 2 +
+ rules/meson.build | 4 +
+ src/udev/meson.build | 4 +
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, 209 insertions(+), 2 deletions(-)
+ src/udev/udevd.c | 12 +++
+ 10 files changed, 197 insertions(+), 2 deletions(-)
create mode 100644 src/udev/udev-builtin-firmware.c
-diff --git a/Makefile.am b/Makefile.am
-index c2b4a99d2..692d7bb95 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3985,6 +3985,18 @@ libudev_core_la_LIBADD = \
- $(BLKID_LIBS) \
- $(KMOD_LIBS)
-
-+libudev_core_la_CPPFLAGS = \
-+ $(AM_CPPFLAGS) \
-+ -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-+
-+if ENABLE_FIRMWARE
-+libudev_core_la_SOURCES += \
-+ src/udev/udev-builtin-firmware.c
-+
-+dist_udevrules_DATA += \
-+ rules/50-firmware.rules
-+endif
-+
- if HAVE_KMOD
- libudev_core_la_SOURCES += \
- src/udev/udev-builtin-kmod.c
diff --git a/README b/README
-index 60388eebe..e21976393 100644
+index 8807e5cfe..bfd7a35de 100644
--- a/README
+++ b/README
-@@ -61,8 +61,8 @@ REQUIREMENTS:
+@@ -58,8 +58,8 @@ REQUIREMENTS:
Legacy hotplug slows down the system and confuses udev:
CONFIG_UEVENT_HELPER_PATH=""
@@ -63,10 +42,10 @@ index 60388eebe..e21976393 100644
Some udev rules and virtualization detection relies on it:
diff --git a/TODO b/TODO
-index 61efa5e9f..67ccac224 100644
+index a77028c7b..39e72d7ec 100644
--- a/TODO
+++ b/TODO
-@@ -740,6 +740,7 @@ Features:
+@@ -783,6 +783,7 @@ Features:
* initialize the hostname from the fs label of /, if /etc/hostname does not exist?
* udev:
@@ -74,42 +53,90 @@ index 61efa5e9f..67ccac224 100644
- move to LGPL
- kill scsi_id
- add trigger --subsystem-match=usb/usb_device device
-diff --git a/configure.ac b/configure.ac
-index b53ca1f1a..1150ca50e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -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,
-+ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-+ [Firmware search path (default="")]),
-+ [], [with_firmware_path=""])
-+OLD_IFS=$IFS
-+IFS=:
-+for i in $with_firmware_path; do
-+ if test "x${FIRMWARE_PATH}" = "x"; then
-+ FIRMWARE_PATH="\\\"${i}/\\\""
-+ else
-+ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-+ fi
-+done
-+IFS=$OLD_IFS
-+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
+diff --git a/meson.build b/meson.build
+index 918101d6b..9c25022a4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -72,6 +72,12 @@ conf.set10('HAVE_SYSV_COMPAT', have,
+ description : 'SysV init scripts and rcN.d links are supported')
+ m4_defines += have ? ['-DHAVE_SYSV_COMPAT'] : []
+
++firmware_path = get_option('firmware-path')
++have = firmware_path != ''
++conf.set10('HAVE_FIRMWARE', have,
++ description : 'Userspace firmware loading is supported')
++m4_defines += have ? ['-DHAVE_FIRMWARE'] : []
++
+ # join_paths ignore the preceding arguments if an absolute component is
+ # encountered, so this should canonicalize various paths when they are
+ # absolute or relative.
+@@ -178,6 +184,7 @@ conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', join_paths(pkgsysc
+ conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
+ conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
+ conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
++conf.set_quoted('FIRMWARE_PATH', firmware_path)
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
+ conf.set_quoted('USER_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'user'))
+@@ -258,6 +265,7 @@ substs.set('SYSTEMCTL', join_paths(rootbin
+ substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
+ substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
+ substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
++substs.set('FIRMWARE_PATH', firmware_path)
+ substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
+ substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
+
+@@ -2715,6 +2723,7 @@ status = [
+ 'roothome directory: @0@'.format(roothomedir),
+ 'SysV init scripts: @0@'.format(sysvinit_path),
+ 'SysV rc?.d directories: @0@'.format(sysvrcnd_path),
++ 'firmware path: @0@'.format(firmware_path),
+ 'PAM modules directory: @0@'.format(pamlibdir),
+ 'PAM configuration directory: @0@'.format(pamconfdir),
+ 'RPM macros directory: @0@'.format(rpmmacrosdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 0b24f0e0f..92d25fa35 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -108,6 +108,8 @@ option('tmpfiles', type : 'boolean',
+ description : 'support for tmpfiles.d')
+ option('importd', type : 'combo', choices : ['auto', 'true', 'false'],
+ description : 'install the systemd-importd daemon')
++option('firmware-path', type : 'string', value : '',
++ description : 'Firmware search path')
+ option('hwdb', type : 'boolean',
+ description : 'support for the hardware database')
+ option('rfkill', type : 'boolean',
+diff --git a/rules/meson.build b/rules/meson.build
+index e253b9f59..5eee5fbca 100644
+--- a/rules/meson.build
++++ b/rules/meson.build
+@@ -41,6 +41,10 @@ rules = files('''
+ install_data(rules,
+ install_dir : udevrulesdir)
- # ------------------------------------------------------------------------------
- have_manpages=no
-@@ -1839,6 +1856,7 @@ AC_MSG_RESULT([
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- build Python: ${PYTHON}
-+ firmware path: ${FIRMWARE_PATH}
- PAM modules dir: ${with_pamlibdir}
- PAM configuration dir: ${with_pamconfdir}
- RPM macros dir: ${with_rpmmacrosdir}
++if conf.get('HAVE_FIRMWARE') == 1
++ install_data('50-firmware.rules', install_dir : udevrulesdir)
++endif
++
+ all_rules = rules
+
+ rules_in = '''
+diff --git a/src/udev/meson.build b/src/udev/meson.build
+index de2fd2d9c..b6b0ca006 100644
+--- a/src/udev/meson.build
++++ b/src/udev/meson.build
+@@ -67,6 +67,10 @@ if conf.get('HAVE_ACL') == 1
+ sd_login_c]
+ endif
+
++if conf.get('HAVE_FIRMWARE') == 1
++ libudev_core_sources += ['udev-builtin-firmware.c']
++endif
++
+ ############################################################
+
+ generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh')
diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
new file mode 100644
index 000000000..bd8c2fb96
@@ -271,81 +298,80 @@ index 000000000..bd8c2fb96
+ .run_once = true,
+};
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index e6b36f124..cd9947e2a 100644
+index db2b6874f..ccd88638c 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
-@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
+@@ -32,6 +32,9 @@ static const struct udev_builtin *builtins[] = {
[UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
#endif
[UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
+#endif
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
[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 c0cb7eae8..9f0f1cf13 100644
+index ea11c2d29..c47dd3d88 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
-@@ -150,6 +150,9 @@ enum udev_builtin_cmd {
+@@ -151,6 +151,9 @@ enum udev_builtin_cmd {
UDEV_BUILTIN_BLKID,
#endif
UDEV_BUILTIN_BTRFS,
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+ UDEV_BUILTIN_FIRMWARE,
+#endif
UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID,
UDEV_BUILTIN_KEYBOARD,
-@@ -178,6 +181,9 @@ struct udev_builtin {
+@@ -179,6 +182,9 @@ struct udev_builtin {
extern const struct udev_builtin udev_builtin_blkid;
#endif
extern const struct udev_builtin udev_builtin_btrfs;
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+extern const struct udev_builtin udev_builtin_firmware;
+#endif
extern const struct udev_builtin udev_builtin_hwdb;
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 acbddd418..20347b402 100644
+index 5c757d513..2f3313007 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
-@@ -125,6 +125,9 @@ struct event {
+@@ -127,6 +127,9 @@ struct event {
bool is_block;
sd_event_source *timeout_warning;
sd_event_source *timeout;
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+ bool nodelay;
+#endif
};
- static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
+ static void event_queue_cleanup(Manager *manager, enum event_state type);
+@@ -609,6 +612,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
event->devnum = udev_device_get_devnum(dev);
event->is_block = streq("block", udev_device_get_subsystem(dev));
event->ifindex = udev_device_get_ifindex(dev);
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+ if (streq(udev_device_get_subsystem(dev), "firmware"))
+ event->nodelay = true;
+#endif
log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
+@@ -692,6 +699,11 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
return true;
}
-+#ifdef HAVE_FIRMWARE
++#if HAVE_FIRMWARE
+ /* allow to bypass the dependency tracking */
+ if (event->nodelay)
+ continue;
+#endif
-+
/* parent device event found */
if (event->devpath[common] == '/') {
event->delaying_seqnum = loop_event->seqnum;
--
-2.13.2
+2.13.0
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/0009-remove-duplicate-include-uchar.h.patch
index d2006351d..1b14369ce 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/0009-remove-duplicate-include-uchar.h.patch
@@ -1,7 +1,7 @@
-From e78af874fc9f3d3af49498b8207109993d93a596 Mon Sep 17 00:00:00 2001
+From ffdf9cb6ba0d932b81933d824f23a878c313a8d4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 22 Feb 2016 05:59:01 +0000
-Subject: [PATCH 17/19] remove duplicate include uchar.h
+Subject: [PATCH 09/31] remove duplicate include uchar.h
missing.h already includes it
@@ -13,10 +13,10 @@ Upstream-Status: Pending
2 files changed, 2 deletions(-)
diff --git a/src/basic/escape.h b/src/basic/escape.h
-index deaa4de..36d437c 100644
+index de89f43a8..9921ccbbd 100644
--- a/src/basic/escape.h
+++ b/src/basic/escape.h
-@@ -23,7 +23,6 @@
+@@ -24,7 +24,6 @@
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
@@ -25,10 +25,10 @@ index deaa4de..36d437c 100644
#include "string-util.h"
#include "missing.h"
diff --git a/src/basic/utf8.h b/src/basic/utf8.h
-index f9b9c94..6ac9a3c 100644
+index b0a7485ae..fa06d2906 100644
--- a/src/basic/utf8.h
+++ b/src/basic/utf8.h
-@@ -22,7 +22,6 @@
+@@ -23,7 +23,6 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -37,5 +37,5 @@ index f9b9c94..6ac9a3c 100644
#include "macro.h"
#include "missing.h"
--
-2.10.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
new file mode 100644
index 000000000..9a44b5484
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
@@ -0,0 +1,45 @@
+From ea4caaa1c6a6dc682bb04548ab05c5c73d0b45d6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:34:52 +0800
+Subject: [PATCH 10/31] check for uchar.h in meson.build
+
+Use #if HAVE_UCHAR_H to include uchar.h conditionally.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 1 +
+ src/basic/missing.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 9c25022a4..94a16712b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -623,6 +623,7 @@ foreach header : ['crypt.h',
+ 'sys/auxv.h',
+ 'valgrind/memcheck.h',
+ 'valgrind/valgrind.h',
++ 'uchar.h',
+ ]
+
+ conf.set10('HAVE_' + header.underscorify().to_upper(),
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 39c1fb700..84d6d9167 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -38,7 +38,9 @@
+ #include <sys/resource.h>
+ #include <sys/socket.h>
+ #include <sys/syscall.h>
++#if HAVE_UCHAR_H
+ #include <uchar.h>
++#endif
+ #include <unistd.h>
+
+ #if HAVE_AUDIT
+--
+2.13.0
+
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
deleted file mode 100644
index 808c83aba..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
deleted file mode 100644
index b01ae9715..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3f6f45578b828e414f50c6822375073e7174236a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:50:01 +0000
-Subject: [PATCH 11/19] nss-mymachines: Build conditionally when
- HAVE_MYHOSTNAME is set
-
-Fixes build failures when building with --disable-myhostname
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 02f4017..420e0e0 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5146,6 +5146,7 @@ SYSTEM_UNIT_ALIASES += \
- BUSNAMES_TARGET_WANTS += \
- org.freedesktop.machine1.busname
-
-+if HAVE_MYHOSTNAME
- libnss_mymachines_la_SOURCES = \
- src/nss-mymachines/nss-mymachines.sym \
- src/nss-mymachines/nss-mymachines.c
-@@ -5167,6 +5168,7 @@ rootlib_LTLIBRARIES += \
- libnss_mymachines.la
-
- endif
-+endif
-
- polkitpolicy_in_files += \
- src/machine/org.freedesktop.machine1.policy.in
---
-2.10.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/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
index b60927620..b0923d15f 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/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
@@ -1,25 +1,26 @@
-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 13/14] socket-util: don't fail if libc doesn't support IDN
+From 60dd411e9756fc2b14c0e061ad803782b4aee874 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:46:05 +0800
+Subject: [PATCH 11/31] 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>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- src/basic/socket-util.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
+ src/basic/socket-util.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 016e64aa0..d4658826e 100644
+index 2c70cade1..67aedadd4 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
-@@ -47,6 +47,15 @@
- #include "user-util.h"
+@@ -50,6 +50,16 @@
#include "utf8.h"
#include "util.h"
+
+/* Don't fail if the standard library
+ * doesn't support IDN */
+#ifndef NI_IDN
@@ -29,9 +30,10 @@ index 016e64aa0..d4658826e 100644
+#ifndef NI_IDN_USE_STD3_ASCII_RULES
+#define NI_IDN_USE_STD3_ASCII_RULES 0
+#endif
-
- #ifdef ENABLE_IDN
++
+ #if ENABLE_IDN
# define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
+ #else
--
-2.13.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 000000000..720786371
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,43 @@
+From 406a4c8692316e8c7e14c78f9a802689be304a95 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 17 Nov 2017 09:46:00 +0800
+Subject: [PATCH 12/31] rules: watch metadata changes in ide devices
+
+Formatting IDE storage does not trigger "change" uevents. As a result
+clients using udev API don't get any updates afterwards and get outdated
+information about the device.
+...
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
+Creating filesystem with 262144 4k blocks and 65536 inodes
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
+...
+Include hd* in a match for watch option assignment.
+
+Upstream-Status: Denied
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
+is deprecated.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ rules/60-block.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-block.rules b/rules/60-block.rules
+index 343fc06f8..b5237dac4 100644
+--- a/rules/60-block.rules
++++ b/rules/60-block.rules
+@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
+ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
+
+ # watch metadata changes, caused by tools closing the device node which was opened for writing
+-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|hd*", OPTIONS+="watch"
+--
+2.13.0
+
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
deleted file mode 100644
index aeebbfb8f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-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 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
-should be.
-
-Upstream-Status: Denied
-Upstream wants to have a unified hierarchy where everyone is
-using the same root folder.
-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 +++++++
- src/basic/user-util.c | 4 ++--
- src/nspawn/nspawn.c | 4 ++--
- units/emergency.service.in | 4 ++--
- units/rescue.service.in | 4 ++--
- 6 files changed, 17 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1bcd932c2..c2b4a99d2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -226,6 +226,7 @@ AM_CPPFLAGS = \
- -DLIBDIR=\"$(libdir)\" \
- -DROOTLIBDIR=\"$(rootlibdir)\" \
- -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-+ -DROOTHOMEDIR=\"$(roothomedir)\" \
- -I $(top_srcdir)/src \
- -I $(top_builddir)/src/basic \
- -I $(top_srcdir)/src/basic \
-@@ -6356,6 +6357,7 @@ substitutions = \
- '|rootlibdir=$(rootlibdir)|' \
- '|rootlibexecdir=$(rootlibexecdir)|' \
- '|rootbindir=$(rootbindir)|' \
-+ '|roothomedir=$(roothomedir)|' \
- '|bindir=$(bindir)|' \
- '|SYSTEMCTL=$(rootbindir)/systemctl|' \
- '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
-diff --git a/configure.ac b/configure.ac
-index 0354ffe6a..b53ca1f1a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1641,6 +1641,11 @@ AC_ARG_WITH([rootlibdir],
- [with_rootlibdir=${libdir}])
- AX_NORMALIZE_PATH([with_rootlibdir])
-
-+AC_ARG_WITH([roothomedir],
-+ AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
-+ [],
-+ [with_roothomedir=/root])
-+
- AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
- [],
-@@ -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
-@@ -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}
-diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index c619dad52..662682adf 100644
---- a/src/basic/user-util.c
-+++ b/src/basic/user-util.c
-@@ -129,7 +129,7 @@ int get_user_creds(
- *gid = 0;
-
- if (home)
-- *home = "/root";
-+ *home = ROOTHOMEDIR;
-
- if (shell)
- *shell = "/bin/sh";
-@@ -389,7 +389,7 @@ int get_home_dir(char **_h) {
- /* Hardcode home directory for root to avoid NSS */
- u = getuid();
- if (u == 0) {
-- h = strdup("/root");
-+ h = strdup(ROOTHOMEDIR);
- if (!h)
- return -ENOMEM;
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 8a5fedd4b..7b01ec078 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2291,7 +2291,7 @@ static int inner_child(
- if (envp[n_env])
- n_env++;
-
-- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
-+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
- (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();
-@@ -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");
-+ (void) chdir(home ?: ROOTHOMEDIR);
-
- 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 e9eb238b9..32588e48a 100644
---- a/units/emergency.service.in
-+++ b/units/emergency.service.in
-@@ -15,8 +15,8 @@ Conflicts=syslog.socket
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
- Type=idle
- StandardInput=tty-force
-diff --git a/units/rescue.service.in b/units/rescue.service.in
-index 4ab66f485..bd9898f2c 100644
---- a/units/rescue.service.in
-+++ b/units/rescue.service.in
-@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
- Type=idle
- StandardInput=tty-force
---
-2.13.2
-
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/0013-add-fallback-parse_printf_format-implementation.patch
index e2f7458ab..9c9278d3f 100644
--- 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/0013-add-fallback-parse_printf_format-implementation.patch
@@ -1,53 +1,51 @@
-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
+From 580d23cf0b32e36a8fb96710336ffef432b3c7ce Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:10:58 -0800
+Subject: [PATCH] add fallback parse_printf_format implementation
+
+Upstream-Status: Pending
Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
-Upstream-Status: Pending
-
- Makefile.am | 4 +
- configure.ac | 2 +
+ meson.build | 1 +
+ src/basic/meson.build | 4 +
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(-)
+ 6 files changed, 337 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
+diff --git a/meson.build b/meson.build
+index 94a16712b..4eabaafe8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -620,6 +620,7 @@ foreach header : ['crypt.h',
+ 'linux/btrfs.h',
+ 'linux/memfd.h',
+ 'linux/vm_sockets.h',
++ 'printf.h',
+ 'sys/auxv.h',
+ 'valgrind/memcheck.h',
+ 'valgrind/valgrind.h',
+diff --git a/src/basic/meson.build b/src/basic/meson.build
+index 44cd31ecb..435c6ee02 100644
+--- a/src/basic/meson.build
++++ b/src/basic/meson.build
+@@ -310,6 +310,10 @@ endforeach
-+if !HAVE_PRINTF_H
-+libbasic_la_SOURCES += src/basic/parse-printf-format.c
+ basic_sources += [missing_h] + generated_gperf_headers
+
++if conf.get('HAVE_PRINTF_H') != 1
++ basic_sources += [files('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], [], [])
-
+ libbasic = static_library(
+ 'basic',
+ basic_sources,
diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
new file mode 100644
index 000000000..49437e544
@@ -329,7 +327,7 @@ index 000000000..49437e544
+}
diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
new file mode 100644
-index 000000000..4371177b0
+index 000000000..47be7522d
--- /dev/null
+++ b/src/basic/parse-printf-format.h
@@ -0,0 +1,57 @@
@@ -361,7 +359,7 @@ index 000000000..4371177b0
+
+#include "config.h"
+
-+#ifdef HAVE_PRINTF_H
++#if HAVE_PRINTF_H
+#include <printf.h>
+#else
+
@@ -391,10 +389,10 @@ index 000000000..4371177b0
+
+#endif /* HAVE_PRINTF_H */
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index bd1144b4c..c9c95eb54 100644
+index dbfafba26..8038380d6 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
-@@ -19,12 +19,12 @@
+@@ -20,12 +20,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
@@ -409,10 +407,10 @@ index bd1144b4c..c9c95eb54 100644
#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
+index 73329ba02..70bb9e0e8 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
-@@ -19,7 +19,6 @@
+@@ -20,7 +20,6 @@
#include <errno.h>
#include <fcntl.h>
@@ -420,7 +418,7 @@ index 440fba67c..0236c43c4 100644
#include <stddef.h>
#include <sys/socket.h>
#include <sys/un.h>
-@@ -38,6 +37,7 @@
+@@ -39,6 +38,7 @@
#include "stdio-util.h"
#include "string-util.h"
#include "util.h"
@@ -429,5 +427,5 @@ index 440fba67c..0236c43c4 100644
#define SNDBUF_SIZE (8*1024*1024)
--
-2.14.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 000000000..9f62cbbe6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,118 @@
+From 33be9052315cc4ec8e929fa238e1f0cc0161ad07 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:15:28 -0800
+Subject: [PATCH] src/basic/missing.h: check for missing strndupa
+
+include missing.h for definition of strndupa
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 1 +
+ src/basic/missing.h | 11 +++++++++++
+ src/basic/mkdir.c | 1 +
+ src/basic/parse-util.c | 1 +
+ src/basic/procfs-util.c | 1 +
+ src/shared/pager.c | 1 +
+ src/shared/uid-range.c | 1 +
+ 7 files changed, 17 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 4eabaafe8..12811b3f3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -525,6 +525,7 @@ foreach ident : [
+ ['bpf', '''#include <sys/syscall.h>
+ #include <unistd.h>'''],
+ ['explicit_bzero' , '''#include <string.h>'''],
++ ['strndupa' , '''#include <string.h>'''],
+ ]
+
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 84d6d9167..07a8c8364 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1187,6 +1187,17 @@ struct input_mask {
+ typedef int32_t key_serial_t;
+ #endif
+
++#if ! HAVE_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_JOIN_SESSION_KEYRING
+ #define KEYCTL_JOIN_SESSION_KEYRING 1
+ #endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index de4746c86..d51518a5a 100644
+--- a/src/basic/mkdir.c
++++ b/src/basic/mkdir.c
+@@ -30,6 +30,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, bool follow_symlink, mkdir_func_t _mkdir) {
+ struct stat st;
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 2c22753de..97533721d 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -33,6 +33,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/basic/procfs-util.c b/src/basic/procfs-util.c
+index 9bb42cc7b..23bbd9e67 100644
+--- a/src/basic/procfs-util.c
++++ b/src/basic/procfs-util.c
+@@ -9,6 +9,7 @@
+ #include "procfs-util.h"
+ #include "stdio-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int procfs_tasks_get_limit(uint64_t *ret) {
+ _cleanup_free_ char *value = NULL;
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..84f06bf7d 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -39,6 +39,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 c38b7cc98..8ec6bf08d 100644
+--- a/src/shared/uid-range.c
++++ b/src/shared/uid-range.c
+@@ -25,6 +25,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.13.0
+
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/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index 9a2d2c8e0..450947667 100644
--- 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/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -1,7 +1,7 @@
-From 5bbbc2a08a3b4283ec04af0e77e25fb205aa8b82 Mon Sep 17 00:00:00 2001
+From b45cf4923c7e1f1165925e9b4d7db2108faf2eae 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
+Subject: [PATCH 15/31] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
defined
If the standard library doesn't provide brace
@@ -11,20 +11,20 @@ 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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index 6e80a1e23..312bb3fd1 100644
--- a/src/basic/glob-util.c
+++ b/src/basic/glob-util.c
-@@ -27,13 +27,18 @@
+@@ -28,13 +28,18 @@
#include "macro.h"
#include "path-util.h"
#include "strv.h"
@@ -44,7 +44,7 @@ index f611c42e4..ad6e2be8d 100644
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) {
+@@ -45,10 +50,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
pglob->gl_lstat = lstat;
if (!pglob->gl_stat)
pglob->gl_stat = stat;
@@ -60,7 +60,7 @@ index f611c42e4..ad6e2be8d 100644
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) {
+@@ -61,6 +69,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
return 0;
}
@@ -74,10 +74,10 @@ index f611c42e4..ad6e2be8d 100644
_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
+index bd2f8fcfd..a10c77427 100644
--- a/src/test/test-glob-util.c
+++ b/src/test/test-glob-util.c
-@@ -29,6 +29,11 @@
+@@ -30,6 +30,11 @@
#include "glob-util.h"
#include "macro.h"
#include "rm-rf.h"
@@ -89,7 +89,7 @@ index af866e004..3afa09ada 100644
static void test_glob_exists(void) {
char name[] = "/tmp/test-glob_exists.XXXXXX";
-@@ -51,25 +56,33 @@ static void test_glob_exists(void) {
+@@ -52,25 +57,33 @@ static void test_glob_exists(void) {
static void test_glob_no_dot(void) {
char template[] = "/tmp/test-glob-util.XXXXXXX";
const char *fn;
@@ -126,10 +126,10 @@ index af866e004..3afa09ada 100644
(void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index 9419c99e2..07027a765 100644
+index 38cbb739c..88cc543f0 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
-@@ -71,6 +71,12 @@
+@@ -76,6 +76,12 @@
#include "umask-util.h"
#include "user-util.h"
#include "util.h"
@@ -142,7 +142,7 @@ index 9419c99e2..07027a765 100644
/* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
* them in the file system. This is intended to be used to create
-@@ -1092,7 +1098,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
+@@ -1288,7 +1294,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 = {
@@ -153,5 +153,5 @@ index 9419c99e2..07027a765 100644
int r = 0, k;
char **fn;
--
-2.14.2
+2.13.0
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/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
index cb5ae99a4..53037ea6d 100644
--- 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/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
@@ -1,24 +1,24 @@
-From c850b654e71677e0d6292f1345207b9b5acffc33 Mon Sep 17 00:00:00 2001
+From efc57856f961c1f3bf016c511c53d990db8abdff 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
+Subject: [PATCH 16/31] 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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index 07a8c8364..1aee3346a 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
-@@ -1063,6 +1063,11 @@ struct input_mask {
+@@ -1162,6 +1162,11 @@ struct input_mask {
#define RENAME_NOREPLACE (1 << 0)
#endif
@@ -31,10 +31,10 @@ index 8009888ad..671f341c6 100644
#define KCMP_FILE 0
#endif
diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
-index 00aaf9e62..9dc4a584a 100644
+index 8befffa66..bcb860f95 100644
--- a/src/basic/strbuf.c
+++ b/src/basic/strbuf.c
-@@ -23,6 +23,7 @@
+@@ -24,6 +24,7 @@
#include "alloc-util.h"
#include "strbuf.h"
@@ -43,5 +43,5 @@ index 00aaf9e62..9dc4a584a 100644
/*
* Strbuf stores given strings in a single continuous allocated memory
--
-2.14.2
+2.13.0
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/0017-Include-netinet-if_ether.h.patch
index 55887ee82..a09cfddaa 100644
--- 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/0017-Include-netinet-if_ether.h.patch
@@ -1,53 +1,54 @@
-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
+From f2b0173cd9807864db1ef3b102abaa76ef37e506 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:19:12 -0800
+Subject: [PATCH 17/31] 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'
+/path/to/systemd/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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
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(-)
+ src/udev/net/ethtool-util.c | 1 +
+ src/udev/udev-builtin-net_setup_link.c | 1 +
+ 5 files changed, 5 insertions(+)
diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
-index 923f7dd10..b95b1e4b2 100644
+index 0ee7d6f0d..ef75893a6 100644
--- a/src/libsystemd/sd-netlink/netlink-types.c
+++ b/src/libsystemd/sd-netlink/netlink-types.c
-@@ -19,6 +19,7 @@
-
+@@ -21,6 +21,7 @@
+ #include <netinet/in.h>
#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>
+ #include <linux/genetlink.h>
diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
-index 3d6280884..40e58c38f 100644
+index 4fc9b610a..628c61c57 100644
--- a/src/network/netdev/tuntap.c
+++ b/src/network/netdev/tuntap.c
-@@ -18,6 +18,7 @@
- ***/
+@@ -20,6 +20,7 @@
+ #include <errno.h>
#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
+index 99dd41629..90407c9d8 100644
--- a/src/network/networkd-brvlan.c
+++ b/src/network/networkd-brvlan.c
-@@ -18,6 +18,7 @@
+@@ -19,6 +19,7 @@
***/
#include <netinet/in.h>
@@ -56,31 +57,29 @@ index fa5d3ee7f..e0828962a 100644
#include <stdbool.h>
diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
-index 201fc2343..5f7cc2a0a 100644
+index 9bdaef8d9..948f89cf8 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
+@@ -18,6 +18,7 @@
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
+index 40158e0af..b24b3fce8 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
+@@ -18,6 +18,7 @@
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
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
new file mode 100644
index 000000000..ab7edf5ca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
@@ -0,0 +1,47 @@
+From 690eeef9590c7ef1d9d2c31d8c1d5d8071da8c4c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:21:11 +0800
+Subject: [PATCH 18/31] check for missing canonicalize_file_name
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 ++
+ src/basic/missing_syscall.h | 6 ++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 12811b3f3..f6515e97c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -520,6 +520,8 @@ foreach ident : [
+ ['kcmp', '''#include <linux/kcmp.h>'''],
+ ['keyctl', '''#include <sys/types.h>
+ #include <keyutils.h>'''],
++ ['canonicalize_file_name', '''#define _GNU_SOURCE
++ #include <stdlib.h>'''],
+ ['copy_file_range', '''#include <sys/syscall.h>
+ #include <unistd.h>'''],
+ ['bpf', '''#include <sys/syscall.h>
+diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
+index c938d0d97..308b9472b 100644
+--- a/src/basic/missing_syscall.h
++++ b/src/basic/missing_syscall.h
+@@ -31,6 +31,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ }
+ #endif
+
++#if !HAVE_CANONICALIZE_FILE_NAME
++static inline char *canonicalize_file_name(const char *path) {
++ return realpath(path, NULL);
++}
++#endif
++
+ /* ======================================================================= */
+
+ #if !HAVE_MEMFD_CREATE
+--
+2.13.0
+
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
deleted file mode 100644
index 067b73ff3..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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 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 1150ca50e..60e7df5ee 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -304,6 +304,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
-
- # ------------------------------------------------------------------------------
-
-+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], [], [])
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 25a11f351..d631b7e3e 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -37,7 +37,9 @@
- #include <sys/resource.h>
- #include <sys/socket.h>
- #include <sys/syscall.h>
-+#ifdef HAVE_UCHAR_H
- #include <uchar.h>
-+#endif
- #include <unistd.h>
-
- #ifdef HAVE_AUDIT
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
new file mode 100644
index 000000000..16b21a068
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
@@ -0,0 +1,29 @@
+From f5f313915d78bc43eb96e2aafb8ce3cda304c277 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:27:56 +0800
+Subject: [PATCH 19/31] Do not enable nss tests if nss-systemd is not enabled
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/meson.build b/src/test/meson.build
+index 1db8aa107..df3a1f5c5 100644
+--- a/src/test/meson.build
++++ b/src/test/meson.build
+@@ -646,7 +646,7 @@ tests += [
+ [['src/test/test-nss.c'],
+ [],
+ [libdl],
+- '', 'manual'],
++ 'ENABLE_NSS_SYSTEMD', 'manual'],
+ ]
+
+ ############################################################
+--
+2.13.0
+
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/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
index d3694dcbd..ad49cfe8f 100644
--- 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/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
@@ -1,20 +1,21 @@
-From 75f4e7f167de533a160ee1af2a03fba4c5a5ffc6 Mon Sep 17 00:00:00 2001
+From d63d2fedcd80e58ee53655aeaf2836d4b0a14652 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
+Subject: [PATCH 20/31] test-hexdecoct.c: Include missing.h for strndupa
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
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
+index 3e25a0bac..ab3e508f1 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
-@@ -21,6 +21,7 @@
+@@ -24,6 +24,7 @@
#include "hexdecoct.h"
#include "macro.h"
#include "string-util.h"
@@ -23,5 +24,5 @@ index fcae427e7..5eb5e2ed7 100644
static void test_hexchar(void) {
assert_se(hexchar(0xa) == 'a');
--
-2.14.2
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
new file mode 100644
index 000000000..9c8aeca9a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -0,0 +1,42 @@
+From dfea4b98844795a0cd14fdaf40c67df389dbd27e Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:25:22 -0800
+Subject: [PATCH 21/31] test-sizeof.c: Disable tests for missing typedefs in
+ musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-sizeof.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index aed6db842..0de6fa63c 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -50,8 +50,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);
+@@ -61,7 +63,9 @@ int main(void) {
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
++#ifdef __GLIBC__
+ info(__time_t);
++#endif
+ info(pid_t);
+ info(uid_t);
+ info(gid_t);
+--
+2.13.0
+
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/0022-don-t-use-glibc-specific-qsort_r.patch
index 7cfe829e8..a5f74421a 100644
--- 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/0022-don-t-use-glibc-specific-qsort_r.patch
@@ -1,21 +1,21 @@
-From 2eb45f5a0a8bfb8bdca084587ad28e5001f3cc4b Mon Sep 17 00:00:00 2001
+From d343757d629402c70ca8e5eaa551deaf175c96f3 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
+Subject: [PATCH 22/31] don't use glibc-specific qsort_r
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index 4540260f9..81aca7a9b 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
-@@ -151,13 +151,12 @@ static void trie_free(struct trie *trie) {
+@@ -152,13 +152,12 @@ static void trie_free(struct trie *trie) {
DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
@@ -33,7 +33,7 @@ index 793398ca6..669b00818 100644
}
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,
+@@ -183,7 +182,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
.value_off = v,
};
@@ -45,7 +45,7 @@ index 793398ca6..669b00818 100644
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,
+@@ -208,7 +210,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++;
@@ -57,10 +57,10 @@ index 793398ca6..669b00818 100644
}
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
-index 69b0b9025..fbd213300 100644
+index ab5dc7ab6..c777e30ab 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) {
+@@ -130,13 +130,13 @@ static void trie_node_cleanup(struct trie_node *node) {
free(node);
}
@@ -78,7 +78,7 @@ index 69b0b9025..fbd213300 100644
}
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,
+@@ -157,7 +157,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
.value_off = v,
};
@@ -89,7 +89,7 @@ index 69b0b9025..fbd213300 100644
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,
+@@ -174,7 +176,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++;
@@ -101,5 +101,5 @@ index 69b0b9025..fbd213300 100644
}
--
-2.14.2
+2.13.0
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/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index 1a6db654f..09c2b5c10 100644
--- 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/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -1,7 +1,7 @@
-From 9621618c701a2d5eb3e26f40c68354d4dfb8f872 Mon Sep 17 00:00:00 2001
+From 7b802ada1207ed00ed3867b9804dd0f316641b9b 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()
+Subject: [PATCH 23/31] 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:
@@ -22,19 +22,19 @@ 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
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
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
+index 4dba1ea56..9c4b02ecc 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);
+@@ -50,7 +50,27 @@ int fchmod_umask(int fd, mode_t mode);
int fd_warn_permissions(const char *path, int fd);
@@ -64,10 +64,10 @@ index 094acf179..cdbc0ae72 100644
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
+index 3c25aa534..574ca71c7 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) {
+@@ -71,7 +71,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 ++) {
@@ -76,7 +76,7 @@ index 903a18786..2f6052ee7 100644
continue;
if (table[i].target) {
-@@ -78,7 +78,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+@@ -79,7 +79,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) {
@@ -85,7 +85,7 @@ index 903a18786..2f6052ee7 100644
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) {
+@@ -90,7 +90,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
if (!p)
return log_oom();
@@ -95,5 +95,5 @@ index 903a18786..2f6052ee7 100644
}
--
-2.14.2
+2.13.0
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/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
index e219981ab..fe7e623ff 100644
--- 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/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -1,23 +1,23 @@
-From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001
+From 76c71aa889155f29be1d5d2b74a2c4faa5909c8c 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
+Subject: [PATCH 24/31] 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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index 9d1b10756..12db53a93 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,
+@@ -95,7 +95,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.
*/
@@ -27,5 +27,5 @@ index c7da6c39b..87f62b891 100644
return;
--
-2.14.2
+2.13.0
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/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
index 35599d44c..9376a8f75 100644
--- 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/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
@@ -1,22 +1,22 @@
-From 3ca5326485cb19e775af6de615c17be66e44e472 Mon Sep 17 00:00:00 2001
+From a0b1496322f4d7ce83f4fbfd2a90b91d0721f643 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
+Subject: [PATCH 25/31] 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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index cab1cd6a2..f5eedac18 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
-@@ -27,6 +27,7 @@
+@@ -28,6 +28,7 @@
#include <sys/time.h>
#include <sys/utsname.h>
#include <unistd.h>
@@ -24,7 +24,7 @@ index 9750dcd81..bd55d74a1 100644
#include <utmpx.h>
#include "alloc-util.h"
-@@ -41,6 +42,13 @@
+@@ -42,6 +43,13 @@
#include "util.h"
#include "utmp-wtmp.h"
@@ -39,5 +39,5 @@ index 9750dcd81..bd55d74a1 100644
struct utmpx *found, lookup = { .ut_type = RUN_LVL };
int r;
--
-2.14.3
+2.13.0
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/0026-Use-uintmax_t-for-handling-rlim_t.patch
index 779dc78fd..46d75ada7 100644
--- 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/0026-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,7 +1,7 @@
-From b2d4171c6e521cf1e70331fb769234d63a4a6d44 Mon Sep 17 00:00:00 2001
+From 88c48ea84db6fda19dfaeb64545fccf8fa0525ec 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
+Subject: [PATCH 26/31] 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
@@ -15,20 +15,20 @@ execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned i
| 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]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
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
+index d9a78f781..9a1bc21d7 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
-@@ -60,14 +60,6 @@
+@@ -61,14 +61,6 @@
# define PRI_TIMEX "li"
#endif
@@ -44,10 +44,10 @@ index ae42a8f89..144249cd6 100644
# 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
+index 00648211d..df3d9ecc1 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) {
+@@ -286,13 +286,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)
@@ -66,10 +66,10 @@ index ca834df62..41fcebb74 100644
if (!s)
return -ENOMEM;
diff --git a/src/core/execute.c b/src/core/execute.c
-index d72e5bf08..d38946002 100644
+index 0df3971df..aabdddb68 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) {
+@@ -3991,10 +3991,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
for (i = 0; i < RLIM_NLIMITS; i++)
if (c->rlimit[i]) {
@@ -85,5 +85,5 @@ index d72e5bf08..d38946002 100644
if (c->ioprio_set) {
--
-2.14.3
+2.13.0
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
new file mode 100644
index 000000000..42f59b082
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
@@ -0,0 +1,63 @@
+From 5354eb767d1eba2ec41eb273f6b657f4a630ca8a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 9 Jan 2018 14:45:46 +0800
+Subject: [PATCH 27/31] remove nobody user/group checking
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 37 -------------------------------------
+ 1 file changed, 37 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index f6515e97c..1b947adac 100644
+--- a/meson.build
++++ b/meson.build
+@@ -700,43 +700,6 @@ substs.set('containeruidbasemax', container_uid_base_max)
+ nobody_user = get_option('nobody-user')
+ nobody_group = get_option('nobody-group')
+
+-getent_result = run_command('getent', 'passwd', '65534')
+-if getent_result.returncode() == 0
+- name = getent_result.stdout().split(':')[0]
+- if name != nobody_user
+- message('WARNING:\n' +
+- ' The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
+- ' Your build will result in an user table setup that is incompatible with the local system.')
+- endif
+-endif
+-id_result = run_command('id', '-u', nobody_user)
+-if id_result.returncode() == 0
+- id = id_result.stdout().to_int()
+- if id != 65534
+- message('WARNING:\n' +
+- ' The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
+- ' Your build will result in an user table setup that is incompatible with the local system.')
+- endif
+-endif
+-
+-getent_result = run_command('getent', 'group', '65534')
+-if getent_result.returncode() == 0
+- name = getent_result.stdout().split(':')[0]
+- if name != nobody_group
+- message('WARNING:\n' +
+- ' The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
+- ' Your build will result in an group table setup that is incompatible with the local system.')
+- endif
+-endif
+-id_result = run_command('id', '-g', nobody_group)
+-if id_result.returncode() == 0
+- id = id_result.stdout().to_int()
+- if id != 65534
+- message('WARNING:\n' +
+- ' The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
+- ' Your build will result in an group table setup that is incompatible with the local system.')
+- endif
+-endif
+ if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
+ message('WARNING:\n' +
+ ' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
new file mode 100644
index 000000000..9ec3137b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
@@ -0,0 +1,50 @@
+From 03cdd33be62db4c72a7fcf21b61d0d056c23c6a9 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:36:32 -0800
+Subject: [PATCH 28/31] add missing FTW_ macros for musl
+
+This is to avoid build failures like below for musl.
+
+ locale-util.c:296:24: error: 'FTW_STOP' undeclared
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 1aee3346a..5b9fde692 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -207,6 +207,26 @@ struct sockaddr_vm {
+ #define BTRFS_QGROUP_LEVEL_SHIFT 48
+ #endif
+
++#ifndef FTW_ACTIONRETVAL
++#define FTW_ACTIONRETVAL 16
++#endif
++
++#ifndef FTW_CONTINUE
++#define FTW_CONTINUE 0
++#endif
++
++#ifndef FTW_STOP
++#define FTW_STOP 1
++#endif
++
++#ifndef FTW_SKIP_SUBTREE
++#define FTW_SKIP_SUBTREE 2
++#endif
++
++#ifndef FTW_SKIP_SIBLINGS
++#define FTW_SKIP_SIBLINGS 3
++#endif
++
+ #if ! HAVE_LINUX_BTRFS_H
+ #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \
+ struct btrfs_ioctl_qgroup_assign_args)
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
new file mode 100644
index 000000000..517249f43
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
@@ -0,0 +1,43 @@
+From 5845c82d1016a3e3f2696180d5ac91b46950540a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 12:56:21 +0800
+Subject: [PATCH 29/31] nss-mymachines: Build conditionally when
+ ENABLE_MYHOSTNAME is set
+
+Fixes build failures when building with --disable-myhostname
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 1b947adac..1ed4dde72 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1351,12 +1351,15 @@ test_dlopen = executable(
+ link_with : [libbasic],
+ dependencies : [libdl])
+
+-foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
+- ['systemd', 'ENABLE_NSS_SYSTEMD'],
+- ['mymachines', 'ENABLE_MACHINED'],
+- ['resolve', 'ENABLE_RESOLVE']]
++foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME', ''],
++ ['systemd', 'ENABLE_NSS_SYSTEMD', ''],
++ ['mymachines', 'ENABLE_MACHINED', 'ENABLE_MYHOSTNAME'],
++ ['resolve', 'ENABLE_RESOLVE', '']]
+
+ condition = tuple[1] == '' or conf.get(tuple[1]) == 1
++ if tuple[2] != '' and condition
++ condition = conf.get(tuple[2]) == 1
++ endif
+ if condition
+ module = tuple[0]
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
new file mode 100644
index 000000000..7f0b4bf81
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -0,0 +1,45 @@
+From b7eacdf0388f930fc5271bdecfa46612c71dd65c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 13:27:47 +0800
+Subject: [PATCH 30/31] fix missing of __register_atfork for non-glibc builds
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/process-util.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index dc7c9ef9e..85ce8a0cc 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -39,6 +39,9 @@
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+ #endif
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "architecture.h"
+@@ -1112,11 +1115,15 @@ void reset_cached_pid(void) {
+ cached_pid = CACHED_PID_UNSET;
+ }
+
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+ * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
+ extern void* __dso_handle __attribute__ ((__weak__));
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
+
+ pid_t getpid_cached(void) {
+ pid_t current_value;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
new file mode 100644
index 000000000..319c4b65f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
@@ -0,0 +1,30 @@
+From adcd7e426fcd80e754274a730221d1a1f49dbc21 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 14:01:30 +0800
+Subject: [PATCH 31/31] fix missing ULONG_LONG_MAX definition in case of musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 5b9fde692..a922f1346 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -72,6 +72,10 @@ struct sockaddr_vm {
+ };
+ #endif /* !HAVE_LINUX_VM_SOCKETS_H */
+
++#ifndef ULONG_LONG_MAX
++#define ULONG_LONG_MAX ULLONG_MAX
++#endif
++
+ #ifndef RLIMIT_RTTIME
+ #define RLIMIT_RTTIME 15
+ #endif
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
new file mode 100644
index 000000000..f7cfd60a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
@@ -0,0 +1,272 @@
+missing_syscall: when adding syscall replacements, use different names (
+
+#8229)
+
+In meson.build we check that functions are available using:
+ meson.get_compiler('c').has_function('foo')
+which checks the following:
+- if __stub_foo or __stub___foo are defined, return false
+- if foo is declared (a pointer to the function can be taken), return true
+- otherwise check for __builtin_memfd_create
+
+_stub is documented by glibc as
+ It defines a symbol '__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS.
+
+So if __stub is defined, we know we don't want to use the glibc version, but
+this doesn't tell us if the name itself is defined or not. If it _is_ defined,
+and we define our replacement as an inline static function, we get an error:
+
+In file included from ../src/basic/missing.h:1358:0,
+ from ../src/basic/util.h:47,
+ from ../src/basic/calendarspec.h:29,
+ from ../src/basic/calendarspec.c:34:
+../src/basic/missing_syscall.h:65:19: error: static declaration of 'memfd_create' follows non-static declaration
+ static inline int memfd_create(const char *name, unsigned int flags) {
+ ^~~~~~~~~~~~
+.../usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
+ int memfd_create (const char *__name, unsigned int __flags) __THROW;
+ ^~~~~~~~~~~~
+
+To avoid this problem, call our inline functions different than glibc,
+and use a #define to map the official name to our replacement.
+
+Fixes #8099.
+
+v2:
+- use "missing_" as the prefix instead of "_"
+
+v3:
+- rebase and update for statx()
+
+ Unfortunately "statx" is also present in "struct statx", so the define
+ causes issues. Work around this by using a typedef.
+
+I checked that systemd compiles with current glibc
+(glibc-devel-2.26-24.fc27.x86_64) if HAVE_MEMFD_CREATE, HAVE_GETTID,
+HAVE_PIVOT_ROOT, HAVE_SETNS, HAVE_RENAMEAT2, HAVE_KCMP, HAVE_KEYCTL,
+HAVE_COPY_FILE_RANGE, HAVE_BPF, HAVE_STATX are forced to 0.
+
+Setting HAVE_NAME_TO_HANDLE_AT to 0 causes an issue, but it's not because of
+the define, but because of struct file_handle.
+
+
+backport https://github.com/systemd/systemd/commit/5187dd2c403caf92d09f3491e41f1ceb3f10491f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/systemd/systemd/issues/8099]
+Index: git/src/basic/missing_syscall.h
+===================================================================
+--- git.orig/src/basic/missing_syscall.h
++++ git/src/basic/missing_syscall.h
+@@ -26,9 +26,11 @@
+ #include <sys/types.h>
+
+ #if !HAVE_PIVOT_ROOT
+-static inline int pivot_root(const char *new_root, const char *put_old) {
++static inline int missing_pivot_root(const char *new_root, const char *put_old) {
+ return syscall(SYS_pivot_root, new_root, put_old);
+ }
++
++# define pivot_root missing_pivot_root
+ #endif
+
+ #if !HAVE_CANONICALIZE_FILE_NAME
+@@ -68,7 +70,7 @@ static inline char *canonicalize_file_na
+ # endif
+ # endif
+
+-static inline int memfd_create(const char *name, unsigned int flags) {
++static inline int missing_memfd_create(const char *name, unsigned int flags) {
+ # ifdef __NR_memfd_create
+ return syscall(__NR_memfd_create, name, flags);
+ # else
+@@ -76,6 +78,8 @@ static inline int memfd_create(const cha
+ return -1;
+ # endif
+ }
++
++# define memfd_create missing_memfd_create
+ #endif
+
+ /* ======================================================================= */
+@@ -115,7 +119,7 @@ static inline int memfd_create(const cha
+ # endif
+ # endif
+
+-static inline int getrandom(void *buffer, size_t count, unsigned flags) {
++static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
+ # ifdef __NR_getrandom
+ return syscall(__NR_getrandom, buffer, count, flags);
+ # else
+@@ -123,14 +127,18 @@ static inline int getrandom(void *buffer
+ return -1;
+ # endif
+ }
++
++# define getrandom missing_getrandom
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_GETTID
+-static inline pid_t gettid(void) {
++static inline pid_t missing_gettid(void) {
+ return (pid_t) syscall(SYS_gettid);
+ }
++
++# define gettid missing_gettid
+ #endif
+
+ /* ======================================================================= */
+@@ -158,7 +166,7 @@ struct file_handle {
+ unsigned char f_handle[0];
+ };
+
+-static inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
++static inline int missing_name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
+ # ifdef __NR_name_to_handle_at
+ return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
+ # else
+@@ -166,6 +174,8 @@ static inline int name_to_handle_at(int
+ return -1;
+ # endif
+ }
++
++# define name_to_handle_at missing_name_to_handle_at
+ #endif
+
+ /* ======================================================================= */
+@@ -183,7 +193,7 @@ static inline int name_to_handle_at(int
+ # endif
+ # endif
+
+-static inline int setns(int fd, int nstype) {
++static inline int missing_setns(int fd, int nstype) {
+ # ifdef __NR_setns
+ return syscall(__NR_setns, fd, nstype);
+ # else
+@@ -191,6 +201,8 @@ static inline int setns(int fd, int nsty
+ return -1;
+ # endif
+ }
++
++# define setns missing_setns
+ #endif
+
+ /* ======================================================================= */
+@@ -236,7 +248,7 @@ static inline pid_t raw_getpid(void) {
+ # endif
+ # endif
+
+-static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
++static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
+ # ifdef __NR_renameat2
+ return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
+ # else
+@@ -244,12 +256,14 @@ static inline int renameat2(int oldfd, c
+ return -1;
+ # endif
+ }
++
++# define renameat2 missing_renameat2
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_KCMP
+-static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
++static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
+ # ifdef __NR_kcmp
+ return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
+ # else
+@@ -257,36 +271,44 @@ static inline int kcmp(pid_t pid1, pid_t
+ return -1;
+ # endif
+ }
++
++# define kcmp missing_kcmp
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_KEYCTL
+-static inline long keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
++static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
+ # ifdef __NR_keyctl
+ return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define keyctl missing_keyctl
+ }
+
+-static inline key_serial_t add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
++static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
+ # ifdef __NR_add_key
+ return syscall(__NR_add_key, type, description, payload, plen, ringid);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define add_key missing_add_key
+ }
+
+-static inline key_serial_t request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
++static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
+ # ifdef __NR_request_key
+ return syscall(__NR_request_key, type, description, callout_info, destringid);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define request_key missing_request_key
+ }
+ #endif
+
+@@ -313,10 +335,10 @@ static inline key_serial_t request_key(c
+ # endif
+ # endif
+
+-static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
+- int fd_out, loff_t *off_out,
+- size_t len,
+- unsigned int flags) {
++static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
++ int fd_out, loff_t *off_out,
++ size_t len,
++ unsigned int flags) {
+ # ifdef __NR_copy_file_range
+ return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
+ # else
+@@ -324,6 +346,8 @@ static inline ssize_t copy_file_range(in
+ return -1;
+ # endif
+ }
++
++# define copy_file_range missing_copy_file_range
+ #endif
+
+ /* ======================================================================= */
+@@ -351,7 +375,7 @@ static inline ssize_t copy_file_range(in
+
+ union bpf_attr;
+
+-static inline int bpf(int cmd, union bpf_attr *attr, size_t size) {
++static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
+ #ifdef __NR_bpf
+ return (int) syscall(__NR_bpf, cmd, attr, size);
+ #else
+@@ -360,6 +384,7 @@ static inline int bpf(int cmd, union bpf
+ #endif
+ }
+
++# define bpf missing_bpf
+ #endif
+
+ /* ======================================================================= */
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
new file mode 100644
index 000000000..59647b22f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
@@ -0,0 +1,203 @@
+From 848e863acc51ecfb0f3955c498874588201d9130 Mon Sep 17 00:00:00 2001
+From: Franck Bui <fbui@suse.com>
+Date: Thu, 15 Mar 2018 06:23:46 +0100
+Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+"noreturn" is reserved and can be used in other header files we include:
+
+ [ 16s] In file included from /usr/include/gcrypt.h:30:0,
+ [ 16s] from ../src/journal/journal-file.h:26,
+ [ 16s] from ../src/journal/journal-vacuum.c:31:
+ [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token
+ [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
+
+Here we include grcrypt.h (which in turns include gpg-error.h) *after* we
+"noreturn" was defined in macro.h.
+---
+ src/basic/log.c | 4 ++--
+ src/basic/log.h | 4 ++--
+ src/basic/macro.h | 19 +++++++++----------
+ src/basic/process-util.c | 2 +-
+ src/basic/process-util.h | 2 +-
+ src/core/main.c | 4 ++--
+ src/journal/test-journal-interleaving.c | 2 +-
+ src/shared/pager.c | 2 +-
+ src/udev/collect/collect.c | 2 +-
+ 9 files changed, 20 insertions(+), 21 deletions(-)
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/pull/8456]
+
+diff --git a/src/basic/log.c b/src/basic/log.c
+index 7a7f2cbec..16a2431c5 100644
+--- a/src/basic/log.c
++++ b/src/basic/log.c
+@@ -814,7 +814,7 @@ static void log_assert(
+ log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer);
+ }
+
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(
+ abort();
+ }
+
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+diff --git a/src/basic/log.h b/src/basic/log.h
+index efcf0f1bf..314be128a 100644
+--- a/src/basic/log.h
++++ b/src/basic/log.h
+@@ -186,7 +186,7 @@ int log_dump_internal(
+ char *buffer);
+
+ /* Logging for various assertions */
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(
+ #define log_assert_failed(text, ...) \
+ log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__)
+
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+diff --git a/src/basic/macro.h b/src/basic/macro.h
+index 95be63a20..8911edfc4 100644
+--- a/src/basic/macro.h
++++ b/src/basic/macro.h
+@@ -53,6 +53,15 @@
+ #else
+ #define _fallthrough_
+ #endif
++/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
++ * compiler versions */
++#ifndef _noreturn_
++#if __STDC_VERSION__ >= 201112L
++#define _noreturn_ _Noreturn
++#else
++#define _noreturn_ __attribute__((noreturn))
++#endif
++#endif
+
+ /* Temporarily disable some warnings */
+ #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
+@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
+ #endif
+ #endif
+
+-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
+- * compiler versions */
+-#ifndef noreturn
+-#if __STDC_VERSION__ >= 201112L
+-#define noreturn _Noreturn
+-#else
+-#define noreturn __attribute__((noreturn))
+-#endif
+-#endif
+-
+ #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
+ static inline void func##p(type *p) { \
+ if (*p) \
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index aa9846db5..e6120af5b 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -987,7 +987,7 @@ bool is_main_thread(void) {
+ return cached > 0;
+ }
+
+-noreturn void freeze(void) {
++_noreturn_ void freeze(void) {
+
+ log_close();
+
+diff --git a/src/basic/process-util.h b/src/basic/process-util.h
+index 93029e36e..5170adec7 100644
+--- a/src/basic/process-util.h
++++ b/src/basic/process-util.h
+@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);
+
+ bool is_main_thread(void);
+
+-noreturn void freeze(void);
++_noreturn_ void freeze(void);
+
+ bool oom_score_adjust_is_valid(int oa);
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 076846a41..4b2d14923 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;
+ static sd_id128_t arg_machine_id = {};
+ static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
+
+-noreturn static void freeze_or_reboot(void) {
++_noreturn_ static void freeze_or_reboot(void) {
+
+ if (arg_crash_reboot) {
+ log_notice("Rebooting in 10s...");
+@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {
+ freeze();
+ }
+
+-noreturn static void crash(int sig) {
++_noreturn_ static void crash(int sig) {
+ struct sigaction sa;
+ pid_t pid;
+
+diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
+index 5a88b2774..d87bdbdd3 100644
+--- a/src/journal/test-journal-interleaving.c
++++ b/src/journal/test-journal-interleaving.c
+@@ -37,7 +37,7 @@
+
+ static bool arg_keep = false;
+
+-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
++_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
+ log_internal(LOG_CRIT, error, file, line, func,
+ "'%s' failed at %s:%u (%s): %m", text, file, line, func);
+ abort();
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..681af9c40 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -47,7 +47,7 @@ static int stored_stderr = -1;
+ static bool stdout_redirected = false;
+ static bool stderr_redirected = false;
+
+-noreturn static void pager_fallback(void) {
++_noreturn_ static void pager_fallback(void) {
+ int r;
+
+ r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);
+diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
+index 2821640e9..c8fa47b3d 100644
+--- a/src/udev/collect/collect.c
++++ b/src/udev/collect/collect.c
+@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
+ return container_of(node, struct _mate, node);
+ }
+
+-noreturn static void sig_alrm(int signo)
++_noreturn_ static void sig_alrm(int signo)
+ {
+ exit(4);
+ }
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
new file mode 100644
index 000000000..e56061f41
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
@@ -0,0 +1,173 @@
+From c2b3ebe112ebfd9f9e82fb1531ee225c3152ca83 Mon Sep 17 00:00:00 2001
+From: Patrick Uiterwijk <patrick@puiterwijk.org>
+Date: Thu, 22 Feb 2018 19:41:30 +0100
+Subject: [PATCH] Fix format-truncation compile failure by typecasting USB IDs
+ (#8250)
+
+This patch adds safe_atoux16 for parsing an unsigned hexadecimal 16bit int, and
+uses that for parsing USB device and vendor IDs.
+
+This fixes a compile error with gcc-8 because while we know that USB IDs are 2 bytes,
+the compiler does not know that.
+
+../src/udev/udev-builtin-hwdb.c:80:38: error: '%04X' directive output may be
+truncated writing between 4 and 8 bytes into a region of size between 2 and 6
+[-Werror=format-truncation=]
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/5547c12503a683290eaed47954ffcfb2d1bc03cd]
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
+---
+ src/basic/parse-util.c | 24 ++++++++++++++++++++++
+ src/basic/parse-util.h | 2 ++
+ src/test/test-parse-util.c | 39 ++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin-hwdb.c | 13 ++++++------
+ 4 files changed, 71 insertions(+), 7 deletions(-)
+
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 97533721d..ff3fc298a 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -532,6 +532,30 @@ int safe_atoi16(const char *s, int16_t *ret) {
+ return 0;
+ }
+
++int safe_atoux16(const char *s, uint16_t *ret) {
++ char *x = NULL;
++ unsigned long l;
++
++ assert(s);
++ assert(ret);
++
++ s += strspn(s, WHITESPACE);
++
++ errno = 0;
++ l = strtoul(s, &x, 16);
++ if (errno > 0)
++ return -errno;
++ if (!x || x == s || *x != 0)
++ return -EINVAL;
++ if (s[0] == '-')
++ return -ERANGE;
++ if ((unsigned long) (uint16_t) l != l)
++ return -ERANGE;
++
++ *ret = (uint16_t) l;
++ return 0;
++}
++
+ int safe_atod(const char *s, double *ret_d) {
+ _cleanup_(freelocalep) locale_t loc = (locale_t) 0;
+ char *x = NULL;
+diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
+index 1eda1d7f9..727422056 100644
+--- a/src/basic/parse-util.h
++++ b/src/basic/parse-util.h
+@@ -54,6 +54,8 @@ int safe_atou8(const char *s, uint8_t *ret);
+ int safe_atou16(const char *s, uint16_t *ret);
+ int safe_atoi16(const char *s, int16_t *ret);
+
++int safe_atoux16(const char *s, uint16_t *ret);
++
+ static inline int safe_atou32(const char *s, uint32_t *ret_u) {
+ assert_cc(sizeof(uint32_t) == sizeof(unsigned));
+ return safe_atou(s, (unsigned*) ret_u);
+diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
+index 937500213..a99cea5a1 100644
+--- a/src/test/test-parse-util.c
++++ b/src/test/test-parse-util.c
+@@ -468,6 +468,44 @@ static void test_safe_atoi16(void) {
+ assert_se(r == -EINVAL);
+ }
+
++static void test_safe_atoux16(void) {
++ int r;
++ uint16_t l;
++
++ r = safe_atoux16("1234", &l);
++ assert_se(r == 0);
++ assert_se(l == 0x1234);
++
++ r = safe_atoux16("abcd", &l);
++ assert_se(r == 0);
++ assert_se(l == 0xabcd);
++
++ r = safe_atoux16(" 1234", &l);
++ assert_se(r == 0);
++ assert_se(l == 0x1234);
++
++ r = safe_atoux16("12345", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16("-1", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16(" -1", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16("junk", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("123x", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("12.3", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("", &l);
++ assert_se(r == -EINVAL);
++}
++
+ static void test_safe_atou64(void) {
+ int r;
+ uint64_t l;
+@@ -745,6 +783,7 @@ int main(int argc, char *argv[]) {
+ test_safe_atolli();
+ test_safe_atou16();
+ test_safe_atoi16();
++ test_safe_atoux16();
+ test_safe_atou64();
+ test_safe_atoi64();
+ test_safe_atod();
+diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
+index ca7f7c230..dbfe02429 100644
+--- a/src/udev/udev-builtin-hwdb.c
++++ b/src/udev/udev-builtin-hwdb.c
+@@ -27,6 +27,7 @@
+
+ #include "alloc-util.h"
+ #include "hwdb-util.h"
++#include "parse-util.h"
+ #include "string-util.h"
+ #include "udev-util.h"
+ #include "udev.h"
+@@ -63,7 +64,7 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev,
+
+ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+ const char *v, *p;
+- int vn, pn;
++ uint16_t vn, pn;
+
+ v = udev_device_get_sysattr_value(dev, "idVendor");
+ if (!v)
+@@ -71,12 +72,10 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+ p = udev_device_get_sysattr_value(dev, "idProduct");
+ if (!p)
+ return NULL;
+- vn = strtol(v, NULL, 16);
+- if (vn <= 0)
+- return NULL;
+- pn = strtol(p, NULL, 16);
+- if (pn <= 0)
+- return NULL;
++ if (safe_atoux16(v, &vn) < 0)
++ return NULL;
++ if (safe_atoux16(p, &pn) < 0)
++ return NULL;
+ snprintf(s, size, "usb:v%04Xp%04X*", vn, pn);
+ return s;
+ }
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 000000000..736d525ad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,33 @@
+From 5f1f064c81ea30acf93cfa0fb466b38f094f488c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 May 2018 08:36:44 -0700
+Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
+
+Fixes builds with musl, even though systemd is adamant about
+using non-posix basename implementation, we have a way out
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/machine/machine-dbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 2d7806491b..9a3bdb1d76 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -29,6 +29,10 @@
+ #include <libgen.h>
+ #undef basename
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+ #include "bus-internal.h"
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
new file mode 100644
index 000000000..b59d5b7d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 26 Mar 2018 17:34:53 +0200
+Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
+
+linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
+definitions.
+
+To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
+should be included. And missing.h must be included last.
+
+Without this, building systemd may fail with:
+
+In file included from [...]/libmount/libmount.h:31:0,
+ from ../systemd-238/src/core/manager.h:23,
+ from ../systemd-238/src/core/emergency-action.h:37,
+ from ../systemd-238/src/core/unit.h:34,
+ from ../systemd-238/src/core/dbus-timer.h:25,
+ from ../systemd-238/src/core/timer.c:26:
+[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
+---
+ src/core/dbus-execute.c | 1 +
+ src/core/manager.h | 3 ++-
+ src/core/mount.c | 2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 7344623ebf6..c342093bca4 100644
+--- a/src/core/dbus-execute.c
++++ b/src/core/dbus-execute.c
+@@ -18,6 +18,7 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#include <sys/mount.h>
+ #include <sys/prctl.h>
+ #include <stdio_ext.h>
+
+diff --git a/src/core/manager.h b/src/core/manager.h
+index 28c5da225b1..e09e0cdf5e9 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -20,7 +20,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <libmount.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+
+@@ -34,6 +33,8 @@
+ #include "list.h"
+ #include "ratelimit.h"
+
++struct libmnt_monitor;
++
+ /* Enforce upper limit how many names we allow */
+ #define MANAGER_MAX_NAMES 131072 /* 128K */
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 0e755da5c02..0154ebda5d6 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -23,6 +23,8 @@
+ #include <stdio.h>
+ #include <sys/epoll.h>
+
++#include <libmount.h>
++
+ #include "sd-messages.h"
+
+ #include "alloc-util.h"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
deleted file mode 100644
index 2ae76ffaf..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-cd tests
-tar -C test -xJf test/sys.tar.xz
-make check-TESTS
-cd ..
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
index 9ce27bf67..2e6558ded 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
@@ -8,44 +8,59 @@ DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util-
SECTION = "base/shell"
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages
+inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_features_check
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
- file://touchscreen.rules \
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRC_URI += "file://touchscreen.rules \
file://00-create-volatile.conf \
file://init \
- file://run-ptest \
- file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
- file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
- file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.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://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://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 \
+ file://0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
+ file://0001-Use-getenv-when-secure-versions-are-not-available.patch \
+ file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+ file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0004-implment-systemd-sysv-install-for-OE.patch \
+ file://0005-rules-whitelist-hd-devices.patch \
+ file://0006-Make-root-s-home-directory-configurable.patch \
+ file://0007-Revert-rules-remove-firmware-loading-rules.patch \
+ file://0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+ file://0009-remove-duplicate-include-uchar.h.patch \
+ file://0010-check-for-uchar.h-in-meson.build.patch \
+ file://0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+ file://0012-rules-watch-metadata-changes-in-ide-devices.patch \
+ file://0013-add-fallback-parse_printf_format-implementation.patch \
+ file://0014-src-basic-missing.h-check-for-missing-strndupa.patch \
+ file://0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
+ file://0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
+ file://0017-Include-netinet-if_ether.h.patch \
+ file://0018-check-for-missing-canonicalize_file_name.patch \
+ file://0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch \
+ file://0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \
+ file://0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
+ file://0022-don-t-use-glibc-specific-qsort_r.patch \
+ file://0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
+ file://0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
+ file://0026-Use-uintmax_t-for-handling-rlim_t.patch \
+ file://0027-remove-nobody-user-group-checking.patch \
+ file://0028-add-missing-FTW_-macros-for-musl.patch \
+ file://0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch \
+ file://0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
+ file://0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
+ file://0032-memfd.patch \
+ file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \
+ file://libmount.patch \
+ file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
+ file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
"
SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and qemuppc for musl
+SRC_URI_append_libc-musl_qemux86 = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+SRC_URI_append_libc-musl_qemuppc = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+
PAM_PLUGINS = " \
pam-plugin-unix \
pam-plugin-loginuid \
@@ -97,72 +112,59 @@ PACKAGECONFIG_remove_libc-musl = " \
# systemd-serialgetty.bb - not enabled by default.
PACKAGECONFIG[serial-getty-generator] = ""
-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"
+PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
+PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
+PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
+PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
+PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
+PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
+PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
+PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
+PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
+PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
+PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
+PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
+PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
+PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
# 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[myhostname] = "--enable-myhostname,--disable-myhostname"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-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[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
+PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
+PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
+PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false"
+PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
+PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
+PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
+PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
+PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
+PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
+PACKAGECONFIG[myhostname] = "-Dmyhostname=true,-Dmyhostname=false"
+PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
+PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
+PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
+PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
+PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
+PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
+PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
# libseccomp is found in meta-security
-PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
-PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-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[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"
+PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
+PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
+PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
+PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
+PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
+PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
+PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
+PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
+PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-# 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 \
-"
+PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
+PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
+PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
# Helper variables to clarify locations. This mirrors the logic in systemd's
# build system.
@@ -170,41 +172,32 @@ rootprefix ?= "${root_prefix}"
rootlibdir ?= "${base_libdir}"
rootlibexecdir = "${rootprefix}/lib"
-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"
-
-COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
-COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
-COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
-
-do_configure_prepend() {
- 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
- else
- cp -r ${S}/units ${S}/units.pre_sed
- fi
- sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
- sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
-}
+# This links udev statically with systemd helper library.
+# Otherwise udev package would depend on systemd package (which has the needed shared library),
+# and always pull it into images.
+EXTRA_OEMESON += "-Dlink-udev-shared=false"
+
+EXTRA_OEMESON += "-Dnobody-user=nobody \
+ -Dnobody-group=nobody \
+ -Droothomedir=${ROOTHOME} \
+ -Drootlibdir=${rootlibdir} \
+ -Drootprefix=${rootprefix} \
+ -Dsysvrcnd-path=${sysconfdir} \
+ -Dfirmware-path=${nonarch_base_libdir}/firmware \
+ "
+
+# Hardcode target binary paths to avoid using paths from sysroot
+EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
+ -Dkill-path=${base_bindir}/kill \
+ -Dkmod-path=${base_bindir}/kmod \
+ -Dmount-path=${base_bindir}/mount \
+ -Dquotacheck-path=${sbindir}/quotacheck \
+ -Dquotaon-path=${sbindir}/quotaon \
+ -Dsulogin-path=${base_sbindir}/sulogin \
+ -Dumount-path=${base_bindir}/umount"
do_install() {
- autotools_do_install
+ meson_do_install
install -d ${D}/${base_sbindir}
if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
# Provided by a separate recipe
@@ -283,31 +276,6 @@ do_install() {
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 -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 ${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
-
- # 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/
-}
python populate_packages_prepend (){
systemdlibdir = d.getVar("rootlibdir")
@@ -352,14 +320,6 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
-RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
- tzdata tzdata-americas tzdata-asia \
- tzdata-europe tzdata-africa tzdata-antarctica \
- tzdata-arctic tzdata-atlantic tzdata-australia \
- tzdata-pacific tzdata-posix"
-
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
FILES_${PN}-gui = "${bindir}/systemadm"
FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
@@ -508,6 +468,7 @@ FILES_${PN} = " ${base_bindir}/* \
${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 \
+ ${nonarch_base_libdir}/modprobe.d/systemd.conf \
${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 \
@@ -632,10 +593,3 @@ pkg_postinst_udev-hwdb () {
pkg_prerm_udev-hwdb () {
rm -f $D${sysconfdir}/udev/hwdb.bin
}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 5b9c422ca..8585a418a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -53,8 +53,15 @@ EOF
}
pkg_postinst_${PN} () {
+# run this on host and on target
+if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+ exit 0
+fi
+}
+
+pkg_postinst_ontarget_${PN} () {
# run this on the target
-if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
+if [ -e /proc/consoles ]; then
tmp="${SERIAL_CONSOLES_CHECK}"
for i in $tmp
do
@@ -68,11 +75,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
done
kill -HUP 1
else
- if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
- exit 0
- else
- exit 1
- fi
+ exit 1
fi
}
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 22a0ecf83..ad65819b2 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
@@ -28,9 +28,11 @@ SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5
S = "${WORKDIR}/sysvinit-${PV}"
B = "${S}/src"
-inherit update-alternatives
+inherit update-alternatives distro_features_check
DEPENDS_append = " update-rc.d-native base-passwd"
+REQUIRED_DISTRO_FEATURES = "sysvinit"
+
ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
ALTERNATIVE_PRIORITY = "200"
@@ -105,8 +107,3 @@ do_install () {
chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
}
-
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- raise bb.parse.SkipPackage("'sysvinit' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
index 02fb23ac5..88ad8f1b3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
@@ -19,12 +19,13 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
file://run.rules \
file://udev.rules \
"
-UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e"
-SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63"
+SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
+SRC_URI[sha256sum] = "49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"
-inherit autotools update-rc.d qemu pkgconfig
+inherit autotools update-rc.d qemu pkgconfig distro_features_check
+
+CONFLICT_DISTRO_FEATURES = "systemd"
EXTRA_OECONF = " \
--sbindir=${base_sbindir} \
@@ -76,11 +77,6 @@ RDEPENDS_eudev-hwdb += "eudev"
RPROVIDES_${PN} = "hotplug udev"
RPROVIDES_eudev-hwdb += "udev-hwdb"
-python () {
- if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
PACKAGE_WRITE_DEPS += "qemu-native"
pkg_postinst_eudev-hwdb () {
if test -n "$D"; then
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 6fc6f6e1a..76d4312d8 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
@@ -16,7 +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"
+UPSTREAM_CHECK_COMMITS = "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 f0ffd255f..0b7db529f 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
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
#gtk-doc is not enabled as it requires xmlto which requires util-linux
inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
-DEPENDS = "zlib ncurses"
+DEPENDS = "zlib ncurses virtual/crypt"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
@@ -31,7 +31,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
util-linux-swaponoff util-linux-losetup util-linux-umount \
util-linux-mount util-linux-readprofile util-linux-uuidd \
util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
- util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
+ util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-rfkill \
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 \
@@ -44,7 +44,7 @@ PACKAGES_DYNAMIC = "^util-linux-lib.*"
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
--enable-kill --enable-last --enable-mesg --enable-partx \
- --enable-raw --enable-reset --disable-login \
+ --enable-raw --enable-rfkill --disable-login \
--disable-vipw --disable-newgrp --disable-chfn-chsh \
--enable-write --enable-mount \
--enable-libuuid --enable-libblkid --enable-fsck \
@@ -86,7 +86,7 @@ FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
FILES_util-linux-uuidgen = "${bindir}/uuidgen"
FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-reset = "${base_bindir}/reset*"
+FILES_util-linux-rfkill = "${sbindir}/rfkill*"
FILES_util-linux-partx = "${sbindir}/partx"
FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
FILES_util-linux-findfs = "${sbindir}/findfs"
@@ -119,9 +119,6 @@ FILES_util-linux-blkid = "${base_sbindir}/blkid*"
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
-# reset calls 'tput'
-RDEPENDS_util-linux-reset += "ncurses"
-
RDEPENDS_util-linux-runuser += "libpam"
RDEPENDS_util-linux-su += "libpam"
@@ -160,7 +157,7 @@ do_install () {
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
- binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
+ binprogs_a="dmesg getopt kill more umount mount login su mountpoint"
if [ "${base_sbindir}" != "${sbindir}" ]; then
mkdir -p ${D}${base_sbindir}
@@ -198,17 +195,18 @@ do_install () {
fi
}
-# reset and nologin causes a conflict with ncurses-native and shadow-native
+# nologin causes a conflict with shadow-native
+# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
do_install_append_class-native () {
- rm -f ${D}${base_bindir}/reset
rm -f ${D}${base_sbindir}/nologin
+ rm -f ${D}${base_bindir}/kill
}
ALTERNATIVE_PRIORITY = "80"
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -220,14 +218,14 @@ ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
+ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1"
+ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8"
ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
@@ -272,9 +270,8 @@ ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
ALTERNATIVE_util-linux-blkid = "blkid"
ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-ALTERNATIVE_util-linux-reset = "reset"
-ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
-ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-rfkill = "rfkill"
+ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill"
ALTERNATIVE_util-linux-getopt = "getopt"
ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
index 46d4d3765..748b6ef09 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -5,15 +5,16 @@ Revert run.sh script accordingly to serialize running tests
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
-+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
-@@ -10,7 +10,7 @@
+Index: util-linux-2.32/configure.ac
+===================================================================
+--- util-linux-2.32.orig/configure.ac
++++ util-linux-2.32/configure.ac
+@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
--AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
-+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
-
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
index a5b1ff12e..e475289f6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
@@ -5,11 +5,11 @@ Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com
Upstream-Status: Inappropriate [configuration]
-Index: util-linux-2.22.1/configure.ac
+Index: util-linux-2.31/configure.ac
===================================================================
---- util-linux-2.22.1.orig/configure.ac
-+++ util-linux-2.22.1/configure.ac
-@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
+--- util-linux-2.31.orig/configure.ac
++++ util-linux-2.31/configure.ac
+@@ -89,7 +89,10 @@ AC_SUBST([runstatedir])
usrbin_execdir='${exec_prefix}/bin'
AC_SUBST([usrbin_execdir])
@@ -20,4 +20,4 @@ Index: util-linux-2.22.1/configure.ac
+fi
AC_SUBST([usrsbin_execdir])
- case $libdir in
+ AS_CASE([$libdir],
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
deleted file mode 100644
index b9fa1cace..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-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_2.30.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
index 39449d9ac..55cc98c20 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
@@ -1,4 +1,4 @@
-MAJOR_VERSION = "2.30"
+MAJOR_VERSION = "2.32"
require util-linux.inc
# To support older hosts, we need to patch and/or revert
@@ -15,9 +15,8 @@ SRC_URI += "file://configure-sbindir.patch \
file://display_testname_for_subtest.patch \
file://avoid_parallel_tests.patch \
"
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-SRC_URI[md5sum] = "eaa3429150268027908a1b8ae6ee9a62"
-SRC_URI[sha256sum] = "c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d"
+SRC_URI[md5sum] = "e0d8a25853f88cd15ff557e5d8cb4ea7"
+SRC_URI[sha256sum] = "6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734"
CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
diff --git a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
index a6e325493..d861a71a6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -67,7 +67,7 @@ do_install () {
install -m 0755 mount-copybind ${D}${base_sbindir}/
install -d ${D}${systemd_unitdir}/system
- for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+ for service in ${SYSTEMD_SERVICE_${PN}}; do
install -m 0644 $service ${D}${systemd_unitdir}/system/
done
diff --git a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
index 403b4825c..7ccbe1f44 100644
--- a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
@@ -7,14 +7,15 @@ So remove ldconfig call from make install-libs
Upstream-Status: Inappropriate [disable feature]
-diff -uNr zlib-1.2.6.orig/Makefile.in zlib-1.2.6/Makefile.in
---- zlib-1.2.6.orig/Makefile.in 2012-01-28 23:48:50.000000000 +0100
-+++ zlib-1.2.6/Makefile.in 2012-02-13 15:38:20.577700723 +0100
-@@ -199,7 +199,6 @@
+Index: zlib-1.2.11/Makefile.in
+===================================================================
+--- zlib-1.2.11.orig/Makefile.in
++++ zlib-1.2.11/Makefile.in
+@@ -322,7 +322,6 @@ install-libs: $(LIBS)
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
- cp zlib.3 $(DESTDIR)$(man3dir)
- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
+ rm -f $(DESTDIR)$(man3dir)/zlib.3
+ cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
OpenPOWER on IntegriCloud