From 6dbb316ab9052d4dbf158377e1ffe36f205d5477 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Mon, 25 Nov 2019 09:41:34 -0500 Subject: poky: subtree update:a616ffebdc..9052e5b32a Adrian Bunk (1): bind: Whitelist CVE-2019-6470 Alexander Kanavin (13): python: update to 2.7.17 tiff: update to 4.1.0 librepo: upgrade 1.10.6 -> 1.11.0 btrfs-tools: upgrade 5.3 -> 5.3.1 psmisc: update to 23.3 libxslt: update to 1.1.34 Revert "devtool/standard.py: Not filtering devtool workspace for devtool finish" mpg123: upgrade 1.25.12 -> 1.25.13 vala: upgrade 0.46.3 -> 0.46.4 sysstat: upstream version check is working again cairo: the component is dual licensed selftest: check that 'devtool upgrade' correctly drops backported patches runqemu: add options that enable virgl with the SDL frontend Alistair Francis (1): mesa: Upgrade to 19.2.4 Anuj Mittal (7): boost: fix build for x32 rng-tools: upgrade 6.7 -> 6.8 harfbuzz: upgrade 2.6.1 -> 2.6.4 libsolv: upgrade 0.7.6 -> 0.7.8 sqlite3: upgrade 3.30.0 -> 3.30.1 stress-ng: upgrade 0.10.08 -> 0.10.10 glib-2.0: upgrade 2.62.1 -> 2.62.2 Armin Kuster (9): oeqa/manual/bsp-hw: remove rpm -ivh test oeqa/runtime/boot: add reboot test oeqa/manual/bsp-hw: remove reboot test oeqa/manual/bsp-hw: move storage tests to runtime oeqa/manual/bsp-hw: remove usb and SDmicro tests manual/bsd-hw: remove bash tests oeqa/manual/compliance-test: remove crashme tests oeqa/manual/compliance-test: move crashme to runtime /oeqa/manual/compliance-test: remove obsolete test Chee Yang Lee (2): wic: rm with -r flag support selftest/wic: test wic rm with -r flag Denys Dmytriyenko (1): distro_features_check: expand with MACHINE_FEATURES and COMBINED_FEATURES, rename Kai Kang (1): systemd: remove ${PN}-xorg-xinitrc Khem Raj (1): webkitgtk: Remove clang specific option Paul Barker (1): cdrtools-native: Don't set uid/gid during install Paul Eggleton (1): devtool: fix devtool upgrade with reproducible_builds class Richard Purdie (10): oeqa/devtool: Avoid unbound variable errors recipetool/create: Fix to work with reproducible_builds opkg: Add upstream fixes for empty packages opkg-utils: Fix silent empty/broken opkg package creation core-image-full-cmdline: Add less bitbake: fetch2/clearcase: Fix warnings from python 3.8 bitbake: runqueue: Fix hash equivalence duplicate tasks running sanity: Add check for tar older than 1.28 oeqa/selftest/sstatetests: Ensure we don't use hashequiv for sstatesigs tests package_ipk: Remove pointless comment to trigger rebuild Ross Burton (8): cve-update-db-native: don't hardcode the database name cve-update-db-native: add an index on the CVE ID column cve-update-db-native: clean up proxy handling cve-check: rewrite look to fix false negatives cve-check: neaten get_cve_info cve-check: fetch CVE data once at a time instead of in a single call bitbake: tests: add test for the hashing functions bitbake: utils: also use mmap for SHA256 and SHA1, for performance Yi Zhao (1): bitbake: contrib/vim/indent/bitbake.vim: move it to correct directory Change-Id: I526155f21145180c764252a2ae5bfba33def10ff Signed-off-by: Brad Bishop --- .../bitbake/bitbake/contrib/vim/indent/bitbake.vim | 343 ----------------- poky/bitbake/contrib/vim/indent/bitbake.vim | 343 +++++++++++++++++ poky/bitbake/lib/bb/fetch2/clearcase.py | 6 +- poky/bitbake/lib/bb/runqueue.py | 14 +- poky/bitbake/lib/bb/tests/utils.py | 26 ++ poky/bitbake/lib/bb/utils.py | 34 +- .../devtool-upgrade-test1-1.5.3/backported.patch | 37 ++ .../devtool/devtool-upgrade-test1_1.5.3.bb | 4 +- .../devtool-upgrade-test1_1.5.3.bb.upgraded | 4 +- poky/meta/classes/cve-check.bbclass | 95 +++-- poky/meta/classes/distro_features_check.bbclass | 35 +- poky/meta/classes/features_check.bbclass | 85 +++++ poky/meta/classes/package_ipk.bbclass | 1 - poky/meta/classes/sanity.bbclass | 5 +- poky/meta/conf/documentation.conf | 4 +- poky/meta/lib/oeqa/manual/bsp-hw.json | 288 +------------- poky/meta/lib/oeqa/manual/compliance-test.json | 76 ---- poky/meta/lib/oeqa/runtime/cases/boot.py | 33 ++ poky/meta/lib/oeqa/runtime/cases/ltp_stress.py | 98 +++++ poky/meta/lib/oeqa/runtime/cases/storage.py | 149 ++++++++ poky/meta/lib/oeqa/selftest/cases/devtool.py | 28 +- poky/meta/lib/oeqa/selftest/cases/sstatetests.py | 12 + poky/meta/lib/oeqa/selftest/cases/wic.py | 7 + poky/meta/recipes-bsp/usbutils/usbutils_012.bb | 2 +- .../recipes-connectivity/avahi/avahi-ui_0.7.bb | 2 +- .../recipes-connectivity/bind/bind_9.11.5-P4.bb | 4 + poky/meta/recipes-connectivity/bluez5/bluez5.inc | 2 +- .../connman/connman-gnome_0.7.bb | 2 +- poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb | 24 -- poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb | 24 ++ poky/meta/recipes-core/glib-2.0/glib.inc | 2 +- poky/meta/recipes-core/glibc/glibc.inc | 2 +- poky/meta/recipes-core/libxml/libxml2_2.9.9.bb | 2 +- .../meta/recipes-core/meta/cve-update-db-native.bb | 38 +- .../packagegroups/packagegroup-self-hosted.bb | 2 +- .../recipes-core/systemd/systemd-compat-units.bb | 2 +- .../recipes-core/systemd/systemd-serialgetty.bb | 2 +- poky/meta/recipes-core/systemd/systemd_243.bb | 6 +- .../meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 2 +- poky/meta/recipes-core/udev/eudev_3.2.8.bb | 2 +- .../recipes-core/volatile-binds/volatile-binds.bb | 2 +- .../btrfs-tools/btrfs-tools_5.3.1.bb | 52 +++ .../btrfs-tools/btrfs-tools_5.3.bb | 52 --- .../cdrtools/cdrtools-native_3.01.bb | 5 +- .../0001-Don-t-set-uid-gid-during-install.patch | 27 ++ .../recipes-devtools/librepo/librepo_1.10.6.bb | 27 -- .../recipes-devtools/librepo/librepo_1.11.0.bb | 27 ++ poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb | 2 +- .../opkg-utils/opkg-utils/pipefail.patch | 31 ++ .../opkg-utils/opkg-utils_0.4.1.bb | 3 + .../recipes-devtools/opkg/opkg/open_inner.patch | 46 +++ .../recipes-devtools/opkg/opkg/opkg_archive.patch | 54 +++ poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb | 2 + ...ative-fix-one-do_populate_sysroot-warning.patch | 25 +- .../python/python-native_2.7.16.bb | 88 ----- .../python/python-native_2.7.17.bb | 88 +++++ poky/meta/recipes-devtools/python/python.inc | 10 +- ...55-Dont-parse-domains-containing-GH-13079.patch | 90 ----- ...43-Escape-the-server-title-of-DocXMLRPCSe.patch | 101 ----- ...ython-Resolve-intermediate-staging-issues.patch | 59 +++ .../python/python/CVE-2018-20852.patch | 123 ------ .../python/python/CVE-2019-9740.patch | 216 ----------- .../python/bpo-35907-cve-2019-9948-fix.patch | 55 --- .../python/python/bpo-35907-cve-2019-9948.patch | 55 --- .../python/bpo-36216-cve-2019-9636-fix.patch | 28 -- .../python/python/bpo-36216-cve-2019-9636.patch | 111 ------ .../python/python/bpo-36742-cve-2019-10160.patch | 81 ---- .../recipes-devtools/python/python/builddir.patch | 46 --- poky/meta/recipes-devtools/python/python_2.7.16.bb | 270 -------------- poky/meta/recipes-devtools/python/python_2.7.17.bb | 267 +++++++++++++ .../systemd-bootchart/systemd-bootchart_233.bb | 2 +- poky/meta/recipes-devtools/vala/vala_0.46.3.bb | 8 - poky/meta/recipes-devtools/vala/vala_0.46.4.bb | 8 + .../meta/recipes-extended/libsolv/libsolv_0.7.6.bb | 31 -- .../meta/recipes-extended/libsolv/libsolv_0.7.8.bb | 31 ++ .../packagegroup-core-full-cmdline.bb | 1 + poky/meta/recipes-extended/pam/libpam_1.3.1.bb | 2 +- ...-create-src-directory-before-attempting-t.patch | 12 +- poky/meta/recipes-extended/psmisc/psmisc_23.2.bb | 10 - poky/meta/recipes-extended/psmisc/psmisc_23.3.bb | 10 + .../stress-ng/stress-ng_0.10.08.bb | 25 -- .../stress-ng/stress-ng_0.10.10.bb | 25 ++ poky/meta/recipes-extended/sysstat/sysstat.inc | 1 - .../recipes-extended/xdg-utils/xdg-utils_1.1.3.bb | 2 +- .../meta/recipes-gnome/epiphany/epiphany_3.34.1.bb | 2 +- poky/meta/recipes-gnome/gcr/gcr_3.34.0.bb | 2 +- poky/meta/recipes-gnome/gtk+/gtk+3.inc | 2 +- .../recipes-gnome/libdazzle/libdazzle_3.34.1.bb | 2 +- .../recipes-gnome/libnotify/libnotify_0.7.8.bb | 2 +- poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb | 12 +- poky/meta/recipes-graphics/clutter/clutter-1.0.inc | 2 +- .../recipes-graphics/clutter/clutter-gst-3.0.inc | 2 +- .../recipes-graphics/clutter/clutter-gtk-1.0.inc | 2 +- poky/meta/recipes-graphics/cogl/cogl-1.0.inc | 2 +- poky/meta/recipes-graphics/glew/glew_2.1.0.bb | 2 +- .../recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb | 41 -- .../recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb | 41 ++ .../recipes-graphics/images/core-image-weston.bb | 2 +- .../meta/recipes-graphics/images/core-image-x11.bb | 2 +- poky/meta/recipes-graphics/kmscube/kmscube_git.bb | 2 +- .../recipes-graphics/libepoxy/libepoxy_1.5.3.bb | 2 +- .../recipes-graphics/libfakekey/libfakekey_git.bb | 2 +- .../libmatchbox/libmatchbox_1.12.bb | 2 +- .../recipes-graphics/libva/libva-utils_2.5.0.bb | 2 +- poky/meta/recipes-graphics/libva/libva_2.5.0.bb | 2 +- .../matchbox-wm/matchbox-wm_1.2.2.bb | 2 +- ...-check-for-all-linux-host_os-combinations.patch | 21 +- .../0002-meson.build-make-TLS-ELF-optional.patch | 46 +++ ...2-meson.build-make-TLS-GLX-optional-again.patch | 52 --- ...0003-Allow-enable-DRI-without-DRI-drivers.patch | 10 +- ...-Enable-asm-unconditionally-now-that-gen_.patch | 147 ++++++++ poky/meta/recipes-graphics/mesa/libglu_9.0.1.bb | 2 +- .../meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb | 2 +- poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb | 10 - poky/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb | 10 + poky/meta/recipes-graphics/mesa/mesa.inc | 14 +- poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb | 20 - poky/meta/recipes-graphics/mesa/mesa_19.2.4.bb | 21 ++ poky/meta/recipes-graphics/mx/mx.inc | 2 +- .../packagegroups/packagegroup-core-clutter.bb | 2 +- .../packagegroups/packagegroup-core-x11-base.bb | 2 +- .../packagegroups/packagegroup-core-x11-xserver.bb | 2 +- .../packagegroups/packagegroup-core-x11.bb | 2 +- poky/meta/recipes-graphics/piglit/piglit_git.bb | 2 +- .../recipes-graphics/pong-clock/pong-clock_1.0.bb | 2 +- .../startup-notification_0.12.bb | 2 +- .../virglrenderer/virglrenderer_0.8.0.bb | 2 +- .../recipes-graphics/vulkan/vulkan-demos_git.bb | 2 +- .../vulkan/vulkan-loader_1.1.108.bb | 2 +- .../vulkan/vulkan-tools_1.1.108.bb | 2 +- poky/meta/recipes-graphics/waffle/waffle_1.6.0.bb | 2 +- poky/meta/recipes-graphics/wayland/weston-init.bb | 2 +- poky/meta/recipes-graphics/wayland/weston_7.0.0.bb | 2 +- .../x11-common/xserver-nodm-init_3.0.bb | 2 +- .../xinput-calibrator/xinput-calibrator_git.bb | 2 +- .../recipes-graphics/xorg-app/xorg-app-common.inc | 2 +- .../xorg-driver/xorg-driver-common.inc | 2 +- .../xorg-font/xorg-font-common.inc | 2 +- .../xorg-font/xorg-minimal-fonts.bb | 2 +- .../recipes-graphics/xorg-lib/libxcb_1.13.1.bb | 2 +- poky/meta/recipes-graphics/xorg-lib/xcb-util.inc | 2 +- .../recipes-graphics/xorg-lib/xorg-lib-common.inc | 2 +- .../recipes-graphics/xorg-xserver/xserver-xorg.inc | 2 +- poky/meta/recipes-graphics/xrestop/xrestop_0.4.bb | 2 +- .../gstreamer/gst-examples_1.16.0.bb | 2 +- .../gstreamer/gstreamer1.0-python_1.16.1.bb | 2 +- .../gstreamer/gstreamer1.0-vaapi_1.16.1.bb | 2 +- .../libtiff/tiff/CVE-2019-14973.patch | 415 --------------------- .../libtiff/tiff/CVE-2019-17546.patch | 103 ----- .../libtiff/tiff/CVE-2019-6128.patch | 52 --- .../libtiff/tiff/CVE-2019-7663.patch | 77 ---- .../meta/recipes-multimedia/libtiff/tiff_4.0.10.bb | 54 --- poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb | 50 +++ .../recipes-multimedia/mpg123/mpg123_1.25.12.bb | 51 --- .../recipes-multimedia/mpg123/mpg123_1.25.13.bb | 51 +++ poky/meta/recipes-sato/l3afpad/l3afpad_git.bb | 2 +- .../matchbox-config-gtk/matchbox-config-gtk_0.2.bb | 2 +- .../matchbox-desktop/matchbox-desktop_2.2.bb | 2 +- .../matchbox-keyboard/matchbox-keyboard_0.1.1.bb | 2 +- .../matchbox-panel-2/matchbox-panel-2_2.11.bb | 2 +- .../matchbox-sato/matchbox-session-sato_0.1.bb | 2 +- .../matchbox-terminal/matchbox-terminal_0.2.bb | 2 +- .../matchbox-theme-sato/matchbox-theme-sato.inc | 2 +- .../packagegroups/packagegroup-core-x11-sato.bb | 2 +- poky/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb | 2 +- poky/meta/recipes-sato/puzzles/puzzles_git.bb | 2 +- .../sato-screenshot/sato-screenshot_0.3.bb | 2 +- .../settings-daemon/settings-daemon_0.0.2.bb | 2 +- poky/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb | 4 +- .../meta/recipes-support/atk/at-spi2-atk_2.32.0.bb | 2 +- .../0001-dont-setup-compiler-flags-m32-m64.patch | 42 +++ poky/meta/recipes-support/boost/boost_1.71.0.bb | 1 + .../recipes-support/consolekit/consolekit_0.4.6.bb | 2 +- poky/meta/recipes-support/libfm/libfm_1.3.1.bb | 2 +- .../files/0001-Fix-security-framework-bypass.patch | 124 ------ .../libxslt/files/CVE-2019-13117.patch | 33 -- .../libxslt/files/CVE-2019-13118.patch | 76 ---- .../libxslt/files/CVE-2019-18197.patch | 33 -- .../meta/recipes-support/libxslt/libxslt_1.1.33.bb | 53 --- .../meta/recipes-support/libxslt/libxslt_1.1.34.bb | 49 +++ .../nss-myhostname/nss-myhostname_0.3.bb | 2 +- .../recipes-support/rng-tools/rng-tools_6.7.bb | 52 --- .../recipes-support/rng-tools/rng-tools_6.8.bb | 52 +++ poky/meta/recipes-support/sqlite/sqlite3_3.30.0.bb | 8 - poky/meta/recipes-support/sqlite/sqlite3_3.30.1.bb | 8 + poky/meta/recipes-support/vte/vte_0.58.2.bb | 2 +- poky/scripts/lib/devtool/standard.py | 2 +- poky/scripts/lib/devtool/upgrade.py | 5 +- poky/scripts/lib/recipetool/create.py | 4 +- poky/scripts/lib/scriptutils.py | 10 + poky/scripts/lib/wic/engine.py | 62 ++- poky/scripts/lib/wic/help.py | 4 + poky/scripts/runqemu | 13 +- poky/scripts/wic | 3 + 194 files changed, 2409 insertions(+), 3721 deletions(-) delete mode 100644 poky/bitbake/bitbake/contrib/vim/indent/bitbake.vim create mode 100644 poky/bitbake/contrib/vim/indent/bitbake.vim create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch create mode 100644 poky/meta/classes/features_check.bbclass delete mode 100644 poky/meta/lib/oeqa/manual/compliance-test.json create mode 100644 poky/meta/lib/oeqa/runtime/cases/boot.py create mode 100644 poky/meta/lib/oeqa/runtime/cases/ltp_stress.py create mode 100644 poky/meta/lib/oeqa/runtime/cases/storage.py delete mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb create mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb create mode 100644 poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb delete mode 100644 poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.bb create mode 100644 poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch delete mode 100644 poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb create mode 100644 poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb create mode 100644 poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch create mode 100644 poky/meta/recipes-devtools/opkg/opkg/open_inner.patch create mode 100644 poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch delete mode 100644 poky/meta/recipes-devtools/python/python-native_2.7.16.bb create mode 100644 poky/meta/recipes-devtools/python/python-native_2.7.17.bb delete mode 100644 poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch delete mode 100644 poky/meta/recipes-devtools/python/python/0001-2.7-bpo-38243-Escape-the-server-title-of-DocXMLRPCSe.patch create mode 100644 poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch delete mode 100644 poky/meta/recipes-devtools/python/python/CVE-2018-20852.patch delete mode 100644 poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch delete mode 100644 poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch delete mode 100644 poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch delete mode 100644 poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch delete mode 100644 poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch delete mode 100644 poky/meta/recipes-devtools/python/python/bpo-36742-cve-2019-10160.patch delete mode 100644 poky/meta/recipes-devtools/python/python/builddir.patch delete mode 100644 poky/meta/recipes-devtools/python/python_2.7.16.bb create mode 100644 poky/meta/recipes-devtools/python/python_2.7.17.bb delete mode 100644 poky/meta/recipes-devtools/vala/vala_0.46.3.bb create mode 100644 poky/meta/recipes-devtools/vala/vala_0.46.4.bb delete mode 100644 poky/meta/recipes-extended/libsolv/libsolv_0.7.6.bb create mode 100644 poky/meta/recipes-extended/libsolv/libsolv_0.7.8.bb delete mode 100644 poky/meta/recipes-extended/psmisc/psmisc_23.2.bb create mode 100644 poky/meta/recipes-extended/psmisc/psmisc_23.3.bb delete mode 100644 poky/meta/recipes-extended/stress-ng/stress-ng_0.10.08.bb create mode 100644 poky/meta/recipes-extended/stress-ng/stress-ng_0.10.10.bb delete mode 100644 poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb create mode 100644 poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb create mode 100644 poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch delete mode 100644 poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch create mode 100644 poky/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch delete mode 100644 poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb create mode 100644 poky/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb delete mode 100644 poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb create mode 100644 poky/meta/recipes-graphics/mesa/mesa_19.2.4.bb delete mode 100644 poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-14973.patch delete mode 100644 poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-17546.patch delete mode 100644 poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch delete mode 100644 poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch delete mode 100644 poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb create mode 100644 poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb delete mode 100644 poky/meta/recipes-multimedia/mpg123/mpg123_1.25.12.bb create mode 100644 poky/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb create mode 100644 poky/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch delete mode 100644 poky/meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch delete mode 100644 poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch delete mode 100644 poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch delete mode 100644 poky/meta/recipes-support/libxslt/files/CVE-2019-18197.patch delete mode 100644 poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb create mode 100644 poky/meta/recipes-support/libxslt/libxslt_1.1.34.bb delete mode 100644 poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb create mode 100644 poky/meta/recipes-support/rng-tools/rng-tools_6.8.bb delete mode 100644 poky/meta/recipes-support/sqlite/sqlite3_3.30.0.bb create mode 100644 poky/meta/recipes-support/sqlite/sqlite3_3.30.1.bb (limited to 'poky') diff --git a/poky/bitbake/bitbake/contrib/vim/indent/bitbake.vim b/poky/bitbake/bitbake/contrib/vim/indent/bitbake.vim deleted file mode 100644 index 138103409..000000000 --- a/poky/bitbake/bitbake/contrib/vim/indent/bitbake.vim +++ /dev/null @@ -1,343 +0,0 @@ -" Vim indent file -" Language: BitBake -" Copyright: Copyright (C) 2019 Agilent Technologies, Inc. -" Maintainer: Chris Laplante -" License: You may redistribute this under the same terms as Vim itself - - -if exists("b:did_indent") - finish -endif - -if exists("*BitbakeIndent") - finish -endif - -runtime! indent/sh.vim -unlet b:did_indent - -setlocal indentexpr=BitbakeIndent(v:lnum) -setlocal autoindent nolisp - -function s:is_bb_python_func_def(lnum) - let stack = synstack(a:lnum, 1) - if len(stack) == 0 - return 0 - endif - - let top = synIDattr(stack[0], "name") - echo top - - return synIDattr(stack[0], "name") == "bbPyFuncDef" -endfunction - -"""" begin modified from indent/python.vim, upstream commit 7a9bd7c1e0ce1baf5a02daf36eeae3638aa315c7 -"""" This copied code is licensed the same as Vim itself. -setlocal indentkeys+=<:>,=elif,=except - -let s:keepcpo= &cpo -set cpo&vim - -let s:maxoff = 50 " maximum number of lines to look backwards for () - -function GetPythonIndent(lnum) - - " If this line is explicitly joined: If the previous line was also joined, - " line it up with that one, otherwise add two 'shiftwidth' - if getline(a:lnum - 1) =~ '\\$' - if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' - return indent(a:lnum - 1) - endif - return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) - endif - - " If the start of the line is in a string don't change the indent. - if has('syntax_items') - \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" - return -1 - endif - - " Search backwards for the previous non-empty line. - let plnum = prevnonblank(v:lnum - 1) - - if plnum == 0 - " This is the first non-empty line, use zero indent. - return 0 - endif - - call cursor(plnum, 1) - - " Identing inside parentheses can be very slow, regardless of the searchpair() - " timeout, so let the user disable this feature if he doesn't need it - let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0) - - if disable_parentheses_indenting == 1 - let plindent = indent(plnum) - let plnumstart = plnum - else - " searchpair() can be slow sometimes, limit the time to 150 msec or what is - " put in g:pyindent_searchpair_timeout - let searchpair_stopline = 0 - let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) - - " If the previous line is inside parenthesis, use the indent of the starting - " line. - " Trick: use the non-existing "dummy" variable to break out of the loop when - " going too far back. - let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', - \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if parlnum > 0 - " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {' - " If so, ignore it here - it will be handled later. - if s:is_bb_python_func_def(parlnum) - let parlnum = 0 - let plindent = indent(plnum) - let plnumstart = plnum - else - let plindent = indent(parlnum) - let plnumstart = parlnum - endif - else - let plindent = indent(plnum) - let plnumstart = plnum - endif - - " When inside parenthesis: If at the first line below the parenthesis add - " two 'shiftwidth', otherwise same as previous line. - " i = (a - " + b - " + c) - call cursor(a:lnum, 1) - let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if p > 0 - if s:is_bb_python_func_def(p) - " Handle first non-empty line inside a BB Python task - if p == plnum - return shiftwidth() - endif - - " Handle the user actually trying to close a BitBake Python task - let line = getline(a:lnum) - if line =~ '^\s*}' - return -2 - endif - - " Otherwise ignore the brace - let p = 0 - else - if p == plnum - " When the start is inside parenthesis, only indent one 'shiftwidth'. - let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if pp > 0 - return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) - endif - return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) - endif - if plnumstart == p - return indent(plnum) - endif - return plindent - endif - endif - - endif - - - " Get the line and remove a trailing comment. - " Use syntax highlighting attributes when possible. - let pline = getline(plnum) - let pline_len = strlen(pline) - if has('syntax_items') - " If the last character in the line is a comment, do a binary search for - " the start of the comment. synID() is slow, a linear search would take - " too long on a long line. - if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$" - let min = 1 - let max = pline_len - while min < max - let col = (min + max) / 2 - if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$" - let max = col - else - let min = col + 1 - endif - endwhile - let pline = strpart(pline, 0, min - 1) - endif - else - let col = 0 - while col < pline_len - if pline[col] == '#' - let pline = strpart(pline, 0, col) - break - endif - let col = col + 1 - endwhile - endif - - " If the previous line ended with a colon, indent this line - if pline =~ ':\s*$' - return plindent + shiftwidth() - endif - - " If the previous line was a stop-execution statement... - " TODO: utilize this logic to deindent when ending a bbPyDefRegion - if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\|bb\.fatal\)\>' - " See if the user has already dedented - if indent(a:lnum) > indent(plnum) - shiftwidth() - " If not, recommend one dedent - return indent(plnum) - shiftwidth() - endif - " Otherwise, trust the user - return -1 - endif - - " If the current line begins with a keyword that lines up with "try" - if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' - let lnum = a:lnum - 1 - while lnum >= 1 - if getline(lnum) =~ '^\s*\(try\|except\)\>' - let ind = indent(lnum) - if ind >= indent(a:lnum) - return -1 " indent is already less than this - endif - return ind " line up with previous try or except - endif - let lnum = lnum - 1 - endwhile - return -1 " no matching "try"! - endif - - " If the current line begins with a header keyword, dedent - if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' - - " Unless the previous line was a one-liner - if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' - return plindent - endif - - " Or the user has already dedented - if indent(a:lnum) <= plindent - shiftwidth() - return -1 - endif - - return plindent - shiftwidth() - endif - - " When after a () construct we probably want to go back to the start line. - " a = (b - " + c) - " here - if parlnum > 0 - return plindent - endif - - return -1 - -endfunction - -let &cpo = s:keepcpo -unlet s:keepcpo - -""" end of stuff from indent/python.vim - - -let b:did_indent = 1 -setlocal indentkeys+=0\" - - -function BitbakeIndent(lnum) - if !has('syntax_items') - return -1 - endif - - let stack = synstack(a:lnum, 1) - if len(stack) == 0 - return -1 - endif - - let name = synIDattr(stack[0], "name") - - " TODO: support different styles of indentation for assignments. For now, - " we only support like this: - " VAR = " \ - " value1 \ - " value2 \ - " " - " - " i.e. each value indented by shiftwidth(), with the final quote " completely unindented. - if name == "bbVarValue" - " Quote handling is tricky. kernel.bbclass has this line for instance: - " EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}"" - " Instead of trying to handle crazy cases like that, just assume that a - " double-quote on a line by itself (following an assignment) means the - " user is closing the assignment, and de-dent. - if getline(a:lnum) =~ '^\s*"$' - return 0 - endif - - let prevstack = synstack(a:lnum - 1, 1) - if len(prevstack) == 0 - return -1 - endif - - let prevname = synIDattr(prevstack[0], "name") - - " Only indent if there was actually a continuation character on - " the previous line, to avoid misleading indentation. - let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name") - let prev_continued = prevlinelastchar == "bbContinue" - - " Did the previous line introduce an assignment? - if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1 - if prev_continued - return shiftwidth() - endif - endif - - if !prev_continued - return 0 - endif - - " Autoindent can take it from here - return -1 - endif - - if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 - let ret = GetPythonIndent(a:lnum) - " Should normally always be indented by at least one shiftwidth; but allow - " return of -1 (defer to autoindent) or -2 (force indent to 0) - if ret == 0 - return shiftwidth() - elseif ret == -2 - return 0 - endif - return ret - endif - - " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot' - " Need to submit a patch upstream to Vim to provide an extension point. - " Unlike the Python indenter, the Sh indenter is way too large to copy and - " modify here. - if name == "bbShFuncRegion" - return GetShIndent() - endif - - " TODO: - " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user - " types an obvious BB keyword like addhandler or addtask, or starts - " writing a shell task. Maybe too hard to implement... - - return -1 -endfunction diff --git a/poky/bitbake/contrib/vim/indent/bitbake.vim b/poky/bitbake/contrib/vim/indent/bitbake.vim new file mode 100644 index 000000000..138103409 --- /dev/null +++ b/poky/bitbake/contrib/vim/indent/bitbake.vim @@ -0,0 +1,343 @@ +" Vim indent file +" Language: BitBake +" Copyright: Copyright (C) 2019 Agilent Technologies, Inc. +" Maintainer: Chris Laplante +" License: You may redistribute this under the same terms as Vim itself + + +if exists("b:did_indent") + finish +endif + +if exists("*BitbakeIndent") + finish +endif + +runtime! indent/sh.vim +unlet b:did_indent + +setlocal indentexpr=BitbakeIndent(v:lnum) +setlocal autoindent nolisp + +function s:is_bb_python_func_def(lnum) + let stack = synstack(a:lnum, 1) + if len(stack) == 0 + return 0 + endif + + let top = synIDattr(stack[0], "name") + echo top + + return synIDattr(stack[0], "name") == "bbPyFuncDef" +endfunction + +"""" begin modified from indent/python.vim, upstream commit 7a9bd7c1e0ce1baf5a02daf36eeae3638aa315c7 +"""" This copied code is licensed the same as Vim itself. +setlocal indentkeys+=<:>,=elif,=except + +let s:keepcpo= &cpo +set cpo&vim + +let s:maxoff = 50 " maximum number of lines to look backwards for () + +function GetPythonIndent(lnum) + + " If this line is explicitly joined: If the previous line was also joined, + " line it up with that one, otherwise add two 'shiftwidth' + if getline(a:lnum - 1) =~ '\\$' + if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' + return indent(a:lnum - 1) + endif + return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) + endif + + " If the start of the line is in a string don't change the indent. + if has('syntax_items') + \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" + return -1 + endif + + " Search backwards for the previous non-empty line. + let plnum = prevnonblank(v:lnum - 1) + + if plnum == 0 + " This is the first non-empty line, use zero indent. + return 0 + endif + + call cursor(plnum, 1) + + " Identing inside parentheses can be very slow, regardless of the searchpair() + " timeout, so let the user disable this feature if he doesn't need it + let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0) + + if disable_parentheses_indenting == 1 + let plindent = indent(plnum) + let plnumstart = plnum + else + " searchpair() can be slow sometimes, limit the time to 150 msec or what is + " put in g:pyindent_searchpair_timeout + let searchpair_stopline = 0 + let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) + + " If the previous line is inside parenthesis, use the indent of the starting + " line. + " Trick: use the non-existing "dummy" variable to break out of the loop when + " going too far back. + let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', + \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if parlnum > 0 + " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {' + " If so, ignore it here - it will be handled later. + if s:is_bb_python_func_def(parlnum) + let parlnum = 0 + let plindent = indent(plnum) + let plnumstart = plnum + else + let plindent = indent(parlnum) + let plnumstart = parlnum + endif + else + let plindent = indent(plnum) + let plnumstart = plnum + endif + + " When inside parenthesis: If at the first line below the parenthesis add + " two 'shiftwidth', otherwise same as previous line. + " i = (a + " + b + " + c) + call cursor(a:lnum, 1) + let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if p > 0 + if s:is_bb_python_func_def(p) + " Handle first non-empty line inside a BB Python task + if p == plnum + return shiftwidth() + endif + + " Handle the user actually trying to close a BitBake Python task + let line = getline(a:lnum) + if line =~ '^\s*}' + return -2 + endif + + " Otherwise ignore the brace + let p = 0 + else + if p == plnum + " When the start is inside parenthesis, only indent one 'shiftwidth'. + let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if pp > 0 + return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) + endif + return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) + endif + if plnumstart == p + return indent(plnum) + endif + return plindent + endif + endif + + endif + + + " Get the line and remove a trailing comment. + " Use syntax highlighting attributes when possible. + let pline = getline(plnum) + let pline_len = strlen(pline) + if has('syntax_items') + " If the last character in the line is a comment, do a binary search for + " the start of the comment. synID() is slow, a linear search would take + " too long on a long line. + if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let min = 1 + let max = pline_len + while min < max + let col = (min + max) / 2 + if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let max = col + else + let min = col + 1 + endif + endwhile + let pline = strpart(pline, 0, min - 1) + endif + else + let col = 0 + while col < pline_len + if pline[col] == '#' + let pline = strpart(pline, 0, col) + break + endif + let col = col + 1 + endwhile + endif + + " If the previous line ended with a colon, indent this line + if pline =~ ':\s*$' + return plindent + shiftwidth() + endif + + " If the previous line was a stop-execution statement... + " TODO: utilize this logic to deindent when ending a bbPyDefRegion + if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\|bb\.fatal\)\>' + " See if the user has already dedented + if indent(a:lnum) > indent(plnum) - shiftwidth() + " If not, recommend one dedent + return indent(plnum) - shiftwidth() + endif + " Otherwise, trust the user + return -1 + endif + + " If the current line begins with a keyword that lines up with "try" + if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' + let lnum = a:lnum - 1 + while lnum >= 1 + if getline(lnum) =~ '^\s*\(try\|except\)\>' + let ind = indent(lnum) + if ind >= indent(a:lnum) + return -1 " indent is already less than this + endif + return ind " line up with previous try or except + endif + let lnum = lnum - 1 + endwhile + return -1 " no matching "try"! + endif + + " If the current line begins with a header keyword, dedent + if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' + + " Unless the previous line was a one-liner + if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' + return plindent + endif + + " Or the user has already dedented + if indent(a:lnum) <= plindent - shiftwidth() + return -1 + endif + + return plindent - shiftwidth() + endif + + " When after a () construct we probably want to go back to the start line. + " a = (b + " + c) + " here + if parlnum > 0 + return plindent + endif + + return -1 + +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +""" end of stuff from indent/python.vim + + +let b:did_indent = 1 +setlocal indentkeys+=0\" + + +function BitbakeIndent(lnum) + if !has('syntax_items') + return -1 + endif + + let stack = synstack(a:lnum, 1) + if len(stack) == 0 + return -1 + endif + + let name = synIDattr(stack[0], "name") + + " TODO: support different styles of indentation for assignments. For now, + " we only support like this: + " VAR = " \ + " value1 \ + " value2 \ + " " + " + " i.e. each value indented by shiftwidth(), with the final quote " completely unindented. + if name == "bbVarValue" + " Quote handling is tricky. kernel.bbclass has this line for instance: + " EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}"" + " Instead of trying to handle crazy cases like that, just assume that a + " double-quote on a line by itself (following an assignment) means the + " user is closing the assignment, and de-dent. + if getline(a:lnum) =~ '^\s*"$' + return 0 + endif + + let prevstack = synstack(a:lnum - 1, 1) + if len(prevstack) == 0 + return -1 + endif + + let prevname = synIDattr(prevstack[0], "name") + + " Only indent if there was actually a continuation character on + " the previous line, to avoid misleading indentation. + let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name") + let prev_continued = prevlinelastchar == "bbContinue" + + " Did the previous line introduce an assignment? + if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1 + if prev_continued + return shiftwidth() + endif + endif + + if !prev_continued + return 0 + endif + + " Autoindent can take it from here + return -1 + endif + + if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 + let ret = GetPythonIndent(a:lnum) + " Should normally always be indented by at least one shiftwidth; but allow + " return of -1 (defer to autoindent) or -2 (force indent to 0) + if ret == 0 + return shiftwidth() + elseif ret == -2 + return 0 + endif + return ret + endif + + " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot' + " Need to submit a patch upstream to Vim to provide an extension point. + " Unlike the Python indenter, the Sh indenter is way too large to copy and + " modify here. + if name == "bbShFuncRegion" + return GetShIndent() + endif + + " TODO: + " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user + " types an obvious BB keyword like addhandler or addtask, or starts + " writing a shell task. Maybe too hard to implement... + + return -1 +endfunction diff --git a/poky/bitbake/lib/bb/fetch2/clearcase.py b/poky/bitbake/lib/bb/fetch2/clearcase.py index 3dd93ad6b..e2934ef9f 100644 --- a/poky/bitbake/lib/bb/fetch2/clearcase.py +++ b/poky/bitbake/lib/bb/fetch2/clearcase.py @@ -145,18 +145,18 @@ class ClearCase(FetchMethod): basecmd = "%s %s" % (ud.basecmd, command) - if command is 'mkview': + if command == 'mkview': if not "rcleartool" in ud.basecmd: # Cleartool needs a -snapshot view options.append("-snapshot") options.append("-tag %s" % ud.viewname) options.append(ud.viewdir) - elif command is 'rmview': + elif command == 'rmview': options.append("-force") options.append("%s" % ud.viewdir) - elif command is 'setcs': + elif command == 'setcs': options.append("-overwrite") options.append(ud.configspecfile) diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py index 8622738fd..26492e708 100644 --- a/poky/bitbake/lib/bb/runqueue.py +++ b/poky/bitbake/lib/bb/runqueue.py @@ -2303,16 +2303,22 @@ class RunQueueExecute: for tid in changed: if tid not in self.rqdata.runq_setscene_tids: continue + if tid not in self.pending_migrations: + self.pending_migrations.add(tid) + + for tid in self.pending_migrations.copy(): if tid in self.runq_running: + # Too late, task already running, not much we can do now + self.pending_migrations.remove(tid) continue - if tid in self.scenequeue_covered: + + if tid in self.scenequeue_covered or tid in self.sq_live: + # Already ran this setscene task or it running # Potentially risky, should we report this hash as a match? logger.info("Already covered setscene for %s so ignoring rehash" % (tid)) + self.pending_migrations.remove(tid) continue - if tid not in self.pending_migrations: - self.pending_migrations.add(tid) - for tid in self.pending_migrations.copy(): valid = True # Check no tasks this covers are running for dep in self.sqdata.sq_covered_tasks[tid]: diff --git a/poky/bitbake/lib/bb/tests/utils.py b/poky/bitbake/lib/bb/tests/utils.py index f4adf1d44..5c910b4b8 100644 --- a/poky/bitbake/lib/bb/tests/utils.py +++ b/poky/bitbake/lib/bb/tests/utils.py @@ -103,6 +103,32 @@ class Path(unittest.TestCase): result = bb.utils._check_unsafe_delete_path(arg1) self.assertEqual(result, correctresult, '_check_unsafe_delete_path("%s") != %s' % (arg1, correctresult)) +class Checksum(unittest.TestCase): + filler = b"Shiver me timbers square-rigged spike Gold Road galleon bilge water boatswain wherry jack pirate. Mizzenmast rum lad Privateer jack salmagundi hang the jib piracy Pieces of Eight Corsair. Parrel marooned black spot yawl provost quarterdeck cable no prey, no pay spirits lateen sail." + + def test_md5(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.md5_file(f.name) + self.assertEqual(checksum, "bd572cd5de30a785f4efcb6eaf5089e3") + + def test_sha1(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.sha1_file(f.name) + self.assertEqual(checksum, "249eb8fd654732ea836d5e702d7aa567898eca71") + + def test_sha256(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.sha256_file(f.name) + self.assertEqual(checksum, "fcfbae8bf6b721dbb9d2dc6a9334a58f2031a9a9b302999243f99da4d7f12d0f") class EditMetadataFile(unittest.TestCase): _origfile = """ diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py index d035949b3..8d40bcdf8 100644 --- a/poky/bitbake/lib/bb/utils.py +++ b/poky/bitbake/lib/bb/utils.py @@ -520,22 +520,26 @@ def unlockfile(lf): fcntl.flock(lf.fileno(), fcntl.LOCK_UN) lf.close() -def md5_file(filename): - """ - Return the hex string representation of the MD5 checksum of filename. - """ - import hashlib, mmap +def _hasher(method, filename): + import mmap with open(filename, "rb") as f: - m = hashlib.md5() try: with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm: for chunk in iter(lambda: mm.read(8192), b''): - m.update(chunk) + method.update(chunk) except ValueError: # You can't mmap() an empty file so silence this exception pass - return m.hexdigest() + return method.hexdigest() + + +def md5_file(filename): + """ + Return the hex string representation of the MD5 checksum of filename. + """ + import hashlib + return _hasher(hashlib.md5(), filename) def sha256_file(filename): """ @@ -543,24 +547,14 @@ def sha256_file(filename): filename. """ import hashlib - - s = hashlib.sha256() - with open(filename, "rb") as f: - for line in f: - s.update(line) - return s.hexdigest() + return _hasher(hashlib.sha256(), filename) def sha1_file(filename): """ Return the hex string representation of the SHA1 checksum of the filename """ import hashlib - - s = hashlib.sha1() - with open(filename, "rb") as f: - for line in f: - s.update(line) - return s.hexdigest() + return _hasher(hashlib.sha1(), filename) def preserved_envvars_exported(): """Variables which are taken from the environment and placed in and exported diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch new file mode 100644 index 000000000..c4f3f1266 --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch @@ -0,0 +1,37 @@ +commit ced2ec32b657a7f52604b2e16e5d5881041c517a +Author: OpenEmbedded +Date: Mon Nov 18 18:43:15 2019 +0100 + + Backport of the NEWS file from version 1.6.0 + +diff --git a/doc/NEWS b/doc/NEWS +index 69793fc..fd49b1c 100644 +--- a/doc/NEWS ++++ b/doc/NEWS +@@ -1,3 +1,26 @@ ++1.6.0 - 15 March 2015 ++ - fix lstat64 support when unavailable - separate patches supplied by ++ Ganael Laplanche and Peter Korsgaard ++ - (#1506) new option "-D" / "--delay-start" to only show bar after N ++ seconds (Damon Harper) ++ - new option "--fineta" / "-I" to show ETA as time of day rather than time ++ remaining - patch supplied by Erkki Seppälä (r147) ++ - (#1509) change ETA (--eta / -e) so that days are given if the hours ++ remaining are 24 or more (Jacek Wielemborek) ++ - (#1499) repeat read and write attempts on partial buffer fill/empty to ++ work around post-signal transfer rate drop reported by Ralf Ramsauer ++ - (#1507) do not try to calculate total size in line mode, due to bug ++ reported by Jacek Wielemborek and Michiel Van Herwegen ++ - cleanup: removed defunct RATS comments and unnecessary copyright notices ++ - clean up displayed lines when using --watchfd PID, when PID exits ++ - output errors on a new line to avoid overwriting transfer bar ++ ++1.5.7 - 26 August 2014 ++ - show KiB instead of incorrect kiB (Debian bug #706175) ++ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn) ++ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales ++ - fix "make rpm" and "make srpm", extend "make release" to sign releases ++ + 1.5.3 - 4 May 2014 + - remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda) + diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb index 333ecac7e..fee5bee73 100644 --- a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb @@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded index 9d94f671d..66e45c7e8 100644 --- a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded @@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass index 3326944d7..19ed5548b 100644 --- a/poky/meta/classes/cve-check.bbclass +++ b/poky/meta/classes/cve-check.bbclass @@ -165,7 +165,6 @@ def check_cves(d, patched_cves): """ Connect to the NVD database and find unpatched cves. """ - import ast, csv, tempfile, subprocess, io from distutils.version import LooseVersion cves_unpatched = [] @@ -187,68 +186,74 @@ def check_cves(d, patched_cves): cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split() import sqlite3 - db_file = d.getVar("CVE_CHECK_DB_FILE") - conn = sqlite3.connect(db_file) + db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro") + conn = sqlite3.connect(db_file, uri=True) + # For each of the known product names (e.g. curl has CPEs using curl and libcurl)... for product in products: - c = conn.cursor() if ":" in product: vendor, product = product.split(":", 1) - c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR IS ?", (product, vendor)) else: - c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ?", (product,)) + vendor = "%" - for row in c: - cve = row[0] - version_start = row[3] - operator_start = row[4] - version_end = row[5] - operator_end = row[6] + # Find all relevant CVE IDs. + for cverow in conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)): + cve = cverow[0] if cve in cve_whitelist: bb.note("%s-%s has been whitelisted for %s" % (product, pv, cve)) # TODO: this should be in the report as 'whitelisted' patched_cves.add(cve) + continue elif cve in patched_cves: bb.note("%s has been patched" % (cve)) - else: - to_append = False + continue + + vulnerable = False + for row in conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)): + (_, _, _, version_start, operator_start, version_end, operator_end) = row + #bb.debug(2, "Evaluating row " + str(row)) + if (operator_start == '=' and pv == version_start): - to_append = True + vulnerable = True else: if operator_start: try: - to_append_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) - to_append_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) + vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) + vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) except: bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_start, version_start, cve)) - to_append_start = False + vulnerable_start = False else: - to_append_start = False + vulnerable_start = False if operator_end: try: - to_append_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) - to_append_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) + vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) + vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) except: bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_end, version_end, cve)) - to_append_end = False + vulnerable_end = False else: - to_append_end = False + vulnerable_end = False if operator_start and operator_end: - to_append = to_append_start and to_append_end + vulnerable = vulnerable_start and vulnerable_end else: - to_append = to_append_start or to_append_end + vulnerable = vulnerable_start or vulnerable_end - if to_append: + if vulnerable: bb.note("%s-%s is vulnerable to %s" % (product, pv, cve)) cves_unpatched.append(cve) - else: - bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve)) - patched_cves.add(cve) + break + + if not vulnerable: + bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve)) + # TODO: not patched but not vulnerable + patched_cves.add(cve) + conn.close() return (list(patched_cves), cves_unpatched) @@ -256,31 +261,23 @@ def check_cves(d, patched_cves): def get_cve_info(d, cves): """ Get CVE information from the database. - - Unfortunately the only way to get CVE info is set the output to - html (hard to parse) or query directly the database. """ - try: - import sqlite3 - except ImportError: - from pysqlite2 import dbapi2 as sqlite3 + import sqlite3 cve_data = {} - db_file = d.getVar("CVE_CHECK_DB_FILE") - placeholder = ",".join("?" * len(cves)) - query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder - conn = sqlite3.connect(db_file) - cur = conn.cursor() - for row in cur.execute(query, tuple(cves)): - cve_data[row[0]] = {} - cve_data[row[0]]["summary"] = row[1] - cve_data[row[0]]["scorev2"] = row[2] - cve_data[row[0]]["scorev3"] = row[3] - cve_data[row[0]]["modified"] = row[4] - cve_data[row[0]]["vector"] = row[5] - conn.close() + conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE")) + for cve in cves: + for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)): + cve_data[row[0]] = {} + cve_data[row[0]]["summary"] = row[1] + cve_data[row[0]]["scorev2"] = row[2] + cve_data[row[0]]["scorev3"] = row[3] + cve_data[row[0]]["modified"] = row[4] + cve_data[row[0]]["vector"] = row[5] + + conn.close() return cve_data def cve_write_data(d, patched, unpatched, cve_data): diff --git a/poky/meta/classes/distro_features_check.bbclass b/poky/meta/classes/distro_features_check.bbclass index eeaa3b44c..8124a8ca2 100644 --- a/poky/meta/classes/distro_features_check.bbclass +++ b/poky/meta/classes/distro_features_check.bbclass @@ -1,32 +1,7 @@ -# Allow checking of required and conflicting DISTRO_FEATURES -# -# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included -# in DISTRO_FEATURES. -# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included -# in DISTRO_FEATURES. -# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in -# DISTRO_FEATURES. -# -# Copyright 2013 (C) O.S. Systems Software LTDA. +# Temporarily provide fallback to the old name of the class -python () { - # Assume at least one var is set. - distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) - - any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) - if any_of_distro_features: - if set.isdisjoint(any_of_distro_features, distro_features): - raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) - - required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) - if required_distro_features: - missing = set.difference(required_distro_features, distro_features) - if missing: - raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) - - conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) - if conflict_distro_features: - conflicts = set.intersection(conflict_distro_features, distro_features) - if conflicts: - raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) +python __anonymous() { + bb.warn("distro_features_check.bbclass is deprecated, please use features_check.bbclass instead") } + +inherit features_check diff --git a/poky/meta/classes/features_check.bbclass b/poky/meta/classes/features_check.bbclass new file mode 100644 index 000000000..391fbe1c9 --- /dev/null +++ b/poky/meta/classes/features_check.bbclass @@ -0,0 +1,85 @@ +# Allow checking of required and conflicting DISTRO_FEATURES +# +# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included +# in DISTRO_FEATURES. +# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included +# in DISTRO_FEATURES. +# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in +# DISTRO_FEATURES. +# ANY_OF_MACHINE_FEATURES: ensure at least one item on this list is included +# in MACHINE_FEATURES. +# REQUIRED_MACHINE_FEATURES: ensure every item on this list is included +# in MACHINE_FEATURES. +# CONFLICT_MACHINE_FEATURES: ensure no item in this list is included in +# MACHINE_FEATURES. +# ANY_OF_COMBINED_FEATURES: ensure at least one item on this list is included +# in COMBINED_FEATURES. +# REQUIRED_COMBINED_FEATURES: ensure every item on this list is included +# in COMBINED_FEATURES. +# CONFLICT_COMBINED_FEATURES: ensure no item in this list is included in +# COMBINED_FEATURES. +# +# Copyright 2019 (C) Texas Instruments Inc. +# Copyright 2013 (C) O.S. Systems Software LTDA. + +python () { + # Assume at least one var is set. + distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) + + any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) + if any_of_distro_features: + if set.isdisjoint(any_of_distro_features, distro_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) + + required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) + if required_distro_features: + missing = set.difference(required_distro_features, distro_features) + if missing: + raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) + if conflict_distro_features: + conflicts = set.intersection(conflict_distro_features, distro_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + machine_features = set((d.getVar('MACHINE_FEATURES') or '').split()) + + any_of_machine_features = set((d.getVar('ANY_OF_MACHINE_FEATURES') or '').split()) + if any_of_machine_features: + if set.isdisjoint(any_of_machine_features, machine_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in MACHINE_FEATURES" % ' '.join(any_of_machine_features)) + + required_machine_features = set((d.getVar('REQUIRED_MACHINE_FEATURES') or '').split()) + if required_machine_features: + missing = set.difference(required_machine_features, machine_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in MACHINE_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_machine_features = set((d.getVar('CONFLICT_MACHINE_FEATURES') or '').split()) + if conflict_machine_features: + conflicts = set.intersection(conflict_machine_features, machine_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in MACHINE_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + combined_features = set((d.getVar('COMBINED_FEATURES') or '').split()) + + any_of_combined_features = set((d.getVar('ANY_OF_COMBINED_FEATURES') or '').split()) + if any_of_combined_features: + if set.isdisjoint(any_of_combined_features, combined_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in COMBINED_FEATURES" % ' '.join(any_of_combined_features)) + + required_combined_features = set((d.getVar('REQUIRED_COMBINED_FEATURES') or '').split()) + if required_combined_features: + missing = set.difference(required_combined_features, combined_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in COMBINED_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_combined_features = set((d.getVar('CONFLICT_COMBINED_FEATURES') or '').split()) + if conflict_combined_features: + conflicts = set.intersection(conflict_combined_features, combined_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in COMBINED_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) +} diff --git a/poky/meta/classes/package_ipk.bbclass b/poky/meta/classes/package_ipk.bbclass index 9f9da2f91..4f2397703 100644 --- a/poky/meta/classes/package_ipk.bbclass +++ b/poky/meta/classes/package_ipk.bbclass @@ -154,7 +154,6 @@ def ipk_write_pkg(pkg, d): ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) else: ctrlfile.write(c % tuple(pullData(fs, localdata))) - # more fields custom_fields_chunk = get_package_additional_metadata("ipk", localdata) if custom_fields_chunk is not None: diff --git a/poky/meta/classes/sanity.bbclass b/poky/meta/classes/sanity.bbclass index a14bf5388..63ab6cf3d 100644 --- a/poky/meta/classes/sanity.bbclass +++ b/poky/meta/classes/sanity.bbclass @@ -523,6 +523,7 @@ def check_wsl(d): # Tar version 1.24 and onwards handle overwriting symlinks correctly # but earlier versions do not; this needs to work properly for sstate +# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled def check_tar_version(sanity_data): from distutils.version import LooseVersion import subprocess @@ -532,7 +533,9 @@ def check_tar_version(sanity_data): return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output) version = result.split()[3] if LooseVersion(version) < LooseVersion("1.24"): - return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" + return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n" + if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release).\n" return None # We use git parameters and functionality only found in 1.7.8 or later diff --git a/poky/meta/conf/documentation.conf b/poky/meta/conf/documentation.conf index 550df20b0..fca36f3cf 100644 --- a/poky/meta/conf/documentation.conf +++ b/poky/meta/conf/documentation.conf @@ -113,7 +113,7 @@ COMPATIBLE_MACHINE[doc] = "A regular expression that resolves to one or more tar COMPLEMENTARY_GLOB[doc] = "Defines wildcards to match when installing a list of complementary packages for all the packages installed in an image." CONFFILES[doc] = "Identifies editable or configurable files that are part of a package." CONFIG_SITE[doc] = "A list of files that contains autoconf test results relevant to the current build. This variable is used by the Autotools utilities when running configure." -CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that would be in conflict should the recipe be built." +CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that would be in conflict should the recipe be built." CORE_IMAGE_EXTRA_INSTALL[doc] = "Specifies the list of packages to be added to the image. You should only set this variable in the conf/local.conf file in the Build Directory." COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded Core Metadata layer (i.e. meta)." CONF_VERSION[doc] = "Tracks the version of local.conf. Increased each time build/conf/ changes incompatibly." @@ -346,7 +346,7 @@ QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for u RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed." RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)." -REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe." +REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe." RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed." ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem." ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem." diff --git a/poky/meta/lib/oeqa/manual/bsp-hw.json b/poky/meta/lib/oeqa/manual/bsp-hw.json index 18cec222f..5c5b9b50b 100644 --- a/poky/meta/lib/oeqa/manual/bsp-hw.json +++ b/poky/meta/lib/oeqa/manual/bsp-hw.json @@ -1,30 +1,4 @@ [ - { - "test": { - "@alias": "bsps-hw.bsps-hw.rpm_-__install_dependency_package", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Get a not previously installed RPM package or build one on local machine, which should have run-time dependency.For example, \"mc\" (Midnight Commander, which is a visual file manager) should depend on \"ncurses-terminfo\". \n\n$ bitbake mc \n\n\n", - "expected_results": "" - }, - "2": { - "action": "Copy the package into a system folder (for example /home/root/rpm_packages). \n\n\n", - "expected_results": "" - }, - "3": { - "action": "Run \"rpm -ivh package_name\" and check the output, for example \"rpm -ivh mc.rpm*\" should report the dependency on \"ncurses-terminfo\".\n\n\n\n", - "expected_results": "3 . rpm command should report message when some RPM installation depends on other packages." - } - }, - "summary": "rpm_-__install_dependency_package" - } - }, { "test": { "@alias": "bsps-hw.bsps-hw.boot_and_install_from_USB", @@ -171,28 +145,6 @@ "summary": "shutdown_system" } }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.reboot_system", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "" - }, - "2": { - "action": "launch terminal and run \"reboot\"", - "expected_results": "System can reboot successfully . " - } - }, - "summary": "reboot_system" - } - }, { "test": { "@alias": "bsps-hw.bsps-hw.switch_among_multi_applications_and_desktop", @@ -223,114 +175,6 @@ "summary": "switch_among_multi_applications_and_desktop" } }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_mount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Boot system \n\n", - "expected_results": "" - }, - "2": { - "action": "Plug USB stick, it should be mount in /run/media/sd(x) If X-window system does not start and show USB device, then use the terminal to mount it, following the next steps: \na. Locate the usb stick (usually it is on /dev/sdb) \nb. Create a directory with \"mkdir stick\" (so you will have such a path as: /home/root/stick). \nc. Run the command \"mount /dev/sdb /home/root/stick\" to mount USB device on it. \n\n", - "expected_results": "USB device should be mounted in /run/media/sd(x) \nor in /home/root/stick \n\n" - }, - "3": { - "action": "Then you can access USB stick (/home/root/stick) via Terminal or GUI and try various commands and actions like \"cp\", \"mv\", \"touch\" and \"rm\". Type \"dmesg\" command and check for recent mounted devices.", - "expected_results": "Basic commands work properly. The system sends a notification in \"dmesg\" command, showing that the USB stick is accessible and the device is mounted ." - } - }, - "summary": "USB_-_mount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_read_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "view/copy successfully" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "view files in usb by file browser", - "expected_results": "" - }, - "4": { - "action": "copy some files from usb to local hardware", - "expected_results": "" - } - }, - "summary": "USB_-_read_files" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_umount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "usb directory in file browser automatically missed" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "view files in usb by file browser \n4.unplug usb", - "expected_results": "" - } - }, - "summary": "USB_-_umount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_write_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "create/copy successfully" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "create files in usb \n4.copy some files from local hardware to usb", - "expected_results": "" - } - }, - "summary": "USB_-_write_files" - } - }, { "test": { "@alias": "bsps-hw.bsps-hw.ethernet_static_ip_set_in_connman", @@ -611,136 +455,6 @@ "summary": "Add_multiple_files_in_media_player" } }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.check_bash_in_image", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "After system is up, check if bash command exists with command \"which bash\"", - "expected_results": "bash command should exist in image giving something as below \"/bin/bash\"" - } - }, - "summary": "check_bash_in_image" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__mount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "system notify that MicroSDis accessible" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - } - }, - "summary": "MicroSD_-__mount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__read_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "view/copy successfully" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "view files inMicroSD by file browser", - "expected_results": "" - }, - "4": { - "action": "copy some files fromMicroSD to local hardware", - "expected_results": "" - } - }, - "summary": "MicroSD_-__read_files" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__umount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "MicroSD in file browser automatically missed . " - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "view files in MicroSDby file browser", - "expected_results": "" - }, - "4": { - "action": "unplug MicroSD", - "expected_results": "" - } - }, - "summary": "MicroSD_-__umount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__write_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "create/copy successfully" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "create files in MicroSD", - "expected_results": "" - }, - "4": { - "action": "copy some files from local hardware to MicroSD", - "expected_results": "" - } - }, - "summary": "MicroSD_-__write_files" - } - }, { "test": { "@alias": "bsps-hw.bsps-hw.video_-_libva_check_(ogg_video_play)", @@ -1283,4 +997,4 @@ "summary": "Boot_from_JFFS2_image" } } -] \ No newline at end of file +] diff --git a/poky/meta/lib/oeqa/manual/compliance-test.json b/poky/meta/lib/oeqa/manual/compliance-test.json deleted file mode 100644 index 367a416f0..000000000 --- a/poky/meta/lib/oeqa/manual/compliance-test.json +++ /dev/null @@ -1,76 +0,0 @@ -[ - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_Genericx86-64", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Bootup with core-image-sato-sdk image", - "expected_results": "" - }, - "2": { - "action": "Execute the crashme test with below command \n\n./opt/ltp/runltp f crashme", - "expected_results": "The stress testing should not make the target crash. Check CPU usage and basic functionality of the system after the tests are over. " - } - }, - "summary": "stress_test_-_Genericx86-64" - } - }, - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_- crashme_-_-Beaglebone", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": " Get crashme from http://people.delphiforums.com/gjc/crashme.html", - "expected_results": "" - }, - "2": { - "action": "Follow the setup steps on above URL, build crashme in target", - "expected_results": "" - }, - "3": { - "action": " Run crashme for 24 hours", - "expected_results": "Target should not crash with the program." - } - }, - "summary": "stress_test_-_crashme_-Beaglebone" - } - }, - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_ltp_-Beaglebone", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Build LTP with toolchain or in sdk image", - "expected_results": "" - }, - "2": { - "action": "Copy LTP folder into target, for example, /opt/ltp. Modify script, testscripts/ltpstress.sh, set Iostat=1, NO_NETWORK=1", - "expected_results": "" - }, - "3": { - "action": "cd testscripts/ && ./ltpstress.sh", - "expected_results": "This stress case will run for 24 hours Check the result\ntarget should not crash with the program " - } - }, - "summary": "stress_test_-_-ltp_-Beaglebone" - } - } -] diff --git a/poky/meta/lib/oeqa/runtime/cases/boot.py b/poky/meta/lib/oeqa/runtime/cases/boot.py new file mode 100644 index 000000000..2142f400a --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/boot.py @@ -0,0 +1,33 @@ +# +# SPDX-License-Identifier: MIT +# + +from subprocess import Popen, PIPE +import time + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.oetimeout import OETimeout +from oeqa.core.decorator.data import skipIfQemu + +class BootTest(OERuntimeTestCase): + + @OETimeout(120) + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_reboot(self): + output = '' + count = 0 + (status, output) = self.target.run('reboot -h') + while count < 5: + time.sleep(5) + cmd = 'ping -c 1 %s' % self.target.ip + proc = Popen(cmd, shell=True, stdout=PIPE) + output += proc.communicate()[0].decode('utf-8') + if proc.poll() == 0: + count += 1 + else: + count = 0 + msg = ('Expected 5 consecutive, got %d.\n' + 'ping output is:\n%s' % (count,output)) + self.assertEqual(count, 5, msg = msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py b/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py new file mode 100644 index 000000000..2445ffbc9 --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py @@ -0,0 +1,98 @@ +# LTP Stress runtime +# +# Copyright (c) 2019 MontaVista Software, LLC +# +# SPDX-License-Identifier: MIT +# + +import time +import datetime +import pprint + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage +from oeqa.core.decorator.data import skipIfQemu +from oeqa.utils.logparser import LtpParser + +class LtpStressBase(OERuntimeTestCase): + + @classmethod + def setUpClass(cls): + cls.ltp_startup() + + @classmethod + def tearDownClass(cls): + cls.ltp_finishup() + + @classmethod + def ltp_startup(cls): + cls.sections = {} + cls.failmsg = "" + test_log_dir = os.path.join(cls.td.get('WORKDIR', ''), 'testimage') + timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S') + + cls.ltptest_log_dir_link = os.path.join(test_log_dir, 'ltpstress_log') + cls.ltptest_log_dir = '%s.%s' % (cls.ltptest_log_dir_link, timestamp) + os.makedirs(cls.ltptest_log_dir) + + cls.tc.target.run("mkdir -p /opt/ltp/results") + + if not hasattr(cls.tc, "extraresults"): + cls.tc.extraresults = {} + cls.extras = cls.tc.extraresults + cls.extras['ltpstressresult.rawlogs'] = {'log': ""} + + + @classmethod + def ltp_finishup(cls): + cls.extras['ltpstressresult.sections'] = cls.sections + + # update symlink to ltp_log + if os.path.exists(cls.ltptest_log_dir_link): + os.remove(cls.ltptest_log_dir_link) + + os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link) + + if cls.failmsg: + cls.fail(cls.failmsg) + +class LtpStressTest(LtpStressBase): + + def runltp(self, stress_group): + cmd = '/opt/ltp/runltp -f %s -p -q 2>@1 | tee /opt/ltp/results/%s' % (stress_group, stress_group) + starttime = time.time() + (status, output) = self.target.run(cmd) + endtime = time.time() + with open(os.path.join(self.ltptest_log_dir, "%s" % stress_group), 'w') as f: + f.write(output) + + self.extras['ltpstressresult.rawlogs']['log'] = self.extras['ltpstressresult.rawlogs']['log'] + output + + parser = LtpParser() + results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % stress_group)) + + runtime = int(endtime-starttime) + sections['duration'] = runtime + self.sections[stress_group] = sections + + failed_tests = {} + for test in results: + result = results[test] + testname = ("ltpstressresult." + stress_group + "." + test) + self.extras[testname] = {'status': result} + if result == 'FAILED': + failed_tests[stress_group] = test + + if failed_tests: + self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests) + + # LTP stress runtime tests + # + @skipIfQemu('qemuall', 'Test only runs on real hardware') + + @OETestDepends(['ssh.SSHTest.test_ssh']) + @OEHasPackage(["ltp"]) + def test_ltp_stress(self): + self.tc.target.run("sed -i -r 's/^fork12.*//' /opt/ltp/runtest/crashme") + self.runltp('crashme') diff --git a/poky/meta/lib/oeqa/runtime/cases/storage.py b/poky/meta/lib/oeqa/runtime/cases/storage.py new file mode 100644 index 000000000..166d26b25 --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/storage.py @@ -0,0 +1,149 @@ +# +# SPDX-License-Identifier: MIT +# + +import re +import time + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.data import skipIfQemu + +class StorageBase(OERuntimeTestCase): + def storage_mount(cls, tmo=1): + + (status, output) = cls.target.run('mkdir -p %s' % cls.mount_point) + (status, output) = cls.target.run('mount %s %s' % (cls.device, cls.mount_point)) + msg = ('Mount failed: %s.' % status) + cls.assertFalse(output, msg = msg) + time.sleep(tmo) + (status, output) = cls.target.run('cat /proc/mounts') + match = re.search('%s' % cls.device, output) + if match: + msg = ('Device %s not mounted.' % cls.device) + cls.assertTrue(match, msg = msg) + + (status, output) = cls.target.run('mkdir -p %s' % cls.test_dir) + + (status, output) = cls.target.run('rm -f %s/*' % cls.test_dir) + msg = ('Failed to cleanup files @ %s/*' % cls.test_dir) + cls.assertFalse(output, msg = msg) + + + def storage_basic(cls): + # create file on device + (status, output) = cls.target.run('touch %s/%s' % (cls.test_dir, cls.test_file)) + msg = ('File %s not created on %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + # move file + (status, output) = cls.target.run('mv %s/%s %s/%s1' % + (cls.test_dir, cls.test_file, cls.test_dir, cls.test_file)) + msg = ('File %s not moved to %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + # remove file + (status, output) = cls.target.run('rm %s/%s1' % (cls.test_dir, cls.test_file)) + msg = ('File %s not removed on %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + + def storage_read(cls): + # check if message is in file + (status, output) = cls.target.run('cat %s/%s' % + (cls.test_dir, cls.test_file)) + + match = re.search('%s' % cls.test_msg, output) + msg = ('Test message %s not in file %s.' % (cls.test_msg, cls.test_file)) + cls.assertEqual(status, 0, msg = msg) + + def storage_write(cls): + # create test message in file on device + (status, output) = cls.target.run('echo "%s" > %s/%s' % + (cls.test_msg, cls.test_dir, cls.test_file)) + msg = ('File %s not create test message on %s' % (cls.test_file, cls.device)) + cls.assertEqual(status, 0, msg = msg) + + def storage_umount(cls, tmo=1): + time.sleep(tmo) + (status, output) = cls.target.run('umount %s' % cls.mount_point) + + if status == 32: + # already unmounted, should it fail? + return + else: + msg = ('Device not unmount %s' % cls.mount_point) + cls.assertEqual(status, 0, msg = msg) + + (status, output) = cls.target.run('cat /proc/mounts') + match = re.search('%s' % cls.device, output) + if match: + msg = ('Device %s still mounted.' % cls.device) + cls.assertTrue(match, msg = msg) + + +class UsbTest(StorageBase): + ''' + This is to mimic the usb test previously done in manual bsp-hw.json + ''' + @classmethod + def setUpClass(self): + self.test_msg = "Hello World - USB" + self.mount_point = "/media/usb" + self.device = "/dev/sda1" + self.test_file = "usb.tst" + self.test_dir = os.path.join(self.mount_point, "oeqa") + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_usb_mount(self): + self.storage_umount(2) + self.storage_mount(5) + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_mount']) + def test_usb_basic_operations(self): + self.storage_basic() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_basic_operations']) + def test_usb_basic_rw(self): + self.storage_write() + self.storage_read() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_mount']) + def test_usb_umount(self): + self.storage_umount(2) + + +class MMCTest(StorageBase): + ''' + This is to mimic the usb test previously done in manual bsp-hw.json + ''' + @classmethod + def setUpClass(self): + self.test_msg = "Hello World - MMC" + self.mount_point = "/media/mmc" + self.device = "/dev/mmcblk1p1" + self.test_file = "mmc.tst" + self.test_dir = os.path.join(self.mount_point, "oeqa") + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_mmc_mount(self): + self.storage_umount(2) + self.storage_mount() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_mount']) + def test_mmc_basic_operations(self): + self.storage_basic() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_basic_operations']) + def test_mmc_basic_rw(self): + self.storage_write() + self.storage_read() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_mount']) + def test_mmc_umount(self): + self.storage_umount(2) diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py index 3a25da203..57e6662e4 100644 --- a/poky/meta/lib/oeqa/selftest/cases/devtool.py +++ b/poky/meta/lib/oeqa/selftest/cases/devtool.py @@ -137,6 +137,7 @@ class DevtoolBase(OESelftestTestCase): with open(recipefile, 'r') as f: invar = None invalue = None + inherits = set() for line in f: var = None if invar: @@ -158,7 +159,7 @@ class DevtoolBase(OESelftestTestCase): invar = var continue elif line.startswith('inherit '): - inherits = line.split()[1:] + inherits.update(line.split()[1:]) if var and var in checkvars: needvalue = checkvars.pop(var) @@ -1496,11 +1497,13 @@ class DevtoolUpgradeTests(DevtoolBase): recipedir = os.path.dirname(oldrecipefile) olddir = os.path.join(recipedir, recipe + '-' + oldversion) patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch' + backportedpatchfn = 'backported.patch' self.assertExists(os.path.join(olddir, patchfn), 'Original patch file does not exist') - return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn + self.assertExists(os.path.join(olddir, backportedpatchfn), 'Backported patch file does not exist') + return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn def test_devtool_finish_upgrade_origlayer(self): - recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade() + recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade() # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things) self.assertIn('/meta-selftest/', recipedir) # Try finish to the original layer @@ -1511,14 +1514,23 @@ class DevtoolUpgradeTests(DevtoolBase): self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish') self.assertNotExists(oldrecipefile, 'Old recipe file should have been deleted but wasn\'t') self.assertNotExists(os.path.join(olddir, patchfn), 'Old patch file should have been deleted but wasn\'t') + self.assertNotExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should have been deleted but wasn\'t') newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion)) newdir = os.path.join(recipedir, recipe + '-' + newversion) self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t') self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t') + self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was') self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t') + with open(newrecipefile, 'r') as f: + newcontent = f.read() + self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't") + self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was") + self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't") + self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI") + def test_devtool_finish_upgrade_otherlayer(self): - recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade() + recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade() # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things) self.assertIn('/meta-selftest/', recipedir) # Try finish to a different layer - should create a bbappend @@ -1534,10 +1546,18 @@ class DevtoolUpgradeTests(DevtoolBase): self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish') self.assertExists(oldrecipefile, 'Old recipe file should not have been deleted') self.assertExists(os.path.join(olddir, patchfn), 'Old patch file should not have been deleted') + self.assertExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should not have been deleted') newdir = os.path.join(newrecipedir, recipe + '-' + newversion) self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t') self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t') + self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was') self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t') + with open(newrecipefile, 'r') as f: + newcontent = f.read() + self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't") + self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was") + self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't") + self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI") def _setup_test_devtool_finish_modify(self): # Check preconditions diff --git a/poky/meta/lib/oeqa/selftest/cases/sstatetests.py b/poky/meta/lib/oeqa/selftest/cases/sstatetests.py index 2867cb78a..6757a0ec6 100644 --- a/poky/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/poky/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -255,6 +255,7 @@ BUILD_ARCH = "x86_64" BUILD_OS = "linux" SDKMACHINE = "x86_64" PACKAGE_CLASSES = "package_rpm package_ipk package_deb" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("core-image-sato -S none") @@ -266,6 +267,7 @@ BUILD_ARCH = "i686" BUILD_OS = "linux" SDKMACHINE = "i686" PACKAGE_CLASSES = "package_rpm package_ipk package_deb" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("core-image-sato -S none") @@ -298,6 +300,7 @@ PACKAGE_CLASSES = "package_rpm package_ipk package_deb" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" TCLIBCAPPEND = \"\" NATIVELSBSTRING = \"DistroA\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("core-image-sato -S none") @@ -305,6 +308,7 @@ NATIVELSBSTRING = \"DistroA\" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" TCLIBCAPPEND = \"\" NATIVELSBSTRING = \"DistroB\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("core-image-sato -S none") @@ -332,11 +336,13 @@ NATIVELSBSTRING = \"DistroB\" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" TCLIBCAPPEND = \"\" MACHINE = \"qemux86-64\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ configB = """ TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" TCLIBCAPPEND = \"\" MACHINE = \"qemuarm\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ self.sstate_allarch_samesigs(configA, configB) @@ -352,6 +358,7 @@ MACHINE = \"qemux86-64\" require conf/multilib.conf MULTILIBS = \"multilib:lib32\" DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ configB = """ TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" @@ -359,6 +366,7 @@ TCLIBCAPPEND = \"\" MACHINE = \"qemuarm\" require conf/multilib.conf MULTILIBS = \"\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ self.sstate_allarch_samesigs(configA, configB) @@ -404,6 +412,7 @@ MACHINE = \"qemux86\" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("world meta-toolchain -S none") @@ -414,6 +423,7 @@ MACHINE = \"qemux86copy\" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("world meta-toolchain -S none") @@ -452,6 +462,7 @@ TIME = "111111" DATE = "20161111" INHERIT_remove = "buildstats-summary buildhistory uninative" http_proxy = "" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") self.track_for_cleanup(self.topdir + "/download1") @@ -468,6 +479,7 @@ DATE = "20161212" INHERIT_remove = "uninative" INHERIT += "buildstats-summary buildhistory" http_proxy = "http://example.com/" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") self.track_for_cleanup(self.topdir + "/download2") diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py index ea7530040..0c03b4b02 100644 --- a/poky/meta/lib/oeqa/selftest/cases/wic.py +++ b/poky/meta/lib/oeqa/selftest/cases/wic.py @@ -1025,3 +1025,10 @@ class Wic2(WicTestCase): # check if it's removed result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line]) + + # remove non-empty directory + runCmd("wic rm -r %s:2/etc/ -n %s" % (images[0], sysroot)) + + # check if it's removed + result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) + self.assertTrue('etc' not in [line.split()[-1] for line in result.output.split('\n') if line]) diff --git a/poky/meta/recipes-bsp/usbutils/usbutils_012.bb b/poky/meta/recipes-bsp/usbutils/usbutils_012.bb index 0213e7af6..b670fa4ab 100644 --- a/poky/meta/recipes-bsp/usbutils/usbutils_012.bb +++ b/poky/meta/recipes-bsp/usbutils/usbutils_012.bb @@ -15,7 +15,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ SRC_URI[md5sum] = "7484445cbcf04b3eacac892fe58f8d9f" SRC_URI[sha256sum] = "ae2e10aad530d95839b6f4d46cd41715eae6f0f1789310d793e9be21b3e7ae20" -inherit autotools pkgconfig distro_features_check update-alternatives +inherit autotools pkgconfig features_check update-alternatives ALTERNATIVE_${PN} = "lsusb" ALTERNATIVE_PRIORITY = "100" diff --git a/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb index 1c6e46aab..1510a0ef4 100644 --- a/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb +++ b/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb @@ -1,6 +1,6 @@ require avahi.inc -inherit distro_features_check +inherit features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" DEPENDS += "avahi" diff --git a/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb b/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb index 3e2412dfa..089770634 100644 --- a/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +++ b/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb @@ -37,6 +37,10 @@ UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4 UPSTREAM_CHECK_REGEX = "(?P9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/" +# BIND >= 9.11.2 need dhcpd >= 4.4.0, +# don't report it here since dhcpd is already recent enough. +CVE_CHECK_WHITELIST += "CVE-2019-6470" + inherit autotools update-rc.d systemd useradd pkgconfig multilib_script MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh" diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5.inc b/poky/meta/recipes-connectivity/bluez5/bluez5.inc index 170232328..484509350 100644 --- a/poky/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/poky/meta/recipes-connectivity/bluez5/bluez5.inc @@ -64,7 +64,7 @@ S = "${WORKDIR}/bluez-${PV}" CVE_PRODUCT = "bluez" -inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest gobject-introspection-data +inherit autotools pkgconfig systemd update-rc.d features_check ptest gobject-introspection-data EXTRA_OECONF = "\ --enable-test \ diff --git a/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb index a56bd3751..778bf5019 100644 --- a/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb +++ b/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb @@ -20,7 +20,7 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \ S = "${WORKDIR}/git" -inherit autotools-brokensep gtk-icon-cache pkgconfig distro_features_check +inherit autotools-brokensep gtk-icon-cache pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" RDEPENDS_${PN} = "connman" diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb deleted file mode 100644 index 7897170a7..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb +++ /dev/null @@ -1,24 +0,0 @@ -require glib.inc - -PE = "1" - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ - file://run-ptest \ - file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ - file://Enable-more-tests-while-cross-compiling.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0001-Do-not-ignore-return-value-of-write.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ - file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ - file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ - " - -SRC_URI_append_class-native = " file://relocate-modules.patch" -SRC_URI_append_class-target = " file://glib-meson.cross" - -SRC_URI[md5sum] = "64c14b4fe46c478992560c2f48a5b649" -SRC_URI[sha256sum] = "3dd9024e1d0872a6da7ac509937ccf997161b11d7d35be337c7e829cbae0f9df" diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb new file mode 100644 index 000000000..27a15a9b1 --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb @@ -0,0 +1,24 @@ +require glib.inc + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://Enable-more-tests-while-cross-compiling.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0001-Do-not-ignore-return-value-of-write.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + " + +SRC_URI_append_class-native = " file://relocate-modules.patch" +SRC_URI_append_class-target = " file://glib-meson.cross" + +SRC_URI[md5sum] = "bed3a70397a019965efac0c49f9c8164" +SRC_URI[sha256sum] = "698824a413f76df039739c2a78f45b10939d526ae7495bab4e694e6730deb3f1" diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc index 8b95f2120..e811b42d7 100644 --- a/poky/meta/recipes-core/glib-2.0/glib.inc +++ b/poky/meta/recipes-core/glib-2.0/glib.inc @@ -28,7 +28,7 @@ PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check +inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages features_check GTKDOC_MESON_OPTION = "gtk_doc" diff --git a/poky/meta/recipes-core/glibc/glibc.inc b/poky/meta/recipes-core/glibc/glibc.inc index 252fd56c1..ea9a04ac7 100644 --- a/poky/meta/recipes-core/glibc/glibc.inc +++ b/poky/meta/recipes-core/glibc/glibc.inc @@ -6,7 +6,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" PROVIDES = "virtual/libc" PROVIDES += "virtual/libintl virtual/libiconv" -inherit autotools texinfo distro_features_check systemd +inherit autotools texinfo features_check systemd LEAD_SONAME = "libc.so" diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb index c38f883e4..5a7e098f3 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb @@ -35,7 +35,7 @@ PACKAGECONFIG ??= "python \ PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -inherit autotools pkgconfig binconfig-disabled ptest distro_features_check +inherit autotools pkgconfig binconfig-disabled ptest features_check inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb index 19875a49b..db1d69a28 100644 --- a/poky/meta/recipes-core/meta/cve-update-db-native.bb +++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb @@ -21,15 +21,17 @@ python do_populate_cve_db() { """ Update NVD database with json data feed """ - + import bb.utils import sqlite3, urllib, urllib.parse, shutil, gzip from datetime import date + bb.utils.export_proxies(d) + BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" YEAR_START = 2002 - db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK') - db_file = os.path.join(db_dir, 'nvdcve_1.0.db') + db_file = d.getVar("CVE_CHECK_DB_FILE") + db_dir = os.path.dirname(db_file) json_tmpfile = os.path.join(db_dir, 'nvd.json.gz') # Don't refresh the database more than once an hour @@ -40,16 +42,6 @@ python do_populate_cve_db() { except OSError: pass - proxy = d.getVar("https_proxy") - if proxy: - # instantiate an opener but do not install it as the global - # opener unless if we're really sure it's applicable for all - # urllib requests - proxy_handler = urllib.request.ProxyHandler({'https': proxy}) - proxy_opener = urllib.request.build_opener(proxy_handler) - else: - proxy_opener = None - cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') if not os.path.isdir(db_dir): @@ -67,15 +59,7 @@ python do_populate_cve_db() { json_url = year_url + ".json.gz" # Retrieve meta last modified date - - response = None - - if proxy_opener: - response = proxy_opener.open(meta_url) - else: - req = urllib.request.Request(meta_url) - response = urllib.request.urlopen(req) - + response = urllib.request.urlopen(meta_url) if response: for l in response.read().decode("utf-8").splitlines(): key, value = l.split(":", 1) @@ -95,12 +79,7 @@ python do_populate_cve_db() { # Update db with current year json file try: - if proxy_opener: - response = proxy_opener.open(json_url) - else: - req = urllib.request.Request(json_url) - response = urllib.request.urlopen(req) - + response = urllib.request.urlopen(json_url) if response: update_db(c, gzip.decompress(response.read()).decode('utf-8')) c.execute("insert or replace into META values (?, ?)", [year, last_modified]) @@ -120,11 +99,14 @@ python do_populate_cve_db() { def initialize_db(c): c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") + c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)") + c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \ VERSION_END TEXT, OPERATOR_END TEXT)") + c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);") def parse_node_and_insert(c, node, cveId): # Parse children node if needed diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb index ee9d0636f..0aab23e3e 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb @@ -8,7 +8,7 @@ PR = "r13" PACKAGE_ARCH = "${TUNE_PKGARCH}" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on libx11-dev REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-core/systemd/systemd-compat-units.bb b/poky/meta/recipes-core/systemd/systemd-compat-units.bb index d228a51c1..faa428b58 100644 --- a/poky/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/poky/meta/recipes-core/systemd/systemd-compat-units.bb @@ -8,7 +8,7 @@ PACKAGE_WRITE_DEPS += "systemd-systemctl-native" S = "${WORKDIR}" -inherit distro_features_check +inherit features_check ALLOW_EMPTY_${PN} = "1" diff --git a/poky/meta/recipes-core/systemd/systemd-serialgetty.bb b/poky/meta/recipes-core/systemd/systemd-serialgetty.bb index 65a931f41..044c6c5b6 100644 --- a/poky/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/poky/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -12,7 +12,7 @@ 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 +inherit features_check REQUIRED_DISTRO_FEATURES = "systemd" do_install() { diff --git a/poky/meta/recipes-core/systemd/systemd_243.bb b/poky/meta/recipes-core/systemd/systemd_243.bb index 7935380e7..b31d0b5ed 100644 --- a/poky/meta/recipes-core/systemd/systemd_243.bb +++ b/poky/meta/recipes-core/systemd/systemd_243.bb @@ -8,7 +8,7 @@ DEPENDS = "intltool-native gperf-native libcap util-linux" SECTION = "base/shell" -inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_features_check +inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so # that we don't build both udev and systemd in world builds. @@ -317,7 +317,6 @@ PACKAGES =+ "\ ${PN}-rpm-macros \ ${PN}-binfmt \ ${PN}-zsh-completion \ - ${PN}-xorg-xinitrc \ ${PN}-container \ ${PN}-journal-gatewayd \ ${PN}-journal-upload \ @@ -379,8 +378,6 @@ FILES_${PN}-kernel-install = "${bindir}/kernel-install \ FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ " -FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*" - FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ @@ -529,6 +526,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${sysconfdir}/xdg/ \ ${sysconfdir}/init.d/README \ ${sysconfdir}/resolv-conf.systemd \ + ${sysconfdir}/X11/xinit/xinitrc.d/* \ ${rootlibexecdir}/systemd/* \ ${systemd_unitdir}/* \ ${base_libdir}/security/*.so \ diff --git a/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index bfc1283f7..8fd6df9d6 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb @@ -29,7 +29,7 @@ SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5 S = "${WORKDIR}/sysvinit-${PV}" B = "${S}/src" -inherit update-alternatives distro_features_check +inherit update-alternatives features_check DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" REQUIRED_DISTRO_FEATURES = "sysvinit" diff --git a/poky/meta/recipes-core/udev/eudev_3.2.8.bb b/poky/meta/recipes-core/udev/eudev_3.2.8.bb index eecf64e55..08729e14c 100644 --- a/poky/meta/recipes-core/udev/eudev_3.2.8.bb +++ b/poky/meta/recipes-core/udev/eudev_3.2.8.bb @@ -23,7 +23,7 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \ SRC_URI[md5sum] = "ce166b3fdd910c2a4a840378f48fedaf" SRC_URI[sha256sum] = "61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8" -inherit autotools update-rc.d qemu pkgconfig distro_features_check +inherit autotools update-rc.d qemu pkgconfig features_check CONFLICT_DISTRO_FEATURES = "systemd" diff --git a/poky/meta/recipes-core/volatile-binds/volatile-binds.bb b/poky/meta/recipes-core/volatile-binds/volatile-binds.bb index d861a71a6..b273293e9 100644 --- a/poky/meta/recipes-core/volatile-binds/volatile-binds.bb +++ b/poky/meta/recipes-core/volatile-binds/volatile-binds.bb @@ -11,7 +11,7 @@ SRC_URI = "\ S = "${WORKDIR}" -inherit allarch systemd distro_features_check +inherit allarch systemd features_check REQUIRED_DISTRO_FEATURES = "systemd" diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb new file mode 100644 index 000000000..a44c0bc87 --- /dev/null +++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb @@ -0,0 +1,52 @@ +SUMMARY = "Checksumming Copy on Write Filesystem utilities" +DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ +implementing advanced features while focusing on fault tolerance, repair and \ +easy administration. \ +This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ +btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." + +HOMEPAGE = "https://btrfs.wiki.kernel.org" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" +SECTION = "base" +DEPENDS = "util-linux attr e2fsprogs lzo acl" +DEPENDS_append_class-target = " udev" +RDEPENDS_${PN} = "libgcc" + +SRCREV = "f82e569b33c3c1cfd4f8f405085ff8d439a0a915" +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ + file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ + " + +PACKAGECONFIG ??= "python" +PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" +PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native" +PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd" + +inherit autotools-brokensep pkgconfig manpages +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)} + +CLEANBROKEN = "1" + +EXTRA_OECONF_append_libc-musl = " --disable-backtrace " +EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}" +EXTRA_PYTHON_CFLAGS_class-native = "" +EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}" +EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'" + +do_configure_prepend() { + # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. + mkdir -p ${S}/config + cp -f $(automake --print-libdir)/install-sh ${S}/config/ +} + +S = "${WORKDIR}/git" + +do_install_append() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python + fi +} + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.bb deleted file mode 100644 index 12b5c4562..000000000 --- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Checksumming Copy on Write Filesystem utilities" -DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ -implementing advanced features while focusing on fault tolerance, repair and \ -easy administration. \ -This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ -btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." - -HOMEPAGE = "https://btrfs.wiki.kernel.org" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" -SECTION = "base" -DEPENDS = "util-linux attr e2fsprogs lzo acl" -DEPENDS_append_class-target = " udev" -RDEPENDS_${PN} = "libgcc" - -SRCREV = "de7856cee5907938441f765ebab7cc106b7faf70" -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ - file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ - " - -PACKAGECONFIG ??= "python" -PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" -PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native" -PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd" - -inherit autotools-brokensep pkgconfig manpages -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)} - -CLEANBROKEN = "1" - -EXTRA_OECONF_append_libc-musl = " --disable-backtrace " -EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}" -EXTRA_PYTHON_CFLAGS_class-native = "" -EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}" -EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'" - -do_configure_prepend() { - # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. - mkdir -p ${S}/config - cp -f $(automake --print-libdir)/install-sh ${S}/config/ -} - -S = "${WORKDIR}/git" - -do_install_append() { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python - fi -} - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb index 78e1565e4..1c602e7ce 100644 --- a/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb +++ b/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb @@ -7,7 +7,10 @@ SECTION = "console/utils" LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2" +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2 \ + file://0001-Don-t-set-uid-gid-during-install.patch \ + " UPSTREAM_VERSION_UNKNOWN = "1" SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b" diff --git a/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch b/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch new file mode 100644 index 000000000..9d38294b4 --- /dev/null +++ b/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch @@ -0,0 +1,27 @@ +From 529cd5b007aa681c3ca14e5ab1e30469dd51646b Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Tue, 12 Nov 2019 22:17:19 +0000 +Subject: [PATCH] Don't set uid/gid during install + +Signed-off-by: Paul Barker +Upstream-Status: Inappropriate [native] +--- + RULES/rules.prg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/RULES/rules.prg b/RULES/rules.prg +index 023555c..f70f1a7 100644 +--- a/RULES/rules.prg ++++ b/RULES/rules.prg +@@ -94,7 +94,7 @@ INSGRP= $(__DEFINSGRP:$(_UNIQ)%=%) + + LD= @echo " ==> LINKING \"$@\""; ld + LOCALIZE= @echo " ==> LOCALIZING \"$@\""; $(RM_F) $@; cp +-INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP) ++INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) + CHMOD= @echo " ==> SETTING PERMISSIONS ON \"$@\""; chmod + CHOWN= @echo " ==> SETTING OWNER ON \"$@\""; chown + CHGRP= @echo " ==> SETTING GROUP ON \"$@\""; chgrp +-- +2.24.0 + diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb b/poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb deleted file mode 100644 index cf4de22c4..000000000 --- a/poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "A library providing C and Python (libcURL like) API \ - for downloading linux repository metadata and packages." -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/librepo.git \ - file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ - file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ - " - -SRCREV = "2ec349f1c686c1704dc83da6c118035ff57c8dea" - -S = "${WORKDIR}/git" - -DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2" - -inherit cmake distutils3-base pkgconfig - -EXTRA_OECMAKE = " \ - -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \ - -DPYTHON_DESIRED=3 \ - -DENABLE_TESTS=OFF \ - -DENABLE_DOCS=OFF \ - -DWITH_ZCHUNK=OFF \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb b/poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb new file mode 100644 index 000000000..30c8a5c55 --- /dev/null +++ b/poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "A library providing C and Python (libcURL like) API \ + for downloading linux repository metadata and packages." +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/rpm-software-management/librepo.git \ + file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ + file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ + " + +SRCREV = "497f5eb2293662835bed6bdb0f43521788b2cebe" + +S = "${WORKDIR}/git" + +DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2" + +inherit cmake distutils3-base pkgconfig + +EXTRA_OECMAKE = " \ + -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \ + -DPYTHON_DESIRED=3 \ + -DENABLE_TESTS=OFF \ + -DENABLE_DOCS=OFF \ + -DWITH_ZCHUNK=OFF \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb index 2ae69797a..2093d80db 100644 --- a/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb +++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb @@ -35,7 +35,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \ SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch" -inherit autotools texinfo distro_features_check +inherit autotools texinfo features_check EXTRA_OECONF = "--without-x" diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch new file mode 100644 index 000000000..55ddcc1fd --- /dev/null +++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch @@ -0,0 +1,31 @@ +We need opkg-build to fail if for example the tar command is passed invalid +options. Without this, we see silently created empty packaged where data.tar +is zero bytes in size. This creates hard to debug problems. + +An example is when reproducible builds are enabled and run on old hosts like +centos7 which has tar < 1.28: + +Subprocess output:tar: unrecognized option '--clamp-mtime' +Try `tar --help' or `tar --usage' for more information. + +Upstream-Status: Pending +Signed-off-by: Richard Purdie + +Index: opkg-utils-0.4.1/opkg-build +=================================================================== +--- opkg-utils-0.4.1.orig/opkg-build ++++ opkg-utils-0.4.1/opkg-build +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + : <<=cut + =head1 NAME +@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di + # Updated to work on Familiar Pre0.7rc1, with busybox tar. + # Note it Requires: binutils-ar (since the busybox ar can't create) + set -e ++set -o pipefail + + version=1.0 + diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb index cf1e4670c..eb6c7a3a6 100644 --- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb +++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb @@ -10,6 +10,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \ + file://pipefail.patch \ " UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" @@ -19,6 +20,8 @@ SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ec TARGET_CC_ARCH += "${LDFLAGS}" +RDEPENDS_${PN} += "bash" + # For native builds we use the host Python PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold" PYTHONRDEPS_class-native = "" diff --git a/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch b/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch new file mode 100644 index 000000000..278e099e3 --- /dev/null +++ b/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch @@ -0,0 +1,46 @@ +From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019 +From: Alejandro del Castillo +To: , +CC: Alejandro del Castillo +Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads +Date: Wed, 20 Nov 2019 16:34:48 -0600 +Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +MIME-Version: 1.0 +Content-Type: text/plain +Content-Transfer-Encoding: 8bit + +Support for empty compressed payloads need to be explicitly enabled on +libarchive. + +Signed-off-by: Alejandro del Castillo + +Upstream-Status: Backport +--- + libopkg/opkg_archive.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 0e9ccea..f19cece 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer) + goto err_cleanup; + } + ++ r = archive_read_support_format_empty(inner); ++ if (r != ARCHIVE_OK) { ++ opkg_msg(ERROR, "Empty format not supported: %s\n", ++ archive_error_string(inner)); ++ goto err_cleanup; ++ } ++ + r = archive_read_open(inner, data, NULL, inner_read, inner_close); + if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to open inner archive: %s\n", +-- +2.22.0 + + diff --git a/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch b/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file mode 100644 index 000000000..3e1ebae95 --- /dev/null +++ b/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch @@ -0,0 +1,54 @@ +From alejandro.delcastillo@ni.com Wed Nov 20 22:35:01 2019 +Return-Path: +From: Alejandro del Castillo +To: , +CC: Alejandro del Castillo +Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress + error +Date: Wed, 20 Nov 2019 16:34:47 -0600 +Message-ID: <20191120223448.26522-2-alejandro.delcastillo@ni.com> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +MIME-Version: 1.0 +Content-Type: text/plain +Content-Transfer-Encoding: 8bit + +The open-inner function calls archive_read_open. On error, +archive_read_open calls inner_close, which also closes the outter +archive. On error, return NULL directly to avoid double free. + + +Upstream-Status: Backport + +Signed-off-by: Alejandro del Castillo +--- + libopkg/opkg_archive.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 3d87db1..0e9ccea 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive *outer) + if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to open inner archive: %s\n", + archive_error_string(inner)); +- goto err_cleanup; ++ return NULL; + } + + return inner; +@@ -683,7 +683,7 @@ static struct archive *extract_outer(const char *filename, const char *arname) + + inner = open_inner(outer); + if (!inner) +- goto err_cleanup; ++ return NULL; + + return inner; + +-- +2.22.0 + + diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb index 149ee3ca1..f0ae8b36b 100644 --- a/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb +++ b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb @@ -14,6 +14,8 @@ PE = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://opkg.conf \ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ + file://opkg_archive.patch \ + file://open_inner.patch \ file://run-ptest \ " diff --git a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch index 989818927..707ee596f 100644 --- a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch +++ b/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch @@ -1,4 +1,4 @@ -From 12292444e1b3662b994bc223d92b8338fb0895ff Mon Sep 17 00:00:00 2001 +From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 25 Oct 2018 07:32:14 +0000 Subject: [PATCH] python-native: fix one do_populate_sysroot warning @@ -17,23 +17,24 @@ when do_populate_sysroot. use append to fix it. Upstream-Status: Inappropriate [oe-specific] Signed-off-by: Changqing Li + --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index 7bf13ed..6c0f29b 100644 +index a2c8127..22f9e23 100644 --- a/setup.py +++ b/setup.py -@@ -40,7 +40,7 @@ def add_dir_to_list(dirlist, dir): - 1) 'dir' is not already in 'dirlist' - 2) 'dir' actually exists, and is a directory.""" - if dir is not None and os.path.isdir(dir) and dir not in dirlist: -- dirlist.insert(0, dir) -+ dirlist.append(dir) - - def macosx_sdk_root(): - """ +@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir): + else: + dir_exists = os.path.isdir(dir) + if dir_exists: +- dirlist.insert(0, dir) ++ dirlist.append(dir) + + MACOS_SDK_ROOT = None + -- -2.18.0 +2.17.1 diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.16.bb b/poky/meta/recipes-devtools/python/python-native_2.7.16.bb deleted file mode 100644 index 90103af8b..000000000 --- a/poky/meta/recipes-devtools/python/python-native_2.7.16.bb +++ /dev/null @@ -1,88 +0,0 @@ -require python.inc -EXTRANATIVEPATH += "bzip2-native" -DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native" - -SRC_URI += "\ - file://05-enable-ctypes-cross-build.patch \ - file://10-distutils-fix-swig-parameter.patch \ - file://11-distutils-never-modify-shebang-line.patch \ - file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \ - file://unixccompiler.patch \ - file://nohostlibs.patch \ - file://multilib.patch \ - file://add-md5module-support.patch \ - file://builddir.patch \ - file://parallel-makeinst-create-bindir.patch \ - file://revert_use_of_sysconfigdata.patch \ - file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \ - " - -S = "${WORKDIR}/Python-${PV}" - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" - -inherit native - -EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" - -EXTRA_OEMAKE = '\ - LIBC="" \ - STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ - STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ -' - -do_configure_append() { - autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi -} - -# Regenerate all of the generated files -# This ensures that pgen and friends get created during the compile phase -do_compile_prepend() { - oe_runmake regen-all -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install - install -d ${D}${bindir}/${PN} - install -m 0755 Parser/pgen ${D}${bindir}/${PN} - - # Make sure we use /usr/bin/env python - for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do - sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT - done - - # Add a symlink to the native Python so that scripts can just invoke - # "nativepython" and get the right one without needing absolute paths - # (these often end up too long for the #! parser in the kernel as the - # buffer is 128 bytes long). - ln -s python-native/python ${D}${bindir}/nativepython - - # We don't want modules in ~/.local being used in preference to those - # installed in the native sysroot, so disable user site support. - sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py -} - -python(){ - - # Read JSON manifest - import json - pythondir = d.getVar('THISDIR') - with open(pythondir+'/python/python2-manifest.json') as manifest_file: - manifest_str = manifest_file.read() - json_start = manifest_str.find('# EOC') + 6 - manifest_file.seek(json_start) - manifest_str = manifest_file.read() - python_manifest = json.loads(manifest_str) - - rprovides = d.getVar('RPROVIDES').split() - - # Hardcoded since it cant be python-native-foo, should be python-foo-native - pn = 'python' - - for key in python_manifest: - pypackage = pn + '-' + key + '-native' - if pypackage not in rprovides: - rprovides.append(pypackage) - - d.setVar('RPROVIDES', ' '.join(rprovides)) -} diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.17.bb b/poky/meta/recipes-devtools/python/python-native_2.7.17.bb new file mode 100644 index 000000000..936810d98 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python-native_2.7.17.bb @@ -0,0 +1,88 @@ +require python.inc +EXTRANATIVEPATH += "bzip2-native" +DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native" + +SRC_URI += "\ + file://05-enable-ctypes-cross-build.patch \ + file://10-distutils-fix-swig-parameter.patch \ + file://11-distutils-never-modify-shebang-line.patch \ + file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \ + file://unixccompiler.patch \ + file://nohostlibs.patch \ + file://multilib.patch \ + file://add-md5module-support.patch \ + file://0001-python-Resolve-intermediate-staging-issues.patch \ + file://parallel-makeinst-create-bindir.patch \ + file://revert_use_of_sysconfigdata.patch \ + file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \ + " + +S = "${WORKDIR}/Python-${PV}" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" + +inherit native + +EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" + +EXTRA_OEMAKE = '\ + LIBC="" \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ + STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ +' + +do_configure_append() { + autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +# Regenerate all of the generated files +# This ensures that pgen and friends get created during the compile phase +do_compile_prepend() { + oe_runmake regen-all +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + install -d ${D}${bindir}/${PN} + install -m 0755 Parser/pgen ${D}${bindir}/${PN} + + # Make sure we use /usr/bin/env python + for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT + done + + # Add a symlink to the native Python so that scripts can just invoke + # "nativepython" and get the right one without needing absolute paths + # (these often end up too long for the #! parser in the kernel as the + # buffer is 128 bytes long). + ln -s python-native/python ${D}${bindir}/nativepython + + # We don't want modules in ~/.local being used in preference to those + # installed in the native sysroot, so disable user site support. + sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py +} + +python(){ + + # Read JSON manifest + import json + pythondir = d.getVar('THISDIR') + with open(pythondir+'/python/python2-manifest.json') as manifest_file: + manifest_str = manifest_file.read() + json_start = manifest_str.find('# EOC') + 6 + manifest_file.seek(json_start) + manifest_str = manifest_file.read() + python_manifest = json.loads(manifest_str) + + rprovides = d.getVar('RPROVIDES').split() + + # Hardcoded since it cant be python-native-foo, should be python-foo-native + pn = 'python' + + for key in python_manifest: + pypackage = pn + '-' + key + '-native' + if pypackage not in rprovides: + rprovides.append(pypackage) + + d.setVar('RPROVIDES', ' '.join(rprovides)) +} diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc index 1462b779e..a630c26e8 100644 --- a/poky/meta/recipes-devtools/python/python.inc +++ b/poky/meta/recipes-devtools/python/python.inc @@ -8,16 +8,10 @@ INC_PR = "r1" LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ - file://bpo-35907-cve-2019-9948.patch \ - file://bpo-35907-cve-2019-9948-fix.patch \ - file://bpo-36216-cve-2019-9636.patch \ - file://bpo-36216-cve-2019-9636-fix.patch \ - file://CVE-2019-9740.patch \ - file://CVE-2018-20852.patch \ " -SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5" -SRC_URI[sha256sum] = "f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7" +SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd" +SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41" # python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.x diff --git a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch deleted file mode 100644 index 5415472a3..000000000 --- a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 532ed09c5454bb789a301bb6f1339a0818255610 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Roberto=20C=2E=20S=C3=A1nchez?= -Date: Sat, 14 Sep 2019 13:26:38 -0400 -Subject: [PATCH] [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) - (GH-16006) - -This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address. - -(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9) - -Excludes changes to Lib/email/_header_value_parser.py, which did not -exist in 2.7. - -Co-authored-by: jpic - -https://bugs.python.org/issue34155 - -Upstream-Status: Backport [https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9] - -CVE: CVE-2019-16056 - -Signed-off-by: Chen Qi ---- - Lib/email/_parseaddr.py | 11 ++++++++++- - Lib/email/test/test_email.py | 14 ++++++++++++++ - .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 + - 3 files changed, 25 insertions(+), 1 deletion(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst - -diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py -index 690db2c22d..dc49d2e45a 100644 ---- a/Lib/email/_parseaddr.py -+++ b/Lib/email/_parseaddr.py -@@ -336,7 +336,12 @@ class AddrlistClass: - aslist.append('@') - self.pos += 1 - self.gotonext() -- return EMPTYSTRING.join(aslist) + self.getdomain() -+ domain = self.getdomain() -+ if not domain: -+ # Invalid domain, return an empty address instead of returning a -+ # local part to denote failed parsing. -+ return EMPTYSTRING -+ return EMPTYSTRING.join(aslist) + domain - - def getdomain(self): - """Get the complete domain name from an address.""" -@@ -351,6 +356,10 @@ class AddrlistClass: - elif self.field[self.pos] == '.': - self.pos += 1 - sdlist.append('.') -+ elif self.field[self.pos] == '@': -+ # bpo-34155: Don't parse domains with two `@` like -+ # `a@malicious.org@important.com`. -+ return EMPTYSTRING - elif self.field[self.pos] in self.atomends: - break - else: -diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py -index 4b4dee3d34..2efe44ac5a 100644 ---- a/Lib/email/test/test_email.py -+++ b/Lib/email/test/test_email.py -@@ -2306,6 +2306,20 @@ class TestMiscellaneous(TestEmailBase): - self.assertEqual(Utils.parseaddr('<>'), ('', '')) - self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '') - -+ def test_parseaddr_multiple_domains(self): -+ self.assertEqual( -+ Utils.parseaddr('a@b@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ Utils.parseaddr('a@b.c@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ Utils.parseaddr('a@172.17.0.1@c'), -+ ('', '') -+ ) -+ - def test_noquote_dump(self): - self.assertEqual( - Utils.formataddr(('A Silly Person', 'person@dom.ain')), -diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -new file mode 100644 -index 0000000000..50292e29ed ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -@@ -0,0 +1 @@ -+Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic. diff --git a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-38243-Escape-the-server-title-of-DocXMLRPCSe.patch b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-38243-Escape-the-server-title-of-DocXMLRPCSe.patch deleted file mode 100644 index 3025cf7bc..000000000 --- a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-38243-Escape-the-server-title-of-DocXMLRPCSe.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b161c89c8bd66fe928192e21364678c8e9b8fcc0 Mon Sep 17 00:00:00 2001 -From: Dong-hee Na -Date: Tue, 1 Oct 2019 19:58:01 +0900 -Subject: [PATCH] [2.7] bpo-38243: Escape the server title of DocXMLRPCServer - (GH-16447) - -Escape the server title of DocXMLRPCServer.DocXMLRPCServer -when rendering the document page as HTML. - -CVE: CVE-2019-16935 - -Upstream-Status: Backport [https://github.com/python/cpython/pull/16447/commits/b41cde823d026f2adc21ef14b1c2e92b1006de06] - -Signed-off-by: Chen Qi ---- - Lib/DocXMLRPCServer.py | 13 +++++++++++- - Lib/test/test_docxmlrpc.py | 20 +++++++++++++++++++ - .../2019-09-25-13-21-09.bpo-38243.1pfz24.rst | 3 +++ - 3 files changed, 35 insertions(+), 1 deletion(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst - -diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py -index 4064ec2e48..90b037dd35 100644 ---- a/Lib/DocXMLRPCServer.py -+++ b/Lib/DocXMLRPCServer.py -@@ -20,6 +20,16 @@ from SimpleXMLRPCServer import (SimpleXMLRPCServer, - CGIXMLRPCRequestHandler, - resolve_dotted_attribute) - -+ -+def _html_escape_quote(s): -+ s = s.replace("&", "&") # Must be done first! -+ s = s.replace("<", "<") -+ s = s.replace(">", ">") -+ s = s.replace('"', """) -+ s = s.replace('\'', "'") -+ return s -+ -+ - class ServerHTMLDoc(pydoc.HTMLDoc): - """Class used to generate pydoc HTML document for a server""" - -@@ -210,7 +220,8 @@ class XMLRPCDocGenerator: - methods - ) - -- return documenter.page(self.server_title, documentation) -+ title = _html_escape_quote(self.server_title) -+ return documenter.page(title, documentation) - - class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): - """XML-RPC and documentation request handler class. -diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py -index 4dff4159e2..c45b892b8b 100644 ---- a/Lib/test/test_docxmlrpc.py -+++ b/Lib/test/test_docxmlrpc.py -@@ -1,5 +1,6 @@ - from DocXMLRPCServer import DocXMLRPCServer - import httplib -+import re - import sys - from test import test_support - threading = test_support.import_module('threading') -@@ -176,6 +177,25 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase): - self.assertIn("""Try self.add, too.""", - response.read()) - -+ def test_server_title_escape(self): -+ """Test that the server title and documentation -+ are escaped for HTML. -+ """ -+ self.serv.set_server_title('test_title