From 96ff1984133494bf6a3451ddeb7f14548d3697e1 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Mon, 19 Aug 2019 13:50:42 -0400 Subject: subtree updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit poky: 67266331b0..835f7eac06: Adrian Bunk (9): valgrind: Remove dependency on libx11 bluez5: Remove obsolete dependency on dbus-glib python3-dbus: Remove obsolete dependency on dbus-glib cups: Remove unnecessary dependency on dbus-glib libnotify: Remove obsolete dependency on dbus-glib unfs3: Switch to new upstream location i2c-tools: Add alternative for i2ctransfer meta: Remove remnants of bluez4 support e2fsprogs: Remove patch that disabled 64bit for ext4 by default Adrian Freihofer (1): yocto-bsp: runqemu runs beaglebone-yocto Adrian Ratiu (1): opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIR Alejandro del Castillo (1): opkg: upgrade to version 0.4.1 Alexander Kanavin (3): rt-tests: exclude 1.4 version from upstream check as well gtk-doc: correct the style.css permissions mobile-broadband-provider-info: upgrade 20190116 -> 20190618 Alistair Francis (7): mesa: Add support for the lima PACKAGECONFIG u-boot: Update to 2019.07 packagegroup-core-sdk: Set blank sanitiser for RISC-V 32 opensbi: Update from 0.3 to 0.4 opensbi: Fix installed-vs-shipped warning qemurunner.py: Be more verbose about problems package_manager: Ensure the base-feed directory exists Andrej Valek (2): busybox: 1.30.1 -> 1.31.0 oe/copy_buildsystem: move layer into layers directory Anuj Mittal (25): gstreamer1.0-plugins-bad: depend on vulkan-loader now vulkan-demos: depend on vulkan-loader vulkan: remove binutils: fix CVE-2019-12972 CVE-2019-9071 gnupg: upgrade 2.2.16 -> 2.2.17 libxslt: fix CVE-2019-13117 CVE-2019-13118 libva: upgrade 2.4.1 -> 2.5.0 libva-utils: upgrade 2.4.0 -> 2.5.0 nasm: fix CVE-2018-19755 python: fix CVE-2019-9740 python3: upgrade 3.7.3 -> 3.7.4 binutils: CVE-2019-9070 is same as CVE-2019-9071 qemu: fix CVE-2019-12155 bzip2: upgrade 1.0.7 -> 1.0.8 glib-2.0: upgrade 2.60.4 -> 2.60.5 vte: upgrade 0.56.1 -> 0.56.3 openssl: set CVE vendor to openssl curl: upgrade 7.65.1 -> 7.65.2 rsync: fix CVEs for included zlib glibc: CVE-2018-20796 is same as CVE-2019-9169 unzip: fix CVE-2019-13232 python: include CVE patches for python-native as well gdb: fix CVE-2017-9778 iptables: upgrade 1.8.2 -> 1.8.3 piglit: fix SRC_URI Armin Kuster (1): timezone: update to 2019b Bonnans, Laurent (1): openssl: fix valgrind errors on v1.1.1c Bruce Ashfield (5): linux-yocto/5.0: bsp: add basic xilinx zynqmp support linux-yocto/5.0: make scsi-debug include scsi core configs linux-yocto: bsp/beaglebone: support qemu -machine virt linux-yocto/4.19: update to 4.19.57 and -rt22 package: check PKG_ variables before executing ontarget postinst CHerzig@Gauselmann.de (1): bitbake: fetch2/clearcase: Fix class import errors Changqing Li (5): quilt: run-ptest remove Interactive Input mdadm: fix systemd service start up failure mdam: fix mdmonitor start up failure opkg: make ptest output format align with common style mdadm: make ptest output format align with common style Chee Yang Lee (1): wic: add support for kernel with initramfs bundled Chen Qi (13): target-sdk-provides-dummy: add libperl.so.5 64bit devtool: warn user about multiple layer having the same base name image.bbclass: fix systemd_preset_all devtool.py: track to clean devtool.conf in test_create_workspace grub-efi.bbclass: take into consideration of multilib sysstat: use service file from source codes xmlcatalog: hold libxml2-native dependency oeqa/runtime/rpm: ensure no user process running before deleting user oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTest qemurunner.py: fix race condition at qemu startup msmtp: use alternatives to manage /usr/lib/sendmail runtime_test.py: use track_for_cleanup for temp dir devtool: remove temp dir in upgrade Fabio Berton (1): mesa: Update 19.1.0 -> 19.1.1 Haiqing Bai (1): sysstat: Use sysstat.service in source for cron with systemd He Zhe (1): ltp: file01: Fix in was not recognized Hongzhi.Song (3): ltp: fix shmctl01 failure when executed. ltp: diotest4: Let kernel pick an address when calling mmap ltp: getrlimit03: adjust-a-bit-of-code-to-compatiable-with mips32 Jason Wessel (5): glibc: Fix multilibs + usrmerge builds psmisc: Fix dependency for USE_NLS=no glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1" glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs glibc / glibc-locale: Fix stash_locale determinism problems Joe Slater (1): libtool: remove host information from libtool Jon Mason (1): oe_syslog.py: Handle syslogd/klogd restart race Joshua Watt (5): python3: Fix .pyc file reproduciblility oeqa: Test bitbake --skip-setsecene bitbake: bitbake: Add --skip-setscene option classes/icecc: Disable remote pre-processing by default scripts/buildstats-diff: Add option to filter tasks Joël Esponde (1): package.bbclass: fix directories setuid and setgid bits Jun Nie (1): kernel-fitimage: uboot-sign: fix missing signature Kai Kang (4): rng-tools: fix rngd blocks system shutdown openssl: fix multilib files conflict webkitgtk: set incomptible with tune mips defaultsetup.conf: enable select init manager Khem Raj (10): efibootmgr: Pass correct flags to compiler from pkg-config mpeg2dec: Fix PIE build and avoid relocation in text section on ARM Revert "unzip: fix CVE-2019-13232" musl: Upgrade to 1.1.23+ mdadm: Include sys/sysmacros.h for major/minor definitions sysvinit: Include sys/sysmacros.h for major/minor definitions on musl too pam_systemd: Include missing.h for secure_getenv musl-obstack: Add recipe elfutils: Fix eu-* utils builds for musl maintainers: Account for musl-obstack and libssp-nonshared Li Zhou (2): bc: dc: fix exit code of q command iptables: Security Advisory - iptables - CVE-2019-11360 Luca Boccassi (1): bitbake: tests/fetch.py: add missing skipIfNoNetwork tags to tests that try to git clone Matthias Schiffer (1): systemd: backport patch to fix sysctl warning on boot Mike Crowe (4): bitbake.conf: Stop exporting TARGET_ flags variables image.bbclass: Only append to IMAGE_LINK_NAME if it was already set rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_manifest rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_test_data Mikko Rapeli (3): busybox: enable unicode support cve-check.bbclass: initialize to_append freetype: add --tag CC to libtool arguments Mingli Yu (2): go.bbclass: separate the ptest logic to go-ptest class mdadm: fix ptest hang Oleksandr Kravchuk (34): mc: update to 4.8.23 encodings: update to 1.0.5 gawk: update to 5.0.1 libinput: update to 1.13.3 libxi: update to 1.7.10 libxt: update to 1.2.0 autoconf-archive: update to 2019.01.06 python3-mako: update to 1.0.12 python3-pbr: update to 5.3.1 python3-pygobject: update to 3.32.2 git: update to 2.22.0 eudev: update to 3.2.8 babeltrace: update to 1.5.7 dpkg: update to 1.19.7 apt: update to 1.2.31 libinput: update to 1.13.4 expat: update to 2.2.7 libsolf: update to 0.7.5 bison: update to 3.4.1 ruby: update to 2.5.5 quilt: update to 0.66 bzip2: update to 1.0.7 python3-mako: update to 1.0.13 ifupdown: update to 0.8.22 libdrm: update to 2.4.99 python3-pbr: update to 5.4.0 linux-firmware: bump to 20190618 iproute2: update to 5.2.0 udev-extraconf: do not mount swap partitions python3-pbr: update to 5.4.1 xinput: update to 1.6.3 python3-scons: update to 3.1.0 python3-docutils: update to 0.15 python3-mako: update to 1.0.14 Pascal Bach (1): cmake: 3.14.1 -> 3.14.5 Paul Eggleton (7): libcap-ng: do not use symlink to share files with libcap-ng-python scripts/contrib/ddimage: fix typo scripts/contrib/ddimage: replace blacklist with mount check scripts/contrib/ddimage: be explicit whether device doesn't exist or isn't writeable list-packageconfig-flags: print PN instead of P recipetool: ignore zero-length setup.py files devtool: upgrade: fix handling of errors parsing upgraded recipe Peter Kjellerstedt (4): glib-2.0: Update to 2.60.4 glibc-package.inc: Do not use bitbake variable syntax for shell variables meson.bbclass: Remove the MESON_*_ARGS variables nativesdk-meson: Remove some unused variables Pierre Le Magourou (10): cve-update-db: Use std library instead of urllib3 cve-update-db: Manage proxy if needed. cve-update-db: do_populate_cve_db depends on do_fetch cve-update-db: Catch request.urlopen errors. cve-check: Depends on cve-update-db-native cve-update-db: Use NVD CPE data to populate PRODUCTS table cve-check: Update unpatched CVE matching cve-update-db-native: Skip recipe when cve-check class is not loaded. cve-check: Replace CVE_CHECK_CVE_WHITELIST by CVE_CHECK_WHITELIST cve-update-db-native: Remove hash column from database. Ricardo Ribalda Delgado (4): nfs-mountd: Add missing dependency on systemd service systemd: Fix interface bring-up on kernels >= 5.2 wic: Fix (again) partition files UIDs on multi rootfs images systemd-bootconf: Mark as machine specific Ricardo Salveti (1): gcc-9.1: add back GLIBC_DYNAMIC_LINKER riscv changes Richard Purdie (58): multilib_global: Fix multilib rebuild issue multilib_global: Fix KERNEL_VERSION expansion problems sysklogd: Fix init script races busybox: Improve syslog restart handling oeqa/runtime/syslog: Improve test debug messages oeqa/runtime/oesyslog: systemd syslog restart doesn't change pid oeqa/runtime/syslog: Add delay to test to avoid failures busybox: Fix typo in syslog initscript pigz: Add debug for autobuilder errors staging: Code cleanup package: Build pkgdata specific to the current recipe Revert "pigz: Add debug for autobuilder errors" grub2: Drop unneeded code bitbake: event: Clear ui_queue after handling it bitbake: main: Ensure log messages are printed when no UI starts bitbake: main: Alter EOFError handling core-image-sato-sdk-ptest: Reduce image padding size due to bootimg 4GB limit oeqa/bbtests: Tweak test bitbake output pattern matching sstate: Add tweak to avoid multiple sstate stats messages bitbake: siggen: Fix default handler bitbake: siggen: Use unique hashes for tasks bitbake: runqueue: Tweak buildable variable handling in scheduler bitbake: runqueue: Drop unused BB_SETSCENE_VERIFY_FUNCTION2 bitbake: runqueue: Remove now uneeded code bitbake: runqueue: Move scenequeue data generation to a separate function bitbake: runqueue: Remove unused function parameter bitbake: runqueue: Factor out the process_setscene_whitelist checks bitbake: runqueue: Uniquely namespace the scenequeue functions bitbake: runqueue: Merge stats handling together for setscene/real tasks bitbake: runqueue: Merge scenequeue and real task queue code together bitbake: runqueue: Fix counter/task updating glitch bitbake: runqueue: Remove RunQueueExecuteScenequeue and RunQueueExecuteTasks bitbake: runqueue: Simplify _execute_runqueue logic bitbake: runqueue: Fold remains of the scenequeue setup into RunQueueExecute bitbake: event/runqueue: Drop StampUpdate event, its pointless/unused bitbake: runqueue: Add covered_tasks (or 'collated_deps') to scenequeue data bitbake: runqueue: Simplify scenequeue unskippable calculation bitbake: runqueue: Tweak comments and debug code bitbake: runqueue: Code simplification bitbake: runqueue: Remove pointless variable bitbake: runqueue: Further scheduler buildable tasks cleanup bitbake: runqueue: Clarify scenequeue_covered vs. tasks_covered bitbake: runqueue: Merge the queues and execute setscene and normal tasks in parallel bitbake: runqueue: Alter setscenewhitelist handling bitbake: runqueue: Complete the merge of scenequeue and normal task execution bitbake: tests: Add initial scenario based test for runqueue bitbake: uihelper: No longer listen to scenequeue task started bitbake: runqueue: Simplify some convoluted logic bitbake: runqueue: Whitespace fix bitbake: runqueue: Abstract hash verification function bitbake: runqueue: Optimise multiconfig with overlapping setscene bitbake: tests/runqueue: Allow common sstate tasks to become valid bitbake: runqueue: Fix non setscene tasks targets being lost staging: Drop clean_recipe_sysroot poky-lsb: Drop features already in poky poky-lsb: Drop libx11 PREFERRED_PROVIDER distro/include: Add poky-distro-alt-test-config.inc bitbake: siggen: Fix handling of tainted sig files Robert Yang (13): update-alternatives.bbclass: run update-alternatives firstly in postinst script busybox: make postinst run firstly before update-alternatives multilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipes bitbake: bitbake: lib: Cleanup /usr/bin/env python bitbake: bitbake: toaster:tests: python -> python3 ksum.py: python -> python3 wic: python2 -> python3 ext-sdk-prepare.py: python2 -> python3 oeqa: Cleanup /usr/bin/env python package_rpm.bbclass: python2 -> python3 bitbake: cache: Remove duplicated lines for provides and rprovides bitbake: cache: Set packages for skipped recipes bitbake: cache: Create a symlink for current cachefile Ross Burton (56): cve-check: be idiomatic gtk-icon-cache: rename intercept to update_gtk_icon_cache fortran-helloworld: add a very dumb Fortran Hello World for testing oeqa/buildoptions: check that Fortran code actually cross-compiles buildhistory: write the contents of the sysroot buildhistory: report sysroot changes perl: fix Upstream-Status tags efivar: ensure that target security flags are not used to build native code multilib_script: fix whitespace buildhistory_analysis: ignore ownership for sysroot diffs insane: use clean_path for the host contamination warnings libsndfile1: disable use of sqlite3 by default libsndfile1: remove redundant autoconf seeding buildhistory: don't output ownership for the sysroot buildhistory: filter out the unexpected prefix for native/cross sysroots alsa-utils: disable tools using GTK+2 packagegroup-core-lsb: remove GTK+ recipetool: add MD5 hash for the line-wrapped MPL-1.1 license oeqa/recipetool: change the CMake test to use taglib gtk+: remove GTK+ 2 gnome-themes-standard: remove Revert "sysstat: use service file from source codes" libpsl: update Upstream-Status grub: build with python 3 qemu: use Python 3 to build ninja: use Python 3 conf/poky: add debian-10 to the supported distribution list tiff: remove redundant patch tiff: fix CVE-2019-6128 tiff: fix CVE-2019-7663 cve-check: remove redundant readline CVE whitelisting cve-check-tool: remove glibc: exclude child recipes from CVE scanning libid3tag: CVE-2017-11551 is the same as CVE-2004-2779 libid3tag: handle unknown encodings (CVE-2017-11550) subversion: set CVE vendor to Apache boost: set CVE vendor to Boost git: set CVE vendor to git-scm ed: set CVE vendor to avoid false positives cve-check: allow comparison of Vendor as well as Product flex: set CVE_PRODUCT to include vendor cve-update-db-native: use SQL placeholders instead of format strings xkeyboard-config: remove redundant intltool dependency piglit: upgrade to latest revision pkgconf: upgrade 1.6.1 -> 1.6.3 conf/poky: add Fedora 30 and Opensuse Leap 15.1 to supported distributions cve-update-db-native: use os.path.join instead of + cve-update-db: actually inherit native cve-update-db-native: use executemany() to optimise CPE insertion cve-update-db-native: improve metadata parsing cve-update-db-native: clean up JSON fetching freetype: upgrade to 2.10.1 unfs3: set upstream tag regex to avoid false-positives meson.bbclass: export STRIP=${BUILD_STRIP} ffmpeg: don't use hardcoded lookup tables ffmpeg: upgrade to 4.1.4 Sai Hari Chandana Kalluri (3): devtool/standard.py: Update devtool modify to copy source from work-shared if its already downloaded devtool/standard.py: Create a copy of kernel source within work-shared if not present devtool: provide support for devtool menuconfig command Scott Rifenbark (5): overview-manual: Fixed manual history table sdk-manual: Updated devtool to talk about oe-local-files. dev-manual: Provided proper link title ref-manual: Fixed typo for BBMULTICONFIG variable. ref-manual: Removed "python2" mention in example. Stefan Agner (1): psplash: create psplash tmpfs mount directory in psplash-init Tim Orling (3): vulkan-headers: add recipe vulkan-loader: add recipe vulkan-tools: add recipe Ulrich Ölmann (1): squashfs-tools: upgrade to commit f95864afe883 William Bourque (2): wic/plugins: Source that support both EFI and BIOS meta/lib/oeqa: Test for bootimg-biosplusefi Source Yi Zhao (2): debianutils: upgrade 4.8.6.1 -> 4.8.6.3 ltp: upgrade 20190115 -> 20190517 Zang Ruochen (9): nss: upgrade 3.44 -> 3.44.1 util-linux:upgrade 2.33.2 -> 2.34 librepo:upgrade 1.10.3 -> 1.10.4 sqlite3: Upgrade 3.28.0 -> 3.29.0 nss: Upgrade 3.44.1 -> 3.45 xauth:upgrade 1.0.10 -> 1.1 libice:upgrade 1.0.9 -> 1.0.10 xwininfo:upgrade 1.1.4 -> 1.1.5 libpciaccess:upgrade 0.14 -> 0.16 meta-phosphor: fe8cee7488..601f253a66: Brad Bishop (1): meta-phosphor: systemd: remove upstreamed patches Change-Id: If591144821cd2e5b990a7aa49a1cf426f6a906de Signed-off-by: Brad Bishop --- poky/meta/recipes-graphics/piglit/piglit_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poky/meta/recipes-graphics/piglit/piglit_git.bb') diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb index 4350823f6..0b6519e3f 100644 --- a/poky/meta/recipes-graphics/piglit/piglit_git.bb +++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb @@ -2,13 +2,13 @@ SUMMARY = "OpenGL driver testing framework" LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" -SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit;protocol=https \ +SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \ file://0001-cmake-install-bash-completions-in-the-right-place.patch \ file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "4294b15e3b84a96f24d1286b73d5832eea267bbf" +SRCREV = "f0e868ac6fbdc295b2955c1b8f73169e7a52f938" # (when PV goes above 1.0 remove the trailing r) PV = "1.0+gitr${SRCPV}" -- cgit v1.2.3 From a34c030e5ec7021e7fb452410d38abfb3993ec68 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Mon, 23 Sep 2019 22:34:48 -0400 Subject: poky: subtree update:745e38ff0f..81f9e815d3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adrian Bunk (6): openssl: Upgrade 1.1.1c -> 1.1.1d glib-2.0: Upgrade 2.60.6 -> 2.60.7 lttng-modules: Upgrade 2.10.10 -> 2.10.11 lttng-ust: Upgrade 2.10.4 -> 2.10.5 squashfs-tools: Remove UPSTREAM_CHECK_COMMITS libmpc: Remove dead UPSTREAM_CHECK_URI Alexander Kanavin (2): runqemu: decouple gtk and gl options strace: add a timeout for running ptests Alistair Francis (1): gdb: Mark gdbserver as ALLOW_EMPTY for riscv32 Andre McCurdy (9): busybox: drop unused mount.busybox and umount.busybox wrappers busybox: drop inittab from SRC_URI ( now moved to busybox-inittab ) busybox-inittab: minor formatting tweaks base-files: drop legacy empty file /etc/default/usbd busybox: rcS and rcK should not be writeable by everyone ffmpeg: add PACKAGECONFIG controls for alsa and zlib (enable by default) libwebp: apply ARM specific config options to big endian ARM initscripts: enable alignment.sh init script for big endian ARM libunwind: apply configure over-ride to both big and little endian ARM Andrew F. Davis (4): libepoxy: Disable x11 when not building for x11 cogl: Set depends to the virtual needed not explicitly on Mesa gtk+3: Set depends to the virtual needed not explicitly on Mesa weston: Set depends to the virtual needed not explicitly on Mesa Armin Kuster (1): gcc: Security fix for CVE-2019-15847 Changhyeok Bae (1): iw: upgrade to 5.3 Changqing Li (2): classextend.py: don't extend file for file dependency report-error.bbclass: add local.conf/auto.conf into error report Chen Qi (1): python-numpy: fix build for libn32 Daniel Gomez (1): lttng-modules: Add missing SRCREV_FORMAT Diego Rondini (1): initramfs-framework: support PARTLABEL option Dmitry Eremin-Solenikov (7): image-uefi.conf: add config file holding configuration for UEFI images grub-bootconf: switch to image-uefi.conf grub-efi: switch to image-uefi.conf grub-efi.bbclass: switch to image-uefi.conf systemd-boot: switch to image-uefi.conf systemd-boot.bbclass: switch to image-uefi.conf live-vm-common.bbclass: provide efi population functions for live images Hector Palacios (1): udev-extraconf: skip mounting partitions already mounted by systemd Henning Schild (6): oe-git-proxy: allow setting SOCAT from outside oeqa: add case for oe-git-proxy Revert "oe-git-proxy: Avoid resolving NO_PROXY against local files" oe-git-proxy: disable shell pathname expansion for the whole script oe-git-proxy: NO_PROXY suffix matching without wildcard for match_host oe-git-proxy: fix dash "Bad substitution" Hongxu Jia (1): elfutils: 0.176 -> 0.177 Jack Mitchell (1): iptables: add systemd helper unit to load/restore rules Jaewon Lee (1): populate_sdk_ext: Introduce mechanism to keep nativesdk* sstate in esdk Jason Wessel (1): gnupg: Extend -native wrapper to fix gpgme-native's gpgconf problems Jiang Lu (2): glib-networking:enable glib-networking build as native package libsoup:enable libsoup build as native package Joshua Watt (4): sstatesig: Update server URI Remove SSTATE_HASHEQUIV_SERVER bitbake: bitbake: Rework hash equivalence classes/archiver: Fix WORKDIR for shared source Kai Kang (1): systemd: provides ${base_sbindir}/udevadm Khem Raj (10): ptrace: Drop ptrace aid for musl/ppc elfutils: Fix build on ppc/musl cogl: Do not depend PN-dev on empty PN musl: Update to latest master glibc: Move DISTRO_FEATURE specific do_install code for target recipe only populate_sdk_base.bbclass: nativesdk-glibc-locale is required on musl too nativesdk.bbclass: Clear out LIBCEXTENSION and ABIEXTENSION openssl: Enable os option for with-rand-seed as well weston-init: Add possibility to run weston as non-root user layer.conf: Remove weston-conf from SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS Li Zhou (1): qemu: Security Advisory - qemu - CVE-2019-15890 Limeng (1): tune-cortexa57-cortexa53: add tunes for ARM Cortex-A53-Cortex-A57 Martin Jansa (2): perf: fix build on kernels which don't have ${S}/tools/include/linux/bits.h bitbake: Revert "bitbake: cooker: Ensure bbappends are found in stable order" Maxime Roussin-Bélanger (1): meta: add missing descriptions and homepage in bsp Mikko Rapeli (2): busybox.inc: handle empty DEBUG_PREFIX_MAP bitbake: svn fetcher: allow "svn propget svn:externals" to fail Nathan Rossi (7): resulttool: Handle multiple series containing ptestresults gcc-cross.inc: Process binaries in build dir to be relocatable oeqa/core/case.py: Add OEPTestResultTestCase for ptestresult helpers oeqa/selftest: Rework toolchain tests to use OEPTestResultTestCase glibc-testsuite: SkipRecipe if libc is not glibc cmake: 3.15.2 -> 3.15.3 meson.bbclass: Handle microblaze* mapping to cpu family Oleksandr Kravchuk (5): python3-pygobject: update to 3.34.0 font-util: update to 1.3.2 expat: update to 2.2.8 curl: update to 7.66.0 python3-dbus: update to 1.2.12 Otavio Salvador (1): mesa: Upgrade 19.1.1 -> 19.1.6 Peter Kjellerstedt (3): glibc: Make it build without ldconfig in DISTRO_FEATURES package_rpm.bbclass: Remove a misleading bb.note() tzdata: Correct the packaging of /etc/localtime and /etc/timezone Quentin Schulz (1): externalsrc: stop rebuilds of 2+ externalsrc recipes sharing the same git repo Randy MacLeod (4): valgrind: enable ~500 more ptests valgrind: make a few more ptests pass valgrind: ptest improvements to run-ptest and more valgrind: disable 256 ptests for aarch64 Richard Purdie (8): bitbake: runqueue/siggen: Optimise hash equiv queries runqemu: Mention snapshot in the help output initramfs-framework: support PARTLABEL option systemd: Handle slow to boot mips hwdb update timeouts meta-extsdk: Either an sstate task is a proper task or it isn't oeqa/concurrenttest: Use ionice to delete build directories bitbake: utils: Add ionice option to prunedir build-appliance-image: Update to master head revision Robert Yang (2): conf/multilib.conf: Add ovmf to NON_MULTILIB_RECIPES bitbake: runqueue: validate_hashes(): currentcount should be a number Ross Burton (16): libtasn1: fix build with api-documentation enabled gstreamer1.0-libav: enable gtk-doc again python3: handle STAGING_LIBDIR/INCDIR being unset mesa: no need to depend on target python3 adwaita-icon-theme: fix rare install race oeqa/selftest/wic: improve assert messages in test_fixed_size oeqa/selftest/imagefeatures: dump the JSON if it can't be parsed libical: upgrade to 3.0.6 acpica: upgrade 20190509 -> 20190816 gdk-pixbuf: upgrade 2.38.1 -> 2.38.2 piglit: upgrade to latest revision libinput: upgrade 1.14.0 -> 1.14.1 rootfs-postcommands: check /etc/gconf exists before working on it systemd-systemctl-native: don't care about line endings opkg-utils: respect SOURCE_DATE_EPOCH when building ipkgs bitbake: fetch2/git: add git-lfs toggle option Scott Murray (1): systemd: upgrade to 243 Stefan Ghinea (1): ghostscript: CVE-2019-14811, CVE-2019-14817 Tim Blechmann (1): icecc: blacklist pixman Yeoh Ee Peng (3): bitbake: bitbake-layers: show-recipes: Show recipes only bitbake: bitbake-layers: show-recipes: Select recipes from selected layer bitbake: bitbake-layers: show-recipes: Enable bare output Yi Zhao (3): screen: add /etc/screenrc as global config file nfs-utils: fix nfs mount error on 32bit nfs server grub: remove diffutils and freetype runtime dependencies Zang Ruochen (2): btrfs-tools:upgrade 5.2.1 -> 5.2.2 timezone:upgrade 2019b -> 2019c Change-Id: I1ec24480a8964e474cd99d60a0cb0975e49b46b8 Signed-off-by: Brad Bishop --- poky/bitbake/bin/bitbake-hashclient | 170 +++++ poky/bitbake/bin/bitbake-hashserv | 24 +- poky/bitbake/bin/bitbake-worker | 2 +- poky/bitbake/lib/bb/cooker.py | 18 +- poky/bitbake/lib/bb/fetch2/git.py | 18 +- poky/bitbake/lib/bb/fetch2/svn.py | 2 +- poky/bitbake/lib/bb/runqueue.py | 11 +- poky/bitbake/lib/bb/siggen.py | 84 ++- poky/bitbake/lib/bb/tests/runqueue.py | 19 +- poky/bitbake/lib/bb/utils.py | 11 +- poky/bitbake/lib/bblayers/query.py | 39 +- poky/bitbake/lib/hashserv/__init__.py | 261 ++------ poky/bitbake/lib/hashserv/client.py | 156 +++++ poky/bitbake/lib/hashserv/server.py | 414 +++++++++++++ poky/bitbake/lib/hashserv/tests.py | 159 ++--- poky/meta/classes/archiver.bbclass | 5 +- poky/meta/classes/externalsrc.bbclass | 2 +- poky/meta/classes/grub-efi-cfg.bbclass | 1 - poky/meta/classes/grub-efi.bbclass | 42 +- poky/meta/classes/icecc.bbclass | 3 + poky/meta/classes/live-vm-common.bbclass | 33 + poky/meta/classes/meson.bbclass | 2 + poky/meta/classes/multilib.bbclass | 2 +- poky/meta/classes/nativesdk.bbclass | 2 + poky/meta/classes/package_rpm.bbclass | 5 +- poky/meta/classes/populate_sdk_base.bbclass | 2 +- poky/meta/classes/populate_sdk_ext.bbclass | 28 +- poky/meta/classes/report-error.bbclass | 15 + poky/meta/classes/rootfs-postcommands.bbclass | 6 +- poky/meta/classes/sstate.bbclass | 5 - poky/meta/classes/systemd-boot.bbclass | 31 +- poky/meta/conf/bitbake.conf | 2 +- poky/meta/conf/distro/include/maintainers.inc | 1 - poky/meta/conf/image-uefi.conf | 16 + poky/meta/conf/layer.conf | 2 +- .../machine/include/tune-cortexa57-cortexa53.inc | 18 + poky/meta/conf/multilib.conf | 2 +- poky/meta/lib/oe/classextend.py | 2 + poky/meta/lib/oe/copy_buildsystem.py | 8 +- poky/meta/lib/oe/sstatesig.py | 8 +- poky/meta/lib/oeqa/core/case.py | 49 ++ poky/meta/lib/oeqa/core/utils/concurrencytest.py | 2 +- poky/meta/lib/oeqa/selftest/cases/binutils.py | 11 +- poky/meta/lib/oeqa/selftest/cases/gcc.py | 9 +- poky/meta/lib/oeqa/selftest/cases/glibc.py | 7 +- poky/meta/lib/oeqa/selftest/cases/imagefeatures.py | 3 +- poky/meta/lib/oeqa/selftest/cases/oescripts.py | 58 ++ poky/meta/lib/oeqa/selftest/cases/runtime_test.py | 2 +- poky/meta/lib/oeqa/selftest/cases/wic.py | 6 +- poky/meta/recipes-bsp/acpid/acpid.inc | 6 + poky/meta/recipes-bsp/formfactor/formfactor_0.0.bb | 3 + poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb | 13 +- poky/meta/recipes-bsp/grub/grub-efi_2.04.bb | 19 +- poky/meta/recipes-bsp/grub/grub_2.04.bb | 2 +- poky/meta/recipes-bsp/u-boot/u-boot-common.inc | 4 + poky/meta/recipes-bsp/usbinit/usbinit.bb | 4 + poky/meta/recipes-connectivity/iw/iw_5.0.1.bb | 33 - poky/meta/recipes-connectivity/iw/iw_5.3.bb | 32 + ...include-order-between-config.h-and-stat.h.patch | 156 +++++ .../nfs-utils/nfs-utils_2.4.1.bb | 1 + .../0001-Fix-broken-change-from-b3d113e.patch | 35 -- ...01-Fix-build-error-for-aarch64-big-endian.patch | 43 -- .../recipes-connectivity/openssl/openssl_1.1.1c.bb | 206 ------ .../recipes-connectivity/openssl/openssl_1.1.1d.bb | 204 ++++++ poky/meta/recipes-core/base-files/base-files/usbd | 0 .../recipes-core/base-files/base-files_3.0.14.bb | 2 - .../recipes-core/busybox/busybox-inittab_1.31.0.bb | 19 +- poky/meta/recipes-core/busybox/busybox.inc | 9 +- poky/meta/recipes-core/busybox/busybox_1.31.0.bb | 3 - poky/meta/recipes-core/busybox/files/mount.busybox | 3 - .../meta/recipes-core/busybox/files/umount.busybox | 3 - poky/meta/recipes-core/expat/expat_2.2.7.bb | 22 - poky/meta/recipes-core/expat/expat_2.2.8.bb | 22 + poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.6.bb | 25 - poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.7.bb | 25 + .../glib-networking/glib-networking_2.60.3.bb | 2 + poky/meta/recipes-core/glibc/glibc-package.inc | 37 +- .../recipes-core/glibc/glibc-testsuite_2.30.bb | 7 + .../images/build-appliance-image_15.0.0.bb | 2 +- .../initrdscripts/initramfs-framework/rootfs | 5 + .../initscripts/initscripts-1.0/alignment.sh | 13 + .../initscripts/initscripts-1.0/arm/alignment.sh | 13 - .../recipes-core/initscripts/initscripts_1.0.bb | 1 + .../recipes-core/meta/meta-extsdk-toolchain.bb | 5 + poky/meta/recipes-core/musl/musl_git.bb | 2 +- poky/meta/recipes-core/systemd/systemd-boot_242.bb | 73 --- poky/meta/recipes-core/systemd/systemd-boot_243.bb | 70 +++ poky/meta/recipes-core/systemd/systemd-conf_242.bb | 38 -- poky/meta/recipes-core/systemd/systemd-conf_243.bb | 38 ++ .../systemd/systemd-systemctl/systemctl | 2 +- poky/meta/recipes-core/systemd/systemd.inc | 4 +- ...-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch | 50 -- ...t-install-dependency-links-at-install-tim.patch | 17 +- ...01-do-not-disable-buffer-in-writing-files.patch | 148 ++--- ...udev-udev-event.c-must-include-sys-wait.h.patch | 35 -- ...src-login-brightness.c-include-sys-wait.h.patch | 25 + ...pper-instead-of-looking-for-relative-opti.patch | 23 +- .../0003-src-basic-copy.c-include-signal.h.patch | 27 + ...llback-parse_printf_format-implementation.patch | 15 +- .../systemd/0004-rules-whitelist-hd-devices.patch | 11 +- ...-cpu-set-util.h-add-__cpu_mask-definition.patch | 54 ++ ...les-watch-metadata-changes-in-ide-devices.patch | 16 +- ...asic-missing.h-check-for-missing-strndupa.patch | 139 ++++- .../systemd/0006-Include-netinet-if_ether.h.patch | 195 +++++- ...-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch | 26 +- ...ble-buffering-when-writing-to-oom_score_a.patch | 12 +- .../0023-socket-util.h-include-string.h.patch | 30 - ...025-fs-utilh-add-missing-sys-stat-include.patch | 30 - poky/meta/recipes-core/systemd/systemd_242.bb | 679 -------------------- poky/meta/recipes-core/systemd/systemd_243.bb | 687 +++++++++++++++++++++ .../meta/recipes-core/udev/udev-extraconf/mount.sh | 6 + .../btrfs-tools/btrfs-tools_5.2.1.bb | 52 -- .../btrfs-tools/btrfs-tools_5.2.2.bb | 52 ++ .../recipes-devtools/cmake/cmake-native_3.15.2.bb | 52 -- .../recipes-devtools/cmake/cmake-native_3.15.3.bb | 52 ++ poky/meta/recipes-devtools/cmake/cmake.inc | 4 +- poky/meta/recipes-devtools/cmake/cmake_3.15.2.bb | 53 -- poky/meta/recipes-devtools/cmake/cmake_3.15.3.bb | 53 ++ .../recipes-devtools/elfutils/elfutils_0.176.bb | 145 ----- .../recipes-devtools/elfutils/elfutils_0.177.bb | 148 +++++ ....c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch | 32 + ...ferences-between-mips-machine-identifiers.patch | 12 +- ...1-fix-compile-failure-with-debian-patches.patch | 48 ++ ...-support-for-mips64-abis-in-mips_retval.c.patch | 13 +- .../0003-Add-mips-n64-relocation-format-hack.patch | 60 +- .../elfutils/files/debian/arm_backend.diff | 39 +- .../elfutils/files/debian/disable_werror.patch | 19 +- .../elfutils/files/debian/hppa_backend.diff | 57 +- .../elfutils/files/debian/hurd_path.patch | 17 +- .../elfutils/files/debian/ignore_strmerge.diff | 15 +- .../elfutils/files/debian/kfreebsd_path.patch | 13 +- .../elfutils/files/debian/mips_backend.diff | 42 +- .../elfutils/files/debian/mips_cfi.patch | 131 ++++ .../elfutils/files/debian/mips_readelf_w.patch | 22 +- .../files/debian/testsuite-ignore-elflint.diff | 20 +- .../elfutils/files/musl-libs.patch | 39 +- .../elfutils/files/musl-obstack-fts.patch | 29 +- .../elfutils/files/musl-utils.patch | 37 +- poky/meta/recipes-devtools/gcc/gcc-9.2.inc | 3 + .../gcc/gcc-9.2/CVE-2019-15847_1.patch | 521 ++++++++++++++++ .../gcc/gcc-9.2/CVE-2019-15847_2.patch | 77 +++ .../gcc/gcc-9.2/CVE-2019-15847_3.patch | 62 ++ poky/meta/recipes-devtools/gcc/gcc-cross.inc | 10 +- poky/meta/recipes-devtools/gdb/gdb.inc | 1 + ...g-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch | 44 ++ .../opkg-utils/opkg-utils_0.4.1.bb | 1 + .../files/mipsarchn32eb/_numpyconfig.h | 1 + .../recipes-devtools/python/python3-dbus_1.2.10.bb | 26 - .../recipes-devtools/python/python3-dbus_1.2.12.bb | 26 + .../python/python3-pygobject_3.32.2.bb | 33 - .../python/python3-pygobject_3.34.0.bb | 33 + ...2-distutils-prefix-is-inside-staging-area.patch | 28 +- poky/meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2019-15890.patch | 48 ++ .../squashfs-tools/squashfs-tools_git.bb | 1 - ...hen-using-non-glibc-libc-implementation-o.patch | 31 - poky/meta/recipes-devtools/strace/strace/run-ptest | 1 + poky/meta/recipes-devtools/strace/strace_5.2.bb | 1 - ...1-adjust-path-filter-for-2-memcheck-tests.patch | 40 ++ .../valgrind/valgrind/remove-for-aarch64 | 236 +++++++ .../recipes-devtools/valgrind/valgrind/run-ptest | 43 +- .../recipes-devtools/valgrind/valgrind_3.15.0.bb | 54 +- .../recipes-extended/acpica/acpica_20190509.bb | 49 -- .../recipes-extended/acpica/acpica_20190816.bb | 49 ++ .../ghostscript/CVE-2019-14811-0001.patch | 68 ++ .../ghostscript/CVE-2019-14817-0001.patch | 270 ++++++++ .../ghostscript/CVE-2019-14817-0002.patch | 236 +++++++ .../ghostscript/ghostscript_9.27.bb | 3 + .../iptables/iptables/iptables.rules | 0 .../iptables/iptables/iptables.service | 13 + .../recipes-extended/iptables/iptables_1.8.3.bb | 17 +- poky/meta/recipes-extended/screen/screen_4.6.2.bb | 3 +- poky/meta/recipes-extended/timezone/timezone.inc | 10 +- poky/meta/recipes-extended/timezone/tzdata.bb | 5 +- .../recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.1.bb | 123 ---- .../recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb | 123 ++++ ...1-Run-installation-commands-as-shell-jobs.patch | 12 +- poky/meta/recipes-gnome/gtk+/gtk+3.inc | 2 +- poky/meta/recipes-graphics/cogl/cogl-1.0.inc | 4 +- .../recipes-graphics/libepoxy/libepoxy_1.5.3.bb | 2 +- ...-check-for-all-linux-host_os-combinations.patch | 37 +- ...2-meson.build-make-TLS-GLX-optional-again.patch | 12 +- ...0003-Allow-enable-DRI-without-DRI-drivers.patch | 10 +- poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb | 10 - poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb | 10 + poky/meta/recipes-graphics/mesa/mesa.inc | 5 + poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb | 20 - poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb | 20 + poky/meta/recipes-graphics/piglit/piglit_git.bb | 2 +- .../recipes-graphics/wayland/libinput_1.14.0.bb | 29 - .../recipes-graphics/wayland/libinput_1.14.1.bb | 32 + poky/meta/recipes-graphics/wayland/weston-conf.bb | 35 -- poky/meta/recipes-graphics/wayland/weston-init.bb | 28 +- .../wayland/weston-init/71-weston-drm.rules | 2 + .../wayland/weston-init/qemux86-64/weston.ini | 2 + .../wayland/weston-init/qemux86/weston.ini | 2 + .../wayland/weston-init/weston.ini | 74 +++ .../wayland/weston-init/weston.service | 13 - .../wayland/weston-init/weston@.service | 37 ++ poky/meta/recipes-graphics/wayland/weston_7.0.0.bb | 6 +- .../recipes-graphics/xorg-font/font-util_1.3.1.bb | 22 - .../recipes-graphics/xorg-font/font-util_1.3.2.bb | 22 + .../recipes-kernel/lttng/lttng-modules_2.10.10.bb | 45 -- .../recipes-kernel/lttng/lttng-modules_2.10.11.bb | 46 ++ ...-Add-config-time-check-for-new-gettid-API.patch | 57 -- poky/meta/recipes-kernel/lttng/lttng-ust_2.10.4.bb | 49 -- poky/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb | 48 ++ poky/meta/recipes-kernel/perf/perf.bb | 4 +- poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.bb | 8 +- .../gstreamer1.0-libav/gtkdoc-no-tree.patch | 35 ++ .../gstreamer/gstreamer1.0-libav_1.16.0.bb | 6 +- poky/meta/recipes-multimedia/webp/libwebp_1.0.3.bb | 5 +- poky/meta/recipes-support/curl/curl_7.65.3.bb | 80 --- poky/meta/recipes-support/curl/curl_7.66.0.bb | 80 +++ poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb | 3 + .../gnutls/libtasn1/fix-gtkdoc.patch | 38 ++ poky/meta/recipes-support/gnutls/libtasn1_4.14.bb | 1 + poky/meta/recipes-support/libical/libical_3.0.5.bb | 35 -- poky/meta/recipes-support/libical/libical_3.0.6.bb | 35 ++ poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb | 2 - .../recipes-support/libsoup/libsoup-2.4_2.66.2.bb | 2 + poky/meta/recipes-support/libunwind/libunwind.inc | 1 + poky/scripts/lib/resulttool/log.py | 43 +- poky/scripts/lib/resulttool/report.py | 44 +- poky/scripts/lib/resulttool/resultutils.py | 45 +- poky/scripts/oe-git-proxy | 21 +- poky/scripts/runqemu | 22 +- 227 files changed, 6571 insertions(+), 3390 deletions(-) create mode 100755 poky/bitbake/bin/bitbake-hashclient create mode 100644 poky/bitbake/lib/hashserv/client.py create mode 100644 poky/bitbake/lib/hashserv/server.py create mode 100644 poky/meta/conf/image-uefi.conf create mode 100644 poky/meta/conf/machine/include/tune-cortexa57-cortexa53.inc delete mode 100644 poky/meta/recipes-connectivity/iw/iw_5.0.1.bb create mode 100644 poky/meta/recipes-connectivity/iw/iw_5.3.bb create mode 100644 poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch delete mode 100644 poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch delete mode 100644 poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-error-for-aarch64-big-endian.patch delete mode 100644 poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb create mode 100644 poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb delete mode 100644 poky/meta/recipes-core/base-files/base-files/usbd delete mode 100755 poky/meta/recipes-core/busybox/files/mount.busybox delete mode 100755 poky/meta/recipes-core/busybox/files/umount.busybox delete mode 100644 poky/meta/recipes-core/expat/expat_2.2.7.bb create mode 100644 poky/meta/recipes-core/expat/expat_2.2.8.bb delete mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.6.bb create mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.7.bb create mode 100644 poky/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh delete mode 100644 poky/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh delete mode 100644 poky/meta/recipes-core/systemd/systemd-boot_242.bb create mode 100644 poky/meta/recipes-core/systemd/systemd-boot_243.bb delete mode 100644 poky/meta/recipes-core/systemd/systemd-conf_242.bb create mode 100644 poky/meta/recipes-core/systemd/systemd-conf_243.bb delete mode 100644 poky/meta/recipes-core/systemd/systemd/0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0001-src-udev-udev-event.c-must-include-sys-wait.h.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0023-socket-util.h-include-string.h.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd_242.bb create mode 100644 poky/meta/recipes-core/systemd/systemd_243.bb delete mode 100644 poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.1.bb create mode 100644 poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.2.bb delete mode 100644 poky/meta/recipes-devtools/cmake/cmake-native_3.15.2.bb create mode 100644 poky/meta/recipes-devtools/cmake/cmake-native_3.15.3.bb delete mode 100644 poky/meta/recipes-devtools/cmake/cmake_3.15.2.bb create mode 100644 poky/meta/recipes-devtools/cmake/cmake_3.15.3.bb delete mode 100644 poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb create mode 100644 poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb create mode 100644 poky/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch create mode 100644 poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch create mode 100644 poky/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch create mode 100644 poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch create mode 100644 poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch create mode 100644 poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch create mode 100644 poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch delete mode 100644 poky/meta/recipes-devtools/python/python3-dbus_1.2.10.bb create mode 100644 poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb delete mode 100644 poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb create mode 100644 poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb create mode 100644 poky/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch delete mode 100644 poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 delete mode 100644 poky/meta/recipes-extended/acpica/acpica_20190509.bb create mode 100644 poky/meta/recipes-extended/acpica/acpica_20190816.bb create mode 100644 poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14811-0001.patch create mode 100644 poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0001.patch create mode 100644 poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0002.patch create mode 100644 poky/meta/recipes-extended/iptables/iptables/iptables.rules create mode 100644 poky/meta/recipes-extended/iptables/iptables/iptables.service delete mode 100644 poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.1.bb create mode 100644 poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb delete mode 100644 poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb create mode 100644 poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb delete mode 100644 poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb create mode 100644 poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb delete mode 100644 poky/meta/recipes-graphics/wayland/libinput_1.14.0.bb create mode 100644 poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb delete mode 100644 poky/meta/recipes-graphics/wayland/weston-conf.bb create mode 100644 poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules create mode 100644 poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini create mode 100644 poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini create mode 100644 poky/meta/recipes-graphics/wayland/weston-init/weston.ini delete mode 100644 poky/meta/recipes-graphics/wayland/weston-init/weston.service create mode 100644 poky/meta/recipes-graphics/wayland/weston-init/weston@.service delete mode 100644 poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb create mode 100644 poky/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-ust/0001-Add-config-time-check-for-new-gettid-API.patch delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-ust_2.10.4.bb create mode 100644 poky/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb create mode 100644 poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch delete mode 100644 poky/meta/recipes-support/curl/curl_7.65.3.bb create mode 100644 poky/meta/recipes-support/curl/curl_7.66.0.bb create mode 100644 poky/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch delete mode 100644 poky/meta/recipes-support/libical/libical_3.0.5.bb create mode 100644 poky/meta/recipes-support/libical/libical_3.0.6.bb (limited to 'poky/meta/recipes-graphics/piglit/piglit_git.bb') diff --git a/poky/bitbake/bin/bitbake-hashclient b/poky/bitbake/bin/bitbake-hashclient new file mode 100755 index 000000000..29ab65f17 --- /dev/null +++ b/poky/bitbake/bin/bitbake-hashclient @@ -0,0 +1,170 @@ +#! /usr/bin/env python3 +# +# Copyright (C) 2019 Garmin Ltd. +# +# SPDX-License-Identifier: GPL-2.0-only +# + +import argparse +import hashlib +import logging +import os +import pprint +import sys +import threading +import time + +try: + import tqdm + ProgressBar = tqdm.tqdm +except ImportError: + class ProgressBar(object): + def __init__(self, *args, **kwargs): + pass + + def __enter__(self): + return self + + def __exit__(self, *args, **kwargs): + pass + + def update(self): + pass + +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib')) + +import hashserv + +DEFAULT_ADDRESS = 'unix://./hashserve.sock' +METHOD = 'stress.test.method' + + +def main(): + def handle_stats(args, client): + if args.reset: + s = client.reset_stats() + else: + s = client.get_stats() + pprint.pprint(s) + return 0 + + def handle_stress(args, client): + def thread_main(pbar, lock): + nonlocal found_hashes + nonlocal missed_hashes + nonlocal max_time + + client = hashserv.create_client(args.address) + + for i in range(args.requests): + taskhash = hashlib.sha256() + taskhash.update(args.taskhash_seed.encode('utf-8')) + taskhash.update(str(i).encode('utf-8')) + + start_time = time.perf_counter() + l = client.get_unihash(METHOD, taskhash.hexdigest()) + elapsed = time.perf_counter() - start_time + + with lock: + if l: + found_hashes += 1 + else: + missed_hashes += 1 + + max_time = max(elapsed, max_time) + pbar.update() + + max_time = 0 + found_hashes = 0 + missed_hashes = 0 + lock = threading.Lock() + total_requests = args.clients * args.requests + start_time = time.perf_counter() + with ProgressBar(total=total_requests) as pbar: + threads = [threading.Thread(target=thread_main, args=(pbar, lock), daemon=False) for _ in range(args.clients)] + for t in threads: + t.start() + + for t in threads: + t.join() + + elapsed = time.perf_counter() - start_time + with lock: + print("%d requests in %.1fs. %.1f requests per second" % (total_requests, elapsed, total_requests / elapsed)) + print("Average request time %.8fs" % (elapsed / total_requests)) + print("Max request time was %.8fs" % max_time) + print("Found %d hashes, missed %d" % (found_hashes, missed_hashes)) + + if args.report: + with ProgressBar(total=args.requests) as pbar: + for i in range(args.requests): + taskhash = hashlib.sha256() + taskhash.update(args.taskhash_seed.encode('utf-8')) + taskhash.update(str(i).encode('utf-8')) + + outhash = hashlib.sha256() + outhash.update(args.outhash_seed.encode('utf-8')) + outhash.update(str(i).encode('utf-8')) + + client.report_unihash(taskhash.hexdigest(), METHOD, outhash.hexdigest(), taskhash.hexdigest()) + + with lock: + pbar.update() + + parser = argparse.ArgumentParser(description='Hash Equivalence Client') + parser.add_argument('--address', default=DEFAULT_ADDRESS, help='Server address (default "%(default)s")') + parser.add_argument('--log', default='WARNING', help='Set logging level') + + subparsers = parser.add_subparsers() + + stats_parser = subparsers.add_parser('stats', help='Show server stats') + stats_parser.add_argument('--reset', action='store_true', + help='Reset server stats') + stats_parser.set_defaults(func=handle_stats) + + stress_parser = subparsers.add_parser('stress', help='Run stress test') + stress_parser.add_argument('--clients', type=int, default=10, + help='Number of simultaneous clients') + stress_parser.add_argument('--requests', type=int, default=1000, + help='Number of requests each client will perform') + stress_parser.add_argument('--report', action='store_true', + help='Report new hashes') + stress_parser.add_argument('--taskhash-seed', default='', + help='Include string in taskhash') + stress_parser.add_argument('--outhash-seed', default='', + help='Include string in outhash') + stress_parser.set_defaults(func=handle_stress) + + args = parser.parse_args() + + logger = logging.getLogger('hashserv') + + level = getattr(logging, args.log.upper(), None) + if not isinstance(level, int): + raise ValueError('Invalid log level: %s' % args.log) + + logger.setLevel(level) + console = logging.StreamHandler() + console.setLevel(level) + logger.addHandler(console) + + func = getattr(args, 'func', None) + if func: + client = hashserv.create_client(args.address) + # Try to establish a connection to the server now to detect failures + # early + client.connect() + + return func(args, client) + + return 0 + + +if __name__ == '__main__': + try: + ret = main() + except Exception: + ret = 1 + import traceback + traceback.print_exc() + sys.exit(ret) diff --git a/poky/bitbake/bin/bitbake-hashserv b/poky/bitbake/bin/bitbake-hashserv index 6c911c098..1bc1f91f3 100755 --- a/poky/bitbake/bin/bitbake-hashserv +++ b/poky/bitbake/bin/bitbake-hashserv @@ -11,20 +11,26 @@ import logging import argparse import sqlite3 -sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),'lib')) +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib')) import hashserv VERSION = "1.0.0" -DEFAULT_HOST = '' -DEFAULT_PORT = 8686 +DEFAULT_BIND = 'unix://./hashserve.sock' + def main(): - parser = argparse.ArgumentParser(description='HTTP Equivalence Reference Server. Version=%s' % VERSION) - parser.add_argument('--address', default=DEFAULT_HOST, help='Bind address (default "%(default)s")') - parser.add_argument('--port', type=int, default=DEFAULT_PORT, help='Bind port (default %(default)d)') - parser.add_argument('--prefix', default='', help='HTTP path prefix (default "%(default)s")') + parser = argparse.ArgumentParser(description='Hash Equivalence Reference Server. Version=%s' % VERSION, + epilog='''The bind address is the path to a unix domain socket if it is + prefixed with "unix://". Otherwise, it is an IP address + and port in form ADDRESS:PORT. To bind to all addresses, leave + the ADDRESS empty, e.g. "--bind :8686". To bind to a specific + IPv6 address, enclose the address in "[]", e.g. + "--bind [::1]:8686"''' + ) + + parser.add_argument('--bind', default=DEFAULT_BIND, help='Bind address (default "%(default)s")') parser.add_argument('--database', default='./hashserv.db', help='Database file (default "%(default)s")') parser.add_argument('--log', default='WARNING', help='Set logging level') @@ -41,10 +47,11 @@ def main(): console.setLevel(level) logger.addHandler(console) - server = hashserv.create_server((args.address, args.port), args.database, args.prefix) + server = hashserv.create_server(args.bind, args.database) server.serve_forever() return 0 + if __name__ == '__main__': try: ret = main() @@ -53,4 +60,3 @@ if __name__ == '__main__': import traceback traceback.print_exc() sys.exit(ret) - diff --git a/poky/bitbake/bin/bitbake-worker b/poky/bitbake/bin/bitbake-worker index 96369199f..6776cadda 100755 --- a/poky/bitbake/bin/bitbake-worker +++ b/poky/bitbake/bin/bitbake-worker @@ -418,7 +418,7 @@ class BitbakeWorker(object): bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"] for mc in self.databuilder.mcdata: self.databuilder.mcdata[mc].setVar("PRSERV_HOST", self.workerdata["prhost"]) - self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.workerdata["hashservport"]) + self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.workerdata["hashservaddr"]) def handle_newtaskhashes(self, data): self.workerdata["newhashes"] = pickle.loads(data) diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py index 5840aa75e..0c540028a 100644 --- a/poky/bitbake/lib/bb/cooker.py +++ b/poky/bitbake/lib/bb/cooker.py @@ -194,7 +194,7 @@ class BBCooker: self.ui_cmdline = None self.hashserv = None - self.hashservport = None + self.hashservaddr = None self.initConfigurationData() @@ -392,19 +392,20 @@ class BBCooker: except prserv.serv.PRServiceConfigError as e: bb.fatal("Unable to start PR Server, exitting") - if self.data.getVar("BB_HASHSERVE") == "localhost:0": + if self.data.getVar("BB_HASHSERVE") == "auto": + # Create a new hash server bound to a unix domain socket if not self.hashserv: dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db" - self.hashserv = hashserv.create_server(('localhost', 0), dbfile, '') - self.hashservport = "localhost:" + str(self.hashserv.server_port) + self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR") + self.hashserv = hashserv.create_server(self.hashservaddr, dbfile, sync=False) self.hashserv.process = multiprocessing.Process(target=self.hashserv.serve_forever) self.hashserv.process.daemon = True self.hashserv.process.start() - self.data.setVar("BB_HASHSERVE", self.hashservport) - self.databuilder.origdata.setVar("BB_HASHSERVE", self.hashservport) - self.databuilder.data.setVar("BB_HASHSERVE", self.hashservport) + self.data.setVar("BB_HASHSERVE", self.hashservaddr) + self.databuilder.origdata.setVar("BB_HASHSERVE", self.hashservaddr) + self.databuilder.data.setVar("BB_HASHSERVE", self.hashservaddr) for mc in self.databuilder.mcdata: - self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.hashservport) + self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.hashservaddr) bb.parse.init_parser(self.data) @@ -1852,7 +1853,6 @@ class CookerCollectFiles(object): (bbappend, filename) = b if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])): filelist.append(filename) - filelist.sort() return filelist def collection_priorities(self, pkgfns, d): diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py index e171aa7eb..5fd63b4e3 100644 --- a/poky/bitbake/lib/bb/fetch2/git.py +++ b/poky/bitbake/lib/bb/fetch2/git.py @@ -464,6 +464,8 @@ class Git(FetchMethod): if os.path.exists(destdir): bb.utils.prunedir(destdir) + need_lfs = ud.parm.get("lfs", "1") == "1" + source_found = False source_error = [] @@ -493,14 +495,16 @@ class Git(FetchMethod): runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d, workdir=destdir) if self._contains_lfs(ud, d, destdir): - path = d.getVar('PATH') - if path: - gitlfstool = bb.utils.which(path, "git-lfs", executable=True) - if not gitlfstool: - raise bb.fetch2.FetchError("Repository %s has lfs content, install git-lfs plugin on host to download" % (repourl)) + if need_lfs: + path = d.getVar('PATH') + if path: + gitlfstool = bb.utils.which(path, "git-lfs", executable=True) + if not gitlfstool: + raise bb.fetch2.FetchError("Repository %s has LFS content, install git-lfs on host to download (or set lfs=0 to ignore it)" % (repourl)) + else: + bb.note("Could not find 'PATH'") else: - bb.note("Could not find 'PATH'") - + bb.note("Repository %s has LFS content but it is not being fetched" % (repourl)) if not ud.nocheckout: if subdir != "": diff --git a/poky/bitbake/lib/bb/fetch2/svn.py b/poky/bitbake/lib/bb/fetch2/svn.py index 59ce93160..96d666ba3 100644 --- a/poky/bitbake/lib/bb/fetch2/svn.py +++ b/poky/bitbake/lib/bb/fetch2/svn.py @@ -145,7 +145,7 @@ class Svn(FetchMethod): if not ("externals" in ud.parm and ud.parm["externals"] == "nowarn"): # Warn the user if this had externals (won't catch them all) - output = runfetchcmd("svn propget svn:externals", d, workdir=ud.moddir) + output = runfetchcmd("svn propget svn:externals || true", d, workdir=ud.moddir) if output: if "--ignore-externals" in svnfetchcmd.split(): bb.warn("%s contains svn:externals." % ud.url) diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py index addb2bb82..d9a67a316 100644 --- a/poky/bitbake/lib/bb/runqueue.py +++ b/poky/bitbake/lib/bb/runqueue.py @@ -1173,6 +1173,7 @@ class RunQueueData: self.prepare_task_hash(tid) bb.parse.siggen.writeout_file_checksum_cache() + bb.parse.siggen.set_setscene_tasks(self.runq_setscene_tids) #self.dump_data() return len(self.runtaskentries) @@ -1259,7 +1260,7 @@ class RunQueue: "buildname" : self.cfgData.getVar("BUILDNAME"), "date" : self.cfgData.getVar("DATE"), "time" : self.cfgData.getVar("TIME"), - "hashservport" : self.cooker.hashservport, + "hashservaddr" : self.cooker.hashservaddr, } worker.stdin.write(b"" + pickle.dumps(self.cooker.configuration) + b"") @@ -1393,7 +1394,7 @@ class RunQueue: cache[tid] = iscurrent return iscurrent - def validate_hashes(self, tocheck, data, currentcount=None, siginfo=False): + def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False): valid = set() if self.hashvalidate: sq_data = {} @@ -1600,7 +1601,7 @@ class RunQueue: tocheck.add(tid) - valid_new = self.validate_hashes(tocheck, self.cooker.data, None, True) + valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True) # Tasks which are both setscene and noexec never care about dependencies # We therefore find tasks which are setscene and noexec and mark their @@ -1981,7 +1982,7 @@ class RunQueueExecute: continue logger.debug(1, "Task %s no longer deferred" % nexttask) del self.sq_deferred[nexttask] - valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, None, False) + valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False) if not valid: logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask) self.sq_task_failoutright(nexttask) @@ -2173,7 +2174,7 @@ class RunQueueExecute: ret.add(dep) return ret - # We filter out multiconfig dependencies from taskdepdata we pass to the tasks + # We filter out multiconfig dependencies from taskdepdata we pass to the tasks # as most code can't handle them def build_taskdepdata(self, task): taskdepdata = {} diff --git a/poky/bitbake/lib/bb/siggen.py b/poky/bitbake/lib/bb/siggen.py index b50355930..e047c217e 100644 --- a/poky/bitbake/lib/bb/siggen.py +++ b/poky/bitbake/lib/bb/siggen.py @@ -13,6 +13,7 @@ import difflib import simplediff from bb.checksum import FileChecksumCache from bb import runqueue +import hashserv logger = logging.getLogger('BitBake.SigGen') @@ -91,6 +92,8 @@ class SignatureGenerator(object): def save_unitaskhashes(self): return + def set_setscene_tasks(self, setscene_tasks): + return class SignatureGeneratorBasic(SignatureGenerator): """ @@ -106,6 +109,7 @@ class SignatureGeneratorBasic(SignatureGenerator): self.taints = {} self.gendeps = {} self.lookupcache = {} + self.setscenetasks = {} self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split()) self.taskwhitelist = None self.init_rundepcheck(data) @@ -151,6 +155,9 @@ class SignatureGeneratorBasic(SignatureGenerator): return taskdeps + def set_setscene_tasks(self, setscene_tasks): + self.setscenetasks = setscene_tasks + def finalise(self, fn, d, variant): mc = d.getVar("__BBMULTICONFIG", False) or "" @@ -369,6 +376,11 @@ class SignatureGeneratorUniHashMixIn(object): self.server, self.method = data[:2] super().set_taskdata(data[2:]) + def client(self): + if getattr(self, '_client', None) is None: + self._client = hashserv.create_client(self.server) + return self._client + def __get_task_unihash_key(self, tid): # TODO: The key only *needs* to be the taskhash, the tid is just # convenient @@ -389,11 +401,12 @@ class SignatureGeneratorUniHashMixIn(object): self.unitaskhashes[self.__get_task_unihash_key(tid)] = unihash def get_unihash(self, tid): - import urllib - import json - taskhash = self.taskhash[tid] + # If its not a setscene task we can return + if self.setscenetasks and tid not in self.setscenetasks: + return taskhash + key = self.__get_task_unihash_key(tid) # TODO: This cache can grow unbounded. It probably only needs to keep @@ -418,36 +431,22 @@ class SignatureGeneratorUniHashMixIn(object): unihash = taskhash try: - url = '%s/v1/equivalent?%s' % (self.server, - urllib.parse.urlencode({'method': self.method, 'taskhash': self.taskhash[tid]})) - - request = urllib.request.Request(url) - response = urllib.request.urlopen(request) - data = response.read().decode('utf-8') - - json_data = json.loads(data) - - if json_data: - unihash = json_data['unihash'] + data = self.client().get_unihash(self.method, self.taskhash[tid]) + if data: + unihash = data # A unique hash equal to the taskhash is not very interesting, # so it is reported it at debug level 2. If they differ, that # is much more interesting, so it is reported at debug level 1 bb.debug((1, 2)[unihash == taskhash], 'Found unihash %s in place of %s for %s from %s' % (unihash, taskhash, tid, self.server)) else: bb.debug(2, 'No reported unihash for %s:%s from %s' % (tid, taskhash, self.server)) - except urllib.error.URLError as e: - bb.warn('Failure contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) - except (KeyError, json.JSONDecodeError) as e: - bb.warn('Poorly formatted response from %s: %s' % (self.server, str(e))) + except hashserv.HashConnectionError as e: + bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) self.unitaskhashes[key] = unihash return unihash def report_unihash(self, path, task, d): - import urllib - import json - import tempfile - import base64 import importlib taskhash = d.getVar('BB_TASKHASH') @@ -482,42 +481,31 @@ class SignatureGeneratorUniHashMixIn(object): outhash = bb.utils.better_eval(self.method + '(path, sigfile, task, d)', locs) try: - url = '%s/v1/equivalent' % self.server - task_data = { - 'taskhash': taskhash, - 'method': self.method, - 'outhash': outhash, - 'unihash': unihash, - 'owner': d.getVar('SSTATE_HASHEQUIV_OWNER') - } + extra_data = {} + + owner = d.getVar('SSTATE_HASHEQUIV_OWNER') + if owner: + extra_data['owner'] = owner if report_taskdata: sigfile.seek(0) - task_data['PN'] = d.getVar('PN') - task_data['PV'] = d.getVar('PV') - task_data['PR'] = d.getVar('PR') - task_data['task'] = task - task_data['outhash_siginfo'] = sigfile.read().decode('utf-8') - - headers = {'content-type': 'application/json'} - - request = urllib.request.Request(url, json.dumps(task_data).encode('utf-8'), headers) - response = urllib.request.urlopen(request) - data = response.read().decode('utf-8') + extra_data['PN'] = d.getVar('PN') + extra_data['PV'] = d.getVar('PV') + extra_data['PR'] = d.getVar('PR') + extra_data['task'] = task + extra_data['outhash_siginfo'] = sigfile.read().decode('utf-8') - json_data = json.loads(data) - new_unihash = json_data['unihash'] + data = self.client().report_unihash(taskhash, self.method, outhash, unihash, extra_data) + new_unihash = data['unihash'] if new_unihash != unihash: bb.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server)) bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d) else: bb.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server)) - except urllib.error.URLError as e: - bb.warn('Failure contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) - except (KeyError, json.JSONDecodeError) as e: - bb.warn('Poorly formatted response from %s: %s' % (self.server, str(e))) + except hashserv.HashConnectionError as e: + bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) finally: if sigfile: sigfile.close() @@ -538,7 +526,7 @@ class SignatureGeneratorTestEquivHash(SignatureGeneratorUniHashMixIn, SignatureG name = "TestEquivHash" def init_rundepcheck(self, data): super().init_rundepcheck(data) - self.server = "http://" + data.getVar('BB_HASHSERVE') + self.server = data.getVar('BB_HASHSERVE') self.method = "sstate_output_hash" diff --git a/poky/bitbake/lib/bb/tests/runqueue.py b/poky/bitbake/lib/bb/tests/runqueue.py index c7f5e5572..cb4d526f1 100644 --- a/poky/bitbake/lib/bb/tests/runqueue.py +++ b/poky/bitbake/lib/bb/tests/runqueue.py @@ -11,6 +11,7 @@ import bb import os import tempfile import subprocess +import sys # # TODO: @@ -232,10 +233,11 @@ class RunQueueTests(unittest.TestCase): self.assertEqual(set(tasks), set(expected)) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_single(self): with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1"] @@ -255,10 +257,11 @@ class RunQueueTests(unittest.TestCase): 'a1:package_write_ipk_setscene', 'a1:package_qa_setscene'] self.assertEqual(set(tasks), set(expected)) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_double(self): with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1", "e1"] @@ -278,11 +281,12 @@ class RunQueueTests(unittest.TestCase): self.assertEqual(set(tasks), set(expected)) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_multiple_setscene(self): # Runs e1:do_package_setscene twice with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1", "e1"] @@ -308,11 +312,12 @@ class RunQueueTests(unittest.TestCase): else: self.assertEqual(tasks.count(i), 1, "%s not in task list once" % i) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_partial_match(self): # e1:do_package matches initial built but not second hash value with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1"] @@ -336,11 +341,12 @@ class RunQueueTests(unittest.TestCase): expected.remove('e1:package') self.assertEqual(set(tasks), set(expected)) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_partial_match2(self): # e1:do_package + e1:do_populate_sysroot matches initial built but not second hash value with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1"] @@ -363,13 +369,14 @@ class RunQueueTests(unittest.TestCase): 'e1:package_setscene', 'e1:populate_sysroot_setscene', 'e1:build', 'e1:package_qa', 'e1:package_write_rpm', 'e1:package_write_ipk', 'e1:packagedata'] self.assertEqual(set(tasks), set(expected)) + @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') def test_hashserv_partial_match3(self): # e1:do_package is valid for a1 but not after b1 # In former buggy code, this triggered e1:do_fetch, then e1:do_populate_sysroot to run # with none of the intermediate tasks which is a serious bug with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: extraenv = { - "BB_HASHSERVE" : "localhost:0", + "BB_HASHSERVE" : "auto", "BB_SIGNATURE_HANDLER" : "TestEquivHash" } cmd = ["bitbake", "a1", "b1"] diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py index 3e90b6a30..d035949b3 100644 --- a/poky/bitbake/lib/bb/utils.py +++ b/poky/bitbake/lib/bb/utils.py @@ -677,7 +677,7 @@ def _check_unsafe_delete_path(path): return True return False -def remove(path, recurse=False): +def remove(path, recurse=False, ionice=False): """Equivalent to rm -f or rm -rf""" if not path: return @@ -686,7 +686,10 @@ def remove(path, recurse=False): if _check_unsafe_delete_path(path): raise Exception('bb.utils.remove: called with dangerous path "%s" and recurse=True, refusing to delete!' % path) # shutil.rmtree(name) would be ideal but its too slow - subprocess.check_call(['rm', '-rf'] + glob.glob(path)) + cmd = [] + if ionice: + cmd = ['ionice', '-c', '3'] + subprocess.check_call(cmd + ['rm', '-rf'] + glob.glob(path)) return for name in glob.glob(path): try: @@ -695,12 +698,12 @@ def remove(path, recurse=False): if exc.errno != errno.ENOENT: raise -def prunedir(topdir): +def prunedir(topdir, ionice=False): # Delete everything reachable from the directory named in 'topdir'. # CAUTION: This is dangerous! if _check_unsafe_delete_path(topdir): raise Exception('bb.utils.prunedir: called with dangerous path "%s", refusing to delete!' % topdir) - remove(topdir, recurse=True) + remove(topdir, recurse=True, ionice=ionice) # # Could also use return re.compile("(%s)" % "|".join(map(re.escape, suffixes))).sub(lambda mo: "", var) diff --git a/poky/bitbake/lib/bblayers/query.py b/poky/bitbake/lib/bblayers/query.py index 993589de9..7db49c8e2 100644 --- a/poky/bitbake/lib/bblayers/query.py +++ b/poky/bitbake/lib/bblayers/query.py @@ -46,7 +46,7 @@ layer, with the preferred version first. Note that skipped recipes that are overlayed will also be listed, with a " (skipped)" suffix. """ - items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, True, None) + items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, False, True, None, False, None) # Check for overlayed .bbclass files classes = collections.defaultdict(list) @@ -112,9 +112,9 @@ skipped recipes will also be listed, with a " (skipped)" suffix. title = 'Matching recipes:' else: title = 'Available recipes:' - self.list_recipes(title, args.pnspec, False, False, args.filenames, args.multiple, inheritlist) + self.list_recipes(title, args.pnspec, False, False, args.filenames, args.recipes_only, args.multiple, args.layer, args.bare, inheritlist) - def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_multi_provider_only, inherits): + def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_recipes_only, show_multi_provider_only, selected_layer, bare, inherits): if inherits: bbpath = str(self.tinfoil.config_data.getVar('BBPATH')) for classname in inherits: @@ -144,24 +144,30 @@ skipped recipes will also be listed, with a " (skipped)" suffix. preferred_versions[p] = (ver, fn) def print_item(f, pn, ver, layer, ispref): - if f in skiplist: - skipped = ' (skipped)' - else: - skipped = '' - if show_filenames: - if ispref: - logger.plain("%s%s", f, skipped) + if not selected_layer or layer == selected_layer: + if not bare and f in skiplist: + skipped = ' (skipped)' else: - logger.plain(" %s%s", f, skipped) - else: - if ispref: - logger.plain("%s:", pn) - logger.plain(" %s %s%s", layer.ljust(20), ver, skipped) + skipped = '' + if show_filenames: + if ispref: + logger.plain("%s%s", f, skipped) + else: + logger.plain(" %s%s", f, skipped) + elif show_recipes_only: + if pn not in show_unique_pn: + show_unique_pn.append(pn) + logger.plain("%s%s", pn, skipped) + else: + if ispref: + logger.plain("%s:", pn) + logger.plain(" %s %s%s", layer.ljust(20), ver, skipped) global_inherit = (self.tinfoil.config_data.getVar('INHERIT') or "").split() cls_re = re.compile('classes/') preffiles = [] + show_unique_pn = [] items_listed = False for p in sorted(pkg_pn): if pnspec: @@ -493,8 +499,11 @@ NOTE: .bbappend files can impact the dependencies. parser_show_recipes = self.add_command(sp, 'show-recipes', self.do_show_recipes) parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') + parser_show_recipes.add_argument('-r', '--recipes-only', help='instead of the default formatting, list recipes only', action='store_true') parser_show_recipes.add_argument('-m', '--multiple', help='only list where multiple recipes (in the same layer or different layers) exist for the same recipe name', action='store_true') parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class(es) - separate multiple classes using , (without spaces)', metavar='CLASS', default='') + parser_show_recipes.add_argument('-l', '--layer', help='only list recipes from the selected layer', default='') + parser_show_recipes.add_argument('-b', '--bare', help='output just names without the "(skipped)" marker', action='store_true') parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) diff --git a/poky/bitbake/lib/hashserv/__init__.py b/poky/bitbake/lib/hashserv/__init__.py index eb03c3221..c3318620f 100644 --- a/poky/bitbake/lib/hashserv/__init__.py +++ b/poky/bitbake/lib/hashserv/__init__.py @@ -3,203 +3,21 @@ # SPDX-License-Identifier: GPL-2.0-only # -from http.server import BaseHTTPRequestHandler, HTTPServer -import contextlib -import urllib.parse +from contextlib import closing +import re import sqlite3 -import json -import traceback -import logging -import socketserver -import queue -import threading -import signal -import socket -import struct -from datetime import datetime - -logger = logging.getLogger('hashserv') - -class HashEquivalenceServer(BaseHTTPRequestHandler): - def log_message(self, f, *args): - logger.debug(f, *args) - - def opendb(self): - self.db = sqlite3.connect(self.dbname) - self.db.row_factory = sqlite3.Row - self.db.execute("PRAGMA synchronous = OFF;") - self.db.execute("PRAGMA journal_mode = MEMORY;") - - def do_GET(self): - try: - if not self.db: - self.opendb() - - p = urllib.parse.urlparse(self.path) - - if p.path != self.prefix + '/v1/equivalent': - self.send_error(404) - return - - query = urllib.parse.parse_qs(p.query, strict_parsing=True) - method = query['method'][0] - taskhash = query['taskhash'][0] - - d = None - with contextlib.closing(self.db.cursor()) as cursor: - cursor.execute('SELECT taskhash, method, unihash FROM tasks_v2 WHERE method=:method AND taskhash=:taskhash ORDER BY created ASC LIMIT 1', - {'method': method, 'taskhash': taskhash}) - - row = cursor.fetchone() - - if row is not None: - logger.debug('Found equivalent task %s', row['taskhash']) - d = {k: row[k] for k in ('taskhash', 'method', 'unihash')} - - self.send_response(200) - self.send_header('Content-Type', 'application/json; charset=utf-8') - self.end_headers() - self.wfile.write(json.dumps(d).encode('utf-8')) - except: - logger.exception('Error in GET') - self.send_error(400, explain=traceback.format_exc()) - return - - def do_POST(self): - try: - if not self.db: - self.opendb() - - p = urllib.parse.urlparse(self.path) - - if p.path != self.prefix + '/v1/equivalent': - self.send_error(404) - return - - length = int(self.headers['content-length']) - data = json.loads(self.rfile.read(length).decode('utf-8')) - - with contextlib.closing(self.db.cursor()) as cursor: - cursor.execute(''' - -- Find tasks with a matching outhash (that is, tasks that - -- are equivalent) - SELECT taskhash, method, unihash FROM tasks_v2 WHERE method=:method AND outhash=:outhash - - -- If there is an exact match on the taskhash, return it. - -- Otherwise return the oldest matching outhash of any - -- taskhash - ORDER BY CASE WHEN taskhash=:taskhash THEN 1 ELSE 2 END, - created ASC - - -- Only return one row - LIMIT 1 - ''', {k: data[k] for k in ('method', 'outhash', 'taskhash')}) - - row = cursor.fetchone() - - # If no matching outhash was found, or one *was* found but it - # wasn't an exact match on the taskhash, a new entry for this - # taskhash should be added - if row is None or row['taskhash'] != data['taskhash']: - # If a row matching the outhash was found, the unihash for - # the new taskhash should be the same as that one. - # Otherwise the caller provided unihash is used. - unihash = data['unihash'] - if row is not None: - unihash = row['unihash'] - - insert_data = { - 'method': data['method'], - 'outhash': data['outhash'], - 'taskhash': data['taskhash'], - 'unihash': unihash, - 'created': datetime.now() - } - - for k in ('owner', 'PN', 'PV', 'PR', 'task', 'outhash_siginfo'): - if k in data: - insert_data[k] = data[k] - - cursor.execute('''INSERT INTO tasks_v2 (%s) VALUES (%s)''' % ( - ', '.join(sorted(insert_data.keys())), - ', '.join(':' + k for k in sorted(insert_data.keys()))), - insert_data) - - logger.info('Adding taskhash %s with unihash %s', data['taskhash'], unihash) - - self.db.commit() - d = {'taskhash': data['taskhash'], 'method': data['method'], 'unihash': unihash} - else: - d = {k: row[k] for k in ('taskhash', 'method', 'unihash')} - - self.send_response(200) - self.send_header('Content-Type', 'application/json; charset=utf-8') - self.end_headers() - self.wfile.write(json.dumps(d).encode('utf-8')) - except: - logger.exception('Error in POST') - self.send_error(400, explain=traceback.format_exc()) - return - -class ThreadedHTTPServer(HTTPServer): - quit = False - - def serve_forever(self): - self.requestqueue = queue.Queue() - self.handlerthread = threading.Thread(target=self.process_request_thread) - self.handlerthread.daemon = False - - self.handlerthread.start() - - signal.signal(signal.SIGTERM, self.sigterm_exception) - super().serve_forever() - os._exit(0) - - def sigterm_exception(self, signum, stackframe): - self.server_close() - os._exit(0) - - def server_bind(self): - HTTPServer.server_bind(self) - self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) - - def process_request_thread(self): - while not self.quit: - try: - (request, client_address) = self.requestqueue.get(True) - except queue.Empty: - continue - if request is None: - continue - try: - self.finish_request(request, client_address) - except Exception: - self.handle_error(request, client_address) - finally: - self.shutdown_request(request) - os._exit(0) - - def process_request(self, request, client_address): - self.requestqueue.put((request, client_address)) - - def server_close(self): - super().server_close() - self.quit = True - self.requestqueue.put((None, None)) - self.handlerthread.join() - -def create_server(addr, dbname, prefix=''): - class Handler(HashEquivalenceServer): - pass - - db = sqlite3.connect(dbname) - db.row_factory = sqlite3.Row - Handler.prefix = prefix - Handler.db = None - Handler.dbname = dbname +UNIX_PREFIX = "unix://" + +ADDR_TYPE_UNIX = 0 +ADDR_TYPE_TCP = 1 + + +def setup_database(database, sync=True): + db = sqlite3.connect(database) + db.row_factory = sqlite3.Row - with contextlib.closing(db.cursor()) as cursor: + with closing(db.cursor()) as cursor: cursor.execute(''' CREATE TABLE IF NOT EXISTS tasks_v2 ( id INTEGER PRIMARY KEY AUTOINCREMENT, @@ -220,11 +38,56 @@ def create_server(addr, dbname, prefix=''): UNIQUE(method, outhash, taskhash) ) ''') - cursor.execute('CREATE INDEX IF NOT EXISTS taskhash_lookup ON tasks_v2 (method, taskhash)') - cursor.execute('CREATE INDEX IF NOT EXISTS outhash_lookup ON tasks_v2 (method, outhash)') + cursor.execute('PRAGMA journal_mode = WAL') + cursor.execute('PRAGMA synchronous = %s' % ('NORMAL' if sync else 'OFF')) + + # Drop old indexes + cursor.execute('DROP INDEX IF EXISTS taskhash_lookup') + cursor.execute('DROP INDEX IF EXISTS outhash_lookup') + + # Create new indexes + cursor.execute('CREATE INDEX IF NOT EXISTS taskhash_lookup_v2 ON tasks_v2 (method, taskhash, created)') + cursor.execute('CREATE INDEX IF NOT EXISTS outhash_lookup_v2 ON tasks_v2 (method, outhash)') + + return db + + +def parse_address(addr): + if addr.startswith(UNIX_PREFIX): + return (ADDR_TYPE_UNIX, (addr[len(UNIX_PREFIX):],)) + else: + m = re.match(r'\[(?P[^\]]*)\]:(?P\d+)$', addr) + if m is not None: + host = m.group('host') + port = m.group('port') + else: + host, port = addr.split(':') + + return (ADDR_TYPE_TCP, (host, int(port))) + + +def create_server(addr, dbname, *, sync=True): + from . import server + db = setup_database(dbname, sync=sync) + s = server.Server(db) + + (typ, a) = parse_address(addr) + if typ == ADDR_TYPE_UNIX: + s.start_unix_server(*a) + else: + s.start_tcp_server(*a) + + return s + - ret = ThreadedHTTPServer(addr, Handler) +def create_client(addr): + from . import client + c = client.Client() - logger.info('Starting server on %s\n', ret.server_port) + (typ, a) = parse_address(addr) + if typ == ADDR_TYPE_UNIX: + c.connect_unix(*a) + else: + c.connect_tcp(*a) - return ret + return c diff --git a/poky/bitbake/lib/hashserv/client.py b/poky/bitbake/lib/hashserv/client.py new file mode 100644 index 000000000..2559bbb3f --- /dev/null +++ b/poky/bitbake/lib/hashserv/client.py @@ -0,0 +1,156 @@ +# Copyright (C) 2019 Garmin Ltd. +# +# SPDX-License-Identifier: GPL-2.0-only +# + +from contextlib import closing +import json +import logging +import socket + + +logger = logging.getLogger('hashserv.client') + + +class HashConnectionError(Exception): + pass + + +class Client(object): + MODE_NORMAL = 0 + MODE_GET_STREAM = 1 + + def __init__(self): + self._socket = None + self.reader = None + self.writer = None + self.mode = self.MODE_NORMAL + + def connect_tcp(self, address, port): + def connect_sock(): + s = socket.create_connection((address, port)) + + s.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) + s.setsockopt(socket.SOL_TCP, socket.TCP_QUICKACK, 1) + s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) + return s + + self._connect_sock = connect_sock + + def connect_unix(self, path): + def connect_sock(): + s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + # AF_UNIX has path length issues so chdir here to workaround + cwd = os.getcwd() + try: + os.chdir(os.path.dirname(path)) + s.connect(os.path.basename(path)) + finally: + os.chdir(cwd) + return s + + self._connect_sock = connect_sock + + def connect(self): + if self._socket is None: + self._socket = self._connect_sock() + + self.reader = self._socket.makefile('r', encoding='utf-8') + self.writer = self._socket.makefile('w', encoding='utf-8') + + self.writer.write('OEHASHEQUIV 1.0\n\n') + self.writer.flush() + + # Restore mode if the socket is being re-created + cur_mode = self.mode + self.mode = self.MODE_NORMAL + self._set_mode(cur_mode) + + return self._socket + + def close(self): + if self._socket is not None: + self._socket.close() + self._socket = None + self.reader = None + self.writer = None + + def _send_wrapper(self, proc): + count = 0 + while True: + try: + self.connect() + return proc() + except (OSError, HashConnectionError, json.JSONDecodeError, UnicodeDecodeError) as e: + logger.warning('Error talking to server: %s' % e) + if count >= 3: + if not isinstance(e, HashConnectionError): + raise HashConnectionError(str(e)) + raise e + self.close() + count += 1 + + def send_message(self, msg): + def proc(): + self.writer.write('%s\n' % json.dumps(msg)) + self.writer.flush() + + l = self.reader.readline() + if not l: + raise HashConnectionError('Connection closed') + + if not l.endswith('\n'): + raise HashConnectionError('Bad message %r' % message) + + return json.loads(l) + + return self._send_wrapper(proc) + + def send_stream(self, msg): + def proc(): + self.writer.write("%s\n" % msg) + self.writer.flush() + l = self.reader.readline() + if not l: + raise HashConnectionError('Connection closed') + return l.rstrip() + + return self._send_wrapper(proc) + + def _set_mode(self, new_mode): + if new_mode == self.MODE_NORMAL and self.mode == self.MODE_GET_STREAM: + r = self.send_stream('END') + if r != 'ok': + raise HashConnectionError('Bad response from server %r' % r) + elif new_mode == self.MODE_GET_STREAM and self.mode == self.MODE_NORMAL: + r = self.send_message({'get-stream': None}) + if r != 'ok': + raise HashConnectionError('Bad response from server %r' % r) + elif new_mode != self.mode: + raise Exception('Undefined mode transition %r -> %r' % (self.mode, new_mode)) + + self.mode = new_mode + + def get_unihash(self, method, taskhash): + self._set_mode(self.MODE_GET_STREAM) + r = self.send_stream('%s %s' % (method, taskhash)) + if not r: + return None + return r + + def report_unihash(self, taskhash, method, outhash, unihash, extra={}): + self._set_mode(self.MODE_NORMAL) + m = extra.copy() + m['taskhash'] = taskhash + m['method'] = method + m['outhash'] = outhash + m['unihash'] = unihash + return self.send_message({'report': m}) + + def get_stats(self): + self._set_mode(self.MODE_NORMAL) + return self.send_message({'get-stats': None}) + + def reset_stats(self): + self._set_mode(self.MODE_NORMAL) + return self.send_message({'reset-stats': None}) diff --git a/poky/bitbake/lib/hashserv/server.py b/poky/bitbake/lib/hashserv/server.py new file mode 100644 index 000000000..0aff77688 --- /dev/null +++ b/poky/bitbake/lib/hashserv/server.py @@ -0,0 +1,414 @@ +# Copyright (C) 2019 Garmin Ltd. +# +# SPDX-License-Identifier: GPL-2.0-only +# + +from contextlib import closing +from datetime import datetime +import asyncio +import json +import logging +import math +import os +import signal +import socket +import time + +logger = logging.getLogger('hashserv.server') + + +class Measurement(object): + def __init__(self, sample): + self.sample = sample + + def start(self): + self.start_time = time.perf_counter() + + def end(self): + self.sample.add(time.perf_counter() - self.start_time) + + def __enter__(self): + self.start() + return self + + def __exit__(self, *args, **kwargs): + self.end() + + +class Sample(object): + def __init__(self, stats): + self.stats = stats + self.num_samples = 0 + self.elapsed = 0 + + def measure(self): + return Measurement(self) + + def __enter__(self): + return self + + def __exit__(self, *args, **kwargs): + self.end() + + def add(self, elapsed): + self.num_samples += 1 + self.elapsed += elapsed + + def end(self): + if self.num_samples: + self.stats.add(self.elapsed) + self.num_samples = 0 + self.elapsed = 0 + + +class Stats(object): + def __init__(self): + self.reset() + + def reset(self): + self.num = 0 + self.total_time = 0 + self.max_time = 0 + self.m = 0 + self.s = 0 + self.current_elapsed = None + + def add(self, elapsed): + self.num += 1 + if self.num == 1: + self.m = elapsed + self.s = 0 + else: + last_m = self.m + self.m = last_m + (elapsed - last_m) / self.num + self.s = self.s + (elapsed - last_m) * (elapsed - self.m) + + self.total_time += elapsed + + if self.max_time < elapsed: + self.max_time = elapsed + + def start_sample(self): + return Sample(self) + + @property + def average(self): + if self.num == 0: + return 0 + return self.total_time / self.num + + @property + def stdev(self): + if self.num <= 1: + return 0 + return math.sqrt(self.s / (self.num - 1)) + + def todict(self): + return {k: getattr(self, k) for k in ('num', 'total_time', 'max_time', 'average', 'stdev')} + + +class ServerClient(object): + def __init__(self, reader, writer, db, request_stats): + self.reader = reader + self.writer = writer + self.db = db + self.request_stats = request_stats + + async def process_requests(self): + try: + self.addr = self.writer.get_extra_info('peername') + logger.debug('Client %r connected' % (self.addr,)) + + # Read protocol and version + protocol = await self.reader.readline() + if protocol is None: + return + + (proto_name, proto_version) = protocol.decode('utf-8').rstrip().split() + if proto_name != 'OEHASHEQUIV' or proto_version != '1.0': + return + + # Read headers. Currently, no headers are implemented, so look for + # an empty line to signal the end of the headers + while True: + line = await self.reader.readline() + if line is None: + return + + line = line.decode('utf-8').rstrip() + if not line: + break + + # Handle messages + handlers = { + 'get': self.handle_get, + 'report': self.handle_report, + 'get-stream': self.handle_get_stream, + 'get-stats': self.handle_get_stats, + 'reset-stats': self.handle_reset_stats, + } + + while True: + d = await self.read_message() + if d is None: + break + + for k in handlers.keys(): + if k in d: + logger.debug('Handling %s' % k) + if 'stream' in k: + await handlers[k](d[k]) + else: + with self.request_stats.start_sample() as self.request_sample, \ + self.request_sample.measure(): + await handlers[k](d[k]) + break + else: + logger.warning("Unrecognized command %r" % d) + break + + await self.writer.drain() + finally: + self.writer.close() + + def write_message(self, msg): + self.writer.write(('%s\n' % json.dumps(msg)).encode('utf-8')) + + async def read_message(self): + l = await self.reader.readline() + if not l: + return None + + try: + message = l.decode('utf-8') + + if not message.endswith('\n'): + return None + + return json.loads(message) + except (json.JSONDecodeError, UnicodeDecodeError) as e: + logger.error('Bad message from client: %r' % message) + raise e + + async def handle_get(self, request): + method = request['method'] + taskhash = request['taskhash'] + + row = self.query_equivalent(method, taskhash) + if row is not None: + logger.debug('Found equivalent task %s -> %s', (row['taskhash'], row['unihash'])) + d = {k: row[k] for k in ('taskhash', 'method', 'unihash')} + + self.write_message(d) + else: + self.write_message(None) + + async def handle_get_stream(self, request): + self.write_message('ok') + + while True: + l = await self.reader.readline() + if not l: + return + + try: + # This inner loop is very sensitive and must be as fast as + # possible (which is why the request sample is handled manually + # instead of using 'with', and also why logging statements are + # commented out. + self.request_sample = self.request_stats.start_sample() + request_measure = self.request_sample.measure() + request_measure.start() + + l = l.decode('utf-8').rstrip() + if l == 'END': + self.writer.write('ok\n'.encode('utf-8')) + return + + (method, taskhash) = l.split() + #logger.debug('Looking up %s %s' % (method, taskhash)) + row = self.query_equivalent(method, taskhash) + if row is not None: + msg = ('%s\n' % row['unihash']).encode('utf-8') + #logger.debug('Found equivalent task %s -> %s', (row['taskhash'], row['unihash'])) + else: + msg = '\n'.encode('utf-8') + + self.writer.write(msg) + finally: + request_measure.end() + self.request_sample.end() + + await self.writer.drain() + + async def handle_report(self, data): + with closing(self.db.cursor()) as cursor: + cursor.execute(''' + -- Find tasks with a matching outhash (that is, tasks that + -- are equivalent) + SELECT taskhash, method, unihash FROM tasks_v2 WHERE method=:method AND outhash=:outhash + + -- If there is an exact match on the taskhash, return it. + -- Otherwise return the oldest matching outhash of any + -- taskhash + ORDER BY CASE WHEN taskhash=:taskhash THEN 1 ELSE 2 END, + created ASC + + -- Only return one row + LIMIT 1 + ''', {k: data[k] for k in ('method', 'outhash', 'taskhash')}) + + row = cursor.fetchone() + + # If no matching outhash was found, or one *was* found but it + # wasn't an exact match on the taskhash, a new entry for this + # taskhash should be added + if row is None or row['taskhash'] != data['taskhash']: + # If a row matching the outhash was found, the unihash for + # the new taskhash should be the same as that one. + # Otherwise the caller provided unihash is used. + unihash = data['unihash'] + if row is not None: + unihash = row['unihash'] + + insert_data = { + 'method': data['method'], + 'outhash': data['outhash'], + 'taskhash': data['taskhash'], + 'unihash': unihash, + 'created': datetime.now() + } + + for k in ('owner', 'PN', 'PV', 'PR', 'task', 'outhash_siginfo'): + if k in data: + insert_data[k] = data[k] + + cursor.execute('''INSERT INTO tasks_v2 (%s) VALUES (%s)''' % ( + ', '.join(sorted(insert_data.keys())), + ', '.join(':' + k for k in sorted(insert_data.keys()))), + insert_data) + + self.db.commit() + + logger.info('Adding taskhash %s with unihash %s', + data['taskhash'], unihash) + + d = { + 'taskhash': data['taskhash'], + 'method': data['method'], + 'unihash': unihash + } + else: + d = {k: row[k] for k in ('taskhash', 'method', 'unihash')} + + self.write_message(d) + + async def handle_get_stats(self, request): + d = { + 'requests': self.request_stats.todict(), + } + + self.write_message(d) + + async def handle_reset_stats(self, request): + d = { + 'requests': self.request_stats.todict(), + } + + self.request_stats.reset() + self.write_message(d) + + def query_equivalent(self, method, taskhash): + # This is part of the inner loop and must be as fast as possible + try: + cursor = self.db.cursor() + cursor.execute('SELECT taskhash, method, unihash FROM tasks_v2 WHERE method=:method AND taskhash=:taskhash ORDER BY created ASC LIMIT 1', + {'method': method, 'taskhash': taskhash}) + return cursor.fetchone() + except: + cursor.close() + + +class Server(object): + def __init__(self, db, loop=None): + self.request_stats = Stats() + self.db = db + + if loop is None: + self.loop = asyncio.new_event_loop() + self.close_loop = True + else: + self.loop = loop + self.close_loop = False + + self._cleanup_socket = None + + def start_tcp_server(self, host, port): + self.server = self.loop.run_until_complete( + asyncio.start_server(self.handle_client, host, port, loop=self.loop) + ) + + for s in self.server.sockets: + logger.info('Listening on %r' % (s.getsockname(),)) + # Newer python does this automatically. Do it manually here for + # maximum compatibility + s.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) + s.setsockopt(socket.SOL_TCP, socket.TCP_QUICKACK, 1) + + name = self.server.sockets[0].getsockname() + if self.server.sockets[0].family == socket.AF_INET6: + self.address = "[%s]:%d" % (name[0], name[1]) + else: + self.address = "%s:%d" % (name[0], name[1]) + + def start_unix_server(self, path): + def cleanup(): + os.unlink(path) + + cwd = os.getcwd() + try: + # Work around path length limits in AF_UNIX + os.chdir(os.path.dirname(path)) + self.server = self.loop.run_until_complete( + asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop) + ) + finally: + os.chdir(cwd) + + logger.info('Listening on %r' % path) + + self._cleanup_socket = cleanup + self.address = "unix://%s" % os.path.abspath(path) + + async def handle_client(self, reader, writer): + # writer.transport.set_write_buffer_limits(0) + try: + client = ServerClient(reader, writer, self.db, self.request_stats) + await client.process_requests() + except Exception as e: + import traceback + logger.error('Error from client: %s' % str(e), exc_info=True) + traceback.print_exc() + writer.close() + logger.info('Client disconnected') + + def serve_forever(self): + def signal_handler(): + self.loop.stop() + + self.loop.add_signal_handler(signal.SIGTERM, signal_handler) + + try: + self.loop.run_forever() + except KeyboardInterrupt: + pass + + self.server.close() + self.loop.run_until_complete(self.server.wait_closed()) + logger.info('Server shutting down') + + if self.close_loop: + self.loop.close() + + if self._cleanup_socket is not None: + self._cleanup_socket() diff --git a/poky/bitbake/lib/hashserv/tests.py b/poky/bitbake/lib/hashserv/tests.py index 6845b5388..6584ff57b 100644 --- a/poky/bitbake/lib/hashserv/tests.py +++ b/poky/bitbake/lib/hashserv/tests.py @@ -1,29 +1,40 @@ #! /usr/bin/env python3 # -# Copyright (C) 2018 Garmin Ltd. +# Copyright (C) 2018-2019 Garmin Ltd. # # SPDX-License-Identifier: GPL-2.0-only # -import unittest -import multiprocessing -import sqlite3 +from . import create_server, create_client import hashlib -import urllib.request -import json +import logging +import multiprocessing +import sys import tempfile -from . import create_server +import threading +import unittest + + +class TestHashEquivalenceServer(object): + METHOD = 'TestMethod' + + def _run_server(self): + # logging.basicConfig(level=logging.DEBUG, filename='bbhashserv.log', filemode='w', + # format='%(levelname)s %(filename)s:%(lineno)d %(message)s') + self.server.serve_forever() -class TestHashEquivalenceServer(unittest.TestCase): def setUp(self): - # Start a hash equivalence server in the background bound to - # an ephemeral port - self.dbfile = tempfile.NamedTemporaryFile(prefix="bb-hashserv-db-") - self.server = create_server(('localhost', 0), self.dbfile.name) - self.server_addr = 'http://localhost:%d' % self.server.socket.getsockname()[1] - self.server_thread = multiprocessing.Process(target=self.server.serve_forever) + if sys.version_info < (3, 5, 0): + self.skipTest('Python 3.5 or later required') + + self.temp_dir = tempfile.TemporaryDirectory(prefix='bb-hashserv') + self.dbfile = os.path.join(self.temp_dir.name, 'db.sqlite') + + self.server = create_server(self.get_server_addr(), self.dbfile) + self.server_thread = multiprocessing.Process(target=self._run_server) self.server_thread.daemon = True self.server_thread.start() + self.client = create_client(self.server.address) def tearDown(self): # Shutdown server @@ -31,19 +42,8 @@ class TestHashEquivalenceServer(unittest.TestCase): if s is not None: self.server_thread.terminate() self.server_thread.join() - - def send_get(self, path): - url = '%s/%s' % (self.server_addr, path) - request = urllib.request.Request(url) - response = urllib.request.urlopen(request) - return json.loads(response.read().decode('utf-8')) - - def send_post(self, path, data): - headers = {'content-type': 'application/json'} - url = '%s/%s' % (self.server_addr, path) - request = urllib.request.Request(url, json.dumps(data).encode('utf-8'), headers) - response = urllib.request.urlopen(request) - return json.loads(response.read().decode('utf-8')) + self.client.close() + self.temp_dir.cleanup() def test_create_hash(self): # Simple test that hashes can be created @@ -51,16 +51,11 @@ class TestHashEquivalenceServer(unittest.TestCase): outhash = '2765d4a5884be49b28601445c2760c5f21e7e5c0ee2b7e3fce98fd7e5970796f' unihash = 'f46d3fbb439bd9b921095da657a4de906510d2cd' - d = self.send_get('v1/equivalent?method=TestMethod&taskhash=%s' % taskhash) - self.assertIsNone(d, msg='Found unexpected task, %r' % d) + result = self.client.get_unihash(self.METHOD, taskhash) + self.assertIsNone(result, msg='Found unexpected task, %r' % result) - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash, - 'method': 'TestMethod', - 'outhash': outhash, - 'unihash': unihash, - }) - self.assertEqual(d['unihash'], unihash, 'Server returned bad unihash') + result = self.client.report_unihash(taskhash, self.METHOD, outhash, unihash) + self.assertEqual(result['unihash'], unihash, 'Server returned bad unihash') def test_create_equivalent(self): # Tests that a second reported task with the same outhash will be @@ -68,25 +63,16 @@ class TestHashEquivalenceServer(unittest.TestCase): taskhash = '53b8dce672cb6d0c73170be43f540460bfc347b4' outhash = '5a9cb1649625f0bf41fc7791b635cd9c2d7118c7f021ba87dcd03f72b67ce7a8' unihash = 'f37918cc02eb5a520b1aff86faacbc0a38124646' - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash, - 'method': 'TestMethod', - 'outhash': outhash, - 'unihash': unihash, - }) - self.assertEqual(d['unihash'], unihash, 'Server returned bad unihash') + + result = self.client.report_unihash(taskhash, self.METHOD, outhash, unihash) + self.assertEqual(result['unihash'], unihash, 'Server returned bad unihash') # Report a different task with the same outhash. The returned unihash # should match the first task taskhash2 = '3bf6f1e89d26205aec90da04854fbdbf73afe6b4' unihash2 = 'af36b199320e611fbb16f1f277d3ee1d619ca58b' - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash2, - 'method': 'TestMethod', - 'outhash': outhash, - 'unihash': unihash2, - }) - self.assertEqual(d['unihash'], unihash, 'Server returned bad unihash') + result = self.client.report_unihash(taskhash2, self.METHOD, outhash, unihash2) + self.assertEqual(result['unihash'], unihash, 'Server returned bad unihash') def test_duplicate_taskhash(self): # Tests that duplicate reports of the same taskhash with different @@ -95,38 +81,63 @@ class TestHashEquivalenceServer(unittest.TestCase): taskhash = '8aa96fcffb5831b3c2c0cb75f0431e3f8b20554a' outhash = 'afe240a439959ce86f5e322f8c208e1fedefea9e813f2140c81af866cc9edf7e' unihash = '218e57509998197d570e2c98512d0105985dffc9' - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash, - 'method': 'TestMethod', - 'outhash': outhash, - 'unihash': unihash, - }) + self.client.report_unihash(taskhash, self.METHOD, outhash, unihash) - d = self.send_get('v1/equivalent?method=TestMethod&taskhash=%s' % taskhash) - self.assertEqual(d['unihash'], unihash) + result = self.client.get_unihash(self.METHOD, taskhash) + self.assertEqual(result, unihash) outhash2 = '0904a7fe3dc712d9fd8a74a616ddca2a825a8ee97adf0bd3fc86082c7639914d' unihash2 = 'ae9a7d252735f0dafcdb10e2e02561ca3a47314c' - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash, - 'method': 'TestMethod', - 'outhash': outhash2, - 'unihash': unihash2 - }) + self.client.report_unihash(taskhash, self.METHOD, outhash2, unihash2) - d = self.send_get('v1/equivalent?method=TestMethod&taskhash=%s' % taskhash) - self.assertEqual(d['unihash'], unihash) + result = self.client.get_unihash(self.METHOD, taskhash) + self.assertEqual(result, unihash) outhash3 = '77623a549b5b1a31e3732dfa8fe61d7ce5d44b3370f253c5360e136b852967b4' unihash3 = '9217a7d6398518e5dc002ed58f2cbbbc78696603' - d = self.send_post('v1/equivalent', { - 'taskhash': taskhash, - 'method': 'TestMethod', - 'outhash': outhash3, - 'unihash': unihash3 - }) + self.client.report_unihash(taskhash, self.METHOD, outhash3, unihash3) + + result = self.client.get_unihash(self.METHOD, taskhash) + self.assertEqual(result, unihash) + + def test_stress(self): + def query_server(failures): + client = Client(self.server.address) + try: + for i in range(1000): + taskhash = hashlib.sha256() + taskhash.update(str(i).encode('utf-8')) + taskhash = taskhash.hexdigest() + result = client.get_unihash(self.METHOD, taskhash) + if result != taskhash: + failures.append("taskhash mismatch: %s != %s" % (result, taskhash)) + finally: + client.close() + + # Report hashes + for i in range(1000): + taskhash = hashlib.sha256() + taskhash.update(str(i).encode('utf-8')) + taskhash = taskhash.hexdigest() + self.client.report_unihash(taskhash, self.METHOD, taskhash, taskhash) + + failures = [] + threads = [threading.Thread(target=query_server, args=(failures,)) for t in range(100)] + + for t in threads: + t.start() + + for t in threads: + t.join() + + self.assertFalse(failures) + - d = self.send_get('v1/equivalent?method=TestMethod&taskhash=%s' % taskhash) - self.assertEqual(d['unihash'], unihash) +class TestHashEquivalenceUnixServer(TestHashEquivalenceServer, unittest.TestCase): + def get_server_addr(self): + return "unix://" + os.path.join(self.temp_dir.name, 'sock') +class TestHashEquivalenceTCPServer(TestHashEquivalenceServer, unittest.TestCase): + def get_server_addr(self): + return "localhost:0" diff --git a/poky/meta/classes/archiver.bbclass b/poky/meta/classes/archiver.bbclass index 13b05bb5f..093e2d95a 100644 --- a/poky/meta/classes/archiver.bbclass +++ b/poky/meta/classes/archiver.bbclass @@ -221,9 +221,10 @@ python do_ar_patched() { # Get the ARCHIVER_OUTDIR before we reset the WORKDIR ar_outdir = d.getVar('ARCHIVER_OUTDIR') - ar_workdir = d.getVar('ARCHIVER_WORKDIR') + if not is_work_shared(d): + ar_workdir = d.getVar('ARCHIVER_WORKDIR') + d.setVar('WORKDIR', ar_workdir) bb.note('Archiving the patched source...') - d.setVar('WORKDIR', ar_workdir) create_tarball(d, d.getVar('S'), 'patched', ar_outdir) } diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass index 3618b99a8..ea59d02ed 100644 --- a/poky/meta/classes/externalsrc.bbclass +++ b/poky/meta/classes/externalsrc.bbclass @@ -203,7 +203,7 @@ def srctree_hash_files(d, srcdir=None): ret = " " if git_dir is not None: - oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1') + oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1-%s' % d.getVar('PN')) with tempfile.NamedTemporaryFile(prefix='oe-devtool-index') as tmp_index: # Clone index shutil.copyfile(os.path.join(git_dir, 'index'), tmp_index.name) diff --git a/poky/meta/classes/grub-efi-cfg.bbclass b/poky/meta/classes/grub-efi-cfg.bbclass index f661a69f8..8b5ff20c7 100644 --- a/poky/meta/classes/grub-efi-cfg.bbclass +++ b/poky/meta/classes/grub-efi-cfg.bbclass @@ -23,7 +23,6 @@ GRUB_TIMEOUT ?= "10" #FIXME: build this from the machine config GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" -EFIDIR = "/EFI/BOOT" GRUB_ROOT ?= "${ROOT}" APPEND ?= "" diff --git a/poky/meta/classes/grub-efi.bbclass b/poky/meta/classes/grub-efi.bbclass index ec692f164..8fc6999e5 100644 --- a/poky/meta/classes/grub-efi.bbclass +++ b/poky/meta/classes/grub-efi.bbclass @@ -1,46 +1,8 @@ inherit grub-efi-cfg +require conf/image-uefi.conf efi_populate() { - # DEST must be the root of the image so that EFIDIR is not - # nested under a top level directory. - DEST=$1 - - install -d ${DEST}${EFIDIR} - - GRUB_IMAGE="grub-efi-bootia32.efi" - DEST_IMAGE="bootia32.efi" - if [ -n "${MLPREFIX}" ]; then - if [ "${TARGET_ARCH_MULTILIB_ORIGINAL}" = "x86_64" ]; then - GRUB_IMAGE="grub-efi-bootx64.efi" - DEST_IMAGE="bootx64.efi" - fi - else - if [ "${TARGET_ARCH}" = "x86_64" ]; then - GRUB_IMAGE="grub-efi-bootx64.efi" - DEST_IMAGE="bootx64.efi" - fi - fi - install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}/${DEST_IMAGE} - EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh + efi_populate_common "$1" grub-efi install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg } - -efi_iso_populate() { - iso_dir=$1 - efi_populate $iso_dir - # Build a EFI directory to create efi.img - mkdir -p ${EFIIMGDIR}/${EFIDIR} - cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} - cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} - EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh - if [ -f "$iso_dir/initrd" ] ; then - cp $iso_dir/initrd ${EFIIMGDIR} - fi -} - -efi_hddimg_populate() { - efi_populate $1 -} diff --git a/poky/meta/classes/icecc.bbclass b/poky/meta/classes/icecc.bbclass index fc82f8de1..9dbb4b155 100644 --- a/poky/meta/classes/icecc.bbclass +++ b/poky/meta/classes/icecc.bbclass @@ -73,12 +73,15 @@ ICECC_ENV_DEBUG ??= "" # # libgcc-initial - fails with CPP sanity check error if host sysroot contains # cross gcc built for another target tune/variant +# pixman - prng_state: TLS reference mismatches non-TLS reference, possibly due to +# pragma omp threadprivate(prng_state) # systemtap - _HelperSDT.c undefs macros and uses the identifiers in macros emitting # inline assembly # target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL # prefix" error. ICECC_SYSTEM_PACKAGE_BL += "\ libgcc-initial \ + pixman \ systemtap \ target-sdk-provides-dummy \ " diff --git a/poky/meta/classes/live-vm-common.bbclass b/poky/meta/classes/live-vm-common.bbclass index 68105d9b8..74e7074a5 100644 --- a/poky/meta/classes/live-vm-common.bbclass +++ b/poky/meta/classes/live-vm-common.bbclass @@ -29,6 +29,39 @@ def pcbios(d): PCBIOS = "${@pcbios(d)}" PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS') == '1']}" +# efi_populate_common DEST BOOTLOADER +efi_populate_common() { + # DEST must be the root of the image so that EFIDIR is not + # nested under a top level directory. + DEST=$1 + + install -d ${DEST}${EFIDIR} + + install -m 0644 ${DEPLOY_DIR_IMAGE}/$2-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE} + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh +} + +efi_iso_populate() { + iso_dir=$1 + efi_populate $iso_dir + # Build a EFI directory to create efi.img + mkdir -p ${EFIIMGDIR}/${EFIDIR} + cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} + cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} + + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${EFIIMGDIR}/startup.nsh + + if [ -f "$iso_dir/initrd" ] ; then + cp $iso_dir/initrd ${EFIIMGDIR} + fi +} + +efi_hddimg_populate() { + efi_populate $1 +} + inherit ${EFI_CLASS} inherit ${PCBIOS_CLASS} diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass index 48ca112d8..efa623407 100644 --- a/poky/meta/classes/meson.bbclass +++ b/poky/meta/classes/meson.bbclass @@ -55,6 +55,8 @@ def meson_cpu_family(var, d): return 'mips64' elif re.match(r"i[3-6]86", arch): return "x86" + elif arch == "microblazeel" or arch == "microblazeeb": + return "microblaze" else: return arch diff --git a/poky/meta/classes/multilib.bbclass b/poky/meta/classes/multilib.bbclass index d625bd527..1a9295d36 100644 --- a/poky/meta/classes/multilib.bbclass +++ b/poky/meta/classes/multilib.bbclass @@ -187,7 +187,7 @@ python do_package_qa_multilib() { if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)) and \ (not 'cross-canadian' in i) and (not i.startswith("nativesdk-")) and \ (not i.startswith("rtld")) and (not i.startswith('kernel-vmlinux')) \ - and (not i.startswith("kernel-image")): + and (not i.startswith("kernel-image")) and (not i.startswith("/")): candidates.append(i) if len(candidates) > 0: msg = "%s package %s - suspicious values '%s' in %s" \ diff --git a/poky/meta/classes/nativesdk.bbclass b/poky/meta/classes/nativesdk.bbclass index f25b0c31b..03135aced 100644 --- a/poky/meta/classes/nativesdk.bbclass +++ b/poky/meta/classes/nativesdk.bbclass @@ -100,6 +100,8 @@ python () { clsextend.map_packagevars() clsextend.map_variable("PROVIDES") clsextend.map_regexp_variable("PACKAGES_DYNAMIC") + d.setVar("LIBCEXTENSION", "") + d.setVar("ABIEXTENSION", "") } addhandler nativesdk_virtclass_handler diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass index a605a57ec..9145717f9 100644 --- a/poky/meta/classes/package_rpm.bbclass +++ b/poky/meta/classes/package_rpm.bbclass @@ -409,7 +409,6 @@ python write_specfile () { if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": bb.note("Not creating empty RPM package for %s" % splitname) else: - bb.note("Creating RPM package for %s" % splitname) spec_files_top.append('%files') if extra_pkgdata: package_rpm_extra_pkgdata(splitname, spec_files_top, localdata) @@ -418,7 +417,7 @@ python write_specfile () { bb.note("Creating RPM package for %s" % splitname) spec_files_top.extend(file_list) else: - bb.note("Creating EMPTY RPM Package for %s" % splitname) + bb.note("Creating empty RPM package for %s" % splitname) spec_files_top.append('') continue @@ -510,7 +509,7 @@ python write_specfile () { bb.note("Creating RPM package for %s" % splitname) spec_files_bottom.extend(file_list) else: - bb.note("Creating EMPTY RPM Package for %s" % splitname) + bb.note("Creating empty RPM package for %s" % splitname) spec_files_bottom.append('') del localdata diff --git a/poky/meta/classes/populate_sdk_base.bbclass b/poky/meta/classes/populate_sdk_base.bbclass index 59920a57a..4e3794f75 100644 --- a/poky/meta/classes/populate_sdk_base.bbclass +++ b/poky/meta/classes/populate_sdk_base.bbclass @@ -63,7 +63,7 @@ python () { SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}" SDK_DEPENDS = "virtual/fakeroot-native ${SDK_ARCHIVE_DEPENDS} cross-localedef-native nativesdk-qemuwrapper-cross ${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross" PATH_prepend = "${STAGING_DIR_HOST}${SDKPATHNATIVE}${bindir}/crossscripts:${@":".join(all_multilib_tune_values(d, 'STAGING_BINDIR_CROSS').split())}:" -SDK_DEPENDS_append_libc-glibc = " nativesdk-glibc-locale" +SDK_DEPENDS += "nativesdk-glibc-locale" # We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it # could be set to the MACHINE_ARCH diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass index 800e1175d..086f55df0 100644 --- a/poky/meta/classes/populate_sdk_ext.bbclass +++ b/poky/meta/classes/populate_sdk_ext.bbclass @@ -20,6 +20,7 @@ SDK_EXT_task-populate-sdk-ext = "-ext" SDK_EXT_TYPE ?= "full" SDK_INCLUDE_PKGDATA ?= "0" SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE') == 'full' else '0'}" +SDK_INCLUDE_NATIVESDK ?= "0" SDK_RECRDEP_TASKS ?= "" @@ -401,9 +402,27 @@ python copy_buildsystem () { excluded_targets = get_sdk_install_targets(d, images_only=True) sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' + #nativesdk-only sigfile to merge into locked-sigs.inc + sdk_include_nativesdk = (d.getVar("SDK_INCLUDE_NATIVESDK") == '1') + nativesigfile = d.getVar('WORKDIR') + '/locked-sigs_nativesdk.inc' + nativesigfile_pruned = d.getVar('WORKDIR') + '/locked-sigs_nativesdk_pruned.inc' + + if sdk_include_nativesdk: + oe.copy_buildsystem.prune_lockedsigs([], + excluded_targets.split(), + nativesigfile, + True, + nativesigfile_pruned) + + oe.copy_buildsystem.merge_lockedsigs([], + sigfile, + nativesigfile_pruned, + sigfile) + oe.copy_buildsystem.prune_lockedsigs([], excluded_targets.split(), sigfile, + False, lockedsigs_pruned) sstate_out = baseoutpath + '/sstate-cache' @@ -414,7 +433,7 @@ python copy_buildsystem () { sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1') sdk_ext_type = d.getVar('SDK_EXT_TYPE') - if sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative: + if (sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative) and not sdk_include_nativesdk: # Create the filtered task list used to generate the sstate cache shipped with the SDK tasklistfn = d.getVar('WORKDIR') + '/tasklist.txt' create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath) @@ -657,9 +676,16 @@ fakeroot python do_populate_sdk_ext() { d.setVar('SDKDEPLOYDIR', '${SDKEXTDEPLOYDIR}') # ESDKs have a libc from the buildtools so ensure we don't ship linguas twice d.delVar('SDKIMAGE_LINGUAS') + if d.getVar("SDK_INCLUDE_NATIVESDK") == '1': + generate_nativesdk_lockedsigs(d) populate_sdk_common(d) } +def generate_nativesdk_lockedsigs(d): + import oe.copy_buildsystem + sigfile = d.getVar('WORKDIR') + '/locked-sigs_nativesdk.inc' + oe.copy_buildsystem.generate_locked_sigs(sigfile, d) + def get_ext_sdk_depends(d): # Note: the deps varflag is a list not a string, so we need to specify expand=False deps = d.getVarFlag('do_image_complete', 'deps', False) diff --git a/poky/meta/classes/report-error.bbclass b/poky/meta/classes/report-error.bbclass index 1c55abfbf..ea043b23e 100644 --- a/poky/meta/classes/report-error.bbclass +++ b/poky/meta/classes/report-error.bbclass @@ -25,6 +25,19 @@ def errorreport_savedata(e, newdata, file): json.dump(newdata, f, indent=4, sort_keys=True) return datafile +def get_conf_data(e, filename): + builddir = e.data.getVar('TOPDIR') + filepath = os.path.join(builddir, "conf", filename) + jsonstring = "" + if os.path.exists(filepath): + with open(filepath, 'r') as f: + for line in f.readlines(): + if line.startswith("#") or len(line.strip()) == 0: + continue + else: + jsonstring=jsonstring + line + return jsonstring + python errorreport_handler () { import json import codecs @@ -51,6 +64,8 @@ python errorreport_handler () { data['failures'] = [] data['component'] = " ".join(e.getPkgs()) data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) + data['local_conf'] = get_conf_data(e, 'local.conf') + data['auto_conf'] = get_conf_data(e, 'auto.conf') lock = bb.utils.lockfile(datafile + '.lock') errorreport_savedata(e, data, "error-report.txt") bb.utils.unlockfile(lock) diff --git a/poky/meta/classes/rootfs-postcommands.bbclass b/poky/meta/classes/rootfs-postcommands.bbclass index fc338161c..88f75d0f4 100644 --- a/poky/meta/classes/rootfs-postcommands.bbclass +++ b/poky/meta/classes/rootfs-postcommands.bbclass @@ -361,7 +361,9 @@ rootfs_reproducible () { echo $sformatted > ${IMAGE_ROOTFS}/etc/version bbnote "rootfs_reproducible: set /etc/version to $sformatted" - find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | xargs -0r \ - sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g' + if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then + find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name '%gconf.xml' -print0 | xargs -0r \ + sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g' + fi fi } diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass index 11222223a..b47b9c23b 100644 --- a/poky/meta/classes/sstate.bbclass +++ b/poky/meta/classes/sstate.bbclass @@ -89,11 +89,6 @@ SSTATE_HASHEQUIV_METHOD[doc] = "The fully-qualified function used to calculate \ the output hash for a task, which in turn is used to determine equivalency. \ " -SSTATE_HASHEQUIV_SERVER ?= "" -SSTATE_HASHEQUIV_SERVER[doc] = "The hash equivalence sever. For example, \ - 'http://192.168.0.1:5000'. Do not include a trailing slash \ - " - SSTATE_HASHEQUIV_REPORT_TASKDATA ?= "0" SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \ hash equivalency server, such as PN, PV, taskname, etc. This information \ diff --git a/poky/meta/classes/systemd-boot.bbclass b/poky/meta/classes/systemd-boot.bbclass index 3cd6811a6..336c4c2ff 100644 --- a/poky/meta/classes/systemd-boot.bbclass +++ b/poky/meta/classes/systemd-boot.bbclass @@ -11,50 +11,25 @@ do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy" -EFIDIR = "/EFI/BOOT" +require conf/image-uefi.conf # Need UUID utility code. inherit fs-uuid efi_populate() { - DEST=$1 + efi_populate_common "$1" systemd - EFI_IMAGE="systemd-bootia32.efi" - DEST_EFI_IMAGE="bootia32.efi" - if [ "${TARGET_ARCH}" = "x86_64" ]; then - EFI_IMAGE="systemd-bootx64.efi" - DEST_EFI_IMAGE="bootx64.efi" - fi - - install -d ${DEST}${EFIDIR} # systemd-boot requires these paths for configuration files # they are not customizable so no point in new vars install -d ${DEST}/loader install -d ${DEST}/loader/entries - install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE} - EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf for i in ${SYSTEMD_BOOT_ENTRIES}; do install -m 0644 ${i} ${DEST}/loader/entries done } -efi_iso_populate() { - iso_dir=$1 - efi_populate $iso_dir - mkdir -p ${EFIIMGDIR}/${EFIDIR} - cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} +efi_iso_populate_append() { cp -r $iso_dir/loader ${EFIIMGDIR} - cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} - EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh - if [ -f "$iso_dir/initrd" ] ; then - cp $iso_dir/initrd ${EFIIMGDIR} - fi -} - -efi_hddimg_populate() { - efi_populate $1 } inherit systemd-boot-cfg diff --git a/poky/meta/conf/bitbake.conf b/poky/meta/conf/bitbake.conf index a0a7f4911..263d8aea4 100644 --- a/poky/meta/conf/bitbake.conf +++ b/poky/meta/conf/bitbake.conf @@ -872,7 +872,7 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \ WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \ BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH extend_recipe_sysroot DEPLOY_DIR \ - SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_SERVER SSTATE_HASHEQUIV_REPORT_TASKDATA \ + SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_REPORT_TASKDATA \ SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE" BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \ SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \ diff --git a/poky/meta/conf/distro/include/maintainers.inc b/poky/meta/conf/distro/include/maintainers.inc index 5f21f98b2..ab0c6c554 100644 --- a/poky/meta/conf/distro/include/maintainers.inc +++ b/poky/meta/conf/distro/include/maintainers.inc @@ -718,7 +718,6 @@ RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko " RECIPE_MAINTAINER_pn-wayland-protocols = "Denys Dmytriyenko " RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin " RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko " -RECIPE_MAINTAINER_pn-weston-conf = "Denys Dmytriyenko " RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko " RECIPE_MAINTAINER_pn-wget = "Yi Zhao " RECIPE_MAINTAINER_pn-which = "Anuj Mittal " diff --git a/poky/meta/conf/image-uefi.conf b/poky/meta/conf/image-uefi.conf new file mode 100644 index 000000000..aaeff12cc --- /dev/null +++ b/poky/meta/conf/image-uefi.conf @@ -0,0 +1,16 @@ +# Location of EFI files inside EFI System Partition +EFIDIR ?= "/EFI/BOOT" + +# Prefix where ESP is mounted inside rootfs. Set to empty if package is going +# to be installed to ESP directly +EFI_PREFIX ?= "/boot" + +# Location inside rootfs. +EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}" + +# Determine name of bootloader image +EFI_BOOT_IMAGE ?= "bootINVALID.efi" +EFI_BOOT_IMAGE_x86-64 = "bootx64.efi" +EFI_BOOT_IMAGE_x86 = "bootia32.efi" +EFI_BOOT_IMAGE_aarch64 = "bootaa64.efi" +EFI_BOOT_IMAGE_arm = "bootarm.efi" diff --git a/poky/meta/conf/layer.conf b/poky/meta/conf/layer.conf index 5ecb93651..95b1128ab 100644 --- a/poky/meta/conf/layer.conf +++ b/poky/meta/conf/layer.conf @@ -73,7 +73,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ font-alias->font-util \ systemd-boot->systemd-bootconf \ systemd->systemd-conf \ - weston->weston-conf \ + weston->weston-init \ weston-init->weston \ weston-init->kbd \ connman->xl2tpd \ diff --git a/poky/meta/conf/machine/include/tune-cortexa57-cortexa53.inc b/poky/meta/conf/machine/include/tune-cortexa57-cortexa53.inc new file mode 100644 index 000000000..d05e93f51 --- /dev/null +++ b/poky/meta/conf/machine/include/tune-cortexa57-cortexa53.inc @@ -0,0 +1,18 @@ +DEFAULTTUNE ?= "cortexa57-cortexa53" +require conf/machine/include/arm/arch-armv8a.inc + +TUNEVALID[cortexa57-cortexa53] = "Enable big.LITTLE Cortex-A57.Cortex-A53 specific processor optimizations" +TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a" + +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -march=armv8-a", "" ,d)}" + +MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", "cortexa57-cortexa53:", "" ,d)}" + +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", " -mtune=cortex-a57.cortex-a53", "", d)}" + +# Little Endian base configs +AVAILTUNES += "cortexa57-cortexa53" +ARMPKGARCH_tune-cortexa57-cortexa53 = "cortexa57-cortexa53" +TUNE_FEATURES_tune-cortexa57-cortexa53 = "${TUNE_FEATURES_tune-aarch64} cortexa57-cortexa53" +PACKAGE_EXTRA_ARCHS_tune-cortexa57-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-aarch64} cortexa57-cortexa53" +BASE_LIB_tune-cortexa57-cortexa53 = "lib64" diff --git a/poky/meta/conf/multilib.conf b/poky/meta/conf/multilib.conf index 65a28ddbd..cfed3fbbd 100644 --- a/poky/meta/conf/multilib.conf +++ b/poky/meta/conf/multilib.conf @@ -29,4 +29,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = ":${WORKDIR}/recipe-sysroot/${datadir}/pkg # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES # ${MLPREFIX}${BPN} -NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts" +NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf" diff --git a/poky/meta/lib/oe/classextend.py b/poky/meta/lib/oe/classextend.py index e25122e81..f02fbe9fb 100644 --- a/poky/meta/lib/oe/classextend.py +++ b/poky/meta/lib/oe/classextend.py @@ -24,6 +24,8 @@ class ClassExtender(object): if not subs.startswith(self.extname): return "virtual/" + self.extname + "-" + subs return name + if name.startswith("/"): + return name if not name.startswith(self.extname): return self.extname + "-" + name return name diff --git a/poky/meta/lib/oe/copy_buildsystem.py b/poky/meta/lib/oe/copy_buildsystem.py index cb663b21c..31a84f5b0 100644 --- a/poky/meta/lib/oe/copy_buildsystem.py +++ b/poky/meta/lib/oe/copy_buildsystem.py @@ -177,7 +177,7 @@ def generate_locked_sigs(sigfile, d): tasks = ['%s:%s' % (v[2], v[1]) for v in depd.values()] bb.parse.siggen.dump_lockedsigs(sigfile, tasks) -def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output): +def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, pruned_output): with open(lockedsigs, 'r') as infile: bb.utils.mkdirhier(os.path.dirname(pruned_output)) with open(pruned_output, 'w') as f: @@ -187,7 +187,11 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output if line.endswith('\\\n'): splitval = line.strip().split(':') if not splitval[1] in excluded_tasks and not splitval[0] in excluded_targets: - f.write(line) + if onlynative: + if 'nativesdk' in splitval[0]: + f.write(line) + else: + f.write(line) else: f.write(line) invalue = False diff --git a/poky/meta/lib/oe/sstatesig.py b/poky/meta/lib/oe/sstatesig.py index 0c7a6f5ed..50d80bf51 100644 --- a/poky/meta/lib/oe/sstatesig.py +++ b/poky/meta/lib/oe/sstatesig.py @@ -262,13 +262,9 @@ class SignatureGeneratorOEEquivHash(bb.siggen.SignatureGeneratorUniHashMixIn, Si def init_rundepcheck(self, data): super().init_rundepcheck(data) - autostart = data.getVar('BB_HASHSERVE') - if autostart: - self.server = "http://" + autostart - else: - self.server = data.getVar('SSTATE_HASHEQUIV_SERVER') + self.server = data.getVar('BB_HASHSERVE') if not self.server: - bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_SERVER or BB_HASHSERVE to be set") + bb.fatal("OEEquivHash requires BB_HASHSERVE to be set") self.method = data.getVar('SSTATE_HASHEQUIV_METHOD') if not self.method: bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set") diff --git a/poky/meta/lib/oeqa/core/case.py b/poky/meta/lib/oeqa/core/case.py index aca144e9d..180635ac6 100644 --- a/poky/meta/lib/oeqa/core/case.py +++ b/poky/meta/lib/oeqa/core/case.py @@ -4,6 +4,8 @@ # SPDX-License-Identifier: MIT # +import base64 +import zlib import unittest from oeqa.core.exception import OEQAMissingVariable @@ -49,3 +51,50 @@ class OETestCase(unittest.TestCase): for d in self.decorators: d.tearDownDecorator() self.tearDownMethod() + +class OEPTestResultTestCase: + """ + Mix-in class to provide functions to make interacting with extraresults for + the purposes of storing ptestresult data. + """ + @staticmethod + def _compress_log(log): + logdata = log.encode("utf-8") + logdata = zlib.compress(logdata) + logdata = base64.b64encode(logdata).decode("utf-8") + return {"compressed" : logdata} + + def ptest_rawlog(self, log): + if not hasattr(self, "extraresults"): + self.extraresults = {"ptestresult.sections" : {}} + self.extraresults["ptestresult.rawlogs"] = {"log" : self._compress_log(log)} + + def ptest_section(self, section, duration = None, log = None, logfile = None, exitcode = None): + if not hasattr(self, "extraresults"): + self.extraresults = {"ptestresult.sections" : {}} + + sections = self.extraresults.get("ptestresult.sections") + if section not in sections: + sections[section] = {} + + if log is not None: + sections[section]["log"] = self._compress_log(log) + elif logfile is not None: + with open(logfile, "r") as f: + sections[section]["log"] = self._compress_log(f.read()) + + if duration is not None: + sections[section]["duration"] = duration + if exitcode is not None: + sections[section]["exitcode"] = exitcode + + def ptest_result(self, section, test, result): + if not hasattr(self, "extraresults"): + self.extraresults = {"ptestresult.sections" : {}} + + sections = self.extraresults.get("ptestresult.sections") + if section not in sections: + sections[section] = {} + resultname = "ptestresult.{}.{}".format(section, test) + self.extraresults[resultname] = {"status" : result} + diff --git a/poky/meta/lib/oeqa/core/utils/concurrencytest.py b/poky/meta/lib/oeqa/core/utils/concurrencytest.py index fa6fa34b0..6293cf94e 100644 --- a/poky/meta/lib/oeqa/core/utils/concurrencytest.py +++ b/poky/meta/lib/oeqa/core/utils/concurrencytest.py @@ -216,7 +216,7 @@ def removebuilddir(d): while delay and os.path.exists(d + "/bitbake.lock"): time.sleep(1) delay = delay - 1 - bb.utils.prunedir(d) + bb.utils.prunedir(d, ionice=True) def fork_for_tests(concurrency_num, suite): result = [] diff --git a/poky/meta/lib/oeqa/selftest/cases/binutils.py b/poky/meta/lib/oeqa/selftest/cases/binutils.py index 9bc752040..821f52f5a 100644 --- a/poky/meta/lib/oeqa/selftest/cases/binutils.py +++ b/poky/meta/lib/oeqa/selftest/cases/binutils.py @@ -4,6 +4,7 @@ import sys import re import logging from oeqa.core.decorator import OETestTag +from oeqa.core.case import OEPTestResultTestCase from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars @@ -15,7 +16,7 @@ def parse_values(content): break @OETestTag("toolchain-user", "toolchain-system") -class BinutilsCrossSelfTest(OESelftestTestCase): +class BinutilsCrossSelfTest(OESelftestTestCase, OEPTestResultTestCase): def test_binutils(self): self.run_binutils("binutils") @@ -36,14 +37,14 @@ class BinutilsCrossSelfTest(OESelftestTestCase): bitbake("{0} -c check".format(recipe)) - ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite - self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} - sumspath = os.path.join(builddir, suite, "{0}.sum".format(suite)) if not os.path.exists(sumspath): sumspath = os.path.join(builddir, suite, "testsuite", "{0}.sum".format(suite)) + logpath = os.path.splitext(sumspath)[0] + ".log" + ptestsuite = "binutils-{}".format(suite) if suite != "binutils" else suite + self.ptest_section(ptestsuite, logfile = logpath) with open(sumspath, "r") as f: for test, result in parse_values(f): - self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} + self.ptest_result(ptestsuite, test, result) diff --git a/poky/meta/lib/oeqa/selftest/cases/gcc.py b/poky/meta/lib/oeqa/selftest/cases/gcc.py index 2c25b5904..5a917b9c4 100644 --- a/poky/meta/lib/oeqa/selftest/cases/gcc.py +++ b/poky/meta/lib/oeqa/selftest/cases/gcc.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: MIT import os from oeqa.core.decorator import OETestTag +from oeqa.core.case import OEPTestResultTestCase from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command @@ -11,7 +12,7 @@ def parse_values(content): yield i[len(v) + 2:].strip(), v break -class GccSelfTestBase(OESelftestTestCase): +class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): def check_skip(self, suite): targets = get_bb_var("RUNTIMETARGET", "gcc-runtime").split() if suite not in targets: @@ -41,20 +42,20 @@ class GccSelfTestBase(OESelftestTestCase): bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] - self.extraresults = {"ptestresult.sections" : {}} for suite in suites: sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite)) if not os.path.exists(sumspath): # check in target dirs sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite)) if not os.path.exists(sumspath): # handle libstdc++-v3 -> libstdc++ sumspath = os.path.join(builddir, target_sys, suite, "testsuite", "{0}.sum".format(suite.split("-")[0])) + logpath = os.path.splitext(sumspath)[0] + ".log" ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite - self.extraresults["ptestresult.sections"][ptestsuite] = {} + self.ptest_section(ptestsuite, logfile = logpath) with open(sumspath, "r") as f: for test, result in parse_values(f): - self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} + self.ptest_result(ptestsuite, test, result) def run_check_emulated(self, *args, **kwargs): # build core-image-minimal with required packages diff --git a/poky/meta/lib/oeqa/selftest/cases/glibc.py b/poky/meta/lib/oeqa/selftest/cases/glibc.py index 2e42485dd..c687f6ef9 100644 --- a/poky/meta/lib/oeqa/selftest/cases/glibc.py +++ b/poky/meta/lib/oeqa/selftest/cases/glibc.py @@ -2,6 +2,7 @@ import os import contextlib from oeqa.core.decorator import OETestTag +from oeqa.core.case import OEPTestResultTestCase from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command from oeqa.utils.nfs import unfs_server @@ -13,7 +14,7 @@ def parse_values(content): yield i[len(v) + 2:].strip(), v break -class GlibcSelfTestBase(OESelftestTestCase): +class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): def run_check(self, ssh = None): # configure ssh target features = [] @@ -31,10 +32,10 @@ class GlibcSelfTestBase(OESelftestTestCase): builddir = get_bb_var("B", "glibc-testsuite") ptestsuite = "glibc-user" if ssh is None else "glibc" - self.extraresults = {"ptestresult.sections" : {ptestsuite : {}}} + self.ptest_section(ptestsuite) with open(os.path.join(builddir, "tests.sum"), "r") as f: for test, result in parse_values(f): - self.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result} + self.ptest_result(ptestsuite, test, result) def run_check_emulated(self): with contextlib.ExitStack() as s: diff --git a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py index afc629f29..8213d63e3 100644 --- a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -161,7 +161,8 @@ class ImageFeatures(OESelftestTestCase): sysroot = get_bb_var('STAGING_DIR_NATIVE', 'core-image-minimal') result = runCmd('qemu-img info --output json %s' % image_path, native_sysroot=sysroot) - self.assertTrue(json.loads(result.output).get('format') == itype) + self.assertTrue(json.loads(result.output).get('format') == itype, + msg="Could not parse '%s'" % result.output) def test_long_chain_conversion(self): """ diff --git a/poky/meta/lib/oeqa/selftest/cases/oescripts.py b/poky/meta/lib/oeqa/selftest/cases/oescripts.py index 7770b66a2..c169885cf 100644 --- a/poky/meta/lib/oeqa/selftest/cases/oescripts.py +++ b/poky/meta/lib/oeqa/selftest/cases/oescripts.py @@ -3,10 +3,12 @@ # import os +import shutil import unittest from oeqa.selftest.case import OESelftestTestCase from oeqa.selftest.cases.buildhistory import BuildhistoryBase from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer +from oeqa.utils import CommandError class BuildhistoryDiffTests(BuildhistoryBase): @@ -63,3 +65,59 @@ class OEPybootchartguyTests(OEScriptTests): runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f pdf' % (self.scripts_dir, self.buildstats, self.tmpdir)) self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf")) +class OEGitproxyTests(OESelftestTestCase): + + scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts') + + def test_oegitproxy_help(self): + try: + res = runCmd('%s/oe-git-proxy --help' % self.scripts_dir, assert_error=False) + self.assertTrue(False) + except CommandError as e: + self.assertEqual(2, e.retcode) + + def run_oegitproxy(self, custom_shell=None): + os.environ['SOCAT'] = shutil.which("echo") + os.environ['ALL_PROXY'] = "https://proxy.example.com:3128" + os.environ['NO_PROXY'] = "*.example.com,.no-proxy.org,192.168.42.0/24,127.*.*.*" + + if custom_shell is None: + prefix = '' + else: + prefix = custom_shell + ' ' + + # outside, use the proxy + res = runCmd('%s%s/oe-git-proxy host.outside-example.com 9418' % + (prefix,self.scripts_dir)) + self.assertIn('PROXY:', res.output) + # match with wildcard suffix + res = runCmd('%s%s/oe-git-proxy host.example.com 9418' % + (prefix, self.scripts_dir)) + self.assertIn('TCP:', res.output) + # match just suffix + res = runCmd('%s%s/oe-git-proxy host.no-proxy.org 9418' % + (prefix, self.scripts_dir)) + self.assertIn('TCP:', res.output) + # match IP subnet + res = runCmd('%s%s/oe-git-proxy 192.168.42.42 9418' % + (prefix, self.scripts_dir)) + self.assertIn('TCP:', res.output) + # match IP wildcard + res = runCmd('%s%s/oe-git-proxy 127.1.2.3 9418' % + (prefix, self.scripts_dir)) + self.assertIn('TCP:', res.output) + + # test that * globbering is off + os.environ['NO_PROXY'] = "*" + res = runCmd('%s%s/oe-git-proxy host.example.com 9418' % + (prefix, self.scripts_dir)) + self.assertIn('TCP:', res.output) + + def test_oegitproxy_proxy(self): + self.run_oegitproxy() + + def test_oegitproxy_proxy_dash(self): + dash = shutil.which("dash") + if dash is None: + self.skipTest("No \"dash\" found on test system.") + self.run_oegitproxy(custom_shell=dash) diff --git a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py index 20969d2c4..3f212bd0e 100644 --- a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -191,7 +191,7 @@ class TestImage(OESelftestTestCase): features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n' features += 'IMAGE_INSTALL_append = " kmscube"\n' - features += 'TEST_RUNQEMUPARAMS = "gtk-gl"\n' + features += 'TEST_RUNQEMUPARAMS = "gtk gl"\n' self.write_config(features) bitbake('core-image-minimal') bitbake('-c testimage core-image-minimal') diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py index fcdd55059..ea7530040 100644 --- a/poky/meta/lib/oeqa/selftest/cases/wic.py +++ b/poky/meta/lib/oeqa/selftest/cases/wic.py @@ -632,8 +632,10 @@ class Wic2(WicTestCase): # 1:0.00MiB:200MiB:200MiB:ext4::;\n partlns = res.output.splitlines()[2:] - self.assertEqual(1, len(partlns)) - self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0]) + self.assertEqual(1, len(partlns), + msg="Partition list '%s'" % res.output) + self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0], + msg="Partition list '%s'" % res.output) def test_fixed_size_error(self): """ diff --git a/poky/meta/recipes-bsp/acpid/acpid.inc b/poky/meta/recipes-bsp/acpid/acpid.inc index 766ed4f89..1e43e7a9d 100644 --- a/poky/meta/recipes-bsp/acpid/acpid.inc +++ b/poky/meta/recipes-bsp/acpid/acpid.inc @@ -1,4 +1,10 @@ SUMMARY = "A daemon for delivering ACPI events" +DESCRIPTION = "ACPID is a completely flexible, totally extensible daemon for \ +delivering ACPI events. It listens on netlink interface (or on the \ +deprecated file /proc/acpi/event), and when an event occurs, executes programs \ +to handle the event. The programs it executes are configured through a set of \ +configuration files, which can be dropped into place by packages or by the \ +admin." HOMEPAGE = "http://sourceforge.net/projects/acpid2" BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar" SECTION = "base" diff --git a/poky/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/poky/meta/recipes-bsp/formfactor/formfactor_0.0.bb index 53cf1cf77..ea1fa4c75 100644 --- a/poky/meta/recipes-bsp/formfactor/formfactor_0.0.bb +++ b/poky/meta/recipes-bsp/formfactor/formfactor_0.0.bb @@ -1,4 +1,7 @@ SUMMARY = "Device formfactor information" +DESCRIPTION = "A formfactor configuration file provides information about the \ +target hardware for which the image is being built and information that the \ +build system cannot obtain from other sources such as the kernel." SECTION = "base" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" diff --git a/poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb b/poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb index 750f8c808..572580313 100644 --- a/poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb +++ b/poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb @@ -1,11 +1,16 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SUMMARY = "Basic grub.cfg for use in EFI systems" +DESCRIPTION = "Grub might require different configuration file for \ +different machines." +HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuration" RPROVIDES_${PN} += "virtual/grub-bootconf" inherit grub-efi-cfg +require conf/image-uefi.conf + S = "${WORKDIR}" GRUB_CFG = "${S}/grub-bootconf" @@ -20,10 +25,8 @@ python do_configure() { do_configure[vardeps] += "APPEND ROOT" do_install() { - install -d ${D}/boot - install -d ${D}/boot/EFI - install -d ${D}/boot/EFI/BOOT - install grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg + install -d ${D}${EFI_FILES_PATH} + install grub-bootconf ${D}${EFI_FILES_PATH}/grub.cfg } -FILES_${PN} = "/boot/EFI/BOOT/grub.cfg" +FILES_${PN} = "${EFI_FILES_PATH}/grub.cfg" diff --git a/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb b/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb index aaa198ea2..b9d6225d2 100644 --- a/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb +++ b/poky/meta/recipes-bsp/grub/grub-efi_2.04.bb @@ -1,9 +1,11 @@ require grub2.inc +require conf/image-uefi.conf + GRUBPLATFORM = "efi" DEPENDS_append_class-target = " grub-efi-native" -RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf" +RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf" SRC_URI += " \ file://cfg \ @@ -18,18 +20,15 @@ python __anonymous () { prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-" if target == "x86_64": grubtarget = 'x86_64' - grubimage = prefix + "bootx64.efi" elif re.match('i.86', target): grubtarget = 'i386' - grubimage = prefix + "bootia32.efi" elif re.match('aarch64', target): grubtarget = 'arm64' - grubimage = prefix + "bootaa64.efi" elif re.match('arm', target): grubtarget = 'arm' - grubimage = prefix + "bootarm.efi" else: raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) + grubimage = prefix + d.getVar("EFI_BOOT_IMAGE") d.setVar("GRUB_TARGET", grubtarget) d.setVar("GRUB_IMAGE", grubimage) prefix = "grub-efi-" if prefix == "" else "" @@ -45,7 +44,7 @@ do_mkimage() { cd ${B} # Search for the grub.cfg on the local boot media by using the # built in cfg file provided via this recipe - grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ + grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ ${GRUB_BUILDIN} } @@ -57,10 +56,8 @@ do_mkimage_class-native() { } do_install_append_class-target() { - install -d ${D}/boot - install -d ${D}/boot/EFI - install -d ${D}/boot/EFI/BOOT - install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE} + install -d ${D}${EFI_FILES_PATH} + install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE} } do_install_class-native() { @@ -100,7 +97,7 @@ addtask deploy after do_install before do_build FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ ${datadir}/grub \ - /boot/EFI/BOOT/${GRUB_IMAGE} \ + ${EFI_FILES_PATH}/${GRUB_IMAGE} \ " FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi" diff --git a/poky/meta/recipes-bsp/grub/grub_2.04.bb b/poky/meta/recipes-bsp/grub/grub_2.04.bb index 1d1a45670..9232ea812 100644 --- a/poky/meta/recipes-bsp/grub/grub_2.04.bb +++ b/poky/meta/recipes-bsp/grub/grub_2.04.bb @@ -1,7 +1,7 @@ require grub2.inc RDEPENDS_${PN}-common += "${PN}-editenv" -RDEPENDS_${PN} += "diffutils freetype ${PN}-common" +RDEPENDS_${PN} += "${PN}-common" RPROVIDES_${PN}-editenv += "${PN}-efi-editenv" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc index ad043dbcd..a056eae8c 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -1,4 +1,8 @@ HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +DESCRIPTION = "U-Boot, a boot loader for Embedded boards based on PowerPC, \ +ARM, MIPS and several other processors, which can be installed in a boot \ +ROM and used to initialize and test the hardware or to download and run \ +application code." SECTION = "bootloaders" DEPENDS += "flex-native bison-native" diff --git a/poky/meta/recipes-bsp/usbinit/usbinit.bb b/poky/meta/recipes-bsp/usbinit/usbinit.bb index aba44b406..ef98f0bf6 100644 --- a/poky/meta/recipes-bsp/usbinit/usbinit.bb +++ b/poky/meta/recipes-bsp/usbinit/usbinit.bb @@ -1,4 +1,8 @@ SUMMARY = "Initscript for enabling USB gadget Ethernet" +DESCRIPTION = "This module allows ethernet emulation over USB, allowing for \ +all sorts of nifty things like SSH and NFS in one go plus charging over the \ +same wire, at higher speeds than most Wifi connections." +HOMEPAGE = "http://linux-sunxi.org/USB_Gadget/Ethernet" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" diff --git a/poky/meta/recipes-connectivity/iw/iw_5.0.1.bb b/poky/meta/recipes-connectivity/iw/iw_5.0.1.bb deleted file mode 100644 index 87b21e668..000000000 --- a/poky/meta/recipes-connectivity/iw/iw_5.0.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "nl80211 based CLI configuration utility for wireless devices" -DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \ -wireless devices. It supports almost all new drivers that have been added \ -to the kernel recently. " -HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw" -SECTION = "base" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" - -DEPENDS = "libnl" - -SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ - file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ - file://separate-objdir.patch \ -" - -SRC_URI[md5sum] = "a0a17ab1b20132c716bba9a4f9974ba6" -SRC_URI[sha256sum] = "36fc7592dde7bec934df83cd53ef1f2c08ceec5cd58d07eb8f71cc6e8464013c" - -inherit pkgconfig - -EXTRA_OEMAKE = "\ - -f '${S}/Makefile' \ - \ - 'PREFIX=${prefix}' \ - 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' \ -" -B = "${WORKDIR}/build" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} diff --git a/poky/meta/recipes-connectivity/iw/iw_5.3.bb b/poky/meta/recipes-connectivity/iw/iw_5.3.bb new file mode 100644 index 000000000..f7f13f5a3 --- /dev/null +++ b/poky/meta/recipes-connectivity/iw/iw_5.3.bb @@ -0,0 +1,32 @@ +SUMMARY = "nl80211 based CLI configuration utility for wireless devices" +DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \ +wireless devices. It supports almost all new drivers that have been added \ +to the kernel recently. " +HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw" +SECTION = "base" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" + +DEPENDS = "libnl" + +SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ + file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ + file://separate-objdir.patch \ +" + +SRC_URI[md5sum] = "6d4d1c0ee34f3a7bda0e6aafcd7aaf31" +SRC_URI[sha256sum] = "175abbfce86348c0b70e778c13a94c0bfc9abc7a506d2bd608261583aeedf64a" + +inherit pkgconfig + +EXTRA_OEMAKE = "\ + -f '${S}/Makefile' \ + \ + 'PREFIX=${prefix}' \ + 'SBINDIR=${sbindir}' \ + 'MANDIR=${mandir}' \ +" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch new file mode 100644 index 000000000..7b0f93535 --- /dev/null +++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch @@ -0,0 +1,156 @@ +From 2fbc62e2a13fc22b6ae4910e295a2c10fb790486 Mon Sep 17 00:00:00 2001 +From: Zoltan Karcagi +Date: Mon, 12 Aug 2019 13:27:16 -0400 +Subject: [PATCH] Fix include order between config.h and stat.h + +At least on Arch linux ARM, the definition of struct stat in stat.h depends +on __USE_FILE_OFFSET64. This symbol comes from config.h when defined, +therefore config.h must always be included before stat.h. Fix all +occurrences where the order is wrong by moving config.h to the top. + +This fixes the client side error "Stale file handle" when mounting from +a server running Arch Linux ARM. + +Signed-off-by: Zoltan Karcagi +Signed-off-by: Steve Dickson + +Upstream-Status: Backport +[http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=2fbc62e2a13fc22b6ae4910e295a2c10fb790486] + +Signed-off-by: Yi Zhao +--- + support/misc/nfsd_path.c | 5 ++++- + support/misc/xstat.c | 5 ++++- + support/nfs/conffile.c | 8 +++++++- + utils/blkmapd/device-discovery.c | 8 ++++---- + utils/idmapd/idmapd.c | 8 ++++---- + 5 files changed, 23 insertions(+), 11 deletions(-) + +diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c +index 84e4802..f078a66 100644 +--- a/support/misc/nfsd_path.c ++++ b/support/misc/nfsd_path.c +@@ -1,3 +1,7 @@ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ + #include + #include + #include +@@ -5,7 +9,6 @@ + #include + #include + +-#include "config.h" + #include "conffile.h" + #include "xmalloc.h" + #include "xlog.h" +diff --git a/support/misc/xstat.c b/support/misc/xstat.c +index fa04788..4c997ee 100644 +--- a/support/misc/xstat.c ++++ b/support/misc/xstat.c +@@ -1,3 +1,7 @@ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ + #include + #include + #include +@@ -5,7 +9,6 @@ + #include + #include + +-#include "config.h" + #include "xstat.h" + + #ifdef HAVE_FSTATAT +diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c +index b6400be..6ba8a35 100644 +--- a/support/nfs/conffile.c ++++ b/support/nfs/conffile.c +@@ -500,7 +500,7 @@ conf_readfile(const char *path) + + if ((stat (path, &sb) == 0) || (errno != ENOENT)) { + char *new_conf_addr = NULL; +- size_t sz = sb.st_size; ++ off_t sz; + int fd = open (path, O_RDONLY, 0); + + if (fd == -1) { +@@ -517,6 +517,11 @@ conf_readfile(const char *path) + + /* only after we have the lock, check the file size ready to read it */ + sz = lseek(fd, 0, SEEK_END); ++ if (sz < 0) { ++ xlog_warn("conf_readfile: unable to determine file size: %s", ++ strerror(errno)); ++ goto fail; ++ } + lseek(fd, 0, SEEK_SET); + + new_conf_addr = malloc(sz+1); +@@ -2162,6 +2167,7 @@ conf_write(const char *filename, const char *section, const char *arg, + ret = 0; + + cleanup: ++ flush_outqueue(&inqueue, NULL); + flush_outqueue(&outqueue, NULL); + + if (buff) +diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c +index e811703..f5f9b10 100644 +--- a/utils/blkmapd/device-discovery.c ++++ b/utils/blkmapd/device-discovery.c +@@ -26,6 +26,10 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++ + #include + #include + #include +@@ -51,10 +55,6 @@ + #include + #include + +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif /* HAVE_CONFIG_H */ +- + #include "device-discovery.h" + #include "xcommon.h" + #include "nfslib.h" +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c +index 62e37b8..267acea 100644 +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -34,6 +34,10 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++ + #include + #include + #include +@@ -62,10 +66,6 @@ + #include + #include + +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif /* HAVE_CONFIG_H */ +- + #include "xlog.h" + #include "conffile.h" + #include "queue.h" +-- +2.7.4 + diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb index 8b673c8f5..7e80354e4 100644 --- a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb +++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb @@ -32,6 +32,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x file://clang-format-string.patch \ file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \ + file://0001-Fix-include-order-between-config.h-and-stat.h.patch \ " SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch" SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch" diff --git a/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch b/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch deleted file mode 100644 index 6b4789fc7..000000000 --- a/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 711a161f03ef9ed7cd149a22bf1203700c103e96 Mon Sep 17 00:00:00 2001 -From: Pauli -Date: Fri, 29 Mar 2019 09:24:07 +1000 -Subject: [PATCH] Fix broken change from b3d113e. - -Reviewed-by: Tim Hudson -(Merged from https://github.com/openssl/openssl/pull/8606) - -Running valgrind against code using Openssl v1.1.1c reports a large number of -uninitialized memory errors. This fix from upstream solves this problem. - -Upstream-Status: Backport [https://github.com/openssl/openssl/commit/711a161f03ef9ed7cd149a22bf1203700c103e96] -Signed-off-by: Laurent Bonnans ---- - crypto/rand/rand_lib.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c -index 23abbde156..a298b7515b 100644 ---- a/crypto/rand/rand_lib.c -+++ b/crypto/rand/rand_lib.c -@@ -235,8 +235,9 @@ size_t rand_drbg_get_nonce(RAND_DRBG *drbg, - struct { - void * instance; - int count; -- } data = { NULL, 0 }; -+ } data; - -+ memset(&data, 0, sizeof(data)); - pool = rand_pool_new(0, min_len, max_len); - if (pool == NULL) - return 0; --- -2.20.1 - diff --git a/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-error-for-aarch64-big-endian.patch b/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-error-for-aarch64-big-endian.patch deleted file mode 100644 index 9a90a68cf..000000000 --- a/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-error-for-aarch64-big-endian.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 1f8c0f2feea5cdcae0bcd9dfc78198d9e2c4cf09 Mon Sep 17 00:00:00 2001 -From: Lei Maohui -Date: Thu, 13 Jun 2019 12:17:30 +0900 -Subject: [PATCH] Fix build error for aarch64 big endian. - -Modified rev to rev64, because rev only takes integer registers. -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90827 -Otherwise, the following error will occur. - -Error: operand 1 must be an integer register -- `rev v31.16b,v31.16b' - -Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/9151] - -Signed-off-by: Lei Maohui ---- - crypto/sha/asm/keccak1600-armv8.pl | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/crypto/sha/asm/keccak1600-armv8.pl b/crypto/sha/asm/keccak1600-armv8.pl -index dc72f18..6620690 100755 ---- a/crypto/sha/asm/keccak1600-armv8.pl -+++ b/crypto/sha/asm/keccak1600-armv8.pl -@@ -731,7 +731,7 @@ $code.=<<___; - blo .Lprocess_block_ce - ldr d31,[$inp],#8 // *inp++ - #ifdef __AARCH64EB__ -- rev v31.16b,v31.16b -+ rev64 v31.16b,v31.16b - #endif - eor $A[$j/5][$j%5],$A[$j/5][$j%5],v31.16b - beq .Lprocess_block_ce -@@ -740,7 +740,7 @@ ___ - $code.=<<___; - ldr d31,[$inp],#8 // *inp++ - #ifdef __AARCH64EB__ -- rev v31.16b,v31.16b -+ rev64 v31.16b,v31.16b - #endif - eor $A[4][4],$A[4][4],v31.16b - --- -2.7.4 - diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb deleted file mode 100644 index 75159ac72..000000000 --- a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb +++ /dev/null @@ -1,206 +0,0 @@ -SUMMARY = "Secure Socket Layer" -DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." -HOMEPAGE = "http://www.openssl.org/" -BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" -SECTION = "libs/network" - -# "openssl" here actually means both OpenSSL and SSLeay licenses apply -# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) -LICENSE = "openssl" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" - -DEPENDS = "hostperl-runtime-native" - -SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ - file://run-ptest \ - file://0001-skip-test_symbol_presence.patch \ - file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://afalg.patch \ - file://0001-Fix-build-error-for-aarch64-big-endian.patch \ - file://0001-Fix-broken-change-from-b3d113e.patch \ - " - -SRC_URI_append_class-nativesdk = " \ - file://environment.d-openssl.sh \ - " - -SRC_URI[md5sum] = "15e21da6efe8aa0e0768ffd8cd37a5f6" -SRC_URI[sha256sum] = "f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90" - -inherit lib_package multilib_header multilib_script ptest -MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" - -PACKAGECONFIG ?= "" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG_class-nativesdk = "" - -PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux" - -B = "${WORKDIR}/build" -do_configure[cleandirs] = "${B}" - -#| ./libcrypto.so: undefined reference to `getcontext' -#| ./libcrypto.so: undefined reference to `setcontext' -#| ./libcrypto.so: undefined reference to `makecontext' -EXTRA_OECONF_append_libc-musl = " no-async" -EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" - -# This prevents openssl from using getrandom() which is not available on older glibc versions -# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) -EXTRA_OECONF_class-native = "--with-rand-seed=devrandom" -EXTRA_OECONF_class-nativesdk = "--with-rand-seed=devrandom" - -# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. -CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" - -do_configure () { - os=${HOST_OS} - case $os in - linux-gnueabi |\ - linux-gnuspe |\ - linux-musleabi |\ - linux-muslspe |\ - linux-musl ) - os=linux - ;; - *) - ;; - esac - target="$os-${HOST_ARCH}" - case $target in - linux-arm*) - target=linux-armv4 - ;; - linux-aarch64*) - target=linux-aarch64 - ;; - linux-i?86 | linux-viac3) - target=linux-x86 - ;; - linux-gnux32-x86_64 | linux-muslx32-x86_64 ) - target=linux-x32 - ;; - linux-gnu64-x86_64) - target=linux-x86_64 - ;; - linux-mips | linux-mipsel) - # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-gnun32-mips*) - target=linux-mips64 - ;; - linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) - target=linux64-mips64 - ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) - target=linux-generic32 - ;; - linux-powerpc) - target=linux-ppc - ;; - linux-powerpc64) - target=linux-ppc64 - ;; - linux-riscv32) - target=linux-generic32 - ;; - linux-riscv64) - target=linux-generic64 - ;; - linux-sparc | linux-supersparc) - target=linux-sparcv9 - ;; - esac - - useprefix=${prefix} - if [ "x$useprefix" = "x" ]; then - useprefix=/ - fi - # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the - # environment variables set by bitbake. Adjust the environment variables instead. - PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ - perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target - perl ${B}/configdata.pm --dump -} - -do_install () { - oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install - - oe_multilib_header openssl/opensslconf.h - - # Create SSL structure for packages such as ca-certificates which - # contain hard-coded paths to /etc/ssl. Debian does the same. - install -d ${D}${sysconfdir}/ssl - mv ${D}${libdir}/ssl-1.1/certs \ - ${D}${libdir}/ssl-1.1/private \ - ${D}${libdir}/ssl-1.1/openssl.cnf \ - ${D}${sysconfdir}/ssl/ - - # Although absolute symlinks would be OK for the target, they become - # invalid if native or nativesdk are relocated from sstate. - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf -} - -do_install_append_class-native () { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ - SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl-1.1/engines -} - -do_install_append_class-nativesdk () { - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh - sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh -} - -PTEST_BUILD_HOST_FILES += "configdata.pm" -PTEST_BUILD_HOST_PATTERN = "perl_version =" -do_install_ptest () { - # Prune the build tree - rm -f ${B}/fuzz/*.* ${B}/test/*.* - - cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} - cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} - - # For test_shlibload - ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ - ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ - - install -d ${D}${PTEST_PATH}/apps - ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps - install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps - install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps - - install -d ${D}${PTEST_PATH}/engines - install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines -} - -# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto -# package RRECOMMENDS on this package. This will enable the configuration -# file to be installed for both the openssl-bin package and the libcrypto -# package since the openssl-bin package depends on the libcrypto package. - -PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" - -FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" -FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" -FILES_${PN}-engines = "${libdir}/engines-1.1" -FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" -FILES_${PN} =+ "${libdir}/ssl-1.1/*" -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" - -CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" - -RRECOMMENDS_libcrypto += "openssl-conf" -RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "openssl:openssl" diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb new file mode 100644 index 000000000..072f727e0 --- /dev/null +++ b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb @@ -0,0 +1,204 @@ +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl" here actually means both OpenSSL and SSLeay licenses apply +# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) +LICENSE = "openssl" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" + +DEPENDS = "hostperl-runtime-native" + +SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ + file://run-ptest \ + file://0001-skip-test_symbol_presence.patch \ + file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ + file://afalg.patch \ + " + +SRC_URI_append_class-nativesdk = " \ + file://environment.d-openssl.sh \ + " + +SRC_URI[md5sum] = "3be209000dbc7e1b95bcdf47980a3baa" +SRC_URI[sha256sum] = "1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2" + +inherit lib_package multilib_header multilib_script ptest +MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" + +PACKAGECONFIG ?= "" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG_class-nativesdk = "" + +PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +#| ./libcrypto.so: undefined reference to `getcontext' +#| ./libcrypto.so: undefined reference to `setcontext' +#| ./libcrypto.so: undefined reference to `makecontext' +EXTRA_OECONF_append_libc-musl = " no-async" +EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" + +# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions +# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) +EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom" +EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom" + +# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. +CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" +CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" + +do_configure () { + os=${HOST_OS} + case $os in + linux-gnueabi |\ + linux-gnuspe |\ + linux-musleabi |\ + linux-muslspe |\ + linux-musl ) + os=linux + ;; + *) + ;; + esac + target="$os-${HOST_ARCH}" + case $target in + linux-arm*) + target=linux-armv4 + ;; + linux-aarch64*) + target=linux-aarch64 + ;; + linux-i?86 | linux-viac3) + target=linux-x86 + ;; + linux-gnux32-x86_64 | linux-muslx32-x86_64 ) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips | linux-mipsel) + # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags + target="linux-mips32 ${TARGET_CC_ARCH}" + ;; + linux-gnun32-mips*) + target=linux-mips64 + ;; + linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) + target=linux64-mips64 + ;; + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) + target=linux-generic32 + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-riscv32) + target=linux-generic32 + ;; + linux-riscv64) + target=linux-generic64 + ;; + linux-sparc | linux-supersparc) + target=linux-sparcv9 + ;; + esac + + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the + # environment variables set by bitbake. Adjust the environment variables instead. + PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ + perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target + perl ${B}/configdata.pm --dump +} + +do_install () { + oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install + + oe_multilib_header openssl/opensslconf.h + + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl-1.1/certs \ + ${D}${libdir}/ssl-1.1/private \ + ${D}${libdir}/ssl-1.1/openssl.cnf \ + ${D}${sysconfdir}/ssl/ + + # Although absolute symlinks would be OK for the target, they become + # invalid if native or nativesdk are relocated from sstate. + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf +} + +do_install_append_class-native () { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ + SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ + OPENSSL_ENGINES=${libdir}/ssl-1.1/engines +} + +do_install_append_class-nativesdk () { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh + sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +PTEST_BUILD_HOST_FILES += "configdata.pm" +PTEST_BUILD_HOST_PATTERN = "perl_version =" +do_install_ptest () { + # Prune the build tree + rm -f ${B}/fuzz/*.* ${B}/test/*.* + + cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} + cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} + + # For test_shlibload + ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ + ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ + + install -d ${D}${PTEST_PATH}/apps + ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps + install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps + install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps + + install -d ${D}${PTEST_PATH}/engines + install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines +} + +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the openssl-bin package and the libcrypto +# package since the openssl-bin package depends on the libcrypto package. + +PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" + +FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" +FILES_libssl = "${libdir}/libssl${SOLIBS}" +FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" +FILES_${PN}-engines = "${libdir}/engines-1.1" +FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" +FILES_${PN} =+ "${libdir}/ssl-1.1/*" +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" + +CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" + +RRECOMMENDS_libcrypto += "openssl-conf" +RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "openssl:openssl" diff --git a/poky/meta/recipes-core/base-files/base-files/usbd b/poky/meta/recipes-core/base-files/base-files/usbd deleted file mode 100644 index e69de29bb..000000000 diff --git a/poky/meta/recipes-core/base-files/base-files_3.0.14.bb b/poky/meta/recipes-core/base-files/base-files_3.0.14.bb index 2b1f217dd..94299431f 100644 --- a/poky/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/poky/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -20,7 +20,6 @@ SRC_URI = "file://rotation \ file://fstab \ file://issue.net \ file://issue \ - file://usbd \ file://share/dot.bashrc \ file://share/dot.profile \ file://licenses/GPL-2 \ @@ -122,7 +121,6 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab - install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile diff --git a/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb b/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb index c347daf50..61fb8cbad 100644 --- a/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb +++ b/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb @@ -13,15 +13,16 @@ do_compile() { } do_install() { - install -d ${D}${sysconfdir} - install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab - tmp="${SERIAL_CONSOLES}" - for i in $tmp - do - j=`echo ${i} | sed s/\;/\ /g` - id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` - echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab - done + install -d ${D}${sysconfdir} + install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + tmp="${SERIAL_CONSOLES}" + [ -n "$tmp" ] && echo >> ${D}${sysconfdir}/inittab + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` + echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab + done } # SERIAL_CONSOLES is generally defined by the MACHINE .conf. diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index 49165d7f5..d08fa8d3d 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -128,7 +128,9 @@ do_prepare_config () { ${S}/.config.oe-tmp > ${S}/.config fi sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config - sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config + if [ -n "${DEBUG_PREFIX_MAP}" ]; then + sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config + fi } # returns all the elements from the src uri that are .cfg files @@ -142,6 +144,7 @@ def find_cfgs(d): return sources_list do_configure () { + set -x do_prepare_config merge_config.sh -m .config ${@" ".join(find_cfgs(d))} cml1_do_configure @@ -316,8 +319,8 @@ do_install () { fi fi if grep -q "CONFIG_INIT=y" ${B}/.config; then - install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS - install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then diff --git a/poky/meta/recipes-core/busybox/busybox_1.31.0.bb b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb index c1da37262..34b1f2cc9 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.31.0.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb @@ -9,7 +9,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://default.script \ file://simple.script \ file://hwclock.sh \ - file://mount.busybox \ file://syslog \ file://syslog-startup.conf \ file://syslog.conf \ @@ -17,7 +16,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://mdev \ file://mdev.conf \ file://mdev-mount.sh \ - file://umount.busybox \ file://defconfig \ file://busybox-syslog.service.in \ file://busybox-klogd.service.in \ @@ -38,7 +36,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \ file://syslog.cfg \ file://unicode.cfg \ - file://inittab \ file://rcS \ file://rcK \ file://makefile-libbb-race.patch \ diff --git a/poky/meta/recipes-core/busybox/files/mount.busybox b/poky/meta/recipes-core/busybox/files/mount.busybox deleted file mode 100755 index fef945b7b..000000000 --- a/poky/meta/recipes-core/busybox/files/mount.busybox +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec /bin/busybox mount $@ diff --git a/poky/meta/recipes-core/busybox/files/umount.busybox b/poky/meta/recipes-core/busybox/files/umount.busybox deleted file mode 100755 index f3731626e..000000000 --- a/poky/meta/recipes-core/busybox/files/umount.busybox +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec /bin/busybox umount $@ diff --git a/poky/meta/recipes-core/expat/expat_2.2.7.bb b/poky/meta/recipes-core/expat/expat_2.2.7.bb deleted file mode 100644 index f213bc3c3..000000000 --- a/poky/meta/recipes-core/expat/expat_2.2.7.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "A stream-oriented XML parser library" -DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)" -HOMEPAGE = "http://expat.sourceforge.net/" -SECTION = "libs" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79" - -SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \ - file://libtool-tag.patch \ - " - -SRC_URI[md5sum] = "72f36b87cdb478aba1e78473393766aa" -SRC_URI[sha256sum] = "cbc9102f4a31a8dafd42d642e9a3aa31e79a0aedaa1f6efd2795ebc83174ec18" - -inherit autotools lib_package - -do_configure_prepend () { - rm -f ${S}/conftools/libtool.m4 -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-core/expat/expat_2.2.8.bb b/poky/meta/recipes-core/expat/expat_2.2.8.bb new file mode 100644 index 000000000..0ea2edc12 --- /dev/null +++ b/poky/meta/recipes-core/expat/expat_2.2.8.bb @@ -0,0 +1,22 @@ +SUMMARY = "A stream-oriented XML parser library" +DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)" +HOMEPAGE = "http://expat.sourceforge.net/" +SECTION = "libs" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79" + +SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \ + file://libtool-tag.patch \ + " + +SRC_URI[md5sum] = "00858041acfea5757af55e6ee6b86231" +SRC_URI[sha256sum] = "9a130948b05a82da34e4171d5f5ae5d321d9630277af02c8fa51e431f6475102" + +inherit autotools lib_package + +do_configure_prepend () { + rm -f ${S}/conftools/libtool.m4 +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.6.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.6.bb deleted file mode 100644 index a3c5a09d4..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.6.bb +++ /dev/null @@ -1,25 +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://uclibc_musl_translation.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.build-do-not-hardcode-linux-as-the-host-system.patch \ - file://0001-meson-do-a-build-time-check-for-strlcpy-before-attem.patch \ - " - -SRC_URI_append_class-native = " file://relocate-modules.patch" -SRC_URI_append_class-target = " file://glib-meson.cross" - -SRC_URI[md5sum] = "cd6865d8ce40db5e4c12b7d180953de6" -SRC_URI[sha256sum] = "ff8fab8d8deaa4fd0536c90f90d9769a09071779c7e6183907f6855645bffb6c" diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.7.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.7.bb new file mode 100644 index 000000000..740473719 --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.7.bb @@ -0,0 +1,25 @@ +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://uclibc_musl_translation.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.build-do-not-hardcode-linux-as-the-host-system.patch \ + file://0001-meson-do-a-build-time-check-for-strlcpy-before-attem.patch \ + " + +SRC_URI_append_class-native = " file://relocate-modules.patch" +SRC_URI_append_class-target = " file://glib-meson.cross" + +SRC_URI[md5sum] = "f036f78a7fca330d9f7d939fcf794bde" +SRC_URI[sha256sum] = "8b12c0af569afd3b71200556ad751bad4cf4bf7bc4b5f880638459a42ca86310" diff --git a/poky/meta/recipes-core/glib-networking/glib-networking_2.60.3.bb b/poky/meta/recipes-core/glib-networking/glib-networking_2.60.3.bb index d893b7a3a..0278ab2fb 100644 --- a/poky/meta/recipes-core/glib-networking/glib-networking_2.60.3.bb +++ b/poky/meta/recipes-core/glib-networking/glib-networking_2.60.3.bb @@ -30,3 +30,5 @@ FILES_${PN} += "\ " FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la" FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a" + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-core/glibc/glibc-package.inc b/poky/meta/recipes-core/glibc/glibc-package.inc index 9b1e7b790..d7037c5cc 100644 --- a/poky/meta/recipes-core/glibc/glibc-package.inc +++ b/poky/meta/recipes-core/glibc/glibc-package.inc @@ -83,14 +83,6 @@ do_install_append () { rm -f ${D}${infodir}/dir fi - if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then - # The distro doesn't want these files so let's not install them - rm -f ${D}${sysconfdir}/ld.so.conf - rm -f ${D}${base_sbindir}/ldconfig - # This directory will be empty now so remove it too. - rmdir ${D}${sysconfdir} - fi - install -d ${D}${sysconfdir}/init.d install -d ${D}${localstatedir}/db/nscd install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd @@ -102,6 +94,24 @@ do_install_append () { install -d ${D}${systemd_unitdir}/system install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/ + # The dynamic loader will have been installed into + # ${base_libdir}. However, if that isn't going to end up being + # available in the ABI-mandated location, then a symlink must + # be created. + + if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then + install -d ${D}${root_prefix}/lib + ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \ + ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} + fi +} + +do_install_append_class-target() { + if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then + # The distro doesn't want these files so let's not install them + rm -f ${D}${sysconfdir}/ld.so.conf + rm -f ${D}${base_sbindir}/ldconfig + fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/nscd 755 root root -" \ @@ -114,18 +124,7 @@ do_install_append () { > ${D}${sysconfdir}/default/volatiles/98_nscd fi - # The dynamic loader will have been installed into - # ${base_libdir}. However, if that isn't going to end up being - # available in the ABI-mandated location, then a symlink must - # be created. - - if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then - install -d ${D}${root_prefix}/lib - ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \ - ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} - fi } - do_install_append_aarch64 () { do_install_armmultilib } diff --git a/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb b/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb index 64fa8d87d..657fd4dbc 100644 --- a/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb @@ -8,6 +8,13 @@ PROVIDES = "" # setup depends INHIBIT_DEFAULT_DEPS = "" +python () { + libc = d.getVar("PREFERRED_PROVIDER_virtual/libc") + libclocale = d.getVar("PREFERRED_PROVIDER_virtual/libc-locale") + if libc != "glibc" or libclocale != "glibc-locale": + raise bb.parse.SkipRecipe("glibc-testsuite requires that virtual/libc is glibc") +} + DEPENDS += "glibc-locale libgcc gcc-runtime" # remove the initial depends diff --git a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb index 3f1b1c7a5..3f0a54cee 100644 --- a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb @@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk" inherit core-image module-base setuptools3 -SRCREV ?= "bb59bcd016bdd815809ac10df45d61c364c46df0" +SRCREV ?= "d230765d1fa7119d1de0ab7f116e895202e898e3" SRC_URI = "git://git.yoctoproject.org/poky \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs index 76fa84d35..2e400bff4 100644 --- a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs +++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs @@ -31,6 +31,11 @@ rootfs_run() { bootparam_root="/dev/disk/by-partuuid/$root_uuid" fi + if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then + root_partlabel=`echo $bootparam_root | cut -c11-` + bootparam_root="/dev/disk/by-partlabel/$root_partlabel" + fi + if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then root_label=`echo $bootparam_root | cut -c7-` bootparam_root="/dev/disk/by-label/$root_label" diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh new file mode 100644 index 000000000..b577b9a03 --- /dev/null +++ b/poky/meta/recipes-core/initscripts/initscripts-1.0/alignment.sh @@ -0,0 +1,13 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: alignment +# Required-Start: mountkernfs +# Required-Stop: mountkernfs +# Default-Start: S +# Default-Stop: +### END INIT INFO + +if [ -e /proc/cpu/alignment ]; then + echo "3" > /proc/cpu/alignment +fi + diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh deleted file mode 100644 index b577b9a03..000000000 --- a/poky/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: alignment -# Required-Start: mountkernfs -# Required-Stop: mountkernfs -# Default-Start: S -# Default-Stop: -### END INIT INFO - -if [ -e /proc/cpu/alignment ]; then - echo "3" > /proc/cpu/alignment -fi - diff --git a/poky/meta/recipes-core/initscripts/initscripts_1.0.bb b/poky/meta/recipes-core/initscripts/initscripts_1.0.bb index 91eea4b8c..1a59b82fb 100644 --- a/poky/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/poky/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -40,6 +40,7 @@ SRC_URI = "file://functions \ S = "${WORKDIR}" SRC_URI_append_arm = " file://alignment.sh" +SRC_URI_append_armeb = " file://alignment.sh" KERNEL_VERSION = "" diff --git a/poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb index 235d6ecc0..b4009ceaa 100644 --- a/poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb +++ b/poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb @@ -24,3 +24,8 @@ python do_locked_sigs() { sigfile = os.path.join(outdir, 'locked-sigs-extsdk-toolchain.inc') oe.copy_buildsystem.generate_locked_sigs(sigfile, d) } + +python do_locked_sigs_setscene () { + sstate_setscene(d) +} +addtask do_locked_sigs_setscene diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index 9341bf5d5..87453be07 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -4,7 +4,7 @@ require musl.inc inherit linuxloader -SRCREV = "6ad514e4e278f0c3b18eb2db1d45638c9af1c07f" +SRCREV = "1f0e9f9cc2e3fa354f94e18b3b362de5f1ec7272" BASEVER = "1.1.23" diff --git a/poky/meta/recipes-core/systemd/systemd-boot_242.bb b/poky/meta/recipes-core/systemd/systemd-boot_242.bb deleted file mode 100644 index 56a25c35b..000000000 --- a/poky/meta/recipes-core/systemd/systemd-boot_242.bb +++ /dev/null @@ -1,73 +0,0 @@ -require systemd.inc -FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" - -DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" - -# NOTE: These three patches are in theory not needed, but we haven't -# figured out how to correctly pass efi-cc parameter if it's an array. -SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \ - file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \ - file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ - file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \ - " - -inherit meson pkgconfig gettext -inherit deploy - -EFI_CC ?= "${CC}" -EXTRA_OEMESON += "-Defi=true \ - -Dgnu-efi=true \ - -Defi-includedir=${STAGING_INCDIR}/efi \ - -Defi-ldsdir=${STAGING_LIBDIR} \ - -Defi-libdir=${STAGING_LIBDIR} \ - -Dman=false \ - -Defi-cc='${EFI_CC}' \ - -Defi-ld='${LD}' \ - -Defi-objcopy='${OBJCOPY}' \ - " - -# install to the image as boot*.efi if its the EFI_PROVIDER, -# otherwise install as the full name. -# This allows multiple bootloaders to coexist in a single image. -python __anonymous () { - import re - target = d.getVar('TARGET_ARCH') - prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" - if target == "x86_64": - systemdimage = prefix + "bootx64.efi" - else: - systemdimage = prefix + "bootia32.efi" - d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) - prefix = "systemd-" if prefix == "" else "" - d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) -} - -FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}" - -RDEPENDS_${PN} += "virtual/systemd-bootconf" - -# Imported from the old gummiboot recipe -TUNE_CCARGS_remove = "-mfpmath=sse" -COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" -COMPATIBLE_HOST_x86-x32 = "null" - -do_compile() { - SYSTEMD_BOOT_EFI_ARCH="ia32" - if [ "${TARGET_ARCH}" = "x86_64" ]; then - SYSTEMD_BOOT_EFI_ARCH="x64" - fi - - ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE} -} - -do_install() { - install -d ${D}/boot - install -d ${D}/boot/EFI - install -d ${D}/boot/EFI/BOOT - install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE} -} - -do_deploy () { - install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} -} -addtask deploy before do_build after do_compile diff --git a/poky/meta/recipes-core/systemd/systemd-boot_243.bb b/poky/meta/recipes-core/systemd/systemd-boot_243.bb new file mode 100644 index 000000000..515abc289 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-boot_243.bb @@ -0,0 +1,70 @@ +require systemd.inc +FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" + +require conf/image-uefi.conf + +DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" + +# NOTE: These three patches are in theory not needed, but we haven't +# figured out how to correctly pass efi-cc parameter if it's an array. +SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \ + file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \ + file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ + file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \ + " + +inherit meson pkgconfig gettext +inherit deploy + +EFI_CC ?= "${CC}" +EXTRA_OEMESON += "-Defi=true \ + -Dgnu-efi=true \ + -Defi-includedir=${STAGING_INCDIR}/efi \ + -Defi-ldsdir=${STAGING_LIBDIR} \ + -Defi-libdir=${STAGING_LIBDIR} \ + -Dman=false \ + -Defi-cc='${EFI_CC}' \ + -Defi-ld='${LD}' \ + -Defi-objcopy='${OBJCOPY}' \ + " + +# install to the image as boot*.efi if its the EFI_PROVIDER, +# otherwise install as the full name. +# This allows multiple bootloaders to coexist in a single image. +python __anonymous () { + import re + target = d.getVar('TARGET_ARCH') + prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" + systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE") + d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) + prefix = "systemd-" if prefix == "" else "" + d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) +} + +FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" + +RDEPENDS_${PN} += "virtual/systemd-bootconf" + +# Imported from the old gummiboot recipe +TUNE_CCARGS_remove = "-mfpmath=sse" +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" +COMPATIBLE_HOST_x86-x32 = "null" + +do_compile() { + SYSTEMD_BOOT_EFI_ARCH="ia32" + if [ "${TARGET_ARCH}" = "x86_64" ]; then + SYSTEMD_BOOT_EFI_ARCH="x64" + fi + + ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE} +} + +do_install() { + install -d ${D}${EFI_FILES_PATH} + install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} +} + +do_deploy () { + install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} +} +addtask deploy before do_build after do_compile diff --git a/poky/meta/recipes-core/systemd/systemd-conf_242.bb b/poky/meta/recipes-core/systemd/systemd-conf_242.bb deleted file mode 100644 index d9ec023bf..000000000 --- a/poky/meta/recipes-core/systemd/systemd-conf_242.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Systemd system configuration" -DESCRIPTION = "Systemd may require slightly different configuration for \ -different machines. For example, qemu machines require a longer \ -DefaultTimeoutStartSec setting." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -SRC_URI = "\ - file://journald.conf \ - file://logind.conf \ - file://system.conf \ - file://system.conf-qemuall \ - file://wired.network \ -" - -do_install() { - install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf - install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf - install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf - install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network -} - -# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 -do_install_append_qemuall() { - install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf - - # Do not install wired.network for qemu bsps - rm -rf ${D}${systemd_unitdir}/network -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -FILES_${PN} = "\ - ${systemd_unitdir}/journald.conf.d/ \ - ${systemd_unitdir}/logind.conf.d/ \ - ${systemd_unitdir}/system.conf.d/ \ - ${systemd_unitdir}/network/ \ -" diff --git a/poky/meta/recipes-core/systemd/systemd-conf_243.bb b/poky/meta/recipes-core/systemd/systemd-conf_243.bb new file mode 100644 index 000000000..d9ec023bf --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf_243.bb @@ -0,0 +1,38 @@ +SUMMARY = "Systemd system configuration" +DESCRIPTION = "Systemd may require slightly different configuration for \ +different machines. For example, qemu machines require a longer \ +DefaultTimeoutStartSec setting." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "\ + file://journald.conf \ + file://logind.conf \ + file://system.conf \ + file://system.conf-qemuall \ + file://wired.network \ +" + +do_install() { + install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf + install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf + install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf + install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network +} + +# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 +do_install_append_qemuall() { + install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf + + # Do not install wired.network for qemu bsps + rm -rf ${D}${systemd_unitdir}/network +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} = "\ + ${systemd_unitdir}/journald.conf.d/ \ + ${systemd_unitdir}/logind.conf.d/ \ + ${systemd_unitdir}/system.conf.d/ \ + ${systemd_unitdir}/network/ \ +" diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl index 8837f54e1..ebac86373 100755 --- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -57,7 +57,7 @@ class SystemdFile(): if skip_re.match(line): continue - line = line.rstrip("\n") + line = line.strip() m = section_re.match(line) if m: if m.group('section') not in self.sections: diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 191271561..7f3a59c20 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,8 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "f875dced33462641e1fb7875d2f9a8cd8e8c2fcc" -SRCBRANCH = "v242-stable" +SRCREV = "efb536d0cbe2e58f80e501d19999928c75e08f6a" +SRCBRANCH = "v243-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch b/poky/meta/recipes-core/systemd/systemd/0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch deleted file mode 100644 index 6f192a2ad..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f491dfdc88ddbba36a24a75b2063aff027461b83 Mon Sep 17 00:00:00 2001 -From: Adrian Bunk -Date: Thu, 16 May 2019 22:20:07 +0300 -Subject: Replace the legacy ULONG_LONG_MAX with the C99 ULLONG_MAX - -Upstream-Status: Backport -Signed-off-by: Adrian Bunk ---- - src/journal-remote/journal-remote-main.c | 4 ++-- - src/shutdown/shutdown.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c -index 2321a91e7b..d32c51c3ce 100644 ---- a/src/journal-remote/journal-remote-main.c -+++ b/src/journal-remote/journal-remote-main.c -@@ -528,7 +528,7 @@ static int dispatch_http_event(sd_event_source *event, - void *userdata) { - MHDDaemonWrapper *d = userdata; - int r; -- MHD_UNSIGNED_LONG_LONG timeout = ULONG_LONG_MAX; -+ MHD_UNSIGNED_LONG_LONG timeout = ULLONG_MAX; - - assert(d); - -@@ -538,7 +538,7 @@ static int dispatch_http_event(sd_event_source *event, - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "MHD_run failed!"); - if (MHD_get_timeout(d->daemon, &timeout) == MHD_NO) -- timeout = ULONG_LONG_MAX; -+ timeout = ULLONG_MAX; - - r = sd_event_source_set_time(d->timer_event, timeout); - if (r < 0) { -diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c -index 35b2c2aa46..9623fe9ea2 100644 ---- a/src/shutdown/shutdown.c -+++ b/src/shutdown/shutdown.c -@@ -212,7 +212,7 @@ static int sync_making_progress(unsigned long long *prev_dirty) { - } - - static void sync_with_progress(void) { -- unsigned long long dirty = ULONG_LONG_MAX; -+ unsigned long long dirty = ULLONG_MAX; - unsigned checks; - pid_t pid; - int r; --- -2.20.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch index 00670ca2b..73e65ff79 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -16,6 +16,8 @@ Upstream-Status: Denied Signed-off-by: Ross Burton Signed-off-by: Khem Raj Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- units/meson.build | 6 ++---- units/proc-sys-fs-binfmt_misc.automount | 3 +++ @@ -23,10 +25,10 @@ Signed-off-by: Chen Qi 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/units/meson.build b/units/meson.build -index d695084..7b1f14a 100644 +index e1ee9f86c3..6bb7771b36 100644 --- a/units/meson.build +++ b/units/meson.build -@@ -47,8 +47,7 @@ units = [ +@@ -46,8 +46,7 @@ units = [ ['poweroff.target', '', 'runlevel0.target'], ['printer.target', ''], @@ -36,7 +38,7 @@ index d695084..7b1f14a 100644 ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], ['reboot.target', '', 'runlevel6.target ctrl-alt-del.target'], -@@ -134,8 +133,7 @@ in_units = [ +@@ -130,8 +129,7 @@ in_units = [ ['systemd-ask-password-console.service', ''], ['systemd-ask-password-wall.service', ''], ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], @@ -45,9 +47,9 @@ index d695084..7b1f14a 100644 + ['systemd-binfmt.service', 'ENABLE_BINFMT'], ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'], ['systemd-boot-check-no-failures.service', ''], - ['systemd-coredump@.service', 'ENABLE_COREDUMP'], + ['systemd-boot-system-token.service', 'ENABLE_EFI', diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount -index 30a6bc9..4231f3b 100644 +index 30a6bc9918..4231f3b70f 100644 --- a/units/proc-sys-fs-binfmt_misc.automount +++ b/units/proc-sys-fs-binfmt_misc.automount @@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/ @@ -58,7 +60,7 @@ index 30a6bc9..4231f3b 100644 +[Install] +WantedBy=sysinit.target diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in -index e940c7c..6be7f5c 100644 +index e940c7c9ad..6be7f5cc9b 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in @@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm @@ -76,6 +78,3 @@ index e940c7c..6be7f5c 100644 + +[Install] +WantedBy=sysinit.target --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch index 68ca604d6..2f4daf866 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch @@ -16,6 +16,8 @@ Upstream-Status: Inappropriate [musl] Signed-off-by: Chen Qi [Rebased for v242] Signed-off-by: Andrej Valek +[rebased for systemd 243] +Signed-off-by: Scott Murray --- src/basic/cgroup-util.c | 14 +++++++------- src/basic/procfs-util.c | 4 ++-- @@ -30,17 +32,17 @@ Signed-off-by: Andrej Valek src/nspawn/nspawn-cgroup.c | 2 +- src/nspawn/nspawn.c | 6 +++--- src/shared/sysctl-util.c | 2 +- - src/sleep/sleep.c | 12 ++++++------ + src/sleep/sleep.c | 10 +++++----- src/udev/udevadm-trigger.c | 2 +- - src/udev/udevd.c | 6 +++--- + src/udev/udevd.c | 2 +- src/vconsole/vconsole-setup.c | 2 +- - 17 files changed, 39 insertions(+), 39 deletions(-) + 17 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index fc28109..44fe985 100644 +index 7b5839ccd6..18f6e8ffc8 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -822,7 +822,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { +@@ -860,7 +860,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { xsprintf(c, PID_FMT "\n", pid); @@ -49,7 +51,7 @@ index fc28109..44fe985 100644 if (r < 0) return r; -@@ -1104,7 +1104,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (isempty(sc)) { @@ -58,7 +60,7 @@ index fc28109..44fe985 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -1122,7 +1122,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (streq(sc, "0")) { @@ -67,7 +69,7 @@ index fc28109..44fe985 100644 if (r < 0) return r; -@@ -1149,7 +1149,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -76,7 +78,7 @@ index fc28109..44fe985 100644 if (r < 0) return r; -@@ -1159,7 +1159,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -85,7 +87,7 @@ index fc28109..44fe985 100644 if (r < 0) return r; -@@ -2016,7 +2016,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri if (r < 0) return r; @@ -94,7 +96,7 @@ index fc28109..44fe985 100644 } int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { -@@ -2664,7 +2664,7 @@ int cg_enable_everywhere( +@@ -2697,7 +2697,7 @@ int cg_enable_everywhere( return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); } @@ -104,10 +106,10 @@ index fc28109..44fe985 100644 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index 7aaf95b..25fc3de 100644 +index 42ce53d5aa..57512532a6 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c -@@ -85,13 +85,13 @@ int procfs_tasks_set_limit(uint64_t limit) { +@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { * decrease it, as threads-max is the much more relevant sysctl. */ if (limit > pid_max-1) { sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ @@ -124,7 +126,7 @@ index 7aaf95b..25fc3de 100644 uint64_t threads_max; diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c -index 123d00e..e7ea78f 100644 +index 123d00e13e..e7ea78f349 100644 --- a/src/basic/smack-util.c +++ b/src/basic/smack-util.c @@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { @@ -137,7 +139,7 @@ index 123d00e..e7ea78f 100644 return r; diff --git a/src/basic/util.c b/src/basic/util.c -index 93d610b..97dca64 100644 +index 93d610bc98..97dca64f73 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -294,7 +294,7 @@ void disable_coredumps(void) { @@ -150,7 +152,7 @@ index 93d610b..97dca64 100644 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index 66e2f01..5daa43b 100644 +index aa9d811f2e..8c7f2dae7a 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { @@ -175,16 +177,16 @@ index 66e2f01..5daa43b 100644 } /* Flush out all rules */ -- write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); +- (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); STRV_FOREACH(f, files) { k = apply_file(*f, true); diff --git a/src/core/main.c b/src/core/main.c -index 46db471..726ccaf 100644 +index bcce7178a8..4199cedab9 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1469,7 +1469,7 @@ static int bump_unix_max_dgram_qlen(void) { +@@ -1285,7 +1285,7 @@ static int bump_unix_max_dgram_qlen(void) { if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) return 0; @@ -193,7 +195,7 @@ index 46db471..726ccaf 100644 if (r < 0) return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); -@@ -1684,7 +1684,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1509,7 +1509,7 @@ static void initialize_core_pattern(bool skip_setup) { if (getpid_cached() != 1) return; @@ -203,10 +205,10 @@ index 46db471..726ccaf 100644 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); } diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index cd7fb01..077e861 100644 +index b95e6239d4..fdbdaaaccb 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c -@@ -351,17 +351,17 @@ int mac_smack_setup(bool *loaded_policy) { +@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { } #ifdef SMACK_RUN_LABEL @@ -229,7 +231,7 @@ index cd7fb01..077e861 100644 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); #endif diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c -index 17e7cd1..87a7667 100644 +index 17e7cd1a00..87a7667716 100644 --- a/src/hibernate-resume/hibernate-resume.c +++ b/src/hibernate-resume/hibernate-resume.c @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { @@ -242,10 +244,10 @@ index 17e7cd1..87a7667 100644 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); return EXIT_FAILURE; diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index c2315c0..00f81b4 100644 +index c4a7f2f3d3..bcac758284 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -1852,7 +1852,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, if (!value) return -ENOMEM; @@ -255,10 +257,10 @@ index c2315c0..00f81b4 100644 if (r == -ELOOP) return -EINVAL; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 2cebcce..7111fc1 100644 +index 30b9a66334..cc1d577933 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c -@@ -1285,7 +1285,7 @@ static int trigger_device(Manager *m, sd_device *d) { +@@ -1325,7 +1325,7 @@ static int trigger_device(Manager *m, sd_device *d) { if (!t) return -ENOMEM; @@ -268,23 +270,23 @@ index 2cebcce..7111fc1 100644 return 0; diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c -index 168125d..dd0ab79 100644 +index 0462b46413..7c53d41483 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c -@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { - (void) mkdir_parents(fn, 0755); +@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { + fn = strjoina(tree, cgroup, "/cgroup.procs"); sprintf(pid_string, PID_FMT, pid); -- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fn, pid_string, 0); +- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); ++ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); if (r < 0) { log_error_errno(r, "Failed to move process: %m"); goto finish; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 3b0ecb1..a1b5240 100644 +index 2aec8041f0..841542f2f3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2341,7 +2341,7 @@ static int reset_audit_loginuid(void) { +@@ -2357,7 +2357,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -293,7 +295,7 @@ index 3b0ecb1..a1b5240 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -3531,13 +3531,13 @@ static int setup_uid_map(pid_t pid) { +@@ -3566,13 +3566,13 @@ static int setup_uid_map(pid_t pid) { xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); @@ -310,10 +312,10 @@ index 3b0ecb1..a1b5240 100644 return log_error_errno(r, "Failed to write GID map: %m"); diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c -index 9be4055..f935cde 100644 +index 93bdcf11bf..68cddb7a9f 100644 --- a/src/shared/sysctl-util.c +++ b/src/shared/sysctl-util.c -@@ -73,7 +73,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c +@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c log_debug("Setting '%s' to '%s'", p, value); @@ -323,19 +325,19 @@ index 9be4055..f935cde 100644 int sysctl_read(const char *property, char **content) { diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 11aabaf..6aa5d37 100644 +index b9fe96635d..f168d7f890 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -48,7 +48,7 @@ static int write_hibernate_location_info(void) { +@@ -54,7 +54,7 @@ static int write_hibernate_location_info(void) { /* if it's a swap partition, we just write the disk to /sys/power/resume */ if (streq(type, "partition")) { - r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file("/sys/power/resume", device, 0); if (r < 0) - return log_debug_errno(r, "Faileed to write partitoin device to /sys/power/resume: %m"); + return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m"); -@@ -84,12 +84,12 @@ static int write_hibernate_location_info(void) { +@@ -98,14 +98,14 @@ static int write_hibernate_location_info(void) { offset = fiemap->fm_extents[0].fe_physical / page_size(); xsprintf(offset_str, "%" PRIu64, offset); @@ -344,13 +346,15 @@ index 11aabaf..6aa5d37 100644 if (r < 0) return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str); + log_debug("Wrote calculated resume_offset value to /sys/power/resume_offset: %s", offset_str); + xsprintf(device_str, "%lx", (unsigned long)stb.st_dev); - r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file("/sys/power/resume", device_str, 0); if (r < 0) return log_debug_errno(r, "Failed to write device '%s': %m", device_str); -@@ -103,7 +103,7 @@ static int write_mode(char **modes) { +@@ -121,7 +121,7 @@ static int write_mode(char **modes) { STRV_FOREACH(mode, modes) { int k; @@ -359,7 +363,7 @@ index 11aabaf..6aa5d37 100644 if (k >= 0) return 0; -@@ -122,7 +122,7 @@ static int write_state(FILE **f, char **states) { +@@ -140,7 +140,7 @@ static int write_state(FILE **f, char **states) { STRV_FOREACH(state, states) { int k; @@ -368,17 +372,8 @@ index 11aabaf..6aa5d37 100644 if (k >= 0) return 0; log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -@@ -217,7 +217,7 @@ static int rtc_write_wake_alarm(uint64_t sec) { - - xsprintf(buf, "%" PRIu64, sec); - -- r = write_string_file("/sys/class/rtc/rtc0/wakealarm", buf, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/class/rtc/rtc0/wakealarm", buf, 0); - if (r < 0) - return log_error_errno(r, "Failed to write '%s' to /sys/class/rtc/rtc0/wakealarm: %m", buf); - diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c -index b7dafb7..bab4907 100644 +index 77d95e513f..25ce4abfb1 100644 --- a/src/udev/udevadm-trigger.c +++ b/src/udev/udevadm-trigger.c @@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se @@ -388,44 +383,26 @@ index b7dafb7..bab4907 100644 - r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file(filename, action, 0); if (r < 0) { - log_debug_errno(r, "Failed to write '%s' to '%s', ignoring: %m", action, filename); - continue; + log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r, + "Failed to write '%s' to '%s': %m", action, filename); diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 140ec35..33063a9 100644 +index cb5123042a..ea309a9e7f 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c -@@ -1185,7 +1185,7 @@ static int synthesize_change(sd_device *dev) { - */ - log_debug("Device '%s' is closed, synthesising 'change'", devname); - strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); -- write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ write_string_file(filename, "change", 0); - - FOREACH_DEVICE(e, d) { - const char *t, *n, *s; -@@ -1200,7 +1200,7 @@ static int synthesize_change(sd_device *dev) { - - log_debug("Device '%s' is closed, synthesising partition '%s' 'change'", devname, n); - strscpyl(filename, sizeof(filename), s, "/uevent", NULL); -- write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ write_string_file(filename, "change", 0); - } - - return 0; -@@ -1208,7 +1208,7 @@ static int synthesize_change(sd_device *dev) { - - log_debug("Device %s is closed, synthesising 'change'", devname); - strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); -- write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ write_string_file(filename, "change", 0); +@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { + filename = strjoina(syspath, "/uevent"); + log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); +- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(filename, "change", 0); + if (r < 0) + return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); return 0; - } diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index 67dc2e4..01b83d0 100644 +index 75d052ae70..5a15c939d8 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c -@@ -116,7 +116,7 @@ static int toggle_utf8(const char *name, int fd, bool utf8) { +@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { static int toggle_utf8_sysfs(bool utf8) { int r; @@ -434,6 +411,3 @@ index 67dc2e4..01b83d0 100644 if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); --- -2.11.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-src-udev-udev-event.c-must-include-sys-wait.h.patch b/poky/meta/recipes-core/systemd/systemd/0001-src-udev-udev-event.c-must-include-sys-wait.h.patch deleted file mode 100644 index 565deba1d..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-src-udev-udev-event.c-must-include-sys-wait.h.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 010f917cf222d2c7205584056fe0e4c581a2e1b1 Mon Sep 17 00:00:00 2001 -From: Adrian Bunk -Date: Thu, 16 May 2019 22:09:46 +0300 -Subject: src/udev/udev-event.c must #include - -Fixes the following build failure with musl: -../git/src/udev/udev-event.c: In function 'spawn_wait': -../git/src/udev/udev-event.c:600:53: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'? - r = sd_event_add_child(e, NULL, spawn->pid, WEXITED, on_spawn_sigchld, spawn); - ^~~~~~~ - -This looks like a bug in udev-event.c that could also have broken -the compilation after some future glibc header reshuffle. - -Upstream-Status: Backport -Signed-off-by: Adrian Bunk ---- - src/udev/udev-event.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c -index cab1b5ac0c..a0a7ac0f9e 100644 ---- a/src/udev/udev-event.c -+++ b/src/udev/udev-event.c -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - #include - - #include "sd-event.h" --- -2.20.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch b/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch new file mode 100644 index 000000000..dcae668dc --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch @@ -0,0 +1,25 @@ +Include sys/wait.h + +Fixes: +src/login/logind-brightness.c:158:85: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'? + 158 | r = sd_event_add_child(w->manager->event, &w->child_event_source, w->child, WEXITED, on_brightness_writer_exit, w); + | ^~~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Scott Murray +--- + src/login/logind-brightness.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c +index 8dfa97d7ae..bddd4a2727 100644 +--- a/src/login/logind-brightness.c ++++ b/src/login/logind-brightness.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include "bus-util.h" + #include "device-util.h" + #include "hash-funcs.h" diff --git a/poky/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/poky/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch index df5506cc2..49a334d09 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch @@ -11,6 +11,8 @@ Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Khem Raj Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- meson.build | 4 ---- tools/meson-make-symlink.sh | 3 ++- @@ -18,10 +20,10 @@ Signed-off-by: Chen Qi 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build -index 56c98b9..3386546 100644 +index e5ceb1e169..79b762faeb 100644 --- a/meson.build +++ b/meson.build -@@ -630,10 +630,6 @@ endforeach +@@ -579,10 +579,6 @@ endforeach conf.set_quoted('TELINIT', get_option('telinit-path')) @@ -33,23 +35,23 @@ index 56c98b9..3386546 100644 gperf = find_program('gperf') diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh -index 501cd43..f4e4ac9 100755 +index da0d13a341..90bc0a93c2 100755 --- a/tools/meson-make-symlink.sh +++ b/tools/meson-make-symlink.sh @@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")" if [ "$(dirname $1)" = . ]; then - ln -vfs -T "$1" "${DESTDIR:-}$2" + ln -vfs -T "$1" "${DESTDIR:-}$2" else -- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" -+ rm -f "${DESTDIR:-}$2" -+ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2" +- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" ++ rm -f "${DESTDIR:-}$2" ++ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2" fi diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh -index e2b2603..210d604 100755 +index a483d75b86..3c01c523f1 100755 --- a/units/meson-add-wants.sh +++ b/units/meson-add-wants.sh @@ -25,4 +25,9 @@ case "$target" in - ;; + ;; esac -ln -vfs --relative "$unitpath" "$dir" @@ -59,6 +61,3 @@ index e2b2603..210d604 100755 +else + lnr "$unitpath" "$dir" +fi --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch b/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch new file mode 100644 index 000000000..7ee0d48fa --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch @@ -0,0 +1,27 @@ +Include signal.h + +Fixes several signal set related errors: +src/basic/copy.c:92:19: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration] +src/basic/copy.c:93:19: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration] +src/basic/copy.c:93:34: error: 'SIGINT' undeclared (first use in this function) +src/basic/copy.c:95:13: error: implicit declaration of function 'sigtimedwait' [-Werror=implicit-function-declaration] + +Upstream-Status: Pending + +Signed-off-by: Scott Murray +--- + src/basic/copy.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/copy.c b/src/basic/copy.c +index ca311e021e..3cf7fc1697 100644 +--- a/src/basic/copy.c ++++ b/src/basic/copy.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include "alloc-util.h" + #include "btrfs-util.h" diff --git a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index fa8217e3d..a2aad40ac 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -8,6 +8,8 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Emil Renner Berthing Signed-off-by: Khem Raj Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- meson.build | 1 + src/basic/meson.build | 5 + @@ -20,22 +22,22 @@ Signed-off-by: Chen Qi create mode 100644 src/basic/parse-printf-format.h diff --git a/meson.build b/meson.build -index 79195c9748..0bffbf29c5 100644 +index 79b762faeb..7f8c679411 100644 --- a/meson.build +++ b/meson.build -@@ -685,6 +685,7 @@ foreach header : ['crypt.h', +@@ -613,6 +613,7 @@ endif + foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', - 'linux/can/vxcan.h', + 'printf.h', 'sys/auxv.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', diff --git a/src/basic/meson.build b/src/basic/meson.build -index 91e0df3d2f..a732b554da 100644 +index d6caf28f14..32c1acf349 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -298,6 +298,11 @@ foreach item : [['af', af_list_txt, 'af', ''], +@@ -312,6 +312,11 @@ foreach item : [['af', af_list_txt, 'af', ''], endforeach basic_sources += generated_gperf_headers @@ -428,6 +430,3 @@ index 5ef11fa1a4..6384ab620c 100644 #define SNDBUF_SIZE (8*1024*1024) --- -2.11.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch b/poky/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch index 738f8eb7b..f9c5996ff 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch @@ -13,23 +13,22 @@ Signed-off-by: Patrick Ohly Signed-off-by: Khem Raj [rebased for systemd 241] Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- rules/60-persistent-storage.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules -index 1d8880e..e53c8ea 100644 +index 7802b1c94f..c0534ae26a 100644 --- a/rules/60-persistent-storage.rules +++ b/rules/60-persistent-storage.rules @@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end" ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" --KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end" -+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|zd*|hd*", GOTO="persistent_storage_end" +-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end" ++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|hd*", GOTO="persistent_storage_end" # ignore partitions that span the entire disk TEST=="whole_disk", GOTO="persistent_storage_end" --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch b/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch new file mode 100644 index 000000000..0f75e8c12 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch @@ -0,0 +1,54 @@ +Handle __cpu_mask usage + +Fixes errors: + +src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) +src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) + +__cpu_mask is an internal type of glibc's cpu_set implementation, not +part of the POSIX definition, which is problematic when building with +musl, which does not define a matching type. From inspection of musl's +sched.h, however, it is clear that the corresponding type would be +unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, +add a typedef to cpu-set-util.h defining __cpu_mask appropriately. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Scott Murray +--- + src/shared/cpu-set-util.h | 2 ++ + src/test/test-sizeof.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h +index 27812dfd59..f698f9df83 100644 +--- a/src/shared/cpu-set-util.h ++++ b/src/shared/cpu-set-util.h +@@ -6,6 +6,8 @@ + #include "macro.h" + #include "missing_syscall.h" + ++typedef unsigned long __cpu_mask; ++ + /* This wraps the libc interface with a variable to keep the allocated size. */ + typedef struct CPUSet { + cpu_set_t *set; +diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c +index a710db5370..d1601ad929 100644 +--- a/src/test/test-sizeof.c ++++ b/src/test/test-sizeof.c +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + +-#include + #include + #include + +@@ -8,6 +7,7 @@ + #include + + #include "time-util.h" ++#include "cpu-set-util.h" + + /* Print information about various types. Useful when diagnosing + * gcc diagnostics on an unfamiliar architecture. */ diff --git a/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch b/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch index 5312083fd..96175b5b5 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch @@ -26,20 +26,20 @@ is deprecated. Signed-off-by: Hongxu Jia [rebased for systemd 241] Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- rules/60-block.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/60-block.rules b/rules/60-block.rules -index a1458e9..3ba4b6b4 100644 +index 3134ab995e..cd72a494a1 100644 --- a/rules/60-block.rules +++ b/rules/60-block.rules -@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_ - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" +@@ -9,5 +9,5 @@ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", # watch metadata changes, caused by tools closing the device node which was opened for writing --ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*", OPTIONS+="watch" -+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*|hd*", OPTIONS+="watch" --- -2.7.4 - + ACTION!="remove", SUBSYSTEM=="block", \ +- KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", \ ++ KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|hd*", \ + OPTIONS+="watch" diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index 47ee2795a..adfc3b786 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch @@ -11,6 +11,8 @@ Signed-off-by: Khem Raj Signed-off-by: Chen Qi [Rebased for v242] Signed-off-by: Andrej Valek +[rebased for systemd 243] +Signed-off-by: Scott Murray --- meson.build | 1 + src/backlight/backlight.c | 1 + @@ -30,6 +32,8 @@ Signed-off-by: Andrej Valek src/libsystemd/sd-bus/bus-objects.c | 1 + src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + src/locale/keymap-util.c | 1 + + src/login/pam_systemd.c | 1 + + src/network/generator/network-generator.c | 1 + src/nspawn/nspawn-settings.c | 1 + src/shared/dns-domain.c | 1 + src/shared/journal-importer.c | 1 + @@ -40,19 +44,24 @@ Signed-off-by: Andrej Valek src/socket-proxy/socket-proxyd.c | 1 + src/test/test-hexdecoct.c | 1 + src/udev/udev-builtin-path_id.c | 1 + + src/udev/udev-event.c | 1 + src/udev/udev-rules.c | 1 + - 29 files changed, 40 insertions(+) + 32 files changed, 43 insertions(+) +diff --git a/meson.build b/meson.build +index 7f8c679411..81c061b768 100644 --- a/meson.build +++ b/meson.build -@@ -572,6 +572,7 @@ foreach ident : [ +@@ -506,6 +506,7 @@ foreach ident : [ + #include '''], + ['get_mempolicy', '''#include #include '''], - ['explicit_bzero' , '''#include '''], - ['reallocarray', '''#include '''], + ['strndupa' , '''#include '''], ] have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') +diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c +index dfd6805398..c2b2ace6ec 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c @@ -17,6 +17,7 @@ @@ -63,6 +72,8 @@ Signed-off-by: Andrej Valek static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { const char *subsystem, *sysname, *value; +diff --git a/src/basic/env-util.c b/src/basic/env-util.c +index a6503cf2b6..ceef9a62c8 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -16,6 +16,7 @@ @@ -73,6 +84,8 @@ Signed-off-by: Andrej Valek #define VALID_CHARS_ENV_NAME \ DIGITS LETTERS \ +diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h +index 188a8d4406..1e16ec287a 100644 --- a/src/basic/missing_stdlib.h +++ b/src/basic/missing_stdlib.h @@ -11,3 +11,15 @@ @@ -91,6 +104,8 @@ Signed-off-by: Andrej Valek + (char *)memcpy(__new, __old, __len); \ + }) +#endif +diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c +index 6b82eab640..51c6b78615 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c @@ -14,6 +14,7 @@ @@ -101,9 +116,11 @@ Signed-off-by: Andrej Valek int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) { struct stat st; +diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c +index 115a1494a2..07a34bfd53 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c -@@ -19,6 +19,7 @@ +@@ -20,6 +20,7 @@ #include "process-util.h" #include "stat-util.h" #include "string-util.h" @@ -111,6 +128,8 @@ Signed-off-by: Andrej Valek int parse_boolean(const char *v) { if (!v) +diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c +index 09169cf963..f411ba897f 100644 --- a/src/basic/proc-cmdline.c +++ b/src/basic/proc-cmdline.c @@ -15,6 +15,7 @@ @@ -121,6 +140,8 @@ Signed-off-by: Andrej Valek int proc_cmdline(char **ret) { const char *e; +diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c +index 7aaf95bfce..42ce53d5aa 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c @@ -11,6 +11,7 @@ @@ -131,6 +152,8 @@ Signed-off-by: Andrej Valek int procfs_tasks_get_limit(uint64_t *ret) { _cleanup_free_ char *value = NULL; +diff --git a/src/basic/time-util.c b/src/basic/time-util.c +index 3018e81acb..4e2b3b66c1 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -28,6 +28,7 @@ @@ -141,6 +164,8 @@ Signed-off-by: Andrej Valek static clockid_t map_clock_id(clockid_t c) { +diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c +index 2f2313c599..c9937f9d62 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -15,6 +15,7 @@ @@ -151,6 +176,8 @@ Signed-off-by: Andrej Valek static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); +diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c +index 7862beaacb..19f6968cfe 100644 --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c @@ -7,6 +7,7 @@ @@ -161,6 +188,8 @@ Signed-off-by: Andrej Valek int bus_property_get_triggered_unit( sd_bus *bus, +diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c +index a91cfebc67..a45961013f 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -11,6 +11,7 @@ @@ -171,9 +200,11 @@ Signed-off-by: Andrej Valek #if HAVE_KMOD #include +diff --git a/src/core/service.c b/src/core/service.c +index 73b3c9c316..ef74f00a08 100644 --- a/src/core/service.c +++ b/src/core/service.c -@@ -42,6 +42,7 @@ +@@ -43,6 +43,7 @@ #include "unit.h" #include "utf8.h" #include "util.h" @@ -181,16 +212,20 @@ Signed-off-by: Andrej Valek static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { [SERVICE_DEAD] = UNIT_INACTIVE, +diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c +index 6d6bb1cf63..6666349a35 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c -@@ -67,6 +67,7 @@ - #include "tmpfile-util.h" +@@ -70,6 +70,7 @@ #include "unit-name.h" #include "user-util.h" + #include "varlink.h" +#include "missing.h" #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) +diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c +index eb029e4453..f31fe9d5a8 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -21,6 +21,7 @@ @@ -201,6 +236,8 @@ Signed-off-by: Andrej Valek static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); +diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c +index ae643cacc7..1b752271a5 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -13,6 +13,7 @@ @@ -211,6 +248,8 @@ Signed-off-by: Andrej Valek static int node_vtable_get_userdata( sd_bus *bus, +diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c +index 8de0a859ee..4fd0a2e692 100644 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -14,6 +14,7 @@ @@ -221,9 +260,11 @@ Signed-off-by: Andrej Valek #define MAX_SIZE (2*1024*1024) +diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c +index f8c36c94f5..41f5606aea 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c -@@ -23,6 +23,7 @@ +@@ -22,6 +22,7 @@ #include "string-util.h" #include "strv.h" #include "tmpfile-util.h" @@ -231,6 +272,32 @@ Signed-off-by: Andrej Valek static bool startswith_comma(const char *s, const char *prefix) { s = startswith(s, prefix); +diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c +index 3f762cbbc3..005cfea658 100644 +--- a/src/login/pam_systemd.c ++++ b/src/login/pam_systemd.c +@@ -28,6 +28,7 @@ + #include "hostname-util.h" + #include "login-util.h" + #include "macro.h" ++#include "missing.h" + #include "parse-util.h" + #include "path-util.h" + #include "process-util.h" +diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c +index 0b5af33566..9c808cd014 100644 +--- a/src/network/generator/network-generator.c ++++ b/src/network/generator/network-generator.c +@@ -13,6 +13,7 @@ + #include "string-table.h" + #include "string-util.h" + #include "strv.h" ++#include "missing.h" + + /* + # .network +diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c +index 3a99736813..279fea4d88 100644 --- a/src/nspawn/nspawn-settings.c +++ b/src/nspawn/nspawn-settings.c @@ -16,6 +16,7 @@ @@ -241,6 +308,8 @@ Signed-off-by: Andrej Valek Settings *settings_new(void) { Settings *s; +diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c +index f62ad0a0f5..f1a27e158d 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c @@ -24,6 +24,7 @@ @@ -251,9 +320,11 @@ Signed-off-by: Andrej Valek int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { const char *n; +diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c +index 7c4fc7021d..a6ff2214df 100644 --- a/src/shared/journal-importer.c +++ b/src/shared/journal-importer.c -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "parse-util.h" #include "string-util.h" #include "unaligned.h" @@ -261,9 +332,11 @@ Signed-off-by: Andrej Valek enum { IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ +diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c +index b615c70dff..75b26e9c21 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c -@@ -38,6 +38,7 @@ +@@ -39,6 +39,7 @@ #include "time-util.h" #include "utf8.h" #include "util.h" @@ -271,6 +344,8 @@ Signed-off-by: Andrej Valek /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ #define PRINT_LINE_THRESHOLD 3 +diff --git a/src/shared/pager.c b/src/shared/pager.c +index 7c20b100b4..e4209d3a95 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -25,6 +25,7 @@ @@ -281,6 +356,8 @@ Signed-off-by: Andrej Valek static pid_t pager_pid = 0; +diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c +index 6bf0ff0316..f6c8009cd2 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -20,6 +20,7 @@ @@ -291,6 +368,8 @@ Signed-off-by: Andrej Valek int xdg_user_runtime_dir(char **ret, const char *suffix) { const char *e; +diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c +index 7cb7d8a477..8b12b91084 100644 --- a/src/shared/uid-range.c +++ b/src/shared/uid-range.c @@ -9,6 +9,7 @@ @@ -301,6 +380,8 @@ Signed-off-by: Andrej Valek static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { assert(range); +diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c +index abbbc9f2d6..6179b5851e 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -28,6 +28,7 @@ @@ -311,6 +392,8 @@ Signed-off-by: Andrej Valek #define BUFFER_SIZE (256 * 1024) +diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c +index 52217429b1..a05e7782f6 100644 --- a/src/test/test-hexdecoct.c +++ b/src/test/test-hexdecoct.c @@ -6,6 +6,7 @@ @@ -321,6 +404,8 @@ Signed-off-by: Andrej Valek static void test_hexchar(void) { assert_se(hexchar(0xa) == 'a'); +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index e8f1ce1354..8693cb02a4 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -23,6 +23,7 @@ @@ -331,23 +416,27 @@ Signed-off-by: Andrej Valek _printf_(2,3) static void path_prepend(char **path, const char *fmt, ...) { +diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c +index 8cfa2cdf23..b0670c77ec 100644 +--- a/src/udev/udev-event.c ++++ b/src/udev/udev-event.c +@@ -35,6 +35,7 @@ + #include "udev-util.h" + #include "udev-watch.h" + #include "user-util.h" ++#include "missing.h" + + typedef struct Spawn { + sd_device *device; +diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c +index 1642f10535..fe2aa75478 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c -@@ -40,6 +40,7 @@ - #include "udev.h" +@@ -28,6 +28,7 @@ + #include "udev-event.h" + #include "udev-rules.h" #include "user-util.h" - #include "util.h" +#include "missing.h" - #define PREALLOC_TOKEN 2048 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") ---- a/src/login/pam_systemd.c -+++ b/src/login/pam_systemd.c -@@ -27,6 +27,7 @@ - #include "hostname-util.h" - #include "login-util.h" - #include "macro.h" -+#include "missing.h" - #include "parse-util.h" - #include "path-util.h" - #include "process-util.h" + diff --git a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch index b41f6c7be..6d73d715c 100644 --- a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch +++ b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch @@ -1,28 +1,63 @@ -From 67a988ae82c776d11be76de7180d50ea027ac442 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 14:24:20 +0800 -Subject: [PATCH 06/24] Include netinet/if_ether.h +Include netinet/if_ether.h Fixes /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' struct ethhdr { ^~~~~~ +and related arphdr, arpreq, and arpreq_old errors +/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr' + struct arphdr { + ^~~~~~ + +The latter requires removing some includes of net/if_arp.h to avoid +conflicting with netinet/if_ether.h. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray + Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- + src/libsystemd-network/sd-dhcp6-client.c | 1 - src/libsystemd/sd-netlink/netlink-types.c | 1 + - src/network/netdev/tuntap.c | 1 + + src/machine/machine-dbus.c | 1 + + src/network/netdev/macsec.c | 1 + + src/network/netdev/netdev.c | 1 + src/network/networkd-brvlan.c | 1 + - src/udev/net/ethtool-util.c | 1 + - src/udev/net/ethtool-util.h | 1 + + src/network/networkd-dhcp-common.c | 1 + + src/network/networkd-dhcp4.c | 2 +- + src/network/networkd-dhcp6.c | 2 +- + src/network/networkd-link.c | 2 +- + src/network/networkd-network.c | 1 + + src/shared/ethtool-util.c | 1 + + src/shared/ethtool-util.h | 1 + + src/udev/net/link-config.c | 1 + src/udev/udev-builtin-net_setup_link.c | 1 + - 6 files changed, 6 insertions(+) + 15 files changed, 14 insertions(+), 4 deletions(-) +diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c +index d7a5349c70..68b41dfb6c 100644 +--- a/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/libsystemd-network/sd-dhcp6-client.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + + #include "sd-dhcp6-client.h" diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c -index 9dcd3f2..e23ff4c 100644 +index de9b8b21ab..f64f6500f7 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -3,6 +3,7 @@ @@ -30,23 +65,45 @@ index 9dcd3f2..e23ff4c 100644 #include #include +#include + #include #include #include - #include -diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c -index 951138d..1ad499d 100644 ---- a/src/network/netdev/tuntap.c -+++ b/src/network/netdev/tuntap.c -@@ -2,6 +2,7 @@ +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c +index 0d58b5eb8b..01093c1f62 100644 +--- a/src/machine/machine-dbus.c ++++ b/src/machine/machine-dbus.c +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + /* When we include libgen.h because we need dirname() we immediately + * undefine basename() since libgen.h defines it as a macro to the POSIX +diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c +index cf281e75a6..269dc618ff 100644 +--- a/src/network/netdev/macsec.c ++++ b/src/network/netdev/macsec.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include + #include + #include +diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c +index 7735b455b7..ed4eda4a44 100644 +--- a/src/network/netdev/netdev.c ++++ b/src/network/netdev/netdev.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ - #include - #include +#include - #include #include - #include + #include + diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c -index 8377623..132af60 100644 +index c3c5d535ac..ebea408c89 100644 --- a/src/network/networkd-brvlan.c +++ b/src/network/networkd-brvlan.c @@ -4,6 +4,7 @@ @@ -57,10 +114,76 @@ index 8377623..132af60 100644 #include #include -diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c -index 0dcec03..3695b10 100644 ---- a/src/udev/net/ethtool-util.c -+++ b/src/udev/net/ethtool-util.c +diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c +index 626b975839..42fe92f320 100644 +--- a/src/network/networkd-dhcp-common.c ++++ b/src/network/networkd-dhcp-common.c +@@ -1,6 +1,7 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + + #include "networkd-dhcp-common.h" ++#include + #include "networkd-network.h" + #include "parse-util.h" + #include "string-table.h" +diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c +index 662770b50e..c6ab62a94d 100644 +--- a/src/network/networkd-dhcp4.c ++++ b/src/network/networkd-dhcp4.c +@@ -1,8 +1,8 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include + #include +-#include + + #include "alloc-util.h" + #include "hostname-util.h" +diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c +index 8ad736a82b..f41b4d834e 100644 +--- a/src/network/networkd-dhcp6.c ++++ b/src/network/networkd-dhcp6.c +@@ -3,9 +3,9 @@ + Copyright © 2014 Intel Corporation. All rights reserved. + ***/ + ++#include + #include + #include +-#include + #include "sd-radv.h" + + #include "sd-dhcp6-client.h" +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index f5bb78890a..f13a36b791 100644 +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c +@@ -1,8 +1,8 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include + #include +-#include + #include + + #include "alloc-util.h" +diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c +index 2b8d0eb2fb..2f79ef25cd 100644 +--- a/src/network/networkd-network.c ++++ b/src/network/networkd-network.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include + #include + #include +diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c +index b0961df72e..53fcbbd84b 100644 +--- a/src/shared/ethtool-util.c ++++ b/src/shared/ethtool-util.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ @@ -68,10 +191,10 @@ index 0dcec03..3695b10 100644 #include #include #include -diff --git a/src/udev/net/ethtool-util.h b/src/udev/net/ethtool-util.h -index 618b26b..ebfe82a 100644 ---- a/src/udev/net/ethtool-util.h -+++ b/src/udev/net/ethtool-util.h +diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h +index 8b32b243f3..262b819976 100644 +--- a/src/shared/ethtool-util.h ++++ b/src/shared/ethtool-util.h @@ -2,6 +2,7 @@ #pragma once @@ -80,8 +203,19 @@ index 618b26b..ebfe82a 100644 #include #include "conf-parser.h" +diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c +index d44af64d5e..fd052f1591 100644 +--- a/src/udev/net/link-config.c ++++ b/src/udev/net/link-config.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + ++#include + #include + #include + diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c -index a845dfa..177289a 100644 +index ee3ca9fa38..9aa4e82874 100644 --- a/src/udev/udev-builtin-net_setup_link.c +++ b/src/udev/udev-builtin-net_setup_link.c @@ -1,5 +1,6 @@ @@ -91,6 +225,3 @@ index a845dfa..177289a 100644 #include "device-util.h" #include "alloc-util.h" #include "link-config.h" --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch index aa2b4cbcf..34f7f5fb7 100644 --- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch +++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch @@ -15,17 +15,19 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- - src/basic/glob-util.c | 13 ++++++++++++- + src/basic/glob-util.c | 12 ++++++++++++ src/test/test-glob-util.c | 16 ++++++++++++++++ src/tmpfiles/tmpfiles.c | 10 ++++++++++ - 3 files changed, 38 insertions(+), 1 deletion(-) + 3 files changed, 38 insertions(+) diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c -index 32c53f8..ae358d9 100644 +index b335af8d97..2cdfc11f16 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c -@@ -13,6 +13,12 @@ +@@ -14,6 +14,12 @@ #include "path-util.h" #include "strv.h" @@ -38,7 +40,7 @@ index 32c53f8..ae358d9 100644 static void closedir_wrapper(void* v) { (void) closedir(v); } -@@ -20,6 +26,7 @@ static void closedir_wrapper(void* v) { +@@ -21,6 +27,7 @@ static void closedir_wrapper(void* v) { int safe_glob(const char *path, int flags, glob_t *pglob) { int k; @@ -46,7 +48,7 @@ index 32c53f8..ae358d9 100644 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ assert(!(flags & GLOB_ALTDIRFUNC)); -@@ -33,10 +40,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { +@@ -34,9 +41,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { pglob->gl_lstat = lstat; if (!pglob->gl_stat) pglob->gl_stat = stat; @@ -55,7 +57,6 @@ index 32c53f8..ae358d9 100644 errno = 0; +#ifdef GLOB_ALTDIRFUNC k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); -- +#else + k = glob(path, flags, NULL, pglob); +#endif @@ -63,7 +64,7 @@ index 32c53f8..ae358d9 100644 return -ENOENT; if (k == GLOB_NOSPACE) diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c -index b4f4144..f0d474e 100644 +index b4f41445fe..f0d474ed14 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c @@ -13,6 +13,12 @@ @@ -114,7 +115,7 @@ index b4f4144..f0d474e 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index d9d1cc1..477d1e3 100644 +index 3c30612af1..14bc428085 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -63,6 +63,12 @@ @@ -130,7 +131,7 @@ index d9d1cc1..477d1e3 100644 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1839,7 +1845,9 @@ finish: +@@ -1853,7 +1859,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -140,7 +141,7 @@ index d9d1cc1..477d1e3 100644 }; int r = 0, k; char **fn; -@@ -1859,7 +1867,9 @@ static int glob_item(Item *i, action_t action) { +@@ -1873,7 +1881,9 @@ static int glob_item(Item *i, action_t action) { static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -150,6 +151,3 @@ index d9d1cc1..477d1e3 100644 }; int r = 0, k; char **fn; --- -2.11.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index b54635e8a..24e24e8e5 100644 --- a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -17,15 +17,17 @@ This is libc implementation specific, as glibc does not have this issue. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray --- src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index f773eea..79af915 100644 +index b1c08fcade..0a7a1f7d89 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1546,7 +1546,7 @@ int set_oom_score_adjust(int value) { +@@ -1474,7 +1474,7 @@ int set_oom_score_adjust(int value) { sprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t, @@ -33,8 +35,4 @@ index f773eea..79af915 100644 + WRITE_STRING_FILE_VERIFY_ON_FAILURE); } - int cpus_in_affinity_mask(void) { --- -2.11.0 - - + static const char *const ioprio_class_table[] = { diff --git a/poky/meta/recipes-core/systemd/systemd/0023-socket-util.h-include-string.h.patch b/poky/meta/recipes-core/systemd/systemd/0023-socket-util.h-include-string.h.patch deleted file mode 100644 index 37987b57f..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0023-socket-util.h-include-string.h.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 56fb30d93e96d7f983af0cb4dff9155da91dd671 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 16:37:19 +0800 -Subject: socket-util.h: include string.h - -Fix the following compile error: -src/basic/socket-util.h:187:30: error: implicit declaration of function 'strnlen'; did you mean 'strlen'? [-Werror=implicit-function-declaration] - -Upstream-Status: Accepted - -Signed-off-by: Chen Qi ---- - src/basic/socket-util.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h -index 6920fd99ba..36ec422f2c 100644 ---- a/src/basic/socket-util.h -+++ b/src/basic/socket-util.h -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.20.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch b/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch deleted file mode 100644 index ada404b05..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 56e3c9581e2c9b7435d5fcbd74b47c7ccf6b3891 Mon Sep 17 00:00:00 2001 -From: Andrej Valek -Date: Thu, 18 Apr 2019 10:47:11 +0200 -Subject: fs-util.h: add missing sys/stat include - -fix error: -| error: passing argument 5 of 'chase_symlinks_and_stat' from incompatible pointer type [-Werror=incompatible-pointer-types] - -Signed-off-by: Andrej Valek - -Upstream-Status: Accepted ---- - src/basic/fs-util.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index b9651205e6..c153bc4448 100644 ---- a/src/basic/fs-util.h -+++ b/src/basic/fs-util.h -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - #include - #include - --- -2.20.1 - diff --git a/poky/meta/recipes-core/systemd/systemd_242.bb b/poky/meta/recipes-core/systemd/systemd_242.bb deleted file mode 100644 index 2c101cbbb..000000000 --- a/poky/meta/recipes-core/systemd/systemd_242.bb +++ /dev/null @@ -1,679 +0,0 @@ -require systemd.inc - -PROVIDES = "udev" - -PE = "1" - -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 - -# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so -# that we don't build both udev and systemd in world builds. -REQUIRED_DISTRO_FEATURES = "systemd" - -SRC_URI += "file://touchscreen.rules \ - file://00-create-volatile.conf \ - file://init \ - file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ - file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \ - file://0003-implment-systemd-sysv-install-for-OE.patch \ - file://0004-rules-whitelist-hd-devices.patch \ - file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ - file://99-default.preset \ - " - -# patches needed by musl -SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}" -SRC_URI_MUSL = "\ - file://0002-don-t-use-glibc-specific-qsort_r.patch \ - file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ - file://0004-add-fallback-parse_printf_format-implementation.patch \ - file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ - file://0006-Include-netinet-if_ether.h.patch \ - file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \ - file://0008-add-missing-FTW_-macros-for-musl.patch \ - file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ - file://0011-Use-uintmax_t-for-handling-rlim_t.patch \ - file://0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch \ - file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ - file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ - file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ - file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ - file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ - file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ - file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ - file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ - file://0001-src-udev-udev-event.c-must-include-sys-wait.h.patch \ - file://0023-socket-util.h-include-string.h.patch \ - file://0024-test-json.c-define-M_PIl.patch \ - file://0025-fs-utilh-add-missing-sys-stat-include.patch \ - file://0001-do-not-disable-buffer-in-writing-files.patch \ - " - -PAM_PLUGINS = " \ - pam-plugin-unix \ - pam-plugin-loginuid \ - pam-plugin-keyinit \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ - acl \ - backlight \ - binfmt \ - gshadow \ - hibernate \ - hostnamed \ - idn \ - ima \ - kmod \ - localed \ - logind \ - machined \ - myhostname \ - networkd \ - nss \ - nss-mymachines \ - nss-resolve \ - quotacheck \ - randomseed \ - resolved \ - set-time-epoch \ - smack \ - sysusers \ - timedated \ - timesyncd \ - utmp \ - vconsole \ - xz \ -" - -PACKAGECONFIG_remove_libc-musl = " \ - gshadow \ - idn \ - localed \ - myhostname \ - nss \ - nss-mymachines \ - nss-resolve \ - resolved \ - smack \ - sysusers \ - utmp \ -" - -# Use the upstream systemd serial-getty@.service and rely on -# systemd-getty-generator instead of using the OE-core specific -# systemd-serialgetty.bb - not enabled by default. -PACKAGECONFIG[serial-getty-generator] = "" - -PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" -PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" -PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" -PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" -PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" -PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" -PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" -PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" -PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" -PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" -PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" -PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" -PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" -# Sign the journal for anti-tampering -PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" -PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" -PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" -PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" -PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" -PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" -PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" -# importd requires curl/xz/zlib/bzip2/gcrypt -PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" -# Update NAT firewall rules -PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" -PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" -PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" -PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false" -PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn" -PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" -PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" -PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" -PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" -PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" -PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" -PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" -PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" -PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" -PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" -PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" -PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" -PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" -PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" -PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" -PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode" -PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" -PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" -PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" -PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" -# libseccomp is found in meta-security -PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" -PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" -PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" -PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -# When enabled use reproducble build timestamp if set as time epoch, -# or build time if not. When disabled, time epoch is unset. -def build_epoch(d): - epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" - return '-Dtime-epoch=%d' % int(epoch) -PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" -PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" -PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" -PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" -PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" -PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" -PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" -PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" -# Verify keymaps on locale change -PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" -PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" -PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" - -# Helper variables to clarify locations. This mirrors the logic in systemd's -# build system. -rootprefix ?= "${root_prefix}" -rootlibdir ?= "${base_libdir}" -rootlibexecdir = "${rootprefix}/lib" - -# This links udev statically with systemd helper library. -# Otherwise udev package would depend on systemd package (which has the needed shared library), -# and always pull it into images. -EXTRA_OEMESON += "-Dlink-udev-shared=false" - -EXTRA_OEMESON += "-Dnobody-user=nobody \ - -Dnobody-group=nobody \ - -Drootlibdir=${rootlibdir} \ - -Drootprefix=${rootprefix} \ - -Dsysvrcnd-path=${sysconfdir} \ - -Ddefault-locale=C \ - " - -# Hardcode target binary paths to avoid using paths from sysroot -EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ - -Dkmod-path=${base_bindir}/kmod \ - -Dmount-path=${base_bindir}/mount \ - -Dquotacheck-path=${sbindir}/quotacheck \ - -Dquotaon-path=${sbindir}/quotaon \ - -Dsulogin-path=${base_sbindir}/sulogin \ - -Dnologin-path=${base_sbindir}/nologin \ - -Dumount-path=${base_bindir}/umount" - -do_install() { - meson_do_install - install -d ${D}/${base_sbindir} - if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then - # Provided by a separate recipe - rm ${D}${systemd_unitdir}/system/serial-getty* -f - fi - - # Provide support for initramfs - [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init - [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd - - install -d ${D}${sysconfdir}/udev/rules.d/ - install -d ${D}${sysconfdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/ - - install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ - - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd - sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd - fi - - chown root:systemd-journal ${D}/${localstatedir}/log/journal - - # Delete journal README, as log can be symlinked inside volatile. - rm -f ${D}/${localstatedir}/log/README - - # journal-remote creates this at start - rm -rf ${D}/${localstatedir}/log/journal/remote - - install -d ${D}${systemd_unitdir}/system/graphical.target.wants - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants - install -d ${D}${systemd_unitdir}/system/poweroff.target.wants - install -d ${D}${systemd_unitdir}/system/reboot.target.wants - install -d ${D}${systemd_unitdir}/system/rescue.target.wants - - # Create symlinks for systemd-update-utmp-runlevel.service - if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service - fi - - # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it - # for existence else it fails - if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then - ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} - fi - if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then - echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf - echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf - echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf - ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd - else - sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf - ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd - fi - install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install - - # If polkit is setup fixup permissions and ownership - if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then - if [ -d ${D}${datadir}/polkit-1/rules.d ]; then - chmod 700 ${D}${datadir}/polkit-1/rules.d - chown polkitd:root ${D}${datadir}/polkit-1/rules.d - fi - fi - - # duplicate udevadm for postinst script - install -d ${D}${libexecdir} - ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm - - # install default policy for presets - # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto - install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset -} - - -python populate_packages_prepend (){ - systemdlibdir = d.getVar("rootlibdir") - do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) -} -PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" - -PACKAGES =+ "\ - ${PN}-gui \ - ${PN}-vconsole-setup \ - ${PN}-initramfs \ - ${PN}-analyze \ - ${PN}-kernel-install \ - ${PN}-rpm-macros \ - ${PN}-binfmt \ - ${PN}-zsh-completion \ - ${PN}-xorg-xinitrc \ - ${PN}-container \ - ${PN}-journal-gatewayd \ - ${PN}-journal-upload \ - ${PN}-journal-remote \ - ${PN}-extra-utils \ -" - -SUMMARY_${PN}-container = "Tools for containers and VMs" -DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." - -SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events" -DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default." - -SUMMARY_${PN}-journal-upload = "Send journal messages over the network" -DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." - -SUMMARY_${PN}-journal-remote = "Receive journal messages over the network" -DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." - -SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ -" -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" - -USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ -" -GROUPADD_PARAM_${PN} = "-r systemd-journal" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" -USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy" -USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway" -USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote" -USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload" - -FILES_${PN}-analyze = "${bindir}/systemd-analyze" - -FILES_${PN}-initramfs = "/init" -RDEPENDS_${PN}-initramfs = "${PN}" - -FILES_${PN}-gui = "${bindir}/systemadm" - -FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ - ${systemd_unitdir}/system/systemd-vconsole-setup.service \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" - -RDEPENDS_${PN}-kernel-install += "bash" -FILES_${PN}-kernel-install = "${bindir}/kernel-install \ - ${sysconfdir}/kernel/ \ - ${exec_prefix}/lib/kernel \ - " -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/ \ - ${exec_prefix}/lib/binfmt.d \ - ${rootlibexecdir}/systemd/systemd-binfmt \ - ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ - ${systemd_unitdir}/system/systemd-binfmt.service" -RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" - -RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" - - -FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ - ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ - ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ - ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ - ${datadir}/systemd/gatewayd/browse.html \ - " -SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" - -FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ - ${systemd_system_unitdir}/systemd-journal-upload.service \ - ${sysconfdir}/systemd/journal-upload.conf \ - " -SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service" - -FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ - ${sysconfdir}/systemd/journal-remote.conf \ - ${systemd_system_unitdir}/systemd-journal-remote.service \ - ${systemd_system_unitdir}/systemd-journal-remote.socket \ - " -SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket" - - -FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ - ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ - ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ - ${base_bindir}/machinectl \ - ${bindir}/systemd-nspawn \ - ${nonarch_libdir}/systemd/import-pubring.gpg \ - ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ - ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ - ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/machine.slice \ - ${systemd_system_unitdir}/machines.target \ - ${systemd_system_unitdir}/org.freedesktop.import1.busname \ - ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ - ${systemd_system_unitdir}/systemd-importd.service \ - ${systemd_system_unitdir}/systemd-machined.service \ - ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ - ${systemd_system_unitdir}/var-lib-machines.mount \ - ${rootlibexecdir}/systemd/systemd-import \ - ${rootlibexecdir}/systemd/systemd-importd \ - ${rootlibexecdir}/systemd/systemd-machined \ - ${rootlibexecdir}/systemd/systemd-pull \ - ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ - ${systemd_system_unitdir}/systemd-nspawn@.service \ - ${libdir}/libnss_mymachines.so.2 \ - ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ - ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ - ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ - ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ - ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ - " - -RRECOMMENDS_${PN}-container += "\ - ${PN}-journal-upload \ - ${PN}-journal-remote \ - ${PN}-journal-gatewayd \ - " - -FILES_${PN}-extra-utils = "\ - ${base_bindir}/systemd-escape \ - ${base_bindir}/systemd-inhibit \ - ${bindir}/systemd-detect-virt \ - ${bindir}/systemd-path \ - ${bindir}/systemd-run \ - ${bindir}/systemd-cat \ - ${bindir}/systemd-delta \ - ${bindir}/systemd-cgls \ - ${bindir}/systemd-cgtop \ - ${bindir}/systemd-stdio-bridge \ - ${base_bindir}/systemd-ask-password \ - ${base_bindir}/systemd-tty-ask-password-agent \ - ${systemd_unitdir}/system/systemd-ask-password-console.path \ - ${systemd_unitdir}/system/systemd-ask-password-console.service \ - ${systemd_unitdir}/system/systemd-ask-password-wall.path \ - ${systemd_unitdir}/system/systemd-ask-password-wall.service \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ - ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ - ${rootlibexecdir}/systemd/systemd-resolve-host \ - ${rootlibexecdir}/systemd/systemd-ac-power \ - ${rootlibexecdir}/systemd/systemd-activate \ - ${rootlibexecdir}/systemd/systemd-bus-proxyd \ - ${systemd_unitdir}/system/systemd-bus-proxyd.service \ - ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ - ${rootlibexecdir}/systemd/systemd-socket-proxyd \ - ${rootlibexecdir}/systemd/systemd-reply-password \ - ${rootlibexecdir}/systemd/systemd-sleep \ - ${rootlibexecdir}/systemd/system-sleep \ - ${systemd_unitdir}/system/systemd-hibernate.service \ - ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ - ${systemd_unitdir}/system/systemd-suspend.service \ - ${systemd_unitdir}/system/sleep.target \ - ${rootlibexecdir}/systemd/systemd-initctl \ - ${systemd_unitdir}/system/systemd-initctl.service \ - ${systemd_unitdir}/system/systemd-initctl.socket \ - ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ - ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ - ${rootlibexecdir}/systemd/systemd-cgroups-agent \ -" - -CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ - ${sysconfdir}/systemd/journald.conf \ - ${sysconfdir}/systemd/logind.conf \ - ${sysconfdir}/systemd/system.conf \ - ${sysconfdir}/systemd/user.conf \ - ${sysconfdir}/systemd/resolved.conf \ - ${sysconfdir}/systemd/timesyncd.conf \ -" - -FILES_${PN} = " ${base_bindir}/* \ - ${base_sbindir}/shutdown \ - ${base_sbindir}/halt \ - ${base_sbindir}/poweroff \ - ${base_sbindir}/runlevel \ - ${base_sbindir}/telinit \ - ${base_sbindir}/resolvconf \ - ${base_sbindir}/reboot \ - ${base_sbindir}/init \ - ${datadir}/dbus-1/services \ - ${datadir}/dbus-1/system-services \ - ${datadir}/polkit-1 \ - ${datadir}/${BPN} \ - ${datadir}/factory \ - ${sysconfdir}/dbus-1/ \ - ${sysconfdir}/modules-load.d/ \ - ${sysconfdir}/pam.d/ \ - ${sysconfdir}/sysctl.d/ \ - ${sysconfdir}/systemd/ \ - ${sysconfdir}/tmpfiles.d/ \ - ${sysconfdir}/xdg/ \ - ${sysconfdir}/init.d/README \ - ${sysconfdir}/resolv-conf.systemd \ - ${rootlibexecdir}/systemd/* \ - ${systemd_unitdir}/* \ - ${base_libdir}/security/*.so \ - /cgroup \ - ${bindir}/systemd* \ - ${bindir}/busctl \ - ${bindir}/coredumpctl \ - ${bindir}/localectl \ - ${bindir}/hostnamectl \ - ${bindir}/resolvectl \ - ${bindir}/timedatectl \ - ${bindir}/bootctl \ - ${bindir}/kernel-install \ - ${exec_prefix}/lib/tmpfiles.d/*.conf \ - ${exec_prefix}/lib/systemd \ - ${exec_prefix}/lib/modules-load.d \ - ${exec_prefix}/lib/sysctl.d \ - ${exec_prefix}/lib/sysusers.d \ - ${exec_prefix}/lib/environment.d \ - ${localstatedir} \ - ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \ - ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \ - ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \ - ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \ - ${nonarch_base_libdir}/modprobe.d/systemd.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ - " - -FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" - -RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck" -RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS_${PN} += "volatile-binds update-rc.d" - -RRECOMMENDS_${PN} += "systemd-extra-utils \ - systemd-compat-units udev-hwdb \ - e2fsprogs-e2fsck \ - kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ - os-release \ - systemd-conf \ -" - -INSANE_SKIP_${PN} += "dev-so libdir" -INSANE_SKIP_${PN}-dbg += "libdir" -INSANE_SKIP_${PN}-doc += " libdir" - -PACKAGES =+ "udev udev-hwdb" - -RPROVIDES_udev = "hotplug" - -RDEPENDS_udev-hwdb += "udev" - -FILES_udev += "${base_sbindir}/udevd \ - ${rootlibexecdir}/systemd/network/99-default.link \ - ${rootlibexecdir}/systemd/systemd-udevd \ - ${rootlibexecdir}/udev/accelerometer \ - ${rootlibexecdir}/udev/ata_id \ - ${rootlibexecdir}/udev/cdrom_id \ - ${rootlibexecdir}/udev/collect \ - ${rootlibexecdir}/udev/findkeyboards \ - ${rootlibexecdir}/udev/keyboard-force-release.sh \ - ${rootlibexecdir}/udev/keymap \ - ${rootlibexecdir}/udev/mtd_probe \ - ${rootlibexecdir}/udev/scsi_id \ - ${rootlibexecdir}/udev/v4l_id \ - ${rootlibexecdir}/udev/keymaps \ - ${rootlibexecdir}/udev/rules.d/*.rules \ - ${sysconfdir}/udev \ - ${sysconfdir}/init.d/systemd-udevd \ - ${systemd_unitdir}/system/*udev* \ - ${systemd_unitdir}/system/*.wants/*udev* \ - ${base_bindir}/udevadm \ - ${libexecdir}/${MLPREFIX}udevadm \ - ${datadir}/bash-completion/completions/udevadm \ - " - -FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" - -RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" - -INITSCRIPT_PACKAGES = "udev" -INITSCRIPT_NAME_udev = "systemd-udevd" -INITSCRIPT_PARAMS_udev = "start 03 S ." - -python __anonymous() { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") -} - -python do_warn_musl() { - if d.getVar('TCLIBC') == "musl": - bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") -} -addtask warn_musl before do_configure - -ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel resolv-conf" - -ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" -ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" -ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" - -ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" -ALTERNATIVE_PRIORITY[halt] ?= "300" - -ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" -ALTERNATIVE_PRIORITY[reboot] ?= "300" - -ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" -ALTERNATIVE_PRIORITY[shutdown] ?= "300" - -ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" -ALTERNATIVE_PRIORITY[poweroff] ?= "300" - -ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" -ALTERNATIVE_PRIORITY[runlevel] ?= "300" - -pkg_postinst_${PN} () { - sed -e '/^hosts:/s/\s*\//' \ - -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ - -i $D${sysconfdir}/nsswitch.conf -} - -pkg_prerm_${PN} () { - sed -e '/^hosts:/s/\s*\//' \ - -e '/^hosts:/s/\s*myhostname//' \ - -i $D${sysconfdir}/nsswitch.conf -} - -PACKAGE_WRITE_DEPS += "qemu-native" -pkg_postinst_udev-hwdb () { - if test -n "$D"; then - $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} - else - udevadm hwdb --update - fi -} - -pkg_prerm_udev-hwdb () { - rm -f $D${sysconfdir}/udev/hwdb.bin -} diff --git a/poky/meta/recipes-core/systemd/systemd_243.bb b/poky/meta/recipes-core/systemd/systemd_243.bb new file mode 100644 index 000000000..f0e8c569b --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd_243.bb @@ -0,0 +1,687 @@ +require systemd.inc + +PROVIDES = "udev" + +PE = "1" + +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 + +# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so +# that we don't build both udev and systemd in world builds. +REQUIRED_DISTRO_FEATURES = "systemd" + +SRC_URI += "file://touchscreen.rules \ + file://00-create-volatile.conf \ + file://init \ + file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ + file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \ + file://0003-implment-systemd-sysv-install-for-OE.patch \ + file://0004-rules-whitelist-hd-devices.patch \ + file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ + file://99-default.preset \ + " + +# patches needed by musl +SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}" +SRC_URI_MUSL = "\ + file://0002-don-t-use-glibc-specific-qsort_r.patch \ + file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ + file://0004-add-fallback-parse_printf_format-implementation.patch \ + file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ + file://0006-Include-netinet-if_ether.h.patch \ + file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \ + file://0008-add-missing-FTW_-macros-for-musl.patch \ + file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ + file://0011-Use-uintmax_t-for-handling-rlim_t.patch \ + file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ + file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ + file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ + file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ + file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ + file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ + file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ + file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ + file://0024-test-json.c-define-M_PIl.patch \ + file://0001-do-not-disable-buffer-in-writing-files.patch \ + file://0002-src-login-brightness.c-include-sys-wait.h.patch \ + file://0003-src-basic-copy.c-include-signal.h.patch \ + file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ + " + +PAM_PLUGINS = " \ + pam-plugin-unix \ + pam-plugin-loginuid \ + pam-plugin-keyinit \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ + acl \ + backlight \ + binfmt \ + gshadow \ + hibernate \ + hostnamed \ + idn \ + ima \ + kmod \ + localed \ + logind \ + machined \ + myhostname \ + networkd \ + nss \ + nss-mymachines \ + nss-resolve \ + quotacheck \ + randomseed \ + resolved \ + set-time-epoch \ + smack \ + sysusers \ + timedated \ + timesyncd \ + utmp \ + vconsole \ + xz \ +" + +PACKAGECONFIG_remove_libc-musl = " \ + gshadow \ + idn \ + localed \ + myhostname \ + nss \ + nss-mymachines \ + nss-resolve \ + resolved \ + smack \ + sysusers \ + utmp \ +" + +# Use the upstream systemd serial-getty@.service and rely on +# systemd-getty-generator instead of using the OE-core specific +# systemd-serialgetty.bb - not enabled by default. +PACKAGECONFIG[serial-getty-generator] = "" + +PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" +PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" +PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" +PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" +PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" +PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" +PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" +PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" +PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" +PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" +PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" +PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" +PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" +# Sign the journal for anti-tampering +PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" +PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" +PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" +PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" +PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" +PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" +PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" +# importd requires curl/xz/zlib/bzip2/gcrypt +PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" +# Update NAT firewall rules +PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" +PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" +PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" +PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false" +PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn" +PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" +PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" +PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" +PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" +PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" +PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" +PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" +PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" +PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" +PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" +PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" +PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" +PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" +PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" +PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode" +PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" +PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" +PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" +PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" +# libseccomp is found in meta-security +PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" +PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" +PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" +PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" +# When enabled use reproducble build timestamp if set as time epoch, +# or build time if not. When disabled, time epoch is unset. +def build_epoch(d): + epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" + return '-Dtime-epoch=%d' % int(epoch) +PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" +PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" +PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" +PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" +PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" +PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" +PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" +PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" +# Verify keymaps on locale change +PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" +PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" +PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" + +# Helper variables to clarify locations. This mirrors the logic in systemd's +# build system. +rootprefix ?= "${root_prefix}" +rootlibdir ?= "${base_libdir}" +rootlibexecdir = "${rootprefix}/lib" + +# This links udev statically with systemd helper library. +# Otherwise udev package would depend on systemd package (which has the needed shared library), +# and always pull it into images. +EXTRA_OEMESON += "-Dlink-udev-shared=false" + +EXTRA_OEMESON += "-Dnobody-user=nobody \ + -Dnobody-group=nobody \ + -Drootlibdir=${rootlibdir} \ + -Drootprefix=${rootprefix} \ + -Dsysvrcnd-path=${sysconfdir} \ + -Ddefault-locale=C \ + " + +# Hardcode target binary paths to avoid using paths from sysroot +EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ + -Dkmod-path=${base_bindir}/kmod \ + -Dmount-path=${base_bindir}/mount \ + -Dquotacheck-path=${sbindir}/quotacheck \ + -Dquotaon-path=${sbindir}/quotaon \ + -Dsulogin-path=${base_sbindir}/sulogin \ + -Dnologin-path=${base_sbindir}/nologin \ + -Dumount-path=${base_bindir}/umount" + +do_install() { + meson_do_install + install -d ${D}/${base_sbindir} + if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then + # Provided by a separate recipe + rm ${D}${systemd_unitdir}/system/serial-getty* -f + fi + + # Provide support for initramfs + [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init + [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd + + install -d ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${libdir}/pkgconfig + install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/ + + install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd + sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd + fi + + chown root:systemd-journal ${D}/${localstatedir}/log/journal + + # Delete journal README, as log can be symlinked inside volatile. + rm -f ${D}/${localstatedir}/log/README + + # journal-remote creates this at start + rm -rf ${D}/${localstatedir}/log/journal/remote + + install -d ${D}${systemd_unitdir}/system/graphical.target.wants + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + install -d ${D}${systemd_unitdir}/system/poweroff.target.wants + install -d ${D}${systemd_unitdir}/system/reboot.target.wants + install -d ${D}${systemd_unitdir}/system/rescue.target.wants + + # Create symlinks for systemd-update-utmp-runlevel.service + if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service + fi + + # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it + # for existence else it fails + if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} + fi + if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then + echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf + echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf + echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf + ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd + else + sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf + ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd + fi + install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install + + # If polkit is setup fixup permissions and ownership + if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then + if [ -d ${D}${datadir}/polkit-1/rules.d ]; then + chmod 700 ${D}${datadir}/polkit-1/rules.d + chown polkitd:root ${D}${datadir}/polkit-1/rules.d + fi + fi + + # create link for existing udev rules + ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm + + # duplicate udevadm for postinst script + install -d ${D}${libexecdir} + ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm + + # install default policy for presets + # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto + install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset +} + +do_install_append () { + # Mips qemu is extremely slow, allow more time for the hwdb update + # This is a workaround until https://github.com/systemd/systemd/issues/13581 is resolved + sed -i -e s#TimeoutSec=90s#TimeoutSec=180s# ${D}${systemd_unitdir}/system/systemd-hwdb-update.service +} + +python populate_packages_prepend (){ + systemdlibdir = d.getVar("rootlibdir") + do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) +} +PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" + +PACKAGES =+ "\ + ${PN}-gui \ + ${PN}-vconsole-setup \ + ${PN}-initramfs \ + ${PN}-analyze \ + ${PN}-kernel-install \ + ${PN}-rpm-macros \ + ${PN}-binfmt \ + ${PN}-zsh-completion \ + ${PN}-xorg-xinitrc \ + ${PN}-container \ + ${PN}-journal-gatewayd \ + ${PN}-journal-upload \ + ${PN}-journal-remote \ + ${PN}-extra-utils \ +" + +SUMMARY_${PN}-container = "Tools for containers and VMs" +DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." + +SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events" +DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default." + +SUMMARY_${PN}-journal-upload = "Send journal messages over the network" +DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." + +SUMMARY_${PN}-journal-remote = "Receive journal messages over the network" +DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." + +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ +" +SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" + +USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ +" +GROUPADD_PARAM_${PN} = "-r systemd-journal" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" +USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy" +USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway" +USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote" +USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload" + +FILES_${PN}-analyze = "${bindir}/systemd-analyze" + +FILES_${PN}-initramfs = "/init" +RDEPENDS_${PN}-initramfs = "${PN}" + +FILES_${PN}-gui = "${bindir}/systemadm" + +FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ + ${systemd_unitdir}/system/systemd-vconsole-setup.service \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" + +RDEPENDS_${PN}-kernel-install += "bash" +FILES_${PN}-kernel-install = "${bindir}/kernel-install \ + ${sysconfdir}/kernel/ \ + ${exec_prefix}/lib/kernel \ + " +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/ \ + ${exec_prefix}/lib/binfmt.d \ + ${rootlibexecdir}/systemd/systemd-binfmt \ + ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ + ${systemd_unitdir}/system/systemd-binfmt.service" +RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" + +RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" + + +FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ + ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ + ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ + ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ + ${datadir}/systemd/gatewayd/browse.html \ + " +SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" + +FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ + ${systemd_system_unitdir}/systemd-journal-upload.service \ + ${sysconfdir}/systemd/journal-upload.conf \ + " +SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service" + +FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ + ${sysconfdir}/systemd/journal-remote.conf \ + ${systemd_system_unitdir}/systemd-journal-remote.service \ + ${systemd_system_unitdir}/systemd-journal-remote.socket \ + " +SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket" + + +FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ + ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ + ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ + ${base_bindir}/machinectl \ + ${bindir}/systemd-nspawn \ + ${nonarch_libdir}/systemd/import-pubring.gpg \ + ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ + ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ + ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/machine.slice \ + ${systemd_system_unitdir}/machines.target \ + ${systemd_system_unitdir}/org.freedesktop.import1.busname \ + ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ + ${systemd_system_unitdir}/systemd-importd.service \ + ${systemd_system_unitdir}/systemd-machined.service \ + ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ + ${systemd_system_unitdir}/var-lib-machines.mount \ + ${rootlibexecdir}/systemd/systemd-import \ + ${rootlibexecdir}/systemd/systemd-importd \ + ${rootlibexecdir}/systemd/systemd-machined \ + ${rootlibexecdir}/systemd/systemd-pull \ + ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ + ${systemd_system_unitdir}/systemd-nspawn@.service \ + ${libdir}/libnss_mymachines.so.2 \ + ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ + ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ + ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ + ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ + ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ + " + +RRECOMMENDS_${PN}-container += "\ + ${PN}-journal-upload \ + ${PN}-journal-remote \ + ${PN}-journal-gatewayd \ + " + +FILES_${PN}-extra-utils = "\ + ${base_bindir}/systemd-escape \ + ${base_bindir}/systemd-inhibit \ + ${bindir}/systemd-detect-virt \ + ${bindir}/systemd-path \ + ${bindir}/systemd-run \ + ${bindir}/systemd-cat \ + ${bindir}/systemd-delta \ + ${bindir}/systemd-cgls \ + ${bindir}/systemd-cgtop \ + ${bindir}/systemd-stdio-bridge \ + ${base_bindir}/systemd-ask-password \ + ${base_bindir}/systemd-tty-ask-password-agent \ + ${systemd_unitdir}/system/systemd-ask-password-console.path \ + ${systemd_unitdir}/system/systemd-ask-password-console.service \ + ${systemd_unitdir}/system/systemd-ask-password-wall.path \ + ${systemd_unitdir}/system/systemd-ask-password-wall.service \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ + ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ + ${rootlibexecdir}/systemd/systemd-resolve-host \ + ${rootlibexecdir}/systemd/systemd-ac-power \ + ${rootlibexecdir}/systemd/systemd-activate \ + ${rootlibexecdir}/systemd/systemd-bus-proxyd \ + ${systemd_unitdir}/system/systemd-bus-proxyd.service \ + ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ + ${rootlibexecdir}/systemd/systemd-socket-proxyd \ + ${rootlibexecdir}/systemd/systemd-reply-password \ + ${rootlibexecdir}/systemd/systemd-sleep \ + ${rootlibexecdir}/systemd/system-sleep \ + ${systemd_unitdir}/system/systemd-hibernate.service \ + ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ + ${systemd_unitdir}/system/systemd-suspend.service \ + ${systemd_unitdir}/system/sleep.target \ + ${rootlibexecdir}/systemd/systemd-initctl \ + ${systemd_unitdir}/system/systemd-initctl.service \ + ${systemd_unitdir}/system/systemd-initctl.socket \ + ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ + ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ + ${rootlibexecdir}/systemd/systemd-cgroups-agent \ +" + +CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ + ${sysconfdir}/systemd/journald.conf \ + ${sysconfdir}/systemd/logind.conf \ + ${sysconfdir}/systemd/system.conf \ + ${sysconfdir}/systemd/user.conf \ + ${sysconfdir}/systemd/resolved.conf \ + ${sysconfdir}/systemd/timesyncd.conf \ +" + +FILES_${PN} = " ${base_bindir}/* \ + ${base_sbindir}/shutdown \ + ${base_sbindir}/halt \ + ${base_sbindir}/poweroff \ + ${base_sbindir}/runlevel \ + ${base_sbindir}/telinit \ + ${base_sbindir}/resolvconf \ + ${base_sbindir}/reboot \ + ${base_sbindir}/init \ + ${datadir}/dbus-1/services \ + ${datadir}/dbus-1/system-services \ + ${datadir}/polkit-1 \ + ${datadir}/${BPN} \ + ${datadir}/factory \ + ${sysconfdir}/dbus-1/ \ + ${sysconfdir}/modules-load.d/ \ + ${sysconfdir}/pam.d/ \ + ${sysconfdir}/sysctl.d/ \ + ${sysconfdir}/systemd/ \ + ${sysconfdir}/tmpfiles.d/ \ + ${sysconfdir}/xdg/ \ + ${sysconfdir}/init.d/README \ + ${sysconfdir}/resolv-conf.systemd \ + ${rootlibexecdir}/systemd/* \ + ${systemd_unitdir}/* \ + ${base_libdir}/security/*.so \ + /cgroup \ + ${bindir}/systemd* \ + ${bindir}/busctl \ + ${bindir}/coredumpctl \ + ${bindir}/localectl \ + ${bindir}/hostnamectl \ + ${bindir}/resolvectl \ + ${bindir}/timedatectl \ + ${bindir}/bootctl \ + ${bindir}/kernel-install \ + ${exec_prefix}/lib/tmpfiles.d/*.conf \ + ${exec_prefix}/lib/systemd \ + ${exec_prefix}/lib/modules-load.d \ + ${exec_prefix}/lib/sysctl.d \ + ${exec_prefix}/lib/sysusers.d \ + ${exec_prefix}/lib/environment.d \ + ${localstatedir} \ + ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \ + ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \ + ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \ + ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \ + ${nonarch_base_libdir}/modprobe.d/systemd.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ + " + +FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" + +RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck" +RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS_${PN} += "volatile-binds update-rc.d" + +RRECOMMENDS_${PN} += "systemd-extra-utils \ + systemd-compat-units udev-hwdb \ + e2fsprogs-e2fsck \ + kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ + os-release \ + systemd-conf \ +" + +INSANE_SKIP_${PN} += "dev-so libdir" +INSANE_SKIP_${PN}-dbg += "libdir" +INSANE_SKIP_${PN}-doc += " libdir" + +PACKAGES =+ "udev udev-hwdb" + +RPROVIDES_udev = "hotplug" + +RDEPENDS_udev-hwdb += "udev" + +FILES_udev += "${base_sbindir}/udevd \ + ${rootlibexecdir}/systemd/network/99-default.link \ + ${rootlibexecdir}/systemd/systemd-udevd \ + ${rootlibexecdir}/udev/accelerometer \ + ${rootlibexecdir}/udev/ata_id \ + ${rootlibexecdir}/udev/cdrom_id \ + ${rootlibexecdir}/udev/collect \ + ${rootlibexecdir}/udev/findkeyboards \ + ${rootlibexecdir}/udev/keyboard-force-release.sh \ + ${rootlibexecdir}/udev/keymap \ + ${rootlibexecdir}/udev/mtd_probe \ + ${rootlibexecdir}/udev/scsi_id \ + ${rootlibexecdir}/udev/v4l_id \ + ${rootlibexecdir}/udev/keymaps \ + ${rootlibexecdir}/udev/rules.d/*.rules \ + ${sysconfdir}/udev \ + ${sysconfdir}/init.d/systemd-udevd \ + ${systemd_unitdir}/system/*udev* \ + ${systemd_unitdir}/system/*.wants/*udev* \ + ${base_bindir}/udevadm \ + ${base_sbindir}/udevadm \ + ${libexecdir}/${MLPREFIX}udevadm \ + ${datadir}/bash-completion/completions/udevadm \ + " + +FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" + +RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" + +INITSCRIPT_PACKAGES = "udev" +INITSCRIPT_NAME_udev = "systemd-udevd" +INITSCRIPT_PARAMS_udev = "start 03 S ." + +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + +python do_warn_musl() { + if d.getVar('TCLIBC') == "musl": + bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") +} +addtask warn_musl before do_configure + +ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel resolv-conf" + +ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" +ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" + +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" +ALTERNATIVE_PRIORITY[halt] ?= "300" + +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" +ALTERNATIVE_PRIORITY[reboot] ?= "300" + +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" +ALTERNATIVE_PRIORITY[shutdown] ?= "300" + +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" +ALTERNATIVE_PRIORITY[poweroff] ?= "300" + +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" +ALTERNATIVE_PRIORITY[runlevel] ?= "300" + +pkg_postinst_${PN}_libc-glibc () { + sed -e '/^hosts:/s/\s*\//' \ + -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf +} + +pkg_prerm_${PN}_libc-glibc () { + sed -e '/^hosts:/s/\s*\//' \ + -e '/^hosts:/s/\s*myhostname//' \ + -i $D${sysconfdir}/nsswitch.conf +} + +PACKAGE_WRITE_DEPS += "qemu-native" +pkg_postinst_udev-hwdb () { + if test -n "$D"; then + $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} + else + udevadm hwdb --update + fi +} + +pkg_prerm_udev-hwdb () { + rm -f $D${sysconfdir}/udev/hwdb.bin +} diff --git a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh index 79eb0145c..b23731870 100644 --- a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -38,6 +38,12 @@ done automount_systemd() { name="`basename "$DEVNAME"`" + # Skip already mounted partitions + if [ -f /run/systemd/transient/run-media-$name.mount ]; then + logger "mount.sh/automount" "/run/media/$name already mounted" + return + fi + # Skip the partition which are already in /etc/fstab grep "^[[:space:]]*$DEVNAME" /etc/fstab && return for n in LABEL PARTLABEL UUID PARTUUID; do diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.1.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.1.bb deleted file mode 100644 index a364cf53e..000000000 --- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.1.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 = "9a85732d8beaae4b80cab98bb3355660389c1d36" -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.2.2.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.2.bb new file mode 100644 index 000000000..6b73c01dc --- /dev/null +++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.2.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 = "55a8c9626fb906c20c3206f8fd39b9a8fb259b79" +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/cmake/cmake-native_3.15.2.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.15.2.bb deleted file mode 100644 index b2952ee5f..000000000 --- a/poky/meta/recipes-devtools/cmake/cmake-native_3.15.2.bb +++ /dev/null @@ -1,52 +0,0 @@ -require cmake.inc -inherit native - -DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native ncurses-native" - -SRC_URI += "file://OEToolchainConfig.cmake \ - file://environment.d-cmake.sh \ - file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ - file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \ - " - - -B = "${WORKDIR}/build" -do_configure[cleandirs] = "${B}" - -CMAKE_EXTRACONF = "\ - -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ - -DBUILD_CursesDialog=1 \ - -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ - -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ - -DHAVE_SYS_ACL_H=0 \ -" - -do_configure () { - ${S}/configure --verbose --prefix=${prefix} \ - ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ - ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ - -- ${CMAKE_EXTRACONF} -} - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install - - # The following codes are here because eSDK needs to provide compatibilty - # for SDK. That is, eSDK could also be used like traditional SDK. - mkdir -p ${D}${datadir}/cmake - install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ - mkdir -p ${D}${base_prefix}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh -} - -do_compile[progress] = "percent" - -SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" diff --git a/poky/meta/recipes-devtools/cmake/cmake-native_3.15.3.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.15.3.bb new file mode 100644 index 000000000..b2952ee5f --- /dev/null +++ b/poky/meta/recipes-devtools/cmake/cmake-native_3.15.3.bb @@ -0,0 +1,52 @@ +require cmake.inc +inherit native + +DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native ncurses-native" + +SRC_URI += "file://OEToolchainConfig.cmake \ + file://environment.d-cmake.sh \ + file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ + file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \ + " + + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +CMAKE_EXTRACONF = "\ + -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ + -DBUILD_CursesDialog=1 \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ + -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ + -DHAVE_SYS_ACL_H=0 \ +" + +do_configure () { + ${S}/configure --verbose --prefix=${prefix} \ + ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ + ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ + -- ${CMAKE_EXTRACONF} +} + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + + # The following codes are here because eSDK needs to provide compatibilty + # for SDK. That is, eSDK could also be used like traditional SDK. + mkdir -p ${D}${datadir}/cmake + install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ + mkdir -p ${D}${base_prefix}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh +} + +do_compile[progress] = "percent" + +SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" diff --git a/poky/meta/recipes-devtools/cmake/cmake.inc b/poky/meta/recipes-devtools/cmake/cmake.inc index 4cbe26ed6..3711f18db 100644 --- a/poky/meta/recipes-devtools/cmake/cmake.inc +++ b/poky/meta/recipes-devtools/cmake/cmake.inc @@ -18,7 +18,7 @@ SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \ " -SRC_URI[md5sum] = "9ecf167edadb87e2d75cc89fded7aadb" -SRC_URI[sha256sum] = "539088cb29a68e6d6a8fba5c00951e5e5b1a92c68fa38a83e1ed2f355933f768" +SRC_URI[md5sum] = "bf69e837eeda3dd4e9f52cffcf546a11" +SRC_URI[sha256sum] = "13958243a01365b05652fa01b21d40fa834f70a9e30efa69c02604e64f58b8f5" UPSTREAM_CHECK_REGEX = "cmake-(?P\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.15.2.bb b/poky/meta/recipes-devtools/cmake/cmake_3.15.2.bb deleted file mode 100644 index e0457677e..000000000 --- a/poky/meta/recipes-devtools/cmake/cmake_3.15.2.bb +++ /dev/null @@ -1,53 +0,0 @@ -require cmake.inc - -inherit cmake - -DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" - -SRC_URI_append_class-nativesdk = " \ - file://OEToolchainConfig.cmake \ - file://environment.d-cmake.sh \ - file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ -" - -# Strip ${prefix} from ${docdir}, set result into docdir_stripped -python () { - prefix=d.getVar("prefix") - docdir=d.getVar("docdir") - - if not docdir.startswith(prefix): - bb.fatal('docdir must contain prefix as its prefix') - - docdir_stripped = docdir[len(prefix):] - if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': - docdir_stripped = docdir_stripped[1:] - - d.setVar("docdir_stripped", docdir_stripped) -} - -EXTRA_OECMAKE=" \ - -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ - -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ - -DKWSYS_CHAR_IS_SIGNED=1 \ - -DBUILD_CursesDialog=0 \ - -DKWSYS_LFS_WORKS=1 \ -" - -do_install_append_class-nativesdk() { - mkdir -p ${D}${datadir}/cmake - install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ - - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh -} - -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" - -FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal" -FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" -FILES_${PN}-dev = "" - -BBCLASSEXTEND = "nativesdk" diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.15.3.bb b/poky/meta/recipes-devtools/cmake/cmake_3.15.3.bb new file mode 100644 index 000000000..e0457677e --- /dev/null +++ b/poky/meta/recipes-devtools/cmake/cmake_3.15.3.bb @@ -0,0 +1,53 @@ +require cmake.inc + +inherit cmake + +DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" + +SRC_URI_append_class-nativesdk = " \ + file://OEToolchainConfig.cmake \ + file://environment.d-cmake.sh \ + file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ +" + +# Strip ${prefix} from ${docdir}, set result into docdir_stripped +python () { + prefix=d.getVar("prefix") + docdir=d.getVar("docdir") + + if not docdir.startswith(prefix): + bb.fatal('docdir must contain prefix as its prefix') + + docdir_stripped = docdir[len(prefix):] + if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': + docdir_stripped = docdir_stripped[1:] + + d.setVar("docdir_stripped", docdir_stripped) +} + +EXTRA_OECMAKE=" \ + -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ + -DKWSYS_CHAR_IS_SIGNED=1 \ + -DBUILD_CursesDialog=0 \ + -DKWSYS_LFS_WORKS=1 \ +" + +do_install_append_class-nativesdk() { + mkdir -p ${D}${datadir}/cmake + install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh +} + +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" + +FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal" +FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" +FILES_${PN}-dev = "" + +BBCLASSEXTEND = "nativesdk" diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb deleted file mode 100644 index d98457e3f..000000000 --- a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb +++ /dev/null @@ -1,145 +0,0 @@ -SUMMARY = "Utilities and libraries for handling compiled object files" -HOMEPAGE = "https://sourceware.org/elfutils" -SECTION = "base" -LICENSE = "GPLv2 & LGPLv3+ & GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "libtool bzip2 zlib virtual/libintl" -DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " -# The Debian patches below are from: -# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz -SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ - file://0001-dso-link-change.patch \ - file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ - file://0003-fixheadercheck.patch \ - file://0004-Disable-the-test-to-convert-euc-jp.patch \ - file://0006-Fix-build-on-aarch64-musl.patch \ - file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ - file://0001-libasm-may-link-with-libbz2-if-found.patch \ - file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ - file://debian/hppa_backend.diff \ - file://debian/arm_backend.diff \ - file://debian/mips_backend.diff \ - file://debian/mips_readelf_w.patch \ - file://debian/kfreebsd_path.patch \ - file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ - file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ - file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ - file://debian/hurd_path.patch \ - file://debian/ignore_strmerge.diff \ - file://debian/disable_werror.patch \ - file://debian/testsuite-ignore-elflint.diff \ - file://0001-skip-the-test-when-gcc-not-deployed.patch \ - file://run-ptest \ - file://ptest.patch \ - " -SRC_URI_append_libc-musl = " \ - file://musl-obstack-fts.patch \ - file://musl-libs.patch \ - file://musl-utils.patch \ - file://musl-tests.patch \ - " -SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9" -SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023" - -inherit autotools gettext ptest - -EXTRA_OECONF = "--program-prefix=eu- --without-lzma" -EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" - -EXTRA_OECONF_append_class-target += "--disable-tests-rpath" - -do_install_append() { - if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then - rm -f ${D}${bindir}/eu-objdump - fi -} - -do_compile_ptest() { - cd ${B}/tests - oe_runmake buildtest-TESTS oecheck -} - -do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - # copy the files which needed by the cases - TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" - install -d -m 755 ${D}${PTEST_PATH}/src - install -d -m 755 ${D}${PTEST_PATH}/libelf - install -d -m 755 ${D}${PTEST_PATH}/libdw - for test_file in ${TEST_FILES}; do - if [ -f ${B}/src/${test_file} ]; then - cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src - fi - done - cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so - cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so - cp -r ${S}/tests/ ${D}${PTEST_PATH} - cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests - cp -r ${B}/config.h ${D}${PTEST_PATH} - cp -r ${B}/backends ${D}${PTEST_PATH} - sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile - find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} - fi -} - -EXTRA_OEMAKE_class-native = "" -EXTRA_OEMAKE_class-nativesdk = "" - -BBCLASSEXTEND = "native nativesdk" - -# Package utilities separately -PACKAGES =+ "${PN}-binutils libelf libasm libdw" - -# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+ -# according to NEWS file: -# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone -# programs. There is now also a formal CONTRIBUTING document describing how to -# submit patches." -LICENSE_${PN}-binutils = "GPLv3+" -LICENSE_${PN} = "GPLv3+" -LICENSE_libelf = "GPLv2 | LGPLv3+" -LICENSE_libasm = "GPLv2 | LGPLv3+" -LICENSE_libdw = "GPLv2 | LGPLv3+" - -FILES_${PN}-binutils = "\ - ${bindir}/eu-addr2line \ - ${bindir}/eu-ld \ - ${bindir}/eu-nm \ - ${bindir}/eu-readelf \ - ${bindir}/eu-size \ - ${bindir}/eu-strip" - -FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" -FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" -FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" -# Some packages have the version preceeding the .so instead properly -# versioned .so., so we need to reorder and repackage. -#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" -#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" - -# The package contains symlinks that trip up insane -INSANE_SKIP_${MLPREFIX}libdw = "dev-so" - -# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, -# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail -INHIBIT_PACKAGE_STRIP_FILES = "\ - ${PKGD}${PTEST_PATH}/tests/test-nlist \ - ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ - ${PKGD}${PTEST_PATH}/tests/backtrace-child \ - ${PKGD}${PTEST_PATH}/tests/backtrace-data \ - ${PKGD}${PTEST_PATH}/tests/deleted \ - ${PKGD}${PTEST_PATH}/src/strip \ - ${PKGD}${PTEST_PATH}/src/addr2line \ - ${PKGD}${PTEST_PATH}/src/elfcmp \ - ${PKGD}${PTEST_PATH}/src/objdump \ - ${PKGD}${PTEST_PATH}/src/readelf \ - ${PKGD}${PTEST_PATH}/src/nm \ - ${PKGD}${PTEST_PATH}/src/elflint \ - ${PKGD}${PTEST_PATH}/libelf/libelf.so \ - ${PKGD}${PTEST_PATH}/libdw/libdw.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ -" - -PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1" diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb new file mode 100644 index 000000000..78c379193 --- /dev/null +++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb @@ -0,0 +1,148 @@ +SUMMARY = "Utilities and libraries for handling compiled object files" +HOMEPAGE = "https://sourceware.org/elfutils" +SECTION = "base" +LICENSE = "GPLv2 & LGPLv3+ & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +DEPENDS = "libtool bzip2 zlib virtual/libintl" +DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " +# The Debian patches below are from: +# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz +SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ + file://0001-dso-link-change.patch \ + file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ + file://0003-fixheadercheck.patch \ + file://0004-Disable-the-test-to-convert-euc-jp.patch \ + file://0006-Fix-build-on-aarch64-musl.patch \ + file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ + file://0001-libasm-may-link-with-libbz2-if-found.patch \ + file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ + file://debian/hppa_backend.diff \ + file://debian/arm_backend.diff \ + file://debian/mips_backend.diff \ + file://debian/mips_readelf_w.patch \ + file://debian/kfreebsd_path.patch \ + file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ + file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ + file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ + file://debian/hurd_path.patch \ + file://debian/ignore_strmerge.diff \ + file://debian/disable_werror.patch \ + file://debian/testsuite-ignore-elflint.diff \ + file://debian/mips_cfi.patch \ + file://debian/0001-fix-compile-failure-with-debian-patches.patch \ + file://0001-skip-the-test-when-gcc-not-deployed.patch \ + file://0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch \ + file://run-ptest \ + file://ptest.patch \ + " +SRC_URI_append_libc-musl = " \ + file://musl-obstack-fts.patch \ + file://musl-libs.patch \ + file://musl-utils.patch \ + file://musl-tests.patch \ + " +SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87" +SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e" + +inherit autotools gettext ptest + +EXTRA_OECONF = "--program-prefix=eu- --without-lzma" +EXTRA_OECONF_append_class-native = " --without-bzlib" +RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" + +EXTRA_OECONF_append_class-target += "--disable-tests-rpath" + +do_install_append() { + if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then + rm -f ${D}${bindir}/eu-objdump + fi +} + +do_compile_ptest() { + cd ${B}/tests + oe_runmake buildtest-TESTS oecheck +} + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so + cp -r ${S}/tests/ ${D}${PTEST_PATH} + cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests + cp -r ${B}/config.h ${D}${PTEST_PATH} + cp -r ${B}/backends ${D}${PTEST_PATH} + sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile + find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} + fi +} + +EXTRA_OEMAKE_class-native = "" +EXTRA_OEMAKE_class-nativesdk = "" + +BBCLASSEXTEND = "native nativesdk" + +# Package utilities separately +PACKAGES =+ "${PN}-binutils libelf libasm libdw" + +# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+ +# according to NEWS file: +# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone +# programs. There is now also a formal CONTRIBUTING document describing how to +# submit patches." +LICENSE_${PN}-binutils = "GPLv3+" +LICENSE_${PN} = "GPLv3+" +LICENSE_libelf = "GPLv2 | LGPLv3+" +LICENSE_libasm = "GPLv2 | LGPLv3+" +LICENSE_libdw = "GPLv2 | LGPLv3+" + +FILES_${PN}-binutils = "\ + ${bindir}/eu-addr2line \ + ${bindir}/eu-ld \ + ${bindir}/eu-nm \ + ${bindir}/eu-readelf \ + ${bindir}/eu-size \ + ${bindir}/eu-strip" + +FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" +FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" +FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" +# Some packages have the version preceeding the .so instead properly +# versioned .so., so we need to reorder and repackage. +#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" +#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" + +# The package contains symlinks that trip up insane +INSANE_SKIP_${MLPREFIX}libdw = "dev-so" + +# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, +# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +" + +PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1" diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/poky/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch new file mode 100644 index 000000000..3303333c4 --- /dev/null +++ b/poky/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch @@ -0,0 +1,32 @@ +From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 8 Sep 2019 15:57:59 -0700 +Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition + +Fixes +| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type +| struct pt_regs r; +| ^ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + backends/ppc_initreg.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c +index 0e0d359..e5cca7e 100644 +--- a/backends/ppc_initreg.c ++++ b/backends/ppc_initreg.c +@@ -33,6 +33,7 @@ + #include + #if defined(__powerpc__) && defined(__linux__) + # include ++# include + # include + #endif + +-- +2.23.0 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch index 892b8e873..a2983c577 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch @@ -1,25 +1,25 @@ -From 46d2c2f8fecad85baeed9fe211f5285820220442 Mon Sep 17 00:00:00 2001 +From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Mon, 5 Jan 2015 15:16:58 +0000 -Subject: [PATCH] Ignore differences between mips machine identifiers +Subject: [PATCH 1/3] Ignore differences between mips machine identifiers Little endian binaries actually use EM_MIPS so you can't tell the endianness from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the kernel will not load binaries containing it). Signed-off-by: James Cowgill + Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia - --- backends/mips_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -diff --git a/backends/mips_init.c b/backends/mips_init.c -index 975c04e..8482e7f 100644 +Index: b/backends/mips_init.c +=================================================================== --- a/backends/mips_init.c +++ b/backends/mips_init.c -@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unused)), +@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus return NULL; /* We handle it. */ diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch new file mode 100644 index 000000000..19a201506 --- /dev/null +++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch @@ -0,0 +1,48 @@ +From 3f3e7b16934ec58ab47d2bdc9982f54a55b07534 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 21 Aug 2019 16:25:33 +0800 +Subject: [PATCH] fix compile failure with debian patches + +While applying debian patches, there is a compile failure +... +elfutils-0.177/backends/mips_init.c:48:5: error: 'Ebl' {aka 'struct ebl'} has no member named 'name' +... + +Since upstream applied commit [b323391 libdwelf: Add dwelf_elf_e_machine_string +and use it in readelf], it remove 'name' from 'struct ebl' + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + backends/mips_init.c | 1 - + backends/parisc_init.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/backends/mips_init.c b/backends/mips_init.c +index bce5abe..e1c65c8 100644 +--- a/backends/mips_init.c ++++ b/backends/mips_init.c +@@ -45,7 +45,6 @@ mips_init (Elf *elf __attribute__ ((unused)), + return NULL; + + /* We handle it. */ +- eh->name = "MIPS"; + mips_init_reloc (eh); + HOOK (eh, reloc_simple_type); + HOOK (eh, return_value_location); +diff --git a/backends/parisc_init.c b/backends/parisc_init.c +index f1e401c..97b4a8c 100644 +--- a/backends/parisc_init.c ++++ b/backends/parisc_init.c +@@ -56,7 +56,6 @@ parisc_init (Elf *elf __attribute__ ((unused)), + pa64 = 1; + } + /* We handle it. */ +- eh->name = "PA-RISC"; + parisc_init_reloc (eh); + HOOK (eh, reloc_simple_type); + HOOK (eh, machine_flag_check); +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch index 7c0b9c6dc..aee00cba1 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch @@ -1,18 +1,18 @@ -From 93ae9bb7d25a1adbcbab23a9b8493f370a93f0a3 Mon Sep 17 00:00:00 2001 +From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Mon, 5 Jan 2015 15:17:01 +0000 -Subject: [PATCH] Add support for mips64 abis in mips_retval.c +Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c Signed-off-by: James Cowgill + Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia - --- - backends/mips_retval.c | 104 +++++++++++++++++++++++++++++++++++++---- + backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 10 deletions(-) diff --git a/backends/mips_retval.c b/backends/mips_retval.c -index 656cd1f..57487bb 100644 +index 33f12a7..d5c6ef0 100644 --- a/backends/mips_retval.c +++ b/backends/mips_retval.c @@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf) @@ -166,3 +166,6 @@ index 656cd1f..57487bb 100644 *locp = loc_aggregate; return nloc_aggregate; } +-- +2.1.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch index 17b98a796..c949e9653 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch @@ -1,7 +1,7 @@ -From bce44aece915698a224a8aefa66784b27455675b Mon Sep 17 00:00:00 2001 +From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Mon, 5 Jan 2015 15:17:02 +0000 -Subject: [PATCH] Add mips n64 relocation format hack +Subject: [PATCH 3/3] Add mips n64 relocation format hack MIPSEL N64 ELF files use a slightly different format for storing relocation entries which is incompatible with the normal R_SYM / R_INFO macros. @@ -12,9 +12,9 @@ This patch also ensures that strip.c sets the correct value of e_machine before manipulating relocations so that these changes take effect. Signed-off-by: James Cowgill + Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia - --- libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- @@ -23,10 +23,10 @@ Signed-off-by: Hongxu Jia src/strip.c | 17 +++++++++++++++++ 5 files changed, 101 insertions(+), 6 deletions(-) -diff --git a/libelf/gelf_getrel.c b/libelf/gelf_getrel.c -index 309e3d3..2a81a97 100644 ---- a/libelf/gelf_getrel.c -+++ b/libelf/gelf_getrel.c +Index: elfutils-0.175/libelf/gelf_getrel.c +=================================================================== +--- elfutils-0.175.orig/libelf/gelf_getrel.c ++++ elfutils-0.175/libelf/gelf_getrel.c @@ -36,6 +36,7 @@ #include "libelfP.h" @@ -35,7 +35,7 @@ index 309e3d3..2a81a97 100644 GElf_Rel * gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) -@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) +@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE result = NULL; } else @@ -66,10 +66,10 @@ index 309e3d3..2a81a97 100644 } rwlock_unlock (scn->elf->lock); -diff --git a/libelf/gelf_getrela.c b/libelf/gelf_getrela.c -index d695f65..1f42a80 100644 ---- a/libelf/gelf_getrela.c -+++ b/libelf/gelf_getrela.c +Index: elfutils-0.175/libelf/gelf_getrela.c +=================================================================== +--- elfutils-0.175.orig/libelf/gelf_getrela.c ++++ elfutils-0.175/libelf/gelf_getrela.c @@ -36,6 +36,7 @@ #include "libelfP.h" @@ -78,7 +78,7 @@ index d695f65..1f42a80 100644 GElf_Rela * gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) -@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) +@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G result = NULL; } else @@ -109,10 +109,10 @@ index d695f65..1f42a80 100644 } rwlock_unlock (scn->elf->lock); -diff --git a/libelf/gelf_update_rel.c b/libelf/gelf_update_rel.c -index 14f62e9..9095556 100644 ---- a/libelf/gelf_update_rel.c -+++ b/libelf/gelf_update_rel.c +Index: elfutils-0.175/libelf/gelf_update_rel.c +=================================================================== +--- elfutils-0.175.orig/libelf/gelf_update_rel.c ++++ elfutils-0.175/libelf/gelf_update_rel.c @@ -36,6 +36,7 @@ #include "libelfP.h" @@ -121,7 +121,7 @@ index 14f62e9..9095556 100644 int gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) -@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) +@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, } else { @@ -131,7 +131,7 @@ index 14f62e9..9095556 100644 /* Check whether we have to resize the data buffer. */ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) { -@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) +@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, goto out; } @@ -154,10 +154,10 @@ index 14f62e9..9095556 100644 } result = 1; -diff --git a/libelf/gelf_update_rela.c b/libelf/gelf_update_rela.c -index 8825270..4caa85f 100644 ---- a/libelf/gelf_update_rela.c -+++ b/libelf/gelf_update_rela.c +Index: elfutils-0.175/libelf/gelf_update_rela.c +=================================================================== +--- elfutils-0.175.orig/libelf/gelf_update_rela.c ++++ elfutils-0.175/libelf/gelf_update_rela.c @@ -36,6 +36,7 @@ #include "libelfP.h" @@ -166,7 +166,7 @@ index 8825270..4caa85f 100644 int gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) -@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) +@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx } else { @@ -176,7 +176,7 @@ index 8825270..4caa85f 100644 /* Check whether we have to resize the data buffer. */ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) { -@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) +@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx goto out; } @@ -199,11 +199,11 @@ index 8825270..4caa85f 100644 } result = 1; -diff --git a/src/strip.c b/src/strip.c -index a73009d..75bd7ba 100644 ---- a/src/strip.c -+++ b/src/strip.c -@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, +Index: elfutils-0.175/src/strip.c +=================================================================== +--- elfutils-0.175.orig/src/strip.c ++++ elfutils-0.175/src/strip.c +@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char goto fail; } diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff b/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff index 9904f2415..ba0ce33bd 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff +++ b/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff @@ -1,25 +1,25 @@ -From f3384466475eab373c0f1cb79c61d45709913b00 Mon Sep 17 00:00:00 2001 +From 4e6fededb3d8c90694c44214c862ac216a69ecae Mon Sep 17 00:00:00 2001 From: Hongxu Jia -Date: Wed, 28 May 2014 16:49:57 +0800 -Subject: [PATCH] elfutils: upgrade to 0.158 +Date: Wed, 21 Aug 2019 16:50:33 +0800 +Subject: [PATCH] arm_backend Upstream-Status: Pending [from debian] +Rebase to 0.177 Signed-off-by: Hongxu Jia - --- - backends/arm_init.c | 18 +++- - backends/arm_regs.c | 132 ++++++++++++++++++++++++++++ - backends/arm_retval.c | 43 ++++++++- - backends/libebl_arm.h | 9 ++ + backends/arm_init.c | 18 ++++- + backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++ + backends/arm_retval.c | 43 +++++++++++- + backends/libebl_arm.h | 9 +++ libelf/elf.h | 11 +++ - tests/run-addrcfi.sh | 93 +++++++++++++++++++- - tests/run-allregs.sh | 95 +++++++++++++++++++- + tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++- + tests/run-allregs.sh | 95 +++++++++++++++++++++++++- tests/run-readelf-mixed-corenote.sh | 11 ++- 8 files changed, 400 insertions(+), 12 deletions(-) create mode 100644 backends/libebl_arm.h diff --git a/backends/arm_init.c b/backends/arm_init.c -index f2b1b11..1b71f16 100644 +index af023f0..ea2bcb7 100644 --- a/backends/arm_init.c +++ b/backends/arm_init.c @@ -35,20 +35,31 @@ @@ -53,9 +53,9 @@ index f2b1b11..1b71f16 100644 + } + /* We handle it. */ - eh->name = "ARM"; arm_init_reloc (eh); -@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unused)), + HOOK (eh, segment_type_name); +@@ -59,7 +70,10 @@ arm_init (Elf *elf __attribute__ ((unused)), HOOK (eh, core_note); HOOK (eh, auxv_info); HOOK (eh, check_object_attribute); @@ -324,10 +324,10 @@ index 0000000..c00770c + +#endif diff --git a/libelf/elf.h b/libelf/elf.h -index 6310054..5dc632b 100644 +index 01648bd..05b7e7e 100644 --- a/libelf/elf.h +++ b/libelf/elf.h -@@ -2694,6 +2694,9 @@ enum +@@ -2690,6 +2690,9 @@ enum #define EF_ARM_EABI_VER4 0x04000000 #define EF_ARM_EABI_VER5 0x05000000 @@ -337,7 +337,7 @@ index 6310054..5dc632b 100644 /* Additional symbol types for Thumb. */ #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ -@@ -2711,12 +2714,19 @@ enum +@@ -2707,12 +2710,19 @@ enum /* Processor specific values for the Phdr p_type field. */ #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ @@ -357,7 +357,7 @@ index 6310054..5dc632b 100644 /* AArch64 relocs. */ -@@ -3009,6 +3019,7 @@ enum +@@ -3005,6 +3015,7 @@ enum TLS block (LDR, STR). */ #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative to GOT origin (LDR). */ @@ -366,7 +366,7 @@ index 6310054..5dc632b 100644 #define R_ARM_THM_TLS_DESCSEQ 129 #define R_ARM_THM_TLS_DESCSEQ16 129 diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh -index fd89d02..462d7c5 100755 +index 64fa24d..1c2aa4d 100755 --- a/tests/run-addrcfi.sh +++ b/tests/run-addrcfi.sh @@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range @@ -619,3 +619,6 @@ index c960f1d..e4bf074 100755 CORE 124 PRPSINFO state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch b/poky/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch index bb5670a8d..bd98dae4b 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch @@ -1,23 +1,16 @@ -From dece09fb8c59dbdab356b63fbe6b7554dd2461a4 Mon Sep 17 00:00:00 2001 From: Helmut Grohne -Date: Fri, 23 Nov 2018 15:47:20 +0800 -Subject: [PATCH] disable -Werror as it tends to break with new gcc versions - +Subject: disable -Werror as it tends to break with new gcc versions Bug-Debian: https://bugs.debian.org/886004 Last-Update: 2018-01-01 Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia ---- - config/eu.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/config/eu.am b/config/eu.am -index 82acda3..dede5c6 100644 ---- a/config/eu.am -+++ b/config/eu.am -@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ +Index: elfutils-0.176/config/eu.am +=================================================================== +--- elfutils-0.176.orig/config/eu.am ++++ elfutils-0.176/config/eu.am +@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W -Wold-style-definition -Wstrict-prototypes -Wtrampolines \ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff index afcc30abf..4460d582c 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff +++ b/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff @@ -1,21 +1,21 @@ -From 8fe468682c550606ea961a1f996a8618940eb084 Mon Sep 17 00:00:00 2001 +From 8efad9105b38985bea373416ae8fcacf21d1d129 Mon Sep 17 00:00:00 2001 From: Hongxu Jia -Date: Fri, 16 Jul 2010 12:26:46 +0800 -Subject: [PATCH] elfutils: upgrade to version 0.148 +Date: Wed, 21 Aug 2019 15:44:18 +0800 +Subject: [PATCH] hppa backend +Rebase to 0.177 Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia - --- - backends/Makefile.am | 8 +- + backends/Makefile.am | 7 +- backends/libebl_parisc.h | 9 ++ - backends/parisc_init.c | 73 +++++++++++++ - backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++ - backends/parisc_reloc.def | 128 +++++++++++++++++++++++ - backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++ - backends/parisc_symbol.c | 113 ++++++++++++++++++++ - libelf/elf.h | 11 ++ - 8 files changed, 712 insertions(+), 2 deletions(-) + backends/parisc_init.c | 73 ++++++++++++++++ + backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++ + backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++ + backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++ + backends/parisc_symbol.c | 113 ++++++++++++++++++++++++ + libelf/elf.h | 11 +++ + 8 files changed, 711 insertions(+), 2 deletions(-) create mode 100644 backends/libebl_parisc.h create mode 100644 backends/parisc_init.c create mode 100644 backends/parisc_regs.c @@ -24,35 +24,31 @@ Signed-off-by: Hongxu Jia create mode 100644 backends/parisc_symbol.c diff --git a/backends/Makefile.am b/backends/Makefile.am -index 2126a2e..5671a32 100644 +index 175468f..91a38e2 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am -@@ -33,12 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ +@@ -33,16 +33,19 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ -- tilegx m68k bpf riscv -+ tilegx m68k bpf riscv parisc +- tilegx m68k bpf riscv csky ++ tilegx m68k bpf riscv csky parisc libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ -- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a -+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ -+ libebl_parisc_pic.a + libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ +- libebl_csky_pic.a ++ libebl_csky_pic.a libebl_parisc_pic.a noinst_LIBRARIES = $(libebl_pic) noinst_DATA = $(libebl_pic:_pic.a=.so) -@@ -136,6 +137,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \ - libebl_riscv_pic_a_SOURCES = $(riscv_SRCS) - am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os) - +parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c +libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) +am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) - libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) - @rm -f $(@:.so=.map) + libelf = ../libelf/libelf.so + libdw = ../libdw/libdw.so diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h new file mode 100644 index 0000000..f473b79 @@ -785,10 +781,10 @@ index 0000000..5754bd8 + } +} diff --git a/libelf/elf.h b/libelf/elf.h -index 75043bc..6310054 100644 +index 01648bd..218ceb2 100644 --- a/libelf/elf.h +++ b/libelf/elf.h -@@ -2155,16 +2155,24 @@ enum +@@ -2162,16 +2162,24 @@ enum #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ @@ -813,7 +809,7 @@ index 75043bc..6310054 100644 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ -@@ -2173,6 +2181,7 @@ enum +@@ -2180,6 +2188,7 @@ enum #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ @@ -821,7 +817,7 @@ index 75043bc..6310054 100644 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ -@@ -2198,6 +2207,8 @@ enum +@@ -2205,6 +2214,8 @@ enum #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ @@ -830,3 +826,6 @@ index 75043bc..6310054 100644 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch b/poky/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch index f014ae2a7..62a960f3a 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch @@ -1,19 +1,10 @@ -From 2f54a8cf959ea83c452b1a22acbc47d2738b5fa0 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Fri, 23 Nov 2018 15:47:20 +0800 -Subject: [PATCH] elfutils: 0.170 -> 0.172 - Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia ---- - tests/run-native-test.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh -index 5351e02..70f6681 100755 ---- a/tests/run-native-test.sh -+++ b/tests/run-native-test.sh +Index: elfutils-0.165/tests/run-native-test.sh +=================================================================== +--- elfutils-0.165.orig/tests/run-native-test.sh ++++ elfutils-0.165/tests/run-native-test.sh @@ -83,6 +83,9 @@ native_test() # "cannot attach to process: Function not implemented". [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff b/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff index 53332467a..55513eedd 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff +++ b/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff @@ -1,19 +1,8 @@ -From d326ad99be856815260a04e573fc97044c02f444 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Mon, 2 Jul 2018 13:57:09 +0800 -Subject: [PATCH] elfutils: 0.170 -> 0.172 - Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia ---- - tests/run-strip-strmerge.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/run-strip-strmerge.sh b/tests/run-strip-strmerge.sh -index aa9c1eb..2bab8ec 100755 ---- a/tests/run-strip-strmerge.sh -+++ b/tests/run-strip-strmerge.sh +--- elfutils-0.165.orig/tests/run-strip-strmerge.sh ++++ elfutils-0.165/tests/run-strip-strmerge.sh @@ -30,7 +30,7 @@ remerged=remerged.elf tempfiles $merged $stripped $debugfile $remerged diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch b/poky/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch index 805da80d6..e85a2fed9 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch @@ -1,17 +1,8 @@ -From bac45996ece75900e0cde97f3889eaf6c1b286f8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Fri, 23 Nov 2018 15:47:20 +0800 -Subject: [PATCH] elfutils: 0.170 -> 0.172 - Upstream-Status: Pending [from debian] Signed-off-by: Hongxu Jia ---- - tests/run-native-test.sh | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh -index d19007f..5351e02 100755 +Index: b/tests/run-native-test.sh +=================================================================== --- a/tests/run-native-test.sh +++ b/tests/run-native-test.sh @@ -77,6 +77,12 @@ native_test() diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff b/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff index 697306f82..1097b0ec6 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff +++ b/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff @@ -1,18 +1,19 @@ -From 10a75fd2beefafe2043163f85426d0e575de58d8 Mon Sep 17 00:00:00 2001 +From 68b497668cde5171880d073a7ea50d11c3bddbfc Mon Sep 17 00:00:00 2001 From: Hongxu Jia -Date: Fri, 16 Jul 2010 12:26:46 +0800 -Subject: [PATCH] elfutils: upgrade to version 0.148 +Date: Wed, 21 Aug 2019 15:49:52 +0800 +Subject: [PATCH] mips backend +Rebase to 0.177 Upstream-Status: Pending [from debian] -Signed-off-by: Hongxu Jia +Signed-off-by: Hongxu Jia --- backends/Makefile.am | 8 +- - backends/mips_init.c | 59 ++++++++ - backends/mips_regs.c | 104 +++++++++++++ - backends/mips_reloc.def | 79 ++++++++++ - backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++ - backends/mips_symbol.c | 53 +++++++ + backends/mips_init.c | 59 +++++++++ + backends/mips_regs.c | 104 ++++++++++++++++ + backends/mips_reloc.def | 79 ++++++++++++ + backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++ + backends/mips_symbol.c | 53 ++++++++ libebl/eblopenbackend.c | 2 + 7 files changed, 624 insertions(+), 2 deletions(-) create mode 100644 backends/mips_init.c @@ -22,28 +23,28 @@ Signed-off-by: Hongxu Jia create mode 100644 backends/mips_symbol.c diff --git a/backends/Makefile.am b/backends/Makefile.am -index 5671a32..ba84da6 100644 +index 91a38e2..aba8a4a 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ -- tilegx m68k bpf riscv parisc -+ tilegx m68k bpf riscv parisc mips +- tilegx m68k bpf riscv csky parisc ++ tilegx m68k bpf riscv csky parisc mips libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ - libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ -- libebl_parisc_pic.a -+ libebl_parisc_pic.a libebl_mips_pic.a + libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ +- libebl_csky_pic.a libebl_parisc_pic.a ++ libebl_csky_pic.a libebl_parisc_pic.a libebl_mips_pic.a noinst_LIBRARIES = $(libebl_pic) noinst_DATA = $(libebl_pic:_pic.a=.so) -@@ -141,6 +141,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c - libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) - am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) +@@ -145,6 +145,10 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ + libebl_csky_pic_a_SOURCES = $(csky_SRCS) + am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) +mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c +libebl_mips_pic_a_SOURCES = $(mips_SRCS) @@ -699,7 +700,7 @@ index 0000000..261b05d + } +} diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c -index d54b720..6cf766f 100644 +index 01711f5..d0c3589 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -71,6 +71,8 @@ static const struct @@ -711,3 +712,6 @@ index d54b720..6cf766f 100644 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch b/poky/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch new file mode 100644 index 000000000..fda4f6805 --- /dev/null +++ b/poky/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch @@ -0,0 +1,131 @@ +From 96e38289f2887ddb8e6d2fb91ea04bdbdf034ab5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 21 Aug 2019 17:00:30 +0800 +Subject: [PATCH 2/2] mips_cfi + +Upstream-Status: Pending [from debian] + +Rebase to 0.177 + +Signed-off-by: Hongxu Jia +--- + backends/Makefile.am | 2 +- + backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + backends/mips_init.c | 1 + + 3 files changed, 82 insertions(+), 1 deletion(-) + create mode 100644 backends/mips_cfi.c + +diff --git a/backends/Makefile.am b/backends/Makefile.am +index aba8a4a..6ac0eec 100644 +--- a/backends/Makefile.am ++++ b/backends/Makefile.am +@@ -145,7 +145,7 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ + libebl_csky_pic_a_SOURCES = $(csky_SRCS) + am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) + +-mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c ++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c mips_cfi.c + libebl_mips_pic_a_SOURCES = $(mips_SRCS) + am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) + +diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c +new file mode 100644 +index 0000000..9ffdab5 +--- /dev/null ++++ b/backends/mips_cfi.c +@@ -0,0 +1,80 @@ ++/* MIPS ABI-specified defaults for DWARF CFI. ++ Copyright (C) 2018 Kurt Roeckx, Inc. ++ This file is part of elfutils. ++ ++ This file is free software; you can redistribute it and/or modify ++ it under the terms of either ++ ++ * the GNU Lesser General Public License as published by the Free ++ Software Foundation; either version 3 of the License, or (at ++ your option) any later version ++ ++ or ++ ++ * the GNU General Public License as published by the Free ++ Software Foundation; either version 2 of the License, or (at ++ your option) any later version ++ ++ or both in parallel, as here. ++ ++ elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received copies of the GNU General Public License and ++ the GNU Lesser General Public License along with this program. If ++ not, see . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++ ++#define BACKEND mips_ ++#include "libebl_CPU.h" ++ ++int ++mips_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) ++{ ++ static const uint8_t abi_cfi[] = ++ { ++ /* Call-saved regs. */ ++ DW_CFA_same_value, ULEB128_7 (16), /* $16 */ ++ DW_CFA_same_value, ULEB128_7 (17), /* $17 */ ++ DW_CFA_same_value, ULEB128_7 (18), /* $18 */ ++ DW_CFA_same_value, ULEB128_7 (19), /* $19 */ ++ DW_CFA_same_value, ULEB128_7 (20), /* $20 */ ++ DW_CFA_same_value, ULEB128_7 (21), /* $21 */ ++ DW_CFA_same_value, ULEB128_7 (22), /* $22 */ ++ DW_CFA_same_value, ULEB128_7 (23), /* $23 */ ++ DW_CFA_same_value, ULEB128_7 (28), /* $28 */ ++ DW_CFA_same_value, ULEB128_7 (29), /* $29 */ ++ DW_CFA_same_value, ULEB128_7 (30), /* $30 */ ++ ++ DW_CFA_same_value, ULEB128_7 (52), /* $f20 */ ++ DW_CFA_same_value, ULEB128_7 (53), /* $f21 */ ++ DW_CFA_same_value, ULEB128_7 (54), /* $f22 */ ++ DW_CFA_same_value, ULEB128_7 (55), /* $f23 */ ++ DW_CFA_same_value, ULEB128_7 (56), /* $f24 */ ++ DW_CFA_same_value, ULEB128_7 (57), /* $f25 */ ++ DW_CFA_same_value, ULEB128_7 (58), /* $f26 */ ++ DW_CFA_same_value, ULEB128_7 (59), /* $f27 */ ++ DW_CFA_same_value, ULEB128_7 (60), /* $f28 */ ++ DW_CFA_same_value, ULEB128_7 (61), /* $f29 */ ++ DW_CFA_same_value, ULEB128_7 (62), /* $f30 */ ++ DW_CFA_same_value, ULEB128_7 (63), /* $f31 */ ++ ++ /* The CFA is the SP. */ ++ DW_CFA_def_cfa, ULEB128_7 (29), ULEB128_7 (0), ++ }; ++ ++ abi_info->initial_instructions = abi_cfi; ++ abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi]; ++ abi_info->data_alignment_factor = 4; ++ ++ abi_info->return_address_register = 31; /* $31 */ ++ ++ return 0; ++} +diff --git a/backends/mips_init.c b/backends/mips_init.c +index 8482e7f..bce5abe 100644 +--- a/backends/mips_init.c ++++ b/backends/mips_init.c +@@ -50,6 +50,7 @@ mips_init (Elf *elf __attribute__ ((unused)), + HOOK (eh, reloc_simple_type); + HOOK (eh, return_value_location); + HOOK (eh, register_info); ++ HOOK (eh, abi_cfi); + + return MODVERSION; + } +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch index 1737e0dbc..c6d42e163 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch +++ b/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch @@ -1,23 +1,22 @@ -From 33da4b4347aacdfb8b1b42e06e29e68a4b882d96 Mon Sep 17 00:00:00 2001 -From: Kurt Roeckx -Date: Mon, 4 Mar 2019 09:45:00 +0000 -Subject: [PATCH] Make readelf -w output debug information on mips - -Upstreams wants a change where this is handled by a hook that needs -to be filled in by the backend for the arch. +From 7bdc83296865cf2b2a5615dbdb7ac0d441fb1849 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 21 Aug 2019 16:55:01 +0800 +Subject: [PATCH] mips_readelf_w Upstream-Status: Pending [from debian] -Signed-off-by: Hongxu Jia +Rebase to 0.177 + +Signed-off-by: Hongxu Jia --- src/readelf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/readelf.c b/src/readelf.c -index 33706bd..ef13159 100644 +index 2084fb1..5c02a9b 100644 --- a/src/readelf.c +++ b/src/readelf.c -@@ -11148,7 +11148,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) +@@ -11256,7 +11256,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); @@ -27,3 +26,6 @@ index 33706bd..ef13159 100644 { static const struct { +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff b/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff index c4ce20c8a..e6d7948c6 100644 --- a/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff +++ b/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff @@ -1,16 +1,13 @@ -From 03a343c6b1b72598fce654b8a638f106da44abfb Mon Sep 17 00:00:00 2001 -From: OpenEmbedded -Date: Fri, 12 Apr 2019 08:05:50 +0000 -Subject: [PATCH] On many architectures this test fails because binaries/libs - produced by binutils don't pass elflint. However elfutils shouldn't FTBFS - because of this. +From 6393b0e57872b3ffedf0dbd6784cd29694010878 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 21 Aug 2019 16:59:01 +0800 +Subject: [PATCH 1/2] testsuite-ignore-elflint -So we run the tests on all archs to see what breaks, but if it breaks we ignore -the result (exitcode 77 means: this test was skipped). +Upstream-Status: Pending [from debian] -Upstream-Status: Inappropriate [oe specific] +Rebase to 0.177 -Signed-off-by: Mingli Yu +Signed-off-by: Hongxu Jia --- tests/run-elflint-self.sh | 2 +- tests/test-subr.sh | 15 +++++++++++++++ @@ -50,3 +47,6 @@ index 09f428d..26f61f1 100644 + if test $exit_status != 0; then exit $exit_status; fi +} + +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch b/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch index 51ca630ef..b9b9f120d 100644 --- a/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch +++ b/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch @@ -1,3 +1,8 @@ +From d5a1651df9884fcf57ed320bc2f866538af2f420 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 23 Aug 2019 10:18:47 +0800 +Subject: [PATCH 2/3] musl-libs + Collection of fixes needed to compile libelf and other libraries provided by elfutils for musl targets @@ -7,6 +12,21 @@ upstream given that elfutils has been closely tied to glibc Signed-off-by: Khem Raj Upstream-Status: Inappropriate [workaround for musl] +Rebase to 0.177 +Signed-off-by: Hongxu Jia +--- + lib/error.h | 27 +++++++++++++++++++++++++++ + lib/fixedsizehash.h | 1 - + lib/libeu.h | 1 + + libdwfl/dwfl_error.c | 9 +++++++++ + libdwfl/linux-kernel-modules.c | 1 + + libelf/elf.h | 9 ++++++--- + 6 files changed, 44 insertions(+), 4 deletions(-) + create mode 100644 lib/error.h + +diff --git a/lib/error.h b/lib/error.h +new file mode 100644 +index 0000000..ef06827 --- /dev/null +++ b/lib/error.h @@ -0,0 +1,27 @@ @@ -37,6 +57,8 @@ Upstream-Status: Inappropriate [workaround for musl] +} + +#endif /* _ERROR_H_ */ +diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h +index dac2a5f..43016fc 100644 --- a/lib/fixedsizehash.h +++ b/lib/fixedsizehash.h @@ -30,7 +30,6 @@ @@ -47,6 +69,8 @@ Upstream-Status: Inappropriate [workaround for musl] #include +diff --git a/lib/libeu.h b/lib/libeu.h +index ecb4d01..edc85e3 100644 --- a/lib/libeu.h +++ b/lib/libeu.h @@ -29,6 +29,7 @@ @@ -57,6 +81,8 @@ Upstream-Status: Inappropriate [workaround for musl] #include #include +diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c +index 7bcf61c..11dcc8b 100644 --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c @@ -154,7 +154,16 @@ dwfl_errmsg (int error) @@ -76,6 +102,8 @@ Upstream-Status: Inappropriate [workaround for musl] case OTHER_ERROR (LIBELF): return elf_errmsg (error & 0xffff); case OTHER_ERROR (LIBDW): +diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c +index d46ab5a..1c3faee 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -50,6 +50,7 @@ @@ -86,6 +114,8 @@ Upstream-Status: Inappropriate [workaround for musl] /* If fts.h is included before config.h, its indirect inclusions may not give us the right LFS aliases of these functions, so map them manually. */ +diff --git a/libelf/elf.h b/libelf/elf.h +index bed273d..be228e6 100644 --- a/libelf/elf.h +++ b/libelf/elf.h @@ -21,7 +21,9 @@ @@ -99,9 +129,9 @@ Upstream-Status: Inappropriate [workaround for musl] /* Standard ELF types. */ -@@ -3937,6 +3939,7 @@ enum - #define R_METAG_TLS_LE_HI16 60 - #define R_METAG_TLS_LE_LO16 61 +@@ -4029,6 +4031,7 @@ enum + #define R_NDS32_TLS_TPOFF 102 + #define R_NDS32_TLS_DESC 119 -__END_DECLS - @@ -109,3 +139,6 @@ Upstream-Status: Inappropriate [workaround for musl] +} +#endif #endif /* elf.h */ +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch b/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch index 0fb7eb923..40f2b69cf 100644 --- a/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch +++ b/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch @@ -1,9 +1,25 @@ +From 77b89dbc9f9f965ad0ef2e341d7d46bce5f07549 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 23 Aug 2019 10:17:25 +0800 +Subject: [PATCH 1/3] musl-obstack-fts + Look for libfts and libobstack during configure, these libraries are external to libc when using musl, whereas on glibc these libraries are provided in libc itself. Signed-off-by: Khem Raj Upstream-Status: Inappropriate [workaround for musl] + +Rebase to 0.177 +Signed-off-by: Hongxu Jia +--- + configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + libdw/Makefile.am | 2 +- + src/Makefile.am | 8 ++++---- + 3 files changed, 59 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f93964c..b87b762 100644 --- a/configure.ac +++ b/configure.ac @@ -494,6 +494,60 @@ else @@ -67,9 +83,11 @@ Upstream-Status: Inappropriate [workaround for musl] dnl The directories with content. dnl Documentation. +diff --git a/libdw/Makefile.am b/libdw/Makefile.am +index 7a3d532..a541fa3 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am -@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURC +@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so @@ -78,9 +96,11 @@ Upstream-Status: Inappropriate [workaround for musl] libdw_so_SOURCES = libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) # The rpath is necessary for libebl because its $ORIGIN use will +diff --git a/src/Makefile.am b/src/Makefile.am +index b72f853..2f3dfce 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -68,8 +68,8 @@ ar_no_Wstack_usage = yes +@@ -69,8 +69,8 @@ ar_no_Wstack_usage = yes unstrip_no_Wstack_usage = yes readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl @@ -91,7 +111,7 @@ Upstream-Status: Inappropriate [workaround for musl] size_LDADD = $(libelf) $(libeu) $(argp_LDADD) strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -@@ -77,9 +77,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $ +@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl @@ -103,3 +123,6 @@ Upstream-Status: Inappropriate [workaround for musl] unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch b/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch index 8e636bf66..a8ad93123 100644 --- a/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch +++ b/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch @@ -1,3 +1,8 @@ +From 7f5e2fd86d54e0a4d195ec65afb9b411829dff9f Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 23 Aug 2019 10:19:48 +0800 +Subject: [PATCH 3/3] musl-utils + Provide missing defines which otherwise are available on glibc system headers Alter the error API to match posix version @@ -5,6 +10,19 @@ use qsort instead of qsort_r which is glibc specific API Signed-off-by: Khem Raj Upstream-Status: Inappropriate [workaround for musl] + +Rebase to 0.177 +Signed-off-by: Hongxu Jia +--- + src/arlib.h | 6 ++++++ + src/elfcompress.c | 7 +++++++ + src/readelf.c | 20 ++++++++++++-------- + src/strip.c | 7 +++++++ + src/unstrip.c | 9 +++++++++ + 5 files changed, 41 insertions(+), 8 deletions(-) + +diff --git a/src/arlib.h b/src/arlib.h +index e117166..8326f6c 100644 --- a/src/arlib.h +++ b/src/arlib.h @@ -29,6 +29,12 @@ @@ -20,6 +38,8 @@ Upstream-Status: Inappropriate [workaround for musl] /* State of -D/-U flags. */ extern bool arlib_deterministic_output; +diff --git a/src/elfcompress.c b/src/elfcompress.c +index 6ba6af4..0c7674b 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -37,6 +37,13 @@ @@ -36,9 +56,11 @@ Upstream-Status: Inappropriate [workaround for musl] /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; +diff --git a/src/readelf.c b/src/readelf.c +index 5c02a9b..817562d 100644 --- a/src/readelf.c +++ b/src/readelf.c -@@ -4792,10 +4792,11 @@ listptr_base (struct listptr *p) +@@ -4813,10 +4813,11 @@ listptr_base (struct listptr *p) return cudie_base (&cu); } @@ -52,7 +74,7 @@ Upstream-Status: Inappropriate [workaround for musl] struct listptr *p1 = (void *) a; struct listptr *p2 = (void *) b; -@@ -4811,21 +4812,21 @@ compare_listptr (const void *a, const vo +@@ -4832,21 +4833,21 @@ compare_listptr (const void *a, const void *b, void *arg) p1->warned = p2->warned = true; error (0, 0, gettext ("%s %#" PRIx64 " used with different address sizes"), @@ -77,7 +99,7 @@ Upstream-Status: Inappropriate [workaround for musl] } if (p1->attr != p2 ->attr) { -@@ -4833,7 +4834,7 @@ compare_listptr (const void *a, const vo +@@ -4854,7 +4855,7 @@ compare_listptr (const void *a, const void *b, void *arg) error (0, 0, gettext ("%s %#" PRIx64 " used with different attribute %s and %s"), @@ -86,7 +108,7 @@ Upstream-Status: Inappropriate [workaround for musl] dwarf_attr_name (p2->attr)); } } -@@ -4905,8 +4906,11 @@ static void +@@ -4926,8 +4927,11 @@ static void sort_listptr (struct listptr_table *table, const char *name) { if (table->n > 0) @@ -100,6 +122,8 @@ Upstream-Status: Inappropriate [workaround for musl] } static bool +diff --git a/src/strip.c b/src/strip.c +index 4054c2a..d2d2176 100644 --- a/src/strip.c +++ b/src/strip.c @@ -46,6 +46,13 @@ @@ -116,6 +140,8 @@ Upstream-Status: Inappropriate [workaround for musl] typedef uint8_t GElf_Byte; /* Name and version of program. */ +diff --git a/src/unstrip.c b/src/unstrip.c +index fc87832..21ea6b3 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -56,6 +56,15 @@ @@ -134,3 +160,6 @@ Upstream-Status: Inappropriate [workaround for musl] /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.2.inc b/poky/meta/recipes-devtools/gcc/gcc-9.2.inc index 01d3bf0f3..c6395998d 100644 --- a/poky/meta/recipes-devtools/gcc/gcc-9.2.inc +++ b/poky/meta/recipes-devtools/gcc/gcc-9.2.inc @@ -65,6 +65,9 @@ SRC_URI = "\ file://0035-Fix-for-testsuite-failure.patch \ file://0036-Re-introduce-spe-commandline-options.patch \ file://CVE-2019-14250.patch \ + file://CVE-2019-15847_1.patch \ + file://CVE-2019-15847_2.patch \ + file://CVE-2019-15847_3.patch \ " S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" SRC_URI[md5sum] = "3818ad8600447f05349098232c2ddc78" diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch new file mode 100644 index 000000000..227fd47c9 --- /dev/null +++ b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_1.patch @@ -0,0 +1,521 @@ +From 8c61566116d23063ff597271884f8e00d94ab1a1 Mon Sep 17 00:00:00 2001 +From: segher +Date: Fri, 30 Aug 2019 13:48:48 +0000 +Subject: [PATCH] Backport from trunk 2019-08-22 Segher Boessenkool + + + * config/rs6000/altivec.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32, + UNSPEC_DARN_RAW, UNSPEC_CMPRB, UNSPEC_CMPRB2, UNSPEC_CMPEQB; move to... + * config/rs6000/rs6000.md (unspec): ... here. + * config/rs6000/altivec.md (darn_32, darn_raw, darn, cmprb, + *cmprb_internal, setb_signed, setb_unsigned, cmprb2, *cmprb2_internal, + cmpeqb, *cmpeqb_internal): Delete, move to... + * config/rs6000/rs6000.md (darn_32, darn_raw, darn, cmprb, + *cmprb_internal, setb_signed, setb_unsigned, cmprb2, *cmprb2_internal, + cmpeqb, *cmpeqb_internal): ... here. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275170 138bc75d-0d04-0410-961f-82ee72b054a4 + +Upstream-Status: Backport +CVE: CVE-2019-15847 p1 +Affects <= 9.2.0 +Dropped Changelog changes +Signed-off-by: Armin Kuster + +--- + gcc/config/rs6000/altivec.md | 223 ---------------------------------- + gcc/config/rs6000/rs6000.md | 224 +++++++++++++++++++++++++++++++++++ + 3 files changed, 239 insertions(+), 223 deletions(-) + +Index: gcc-9.2.0/gcc/config/rs6000/altivec.md +=================================================================== +--- gcc-9.2.0.orig/gcc/config/rs6000/altivec.md ++++ gcc-9.2.0/gcc/config/rs6000/altivec.md +@@ -80,9 +80,6 @@ + UNSPEC_VUPKHPX + UNSPEC_VUPKLPX + UNSPEC_CONVERT_4F32_8I16 +- UNSPEC_DARN +- UNSPEC_DARN_32 +- UNSPEC_DARN_RAW + UNSPEC_DST + UNSPEC_DSTT + UNSPEC_DSTST +@@ -161,9 +158,6 @@ + UNSPEC_BCDADD + UNSPEC_BCDSUB + UNSPEC_BCD_OVERFLOW +- UNSPEC_CMPRB +- UNSPEC_CMPRB2 +- UNSPEC_CMPEQB + UNSPEC_VRLMI + UNSPEC_VRLNM + ]) +@@ -4101,223 +4095,6 @@ + "bcd. %0,%1,%2,%3" + [(set_attr "type" "vecsimple")]) + +-(define_insn "darn_32" +- [(set (match_operand:SI 0 "register_operand" "=r") +- (unspec:SI [(const_int 0)] UNSPEC_DARN_32))] +- "TARGET_P9_MISC" +- "darn %0,0" +- [(set_attr "type" "integer")]) +- +-(define_insn "darn_raw" +- [(set (match_operand:DI 0 "register_operand" "=r") +- (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))] +- "TARGET_P9_MISC && TARGET_64BIT" +- "darn %0,2" +- [(set_attr "type" "integer")]) +- +-(define_insn "darn" +- [(set (match_operand:DI 0 "register_operand" "=r") +- (unspec:DI [(const_int 0)] UNSPEC_DARN))] +- "TARGET_P9_MISC && TARGET_64BIT" +- "darn %0,1" +- [(set_attr "type" "integer")]) +- +-;; Test byte within range. +-;; +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the range specified by operand 2. +-;; The bytes of operand 2 are organized as xx:xx:hi:lo. +-;; +-;; Return in target register operand 0 a value of 1 if lo <= vv and +-;; vv <= hi. Otherwise, set register operand 0 to 0. +-;; +-;; Though the instructions to which this expansion maps operate on +-;; 64-bit registers, the current implementation only operates on +-;; SI-mode operands as the high-order bits provide no information +-;; that is not already available in the low-order bits. To avoid the +-;; costs of data widening operations, future enhancements might allow +-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. +-(define_expand "cmprb" +- [(set (match_dup 3) +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:SI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPRB)) +- (set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (if_then_else:SI (lt (match_dup 3) +- (const_int 0)) +- (const_int -1) +- (if_then_else (gt (match_dup 3) +- (const_int 0)) +- (const_int 1) +- (const_int 0))))] +- "TARGET_P9_MISC" +-{ +- operands[3] = gen_reg_rtx (CCmode); +-}) +- +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the range specified by operand 2. +-;; The bytes of operand 2 are organized as xx:xx:hi:lo. +-;; +-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if +-;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other +-;; 3 bits of the target CR register are all set to 0. +-(define_insn "*cmprb_internal" +- [(set (match_operand:CC 0 "cc_reg_operand" "=y") +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:SI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPRB))] +- "TARGET_P9_MISC" +- "cmprb %0,0,%1,%2" +- [(set_attr "type" "logical")]) +- +-;; Set operand 0 register to -1 if the LT bit (0x8) of condition +-;; register operand 1 is on. Otherwise, set operand 0 register to 1 +-;; if the GT bit (0x4) of condition register operand 1 is on. +-;; Otherwise, set operand 0 to 0. Note that the result stored into +-;; register operand 0 is non-zero iff either the LT or GT bits are on +-;; within condition register operand 1. +-(define_insn "setb_signed" +- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y") +- (const_int 0)) +- (const_int -1) +- (if_then_else (gt (match_dup 1) +- (const_int 0)) +- (const_int 1) +- (const_int 0))))] +- "TARGET_P9_MISC" +- "setb %0,%1" +- [(set_attr "type" "logical")]) +- +-(define_insn "setb_unsigned" +- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y") +- (const_int 0)) +- (const_int -1) +- (if_then_else (gtu (match_dup 1) +- (const_int 0)) +- (const_int 1) +- (const_int 0))))] +- "TARGET_P9_MISC" +- "setb %0,%1" +- [(set_attr "type" "logical")]) +- +-;; Test byte within two ranges. +-;; +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the range specified by operand 2. +-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2. +-;; +-;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and +-;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register +-;; operand 0 to 0. +-;; +-;; Though the instructions to which this expansion maps operate on +-;; 64-bit registers, the current implementation only operates on +-;; SI-mode operands as the high-order bits provide no information +-;; that is not already available in the low-order bits. To avoid the +-;; costs of data widening operations, future enhancements might allow +-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. +-(define_expand "cmprb2" +- [(set (match_dup 3) +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:SI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPRB2)) +- (set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (if_then_else:SI (lt (match_dup 3) +- (const_int 0)) +- (const_int -1) +- (if_then_else (gt (match_dup 3) +- (const_int 0)) +- (const_int 1) +- (const_int 0))))] +- "TARGET_P9_MISC" +-{ +- operands[3] = gen_reg_rtx (CCmode); +-}) +- +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the ranges specified by operand 2. +-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2. +-;; +-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if +-;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). +-;; Otherwise, set the GT bit to 0. The other 3 bits of the target +-;; CR register are all set to 0. +-(define_insn "*cmprb2_internal" +- [(set (match_operand:CC 0 "cc_reg_operand" "=y") +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:SI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPRB2))] +- "TARGET_P9_MISC" +- "cmprb %0,1,%1,%2" +- [(set_attr "type" "logical")]) +- +-;; Test byte membership within set of 8 bytes. +-;; +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the set specified by operand 2. +-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7. +-;; +-;; Return in target register operand 0 a value of 1 if vv equals one +-;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set +-;; register operand 0 to 0. Note that the 8 byte values held within +-;; operand 2 need not be unique. +-;; +-;; Though the instructions to which this expansion maps operate on +-;; 64-bit registers, the current implementation requires that operands +-;; 0 and 1 have mode SI as the high-order bits provide no information +-;; that is not already available in the low-order bits. To avoid the +-;; costs of data widening operations, future enhancements might allow +-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. +-(define_expand "cmpeqb" +- [(set (match_dup 3) +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:DI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPEQB)) +- (set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (if_then_else:SI (lt (match_dup 3) +- (const_int 0)) +- (const_int -1) +- (if_then_else (gt (match_dup 3) +- (const_int 0)) +- (const_int 1) +- (const_int 0))))] +- "TARGET_P9_MISC && TARGET_64BIT" +-{ +- operands[3] = gen_reg_rtx (CCmode); +-}) +- +-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx +-;; represents a byte whose value is ignored in this context and +-;; vv, the least significant byte, holds the byte value that is to +-;; be tested for membership within the set specified by operand 2. +-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7. +-;; +-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv +-;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, +-;; set the GT bit to zero. The other 3 bits of the target CR register +-;; are all set to 0. +-(define_insn "*cmpeqb_internal" +- [(set (match_operand:CC 0 "cc_reg_operand" "=y") +- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") +- (match_operand:DI 2 "gpc_reg_operand" "r")] +- UNSPEC_CMPEQB))] +- "TARGET_P9_MISC && TARGET_64BIT" +- "cmpeqb %0,%1,%2" +- [(set_attr "type" "logical")]) +- + (define_expand "bcd_" + [(parallel [(set (reg:CCFP CR6_REGNO) + (compare:CCFP +Index: gcc-9.2.0/gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc-9.2.0.orig/gcc/config/rs6000/rs6000.md ++++ gcc-9.2.0/gcc/config/rs6000/rs6000.md +@@ -137,6 +137,12 @@ + UNSPEC_LSQ + UNSPEC_FUSION_GPR + UNSPEC_STACK_CHECK ++ UNSPEC_DARN ++ UNSPEC_DARN_32 ++ UNSPEC_DARN_RAW ++ UNSPEC_CMPRB ++ UNSPEC_CMPRB2 ++ UNSPEC_CMPEQB + UNSPEC_ADD_ROUND_TO_ODD + UNSPEC_SUB_ROUND_TO_ODD + UNSPEC_MUL_ROUND_TO_ODD +@@ -14322,7 +14328,225 @@ + "xscmpuqp %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "size" "128")]) ++ ++;; Miscellaneous ISA 3.0 (power9) instructions ++ ++(define_insn "darn_32" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(const_int 0)] UNSPEC_DARN_32))] ++ "TARGET_P9_MISC" ++ "darn %0,0" ++ [(set_attr "type" "integer")]) ++ ++(define_insn "darn_raw" ++ [(set (match_operand:DI 0 "register_operand" "=r") ++ (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))] ++ "TARGET_P9_MISC && TARGET_64BIT" ++ "darn %0,2" ++ [(set_attr "type" "integer")]) ++ ++(define_insn "darn" ++ [(set (match_operand:DI 0 "register_operand" "=r") ++ (unspec:DI [(const_int 0)] UNSPEC_DARN))] ++ "TARGET_P9_MISC && TARGET_64BIT" ++ "darn %0,1" ++ [(set_attr "type" "integer")]) ++ ++;; Test byte within range. ++;; ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the range specified by operand 2. ++;; The bytes of operand 2 are organized as xx:xx:hi:lo. ++;; ++;; Return in target register operand 0 a value of 1 if lo <= vv and ++;; vv <= hi. Otherwise, set register operand 0 to 0. ++;; ++;; Though the instructions to which this expansion maps operate on ++;; 64-bit registers, the current implementation only operates on ++;; SI-mode operands as the high-order bits provide no information ++;; that is not already available in the low-order bits. To avoid the ++;; costs of data widening operations, future enhancements might allow ++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. ++(define_expand "cmprb" ++ [(set (match_dup 3) ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:SI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPRB)) ++ (set (match_operand:SI 0 "gpc_reg_operand" "=r") ++ (if_then_else:SI (lt (match_dup 3) ++ (const_int 0)) ++ (const_int -1) ++ (if_then_else (gt (match_dup 3) ++ (const_int 0)) ++ (const_int 1) ++ (const_int 0))))] ++ "TARGET_P9_MISC" ++{ ++ operands[3] = gen_reg_rtx (CCmode); ++}) ++ ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the range specified by operand 2. ++;; The bytes of operand 2 are organized as xx:xx:hi:lo. ++;; ++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if ++;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other ++;; 3 bits of the target CR register are all set to 0. ++(define_insn "*cmprb_internal" ++ [(set (match_operand:CC 0 "cc_reg_operand" "=y") ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:SI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPRB))] ++ "TARGET_P9_MISC" ++ "cmprb %0,0,%1,%2" ++ [(set_attr "type" "logical")]) ++ ++;; Set operand 0 register to -1 if the LT bit (0x8) of condition ++;; register operand 1 is on. Otherwise, set operand 0 register to 1 ++;; if the GT bit (0x4) of condition register operand 1 is on. ++;; Otherwise, set operand 0 to 0. Note that the result stored into ++;; register operand 0 is non-zero iff either the LT or GT bits are on ++;; within condition register operand 1. ++(define_insn "setb_signed" ++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ++ (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y") ++ (const_int 0)) ++ (const_int -1) ++ (if_then_else (gt (match_dup 1) ++ (const_int 0)) ++ (const_int 1) ++ (const_int 0))))] ++ "TARGET_P9_MISC" ++ "setb %0,%1" ++ [(set_attr "type" "logical")]) + ++(define_insn "setb_unsigned" ++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ++ (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y") ++ (const_int 0)) ++ (const_int -1) ++ (if_then_else (gtu (match_dup 1) ++ (const_int 0)) ++ (const_int 1) ++ (const_int 0))))] ++ "TARGET_P9_MISC" ++ "setb %0,%1" ++ [(set_attr "type" "logical")]) ++ ++;; Test byte within two ranges. ++;; ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the range specified by operand 2. ++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2. ++;; ++;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and ++;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register ++;; operand 0 to 0. ++;; ++;; Though the instructions to which this expansion maps operate on ++;; 64-bit registers, the current implementation only operates on ++;; SI-mode operands as the high-order bits provide no information ++;; that is not already available in the low-order bits. To avoid the ++;; costs of data widening operations, future enhancements might allow ++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. ++(define_expand "cmprb2" ++ [(set (match_dup 3) ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:SI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPRB2)) ++ (set (match_operand:SI 0 "gpc_reg_operand" "=r") ++ (if_then_else:SI (lt (match_dup 3) ++ (const_int 0)) ++ (const_int -1) ++ (if_then_else (gt (match_dup 3) ++ (const_int 0)) ++ (const_int 1) ++ (const_int 0))))] ++ "TARGET_P9_MISC" ++{ ++ operands[3] = gen_reg_rtx (CCmode); ++}) ++ ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the ranges specified by operand 2. ++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2. ++;; ++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if ++;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). ++;; Otherwise, set the GT bit to 0. The other 3 bits of the target ++;; CR register are all set to 0. ++(define_insn "*cmprb2_internal" ++ [(set (match_operand:CC 0 "cc_reg_operand" "=y") ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:SI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPRB2))] ++ "TARGET_P9_MISC" ++ "cmprb %0,1,%1,%2" ++ [(set_attr "type" "logical")]) ++ ++;; Test byte membership within set of 8 bytes. ++;; ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the set specified by operand 2. ++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7. ++;; ++;; Return in target register operand 0 a value of 1 if vv equals one ++;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set ++;; register operand 0 to 0. Note that the 8 byte values held within ++;; operand 2 need not be unique. ++;; ++;; Though the instructions to which this expansion maps operate on ++;; 64-bit registers, the current implementation requires that operands ++;; 0 and 1 have mode SI as the high-order bits provide no information ++;; that is not already available in the low-order bits. To avoid the ++;; costs of data widening operations, future enhancements might allow ++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode. ++(define_expand "cmpeqb" ++ [(set (match_dup 3) ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:DI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPEQB)) ++ (set (match_operand:SI 0 "gpc_reg_operand" "=r") ++ (if_then_else:SI (lt (match_dup 3) ++ (const_int 0)) ++ (const_int -1) ++ (if_then_else (gt (match_dup 3) ++ (const_int 0)) ++ (const_int 1) ++ (const_int 0))))] ++ "TARGET_P9_MISC && TARGET_64BIT" ++{ ++ operands[3] = gen_reg_rtx (CCmode); ++}) ++ ++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx ++;; represents a byte whose value is ignored in this context and ++;; vv, the least significant byte, holds the byte value that is to ++;; be tested for membership within the set specified by operand 2. ++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7. ++;; ++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv ++;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, ++;; set the GT bit to zero. The other 3 bits of the target CR register ++;; are all set to 0. ++(define_insn "*cmpeqb_internal" ++ [(set (match_operand:CC 0 "cc_reg_operand" "=y") ++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ++ (match_operand:DI 2 "gpc_reg_operand" "r")] ++ UNSPEC_CMPEQB))] ++ "TARGET_P9_MISC && TARGET_64BIT" ++ "cmpeqb %0,%1,%2" ++ [(set_attr "type" "logical")]) + + + (include "sync.md") diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch new file mode 100644 index 000000000..de7a83c23 --- /dev/null +++ b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_2.patch @@ -0,0 +1,77 @@ +From 87bc784a7ca3a43182f7272241597a50d7491342 Mon Sep 17 00:00:00 2001 +From: segher +Date: Fri, 30 Aug 2019 13:51:26 +0000 +Subject: [PATCH] Backport from trunk 2019-08-22 Segher Boessenkool + + + PR target/91481 + * config/rs6000/rs6000.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32, + and UNSPEC_DARN_RAW. + (unspecv): New enumerator values UNSPECV_DARN, UNSPECV_DARN_32, and + UNSPECV_DARN_RAW. + (darn_32): Use an unspec_volatile, and UNSPECV_DARN_32. + (darn_raw): Use an unspec_volatile, and UNSPECV_DARN_RAW. + (darn): Use an unspec_volatile, and UNSPECV_DARN. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275175 138bc75d-0d04-0410-961f-82ee72b054a4 + +Upstream-Status: Backport +CVE: CVE-2019-15847 p2 +Affects <= 9.2.0 +Dropped Changelog changes +Signed-off-by: Armin Kuster + +--- + gcc/config/rs6000/rs6000.md | 12 ++++++------ + 2 files changed, 20 insertions(+), 6 deletions(-) + +Index: gcc-9.2.0/gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc-9.2.0.orig/gcc/config/rs6000/rs6000.md ++++ gcc-9.2.0/gcc/config/rs6000/rs6000.md +@@ -137,9 +137,6 @@ + UNSPEC_LSQ + UNSPEC_FUSION_GPR + UNSPEC_STACK_CHECK +- UNSPEC_DARN +- UNSPEC_DARN_32 +- UNSPEC_DARN_RAW + UNSPEC_CMPRB + UNSPEC_CMPRB2 + UNSPEC_CMPEQB +@@ -170,6 +167,9 @@ + UNSPECV_EH_RR ; eh_reg_restore + UNSPECV_ISYNC ; isync instruction + UNSPECV_MFTB ; move from time base ++ UNSPECV_DARN ; darn 1 (deliver a random number) ++ UNSPECV_DARN_32 ; darn 2 ++ UNSPECV_DARN_RAW ; darn 0 + UNSPECV_NLGR ; non-local goto receiver + UNSPECV_MFFS ; Move from FPSCR + UNSPECV_MFFSL ; Move from FPSCR light instruction version +@@ -14333,21 +14333,21 @@ + + (define_insn "darn_32" + [(set (match_operand:SI 0 "register_operand" "=r") +- (unspec:SI [(const_int 0)] UNSPEC_DARN_32))] ++ (unspec_volatile:SI [(const_int 0)] UNSPECV_DARN_32))] + "TARGET_P9_MISC" + "darn %0,0" + [(set_attr "type" "integer")]) + + (define_insn "darn_raw" + [(set (match_operand:DI 0 "register_operand" "=r") +- (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))] ++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN_RAW))] + "TARGET_P9_MISC && TARGET_64BIT" + "darn %0,2" + [(set_attr "type" "integer")]) + + (define_insn "darn" + [(set (match_operand:DI 0 "register_operand" "=r") +- (unspec:DI [(const_int 0)] UNSPEC_DARN))] ++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN))] + "TARGET_P9_MISC && TARGET_64BIT" + "darn %0,1" + [(set_attr "type" "integer")]) diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch new file mode 100644 index 000000000..ba7130ca7 --- /dev/null +++ b/poky/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-15847_3.patch @@ -0,0 +1,62 @@ +From dc4c8dd9dbe70740ec7a684b0f35620249fb036a Mon Sep 17 00:00:00 2001 +From: segher +Date: Fri, 30 Aug 2019 13:53:11 +0000 +Subject: [PATCH] Backport from trunk 2019-08-23 Segher Boessenkool + + +gcc/testsuite/ + PR target/91481 + * gcc.target/powerpc/darn-3.c: New testcase. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@275176 138bc75d-0d04-0410-961f-82ee72b054a4 + +Upstream-Status: Backport +CVE: CVE-2019-15847 p3 +Affects <= 9.2.0 +Dropped Changelog changes +Signed-off-by: Armin Kuster + +--- + gcc/testsuite/ChangeLog | 6 ++++++ + gcc/testsuite/gcc.target/powerpc/darn-3.c | 16 ++++++++++++++++ + 2 files changed, 22 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/powerpc/darn-3.c + +Index: gcc-9.2.0/gcc/testsuite/gcc.target/powerpc/darn-3.c +=================================================================== +--- /dev/null ++++ gcc-9.2.0/gcc/testsuite/gcc.target/powerpc/darn-3.c +@@ -0,0 +1,16 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-aix* } } */ ++/* { dg-options "-O2 -mdejagnu-cpu=power9" } */ ++ ++static int darn32(void) { return __builtin_darn_32(); } ++ ++int four(void) ++{ ++ int sum = 0; ++ int i; ++ for (i = 0; i < 4; i++) ++ sum += darn32(); ++ return sum; ++} ++ ++/* { dg-final { scan-assembler-times {(?n)\mdarn .*,0\M} 4 } } */ +Index: gcc-9.2.0/gcc/testsuite/ChangeLog +=================================================================== +--- gcc-9.2.0.orig/gcc/testsuite/ChangeLog ++++ gcc-9.2.0/gcc/testsuite/ChangeLog +@@ -1,3 +1,11 @@ ++2019-08-30 Segher Boessenkool ++ ++ Backport from trunk ++ 2019-08-23 Segher Boessenkool ++ ++ PR target/91481 ++ * gcc.target/powerpc/darn-3.c: New testcase. ++ + 2019-08-12 Release Manager + + * GCC 9.2.0 released. diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross.inc b/poky/meta/recipes-devtools/gcc/gcc-cross.inc index 95af6d89a..8855bb1f3 100644 --- a/poky/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/poky/meta/recipes-devtools/gcc/gcc-cross.inc @@ -206,9 +206,17 @@ do_package_write_ipk[noexec] = "1" do_package_write_rpm[noexec] = "1" do_package_write_deb[noexec] = "1" -BUILDDIRSTASH = "${WORKDIR}/stashed-builddir" +inherit chrpath + +python gcc_stash_builddir_fixrpaths() { + # rewrite rpaths, breaking hardlinks as required + process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True) +} + +BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build" do_gcc_stash_builddir[dirs] = "${B}" do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}" +do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths" do_gcc_stash_builddir () { dest=${BUILDDIRSTASH} hardlinkdir . $dest diff --git a/poky/meta/recipes-devtools/gdb/gdb.inc b/poky/meta/recipes-devtools/gdb/gdb.inc index 0f10b4173..249e24dc5 100644 --- a/poky/meta/recipes-devtools/gdb/gdb.inc +++ b/poky/meta/recipes-devtools/gdb/gdb.inc @@ -10,4 +10,5 @@ PACKAGES =+ "gdbserver" FILES_gdbserver = "${bindir}/gdbserver" ALLOW_EMPTY_gdbserver_riscv64 = "1" +ALLOW_EMPTY_gdbserver_riscv32 = "1" diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch new file mode 100644 index 000000000..a181169d4 --- /dev/null +++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch @@ -0,0 +1,44 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 59da5577bf8df441c6ca958e50fcb83228702764 Mon Sep 17 00:00:00 2001 +From: Alejandro del Castillo +Date: Thu, 12 Sep 2019 10:24:58 -0500 +Subject: [PATCH] opkg-build: clamp mtimes to SOURCE_DATE_EPOCH + +For reproducible builds, clamp mtimes bigger than SOURCE_DATE_EPOCH to +SOURCE_DATE_EPOCH (build generated files, usually). + +Fixes bugzilla 13450 + +Signed-off-by: Alejandro del Castillo +Signed-off-by: Ross Burton +--- + opkg-build | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/opkg-build b/opkg-build +index dcd2d68..2517a2b 100755 +--- a/opkg-build ++++ b/opkg-build +@@ -297,9 +297,16 @@ mkdir $tmp_dir + + build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}" + ++mtime_args="" ++# --clamp-mtime requires tar > 1.28. Only use it if SOURCE_DATE_EPOCH is set, to avoid having a generic case dependency on tar > 1.28. ++# this setting will make sure files generated at build time have consistent mtimes, for reproducible builds. ++if [ ! -z "$SOURCE_DATE_EPOCH" ]; then ++ mtime_args="--mtime=@$build_date --clamp-mtime" ++fi ++ + ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list ) + ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list ) +-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) ++( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) + ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz ) + rm $tmp_dir/file_list + rm $tmp_dir/control_list +-- +2.20.1 + 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 4be7b16d8..cf1e4670c 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 @@ -9,6 +9,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 \ " UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h index 8e2b5d094..debb39009 100644 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h +++ b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h @@ -12,6 +12,7 @@ #define NPY_SIZEOF_PY_INTPTR_T 8 #define NPY_SIZEOF_PY_LONG_LONG 8 #define NPY_SIZEOF_LONGLONG 8 +#define NPY_SIZEOF_OFF_T 8 #define NPY_NO_SMP 0 #define NPY_HAVE_DECL_ISNAN #define NPY_HAVE_DECL_ISINF diff --git a/poky/meta/recipes-devtools/python/python3-dbus_1.2.10.bb b/poky/meta/recipes-devtools/python/python3-dbus_1.2.10.bb deleted file mode 100644 index 8892d0fb4..000000000 --- a/poky/meta/recipes-devtools/python/python3-dbus_1.2.10.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Python bindings for the DBus inter-process communication system" -SECTION = "devel/python" -HOMEPAGE = "http://www.freedesktop.org/Software/dbus" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4" -DEPENDS = "expat dbus glib-2.0 virtual/libintl" - -SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \ -" - -SRC_URI[md5sum] = "5d21d5ae6423f0e41caa3400af44edac" -SRC_URI[sha256sum] = "d4332bbd4a0054fa4010b259c293b84d461bbd9d7a8ef528157d151c0398d886" -S = "${WORKDIR}/dbus-python-${PV}" - -inherit distutils3-base autotools pkgconfig - -# documentation needs python3-sphinx, which is not in oe-core or meta-python for now -# change to use PACKAGECONFIG when python3-sphinx is added to oe-core -EXTRA_OECONF += "--disable-documentation" - - -RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml" - -FILES_${PN}-dev += "${libdir}/pkgconfig" - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb b/poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb new file mode 100644 index 000000000..d005dc4a9 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb @@ -0,0 +1,26 @@ +SUMMARY = "Python bindings for the DBus inter-process communication system" +SECTION = "devel/python" +HOMEPAGE = "http://www.freedesktop.org/Software/dbus" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4" +DEPENDS = "expat dbus glib-2.0 virtual/libintl" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz" + +SRC_URI[md5sum] = "428b7a9e7e2d154a7ceb3e13536283e4" +SRC_URI[sha256sum] = "cdd4de2c4f5e58f287b12013ed7b41dee81d503c8d0d2397c5bd2fb01badf260" + +S = "${WORKDIR}/dbus-python-${PV}" + +inherit distutils3-base autotools pkgconfig + +# documentation needs python3-sphinx, which is not in oe-core or meta-python for now +# change to use PACKAGECONFIG when python3-sphinx is added to oe-core +EXTRA_OECONF += "--disable-documentation" + + +RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml" + +FILES_${PN}-dev += "${libdir}/pkgconfig" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb deleted file mode 100644 index 476957e88..000000000 --- a/poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Python GObject bindings" -SECTION = "devel/python" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" - -GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even - -DEPENDS += "python3 glib-2.0" - -SRCNAME="pygobject" - -SRC_URI = " \ - http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ - file://0001-Do-not-build-tests.patch \ -" -SRC_URI[md5sum] = "92ffa25351782feb96362f0dace2089f" -SRC_URI[sha256sum] = "c39ca2a28364b57fa00549c6e836346031e6b886c3ceabfd8ab4b4fed0a83611" - -UNKNOWN_CONFIGURE_WHITELIST = "introspection" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}" - -RDEPENDS_${PN} += "python3-pkgutil" - -# python3-pycairo is checked on configuration -> DEPENDS -# we don't link against python3-pycairo -> RDEPENDS -PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo" - -BBCLASSEXTEND = "native" -PACKAGECONFIG_class-native = "" diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb new file mode 100644 index 000000000..6babf0cae --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Python GObject bindings" +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" + +GNOMEBASEBUILDCLASS = "meson" +inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even + +DEPENDS += "python3 glib-2.0" + +SRCNAME="pygobject" + +SRC_URI = " \ + http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ + file://0001-Do-not-build-tests.patch \ +" +SRC_URI[md5sum] = "ca1dc4f31c1d6d283758e8f315a88ab6" +SRC_URI[sha256sum] = "87e2c9aa785f352ef111dcc5f63df9b85cf6e05e52ff04f803ffbebdacf5271a" + +UNKNOWN_CONFIGURE_WHITELIST = "introspection" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}" + +RDEPENDS_${PN} += "python3-pkgutil" + +# python3-pycairo is checked on configuration -> DEPENDS +# we don't link against python3-pycairo -> RDEPENDS +PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo" + +BBCLASSEXTEND = "native" +PACKAGECONFIG_class-native = "" diff --git a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch index 35213171b..0bafec73c 100644 --- a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch @@ -1,4 +1,4 @@ -From 12900d498bb77bcc990868a80eaf0ab257b88fff Mon Sep 17 00:00:00 2001 +From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 May 2013 15:00:26 -0700 Subject: [PATCH] python3: Add target and native recipes @@ -14,36 +14,40 @@ Upstream-Status: Inappropriate [embedded specific] # Signed-off-by: Alejandro Hernandez --- - Lib/distutils/sysconfig.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + Lib/distutils/sysconfig.py | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 6b8c129..3ca7f79 100644 +index 3dfd0a3..6c6b09a 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None): +@@ -97,7 +97,9 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: -+ if prefix is None and os.environ['STAGING_INCDIR'] != "": ++ if prefix is None and os.environ.get('STAGING_INCDIR', ""): + prefix = os.environ['STAGING_INCDIR'].rstrip('include') + elif prefix is None: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os.name == "posix": if python_build: -@@ -122,6 +124,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -140,7 +142,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ -+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] -+ if prefix is None and os.environ['STAGING_LIBDIR'] != "": +- if prefix is None: ++ if os.environ.get('STAGING_LIBDIR', ""): ++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] ++ else: ++ lib_basename = "lib" ++ if prefix is None and os.environ.get('STAGING_LIBDIR', ""): + prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) -+ - if prefix is None: ++ elif prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -@@ -130,7 +136,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + else: +@@ -148,7 +156,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if os.name == "posix": libpython = os.path.join(prefix, diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc index 241f9dbec..de21d3073 100644 --- a/poky/meta/recipes-devtools/qemu/qemu.inc +++ b/poky/meta/recipes-devtools/qemu/qemu.inc @@ -23,6 +23,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ file://0009-Fix-webkitgtk-builds.patch \ file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ + file://CVE-2019-15890.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch new file mode 100644 index 000000000..1d89431be --- /dev/null +++ b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-15890.patch @@ -0,0 +1,48 @@ +From 4fc0d23e8f6d795c679623d2ed2cbe6a7a17b9c7 Mon Sep 17 00:00:00 2001 +From: Li Zhou +Date: Tue, 10 Sep 2019 20:02:15 -0700 +Subject: [PATCH] ip_reass: Fix use after free + +Using ip_deq after m_free might read pointers from an allocation reuse. + +This would be difficult to exploit, but that is still related with +CVE-2019-14378 which generates fragmented IP packets that would trigger this +issue and at least produce a DoS. + +Signed-off-by: Samuel Thibault + +Upstream-Status: Backport +CVE: CVE-2019-15890 +Signed-off-by: Li Zhou +--- + slirp/src/ip_input.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c +index 8c75d914..c07d7d40 100644 +--- a/slirp/src/ip_input.c ++++ b/slirp/src/ip_input.c +@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp) + */ + while (q != (struct ipasfrag *)&fp->frag_link && + ip->ip_off + ip->ip_len > q->ipf_off) { ++ struct ipasfrag *prev; + i = (ip->ip_off + ip->ip_len) - q->ipf_off; + if (i < q->ipf_len) { + q->ipf_len -= i; +@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp) + m_adj(dtom(slirp, q), i); + break; + } ++ prev = q; + q = q->ipf_next; +- m_free(dtom(slirp, q->ipf_prev)); +- ip_deq(q->ipf_prev); ++ ip_deq(prev); ++ m_free(dtom(slirp, prev)); + } + + insert: +-- +2.23.0 + diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb index ab2ff01b6..51e4a5939 100644 --- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb @@ -10,7 +10,6 @@ SRCREV = "f95864afe8833fe3ad782d714b41378e860977b1" SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \ file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \ " -UPSTREAM_CHECK_COMMITS = "1" SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759" SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e" diff --git a/poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch deleted file mode 100644 index fb5f72529..000000000 --- a/poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch +++ /dev/null @@ -1,31 +0,0 @@ -From af1fdce78bff4343f3c84ea118abdc3c739fc646 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 30 Apr 2016 16:23:56 +0000 -Subject: [PATCH] Fix build when using non-glibc libc implementation on ppc - -glibc includes the kernel header into its own header for macros -musl does not - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- - ptrace.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - ---- a/ptrace.h -+++ b/ptrace.h -@@ -30,7 +30,13 @@ - # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - # endif - -+#if defined(POWERPC) && !defined(__GLIBC__) -+#define pt_regs uapi_pt_regs -+#endif - # include -+#if defined(POWERPC) && !defined(__GLIBC__) -+# undef pt_regs -+#endif - - # ifdef HAVE_STRUCT_IA64_FPREG - # undef ia64_fpreg diff --git a/poky/meta/recipes-devtools/strace/strace/run-ptest b/poky/meta/recipes-devtools/strace/strace/run-ptest index 8070d8317..2fed984e9 100755 --- a/poky/meta/recipes-devtools/strace/strace/run-ptest +++ b/poky/meta/recipes-devtools/strace/strace/run-ptest @@ -1,2 +1,3 @@ #!/bin/sh +export TIMEOUT_DURATION=30 make -B -C tests -k test-suite.log diff --git a/poky/meta/recipes-devtools/strace/strace_5.2.bb b/poky/meta/recipes-devtools/strace/strace_5.2.bb index 8367bf1a4..a16c3b859 100644 --- a/poky/meta/recipes-devtools/strace/strace_5.2.bb +++ b/poky/meta/recipes-devtools/strace/strace_5.2.bb @@ -10,7 +10,6 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ file://update-gawk-paths.patch \ file://Makefile-ptest.patch \ file://run-ptest \ - file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \ file://mips-SIGEMT.patch \ file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch new file mode 100644 index 000000000..4bc4bb086 --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch @@ -0,0 +1,40 @@ +From bf63e35c3036e6040c8cfecabc7160b1f36b0591 Mon Sep 17 00:00:00 2001 +From: Randy MacLeod +Date: Wed, 28 Aug 2019 12:31:15 -0400 +Subject: [PATCH] adjust path filter for 2 memcheck tests + +Test executables produced when cross-compiling can contain +relative paths such as: + coregrind/tests/../../../valgrind-3.15.0/coregrind/ +Use the --fullpath-after option to match and therefore +suppress more of the prefix to enable test to pass. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Randy MacLeod +--- + memcheck/tests/badfree3.vgtest | 2 +- + memcheck/tests/varinfo5.vgtest | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/badfree3.vgtest b/memcheck/tests/badfree3.vgtest +index 3dfc5fd8a..57eec21f3 100644 +--- a/memcheck/tests/badfree3.vgtest ++++ b/memcheck/tests/badfree3.vgtest +@@ -1,3 +1,3 @@ + prog: badfree +-vgopts: -q --fullpath-after=memcheck/ --fullpath-after=coregrind/ ++vgopts: -q --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/ + stderr_filter_args: badfree.c +diff --git a/memcheck/tests/varinfo5.vgtest b/memcheck/tests/varinfo5.vgtest +index 063d00dce..6907bb2f6 100644 +--- a/memcheck/tests/varinfo5.vgtest ++++ b/memcheck/tests/varinfo5.vgtest +@@ -1,3 +1,3 @@ + prog: varinfo5 +-vgopts: --fullpath-after=memcheck/ --fullpath-after=coregrind/ --read-var-info=yes --read-inline-info=yes -q ++vgopts: --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/ --read-var-info=yes --read-inline-info=yes -q + stderr_filter: filter_varinfo3 +-- +2.22.0 + diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 new file mode 100644 index 000000000..acf4fd1bc --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 @@ -0,0 +1,236 @@ +cachegrind/tests/ann1 +callgrind/tests/simwork1 +callgrind/tests/simwork2 +callgrind/tests/simwork3 +callgrind/tests/simwork-both +callgrind/tests/simwork-cache +callgrind/tests/threads +callgrind/tests/threads-use +drd/tests/annotate_barrier +drd/tests/annotate_barrier_xml +drd/tests/annotate_hbefore +drd/tests/annotate_hb_err +drd/tests/annotate_hb_race +drd/tests/annotate_ignore_read +drd/tests/annotate_ignore_rw +drd/tests/annotate_ignore_rw2 +drd/tests/annotate_ignore_write +drd/tests/annotate_ignore_write2 +drd/tests/annotate_order_1 +drd/tests/annotate_order_2 +drd/tests/annotate_order_3 +drd/tests/annotate_publish_hg +drd/tests/annotate_rwlock +drd/tests/annotate_rwlock_hg +drd/tests/annotate_sem +drd/tests/annotate_smart_pointer +drd/tests/annotate_smart_pointer2 +drd/tests/annotate_spinlock +drd/tests/annotate_static +drd/tests/annotate_trace_memory +drd/tests/annotate_trace_memory_xml +drd/tests/atomic_var +drd/tests/bar_bad +drd/tests/bar_bad_xml +drd/tests/bar_trivial +drd/tests/bug-235681 +drd/tests/bug322621 +drd/tests/circular_buffer +drd/tests/concurrent_close +drd/tests/custom_alloc +drd/tests/custom_alloc_fiw +drd/tests/dlopen +drd/tests/fork-parallel +drd/tests/fork-serial +drd/tests/fp_race +drd/tests/fp_race2 +drd/tests/fp_race_xml +drd/tests/free_is_write +drd/tests/free_is_write2 +drd/tests/hg01_all_ok +drd/tests/hg02_deadlock +drd/tests/hg03_inherit +drd/tests/hg04_race +drd/tests/hg05_race2 +drd/tests/hg06_readshared +drd/tests/hold_lock_1 +drd/tests/hold_lock_2 +drd/tests/linuxthreads_det +drd/tests/matinv +drd/tests/memory_allocation +drd/tests/monitor_example +drd/tests/new_delete +drd/tests/pth_barrier +drd/tests/pth_barrier2 +drd/tests/pth_barrier3 +drd/tests/pth_barrier_race +drd/tests/pth_barrier_reinit +drd/tests/pth_barrier_thr_cr +drd/tests/pth_broadcast +drd/tests/pth_cancel_locked +drd/tests/pth_cleanup_handler +drd/tests/pth_cond_race +drd/tests/pth_cond_race2 +drd/tests/pth_detached2 +drd/tests/pth_detached3 +drd/tests/pth_detached_sem +drd/tests/pth_inconsistent_cond_wait +drd/tests/pth_mutex_reinit +drd/tests/pth_once +drd/tests/pth_process_shared_mutex +drd/tests/pth_spinlock +drd/tests/pth_uninitialized_cond +drd/tests/read_and_free_race +drd/tests/recursive_mutex +drd/tests/rwlock_race +drd/tests/rwlock_test +drd/tests/rwlock_type_checking +drd/tests/sem_as_mutex +drd/tests/sem_as_mutex2 +drd/tests/sem_as_mutex3 +drd/tests/sem_open +drd/tests/sem_open2 +drd/tests/sem_open3 +drd/tests/sem_open_traced +drd/tests/sem_wait +drd/tests/sigalrm +drd/tests/sigaltstack +drd/tests/std_atomic +drd/tests/std_string +drd/tests/std_thread +drd/tests/std_thread2 +drd/tests/str_tester +drd/tests/tc01_simple_race +drd/tests/tc02_simple_tls +drd/tests/tc03_re_excl +drd/tests/tc04_free_lock +drd/tests/tc05_simple_race +drd/tests/tc06_two_races +drd/tests/tc07_hbl1 +drd/tests/tc08_hbl2 +drd/tests/tc09_bad_unlock +drd/tests/tc10_rec_lock +drd/tests/tc11_XCHG +drd/tests/tc12_rwl_trivial +drd/tests/tc13_laog1 +drd/tests/tc15_laog_lockdel +drd/tests/tc16_byterace +drd/tests/tc17_sembar +drd/tests/tc18_semabuse +drd/tests/tc19_shadowmem +drd/tests/tc21_pthonce +drd/tests/tc22_exit_w_lock +drd/tests/tc23_bogus_condwait +helgrind/tests/annotate_rwlock +helgrind/tests/annotate_smart_pointer +helgrind/tests/bar_bad +helgrind/tests/bar_trivial +helgrind/tests/bug322621 +helgrind/tests/cond_init_destroy +helgrind/tests/cond_timedwait_invalid +helgrind/tests/cond_timedwait_test +helgrind/tests/free_is_write +helgrind/tests/hg01_all_ok +helgrind/tests/hg03_inherit +helgrind/tests/hg04_race +helgrind/tests/hg05_race2 +helgrind/tests/hg06_readshared +helgrind/tests/locked_vs_unlocked1_fwd +helgrind/tests/locked_vs_unlocked1_rev +helgrind/tests/locked_vs_unlocked2 +helgrind/tests/locked_vs_unlocked3 +helgrind/tests/pth_barrier1 +helgrind/tests/pth_barrier2 +helgrind/tests/pth_barrier3 +helgrind/tests/pth_destroy_cond +helgrind/tests/rwlock_race +helgrind/tests/rwlock_test +helgrind/tests/shmem_abits +helgrind/tests/stackteardown +helgrind/tests/t2t_laog +helgrind/tests/tc01_simple_race +helgrind/tests/tc02_simple_tls +helgrind/tests/tc03_re_excl +helgrind/tests/tc04_free_lock +helgrind/tests/tc05_simple_race +helgrind/tests/tc06_two_races +helgrind/tests/tc06_two_races_xml +helgrind/tests/tc07_hbl1 +helgrind/tests/tc08_hbl2 +helgrind/tests/tc09_bad_unlock +helgrind/tests/tc10_rec_lock +helgrind/tests/tc11_XCHG +helgrind/tests/tc12_rwl_trivial +helgrind/tests/tc13_laog1 +helgrind/tests/tc14_laog_dinphils +helgrind/tests/tc15_laog_lockdel +helgrind/tests/tc16_byterace +helgrind/tests/tc17_sembar +helgrind/tests/tc18_semabuse +helgrind/tests/tc19_shadowmem +helgrind/tests/tc20_verifywrap +helgrind/tests/tc21_pthonce +helgrind/tests/tc22_exit_w_lock +helgrind/tests/tc23_bogus_condwait +helgrind/tests/tc24_nonzero_sem +helgrind/tests/tls_threads +memcheck/tests/accounting +memcheck/tests/addressable +memcheck/tests/arm64-linux/scalar +memcheck/tests/atomic_incs +memcheck/tests/badaddrvalue +memcheck/tests/badfree +memcheck/tests/badfree-2trace +memcheck/tests/badfree3 +memcheck/tests/badjump +memcheck/tests/badjump2 +memcheck/tests/badloop +memcheck/tests/badpoll +memcheck/tests/badrw +memcheck/tests/big_blocks_freed_list +memcheck/tests/brk2 +memcheck/tests/dw4 +memcheck/tests/err_disable4 +memcheck/tests/err_disable_arange1 +memcheck/tests/leak-autofreepool-5 +memcheck/tests/leak_cpp_interior +memcheck/tests/linux/lsframe1 +memcheck/tests/linux/lsframe2 +memcheck/tests/linux/with-space +memcheck/tests/origin5-bz2 +memcheck/tests/origin6-fp +memcheck/tests/overlap +memcheck/tests/partial_load_dflt +memcheck/tests/pdb-realloc2 +memcheck/tests/sh-mem +memcheck/tests/sh-mem-random +memcheck/tests/sigaltstack +memcheck/tests/sigkill +memcheck/tests/signal2 +memcheck/tests/supp_unknown +memcheck/tests/threadname +memcheck/tests/threadname_xml +memcheck/tests/unit_oset +memcheck/tests/varinfo1 +memcheck/tests/varinfo2 +memcheck/tests/varinfo3 +memcheck/tests/varinfo4 +memcheck/tests/varinfo5 +memcheck/tests/varinfo6 +memcheck/tests/varinforestrict +memcheck/tests/vcpu_bz2 +memcheck/tests/vcpu_fbench +memcheck/tests/vcpu_fnfns +memcheck/tests/wcs +memcheck/tests/wrap1 +memcheck/tests/wrap2 +memcheck/tests/wrap3 +memcheck/tests/wrap4 +memcheck/tests/wrap5 +memcheck/tests/wrap6 +memcheck/tests/wrap7 +memcheck/tests/wrap8 +memcheck/tests/wrapmalloc +memcheck/tests/wrapmallocstatic +memcheck/tests/writev1 +memcheck/tests/xml1 diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest index 447d33c8c..97b0a85db 100755 --- a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest @@ -4,13 +4,46 @@ # wraps the valgrind regression script vg_regtest. # # Dave Lerner +# Randy MacLeod ############################################################### -VALGRINDLIB=@libdir@/valgrind -LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" +VALGRIND_LIB=@libdir@/valgrind +VALGRIND_BIN=@bindir@/valgrind + +LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" + +TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none" +EXP_TOOLS="exp-bbv exp-dhat exp-sgcheck" + +GDB_BIN=@bindir@/gdb +cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN} + +arch=`arch` +if [ "$arch" = "aarch64" ]; then + echo "Aarch64: Hide valgrind tests that result in defunct process and then out of memory" + for i in `cat remove-for-aarch64`; do + mv $i.vgtest $i.IGNORE; + done +fi + +cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ + --valgrind=${VALGRIND_BIN} \ + --valgrind-lib=${VALGRIND_LIB} \ + --yocto-ptest \ + gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ + 2>&1|tee ${LOG} + +cd ${VALGRIND_LIB}/ptest && \ + ./tests/post_regtest_checks $(pwd) \ + gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ + 2>&1|tee -a ${LOG} + +if [ "$arch" = "aarch64" ]; then + echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" + for i in `cat remove-for-aarch64`; do + mv $i.IGNORE $i.vgtest; + done +fi -cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \ - --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ - --yocto-ptest 2>&1|tee ${LOG} passed=`grep PASS: ${LOG}|wc -l` failed=`grep FAIL: ${LOG}|wc -l` diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb index 4e89c604d..63f972945 100644 --- a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb @@ -15,6 +15,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ file://fixed-perl-path.patch \ file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ file://run-ptest \ + file://remove-for-aarch64 \ file://0004-Fix-out-of-tree-builds.patch \ file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ @@ -38,6 +39,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ file://0002-valgrind-adjust-std_list-expected-output.patch \ + file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ " SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1" @@ -109,7 +111,11 @@ RDEPENDS_${PN} += "perl" # redirect functions like strlen. RRECOMMENDS_${PN} += "${TCLIBC}-dbg" -RDEPENDS_${PN}-ptest += " file perl perl-module-file-glob sed ${PN}-dbg" +RDEPENDS_${PN}-ptest += " bash coreutils file \ + gdb libgomp \ + perl \ + perl-module-getopt-long perl-module-file-basename perl-module-file-glob \ + procps sed ${PN}-dbg" RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" # One of the tests contains a bogus interpreter path on purpose. @@ -134,21 +140,23 @@ do_install_ptest() { for parent_dir in ${S} ${B} ; do cd $parent_dir - # exclude shell or the package won't install - rm -rf none/tests/shell* 2>/dev/null - subdirs=" \ + .in_place \ cachegrind/tests \ callgrind/tests \ + dhat/tests \ drd/tests \ gdbserver_tests \ helgrind/tests \ + lackey/tests \ massif/tests \ memcheck/tests \ none/tests \ tests \ + exp-bbv/tests \ + exp-dhat/tests \ + exp-sgcheck/tests \ " - # Get the vg test scripts, filters, and expected files for dir in $subdirs ; do find $dir | cpio -pvdu ${D}${PTEST_PATH} @@ -156,17 +164,33 @@ do_install_ptest() { cd $saved_dir done - # Hide then restore a.c that is used by ann[12].vgtest in call/cachegrind - mv ${D}${PTEST_PATH}/cachegrind/tests/a.c ${D}${PTEST_PATH}/cachegrind/tests/a_c - # clean out build artifacts before building the rpm + # The scripts reference config.h so add it to the top ptest dir. + cp ${B}/config.h ${D}${PTEST_PATH} + install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH} + + # Add an executable need by none/tests/bigcode + mkdir ${D}${PTEST_PATH}/perf + cp ${B}/perf/bigcode ${D}${PTEST_PATH}/perf + + # Add an executable needed by memcheck/tests/vcpu_bz2 + cp ${B}/perf/bz2 ${D}${PTEST_PATH}/perf + + # Make the ptest dir look like the top level valgrind src dir + # This is checked by the gdbserver_tests/make_local_links script + mkdir ${D}${PTEST_PATH}/coregrind + cp ${B}/coregrind/vgdb ${D}${PTEST_PATH}/coregrind + + # Add an executable needed by massif tests + cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print + find ${D}${PTEST_PATH} \ - \( -name "Makefile*" \ + \( \ + -name "Makefile*" \ -o -name "*.o" \ - -o -name "*.c" \ - -o -name "*.S" \ - -o -name "*.h" \) \ + \) \ -exec rm {} \; - mv ${D}${PTEST_PATH}/cachegrind/tests/a_c ${D}${PTEST_PATH}/cachegrind/tests/a.c + + # These files need to be newer so touch them. touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test # find *_annotate in ${bindir} for yocto build @@ -176,9 +200,7 @@ do_install_ptest() { sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest - # needed by massif tests - cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print - # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest + sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest } diff --git a/poky/meta/recipes-extended/acpica/acpica_20190509.bb b/poky/meta/recipes-extended/acpica/acpica_20190509.bb deleted file mode 100644 index cf6db336a..000000000 --- a/poky/meta/recipes-extended/acpica/acpica_20190509.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "ACPICA tools for the development and debug of ACPI tables" -DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ -OS-independent reference implementation of the Advanced Configuration and \ -Power Interface Specification (ACPI). ACPICA code contains those portions of \ -ACPI meant to be directly integrated into the host OS as a kernel-resident \ -subsystem, and a small set of tools to assist in developing and debugging \ -ACPI tables." - -HOMEPAGE = "http://www.acpica.org/" -SECTION = "console/tools" - -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" - -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" - -DEPENDS = "bison flex bison-native" - -SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz" -SRC_URI[md5sum] = "dd1f8240f924b12b0a0de0c31ab26ab1" -SRC_URI[sha256sum] = "860b5f94a0590b278592acf16a4556b05ff0309c08e8c48aa29827cfa02c8e9d" -UPSTREAM_CHECK_URI = "https://acpica.org/downloads" - -S = "${WORKDIR}/acpica-unix2-${PV}" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "acpixtract acpidump" - -EXTRA_OEMAKE = "CC='${CC}' \ - OPT_CFLAGS=-Wall \ - DESTDIR=${D} \ - PREFIX=${prefix} \ - INSTALLDIR=${bindir} \ - INSTALLFLAGS= \ - " - -do_install() { - oe_runmake install -} - -# iasl*.bb is a subset of this recipe, so RREPLACE it -PROVIDES = "iasl" -RPROVIDES_${PN} += "iasl" -RREPLACES_${PN} += "iasl" -RCONFLICTS_${PN} += "iasl" - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-extended/acpica/acpica_20190816.bb b/poky/meta/recipes-extended/acpica/acpica_20190816.bb new file mode 100644 index 000000000..8f7997477 --- /dev/null +++ b/poky/meta/recipes-extended/acpica/acpica_20190816.bb @@ -0,0 +1,49 @@ +SUMMARY = "ACPICA tools for the development and debug of ACPI tables" +DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ +OS-independent reference implementation of the Advanced Configuration and \ +Power Interface Specification (ACPI). ACPICA code contains those portions of \ +ACPI meant to be directly integrated into the host OS as a kernel-resident \ +subsystem, and a small set of tools to assist in developing and debugging \ +ACPI tables." + +HOMEPAGE = "http://www.acpica.org/" +SECTION = "console/tools" + +LICENSE = "BSD | GPLv2" +LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +DEPENDS = "bison flex bison-native" + +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz" +SRC_URI[md5sum] = "6a73b1e34715916fa31132dbe11008b0" +SRC_URI[sha256sum] = "888e80f3bb77381620a5ead208e1a1be06f3ea66ddc8cfdfa62811cae5f03752" +UPSTREAM_CHECK_URI = "https://acpica.org/downloads" + +S = "${WORKDIR}/acpica-unix2-${PV}" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "acpixtract acpidump" + +EXTRA_OEMAKE = "CC='${CC}' \ + OPT_CFLAGS=-Wall \ + DESTDIR=${D} \ + PREFIX=${prefix} \ + INSTALLDIR=${bindir} \ + INSTALLFLAGS= \ + " + +do_install() { + oe_runmake install +} + +# iasl*.bb is a subset of this recipe, so RREPLACE it +PROVIDES = "iasl" +RPROVIDES_${PN} += "iasl" +RREPLACES_${PN} += "iasl" +RCONFLICTS_${PN} += "iasl" + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14811-0001.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14811-0001.patch new file mode 100644 index 000000000..3f28555e8 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14811-0001.patch @@ -0,0 +1,68 @@ +From 885444fcbe10dc42787ecb76686c8ee4dd33bf33 Mon Sep 17 00:00:00 2001 +From: Ken Sharp +Date: Tue, 20 Aug 2019 10:10:28 +0100 +Subject: [PATCH] make .forceput inaccessible + +Bug #701343, #701344, #701345 + +More defensive programming. We don't want people to access .forecput +even though it is no longer sufficient to bypass SAFER. The exploit +in #701343 didn't work anyway because of earlier work to stop the error +handler being used, but nevertheless, prevent access to .forceput from +.setuserparams2. + +CVE: CVE-2019-14811 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Stefan Ghinea +--- + Resource/Init/gs_lev2.ps | 6 +++--- + Resource/Init/gs_pdfwr.ps | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps +index 98d55fe..f1b771f 100644 +--- a/Resource/Init/gs_lev2.ps ++++ b/Resource/Init/gs_lev2.ps +@@ -158,7 +158,7 @@ end + { + pop pop + } ifelse +- } forall ++ } executeonly forall + % A context switch might have occurred during the above loop, + % causing the interpreter-level parameters to be reset. + % Set them again to the new values. From here on, we are safe, +@@ -229,9 +229,9 @@ end + { pop pop + } + ifelse +- } ++ } executeonly + forall pop +-} .bind odef ++} .bind executeonly odef + + % Initialize the passwords. + % NOTE: the names StartJobPassword and SystemParamsPassword are known to +diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps +index 00c19fa..dfe504d 100644 +--- a/Resource/Init/gs_pdfwr.ps ++++ b/Resource/Init/gs_pdfwr.ps +@@ -652,11 +652,11 @@ currentdict /.pdfmarkparams .undef + systemdict /.pdf_hooked_DSC_Creator //true .forceput + } executeonly if + pop +- } if ++ } executeonly if + } { + pop + } ifelse +- } ++ } executeonly + { + pop + } ifelse +-- +2.20.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0001.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0001.patch new file mode 100644 index 000000000..c76e21caa --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0001.patch @@ -0,0 +1,270 @@ +From 0bafbd9c1273fab0dc79fd20db0ffc4443683f96 Mon Sep 17 00:00:00 2001 +From: Ken Sharp +Date: Mon, 29 Apr 2019 11:14:06 +0100 +Subject: [PATCH 1/2] PDF interpreter - Decode ToUnicode entries of the form + /Identity-H/V + +Bug #701003 "Text searchability broken due to omission of /ToUnicode /Identity-H" + +The PDF references from 1.2 too 2.0 all state that the value associated +with a ToUnicode key in a FontDescriptor must be a stream object. However +this file (and one case seen previously, bug 687351) have FontDescriptor +dictionaries where the value associated with a /ToUnicode key is a +name object, in both cases /Identity-H. + +Although this is clearly not legal, Acrobat not only tolerates it, it +actually uses it for search/copy/paste (see bug 701003 for details). +Without the key Acrobat is unable to successfully search the output file. + +We can't simply preserve the name object as a ToUnicode value; when +handling ToUnicode we actually decode the CMap and build a +GlyphNames2Unicode map (an internal representation of the G2U data +produced by the Microsoft PostScript printer driver). When writing the +output file we use that information to get a Unicode value for each +character we write, and build a new ToUnicode CMap using that. + +This commit tackles the problem by pre-scanning for a name object and +then checking to see if its Identity-H or Identity-V (although we have +not seen an Identity-V, there seems no reason why it wouldn't be +equally valid). If we find either of these then we construct a +GlyphNames2Unicode table for all possible values (0 - 65535) and store +that with the font as normal. When we write the output file we only +write the required entries for the subset font, so we write a now +completely legal ToUnicode CMap, and Acrobat is equally happy with that +as the original name. + +If the ToUnicode value isn't a name object, or isn't one of the +identities then we proceed as before. This means we will print a +warning for non conforming ToUnicode entries and ignore them. + +CVE: CVE-2019-14817 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Stefan Ghinea +--- + Resource/Init/pdf_font.ps | 200 ++++++++++++++++++++++++-------------- + 1 file changed, 129 insertions(+), 71 deletions(-) + +diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps +index 9fb85f6..2df3303 100644 +--- a/Resource/Init/pdf_font.ps ++++ b/Resource/Init/pdf_font.ps +@@ -621,86 +621,144 @@ currentdict end readonly def + PDFDEBUG { + (.processToUnicode beg) = + } if +- 2 index /ToUnicode knownoget { +- dup type /dicttype eq { dup /File known not } { //true } ifelse { +- % We undefine wrong /Length and define /File in stream dictionaries. +- % Bug687351.pdf defines /ToUnicode /Identity-H, what is incorrect. +- ( **** Warning: Ignoring bad ToUnicode CMap.\n) pdfformatwarning +- pop ++ ++ 2 index /ToUnicode knownoget ++ { ++ dup type /nametype eq { ++ % This is contrary to the specification but it seems that Acrobat at least will accept ++ % a ToUnicode with a value of Identity-H *and* will use that for search, copy/paste. ++ % We can't pass through a name, so the best we can do is build a GlyphNames2Unicode ++ % map matching that which would have been generated by a full 16-bit Identity CMap ++ % ++ % See bug numbers 701003 and 687351 ++ % ++ dup /Identity-H eq 1 index /Identity-V eq or{ ++ pop ++ 1 index /FontInfo .knownget not { ++ currentglobal 2 index dup gcheck setglobal ++ /FontInfo 5 dict dup 5 1 roll .forceput ++ setglobal ++ } if ++ dup /GlyphNames2Unicode .knownget not { ++ //true % No existing G2U, make one ++ } { ++ dup wcheck { ++ //false % Existing, writeable G2U, don't make new one ++ } { ++ pop //true % Existing read only G2U, make new one ++ } ifelse ++ } ifelse ++ { ++ currentglobal exch dup gcheck setglobal ++ dup /GlyphNames2Unicode 100 dict dup 4 1 roll .forceput ++ 3 2 roll setglobal ++ } if % font-res font-dict encoding|null font-info g2u ++ ++ 0 1 65535{ ++ % g2u index ++ dup dup 256 mod exch 256 idiv % g2u index lo-byte hi-byte ++ 2 string dup 0 4 -1 roll % g2u index lo-byte () () 0 hi-byte ++ put % g2u index lo-byte (x) ++ dup 1 % g2u index lo-byte (x) (x) 1 ++ 4 -1 roll put % g2u index (x) (x) 1 lo-byte -> dict index (xx) ++ 2 index % g2u index (xx) dict ++ 3 1 roll % g2u g2u index (xx) ++ put % g2u ++ } for ++ pop % font-res font-dict encoding|null font-info ++ pop % font-res font-dict encoding|null ++ //false % We built a GlyphNames2Unicode table, don't need to process further ++ }{ ++ //true % name is not Identity-V or H, fail by falling through ++ }ifelse + } { +- /PDFScanRules .getuserparam dup //null eq { +- pop //PDFScanRules_null +- } { +- 1 dict dup /PDFScanRules 4 -1 roll put +- } ifelse +- //PDFScanRules_true setuserparams +- PDFfile fileposition +- 3 -1 roll +- count 1 sub +- countdictstack +- { //false resolvestream +- % Following Acrobat we ignore everything outside +- % begincodespacerange .. endcmap. +- dup 0 (begincodespacerange) /SubFileDecode filter flushfile +- /CIDInit /ProcSet findresource begin +- //ToUnicodeCMapReader begin +- 12 dict begin +- /CMapType 2 def +- mark exch % emulate 'begincodespacerange' +- 0 (endcmap) /SubFileDecode filter cvx /begincmap cvx exch 2 .execn +- endcmap +- userdict /.lastToUnicode currentdict put +- end end end +- } ++ //true ++ } ifelse % not a name, try as a dictionary (as specified) + +- PDFSTOPONERROR { +- { exec } 0 get +- //false +- 5 -2 roll +- 5 ++ % If the ToUnicode isn't a name, or the name isn't Identity-V or -H then follow the specification ++ % If its not a dictionary type throw an error, otherwise decode it and build a GlyphNames2Unicode ++ % ++ { ++ dup type /dicttype eq { dup /File known not } { //true } ifelse { ++ % We undefine wrong /Length and define /File in stream dictionaries. ++ % Bug687351.pdf defines /ToUnicode /Identity-H, what is incorrect. ++ ( **** Warning: Ignoring bad ToUnicode CMap.\n) pdfformatwarning ++ pop + } { +- { stopped } 0 get +- 4 2 roll +- 4 +- } ifelse +- array astore cvx exec ++ /PDFScanRules .getuserparam dup //null eq { ++ pop //PDFScanRules_null ++ } { ++ 1 dict dup /PDFScanRules 4 -1 roll put ++ } ifelse ++ //PDFScanRules_true setuserparams ++ PDFfile fileposition ++ 3 -1 roll ++ count 1 sub ++ countdictstack ++ { //false resolvestream ++ % Following Acrobat we ignore everything outside ++ % begincodespacerange .. endcmap. ++ dup 0 (begincodespacerange) /SubFileDecode filter flushfile ++ /CIDInit /ProcSet findresource begin ++ //ToUnicodeCMapReader begin ++ 12 dict begin ++ /CMapType 2 def ++ mark exch % emulate 'begincodespacerange' ++ 0 (endcmap) /SubFileDecode filter cvx /begincmap cvx exch 2 .execn ++ endcmap ++ userdict /.lastToUnicode currentdict put ++ end end end ++ } + +- countdictstack exch sub 0 .max { end } repeat +- count exch sub 2 sub 0 .max { exch pop } repeat +- 3 1 roll % Stach the stop flag. +- PDFfile exch setfileposition +- setuserparams +- { +- ( **** Warning: Failed to read ToUnicode CMap.\n) pdfformatwarning +- } { +- 1 index /FontInfo .knownget not { +- currentglobal 2 index dup gcheck setglobal +- /FontInfo 5 dict dup 5 1 roll .forceput +- setglobal +- } if +- dup /GlyphNames2Unicode .knownget not { +- //true % No existing G2U, make one ++ PDFSTOPONERROR { ++ { exec } 0 get ++ //false ++ 5 -2 roll ++ 5 ++ } { ++ { stopped } 0 get ++ 4 2 roll ++ 4 ++ } ifelse ++ array astore cvx exec ++ ++ countdictstack exch sub 0 .max { end } repeat ++ count exch sub 2 sub 0 .max { exch pop } repeat ++ 3 1 roll % Stach the stop flag. ++ PDFfile exch setfileposition ++ setuserparams ++ { ++ ( **** Warning: Failed to read ToUnicode CMap.\n) pdfformatwarning + } { +- dup wcheck { +- //false % Existing, writeable G2U, don't make new one ++ 1 index /FontInfo .knownget not { ++ currentglobal 2 index dup gcheck setglobal ++ /FontInfo 5 dict dup 5 1 roll .forceput ++ setglobal ++ } if ++ dup /GlyphNames2Unicode .knownget not { ++ //true % No existing G2U, make one + } { +- pop //true % Existing read only G2U, make new one ++ dup wcheck { ++ //false % Existing, writeable G2U, don't make new one ++ } { ++ pop //true % Existing read only G2U, make new one ++ } ifelse + } ifelse ++ { ++ currentglobal exch dup gcheck setglobal ++ dup /GlyphNames2Unicode 100 dict dup 4 1 roll .forceput ++ 3 2 roll setglobal ++ } if % font-res font-dict encoding|null font-info g2u ++ exch pop exch % font-res font-dict g2u encoding|null ++ userdict /.lastToUnicode get % font-res font-dict g2u Encoding|null CMap ++ .convert_ToUnicode-into-g2u % font-res font-dict ++ //null % font-res font-dict //null + } ifelse +- { +- currentglobal exch dup gcheck setglobal +- dup /GlyphNames2Unicode 100 dict dup 4 1 roll .forceput +- 3 2 roll setglobal +- } if % font-res font-dict encoding|null font-info g2u +- exch pop exch % font-res font-dict g2u encoding|null +- userdict /.lastToUnicode get % font-res font-dict g2u Encoding|null CMap +- .convert_ToUnicode-into-g2u % font-res font-dict +- //null % font-res font-dict //null + } ifelse +- } ifelse +- } if +- PDFDEBUG { +- (.processToUnicode end) = ++ } if ++ PDFDEBUG { ++ (.processToUnicode end) = ++ } if + } if + } if + } stopped +-- +2.20.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0002.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0002.patch new file mode 100644 index 000000000..6348fff2d --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-14817-0002.patch @@ -0,0 +1,236 @@ +From cd1b1cacadac2479e291efe611979bdc1b3bdb19 Mon Sep 17 00:00:00 2001 +From: Ken Sharp +Date: Wed, 21 Aug 2019 10:10:51 +0100 +Subject: [PATCH 2/2] PDF interpreter - review .forceput security + +Bug #701450 "Safer Mode Bypass by .forceput Exposure in .pdfexectoken" + +By abusing the error handler it was possible to get the PDFDEBUG portion +of .pdfexectoken, which uses .forceput left readable. + +Add an executeonly appropriately to make sure that clause isn't readable +no mstter what. + +Review all the uses of .forceput searching for similar cases, add +executeonly as required to secure those. All cases in the PostScript +support files seem to be covered already. + +CVE: CVE-2019-14817 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Stefan Ghinea +--- + Resource/Init/pdf_base.ps | 2 +- + Resource/Init/pdf_draw.ps | 14 +++++++------- + Resource/Init/pdf_font.ps | 29 ++++++++++++++++------------- + Resource/Init/pdf_main.ps | 6 +++--- + Resource/Init/pdf_ops.ps | 11 ++++++----- + 5 files changed, 33 insertions(+), 29 deletions(-) + +diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps +index 1a218f4..cffde5c 100644 +--- a/Resource/Init/pdf_base.ps ++++ b/Resource/Init/pdf_base.ps +@@ -157,7 +157,7 @@ currentdict /num-chars-dict .undef + { + dup ==only () = flush + } ifelse % PDFSTEP +- } if % PDFDEBUG ++ } executeonly if % PDFDEBUG + 2 copy .knownget { + exch pop exch pop exch pop exec + } { +diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps +index e18a7c2..0a3924c 100644 +--- a/Resource/Init/pdf_draw.ps ++++ b/Resource/Init/pdf_draw.ps +@@ -501,8 +501,8 @@ end + ( Output may be incorrect.\n) pdfformaterror + //pdfdict /.gs_warning_issued //true .forceput + PDFSTOPONERROR { /gs /undefined signalerror } if +- } if +- } ++ } executeonly if ++ } executeonly + ifelse + } bind executeonly def + +@@ -1142,7 +1142,7 @@ currentdict end readonly def + .setglobal + pdfformaterror + } executeonly ifelse +- } ++ } executeonly + { + currentglobal //pdfdict gcheck .setglobal + //pdfdict /.Qqwarning_issued //true .forceput +@@ -1150,8 +1150,8 @@ currentdict end readonly def + pdfformaterror + } executeonly ifelse + end +- } ifelse +- } loop ++ } executeonly ifelse ++ } executeonly loop + { + (\n **** Error: File has unbalanced q/Q operators \(too many q's\)\n Output may be incorrect.\n) + //pdfdict /.Qqwarning_issued .knownget +@@ -1165,14 +1165,14 @@ currentdict end readonly def + .setglobal + pdfformaterror + } executeonly ifelse +- } ++ } executeonly + { + currentglobal //pdfdict gcheck .setglobal + //pdfdict /.Qqwarning_issued //true .forceput + .setglobal + pdfformaterror + } executeonly ifelse +- } if ++ } executeonly if + pop + + % restore pdfemptycount +diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps +index 2df3303..6a6a5fe 100644 +--- a/Resource/Init/pdf_font.ps ++++ b/Resource/Init/pdf_font.ps +@@ -638,7 +638,7 @@ currentdict end readonly def + currentglobal 2 index dup gcheck setglobal + /FontInfo 5 dict dup 5 1 roll .forceput + setglobal +- } if ++ } executeonly if + dup /GlyphNames2Unicode .knownget not { + //true % No existing G2U, make one + } { +@@ -668,10 +668,12 @@ currentdict end readonly def + pop % font-res font-dict encoding|null font-info + pop % font-res font-dict encoding|null + //false % We built a GlyphNames2Unicode table, don't need to process further +- }{ ++ } executeonly ++ { + //true % name is not Identity-V or H, fail by falling through + }ifelse +- } { ++ } executeonly ++ { + //true + } ifelse % not a name, try as a dictionary (as specified) + +@@ -759,9 +761,9 @@ currentdict end readonly def + PDFDEBUG { + (.processToUnicode end) = + } if +- } if +- } if +- } stopped ++ } executeonly if ++ } executeonly if ++ } executeonly stopped + { + .dstackdepth 1 countdictstack 1 sub + {pop end} for +@@ -1291,19 +1293,20 @@ currentdict /eexec_pdf_param_dict .undef + //pdfdict /.Qqwarning_issued //true .forceput + } executeonly if + Q +- } repeat ++ } executeonly repeat + Q +- } PDFfile fileposition 2 .execn % Keep pdfcount valid. ++ } executeonly PDFfile fileposition 2 .execn % Keep pdfcount valid. + PDFfile exch setfileposition +- } ifelse +- } { ++ } executeonly ifelse ++ } executeonly ++ { + % PDF Type 3 fonts don't use .notdef + % d1 implementation adjusts the width as needed + 0 0 0 0 0 0 + pdfopdict /d1 get exec + } ifelse + end end +- } bdef ++ } executeonly bdef + dup currentdict Encoding .processToUnicode + currentdict end .completefont exch pop + } bind executeonly odef +@@ -2103,9 +2106,9 @@ currentdict /CMap_read_dict undef + (Will continue, but content may be missing.) = flush + } ifelse + } if +- } if ++ } executeonly if + /findresource cvx /undefined signalerror +- } loop ++ } executeonly loop + } bind executeonly odef + + /buildCIDType0 { % buildCIDType0 +diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps +index 5305ea6..a59e63c 100644 +--- a/Resource/Init/pdf_main.ps ++++ b/Resource/Init/pdf_main.ps +@@ -2749,15 +2749,15 @@ currentdict /PDF2PS_matrix_key undef + .setglobal + pdfformaterror + } executeonly ifelse +- } ++ } executeonly + { + currentglobal //pdfdict gcheck .setglobal + //pdfdict /.Qqwarning_issued //true .forceput + .setglobal + pdfformaterror + } executeonly ifelse +- } if +- } if ++ } executeonly if ++ } executeonly if + pop + count PDFexecstackcount sub { pop } repeat + (after exec) VMDEBUG +diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps +index 285e582..6c1f100 100644 +--- a/Resource/Init/pdf_ops.ps ++++ b/Resource/Init/pdf_ops.ps +@@ -186,14 +186,14 @@ currentdict /gput_always_allow .undef + .setglobal + pdfformaterror + } executeonly ifelse +- } ++ } executeonly + { + currentglobal //pdfdict gcheck .setglobal + //pdfdict /.Qqwarning_issued //true .forceput + .setglobal + pdfformaterror + } executeonly ifelse +- } if ++ } executeonly if + } bind executeonly odef + + % Save PDF gstate +@@ -440,11 +440,12 @@ currentdict /gput_always_allow .undef + dup type /booleantype eq { + .currentSMask type /dicttype eq { + .currentSMask /Processed 2 index .forceput ++ } executeonly ++ { ++ .setSMask ++ }ifelse + } executeonly + { +- .setSMask +- }ifelse +- }{ + .setSMask + }ifelse + +-- +2.20.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript_9.27.bb b/poky/meta/recipes-extended/ghostscript/ghostscript_9.27.bb index fcc9e0099..349c0c2e8 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript_9.27.bb +++ b/poky/meta/recipes-extended/ghostscript/ghostscript_9.27.bb @@ -25,6 +25,9 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d file://do-not-check-local-libpng-source.patch \ file://avoid-host-contamination.patch \ file://mkdir-p.patch \ + file://CVE-2019-14811-0001.patch \ + file://CVE-2019-14817-0001.patch \ + file://CVE-2019-14817-0002.patch \ " SRC_URI = "${SRC_URI_BASE} \ diff --git a/poky/meta/recipes-extended/iptables/iptables/iptables.rules b/poky/meta/recipes-extended/iptables/iptables/iptables.rules new file mode 100644 index 000000000..e69de29bb diff --git a/poky/meta/recipes-extended/iptables/iptables/iptables.service b/poky/meta/recipes-extended/iptables/iptables/iptables.service new file mode 100644 index 000000000..041316e45 --- /dev/null +++ b/poky/meta/recipes-extended/iptables/iptables/iptables.service @@ -0,0 +1,13 @@ +[Unit] +Description=Packet Filtering Framework +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules +ExecReload=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb b/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb index 6ac3fc60c..ff9fcb1b5 100644 --- a/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb +++ b/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb @@ -10,12 +10,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ + file://iptables.service \ + file://iptables.rules \ " SRC_URI[md5sum] = "29de711d15c040c402cf3038c69ff513" SRC_URI[sha256sum] = "a23cac034181206b4545f4e7e730e76e08b5f3dd78771ba9645a6756de9cdd80" -inherit autotools pkgconfig +inherit autotools pkgconfig systemd EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}" @@ -56,6 +58,19 @@ INSANE_SKIP_${PN}-module-xt-ct = "dev-so" ALLOW_EMPTY_${PN}-modules = "1" +do_install_append() { + + install -d ${D}${sysconfdir}/iptables + install -m 0644 ${WORKDIR}/iptables.rules ${D}${sysconfdir}/iptables + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir} + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/iptables.service +} + +SYSTEMD_SERVICE_${PN} = "iptables.service" + RDEPENDS_${PN} = "${PN}-module-xt-standard" RRECOMMENDS_${PN} = " \ ${PN}-modules \ diff --git a/poky/meta/recipes-extended/screen/screen_4.6.2.bb b/poky/meta/recipes-extended/screen/screen_4.6.2.bb index 24ec75107..21b476ddb 100644 --- a/poky/meta/recipes-extended/screen/screen_4.6.2.bb +++ b/poky/meta/recipes-extended/screen/screen_4.6.2.bb @@ -35,10 +35,11 @@ inherit autotools texinfo PACKAGECONFIG ??= "" PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter," -EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \ +EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 --with-sys-screenrc=${sysconfdir}/screenrc \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" do_install_append () { + install -D -m 644 ${S}/etc/etcscreenrc ${D}/${sysconfdir}/screenrc if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen fi diff --git a/poky/meta/recipes-extended/timezone/timezone.inc b/poky/meta/recipes-extended/timezone/timezone.inc index ce16524eb..f6bab1acb 100644 --- a/poky/meta/recipes-extended/timezone/timezone.inc +++ b/poky/meta/recipes-extended/timezone/timezone.inc @@ -4,7 +4,7 @@ SECTION = "base" LICENSE = "PD & BSD & BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" -PV = "2019b" +PV = "2019c" SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \ @@ -12,7 +12,7 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" -SRC_URI[tzcode.md5sum] = "91e0978d947496fd6aaf46d351f9c41d" -SRC_URI[tzcode.sha256sum] = "2e479d409337da41408629ce6c3b4d8410b10ba6d4431d862e22d2b137d7756d" -SRC_URI[tzdata.md5sum] = "b26b5d7d844cb96c73ed2fb6d588daaf" -SRC_URI[tzdata.sha256sum] = "05d9092c90dcf9ec4f3ccfdea80c7dcea5e882b3b105c3422da172aaa9a50c64" +SRC_URI[tzcode.md5sum] = "195a17454c5db05cab96595380650391" +SRC_URI[tzcode.sha256sum] = "f6ebd3668e02d5ed223d3b7b1947561bf2d2da2f4bd1db61efefd9e06c167ed4" +SRC_URI[tzdata.md5sum] = "f6987e6dfdb2eb83a1b5076a50b80894" +SRC_URI[tzdata.sha256sum] = "79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c" diff --git a/poky/meta/recipes-extended/timezone/tzdata.bb b/poky/meta/recipes-extended/timezone/tzdata.bb index 82fe369ba..1e2d9bd1b 100644 --- a/poky/meta/recipes-extended/timezone/tzdata.bb +++ b/poky/meta/recipes-extended/timezone/tzdata.bb @@ -147,6 +147,8 @@ FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ RPROVIDES_tzdata-misc = "tzdata-misc" FILES_tzdata-core += " \ + ${sysconfdir}/localtime \ + ${sysconfdir}/timezone \ ${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/America/Anchorage \ ${datadir}/zoneinfo/America/Los_Angeles \ @@ -202,8 +204,7 @@ FILES_tzdata-core += " \ ${datadir}/zoneinfo/iso3166.tab \ ${datadir}/zoneinfo/Etc/*" -CONFFILES_tzdata-core += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }" -CONFFILES_tzdata-core += "${sysconfdir}/localtime" +CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" ALLOW_EMPTY_${PN} = "1" RDEPENDS_${PN} = "${TZ_PACKAGES}" diff --git a/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.1.bb b/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.1.bb deleted file mode 100644 index eb1adb505..000000000 --- a/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.1.bb +++ /dev/null @@ -1,123 +0,0 @@ -SUMMARY = "Image loading library for GTK+" -HOMEPAGE = "http://www.gtk.org/" -BUGTRACKER = "https://bugzilla.gnome.org/" - -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ - " - -SECTION = "libs" - -DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ - file://run-ptest \ - file://fatal-loader.patch \ - file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ - file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ - file://0004-Do-not-run-tests-when-building.patch \ - file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \ - " - -SRC_URI_append_class-target = " \ - file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ - " -SRC_URI_append_class-nativesdk = " \ - file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ - " - -SRC_URI[md5sum] = "f6ba2195acd18c5c9555421f30c31cc1" -SRC_URI[sha256sum] = "f19ff836ba991031610dcc53774e8ca436160f7d981867c8c3a37acfe493ab3a" - -inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package - -GIR_MESON_OPTION = 'gir' - -EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" - -LIBV = "2.10.0" - -GDK_PIXBUF_LOADERS ?= "png jpeg" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}" -PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" - -PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" -PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" -PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" -PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" - -PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" - -PACKAGES =+ "${PN}-xlib" - -# For GIO image type sniffing -RDEPENDS_${PN} = "shared-mime-info" - -FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" -ALLOW_EMPTY_${PN}-xlib = "1" - -FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" - -FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" - -FILES_${PN}-dev += " \ - ${bindir}/gdk-pixbuf-csource \ - ${bindir}/gdk-pixbuf-pixdata \ - ${bindir}/gdk-pixbuf-print-mime-types \ - ${includedir}/* \ - ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ -" - -PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" -PACKAGES_DYNAMIC_class-native = "" - -python populate_packages_prepend () { - postinst_pixbufloader = d.getVar("postinst_pixbufloader") - - loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') - - packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) - d.setVar('PIXBUF_PACKAGES', packages) - - # The test suite exercises all the loaders, so ensure they are all - # dependencies of the ptest package. - d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) -} - -do_install_append() { - # Copy gdk-pixbuf-query-loaders into libdir so it is always available - # in multilib builds. - cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ - -} - -do_install_append_class-native() { - find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; - - create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache - - create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache - - create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache - - create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ - GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders - - create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ - GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders -} -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb b/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb new file mode 100644 index 000000000..0f3a63d89 --- /dev/null +++ b/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb @@ -0,0 +1,123 @@ +SUMMARY = "Image loading library for GTK+" +HOMEPAGE = "http://www.gtk.org/" +BUGTRACKER = "https://bugzilla.gnome.org/" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ + " + +SECTION = "libs" + +DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ + file://run-ptest \ + file://fatal-loader.patch \ + file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ + file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ + file://0004-Do-not-run-tests-when-building.patch \ + file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \ + " + +SRC_URI_append_class-target = " \ + file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ + " +SRC_URI_append_class-nativesdk = " \ + file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ + " + +SRC_URI[md5sum] = "cc1d712a1643b92ff0904d589963971f" +SRC_URI[sha256sum] = "73fa651ec0d89d73dd3070b129ce2203a66171dfc0bd2caa3570a9c93d2d0781" + +inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package + +GIR_MESON_OPTION = 'gir' + +EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" + +LIBV = "2.10.0" + +GDK_PIXBUF_LOADERS ?= "png jpeg" + +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}" +PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" + +PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" +PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" +PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" +PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" + +PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" + +PACKAGES =+ "${PN}-xlib" + +# For GIO image type sniffing +RDEPENDS_${PN} = "shared-mime-info" + +FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" +ALLOW_EMPTY_${PN}-xlib = "1" + +FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" + +FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" + +FILES_${PN}-dev += " \ + ${bindir}/gdk-pixbuf-csource \ + ${bindir}/gdk-pixbuf-pixdata \ + ${bindir}/gdk-pixbuf-print-mime-types \ + ${includedir}/* \ + ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ +" + +PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" +PACKAGES_DYNAMIC_class-native = "" + +python populate_packages_prepend () { + postinst_pixbufloader = d.getVar("postinst_pixbufloader") + + loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') + + packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) + d.setVar('PIXBUF_PACKAGES', packages) + + # The test suite exercises all the loaders, so ensure they are all + # dependencies of the ptest package. + d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) +} + +do_install_append() { + # Copy gdk-pixbuf-query-loaders into libdir so it is always available + # in multilib builds. + cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ + +} + +do_install_append_class-native() { + find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; + + create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ + XDG_DATA_DIRS=${STAGING_DATADIR} \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache + + create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ + XDG_DATA_DIRS=${STAGING_DATADIR} \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache + + create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ + XDG_DATA_DIRS=${STAGING_DATADIR} \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache + + create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ + XDG_DATA_DIRS=${STAGING_DATADIR} \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ + GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders + + create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ + XDG_DATA_DIRS=${STAGING_DATADIR} \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ + GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders +} +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch index 6c38e237f..c4d7e2583 100644 --- a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch +++ b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch @@ -24,7 +24,8 @@ index 1c940a5..3998ee6 100644 - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ done; \ - done; +- done; ++ done; \ + wait ## FIXME we should add a way to remove links generated by icon mapping @@ -45,7 +46,8 @@ index 86f4d7c..3fae8c1 100644 $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \ - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \ + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \ - done +- done ++ done; \ + wait uninstall-local: @@ -61,7 +63,8 @@ index 24aac9b..61ba071 100644 - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ done; \ - done +- done ++ done; \ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \ context="`dirname $$file`"; \ $(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \ @@ -72,7 +75,8 @@ index 24aac9b..61ba071 100644 - $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context; \ + $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context & \ done \ - done +- done ++ done; \ + wait uninstall-local: diff --git a/poky/meta/recipes-gnome/gtk+/gtk+3.inc b/poky/meta/recipes-gnome/gtk+/gtk+3.inc index 77b6c3153..dc6768c4e 100644 --- a/poky/meta/recipes-gnome/gtk+/gtk+3.inc +++ b/poky/meta/recipes-gnome/gtk+/gtk+3.inc @@ -52,7 +52,7 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy" PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" -PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native" +PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" prepare_gtk_scripts() { diff --git a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc index 3e392fa5e..443616316 100644 --- a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc +++ b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc @@ -18,7 +18,7 @@ EDEPENDS_GLES2 = "virtual/libgles2" EDEPENDS_KMS = "libdrm virtual/egl" EDEPENDS_EGL = "virtual/egl" EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" -EDEPENDS_WAYLAND = "virtual/mesa wayland" +EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" # Extra RDEPENDS for PACKAGECONFIG # This has to be explictly listed, because cogl dlopens the backends @@ -75,4 +75,6 @@ RPROVIDES_libcogl = "cogl-1.0" RCONFLICTS_libcogl = "cogl-1.0" RREPLACES_libcogl = "cogl-1.0" +RDEPENDS_${PN}-dev = "libcogl" + COMPATIBLE_HOST_armv4 = 'null' diff --git a/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb b/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb index c8d1650c6..825453ab2 100644 --- a/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb +++ b/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb @@ -18,7 +18,7 @@ REQUIRED_DISTRO_FEATURES_class-native = "" REQUIRED_DISTRO_FEATURES_class-nativesdk = "" PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl" -PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl" +PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no -Dx11=false, virtual/libx11 virtual/libgl" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl" EXTRA_OEMESON += "-Dtests=false" diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch index 0064dc643..9fba5da4b 100644 --- a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch +++ b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -1,7 +1,7 @@ -From da6b9188f29942684d4262f0c6264d09bb6fe7de Mon Sep 17 00:00:00 2001 +From ea966884e39aae9571c038fab55f3c1663d17850 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Wed, 12 Jun 2019 13:40:20 -0300 -Subject: [PATCH 1/3] meson.build: check for all linux host_os combinations +Subject: [PATCH] meson.build: check for all linux host_os combinations Organization: O.S. Systems Software LTDA. Make sure that we are also looking for our host_os combinations like @@ -13,41 +13,30 @@ Upstream-Status: Pending Signed-off-by: Anuj Mittal Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador --- - meson.build | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build -index 8ab8a550f56..e11880f2902 100644 +index 567a81afd6f..b33b430aed4 100644 --- a/meson.build +++ b/meson.build -@@ -34,6 +34,8 @@ cpp = meson.get_compiler('cpp') - - null_dep = dependency('', required : false) - -+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') -+ - # Arguments for the preprocessor, put these in a separate array from the C and - # C++ (cpp in meson terminology) arguments since they need to be added to the - # default arguments for both C and C++. -@@ -107,8 +109,6 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 +@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 # Only build shared_glapi if at least one OpenGL API is enabled with_shared_glapi = get_option('shared-glapi') and with_any_opengl --system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system()) -- +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') + dri_drivers = get_option('dri-drivers') if dri_drivers.contains('auto') - if system_has_kms_drm -@@ -836,7 +836,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', +@@ -845,7 +845,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', endif # TODO: this is very incomplete --if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) -+if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux') +-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) ++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') pre_args += '-D_GNU_SOURCE' endif --- -2.22.0 - diff --git a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch index 81454aaa2..641bacf1d 100644 --- a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch +++ b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch @@ -1,7 +1,7 @@ -From d31718999797ffc4dd177d14760ef7b8fd95ac2f Mon Sep 17 00:00:00 2001 +From cee8e48c5344124e5d84307cb0c48ee0c9b3e684 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Wed, 12 Jun 2019 14:15:57 -0300 -Subject: [PATCH 2/3] meson.build: make TLS GLX optional again +Subject: [PATCH] meson.build: make TLS GLX optional again Organization: O.S. Systems Software LTDA. This was optional with autotools, and needs to be disabled @@ -11,16 +11,17 @@ Upstream-Status: Pending Signed-off-by: Alexander Kanavin Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador --- meson.build | 4 +++- meson_options.txt | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index e11880f2902..7a07974ba61 100644 +index b33b430aed4..0e50bb26c0a 100644 --- a/meson.build +++ b/meson.build -@@ -362,7 +362,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless) +@@ -369,7 +369,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat endif endif @@ -49,6 +50,3 @@ index 1f72faabee8..fcd49efea27 100644 option( 'I-love-half-baked-turnips', type : 'boolean', --- -2.22.0 - diff --git a/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch index 0f254a1d9..3458c1919 100644 --- a/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch +++ b/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch @@ -1,20 +1,21 @@ -From 417ff3a03313aa003244990ed5c0188c421e6181 Mon Sep 17 00:00:00 2001 +From f1482e88c2295b9c7288f5b273335a8e18039de8 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Wed, 12 Jun 2019 14:18:31 -0300 -Subject: [PATCH 3/3] Allow enable DRI without DRI drivers +Subject: [PATCH] Allow enable DRI without DRI drivers Organization: O.S. Systems Software LTDA. Upstream-Status: Pending Signed-off-by: Andrei Gherzan Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador --- meson.build | 2 +- meson_options.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 7a07974ba61..5c7cbe38376 100644 +index 0e50bb26c0a..de065c290d6 100644 --- a/meson.build +++ b/meson.build @@ -137,7 +137,7 @@ with_dri_r200 = dri_drivers.contains('r200') @@ -43,6 +44,3 @@ index fcd49efea27..0529200b3bb 100644 option( 'dri-drivers', type : 'array', --- -2.22.0 - diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb deleted file mode 100644 index d4b1c1c45..000000000 --- a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -require mesa_${PV}.bb - -SUMMARY += " (OpenGL only, no EGL/GLES)" - -PROVIDES = "virtual/libgl virtual/mesa" - -S = "${WORKDIR}/mesa-${PV}" - -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb new file mode 100644 index 000000000..d4b1c1c45 --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb @@ -0,0 +1,10 @@ +require mesa_${PV}.bb + +SUMMARY += " (OpenGL only, no EGL/GLES)" + +PROVIDES = "virtual/libgl virtual/mesa" + +S = "${WORKDIR}/mesa-${PV}" + +PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc index f916e553c..54b7618f8 100644 --- a/poky/meta/recipes-graphics/mesa/mesa.inc +++ b/poky/meta/recipes-graphics/mesa/mesa.inc @@ -26,6 +26,11 @@ PROVIDES = " \ inherit meson pkgconfig python3native gettext distro_features_check +# Unset these to stop python trying to report the target Python setup +_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1" +STAGING_INCDIR[unexport] = "1" +STAGING_LIBDIR[unexport] = "1" + BBCLASSEXTEND = "native nativesdk" ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan" diff --git a/poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb b/poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb deleted file mode 100644 index 1d5d00f73..000000000 --- a/poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -require ${BPN}.inc - -SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ - file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ - file://0002-meson.build-make-TLS-GLX-optional-again.patch \ - file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ - " - -SRC_URI[md5sum] = "07cd8cd79de28ec1a374ee3a06e47789" -SRC_URI[sha256sum] = "72114b16b4a84373b2acda060fe2bb1d45ea2598efab3ef2d44bdeda74f15581" - -UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" - -#because we cannot rely on the fact that all apps will use pkgconfig, -#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER -do_install_append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then - sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h - fi -} diff --git a/poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb b/poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb new file mode 100644 index 000000000..19221e9e2 --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb @@ -0,0 +1,20 @@ +require ${BPN}.inc + +SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0002-meson.build-make-TLS-GLX-optional-again.patch \ + file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ + " + +SRC_URI[md5sum] = "7dbb40b8d10e89bee0a5bfc85350647b" +SRC_URI[sha256sum] = "2a369b7b48545c6486e7e44913ad022daca097c8bd937bf30dcf3f17a94d3496" + +UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb index 0b6519e3f..d489f82b1 100644 --- a/poky/meta/recipes-graphics/piglit/piglit_git.bb +++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb @@ -8,7 +8,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "f0e868ac6fbdc295b2955c1b8f73169e7a52f938" +SRCREV = "0d1a47a4c10d4dd7225bd6510f8191684b31235e" # (when PV goes above 1.0 remove the trailing r) PV = "1.0+gitr${SRCPV}" diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.14.0.bb b/poky/meta/recipes-graphics/wayland/libinput_1.14.0.bb deleted file mode 100644 index d236f3fa0..000000000 --- a/poky/meta/recipes-graphics/wayland/libinput_1.14.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Library to handle input devices in Wayland compositors" -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" - -DEPENDS = "libevdev udev mtdev" - -SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz" -SRC_URI[md5sum] = "1c33d49fc7985926eab877e3de9c17eb" -SRC_URI[sha256sum] = "7cb85c24f8920b81bc5360220107e267ab4e0e718704c7690a8c7b03fa14fc67" - -UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" - -inherit meson pkgconfig lib_package - -PACKAGECONFIG ??= "" -PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" -PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" - -UDEVDIR = "`pkg-config --variable=udevdir udev`" - -EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false" - -# package name changed in 1.8.1 upgrade: make sure package upgrades work -RPROVIDES_${PN} = "libinput" -RREPLACES_${PN} = "libinput" -RCONFLICTS_${PN} = "libinput" diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb b/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb new file mode 100644 index 000000000..38bc8d2c3 --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" + +DEPENDS = "libevdev udev mtdev" + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz" +SRC_URI[md5sum] = "da29a704dc6f7ea2d5aac754db046340" +SRC_URI[sha256sum] = "e333a3242835c019ca37d2cef8b51a87d3138eb47444119c0153dc7a8656ee70" + +UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + -Dtests=false \ + -Dzshcompletiondir=no" + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES_${PN} = "libinput" +RREPLACES_${PN} = "libinput" +RCONFLICTS_${PN} = "libinput" diff --git a/poky/meta/recipes-graphics/wayland/weston-conf.bb b/poky/meta/recipes-graphics/wayland/weston-conf.bb deleted file mode 100644 index f52200c46..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-conf.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, configuration files" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -PACKAGES = "${PN}" - -do_configure[noexec] = '1' -do_compile[noexec] = '1' - -do_install() { - : -} - -do_install_qemux86() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} - -do_install_qemux86-64() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} diff --git a/poky/meta/recipes-graphics/wayland/weston-init.bb b/poky/meta/recipes-graphics/wayland/weston-init.bb index 22ba5f3fb..8b6689717 100644 --- a/poky/meta/recipes-graphics/wayland/weston-init.bb +++ b/poky/meta/recipes-graphics/wayland/weston-init.bb @@ -2,23 +2,35 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PACKAGE_ARCH = "${MACHINE_ARCH}" + SRC_URI = "file://init \ - file://weston.service \ + file://weston.ini \ + file://weston@.service \ + file://71-weston-drm.rules \ file://weston-start" S = "${WORKDIR}" do_install() { install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston - install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - + install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + + # Install Weston systemd service and accompanying udev rule + install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_unitdir}/system/weston@.service + install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ + ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules # Install weston-start script install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start } -inherit allarch update-rc.d distro_features_check systemd +inherit update-rc.d distro_features_check systemd # rdepends on weston which depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -28,4 +40,10 @@ RDEPENDS_${PN} = "weston kbd" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." -SYSTEMD_SERVICE_${PN} = "weston.service" +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service" + +CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" + +SYSTEMD_SERVICE_${PN} = "weston@%i.service" +SYSTEMD_AUTO_ENABLE = "disable" + diff --git a/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules b/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules new file mode 100644 index 000000000..1a1b8bbda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" +ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" diff --git a/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini new file mode 100644 index 000000000..17ebd7fda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini new file mode 100644 index 000000000..17ebd7fda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 000000000..1eecf48bc --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,74 @@ +# configuration file for Weston + +#[core] +#modules=xwayland.so,cms-colord.so +#shell=desktop-shell.so +#gbm-format=xrgb2101010 + +#[shell] +#background-image=/usr/share/backgrounds/gnome/Aqua.jpg +#background-color=0xff002244 +#background-type=tile +#clock-format=minutes +#panel-color=0x90ff0000 +#locking=true +#animation=zoom +#startup-animation=fade +#binding-modifier=ctrl +#num-workspaces=6 +#cursor-theme=whiteglass +#cursor-size=24 + +#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png +#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg +#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg +#animation=fade + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/gnome-terminal + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/weston-terminal + +#[launcher] +#icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png +#path=/usr/bin/google-chrome + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/arts.png +#path=/build/weston-0lEgCh/weston-1.11.0/weston-flower + +#[input-method] +#path=/usr/lib/weston/weston-keyboard + +#[output] +#name=LVDS1 +#mode=1680x1050 +#transform=90 +#icc_profile=/usr/share/color/icc/colord/Bluish.icc + +#[output] +#name=VGA1 +#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync +#transform=flipped + +#[output] +#name=X1 +#mode=1024x768 +#transform=flipped-90 + +#[libinput] +#enable_tap=true + +#[touchpad] +#constant_accel_factor = 50 +#min_accel_factor = 0.16 +#max_accel_factor = 1.0 + +#[screen-share] +#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize + +#[xwayland] +#path=/usr/bin/Xwayland diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston.service b/poky/meta/recipes-graphics/wayland/weston-init/weston.service deleted file mode 100644 index 18f72626e..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Weston Wayland Compositor -RequiresMountsFor=/run - -[Service] -User=root -PAMName=login -EnvironmentFile=-/etc/default/weston -ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS - -[Install] -WantedBy=multi-user.target - diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston@.service b/poky/meta/recipes-graphics/wayland/weston-init/weston@.service new file mode 100644 index 000000000..9ecf2ab06 --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston@.service @@ -0,0 +1,37 @@ +[Unit] +Description=Weston Wayland Compositor (on tty7) +RequiresMountsFor=/run +Conflicts=getty@tty7.service plymouth-quit.service +After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service + +[Service] +User=%i +PermissionsStartOnly=true + +# Log us in via PAM so we get our XDG & co. environment and +# are treated as logged in so we can use the tty: +PAMName=login + +# Grab tty7 +UtmpIdentifier=tty7 +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes + +# stderr to journal so our logging doesn't get thrown into /dev/null +StandardOutput=tty +StandardInput=tty +StandardError=journal + +EnvironmentFile=-/etc/default/weston + +# Weston does not successfully change VT, nor does systemd place us on +# the VT it just activated for us. Switch manually: +ExecStartPre=/usr/bin/chvt 7 +ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS + +IgnoreSIGPIPE=no + +#[Install] +#Alias=multi-user.target.wants/weston.service diff --git a/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb index 5d2a9336f..d21275414 100644 --- a/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb +++ b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb @@ -36,9 +36,9 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev # Compositor choices # # Weston on KMS -PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev" +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" # Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa" +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" # Weston on X11 PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" # Headless Weston @@ -104,7 +104,7 @@ FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "weston-conf liberation-fonts" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" RRECOMMENDS_${PN}-dev += "wayland-protocols" USERADD_PACKAGES = "${PN}" diff --git a/poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb b/poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb deleted file mode 100644 index 1289c1686..000000000 --- a/poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "X.Org font package creation/installation utilities" - -require xorg-font-common.inc - -#Unicode is MIT -LICENSE = "BSD & MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \ - file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \ - file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \ - file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34" - -DEPENDS = "encodings util-macros" -DEPENDS_class-native = "util-macros-native" -RDEPENDS_${PN} = "mkfontdir mkfontscale encodings" -RDEPENDS_${PN}_class-native = "" - -BBCLASSEXTEND = "native" - -SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6" -SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921" - -SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts" diff --git a/poky/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb b/poky/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb new file mode 100644 index 000000000..ebe7a603f --- /dev/null +++ b/poky/meta/recipes-graphics/xorg-font/font-util_1.3.2.bb @@ -0,0 +1,22 @@ +SUMMARY = "X.Org font package creation/installation utilities" + +require xorg-font-common.inc + +#Unicode is MIT +LICENSE = "BSD & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \ + file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \ + file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \ + file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34" + +DEPENDS = "encodings util-macros" +DEPENDS_class-native = "util-macros-native" +RDEPENDS_${PN} = "mkfontdir mkfontscale encodings" +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native" + +SRC_URI[md5sum] = "3d6adb76fdd072db8c8fae41b40855e8" +SRC_URI[sha256sum] = "3ad880444123ac06a7238546fa38a2a6ad7f7e0cc3614de7e103863616522282" + +SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb deleted file mode 100644 index 6e2d65549..000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb +++ /dev/null @@ -1,45 +0,0 @@ -SECTION = "devel" -SUMMARY = "Linux Trace Toolkit KERNEL MODULE" -DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" -LICENSE = "LGPLv2.1 & GPLv2 & MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \ - file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ - file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \ - " - -inherit module - -COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux' - -SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ - file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ - " - -SRC_URI[md5sum] = "07c0b1ea4c1dd9d3edba8dc980fd93dd" -SRC_URI[sha256sum] = "e0d031005eef337c62de530a3b5b3e8fb1c732846eefcb23b8978edd2091f6e4" - -export INSTALL_MOD_DIR="kernel/lttng-modules" - -EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" - -do_install_append() { - # Delete empty directories to avoid QA failures if no modules were built - find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; -} - -python do_package_prepend() { - if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')): - bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN')) -} - -BBCLASSEXTEND = "devupstream:target" -LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3" -DEFAULT_PREFERENCE_class-devupstream = "-1" -SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.10 \ - file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ - file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ - " -SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31" -PV_class-devupstream = "2.10.10+git${SRCPV}" -S_class-devupstream = "${WORKDIR}/git" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb new file mode 100644 index 000000000..789a3be85 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.11.bb @@ -0,0 +1,46 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit KERNEL MODULE" +DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" +LICENSE = "LGPLv2.1 & GPLv2 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \ + " + +inherit module + +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux' + +SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ + file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ + " + +SRC_URI[md5sum] = "c618fb646514dfc1bf910cfd7cda4256" +SRC_URI[sha256sum] = "7f91e39b2e8e46d8bbba2b4c8c1614f1fb380611cd1a1fccc1d1859be26112f1" + +export INSTALL_MOD_DIR="kernel/lttng-modules" + +EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" + +do_install_append() { + # Delete empty directories to avoid QA failures if no modules were built + find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; +} + +python do_package_prepend() { + if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')): + bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN')) +} + +BBCLASSEXTEND = "devupstream:target" +LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3" +DEFAULT_PREFERENCE_class-devupstream = "-1" +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.10 \ + file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ + file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ + " +SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31" +PV_class-devupstream = "2.10.10+git${SRCPV}" +S_class-devupstream = "${WORKDIR}/git" +SRCREV_FORMAT ?= "lttng_git" diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust/0001-Add-config-time-check-for-new-gettid-API.patch b/poky/meta/recipes-kernel/lttng/lttng-ust/0001-Add-config-time-check-for-new-gettid-API.patch deleted file mode 100644 index 15db1d3af..000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-ust/0001-Add-config-time-check-for-new-gettid-API.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2bb3e259d0410f16a8b2058a05af434376a1583a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 26 Jul 2019 09:57:32 -0700 -Subject: [lttng-ust][PATCH] Add config time check for new gettid API - -glibc 2.30 introdoced this function see [1] -so its best to detect it -and provide fallbacks only if its not present - -[1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399 - -Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html] - -Signed-off-by: Khem Raj ---- - configure.ac | 1 + - include/lttng/ust-tid.h | 7 +++++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7fa059a..b1099c1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \ - clock_gettime \ - ftruncate \ - getpagesize \ -+ gettid \ - gettimeofday \ - localeconv \ - memchr \ -diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h -index e669d7e..7995c78 100644 ---- a/include/lttng/ust-tid.h -+++ b/include/lttng/ust-tid.h -@@ -26,7 +26,10 @@ - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -- -+#include -+#if HAVE_GETTID -+#include -+#else - #ifdef __linux__ - #include - #endif -@@ -49,5 +52,5 @@ static inline pid_t gettid(void) - return getpid(); - } - #endif -- -+#endif /* HAVE_GETTID */ - #endif /* _LTTNG_UST_TID_H */ --- -2.22.0 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.4.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.4.bb deleted file mode 100644 index 861a05e6a..000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.4.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x" -DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes." -HOMEPAGE = "http://lttng.org/ust" -BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust" - -LICENSE = "LGPLv2.1+ & MIT & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ - file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ - file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" - -PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ - am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ - PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ -" - -inherit autotools lib_package manpages python3native - -DEPENDS = "liburcu util-linux" -RDEPENDS_${PN}-bin = "python3-core" - -# For backwards compatibility after rename -RPROVIDES_${PN} = "lttng2-ust" -RREPLACES_${PN} = "lttng2-ust" -RCONFLICTS_${PN} = "lttng2-ust" - -PE = "2" - -SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ - file://lttng-ust-doc-examples-disable.patch \ - file://0001-Add-config-time-check-for-new-gettid-API.patch \ - " - -SRC_URI[md5sum] = "19916ff0dec23c90f985586a8cbd1fd2" -SRC_URI[sha256sum] = "75d5b4bb205c444a343e1297e14cd3a2503fc645a26710531cbd319c72c1a967" - -CVE_PRODUCT = "ust" - -PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" -PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3" - -FILES_${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*" -FILES_${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES_${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la" - -do_install_append() { - # Patch python tools to use Python 3; they should be source compatible, but - # still refer to Python 2 in the shebang - sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp -} diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb new file mode 100644 index 000000000..e8312afb2 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.5.bb @@ -0,0 +1,48 @@ +SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x" +DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes." +HOMEPAGE = "http://lttng.org/ust" +BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust" + +LICENSE = "LGPLv2.1+ & MIT & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ + file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ + file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" + +PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ + am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ +" + +inherit autotools lib_package manpages python3native + +DEPENDS = "liburcu util-linux" +RDEPENDS_${PN}-bin = "python3-core" + +# For backwards compatibility after rename +RPROVIDES_${PN} = "lttng2-ust" +RREPLACES_${PN} = "lttng2-ust" +RCONFLICTS_${PN} = "lttng2-ust" + +PE = "2" + +SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ + file://lttng-ust-doc-examples-disable.patch \ + " + +SRC_URI[md5sum] = "f0c86a9fa7dcfd0205fb42584a310b1c" +SRC_URI[sha256sum] = "06f9ed9b2198855b1c7fcbf15fe57297ee259409ffa1b3bad87321412d98bc35" + +CVE_PRODUCT = "ust" + +PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" +PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3" + +FILES_${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*" +FILES_${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES_${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la" + +do_install_append() { + # Patch python tools to use Python 3; they should be source compatible, but + # still refer to Python 2 in the shebang + sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp +} diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb index 7f00df0f8..8201c0cb6 100644 --- a/poky/meta/recipes-kernel/perf/perf.bb +++ b/poky/meta/recipes-kernel/perf/perf.bb @@ -244,8 +244,8 @@ do_configure_prepend () { install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h - # bits.h can have the same issuen as unistd.h, so we make the tools variant take precedence - install -D -m0644 ${S}/tools/include/linux/bits.h ${S}/include/linux/bits.h + # bits.h can have the same issue as unistd.h, so we make the tools variant take precedence + [ -e ${S}/tools/include/linux/bits.h ] && install -D -m0644 ${S}/tools/include/linux/bits.h ${S}/include/linux/bits.h } python do_package_prepend() { diff --git a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.bb b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.bb index 2d69d8bd7..307e37e3f 100644 --- a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.bb +++ b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.bb @@ -38,12 +38,12 @@ ARM_INSTRUCTION_SET_armv6 = "arm" # libpostproc was previously packaged from a separate recipe PROVIDES = "libav libpostproc" -DEPENDS = "alsa-lib zlib libogg nasm-native" +DEPENDS = "nasm-native" inherit autotools pkgconfig PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ - bzlib gpl lzma theora x264 \ + alsa bzlib gpl lzma theora x264 zlib \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" # libraries to build in addition to avutil @@ -57,6 +57,7 @@ PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" # features to support +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" @@ -68,13 +69,14 @@ PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" -PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" # Check codecs that require --enable-nonfree USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch new file mode 100644 index 000000000..a36fdc9a1 --- /dev/null +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch @@ -0,0 +1,35 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 6f720cebe632d7dc187c6907857d67ce1f7313d6 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Mon, 9 Sep 2019 22:48:49 +0100 +Subject: [PATCH] docs: don't include the type hierarchy + +gtk-doc can't generate a type hierarchy when scanning gst-libav, and gtk-doc +1.30 onwards doesn't write a file if there is no type hierarchy (unlike previous +releases, which wrote an empty file). This results in the build failing with +gtk-doc 1.30 onwards, so remove the type hierarchy section from the +documentation as it doesn't serve any purpose. + +Fixes https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/57 +--- + docs/plugins/gst-libav-plugins-docs.sgml | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/docs/plugins/gst-libav-plugins-docs.sgml b/docs/plugins/gst-libav-plugins-docs.sgml +index 75c68f4..f68d554 100644 +--- a/docs/plugins/gst-libav-plugins-docs.sgml ++++ b/docs/plugins/gst-libav-plugins-docs.sgml +@@ -32,9 +32,4 @@ + gst-libav Plugins + + +- +- +- Object Hierarchy +- +- + +-- +2.22.0 diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb index d94c3215d..d2629b506 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb @@ -18,6 +18,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz file://mips64_cpu_detection.patch \ file://0001-configure-check-for-armv7ve-variant.patch \ file://0001-fix-host-contamination.patch \ + file://gtkdoc-no-tree.patch \ " SRC_URI[md5sum] = "e3a201a45985ddc1327cd496046ca818" SRC_URI[sha256sum] = "dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a" @@ -28,11 +29,6 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz" inherit autotools pkgconfig upstream-version-is-even gtk-doc -# Disable documentation for now as it is failing with gtk-doc 1.30: -# gst-libav-plugins-docs.sgml:38: element include: XInclude error: -# could not load xml/tree_index.sgml, and no fallback was found -GTKDOC_ENABLED = "False" - # CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time, # compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the # libav copy included in the gst-libav package. diff --git a/poky/meta/recipes-multimedia/webp/libwebp_1.0.3.bb b/poky/meta/recipes-multimedia/webp/libwebp_1.0.3.bb index 01fc02d23..a4d1ae43d 100644 --- a/poky/meta/recipes-multimedia/webp/libwebp_1.0.3.bb +++ b/poky/meta/recipes-multimedia/webp/libwebp_1.0.3.bb @@ -25,11 +25,14 @@ EXTRA_OECONF = " \ --enable-libwebpdemux \ --enable-threading \ " + # Do not trust configure to determine if neon is available. # -EXTRA_OECONF_append_arm = " \ +EXTRA_OECONF_ARM = " \ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \ " +EXTRA_OECONF_append_arm = " ${EXTRA_OECONF_ARM}" +EXTRA_OECONF_append_armeb = " ${EXTRA_OECONF_ARM}" inherit autotools lib_package diff --git a/poky/meta/recipes-support/curl/curl_7.65.3.bb b/poky/meta/recipes-support/curl/curl_7.65.3.bb deleted file mode 100644 index 96f90fb8b..000000000 --- a/poky/meta/recipes-support/curl/curl_7.65.3.bb +++ /dev/null @@ -1,80 +0,0 @@ -SUMMARY = "Command line tool and library for client-side URL transfers" -HOMEPAGE = "http://curl.haxx.se/" -BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" -SECTION = "console/network" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=be5d9e1419c4363f4b32037a2d3b7ffa" - -SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ - file://0001-replace-krb5-config-with-pkg-config.patch \ -" - -SRC_URI[md5sum] = "bdd220d018c23e7f9ee82894e62a70bc" -SRC_URI[sha256sum] = "0a855e83be482d7bc9ea00e05bdb1551a44966076762f9650959179c89fce509" - -CVE_PRODUCT = "curl libcurl" -inherit autotools pkgconfig binconfig multilib_header - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib" -PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" -PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" - -# 'ares' and 'threaded-resolver' are mutually exclusive -PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares" -PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" -PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" -PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," -PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" -PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," -PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" -PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," -PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," -PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" -PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" -PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" -PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" -PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," -PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," -PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" -PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," -PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," -PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," -PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" -PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" -PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," -PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," -PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" -PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" -PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" - -EXTRA_OECONF = " \ - --disable-libcurl-option \ - --disable-ntlm-wb \ - --enable-crypto-auth \ - --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ - --without-libmetalink \ - --without-libpsl \ -" - -do_install_append_class-target() { - # cleanup buildpaths from curl-config - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - ${D}${bindir}/curl-config -} - -PACKAGES =+ "lib${BPN}" - -FILES_lib${BPN} = "${libdir}/lib*.so.*" -RRECOMMENDS_lib${BPN} += "ca-certificates" - -FILES_${PN} += "${datadir}/zsh" - -inherit multilib_script -MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/curl/curl_7.66.0.bb b/poky/meta/recipes-support/curl/curl_7.66.0.bb new file mode 100644 index 000000000..d1975f246 --- /dev/null +++ b/poky/meta/recipes-support/curl/curl_7.66.0.bb @@ -0,0 +1,80 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +HOMEPAGE = "http://curl.haxx.se/" +BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" +SECTION = "console/network" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=be5d9e1419c4363f4b32037a2d3b7ffa" + +SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-replace-krb5-config-with-pkg-config.patch \ +" + +SRC_URI[md5sum] = "c238aa394e3aa47ca4fcb0491774149f" +SRC_URI[sha256sum] = "6618234e0235c420a21f4cb4c2dd0badde76e6139668739085a70c4e2fe7a141" + +CVE_PRODUCT = "curl libcurl" +inherit autotools pkgconfig binconfig multilib_header + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib" +PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" +PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" + +# 'ares' and 'threaded-resolver' are mutually exclusive +PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares" +PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" +PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" +PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," +PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," +PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," +PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" +PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" +PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" +PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," +PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," +PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" +PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," +PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," +PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" +PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" +PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," +PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," +PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" +PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" +PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" + +EXTRA_OECONF = " \ + --disable-libcurl-option \ + --disable-ntlm-wb \ + --enable-crypto-auth \ + --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ + --without-libmetalink \ + --without-libpsl \ +" + +do_install_append_class-target() { + # cleanup buildpaths from curl-config + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${bindir}/curl-config +} + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*.so.*" +RRECOMMENDS_lib${BPN} += "ca-certificates" + +FILES_${PN} += "${datadir}/zsh" + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb index e5456dd9b..689cf8a75 100644 --- a/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb +++ b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb @@ -46,6 +46,9 @@ do_install_append() { do_install_append_class-native() { create_wrapper ${D}${bindir}/gpg2 GNUPG_BINDIR=${STAGING_BINDIR_NATIVE} + create_wrapper ${D}${bindir}/gpgconf GNUPG_BINDIR=${STAGING_BINDIR_NATIVE} + create_wrapper ${D}${bindir}/gpg-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE} + create_wrapper ${D}${bindir}/gpg-connect-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE} } PACKAGECONFIG ??= "gnutls" diff --git a/poky/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch b/poky/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch new file mode 100644 index 000000000..bfc9b9fca --- /dev/null +++ b/poky/meta/recipes-support/gnutls/libtasn1/fix-gtkdoc.patch @@ -0,0 +1,38 @@ +Upstream-Status: Backport [https://gitlab.com/gnutls/libtasn1/merge_requests/49] +Signed-off-by: Ross Burton + +From ebd4f871b5241809f6a5b461444a6d331e15c949 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Mon, 9 Sep 2019 13:11:39 +0100 +Subject: [PATCH] doc/reference: don't add empty object hierarchy chapter + +The object hierarchy section is empty because there are no GObjects in the +libtasn1 API. With gtk-doc 1.30 onwards if there are no objects then the object +hierarchy file won't exist, resulting in a failure when building the +documentation: + +| ../libtasn1-docs.xml:39: element include: XInclude error : could not load ../xml/tree_index.sgml, and no fallback was found + +Signed-off-by: Ross Burton +--- + doc/reference/libtasn1-docs.xml | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/doc/reference/libtasn1-docs.xml b/doc/reference/libtasn1-docs.xml +index accdb85..f88b888 100644 +--- a/doc/reference/libtasn1-docs.xml ++++ b/doc/reference/libtasn1-docs.xml +@@ -34,10 +34,6 @@ + + + +- +- Object Hierarchy +- +- + + API Index + +-- +2.20.1 + diff --git a/poky/meta/recipes-support/gnutls/libtasn1_4.14.bb b/poky/meta/recipes-support/gnutls/libtasn1_4.14.bb index 7158e483e..ef2c1956a 100644 --- a/poky/meta/recipes-support/gnutls/libtasn1_4.14.bb +++ b/poky/meta/recipes-support/gnutls/libtasn1_4.14.bb @@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \ file://dont-depend-on-help2man.patch \ file://fix-ldflags.patch \ + file://fix-gtkdoc.patch \ " DEPENDS = "bison-native" diff --git a/poky/meta/recipes-support/libical/libical_3.0.5.bb b/poky/meta/recipes-support/libical/libical_3.0.5.bb deleted file mode 100644 index 3832b20bf..000000000 --- a/poky/meta/recipes-support/libical/libical_3.0.5.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library" -HOMEPAGE = "https://github.com/libical/libical" -BUGTRACKER = "https://github.com/libical/libical/issues" -LICENSE = "LGPLv2.1 | MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \ - file://LICENSE.LGPL21.txt;md5=933adb561f159e7c3da079536f0ed871 \ - file://LICENSE.MPL2.txt;md5=9741c346eef56131163e13b9db1241b3" -SECTION = "libs" - -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz" - -SRC_URI[md5sum] = "9be4e8a1739a9c27e06aa8ce66b8cb34" -SRC_URI[sha256sum] = "7ad550c8c49c9b9983658e3ab3e68b1eee2439ec17b169a6b1e6ecb5274e78e6" -UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" - -inherit cmake pkgconfig - -PACKAGECONFIG ??= "icu" -PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db" -# ICU is used for RSCALE (RFC7529) support -PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu" - -# No need to use perl-native, the host perl is sufficient. -EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl" - -# The glib library can't be cross-compiled, disable for now. -# https://github.com/libical/libical/issues/394 -EXTRA_OECMAKE += "-DICAL_GLIB=false" - -do_install_append_class-target () { - # Remove build host references - sed -i \ - -e 's,${STAGING_LIBDIR},${libdir},g' \ - ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake -} diff --git a/poky/meta/recipes-support/libical/libical_3.0.6.bb b/poky/meta/recipes-support/libical/libical_3.0.6.bb new file mode 100644 index 000000000..032f3655e --- /dev/null +++ b/poky/meta/recipes-support/libical/libical_3.0.6.bb @@ -0,0 +1,35 @@ +SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library" +HOMEPAGE = "https://github.com/libical/libical" +BUGTRACKER = "https://github.com/libical/libical/issues" +LICENSE = "LGPLv2.1 | MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \ + file://LICENSE.LGPL21.txt;md5=933adb561f159e7c3da079536f0ed871 \ + file://LICENSE.MPL2.txt;md5=9741c346eef56131163e13b9db1241b3" +SECTION = "libs" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz" + +SRC_URI[md5sum] = "463a59244c6767b8e67b29379405e297" +SRC_URI[sha256sum] = "5c8a21c2b732ece4a33e5c862970b4f35a8548bbcda50de5695f6fc211ac4d97" +UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" + +inherit cmake pkgconfig + +PACKAGECONFIG ??= "icu" +PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db" +# ICU is used for RSCALE (RFC7529) support +PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu" + +# No need to use perl-native, the host perl is sufficient. +EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl" + +# The glib library can't be cross-compiled, disable for now. +# https://github.com/libical/libical/issues/394 +EXTRA_OECMAKE += "-DICAL_GLIB=false" + +do_install_append_class-target () { + # Remove build host references + sed -i \ + -e 's,${STAGING_LIBDIR},${libdir},g' \ + ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake +} diff --git a/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb b/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb index 1e48c576d..bbc673ff3 100644 --- a/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb +++ b/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb @@ -8,8 +8,6 @@ SRC_URI = "${GNU_MIRROR}/mpc/mpc-${PV}.tar.gz" SRC_URI[md5sum] = "4125404e41e482ec68282a2e687f6c73" SRC_URI[sha256sum] = "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e" -UPSTREAM_CHECK_URI = "http://www.multiprecision.org/mpc/download.html" - S = "${WORKDIR}/mpc-${PV}" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb index c4715a041..357f2fd3d 100644 --- a/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb +++ b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb @@ -36,3 +36,5 @@ DEBIAN_NOAUTONAME_${PN} = "1" # glib-networking is needed for SSL, proxies, etc. RRECOMMENDS_${PN} = "glib-networking" + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-support/libunwind/libunwind.inc b/poky/meta/recipes-support/libunwind/libunwind.inc index 572658966..76a1bf624 100644 --- a/poky/meta/recipes-support/libunwind/libunwind.inc +++ b/poky/meta/recipes-support/libunwind/libunwind.inc @@ -12,6 +12,7 @@ PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz" PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native" EXTRA_OECONF_arm = "--enable-debug-frame" +EXTRA_OECONF_armeb = "--enable-debug-frame" EXTRA_OECONF_aarch64 = "--enable-debug-frame" do_install_append () { diff --git a/poky/scripts/lib/resulttool/log.py b/poky/scripts/lib/resulttool/log.py index 2352c767d..f1bfd9950 100644 --- a/poky/scripts/lib/resulttool/log.py +++ b/poky/scripts/lib/resulttool/log.py @@ -8,12 +8,12 @@ import os import resulttool.resultutils as resultutils def show_ptest(result, ptest, logger): - if 'ptestresult.sections' in result: - if ptest in result['ptestresult.sections'] and 'log' in result['ptestresult.sections'][ptest]: - print(result['ptestresult.sections'][ptest]['log']) - return 0 + logdata = resultutils.ptestresult_get_log(result, ptest) + if logdata is not None: + print(logdata) + return 0 - print("ptest '%s' not found" % ptest) + print("ptest '%s' log not found" % ptest) return 1 def show_reproducible(result, reproducible, logger): @@ -25,7 +25,6 @@ def show_reproducible(result, reproducible, logger): print("reproducible '%s' not found" % reproducible) return 1 - def log(args, logger): results = resultutils.load_resultsdata(args.source) @@ -35,24 +34,24 @@ def log(args, logger): return 1 for _, run_name, _, r in resultutils.test_run_results(results): - if args.dump_ptest: - if 'ptestresult.sections' in r: - for name, ptest in r['ptestresult.sections'].items(): - if 'log' in ptest: - dest_dir = args.dump_ptest - if args.prepend_run: - dest_dir = os.path.join(dest_dir, run_name) - - os.makedirs(dest_dir, exist_ok=True) - - dest = os.path.join(dest_dir, '%s.log' % name) - print(dest) - with open(dest, 'w') as f: - f.write(ptest['log']) + if args.dump_ptest and 'ptestresult.sections' in r: + for name, ptest in r['ptestresult.sections'].items(): + logdata = resultutils.ptestresult_get_log(r, name) + if logdata is not None: + dest_dir = args.dump_ptest + if args.prepend_run: + dest_dir = os.path.join(dest_dir, run_name) + + os.makedirs(dest_dir, exist_ok=True) + dest = os.path.join(dest_dir, '%s.log' % name) + print(dest) + with open(dest, 'w') as f: + f.write(logdata) if args.raw_ptest: - if 'ptestresult.rawlogs' in r: - print(r['ptestresult.rawlogs']['log']) + rawlog = resultutils.ptestresult_get_rawlogs(r) + if rawlog is not None: + print(rawlog) else: print('Raw ptest logs not found') return 1 diff --git a/poky/scripts/lib/resulttool/report.py b/poky/scripts/lib/resulttool/report.py index 8b03717d2..883b52517 100644 --- a/poky/scripts/lib/resulttool/report.py +++ b/poky/scripts/lib/resulttool/report.py @@ -32,16 +32,22 @@ class ResultsTextReport(object): # Ensure tests without any test results still show up on the report for suite in result['ptestresult.sections']: if suite not in self.ptests[machine]: - self.ptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []} + self.ptests[machine][suite] = { + 'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', + 'failed_testcases': [], "testcases": set(), + } if 'duration' in result['ptestresult.sections'][suite]: self.ptests[machine][suite]['duration'] = result['ptestresult.sections'][suite]['duration'] if 'timeout' in result['ptestresult.sections'][suite]: self.ptests[machine][suite]['duration'] += " T" - return + return True + + # process test result try: _, suite, test = k.split(".", 2) except ValueError: - return + return True + # Handle 'glib-2.0' if 'ptestresult.sections' in result and suite not in result['ptestresult.sections']: try: @@ -50,11 +56,23 @@ class ResultsTextReport(object): suite = suite + "." + suite1 except ValueError: pass + if suite not in self.ptests[machine]: - self.ptests[machine][suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []} + self.ptests[machine][suite] = { + 'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', + 'failed_testcases': [], "testcases": set(), + } + + # do not process duplicate results + if test in self.ptests[machine][suite]["testcases"]: + print("Warning duplicate ptest result '{}.{}' for {}".format(suite, test, machine)) + return False + for tk in self.result_types: if status in self.result_types[tk]: self.ptests[machine][suite][tk] += 1 + self.ptests[machine][suite]["testcases"].add(test) + return True def handle_ltptest_result(self, k, status, result, machine): if machine not in self.ltptests: @@ -124,17 +142,20 @@ class ResultsTextReport(object): result = testresult.get('result', []) for k in result: test_status = result[k].get('status', []) + if k.startswith("ptestresult."): + if not self.handle_ptest_result(k, test_status, result, machine): + continue + elif k.startswith("ltpresult."): + self.handle_ltptest_result(k, test_status, result, machine) + elif k.startswith("ltpposixresult."): + self.handle_ltpposixtest_result(k, test_status, result, machine) + + # process result if it was not skipped by a handler for tk in self.result_types: if test_status in self.result_types[tk]: test_count_report[tk] += 1 if test_status in self.result_types['failed']: test_count_report['failed_testcases'].append(k) - if k.startswith("ptestresult."): - self.handle_ptest_result(k, test_status, result, machine) - if k.startswith("ltpresult."): - self.handle_ltptest_result(k, test_status, result, machine) - if k.startswith("ltpposixresult."): - self.handle_ltpposixtest_result(k, test_status, result, machine) return test_count_report def print_test_report(self, template_file_name, test_count_reports): @@ -210,8 +231,7 @@ class ResultsTextReport(object): # Check to see if there is already results for these kinds of tests for the machine for key in result['result'].keys(): testtype = str(key).split('.')[0] - if ((machine in self.ptests and testtype == "ptestresult" and self.ptests[machine]) or - (machine in self.ltptests and testtype == "ltpiresult" and self.ltptests[machine]) or + if ((machine in self.ltptests and testtype == "ltpiresult" and self.ltptests[machine]) or (machine in self.ltpposixtests and testtype == "ltpposixresult" and self.ltpposixtests[machine])): print("Already have test results for %s on %s, skipping %s" %(str(key).split('.')[0], machine, resultid)) skip = True diff --git a/poky/scripts/lib/resulttool/resultutils.py b/poky/scripts/lib/resulttool/resultutils.py index e595c185d..177fb25f9 100644 --- a/poky/scripts/lib/resulttool/resultutils.py +++ b/poky/scripts/lib/resulttool/resultutils.py @@ -7,6 +7,8 @@ # import os +import base64 +import zlib import json import scriptpath import copy @@ -117,6 +119,34 @@ def strip_ptestresults(results): del newresults[res]['result']['ptestresult.sections'][i]['log'] return newresults +def decode_log(logdata): + if isinstance(logdata, str): + return logdata + elif isinstance(logdata, dict): + if "compressed" in logdata: + data = logdata.get("compressed") + data = base64.b64decode(data.encode("utf-8")) + return zlib.decompress(data).decode("utf-8") + return None + +def ptestresult_get_log(results, section): + if 'ptestresult.sections' not in results: + return None + if section not in results['ptestresult.sections']: + return None + + ptest = results['ptestresult.sections'][section] + if 'log' not in ptest: + return None + return decode_log(ptest['log']) + +def ptestresult_get_rawlogs(results): + if 'ptestresult.rawlogs' not in results: + return None + if 'log' not in results['ptestresult.rawlogs']: + return None + return decode_log(results['ptestresult.rawlogs']['log']) + def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, ptestlogs=False): for res in results: if res: @@ -131,14 +161,17 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p f.write(json.dumps(resultsout, sort_keys=True, indent=4)) for res2 in results[res]: if ptestlogs and 'result' in results[res][res2]: - if 'ptestresult.rawlogs' in results[res][res2]['result']: + seriesresults = results[res][res2]['result'] + rawlogs = ptestresult_get_rawlogs(seriesresults) + if rawlogs is not None: with open(dst.replace(fn, "ptest-raw.log"), "w+") as f: - f.write(results[res][res2]['result']['ptestresult.rawlogs']['log']) - if 'ptestresult.sections' in results[res][res2]['result']: - for i in results[res][res2]['result']['ptestresult.sections']: - if 'log' in results[res][res2]['result']['ptestresult.sections'][i]: + f.write(rawlogs) + if 'ptestresult.sections' in seriesresults: + for i in seriesresults['ptestresult.sections']: + sectionlog = ptestresult_get_log(seriesresults, i) + if sectionlog is not None: with open(dst.replace(fn, "ptest-%s.log" % i), "w+") as f: - f.write(results[res][res2]['result']['ptestresult.sections'][i]['log']) + f.write(sectionlog) def git_get_result(repo, tags): git_objs = [] diff --git a/poky/scripts/oe-git-proxy b/poky/scripts/oe-git-proxy index bb2ed2a46..aa9b9dc9a 100755 --- a/poky/scripts/oe-git-proxy +++ b/poky/scripts/oe-git-proxy @@ -19,6 +19,9 @@ # AUTHORS # Darren Hart +# disable pathname expansion, NO_PROXY fields could start with "*" or be it +set -f + if [ $# -lt 2 -o "$1" = '--help' -o "$1" = '-h' ] ; then echo 'oe-git-proxy: error: the following arguments are required: host port' echo 'Usage: oe-git-proxy host port' @@ -41,10 +44,12 @@ if [ $# -lt 2 -o "$1" = '--help' -o "$1" = '-h' ] ; then fi # Locate the netcat binary -SOCAT=$(which socat 2>/dev/null) -if [ $? -ne 0 ]; then - echo "ERROR: socat binary not in PATH" 1>&2 - exit 1 +if [ -z "$SOCAT" ]; then + SOCAT=$(which socat 2>/dev/null) + if [ $? -ne 0 ]; then + echo "ERROR: socat binary not in PATH" 1>&2 + exit 1 + fi fi METHOD="" @@ -59,7 +64,7 @@ ipv4_val() { IP="$1" SHIFT=24 VAL=0 - for B in ${IP//./ }; do + for B in $( echo "$IP" | tr '.' ' ' ); do VAL=$(($VAL+$(($B<<$SHIFT)))) SHIFT=$(($SHIFT-8)) done @@ -102,7 +107,7 @@ match_host() { HOST=$1 GLOB=$2 - if [ -z "${HOST%%$GLOB}" ]; then + if [ -z "${HOST%%*$GLOB}" ]; then return 0 fi @@ -132,8 +137,8 @@ if [ -z "$ALL_PROXY" ]; then fi # Connect directly to hosts in NO_PROXY -for H in "${NO_PROXY//,/ }"; do - if match_host $1 "$H"; then +for H in $( echo "$NO_PROXY" | tr ',' ' ' ); do + if match_host $1 $H; then exec $SOCAT STDIO $METHOD fi done diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu index 4415e9b69..1a5aca98a 100755 --- a/poky/scripts/runqemu +++ b/poky/scripts/runqemu @@ -65,13 +65,15 @@ of the following environment variables (in any order): MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified) Simplified QEMU command-line options can be passed with: nographic - disable video console - sdl - choose the SDL frontend instead of the Gtk+ default - gtk-gl - enable virgl-based GL acceleration using Gtk+ frontend - gtk-gl-es - enable virgl-based GL acceleration, using OpenGL ES and Gtk+ frontend + sdl - choose the SDL UI frontend + gtk - choose the Gtk UI frontend + gl - enable virgl-based GL acceleration (also needs gtk option) + gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk option) egl-headless - enable headless EGL output; use vnc or spice to see it serial - enable a serial console on /dev/ttyS0 serialstdio - enable a serial console on the console (regardless of graphics mode) slirp - enable user networking, no root privileges is required + snapshot - don't write changes to back to images kvm - enable KVM when running x86/x86_64 (VT-capable CPU required) kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required) publicvnc - enable a VNC server open to all hosts @@ -436,10 +438,16 @@ class BaseConfig(object): self.kernel_cmdline_script += ' console=ttyS0' elif arg == 'sdl': self.qemu_opt_script += ' -display sdl' - elif arg == 'gtk-gl': - self.qemu_opt_script += ' -vga virtio -display gtk,gl=on' - elif arg == 'gtk-gl-es': - self.qemu_opt_script += ' -vga virtio -display gtk,gl=es' + elif arg == 'gtk': + if 'gl' in sys.argv[1:]: + self.qemu_opt_script += ' -vga virtio -display gtk,gl=on' + elif 'gl-es' in sys.argv[1:]: + self.qemu_opt_script += ' -vga virtio -display gtk,gl=es' + else: + self.qemu_opt_script += ' -display gtk' + elif arg == 'gl' or arg == 'gl-es': + # These args are handled inside sdl or gtk blocks above + pass elif arg == 'egl-headless': self.qemu_opt_script += ' -vga virtio -display egl-headless' # As runqemu can be run within bitbake (when using testimage, for example), -- cgit v1.2.3