From b58112e5af484d9314f6a4487b1bc8b292f952ef Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 7 Mar 2024 11:16:36 -0600 Subject: subtree updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meta-raspberrypi: 95a9103f91..92a9b7a012: Michał Kluska (1): rpi-base: Added missing HiFiBerry meta-openembedded: 9f0e513211..a0237019f5: Alexander Stein (1): libkcapi: Update HOMEPAGE url Changqing Li (4): syslog-ng: upgrade 4.0.1 -> 4.6.0 multipath-tools: upgrade 0.9.3 -> 0.9.8 nodejs: upgrade 20.11.0 -> 20.11.1 postgresql: upgrade 15.5 -> 16.2 Joe Slater (1): googletest: allow for shared libraries Khem Raj (17): python3-fastjsonschema: Add missing ptest deps python3-gpiod: Tests rely on configfs support in kernel python3-pyzmq: Add missing dep on python3-unixadmin for ptests python3-betamax: Upgrade to 0.9.0 libgpiod: Tests rely on configfs support in kernel keyutils: Add missing rdep for ptests fuse3: Make kmod as a recommendation instead of rdep for ptests drbd-utils: Disable warnings as errors influxdb: Define GOPROXY crucible: Define GOPROXY syzkaller: Fix build with go 1.21 e2tools: Delete unneeded files from ptest package ptest-packagelists-meta-oe: Move libgpiod out of PTESTS_PROBLEMS_META_OE ptest-packagelists-meta-python: Move py3-libgpiod out of PTESTS_PROBLEMS_META_PYTHON pgpool2: Upgrade to 4.5.1 pgpool2: Fix build with postgresql 16+ emacs: Add packageconfig for selinux support Krupal Ka Patel (1): python3-aiohappyeyeballs: Correct the typo of BBCLASSEXTEND Markus Volk (3): folks: update 0.15.6 -> 0.15.7 mozjs-115: update 115.6.0 -> 115.8.0 polkit: update 123 -> 124 Martin Jansa (3): ristretto: use python3native and depend on glib-2.0-native, python3-packaging-native xfce4-notifyd: use python3native and depend on python3-packaging-native fuse3: use 4 spaces for indentation Mingli Yu (1): nlohmann-json: Upgrade to 3.11.3 Randolph Sapp (1): glmark2: add upstream patch to not care about stencil config Ulrich Ölmann (1): signing.bbclass: fix typos Xiangyu Chen (3): iperf3: upgrade 3.15 -> 3.16 grpc: upgrade 1.60.0 -> 1.60.1 drbd-utils: upgrade 9.22.0 -> 9.27.0 Yi Zhao (7): openipmi: fix do_configure error when using dash cryptsetup: upgrade 2.6.1 -> 2.7.0 layer.conf: Add nativesdk-libdevmapper PREFERRED_RPROVIDER krb5: upgrade 1.20.2 -> 1.21.2 postfix: upgrade 3.7.3 -> 3.8.5 openldap: upgrade 2.5.16 -> 2.6.7 openvpn: upgrade 2.6.7 -> 2.6.9 Yoann Congal (3): drbd-utils: Drop a duplicated line in DESCRIPTION drbd-utils: Fix a udev rule reproducibility toybox-inittab: Fix serial getty reproducibility alperak (9): python3-google-auth: upgrade 2.28.0 -> 2.28.1 python3-netaddr: upgrade 0.10.1 -> 1.2.1 and add ptest ptest-packagelists-meta-python: Move python3-xlrd from PTESTS_PROBLEMS_META_PYTHON to PTESTS_FAST_META_PYTHON python3-wrapt: add ptest python3-freezegun: add recipe and add ptest python3-dateutil: upgrade 2.8.2 -> 2.9.0 python3-types-python-dateutil: add recipe python3-arrow: add ptest, update backend and runtime dependencies python3-marshmallow: upgrade 3.20.2 -> 3.21.1 and add ptest poky: 25d60ac6f6..7165c23237: Alexander Kanavin (48): xz: correct upstream version check python3-sphinxcontrib-jquery: add a recipe and make python3-sphinx-rtd-theme depend on it acl: upgrade 2.3.1 -> 2.3.2 appstream: upgrade 1.0.0 -> 1.0.2 boost: upgrade 1.83.0 -> 1.84.0 btrfs-tools: upgrade 6.5.3 -> 6.7.1 dnf: upgrade 4.18.2 -> 4.19.0 diffoscope: upgrade 253 -> 259 ell: upgrade 0.62 -> 0.63 elfutils: upgrade 0.189 -> 0.191 epiphany: upgrade 45.1 -> 45.3 gettext: upgrade 0.22.4 -> 0.22.5 glib-2.0: upgrade 2.78.3 -> 2.78.4 glib-networking: upgrade 2.78.0 -> 2.78.1 kmscube: upgrade to latest revision libbsd: upgrade 0.11.8 -> 0.12.1 libdnf: update 0.72.0 -> 0.73.0 libpciaccess: upgrade 0.17 -> 0.18 libpcre2: upgrade 10.42 -> 10.43 librepo: update 1.16.0 -> 1.17.0 libusb1: upgrade 1.0.26 -> 1.0.27 libxml2: upgrade 2.11.5 -> 2.12.5 linux-firmware: upgrade 20231211 -> 20240220 librsvg: upgrade 2.56.3 -> 2.57.1 lsof: upgrade 4.98.0 -> 4.99.3 man-pages: upgrade 6.05.01 -> 6.06 mc: upgrade 4.8.30 -> 4.8.31 mesa: upgrade 24.0.1 -> 24.0.2 minicom: upgrade 2.8 -> 2.9 nghttp2: upgrade 1.59.0 -> 1.60.0 orc: upgrade 0.4.37 -> 0.4.38 puzzles: upgrade to latest revision piglit: upgrade to latest revision python3-build: upgrade 1.0.3 -> 1.1.1 python3-dtschema: upgrade 2023.7 -> 2024.2 python3-jsonschema: upgrade 4.17.3 -> 4.21.1 and add new dependencies python3-ruamel-yaml: upgrade 0.17.35 -> 0.18.6 python3-setuptools: upgrade 69.0.3 -> 69.1.1 python3-wcwidth: upgrade 0.2.12 -> 0.2.13 repo: upgrade 2.41 -> 2.42 shaderc: update 2023.7 -> 2023.8 systemd: upgrade 255.1 -> 255.4 ttyrun: upgrade 2.30.0 -> 2.31.0 taglib: upgrade 1.13.1 -> 2.0 and add utfcpp recipe to support that update-rc.d: upgrade to latest revision vala: upgrade 0.56.13 -> 0.56.15 vulkan: upgrade 1.3.268.0 -> 1.3.275.0 webkitgtk: upgrade 2.42.2 -> 2.42.5 Bruce Ashfield (3): linux-yocto/cfg/6.6: drop CONFIG_DEBUG_CREDENTIALS linux-yocto/6.6: update to v6.6.20 linux-yocto/6.6: update CVE exclusions Changqing Li (3): rxvt-unicode: Fix installing of terminfo systemd: fix dead link /var/log/README go: filter out build specific path from the linker flags Chen Qi (2): systemd: use RDEPENDS for systemd-vconsole-setup systemd: remove systemd-bus-proxy settings Christian Taedcke (1): image_types.bbclass: fix vfat image names Eilís 'pidge' Ní Fhlannagáin (6): qemurunner.py: Fix error on calls to run_monitor screenshot-tests: Add initial screenshot test png files for core-image-sato oeqa/runtime/login: Proof of concept for screenshot testcases oeqa/runtime/login: Exclude qemuriscv64 oeqa/runtime/login: Add screenshot sample logic/timeout/dbus-wait sstatetests.py: Add testing for correct sstate permissions Fabio Estevam (1): u-boot: Move UBOOT_INITIAL_ENV back to u-boot.inc Geoff Parker (1): ref-manual: variables: adding multiple groups in GROUPADD_PARAM Johan Bezem (1): ref-manual: variables: correct sdk installation default path Jose Quaresma (7): go: rework patch to avoid identation go: bump 1.21.0 goarch: disable dynamic linking globally oeqa/gotoolchain: set GOPROXY go: upgrade 1.21.0 -> 1.21.5 go: upgrade 1.21.5 -> 1.21.7 go: bump 1.22.0 Khem Raj (4): mesa,mesa-gl: Fix build when dri3 is not enabled linux-yocto: Enable gpio-sim with ptests rust: Fix build failure re-appeared on riscv32 gdb: Upgrade 14.1 -> 14.2 Luca Ceresoli (2): ref-manual: tasks: do_cleanall: recommend using '-f' instead ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate Markus Volk (1): gtk+3: update 3.24.38 -> 3.24.41 Michael Opdenacker (4): core-image-full-cmdline: add package-management bitbake: utils: remove BB_ENV_PASSTHROUGH from preserved_envvars() dev-manual: packages: fix capitalization manuals: document VIRTUAL-RUNTIME variables Randy MacLeod (1): valgrind: skip intermittently failing ptests Richard Purdie (9): no-gplv3: Tweak for packagemangement in core-image-full-cmdline qemu: Replace workaround with proper usermode fix for shmat bitbake: fetch/git: Avoid clean upon failure go: Further tweak indentation in patch go: Drop linkmode with nativesdk/cross-canadian libpng: Update SRC_URI to avoid redirects oeqa/runtime/login: Various code improvements and fixes oeqa/runtime/login: Mask out the mouse panel icon for now oeqa/runtime/login: Fix dbus-wait timeout and loop conditional Robert P. J. Day (1): python3-cryptography_42.0.5.bb: delete redundant ptest packaging Ross Burton (2): Add genericarm64 MACHINE rxvt: add rxvt to desktop entry name Simone Weiß (4): coreutils: backport patch to fix heap overflow in split qemu: backport patch for ui/clipboard issue ref-manual: classes: add cve status check for oe.qa contributor-guide: add notes for tests Tim Orling (1): python3-hypothesis: upgrade 6.98.12 -> 6.98.15 Trevor Woerner (2): bmaptool: now part of Yocto Project dev-manual: bmaptool: rename Yi Zhao (1): expat: upgrdae 2.6.0 -> 2.6.1 Yoann Congal (1): bitbake: prserv/serv: Fix a PID file removal race on prserv stop Change-Id: Ie94e4df79e3d8f68aea3377f816d7106987a05f8 Signed-off-by: Patrick Williams --- .../recipes-support/fuse/fuse3_3.16.2.bb | 58 +- .../recipes-utils/e2tools/e2tools_git.bb | 3 + .../recipes-connectivity/folks/folks_0.15.6.bb | 28 - .../recipes-connectivity/folks/folks_0.15.7.bb | 28 + ...06-makedefs-Account-for-linux-6.x-version.patch | 35 - .../recipes-daemons/postfix/postfix.inc | 222 -- .../recipes-daemons/postfix/postfix_3.7.3.bb | 18 - .../recipes-daemons/postfix/postfix_3.8.5.bb | 240 ++ ...c-Add-an-option-to-disable-host-udev-vers.patch | 55 + .../0001-drbd-utils-support-usrmerge.patch | 17 +- .../0001-drbdmon-add-LDFLAGS-when-linking.patch | 14 +- .../0001-replace-off64_t-with-off_t.patch | 48 - ...p-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch | 96 - .../recipes-support/drbd/drbd-utils_9.22.0.bb | 74 - .../recipes-support/drbd/drbd-utils_9.27.0.bb | 76 + .../recipes-support/openipmi/openipmi_2.0.34.bb | 6 +- .../recipes-support/openvpn/openvpn_2.6.7.bb | 76 - .../recipes-support/openvpn/openvpn_2.6.9.bb | 76 + ...-unknown-type-name-fd_set-error-with-musl.patch | 33 - .../pgpool2/pgpool2/define_SIGNAL_ARGS.patch | 25 + .../recipes-support/pgpool2/pgpool2_4.4.1.bb | 53 - .../recipes-support/pgpool2/pgpool2_4.5.1.bb | 50 + meta-openembedded/meta-oe/classes/signing.bbclass | 6 +- .../conf/include/ptest-packagelists-meta-oe.inc | 2 +- meta-openembedded/meta-oe/conf/layer.conf | 1 + ...fig-By-default-don-t-care-about-the-stenc.patch | 103 + .../recipes-benchmark/glmark2/glmark2_git.bb | 1 + .../0001-configure.ac-check-for-CPP-prog.patch | 11 +- .../recipes-benchmark/iperf3/iperf3_3.15.bb | 31 - .../recipes-benchmark/iperf3/iperf3_3.16.bb | 31 + .../recipes-connectivity/krb5/krb5_1.20.2.bb | 201 -- .../recipes-connectivity/krb5/krb5_1.21.2.bb | 201 ++ .../recipes-core/toybox/toybox-inittab_0.8.2.bb | 2 +- .../recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb | 117 - .../recipes-crypto/cryptsetup/cryptsetup_2.7.0.bb | 117 + .../recipes-crypto/libkcapi/libkcapi_1.5.0.bb | 2 +- .../recipes-dbs/influxdb/influxdb_1.8.10.bb | 2 + .../files/0001-Add-support-for-RISC-V.patch | 31 +- .../files/0001-Improve-reproducibility.patch | 41 - .../0001-config_info.c-not-expose-build-info.patch | 119 - ...ure.ac-bypass-autoconf-2.69-version-check.patch | 32 - ...-postgresql-fix-ptest-failure-of-sysviews.patch | 42 - .../files/0002-Improve-reproducibility.patch | 41 + ...ure.ac-bypass-autoconf-2.69-version-check.patch | 32 + .../0004-config_info.c-not-expose-build-info.patch | 119 + ...-postgresql-fix-ptest-failure-of-sysviews.patch | 49 + .../meta-oe/recipes-dbs/postgresql/postgresql.inc | 13 +- .../recipes-dbs/postgresql/postgresql_15.5.bb | 16 - .../recipes-dbs/postgresql/postgresql_16.2.bb | 16 + .../meta-oe/recipes-devtools/grpc/grpc_1.60.0.bb | 67 - .../meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb | 67 + ...llocators-define-missing-rebind-type-3895.patch | 61 - ...iterators2-use-std-ranges-equals-for-rang.patch | 31 - .../nlohmann-json/nlohmann-json_3.11.2.bb | 47 - .../nlohmann-json/nlohmann-json_3.11.3.bb | 45 + ...Revert-io_uring-changes-from-libuv-1.46.0.patch | 3414 -------------------- ...01-deps-disable-io_uring-support-in-libuv.patch | 35 + ...Revert-io_uring-changes-from-libuv-1.45.0.patch | 1803 ----------- .../recipes-devtools/nodejs/nodejs_20.11.0.bb | 184 -- .../recipes-devtools/nodejs/nodejs_20.11.1.bb | 183 ++ .../recipes-extended/mozjs/mozjs-115/py3.12.patch | 2496 -------------- .../recipes-extended/mozjs/mozjs-115_115.6.0.bb | 98 - .../recipes-extended/mozjs/mozjs-115_115.8.0.bb | 97 + .../0001-jsauthority-Bump-mozjs-to-115.patch | 26 - ...service.in-disable-MemoryDenyWriteExecute.patch | 11 +- .../meta-oe/recipes-extended/polkit/polkit_123.bb | 54 - .../meta-oe/recipes-extended/polkit/polkit_124.bb | 61 + .../recipes-security/keyutils/keyutils_1.6.3.bb | 2 +- .../crucible/crucible_2023.11.02.bb | 3 +- .../meta-oe/recipes-support/emacs/emacs_29.1.bb | 1 + .../recipes-support/libgpiod/libgpiod_2.1.bb | 2 +- .../0001-RH-fixup-udev-rules-for-redhat.patch | 74 + ...0001-add-explicit-dependency-on-libraries.patch | 40 - ...0001-fix-bug-of-do_compile-and-do_install.patch | 43 - ...-the-property-blacklist-exception-builtin.patch | 63 + ...0003-RH-don-t-start-without-a-config-file.patch | 117 + .../0004-RH-use-rpm-optflags-if-present.patch | 55 + .../files/0005-RH-add-mpathconf.patch | 653 ++++ ...ds-from-kernel-cmdline-mpath.wwids-with-A.patch | 95 + ...-warn-on-invalid-regex-instead-of-failing.patch | 105 + ...reset-default-find_mutipaths-value-to-off.patch | 34 + ...ools-modify-create-config.mk-for-cross-co.patch | 40 + .../0010-Subject-PATCH-Always-use-devmapper.patch | 72 + ...0011-fix-bug-of-do_compile-and-do_install.patch | 41 + ...0012-add-explicit-dependency-on-libraries.patch | 40 + .../0021-RH-fixup-udev-rules-for-redhat.patch | 76 - ...-the-property-blacklist-exception-builtin.patch | 58 - ...0023-RH-don-t-start-without-a-config-file.patch | 119 - .../0024-RH-use-rpm-optflags-if-present.patch | 74 - .../files/0025-RH-add-mpathconf.patch | 655 ---- ...ds-from-kernel-cmdline-mpath.wwids-with-A.patch | 102 - ...-warn-on-invalid-regex-instead-of-failing.patch | 107 - ...reset-default-find_mutipaths-value-to-off.patch | 38 - ...ools-modify-Makefile.inc-for-cross-compil.patch | 59 - .../files/0030-Always-use-devmapper.patch | 77 - .../0031-Always-use-devmapper-for-kpartx.patch | 45 - ...efile-replace-perl-with-sed-in-install-ta.patch | 44 - .../multipath-tools/multipath-tools_0.9.3.bb | 125 - .../multipath-tools/multipath-tools_0.9.8.bb | 124 + .../recipes-support/openldap/openldap_2.5.16.bb | 234 -- .../recipes-support/openldap/openldap_2.6.7.bb | 231 ++ .../recipes-support/syslog-ng/syslog-ng_4.0.1.bb | 148 - .../recipes-support/syslog-ng/syslog-ng_4.6.0.bb | 148 + .../recipes-test/googletest/googletest_1.14.0.bb | 8 +- .../recipes-test/syzkaller/syzkaller_git.bb | 12 +- .../include/ptest-packagelists-meta-python.inc | 9 +- .../python/python3-aiohappyeyeballs_2.3.2.bb | 2 +- .../python/python3-arrow/run-ptest | 3 + .../recipes-devtools/python/python3-arrow_1.3.0.bb | 30 +- ...01-Drop-ptests-fixtures-and-recorde_modes.patch | 42 +- .../python/python3-betamax_0.8.1.bb | 29 - .../python/python3-betamax_0.9.0.bb | 27 + .../python/python3-dateutil_2.8.2.bb | 25 - .../python/python3-dateutil_2.9.0.bb | 25 + .../python/python3-fastjsonschema_2.18.0.bb | 1 + .../python/python3-freezegun/run-ptest | 3 + .../python/python3-freezegun_1.4.0.bb | 29 + .../python/python3-google-auth_2.28.0.bb | 26 - .../python/python3-google-auth_2.28.1.bb | 26 + .../recipes-devtools/python/python3-gpiod_2.1.3.bb | 1 + .../python/python3-marshmallow/run-ptest | 3 + .../python/python3-marshmallow_3.20.2.bb | 23 - .../python/python3-marshmallow_3.21.1.bb | 40 + .../python/python3-netaddr/run-ptest | 3 + .../python/python3-netaddr_0.10.1.bb | 13 - .../python/python3-netaddr_1.2.1.bb | 22 + .../python/python3-pyzmq_25.1.2.bb | 1 + ...ython3-types-python-dateutil_2.8.19.20240106.bb | 8 + .../python/python3-wrapt/run-ptest | 3 + .../python/python3-wrapt_1.16.0.bb | 16 +- .../recipes-apps/ristretto/ristretto_0.13.1.bb | 4 +- .../xfce4-notifyd/xfce4-notifyd_0.8.2.bb | 2 + 132 files changed, 4032 insertions(+), 11838 deletions(-) delete mode 100644 meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.6.bb create mode 100644 meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.7.bb delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/postfix/files/0006-makedefs-Account-for-linux-6.x-version.patch delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.7.3.bb create mode 100644 meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.5.bb create mode 100644 meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch delete mode 100644 meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch delete mode 100644 meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch delete mode 100644 meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb create mode 100644 meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb delete mode 100644 meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.7.bb create mode 100644 meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb delete mode 100644 meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2/0001-pgpool2-Fix-unknown-type-name-fd_set-error-with-musl.patch create mode 100644 meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch delete mode 100644 meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.4.1.bb create mode 100644 meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0003-GLVisualConfig-By-default-don-t-care-about-the-stenc.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.15.bb create mode 100644 meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb delete mode 100644 meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.20.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.2.bb delete mode 100644 meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch delete mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch delete mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch delete mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch create mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch create mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch create mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch create mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch delete mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_15.5.bb create mode 100644 meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-custom-allocators-define-missing-rebind-type-3895.patch delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Revert-io_uring-changes-from-libuv-1.46.0.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Revert-io_uring-changes-from-libuv-1.45.0.patch delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/py3.12.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.6.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-jsauthority-Bump-mozjs-to-115.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/polkit/polkit_123.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-RH-fixup-udev-rules-for-redhat.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0002-RH-Remove-the-property-blacklist-exception-builtin.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0003-RH-don-t-start-without-a-config-file.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0005-RH-add-mpathconf.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0007-RH-warn-on-invalid-regex-instead-of-failing.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0008-RH-reset-default-find_mutipaths-value-to-off.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0009-multipath-tools-modify-create-config.mk-for-cross-co.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0010-Subject-PATCH-Always-use-devmapper.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0011-fix-bug-of-do_compile-and-do_install.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0012-add-explicit-dependency-on-libraries.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0028-RH-reset-default-find_mutipaths-value-to-off.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.3.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb delete mode 100644 meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.5.16.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb delete mode 100644 meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.0.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-arrow/run-ptest delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.8.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.8.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun/run-ptest create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr/run-ptest delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_0.10.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.8.19.20240106.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt/run-ptest (limited to 'meta-openembedded') diff --git a/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb b/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb index 321851da5c..2b0797a6f5 100644 --- a/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +++ b/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb @@ -7,9 +7,11 @@ DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspac HOMEPAGE = "https://github.com/libfuse/libfuse" SECTION = "libs" LICENSE = "GPL-2.0-only & LGPL-2.0-only" -LIC_FILES_CHKSUM = "file://GPL2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LGPL2.txt;md5=4fbd65380cdd255951079008b364516c \ - file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66" +LIC_FILES_CHKSUM = " \ + file://GPL2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LGPL2.txt;md5=4fbd65380cdd255951079008b364516c \ + file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66 \ +" SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.gz \ " @@ -25,40 +27,40 @@ CVE_PRODUCT = "fuse_project:fuse" inherit meson pkgconfig ptest SRC_URI += " \ - file://run-ptest \ + file://run-ptest \ " RDEPENDS:${PN}-ptest += " \ python3-pytest \ python3-looseversion \ - kernel-module-cuse \ bash \ " +RRECOMMENDS:${PN}-ptest += " kernel-module-cuse" do_install_ptest() { - install -d ${D}${PTEST_PATH}/test - install -d ${D}${PTEST_PATH}/example - install -d ${D}${PTEST_PATH}/util - cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ - - example_excutables=`find ${B}/example -type f -executable` - util_excutables=`find ${B}/util -type f -executable` - test_excutables=`find ${B}/test -type f -executable` - - for e in $example_excutables - do - cp -rf $e ${D}${PTEST_PATH}/example/ - done - - for e in $util_excutables - do - cp -rf $e ${D}${PTEST_PATH}/util/ - done - - for e in $test_excutables - do - cp -rf $e ${D}${PTEST_PATH}/test - done + install -d ${D}${PTEST_PATH}/test + install -d ${D}${PTEST_PATH}/example + install -d ${D}${PTEST_PATH}/util + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ + + example_excutables=`find ${B}/example -type f -executable` + util_excutables=`find ${B}/util -type f -executable` + test_excutables=`find ${B}/test -type f -executable` + + for e in $example_excutables + do + cp -rf $e ${D}${PTEST_PATH}/example/ + done + + for e in $util_excutables + do + cp -rf $e ${D}${PTEST_PATH}/util/ + done + + for e in $test_excutables + do + cp -rf $e ${D}${PTEST_PATH}/test + done } DEPENDS = "udev" diff --git a/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb b/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb index a80b6f5985..1fa5e01874 100644 --- a/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb +++ b/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb @@ -65,6 +65,9 @@ do_install_ptest() { cp -r ../build "${D}${PTEST_PATH}" cp -r "${S}/build-aux" "${D}${PTEST_PATH}/build" cp -r "${S}" "${D}${PTEST_PATH}" + rm -rf ${D}${PTEST_PATH}/build/config.log ${D}${PTEST_PATH}/build/autom4te.cache \ + ${D}${PTEST_PATH}/git/.git ${D}${PTEST_PATH}/git/autom4te.cache + sed -i -e 's;${RECIPE_SYSROOT};;g' ${D}${PTEST_PATH}/build/config.status } RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl" diff --git a/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.6.bb b/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.6.bb deleted file mode 100644 index 5b9717f46e..0000000000 --- a/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.6.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Folks is a contact aggregation library." -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = " \ - glib-2.0 \ - libgee \ -" - -EXTRA_OEMESON += "-Dtests=false -Db_lto=false " - -CFLAGS:append:toolchain-clang = " -Wno-error=implicit-function-declaration" -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" -GIR_MESON_OPTION = "" - -PACKAGECONFIG[eds] = "-Deds_backend=true,-Deds_backend=false,evolution-data-server" -PACKAGECONFIG[bluez] = "-Dbluez_backend=true,-Dbluez_backend=false,evolution-data-server" -PACKAGECONFIG[ofono] = "-Deds_backend=true -Dofono_backend=true,-Dofono_backend=false,evolution-data-server" -PACKAGECONFIG[telepathy] = "-Dtelepathy_backend=true,-Dtelepathy_backend=false,telepathy-glib dbus-glib" -PACKAGECONFIG[import_tool] = "-Dimport_tool=true,-Dimport_tool=false,libxml2" -PACKAGECONFIG[inspect_tool] = "-Dinspect_tool=true,-Dinspect_tool=false" - -PACKAGECONFIG ??= "" - -inherit pkgconfig gnomebase gettext gobject-introspection vala features_check - -SRC_URI[archive.sha256sum] = "c866630c553f29ce9be1c7a60267cb4080a6bccf4b8d551dc4c7e6234d840248" diff --git a/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.7.bb b/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.7.bb new file mode 100644 index 0000000000..a229071785 --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.7.bb @@ -0,0 +1,28 @@ +SUMMARY = "Folks is a contact aggregation library." +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = " \ + glib-2.0 \ + libgee \ +" + +EXTRA_OEMESON += "-Dtests=false -Db_lto=false " + +CFLAGS:append:toolchain-clang = " -Wno-error=implicit-function-declaration" +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +GIR_MESON_OPTION = "" + +PACKAGECONFIG[eds] = "-Deds_backend=true,-Deds_backend=false,evolution-data-server" +PACKAGECONFIG[bluez] = "-Dbluez_backend=true,-Dbluez_backend=false,evolution-data-server" +PACKAGECONFIG[ofono] = "-Deds_backend=true -Dofono_backend=true,-Dofono_backend=false,evolution-data-server" +PACKAGECONFIG[telepathy] = "-Dtelepathy_backend=true,-Dtelepathy_backend=false,telepathy-glib dbus-glib" +PACKAGECONFIG[import_tool] = "-Dimport_tool=true,-Dimport_tool=false,libxml2" +PACKAGECONFIG[inspect_tool] = "-Dinspect_tool=true,-Dinspect_tool=false" + +PACKAGECONFIG ??= "" + +inherit pkgconfig gnomebase gettext gobject-introspection vala features_check + +SRC_URI[archive.sha256sum] = "120f219ef63212caa95ae7f6aeb64e29928b0b1a8b9452054304a00d0f347871" diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0006-makedefs-Account-for-linux-6.x-version.patch b/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0006-makedefs-Account-for-linux-6.x-version.patch deleted file mode 100644 index ad1704520c..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0006-makedefs-Account-for-linux-6.x-version.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e5ddcf9575437bacd64c2b68501b413014186a6a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 19 Oct 2022 10:15:01 -0700 -Subject: [PATCH] makedefs: Account for linux 6.x version - -Major version has bumped to 6 and script needs to know that - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - makedefs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/makedefs -+++ b/makedefs -@@ -613,7 +613,7 @@ EOF - : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"} - : ${PLUGIN_LD="${CC-gcc} -shared"} - ;; -- Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR -+ Linux.[3-6]*) SYSTYPE=LINUX$RELEASE_MAJOR - case "$CCARGS" in - *-DNO_DB*) ;; - *-DHAS_DB*) ;; ---- a/src/util/sys_defs.h -+++ b/src/util/sys_defs.h -@@ -751,7 +751,7 @@ extern int initgroups(const char *, int) - /* - * LINUX. - */ --#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) -+#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) || defined(LINUX6) - #define SUPPORTED - #define UINT32_TYPE unsigned int - #define UINT16_TYPE unsigned short diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc deleted file mode 100644 index 5133caaa46..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc +++ /dev/null @@ -1,222 +0,0 @@ -SUMMARY = "Postfix Mail Transport Agent" -DESCRIPTION = "Postfix is Wietse Venema's mail server that started life at \ -IBM research as an alternative to the widely-used Sendmail program. \ -Postfix attempts to be fast, easy to administer, and secure. The outsidei \ -has a definite Sendmail-ish flavor, but the inside is completely different." - -HOMEPAGE= "http://www.postfix.org" -SECTION = "mail" -DEPENDS = "db icu libpcre libnsl2 m4-native openssl postfix-native \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \ -" - -LICENSE = "IPL-1.0 | EPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a" - -S = "${WORKDIR}/postfix-${PV}" - -CLEANBROKEN = "1" - -BBCLASSEXTEND = "native" - -inherit pkgconfig update-rc.d useradd update-alternatives systemd lib_package - -INITSCRIPT_NAME = "postfix" -INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." -USERADD_PACKAGES = "${PN}-bin" -USERADD_PARAM:${PN}-bin = \ -"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ - -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ -" -GROUPADD_PARAM:${PN}-bin = "--system postfix;--system postdrop;--system vmail" - -export SYSLIBS = "${LDFLAGS}" - -# CCARGS specifies includes, defines -# AUXLIBS specifies libraries -# Linux2/Linux3 has HAS_DB defined -# makedefs will make CC to be CC+CCARGS - -# ldap support -export CCARGS-ldap = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}" -export AUXLIBS-ldap = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}" - -# no native openldap -export CCARGS-ldap:class-native = "" -export AUXLIBS-ldap:class-native = "" - -export CCARGS-nonis:libc-musl = "-DNO_NIS" -export CCARGS-nonis = "" - -# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH -# current openldap didn't enable SASL -export CCARGS-sasl = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${STAGING_INCDIR}/sasl', '', d)}" -export AUXLIBS-sasl = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}" -export CCARGS-sasl:class-native = "" -export AUXLIBS-sasl:class-native = "" - -# PCRE, TLS support default -export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" -export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" -export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf" - -# OPT,DEBUG is aready in CFLAGS -# ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS -EXTRA_OEMAKE += "OPT= DEBUG= OPTS= " - -do_compile () { - unset CFLAGS CPPFLAGS CXXFLAGS - local native_build - - native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}" - - # if not native build, then pass SYSTEM and RELEASE to makedefs - if [ "${native_build}" != "1" ]; then - # uname -s for target - SYSTEM="Linux" - - # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6 - RELEASE="2.6.34" - sed -i -e \ - "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \ - ${S}/Makefile.in - export BUILD_SYSROOT="${STAGING_DIR_HOST}" - else - # native build - export BUILD_SYSROOT="${STAGING_DIR_NATIVE}" - fi - - oe_runmake makefiles - oe_runmake -} - -do_install:prepend:class-native() { - export POSTCONF="bin/postconf" -} - -SYSTEMD_SERVICE:${PN} = "postfix.service" - -do_install () { - sh ./postfix-install 'install_root=${D}' \ - 'config_directory=${sysconfdir}/postfix' \ - 'daemon_directory=${libexecdir}/postfix' \ - 'command_directory=${sbindir}' \ - 'queue_directory=${localstatedir}/spool/postfix' \ - 'sendmail_path=${sbindir}/sendmail.postfix' \ - 'newaliases_path=${bindir}/newaliases' \ - 'mailq_path=${bindir}/mailq' \ - 'manpage_directory=${mandir}' \ - 'readme_directory=${datadir}/doc/postfix' \ - 'data_directory=${localstatedir}/lib/postfix' \ - -non-interactive - rm -rf ${D}${localstatedir}/spool/postfix - mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/${MLPREFIX}sample-main.cf - install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ - install -d ${D}${sysconfdir}/init.d - install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf - sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf - - install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/ - - install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix - install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system - sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service - sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service - sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service - - install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix - - install -m 770 -d ${D}${localstatedir}/spool/postfix - chown postfix:postfix ${D}${localstatedir}/spool/postfix - - install -m 0755 -d ${D}${localstatedir}/lib/postfix - chown postfix:nogroup ${D}${localstatedir}/lib/postfix - install -m 0755 -d ${D}${localstatedir}/spool/postfix - chown root:postfix ${D}${localstatedir}/spool/postfix - install -m 0700 -d ${D}${localstatedir}/spool/postfix/active - chown postfix:root ${D}${localstatedir}/spool/postfix/active - install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce - chown postfix:root ${D}${localstatedir}/spool/postfix/bounce - install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt - chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt - install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer - chown postfix:root ${D}${localstatedir}/spool/postfix/defer - install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred - chown postfix:root ${D}${localstatedir}/spool/postfix/deferred - install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush - chown postfix:root ${D}${localstatedir}/spool/postfix/flush - install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold - chown postfix:root ${D}${localstatedir}/spool/postfix/hold - install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming - chown postfix:root ${D}${localstatedir}/spool/postfix/incoming - install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved - chown postfix:root ${D}${localstatedir}/spool/postfix/saved - install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace - chown postfix:root ${D}${localstatedir}/spool/postfix/trace - install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop - chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop - install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid - chown root:root ${D}${localstatedir}/spool/postfix/pid - install -m 0700 -d ${D}${localstatedir}/spool/postfix/private - chown postfix:root ${D}${localstatedir}/spool/postfix/private - install -m 0710 -d ${D}${localstatedir}/spool/postfix/public - chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public - install -m 0755 -d ${D}${localstatedir}/spool/vmail - chown vmail:vmail ${D}${localstatedir}/spool/vmail - - chown :postdrop ${D}${sbindir}/postqueue - chown :postdrop ${D}${sbindir}/postdrop - chmod g+s ${D}${sbindir}/postqueue - chmod g+s ${D}${sbindir}/postdrop - - rm -rf ${D}/etc/postfix/makedefs.out -} - -do_install:append:class-native() { - ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases - ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq -} - -ALTERNATIVE:${PN}-bin = "sendmail mailq newaliases" -# /usr/lib/sendmial is required by LSB core test -ALTERNATIVE:${PN}-bin:linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail" -ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" -ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" -ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" -ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" -ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix" -ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail" - -ALTERNATIVE_PRIORITY = "120" - -ALTERNATIVE:${PN}-doc += "mailq.1 newaliases.1 sendmail.1" -ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1" -ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1" -ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1" - -pkg_postinst_ontarget:${PN}-cfg () { - touch /etc/aliases - newaliases - - # generate virtual_alias, default is hash - touch /etc/postfix/virtual_alias - postmap /etc/postfix/virtual_alias -} - -PACKAGES =+ "${PN}-cfg" -RDEPENDS:${PN}-cfg:class-target += "${PN}-bin" -RDEPENDS:${PN}:class-target += "${PN}-cfg" -# Exclude .debug directories from the main package -FILES:${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \ - ${libexecdir}/* ${systemd_unitdir}/*" -FILES:${PN}-cfg = "${sysconfdir}" -FILES:${PN}-dbg += "${libexecdir}/postfix/.debug" -ALLOW_EMPTY:${PN} = "1" diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.7.3.bb b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.7.3.bb deleted file mode 100644 index b54a97aeaf..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.7.3.bb +++ /dev/null @@ -1,18 +0,0 @@ -require postfix.inc - -SRC_URI += "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ - file://main.cf \ - file://postfix \ - file://internal_recipient \ - file://postfix.service \ - file://aliasesdb \ - file://check_hostname.sh \ - file://0001-Fix-makedefs.patch \ - file://0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch \ - file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ - file://0004-Fix-icu-config.patch \ - file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ - file://0006-makedefs-Account-for-linux-6.x-version.patch \ - " -SRC_URI[sha256sum] = "d22f3d37ef75613d5d573b56fc51ef097f2c0d0b0e407923711f71c1fb72911b" -UPSTREAM_CHECK_REGEX = "postfix\-(?P3\.6(\.\d+)+).tar.gz" diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.5.bb b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.5.bb new file mode 100644 index 0000000000..1c92c07a3c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.5.bb @@ -0,0 +1,240 @@ +SUMMARY = "Postfix Mail Transport Agent" +DESCRIPTION = "Postfix is Wietse Venema's mail server that started life at \ +IBM research as an alternative to the widely-used Sendmail program. \ +Postfix attempts to be fast, easy to administer, and secure. The outsidei \ +has a definite Sendmail-ish flavor, but the inside is completely different." + +HOMEPAGE= "http://www.postfix.org" +SECTION = "mail" +DEPENDS = "db icu libpcre libnsl2 m4-native openssl postfix-native \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \ +" + +LICENSE = "IPL-1.0 | EPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a" + +SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ + file://main.cf \ + file://postfix \ + file://internal_recipient \ + file://postfix.service \ + file://aliasesdb \ + file://check_hostname.sh \ + file://0001-Fix-makedefs.patch \ + file://0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch \ + file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ + file://0004-Fix-icu-config.patch \ + file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ + " + +SRC_URI[sha256sum] = "f3e827a2b2e410359ad25d31341970434ab07e36139f9a2ef93981b0ec564c85" + +UPSTREAM_CHECK_REGEX = "postfix\-(?P3\.8(\.\d+)+).tar.gz" + +S = "${WORKDIR}/postfix-${PV}" + +CLEANBROKEN = "1" + +BBCLASSEXTEND = "native" + +inherit pkgconfig update-rc.d useradd update-alternatives systemd lib_package + +INITSCRIPT_NAME = "postfix" +INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." +USERADD_PACKAGES = "${PN}-bin" +USERADD_PARAM:${PN}-bin = \ +"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ + -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ +" +GROUPADD_PARAM:${PN}-bin = "--system postfix;--system postdrop;--system vmail" + +export SYSLIBS = "${LDFLAGS}" + +# CCARGS specifies includes, defines +# AUXLIBS specifies libraries +# Linux2/Linux3 has HAS_DB defined +# makedefs will make CC to be CC+CCARGS + +# ldap support +export CCARGS-ldap = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}" +export AUXLIBS-ldap = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}" + +# no native openldap +export CCARGS-ldap:class-native = "" +export AUXLIBS-ldap:class-native = "" + +export CCARGS-nonis:libc-musl = "-DNO_NIS" +export CCARGS-nonis = "" + +# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH +# current openldap didn't enable SASL +export CCARGS-sasl = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${STAGING_INCDIR}/sasl', '', d)}" +export AUXLIBS-sasl = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}" +export CCARGS-sasl:class-native = "" +export AUXLIBS-sasl:class-native = "" + +# PCRE, TLS support default +export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" +export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" +export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf" + +# OPT,DEBUG is aready in CFLAGS +# ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS +EXTRA_OEMAKE += "OPT= DEBUG= OPTS= " + +do_compile () { + unset CFLAGS CPPFLAGS CXXFLAGS + local native_build + + native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}" + + # if not native build, then pass SYSTEM and RELEASE to makedefs + if [ "${native_build}" != "1" ]; then + # uname -s for target + SYSTEM="Linux" + + # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6 + RELEASE="2.6.34" + sed -i -e \ + "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \ + ${S}/Makefile.in + export BUILD_SYSROOT="${STAGING_DIR_HOST}" + else + # native build + export BUILD_SYSROOT="${STAGING_DIR_NATIVE}" + fi + + oe_runmake makefiles + oe_runmake +} + +do_install:prepend:class-native() { + export POSTCONF="bin/postconf" +} + +SYSTEMD_SERVICE:${PN} = "postfix.service" + +do_install () { + sh ./postfix-install 'install_root=${D}' \ + 'config_directory=${sysconfdir}/postfix' \ + 'daemon_directory=${libexecdir}/postfix' \ + 'command_directory=${sbindir}' \ + 'queue_directory=${localstatedir}/spool/postfix' \ + 'sendmail_path=${sbindir}/sendmail.postfix' \ + 'newaliases_path=${bindir}/newaliases' \ + 'mailq_path=${bindir}/mailq' \ + 'manpage_directory=${mandir}' \ + 'readme_directory=${datadir}/doc/postfix' \ + 'data_directory=${localstatedir}/lib/postfix' \ + -non-interactive + rm -rf ${D}${localstatedir}/spool/postfix + mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/${MLPREFIX}sample-main.cf + install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ + install -d ${D}${sysconfdir}/init.d + install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf + sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf + + install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/ + + install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix + install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service + sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service + + install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix + + install -m 770 -d ${D}${localstatedir}/spool/postfix + chown postfix:postfix ${D}${localstatedir}/spool/postfix + + install -m 0755 -d ${D}${localstatedir}/lib/postfix + chown postfix:nogroup ${D}${localstatedir}/lib/postfix + install -m 0755 -d ${D}${localstatedir}/spool/postfix + chown root:postfix ${D}${localstatedir}/spool/postfix + install -m 0700 -d ${D}${localstatedir}/spool/postfix/active + chown postfix:root ${D}${localstatedir}/spool/postfix/active + install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce + chown postfix:root ${D}${localstatedir}/spool/postfix/bounce + install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt + chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt + install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer + chown postfix:root ${D}${localstatedir}/spool/postfix/defer + install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred + chown postfix:root ${D}${localstatedir}/spool/postfix/deferred + install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush + chown postfix:root ${D}${localstatedir}/spool/postfix/flush + install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold + chown postfix:root ${D}${localstatedir}/spool/postfix/hold + install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming + chown postfix:root ${D}${localstatedir}/spool/postfix/incoming + install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved + chown postfix:root ${D}${localstatedir}/spool/postfix/saved + install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace + chown postfix:root ${D}${localstatedir}/spool/postfix/trace + install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop + chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop + install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid + chown root:root ${D}${localstatedir}/spool/postfix/pid + install -m 0700 -d ${D}${localstatedir}/spool/postfix/private + chown postfix:root ${D}${localstatedir}/spool/postfix/private + install -m 0710 -d ${D}${localstatedir}/spool/postfix/public + chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public + install -m 0755 -d ${D}${localstatedir}/spool/vmail + chown vmail:vmail ${D}${localstatedir}/spool/vmail + + chown :postdrop ${D}${sbindir}/postqueue + chown :postdrop ${D}${sbindir}/postdrop + chmod g+s ${D}${sbindir}/postqueue + chmod g+s ${D}${sbindir}/postdrop + + rm -rf ${D}/etc/postfix/makedefs.out +} + +do_install:append:class-native() { + ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases + ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq +} + +ALTERNATIVE:${PN}-bin = "sendmail mailq newaliases" +# /usr/lib/sendmial is required by LSB core test +ALTERNATIVE:${PN}-bin:linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail" +ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" +ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" +ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" +ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix" +ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail" + +ALTERNATIVE_PRIORITY = "120" + +ALTERNATIVE:${PN}-doc += "mailq.1 newaliases.1 sendmail.1" +ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1" +ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1" +ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1" + +pkg_postinst_ontarget:${PN}-cfg () { + touch /etc/aliases + newaliases + + # generate virtual_alias, default is hash + touch /etc/postfix/virtual_alias + postmap /etc/postfix/virtual_alias +} + +PACKAGES =+ "${PN}-cfg" +RDEPENDS:${PN}-cfg:class-target += "${PN}-bin" +RDEPENDS:${PN}:class-target += "${PN}-cfg" +# Exclude .debug directories from the main package +FILES:${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \ + ${libexecdir}/* ${systemd_unitdir}/*" +FILES:${PN}-cfg = "${sysconfdir}" +FILES:${PN}-dbg += "${libexecdir}/postfix/.debug" +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch new file mode 100644 index 0000000000..b98e1e70c7 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch @@ -0,0 +1,55 @@ +From 61991db099f66348dddbc3408e7ee8c05bda85cb Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Sat, 2 Mar 2024 16:23:07 +0100 +Subject: [PATCH] configure.ac: Add an option to disable host udev version + checks + +In cross-compilation environment, the build host might have an outdated +udev or no udev at all. But the user may still want to build with the +enabled udev rule (for its udev-enabled target). + +This patch adds a "--disable-udevchecks" option the disable build host +udev version check at configure-time and unconditionally install the +enabled udev rule. Without this new option, the behavior stays the same +(checks enabled). + +Signed-off-by: Yoann Congal +Upstream-Status: Backport [https://github.com/LINBIT/drbd-utils/commit/f2b5a7335ae52109dfb95a9d99ae20519c43d59a] +--- + configure.ac | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f1d69ea3..4c56d33b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -71,6 +71,11 @@ AC_ARG_WITH([udev], + [AS_HELP_STRING([--with-udev], + [Enable udev integration])], + [WITH_UDEV=$withval]) ++AC_ARG_ENABLE([udevchecks], ++ [AS_HELP_STRING([--disable-udevchecks], ++ [Disable host udev version checks])], ++ [], ++ [enable_udevchecks=yes]) + AC_ARG_WITH([xen], + [AS_HELP_STRING([--with-xen], + [Enable Xen integration])], +@@ -315,7 +320,7 @@ if test -z $GIT; then + AC_MSG_WARN(Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.) + fi + +-if test $UDEVADM = false && test $UDEVINFO = false; then ++if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false && test $UDEVINFO = false; then + if test "$WITH_UDEV" = "yes"; then + AC_MSG_WARN([udev support enabled, but neither udevadm nor udevinfo found on this system.]) + fi +@@ -423,7 +428,7 @@ else + test -z $INITDIR && INITDIR="$sysconfdir/init.d" + + dnl Our udev rules file is known to work only with udev >= 85 +- if test "$WITH_UDEV" = "yes"; then ++ if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes"; then + udev_version=$( set -- $($UDEVADM version); echo $1 ) + if test -z "$udev_version"; then + udev_version=$( set -- $($UDEVINFO -V); echo $3 ) diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch index 4e1f68be09..27f0a9b54a 100644 --- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch +++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch @@ -1,4 +1,4 @@ -From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001 +From 264ae7b062ac52a5545a8a562b51001f7ce7369d Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 21 Apr 2022 17:22:35 +0800 Subject: [PATCH] drbd-utils: support usermerge @@ -21,10 +21,10 @@ Signed-off-by: Sakib Sajal 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac -index ae575586..3d7deeae 100644 +index f1d69ea3..3289ac7d 100644 --- a/configure.ac +++ b/configure.ac -@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir, +@@ -183,7 +183,7 @@ AC_ARG_WITH(tmpfilesdir, AC_SUBST(tmpfilesdir) # set default early @@ -34,12 +34,12 @@ index ae575586..3d7deeae 100644 test x"$with_udev" = xyes ; then if test x"$PKG_CONFIG" != x; then diff --git a/scripts/Makefile.in b/scripts/Makefile.in -index fcd298e9..bab441a5 100644 +index aca15a22..a1cd2ffe 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in -@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) +@@ -91,11 +91,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) install -d $(DESTDIR)$(systemdunitdir) - install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/ + install -m 644 $(SYSTEMD_UNITS) $(DESTDIR)$(systemdunitdir)/ install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/ - install -d $(DESTDIR)/lib/drbd/scripts - install -m 755 drbd $(DESTDIR)/lib/drbd/scripts @@ -110,7 +110,7 @@ index 96c599e7..c81e95a6 100644 [Install] WantedBy=multi-user.target diff --git a/scripts/drbd@.service b/scripts/drbd@.service -index 76514c5b..e2e500ba 100644 +index 0fad10be..556f3857 100644 --- a/scripts/drbd@.service +++ b/scripts/drbd@.service @@ -35,8 +35,8 @@ RemainAfterExit=yes @@ -199,6 +199,3 @@ index 0fcefc5f..81f7d5ec 100644 spell: for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ --- -2.25.1 - diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch index 0bf4b2fce1..c7766067a1 100644 --- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch +++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch @@ -1,15 +1,17 @@ -From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001 +From bb044160faf4ae7615ddfdb17641dd88c33cde57 Mon Sep 17 00:00:00 2001 From: Sakib Sajal Date: Thu, 31 Mar 2022 15:09:58 -0400 Subject: [PATCH] drbdmon: add LDFLAGS when linking -Signed-off-by: Sakib Sajal ---- Upstream-Status: Pending - user/drbdmon/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +Signed-off-by: Sakib Sajal +--- + user/drbdmon/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/user/drbdmon/Makefile.in b/user/drbdmon/Makefile.in +index 7bd8987e..115a81b8 100644 --- a/user/drbdmon/Makefile.in +++ b/user/drbdmon/Makefile.in @@ -1,6 +1,6 @@ @@ -20,7 +22,7 @@ Upstream-Status: Pending CXX = @CXX@ LIBS = @LIBS@ -@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)) +@@ -72,7 +72,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)).cpp $(basename $(dsaext-obj)).h $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h drbdmon: $(ls-obj) diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch deleted file mode 100644 index 2841d0feaf..0000000000 --- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 21 Dec 2022 19:16:03 -0800 -Subject: [PATCH 1/2] replace off64_t with off_t - -off_t is already 64-bits when _FILE_OFFSET_BITS=64 -using off_t also makes it portable on musl systems - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - user/v9/drbdadm_main.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c -index 91e9507d..2030946c 100644 ---- a/user/v9/drbdadm_main.c -+++ b/user/v9/drbdadm_main.c -@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx) - return ex; - } - --static off64_t read_drbd_dev_size(int minor) -+static off_t read_drbd_dev_size(int minor) - { - char *path; - FILE *file; -- off64_t val; -+ off_t val; - int r; - - m_asprintf(&path, "/sys/block/drbd%d/size", minor); -@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx) - char *argv[MAX_ARGS]; - struct d_option *opt; - bool is_resize = !strcmp(ctx->cmd->name, "resize"); -- off64_t old_size = -1; -- off64_t target_size = 0; -- off64_t new_size; -+ off_t old_size = -1; -+ off_t target_size = 0; -+ off_t new_size; - int argc = 0; - int silent; - int ex; --- -2.39.0 - diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch deleted file mode 100644 index 45f7d6d415..0000000000 --- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch +++ /dev/null @@ -1,96 +0,0 @@ -From b70e5bf5bfa5fa2c2fffe08bcf300da1d3583602 Mon Sep 17 00:00:00 2001 -From: Lars Ellenberg -Date: Wed, 9 Nov 2022 11:01:54 +0100 -Subject: [PATCH 2/2] drbdadm: drop use of GLOB_MAGCHAR, use strchr heuristic only - -Fixup for -2022-09-05 4a1b5900 drbdadm: allow files from an expanded include glob to vanish - -When using the `include` statement, if the glob did not match any file, -there is nothing to do, silently ignore. Unless it was no glob, but a literal, -which we would expect to exist. - -Also, there is a race between expanding a glob and accessing the file. -That also should not happen for literals, though. - -Since we still had the heuristic anyways, because apparently |GLOB_MAGCHAR -does not happen for GLOB_NOMATCH returns, and there exist non-GNU libc that -don't (and likely won't) implement that extension, just forget about -(gl_flags & GLOB_MAGCHAR) but use the incomplete strchr heuristic only. - -Sourced From Alpine: https://git.alpinelinux.org/aports/tree/main/drbd-utils/drop_use_of_GLOB_MAGCHAR.patch - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - user/v9/drbdadm_parser.c | 35 ++++++++++++++++++++--------------- - 1 file changed, 20 insertions(+), 15 deletions(-) - -diff --git a/user/v9/drbdadm_parser.c b/user/v9/drbdadm_parser.c -index b2f6ed8a..9a0a775d 100644 ---- a/user/v9/drbdadm_parser.c -+++ b/user/v9/drbdadm_parser.c -@@ -1947,14 +1947,29 @@ void include_stmt(char *str) - size_t i; - int r; - -- cwd = pushd_to_current_config_file_unless_stdin(); -- -- /* """ -+ /* -+ * If the glob did not match any file, -+ * there is nothing to do, silently ignore. -+ * Unless it was no glob, but a literal, -+ * which we would expect to exist. -+ * -+ * """ - * As a GNU extension, pglob->gl_flags is set to the - * flags specified, ored with GLOB_MAGCHAR if any - * metacharacters were found. - * """ -+ * -+ * But apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns, -+ * at least not consistently :-( -+ * Also, there exist non-GNU libc -+ * So we have this incomplete strchr heuristic anyways. - */ -+ bool contains_glob_magic_char = -+ strchr(str, '*') || -+ strchr(str, '?') || -+ strchr(str, '['); -+ -+ cwd = pushd_to_current_config_file_unless_stdin(); - r = glob(str, 0, NULL, &glob_buf); - if (r == 0) { - for (i=0; i -Date: Mon, 20 Mar 2023 02:03:04 +0000 -Subject: [PATCH] pgpool2: Fix unknown type name 'fd_set' error with musl. - -| read.c: In function 'read_until_ready_for_query': -| read.c:53:24: error: storage size of 'timeoutval' isn't known -| 53 | struct timeval timeoutval; -| | ^~~~~~~~~~ -| read.c:54:9: error: unknown type name 'fd_set' -| 54 | fd_set readmask; -| | ^~~~~~ - -Upstream-Status: Inappropriate [embedded specific] -Signed-off-by: Lei Maohui ---- - src/tools/pgproto/read.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/tools/pgproto/read.c b/src/tools/pgproto/read.c -index c7fb548..4efe641 100644 ---- a/src/tools/pgproto/read.c -+++ b/src/tools/pgproto/read.c -@@ -19,6 +19,7 @@ - #include "../../include/config.h" - #include "pgproto/pgproto.h" - #include -+#include - #include - #include - #include --- -2.34.1 diff --git a/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch b/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch new file mode 100644 index 0000000000..3ae9b1bd9a --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch @@ -0,0 +1,25 @@ +Define SIGNAL_ARGS if its not defined, this is flagged with +newer C compilers e.g. clang18, where if it is not defined +then it ends up with compiler errors + +/usr/include/postgresql/server/port.h:488:28: error: a parameter l +ist without types is only allowed in a function definition +| 488 | typedef void (*pqsigfunc) (SIGNAL_ARGS); +| | ^ + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- a/src/include/pool_type.h ++++ b/src/include/pool_type.h +@@ -125,7 +125,9 @@ extern void ExceptionalCondition(const c + #define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN)) + #define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN)) + #define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN)) +- ++#ifndef SIGNAL_ARGS ++#define SIGNAL_ARGS int postgres_signal_arg ++#endif + /* + * It seems that sockaddr_storage is now commonly used in place of sockaddr. + * So, define it if it is not define yet, and create new SockAddr structure diff --git a/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.4.1.bb b/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.4.1.bb deleted file mode 100644 index 5e6e00caeb..0000000000 --- a/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.4.1.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "a language independent connection pool server for PostgreSQL." - -DESCRIPTION = "Pgpool-II is a middleware that works between PostgreSQL \ - servers and a PostgreSQL database client. It is distributed \ - under a license similar to BSD and MIT. It provides the \ - following features." - -HOMEPAGE = "http://pgpool.net" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" - -SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \ - file://0001-Fix-build-error-when-build-this-file.patch \ - file://0001-pgpool2-Fix-unknown-type-name-fd_set-error-with-musl.patch \ - file://pgpool.sysconfig \ - file://pgpool.service \ - " -SRC_URI[sha256sum] = "4b379bbba8e178128a1cee4a5bd1ae116dedb3da6121b728c18f0f54c881f328" - -S = "${WORKDIR}/pgpool-II-${PV}" - -inherit autotools-brokensep systemd - -SYSTEMD_SERVICE:${PN} = "pgpool.service" - -PACKAGECONFIG ??= " openssl libmemcached postgresql \ -" -PACKAGECONFIG[pam] = "--with-pam,,libpam" -PACKAGECONFIG[openssl] = "--with-openssl,,openssl" -PACKAGECONFIG[libmemcached] = "--with-memcached=${STAGING_INCDIR}/libmemcachedutil-1.0,,libmemcached" -PACKAGECONFIG[postgresql] = "--with-pgsql-includedir=${STAGING_INCDIR}/postgresql,, postgresql" - -EXTRA_OECONF += "--disable-static \ - --disable-rpath \ - " - -CFLAGS:append = " -fcommon " - -FILES:${PN} += "${datadir}/pgpool-II/ " - -do_configure:append() { - echo "#define HAVE_STRCHRNUL 1" >> ${S}/src/include/config.h - sed -i "s,#define USE_REPL_SNPRINTF 1,/* #undef USE_REPL_SNPRINTF*/,g" ${S}/src/include/config.h -} - -do_install:append() { - install -d ${D}${sysconfdir}/pgpool-II - install -D -m 0644 ${WORKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf - install -D -m 0644 ${S}/src/sample/pcp.conf.sample ${D}${sysconfdir}/pgpool-II/pcp.conf - install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample ${D}${sysconfdir}/pgpool-II/pool_hba.conf - install -Dm 0644 ${WORKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service -} diff --git a/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb b/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb new file mode 100644 index 0000000000..ffb879952c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb @@ -0,0 +1,50 @@ +SUMMARY = "A language independent connection pool server for PostgreSQL." + +DESCRIPTION = "Pgpool-II is a middleware that works between PostgreSQL \ + servers and a PostgreSQL database client. It is distributed \ + under a license similar to BSD and MIT. It provides the \ + following features." + +HOMEPAGE = "http://pgpool.net" + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" + +SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \ + file://0001-Fix-build-error-when-build-this-file.patch \ + file://define_SIGNAL_ARGS.patch \ + file://pgpool.sysconfig \ + file://pgpool.service \ + " +SRC_URI[sha256sum] = "8e14b0558a15dae8767c8e1acee3f2f6c7c08ebfffda66a359367eaaa56c3936" + +S = "${WORKDIR}/pgpool-II-${PV}" + +inherit autotools-brokensep systemd + +SYSTEMD_SERVICE:${PN} = "pgpool.service" + +PACKAGECONFIG ??= " openssl libmemcached postgresql \ +" +PACKAGECONFIG[pam] = "--with-pam,,libpam" +PACKAGECONFIG[openssl] = "--with-openssl,,openssl" +PACKAGECONFIG[libmemcached] = "--with-memcached=${STAGING_INCDIR}/libmemcachedutil-1.0,,libmemcached" +PACKAGECONFIG[postgresql] = "--with-pgsql-includedir=${STAGING_INCDIR}/postgresql,, postgresql" + +EXTRA_OECONF += "--disable-static \ + --disable-rpath \ + " +FILES:${PN} += "${datadir}/pgpool-II/ " + +do_configure:append() { + echo "#define HAVE_STRCHRNUL 1" >> ${S}/src/include/config.h + sed -i "s,#define USE_REPL_SNPRINTF 1,/* #undef USE_REPL_SNPRINTF*/,g" ${S}/src/include/config.h +} + +do_install:append() { + install -d ${D}${sysconfdir}/pgpool-II + install -D -m 0644 ${WORKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf + install -D -m 0644 ${S}/src/sample/pcp.conf.sample ${D}${sysconfdir}/pgpool-II/pcp.conf + install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample ${D}${sysconfdir}/pgpool-II/pool_hba.conf + install -Dm 0644 ${WORKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service +} diff --git a/meta-openembedded/meta-oe/classes/signing.bbclass b/meta-openembedded/meta-oe/classes/signing.bbclass index ec076d9685..f52d861b76 100644 --- a/meta-openembedded/meta-oe/classes/signing.bbclass +++ b/meta-openembedded/meta-oe/classes/signing.bbclass @@ -6,9 +6,9 @@ # This class provides a common workflow to use asymmetric (i.e. RSA) keys to # sign artifacts. Usually, the keys are either stored as simple files in the -# file system or on a HSM (Hardware Security Module). While files are easy to -# use, it's hard to verify that no copies of the private have been made and -# only authorized persons are able to use the key. Use of an HSM addresses +# file system or on an HSM (Hardware Security Module). While files are easy to +# use, it's hard to verify that no copies of the private key have been made +# and only authorized persons are able to use the key. Use of an HSM addresses # these risks by only allowing use of the key via an API (often PKCS #11). The # standard way of referring to a specific key in an HSM are PKCS #11 URIs (RFC # 7512). diff --git a/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc index a0e23bec42..fadec1221e 100644 --- a/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc +++ b/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc @@ -18,6 +18,7 @@ PTESTS_FAST_META_OE = "\ leveldb \ libcereal \ libee \ + libgpiod \ libio-pty-perl \ libmanette \ librelp \ @@ -62,7 +63,6 @@ PTESTS_PROBLEMS_META_OE ="\ jemalloc \ keyutils \ libdbi-perl \ - libgpiod \ libjcat \ libteam \ libxml++ \ diff --git a/meta-openembedded/meta-oe/conf/layer.conf b/meta-openembedded/meta-oe/conf/layer.conf index 6b64328c81..732a7e5d01 100644 --- a/meta-openembedded/meta-oe/conf/layer.conf +++ b/meta-openembedded/meta-oe/conf/layer.conf @@ -50,6 +50,7 @@ LICENSE_PATH += "${LAYERDIR}/licenses" PREFERRED_RPROVIDER_libdevmapper = "lvm2" PREFERRED_RPROVIDER_libdevmapper-native = "lvm2-native" +PREFERRED_RPROVIDER_nativesdk-libdevmapper = "nativesdk-lvm2" PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf" # Configures whether coreutils or uutils-coreutils is used. PREFERRED_PROVIDER_coreutils = "coreutils" diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0003-GLVisualConfig-By-default-don-t-care-about-the-stenc.patch b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0003-GLVisualConfig-By-default-don-t-care-about-the-stenc.patch new file mode 100644 index 0000000000..dc47af83e7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0003-GLVisualConfig-By-default-don-t-care-about-the-stenc.patch @@ -0,0 +1,103 @@ +From b59ec731c8c7e084b289e4ea92938faaebcc389d Mon Sep 17 00:00:00 2001 +From: Alexandros Frantzis +Date: Wed, 1 Nov 2023 13:43:00 +0200 +Subject: [PATCH] GLVisualConfig: By default don't care about the stencil + config component + +Our benchmarks don't use a stencil buffer, but its presence doesn't hurt +either, so don't mark configs that have one as unacceptable. Our scoring +still favors configs without one, unless the user explicitly specifies +otherwise with --visual-config. + +Upstream-Status: Backport [https://github.com/glmark2/glmark2/commit/5f23d540342ba69e12afeb6a1ac4f6fd36747975] +--- + doc/glmark2.1.in | 2 +- + src/gl-visual-config.cpp | 9 ++++++--- + src/gl-visual-config.h | 2 +- + src/options.cpp | 6 +++--- + 4 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/doc/glmark2.1.in b/doc/glmark2.1.in +index 015ba20..1f4a047 100644 +--- a/doc/glmark2.1.in ++++ b/doc/glmark2.1.in +@@ -38,7 +38,7 @@ Render to an off-screen surface + The visual configuration to use for the rendering target: + \'id=ID:red=R:green=G:blue=B:alpha=A:buffer=BUF:stencil=STENCIL:samples=SAMPLES'. + The parameters may be defined in any order, and any omitted parameters assume a +-default value of '0' (id, stencil, samples) or '1' (red, green, blue, alpha, buffer). ++default value of '0' (id, samples), -1 (stencil) or '1' (red, green, blue, alpha, buffer). + If 'id' is set to a non-zero value, all other parameters are ignored + .TP + \fB\-\-reuse\-context\fR +diff --git a/src/gl-visual-config.cpp b/src/gl-visual-config.cpp +index de92f93..665f53a 100644 +--- a/src/gl-visual-config.cpp ++++ b/src/gl-visual-config.cpp +@@ -26,7 +26,7 @@ + #include + + GLVisualConfig::GLVisualConfig(const std::string &s) : +- id(0), red(1), green(1), blue(1), alpha(1), depth(1), stencil(0), buffer(1), samples(0) ++ GLVisualConfig() + { + std::vector elems; + +@@ -85,7 +85,7 @@ GLVisualConfig::match_score(const GLVisualConfig &target) const + score += score_component(blue, target.blue, 4); + score += score_component(alpha, target.alpha, 4); + score += score_component(depth, target.depth, 1); +- score += score_component(stencil, target.stencil, 0); ++ score += score_component(stencil, target.stencil, 1); + score += score_component(buffer, target.buffer, 1); + score += score_component(samples, target.samples, -1); + +@@ -135,11 +135,14 @@ GLVisualConfig::score_component(int component, int target, int scale) const + * score for all components ranges from [0,MAXIMUM_COMPONENT_SCORE). + * If scale > 0, we reward the largest positive difference from target, + * otherwise the smallest positive difference from target. ++ * We also reward the smallest positive difference from the target, ++ * if the target < 0, i.e., we don't care about this value. + */ + int diff = std::abs(scale) * (component - target); + if (diff > 0) + { +- score = scale < 0 ? MAXIMUM_COMPONENT_SCORE - diff : diff; ++ score = (scale < 0 || target < 0) ? ++ MAXIMUM_COMPONENT_SCORE - diff : diff; + score = std::min(MAXIMUM_COMPONENT_SCORE, score); + score = std::max(0, score); + } +diff --git a/src/gl-visual-config.h b/src/gl-visual-config.h +index b28473f..013ce14 100644 +--- a/src/gl-visual-config.h ++++ b/src/gl-visual-config.h +@@ -31,7 +31,7 @@ class GLVisualConfig + { + public: + GLVisualConfig(): +- id(0), red(1), green(1), blue(1), alpha(1), depth(1), stencil(0), buffer(1), samples(0) {} ++ id(0), red(1), green(1), blue(1), alpha(1), depth(1), stencil(-1), buffer(1), samples(0) {} + GLVisualConfig(const std::string &s); + + /** +diff --git a/src/options.cpp b/src/options.cpp +index 8d1ec16..3a31d3d 100644 +--- a/src/options.cpp ++++ b/src/options.cpp +@@ -213,9 +213,9 @@ Options::print_help() + " target: 'id=ID:red=R:green=G:blue=B:alpha=A:buffer=BUF:\n" + " stencil=STENCIL:samples=SAMPLES'. The parameters may be\n" + " defined in any order, and any omitted parameters assume a\n" +- " default value of '0' (id, stencil, samples) or '1' (red,\n" +- " green, blue, alpha, buffer). If 'id' is set to a non-zero\n" +- " value, all other parameters are ignored\n" ++ " default value of '0' (id, samples), '-1' (stencil) or\n" ++ " '1' (red, green, blue, alpha, buffer). If 'id' is set to\n" ++ " a non-zero value, all other parameters are ignored\n" + " --reuse-context Use a single context for all scenes\n" + " (by default, each scene gets its own context)\n" + " -s, --size WxH Size of the output window (default: 800x600)\n" +-- +2.44.0 + diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb index a2d5b152f2..0b61d6ed62 100644 --- a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb +++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb @@ -17,6 +17,7 @@ SRC_URI = " \ git://github.com/glmark2/glmark2.git;protocol=https;branch=master \ file://0001-fix-dispmanx-build.patch \ file://0002-run-dispmanx-fullscreen.patch \ + file://0003-GLVisualConfig-By-default-don-t-care-about-the-stenc.patch \ " SRCREV = "42e3d8fe3aa88743ef90348138f643f7b04a9237" diff --git a/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-configure.ac-check-for-CPP-prog.patch b/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-configure.ac-check-for-CPP-prog.patch index 09e3d9ca9c..a67be4d4f6 100644 --- a/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-configure.ac-check-for-CPP-prog.patch +++ b/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-configure.ac-check-for-CPP-prog.patch @@ -1,4 +1,4 @@ -From 4801363fbff12bf1019aaf90142981702cecff92 Mon Sep 17 00:00:00 2001 +From 80d208e47a525c915e3961efa61ccf91120ffafa Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Wed, 3 Feb 2021 20:44:34 +0000 Subject: [PATCH] configure.ac: check for CPP prog @@ -10,20 +10,19 @@ Absence of check for CPP_PROG causes following build errors: Upstream-Status: Pending Signed-off-by: Andrey Zhizhikin - --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac -index 53a4db4..3462b3e 100644 +index 2594b39..559b160 100644 --- a/configure.ac +++ b/configure.ac -@@ -48,6 +48,7 @@ AC_CANONICAL_HOST +@@ -49,6 +49,7 @@ AC_CANONICAL_HOST # Checks for tools: c compiler, ranlib (used for creating static libraries), # symlinks and libtool AC_PROG_CC +AC_PROG_CPP - AC_PROG_RANLIB AC_PROG_LN_S - LT_INIT + + # Add -Wall if we are using GCC. diff --git a/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.15.bb b/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.15.bb deleted file mode 100644 index 156bb5a3e4..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.15.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Network benchmark tool" -DESCRIPTION = "\ -iperf is a tool for active measurements of the maximum achievable bandwidth \ -on IP networks. It supports tuning of various parameters related to timing, \ -protocols, and buffers. For each test it reports the bandwidth, loss, and \ -other parameters." - -HOMEPAGE = "http://software.es.net/iperf/" -SECTION = "console/network" -BUGTRACKER = "https://github.com/esnet/iperf/issues" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc6301c8256ceb8f71c9e3c2ae9096b9" - -SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ - file://0002-Remove-pg-from-profile_CFLAGS.patch \ - file://0001-configure.ac-check-for-CPP-prog.patch \ - " - -SRCREV = "917d2f02188f6f4cdc443df7923a4bde72017d92" - -S = "${WORKDIR}/git" - -inherit autotools - -PACKAGECONFIG ?= "openssl" - -PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" -PACKAGECONFIG[openssl] = "--with-openssl=${RECIPE_SYSROOT}${prefix},--without-openssl,openssl" - -CFLAGS += "-D_GNU_SOURCE" diff --git a/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb b/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb new file mode 100644 index 0000000000..5cec4c6874 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb @@ -0,0 +1,31 @@ +SUMMARY = "Network benchmark tool" +DESCRIPTION = "\ +iperf is a tool for active measurements of the maximum achievable bandwidth \ +on IP networks. It supports tuning of various parameters related to timing, \ +protocols, and buffers. For each test it reports the bandwidth, loss, and \ +other parameters." + +HOMEPAGE = "http://software.es.net/iperf/" +SECTION = "console/network" +BUGTRACKER = "https://github.com/esnet/iperf/issues" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc6301c8256ceb8f71c9e3c2ae9096b9" + +SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ + file://0002-Remove-pg-from-profile_CFLAGS.patch \ + file://0001-configure.ac-check-for-CPP-prog.patch \ + " + +SRCREV = "f9481e1cd35159929458513692e4a8f9fdd1bd6f" + +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG ?= "openssl" + +PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" +PACKAGECONFIG[openssl] = "--with-openssl=${RECIPE_SYSROOT}${prefix},--without-openssl,openssl" + +CFLAGS += "-D_GNU_SOURCE" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.20.2.bb b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.20.2.bb deleted file mode 100644 index e1fe5e5671..0000000000 --- a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.20.2.bb +++ /dev/null @@ -1,201 +0,0 @@ -SUMMARY = "A network authentication protocol" -DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \ - Kerberos is a trusted third-party service. That means that there is a \ - third party (the Kerberos server) that is trusted by all the entities on \ - the network (users and services, usually called "principals"). \ - . \ - This is the MIT reference implementation of Kerberos V5. \ - . \ - This package contains the Kerberos key server (KDC). The KDC manages all \ - authentication credentials for a Kerberos realm, holds the master keys \ - for the realm, and responds to authentication requests. This package \ - should be installed on both master and slave KDCs." - -HOMEPAGE = "http://web.mit.edu/Kerberos/" -SECTION = "console/network" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=3c7414a99de5452b8f809ae2753b0855" - -inherit autotools-brokensep binconfig perlnative systemd update-rc.d pkgconfig - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" -SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ - file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ - file://crosscompile_nm.patch \ - file://etc/init.d/krb5-kdc \ - file://etc/init.d/krb5-admin-server \ - file://etc/default/krb5-kdc \ - file://etc/default/krb5-admin-server \ - file://krb5-kdc.service \ - file://krb5-admin-server.service \ -" -SRC_URI[md5sum] = "7ac456e97c4959ebe5c836dc2f5aab2c" -SRC_URI[sha256sum] = "7d8d687d42aed350c2525cb69a4fc3aa791694da6761dccc1c42c2ee7796b5dd" - -CVE_PRODUCT = "kerberos" -CVE_VERSION = "5-${PV}" - -S = "${WORKDIR}/${BP}/src" - -DEPENDS = "bison-native ncurses util-linux e2fsprogs e2fsprogs-native openssl" - -PACKAGECONFIG ??= "pkinit" -PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" -PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl" -PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils" -PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" -PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" -PACKAGECONFIG[pkinit] = "--enable-pkinit, --disable-pkinit" - -EXTRA_OECONF += "--with-system-et --disable-rpath" -CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \ - ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ - ac_cv_file__etc_TIMEZONE=no" - -CFLAGS:append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" -CFLAGS:append:riscv64 = " -D_REENTRANT -pthread" -LDFLAGS:append = " -pthread" - -do_configure() { - gnu-configize --force - autoreconf - oe_runconf -} - -do_install:append() { - rm -rf ${D}/${localstatedir}/run - rm -f ${D}${bindir}/sclient - rm -f ${D}${bindir}/sim_client - rm -f ${D}${bindir}/uuclient - rm -f ${D}${sbindir}/krb5-send-pr - rm -f ${D}${sbindir}/sim_server - rm -f ${D}${sbindir}/sserver - rm -f ${D}${sbindir}/uuserver - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default - install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default - - mkdir -p ${D}/${sysconfdir}/default/volatiles - echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ - > ${D}${sysconfdir}/default/volatiles/87_krb5 - - echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/krb5kdc - - - -" \ - > ${D}${sysconfdir}/tmpfiles.d/krb5.conf - - mkdir -p ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} - fi - - sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ - -i ${D}${bindir}/krb5-config -} - -PACKAGE_BEFORE_PN =+ "${PN}-admin-server \ - ${PN}-gss-samples \ - ${PN}-k5tls \ - ${PN}-kdc \ - ${PN}-kdc-ldap \ - ${PN}-kpropd \ - ${PN}-otp \ - ${PN}-pkinit \ - ${PN}-spake \ - ${PN}-user \ - libgssapi-krb5 \ - libgssrpc \ - libk5crypto \ - libkadm5clnt-mit \ - libkadm5srv-mit \ - libkdb5 \ - libkrad \ - libkrb5 \ - libkrb5support \ - libverto" - -FILES:${PN} = "${libdir}/krb5/plugins/preauth/test.so" -FILES:${PN}-doc += "${datadir}/examples" -FILES:${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" - -FILES:${PN}-admin-server = "${sbindir}/kadmin.local \ - ${sbindir}/kadmind \ - ${sbindir}/kprop \ - ${sysconfdir}/default/krb5-admin-server \ - ${sysconfdir}/init.d/krb5-admin-server \ - ${systemd_system_unitdir}/krb5-admin-server.service" - -FILES:${PN}-gss-samples = "${bindir}/gss-client \ - ${sbindir}/gss-server" - -FILES:${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" - -FILES:${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ - ${localstatedir}/krb5kdc \ - ${sbindir}/kdb5_util \ - ${sbindir}/kproplog \ - ${sbindir}/krb5kdc \ - ${sysconfdir}/default/krb5-kdc \ - ${sysconfdir}/default/volatiles/87_krb5 \ - ${sysconfdir}/init.d/krb5-kdc \ - ${sysconfdir}/tmpfiles.d/krb5.conf \ - ${systemd_system_unitdir}/krb5-kdc.service" - -FILES:${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \ - ${libdir}/krb5/plugins/kdb/kldap.so \ - ${sbindir}/kdb5_ldap_util" - -FILES:${PN}-kpropd = "${sbindir}/kpropd" -FILES:${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" -FILES:${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" -FILES:${PN}-spake = "${libdir}/krb5/plugins/preauth/spake.so" -FILES:${PN}-user = "${bindir}/k*" - -FILES:libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" -FILES:libgssrpc = "${libdir}/libgssrpc${SOLIBS}" -FILES:libk5crypto = "${libdir}/libk5crypto${SOLIBS}" -FILES:libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" -FILES:libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" -FILES:libkdb5 = "${libdir}/libkdb5${SOLIBS}" -FILES:libkrad = "${libdir}/libkrad${SOLIBS}" -FILES:libkrb5 = "${libdir}/libkrb5${SOLIBS} \ - ${libdir}/krb5/plugins/authdata \ - ${libdir}/krb5/plugins/libkrb5" -FILES:libkrb5support = "${libdir}/libkrb5support${SOLIBS}" -FILES:libverto = "${libdir}/libverto${SOLIBS}" - -RDEPENDS:${PN}-kadmin-server = "${PN}-kdc" -RDEPENDS:${PN}-kpropd = "${PN}-kdc" - -INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" -INITSCRIPT_NAME:${PN}-admin-server = "krb5-admin-server" -INITSCRIPT_NAME:${PN}-kdc = "krb5-kdc" - -SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" -SYSTEMD_SERVICE:${PN}-admin-server = "krb5-admin-server.service" -SYSTEMD_SERVICE:${PN}-kdc = "krb5-kdc.service" - -pkg_postinst:${PN}-kdc () { - if [ -z "$D" ]; then - if command -v systemd-tmpfiles >/dev/null; then - systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf - elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then - ${sysconfdir}/init.d/populate-volatile.sh update - fi - fi -} - -BBCLASSEXTEND = "native nativesdk" - -inherit multilib_script -MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/krb5-config" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.2.bb b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.2.bb new file mode 100644 index 0000000000..7af33e4e7e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.2.bb @@ -0,0 +1,201 @@ +SUMMARY = "A network authentication protocol" +DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \ + Kerberos is a trusted third-party service. That means that there is a \ + third party (the Kerberos server) that is trusted by all the entities on \ + the network (users and services, usually called "principals"). \ + . \ + This is the MIT reference implementation of Kerberos V5. \ + . \ + This package contains the Kerberos key server (KDC). The KDC manages all \ + authentication credentials for a Kerberos realm, holds the master keys \ + for the realm, and responds to authentication requests. This package \ + should be installed on both master and slave KDCs." + +HOMEPAGE = "http://web.mit.edu/Kerberos/" +SECTION = "console/network" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=32cb3a99207053d9f5c1ef177c4d6e34" + +inherit autotools-brokensep binconfig perlnative systemd update-rc.d pkgconfig + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" +SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ + file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ + file://crosscompile_nm.patch \ + file://etc/init.d/krb5-kdc \ + file://etc/init.d/krb5-admin-server \ + file://etc/default/krb5-kdc \ + file://etc/default/krb5-admin-server \ + file://krb5-kdc.service \ + file://krb5-admin-server.service \ +" + +SRC_URI[sha256sum] = "9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491" + +CVE_PRODUCT = "kerberos" +CVE_VERSION = "5-${PV}" + +S = "${WORKDIR}/${BP}/src" + +DEPENDS = "bison-native ncurses util-linux e2fsprogs e2fsprogs-native openssl" + +PACKAGECONFIG ??= "pkinit" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" +PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl" +PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[pkinit] = "--enable-pkinit, --disable-pkinit" + +EXTRA_OECONF += "--with-system-et --disable-rpath" +CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \ + ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ + ac_cv_file__etc_TIMEZONE=no" + +CFLAGS:append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" +CFLAGS:append:riscv64 = " -D_REENTRANT -pthread" +LDFLAGS:append = " -pthread" + +do_configure() { + gnu-configize --force + autoreconf + oe_runconf +} + +do_install:append() { + rm -rf ${D}/${localstatedir}/run + rm -f ${D}${bindir}/sclient + rm -f ${D}${bindir}/sim_client + rm -f ${D}${bindir}/uuclient + rm -f ${D}${sbindir}/krb5-send-pr + rm -f ${D}${sbindir}/sim_server + rm -f ${D}${sbindir}/sserver + rm -f ${D}${sbindir}/uuserver + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default + install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + + mkdir -p ${D}/${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ + > ${D}${sysconfdir}/default/volatiles/87_krb5 + + echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/krb5kdc - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/krb5.conf + + mkdir -p ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} + fi + + sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ + -i ${D}${bindir}/krb5-config +} + +PACKAGE_BEFORE_PN =+ "${PN}-admin-server \ + ${PN}-gss-samples \ + ${PN}-k5tls \ + ${PN}-kdc \ + ${PN}-kdc-ldap \ + ${PN}-kpropd \ + ${PN}-otp \ + ${PN}-pkinit \ + ${PN}-spake \ + ${PN}-user \ + libgssapi-krb5 \ + libgssrpc \ + libk5crypto \ + libkadm5clnt-mit \ + libkadm5srv-mit \ + libkdb5 \ + libkrad \ + libkrb5 \ + libkrb5support \ + libverto" + +FILES:${PN} = "${libdir}/krb5/plugins/preauth/test.so" +FILES:${PN}-doc += "${datadir}/examples" +FILES:${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" + +FILES:${PN}-admin-server = "${sbindir}/kadmin.local \ + ${sbindir}/kadmind \ + ${sbindir}/kprop \ + ${sysconfdir}/default/krb5-admin-server \ + ${sysconfdir}/init.d/krb5-admin-server \ + ${systemd_system_unitdir}/krb5-admin-server.service" + +FILES:${PN}-gss-samples = "${bindir}/gss-client \ + ${sbindir}/gss-server" + +FILES:${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" + +FILES:${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ + ${localstatedir}/krb5kdc \ + ${sbindir}/kdb5_util \ + ${sbindir}/kproplog \ + ${sbindir}/krb5kdc \ + ${sysconfdir}/default/krb5-kdc \ + ${sysconfdir}/default/volatiles/87_krb5 \ + ${sysconfdir}/init.d/krb5-kdc \ + ${sysconfdir}/tmpfiles.d/krb5.conf \ + ${systemd_system_unitdir}/krb5-kdc.service" + +FILES:${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \ + ${libdir}/krb5/plugins/kdb/kldap.so \ + ${sbindir}/kdb5_ldap_util" + +FILES:${PN}-kpropd = "${sbindir}/kpropd" +FILES:${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" +FILES:${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" +FILES:${PN}-spake = "${libdir}/krb5/plugins/preauth/spake.so" +FILES:${PN}-user = "${bindir}/k*" + +FILES:libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" +FILES:libgssrpc = "${libdir}/libgssrpc${SOLIBS}" +FILES:libk5crypto = "${libdir}/libk5crypto${SOLIBS}" +FILES:libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" +FILES:libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" +FILES:libkdb5 = "${libdir}/libkdb5${SOLIBS}" +FILES:libkrad = "${libdir}/libkrad${SOLIBS}" +FILES:libkrb5 = "${libdir}/libkrb5${SOLIBS} \ + ${libdir}/krb5/plugins/authdata \ + ${libdir}/krb5/plugins/libkrb5" +FILES:libkrb5support = "${libdir}/libkrb5support${SOLIBS}" +FILES:libverto = "${libdir}/libverto${SOLIBS}" + +RDEPENDS:${PN}-kadmin-server = "${PN}-kdc" +RDEPENDS:${PN}-kpropd = "${PN}-kdc" + +INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" +INITSCRIPT_NAME:${PN}-admin-server = "krb5-admin-server" +INITSCRIPT_NAME:${PN}-kdc = "krb5-kdc" + +SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" +SYSTEMD_SERVICE:${PN}-admin-server = "krb5-admin-server.service" +SYSTEMD_SERVICE:${PN}-kdc = "krb5-kdc.service" + +pkg_postinst:${PN}-kdc () { + if [ -z "$D" ]; then + if command -v systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi +} + +BBCLASSEXTEND = "native nativesdk" + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/krb5-config" diff --git a/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb index 603f365cf3..4cad7dce11 100644 --- a/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb +++ b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb @@ -34,7 +34,7 @@ do_configure() { cp orig/* . for config in ${PACKAGECONFIG_CONFARGS}; do - if [[ ${config} == "enable_getty" ]]; then + if [ "${config}" = "enable_getty" ]; then echo "# generated by bitbake recipe ${PN}" >> ${S}/inittab for console in "${SERIAL_CONSOLES}"; do param=$(echo ${console} | sed s/\;/\ /g) diff --git a/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb b/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb deleted file mode 100644 index 2935221400..0000000000 --- a/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb +++ /dev/null @@ -1,117 +0,0 @@ -SUMMARY = "Manage plain dm-crypt and LUKS encrypted volumes" -DESCRIPTION = "Cryptsetup is used to conveniently setup dm-crypt managed \ -device-mapper mappings. These include plain dm-crypt volumes and \ -LUKS volumes. The difference is that LUKS uses a metadata header \ -and can hence offer more features than plain dm-crypt. On the other \ -hand, the header is visible and vulnerable to damage." -HOMEPAGE = "https://gitlab.com/cryptsetup/cryptsetup" -SECTION = "console" -LICENSE = "GPL-2.0-with-OpenSSL-exception" -LIC_FILES_CHKSUM = "file://COPYING;md5=32107dd283b1dfeb66c9b3e6be312326" - -DEPENDS = " \ - json-c \ - libdevmapper \ - popt \ - util-linux-libuuid \ -" - -DEPENDS:append:libc-musl = " argp-standalone" -LDFLAGS:append:libc-musl = " -largp" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" -SRC_URI[sha256sum] = "410ded65a1072ab9c8e41added37b9729c087fef4d2db02bb4ef529ad6da4693" - -inherit autotools gettext pkgconfig - -# Use openssl because libgcrypt drops root privileges -# if libgcrypt is linked with libcap support -PACKAGECONFIG ??= " \ - keyring \ - cryptsetup \ - veritysetup \ - luks2-reencryption \ - integritysetup \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ - kernel_crypto \ - internal-argon2 \ - blkid \ - luks-adjust-xts-keysize \ - openssl \ - ssh-token \ -" -PACKAGECONFIG:append:class-target = " \ - udev \ -" - -PACKAGECONFIG[keyring] = "--enable-keyring,--disable-keyring" -PACKAGECONFIG[fips] = "--enable-fips,--disable-fips" -PACKAGECONFIG[pwquality] = "--enable-pwquality,--disable-pwquality,libpwquality" -PACKAGECONFIG[passwdqc] = "--enable-passwdqc,--disable-passwdqc,passwdqc" -PACKAGECONFIG[cryptsetup] = "--enable-cryptsetup,--disable-cryptsetup" -PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup" -PACKAGECONFIG[luks2-reencryption] = "--enable-luks2-reencryption,--disable-luks2-reencryption" -PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" -PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev lvm2-udevrules" -PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto" -# gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't -# recognized. -PACKAGECONFIG[gcrypt-pbkdf2] = "--enable-gcrypt-pbkdf2" -PACKAGECONFIG[internal-argon2] = "--enable-internal-argon2,--disable-internal-argon2" -PACKAGECONFIG[internal-sse-argon2] = "--enable-internal-sse-argon2,--disable-internal-sse-argon2" -PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux" -PACKAGECONFIG[dev-random] = "--enable-dev-random,--disable-dev-random" -PACKAGECONFIG[luks-adjust-xts-keysize] = "--enable-luks-adjust-xts-keysize,--disable-luks-adjust-xts-keysize" -PACKAGECONFIG[openssl] = "--with-crypto_backend=openssl,,openssl" -PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" -PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" -PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" -PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" -PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" -PACKAGECONFIG[ssh-token] = "--enable-ssh-token,--disable-ssh-token,libssh" - -EXTRA_OECONF = "--enable-static" -# Building without largefile is not supported by upstream -EXTRA_OECONF += "--enable-largefile" -# Requires a static popt library -EXTRA_OECONF += "--disable-static-cryptsetup" -# There's no recipe for libargon2 yet -EXTRA_OECONF += "--disable-libargon2" -# Disable documentation, there is no asciidoctor-native available in OE -EXTRA_OECONF += "--disable-asciidoc" -# libcryptsetup default PBKDF algorithm, Argon2 memory cost (KB), parallel threads and iteration time (ms) -LUKS2_PBKDF ?= "argon2i" -LUKS2_MEMORYKB ?= "1048576" -LUKS2_PARALLEL_THREADS ?= "4" -LUKS2_ITERTIME ?= "2000" - -EXTRA_OECONF += "--with-luks2-pbkdf=${LUKS2_PBKDF} \ - --with-luks2-memory-kb=${LUKS2_MEMORYKB} \ - --with-luks2-parallel-threads=${LUKS2_PARALLEL_THREADS} \ - --with-luks2-iter-time=${LUKS2_ITERTIME}" - -do_install:append() { - # The /usr/lib/cryptsetup directory is always created, even when ssh-token - # is disabled. In that case it is empty and causes a packaging error. Since - # there is no reason to distribute the empty directory, the easiest solution - # is to remove it if it is empty. - rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/${BPN} -} - -FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" - -RDEPENDS:${PN} = " \ - libdevmapper \ -" - -RRECOMMENDS:${PN}:class-target = " \ - kernel-module-aes-generic \ - kernel-module-dm-crypt \ - kernel-module-md5 \ - kernel-module-cbc \ - kernel-module-sha256-generic \ - kernel-module-xts \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.0.bb b/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.0.bb new file mode 100644 index 0000000000..c5e84b1f01 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.0.bb @@ -0,0 +1,117 @@ +SUMMARY = "Manage plain dm-crypt and LUKS encrypted volumes" +DESCRIPTION = "Cryptsetup is used to conveniently setup dm-crypt managed \ +device-mapper mappings. These include plain dm-crypt volumes and \ +LUKS volumes. The difference is that LUKS uses a metadata header \ +and can hence offer more features than plain dm-crypt. On the other \ +hand, the header is visible and vulnerable to damage." +HOMEPAGE = "https://gitlab.com/cryptsetup/cryptsetup" +SECTION = "console" +LICENSE = "GPL-2.0-with-OpenSSL-exception" +LIC_FILES_CHKSUM = "file://COPYING;md5=32107dd283b1dfeb66c9b3e6be312326" + +DEPENDS = " \ + json-c \ + libdevmapper \ + popt \ + util-linux-libuuid \ +" + +DEPENDS:append:libc-musl = " argp-standalone" +LDFLAGS:append:libc-musl = " -largp" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" +SRC_URI[sha256sum] = "94003a00cd5a81944f45e8dc529e0cfd2a6ff629bd2cd21cf5e574e465daf795" + +inherit autotools gettext pkgconfig + +# Use openssl because libgcrypt drops root privileges +# if libgcrypt is linked with libcap support +PACKAGECONFIG ??= " \ + keyring \ + cryptsetup \ + veritysetup \ + luks2-reencryption \ + integritysetup \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ + kernel_crypto \ + internal-argon2 \ + blkid \ + luks-adjust-xts-keysize \ + openssl \ + ssh-token \ +" +PACKAGECONFIG:append:class-target = " \ + udev \ +" + +PACKAGECONFIG[keyring] = "--enable-keyring,--disable-keyring" +PACKAGECONFIG[fips] = "--enable-fips,--disable-fips" +PACKAGECONFIG[pwquality] = "--enable-pwquality,--disable-pwquality,libpwquality" +PACKAGECONFIG[passwdqc] = "--enable-passwdqc,--disable-passwdqc,passwdqc" +PACKAGECONFIG[cryptsetup] = "--enable-cryptsetup,--disable-cryptsetup" +PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup" +PACKAGECONFIG[luks2-reencryption] = "--enable-luks2-reencryption,--disable-luks2-reencryption" +PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev lvm2-udevrules" +PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto" +# gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't +# recognized. +PACKAGECONFIG[gcrypt-pbkdf2] = "--enable-gcrypt-pbkdf2" +PACKAGECONFIG[internal-argon2] = "--enable-internal-argon2,--disable-internal-argon2" +PACKAGECONFIG[internal-sse-argon2] = "--enable-internal-sse-argon2,--disable-internal-sse-argon2" +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux" +PACKAGECONFIG[dev-random] = "--enable-dev-random,--disable-dev-random" +PACKAGECONFIG[luks-adjust-xts-keysize] = "--enable-luks-adjust-xts-keysize,--disable-luks-adjust-xts-keysize" +PACKAGECONFIG[openssl] = "--with-crypto_backend=openssl,,openssl" +PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" +PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" +PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" +PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" +PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" +PACKAGECONFIG[ssh-token] = "--enable-ssh-token,--disable-ssh-token,libssh" + +EXTRA_OECONF = "--enable-static" +# Building without largefile is not supported by upstream +EXTRA_OECONF += "--enable-largefile" +# Requires a static popt library +EXTRA_OECONF += "--disable-static-cryptsetup" +# There's no recipe for libargon2 yet +EXTRA_OECONF += "--disable-libargon2" +# Disable documentation, there is no asciidoctor-native available in OE +EXTRA_OECONF += "--disable-asciidoc" +# libcryptsetup default PBKDF algorithm, Argon2 memory cost (KB), parallel threads and iteration time (ms) +LUKS2_PBKDF ?= "argon2i" +LUKS2_MEMORYKB ?= "1048576" +LUKS2_PARALLEL_THREADS ?= "4" +LUKS2_ITERTIME ?= "2000" + +EXTRA_OECONF += "--with-luks2-pbkdf=${LUKS2_PBKDF} \ + --with-luks2-memory-kb=${LUKS2_MEMORYKB} \ + --with-luks2-parallel-threads=${LUKS2_PARALLEL_THREADS} \ + --with-luks2-iter-time=${LUKS2_ITERTIME}" + +do_install:append() { + # The /usr/lib/cryptsetup directory is always created, even when ssh-token + # is disabled. In that case it is empty and causes a packaging error. Since + # there is no reason to distribute the empty directory, the easiest solution + # is to remove it if it is empty. + rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/${BPN} +} + +FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" + +RDEPENDS:${PN} = " \ + libdevmapper \ +" + +RRECOMMENDS:${PN}:class-target = " \ + kernel-module-aes-generic \ + kernel-module-dm-crypt \ + kernel-module-md5 \ + kernel-module-cbc \ + kernel-module-sha256-generic \ + kernel-module-xts \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb b/meta-openembedded/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb index 35e9b032b3..a34614dd9d 100644 --- a/meta-openembedded/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb +++ b/meta-openembedded/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb @@ -1,5 +1,5 @@ SUMMARY = "Linux Kernel Crypto API User Space Interface Library" -HOMEPAGE = "http://www.chronox.de/libkcapi.html" +HOMEPAGE = "https://www.chronox.de/libkcapi/index.html" LICENSE = "BSD-3-Clause | GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=3d8a091d797491204567185a6efce70f" diff --git a/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb index 0770e4bebb..5301071516 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb +++ b/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -27,6 +27,8 @@ SRCREV = "688e697c51fd5353725da078555adbeff0363d01" inherit go-mod pkgconfig systemd update-rc.d useradd +export GOPROXY = "https://proxy.golang.org,direct" + # Workaround for network access issue during compile step # this needs to be fixed in the recipes buildsystem to move # this such that it can be accomplished during do_fetch task diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch index 7a4ba9897c..34d34ecad9 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch @@ -1,21 +1,19 @@ -From 780fd27ea6f7f2c446c46a7a5e26d94106c67efd Mon Sep 17 00:00:00 2001 +From ba079b8d6a50796db41bb0ddf4c22bfe022ef898 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 20 Nov 2016 15:04:52 +0000 -Subject: [PATCH] Add support for RISC-V. +Subject: [PATCH 1/5] Add support for RISC-V. The architecture is sufficiently similar to aarch64 that simply extending the existing aarch64 macro works. --- -Upstream-Status: Pending - - src/include/storage/s_lock.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/include/storage/s_lock.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h -index 4d3ffc7..22e27bf 100644 +index c9fa84c..9b491e8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h -@@ -317,11 +317,12 @@ tas(volatile slock_t *lock) +@@ -252,11 +252,12 @@ spin_delay(void) /* * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. @@ -24,21 +22,20 @@ index 4d3ffc7..22e27bf 100644 * We use the int-width variant of the builtin because it works on more chips * than other widths. */ --#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) -+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv) +-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) ++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__riscv) #ifdef HAVE_GCC__SYNC_INT32_TAS #define HAS_TEST_AND_SET -@@ -355,8 +356,7 @@ spin_delay(void) +@@ -290,7 +291,7 @@ spin_delay(void) - #endif /* __aarch64__ || __aarch64 */ + #endif /* __aarch64__ */ #endif /* HAVE_GCC__SYNC_INT32_TAS */ --#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ -- -+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ +-#endif /* __arm__ || __arm || __aarch64__ */ ++#endif /* __arm__ || __arm || __aarch64__ || __riscv */ + /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ - #if defined(__s390__) || defined(__s390x__) -- -2.34.1 +2.25.1 diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch deleted file mode 100644 index 02f4c9e513..0000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch +++ /dev/null @@ -1,41 +0,0 @@ -From bbba8a5261a99e79c9cd4693ef56021014a9856b Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 28 Dec 2020 16:38:21 +0800 -Subject: [PATCH] Improve reproducibility, - -Remove build patch from binaries which pg_config do -not record var-CC, var-CFLAGS, and configure - -$ /usr/bin/pg_config --cc -not recorded - -$ /usr/bin/pg_config --configure -not recorded - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia - -update patch for v13.1 -Signed-off-by: Changqing Li ---- - src/common/Makefile | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/common/Makefile b/src/common/Makefile -index 880722f..7a9b9d4 100644 ---- a/src/common/Makefile -+++ b/src/common/Makefile -@@ -31,9 +31,6 @@ include $(top_builddir)/src/Makefile.global - # don't include subdirectory-path-dependent -I and -L switches - STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) - STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) --override CPPFLAGS += -DVAL_CC="\"$(CC)\"" --override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" --override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" - override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" - override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" - override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" --- -2.34.1 - diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch deleted file mode 100644 index 52ca276da6..0000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch +++ /dev/null @@ -1,119 +0,0 @@ -From b92eebe8b0760fee7bd55c6c22318620c2c07579 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Mon, 1 Aug 2022 15:44:38 +0800 -Subject: [PATCH] config_info.c: not expose build info - -Don't collect the build information to fix the buildpaths issue. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Mingli Yu ---- - configure.ac | 2 +- - src/common/config_info.c | 68 ---------------------------------------- - 2 files changed, 1 insertion(+), 69 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0eb595b..508487b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group]) - AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) - AC_CONFIG_AUX_DIR(config) - AC_PREFIX_DEFAULT(/usr/local/pgsql) --AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure]) -+AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["ac_configure_args"], [Saved arguments from configure]) - - [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`] - [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`] -diff --git a/src/common/config_info.c b/src/common/config_info.c -index e72e729..b482c20 100644 ---- a/src/common/config_info.c -+++ b/src/common/config_info.c -@@ -38,7 +38,7 @@ - int i = 0; - - /* Adjust this to match the number of items filled below */ -- *configdata_len = 23; -+ *configdata_len = 14; - configdata = (ConfigData *) palloc(*configdata_len * sizeof(ConfigData)); - - configdata[i].name = pstrdup("BINDIR"); -@@ -123,74 +123,6 @@ - configdata[i].setting = pstrdup(path); - i++; - -- configdata[i].name = pstrdup("CONFIGURE"); -- configdata[i].setting = pstrdup(CONFIGURE_ARGS); -- i++; -- -- configdata[i].name = pstrdup("CC"); --#ifdef VAL_CC -- configdata[i].setting = pstrdup(VAL_CC); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("CPPFLAGS"); --#ifdef VAL_CPPFLAGS -- configdata[i].setting = pstrdup(VAL_CPPFLAGS); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("CFLAGS"); --#ifdef VAL_CFLAGS -- configdata[i].setting = pstrdup(VAL_CFLAGS); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("CFLAGS_SL"); --#ifdef VAL_CFLAGS_SL -- configdata[i].setting = pstrdup(VAL_CFLAGS_SL); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("LDFLAGS"); --#ifdef VAL_LDFLAGS -- configdata[i].setting = pstrdup(VAL_LDFLAGS); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("LDFLAGS_EX"); --#ifdef VAL_LDFLAGS_EX -- configdata[i].setting = pstrdup(VAL_LDFLAGS_EX); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("LDFLAGS_SL"); --#ifdef VAL_LDFLAGS_SL -- configdata[i].setting = pstrdup(VAL_LDFLAGS_SL); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- -- configdata[i].name = pstrdup("LIBS"); --#ifdef VAL_LIBS -- configdata[i].setting = pstrdup(VAL_LIBS); --#else -- configdata[i].setting = pstrdup(_("not recorded")); --#endif -- i++; -- - configdata[i].name = pstrdup("VERSION"); - configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION); - i++; --- -2.25.1 - diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch deleted file mode 100644 index ab578056ff..0000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d44c83ed0f30462a31930d6d925762b3f8412ce2 Mon Sep 17 00:00:00 2001 -From: Yi Fan Yu -Date: Fri, 5 Feb 2021 17:15:42 -0500 -Subject: [PATCH] configure.ac: bypass autoconf 2.69 version check - -for upgrade to autoconf 2.71 - -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Yi Fan Yu ---- - configure.ac | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e988503..d1b2cfd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros - - AC_INIT([PostgreSQL], [15.5], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) - --m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. --Untested combinations of 'autoconf' and PostgreSQL versions are not --recommended. You can remove the check from 'configure.ac' but it is then --your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2022, PostgreSQL Global Development Group]) - AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) - AC_CONFIG_AUX_DIR(config) --- -2.25.1 - diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch deleted file mode 100644 index 4db36d26fd..0000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9f81377dddfe32d950844d7053020a36b40fce08 Mon Sep 17 00:00:00 2001 -From: Manoj Saun -Date: Wed, 22 Mar 2023 08:07:26 +0000 -Subject: [PATCH] postgresql: fix ptest failure of sysviews - -The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info -in pg_config table which reduces the count of rows from pg_config and leads to -sysviews test failure. -To fix it we need to reduce the count of parameters in sysviews test. -Also we need to reduce the row count in expected result of sysview test -to make the test output shown as pass. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Manoj Saun ---- - src/test/regress/expected/sysviews.out | 2 +- - src/test/regress/sql/sysviews.sql | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/src/test/regress/expected/sysviews.out -+++ b/src/test/regress/expected/sysviews.out -@@ -29,7 +29,7 @@ select name, ident, parent, level, total - (1 row) - - -- At introduction, pg_config had 23 entries; it may grow --select count(*) > 20 as ok from pg_config; -+select count(*) > 13 as ok from pg_config; - ok - ---- - t ---- a/src/test/regress/sql/sysviews.sql -+++ b/src/test/regress/sql/sysviews.sql -@@ -18,7 +18,7 @@ select name, ident, parent, level, total - from pg_backend_memory_contexts where level = 0; - - -- At introduction, pg_config had 23 entries; it may grow --select count(*) > 20 as ok from pg_config; -+select count(*) > 13 as ok from pg_config; - - -- We expect no cursors in this test; see also portals.sql - select count(*) = 0 as ok from pg_cursors; diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch new file mode 100644 index 0000000000..b3e87cbc46 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch @@ -0,0 +1,41 @@ +From 084cc44215c1d5e6d33bc3d2e1d24da4fc98bdcd Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 28 Dec 2020 16:38:21 +0800 +Subject: [PATCH 2/5] Improve reproducibility, + +Remove build patch from binaries which pg_config do +not record var-CC, var-CFLAGS, and configure + +$ /usr/bin/pg_config --cc +not recorded + +$ /usr/bin/pg_config --configure +not recorded + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia + +update patch for v13.1 +Signed-off-by: Changqing Li +--- + src/common/Makefile | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/common/Makefile b/src/common/Makefile +index 113029b..58842a6 100644 +--- a/src/common/Makefile ++++ b/src/common/Makefile +@@ -31,9 +31,6 @@ include $(top_builddir)/src/Makefile.global + # don't include subdirectory-path-dependent -I and -L switches + STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) + STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) +-override CPPFLAGS += -DVAL_CC="\"$(CC)\"" +-override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" +-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" + override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" + override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" + override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch new file mode 100644 index 0000000000..d76d1991b6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch @@ -0,0 +1,32 @@ +From 30b1b37d309f67ba6d58f2197bd917107bc7d56c Mon Sep 17 00:00:00 2001 +From: Yi Fan Yu +Date: Fri, 5 Feb 2021 17:15:42 -0500 +Subject: [PATCH 3/5] configure.ac: bypass autoconf 2.69 version check + +for upgrade to autoconf 2.71 + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Yi Fan Yu +--- + configure.ac | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 401ce30..27f382d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros + + AC_INIT([PostgreSQL], [16.2], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + +-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. +-Untested combinations of 'autoconf' and PostgreSQL versions are not +-recommended. You can remove the check from 'configure.ac' but it is then +-your responsibility whether the result works or not.])]) + AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) + AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) + AC_CONFIG_AUX_DIR(config) +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch new file mode 100644 index 0000000000..ff0582ab80 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch @@ -0,0 +1,119 @@ +From 5be3ffdf767c1efcbfd2d1be87aa83f2e37e348e Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Mon, 1 Aug 2022 15:44:38 +0800 +Subject: [PATCH 4/5] config_info.c: not expose build info + +Don't collect the build information to fix the buildpaths issue. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mingli Yu +--- + configure.ac | 2 +- + src/common/config_info.c | 70 +--------------------------------------- + 2 files changed, 2 insertions(+), 70 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 27f382d..3dd6bb1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) + AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) + AC_CONFIG_AUX_DIR(config) + AC_PREFIX_DEFAULT(/usr/local/pgsql) +-AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure]) ++AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["ac_configure_args"], [Saved arguments from configure]) + + [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`] + [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`] +diff --git a/src/common/config_info.c b/src/common/config_info.c +index 09e78a6..86e4230 100644 +--- a/src/common/config_info.c ++++ b/src/common/config_info.c +@@ -38,7 +38,7 @@ get_configdata(const char *my_exec_path, size_t *configdata_len) + int i = 0; + + /* Adjust this to match the number of items filled below */ +- *configdata_len = 23; ++ *configdata_len = 14; + configdata = palloc_array(ConfigData, *configdata_len); + + configdata[i].name = pstrdup("BINDIR"); +@@ -123,74 +123,6 @@ get_configdata(const char *my_exec_path, size_t *configdata_len) + configdata[i].setting = pstrdup(path); + i++; + +- configdata[i].name = pstrdup("CONFIGURE"); +- configdata[i].setting = pstrdup(CONFIGURE_ARGS); +- i++; +- +- configdata[i].name = pstrdup("CC"); +-#ifdef VAL_CC +- configdata[i].setting = pstrdup(VAL_CC); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CPPFLAGS"); +-#ifdef VAL_CPPFLAGS +- configdata[i].setting = pstrdup(VAL_CPPFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CFLAGS"); +-#ifdef VAL_CFLAGS +- configdata[i].setting = pstrdup(VAL_CFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CFLAGS_SL"); +-#ifdef VAL_CFLAGS_SL +- configdata[i].setting = pstrdup(VAL_CFLAGS_SL); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS"); +-#ifdef VAL_LDFLAGS +- configdata[i].setting = pstrdup(VAL_LDFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS_EX"); +-#ifdef VAL_LDFLAGS_EX +- configdata[i].setting = pstrdup(VAL_LDFLAGS_EX); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS_SL"); +-#ifdef VAL_LDFLAGS_SL +- configdata[i].setting = pstrdup(VAL_LDFLAGS_SL); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LIBS"); +-#ifdef VAL_LIBS +- configdata[i].setting = pstrdup(VAL_LIBS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- + configdata[i].name = pstrdup("VERSION"); + configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION); + i++; +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch new file mode 100644 index 0000000000..af36da4927 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch @@ -0,0 +1,49 @@ +From 1a8b94140988d2ee5ff987b0bb3e7c3e936b8c01 Mon Sep 17 00:00:00 2001 +From: Manoj Saun +Date: Wed, 22 Mar 2023 08:07:26 +0000 +Subject: [PATCH 5/5] postgresql: fix ptest failure of sysviews + +The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info +in pg_config table which reduces the count of rows from pg_config and leads to +sysviews test failure. +To fix it we need to reduce the count of parameters in sysviews test. +Also we need to reduce the row count in expected result of sysview test +to make the test output shown as pass. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Manoj Saun +--- + src/test/regress/expected/sysviews.out | 2 +- + src/test/regress/sql/sysviews.sql | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out +index 001c6e7..8256898 100644 +--- a/src/test/regress/expected/sysviews.out ++++ b/src/test/regress/expected/sysviews.out +@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes + (1 row) + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + ok + ---- + t +diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql +index 351e469..84c113e 100644 +--- a/src/test/regress/sql/sysviews.sql ++++ b/src/test/regress/sql/sysviews.sql +@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes + from pg_backend_memory_contexts where level = 0; + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + + -- We expect no cursors in this test; see also portals.sql + select count(*) = 0 as ok from pg_cursors; +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc index 15ecdeeb2e..868a2e443c 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -54,7 +54,7 @@ pkg_postinst:${PN} () { PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ - openssl python uuid libxml tcl perl zlib \ + openssl python uuid libxml tcl perl zlib icu \ " PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" @@ -69,6 +69,7 @@ PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" +PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ @@ -229,6 +230,16 @@ do_install:append() { SSTATE_SCAN_FILES += "Makefile.global" SSTATE_SCAN_FILES:remove = "*_config" +postgresql_fix_sources () { + for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \ + ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do + if [ -e $f ]; then + sed -i -e 's#${B}/../${P}#${TARGET_DBGSRC_DIR}#g' $f + fi + done +} +PACKAGESPLITFUNCS =+ "postgresql_fix_sources" + PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ libecpg-compat libecpg-compat-dev \ libecpg libecpg-dev libecpg-staticdev libecpg-doc \ diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_15.5.bb b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_15.5.bb deleted file mode 100644 index cb90ff930a..0000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_15.5.bb +++ /dev/null @@ -1,16 +0,0 @@ -require postgresql.inc - -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=c31f662bb2bfb3b4187fe9a53e0ffe7c" - -SRC_URI += "\ - file://not-check-libperl.patch \ - file://0001-Add-support-for-RISC-V.patch \ - file://0001-Improve-reproducibility.patch \ - file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \ - file://0001-config_info.c-not-expose-build-info.patch \ - file://0001-postgresql-fix-ptest-failure-of-sysviews.patch \ -" - -SRC_URI[sha256sum] = "8f53aa95d78eb8e82536ea46b68187793b42bba3b4f65aa342f540b23c9b10a6" - -CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb new file mode 100644 index 0000000000..31f83a564b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb @@ -0,0 +1,16 @@ +require postgresql.inc + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=89afbb2d7716371015101c2b2cb4297a" + +SRC_URI += "\ + file://not-check-libperl.patch \ + file://0001-Add-support-for-RISC-V.patch \ + file://0002-Improve-reproducibility.patch \ + file://0003-configure.ac-bypass-autoconf-2.69-version-check.patch \ + file://0004-config_info.c-not-expose-build-info.patch \ + file://0005-postgresql-fix-ptest-failure-of-sysviews.patch \ +" + +SRC_URI[sha256sum] = "446e88294dbc2c9085ab4b7061a646fa604b4bec03521d5ea671c2e5ad9b2952" + +CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.0.bb b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.0.bb deleted file mode 100644 index d41a73eee4..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.0.bb +++ /dev/null @@ -1,67 +0,0 @@ -DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ -Provides gRPC libraries for multiple languages written on top of shared C core library \ -(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" -HOMEPAGE = "https://github.com/grpc/grpc" -SECTION = "libs" -LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" - -DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" -DEPENDS:append:class-target = " googletest grpc-native " -DEPENDS:append:class-nativesdk = " grpc-native " - -PACKAGE_BEFORE_PN = "${PN}-compiler" - -RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" -# Configuration above allows to cross-compile gRPC applications -# In order to compile applications on the target, use the dependency below -# Both dependencies are mutually exclusive -# RDEPENDS:${PN}-dev += "${PN}-compiler" - -S = "${WORKDIR}/git" -SRCREV_grpc = "0ef13a7555dbaadd4633399242524129eef5e231" -BRANCH = "v1.60.x" -SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ - " -# Fixes build with older compilers 4.8 especially on ubuntu 14.04 -CXXFLAGS:append:class-native = " -Wl,--no-as-needed" - -inherit cmake pkgconfig - -EXTRA_OECMAKE = " \ - -DgRPC_CARES_PROVIDER=package \ - -DgRPC_ZLIB_PROVIDER=package \ - -DgRPC_SSL_PROVIDER=package \ - -DgRPC_PROTOBUF_PROVIDER=package \ - -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ - -DgRPC_ABSL_PROVIDER=package \ - -DgRPC_RE2_PROVIDER=package \ - -DgRPC_INSTALL=ON \ - -DCMAKE_CROSSCOMPILING=ON \ - -DgRPC_INSTALL_LIBDIR=${baselib} \ - -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ - " - -PACKAGECONFIG ??= "cpp shared" -PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" -PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" -PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" -PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF" -PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF" -PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF" -PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF" -PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite" -PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," - -do_configure:prepend() { - sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt -} - -BBCLASSEXTEND = "native nativesdk" - -FILES:${PN}-compiler += " \ - ${bindir} \ - ${libdir}/libgrpc_plugin_support${SOLIBS} \ - " diff --git a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb new file mode 100644 index 0000000000..63c696a623 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb @@ -0,0 +1,67 @@ +DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ +Provides gRPC libraries for multiple languages written on top of shared C core library \ +(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" +HOMEPAGE = "https://github.com/grpc/grpc" +SECTION = "libs" +LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" + +DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" +DEPENDS:append:class-target = " googletest grpc-native " +DEPENDS:append:class-nativesdk = " grpc-native " + +PACKAGE_BEFORE_PN = "${PN}-compiler" + +RDEPENDS:${PN}-compiler = "${PN}" +RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" +# Configuration above allows to cross-compile gRPC applications +# In order to compile applications on the target, use the dependency below +# Both dependencies are mutually exclusive +# RDEPENDS:${PN}-dev += "${PN}-compiler" + +S = "${WORKDIR}/git" +SRCREV_grpc = "e5ae3b6b44bf3b64d24bfb4b4f82556239b986db" +BRANCH = "v1.60.x" +SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ + file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ + " +# Fixes build with older compilers 4.8 especially on ubuntu 14.04 +CXXFLAGS:append:class-native = " -Wl,--no-as-needed" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = " \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_INSTALL=ON \ + -DCMAKE_CROSSCOMPILING=ON \ + -DgRPC_INSTALL_LIBDIR=${baselib} \ + -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ + " + +PACKAGECONFIG ??= "cpp shared" +PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" +PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" +PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" +PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF" +PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF" +PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF" +PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF" +PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite" +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +do_configure:prepend() { + sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt +} + +BBCLASSEXTEND = "native nativesdk" + +FILES:${PN}-compiler += " \ + ${bindir} \ + ${libdir}/libgrpc_plugin_support${SOLIBS} \ + " diff --git a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-custom-allocators-define-missing-rebind-type-3895.patch b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-custom-allocators-define-missing-rebind-type-3895.patch deleted file mode 100644 index d964586c1c..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-custom-allocators-define-missing-rebind-type-3895.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 6cec5aefc97ad219b6fd5a4132f88f7c8f6800ee Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Wed, 8 Mar 2023 11:31:56 +0000 -Subject: [PATCH] custom allocators: define missing 'rebind' type (#3895) - -Upstream-Status: Backport [https://github.com/nlohmann/json/commit/6cec5aefc97ad219b6fd5a4132f88f7c8f6800ee] - -Signed-off-by: Mingli Yu ---- - tests/src/unit-allocator.cpp | 9 +++++++++ - tests/src/unit-regression2.cpp | 9 +++++++++ - 2 files changed, 18 insertions(+) - -diff --git a/tests/src/unit-allocator.cpp b/tests/src/unit-allocator.cpp -index 76e3b03f..f2e63552 100644 ---- a/tests/src/unit-allocator.cpp -+++ b/tests/src/unit-allocator.cpp -@@ -20,11 +20,20 @@ struct bad_allocator : std::allocator - { - using std::allocator::allocator; - -+ bad_allocator() = default; -+ template bad_allocator(const bad_allocator& /*unused*/) { } -+ - template - void construct(T* /*unused*/, Args&& ... /*unused*/) - { - throw std::bad_alloc(); - } -+ -+ template -+ struct rebind -+ { -+ using other = bad_allocator; -+ }; - }; - } // namespace - -diff --git a/tests/src/unit-regression2.cpp b/tests/src/unit-regression2.cpp -index 2bb9b32e..dbafb436 100644 ---- a/tests/src/unit-regression2.cpp -+++ b/tests/src/unit-regression2.cpp -@@ -189,6 +189,15 @@ class my_allocator : public std::allocator - { - public: - using std::allocator::allocator; -+ -+ my_allocator() = default; -+ template my_allocator(const my_allocator& /*unused*/) { } -+ -+ template -+ struct rebind -+ { -+ using other = my_allocator; -+ }; - }; - - ///////////////////////////////////////////////////////////////////// --- -2.25.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch deleted file mode 100644 index 463912e4b6..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 660d0b58565073975d6f5d94365d6cbf150a4cf8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= -Date: Sun, 5 Mar 2023 14:11:22 +0100 -Subject: [PATCH] tests/unit-iterators2: use std::ranges::equals for range - comparisons (#3950) - -Closes https://github.com/nlohmann/json/issues/3927 - -Upstream-Status: Backport [https://github.com/nlohmann/json/commit/660d0b58565073975d6f5d94365d6cbf150a4cf8] - -Signed-off-by: Mingli Yu ---- - tests/src/unit-iterators2.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/src/unit-iterators2.cpp b/tests/src/unit-iterators2.cpp -index 27926084..72a5d9dc 100644 ---- a/tests/src/unit-iterators2.cpp -+++ b/tests/src/unit-iterators2.cpp -@@ -943,7 +943,7 @@ TEST_CASE("iterators 2") - json j_expected{5, 4, 3, 2, 1}; - - auto reversed = j | std::views::reverse; -- CHECK(reversed == j_expected); -+ CHECK(std::ranges::equal(reversed, j_expected)); - } - - SECTION("transform") --- -2.25.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb deleted file mode 100644 index 350932388c..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "JSON for modern C++" -HOMEPAGE = "https://nlohmann.github.io/json/" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588" - -CVE_PRODUCT = "json-for-modern-cpp" - -SRC_URI = "git://github.com/nlohmann/json.git;branch=develop;protocol=https \ - git://github.com/nlohmann/json_test_data.git;destsuffix=git/json_test_data;name=json-test-data;branch=master;protocol=https \ - file://0001-custom-allocators-define-missing-rebind-type-3895.patch \ - file://0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch \ - file://run-ptest \ -" - -SRCREV = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" -SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37" - -SRCREV_FORMAT .= "_json-test-data" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSON_BuildTests=ON -DJSON_TestDataDirectory=${PTEST_PATH}/json_test_data', '-DJSON_BuildTests=OFF', d)}" - -# nlohmann-json is a header only C++ library, so the main package will be empty. -ALLOW_EMPTY:${PN} = "1" -RDEPENDS:${PN}-dev = "" -RDEPENDS:${PN}-ptest = "perl" - -BBCLASSEXTEND = "native nativesdk" - - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - cp -r ${S}/json_test_data/ ${D}${PTEST_PATH}/ - cp -r ${B}/tests/test-* ${D}${PTEST_PATH}/tests - rm -rf ${D}${PTEST_PATH}/json_test_data/.git -} - - -# other packages commonly reference the file directly as "json.hpp" -# create symlink to allow this usage -do_install:append() { - ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp -} diff --git a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb new file mode 100644 index 0000000000..194e80546e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb @@ -0,0 +1,45 @@ +SUMMARY = "JSON for modern C++" +HOMEPAGE = "https://nlohmann.github.io/json/" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588" + +CVE_PRODUCT = "json-for-modern-cpp" + +SRC_URI = "git://github.com/nlohmann/json.git;branch=develop;protocol=https \ + git://github.com/nlohmann/json_test_data.git;destsuffix=git/json_test_data;name=json-test-data;branch=master;protocol=https \ + file://run-ptest \ +" + +SRCREV = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" +SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37" + +SRCREV_FORMAT .= "_json-test-data" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSON_BuildTests=ON -DJSON_TestDataDirectory=${PTEST_PATH}/json_test_data', '-DJSON_BuildTests=OFF', d)}" + +# nlohmann-json is a header only C++ library, so the main package will be empty. +ALLOW_EMPTY:${PN} = "1" +RDEPENDS:${PN}-dev = "" +RDEPENDS:${PN}-ptest = "perl" + +BBCLASSEXTEND = "native nativesdk" + + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${S}/json_test_data/ ${D}${PTEST_PATH}/ + cp -r ${B}/tests/test-* ${D}${PTEST_PATH}/tests + rm -rf ${D}${PTEST_PATH}/json_test_data/.git +} + + +# other packages commonly reference the file directly as "json.hpp" +# create symlink to allow this usage +do_install:append() { + ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp +} diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Revert-io_uring-changes-from-libuv-1.46.0.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Revert-io_uring-changes-from-libuv-1.46.0.patch deleted file mode 100644 index d98463d0d8..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Revert-io_uring-changes-from-libuv-1.46.0.patch +++ /dev/null @@ -1,3414 +0,0 @@ -From 937dfa70104b7401a7570a98cf6e0a534e250557 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Wed, 18 Oct 2023 22:43:55 +0200 -Subject: [PATCH] Revert io_uring changes from libuv-1.46.0 - -Included in nodejs-20.4.0 with the libuv upgrade to 1.46.0 in: -https://github.com/nodejs/node/commit/6199e1946c9abd59bd71a61870a4f6c85e100b18 - -Revert "linux: work around io_uring IORING_OP_CLOSE bug (#4059)" -This reverts commit 1752791c9ea89dbf54e2a20a9d9f899119a2d179. -Revert "linux: fs_read to use io_uring if iovcnt > IOV_MAX (#4023)" -This reverts commit e7b96331703e929e75d93c574573c9736e34b0c0. -Revert "linux: add some more iouring backed fs ops (#4012)" -This reverts commit 962b8e626ceaaf296eecab1d008e8b70dc6da5e7. -Revert "android: disable io_uring support (#4016)" -This reverts commit 281e6185cc9e77c582ff6ca9e4c00d57e6b90d95. -Revert "unix,win: replace QUEUE with struct uv__queue (#4022)" -This reverts commit 1b01b786c0180d29f07dccbb98001a2b3148828a. -Revert "fs: use WTF-8 on Windows (#2970)" -This reverts commit 8f32a14afaaa47514a7d28e1e069a8329e2dd939. - -Dropped deps/uv/docs deps/uv/test changes as these dirs aren't included -in nodejs tarballs. - -Signed-off-by: Martin Jansa ---- -Upstream-Status: Inappropriate [OE specific] - - deps/uv/include/uv.h | 10 +- - deps/uv/include/uv/darwin.h | 6 +- - deps/uv/include/uv/linux.h | 2 +- - deps/uv/include/uv/threadpool.h | 2 +- - deps/uv/include/uv/unix.h | 44 ++-- - deps/uv/include/uv/win.h | 4 +- - deps/uv/src/queue.h | 154 ++++++----- - deps/uv/src/threadpool.c | 72 +++--- - deps/uv/src/unix/aix.c | 14 +- - deps/uv/src/unix/async.c | 52 ++-- - deps/uv/src/unix/core.c | 53 ++-- - deps/uv/src/unix/fs.c | 41 +-- - deps/uv/src/unix/fsevents.c | 84 +++--- - deps/uv/src/unix/internal.h | 11 - - deps/uv/src/unix/kqueue.c | 18 +- - deps/uv/src/unix/linux.c | 257 +++---------------- - deps/uv/src/unix/loop-watcher.c | 20 +- - deps/uv/src/unix/loop.c | 28 +- - deps/uv/src/unix/os390-syscalls.c | 24 +- - deps/uv/src/unix/os390-syscalls.h | 2 +- - deps/uv/src/unix/os390.c | 14 +- - deps/uv/src/unix/pipe.c | 2 +- - deps/uv/src/unix/posix-poll.c | 14 +- - deps/uv/src/unix/process.c | 38 +-- - deps/uv/src/unix/signal.c | 8 +- - deps/uv/src/unix/stream.c | 56 ++-- - deps/uv/src/unix/sunos.c | 18 +- - deps/uv/src/unix/tcp.c | 4 +- - deps/uv/src/unix/tty.c | 2 +- - deps/uv/src/unix/udp.c | 76 +++--- - deps/uv/src/uv-common.c | 28 +- - deps/uv/src/uv-common.h | 3 +- - deps/uv/src/win/core.c | 6 +- - deps/uv/src/win/fs.c | 311 ++++++++--------------- - deps/uv/src/win/handle-inl.h | 2 +- - deps/uv/src/win/pipe.c | 26 +- - deps/uv/src/win/tcp.c | 4 +- - deps/uv/src/win/udp.c | 4 +- - deps/uv/test/test-fs.c | 53 ---- - deps/uv/test/test-list.h | 2 - - deps/uv/test/test-queue-foreach-delete.c | 5 +- - deps/uv/test/test-threadpool-cancel.c | 5 - - 42 files changed, 625 insertions(+), 954 deletions(-) - -diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h -index 02397dd0fdd..1af95289776 100644 ---- a/deps/uv/include/uv.h -+++ b/deps/uv/include/uv.h -@@ -59,12 +59,6 @@ extern "C" { - #include - #include - --/* Internal type, do not use. */ --struct uv__queue { -- struct uv__queue* next; -- struct uv__queue* prev; --}; -- - #if defined(_WIN32) - # include "uv/win.h" - #else -@@ -466,7 +460,7 @@ struct uv_shutdown_s { - uv_handle_type type; \ - /* private */ \ - uv_close_cb close_cb; \ -- struct uv__queue handle_queue; \ -+ void* handle_queue[2]; \ - union { \ - int fd; \ - void* reserved[4]; \ -@@ -1870,7 +1864,7 @@ struct uv_loop_s { - void* data; - /* Loop reference counting. */ - unsigned int active_handles; -- struct uv__queue handle_queue; -+ void* handle_queue[2]; - union { - void* unused; - unsigned int count; -diff --git a/deps/uv/include/uv/darwin.h b/deps/uv/include/uv/darwin.h -index 06962bfda80..d226415820b 100644 ---- a/deps/uv/include/uv/darwin.h -+++ b/deps/uv/include/uv/darwin.h -@@ -40,7 +40,7 @@ - void* cf_state; \ - uv_mutex_t cf_mutex; \ - uv_sem_t cf_sem; \ -- struct uv__queue cf_signals; \ -+ void* cf_signals[2]; \ - - #define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ -@@ -48,8 +48,8 @@ - int realpath_len; \ - int cf_flags; \ - uv_async_t* cf_cb; \ -- struct uv__queue cf_events; \ -- struct uv__queue cf_member; \ -+ void* cf_events[2]; \ -+ void* cf_member[2]; \ - int cf_error; \ - uv_mutex_t cf_mutex; \ - -diff --git a/deps/uv/include/uv/linux.h b/deps/uv/include/uv/linux.h -index 9f22f8cf726..9b38405a190 100644 ---- a/deps/uv/include/uv/linux.h -+++ b/deps/uv/include/uv/linux.h -@@ -28,7 +28,7 @@ - int inotify_fd; \ - - #define UV_PLATFORM_FS_EVENT_FIELDS \ -- struct uv__queue watchers; \ -+ void* watchers[2]; \ - int wd; \ - - #endif /* UV_LINUX_H */ -diff --git a/deps/uv/include/uv/threadpool.h b/deps/uv/include/uv/threadpool.h -index 24ce916fda4..9708ebdd530 100644 ---- a/deps/uv/include/uv/threadpool.h -+++ b/deps/uv/include/uv/threadpool.h -@@ -31,7 +31,7 @@ struct uv__work { - void (*work)(struct uv__work *w); - void (*done)(struct uv__work *w, int status); - struct uv_loop_s* loop; -- struct uv__queue wq; -+ void* wq[2]; - }; - - #endif /* UV_THREADPOOL_H_ */ -diff --git a/deps/uv/include/uv/unix.h b/deps/uv/include/uv/unix.h -index 09f88a56742..95447b8dd67 100644 ---- a/deps/uv/include/uv/unix.h -+++ b/deps/uv/include/uv/unix.h -@@ -92,8 +92,8 @@ typedef struct uv__io_s uv__io_t; - - struct uv__io_s { - uv__io_cb cb; -- struct uv__queue pending_queue; -- struct uv__queue watcher_queue; -+ void* pending_queue[2]; -+ void* watcher_queue[2]; - unsigned int pevents; /* Pending event mask i.e. mask at next tick. */ - unsigned int events; /* Current event mask. */ - int fd; -@@ -220,21 +220,21 @@ typedef struct { - #define UV_LOOP_PRIVATE_FIELDS \ - unsigned long flags; \ - int backend_fd; \ -- struct uv__queue pending_queue; \ -- struct uv__queue watcher_queue; \ -+ void* pending_queue[2]; \ -+ void* watcher_queue[2]; \ - uv__io_t** watchers; \ - unsigned int nwatchers; \ - unsigned int nfds; \ -- struct uv__queue wq; \ -+ void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; \ - uv_rwlock_t cloexec_lock; \ - uv_handle_t* closing_handles; \ -- struct uv__queue process_handles; \ -- struct uv__queue prepare_handles; \ -- struct uv__queue check_handles; \ -- struct uv__queue idle_handles; \ -- struct uv__queue async_handles; \ -+ void* process_handles[2]; \ -+ void* prepare_handles[2]; \ -+ void* check_handles[2]; \ -+ void* idle_handles[2]; \ -+ void* async_handles[2]; \ - void (*async_unused)(void); /* TODO(bnoordhuis) Remove in libuv v2. */ \ - uv__io_t async_io_watcher; \ - int async_wfd; \ -@@ -257,7 +257,7 @@ typedef struct { - #define UV_PRIVATE_REQ_TYPES /* empty */ - - #define UV_WRITE_PRIVATE_FIELDS \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - unsigned int write_index; \ - uv_buf_t* bufs; \ - unsigned int nbufs; \ -@@ -265,12 +265,12 @@ typedef struct { - uv_buf_t bufsml[4]; \ - - #define UV_CONNECT_PRIVATE_FIELDS \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - - #define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */ - - #define UV_UDP_SEND_PRIVATE_FIELDS \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - struct sockaddr_storage addr; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ -@@ -286,8 +286,8 @@ typedef struct { - uv_connect_t *connect_req; \ - uv_shutdown_t *shutdown_req; \ - uv__io_t io_watcher; \ -- struct uv__queue write_queue; \ -- struct uv__queue write_completed_queue; \ -+ void* write_queue[2]; \ -+ void* write_completed_queue[2]; \ - uv_connection_cb connection_cb; \ - int delayed_error; \ - int accepted_fd; \ -@@ -300,8 +300,8 @@ typedef struct { - uv_alloc_cb alloc_cb; \ - uv_udp_recv_cb recv_cb; \ - uv__io_t io_watcher; \ -- struct uv__queue write_queue; \ -- struct uv__queue write_completed_queue; \ -+ void* write_queue[2]; \ -+ void* write_completed_queue[2]; \ - - #define UV_PIPE_PRIVATE_FIELDS \ - const char* pipe_fname; /* NULL or strdup'ed */ -@@ -311,19 +311,19 @@ typedef struct { - - #define UV_PREPARE_PRIVATE_FIELDS \ - uv_prepare_cb prepare_cb; \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - - #define UV_CHECK_PRIVATE_FIELDS \ - uv_check_cb check_cb; \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - - #define UV_IDLE_PRIVATE_FIELDS \ - uv_idle_cb idle_cb; \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - - #define UV_ASYNC_PRIVATE_FIELDS \ - uv_async_cb async_cb; \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - int pending; \ - - #define UV_TIMER_PRIVATE_FIELDS \ -@@ -352,7 +352,7 @@ typedef struct { - int retcode; - - #define UV_PROCESS_PRIVATE_FIELDS \ -- struct uv__queue queue; \ -+ void* queue[2]; \ - int status; \ - - #define UV_FS_PRIVATE_FIELDS \ -diff --git a/deps/uv/include/uv/win.h b/deps/uv/include/uv/win.h -index 6f8c47298e4..92a95fa15f1 100644 ---- a/deps/uv/include/uv/win.h -+++ b/deps/uv/include/uv/win.h -@@ -357,7 +357,7 @@ typedef struct { - /* Counter to started timer */ \ - uint64_t timer_counter; \ - /* Threadpool */ \ -- struct uv__queue wq; \ -+ void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; - -@@ -486,7 +486,7 @@ typedef struct { - uint32_t payload_remaining; \ - uint64_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \ - } ipc_data_frame; \ -- struct uv__queue ipc_xfer_queue; \ -+ void* ipc_xfer_queue[2]; \ - int ipc_xfer_queue_length; \ - uv_write_t* non_overlapped_writes_tail; \ - CRITICAL_SECTION readfile_thread_lock; \ -diff --git a/deps/uv/src/queue.h b/deps/uv/src/queue.h -index 5f8489e9bc5..ff3540a0a51 100644 ---- a/deps/uv/src/queue.h -+++ b/deps/uv/src/queue.h -@@ -18,73 +18,91 @@ - - #include - --#define uv__queue_data(pointer, type, field) \ -- ((type*) ((char*) (pointer) - offsetof(type, field))) -- --#define uv__queue_foreach(q, h) \ -- for ((q) = (h)->next; (q) != (h); (q) = (q)->next) -- --static inline void uv__queue_init(struct uv__queue* q) { -- q->next = q; -- q->prev = q; --} -- --static inline int uv__queue_empty(const struct uv__queue* q) { -- return q == q->next; --} -- --static inline struct uv__queue* uv__queue_head(const struct uv__queue* q) { -- return q->next; --} -- --static inline struct uv__queue* uv__queue_next(const struct uv__queue* q) { -- return q->next; --} -- --static inline void uv__queue_add(struct uv__queue* h, struct uv__queue* n) { -- h->prev->next = n->next; -- n->next->prev = h->prev; -- h->prev = n->prev; -- h->prev->next = h; --} -- --static inline void uv__queue_split(struct uv__queue* h, -- struct uv__queue* q, -- struct uv__queue* n) { -- n->prev = h->prev; -- n->prev->next = n; -- n->next = q; -- h->prev = q->prev; -- h->prev->next = h; -- q->prev = n; --} -- --static inline void uv__queue_move(struct uv__queue* h, struct uv__queue* n) { -- if (uv__queue_empty(h)) -- uv__queue_init(n); -- else -- uv__queue_split(h, h->next, n); --} -- --static inline void uv__queue_insert_head(struct uv__queue* h, -- struct uv__queue* q) { -- q->next = h->next; -- q->prev = h; -- q->next->prev = q; -- h->next = q; --} -- --static inline void uv__queue_insert_tail(struct uv__queue* h, -- struct uv__queue* q) { -- q->next = h; -- q->prev = h->prev; -- q->prev->next = q; -- h->prev = q; --} -- --static inline void uv__queue_remove(struct uv__queue* q) { -- q->prev->next = q->next; -- q->next->prev = q->prev; --} -+typedef void *QUEUE[2]; -+ -+/* Private macros. */ -+#define QUEUE_NEXT(q) (*(QUEUE **) &((*(q))[0])) -+#define QUEUE_PREV(q) (*(QUEUE **) &((*(q))[1])) -+#define QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q))) -+#define QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q))) -+ -+/* Public macros. */ -+#define QUEUE_DATA(ptr, type, field) \ -+ ((type *) ((char *) (ptr) - offsetof(type, field))) -+ -+/* Important note: mutating the list while QUEUE_FOREACH is -+ * iterating over its elements results in undefined behavior. -+ */ -+#define QUEUE_FOREACH(q, h) \ -+ for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q)) -+ -+#define QUEUE_EMPTY(q) \ -+ ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q)) -+ -+#define QUEUE_HEAD(q) \ -+ (QUEUE_NEXT(q)) -+ -+#define QUEUE_INIT(q) \ -+ do { \ -+ QUEUE_NEXT(q) = (q); \ -+ QUEUE_PREV(q) = (q); \ -+ } \ -+ while (0) -+ -+#define QUEUE_ADD(h, n) \ -+ do { \ -+ QUEUE_PREV_NEXT(h) = QUEUE_NEXT(n); \ -+ QUEUE_NEXT_PREV(n) = QUEUE_PREV(h); \ -+ QUEUE_PREV(h) = QUEUE_PREV(n); \ -+ QUEUE_PREV_NEXT(h) = (h); \ -+ } \ -+ while (0) -+ -+#define QUEUE_SPLIT(h, q, n) \ -+ do { \ -+ QUEUE_PREV(n) = QUEUE_PREV(h); \ -+ QUEUE_PREV_NEXT(n) = (n); \ -+ QUEUE_NEXT(n) = (q); \ -+ QUEUE_PREV(h) = QUEUE_PREV(q); \ -+ QUEUE_PREV_NEXT(h) = (h); \ -+ QUEUE_PREV(q) = (n); \ -+ } \ -+ while (0) -+ -+#define QUEUE_MOVE(h, n) \ -+ do { \ -+ if (QUEUE_EMPTY(h)) \ -+ QUEUE_INIT(n); \ -+ else { \ -+ QUEUE* q = QUEUE_HEAD(h); \ -+ QUEUE_SPLIT(h, q, n); \ -+ } \ -+ } \ -+ while (0) -+ -+#define QUEUE_INSERT_HEAD(h, q) \ -+ do { \ -+ QUEUE_NEXT(q) = QUEUE_NEXT(h); \ -+ QUEUE_PREV(q) = (h); \ -+ QUEUE_NEXT_PREV(q) = (q); \ -+ QUEUE_NEXT(h) = (q); \ -+ } \ -+ while (0) -+ -+#define QUEUE_INSERT_TAIL(h, q) \ -+ do { \ -+ QUEUE_NEXT(q) = (h); \ -+ QUEUE_PREV(q) = QUEUE_PREV(h); \ -+ QUEUE_PREV_NEXT(q) = (q); \ -+ QUEUE_PREV(h) = (q); \ -+ } \ -+ while (0) -+ -+#define QUEUE_REMOVE(q) \ -+ do { \ -+ QUEUE_PREV_NEXT(q) = QUEUE_NEXT(q); \ -+ QUEUE_NEXT_PREV(q) = QUEUE_PREV(q); \ -+ } \ -+ while (0) - - #endif /* QUEUE_H_ */ -diff --git a/deps/uv/src/threadpool.c b/deps/uv/src/threadpool.c -index dbef67f2f10..51962bf0021 100644 ---- a/deps/uv/src/threadpool.c -+++ b/deps/uv/src/threadpool.c -@@ -37,10 +37,10 @@ static unsigned int slow_io_work_running; - static unsigned int nthreads; - static uv_thread_t* threads; - static uv_thread_t default_threads[4]; --static struct uv__queue exit_message; --static struct uv__queue wq; --static struct uv__queue run_slow_work_message; --static struct uv__queue slow_io_pending_wq; -+static QUEUE exit_message; -+static QUEUE wq; -+static QUEUE run_slow_work_message; -+static QUEUE slow_io_pending_wq; - - static unsigned int slow_work_thread_threshold(void) { - return (nthreads + 1) / 2; -@@ -56,7 +56,7 @@ static void uv__cancelled(struct uv__work* w) { - */ - static void worker(void* arg) { - struct uv__work* w; -- struct uv__queue* q; -+ QUEUE* q; - int is_slow_work; - - uv_sem_post((uv_sem_t*) arg); -@@ -68,49 +68,49 @@ static void worker(void* arg) { - - /* Keep waiting while either no work is present or only slow I/O - and we're at the threshold for that. */ -- while (uv__queue_empty(&wq) || -- (uv__queue_head(&wq) == &run_slow_work_message && -- uv__queue_next(&run_slow_work_message) == &wq && -+ while (QUEUE_EMPTY(&wq) || -+ (QUEUE_HEAD(&wq) == &run_slow_work_message && -+ QUEUE_NEXT(&run_slow_work_message) == &wq && - slow_io_work_running >= slow_work_thread_threshold())) { - idle_threads += 1; - uv_cond_wait(&cond, &mutex); - idle_threads -= 1; - } - -- q = uv__queue_head(&wq); -+ q = QUEUE_HEAD(&wq); - if (q == &exit_message) { - uv_cond_signal(&cond); - uv_mutex_unlock(&mutex); - break; - } - -- uv__queue_remove(q); -- uv__queue_init(q); /* Signal uv_cancel() that the work req is executing. */ -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); /* Signal uv_cancel() that the work req is executing. */ - - is_slow_work = 0; - if (q == &run_slow_work_message) { - /* If we're at the slow I/O threshold, re-schedule until after all - other work in the queue is done. */ - if (slow_io_work_running >= slow_work_thread_threshold()) { -- uv__queue_insert_tail(&wq, q); -+ QUEUE_INSERT_TAIL(&wq, q); - continue; - } - - /* If we encountered a request to run slow I/O work but there is none - to run, that means it's cancelled => Start over. */ -- if (uv__queue_empty(&slow_io_pending_wq)) -+ if (QUEUE_EMPTY(&slow_io_pending_wq)) - continue; - - is_slow_work = 1; - slow_io_work_running++; - -- q = uv__queue_head(&slow_io_pending_wq); -- uv__queue_remove(q); -- uv__queue_init(q); -+ q = QUEUE_HEAD(&slow_io_pending_wq); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - - /* If there is more slow I/O work, schedule it to be run as well. */ -- if (!uv__queue_empty(&slow_io_pending_wq)) { -- uv__queue_insert_tail(&wq, &run_slow_work_message); -+ if (!QUEUE_EMPTY(&slow_io_pending_wq)) { -+ QUEUE_INSERT_TAIL(&wq, &run_slow_work_message); - if (idle_threads > 0) - uv_cond_signal(&cond); - } -@@ -118,13 +118,13 @@ static void worker(void* arg) { - - uv_mutex_unlock(&mutex); - -- w = uv__queue_data(q, struct uv__work, wq); -+ w = QUEUE_DATA(q, struct uv__work, wq); - w->work(w); - - uv_mutex_lock(&w->loop->wq_mutex); - w->work = NULL; /* Signal uv_cancel() that the work req is done - executing. */ -- uv__queue_insert_tail(&w->loop->wq, &w->wq); -+ QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq); - uv_async_send(&w->loop->wq_async); - uv_mutex_unlock(&w->loop->wq_mutex); - -@@ -139,12 +139,12 @@ static void worker(void* arg) { - } - - --static void post(struct uv__queue* q, enum uv__work_kind kind) { -+static void post(QUEUE* q, enum uv__work_kind kind) { - uv_mutex_lock(&mutex); - if (kind == UV__WORK_SLOW_IO) { - /* Insert into a separate queue. */ -- uv__queue_insert_tail(&slow_io_pending_wq, q); -- if (!uv__queue_empty(&run_slow_work_message)) { -+ QUEUE_INSERT_TAIL(&slow_io_pending_wq, q); -+ if (!QUEUE_EMPTY(&run_slow_work_message)) { - /* Running slow I/O tasks is already scheduled => Nothing to do here. - The worker that runs said other task will schedule this one as well. */ - uv_mutex_unlock(&mutex); -@@ -153,7 +153,7 @@ static void post(struct uv__queue* q, enum uv__work_kind kind) { - q = &run_slow_work_message; - } - -- uv__queue_insert_tail(&wq, q); -+ QUEUE_INSERT_TAIL(&wq, q); - if (idle_threads > 0) - uv_cond_signal(&cond); - uv_mutex_unlock(&mutex); -@@ -220,9 +220,9 @@ static void init_threads(void) { - if (uv_mutex_init(&mutex)) - abort(); - -- uv__queue_init(&wq); -- uv__queue_init(&slow_io_pending_wq); -- uv__queue_init(&run_slow_work_message); -+ QUEUE_INIT(&wq); -+ QUEUE_INIT(&slow_io_pending_wq); -+ QUEUE_INIT(&run_slow_work_message); - - if (uv_sem_init(&sem, 0)) - abort(); -@@ -285,9 +285,9 @@ static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { - uv_mutex_lock(&mutex); - uv_mutex_lock(&w->loop->wq_mutex); - -- cancelled = !uv__queue_empty(&w->wq) && w->work != NULL; -+ cancelled = !QUEUE_EMPTY(&w->wq) && w->work != NULL; - if (cancelled) -- uv__queue_remove(&w->wq); -+ QUEUE_REMOVE(&w->wq); - - uv_mutex_unlock(&w->loop->wq_mutex); - uv_mutex_unlock(&mutex); -@@ -297,7 +297,7 @@ static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { - - w->work = uv__cancelled; - uv_mutex_lock(&loop->wq_mutex); -- uv__queue_insert_tail(&loop->wq, &w->wq); -+ QUEUE_INSERT_TAIL(&loop->wq, &w->wq); - uv_async_send(&loop->wq_async); - uv_mutex_unlock(&loop->wq_mutex); - -@@ -308,21 +308,21 @@ static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { - void uv__work_done(uv_async_t* handle) { - struct uv__work* w; - uv_loop_t* loop; -- struct uv__queue* q; -- struct uv__queue wq; -+ QUEUE* q; -+ QUEUE wq; - int err; - int nevents; - - loop = container_of(handle, uv_loop_t, wq_async); - uv_mutex_lock(&loop->wq_mutex); -- uv__queue_move(&loop->wq, &wq); -+ QUEUE_MOVE(&loop->wq, &wq); - uv_mutex_unlock(&loop->wq_mutex); - - nevents = 0; - -- while (!uv__queue_empty(&wq)) { -- q = uv__queue_head(&wq); -- uv__queue_remove(q); -+ while (!QUEUE_EMPTY(&wq)) { -+ q = QUEUE_HEAD(&wq); -+ QUEUE_REMOVE(q); - - w = container_of(q, struct uv__work, wq); - err = (w->work == uv__cancelled) ? UV_ECANCELED : 0; -diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c -index 3af3009a216..f1afbed49ec 100644 ---- a/deps/uv/src/unix/aix.c -+++ b/deps/uv/src/unix/aix.c -@@ -136,7 +136,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - struct pollfd pqry; - struct pollfd* pe; - struct poll_ctl pc; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - uint64_t base; - uint64_t diff; -@@ -151,18 +151,18 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int reset_timeout; - - if (loop->nfds == 0) { -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - lfields = uv__get_internal_fields(loop); - -- while (!uv__queue_empty(&loop->watcher_queue)) { -- q = uv__queue_head(&loop->watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - -- w = uv__queue_data(q, uv__io_t, watcher_queue); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); -diff --git a/deps/uv/src/unix/async.c b/deps/uv/src/unix/async.c -index 0ff2669e30a..5751b6d02be 100644 ---- a/deps/uv/src/unix/async.c -+++ b/deps/uv/src/unix/async.c -@@ -55,7 +55,7 @@ int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) { - handle->pending = 0; - handle->u.fd = 0; /* This will be used as a busy flag. */ - -- uv__queue_insert_tail(&loop->async_handles, &handle->queue); -+ QUEUE_INSERT_TAIL(&loop->async_handles, &handle->queue); - uv__handle_start(handle); - - return 0; -@@ -124,7 +124,7 @@ static void uv__async_spin(uv_async_t* handle) { - - void uv__async_close(uv_async_t* handle) { - uv__async_spin(handle); -- uv__queue_remove(&handle->queue); -+ QUEUE_REMOVE(&handle->queue); - uv__handle_stop(handle); - } - -@@ -132,8 +132,8 @@ void uv__async_close(uv_async_t* handle) { - static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - char buf[1024]; - ssize_t r; -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - uv_async_t* h; - _Atomic int *pending; - -@@ -157,13 +157,13 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - abort(); - } - -- uv__queue_move(&loop->async_handles, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- h = uv__queue_data(q, uv_async_t, queue); -+ QUEUE_MOVE(&loop->async_handles, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ h = QUEUE_DATA(q, uv_async_t, queue); - -- uv__queue_remove(q); -- uv__queue_insert_tail(&loop->async_handles, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&loop->async_handles, q); - - /* Atomically fetch and clear pending flag */ - pending = (_Atomic int*) &h->pending; -@@ -241,8 +241,8 @@ static int uv__async_start(uv_loop_t* loop) { - - - void uv__async_stop(uv_loop_t* loop) { -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - uv_async_t* h; - - if (loop->async_io_watcher.fd == -1) -@@ -251,13 +251,13 @@ void uv__async_stop(uv_loop_t* loop) { - /* Make sure no other thread is accessing the async handle fd after the loop - * cleanup. - */ -- uv__queue_move(&loop->async_handles, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- h = uv__queue_data(q, uv_async_t, queue); -+ QUEUE_MOVE(&loop->async_handles, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ h = QUEUE_DATA(q, uv_async_t, queue); - -- uv__queue_remove(q); -- uv__queue_insert_tail(&loop->async_handles, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&loop->async_handles, q); - - uv__async_spin(h); - } -@@ -275,20 +275,20 @@ void uv__async_stop(uv_loop_t* loop) { - - - int uv__async_fork(uv_loop_t* loop) { -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - uv_async_t* h; - - if (loop->async_io_watcher.fd == -1) /* never started */ - return 0; - -- uv__queue_move(&loop->async_handles, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- h = uv__queue_data(q, uv_async_t, queue); -+ QUEUE_MOVE(&loop->async_handles, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ h = QUEUE_DATA(q, uv_async_t, queue); - -- uv__queue_remove(q); -- uv__queue_insert_tail(&loop->async_handles, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&loop->async_handles, q); - - /* The state of any thread that set pending is now likely corrupt in this - * child because the user called fork, so just clear these flags and move -diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c -index 25c5181f370..55aa962787e 100644 ---- a/deps/uv/src/unix/core.c -+++ b/deps/uv/src/unix/core.c -@@ -344,7 +344,7 @@ static void uv__finish_close(uv_handle_t* handle) { - } - - uv__handle_unref(handle); -- uv__queue_remove(&handle->handle_queue); -+ QUEUE_REMOVE(&handle->handle_queue); - - if (handle->close_cb) { - handle->close_cb(handle); -@@ -380,7 +380,7 @@ int uv_backend_fd(const uv_loop_t* loop) { - static int uv__loop_alive(const uv_loop_t* loop) { - return uv__has_active_handles(loop) || - uv__has_active_reqs(loop) || -- !uv__queue_empty(&loop->pending_queue) || -+ !QUEUE_EMPTY(&loop->pending_queue) || - loop->closing_handles != NULL; - } - -@@ -389,8 +389,8 @@ static int uv__backend_timeout(const uv_loop_t* loop) { - if (loop->stop_flag == 0 && - /* uv__loop_alive(loop) && */ - (uv__has_active_handles(loop) || uv__has_active_reqs(loop)) && -- uv__queue_empty(&loop->pending_queue) && -- uv__queue_empty(&loop->idle_handles) && -+ QUEUE_EMPTY(&loop->pending_queue) && -+ QUEUE_EMPTY(&loop->idle_handles) && - (loop->flags & UV_LOOP_REAP_CHILDREN) == 0 && - loop->closing_handles == NULL) - return uv__next_timeout(loop); -@@ -399,7 +399,7 @@ static int uv__backend_timeout(const uv_loop_t* loop) { - - - int uv_backend_timeout(const uv_loop_t* loop) { -- if (uv__queue_empty(&loop->watcher_queue)) -+ if (QUEUE_EMPTY(&loop->watcher_queue)) - return uv__backend_timeout(loop); - /* Need to call uv_run to update the backend fd state. */ - return 0; -@@ -431,8 +431,7 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) { - - while (r != 0 && loop->stop_flag == 0) { - can_sleep = -- uv__queue_empty(&loop->pending_queue) && -- uv__queue_empty(&loop->idle_handles); -+ QUEUE_EMPTY(&loop->pending_queue) && QUEUE_EMPTY(&loop->idle_handles); - - uv__run_pending(loop); - uv__run_idle(loop); -@@ -448,7 +447,7 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) { - - /* Process immediate callbacks (e.g. write_cb) a small fixed number of - * times to avoid loop starvation.*/ -- for (r = 0; r < 8 && !uv__queue_empty(&loop->pending_queue); r++) -+ for (r = 0; r < 8 && !QUEUE_EMPTY(&loop->pending_queue); r++) - uv__run_pending(loop); - - /* Run one final update on the provider_idle_time in case uv__io_poll -@@ -827,17 +826,17 @@ int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) { - - - static void uv__run_pending(uv_loop_t* loop) { -- struct uv__queue* q; -- struct uv__queue pq; -+ QUEUE* q; -+ QUEUE pq; - uv__io_t* w; - -- uv__queue_move(&loop->pending_queue, &pq); -+ QUEUE_MOVE(&loop->pending_queue, &pq); - -- while (!uv__queue_empty(&pq)) { -- q = uv__queue_head(&pq); -- uv__queue_remove(q); -- uv__queue_init(q); -- w = uv__queue_data(q, uv__io_t, pending_queue); -+ while (!QUEUE_EMPTY(&pq)) { -+ q = QUEUE_HEAD(&pq); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); -+ w = QUEUE_DATA(q, uv__io_t, pending_queue); - w->cb(loop, w, POLLOUT); - } - } -@@ -892,8 +891,8 @@ static void maybe_resize(uv_loop_t* loop, unsigned int len) { - void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd) { - assert(cb != NULL); - assert(fd >= -1); -- uv__queue_init(&w->pending_queue); -- uv__queue_init(&w->watcher_queue); -+ QUEUE_INIT(&w->pending_queue); -+ QUEUE_INIT(&w->watcher_queue); - w->cb = cb; - w->fd = fd; - w->events = 0; -@@ -919,8 +918,8 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - return; - #endif - -- if (uv__queue_empty(&w->watcher_queue)) -- uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue); -+ if (QUEUE_EMPTY(&w->watcher_queue)) -+ QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - - if (loop->watchers[w->fd] == NULL) { - loop->watchers[w->fd] = w; -@@ -945,8 +944,8 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - w->pevents &= ~events; - - if (w->pevents == 0) { -- uv__queue_remove(&w->watcher_queue); -- uv__queue_init(&w->watcher_queue); -+ QUEUE_REMOVE(&w->watcher_queue); -+ QUEUE_INIT(&w->watcher_queue); - w->events = 0; - - if (w == loop->watchers[w->fd]) { -@@ -955,14 +954,14 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - loop->nfds--; - } - } -- else if (uv__queue_empty(&w->watcher_queue)) -- uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue); -+ else if (QUEUE_EMPTY(&w->watcher_queue)) -+ QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - } - - - void uv__io_close(uv_loop_t* loop, uv__io_t* w) { - uv__io_stop(loop, w, POLLIN | POLLOUT | UV__POLLRDHUP | UV__POLLPRI); -- uv__queue_remove(&w->pending_queue); -+ QUEUE_REMOVE(&w->pending_queue); - - /* Remove stale events for this file descriptor */ - if (w->fd != -1) -@@ -971,8 +970,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) { - - - void uv__io_feed(uv_loop_t* loop, uv__io_t* w) { -- if (uv__queue_empty(&w->pending_queue)) -- uv__queue_insert_tail(&loop->pending_queue, &w->pending_queue); -+ if (QUEUE_EMPTY(&w->pending_queue)) -+ QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue); - } - - -diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c -index 6b051c124f2..00d385c24b7 100644 ---- a/deps/uv/src/unix/fs.c -+++ b/deps/uv/src/unix/fs.c -@@ -62,6 +62,7 @@ - - #if defined(__linux__) - # include -+# include - #endif - - #if defined(__sun) -@@ -903,6 +904,31 @@ out: - - - #ifdef __linux__ -+static unsigned uv__kernel_version(void) { -+ static _Atomic unsigned cached_version; -+ struct utsname u; -+ unsigned version; -+ unsigned major; -+ unsigned minor; -+ unsigned patch; -+ -+ version = atomic_load_explicit(&cached_version, memory_order_relaxed); -+ if (version != 0) -+ return version; -+ -+ if (-1 == uname(&u)) -+ return 0; -+ -+ if (3 != sscanf(u.release, "%u.%u.%u", &major, &minor, &patch)) -+ return 0; -+ -+ version = major * 65536 + minor * 256 + patch; -+ atomic_store_explicit(&cached_version, version, memory_order_relaxed); -+ -+ return version; -+} -+ -+ - /* Pre-4.20 kernels have a bug where CephFS uses the RADOS copy-from command - * in copy_file_range() when it shouldn't. There is no workaround except to - * fall back to a regular copy. -@@ -1905,9 +1931,6 @@ int uv_fs_link(uv_loop_t* loop, - uv_fs_cb cb) { - INIT(LINK); - PATH2; -- if (cb != NULL) -- if (uv__iou_fs_link(loop, req)) -- return 0; - POST; - } - -@@ -1920,9 +1943,6 @@ int uv_fs_mkdir(uv_loop_t* loop, - INIT(MKDIR); - PATH; - req->mode = mode; -- if (cb != NULL) -- if (uv__iou_fs_mkdir(loop, req)) -- return 0; - POST; - } - -@@ -2074,9 +2094,6 @@ int uv_fs_rename(uv_loop_t* loop, - uv_fs_cb cb) { - INIT(RENAME); - PATH2; -- if (cb != NULL) -- if (uv__iou_fs_rename(loop, req)) -- return 0; - POST; - } - -@@ -2123,9 +2140,6 @@ int uv_fs_symlink(uv_loop_t* loop, - INIT(SYMLINK); - PATH2; - req->flags = flags; -- if (cb != NULL) -- if (uv__iou_fs_symlink(loop, req)) -- return 0; - POST; - } - -@@ -2133,9 +2147,6 @@ int uv_fs_symlink(uv_loop_t* loop, - int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(UNLINK); - PATH; -- if (cb != NULL) -- if (uv__iou_fs_unlink(loop, req)) -- return 0; - POST; - } - -diff --git a/deps/uv/src/unix/fsevents.c b/deps/uv/src/unix/fsevents.c -index df703f3635f..0535b4547aa 100644 ---- a/deps/uv/src/unix/fsevents.c -+++ b/deps/uv/src/unix/fsevents.c -@@ -80,13 +80,13 @@ enum uv__cf_loop_signal_type_e { - typedef enum uv__cf_loop_signal_type_e uv__cf_loop_signal_type_t; - - struct uv__cf_loop_signal_s { -- struct uv__queue member; -+ QUEUE member; - uv_fs_event_t* handle; - uv__cf_loop_signal_type_t type; - }; - - struct uv__fsevents_event_s { -- struct uv__queue member; -+ QUEUE member; - int events; - char path[1]; - }; -@@ -98,7 +98,7 @@ struct uv__cf_loop_state_s { - FSEventStreamRef fsevent_stream; - uv_sem_t fsevent_sem; - uv_mutex_t fsevent_mutex; -- struct uv__queue fsevent_handles; -+ void* fsevent_handles[2]; - unsigned int fsevent_handle_count; - }; - -@@ -150,22 +150,22 @@ static void (*pFSEventStreamStop)(FSEventStreamRef); - - #define UV__FSEVENTS_PROCESS(handle, block) \ - do { \ -- struct uv__queue events; \ -- struct uv__queue* q; \ -+ QUEUE events; \ -+ QUEUE* q; \ - uv__fsevents_event_t* event; \ - int err; \ - uv_mutex_lock(&(handle)->cf_mutex); \ - /* Split-off all events and empty original queue */ \ -- uv__queue_move(&(handle)->cf_events, &events); \ -+ QUEUE_MOVE(&(handle)->cf_events, &events); \ - /* Get error (if any) and zero original one */ \ - err = (handle)->cf_error; \ - (handle)->cf_error = 0; \ - uv_mutex_unlock(&(handle)->cf_mutex); \ - /* Loop through events, deallocating each after processing */ \ -- while (!uv__queue_empty(&events)) { \ -- q = uv__queue_head(&events); \ -- event = uv__queue_data(q, uv__fsevents_event_t, member); \ -- uv__queue_remove(q); \ -+ while (!QUEUE_EMPTY(&events)) { \ -+ q = QUEUE_HEAD(&events); \ -+ event = QUEUE_DATA(q, uv__fsevents_event_t, member); \ -+ QUEUE_REMOVE(q); \ - /* NOTE: Checking uv__is_active() is required here, because handle \ - * callback may close handle and invoking it after it will lead to \ - * incorrect behaviour */ \ -@@ -193,14 +193,14 @@ static void uv__fsevents_cb(uv_async_t* cb) { - - /* Runs in CF thread, pushed event into handle's event list */ - static void uv__fsevents_push_event(uv_fs_event_t* handle, -- struct uv__queue* events, -+ QUEUE* events, - int err) { - assert(events != NULL || err != 0); - uv_mutex_lock(&handle->cf_mutex); - - /* Concatenate two queues */ - if (events != NULL) -- uv__queue_add(&handle->cf_events, events); -+ QUEUE_ADD(&handle->cf_events, events); - - /* Propagate error */ - if (err != 0) -@@ -224,12 +224,12 @@ static void uv__fsevents_event_cb(const FSEventStreamRef streamRef, - char* path; - char* pos; - uv_fs_event_t* handle; -- struct uv__queue* q; -+ QUEUE* q; - uv_loop_t* loop; - uv__cf_loop_state_t* state; - uv__fsevents_event_t* event; - FSEventStreamEventFlags flags; -- struct uv__queue head; -+ QUEUE head; - - loop = info; - state = loop->cf_state; -@@ -238,9 +238,9 @@ static void uv__fsevents_event_cb(const FSEventStreamRef streamRef, - - /* For each handle */ - uv_mutex_lock(&state->fsevent_mutex); -- uv__queue_foreach(q, &state->fsevent_handles) { -- handle = uv__queue_data(q, uv_fs_event_t, cf_member); -- uv__queue_init(&head); -+ QUEUE_FOREACH(q, &state->fsevent_handles) { -+ handle = QUEUE_DATA(q, uv_fs_event_t, cf_member); -+ QUEUE_INIT(&head); - - /* Process and filter out events */ - for (i = 0; i < numEvents; i++) { -@@ -318,10 +318,10 @@ static void uv__fsevents_event_cb(const FSEventStreamRef streamRef, - event->events = UV_CHANGE; - } - -- uv__queue_insert_tail(&head, &event->member); -+ QUEUE_INSERT_TAIL(&head, &event->member); - } - -- if (!uv__queue_empty(&head)) -+ if (!QUEUE_EMPTY(&head)) - uv__fsevents_push_event(handle, &head, 0); - } - uv_mutex_unlock(&state->fsevent_mutex); -@@ -403,7 +403,7 @@ static void uv__fsevents_destroy_stream(uv__cf_loop_state_t* state) { - static void uv__fsevents_reschedule(uv__cf_loop_state_t* state, - uv_loop_t* loop, - uv__cf_loop_signal_type_t type) { -- struct uv__queue* q; -+ QUEUE* q; - uv_fs_event_t* curr; - CFArrayRef cf_paths; - CFStringRef* paths; -@@ -446,9 +446,9 @@ static void uv__fsevents_reschedule(uv__cf_loop_state_t* state, - - q = &state->fsevent_handles; - for (; i < path_count; i++) { -- q = uv__queue_next(q); -+ q = QUEUE_NEXT(q); - assert(q != &state->fsevent_handles); -- curr = uv__queue_data(q, uv_fs_event_t, cf_member); -+ curr = QUEUE_DATA(q, uv_fs_event_t, cf_member); - - assert(curr->realpath != NULL); - paths[i] = -@@ -486,8 +486,8 @@ final: - - /* Broadcast error to all handles */ - uv_mutex_lock(&state->fsevent_mutex); -- uv__queue_foreach(q, &state->fsevent_handles) { -- curr = uv__queue_data(q, uv_fs_event_t, cf_member); -+ QUEUE_FOREACH(q, &state->fsevent_handles) { -+ curr = QUEUE_DATA(q, uv_fs_event_t, cf_member); - uv__fsevents_push_event(curr, NULL, err); - } - uv_mutex_unlock(&state->fsevent_mutex); -@@ -606,7 +606,7 @@ static int uv__fsevents_loop_init(uv_loop_t* loop) { - if (err) - goto fail_sem_init; - -- uv__queue_init(&loop->cf_signals); -+ QUEUE_INIT(&loop->cf_signals); - - err = uv_sem_init(&state->fsevent_sem, 0); - if (err) -@@ -616,7 +616,7 @@ static int uv__fsevents_loop_init(uv_loop_t* loop) { - if (err) - goto fail_fsevent_mutex_init; - -- uv__queue_init(&state->fsevent_handles); -+ QUEUE_INIT(&state->fsevent_handles); - state->fsevent_need_reschedule = 0; - state->fsevent_handle_count = 0; - -@@ -675,7 +675,7 @@ fail_mutex_init: - void uv__fsevents_loop_delete(uv_loop_t* loop) { - uv__cf_loop_signal_t* s; - uv__cf_loop_state_t* state; -- struct uv__queue* q; -+ QUEUE* q; - - if (loop->cf_state == NULL) - return; -@@ -688,10 +688,10 @@ void uv__fsevents_loop_delete(uv_loop_t* loop) { - uv_mutex_destroy(&loop->cf_mutex); - - /* Free any remaining data */ -- while (!uv__queue_empty(&loop->cf_signals)) { -- q = uv__queue_head(&loop->cf_signals); -- s = uv__queue_data(q, uv__cf_loop_signal_t, member); -- uv__queue_remove(q); -+ while (!QUEUE_EMPTY(&loop->cf_signals)) { -+ q = QUEUE_HEAD(&loop->cf_signals); -+ s = QUEUE_DATA(q, uv__cf_loop_signal_t, member); -+ QUEUE_REMOVE(q); - uv__free(s); - } - -@@ -735,22 +735,22 @@ static void* uv__cf_loop_runner(void* arg) { - static void uv__cf_loop_cb(void* arg) { - uv_loop_t* loop; - uv__cf_loop_state_t* state; -- struct uv__queue* item; -- struct uv__queue split_head; -+ QUEUE* item; -+ QUEUE split_head; - uv__cf_loop_signal_t* s; - - loop = arg; - state = loop->cf_state; - - uv_mutex_lock(&loop->cf_mutex); -- uv__queue_move(&loop->cf_signals, &split_head); -+ QUEUE_MOVE(&loop->cf_signals, &split_head); - uv_mutex_unlock(&loop->cf_mutex); - -- while (!uv__queue_empty(&split_head)) { -- item = uv__queue_head(&split_head); -- uv__queue_remove(item); -+ while (!QUEUE_EMPTY(&split_head)) { -+ item = QUEUE_HEAD(&split_head); -+ QUEUE_REMOVE(item); - -- s = uv__queue_data(item, uv__cf_loop_signal_t, member); -+ s = QUEUE_DATA(item, uv__cf_loop_signal_t, member); - - /* This was a termination signal */ - if (s->handle == NULL) -@@ -778,7 +778,7 @@ int uv__cf_loop_signal(uv_loop_t* loop, - item->type = type; - - uv_mutex_lock(&loop->cf_mutex); -- uv__queue_insert_tail(&loop->cf_signals, &item->member); -+ QUEUE_INSERT_TAIL(&loop->cf_signals, &item->member); - - state = loop->cf_state; - assert(state != NULL); -@@ -807,7 +807,7 @@ int uv__fsevents_init(uv_fs_event_t* handle) { - handle->realpath_len = strlen(handle->realpath); - - /* Initialize event queue */ -- uv__queue_init(&handle->cf_events); -+ QUEUE_INIT(&handle->cf_events); - handle->cf_error = 0; - - /* -@@ -832,7 +832,7 @@ int uv__fsevents_init(uv_fs_event_t* handle) { - /* Insert handle into the list */ - state = handle->loop->cf_state; - uv_mutex_lock(&state->fsevent_mutex); -- uv__queue_insert_tail(&state->fsevent_handles, &handle->cf_member); -+ QUEUE_INSERT_TAIL(&state->fsevent_handles, &handle->cf_member); - state->fsevent_handle_count++; - state->fsevent_need_reschedule = 1; - uv_mutex_unlock(&state->fsevent_mutex); -@@ -872,7 +872,7 @@ int uv__fsevents_close(uv_fs_event_t* handle) { - /* Remove handle from the list */ - state = handle->loop->cf_state; - uv_mutex_lock(&state->fsevent_mutex); -- uv__queue_remove(&handle->cf_member); -+ QUEUE_REMOVE(&handle->cf_member); - state->fsevent_handle_count--; - state->fsevent_need_reschedule = 1; - uv_mutex_unlock(&state->fsevent_mutex); -diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h -index fe588513603..6c5822e6a0d 100644 ---- a/deps/uv/src/unix/internal.h -+++ b/deps/uv/src/unix/internal.h -@@ -335,30 +335,20 @@ int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req); - int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop, - uv_fs_t* req, - uint32_t fsync_flags); --int uv__iou_fs_link(uv_loop_t* loop, uv_fs_t* req); --int uv__iou_fs_mkdir(uv_loop_t* loop, uv_fs_t* req); - int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req); - int uv__iou_fs_read_or_write(uv_loop_t* loop, - uv_fs_t* req, - int is_read); --int uv__iou_fs_rename(uv_loop_t* loop, uv_fs_t* req); - int uv__iou_fs_statx(uv_loop_t* loop, - uv_fs_t* req, - int is_fstat, - int is_lstat); --int uv__iou_fs_symlink(uv_loop_t* loop, uv_fs_t* req); --int uv__iou_fs_unlink(uv_loop_t* loop, uv_fs_t* req); - #else - #define uv__iou_fs_close(loop, req) 0 - #define uv__iou_fs_fsync_or_fdatasync(loop, req, fsync_flags) 0 --#define uv__iou_fs_link(loop, req) 0 --#define uv__iou_fs_mkdir(loop, req) 0 - #define uv__iou_fs_open(loop, req) 0 - #define uv__iou_fs_read_or_write(loop, req, is_read) 0 --#define uv__iou_fs_rename(loop, req) 0 - #define uv__iou_fs_statx(loop, req, is_fstat, is_lstat) 0 --#define uv__iou_fs_symlink(loop, req) 0 --#define uv__iou_fs_unlink(loop, req) 0 - #endif - - #if defined(__APPLE__) -@@ -439,7 +429,6 @@ int uv__statx(int dirfd, - struct uv__statx* statxbuf); - void uv__statx_to_stat(const struct uv__statx* statxbuf, uv_stat_t* buf); - ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags); --unsigned uv__kernel_version(void); - #endif - - typedef int (*uv__peersockfunc)(int, struct sockaddr*, socklen_t*); -diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c -index b78242d3be4..82916d65933 100644 ---- a/deps/uv/src/unix/kqueue.c -+++ b/deps/uv/src/unix/kqueue.c -@@ -133,7 +133,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - struct timespec spec; - unsigned int nevents; - unsigned int revents; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - uv_process_t* process; - sigset_t* pset; -@@ -152,19 +152,19 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int reset_timeout; - - if (loop->nfds == 0) { -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - lfields = uv__get_internal_fields(loop); - nevents = 0; - -- while (!uv__queue_empty(&loop->watcher_queue)) { -- q = uv__queue_head(&loop->watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - -- w = uv__queue_data(q, uv__io_t, watcher_queue); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); -@@ -307,8 +307,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - - /* Handle kevent NOTE_EXIT results */ - if (ev->filter == EVFILT_PROC) { -- uv__queue_foreach(q, &loop->process_handles) { -- process = uv__queue_data(q, uv_process_t, queue); -+ QUEUE_FOREACH(q, &loop->process_handles) { -+ process = QUEUE_DATA(q, uv_process_t, queue); - if (process->pid == fd) { - process->flags |= UV_HANDLE_REAP; - loop->flags |= UV_LOOP_REAP_CHILDREN; -diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c -index 48b9c2c43e1..5f84ad0eea3 100644 ---- a/deps/uv/src/unix/linux.c -+++ b/deps/uv/src/unix/linux.c -@@ -48,7 +48,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -151,11 +150,6 @@ enum { - UV__IORING_OP_CLOSE = 19, - UV__IORING_OP_STATX = 21, - UV__IORING_OP_EPOLL_CTL = 29, -- UV__IORING_OP_RENAMEAT = 35, -- UV__IORING_OP_UNLINKAT = 36, -- UV__IORING_OP_MKDIRAT = 37, -- UV__IORING_OP_SYMLINKAT = 38, -- UV__IORING_OP_LINKAT = 39, - }; - - enum { -@@ -168,10 +162,6 @@ enum { - UV__IORING_SQ_CQ_OVERFLOW = 2u, - }; - --enum { -- UV__MKDIRAT_SYMLINKAT_LINKAT = 1u, --}; -- - struct uv__io_cqring_offsets { - uint32_t head; - uint32_t tail; -@@ -267,7 +257,7 @@ STATIC_ASSERT(EPOLL_CTL_MOD < 4); - - struct watcher_list { - RB_ENTRY(watcher_list) entry; -- struct uv__queue watchers; -+ QUEUE watchers; - int iterating; - char* path; - int wd; -@@ -310,31 +300,6 @@ static struct watcher_root* uv__inotify_watchers(uv_loop_t* loop) { - } - - --unsigned uv__kernel_version(void) { -- static _Atomic unsigned cached_version; -- struct utsname u; -- unsigned version; -- unsigned major; -- unsigned minor; -- unsigned patch; -- -- version = atomic_load_explicit(&cached_version, memory_order_relaxed); -- if (version != 0) -- return version; -- -- if (-1 == uname(&u)) -- return 0; -- -- if (3 != sscanf(u.release, "%u.%u.%u", &major, &minor, &patch)) -- return 0; -- -- version = major * 65536 + minor * 256 + patch; -- atomic_store_explicit(&cached_version, version, memory_order_relaxed); -- -- return version; --} -- -- - ssize_t - uv__fs_copy_file_range(int fd_in, - off_t* off_in, -@@ -420,9 +385,6 @@ int uv__io_uring_register(int fd, unsigned opcode, void* arg, unsigned nargs) { - - - static int uv__use_io_uring(void) { --#if defined(__ANDROID_API__) -- return 0; /* Possibly available but blocked by seccomp. */ --#else - /* Ternary: unknown=0, yes=1, no=-1 */ - static _Atomic int use_io_uring; - char* val; -@@ -437,7 +399,6 @@ static int uv__use_io_uring(void) { - } - - return use > 0; --#endif - } - - -@@ -542,10 +503,6 @@ static void uv__iou_init(int epollfd, - iou->sqelen = sqelen; - iou->ringfd = ringfd; - iou->in_flight = 0; -- iou->flags = 0; -- -- if (uv__kernel_version() >= /* 5.15.0 */ 0x050F00) -- iou->flags |= UV__MKDIRAT_SYMLINKAT_LINKAT; - - for (i = 0; i <= iou->sqmask; i++) - iou->sqarray[i] = i; /* Slot -> sqe identity mapping. */ -@@ -727,7 +684,7 @@ static struct uv__io_uring_sqe* uv__iou_get_sqe(struct uv__iou* iou, - req->work_req.loop = loop; - req->work_req.work = NULL; - req->work_req.done = NULL; -- uv__queue_init(&req->work_req.wq); -+ QUEUE_INIT(&req->work_req.wq); - - uv__req_register(loop, req); - iou->in_flight++; -@@ -757,17 +714,6 @@ int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req) { - struct uv__io_uring_sqe* sqe; - struct uv__iou* iou; - -- /* Work around a poorly understood bug in older kernels where closing a file -- * descriptor pointing to /foo/bar results in ETXTBSY errors when trying to -- * execve("/foo/bar") later on. The bug seems to have been fixed somewhere -- * between 5.15.85 and 5.15.90. I couldn't pinpoint the responsible commit -- * but good candidates are the several data race fixes. Interestingly, it -- * seems to manifest only when running under Docker so the possibility of -- * a Docker bug can't be completely ruled out either. Yay, computers. -- */ -- if (uv__kernel_version() < /* 5.15.90 */ 0x050F5A) -- return 0; -- - iou = &uv__get_internal_fields(loop)->iou; - - sqe = uv__iou_get_sqe(iou, loop, req); -@@ -808,55 +754,6 @@ int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop, - } - - --int uv__iou_fs_link(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- if (!(iou->flags & UV__MKDIRAT_SYMLINKAT_LINKAT)) -- return 0; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->addr2 = (uintptr_t) req->new_path; -- sqe->len = AT_FDCWD; -- sqe->opcode = UV__IORING_OP_LINKAT; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_mkdir(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- if (!(iou->flags & UV__MKDIRAT_SYMLINKAT_LINKAT)) -- return 0; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->len = req->mode; -- sqe->opcode = UV__IORING_OP_MKDIRAT; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- - int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req) { - struct uv__io_uring_sqe* sqe; - struct uv__iou* iou; -@@ -879,86 +776,16 @@ int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req) { - } - - --int uv__iou_fs_rename(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->addr2 = (uintptr_t) req->new_path; -- sqe->len = AT_FDCWD; -- sqe->opcode = UV__IORING_OP_RENAMEAT; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_symlink(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- if (!(iou->flags & UV__MKDIRAT_SYMLINKAT_LINKAT)) -- return 0; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->addr2 = (uintptr_t) req->new_path; -- sqe->opcode = UV__IORING_OP_SYMLINKAT; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_unlink(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->opcode = UV__IORING_OP_UNLINKAT; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- - int uv__iou_fs_read_or_write(uv_loop_t* loop, - uv_fs_t* req, - int is_read) { - struct uv__io_uring_sqe* sqe; - struct uv__iou* iou; - -- /* If iovcnt is greater than IOV_MAX, cap it to IOV_MAX on reads and fallback -- * to the threadpool on writes */ -- if (req->nbufs > IOV_MAX) { -- if (is_read) -- req->nbufs = IOV_MAX; -- else -- return 0; -- } -+ /* For the moment, if iovcnt is greater than IOV_MAX, fallback to the -+ * threadpool. In the future we might take advantage of IOSQE_IO_LINK. */ -+ if (req->nbufs > IOV_MAX) -+ return 0; - - iou = &uv__get_internal_fields(loop)->iou; - -@@ -1265,7 +1092,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - struct uv__iou* ctl; - struct uv__iou* iou; - int real_timeout; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - sigset_t* sigmask; - sigset_t sigset; -@@ -1311,11 +1138,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - - memset(&e, 0, sizeof(e)); - -- while (!uv__queue_empty(&loop->watcher_queue)) { -- q = uv__queue_head(&loop->watcher_queue); -- w = uv__queue_data(q, uv__io_t, watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - - op = EPOLL_CTL_MOD; - if (w->events == 0) -@@ -2272,8 +2099,8 @@ static int uv__inotify_fork(uv_loop_t* loop, struct watcher_list* root) { - struct watcher_list* tmp_watcher_list_iter; - struct watcher_list* watcher_list; - struct watcher_list tmp_watcher_list; -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - uv_fs_event_t* handle; - char* tmp_path; - -@@ -2285,41 +2112,41 @@ static int uv__inotify_fork(uv_loop_t* loop, struct watcher_list* root) { - */ - loop->inotify_watchers = root; - -- uv__queue_init(&tmp_watcher_list.watchers); -+ QUEUE_INIT(&tmp_watcher_list.watchers); - /* Note that the queue we use is shared with the start and stop() -- * functions, making uv__queue_foreach unsafe to use. So we use the -- * uv__queue_move trick to safely iterate. Also don't free the watcher -+ * functions, making QUEUE_FOREACH unsafe to use. So we use the -+ * QUEUE_MOVE trick to safely iterate. Also don't free the watcher - * list until we're done iterating. c.f. uv__inotify_read. - */ - RB_FOREACH_SAFE(watcher_list, watcher_root, - uv__inotify_watchers(loop), tmp_watcher_list_iter) { - watcher_list->iterating = 1; -- uv__queue_move(&watcher_list->watchers, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- handle = uv__queue_data(q, uv_fs_event_t, watchers); -+ QUEUE_MOVE(&watcher_list->watchers, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ handle = QUEUE_DATA(q, uv_fs_event_t, watchers); - /* It's critical to keep a copy of path here, because it - * will be set to NULL by stop() and then deallocated by - * maybe_free_watcher_list - */ - tmp_path = uv__strdup(handle->path); - assert(tmp_path != NULL); -- uv__queue_remove(q); -- uv__queue_insert_tail(&watcher_list->watchers, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&watcher_list->watchers, q); - uv_fs_event_stop(handle); - -- uv__queue_insert_tail(&tmp_watcher_list.watchers, &handle->watchers); -+ QUEUE_INSERT_TAIL(&tmp_watcher_list.watchers, &handle->watchers); - handle->path = tmp_path; - } - watcher_list->iterating = 0; - maybe_free_watcher_list(watcher_list, loop); - } - -- uv__queue_move(&tmp_watcher_list.watchers, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- uv__queue_remove(q); -- handle = uv__queue_data(q, uv_fs_event_t, watchers); -+ QUEUE_MOVE(&tmp_watcher_list.watchers, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ QUEUE_REMOVE(q); -+ handle = QUEUE_DATA(q, uv_fs_event_t, watchers); - tmp_path = handle->path; - handle->path = NULL; - err = uv_fs_event_start(handle, handle->cb, tmp_path, 0); -@@ -2341,7 +2168,7 @@ static struct watcher_list* find_watcher(uv_loop_t* loop, int wd) { - - static void maybe_free_watcher_list(struct watcher_list* w, uv_loop_t* loop) { - /* if the watcher_list->watchers is being iterated over, we can't free it. */ -- if ((!w->iterating) && uv__queue_empty(&w->watchers)) { -+ if ((!w->iterating) && QUEUE_EMPTY(&w->watchers)) { - /* No watchers left for this path. Clean up. */ - RB_REMOVE(watcher_root, uv__inotify_watchers(loop), w); - inotify_rm_watch(loop->inotify_fd, w->wd); -@@ -2356,8 +2183,8 @@ static void uv__inotify_read(uv_loop_t* loop, - const struct inotify_event* e; - struct watcher_list* w; - uv_fs_event_t* h; -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - const char* path; - ssize_t size; - const char *p; -@@ -2400,7 +2227,7 @@ static void uv__inotify_read(uv_loop_t* loop, - * What can go wrong? - * A callback could call uv_fs_event_stop() - * and the queue can change under our feet. -- * So, we use uv__queue_move() trick to safely iterate over the queue. -+ * So, we use QUEUE_MOVE() trick to safely iterate over the queue. - * And we don't free the watcher_list until we're done iterating. - * - * First, -@@ -2408,13 +2235,13 @@ static void uv__inotify_read(uv_loop_t* loop, - * not to free watcher_list. - */ - w->iterating = 1; -- uv__queue_move(&w->watchers, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- h = uv__queue_data(q, uv_fs_event_t, watchers); -+ QUEUE_MOVE(&w->watchers, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ h = QUEUE_DATA(q, uv_fs_event_t, watchers); - -- uv__queue_remove(q); -- uv__queue_insert_tail(&w->watchers, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&w->watchers, q); - - h->cb(h, path, events, 0); - } -@@ -2476,13 +2303,13 @@ int uv_fs_event_start(uv_fs_event_t* handle, - - w->wd = wd; - w->path = memcpy(w + 1, path, len); -- uv__queue_init(&w->watchers); -+ QUEUE_INIT(&w->watchers); - w->iterating = 0; - RB_INSERT(watcher_root, uv__inotify_watchers(loop), w); - - no_insert: - uv__handle_start(handle); -- uv__queue_insert_tail(&w->watchers, &handle->watchers); -+ QUEUE_INSERT_TAIL(&w->watchers, &handle->watchers); - handle->path = w->path; - handle->cb = cb; - handle->wd = wd; -@@ -2503,7 +2330,7 @@ int uv_fs_event_stop(uv_fs_event_t* handle) { - handle->wd = -1; - handle->path = NULL; - uv__handle_stop(handle); -- uv__queue_remove(&handle->watchers); -+ QUEUE_REMOVE(&handle->watchers); - - maybe_free_watcher_list(w, handle->loop); - -diff --git a/deps/uv/src/unix/loop-watcher.c b/deps/uv/src/unix/loop-watcher.c -index 2db8b515df7..b8c1c2a7102 100644 ---- a/deps/uv/src/unix/loop-watcher.c -+++ b/deps/uv/src/unix/loop-watcher.c -@@ -32,7 +32,7 @@ - int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \ - if (uv__is_active(handle)) return 0; \ - if (cb == NULL) return UV_EINVAL; \ -- uv__queue_insert_head(&handle->loop->name##_handles, &handle->queue); \ -+ QUEUE_INSERT_HEAD(&handle->loop->name##_handles, &handle->queue); \ - handle->name##_cb = cb; \ - uv__handle_start(handle); \ - return 0; \ -@@ -40,21 +40,21 @@ - \ - int uv_##name##_stop(uv_##name##_t* handle) { \ - if (!uv__is_active(handle)) return 0; \ -- uv__queue_remove(&handle->queue); \ -+ QUEUE_REMOVE(&handle->queue); \ - uv__handle_stop(handle); \ - return 0; \ - } \ - \ - void uv__run_##name(uv_loop_t* loop) { \ - uv_##name##_t* h; \ -- struct uv__queue queue; \ -- struct uv__queue* q; \ -- uv__queue_move(&loop->name##_handles, &queue); \ -- while (!uv__queue_empty(&queue)) { \ -- q = uv__queue_head(&queue); \ -- h = uv__queue_data(q, uv_##name##_t, queue); \ -- uv__queue_remove(q); \ -- uv__queue_insert_tail(&loop->name##_handles, q); \ -+ QUEUE queue; \ -+ QUEUE* q; \ -+ QUEUE_MOVE(&loop->name##_handles, &queue); \ -+ while (!QUEUE_EMPTY(&queue)) { \ -+ q = QUEUE_HEAD(&queue); \ -+ h = QUEUE_DATA(q, uv_##name##_t, queue); \ -+ QUEUE_REMOVE(q); \ -+ QUEUE_INSERT_TAIL(&loop->name##_handles, q); \ - h->name##_cb(h); \ - } \ - } \ -diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c -index a9468e8e19c..90a51b339de 100644 ---- a/deps/uv/src/unix/loop.c -+++ b/deps/uv/src/unix/loop.c -@@ -50,20 +50,20 @@ int uv_loop_init(uv_loop_t* loop) { - sizeof(lfields->loop_metrics.metrics)); - - heap_init((struct heap*) &loop->timer_heap); -- uv__queue_init(&loop->wq); -- uv__queue_init(&loop->idle_handles); -- uv__queue_init(&loop->async_handles); -- uv__queue_init(&loop->check_handles); -- uv__queue_init(&loop->prepare_handles); -- uv__queue_init(&loop->handle_queue); -+ QUEUE_INIT(&loop->wq); -+ QUEUE_INIT(&loop->idle_handles); -+ QUEUE_INIT(&loop->async_handles); -+ QUEUE_INIT(&loop->check_handles); -+ QUEUE_INIT(&loop->prepare_handles); -+ QUEUE_INIT(&loop->handle_queue); - - loop->active_handles = 0; - loop->active_reqs.count = 0; - loop->nfds = 0; - loop->watchers = NULL; - loop->nwatchers = 0; -- uv__queue_init(&loop->pending_queue); -- uv__queue_init(&loop->watcher_queue); -+ QUEUE_INIT(&loop->pending_queue); -+ QUEUE_INIT(&loop->watcher_queue); - - loop->closing_handles = NULL; - uv__update_time(loop); -@@ -85,7 +85,7 @@ int uv_loop_init(uv_loop_t* loop) { - err = uv__process_init(loop); - if (err) - goto fail_signal_init; -- uv__queue_init(&loop->process_handles); -+ QUEUE_INIT(&loop->process_handles); - - err = uv_rwlock_init(&loop->cloexec_lock); - if (err) -@@ -152,9 +152,9 @@ int uv_loop_fork(uv_loop_t* loop) { - if (w == NULL) - continue; - -- if (w->pevents != 0 && uv__queue_empty(&w->watcher_queue)) { -+ if (w->pevents != 0 && QUEUE_EMPTY(&w->watcher_queue)) { - w->events = 0; /* Force re-registration in uv__io_poll. */ -- uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue); -+ QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - } - } - -@@ -180,7 +180,7 @@ void uv__loop_close(uv_loop_t* loop) { - } - - uv_mutex_lock(&loop->wq_mutex); -- assert(uv__queue_empty(&loop->wq) && "thread pool work queue not empty!"); -+ assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!"); - assert(!uv__has_active_reqs(loop)); - uv_mutex_unlock(&loop->wq_mutex); - uv_mutex_destroy(&loop->wq_mutex); -@@ -192,8 +192,8 @@ void uv__loop_close(uv_loop_t* loop) { - uv_rwlock_destroy(&loop->cloexec_lock); - - #if 0 -- assert(uv__queue_empty(&loop->pending_queue)); -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->pending_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - assert(loop->nfds == 0); - #endif - -diff --git a/deps/uv/src/unix/os390-syscalls.c b/deps/uv/src/unix/os390-syscalls.c -index 7f90c270906..5861aaaa202 100644 ---- a/deps/uv/src/unix/os390-syscalls.c -+++ b/deps/uv/src/unix/os390-syscalls.c -@@ -27,7 +27,7 @@ - #include - #include - --static struct uv__queue global_epoll_queue; -+static QUEUE global_epoll_queue; - static uv_mutex_t global_epoll_lock; - static uv_once_t once = UV_ONCE_INIT; - -@@ -178,18 +178,18 @@ static void after_fork(void) { - - - static void child_fork(void) { -- struct uv__queue* q; -+ QUEUE* q; - uv_once_t child_once = UV_ONCE_INIT; - - /* reset once */ - memcpy(&once, &child_once, sizeof(child_once)); - - /* reset epoll list */ -- while (!uv__queue_empty(&global_epoll_queue)) { -+ while (!QUEUE_EMPTY(&global_epoll_queue)) { - uv__os390_epoll* lst; -- q = uv__queue_head(&global_epoll_queue); -- uv__queue_remove(q); -- lst = uv__queue_data(q, uv__os390_epoll, member); -+ q = QUEUE_HEAD(&global_epoll_queue); -+ QUEUE_REMOVE(q); -+ lst = QUEUE_DATA(q, uv__os390_epoll, member); - uv__free(lst->items); - lst->items = NULL; - lst->size = 0; -@@ -201,7 +201,7 @@ static void child_fork(void) { - - - static void epoll_init(void) { -- uv__queue_init(&global_epoll_queue); -+ QUEUE_INIT(&global_epoll_queue); - if (uv_mutex_init(&global_epoll_lock)) - abort(); - -@@ -225,7 +225,7 @@ uv__os390_epoll* epoll_create1(int flags) { - lst->items[lst->size - 1].revents = 0; - uv_once(&once, epoll_init); - uv_mutex_lock(&global_epoll_lock); -- uv__queue_insert_tail(&global_epoll_queue, &lst->member); -+ QUEUE_INSERT_TAIL(&global_epoll_queue, &lst->member); - uv_mutex_unlock(&global_epoll_lock); - } - -@@ -352,14 +352,14 @@ int epoll_wait(uv__os390_epoll* lst, struct epoll_event* events, - - - int epoll_file_close(int fd) { -- struct uv__queue* q; -+ QUEUE* q; - - uv_once(&once, epoll_init); - uv_mutex_lock(&global_epoll_lock); -- uv__queue_foreach(q, &global_epoll_queue) { -+ QUEUE_FOREACH(q, &global_epoll_queue) { - uv__os390_epoll* lst; - -- lst = uv__queue_data(q, uv__os390_epoll, member); -+ lst = QUEUE_DATA(q, uv__os390_epoll, member); - if (fd < lst->size && lst->items != NULL && lst->items[fd].fd != -1) - lst->items[fd].fd = -1; - } -@@ -371,7 +371,7 @@ int epoll_file_close(int fd) { - void epoll_queue_close(uv__os390_epoll* lst) { - /* Remove epoll instance from global queue */ - uv_mutex_lock(&global_epoll_lock); -- uv__queue_remove(&lst->member); -+ QUEUE_REMOVE(&lst->member); - uv_mutex_unlock(&global_epoll_lock); - - /* Free resources */ -diff --git a/deps/uv/src/unix/os390-syscalls.h b/deps/uv/src/unix/os390-syscalls.h -index d5f3bcf8b1c..9f504171d85 100644 ---- a/deps/uv/src/unix/os390-syscalls.h -+++ b/deps/uv/src/unix/os390-syscalls.h -@@ -45,7 +45,7 @@ struct epoll_event { - }; - - typedef struct { -- struct uv__queue member; -+ QUEUE member; - struct pollfd* items; - unsigned long size; - int msg_queue; -diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c -index bbd37692d1d..a87c2d77faf 100644 ---- a/deps/uv/src/unix/os390.c -+++ b/deps/uv/src/unix/os390.c -@@ -815,7 +815,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - uv__os390_epoll* ep; - int have_signals; - int real_timeout; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - uint64_t base; - int count; -@@ -827,19 +827,19 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int reset_timeout; - - if (loop->nfds == 0) { -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - lfields = uv__get_internal_fields(loop); - -- while (!uv__queue_empty(&loop->watcher_queue)) { -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { - uv_stream_t* stream; - -- q = uv__queue_head(&loop->watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -- w = uv__queue_data(q, uv__io_t, watcher_queue); -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); - - assert(w->pevents != 0); - assert(w->fd >= 0); -diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c -index d332f351830..ce91ac49b30 100644 ---- a/deps/uv/src/unix/pipe.c -+++ b/deps/uv/src/unix/pipe.c -@@ -297,7 +297,7 @@ out: - uv__req_init(handle->loop, req, UV_CONNECT); - req->handle = (uv_stream_t*)handle; - req->cb = cb; -- uv__queue_init(&req->queue); -+ QUEUE_INIT(&req->queue); - - /* Force callback to run on next tick in case of error. */ - if (err) -diff --git a/deps/uv/src/unix/posix-poll.c b/deps/uv/src/unix/posix-poll.c -index 2e016c2fbae..7e7de86845d 100644 ---- a/deps/uv/src/unix/posix-poll.c -+++ b/deps/uv/src/unix/posix-poll.c -@@ -137,7 +137,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - sigset_t set; - uint64_t time_base; - uint64_t time_diff; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - size_t i; - unsigned int nevents; -@@ -149,19 +149,19 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int reset_timeout; - - if (loop->nfds == 0) { -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - lfields = uv__get_internal_fields(loop); - - /* Take queued watchers and add their fds to our poll fds array. */ -- while (!uv__queue_empty(&loop->watcher_queue)) { -- q = uv__queue_head(&loop->watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - -- w = uv__queue_data(q, uv__io_t, watcher_queue); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); -diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c -index dd58c18d9b9..bbf367b57d3 100644 ---- a/deps/uv/src/unix/process.c -+++ b/deps/uv/src/unix/process.c -@@ -108,17 +108,17 @@ void uv__wait_children(uv_loop_t* loop) { - int status; - int options; - pid_t pid; -- struct uv__queue pending; -- struct uv__queue* q; -- struct uv__queue* h; -+ QUEUE pending; -+ QUEUE* q; -+ QUEUE* h; - -- uv__queue_init(&pending); -+ QUEUE_INIT(&pending); - - h = &loop->process_handles; -- q = uv__queue_head(h); -+ q = QUEUE_HEAD(h); - while (q != h) { -- process = uv__queue_data(q, uv_process_t, queue); -- q = uv__queue_next(q); -+ process = QUEUE_DATA(q, uv_process_t, queue); -+ q = QUEUE_NEXT(q); - - #ifndef UV_USE_SIGCHLD - if ((process->flags & UV_HANDLE_REAP) == 0) -@@ -149,18 +149,18 @@ void uv__wait_children(uv_loop_t* loop) { - - assert(pid == process->pid); - process->status = status; -- uv__queue_remove(&process->queue); -- uv__queue_insert_tail(&pending, &process->queue); -+ QUEUE_REMOVE(&process->queue); -+ QUEUE_INSERT_TAIL(&pending, &process->queue); - } - - h = &pending; -- q = uv__queue_head(h); -+ q = QUEUE_HEAD(h); - while (q != h) { -- process = uv__queue_data(q, uv_process_t, queue); -- q = uv__queue_next(q); -+ process = QUEUE_DATA(q, uv_process_t, queue); -+ q = QUEUE_NEXT(q); - -- uv__queue_remove(&process->queue); -- uv__queue_init(&process->queue); -+ QUEUE_REMOVE(&process->queue); -+ QUEUE_INIT(&process->queue); - uv__handle_stop(process); - - if (process->exit_cb == NULL) -@@ -176,7 +176,7 @@ void uv__wait_children(uv_loop_t* loop) { - - process->exit_cb(process, exit_status, term_signal); - } -- assert(uv__queue_empty(&pending)); -+ assert(QUEUE_EMPTY(&pending)); - } - - /* -@@ -978,7 +978,7 @@ int uv_spawn(uv_loop_t* loop, - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS))); - - uv__handle_init(loop, (uv_handle_t*)process, UV_PROCESS); -- uv__queue_init(&process->queue); -+ QUEUE_INIT(&process->queue); - process->status = 0; - - stdio_count = options->stdio_count; -@@ -1041,7 +1041,7 @@ int uv_spawn(uv_loop_t* loop, - - process->pid = pid; - process->exit_cb = options->exit_cb; -- uv__queue_insert_tail(&loop->process_handles, &process->queue); -+ QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue); - uv__handle_start(process); - } - -@@ -1103,10 +1103,10 @@ int uv_kill(int pid, int signum) { - - - void uv__process_close(uv_process_t* handle) { -- uv__queue_remove(&handle->queue); -+ QUEUE_REMOVE(&handle->queue); - uv__handle_stop(handle); - #ifdef UV_USE_SIGCHLD -- if (uv__queue_empty(&handle->loop->process_handles)) -+ if (QUEUE_EMPTY(&handle->loop->process_handles)) - uv_signal_stop(&handle->loop->child_watcher); - #endif - } -diff --git a/deps/uv/src/unix/signal.c b/deps/uv/src/unix/signal.c -index 63aba5a60e0..bb70523f561 100644 ---- a/deps/uv/src/unix/signal.c -+++ b/deps/uv/src/unix/signal.c -@@ -291,16 +291,16 @@ int uv__signal_loop_fork(uv_loop_t* loop) { - - - void uv__signal_loop_cleanup(uv_loop_t* loop) { -- struct uv__queue* q; -+ QUEUE* q; - - /* Stop all the signal watchers that are still attached to this loop. This - * ensures that the (shared) signal tree doesn't contain any invalid entries - * entries, and that signal handlers are removed when appropriate. -- * It's safe to use uv__queue_foreach here because the handles and the handle -+ * It's safe to use QUEUE_FOREACH here because the handles and the handle - * queue are not modified by uv__signal_stop(). - */ -- uv__queue_foreach(q, &loop->handle_queue) { -- uv_handle_t* handle = uv__queue_data(q, uv_handle_t, handle_queue); -+ QUEUE_FOREACH(q, &loop->handle_queue) { -+ uv_handle_t* handle = QUEUE_DATA(q, uv_handle_t, handle_queue); - - if (handle->type == UV_SIGNAL) - uv__signal_stop((uv_signal_t*) handle); -diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c -index 28c4d5463c4..03f92b5045a 100644 ---- a/deps/uv/src/unix/stream.c -+++ b/deps/uv/src/unix/stream.c -@@ -94,8 +94,8 @@ void uv__stream_init(uv_loop_t* loop, - stream->accepted_fd = -1; - stream->queued_fds = NULL; - stream->delayed_error = 0; -- uv__queue_init(&stream->write_queue); -- uv__queue_init(&stream->write_completed_queue); -+ QUEUE_INIT(&stream->write_queue); -+ QUEUE_INIT(&stream->write_completed_queue); - stream->write_queue_size = 0; - - if (loop->emfile_fd == -1) { -@@ -439,15 +439,15 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) { - - void uv__stream_flush_write_queue(uv_stream_t* stream, int error) { - uv_write_t* req; -- struct uv__queue* q; -- while (!uv__queue_empty(&stream->write_queue)) { -- q = uv__queue_head(&stream->write_queue); -- uv__queue_remove(q); -+ QUEUE* q; -+ while (!QUEUE_EMPTY(&stream->write_queue)) { -+ q = QUEUE_HEAD(&stream->write_queue); -+ QUEUE_REMOVE(q); - -- req = uv__queue_data(q, uv_write_t, queue); -+ req = QUEUE_DATA(q, uv_write_t, queue); - req->error = error; - -- uv__queue_insert_tail(&stream->write_completed_queue, &req->queue); -+ QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue); - } - } - -@@ -627,7 +627,7 @@ static void uv__drain(uv_stream_t* stream) { - uv_shutdown_t* req; - int err; - -- assert(uv__queue_empty(&stream->write_queue)); -+ assert(QUEUE_EMPTY(&stream->write_queue)); - if (!(stream->flags & UV_HANDLE_CLOSING)) { - uv__io_stop(stream->loop, &stream->io_watcher, POLLOUT); - uv__stream_osx_interrupt_select(stream); -@@ -714,7 +714,7 @@ static void uv__write_req_finish(uv_write_t* req) { - uv_stream_t* stream = req->handle; - - /* Pop the req off tcp->write_queue. */ -- uv__queue_remove(&req->queue); -+ QUEUE_REMOVE(&req->queue); - - /* Only free when there was no error. On error, we touch up write_queue_size - * right before making the callback. The reason we don't do that right away -@@ -731,7 +731,7 @@ static void uv__write_req_finish(uv_write_t* req) { - /* Add it to the write_completed_queue where it will have its - * callback called in the near future. - */ -- uv__queue_insert_tail(&stream->write_completed_queue, &req->queue); -+ QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue); - uv__io_feed(stream->loop, &stream->io_watcher); - } - -@@ -837,7 +837,7 @@ static int uv__try_write(uv_stream_t* stream, - } - - static void uv__write(uv_stream_t* stream) { -- struct uv__queue* q; -+ QUEUE* q; - uv_write_t* req; - ssize_t n; - int count; -@@ -851,11 +851,11 @@ static void uv__write(uv_stream_t* stream) { - count = 32; - - for (;;) { -- if (uv__queue_empty(&stream->write_queue)) -+ if (QUEUE_EMPTY(&stream->write_queue)) - return; - -- q = uv__queue_head(&stream->write_queue); -- req = uv__queue_data(q, uv_write_t, queue); -+ q = QUEUE_HEAD(&stream->write_queue); -+ req = QUEUE_DATA(q, uv_write_t, queue); - assert(req->handle == stream); - - n = uv__try_write(stream, -@@ -899,19 +899,19 @@ error: - - static void uv__write_callbacks(uv_stream_t* stream) { - uv_write_t* req; -- struct uv__queue* q; -- struct uv__queue pq; -+ QUEUE* q; -+ QUEUE pq; - -- if (uv__queue_empty(&stream->write_completed_queue)) -+ if (QUEUE_EMPTY(&stream->write_completed_queue)) - return; - -- uv__queue_move(&stream->write_completed_queue, &pq); -+ QUEUE_MOVE(&stream->write_completed_queue, &pq); - -- while (!uv__queue_empty(&pq)) { -+ while (!QUEUE_EMPTY(&pq)) { - /* Pop a req off write_completed_queue. */ -- q = uv__queue_head(&pq); -- req = uv__queue_data(q, uv_write_t, queue); -- uv__queue_remove(q); -+ q = QUEUE_HEAD(&pq); -+ req = QUEUE_DATA(q, uv_write_t, queue); -+ QUEUE_REMOVE(q); - uv__req_unregister(stream->loop, req); - - if (req->bufs != NULL) { -@@ -1174,7 +1174,7 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) { - stream->shutdown_req = req; - stream->flags &= ~UV_HANDLE_WRITABLE; - -- if (uv__queue_empty(&stream->write_queue)) -+ if (QUEUE_EMPTY(&stream->write_queue)) - uv__io_feed(stream->loop, &stream->io_watcher); - - return 0; -@@ -1227,7 +1227,7 @@ static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - uv__write_callbacks(stream); - - /* Write queue drained. */ -- if (uv__queue_empty(&stream->write_queue)) -+ if (QUEUE_EMPTY(&stream->write_queue)) - uv__drain(stream); - } - } -@@ -1270,7 +1270,7 @@ static void uv__stream_connect(uv_stream_t* stream) { - stream->connect_req = NULL; - uv__req_unregister(stream->loop, req); - -- if (error < 0 || uv__queue_empty(&stream->write_queue)) { -+ if (error < 0 || QUEUE_EMPTY(&stream->write_queue)) { - uv__io_stop(stream->loop, &stream->io_watcher, POLLOUT); - } - -@@ -1352,7 +1352,7 @@ int uv_write2(uv_write_t* req, - req->handle = stream; - req->error = 0; - req->send_handle = send_handle; -- uv__queue_init(&req->queue); -+ QUEUE_INIT(&req->queue); - - req->bufs = req->bufsml; - if (nbufs > ARRAY_SIZE(req->bufsml)) -@@ -1367,7 +1367,7 @@ int uv_write2(uv_write_t* req, - stream->write_queue_size += uv__count_bufs(bufs, nbufs); - - /* Append the request to write_queue. */ -- uv__queue_insert_tail(&stream->write_queue, &req->queue); -+ QUEUE_INSERT_TAIL(&stream->write_queue, &req->queue); - - /* If the queue was empty when this function began, we should attempt to - * do the write immediately. Otherwise start the write_watcher and wait -diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c -index 2d6bae79604..75b6fbad493 100644 ---- a/deps/uv/src/unix/sunos.c -+++ b/deps/uv/src/unix/sunos.c -@@ -148,7 +148,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - struct port_event events[1024]; - struct port_event* pe; - struct timespec spec; -- struct uv__queue* q; -+ QUEUE* q; - uv__io_t* w; - sigset_t* pset; - sigset_t set; -@@ -166,16 +166,16 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int reset_timeout; - - if (loop->nfds == 0) { -- assert(uv__queue_empty(&loop->watcher_queue)); -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - -- while (!uv__queue_empty(&loop->watcher_queue)) { -- q = uv__queue_head(&loop->watcher_queue); -- uv__queue_remove(q); -- uv__queue_init(q); -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); - -- w = uv__queue_data(q, uv__io_t, watcher_queue); -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - - if (port_associate(loop->backend_fd, -@@ -316,8 +316,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - continue; /* Disabled by callback. */ - - /* Events Ports operates in oneshot mode, rearm timer on next run. */ -- if (w->pevents != 0 && uv__queue_empty(&w->watcher_queue)) -- uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue); -+ if (w->pevents != 0 && QUEUE_EMPTY(&w->watcher_queue)) -+ QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - } - - uv__metrics_inc_events(loop, nevents); -diff --git a/deps/uv/src/unix/tcp.c b/deps/uv/src/unix/tcp.c -index d6c848f4610..ab4e06c2f67 100644 ---- a/deps/uv/src/unix/tcp.c -+++ b/deps/uv/src/unix/tcp.c -@@ -124,7 +124,7 @@ int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) { - if (domain != AF_UNSPEC) { - err = new_socket(tcp, domain, 0); - if (err) { -- uv__queue_remove(&tcp->handle_queue); -+ QUEUE_REMOVE(&tcp->handle_queue); - if (tcp->io_watcher.fd != -1) - uv__close(tcp->io_watcher.fd); - tcp->io_watcher.fd = -1; -@@ -252,7 +252,7 @@ out: - uv__req_init(handle->loop, req, UV_CONNECT); - req->cb = cb; - req->handle = (uv_stream_t*) handle; -- uv__queue_init(&req->queue); -+ QUEUE_INIT(&req->queue); - handle->connect_req = req; - - uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); -diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c -index d099bdb3b67..7a5390c1a8b 100644 ---- a/deps/uv/src/unix/tty.c -+++ b/deps/uv/src/unix/tty.c -@@ -222,7 +222,7 @@ skip: - int rc = r; - if (newfd != -1) - uv__close(newfd); -- uv__queue_remove(&tty->handle_queue); -+ QUEUE_REMOVE(&tty->handle_queue); - do - r = fcntl(fd, F_SETFL, saved_flags); - while (r == -1 && errno == EINTR); -diff --git a/deps/uv/src/unix/udp.c b/deps/uv/src/unix/udp.c -index c2814512a5f..f556808fbae 100644 ---- a/deps/uv/src/unix/udp.c -+++ b/deps/uv/src/unix/udp.c -@@ -62,18 +62,18 @@ void uv__udp_close(uv_udp_t* handle) { - - void uv__udp_finish_close(uv_udp_t* handle) { - uv_udp_send_t* req; -- struct uv__queue* q; -+ QUEUE* q; - - assert(!uv__io_active(&handle->io_watcher, POLLIN | POLLOUT)); - assert(handle->io_watcher.fd == -1); - -- while (!uv__queue_empty(&handle->write_queue)) { -- q = uv__queue_head(&handle->write_queue); -- uv__queue_remove(q); -+ while (!QUEUE_EMPTY(&handle->write_queue)) { -+ q = QUEUE_HEAD(&handle->write_queue); -+ QUEUE_REMOVE(q); - -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - req->status = UV_ECANCELED; -- uv__queue_insert_tail(&handle->write_completed_queue, &req->queue); -+ QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - } - - uv__udp_run_completed(handle); -@@ -90,16 +90,16 @@ void uv__udp_finish_close(uv_udp_t* handle) { - - static void uv__udp_run_completed(uv_udp_t* handle) { - uv_udp_send_t* req; -- struct uv__queue* q; -+ QUEUE* q; - - assert(!(handle->flags & UV_HANDLE_UDP_PROCESSING)); - handle->flags |= UV_HANDLE_UDP_PROCESSING; - -- while (!uv__queue_empty(&handle->write_completed_queue)) { -- q = uv__queue_head(&handle->write_completed_queue); -- uv__queue_remove(q); -+ while (!QUEUE_EMPTY(&handle->write_completed_queue)) { -+ q = QUEUE_HEAD(&handle->write_completed_queue); -+ QUEUE_REMOVE(q); - -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - uv__req_unregister(handle->loop, req); - - handle->send_queue_size -= uv__count_bufs(req->bufs, req->nbufs); -@@ -121,7 +121,7 @@ static void uv__udp_run_completed(uv_udp_t* handle) { - req->send_cb(req, req->status); - } - -- if (uv__queue_empty(&handle->write_queue)) { -+ if (QUEUE_EMPTY(&handle->write_queue)) { - /* Pending queue and completion queue empty, stop watcher. */ - uv__io_stop(handle->loop, &handle->io_watcher, POLLOUT); - if (!uv__io_active(&handle->io_watcher, POLLIN)) -@@ -280,20 +280,20 @@ static void uv__udp_sendmsg(uv_udp_t* handle) { - uv_udp_send_t* req; - struct mmsghdr h[20]; - struct mmsghdr* p; -- struct uv__queue* q; -+ QUEUE* q; - ssize_t npkts; - size_t pkts; - size_t i; - -- if (uv__queue_empty(&handle->write_queue)) -+ if (QUEUE_EMPTY(&handle->write_queue)) - return; - - write_queue_drain: -- for (pkts = 0, q = uv__queue_head(&handle->write_queue); -+ for (pkts = 0, q = QUEUE_HEAD(&handle->write_queue); - pkts < ARRAY_SIZE(h) && q != &handle->write_queue; -- ++pkts, q = uv__queue_head(q)) { -+ ++pkts, q = QUEUE_HEAD(q)) { - assert(q != NULL); -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - assert(req != NULL); - - p = &h[pkts]; -@@ -325,16 +325,16 @@ write_queue_drain: - if (npkts < 1) { - if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) - return; -- for (i = 0, q = uv__queue_head(&handle->write_queue); -+ for (i = 0, q = QUEUE_HEAD(&handle->write_queue); - i < pkts && q != &handle->write_queue; -- ++i, q = uv__queue_head(&handle->write_queue)) { -+ ++i, q = QUEUE_HEAD(&handle->write_queue)) { - assert(q != NULL); -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - assert(req != NULL); - - req->status = UV__ERR(errno); -- uv__queue_remove(&req->queue); -- uv__queue_insert_tail(&handle->write_completed_queue, &req->queue); -+ QUEUE_REMOVE(&req->queue); -+ QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - } - uv__io_feed(handle->loop, &handle->io_watcher); - return; -@@ -343,11 +343,11 @@ write_queue_drain: - /* Safety: npkts known to be >0 below. Hence cast from ssize_t - * to size_t safe. - */ -- for (i = 0, q = uv__queue_head(&handle->write_queue); -+ for (i = 0, q = QUEUE_HEAD(&handle->write_queue); - i < (size_t)npkts && q != &handle->write_queue; -- ++i, q = uv__queue_head(&handle->write_queue)) { -+ ++i, q = QUEUE_HEAD(&handle->write_queue)) { - assert(q != NULL); -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - assert(req != NULL); - - req->status = req->bufs[0].len; -@@ -357,25 +357,25 @@ write_queue_drain: - * why we don't handle partial writes. Just pop the request - * off the write queue and onto the completed queue, done. - */ -- uv__queue_remove(&req->queue); -- uv__queue_insert_tail(&handle->write_completed_queue, &req->queue); -+ QUEUE_REMOVE(&req->queue); -+ QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - } - - /* couldn't batch everything, continue sending (jump to avoid stack growth) */ -- if (!uv__queue_empty(&handle->write_queue)) -+ if (!QUEUE_EMPTY(&handle->write_queue)) - goto write_queue_drain; - uv__io_feed(handle->loop, &handle->io_watcher); - #else /* __linux__ || ____FreeBSD__ */ - uv_udp_send_t* req; - struct msghdr h; -- struct uv__queue* q; -+ QUEUE* q; - ssize_t size; - -- while (!uv__queue_empty(&handle->write_queue)) { -- q = uv__queue_head(&handle->write_queue); -+ while (!QUEUE_EMPTY(&handle->write_queue)) { -+ q = QUEUE_HEAD(&handle->write_queue); - assert(q != NULL); - -- req = uv__queue_data(q, uv_udp_send_t, queue); -+ req = QUEUE_DATA(q, uv_udp_send_t, queue); - assert(req != NULL); - - memset(&h, 0, sizeof h); -@@ -414,8 +414,8 @@ write_queue_drain: - * why we don't handle partial writes. Just pop the request - * off the write queue and onto the completed queue, done. - */ -- uv__queue_remove(&req->queue); -- uv__queue_insert_tail(&handle->write_completed_queue, &req->queue); -+ QUEUE_REMOVE(&req->queue); -+ QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - uv__io_feed(handle->loop, &handle->io_watcher); - } - #endif /* __linux__ || ____FreeBSD__ */ -@@ -729,7 +729,7 @@ int uv__udp_send(uv_udp_send_t* req, - memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0])); - handle->send_queue_size += uv__count_bufs(req->bufs, req->nbufs); - handle->send_queue_count++; -- uv__queue_insert_tail(&handle->write_queue, &req->queue); -+ QUEUE_INSERT_TAIL(&handle->write_queue, &req->queue); - uv__handle_start(handle); - - if (empty_queue && !(handle->flags & UV_HANDLE_UDP_PROCESSING)) { -@@ -739,7 +739,7 @@ int uv__udp_send(uv_udp_send_t* req, - * away. In such cases the `io_watcher` has to be queued for asynchronous - * write. - */ -- if (!uv__queue_empty(&handle->write_queue)) -+ if (!QUEUE_EMPTY(&handle->write_queue)) - uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); - } else { - uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); -@@ -1007,8 +1007,8 @@ int uv__udp_init_ex(uv_loop_t* loop, - handle->send_queue_size = 0; - handle->send_queue_count = 0; - uv__io_init(&handle->io_watcher, uv__udp_io, fd); -- uv__queue_init(&handle->write_queue); -- uv__queue_init(&handle->write_completed_queue); -+ QUEUE_INIT(&handle->write_queue); -+ QUEUE_INIT(&handle->write_completed_queue); - - return 0; - } -diff --git a/deps/uv/src/uv-common.c b/deps/uv/src/uv-common.c -index 916f3f4e006..cec771fab21 100644 ---- a/deps/uv/src/uv-common.c -+++ b/deps/uv/src/uv-common.c -@@ -533,17 +533,17 @@ int uv_udp_recv_stop(uv_udp_t* handle) { - - - void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) { -- struct uv__queue queue; -- struct uv__queue* q; -+ QUEUE queue; -+ QUEUE* q; - uv_handle_t* h; - -- uv__queue_move(&loop->handle_queue, &queue); -- while (!uv__queue_empty(&queue)) { -- q = uv__queue_head(&queue); -- h = uv__queue_data(q, uv_handle_t, handle_queue); -+ QUEUE_MOVE(&loop->handle_queue, &queue); -+ while (!QUEUE_EMPTY(&queue)) { -+ q = QUEUE_HEAD(&queue); -+ h = QUEUE_DATA(q, uv_handle_t, handle_queue); - -- uv__queue_remove(q); -- uv__queue_insert_tail(&loop->handle_queue, q); -+ QUEUE_REMOVE(q); -+ QUEUE_INSERT_TAIL(&loop->handle_queue, q); - - if (h->flags & UV_HANDLE_INTERNAL) continue; - walk_cb(h, arg); -@@ -553,14 +553,14 @@ void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) { - - static void uv__print_handles(uv_loop_t* loop, int only_active, FILE* stream) { - const char* type; -- struct uv__queue* q; -+ QUEUE* q; - uv_handle_t* h; - - if (loop == NULL) - loop = uv_default_loop(); - -- uv__queue_foreach(q, &loop->handle_queue) { -- h = uv__queue_data(q, uv_handle_t, handle_queue); -+ QUEUE_FOREACH(q, &loop->handle_queue) { -+ h = QUEUE_DATA(q, uv_handle_t, handle_queue); - - if (only_active && !uv__is_active(h)) - continue; -@@ -846,7 +846,7 @@ uv_loop_t* uv_loop_new(void) { - - - int uv_loop_close(uv_loop_t* loop) { -- struct uv__queue* q; -+ QUEUE* q; - uv_handle_t* h; - #ifndef NDEBUG - void* saved_data; -@@ -855,8 +855,8 @@ int uv_loop_close(uv_loop_t* loop) { - if (uv__has_active_reqs(loop)) - return UV_EBUSY; - -- uv__queue_foreach(q, &loop->handle_queue) { -- h = uv__queue_data(q, uv_handle_t, handle_queue); -+ QUEUE_FOREACH(q, &loop->handle_queue) { -+ h = QUEUE_DATA(q, uv_handle_t, handle_queue); - if (!(h->flags & UV_HANDLE_INTERNAL)) - return UV_EBUSY; - } -diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h -index cd57e5a3515..decde5362c8 100644 ---- a/deps/uv/src/uv-common.h -+++ b/deps/uv/src/uv-common.h -@@ -323,7 +323,7 @@ void uv__threadpool_cleanup(void); - (h)->loop = (loop_); \ - (h)->type = (type_); \ - (h)->flags = UV_HANDLE_REF; /* Ref the loop when active. */ \ -- uv__queue_insert_tail(&(loop_)->handle_queue, &(h)->handle_queue); \ -+ QUEUE_INSERT_TAIL(&(loop_)->handle_queue, &(h)->handle_queue); \ - uv__handle_platform_init(h); \ - } \ - while (0) -@@ -415,7 +415,6 @@ struct uv__iou { - size_t sqelen; - int ringfd; - uint32_t in_flight; -- uint32_t flags; - }; - #endif /* __linux__ */ - -diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c -index e9885a0f1ff..9a3be58849a 100644 ---- a/deps/uv/src/win/core.c -+++ b/deps/uv/src/win/core.c -@@ -255,8 +255,8 @@ int uv_loop_init(uv_loop_t* loop) { - loop->time = 0; - uv_update_time(loop); - -- uv__queue_init(&loop->wq); -- uv__queue_init(&loop->handle_queue); -+ QUEUE_INIT(&loop->wq); -+ QUEUE_INIT(&loop->handle_queue); - loop->active_reqs.count = 0; - loop->active_handles = 0; - -@@ -358,7 +358,7 @@ void uv__loop_close(uv_loop_t* loop) { - } - - uv_mutex_lock(&loop->wq_mutex); -- assert(uv__queue_empty(&loop->wq) && "thread pool work queue not empty!"); -+ assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!"); - assert(!uv__has_active_reqs(loop)); - uv_mutex_unlock(&loop->wq_mutex); - uv_mutex_destroy(&loop->wq_mutex); -diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c -index fc209c54f47..deb9438d689 100644 ---- a/deps/uv/src/win/fs.c -+++ b/deps/uv/src/win/fs.c -@@ -144,97 +144,26 @@ void uv__fs_init(void) { - } - - --static int32_t fs__decode_wtf8_char(const char** input) { -- uint32_t code_point; -- uint8_t b1; -- uint8_t b2; -- uint8_t b3; -- uint8_t b4; -- -- b1 = **input; -- if (b1 <= 0x7F) -- return b1; /* ASCII code point */ -- if (b1 < 0xC2) -- return -1; /* invalid: continuation byte */ -- code_point = b1; -- -- b2 = *++*input; -- if ((b2 & 0xC0) != 0x80) -- return -1; /* invalid: not a continuation byte */ -- code_point = (code_point << 6) | (b2 & 0x3F); -- if (b1 <= 0xDF) -- return 0x7FF & code_point; /* two-byte character */ -- -- b3 = *++*input; -- if ((b3 & 0xC0) != 0x80) -- return -1; /* invalid: not a continuation byte */ -- code_point = (code_point << 6) | (b3 & 0x3F); -- if (b1 <= 0xEF) -- return 0xFFFF & code_point; /* three-byte character */ -- -- b4 = *++*input; -- if ((b4 & 0xC0) != 0x80) -- return -1; /* invalid: not a continuation byte */ -- code_point = (code_point << 6) | (b4 & 0x3F); -- if (b1 <= 0xF4) -- if (code_point <= 0x10FFFF) -- return code_point; /* four-byte character */ -- -- /* code point too large */ -- return -1; --} -- -- --static ssize_t fs__get_length_wtf8(const char* source_ptr) { -- size_t w_target_len = 0; -- int32_t code_point; -- -- do { -- code_point = fs__decode_wtf8_char(&source_ptr); -- if (code_point < 0) -- return -1; -- if (code_point > 0xFFFF) -- w_target_len++; -- w_target_len++; -- } while (*source_ptr++); -- return w_target_len; --} -- -- --static void fs__wtf8_to_wide(const char* source_ptr, WCHAR* w_target) { -- int32_t code_point; -- -- do { -- code_point = fs__decode_wtf8_char(&source_ptr); -- /* fs__get_length_wtf8 should have been called and checked first. */ -- assert(code_point >= 0); -- if (code_point > 0x10000) { -- assert(code_point < 0x10FFFF); -- *w_target++ = (((code_point - 0x10000) >> 10) + 0xD800); -- *w_target++ = ((code_point - 0x10000) & 0x3FF) + 0xDC00; -- } else { -- *w_target++ = code_point; -- } -- } while (*source_ptr++); --} -- -- - INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - const char* new_path, const int copy_path) { -- WCHAR* buf; -- WCHAR* pos; -- size_t buf_sz = 0; -- size_t path_len = 0; -- ssize_t pathw_len = 0; -- ssize_t new_pathw_len = 0; -+ char* buf; -+ char* pos; -+ ssize_t buf_sz = 0, path_len = 0, pathw_len = 0, new_pathw_len = 0; - - /* new_path can only be set if path is also set. */ - assert(new_path == NULL || path != NULL); - - if (path != NULL) { -- pathw_len = fs__get_length_wtf8(path); -- if (pathw_len < 0) -- return ERROR_INVALID_NAME; -+ pathw_len = MultiByteToWideChar(CP_UTF8, -+ 0, -+ path, -+ -1, -+ NULL, -+ 0); -+ if (pathw_len == 0) { -+ return GetLastError(); -+ } -+ - buf_sz += pathw_len * sizeof(WCHAR); - } - -@@ -244,9 +173,16 @@ INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - } - - if (new_path != NULL) { -- new_pathw_len = fs__get_length_wtf8(new_path); -- if (new_pathw_len < 0) -- return ERROR_INVALID_NAME; -+ new_pathw_len = MultiByteToWideChar(CP_UTF8, -+ 0, -+ new_path, -+ -1, -+ NULL, -+ 0); -+ if (new_pathw_len == 0) { -+ return GetLastError(); -+ } -+ - buf_sz += new_pathw_len * sizeof(WCHAR); - } - -@@ -258,7 +194,7 @@ INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - return 0; - } - -- buf = uv__malloc(buf_sz); -+ buf = (char*) uv__malloc(buf_sz); - if (buf == NULL) { - return ERROR_OUTOFMEMORY; - } -@@ -266,17 +202,29 @@ INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - pos = buf; - - if (path != NULL) { -- fs__wtf8_to_wide(path, pos); -- req->file.pathw = pos; -- pos += pathw_len; -+ DWORD r = MultiByteToWideChar(CP_UTF8, -+ 0, -+ path, -+ -1, -+ (WCHAR*) pos, -+ pathw_len); -+ assert(r == (DWORD) pathw_len); -+ req->file.pathw = (WCHAR*) pos; -+ pos += r * sizeof(WCHAR); - } else { - req->file.pathw = NULL; - } - - if (new_path != NULL) { -- fs__wtf8_to_wide(new_path, pos); -- req->fs.info.new_pathw = pos; -- pos += new_pathw_len; -+ DWORD r = MultiByteToWideChar(CP_UTF8, -+ 0, -+ new_path, -+ -1, -+ (WCHAR*) pos, -+ new_pathw_len); -+ assert(r == (DWORD) new_pathw_len); -+ req->fs.info.new_pathw = (WCHAR*) pos; -+ pos += r * sizeof(WCHAR); - } else { - req->fs.info.new_pathw = NULL; - } -@@ -284,8 +232,8 @@ INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - req->path = path; - if (path != NULL && copy_path) { - memcpy(pos, path, path_len); -- assert(path_len == buf_sz - (pos - buf) * sizeof(WCHAR)); -- req->path = (char*) pos; -+ assert(path_len == buf_sz - (pos - buf)); -+ req->path = pos; - } - - req->flags |= UV_FS_FREE_PATHS; -@@ -311,115 +259,57 @@ INLINE static void uv__fs_req_init(uv_loop_t* loop, uv_fs_t* req, - } - - --static int32_t fs__get_surrogate_value(const WCHAR* w_source_ptr, -- size_t w_source_len) { -- WCHAR u; -- WCHAR next; -- -- u = w_source_ptr[0]; -- if (u >= 0xD800 && u <= 0xDBFF && w_source_len > 1) { -- next = w_source_ptr[1]; -- if (next >= 0xDC00 && next <= 0xDFFF) -- return 0x10000 + ((u - 0xD800) << 10) + (next - 0xDC00); -- } -- return u; --} -- -- --static size_t fs__get_length_wide(const WCHAR* w_source_ptr, -- size_t w_source_len) { -- size_t target_len; -- int32_t code_point; -+static int fs__wide_to_utf8(WCHAR* w_source_ptr, -+ DWORD w_source_len, -+ char** target_ptr, -+ uint64_t* target_len_ptr) { -+ int r; -+ int target_len; -+ char* target; -+ target_len = WideCharToMultiByte(CP_UTF8, -+ 0, -+ w_source_ptr, -+ w_source_len, -+ NULL, -+ 0, -+ NULL, -+ NULL); - -- target_len = 0; -- for (; w_source_len; w_source_len--, w_source_ptr++) { -- code_point = fs__get_surrogate_value(w_source_ptr, w_source_len); -- /* Can be invalid UTF-8 but must be valid WTF-8. */ -- assert(code_point >= 0); -- if (code_point < 0x80) -- target_len += 1; -- else if (code_point < 0x800) -- target_len += 2; -- else if (code_point < 0x10000) -- target_len += 3; -- else { -- target_len += 4; -- w_source_ptr++; -- w_source_len--; -- } -+ if (target_len == 0) { -+ return -1; - } -- return target_len; --} - -- --static int fs__wide_to_wtf8(WCHAR* w_source_ptr, -- size_t w_source_len, -- char** target_ptr, -- size_t* target_len_ptr) { -- size_t target_len; -- char* target; -- int32_t code_point; -- -- /* If *target_ptr is provided, then *target_len_ptr must be its length -- * (excluding space for null), otherwise we will compute the target_len_ptr -- * length and may return a new allocation in *target_ptr if target_ptr is -- * provided. */ -- if (target_ptr == NULL || *target_ptr == NULL) { -- target_len = fs__get_length_wide(w_source_ptr, w_source_len); -- if (target_len_ptr != NULL) -- *target_len_ptr = target_len; -- } else { -- target_len = *target_len_ptr; -+ if (target_len_ptr != NULL) { -+ *target_len_ptr = target_len; - } - -- if (target_ptr == NULL) -+ if (target_ptr == NULL) { - return 0; -- -- if (*target_ptr == NULL) { -- target = uv__malloc(target_len + 1); -- if (target == NULL) { -- SetLastError(ERROR_OUTOFMEMORY); -- return -1; -- } -- *target_ptr = target; -- } else { -- target = *target_ptr; -- } -- -- for (; w_source_len; w_source_len--, w_source_ptr++) { -- code_point = fs__get_surrogate_value(w_source_ptr, w_source_len); -- /* Can be invalid UTF-8 but must be valid WTF-8. */ -- assert(code_point >= 0); -- -- if (code_point < 0x80) { -- *target++ = code_point; -- } else if (code_point < 0x800) { -- *target++ = 0xC0 | (code_point >> 6); -- *target++ = 0x80 | (code_point & 0x3F); -- } else if (code_point < 0x10000) { -- *target++ = 0xE0 | (code_point >> 12); -- *target++ = 0x80 | ((code_point >> 6) & 0x3F); -- *target++ = 0x80 | (code_point & 0x3F); -- } else { -- *target++ = 0xF0 | (code_point >> 18); -- *target++ = 0x80 | ((code_point >> 12) & 0x3F); -- *target++ = 0x80 | ((code_point >> 6) & 0x3F); -- *target++ = 0x80 | (code_point & 0x3F); -- w_source_ptr++; -- w_source_len--; -- } - } -- assert((size_t) (target - *target_ptr) == target_len); - -- *target++ = '\0'; -+ target = uv__malloc(target_len + 1); -+ if (target == NULL) { -+ SetLastError(ERROR_OUTOFMEMORY); -+ return -1; -+ } - -+ r = WideCharToMultiByte(CP_UTF8, -+ 0, -+ w_source_ptr, -+ w_source_len, -+ target, -+ target_len, -+ NULL, -+ NULL); -+ assert(r == target_len); -+ target[target_len] = '\0'; -+ *target_ptr = target; - return 0; - } - - --INLINE static int fs__readlink_handle(HANDLE handle, -- char** target_ptr, -- size_t* target_len_ptr) { -+INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr, -+ uint64_t* target_len_ptr) { - char buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; - REPARSE_DATA_BUFFER* reparse_data = (REPARSE_DATA_BUFFER*) buffer; - WCHAR* w_target; -@@ -549,8 +439,7 @@ INLINE static int fs__readlink_handle(HANDLE handle, - return -1; - } - -- assert(target_ptr == NULL || *target_ptr == NULL); -- return fs__wide_to_wtf8(w_target, w_target_len, target_ptr, target_len_ptr); -+ return fs__wide_to_utf8(w_target, w_target_len, target_ptr, target_len_ptr); - } - - -@@ -1540,8 +1429,7 @@ void fs__scandir(uv_fs_t* req) { - uv__dirent_t* dirent; - - size_t wchar_len; -- size_t wtf8_len; -- char* wtf8; -+ size_t utf8_len; - - /* Obtain a pointer to the current directory entry. */ - position += next_entry_offset; -@@ -1568,8 +1456,11 @@ void fs__scandir(uv_fs_t* req) { - info->FileName[1] == L'.') - continue; - -- /* Compute the space required to store the filename as WTF-8. */ -- wtf8_len = fs__get_length_wide(&info->FileName[0], wchar_len); -+ /* Compute the space required to store the filename as UTF-8. */ -+ utf8_len = WideCharToMultiByte( -+ CP_UTF8, 0, &info->FileName[0], wchar_len, NULL, 0, NULL, NULL); -+ if (utf8_len == 0) -+ goto win32_error; - - /* Resize the dirent array if needed. */ - if (dirents_used >= dirents_size) { -@@ -1589,17 +1480,26 @@ void fs__scandir(uv_fs_t* req) { - * includes room for the first character of the filename, but `utf8_len` - * doesn't count the NULL terminator at this point. - */ -- dirent = uv__malloc(sizeof *dirent + wtf8_len); -+ dirent = uv__malloc(sizeof *dirent + utf8_len); - if (dirent == NULL) - goto out_of_memory_error; - - dirents[dirents_used++] = dirent; - - /* Convert file name to UTF-8. */ -- wtf8 = &dirent->d_name[0]; -- if (fs__wide_to_wtf8(&info->FileName[0], wchar_len, &wtf8, &wtf8_len) == -1) -+ if (WideCharToMultiByte(CP_UTF8, -+ 0, -+ &info->FileName[0], -+ wchar_len, -+ &dirent->d_name[0], -+ utf8_len, -+ NULL, -+ NULL) == 0) - goto win32_error; - -+ /* Add a null terminator to the filename. */ -+ dirent->d_name[utf8_len] = '\0'; -+ - /* Fill out the type field. */ - if (info->FileAttributes & FILE_ATTRIBUTE_DEVICE) - dirent->d_type = UV__DT_CHAR; -@@ -1808,7 +1708,6 @@ void fs__closedir(uv_fs_t* req) { - - INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf, - int do_lstat) { -- size_t target_length = 0; - FILE_FS_DEVICE_INFORMATION device_info; - FILE_ALL_INFORMATION file_info; - FILE_FS_VOLUME_INFORMATION volume_info; -@@ -1904,10 +1803,9 @@ INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf, - * to be treated as a regular file. The higher level lstat function will - * detect this failure and retry without do_lstat if appropriate. - */ -- if (fs__readlink_handle(handle, NULL, &target_length) != 0) -+ if (fs__readlink_handle(handle, NULL, &statbuf->st_size) != 0) - return -1; - statbuf->st_mode |= S_IFLNK; -- statbuf->st_size = target_length; - } - - if (statbuf->st_mode == 0) { -@@ -2763,7 +2661,6 @@ static void fs__readlink(uv_fs_t* req) { - return; - } - -- assert(req->ptr == NULL); - if (fs__readlink_handle(handle, (char**) &req->ptr, NULL) != 0) { - DWORD error = GetLastError(); - SET_REQ_WIN32_ERROR(req, error); -@@ -2823,8 +2720,7 @@ static ssize_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) { - return -1; - } - -- assert(*realpath_ptr == NULL); -- r = fs__wide_to_wtf8(w_realpath_ptr, w_realpath_len, realpath_ptr, NULL); -+ r = fs__wide_to_utf8(w_realpath_ptr, w_realpath_len, realpath_ptr, NULL); - uv__free(w_realpath_buf); - return r; - } -@@ -2844,7 +2740,6 @@ static void fs__realpath(uv_fs_t* req) { - return; - } - -- assert(req->ptr == NULL); - if (fs__realpath_handle(handle, (char**) &req->ptr) == -1) { - CloseHandle(handle); - SET_REQ_WIN32_ERROR(req, GetLastError()); -diff --git a/deps/uv/src/win/handle-inl.h b/deps/uv/src/win/handle-inl.h -index 4722e85790a..5c843c241ef 100644 ---- a/deps/uv/src/win/handle-inl.h -+++ b/deps/uv/src/win/handle-inl.h -@@ -75,7 +75,7 @@ - - #define uv__handle_close(handle) \ - do { \ -- uv__queue_remove(&(handle)->handle_queue); \ -+ QUEUE_REMOVE(&(handle)->handle_queue); \ - uv__active_handle_rm((uv_handle_t*) (handle)); \ - \ - (handle)->flags |= UV_HANDLE_CLOSED; \ -diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c -index f0cac382256..5e4276387ac 100644 ---- a/deps/uv/src/win/pipe.c -+++ b/deps/uv/src/win/pipe.c -@@ -55,7 +55,7 @@ static const int pipe_prefix_len = sizeof(pipe_prefix) - 1; - typedef struct { - uv__ipc_socket_xfer_type_t xfer_type; - uv__ipc_socket_xfer_info_t xfer_info; -- struct uv__queue member; -+ QUEUE member; - } uv__ipc_xfer_queue_item_t; - - /* IPC frame header flags. */ -@@ -111,7 +111,7 @@ int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) { - handle->name = NULL; - handle->pipe.conn.ipc_remote_pid = 0; - handle->pipe.conn.ipc_data_frame.payload_remaining = 0; -- uv__queue_init(&handle->pipe.conn.ipc_xfer_queue); -+ QUEUE_INIT(&handle->pipe.conn.ipc_xfer_queue); - handle->pipe.conn.ipc_xfer_queue_length = 0; - handle->ipc = ipc; - handle->pipe.conn.non_overlapped_writes_tail = NULL; -@@ -637,13 +637,13 @@ void uv__pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) { - - if (handle->flags & UV_HANDLE_CONNECTION) { - /* Free pending sockets */ -- while (!uv__queue_empty(&handle->pipe.conn.ipc_xfer_queue)) { -- struct uv__queue* q; -+ while (!QUEUE_EMPTY(&handle->pipe.conn.ipc_xfer_queue)) { -+ QUEUE* q; - SOCKET socket; - -- q = uv__queue_head(&handle->pipe.conn.ipc_xfer_queue); -- uv__queue_remove(q); -- xfer_queue_item = uv__queue_data(q, uv__ipc_xfer_queue_item_t, member); -+ q = QUEUE_HEAD(&handle->pipe.conn.ipc_xfer_queue); -+ QUEUE_REMOVE(q); -+ xfer_queue_item = QUEUE_DATA(q, uv__ipc_xfer_queue_item_t, member); - - /* Materialize socket and close it */ - socket = WSASocketW(FROM_PROTOCOL_INFO, -@@ -1124,20 +1124,20 @@ int uv__pipe_accept(uv_pipe_t* server, uv_stream_t* client) { - uv_loop_t* loop = server->loop; - uv_pipe_t* pipe_client; - uv_pipe_accept_t* req; -- struct uv__queue* q; -+ QUEUE* q; - uv__ipc_xfer_queue_item_t* item; - int err; - - if (server->ipc) { -- if (uv__queue_empty(&server->pipe.conn.ipc_xfer_queue)) { -+ if (QUEUE_EMPTY(&server->pipe.conn.ipc_xfer_queue)) { - /* No valid pending sockets. */ - return WSAEWOULDBLOCK; - } - -- q = uv__queue_head(&server->pipe.conn.ipc_xfer_queue); -- uv__queue_remove(q); -+ q = QUEUE_HEAD(&server->pipe.conn.ipc_xfer_queue); -+ QUEUE_REMOVE(q); - server->pipe.conn.ipc_xfer_queue_length--; -- item = uv__queue_data(q, uv__ipc_xfer_queue_item_t, member); -+ item = QUEUE_DATA(q, uv__ipc_xfer_queue_item_t, member); - - err = uv__tcp_xfer_import( - (uv_tcp_t*) client, item->xfer_type, &item->xfer_info); -@@ -1891,7 +1891,7 @@ static void uv__pipe_queue_ipc_xfer_info( - item->xfer_type = xfer_type; - item->xfer_info = *xfer_info; - -- uv__queue_insert_tail(&handle->pipe.conn.ipc_xfer_queue, &item->member); -+ QUEUE_INSERT_TAIL(&handle->pipe.conn.ipc_xfer_queue, &item->member); - handle->pipe.conn.ipc_xfer_queue_length++; - } - -diff --git a/deps/uv/src/win/tcp.c b/deps/uv/src/win/tcp.c -index 187f36e2a61..6b282e0b501 100644 ---- a/deps/uv/src/win/tcp.c -+++ b/deps/uv/src/win/tcp.c -@@ -175,14 +175,14 @@ int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) { - sock = socket(domain, SOCK_STREAM, 0); - if (sock == INVALID_SOCKET) { - err = WSAGetLastError(); -- uv__queue_remove(&handle->handle_queue); -+ QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - - err = uv__tcp_set_socket(handle->loop, handle, sock, domain, 0); - if (err) { - closesocket(sock); -- uv__queue_remove(&handle->handle_queue); -+ QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - -diff --git a/deps/uv/src/win/udp.c b/deps/uv/src/win/udp.c -index eab53842d4f..8a982d1907d 100644 ---- a/deps/uv/src/win/udp.c -+++ b/deps/uv/src/win/udp.c -@@ -146,14 +146,14 @@ int uv__udp_init_ex(uv_loop_t* loop, - sock = socket(domain, SOCK_DGRAM, 0); - if (sock == INVALID_SOCKET) { - err = WSAGetLastError(); -- uv__queue_remove(&handle->handle_queue); -+ QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - - err = uv__udp_set_socket(handle->loop, handle, sock, domain); - if (err) { - closesocket(sock); -- uv__queue_remove(&handle->handle_queue); -+ QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - } diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch new file mode 100644 index 0000000000..f11cd08cbe --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch @@ -0,0 +1,35 @@ +From 9838be9c710ab4249df86726fa390232a3b6a6e7 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 1 Mar 2024 15:46:11 +0800 +Subject: [PATCH] deps: disable io_uring support in libuv + +Refer [1], Pseudo fails to intercept some of the syscalls when io_uring +enabled. Refer [2], always disable io_uring support in libuv to fix +issue in [1]. + +[1] https://git.openembedded.org/meta-openembedded/commit/?id=d08453978c31ee41d28206c6ff198d7d9d701d88 +[2] https://github.com/nodejs/node/commit/686da19abb + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li +--- + deps/uv/src/unix/linux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c +index 0c997185..7508409d 100644 +--- a/deps/uv/src/unix/linux.c ++++ b/deps/uv/src/unix/linux.c +@@ -433,7 +433,7 @@ static int uv__use_io_uring(void) { + if (use == 0) { + /* Disable io_uring by default due to CVE-2024-22017. */ + val = getenv("UV_USE_IO_URING"); +- use = val != NULL && atoi(val) ? 1 : -1; ++ use = 0; + atomic_store_explicit(&use_io_uring, use, memory_order_relaxed); + } + +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Revert-io_uring-changes-from-libuv-1.45.0.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Revert-io_uring-changes-from-libuv-1.45.0.patch deleted file mode 100644 index 77cd53b759..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Revert-io_uring-changes-from-libuv-1.45.0.patch +++ /dev/null @@ -1,1803 +0,0 @@ -From 6d2ef4c8ba2304ee4941a6719b3ad9bd63e415a9 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Wed, 18 Oct 2023 21:09:44 +0200 -Subject: [PATCH] Revert io_uring changes from libuv-1.45.0 - -This reverts https://github.com/libuv/libuv/pull/3952/commits/26c79a942b92573a1388c0ee8a6ad4397f009318 - -Included in nodejs-20.3.0 with the libuv upgrade to 1.45.0 in: -https://github.com/nodejs/node/commit/bfcb3d1d9a876f399013d326bd65804f9eda77e4 - -Reverted libuv commits: -Revert "linux: fix WRITEV with lots of bufs using io_uring (#4004)" -This reverts commit ef6a9a624df0a00687037474025a3608472f722a. -Revert "linux: work around EOWNERDEAD io_uring kernel bug (#4002)" -This reverts commit d23a20f62cc50b9fd7694992263f1d296d8f5cb4. -Revert "unix: handle CQ overflow in iou ring (#3991)" -This reverts commit 30fc896cc1b5822e9f1eb462587fe4b368a6215c. -Revert "unix: constrained_memory should return UINT64_MAX (#3753)" -This reverts commit 6ad347fae4520f39520d34bd7c7f5ddafab13a69. -Revert "linux: use io_uring to batch epoll_ctl calls (#3979)" -This reverts commit 6e073ef5daf93b708a654008959b823b58029e88. -Revert "linux: fix logic bug in sqe ring space check (#3980)" -This reverts commit f27208224084fc972b9d2802486d97ef31b51a39. -Revert "src: fix events/events_waiting metrics counter (#3957)" -This reverts commit e02642cf3b768b2c58a41f97fa38507e032ae415. -Revert "linux: remove bug workaround for obsolete kernels (#3965)" -This reverts commit 1c935a34454167b23f8eef7f0f63d7119f0de747. -Revert "linux: add IORING_OP_CLOSE support (#3964)" -This reverts commit dfae365f844e127621128a76bce7165e3f99a8d9. -Revert "linux: add IORING_OP_OPENAT support (#3963)" -This reverts commit 5ca5e475bb1711e65323ef1594a31818e5a1a9eb. -Revert "linux: fix academic valgrind warning (#3960)" -This reverts commit a7ff759ca1deacb2e0e6ae3c2d3dce91cc637dfe. -Revert "linux: introduce io_uring support (#3952)" -This reverts commit d2c31f429b87b476a7f1344d145dad4752a406d4. - -Dropped deps/uv/docs deps/uv/test changes as these dirs aren't included -in nodejs tarballs. - -Signed-off-by: Martin Jansa ---- -Upstream-Status: Inappropriate [OE specific] - - deps/uv/docs/src/fs.rst | 6 - - deps/uv/docs/src/misc.rst | 5 +- - deps/uv/src/threadpool.c | 21 - - deps/uv/src/unix/aix.c | 11 +- - deps/uv/src/unix/fs.c | 57 +- - deps/uv/src/unix/internal.h | 23 - - deps/uv/src/unix/kqueue.c | 10 +- - deps/uv/src/unix/linux.c | 998 +++----------------------- - deps/uv/src/unix/os390.c | 11 +- - deps/uv/src/unix/posix-poll.c | 11 +- - deps/uv/src/uv-common.h | 28 - - deps/uv/src/win/core.c | 20 +- - deps/uv/test/test-fs.c | 33 - - deps/uv/test/test-list.h | 4 - - deps/uv/test/test-metrics.c | 151 ---- - deps/uv/test/test-threadpool-cancel.c | 34 +- - 16 files changed, 138 insertions(+), 1285 deletions(-) - -diff --git a/deps/uv/src/threadpool.c b/deps/uv/src/threadpool.c -index 51962bf0021..a3da53026f9 100644 ---- a/deps/uv/src/threadpool.c -+++ b/deps/uv/src/threadpool.c -@@ -275,13 +275,9 @@ void uv__work_submit(uv_loop_t* loop, - } - - --/* TODO(bnoordhuis) teach libuv how to cancel file operations -- * that go through io_uring instead of the thread pool. -- */ - static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { - int cancelled; - -- uv_once(&once, init_once); /* Ensure |mutex| is initialized. */ - uv_mutex_lock(&mutex); - uv_mutex_lock(&w->loop->wq_mutex); - -@@ -311,15 +307,12 @@ void uv__work_done(uv_async_t* handle) { - QUEUE* q; - QUEUE wq; - int err; -- int nevents; - - loop = container_of(handle, uv_loop_t, wq_async); - uv_mutex_lock(&loop->wq_mutex); - QUEUE_MOVE(&loop->wq, &wq); - uv_mutex_unlock(&loop->wq_mutex); - -- nevents = 0; -- - while (!QUEUE_EMPTY(&wq)) { - q = QUEUE_HEAD(&wq); - QUEUE_REMOVE(q); -@@ -327,20 +320,6 @@ void uv__work_done(uv_async_t* handle) { - w = container_of(q, struct uv__work, wq); - err = (w->work == uv__cancelled) ? UV_ECANCELED : 0; - w->done(w, err); -- nevents++; -- } -- -- /* This check accomplishes 2 things: -- * 1. Even if the queue was empty, the call to uv__work_done() should count -- * as an event. Which will have been added by the event loop when -- * calling this callback. -- * 2. Prevents accidental wrap around in case nevents == 0 events == 0. -- */ -- if (nevents > 1) { -- /* Subtract 1 to counter the call to uv__work_done(). */ -- uv__metrics_inc_events(loop, nevents - 1); -- if (uv__get_internal_fields(loop)->current_timeout == 0) -- uv__metrics_inc_events_waiting(loop, nevents - 1); - } - } - -diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c -index f1afbed49ec..b855282ebc8 100644 ---- a/deps/uv/src/unix/aix.c -+++ b/deps/uv/src/unix/aix.c -@@ -131,7 +131,6 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) { - - - void uv__io_poll(uv_loop_t* loop, int timeout) { -- uv__loop_internal_fields_t* lfields; - struct pollfd events[1024]; - struct pollfd pqry; - struct pollfd* pe; -@@ -155,8 +154,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - return; - } - -- lfields = uv__get_internal_fields(loop); -- - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); - QUEUE_REMOVE(q); -@@ -220,7 +217,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -235,12 +232,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - if (timeout != 0) - uv__metrics_set_provider_entry_time(loop); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - nfds = pollset_poll(loop->backend_fd, - events, - ARRAY_SIZE(events), -diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c -index 00d385c24b7..c696a8d5500 100644 ---- a/deps/uv/src/unix/fs.c -+++ b/deps/uv/src/unix/fs.c -@@ -61,11 +61,10 @@ - #endif - - #if defined(__linux__) --# include --# include -+# include "sys/utsname.h" - #endif - --#if defined(__sun) -+#if defined(__linux__) || defined(__sun) - # include - # include - #endif -@@ -1554,7 +1553,26 @@ static int uv__fs_statx(int fd, - return UV_ENOSYS; - } - -- uv__statx_to_stat(&statxbuf, buf); -+ buf->st_dev = makedev(statxbuf.stx_dev_major, statxbuf.stx_dev_minor); -+ buf->st_mode = statxbuf.stx_mode; -+ buf->st_nlink = statxbuf.stx_nlink; -+ buf->st_uid = statxbuf.stx_uid; -+ buf->st_gid = statxbuf.stx_gid; -+ buf->st_rdev = makedev(statxbuf.stx_rdev_major, statxbuf.stx_rdev_minor); -+ buf->st_ino = statxbuf.stx_ino; -+ buf->st_size = statxbuf.stx_size; -+ buf->st_blksize = statxbuf.stx_blksize; -+ buf->st_blocks = statxbuf.stx_blocks; -+ buf->st_atim.tv_sec = statxbuf.stx_atime.tv_sec; -+ buf->st_atim.tv_nsec = statxbuf.stx_atime.tv_nsec; -+ buf->st_mtim.tv_sec = statxbuf.stx_mtime.tv_sec; -+ buf->st_mtim.tv_nsec = statxbuf.stx_mtime.tv_nsec; -+ buf->st_ctim.tv_sec = statxbuf.stx_ctime.tv_sec; -+ buf->st_ctim.tv_nsec = statxbuf.stx_ctime.tv_nsec; -+ buf->st_birthtim.tv_sec = statxbuf.stx_btime.tv_sec; -+ buf->st_birthtim.tv_nsec = statxbuf.stx_btime.tv_nsec; -+ buf->st_flags = 0; -+ buf->st_gen = 0; - - return 0; - #else -@@ -1798,9 +1816,6 @@ int uv_fs_chown(uv_loop_t* loop, - int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(CLOSE); - req->file = file; -- if (cb != NULL) -- if (uv__iou_fs_close(loop, req)) -- return 0; - POST; - } - -@@ -1848,9 +1863,6 @@ int uv_fs_lchown(uv_loop_t* loop, - int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FDATASYNC); - req->file = file; -- if (cb != NULL) -- if (uv__iou_fs_fsync_or_fdatasync(loop, req, /* IORING_FSYNC_DATASYNC */ 1)) -- return 0; - POST; - } - -@@ -1858,9 +1870,6 @@ int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FSTAT); - req->file = file; -- if (cb != NULL) -- if (uv__iou_fs_statx(loop, req, /* is_fstat */ 1, /* is_lstat */ 0)) -- return 0; - POST; - } - -@@ -1868,9 +1877,6 @@ int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FSYNC); - req->file = file; -- if (cb != NULL) -- if (uv__iou_fs_fsync_or_fdatasync(loop, req, /* no flags */ 0)) -- return 0; - POST; - } - -@@ -1917,9 +1923,6 @@ int uv_fs_lutime(uv_loop_t* loop, - int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(LSTAT); - PATH; -- if (cb != NULL) -- if (uv__iou_fs_statx(loop, req, /* is_fstat */ 0, /* is_lstat */ 1)) -- return 0; - POST; - } - -@@ -1981,9 +1984,6 @@ int uv_fs_open(uv_loop_t* loop, - PATH; - req->flags = flags; - req->mode = mode; -- if (cb != NULL) -- if (uv__iou_fs_open(loop, req)) -- return 0; - POST; - } - -@@ -2012,11 +2012,6 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, - memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); - - req->off = off; -- -- if (cb != NULL) -- if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 1)) -- return 0; -- - POST; - } - -@@ -2124,9 +2119,6 @@ int uv_fs_sendfile(uv_loop_t* loop, - int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(STAT); - PATH; -- if (cb != NULL) -- if (uv__iou_fs_statx(loop, req, /* is_fstat */ 0, /* is_lstat */ 0)) -- return 0; - POST; - } - -@@ -2190,11 +2182,6 @@ int uv_fs_write(uv_loop_t* loop, - memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); - - req->off = off; -- -- if (cb != NULL) -- if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 0)) -- return 0; -- - POST; - } - -diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h -index 6c5822e6a0d..d439ae6dd3d 100644 ---- a/deps/uv/src/unix/internal.h -+++ b/deps/uv/src/unix/internal.h -@@ -329,28 +329,6 @@ int uv__random_getentropy(void* buf, size_t buflen); - int uv__random_readpath(const char* path, void* buf, size_t buflen); - int uv__random_sysctl(void* buf, size_t buflen); - --/* io_uring */ --#ifdef __linux__ --int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req); --int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop, -- uv_fs_t* req, -- uint32_t fsync_flags); --int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req); --int uv__iou_fs_read_or_write(uv_loop_t* loop, -- uv_fs_t* req, -- int is_read); --int uv__iou_fs_statx(uv_loop_t* loop, -- uv_fs_t* req, -- int is_fstat, -- int is_lstat); --#else --#define uv__iou_fs_close(loop, req) 0 --#define uv__iou_fs_fsync_or_fdatasync(loop, req, fsync_flags) 0 --#define uv__iou_fs_open(loop, req) 0 --#define uv__iou_fs_read_or_write(loop, req, is_read) 0 --#define uv__iou_fs_statx(loop, req, is_fstat, is_lstat) 0 --#endif -- - #if defined(__APPLE__) - int uv___stream_fd(const uv_stream_t* handle); - #define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle))) -@@ -427,7 +405,6 @@ int uv__statx(int dirfd, - int flags, - unsigned int mask, - struct uv__statx* statxbuf); --void uv__statx_to_stat(const struct uv__statx* statxbuf, uv_stat_t* buf); - ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags); - #endif - -diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c -index 82916d65933..deb486bae7a 100644 ---- a/deps/uv/src/unix/kqueue.c -+++ b/deps/uv/src/unix/kqueue.c -@@ -127,7 +127,6 @@ static void uv__kqueue_delete(int kqfd, const struct kevent *ev) { - - - void uv__io_poll(uv_loop_t* loop, int timeout) { -- uv__loop_internal_fields_t* lfields; - struct kevent events[1024]; - struct kevent* ev; - struct timespec spec; -@@ -156,7 +155,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - return; - } - -- lfields = uv__get_internal_fields(loop); - nevents = 0; - - while (!QUEUE_EMPTY(&loop->watcher_queue)) { -@@ -224,7 +222,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -247,12 +245,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - if (pset != NULL) - pthread_sigmask(SIG_BLOCK, pset, NULL); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - nfds = kevent(loop->backend_fd, - events, - nevents, -diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c -index 5f84ad0eea3..343e37f2527 100644 ---- a/deps/uv/src/unix/linux.c -+++ b/deps/uv/src/unix/linux.c -@@ -27,8 +27,6 @@ - #include "internal.h" - - #include --#include --#include /* offsetof */ - #include - #include - #include -@@ -40,29 +38,15 @@ - #include - #include - #include --#include - #include - #include - #include - #include - #include --#include - #include - #include - #include - --#ifndef __NR_io_uring_setup --# define __NR_io_uring_setup 425 --#endif -- --#ifndef __NR_io_uring_enter --# define __NR_io_uring_enter 426 --#endif -- --#ifndef __NR_io_uring_register --# define __NR_io_uring_register 427 --#endif -- - #ifndef __NR_copy_file_range - # if defined(__x86_64__) - # define __NR_copy_file_range 326 -@@ -132,129 +116,6 @@ - # include - #endif /* HAVE_IFADDRS_H */ - --enum { -- UV__IORING_SETUP_SQPOLL = 2u, --}; -- --enum { -- UV__IORING_FEAT_SINGLE_MMAP = 1u, -- UV__IORING_FEAT_NODROP = 2u, -- UV__IORING_FEAT_RSRC_TAGS = 1024u, /* linux v5.13 */ --}; -- --enum { -- UV__IORING_OP_READV = 1, -- UV__IORING_OP_WRITEV = 2, -- UV__IORING_OP_FSYNC = 3, -- UV__IORING_OP_OPENAT = 18, -- UV__IORING_OP_CLOSE = 19, -- UV__IORING_OP_STATX = 21, -- UV__IORING_OP_EPOLL_CTL = 29, --}; -- --enum { -- UV__IORING_ENTER_GETEVENTS = 1u, -- UV__IORING_ENTER_SQ_WAKEUP = 2u, --}; -- --enum { -- UV__IORING_SQ_NEED_WAKEUP = 1u, -- UV__IORING_SQ_CQ_OVERFLOW = 2u, --}; -- --struct uv__io_cqring_offsets { -- uint32_t head; -- uint32_t tail; -- uint32_t ring_mask; -- uint32_t ring_entries; -- uint32_t overflow; -- uint32_t cqes; -- uint64_t reserved0; -- uint64_t reserved1; --}; -- --STATIC_ASSERT(40 == sizeof(struct uv__io_cqring_offsets)); -- --struct uv__io_sqring_offsets { -- uint32_t head; -- uint32_t tail; -- uint32_t ring_mask; -- uint32_t ring_entries; -- uint32_t flags; -- uint32_t dropped; -- uint32_t array; -- uint32_t reserved0; -- uint64_t reserved1; --}; -- --STATIC_ASSERT(40 == sizeof(struct uv__io_sqring_offsets)); -- --struct uv__io_uring_cqe { -- uint64_t user_data; -- int32_t res; -- uint32_t flags; --}; -- --STATIC_ASSERT(16 == sizeof(struct uv__io_uring_cqe)); -- --struct uv__io_uring_sqe { -- uint8_t opcode; -- uint8_t flags; -- uint16_t ioprio; -- int32_t fd; -- union { -- uint64_t off; -- uint64_t addr2; -- }; -- union { -- uint64_t addr; -- }; -- uint32_t len; -- union { -- uint32_t rw_flags; -- uint32_t fsync_flags; -- uint32_t open_flags; -- uint32_t statx_flags; -- }; -- uint64_t user_data; -- union { -- uint16_t buf_index; -- uint64_t pad[3]; -- }; --}; -- --STATIC_ASSERT(64 == sizeof(struct uv__io_uring_sqe)); --STATIC_ASSERT(0 == offsetof(struct uv__io_uring_sqe, opcode)); --STATIC_ASSERT(1 == offsetof(struct uv__io_uring_sqe, flags)); --STATIC_ASSERT(2 == offsetof(struct uv__io_uring_sqe, ioprio)); --STATIC_ASSERT(4 == offsetof(struct uv__io_uring_sqe, fd)); --STATIC_ASSERT(8 == offsetof(struct uv__io_uring_sqe, off)); --STATIC_ASSERT(16 == offsetof(struct uv__io_uring_sqe, addr)); --STATIC_ASSERT(24 == offsetof(struct uv__io_uring_sqe, len)); --STATIC_ASSERT(28 == offsetof(struct uv__io_uring_sqe, rw_flags)); --STATIC_ASSERT(32 == offsetof(struct uv__io_uring_sqe, user_data)); --STATIC_ASSERT(40 == offsetof(struct uv__io_uring_sqe, buf_index)); -- --struct uv__io_uring_params { -- uint32_t sq_entries; -- uint32_t cq_entries; -- uint32_t flags; -- uint32_t sq_thread_cpu; -- uint32_t sq_thread_idle; -- uint32_t features; -- uint32_t reserved[4]; -- struct uv__io_sqring_offsets sq_off; /* 40 bytes */ -- struct uv__io_cqring_offsets cq_off; /* 40 bytes */ --}; -- --STATIC_ASSERT(40 + 40 + 40 == sizeof(struct uv__io_uring_params)); --STATIC_ASSERT(40 == offsetof(struct uv__io_uring_params, sq_off)); --STATIC_ASSERT(80 == offsetof(struct uv__io_uring_params, cq_off)); -- --STATIC_ASSERT(EPOLL_CTL_ADD < 4); --STATIC_ASSERT(EPOLL_CTL_DEL < 4); --STATIC_ASSERT(EPOLL_CTL_MOD < 4); -- - struct watcher_list { - RB_ENTRY(watcher_list) entry; - QUEUE watchers; -@@ -276,17 +137,6 @@ static int compare_watchers(const struct watcher_list* a, - static void maybe_free_watcher_list(struct watcher_list* w, - uv_loop_t* loop); - --static void uv__epoll_ctl_flush(int epollfd, -- struct uv__iou* ctl, -- struct epoll_event (*events)[256]); -- --static void uv__epoll_ctl_prep(int epollfd, -- struct uv__iou* ctl, -- struct epoll_event (*events)[256], -- int op, -- int fd, -- struct epoll_event* e); -- - RB_GENERATE_STATIC(watcher_root, watcher_list, entry, compare_watchers) - - -@@ -356,187 +206,7 @@ ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags) { - } - - --int uv__io_uring_setup(int entries, struct uv__io_uring_params* params) { -- return syscall(__NR_io_uring_setup, entries, params); --} -- -- --int uv__io_uring_enter(int fd, -- unsigned to_submit, -- unsigned min_complete, -- unsigned flags) { -- /* io_uring_enter used to take a sigset_t but it's unused -- * in newer kernels unless IORING_ENTER_EXT_ARG is set, -- * in which case it takes a struct io_uring_getevents_arg. -- */ -- return syscall(__NR_io_uring_enter, -- fd, -- to_submit, -- min_complete, -- flags, -- NULL, -- 0L); --} -- -- --int uv__io_uring_register(int fd, unsigned opcode, void* arg, unsigned nargs) { -- return syscall(__NR_io_uring_register, fd, opcode, arg, nargs); --} -- -- --static int uv__use_io_uring(void) { -- /* Ternary: unknown=0, yes=1, no=-1 */ -- static _Atomic int use_io_uring; -- char* val; -- int use; -- -- use = atomic_load_explicit(&use_io_uring, memory_order_relaxed); -- -- if (use == 0) { -- val = getenv("UV_USE_IO_URING"); -- use = val == NULL || atoi(val) ? 1 : -1; -- atomic_store_explicit(&use_io_uring, use, memory_order_relaxed); -- } -- -- return use > 0; --} -- -- --static void uv__iou_init(int epollfd, -- struct uv__iou* iou, -- uint32_t entries, -- uint32_t flags) { -- struct uv__io_uring_params params; -- struct epoll_event e; -- size_t cqlen; -- size_t sqlen; -- size_t maxlen; -- size_t sqelen; -- uint32_t i; -- char* sq; -- char* sqe; -- int ringfd; -- -- sq = MAP_FAILED; -- sqe = MAP_FAILED; -- -- if (!uv__use_io_uring()) -- return; -- -- /* SQPOLL required CAP_SYS_NICE until linux v5.12 relaxed that requirement. -- * Mostly academic because we check for a v5.13 kernel afterwards anyway. -- */ -- memset(¶ms, 0, sizeof(params)); -- params.flags = flags; -- -- if (flags & UV__IORING_SETUP_SQPOLL) -- params.sq_thread_idle = 10; /* milliseconds */ -- -- /* Kernel returns a file descriptor with O_CLOEXEC flag set. */ -- ringfd = uv__io_uring_setup(entries, ¶ms); -- if (ringfd == -1) -- return; -- -- /* IORING_FEAT_RSRC_TAGS is used to detect linux v5.13 but what we're -- * actually detecting is whether IORING_OP_STATX works with SQPOLL. -- */ -- if (!(params.features & UV__IORING_FEAT_RSRC_TAGS)) -- goto fail; -- -- /* Implied by IORING_FEAT_RSRC_TAGS but checked explicitly anyway. */ -- if (!(params.features & UV__IORING_FEAT_SINGLE_MMAP)) -- goto fail; -- -- /* Implied by IORING_FEAT_RSRC_TAGS but checked explicitly anyway. */ -- if (!(params.features & UV__IORING_FEAT_NODROP)) -- goto fail; -- -- sqlen = params.sq_off.array + params.sq_entries * sizeof(uint32_t); -- cqlen = -- params.cq_off.cqes + params.cq_entries * sizeof(struct uv__io_uring_cqe); -- maxlen = sqlen < cqlen ? cqlen : sqlen; -- sqelen = params.sq_entries * sizeof(struct uv__io_uring_sqe); -- -- sq = mmap(0, -- maxlen, -- PROT_READ | PROT_WRITE, -- MAP_SHARED | MAP_POPULATE, -- ringfd, -- 0); /* IORING_OFF_SQ_RING */ -- -- sqe = mmap(0, -- sqelen, -- PROT_READ | PROT_WRITE, -- MAP_SHARED | MAP_POPULATE, -- ringfd, -- 0x10000000ull); /* IORING_OFF_SQES */ -- -- if (sq == MAP_FAILED || sqe == MAP_FAILED) -- goto fail; -- -- if (flags & UV__IORING_SETUP_SQPOLL) { -- /* Only interested in completion events. To get notified when -- * the kernel pulls items from the submission ring, add POLLOUT. -- */ -- memset(&e, 0, sizeof(e)); -- e.events = POLLIN; -- e.data.fd = ringfd; -- -- if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ringfd, &e)) -- goto fail; -- } -- -- iou->sqhead = (uint32_t*) (sq + params.sq_off.head); -- iou->sqtail = (uint32_t*) (sq + params.sq_off.tail); -- iou->sqmask = *(uint32_t*) (sq + params.sq_off.ring_mask); -- iou->sqarray = (uint32_t*) (sq + params.sq_off.array); -- iou->sqflags = (uint32_t*) (sq + params.sq_off.flags); -- iou->cqhead = (uint32_t*) (sq + params.cq_off.head); -- iou->cqtail = (uint32_t*) (sq + params.cq_off.tail); -- iou->cqmask = *(uint32_t*) (sq + params.cq_off.ring_mask); -- iou->sq = sq; -- iou->cqe = sq + params.cq_off.cqes; -- iou->sqe = sqe; -- iou->sqlen = sqlen; -- iou->cqlen = cqlen; -- iou->maxlen = maxlen; -- iou->sqelen = sqelen; -- iou->ringfd = ringfd; -- iou->in_flight = 0; -- -- for (i = 0; i <= iou->sqmask; i++) -- iou->sqarray[i] = i; /* Slot -> sqe identity mapping. */ -- -- return; -- --fail: -- if (sq != MAP_FAILED) -- munmap(sq, maxlen); -- -- if (sqe != MAP_FAILED) -- munmap(sqe, sqelen); -- -- uv__close(ringfd); --} -- -- --static void uv__iou_delete(struct uv__iou* iou) { -- if (iou->ringfd != -1) { -- munmap(iou->sq, iou->maxlen); -- munmap(iou->sqe, iou->sqelen); -- uv__close(iou->ringfd); -- iou->ringfd = -1; -- } --} -- -- - int uv__platform_loop_init(uv_loop_t* loop) { -- uv__loop_internal_fields_t* lfields; -- -- lfields = uv__get_internal_fields(loop); -- lfields->ctl.ringfd = -1; -- lfields->iou.ringfd = -1; -- - loop->inotify_watchers = NULL; - loop->inotify_fd = -1; - loop->backend_fd = epoll_create1(O_CLOEXEC); -@@ -544,9 +214,6 @@ int uv__platform_loop_init(uv_loop_t* loop) { - if (loop->backend_fd == -1) - return UV__ERR(errno); - -- uv__iou_init(loop->backend_fd, &lfields->iou, 64, UV__IORING_SETUP_SQPOLL); -- uv__iou_init(loop->backend_fd, &lfields->ctl, 256, 0); -- - return 0; - } - -@@ -559,8 +226,6 @@ int uv__io_fork(uv_loop_t* loop) { - - uv__close(loop->backend_fd); - loop->backend_fd = -1; -- -- /* TODO(bnoordhuis) Loses items from the submission and completion rings. */ - uv__platform_loop_delete(loop); - - err = uv__platform_loop_init(loop); -@@ -572,62 +237,42 @@ int uv__io_fork(uv_loop_t* loop) { - - - void uv__platform_loop_delete(uv_loop_t* loop) { -- uv__loop_internal_fields_t* lfields; -- -- lfields = uv__get_internal_fields(loop); -- uv__iou_delete(&lfields->ctl); -- uv__iou_delete(&lfields->iou); -- -- if (loop->inotify_fd != -1) { -- uv__io_stop(loop, &loop->inotify_read_watcher, POLLIN); -- uv__close(loop->inotify_fd); -- loop->inotify_fd = -1; -- } -+ if (loop->inotify_fd == -1) return; -+ uv__io_stop(loop, &loop->inotify_read_watcher, POLLIN); -+ uv__close(loop->inotify_fd); -+ loop->inotify_fd = -1; - } - - --struct uv__invalidate { -- struct epoll_event (*prep)[256]; -- struct epoll_event* events; -- int nfds; --}; -- -- - void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { -- uv__loop_internal_fields_t* lfields; -- struct uv__invalidate* inv; -+ struct epoll_event* events; - struct epoll_event dummy; -- int i; -+ uintptr_t i; -+ uintptr_t nfds; - -- lfields = uv__get_internal_fields(loop); -- inv = lfields->inv; -+ assert(loop->watchers != NULL); -+ assert(fd >= 0); - -- /* Invalidate events with same file descriptor */ -- if (inv != NULL) -- for (i = 0; i < inv->nfds; i++) -- if (inv->events[i].data.fd == fd) -- inv->events[i].data.fd = -1; -+ events = (struct epoll_event*) loop->watchers[loop->nwatchers]; -+ nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; -+ if (events != NULL) -+ /* Invalidate events with same file descriptor */ -+ for (i = 0; i < nfds; i++) -+ if (events[i].data.fd == fd) -+ events[i].data.fd = -1; - - /* Remove the file descriptor from the epoll. - * This avoids a problem where the same file description remains open - * in another process, causing repeated junk epoll events. - * - * We pass in a dummy epoll_event, to work around a bug in old kernels. -- * -- * Work around a bug in kernels 3.10 to 3.19 where passing a struct that -- * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings. - */ -- memset(&dummy, 0, sizeof(dummy)); -- -- if (inv == NULL) { -+ if (loop->backend_fd >= 0) { -+ /* Work around a bug in kernels 3.10 to 3.19 where passing a struct that -+ * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings. -+ */ -+ memset(&dummy, 0, sizeof(dummy)); - epoll_ctl(loop->backend_fd, EPOLL_CTL_DEL, fd, &dummy); -- } else { -- uv__epoll_ctl_prep(loop->backend_fd, -- &lfields->ctl, -- inv->prep, -- EPOLL_CTL_DEL, -- fd, -- &dummy); - } - } - -@@ -653,454 +298,27 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) { - } - - --/* Caller must initialize SQE and call uv__iou_submit(). */ --static struct uv__io_uring_sqe* uv__iou_get_sqe(struct uv__iou* iou, -- uv_loop_t* loop, -- uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- uint32_t head; -- uint32_t tail; -- uint32_t mask; -- uint32_t slot; -- -- if (iou->ringfd == -1) -- return NULL; -- -- head = atomic_load_explicit((_Atomic uint32_t*) iou->sqhead, -- memory_order_acquire); -- tail = *iou->sqtail; -- mask = iou->sqmask; -- -- if ((head & mask) == ((tail + 1) & mask)) -- return NULL; /* No room in ring buffer. TODO(bnoordhuis) maybe flush it? */ -- -- slot = tail & mask; -- sqe = iou->sqe; -- sqe = &sqe[slot]; -- memset(sqe, 0, sizeof(*sqe)); -- sqe->user_data = (uintptr_t) req; -- -- /* Pacify uv_cancel(). */ -- req->work_req.loop = loop; -- req->work_req.work = NULL; -- req->work_req.done = NULL; -- QUEUE_INIT(&req->work_req.wq); -- -- uv__req_register(loop, req); -- iou->in_flight++; -- -- return sqe; --} -- -- --static void uv__iou_submit(struct uv__iou* iou) { -- uint32_t flags; -- -- atomic_store_explicit((_Atomic uint32_t*) iou->sqtail, -- *iou->sqtail + 1, -- memory_order_release); -- -- flags = atomic_load_explicit((_Atomic uint32_t*) iou->sqflags, -- memory_order_acquire); -- -- if (flags & UV__IORING_SQ_NEED_WAKEUP) -- if (uv__io_uring_enter(iou->ringfd, 0, 0, UV__IORING_ENTER_SQ_WAKEUP)) -- if (errno != EOWNERDEAD) /* Kernel bug. Harmless, ignore. */ -- perror("libuv: io_uring_enter(wakeup)"); /* Can't happen. */ --} -- -- --int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->fd = req->file; -- sqe->opcode = UV__IORING_OP_CLOSE; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop, -- uv_fs_t* req, -- uint32_t fsync_flags) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- /* Little known fact: setting seq->off and seq->len turns -- * it into an asynchronous sync_file_range() operation. -- */ -- sqe->fd = req->file; -- sqe->fsync_flags = fsync_flags; -- sqe->opcode = UV__IORING_OP_FSYNC; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->fd = AT_FDCWD; -- sqe->len = req->mode; -- sqe->opcode = UV__IORING_OP_OPENAT; -- sqe->open_flags = req->flags | O_CLOEXEC; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_read_or_write(uv_loop_t* loop, -- uv_fs_t* req, -- int is_read) { -- struct uv__io_uring_sqe* sqe; -- struct uv__iou* iou; -- -- /* For the moment, if iovcnt is greater than IOV_MAX, fallback to the -- * threadpool. In the future we might take advantage of IOSQE_IO_LINK. */ -- if (req->nbufs > IOV_MAX) -- return 0; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) -- return 0; -- -- sqe->addr = (uintptr_t) req->bufs; -- sqe->fd = req->file; -- sqe->len = req->nbufs; -- sqe->off = req->off < 0 ? -1 : req->off; -- sqe->opcode = is_read ? UV__IORING_OP_READV : UV__IORING_OP_WRITEV; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --int uv__iou_fs_statx(uv_loop_t* loop, -- uv_fs_t* req, -- int is_fstat, -- int is_lstat) { -- struct uv__io_uring_sqe* sqe; -- struct uv__statx* statxbuf; -- struct uv__iou* iou; -- -- statxbuf = uv__malloc(sizeof(*statxbuf)); -- if (statxbuf == NULL) -- return 0; -- -- iou = &uv__get_internal_fields(loop)->iou; -- -- sqe = uv__iou_get_sqe(iou, loop, req); -- if (sqe == NULL) { -- uv__free(statxbuf); -- return 0; -- } -- -- req->ptr = statxbuf; -- -- sqe->addr = (uintptr_t) req->path; -- sqe->addr2 = (uintptr_t) statxbuf; -- sqe->fd = AT_FDCWD; -- sqe->len = 0xFFF; /* STATX_BASIC_STATS + STATX_BTIME */ -- sqe->opcode = UV__IORING_OP_STATX; -- -- if (is_fstat) { -- sqe->addr = (uintptr_t) ""; -- sqe->fd = req->file; -- sqe->statx_flags |= 0x1000; /* AT_EMPTY_PATH */ -- } -- -- if (is_lstat) -- sqe->statx_flags |= AT_SYMLINK_NOFOLLOW; -- -- uv__iou_submit(iou); -- -- return 1; --} -- -- --void uv__statx_to_stat(const struct uv__statx* statxbuf, uv_stat_t* buf) { -- buf->st_dev = makedev(statxbuf->stx_dev_major, statxbuf->stx_dev_minor); -- buf->st_mode = statxbuf->stx_mode; -- buf->st_nlink = statxbuf->stx_nlink; -- buf->st_uid = statxbuf->stx_uid; -- buf->st_gid = statxbuf->stx_gid; -- buf->st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor); -- buf->st_ino = statxbuf->stx_ino; -- buf->st_size = statxbuf->stx_size; -- buf->st_blksize = statxbuf->stx_blksize; -- buf->st_blocks = statxbuf->stx_blocks; -- buf->st_atim.tv_sec = statxbuf->stx_atime.tv_sec; -- buf->st_atim.tv_nsec = statxbuf->stx_atime.tv_nsec; -- buf->st_mtim.tv_sec = statxbuf->stx_mtime.tv_sec; -- buf->st_mtim.tv_nsec = statxbuf->stx_mtime.tv_nsec; -- buf->st_ctim.tv_sec = statxbuf->stx_ctime.tv_sec; -- buf->st_ctim.tv_nsec = statxbuf->stx_ctime.tv_nsec; -- buf->st_birthtim.tv_sec = statxbuf->stx_btime.tv_sec; -- buf->st_birthtim.tv_nsec = statxbuf->stx_btime.tv_nsec; -- buf->st_flags = 0; -- buf->st_gen = 0; --} -- -- --static void uv__iou_fs_statx_post(uv_fs_t* req) { -- struct uv__statx* statxbuf; -- uv_stat_t* buf; -- -- buf = &req->statbuf; -- statxbuf = req->ptr; -- req->ptr = NULL; -- -- if (req->result == 0) { -- uv__msan_unpoison(statxbuf, sizeof(*statxbuf)); -- uv__statx_to_stat(statxbuf, buf); -- req->ptr = buf; -- } -- -- uv__free(statxbuf); --} -- -- --static void uv__poll_io_uring(uv_loop_t* loop, struct uv__iou* iou) { -- struct uv__io_uring_cqe* cqe; -- struct uv__io_uring_cqe* e; -- uv_fs_t* req; -- uint32_t head; -- uint32_t tail; -- uint32_t mask; -- uint32_t i; -- uint32_t flags; -- int nevents; -- int rc; -- -- head = *iou->cqhead; -- tail = atomic_load_explicit((_Atomic uint32_t*) iou->cqtail, -- memory_order_acquire); -- mask = iou->cqmask; -- cqe = iou->cqe; -- nevents = 0; -- -- for (i = head; i != tail; i++) { -- e = &cqe[i & mask]; -- -- req = (uv_fs_t*) (uintptr_t) e->user_data; -- assert(req->type == UV_FS); -- -- uv__req_unregister(loop, req); -- iou->in_flight--; -- -- /* io_uring stores error codes as negative numbers, same as libuv. */ -- req->result = e->res; -- -- switch (req->fs_type) { -- case UV_FS_FSTAT: -- case UV_FS_LSTAT: -- case UV_FS_STAT: -- uv__iou_fs_statx_post(req); -- break; -- default: /* Squelch -Wswitch warnings. */ -- break; -- } -- -- uv__metrics_update_idle_time(loop); -- req->cb(req); -- nevents++; -- } -- -- atomic_store_explicit((_Atomic uint32_t*) iou->cqhead, -- tail, -- memory_order_release); -- -- /* Check whether CQE's overflowed, if so enter the kernel to make them -- * available. Don't grab them immediately but in the next loop iteration to -- * avoid loop starvation. */ -- flags = atomic_load_explicit((_Atomic uint32_t*) iou->sqflags, -- memory_order_acquire); -- -- if (flags & UV__IORING_SQ_CQ_OVERFLOW) { -- do -- rc = uv__io_uring_enter(iou->ringfd, 0, 0, UV__IORING_ENTER_GETEVENTS); -- while (rc == -1 && errno == EINTR); -- -- if (rc < 0) -- perror("libuv: io_uring_enter(getevents)"); /* Can't happen. */ -- } -- -- uv__metrics_inc_events(loop, nevents); -- if (uv__get_internal_fields(loop)->current_timeout == 0) -- uv__metrics_inc_events_waiting(loop, nevents); --} -- -- --static void uv__epoll_ctl_prep(int epollfd, -- struct uv__iou* ctl, -- struct epoll_event (*events)[256], -- int op, -- int fd, -- struct epoll_event* e) { -- struct uv__io_uring_sqe* sqe; -- struct epoll_event* pe; -- uint32_t mask; -- uint32_t slot; -- -- if (ctl->ringfd == -1) { -- if (!epoll_ctl(epollfd, op, fd, e)) -- return; -- -- if (op == EPOLL_CTL_DEL) -- return; /* Ignore errors, may be racing with another thread. */ -- -- if (op != EPOLL_CTL_ADD) -- abort(); -- -- if (errno != EEXIST) -- abort(); -- -- /* File descriptor that's been watched before, update event mask. */ -- if (!epoll_ctl(epollfd, EPOLL_CTL_MOD, fd, e)) -- return; -- -- abort(); -- } else { -- mask = ctl->sqmask; -- slot = (*ctl->sqtail)++ & mask; -- -- pe = &(*events)[slot]; -- *pe = *e; -- -- sqe = ctl->sqe; -- sqe = &sqe[slot]; -- -- memset(sqe, 0, sizeof(*sqe)); -- sqe->addr = (uintptr_t) pe; -- sqe->fd = epollfd; -- sqe->len = op; -- sqe->off = fd; -- sqe->opcode = UV__IORING_OP_EPOLL_CTL; -- sqe->user_data = op | slot << 2 | (int64_t) fd << 32; -- -- if ((*ctl->sqhead & mask) == (*ctl->sqtail & mask)) -- uv__epoll_ctl_flush(epollfd, ctl, events); -- } --} -- -- --static void uv__epoll_ctl_flush(int epollfd, -- struct uv__iou* ctl, -- struct epoll_event (*events)[256]) { -- struct epoll_event oldevents[256]; -- struct uv__io_uring_cqe* cqe; -- uint32_t oldslot; -- uint32_t slot; -- uint32_t n; -- int fd; -- int op; -- int rc; -- -- STATIC_ASSERT(sizeof(oldevents) == sizeof(*events)); -- assert(ctl->ringfd != -1); -- assert(*ctl->sqhead != *ctl->sqtail); -- -- n = *ctl->sqtail - *ctl->sqhead; -- do -- rc = uv__io_uring_enter(ctl->ringfd, n, n, UV__IORING_ENTER_GETEVENTS); -- while (rc == -1 && errno == EINTR); -- -- if (rc < 0) -- perror("libuv: io_uring_enter(getevents)"); /* Can't happen. */ -- -- if (rc != (int) n) -- abort(); -- -- assert(*ctl->sqhead == *ctl->sqtail); -- -- memcpy(oldevents, *events, sizeof(*events)); -- -- /* Failed submissions are either EPOLL_CTL_DEL commands for file descriptors -- * that have been closed, or EPOLL_CTL_ADD commands for file descriptors -- * that we are already watching. Ignore the former and retry the latter -- * with EPOLL_CTL_MOD. -- */ -- while (*ctl->cqhead != *ctl->cqtail) { -- slot = (*ctl->cqhead)++ & ctl->cqmask; -- -- cqe = ctl->cqe; -- cqe = &cqe[slot]; -- -- if (cqe->res == 0) -- continue; -- -- fd = cqe->user_data >> 32; -- op = 3 & cqe->user_data; -- oldslot = 255 & (cqe->user_data >> 2); -- -- if (op == EPOLL_CTL_DEL) -- continue; -- -- if (op != EPOLL_CTL_ADD) -- abort(); -- -- if (cqe->res != -EEXIST) -- abort(); -- -- uv__epoll_ctl_prep(epollfd, -- ctl, -- events, -- EPOLL_CTL_MOD, -- fd, -- &oldevents[oldslot]); -- } --} -- -- - void uv__io_poll(uv_loop_t* loop, int timeout) { -- uv__loop_internal_fields_t* lfields; -+ /* A bug in kernels < 2.6.37 makes timeouts larger than ~30 minutes -+ * effectively infinite on 32 bits architectures. To avoid blocking -+ * indefinitely, we cap the timeout and poll again if necessary. -+ * -+ * Note that "30 minutes" is a simplification because it depends on -+ * the value of CONFIG_HZ. The magic constant assumes CONFIG_HZ=1200, -+ * that being the largest value I have seen in the wild (and only once.) -+ */ -+ static const int max_safe_timeout = 1789569; - struct epoll_event events[1024]; -- struct epoll_event prep[256]; -- struct uv__invalidate inv; - struct epoll_event* pe; - struct epoll_event e; -- struct uv__iou* ctl; -- struct uv__iou* iou; - int real_timeout; - QUEUE* q; - uv__io_t* w; - sigset_t* sigmask; - sigset_t sigset; - uint64_t base; -- int have_iou_events; - int have_signals; - int nevents; -- int epollfd; - int count; - int nfds; - int fd; -@@ -1109,9 +327,47 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int user_timeout; - int reset_timeout; - -- lfields = uv__get_internal_fields(loop); -- ctl = &lfields->ctl; -- iou = &lfields->iou; -+ if (loop->nfds == 0) { -+ assert(QUEUE_EMPTY(&loop->watcher_queue)); -+ return; -+ } -+ -+ memset(&e, 0, sizeof(e)); -+ -+ while (!QUEUE_EMPTY(&loop->watcher_queue)) { -+ q = QUEUE_HEAD(&loop->watcher_queue); -+ QUEUE_REMOVE(q); -+ QUEUE_INIT(q); -+ -+ w = QUEUE_DATA(q, uv__io_t, watcher_queue); -+ assert(w->pevents != 0); -+ assert(w->fd >= 0); -+ assert(w->fd < (int) loop->nwatchers); -+ -+ e.events = w->pevents; -+ e.data.fd = w->fd; -+ -+ if (w->events == 0) -+ op = EPOLL_CTL_ADD; -+ else -+ op = EPOLL_CTL_MOD; -+ -+ /* XXX Future optimization: do EPOLL_CTL_MOD lazily if we stop watching -+ * events, skip the syscall and squelch the events after epoll_wait(). -+ */ -+ if (epoll_ctl(loop->backend_fd, op, w->fd, &e)) { -+ if (errno != EEXIST) -+ abort(); -+ -+ assert(op == EPOLL_CTL_ADD); -+ -+ /* We've reactivated a file descriptor that's been watched before. */ -+ if (epoll_ctl(loop->backend_fd, EPOLL_CTL_MOD, w->fd, &e)) -+ abort(); -+ } -+ -+ w->events = w->pevents; -+ } - - sigmask = NULL; - if (loop->flags & UV_LOOP_BLOCK_SIGPROF) { -@@ -1125,7 +381,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - count = 48; /* Benchmarks suggest this gives the best throughput. */ - real_timeout = timeout; - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -1134,56 +390,24 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - user_timeout = 0; - } - -- epollfd = loop->backend_fd; -- -- memset(&e, 0, sizeof(e)); -- -- while (!QUEUE_EMPTY(&loop->watcher_queue)) { -- q = QUEUE_HEAD(&loop->watcher_queue); -- w = QUEUE_DATA(q, uv__io_t, watcher_queue); -- QUEUE_REMOVE(q); -- QUEUE_INIT(q); -- -- op = EPOLL_CTL_MOD; -- if (w->events == 0) -- op = EPOLL_CTL_ADD; -- -- w->events = w->pevents; -- e.events = w->pevents; -- e.data.fd = w->fd; -- -- uv__epoll_ctl_prep(epollfd, ctl, &prep, op, w->fd, &e); -- } -- -- inv.events = events; -- inv.prep = &prep; -- inv.nfds = -1; -- - for (;;) { -- if (loop->nfds == 0) -- if (iou->in_flight == 0) -- break; -- -- /* All event mask mutations should be visible to the kernel before -- * we enter epoll_pwait(). -- */ -- if (ctl->ringfd != -1) -- while (*ctl->sqhead != *ctl->sqtail) -- uv__epoll_ctl_flush(epollfd, ctl, &prep); -- - /* Only need to set the provider_entry_time if timeout != 0. The function - * will return early if the loop isn't configured with UV_METRICS_IDLE_TIME. - */ - if (timeout != 0) - uv__metrics_set_provider_entry_time(loop); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -+ /* See the comment for max_safe_timeout for an explanation of why -+ * this is necessary. Executive summary: kernel bug workaround. - */ -- lfields->current_timeout = timeout; -+ if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout) -+ timeout = max_safe_timeout; - -- nfds = epoll_pwait(epollfd, events, ARRAY_SIZE(events), timeout, sigmask); -+ nfds = epoll_pwait(loop->backend_fd, -+ events, -+ ARRAY_SIZE(events), -+ timeout, -+ sigmask); - - /* Update loop->time unconditionally. It's tempting to skip the update when - * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the -@@ -1203,7 +427,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - continue; - - if (timeout == 0) -- break; -+ return; - - /* We may have been inside the system call for longer than |timeout| - * milliseconds so we need to update the timestamp to avoid drift. -@@ -1224,18 +448,27 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - continue; - - if (timeout == 0) -- break; -+ return; - - /* Interrupted by a signal. Update timeout and poll again. */ - goto update_timeout; - } - -- have_iou_events = 0; - have_signals = 0; - nevents = 0; - -- inv.nfds = nfds; -- lfields->inv = &inv; -+ { -+ /* Squelch a -Waddress-of-packed-member warning with gcc >= 9. */ -+ union { -+ struct epoll_event* events; -+ uv__io_t* watchers; -+ } x; -+ -+ x.events = events; -+ assert(loop->watchers != NULL); -+ loop->watchers[loop->nwatchers] = x.watchers; -+ loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; -+ } - - for (i = 0; i < nfds; i++) { - pe = events + i; -@@ -1245,12 +478,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - if (fd == -1) - continue; - -- if (fd == iou->ringfd) { -- uv__poll_io_uring(loop, iou); -- have_iou_events = 1; -- continue; -- } -- - assert(fd >= 0); - assert((unsigned) fd < loop->nwatchers); - -@@ -1262,7 +489,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - * Ignore all errors because we may be racing with another thread - * when the file descriptor is closed. - */ -- uv__epoll_ctl_prep(epollfd, ctl, &prep, EPOLL_CTL_DEL, fd, pe); -+ epoll_ctl(loop->backend_fd, EPOLL_CTL_DEL, fd, pe); - continue; - } - -@@ -1319,13 +546,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - loop->signal_io_watcher.cb(loop, &loop->signal_io_watcher, POLLIN); - } - -- lfields->inv = NULL; -- -- if (have_iou_events != 0) -- break; /* Event loop should cycle now so don't poll again. */ -+ loop->watchers[loop->nwatchers] = NULL; -+ loop->watchers[loop->nwatchers + 1] = NULL; - - if (have_signals != 0) -- break; /* Event loop should cycle now so don't poll again. */ -+ return; /* Event loop should cycle now so don't poll again. */ - - if (nevents != 0) { - if (nfds == ARRAY_SIZE(events) && --count != 0) { -@@ -1333,11 +558,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - timeout = 0; - continue; - } -- break; -+ return; - } - - if (timeout == 0) -- break; -+ return; - - if (timeout == -1) - continue; -@@ -1347,14 +572,10 @@ update_timeout: - - real_timeout -= (loop->time - base); - if (real_timeout <= 0) -- break; -+ return; - - timeout = real_timeout; - } -- -- if (ctl->ringfd != -1) -- while (*ctl->sqhead != *ctl->sqtail) -- uv__epoll_ctl_flush(epollfd, ctl, &prep); - } - - uint64_t uv__hrtime(uv_clocktype_t type) { -@@ -1867,7 +1088,7 @@ static uint64_t uv__read_uint64(const char* filename) { - if (0 == uv__slurp(filename, buf, sizeof(buf))) - if (1 != sscanf(buf, "%" PRIu64, &rc)) - if (0 == strcmp(buf, "max\n")) -- rc = UINT64_MAX; -+ rc = ~0ull; - - return rc; - } -@@ -1903,7 +1124,6 @@ static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high, - char filename[4097]; - char* p; - int n; -- uint64_t cgroup1_max; - - /* Find out where the controller is mounted. */ - p = uv__cgroup1_find_memory_controller(buf, &n); -@@ -1920,22 +1140,12 @@ static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high, - * as indicated by uv__read_uint64 returning 0. - */ - if (*high != 0 && *max != 0) -- goto update_limits; -+ return; - } - - /* Fall back to the limits of the global memory controller. */ - *high = uv__read_uint64("/sys/fs/cgroup/memory/memory.soft_limit_in_bytes"); - *max = uv__read_uint64("/sys/fs/cgroup/memory/memory.limit_in_bytes"); -- -- /* uv__read_uint64 detects cgroup2's "max", so we need to separately detect -- * cgroup1's maximum value (which is derived from LONG_MAX and PAGE_SIZE). -- */ --update_limits: -- cgroup1_max = LONG_MAX & ~(sysconf(_SC_PAGESIZE) - 1); -- if (*high == cgroup1_max) -- *high = UINT64_MAX; -- if (*max == cgroup1_max) -- *max = UINT64_MAX; - } - - static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high, -diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c -index a87c2d77faf..3954b2c2753 100644 ---- a/deps/uv/src/unix/os390.c -+++ b/deps/uv/src/unix/os390.c -@@ -808,7 +808,6 @@ static int os390_message_queue_handler(uv__os390_epoll* ep) { - - void uv__io_poll(uv_loop_t* loop, int timeout) { - static const int max_safe_timeout = 1789569; -- uv__loop_internal_fields_t* lfields; - struct epoll_event events[1024]; - struct epoll_event* pe; - struct epoll_event e; -@@ -831,8 +830,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - return; - } - -- lfields = uv__get_internal_fields(loop); -- - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - uv_stream_t* stream; - -@@ -880,7 +877,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - int nevents = 0; - have_signals = 0; - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -899,12 +896,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout) - timeout = max_safe_timeout; - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - nfds = epoll_wait(loop->ep, events, - ARRAY_SIZE(events), timeout); - -diff --git a/deps/uv/src/unix/posix-poll.c b/deps/uv/src/unix/posix-poll.c -index 7e7de86845d..711780ece8d 100644 ---- a/deps/uv/src/unix/posix-poll.c -+++ b/deps/uv/src/unix/posix-poll.c -@@ -132,7 +132,6 @@ static void uv__pollfds_del(uv_loop_t* loop, int fd) { - - - void uv__io_poll(uv_loop_t* loop, int timeout) { -- uv__loop_internal_fields_t* lfields; - sigset_t* pset; - sigset_t set; - uint64_t time_base; -@@ -153,8 +152,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - return; - } - -- lfields = uv__get_internal_fields(loop); -- - /* Take queued watchers and add their fds to our poll fds array. */ - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); -@@ -182,7 +179,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - assert(timeout >= -1); - time_base = loop->time; - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -201,12 +198,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { - if (timeout != 0) - uv__metrics_set_provider_entry_time(loop); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - if (pset != NULL) - if (pthread_sigmask(SIG_BLOCK, pset, NULL)) - abort(); -diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h -index decde5362c8..2720121addc 100644 ---- a/deps/uv/src/uv-common.h -+++ b/deps/uv/src/uv-common.h -@@ -396,37 +396,9 @@ struct uv__loop_metrics_s { - void uv__metrics_update_idle_time(uv_loop_t* loop); - void uv__metrics_set_provider_entry_time(uv_loop_t* loop); - --#ifdef __linux__ --struct uv__iou { -- uint32_t* sqhead; -- uint32_t* sqtail; -- uint32_t* sqarray; -- uint32_t sqmask; -- uint32_t* sqflags; -- uint32_t* cqhead; -- uint32_t* cqtail; -- uint32_t cqmask; -- void* sq; /* pointer to munmap() on event loop teardown */ -- void* cqe; /* pointer to array of struct uv__io_uring_cqe */ -- void* sqe; /* pointer to array of struct uv__io_uring_sqe */ -- size_t sqlen; -- size_t cqlen; -- size_t maxlen; -- size_t sqelen; -- int ringfd; -- uint32_t in_flight; --}; --#endif /* __linux__ */ -- - struct uv__loop_internal_fields_s { - unsigned int flags; - uv__loop_metrics_t loop_metrics; -- int current_timeout; --#ifdef __linux__ -- struct uv__iou ctl; -- struct uv__iou iou; -- void* inv; /* used by uv__platform_invalidate_fd() */ --#endif /* __linux__ */ - }; - - #endif /* UV_COMMON_H_ */ -diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c -index 9a3be58849a..e4041ec86a6 100644 ---- a/deps/uv/src/win/core.c -+++ b/deps/uv/src/win/core.c -@@ -424,7 +424,6 @@ int uv_backend_timeout(const uv_loop_t* loop) { - - - static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) { -- uv__loop_internal_fields_t* lfields; - DWORD bytes; - ULONG_PTR key; - OVERLAPPED* overlapped; -@@ -434,10 +433,9 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) { - uint64_t user_timeout; - int reset_timeout; - -- lfields = uv__get_internal_fields(loop); - timeout_time = loop->time + timeout; - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -452,12 +450,6 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) { - if (timeout != 0) - uv__metrics_set_provider_entry_time(loop); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - GetQueuedCompletionStatus(loop->iocp, - &bytes, - &key, -@@ -515,7 +507,6 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) { - - - static void uv__poll(uv_loop_t* loop, DWORD timeout) { -- uv__loop_internal_fields_t* lfields; - BOOL success; - uv_req_t* req; - OVERLAPPED_ENTRY overlappeds[128]; -@@ -527,10 +518,9 @@ static void uv__poll(uv_loop_t* loop, DWORD timeout) { - uint64_t actual_timeout; - int reset_timeout; - -- lfields = uv__get_internal_fields(loop); - timeout_time = loop->time + timeout; - -- if (lfields->flags & UV_METRICS_IDLE_TIME) { -+ if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) { - reset_timeout = 1; - user_timeout = timeout; - timeout = 0; -@@ -547,12 +537,6 @@ static void uv__poll(uv_loop_t* loop, DWORD timeout) { - if (timeout != 0) - uv__metrics_set_provider_entry_time(loop); - -- /* Store the current timeout in a location that's globally accessible so -- * other locations like uv__work_done() can determine whether the queue -- * of events in the callback were waiting when poll was called. -- */ -- lfields->current_timeout = timeout; -- - success = pGetQueuedCompletionStatusEx(loop->iocp, - overlappeds, - ARRAY_SIZE(overlappeds), diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.0.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.0.bb deleted file mode 100644 index cc51354786..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.0.bb +++ /dev/null @@ -1,184 +0,0 @@ -DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" -HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=78ad16dab3c1d15d4878c81770be0be7" - -CVE_PRODUCT = "nodejs node.js" - -DEPENDS = "openssl file-replacement-native python3-packaging-native" -DEPENDS:append:class-target = " qemu-native" -DEPENDS:append:class-native = " c-ares-native" - -inherit pkgconfig python3native qemu ptest - -COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" -COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" - -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" -COMPATIBLE_HOST:powerpc = "null" - -SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ - file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0004-v8-don-t-override-ARM-CFLAGS.patch \ - file://system-c-ares.patch \ - file://0001-liftoff-Correct-function-signatures.patch \ - file://0001-Revert-io_uring-changes-from-libuv-1.46.0.patch \ - file://0002-Revert-io_uring-changes-from-libuv-1.45.0.patch \ - file://run-ptest \ - " - -SRC_URI:append:class-target = " \ - file://0001-Using-native-binaries.patch \ - " -SRC_URI:append:toolchain-clang:x86 = " \ - file://libatomic.patch \ - " -SRC_URI:append:toolchain-clang:powerpc64le = " \ - file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ - " -SRC_URI[sha256sum] = "31807ebeeeb049c53f1765e4a95aed69476a4b696dd100cb539ab668d7950b40" - -S = "${WORKDIR}/node-v${PV}" - -CVE_PRODUCT += "node.js" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -def map_nodejs_arch(a, d): - import re - - if re.match('i.86$', a): return 'ia32' - elif re.match('x86_64$', a): return 'x64' - elif re.match('aarch64$', a): return 'arm64' - elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64' - elif re.match('powerpc$', a): return 'ppc' - return a - -ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -ARCHFLAGS:append:mips = " --v8-lite-mode" -ARCHFLAGS:append:mipsel = " --v8-lite-mode" -ARCHFLAGS ?= "" - -PACKAGECONFIG ??= "ares brotli icu zlib" - -PACKAGECONFIG[ares] = "--shared-cares,,c-ares" -PACKAGECONFIG[brotli] = "--shared-brotli,,brotli" -PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" -PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" -PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" -PACKAGECONFIG[shared] = "--shared" -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" - -# We don't want to cross-compile during target compile, -# and we need to use the right flags during host compile, -# too. -EXTRA_OEMAKE = "\ - CC.host='${CC} -pie -fPIE' \ - CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ - CXX.host='${CXX} -pie -fPIE' \ - CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ - LDFLAGS.host='${LDFLAGS}' \ - AR.host='${AR}' \ - \ - builddir_name=./ \ -" - -EXTRANATIVEPATH += "file-native" - -python prune_sources() { - import shutil - - shutil.rmtree(d.getVar('S') + '/deps/openssl') - if 'ares' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/cares') - if 'brotli' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/brotli') - if 'libuv' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/uv') - if 'nghttp2' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/nghttp2') - if 'zlib' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/zlib') -} -do_unpack[postfuncs] += "prune_sources" - -# V8's JIT infrastructure requires binaries such as mksnapshot and -# mkpeephole to be run in the host during the build. However, these -# binaries must have the same bit-width as the target (e.g. a x86_64 -# host targeting ARMv6 needs to produce a 32-bit binary). Instead of -# depending on a third Yocto toolchain, we just build those binaries -# for the target and run them on the host with QEMU. -python do_create_v8_qemu_wrapper () { - """Creates a small wrapper that invokes QEMU to run some target V8 binaries - on the host.""" - qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), - d.expand('${STAGING_DIR_HOST}${base_libdir}')] - qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), - qemu_libdirs) - wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') - with open(wrapper_path, 'w') as wrapper_file: - wrapper_file.write("""#!/bin/sh - -# This file has been generated automatically. -# It invokes QEMU to run binaries built for the target in the host during the -# build process. - -%s "$@" -""" % qemu_cmd) - os.chmod(wrapper_path, 0o755) -} - -do_create_v8_qemu_wrapper[dirs] = "${B}" -addtask create_v8_qemu_wrapper after do_configure before do_compile - -LDFLAGS:append:x86 = " -latomic" - -CROSS_FLAGS = "--cross-compiling" -CROSS_FLAGS:class-native = "--no-cross-compiling" - -# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi -do_configure () { - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - # $TARGET_ARCH settings don't match --dest-cpu settings - python3 configure.py --verbose --prefix=${prefix} \ - --shared-openssl \ - --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ - --dest-os=linux \ - --libdir=${baselib} \ - ${CROSS_FLAGS} \ - ${ARCHFLAGS} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf - install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR=${D} -} - -do_install_ptest () { - cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ - cp -r ${B}/test ${D}${PTEST_PATH} - chown -R root:root ${D}${PTEST_PATH} -} - -PACKAGES =+ "${PN}-npm" -FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" -RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ - python3-misc python3-multiprocessing" - -PACKAGES =+ "${PN}-systemtap" -FILES:${PN}-systemtap = "${datadir}/systemtap" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb new file mode 100644 index 0000000000..e2e2f5ae8d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb @@ -0,0 +1,183 @@ +DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" +HOMEPAGE = "http://nodejs.org" +LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=78ad16dab3c1d15d4878c81770be0be7" + +CVE_PRODUCT = "nodejs node.js" + +DEPENDS = "openssl file-replacement-native python3-packaging-native" +DEPENDS:append:class-target = " qemu-native" +DEPENDS:append:class-native = " c-ares-native" + +inherit pkgconfig python3native qemu ptest + +COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" +COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" +COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" + +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:powerpc = "null" + +SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ + file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ + file://0004-v8-don-t-override-ARM-CFLAGS.patch \ + file://system-c-ares.patch \ + file://0001-liftoff-Correct-function-signatures.patch \ + file://0001-deps-disable-io_uring-support-in-libuv.patch \ + file://run-ptest \ + " + +SRC_URI:append:class-target = " \ + file://0001-Using-native-binaries.patch \ + " +SRC_URI:append:toolchain-clang:x86 = " \ + file://libatomic.patch \ + " +SRC_URI:append:toolchain-clang:powerpc64le = " \ + file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ + " +SRC_URI[sha256sum] = "77813edbf3f7f16d2d35d3353443dee4e61d5ee84d9e3138c7538a3c0ca5209e" + +S = "${WORKDIR}/node-v${PV}" + +CVE_PRODUCT += "node.js" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +def map_nodejs_arch(a, d): + import re + + if re.match('i.86$', a): return 'ia32' + elif re.match('x86_64$', a): return 'x64' + elif re.match('aarch64$', a): return 'arm64' + elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64' + elif re.match('powerpc$', a): return 'ppc' + return a + +ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ + '--with-arm-fpu=vfp', d), d), d)}" +ARCHFLAGS:append:mips = " --v8-lite-mode" +ARCHFLAGS:append:mipsel = " --v8-lite-mode" +ARCHFLAGS ?= "" + +PACKAGECONFIG ??= "ares brotli icu zlib" + +PACKAGECONFIG[ares] = "--shared-cares,,c-ares" +PACKAGECONFIG[brotli] = "--shared-brotli,,brotli" +PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" +PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" +PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" +PACKAGECONFIG[shared] = "--shared" +PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" + +# We don't want to cross-compile during target compile, +# and we need to use the right flags during host compile, +# too. +EXTRA_OEMAKE = "\ + CC.host='${CC} -pie -fPIE' \ + CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ + CXX.host='${CXX} -pie -fPIE' \ + CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ + LDFLAGS.host='${LDFLAGS}' \ + AR.host='${AR}' \ + \ + builddir_name=./ \ +" + +EXTRANATIVEPATH += "file-native" + +python prune_sources() { + import shutil + + shutil.rmtree(d.getVar('S') + '/deps/openssl') + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares') + if 'brotli' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/brotli') + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv') + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib') +} +do_unpack[postfuncs] += "prune_sources" + +# V8's JIT infrastructure requires binaries such as mksnapshot and +# mkpeephole to be run in the host during the build. However, these +# binaries must have the same bit-width as the target (e.g. a x86_64 +# host targeting ARMv6 needs to produce a 32-bit binary). Instead of +# depending on a third Yocto toolchain, we just build those binaries +# for the target and run them on the host with QEMU. +python do_create_v8_qemu_wrapper () { + """Creates a small wrapper that invokes QEMU to run some target V8 binaries + on the host.""" + qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), + d.expand('${STAGING_DIR_HOST}${base_libdir}')] + qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), + qemu_libdirs) + wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') + with open(wrapper_path, 'w') as wrapper_file: + wrapper_file.write("""#!/bin/sh + +# This file has been generated automatically. +# It invokes QEMU to run binaries built for the target in the host during the +# build process. + +%s "$@" +""" % qemu_cmd) + os.chmod(wrapper_path, 0o755) +} + +do_create_v8_qemu_wrapper[dirs] = "${B}" +addtask create_v8_qemu_wrapper after do_configure before do_compile + +LDFLAGS:append:x86 = " -latomic" + +CROSS_FLAGS = "--cross-compiling" +CROSS_FLAGS:class-native = "--no-cross-compiling" + +# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi +do_configure () { + GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES + # $TARGET_ARCH settings don't match --dest-cpu settings + python3 configure.py --verbose --prefix=${prefix} \ + --shared-openssl \ + --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ + --dest-os=linux \ + --libdir=${baselib} \ + ${CROSS_FLAGS} \ + ${ARCHFLAGS} \ + ${PACKAGECONFIG_CONFARGS} +} + +do_compile () { + install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf + install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh + oe_runmake BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +do_install_ptest () { + cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ + cp -r ${B}/test ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH} +} + +PACKAGES =+ "${PN}-npm" +FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" +RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ + python3-misc python3-multiprocessing" + +PACKAGES =+ "${PN}-systemtap" +FILES:${PN}-systemtap = "${datadir}/systemtap" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/py3.12.patch b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/py3.12.patch deleted file mode 100644 index 732c8ff1ce..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/py3.12.patch +++ /dev/null @@ -1,2496 +0,0 @@ -From 7293cfae4fd68004901825ad1cabb83424d8729a Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Mon, 16 Oct 2023 13:35:24 +0000 -Subject: [PATCH] Bug 1857492 - Upgrade vendored version of six and urllib3 - r=saschanaz - -six -> 1.16 -urllib3 -> 1.26.17 - -Differential Revision: https://phabricator.services.mozilla.com/D190288 -Upstream-Status: Backport [https://github.com/mozilla/gecko-dev/commit/7293cfae4fd68004901825ad1cabb83424d8729a] -Signed-off-by: Alexander Kanavin ---- - third_party/python/poetry.lock | 22 +-- - third_party/python/requirements.in | 4 +- - third_party/python/requirements.txt | 12 +- - .../python/six/six-1.13.0.dist-info/RECORD | 6 - - .../LICENSE | 2 +- - .../METADATA | 9 +- - .../python/six/six-1.16.0.dist-info/RECORD | 6 + - .../six-1.16.0.dist-info}/WHEEL | 2 +- - .../top_level.txt | 0 - third_party/python/six/six.py | 91 ++++++--- - .../urllib3/urllib3-1.26.0.dist-info/RECORD | 44 ----- - .../LICENSE.txt | 0 - .../METADATA | 177 ++++++++++++++++-- - .../urllib3/urllib3-1.26.17.dist-info/RECORD | 44 +++++ - .../urllib3-1.26.17.dist-info}/WHEEL | 2 +- - .../top_level.txt | 0 - .../python/urllib3/urllib3/__init__.py | 17 ++ - .../python/urllib3/urllib3/_version.py | 2 +- - .../python/urllib3/urllib3/connection.py | 62 ++++-- - .../python/urllib3/urllib3/connectionpool.py | 97 ++++++++-- - .../contrib/_securetransport/bindings.py | 2 +- - .../contrib/_securetransport/low_level.py | 1 + - .../urllib3/urllib3/contrib/appengine.py | 4 +- - .../urllib3/urllib3/contrib/ntlmpool.py | 13 +- - .../urllib3/urllib3/contrib/pyopenssl.py | 19 +- - .../urllib3/contrib/securetransport.py | 5 +- - .../python/urllib3/urllib3/contrib/socks.py | 2 +- - .../python/urllib3/urllib3/exceptions.py | 12 +- - .../urllib3/urllib3/packages/__init__.py | 5 - - .../packages/backports/weakref_finalize.py | 155 +++++++++++++++ - .../python/urllib3/urllib3/packages/six.py | 125 +++++++++---- - .../packages/ssl_match_hostname/__init__.py | 22 --- - .../python/urllib3/urllib3/poolmanager.py | 3 +- - third_party/python/urllib3/urllib3/request.py | 21 +++ - .../python/urllib3/urllib3/response.py | 72 ++++++- - .../python/urllib3/urllib3/util/connection.py | 5 +- - .../python/urllib3/urllib3/util/proxy.py | 1 + - .../python/urllib3/urllib3/util/request.py | 5 +- - .../python/urllib3/urllib3/util/retry.py | 37 +++- - .../python/urllib3/urllib3/util/ssl_.py | 53 ++++-- - .../ssl_match_hostname.py} | 15 +- - .../urllib3/urllib3/util/ssltransport.py | 6 +- - .../python/urllib3/urllib3/util/timeout.py | 9 +- - .../python/urllib3/urllib3/util/url.py | 17 +- - .../python/urllib3/urllib3/util/wait.py | 1 - - 45 files changed, 934 insertions(+), 275 deletions(-) - delete mode 100644 third_party/python/six/six-1.13.0.dist-info/RECORD - rename third_party/python/six/{six-1.13.0.dist-info => six-1.16.0.dist-info}/LICENSE (96%) - rename third_party/python/six/{six-1.13.0.dist-info => six-1.16.0.dist-info}/METADATA (85%) - create mode 100644 third_party/python/six/six-1.16.0.dist-info/RECORD - rename third_party/python/{urllib3/urllib3-1.26.0.dist-info => six/six-1.16.0.dist-info}/WHEEL (70%) - rename third_party/python/six/{six-1.13.0.dist-info => six-1.16.0.dist-info}/top_level.txt (100%) - delete mode 100644 third_party/python/urllib3/urllib3-1.26.0.dist-info/RECORD - rename third_party/python/urllib3/{urllib3-1.26.0.dist-info => urllib3-1.26.17.dist-info}/LICENSE.txt (100%) - rename third_party/python/urllib3/{urllib3-1.26.0.dist-info => urllib3-1.26.17.dist-info}/METADATA (86%) - create mode 100644 third_party/python/urllib3/urllib3-1.26.17.dist-info/RECORD - rename third_party/python/{six/six-1.13.0.dist-info => urllib3/urllib3-1.26.17.dist-info}/WHEEL (70%) - rename third_party/python/urllib3/{urllib3-1.26.0.dist-info => urllib3-1.26.17.dist-info}/top_level.txt (100%) - create mode 100644 third_party/python/urllib3/urllib3/packages/backports/weakref_finalize.py - delete mode 100644 third_party/python/urllib3/urllib3/packages/ssl_match_hostname/__init__.py - rename third_party/python/urllib3/urllib3/{packages/ssl_match_hostname/_implementation.py => util/ssl_match_hostname.py} (92%) - -diff --git a/third_party/python/poetry.lock b/third_party/python/poetry.lock -index 3d50174e58bcb..b4a8455d20fb4 100644 ---- a/third_party/python/poetry.lock -+++ b/third_party/python/poetry.lock -@@ -1333,14 +1333,14 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( - - [[package]] - name = "six" --version = "1.13.0" -+version = "1.16.0" - description = "Python 2 and 3 compatibility utilities" - category = "main" - optional = false --python-versions = ">=2.6, !=3.0.*, !=3.1.*" -+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" - files = [ -- {file = "six-1.13.0-py2.py3-none-any.whl", hash = "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd"}, -- {file = "six-1.13.0.tar.gz", hash = "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"}, -+ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, -+ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, - ] - - [[package]] -@@ -1491,19 +1491,19 @@ files = [ - - [[package]] - name = "urllib3" --version = "1.26.0" -+version = "1.26.17" - description = "HTTP library with thread-safe connection pooling, file post, and more." - category = "main" - optional = false --python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" - files = [ -- {file = "urllib3-1.26.0-py2.py3-none-any.whl", hash = "sha256:bad31cb622ceee0ab46c4c884cf61957def0ff2e644de0a7a093678844c9ccac"}, -- {file = "urllib3-1.26.0.tar.gz", hash = "sha256:4849f132941d68144df0a3785ccc4fe423430ba5db0108d045c8cadbc90f517a"}, -+ {file = "urllib3-1.26.17-py2.py3-none-any.whl", hash = "sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b"}, -+ {file = "urllib3-1.26.17.tar.gz", hash = "sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21"}, - ] - - [package.extras] --brotli = ["brotlipy (>=0.6.0)"] --secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)"] -+brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -+secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] - socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - - [[package]] -diff --git a/third_party/python/six/six-1.13.0.dist-info/RECORD b/third_party/python/six/six-1.13.0.dist-info/RECORD -deleted file mode 100644 -index a0e6c1fd4bd99..0000000000000 ---- a/third_party/python/six/six-1.13.0.dist-info/RECORD -+++ /dev/null -@@ -1,6 +0,0 @@ --six.py,sha256=bsEzSFTZTx49wQttLORmSZTrpjGc8UbXt-HBa_LZX7Q,33045 --six-1.13.0.dist-info/LICENSE,sha256=t1KbjAcXGniow2wyg5BVKOSBKUXZd9El65JujMvyRbY,1066 --six-1.13.0.dist-info/METADATA,sha256=hxS4rSPRfO8ewbcLS30anoFi6LFgUQ3mk_xknZ8RV4w,1940 --six-1.13.0.dist-info/WHEEL,sha256=8zNYZbwQSXoB9IfXOjPfeNwvAsALAjffgk27FqvCWbo,110 --six-1.13.0.dist-info/top_level.txt,sha256=_iVH_iYEtEXnD8nYGQYpYFUvkUW9sEO1GYbkeKSAais,4 --six-1.13.0.dist-info/RECORD,, -diff --git a/third_party/python/six/six-1.13.0.dist-info/LICENSE b/third_party/python/six/six-1.16.0.dist-info/LICENSE -similarity index 96% -rename from third_party/python/six/six-1.13.0.dist-info/LICENSE -rename to third_party/python/six/six-1.16.0.dist-info/LICENSE -index 4b05a545261c0..de6633112c1f9 100644 ---- a/third_party/python/six/six-1.13.0.dist-info/LICENSE -+++ b/third_party/python/six/six-1.16.0.dist-info/LICENSE -@@ -1,4 +1,4 @@ --Copyright (c) 2010-2019 Benjamin Peterson -+Copyright (c) 2010-2020 Benjamin Peterson - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in -diff --git a/third_party/python/six/six-1.13.0.dist-info/METADATA b/third_party/python/six/six-1.16.0.dist-info/METADATA -similarity index 85% -rename from third_party/python/six/six-1.13.0.dist-info/METADATA -rename to third_party/python/six/six-1.16.0.dist-info/METADATA -index b0c8f51e1f366..6d7525c2ebcfe 100644 ---- a/third_party/python/six/six-1.13.0.dist-info/METADATA -+++ b/third_party/python/six/six-1.16.0.dist-info/METADATA -@@ -1,6 +1,6 @@ - Metadata-Version: 2.1 - Name: six --Version: 1.13.0 -+Version: 1.16.0 - Summary: Python 2 and 3 compatibility utilities - Home-page: https://github.com/benjaminp/six - Author: Benjamin Peterson -@@ -14,7 +14,7 @@ Classifier: Intended Audience :: Developers - Classifier: License :: OSI Approved :: MIT License - Classifier: Topic :: Software Development :: Libraries - Classifier: Topic :: Utilities --Requires-Python: >=2.6, !=3.0.*, !=3.1.* -+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.* - - .. image:: https://img.shields.io/pypi/v/six.svg - :target: https://pypi.org/project/six/ -@@ -37,7 +37,7 @@ for smoothing over the differences between the Python versions with the goal of - writing Python code that is compatible on both Python versions. See the - documentation for more information on what is provided. - --Six supports every Python version since 2.6. It is contained in only one Python -+Six supports Python 2.7 and 3.3+. It is contained in only one Python - file, so it can be easily copied into your project. (The copyright and license - notice must be retained.) - -@@ -46,7 +46,4 @@ Online documentation is at https://six.readthedocs.io/. - Bugs can be reported to https://github.com/benjaminp/six. The code can also - be found there. - --For questions about six or porting in general, email the python-porting mailing --list: https://mail.python.org/mailman/listinfo/python-porting -- - -diff --git a/third_party/python/six/six-1.16.0.dist-info/RECORD b/third_party/python/six/six-1.16.0.dist-info/RECORD -new file mode 100644 -index 0000000000000..8de4af79fae0b ---- /dev/null -+++ b/third_party/python/six/six-1.16.0.dist-info/RECORD -@@ -0,0 +1,6 @@ -+six.py,sha256=TOOfQi7nFGfMrIvtdr6wX4wyHH8M7aknmuLfo2cBBrM,34549 -+six-1.16.0.dist-info/LICENSE,sha256=i7hQxWWqOJ_cFvOkaWWtI9gq3_YPI5P8J2K2MYXo5sk,1066 -+six-1.16.0.dist-info/METADATA,sha256=VQcGIFCAEmfZcl77E5riPCN4v2TIsc_qtacnjxKHJoI,1795 -+six-1.16.0.dist-info/WHEEL,sha256=Z-nyYpwrcSqxfdux5Mbn_DQ525iP7J2DG3JgGvOYyTQ,110 -+six-1.16.0.dist-info/top_level.txt,sha256=_iVH_iYEtEXnD8nYGQYpYFUvkUW9sEO1GYbkeKSAais,4 -+six-1.16.0.dist-info/RECORD,, -diff --git a/third_party/python/urllib3/urllib3-1.26.0.dist-info/WHEEL b/third_party/python/six/six-1.16.0.dist-info/WHEEL -similarity index 70% -rename from third_party/python/urllib3/urllib3-1.26.0.dist-info/WHEEL -rename to third_party/python/six/six-1.16.0.dist-info/WHEEL -index 6d38aa0601b31..01b8fc7d4a10c 100644 ---- a/third_party/python/urllib3/urllib3-1.26.0.dist-info/WHEEL -+++ b/third_party/python/six/six-1.16.0.dist-info/WHEEL -@@ -1,5 +1,5 @@ - Wheel-Version: 1.0 --Generator: bdist_wheel (0.35.1) -+Generator: bdist_wheel (0.36.2) - Root-Is-Purelib: true - Tag: py2-none-any - Tag: py3-none-any -diff --git a/third_party/python/six/six-1.13.0.dist-info/top_level.txt b/third_party/python/six/six-1.16.0.dist-info/top_level.txt -similarity index 100% -rename from third_party/python/six/six-1.13.0.dist-info/top_level.txt -rename to third_party/python/six/six-1.16.0.dist-info/top_level.txt -diff --git a/third_party/python/six/six.py b/third_party/python/six/six.py -index 357e624abc6c9..4e15675d8b5ca 100644 ---- a/third_party/python/six/six.py -+++ b/third_party/python/six/six.py -@@ -1,4 +1,4 @@ --# Copyright (c) 2010-2019 Benjamin Peterson -+# Copyright (c) 2010-2020 Benjamin Peterson - # - # Permission is hereby granted, free of charge, to any person obtaining a copy - # of this software and associated documentation files (the "Software"), to deal -@@ -29,7 +29,7 @@ - import types - - __author__ = "Benjamin Peterson " --__version__ = "1.13.0" -+__version__ = "1.16.0" - - - # Useful for very coarse version differentiation. -@@ -71,6 +71,11 @@ def __len__(self): - MAXSIZE = int((1 << 63) - 1) - del X - -+if PY34: -+ from importlib.util import spec_from_loader -+else: -+ spec_from_loader = None -+ - - def _add_doc(func, doc): - """Add documentation to a function.""" -@@ -186,6 +191,11 @@ def find_module(self, fullname, path=None): - return self - return None - -+ def find_spec(self, fullname, path, target=None): -+ if fullname in self.known_modules: -+ return spec_from_loader(fullname, self) -+ return None -+ - def __get_module(self, fullname): - try: - return self.known_modules[fullname] -@@ -223,6 +233,12 @@ def get_code(self, fullname): - return None - get_source = get_code # same as get_code - -+ def create_module(self, spec): -+ return self.load_module(spec.name) -+ -+ def exec_module(self, module): -+ pass -+ - _importer = _SixMetaPathImporter(__name__) - - -@@ -259,7 +275,7 @@ class _MovedItems(_LazyModule): - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"), -- MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), -+ MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), -@@ -644,9 +660,11 @@ def u(s): - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -+ _assertNotRegex = "assertNotRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" -+ _assertNotRegex = "assertNotRegex" - else: - def b(s): - return s -@@ -668,6 +686,7 @@ def indexbytes(buf, i): - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -+ _assertNotRegex = "assertNotRegexpMatches" - _add_doc(b, """Byte literal""") - _add_doc(u, """Text literal""") - -@@ -684,6 +703,10 @@ def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -+def assertNotRegex(self, *args, **kwargs): -+ return getattr(self, _assertNotRegex)(*args, **kwargs) -+ -+ - if PY3: - exec_ = getattr(moves.builtins, "exec") - -@@ -719,16 +742,7 @@ def exec_(_code_, _globs_=None, _locs_=None): - """) - - --if sys.version_info[:2] == (3, 2): -- exec_("""def raise_from(value, from_value): -- try: -- if from_value is None: -- raise value -- raise value from from_value -- finally: -- value = None --""") --elif sys.version_info[:2] > (3, 2): -+if sys.version_info[:2] > (3,): - exec_("""def raise_from(value, from_value): - try: - raise value from from_value -@@ -808,13 +822,33 @@ def print_(*args, **kwargs): - _add_doc(reraise, """Reraise an exception.""") - - if sys.version_info[0:2] < (3, 4): -+ # This does exactly the same what the :func:`py3:functools.update_wrapper` -+ # function does on Python versions after 3.2. It sets the ``__wrapped__`` -+ # attribute on ``wrapper`` object and it doesn't raise an error if any of -+ # the attributes mentioned in ``assigned`` and ``updated`` are missing on -+ # ``wrapped`` object. -+ def _update_wrapper(wrapper, wrapped, -+ assigned=functools.WRAPPER_ASSIGNMENTS, -+ updated=functools.WRAPPER_UPDATES): -+ for attr in assigned: -+ try: -+ value = getattr(wrapped, attr) -+ except AttributeError: -+ continue -+ else: -+ setattr(wrapper, attr, value) -+ for attr in updated: -+ getattr(wrapper, attr).update(getattr(wrapped, attr, {})) -+ wrapper.__wrapped__ = wrapped -+ return wrapper -+ _update_wrapper.__doc__ = functools.update_wrapper.__doc__ -+ - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): -- def wrapper(f): -- f = functools.wraps(wrapped, assigned, updated)(f) -- f.__wrapped__ = wrapped -- return f -- return wrapper -+ return functools.partial(_update_wrapper, wrapped=wrapped, -+ assigned=assigned, updated=updated) -+ wraps.__doc__ = functools.wraps.__doc__ -+ - else: - wraps = functools.wraps - -@@ -872,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', errors='strict'): - - `str` -> encoded to `bytes` - - `bytes` -> `bytes` - """ -+ if isinstance(s, binary_type): -+ return s - if isinstance(s, text_type): - return s.encode(encoding, errors) -- elif isinstance(s, binary_type): -- return s -- else: -- raise TypeError("not expecting type '%s'" % type(s)) -+ raise TypeError("not expecting type '%s'" % type(s)) - - - def ensure_str(s, encoding='utf-8', errors='strict'): -@@ -891,12 +924,15 @@ def ensure_str(s, encoding='utf-8', errors='strict'): - - `str` -> `str` - - `bytes` -> decoded to `str` - """ -- if not isinstance(s, (text_type, binary_type)): -- raise TypeError("not expecting type '%s'" % type(s)) -+ # Optimization: Fast return for the common case. -+ if type(s) is str: -+ return s - if PY2 and isinstance(s, text_type): -- s = s.encode(encoding, errors) -+ return s.encode(encoding, errors) - elif PY3 and isinstance(s, binary_type): -- s = s.decode(encoding, errors) -+ return s.decode(encoding, errors) -+ elif not isinstance(s, (text_type, binary_type)): -+ raise TypeError("not expecting type '%s'" % type(s)) - return s - - -@@ -919,10 +955,9 @@ def ensure_text(s, encoding='utf-8', errors='strict'): - raise TypeError("not expecting type '%s'" % type(s)) - - -- - def python_2_unicode_compatible(klass): - """ -- A decorator that defines __unicode__ and __str__ methods under Python 2. -+ A class decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method -diff --git a/third_party/python/urllib3/urllib3-1.26.0.dist-info/RECORD b/third_party/python/urllib3/urllib3-1.26.0.dist-info/RECORD -deleted file mode 100644 -index ec9088a111a41..0000000000000 ---- a/third_party/python/urllib3/urllib3-1.26.0.dist-info/RECORD -+++ /dev/null -@@ -1,44 +0,0 @@ --urllib3/__init__.py,sha256=j3yzHIbmW7CS-IKQJ9-PPQf_YKO8EOAey_rMW0UR7us,2763 --urllib3/_collections.py,sha256=Rp1mVyBgc_UlAcp6M3at1skJBXR5J43NawRTvW2g_XY,10811 --urllib3/_version.py,sha256=H0vLQ8PY350EPZlZQa8ri0tEjVS-xhGdQOHcU360-0A,63 --urllib3/connection.py,sha256=BdaUSNpGzO0zq28i9MhOXb6QZspeVdVrYtjnkk2Eqg4,18396 --urllib3/connectionpool.py,sha256=IKoeuJZY9YAYm0GK4q-MXAhyXW0M_FnvabYaNsDIR-E,37133 --urllib3/exceptions.py,sha256=lNrKC5J8zeBXIu9SSKSNb7cLi8iXl9ARu9DHD2SflZM,7810 --urllib3/fields.py,sha256=kvLDCg_JmH1lLjUUEY_FLS8UhY7hBvDPuVETbY8mdrM,8579 --urllib3/filepost.py,sha256=5b_qqgRHVlL7uLtdAYBzBh-GHmU5AfJVt_2N0XS3PeY,2440 --urllib3/poolmanager.py,sha256=whzlX6UTEgODMOCy0ZDMUONRBCz5wyIM8Z9opXAY-Lk,19763 --urllib3/request.py,sha256=ZFSIqX0C6WizixecChZ3_okyu7BEv0lZu1VT0s6h4SM,5985 --urllib3/response.py,sha256=hGhGBh7TkEkh_IQg5C1W_xuPNrgIKv5BUXPyE-q0LuE,28203 --urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 --urllib3/contrib/_appengine_environ.py,sha256=bDbyOEhW2CKLJcQqAKAyrEHN-aklsyHFKq6vF8ZFsmk,957 --urllib3/contrib/appengine.py,sha256=7Pxb0tKfDB_LTGPERiswH0qomhDoUUOo5kwybAKLQyE,11010 --urllib3/contrib/ntlmpool.py,sha256=6I95h1_71fzxmoMSNtY0gB8lnyCoVtP_DpqFGj14fdU,4160 --urllib3/contrib/pyopenssl.py,sha256=vgh6j52w9xgwq-3R2kfB5M2JblQATJfKAK3lIAc1kSg,16778 --urllib3/contrib/securetransport.py,sha256=KxGPZk8d4YepWm7Rc-SBt1XrzIfnLKc8JkUVV75XzgE,34286 --urllib3/contrib/socks.py,sha256=DcRjM2l0rQMIyhYrN6r-tnVkY6ZTDxHJlM8_usAkGCA,7097 --urllib3/contrib/_securetransport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 --urllib3/contrib/_securetransport/bindings.py,sha256=E1_7ScsgOchfxneozbAueK7ziCwF35fna4DuDCYJ9_o,17637 --urllib3/contrib/_securetransport/low_level.py,sha256=lgIdsSycqfB0Xm5BiJzXGeIKT7ybCQMFPJAgkcwPa1s,13908 --urllib3/packages/__init__.py,sha256=h4BLhD4tLaBx1adaDtKXfupsgqY0wWLXb_f1_yVlV6A,108 --urllib3/packages/six.py,sha256=adx4z-eM_D0Vvu0IIqVzFACQ_ux9l64y7DkSEfbxCDs,32536 --urllib3/packages/backports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 --urllib3/packages/backports/makefile.py,sha256=nbzt3i0agPVP07jqqgjhaYjMmuAi_W5E0EywZivVO8E,1417 --urllib3/packages/ssl_match_hostname/__init__.py,sha256=zppezdEQdpGsYerI6mV6MfUYy495JV4mcOWC_GgbljU,757 --urllib3/packages/ssl_match_hostname/_implementation.py,sha256=6dZ-q074g7XhsJ27MFCgkct8iVNZB3sMZvKhf-KUVy0,5679 --urllib3/util/__init__.py,sha256=JEmSmmqqLyaw8P51gUImZh8Gwg9i1zSe-DoqAitn2nc,1155 --urllib3/util/connection.py,sha256=21B-LX0c8fkxPDssyHCaK0pCnmrKmhltg5EoouHiAPU,4910 --urllib3/util/proxy.py,sha256=FGipAEnvZteyldXNjce4DEB7YzwU-a5lep8y5S0qHQg,1604 --urllib3/util/queue.py,sha256=nRgX8_eX-_VkvxoX096QWoz8Ps0QHUAExILCY_7PncM,498 --urllib3/util/request.py,sha256=NnzaEKQ1Pauw5MFMV6HmgEMHITf0Aua9fQuzi2uZzGc,4123 --urllib3/util/response.py,sha256=GJpg3Egi9qaJXRwBh5wv-MNuRWan5BIu40oReoxWP28,3510 --urllib3/util/retry.py,sha256=tn168HDMUynFmXRP-uVaLRUOlbTEJikoB1RuZdwfCes,21366 --urllib3/util/ssl_.py,sha256=cUsmU604z2zAOZcaXDpINXOokQ1RtlJMe96TBDkaJp0,16199 --urllib3/util/ssltransport.py,sha256=IvGQvs9YWkf4jzfqVjTu_UWjwAUgPn5ActajW8VLz6A,6908 --urllib3/util/timeout.py,sha256=QSbBUNOB9yh6AnDn61SrLQ0hg5oz0I9-uXEG91AJuIg,10003 --urllib3/util/url.py,sha256=LWfLSlI4l2FmUMKfCkElCaW10-0N-sJDT9bxaDZJkjs,13964 --urllib3/util/wait.py,sha256=3MUKRSAUJDB2tgco7qRUskW0zXGAWYvRRE4Q1_6xlLs,5404 --urllib3-1.26.0.dist-info/LICENSE.txt,sha256=w3vxhuJ8-dvpYZ5V7f486nswCRzrPaY8fay-Dm13kHs,1115 --urllib3-1.26.0.dist-info/METADATA,sha256=Wghdt6nLf9HfZHhWj8Dpgz4n9vGRqXYhdIwJRPgki6M,42629 --urllib3-1.26.0.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110 --urllib3-1.26.0.dist-info/top_level.txt,sha256=EMiXL2sKrTcmrMxIHTqdc3ET54pQI2Y072LexFEemvo,8 --urllib3-1.26.0.dist-info/RECORD,, -diff --git a/third_party/python/urllib3/urllib3-1.26.0.dist-info/LICENSE.txt b/third_party/python/urllib3/urllib3-1.26.17.dist-info/LICENSE.txt -similarity index 100% -rename from third_party/python/urllib3/urllib3-1.26.0.dist-info/LICENSE.txt -rename to third_party/python/urllib3/urllib3-1.26.17.dist-info/LICENSE.txt -diff --git a/third_party/python/urllib3/urllib3-1.26.0.dist-info/METADATA b/third_party/python/urllib3/urllib3-1.26.17.dist-info/METADATA -similarity index 86% -rename from third_party/python/urllib3/urllib3-1.26.0.dist-info/METADATA -rename to third_party/python/urllib3/urllib3-1.26.17.dist-info/METADATA -index 39869aafada8a..9493faee66c01 100644 ---- a/third_party/python/urllib3/urllib3-1.26.0.dist-info/METADATA -+++ b/third_party/python/urllib3/urllib3-1.26.17.dist-info/METADATA -@@ -1,6 +1,6 @@ - Metadata-Version: 2.1 - Name: urllib3 --Version: 1.26.0 -+Version: 1.26.17 - Summary: HTTP library with thread-safe connection pooling, file post, and more. - Home-page: https://urllib3.readthedocs.io/ - Author: Andrey Petrov -@@ -10,7 +10,6 @@ Project-URL: Documentation, https://urllib3.readthedocs.io/ - Project-URL: Code, https://github.com/urllib3/urllib3 - Project-URL: Issue tracker, https://github.com/urllib3/urllib3/issues - Keywords: urllib httplib threadsafe filepost http https ssl pooling --Platform: UNKNOWN - Classifier: Environment :: Web Environment - Classifier: Intended Audience :: Developers - Classifier: License :: OSI Approved :: MIT License -@@ -19,27 +18,33 @@ Classifier: Programming Language :: Python - Classifier: Programming Language :: Python :: 2 - Classifier: Programming Language :: Python :: 2.7 - Classifier: Programming Language :: Python :: 3 --Classifier: Programming Language :: Python :: 3.5 - Classifier: Programming Language :: Python :: 3.6 - Classifier: Programming Language :: Python :: 3.7 - Classifier: Programming Language :: Python :: 3.8 - Classifier: Programming Language :: Python :: 3.9 -+Classifier: Programming Language :: Python :: 3.10 -+Classifier: Programming Language :: Python :: 3.11 - Classifier: Programming Language :: Python :: Implementation :: CPython - Classifier: Programming Language :: Python :: Implementation :: PyPy - Classifier: Topic :: Internet :: WWW/HTTP - Classifier: Topic :: Software Development :: Libraries --Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4 -+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.* - Description-Content-Type: text/x-rst -+License-File: LICENSE.txt - Provides-Extra: brotli --Requires-Dist: brotlipy (>=0.6.0) ; extra == 'brotli' -+Requires-Dist: brotlicffi >=0.8.0 ; ((os_name != "nt" or python_version >= "3") and platform_python_implementation != "CPython") and extra == 'brotli' -+Requires-Dist: brotli ==1.0.9 ; (os_name != "nt" and python_version < "3" and platform_python_implementation == "CPython") and extra == 'brotli' -+Requires-Dist: brotlipy >=0.6.0 ; (os_name == "nt" and python_version < "3") and extra == 'brotli' -+Requires-Dist: brotli >=1.0.9 ; (python_version >= "3" and platform_python_implementation == "CPython") and extra == 'brotli' - Provides-Extra: secure --Requires-Dist: pyOpenSSL (>=0.14) ; extra == 'secure' --Requires-Dist: cryptography (>=1.3.4) ; extra == 'secure' --Requires-Dist: idna (>=2.0.0) ; extra == 'secure' -+Requires-Dist: pyOpenSSL >=0.14 ; extra == 'secure' -+Requires-Dist: cryptography >=1.3.4 ; extra == 'secure' -+Requires-Dist: idna >=2.0.0 ; extra == 'secure' - Requires-Dist: certifi ; extra == 'secure' -+Requires-Dist: urllib3-secure-extra ; extra == 'secure' - Requires-Dist: ipaddress ; (python_version == "2.7") and extra == 'secure' - Provides-Extra: socks --Requires-Dist: PySocks (!=1.5.7,<2.0,>=1.5.6) ; extra == 'socks' -+Requires-Dist: PySocks !=1.5.7,<2.0,>=1.5.6 ; extra == 'socks' - - - urllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the -@@ -78,8 +83,10 @@ urllib3 can be installed with `pip `_:: - - Alternatively, you can grab the latest source code from `GitHub `_:: - -- $ git clone git://github.com/urllib3/urllib3.git -- $ python setup.py install -+ $ git clone https://github.com/urllib3/urllib3.git -+ $ cd urllib3 -+ $ git checkout 1.26.x -+ $ pip install . - - - Documentation -@@ -148,6 +155,152 @@ For Enterprise - Changes - ======= - -+1.26.17 (2023-10-02) -+-------------------- -+ -+* Added the ``Cookie`` header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via ``Retry.remove_headers_on_redirect``. -+ -+ -+1.26.16 (2023-05-23) -+-------------------- -+ -+* Fixed thread-safety issue where accessing a ``PoolManager`` with many distinct origins -+ would cause connection pools to be closed while requests are in progress (`#2954 `_) -+ -+ -+1.26.15 (2023-03-10) -+-------------------- -+ -+* Fix socket timeout value when ``HTTPConnection`` is reused (`#2645 `__) -+* Remove "!" character from the unreserved characters in IPv6 Zone ID parsing -+ (`#2899 `__) -+* Fix IDNA handling of '\x80' byte (`#2901 `__) -+ -+1.26.14 (2023-01-11) -+-------------------- -+ -+* Fixed parsing of port 0 (zero) returning None, instead of 0. (`#2850 `__) -+* Removed deprecated getheaders() calls in contrib module. -+ -+1.26.13 (2022-11-23) -+-------------------- -+ -+* Deprecated the ``HTTPResponse.getheaders()`` and ``HTTPResponse.getheader()`` methods. -+* Fixed an issue where parsing a URL with leading zeroes in the port would be rejected -+ even when the port number after removing the zeroes was valid. -+* Fixed a deprecation warning when using cryptography v39.0.0. -+* Removed the ``<4`` in the ``Requires-Python`` packaging metadata field. -+ -+ -+1.26.12 (2022-08-22) -+-------------------- -+ -+* Deprecated the `urllib3[secure]` extra and the `urllib3.contrib.pyopenssl` module. -+ Both will be removed in v2.x. See this `GitHub issue `_ -+ for justification and info on how to migrate. -+ -+ -+1.26.11 (2022-07-25) -+-------------------- -+ -+* Fixed an issue where reading more than 2 GiB in a call to ``HTTPResponse.read`` would -+ raise an ``OverflowError`` on Python 3.9 and earlier. -+ -+ -+1.26.10 (2022-07-07) -+-------------------- -+ -+* Removed support for Python 3.5 -+* Fixed an issue where a ``ProxyError`` recommending configuring the proxy as HTTP -+ instead of HTTPS could appear even when an HTTPS proxy wasn't configured. -+ -+ -+1.26.9 (2022-03-16) -+------------------- -+ -+* Changed ``urllib3[brotli]`` extra to favor installing Brotli libraries that are still -+ receiving updates like ``brotli`` and ``brotlicffi`` instead of ``brotlipy``. -+ This change does not impact behavior of urllib3, only which dependencies are installed. -+* Fixed a socket leaking when ``HTTPSConnection.connect()`` raises an exception. -+* Fixed ``server_hostname`` being forwarded from ``PoolManager`` to ``HTTPConnectionPool`` -+ when requesting an HTTP URL. Should only be forwarded when requesting an HTTPS URL. -+ -+ -+1.26.8 (2022-01-07) -+------------------- -+ -+* Added extra message to ``urllib3.exceptions.ProxyError`` when urllib3 detects that -+ a proxy is configured to use HTTPS but the proxy itself appears to only use HTTP. -+* Added a mention of the size of the connection pool when discarding a connection due to the pool being full. -+* Added explicit support for Python 3.11. -+* Deprecated the ``Retry.MAX_BACKOFF`` class property in favor of ``Retry.DEFAULT_MAX_BACKOFF`` -+ to better match the rest of the default parameter names. ``Retry.MAX_BACKOFF`` is removed in v2.0. -+* Changed location of the vendored ``ssl.match_hostname`` function from ``urllib3.packages.ssl_match_hostname`` -+ to ``urllib3.util.ssl_match_hostname`` to ensure Python 3.10+ compatibility after being repackaged -+ by downstream distributors. -+* Fixed absolute imports, all imports are now relative. -+ -+ -+1.26.7 (2021-09-22) -+------------------- -+ -+* Fixed a bug with HTTPS hostname verification involving IP addresses and lack -+ of SNI. (Issue #2400) -+* Fixed a bug where IPv6 braces weren't stripped during certificate hostname -+ matching. (Issue #2240) -+ -+ -+1.26.6 (2021-06-25) -+------------------- -+ -+* Deprecated the ``urllib3.contrib.ntlmpool`` module. urllib3 is not able to support -+ it properly due to `reasons listed in this issue `_. -+ If you are a user of this module please leave a comment. -+* Changed ``HTTPConnection.request_chunked()`` to not erroneously emit multiple -+ ``Transfer-Encoding`` headers in the case that one is already specified. -+* Fixed typo in deprecation message to recommend ``Retry.DEFAULT_ALLOWED_METHODS``. -+ -+ -+1.26.5 (2021-05-26) -+------------------- -+ -+* Fixed deprecation warnings emitted in Python 3.10. -+* Updated vendored ``six`` library to 1.16.0. -+* Improved performance of URL parser when splitting -+ the authority component. -+ -+ -+1.26.4 (2021-03-15) -+------------------- -+ -+* Changed behavior of the default ``SSLContext`` when connecting to HTTPS proxy -+ during HTTPS requests. The default ``SSLContext`` now sets ``check_hostname=True``. -+ -+ -+1.26.3 (2021-01-26) -+------------------- -+ -+* Fixed bytes and string comparison issue with headers (Pull #2141) -+ -+* Changed ``ProxySchemeUnknown`` error message to be -+ more actionable if the user supplies a proxy URL without -+ a scheme. (Pull #2107) -+ -+ -+1.26.2 (2020-11-12) -+------------------- -+ -+* Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't -+ be imported properly on Python 2.7.8 and earlier (Pull #2052) -+ -+ -+1.26.1 (2020-11-11) -+------------------- -+ -+* Fixed an issue where two ``User-Agent`` headers would be sent if a -+ ``User-Agent`` header key is passed as ``bytes`` (Pull #2047) -+ -+ - 1.26.0 (2020-11-10) - ------------------- - -@@ -1331,5 +1484,3 @@ Changes - ---------------- - - * First release. -- -- -diff --git a/third_party/python/urllib3/urllib3-1.26.17.dist-info/RECORD b/third_party/python/urllib3/urllib3-1.26.17.dist-info/RECORD -new file mode 100644 -index 0000000000000..1afc6580589c0 ---- /dev/null -+++ b/third_party/python/urllib3/urllib3-1.26.17.dist-info/RECORD -@@ -0,0 +1,44 @@ -+urllib3/__init__.py,sha256=iXLcYiJySn0GNbWOOZDDApgBL1JgP44EZ8i1760S8Mc,3333 -+urllib3/_collections.py,sha256=Rp1mVyBgc_UlAcp6M3at1skJBXR5J43NawRTvW2g_XY,10811 -+urllib3/_version.py,sha256=azoM7M7BUADl2kBhMVR6PPf2GhBDI90me1fcnzTwdcw,64 -+urllib3/connection.py,sha256=92k9td_y4PEiTIjNufCUa1NzMB3J3w0LEdyokYgXnW8,20300 -+urllib3/connectionpool.py,sha256=ItVDasDnPRPP9R8bNxY7tPBlC724nJ9nlxVgXG_SLbI,39990 -+urllib3/exceptions.py,sha256=0Mnno3KHTNfXRfY7638NufOPkUb6mXOm-Lqj-4x2w8A,8217 -+urllib3/fields.py,sha256=kvLDCg_JmH1lLjUUEY_FLS8UhY7hBvDPuVETbY8mdrM,8579 -+urllib3/filepost.py,sha256=5b_qqgRHVlL7uLtdAYBzBh-GHmU5AfJVt_2N0XS3PeY,2440 -+urllib3/poolmanager.py,sha256=0i8cJgrqupza67IBPZ_u9jXvnSxr5UBlVEiUqdkPtYI,19752 -+urllib3/request.py,sha256=YTWFNr7QIwh7E1W9dde9LM77v2VWTJ5V78XuTTw7D1A,6691 -+urllib3/response.py,sha256=UPgLmnHj4z71ZnH8ivYOyncATifTOw9FQukUqDnckCc,30761 -+urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -+urllib3/contrib/_appengine_environ.py,sha256=bDbyOEhW2CKLJcQqAKAyrEHN-aklsyHFKq6vF8ZFsmk,957 -+urllib3/contrib/appengine.py,sha256=6IBW6lPOoVUxASPwtn6IH1AATe5DK3lLJCfwyWlLKAE,11012 -+urllib3/contrib/ntlmpool.py,sha256=NlfkW7WMdW8ziqudopjHoW299og1BTWi0IeIibquFwk,4528 -+urllib3/contrib/pyopenssl.py,sha256=4AJAlo9NmjWofY4dJwRa4kbZuRuHfNJxu8Pv6yQk1ss,17055 -+urllib3/contrib/securetransport.py,sha256=QOhVbWrFQTKbmV-vtyG69amekkKVxXkdjk9oymaO0Ag,34416 -+urllib3/contrib/socks.py,sha256=aRi9eWXo9ZEb95XUxef4Z21CFlnnjbEiAo9HOseoMt4,7097 -+urllib3/contrib/_securetransport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -+urllib3/contrib/_securetransport/bindings.py,sha256=4Xk64qIkPBt09A5q-RIFUuDhNc9mXilVapm7WnYnzRw,17632 -+urllib3/contrib/_securetransport/low_level.py,sha256=B2JBB2_NRP02xK6DCa1Pa9IuxrPwxzDzZbixQkb7U9M,13922 -+urllib3/packages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -+urllib3/packages/six.py,sha256=b9LM0wBXv7E7SrbCjAm4wwN-hrH-iNxv18LgWNMMKPo,34665 -+urllib3/packages/backports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -+urllib3/packages/backports/makefile.py,sha256=nbzt3i0agPVP07jqqgjhaYjMmuAi_W5E0EywZivVO8E,1417 -+urllib3/packages/backports/weakref_finalize.py,sha256=tRCal5OAhNSRyb0DhHp-38AtIlCsRP8BxF3NX-6rqIA,5343 -+urllib3/util/__init__.py,sha256=JEmSmmqqLyaw8P51gUImZh8Gwg9i1zSe-DoqAitn2nc,1155 -+urllib3/util/connection.py,sha256=5Lx2B1PW29KxBn2T0xkN1CBgRBa3gGVJBKoQoRogEVk,4901 -+urllib3/util/proxy.py,sha256=zUvPPCJrp6dOF0N4GAVbOcl6o-4uXKSrGiTkkr5vUS4,1605 -+urllib3/util/queue.py,sha256=nRgX8_eX-_VkvxoX096QWoz8Ps0QHUAExILCY_7PncM,498 -+urllib3/util/request.py,sha256=fWiAaa8pwdLLIqoTLBxCC2e4ed80muzKU3e3HWWTzFQ,4225 -+urllib3/util/response.py,sha256=GJpg3Egi9qaJXRwBh5wv-MNuRWan5BIu40oReoxWP28,3510 -+urllib3/util/retry.py,sha256=Z6WEf518eTOXP5jr5QSQ9gqJI0DVYt3Xs3EKnYaTmus,22013 -+urllib3/util/ssl_.py,sha256=c0sYiSC6272r6uPkxQpo5rYPP9QC1eR6oI7004gYqZo,17165 -+urllib3/util/ssl_match_hostname.py,sha256=Ir4cZVEjmAk8gUAIHWSi7wtOO83UCYABY2xFD1Ql_WA,5758 -+urllib3/util/ssltransport.py,sha256=NA-u5rMTrDFDFC8QzRKUEKMG0561hOD4qBTr3Z4pv6E,6895 -+urllib3/util/timeout.py,sha256=cwq4dMk87mJHSBktK1miYJ-85G-3T3RmT20v7SFCpno,10168 -+urllib3/util/url.py,sha256=kMxL1k0d-aQm_iZDw_zMmnyYyjrIA_DbsMy3cm3V55M,14279 -+urllib3/util/wait.py,sha256=fOX0_faozG2P7iVojQoE1mbydweNyTcm-hXEfFrTtLI,5403 -+urllib3-1.26.17.dist-info/LICENSE.txt,sha256=w3vxhuJ8-dvpYZ5V7f486nswCRzrPaY8fay-Dm13kHs,1115 -+urllib3-1.26.17.dist-info/METADATA,sha256=swEiQKmb2m5Vl4fygmy4aLSzZjxDjD8q2-_XzuhO9pA,48743 -+urllib3-1.26.17.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110 -+urllib3-1.26.17.dist-info/top_level.txt,sha256=EMiXL2sKrTcmrMxIHTqdc3ET54pQI2Y072LexFEemvo,8 -+urllib3-1.26.17.dist-info/RECORD,, -diff --git a/third_party/python/six/six-1.13.0.dist-info/WHEEL b/third_party/python/urllib3/urllib3-1.26.17.dist-info/WHEEL -similarity index 70% -rename from third_party/python/six/six-1.13.0.dist-info/WHEEL -rename to third_party/python/urllib3/urllib3-1.26.17.dist-info/WHEEL -index 8b701e93c2315..c34f1162ef9a5 100644 ---- a/third_party/python/six/six-1.13.0.dist-info/WHEEL -+++ b/third_party/python/urllib3/urllib3-1.26.17.dist-info/WHEEL -@@ -1,5 +1,5 @@ - Wheel-Version: 1.0 --Generator: bdist_wheel (0.33.6) -+Generator: bdist_wheel (0.41.2) - Root-Is-Purelib: true - Tag: py2-none-any - Tag: py3-none-any -diff --git a/third_party/python/urllib3/urllib3-1.26.0.dist-info/top_level.txt b/third_party/python/urllib3/urllib3-1.26.17.dist-info/top_level.txt -similarity index 100% -rename from third_party/python/urllib3/urllib3-1.26.0.dist-info/top_level.txt -rename to third_party/python/urllib3/urllib3-1.26.17.dist-info/top_level.txt -diff --git a/third_party/python/urllib3/urllib3/__init__.py b/third_party/python/urllib3/urllib3/__init__.py -index fe86b59d782bd..c6fa38212fb55 100644 ---- a/third_party/python/urllib3/urllib3/__init__.py -+++ b/third_party/python/urllib3/urllib3/__init__.py -@@ -19,6 +19,23 @@ - from .util.timeout import Timeout - from .util.url import get_host - -+# === NOTE TO REPACKAGERS AND VENDORS === -+# Please delete this block, this logic is only -+# for urllib3 being distributed via PyPI. -+# See: https://github.com/urllib3/urllib3/issues/2680 -+try: -+ import urllib3_secure_extra # type: ignore # noqa: F401 -+except ImportError: -+ pass -+else: -+ warnings.warn( -+ "'urllib3[secure]' extra is deprecated and will be removed " -+ "in a future release of urllib3 2.x. Read more in this issue: " -+ "https://github.com/urllib3/urllib3/issues/2680", -+ category=DeprecationWarning, -+ stacklevel=2, -+ ) -+ - __author__ = "Andrey Petrov (andrey.petrov@shazow.net)" - __license__ = "MIT" - __version__ = __version__ -diff --git a/third_party/python/urllib3/urllib3/_version.py b/third_party/python/urllib3/urllib3/_version.py -index cee465f88a931..cad75fb5df82a 100644 ---- a/third_party/python/urllib3/urllib3/_version.py -+++ b/third_party/python/urllib3/urllib3/_version.py -@@ -1,2 +1,2 @@ - # This file is protected via CODEOWNERS --__version__ = "1.26.0" -+__version__ = "1.26.17" -diff --git a/third_party/python/urllib3/urllib3/connection.py b/third_party/python/urllib3/urllib3/connection.py -index 52487417c946b..54b96b19154cc 100644 ---- a/third_party/python/urllib3/urllib3/connection.py -+++ b/third_party/python/urllib3/urllib3/connection.py -@@ -43,6 +43,7 @@ class BrokenPipeError(Exception): - pass - - -+from ._collections import HTTPHeaderDict # noqa (historical, removed in v2) - from ._version import __version__ - from .exceptions import ( - ConnectTimeoutError, -@@ -50,15 +51,16 @@ class BrokenPipeError(Exception): - SubjectAltNameWarning, - SystemTimeWarning, - ) --from .packages.ssl_match_hostname import CertificateError, match_hostname - from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection - from .util.ssl_ import ( - assert_fingerprint, - create_urllib3_context, -+ is_ipaddress, - resolve_cert_reqs, - resolve_ssl_version, - ssl_wrap_socket, - ) -+from .util.ssl_match_hostname import CertificateError, match_hostname - - log = logging.getLogger(__name__) - -@@ -66,7 +68,7 @@ class BrokenPipeError(Exception): - - # When it comes time to update this value as a part of regular maintenance - # (ie test_recent_date is failing) update it to ~6 months before the current date. --RECENT_DATE = datetime.date(2019, 1, 1) -+RECENT_DATE = datetime.date(2022, 1, 1) - - _CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]") - -@@ -106,6 +108,10 @@ class HTTPConnection(_HTTPConnection, object): - #: Whether this connection verifies the host's certificate. - is_verified = False - -+ #: Whether this proxy connection (if used) verifies the proxy host's -+ #: certificate. -+ proxy_is_verified = None -+ - def __init__(self, *args, **kw): - if not six.PY2: - kw.pop("strict", None) -@@ -200,7 +206,7 @@ def connect(self): - self._prepare_conn(conn) - - def putrequest(self, method, url, *args, **kwargs): -- """""" -+ """ """ - # Empty docstring because the indentation of CPython's implementation - # is broken but we don't want this method in our documentation. - match = _CONTAINS_CONTROL_CHAR_RE.search(method) -@@ -213,8 +219,8 @@ def putrequest(self, method, url, *args, **kwargs): - return _HTTPConnection.putrequest(self, method, url, *args, **kwargs) - - def putheader(self, header, *values): -- """""" -- if SKIP_HEADER not in values: -+ """ """ -+ if not any(isinstance(v, str) and v == SKIP_HEADER for v in values): - _HTTPConnection.putheader(self, header, *values) - elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS: - raise ValueError( -@@ -223,12 +229,17 @@ def putheader(self, header, *values): - ) - - def request(self, method, url, body=None, headers=None): -+ # Update the inner socket's timeout value to send the request. -+ # This only triggers if the connection is re-used. -+ if getattr(self, "sock", None) is not None: -+ self.sock.settimeout(self.timeout) -+ - if headers is None: - headers = {} - else: - # Avoid modifying the headers passed into .request() - headers = headers.copy() -- if "user-agent" not in (k.lower() for k in headers): -+ if "user-agent" not in (six.ensure_str(k.lower()) for k in headers): - headers["User-Agent"] = _get_default_user_agent() - super(HTTPConnection, self).request(method, url, body=body, headers=headers) - -@@ -248,7 +259,7 @@ def request_chunked(self, method, url, body=None, headers=None): - self.putheader("User-Agent", _get_default_user_agent()) - for header, value in headers.items(): - self.putheader(header, value) -- if "transfer-encoding" not in headers: -+ if "transfer-encoding" not in header_keys: - self.putheader("Transfer-Encoding", "chunked") - self.endheaders() - -@@ -349,17 +360,15 @@ def set_cert( - - def connect(self): - # Add certificate verification -- conn = self._new_conn() -+ self.sock = conn = self._new_conn() - hostname = self.host - tls_in_tls = False - - if self._is_using_tunnel(): - if self.tls_in_tls_required: -- conn = self._connect_tls_proxy(hostname, conn) -+ self.sock = conn = self._connect_tls_proxy(hostname, conn) - tls_in_tls = True - -- self.sock = conn -- - # Calls self._set_hostport(), so self.host is - # self._tunnel_host below. - self._tunnel() -@@ -492,7 +501,7 @@ def _connect_tls_proxy(self, hostname, conn): - - # If no cert was provided, use only the default options for server - # certificate validation -- return ssl_wrap_socket( -+ socket = ssl_wrap_socket( - sock=conn, - ca_certs=self.ca_certs, - ca_cert_dir=self.ca_cert_dir, -@@ -501,8 +510,37 @@ def _connect_tls_proxy(self, hostname, conn): - ssl_context=ssl_context, - ) - -+ if ssl_context.verify_mode != ssl.CERT_NONE and not getattr( -+ ssl_context, "check_hostname", False -+ ): -+ # While urllib3 attempts to always turn off hostname matching from -+ # the TLS library, this cannot always be done. So we check whether -+ # the TLS Library still thinks it's matching hostnames. -+ cert = socket.getpeercert() -+ if not cert.get("subjectAltName", ()): -+ warnings.warn( -+ ( -+ "Certificate for {0} has no `subjectAltName`, falling back to check for a " -+ "`commonName` for now. This feature is being removed by major browsers and " -+ "deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 " -+ "for details.)".format(hostname) -+ ), -+ SubjectAltNameWarning, -+ ) -+ _match_hostname(cert, hostname) -+ -+ self.proxy_is_verified = ssl_context.verify_mode == ssl.CERT_REQUIRED -+ return socket -+ - - def _match_hostname(cert, asserted_hostname): -+ # Our upstream implementation of ssl.match_hostname() -+ # only applies this normalization to IP addresses so it doesn't -+ # match DNS SANs so we do the same thing! -+ stripped_hostname = asserted_hostname.strip("u[]") -+ if is_ipaddress(stripped_hostname): -+ asserted_hostname = stripped_hostname -+ - try: - match_hostname(cert, asserted_hostname) - except CertificateError as e: -diff --git a/third_party/python/urllib3/urllib3/connectionpool.py b/third_party/python/urllib3/urllib3/connectionpool.py -index 4708c5bfc7862..96844d933745d 100644 ---- a/third_party/python/urllib3/urllib3/connectionpool.py -+++ b/third_party/python/urllib3/urllib3/connectionpool.py -@@ -2,6 +2,7 @@ - - import errno - import logging -+import re - import socket - import sys - import warnings -@@ -35,7 +36,6 @@ - ) - from .packages import six - from .packages.six.moves import queue --from .packages.ssl_match_hostname import CertificateError - from .request import RequestMethods - from .response import HTTPResponse - from .util.connection import is_connection_dropped -@@ -44,11 +44,19 @@ - from .util.request import set_file_position - from .util.response import assert_header_parsing - from .util.retry import Retry -+from .util.ssl_match_hostname import CertificateError - from .util.timeout import Timeout - from .util.url import Url, _encode_target - from .util.url import _normalize_host as normalize_host - from .util.url import get_host, parse_url - -+try: # Platform-specific: Python 3 -+ import weakref -+ -+ weakref_finalize = weakref.finalize -+except AttributeError: # Platform-specific: Python 2 -+ from .packages.backports.weakref_finalize import weakref_finalize -+ - xrange = six.moves.xrange - - log = logging.getLogger(__name__) -@@ -219,6 +227,16 @@ def __init__( - self.conn_kw["proxy"] = self.proxy - self.conn_kw["proxy_config"] = self.proxy_config - -+ # Do not pass 'self' as callback to 'finalize'. -+ # Then the 'finalize' would keep an endless living (leak) to self. -+ # By just passing a reference to the pool allows the garbage collector -+ # to free self if nobody else has a reference to it. -+ pool = self.pool -+ -+ # Close all the HTTPConnections in the pool before the -+ # HTTPConnectionPool object is garbage collected. -+ weakref_finalize(self, _close_pool_connections, pool) -+ - def _new_conn(self): - """ - Return a fresh :class:`HTTPConnection`. -@@ -301,8 +319,11 @@ def _put_conn(self, conn): - pass - except queue.Full: - # This should never happen if self.block == True -- log.warning("Connection pool is full, discarding connection: %s", self.host) -- -+ log.warning( -+ "Connection pool is full, discarding connection: %s. Connection pool size: %s", -+ self.host, -+ self.pool.qsize(), -+ ) - # Connection never got put back into the pool, close it. - if conn: - conn.close() -@@ -318,7 +339,7 @@ def _prepare_proxy(self, conn): - pass - - def _get_timeout(self, timeout): -- """ Helper that always returns a :class:`urllib3.util.Timeout` """ -+ """Helper that always returns a :class:`urllib3.util.Timeout`""" - if timeout is _Default: - return self.timeout.clone() - -@@ -375,7 +396,7 @@ def _make_request( - - timeout_obj = self._get_timeout(timeout) - timeout_obj.start_connect() -- conn.timeout = timeout_obj.connect_timeout -+ conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) - - # Trigger any extra validation we need to do. - try: -@@ -485,14 +506,8 @@ def close(self): - # Disable access to the pool - old_pool, self.pool = self.pool, None - -- try: -- while True: -- conn = old_pool.get(block=False) -- if conn: -- conn.close() -- -- except queue.Empty: -- pass # Done. -+ # Close all the HTTPConnections in the pool. -+ _close_pool_connections(old_pool) - - def is_same_host(self, url): - """ -@@ -745,7 +760,35 @@ def urlopen( - # Discard the connection for these exceptions. It will be - # replaced during the next _get_conn() call. - clean_exit = False -- if isinstance(e, (BaseSSLError, CertificateError)): -+ -+ def _is_ssl_error_message_from_http_proxy(ssl_error): -+ # We're trying to detect the message 'WRONG_VERSION_NUMBER' but -+ # SSLErrors are kinda all over the place when it comes to the message, -+ # so we try to cover our bases here! -+ message = " ".join(re.split("[^a-z]", str(ssl_error).lower())) -+ return ( -+ "wrong version number" in message or "unknown protocol" in message -+ ) -+ -+ # Try to detect a common user error with proxies which is to -+ # set an HTTP proxy to be HTTPS when it should be 'http://' -+ # (ie {'http': 'http://proxy', 'https': 'https://proxy'}) -+ # Instead we add a nice error message and point to a URL. -+ if ( -+ isinstance(e, BaseSSLError) -+ and self.proxy -+ and _is_ssl_error_message_from_http_proxy(e) -+ and conn.proxy -+ and conn.proxy.scheme == "https" -+ ): -+ e = ProxyError( -+ "Your proxy appears to only use HTTP and not HTTPS, " -+ "try changing your proxy URL to be HTTP. See: " -+ "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" -+ "#https-proxy-error-http-proxy", -+ SSLError(e), -+ ) -+ elif isinstance(e, (BaseSSLError, CertificateError)): - e = SSLError(e) - elif isinstance(e, (SocketError, NewConnectionError)) and self.proxy: - e = ProxyError("Cannot connect to proxy.", e) -@@ -830,7 +873,7 @@ def urlopen( - ) - - # Check if we should retry the HTTP response. -- has_retry_after = bool(response.getheader("Retry-After")) -+ has_retry_after = bool(response.headers.get("Retry-After")) - if retries.is_retry(method, response.status, has_retry_after): - try: - retries = retries.increment(method, url, response=response, _pool=self) -@@ -1014,12 +1057,23 @@ def _validate_conn(self, conn): - ( - "Unverified HTTPS request is being made to host '%s'. " - "Adding certificate verification is strongly advised. See: " -- "https://urllib3.readthedocs.io/en/latest/advanced-usage.html" -+ "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" - "#ssl-warnings" % conn.host - ), - InsecureRequestWarning, - ) - -+ if getattr(conn, "proxy_is_verified", None) is False: -+ warnings.warn( -+ ( -+ "Unverified HTTPS connection done to an HTTPS proxy. " -+ "Adding certificate verification is strongly advised. See: " -+ "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" -+ "#ssl-warnings" -+ ), -+ InsecureRequestWarning, -+ ) -+ - - def connection_from_url(url, **kw): - """ -@@ -1065,3 +1119,14 @@ def _normalize_host(host, scheme): - if host.startswith("[") and host.endswith("]"): - host = host[1:-1] - return host -+ -+ -+def _close_pool_connections(pool): -+ """Drains a queue of connections and closes each one.""" -+ try: -+ while True: -+ conn = pool.get(block=False) -+ if conn: -+ conn.close() -+ except queue.Empty: -+ pass # Done. -diff --git a/third_party/python/urllib3/urllib3/contrib/_securetransport/bindings.py b/third_party/python/urllib3/urllib3/contrib/_securetransport/bindings.py -index 11524d400bab2..264d564dbda67 100644 ---- a/third_party/python/urllib3/urllib3/contrib/_securetransport/bindings.py -+++ b/third_party/python/urllib3/urllib3/contrib/_securetransport/bindings.py -@@ -48,7 +48,7 @@ - ) - from ctypes.util import find_library - --from urllib3.packages.six import raise_from -+from ...packages.six import raise_from - - if platform.system() != "Darwin": - raise ImportError("Only macOS is supported") -diff --git a/third_party/python/urllib3/urllib3/contrib/_securetransport/low_level.py b/third_party/python/urllib3/urllib3/contrib/_securetransport/low_level.py -index ed8120190c06f..fa0b245d279e9 100644 ---- a/third_party/python/urllib3/urllib3/contrib/_securetransport/low_level.py -+++ b/third_party/python/urllib3/urllib3/contrib/_securetransport/low_level.py -@@ -188,6 +188,7 @@ def _cert_array_from_pem(pem_bundle): - # We only want to do that if an error occurs: otherwise, the caller - # should free. - CoreFoundation.CFRelease(cert_array) -+ raise - - return cert_array - -diff --git a/third_party/python/urllib3/urllib3/contrib/appengine.py b/third_party/python/urllib3/urllib3/contrib/appengine.py -index aa64a0914c601..a5a6d91035f0a 100644 ---- a/third_party/python/urllib3/urllib3/contrib/appengine.py -+++ b/third_party/python/urllib3/urllib3/contrib/appengine.py -@@ -111,7 +111,7 @@ def __init__( - warnings.warn( - "urllib3 is using URLFetch on Google App Engine sandbox instead " - "of sockets. To use sockets directly instead of URLFetch see " -- "https://urllib3.readthedocs.io/en/latest/reference/urllib3.contrib.html.", -+ "https://urllib3.readthedocs.io/en/1.26.x/reference/urllib3.contrib.html.", - AppEnginePlatformWarning, - ) - -@@ -224,7 +224,7 @@ def urlopen( - ) - - # Check if we should retry the HTTP response. -- has_retry_after = bool(http_response.getheader("Retry-After")) -+ has_retry_after = bool(http_response.headers.get("Retry-After")) - if retries.is_retry(method, http_response.status, has_retry_after): - retries = retries.increment(method, url, response=http_response, _pool=self) - log.debug("Retry: %s", url) -diff --git a/third_party/python/urllib3/urllib3/contrib/ntlmpool.py b/third_party/python/urllib3/urllib3/contrib/ntlmpool.py -index b2df45dcf6065..471665754e9f1 100644 ---- a/third_party/python/urllib3/urllib3/contrib/ntlmpool.py -+++ b/third_party/python/urllib3/urllib3/contrib/ntlmpool.py -@@ -5,6 +5,7 @@ - """ - from __future__ import absolute_import - -+import warnings - from logging import getLogger - - from ntlm import ntlm -@@ -12,6 +13,14 @@ - from .. import HTTPSConnectionPool - from ..packages.six.moves.http_client import HTTPSConnection - -+warnings.warn( -+ "The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed " -+ "in urllib3 v2.0 release, urllib3 is not able to support it properly due " -+ "to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. " -+ "If you are a user of this module please comment in the mentioned issue.", -+ DeprecationWarning, -+) -+ - log = getLogger(__name__) - - -@@ -60,7 +69,7 @@ def _new_conn(self): - log.debug("Request headers: %s", headers) - conn.request("GET", self.authurl, None, headers) - res = conn.getresponse() -- reshdr = dict(res.getheaders()) -+ reshdr = dict(res.headers) - log.debug("Response status: %s %s", res.status, res.reason) - log.debug("Response headers: %s", reshdr) - log.debug("Response data: %s [...]", res.read(100)) -@@ -92,7 +101,7 @@ def _new_conn(self): - conn.request("GET", self.authurl, None, headers) - res = conn.getresponse() - log.debug("Response status: %s %s", res.status, res.reason) -- log.debug("Response headers: %s", dict(res.getheaders())) -+ log.debug("Response headers: %s", dict(res.headers)) - log.debug("Response data: %s [...]", res.read()[:100]) - if res.status != 200: - if res.status == 401: -diff --git a/third_party/python/urllib3/urllib3/contrib/pyopenssl.py b/third_party/python/urllib3/urllib3/contrib/pyopenssl.py -index 0cabab1aed14a..1ed214b1d78fc 100644 ---- a/third_party/python/urllib3/urllib3/contrib/pyopenssl.py -+++ b/third_party/python/urllib3/urllib3/contrib/pyopenssl.py -@@ -47,10 +47,10 @@ - """ - from __future__ import absolute_import - -+import OpenSSL.crypto - import OpenSSL.SSL - from cryptography import x509 - from cryptography.hazmat.backends.openssl import backend as openssl_backend --from cryptography.hazmat.backends.openssl.x509 import _Certificate - - try: - from cryptography.x509 import UnsupportedExtension -@@ -73,9 +73,19 @@ class UnsupportedExtension(Exception): - import logging - import ssl - import sys -+import warnings - - from .. import util - from ..packages import six -+from ..util.ssl_ import PROTOCOL_TLS_CLIENT -+ -+warnings.warn( -+ "'urllib3.contrib.pyopenssl' module is deprecated and will be removed " -+ "in a future release of urllib3 2.x. Read more in this issue: " -+ "https://github.com/urllib3/urllib3/issues/2680", -+ category=DeprecationWarning, -+ stacklevel=2, -+) - - __all__ = ["inject_into_urllib3", "extract_from_urllib3"] - -@@ -85,6 +95,7 @@ class UnsupportedExtension(Exception): - # Map from urllib3 to PyOpenSSL compatible parameter-values. - _openssl_versions = { - util.PROTOCOL_TLS: OpenSSL.SSL.SSLv23_METHOD, -+ PROTOCOL_TLS_CLIENT: OpenSSL.SSL.SSLv23_METHOD, - ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD, - } - -@@ -217,9 +228,8 @@ def get_subj_alt_name(peer_cert): - if hasattr(peer_cert, "to_cryptography"): - cert = peer_cert.to_cryptography() - else: -- # This is technically using private APIs, but should work across all -- # relevant versions before PyOpenSSL got a proper API for this. -- cert = _Certificate(openssl_backend, peer_cert._x509) -+ der = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, peer_cert) -+ cert = x509.load_der_x509_certificate(der, openssl_backend) - - # We want to find the SAN extension. Ask Cryptography to locate it (it's - # faster than looping in Python) -@@ -404,7 +414,6 @@ def makefile(self, mode, bufsize=-1): - self._makefile_refs += 1 - return _fileobject(self, mode, bufsize, close=True) - -- - else: # Platform-specific: Python 3 - makefile = backport_makefile - -diff --git a/third_party/python/urllib3/urllib3/contrib/securetransport.py b/third_party/python/urllib3/urllib3/contrib/securetransport.py -index ab092de67a57c..6c46a3b9f0375 100644 ---- a/third_party/python/urllib3/urllib3/contrib/securetransport.py -+++ b/third_party/python/urllib3/urllib3/contrib/securetransport.py -@@ -67,6 +67,7 @@ - import six - - from .. import util -+from ..util.ssl_ import PROTOCOL_TLS_CLIENT - from ._securetransport.bindings import CoreFoundation, Security, SecurityConst - from ._securetransport.low_level import ( - _assert_no_error, -@@ -154,7 +155,8 @@ - # TLSv1 and a high of TLSv1.2. For everything else, we pin to that version. - # TLSv1 to 1.2 are supported on macOS 10.8+ - _protocol_to_min_max = { -- util.PROTOCOL_TLS: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12) -+ util.PROTOCOL_TLS: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12), -+ PROTOCOL_TLS_CLIENT: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12), - } - - if hasattr(ssl, "PROTOCOL_SSLv2"): -@@ -768,7 +770,6 @@ def makefile(self, mode, bufsize=-1): - self._makefile_refs += 1 - return _fileobject(self, mode, bufsize, close=True) - -- - else: # Platform-specific: Python 3 - - def makefile(self, mode="r", buffering=None, *args, **kwargs): -diff --git a/third_party/python/urllib3/urllib3/contrib/socks.py b/third_party/python/urllib3/urllib3/contrib/socks.py -index 93df8325d59c4..c326e80dd1174 100644 ---- a/third_party/python/urllib3/urllib3/contrib/socks.py -+++ b/third_party/python/urllib3/urllib3/contrib/socks.py -@@ -51,7 +51,7 @@ - ( - "SOCKS support in urllib3 requires the installation of optional " - "dependencies: specifically, PySocks. For more information, see " -- "https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies" -+ "https://urllib3.readthedocs.io/en/1.26.x/contrib.html#socks-proxies" - ), - DependencyWarning, - ) -diff --git a/third_party/python/urllib3/urllib3/exceptions.py b/third_party/python/urllib3/urllib3/exceptions.py -index d69958d5dfc29..cba6f3f560f71 100644 ---- a/third_party/python/urllib3/urllib3/exceptions.py -+++ b/third_party/python/urllib3/urllib3/exceptions.py -@@ -289,7 +289,17 @@ class ProxySchemeUnknown(AssertionError, URLSchemeUnknown): - # TODO(t-8ch): Stop inheriting from AssertionError in v2.0. - - def __init__(self, scheme): -- message = "Not supported proxy scheme %s" % scheme -+ # 'localhost' is here because our URL parser parses -+ # localhost:8080 -> scheme=localhost, remove if we fix this. -+ if scheme == "localhost": -+ scheme = None -+ if scheme is None: -+ message = "Proxy URL had no scheme, should start with http:// or https://" -+ else: -+ message = ( -+ "Proxy URL had unsupported scheme %s, should use http:// or https://" -+ % scheme -+ ) - super(ProxySchemeUnknown, self).__init__(message) - - -diff --git a/third_party/python/urllib3/urllib3/packages/__init__.py b/third_party/python/urllib3/urllib3/packages/__init__.py -index fce4caa65d2ee..e69de29bb2d1d 100644 ---- a/third_party/python/urllib3/urllib3/packages/__init__.py -+++ b/third_party/python/urllib3/urllib3/packages/__init__.py -@@ -1,5 +0,0 @@ --from __future__ import absolute_import -- --from . import ssl_match_hostname -- --__all__ = ("ssl_match_hostname",) -diff --git a/third_party/python/urllib3/urllib3/packages/backports/weakref_finalize.py b/third_party/python/urllib3/urllib3/packages/backports/weakref_finalize.py -new file mode 100644 -index 0000000000000..a2f2966e54966 ---- /dev/null -+++ b/third_party/python/urllib3/urllib3/packages/backports/weakref_finalize.py -@@ -0,0 +1,155 @@ -+# -*- coding: utf-8 -*- -+""" -+backports.weakref_finalize -+~~~~~~~~~~~~~~~~~~ -+ -+Backports the Python 3 ``weakref.finalize`` method. -+""" -+from __future__ import absolute_import -+ -+import itertools -+import sys -+from weakref import ref -+ -+__all__ = ["weakref_finalize"] -+ -+ -+class weakref_finalize(object): -+ """Class for finalization of weakrefable objects -+ finalize(obj, func, *args, **kwargs) returns a callable finalizer -+ object which will be called when obj is garbage collected. The -+ first time the finalizer is called it evaluates func(*arg, **kwargs) -+ and returns the result. After this the finalizer is dead, and -+ calling it just returns None. -+ When the program exits any remaining finalizers for which the -+ atexit attribute is true will be run in reverse order of creation. -+ By default atexit is true. -+ """ -+ -+ # Finalizer objects don't have any state of their own. They are -+ # just used as keys to lookup _Info objects in the registry. This -+ # ensures that they cannot be part of a ref-cycle. -+ -+ __slots__ = () -+ _registry = {} -+ _shutdown = False -+ _index_iter = itertools.count() -+ _dirty = False -+ _registered_with_atexit = False -+ -+ class _Info(object): -+ __slots__ = ("weakref", "func", "args", "kwargs", "atexit", "index") -+ -+ def __init__(self, obj, func, *args, **kwargs): -+ if not self._registered_with_atexit: -+ # We may register the exit function more than once because -+ # of a thread race, but that is harmless -+ import atexit -+ -+ atexit.register(self._exitfunc) -+ weakref_finalize._registered_with_atexit = True -+ info = self._Info() -+ info.weakref = ref(obj, self) -+ info.func = func -+ info.args = args -+ info.kwargs = kwargs or None -+ info.atexit = True -+ info.index = next(self._index_iter) -+ self._registry[self] = info -+ weakref_finalize._dirty = True -+ -+ def __call__(self, _=None): -+ """If alive then mark as dead and return func(*args, **kwargs); -+ otherwise return None""" -+ info = self._registry.pop(self, None) -+ if info and not self._shutdown: -+ return info.func(*info.args, **(info.kwargs or {})) -+ -+ def detach(self): -+ """If alive then mark as dead and return (obj, func, args, kwargs); -+ otherwise return None""" -+ info = self._registry.get(self) -+ obj = info and info.weakref() -+ if obj is not None and self._registry.pop(self, None): -+ return (obj, info.func, info.args, info.kwargs or {}) -+ -+ def peek(self): -+ """If alive then return (obj, func, args, kwargs); -+ otherwise return None""" -+ info = self._registry.get(self) -+ obj = info and info.weakref() -+ if obj is not None: -+ return (obj, info.func, info.args, info.kwargs or {}) -+ -+ @property -+ def alive(self): -+ """Whether finalizer is alive""" -+ return self in self._registry -+ -+ @property -+ def atexit(self): -+ """Whether finalizer should be called at exit""" -+ info = self._registry.get(self) -+ return bool(info) and info.atexit -+ -+ @atexit.setter -+ def atexit(self, value): -+ info = self._registry.get(self) -+ if info: -+ info.atexit = bool(value) -+ -+ def __repr__(self): -+ info = self._registry.get(self) -+ obj = info and info.weakref() -+ if obj is None: -+ return "<%s object at %#x; dead>" % (type(self).__name__, id(self)) -+ else: -+ return "<%s object at %#x; for %r at %#x>" % ( -+ type(self).__name__, -+ id(self), -+ type(obj).__name__, -+ id(obj), -+ ) -+ -+ @classmethod -+ def _select_for_exit(cls): -+ # Return live finalizers marked for exit, oldest first -+ L = [(f, i) for (f, i) in cls._registry.items() if i.atexit] -+ L.sort(key=lambda item: item[1].index) -+ return [f for (f, i) in L] -+ -+ @classmethod -+ def _exitfunc(cls): -+ # At shutdown invoke finalizers for which atexit is true. -+ # This is called once all other non-daemonic threads have been -+ # joined. -+ reenable_gc = False -+ try: -+ if cls._registry: -+ import gc -+ -+ if gc.isenabled(): -+ reenable_gc = True -+ gc.disable() -+ pending = None -+ while True: -+ if pending is None or weakref_finalize._dirty: -+ pending = cls._select_for_exit() -+ weakref_finalize._dirty = False -+ if not pending: -+ break -+ f = pending.pop() -+ try: -+ # gc is disabled, so (assuming no daemonic -+ # threads) the following is the only line in -+ # this function which might trigger creation -+ # of a new finalizer -+ f() -+ except Exception: -+ sys.excepthook(*sys.exc_info()) -+ assert f not in cls._registry -+ finally: -+ # prevent any more finalizers from executing during shutdown -+ weakref_finalize._shutdown = True -+ if reenable_gc: -+ gc.enable() -diff --git a/third_party/python/urllib3/urllib3/packages/six.py b/third_party/python/urllib3/urllib3/packages/six.py -index 314424099f624..f099a3dcd28d2 100644 ---- a/third_party/python/urllib3/urllib3/packages/six.py -+++ b/third_party/python/urllib3/urllib3/packages/six.py -@@ -1,4 +1,4 @@ --# Copyright (c) 2010-2019 Benjamin Peterson -+# Copyright (c) 2010-2020 Benjamin Peterson - # - # Permission is hereby granted, free of charge, to any person obtaining a copy - # of this software and associated documentation files (the "Software"), to deal -@@ -29,7 +29,7 @@ - import types - - __author__ = "Benjamin Peterson " --__version__ = "1.12.0" -+__version__ = "1.16.0" - - - # Useful for very coarse version differentiation. -@@ -71,6 +71,11 @@ def __len__(self): - MAXSIZE = int((1 << 63) - 1) - del X - -+if PY34: -+ from importlib.util import spec_from_loader -+else: -+ spec_from_loader = None -+ - - def _add_doc(func, doc): - """Add documentation to a function.""" -@@ -182,6 +187,11 @@ def find_module(self, fullname, path=None): - return self - return None - -+ def find_spec(self, fullname, path, target=None): -+ if fullname in self.known_modules: -+ return spec_from_loader(fullname, self) -+ return None -+ - def __get_module(self, fullname): - try: - return self.known_modules[fullname] -@@ -220,6 +230,12 @@ def get_code(self, fullname): - - get_source = get_code # same as get_code - -+ def create_module(self, spec): -+ return self.load_module(spec.name) -+ -+ def exec_module(self, module): -+ pass -+ - - _importer = _SixMetaPathImporter(__name__) - -@@ -260,9 +276,19 @@ class _MovedItems(_LazyModule): - ), - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), -+ MovedModule( -+ "collections_abc", -+ "collections", -+ "collections.abc" if sys.version_info >= (3, 3) else "collections", -+ ), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), -- MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), -+ MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"), -+ MovedModule( -+ "_dummy_thread", -+ "dummy_thread", -+ "_dummy_thread" if sys.version_info < (3, 9) else "_thread", -+ ), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), -@@ -307,7 +333,9 @@ class _MovedItems(_LazyModule): - ] - # Add windows specific modules. - if sys.platform == "win32": -- _moved_attributes += [MovedModule("winreg", "_winreg")] -+ _moved_attributes += [ -+ MovedModule("winreg", "_winreg"), -+ ] - - for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) -@@ -476,7 +504,7 @@ class Module_six_moves_urllib_robotparser(_LazyModule): - - - _urllib_robotparser_moved_attributes = [ -- MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser") -+ MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), - ] - for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -@@ -678,9 +706,11 @@ def u(s): - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -+ _assertNotRegex = "assertNotRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" -+ _assertNotRegex = "assertNotRegex" - else: - - def b(s): -@@ -707,6 +737,7 @@ def indexbytes(buf, i): - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -+ _assertNotRegex = "assertNotRegexpMatches" - _add_doc(b, """Byte literal""") - _add_doc(u, """Text literal""") - -@@ -723,6 +754,10 @@ def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -+def assertNotRegex(self, *args, **kwargs): -+ return getattr(self, _assertNotRegex)(*args, **kwargs) -+ -+ - if PY3: - exec_ = getattr(moves.builtins, "exec") - -@@ -737,7 +772,6 @@ def reraise(tp, value, tb=None): - value = None - tb = None - -- - else: - - def exec_(_code_, _globs_=None, _locs_=None): -@@ -750,7 +784,7 @@ def exec_(_code_, _globs_=None, _locs_=None): - del frame - elif _locs_ is None: - _locs_ = _globs_ -- exec("""exec _code_ in _globs_, _locs_""") -+ exec ("""exec _code_ in _globs_, _locs_""") - - exec_( - """def reraise(tp, value, tb=None): -@@ -762,18 +796,7 @@ def exec_(_code_, _globs_=None, _locs_=None): - ) - - --if sys.version_info[:2] == (3, 2): -- exec_( -- """def raise_from(value, from_value): -- try: -- if from_value is None: -- raise value -- raise value from from_value -- finally: -- value = None --""" -- ) --elif sys.version_info[:2] > (3, 2): -+if sys.version_info[:2] > (3,): - exec_( - """def raise_from(value, from_value): - try: -@@ -863,19 +886,41 @@ def print_(*args, **kwargs): - _add_doc(reraise, """Reraise an exception.""") - - if sys.version_info[0:2] < (3, 4): -+ # This does exactly the same what the :func:`py3:functools.update_wrapper` -+ # function does on Python versions after 3.2. It sets the ``__wrapped__`` -+ # attribute on ``wrapper`` object and it doesn't raise an error if any of -+ # the attributes mentioned in ``assigned`` and ``updated`` are missing on -+ # ``wrapped`` object. -+ def _update_wrapper( -+ wrapper, -+ wrapped, -+ assigned=functools.WRAPPER_ASSIGNMENTS, -+ updated=functools.WRAPPER_UPDATES, -+ ): -+ for attr in assigned: -+ try: -+ value = getattr(wrapped, attr) -+ except AttributeError: -+ continue -+ else: -+ setattr(wrapper, attr, value) -+ for attr in updated: -+ getattr(wrapper, attr).update(getattr(wrapped, attr, {})) -+ wrapper.__wrapped__ = wrapped -+ return wrapper -+ -+ _update_wrapper.__doc__ = functools.update_wrapper.__doc__ - - def wraps( - wrapped, - assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES, - ): -- def wrapper(f): -- f = functools.wraps(wrapped, assigned, updated)(f) -- f.__wrapped__ = wrapped -- return f -- -- return wrapper -+ return functools.partial( -+ _update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated -+ ) - -+ wraps.__doc__ = functools.wraps.__doc__ - - else: - wraps = functools.wraps -@@ -888,7 +933,15 @@ def with_metaclass(meta, *bases): - # the actual metaclass. - class metaclass(type): - def __new__(cls, name, this_bases, d): -- return meta(name, bases, d) -+ if sys.version_info[:2] >= (3, 7): -+ # This version introduced PEP 560 that requires a bit -+ # of extra care (we mimic what is done by __build_class__). -+ resolved_bases = types.resolve_bases(bases) -+ if resolved_bases is not bases: -+ d["__orig_bases__"] = bases -+ else: -+ resolved_bases = bases -+ return meta(name, resolved_bases, d) - - @classmethod - def __prepare__(cls, name, this_bases): -@@ -928,12 +981,11 @@ def ensure_binary(s, encoding="utf-8", errors="strict"): - - `str` -> encoded to `bytes` - - `bytes` -> `bytes` - """ -+ if isinstance(s, binary_type): -+ return s - if isinstance(s, text_type): - return s.encode(encoding, errors) -- elif isinstance(s, binary_type): -- return s -- else: -- raise TypeError("not expecting type '%s'" % type(s)) -+ raise TypeError("not expecting type '%s'" % type(s)) - - - def ensure_str(s, encoding="utf-8", errors="strict"): -@@ -947,12 +999,15 @@ def ensure_str(s, encoding="utf-8", errors="strict"): - - `str` -> `str` - - `bytes` -> decoded to `str` - """ -- if not isinstance(s, (text_type, binary_type)): -- raise TypeError("not expecting type '%s'" % type(s)) -+ # Optimization: Fast return for the common case. -+ if type(s) is str: -+ return s - if PY2 and isinstance(s, text_type): -- s = s.encode(encoding, errors) -+ return s.encode(encoding, errors) - elif PY3 and isinstance(s, binary_type): -- s = s.decode(encoding, errors) -+ return s.decode(encoding, errors) -+ elif not isinstance(s, (text_type, binary_type)): -+ raise TypeError("not expecting type '%s'" % type(s)) - return s - - -@@ -977,7 +1032,7 @@ def ensure_text(s, encoding="utf-8", errors="strict"): - - def python_2_unicode_compatible(klass): - """ -- A decorator that defines __unicode__ and __str__ methods under Python 2. -+ A class decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method -diff --git a/third_party/python/urllib3/urllib3/packages/ssl_match_hostname/__init__.py b/third_party/python/urllib3/urllib3/packages/ssl_match_hostname/__init__.py -deleted file mode 100644 -index 6b12fd90aadec..0000000000000 ---- a/third_party/python/urllib3/urllib3/packages/ssl_match_hostname/__init__.py -+++ /dev/null -@@ -1,22 +0,0 @@ --import sys -- --try: -- # Our match_hostname function is the same as 3.5's, so we only want to -- # import the match_hostname function if it's at least that good. -- if sys.version_info < (3, 5): -- raise ImportError("Fallback to vendored code") -- -- from ssl import CertificateError, match_hostname --except ImportError: -- try: -- # Backport of the function from a pypi module -- from backports.ssl_match_hostname import ( # type: ignore -- CertificateError, -- match_hostname, -- ) -- except ImportError: -- # Our vendored copy -- from ._implementation import CertificateError, match_hostname # type: ignore -- --# Not needed, but documenting what we provide. --__all__ = ("CertificateError", "match_hostname") -diff --git a/third_party/python/urllib3/urllib3/poolmanager.py b/third_party/python/urllib3/urllib3/poolmanager.py -index 3a31a285bf648..14b10daf3a962 100644 ---- a/third_party/python/urllib3/urllib3/poolmanager.py -+++ b/third_party/python/urllib3/urllib3/poolmanager.py -@@ -34,6 +34,7 @@ - "ca_cert_dir", - "ssl_context", - "key_password", -+ "server_hostname", - ) - - # All known keyword arguments that could be provided to the pool manager, its -@@ -170,7 +171,7 @@ class PoolManager(RequestMethods): - def __init__(self, num_pools=10, headers=None, **connection_pool_kw): - RequestMethods.__init__(self, headers) - self.connection_pool_kw = connection_pool_kw -- self.pools = RecentlyUsedContainer(num_pools, dispose_func=lambda p: p.close()) -+ self.pools = RecentlyUsedContainer(num_pools) - - # Locally set the pool classes and keys so other PoolManagers can - # override them. -diff --git a/third_party/python/urllib3/urllib3/request.py b/third_party/python/urllib3/urllib3/request.py -index 398386a5b9f61..3b4cf999225b8 100644 ---- a/third_party/python/urllib3/urllib3/request.py -+++ b/third_party/python/urllib3/urllib3/request.py -@@ -1,6 +1,9 @@ - from __future__ import absolute_import - -+import sys -+ - from .filepost import encode_multipart_formdata -+from .packages import six - from .packages.six.moves.urllib.parse import urlencode - - __all__ = ["RequestMethods"] -@@ -168,3 +171,21 @@ def request_encode_body( - extra_kw.update(urlopen_kw) - - return self.urlopen(method, url, **extra_kw) -+ -+ -+if not six.PY2: -+ -+ class RequestModule(sys.modules[__name__].__class__): -+ def __call__(self, *args, **kwargs): -+ """ -+ If user tries to call this module directly urllib3 v2.x style raise an error to the user -+ suggesting they may need urllib3 v2 -+ """ -+ raise TypeError( -+ "'module' object is not callable\n" -+ "urllib3.request() method is not supported in this release, " -+ "upgrade to urllib3 v2 to use it\n" -+ "see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html" -+ ) -+ -+ sys.modules[__name__].__class__ = RequestModule -diff --git a/third_party/python/urllib3/urllib3/response.py b/third_party/python/urllib3/urllib3/response.py -index 38693f4fc6e33..0bd13d40b8ac7 100644 ---- a/third_party/python/urllib3/urllib3/response.py -+++ b/third_party/python/urllib3/urllib3/response.py -@@ -2,16 +2,22 @@ - - import io - import logging -+import sys -+import warnings - import zlib - from contextlib import contextmanager - from socket import error as SocketError - from socket import timeout as SocketTimeout - - try: -- import brotli -+ try: -+ import brotlicffi as brotli -+ except ImportError: -+ import brotli - except ImportError: - brotli = None - -+from . import util - from ._collections import HTTPHeaderDict - from .connection import BaseSSLError, HTTPException - from .exceptions import ( -@@ -478,6 +484,54 @@ def _error_catcher(self): - if self._original_response and self._original_response.isclosed(): - self.release_conn() - -+ def _fp_read(self, amt): -+ """ -+ Read a response with the thought that reading the number of bytes -+ larger than can fit in a 32-bit int at a time via SSL in some -+ known cases leads to an overflow error that has to be prevented -+ if `amt` or `self.length_remaining` indicate that a problem may -+ happen. -+ -+ The known cases: -+ * 3.8 <= CPython < 3.9.7 because of a bug -+ https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900. -+ * urllib3 injected with pyOpenSSL-backed SSL-support. -+ * CPython < 3.10 only when `amt` does not fit 32-bit int. -+ """ -+ assert self._fp -+ c_int_max = 2 ** 31 - 1 -+ if ( -+ ( -+ (amt and amt > c_int_max) -+ or (self.length_remaining and self.length_remaining > c_int_max) -+ ) -+ and not util.IS_SECURETRANSPORT -+ and (util.IS_PYOPENSSL or sys.version_info < (3, 10)) -+ ): -+ buffer = io.BytesIO() -+ # Besides `max_chunk_amt` being a maximum chunk size, it -+ # affects memory overhead of reading a response by this -+ # method in CPython. -+ # `c_int_max` equal to 2 GiB - 1 byte is the actual maximum -+ # chunk size that does not lead to an overflow error, but -+ # 256 MiB is a compromise. -+ max_chunk_amt = 2 ** 28 -+ while amt is None or amt != 0: -+ if amt is not None: -+ chunk_amt = min(amt, max_chunk_amt) -+ amt -= chunk_amt -+ else: -+ chunk_amt = max_chunk_amt -+ data = self._fp.read(chunk_amt) -+ if not data: -+ break -+ buffer.write(data) -+ del data # to reduce peak memory usage by `max_chunk_amt`. -+ return buffer.getvalue() -+ else: -+ # StringIO doesn't like amt=None -+ return self._fp.read(amt) if amt is not None else self._fp.read() -+ - def read(self, amt=None, decode_content=None, cache_content=False): - """ - Similar to :meth:`http.client.HTTPResponse.read`, but with two additional -@@ -510,13 +564,11 @@ def read(self, amt=None, decode_content=None, cache_content=False): - fp_closed = getattr(self._fp, "closed", False) - - with self._error_catcher(): -+ data = self._fp_read(amt) if not fp_closed else b"" - if amt is None: -- # cStringIO doesn't like amt=None -- data = self._fp.read() if not fp_closed else b"" - flush_decoder = True - else: - cache_content = False -- data = self._fp.read(amt) if not fp_closed else b"" - if ( - amt != 0 and not data - ): # Platform-specific: Buggy versions of Python. -@@ -612,9 +664,21 @@ def from_httplib(ResponseCls, r, **response_kw): - - # Backwards-compatibility methods for http.client.HTTPResponse - def getheaders(self): -+ warnings.warn( -+ "HTTPResponse.getheaders() is deprecated and will be removed " -+ "in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.", -+ category=DeprecationWarning, -+ stacklevel=2, -+ ) - return self.headers - - def getheader(self, name, default=None): -+ warnings.warn( -+ "HTTPResponse.getheader() is deprecated and will be removed " -+ "in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).", -+ category=DeprecationWarning, -+ stacklevel=2, -+ ) - return self.headers.get(name, default) - - # Backwards compatibility for http.cookiejar -diff --git a/third_party/python/urllib3/urllib3/util/connection.py b/third_party/python/urllib3/urllib3/util/connection.py -index cd57455748be0..6af1138f260e4 100644 ---- a/third_party/python/urllib3/urllib3/util/connection.py -+++ b/third_party/python/urllib3/urllib3/util/connection.py -@@ -2,9 +2,8 @@ - - import socket - --from urllib3.exceptions import LocationParseError -- - from ..contrib import _appengine_environ -+from ..exceptions import LocationParseError - from ..packages import six - from .wait import NoWayToWaitForSocketError, wait_for_read - -@@ -118,7 +117,7 @@ def allowed_gai_family(): - - - def _has_ipv6(host): -- """ Returns True if the system can bind an IPv6 address. """ -+ """Returns True if the system can bind an IPv6 address.""" - sock = None - has_ipv6 = False - -diff --git a/third_party/python/urllib3/urllib3/util/proxy.py b/third_party/python/urllib3/urllib3/util/proxy.py -index 34f884d5b314d..2199cc7b7f004 100644 ---- a/third_party/python/urllib3/urllib3/util/proxy.py -+++ b/third_party/python/urllib3/urllib3/util/proxy.py -@@ -45,6 +45,7 @@ def create_proxy_ssl_context( - ssl_version=resolve_ssl_version(ssl_version), - cert_reqs=resolve_cert_reqs(cert_reqs), - ) -+ - if ( - not ca_certs - and not ca_cert_dir -diff --git a/third_party/python/urllib3/urllib3/util/request.py b/third_party/python/urllib3/urllib3/util/request.py -index 25103383ec7ab..b574b081e98a0 100644 ---- a/third_party/python/urllib3/urllib3/util/request.py -+++ b/third_party/python/urllib3/urllib3/util/request.py -@@ -14,7 +14,10 @@ - - ACCEPT_ENCODING = "gzip,deflate" - try: -- import brotli as _unused_module_brotli # noqa: F401 -+ try: -+ import brotlicffi as _unused_module_brotli # noqa: F401 -+ except ImportError: -+ import brotli as _unused_module_brotli # noqa: F401 - except ImportError: - pass - else: -diff --git a/third_party/python/urllib3/urllib3/util/retry.py b/third_party/python/urllib3/urllib3/util/retry.py -index ee51f922f8452..60ef6c4f3f9d0 100644 ---- a/third_party/python/urllib3/urllib3/util/retry.py -+++ b/third_party/python/urllib3/urllib3/util/retry.py -@@ -37,7 +37,7 @@ class _RetryMeta(type): - def DEFAULT_METHOD_WHITELIST(cls): - warnings.warn( - "Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and " -- "will be removed in v2.0. Use 'Retry.DEFAULT_METHODS_ALLOWED' instead", -+ "will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead", - DeprecationWarning, - ) - return cls.DEFAULT_ALLOWED_METHODS -@@ -69,6 +69,24 @@ def DEFAULT_REDIRECT_HEADERS_BLACKLIST(cls, value): - ) - cls.DEFAULT_REMOVE_HEADERS_ON_REDIRECT = value - -+ @property -+ def BACKOFF_MAX(cls): -+ warnings.warn( -+ "Using 'Retry.BACKOFF_MAX' is deprecated and " -+ "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead", -+ DeprecationWarning, -+ ) -+ return cls.DEFAULT_BACKOFF_MAX -+ -+ @BACKOFF_MAX.setter -+ def BACKOFF_MAX(cls, value): -+ warnings.warn( -+ "Using 'Retry.BACKOFF_MAX' is deprecated and " -+ "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead", -+ DeprecationWarning, -+ ) -+ cls.DEFAULT_BACKOFF_MAX = value -+ - - @six.add_metaclass(_RetryMeta) - class Retry(object): -@@ -181,7 +199,7 @@ class Retry(object): - - seconds. If the backoff_factor is 0.1, then :func:`.sleep` will sleep - for [0.0s, 0.2s, 0.4s, ...] between retries. It will never be longer -- than :attr:`Retry.BACKOFF_MAX`. -+ than :attr:`Retry.DEFAULT_BACKOFF_MAX`. - - By default, backoff is disabled (set to 0). - -@@ -217,10 +235,10 @@ class Retry(object): - RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503]) - - #: Default headers to be used for ``remove_headers_on_redirect`` -- DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Authorization"]) -+ DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"]) - - #: Maximum backoff time. -- BACKOFF_MAX = 120 -+ DEFAULT_BACKOFF_MAX = 120 - - def __init__( - self, -@@ -253,6 +271,7 @@ def __init__( - "Using 'method_whitelist' with Retry is deprecated and " - "will be removed in v2.0. Use 'allowed_methods' instead", - DeprecationWarning, -+ stacklevel=2, - ) - allowed_methods = method_whitelist - if allowed_methods is _Default: -@@ -320,7 +339,7 @@ def new(self, **kw): - - @classmethod - def from_int(cls, retries, redirect=True, default=None): -- """ Backwards-compatibility for the old retries format.""" -+ """Backwards-compatibility for the old retries format.""" - if retries is None: - retries = default if default is not None else cls.DEFAULT - -@@ -347,7 +366,7 @@ def get_backoff_time(self): - return 0 - - backoff_value = self.backoff_factor * (2 ** (consecutive_errors_len - 1)) -- return min(self.BACKOFF_MAX, backoff_value) -+ return min(self.DEFAULT_BACKOFF_MAX, backoff_value) - - def parse_retry_after(self, retry_after): - # Whitespace: https://tools.ietf.org/html/rfc7230#section-3.2.4 -@@ -373,9 +392,9 @@ def parse_retry_after(self, retry_after): - return seconds - - def get_retry_after(self, response): -- """ Get the value of Retry-After in seconds. """ -+ """Get the value of Retry-After in seconds.""" - -- retry_after = response.getheader("Retry-After") -+ retry_after = response.headers.get("Retry-After") - - if retry_after is None: - return None -@@ -467,7 +486,7 @@ def is_retry(self, method, status_code, has_retry_after=False): - ) - - def is_exhausted(self): -- """ Are we out of retries? """ -+ """Are we out of retries?""" - retry_counts = ( - self.total, - self.connect, -diff --git a/third_party/python/urllib3/urllib3/util/ssl_.py b/third_party/python/urllib3/urllib3/util/ssl_.py -index 1cb5e7cdc1c0c..8f867812a5eb3 100644 ---- a/third_party/python/urllib3/urllib3/util/ssl_.py -+++ b/third_party/python/urllib3/urllib3/util/ssl_.py -@@ -44,13 +44,21 @@ def _const_compare_digest_backport(a, b): - - try: # Test for SSL features - import ssl -- from ssl import HAS_SNI # Has SNI? - from ssl import CERT_REQUIRED, wrap_socket -+except ImportError: -+ pass -+ -+try: -+ from ssl import HAS_SNI # Has SNI? -+except ImportError: -+ pass - -+try: - from .ssltransport import SSLTransport - except ImportError: - pass - -+ - try: # Platform-specific: Python 3.6 - from ssl import PROTOCOL_TLS - -@@ -63,6 +71,11 @@ def _const_compare_digest_backport(a, b): - except ImportError: - PROTOCOL_SSLv23 = PROTOCOL_TLS = 2 - -+try: -+ from ssl import PROTOCOL_TLS_CLIENT -+except ImportError: -+ PROTOCOL_TLS_CLIENT = PROTOCOL_TLS -+ - - try: - from ssl import OP_NO_COMPRESSION, OP_NO_SSLv2, OP_NO_SSLv3 -@@ -151,7 +164,7 @@ def wrap_socket(self, socket, server_hostname=None, server_side=False): - "urllib3 from configuring SSL appropriately and may cause " - "certain SSL connections to fail. You can upgrade to a newer " - "version of Python to solve this. For more information, see " -- "https://urllib3.readthedocs.io/en/latest/advanced-usage.html" -+ "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" - "#ssl-warnings", - InsecurePlatformWarning, - ) -@@ -270,7 +283,11 @@ def create_urllib3_context( - Constructed SSLContext object with specified options - :rtype: SSLContext - """ -- context = SSLContext(ssl_version or PROTOCOL_TLS) -+ # PROTOCOL_TLS is deprecated in Python 3.10 -+ if not ssl_version or ssl_version == PROTOCOL_TLS: -+ ssl_version = PROTOCOL_TLS_CLIENT -+ -+ context = SSLContext(ssl_version) - - context.set_ciphers(ciphers or DEFAULT_CIPHERS) - -@@ -305,13 +322,25 @@ def create_urllib3_context( - ) is not None: - context.post_handshake_auth = True - -- context.verify_mode = cert_reqs -- if ( -- getattr(context, "check_hostname", None) is not None -- ): # Platform-specific: Python 3.2 -- # We do our own verification, including fingerprints and alternative -- # hostnames. So disable it here -- context.check_hostname = False -+ def disable_check_hostname(): -+ if ( -+ getattr(context, "check_hostname", None) is not None -+ ): # Platform-specific: Python 3.2 -+ # We do our own verification, including fingerprints and alternative -+ # hostnames. So disable it here -+ context.check_hostname = False -+ -+ # The order of the below lines setting verify_mode and check_hostname -+ # matter due to safe-guards SSLContext has to prevent an SSLContext with -+ # check_hostname=True, verify_mode=NONE/OPTIONAL. This is made even more -+ # complex because we don't know whether PROTOCOL_TLS_CLIENT will be used -+ # or not so we don't know the initial state of the freshly created SSLContext. -+ if cert_reqs == ssl.CERT_REQUIRED: -+ context.verify_mode = cert_reqs -+ disable_check_hostname() -+ else: -+ disable_check_hostname() -+ context.verify_mode = cert_reqs - - # Enable logging of TLS session keys via defacto standard environment variable - # 'SSLKEYLOGFILE', if the feature is available (Python 3.8+). Skip empty values. -@@ -393,7 +422,7 @@ def ssl_wrap_socket( - try: - if hasattr(context, "set_alpn_protocols"): - context.set_alpn_protocols(ALPN_PROTOCOLS) -- except NotImplementedError: -+ except NotImplementedError: # Defensive: in CI, we always have set_alpn_protocols - pass - - # If we detect server_hostname is an IP address then the SNI -@@ -411,7 +440,7 @@ def ssl_wrap_socket( - "This may cause the server to present an incorrect TLS " - "certificate, which can cause validation failures. You can upgrade to " - "a newer version of Python to solve this. For more information, see " -- "https://urllib3.readthedocs.io/en/latest/advanced-usage.html" -+ "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" - "#ssl-warnings", - SNIMissingWarning, - ) -diff --git a/third_party/python/urllib3/urllib3/packages/ssl_match_hostname/_implementation.py b/third_party/python/urllib3/urllib3/util/ssl_match_hostname.py -similarity index 92% -rename from third_party/python/urllib3/urllib3/packages/ssl_match_hostname/_implementation.py -rename to third_party/python/urllib3/urllib3/util/ssl_match_hostname.py -index 689208d3c63f1..1dd950c489607 100644 ---- a/third_party/python/urllib3/urllib3/packages/ssl_match_hostname/_implementation.py -+++ b/third_party/python/urllib3/urllib3/util/ssl_match_hostname.py -@@ -9,7 +9,7 @@ - # ipaddress has been backported to 2.6+ in pypi. If it is installed on the - # system, use it to handle IPAddress ServerAltnames (this was added in - # python-3.5) otherwise only do DNS matching. This allows --# backports.ssl_match_hostname to continue to be used in Python 2.7. -+# util.ssl_match_hostname to continue to be used in Python 2.7. - try: - import ipaddress - except ImportError: -@@ -78,7 +78,8 @@ def _dnsname_match(dn, hostname, max_wildcards=1): - - def _to_unicode(obj): - if isinstance(obj, str) and sys.version_info < (3,): -- obj = unicode(obj, encoding="ascii", errors="strict") -+ # ignored flake8 # F821 to support python 2.7 function -+ obj = unicode(obj, encoding="ascii", errors="strict") # noqa: F821 - return obj - - -@@ -111,11 +112,9 @@ def match_hostname(cert, hostname): - try: - # Divergence from upstream: ipaddress can't handle byte str - host_ip = ipaddress.ip_address(_to_unicode(hostname)) -- except ValueError: -- # Not an IP address (common case) -- host_ip = None -- except UnicodeError: -- # Divergence from upstream: Have to deal with ipaddress not taking -+ except (UnicodeError, ValueError): -+ # ValueError: Not an IP address (common case) -+ # UnicodeError: Divergence from upstream: Have to deal with ipaddress not taking - # byte strings. addresses should be all ascii, so we consider it not - # an ipaddress in this case - host_ip = None -@@ -123,7 +122,7 @@ def match_hostname(cert, hostname): - # Divergence from upstream: Make ipaddress library optional - if ipaddress is None: - host_ip = None -- else: -+ else: # Defensive - raise - dnsnames = [] - san = cert.get("subjectAltName", ()) -diff --git a/third_party/python/urllib3/urllib3/util/ssltransport.py b/third_party/python/urllib3/urllib3/util/ssltransport.py -index 1e41354f5d458..4a7105d17916a 100644 ---- a/third_party/python/urllib3/urllib3/util/ssltransport.py -+++ b/third_party/python/urllib3/urllib3/util/ssltransport.py -@@ -2,8 +2,8 @@ - import socket - import ssl - --from urllib3.exceptions import ProxySchemeUnsupported --from urllib3.packages import six -+from ..exceptions import ProxySchemeUnsupported -+from ..packages import six - - SSL_BLOCKSIZE = 16384 - -@@ -193,7 +193,7 @@ def _wrap_ssl_read(self, len, buffer=None): - raise - - def _ssl_io_loop(self, func, *args): -- """ Performs an I/O loop between incoming/outgoing and the socket.""" -+ """Performs an I/O loop between incoming/outgoing and the socket.""" - should_loop = True - ret = None - -diff --git a/third_party/python/urllib3/urllib3/util/timeout.py b/third_party/python/urllib3/urllib3/util/timeout.py -index ff69593b05b5e..78e18a6272482 100644 ---- a/third_party/python/urllib3/urllib3/util/timeout.py -+++ b/third_party/python/urllib3/urllib3/util/timeout.py -@@ -2,9 +2,8 @@ - - import time - --# The default socket timeout, used by httplib to indicate that no timeout was --# specified by the user --from socket import _GLOBAL_DEFAULT_TIMEOUT -+# The default socket timeout, used by httplib to indicate that no timeout was; specified by the user -+from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout - - from ..exceptions import TimeoutStateError - -@@ -116,6 +115,10 @@ def __repr__(self): - # __str__ provided for backwards compatibility - __str__ = __repr__ - -+ @classmethod -+ def resolve_default_timeout(cls, timeout): -+ return getdefaulttimeout() if timeout is cls.DEFAULT_TIMEOUT else timeout -+ - @classmethod - def _validate_timeout(cls, value, name): - """Check that a timeout attribute is valid. -diff --git a/third_party/python/urllib3/urllib3/util/url.py b/third_party/python/urllib3/urllib3/util/url.py -index 6ff238fe3cbd0..e5682d3be4293 100644 ---- a/third_party/python/urllib3/urllib3/util/url.py -+++ b/third_party/python/urllib3/urllib3/util/url.py -@@ -50,7 +50,7 @@ - "(?:(?:%(hex)s:){0,6}%(hex)s)?::", - ] - --UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~" -+UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~" - IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")" - ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+" - IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]" -@@ -63,12 +63,12 @@ - BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$") - ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$") - --SUBAUTHORITY_PAT = (u"^(?:(.*)@)?(%s|%s|%s)(?::([0-9]{0,5}))?$") % ( -+_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % ( - REG_NAME_PAT, - IPV4_PAT, - IPV6_ADDRZ_PAT, - ) --SUBAUTHORITY_RE = re.compile(SUBAUTHORITY_PAT, re.UNICODE | re.DOTALL) -+_HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL) - - UNRESERVED_CHARS = set( - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~" -@@ -279,6 +279,9 @@ def _normalize_host(host, scheme): - if scheme in NORMALIZABLE_SCHEMES: - is_ipv6 = IPV6_ADDRZ_RE.match(host) - if is_ipv6: -+ # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as -+ # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID -+ # separator as necessary to return a valid RFC 4007 scoped IP. - match = ZONE_ID_RE.search(host) - if match: - start, end = match.span(1) -@@ -300,7 +303,7 @@ def _normalize_host(host, scheme): - - - def _idna_encode(name): -- if name and any([ord(x) > 128 for x in name]): -+ if name and any(ord(x) >= 128 for x in name): - try: - import idna - except ImportError: -@@ -331,7 +334,7 @@ def parse_url(url): - """ - Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is - performed to parse incomplete urls. Fields not provided will be None. -- This parser is RFC 3986 compliant. -+ This parser is RFC 3986 and RFC 6874 compliant. - - The parser logic and helper functions are based heavily on - work done in the ``rfc3986`` module. -@@ -365,7 +368,9 @@ def parse_url(url): - scheme = scheme.lower() - - if authority: -- auth, host, port = SUBAUTHORITY_RE.match(authority).groups() -+ auth, _, host_port = authority.rpartition("@") -+ auth = auth or None -+ host, port = _HOST_PORT_RE.match(host_port).groups() - if auth and normalize_uri: - auth = _encode_invalid_chars(auth, USERINFO_CHARS) - if port == "": -diff --git a/third_party/python/urllib3/urllib3/util/wait.py b/third_party/python/urllib3/urllib3/util/wait.py -index c280646c7be0b..21b4590b3dc9b 100644 ---- a/third_party/python/urllib3/urllib3/util/wait.py -+++ b/third_party/python/urllib3/urllib3/util/wait.py -@@ -42,7 +42,6 @@ class NoWayToWaitForSocketError(Exception): - def _retry_on_intr(fn, timeout): - return fn(timeout) - -- - else: - # Old and broken Pythons. - def _retry_on_intr(fn, timeout): diff --git a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.6.0.bb b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.6.0.bb deleted file mode 100644 index 4d9bb0e585..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.6.0.bb +++ /dev/null @@ -1,98 +0,0 @@ -SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" -HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" - -SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ - file://0001-Cargo.toml-do-not-abort-on-panic.patch \ - file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ - file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ - file://0004-use-asm-sgidefs.h.patch \ - file://fix-musl-build.patch \ - file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ - file://riscv32.patch \ - file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ - file://0001-rewrite-cargo-host-linker-in-python3.patch \ - file://musl-disable-stackwalk.patch \ - file://0001-add-arm-to-list-of-mozinline.patch \ - file://py3.12.patch \ - file://armv5.patch \ - " -SRC_URI[sha256sum] = "66d7e6e5129ac8e6fe83e24227dc7bb8dc42650bc53b21838e614de80d22bc66" - -S = "${WORKDIR}/firefox-${PV}" - -inherit pkgconfig perlnative python3native rust - -DEPENDS += "zlib cargo-native python3 icu" -DEPENDS:remove:mipsarch = "icu" -DEPENDS:remove:powerpc:toolchain-clang = "icu" - -B = "${WORKDIR}/build" - -export PYTHONPATH = "${S}/build:\ -${S}/third_party/python/PyYAML/lib3:\ -${S}/testing/mozbase/mozfile:\ -${S}/python/mozboot:\ -${S}/third_party/python/distro:\ -${S}/testing/mozbase/mozinfo:\ -${S}/config:\ -${S}/testing/mozbase/manifestparser:\ -${S}/third_party/python/pytoml:\ -${S}/testing/mozbase/mozprocess:\ -${S}/third_party/python/six:\ -${S}/python/mozbuild:\ -${S}/python/mozbuild/mozbuild:\ -${S}/python/mach:\ -${S}/third_party/python/jsmin:\ -${S}/python/mozversioncontrol" - -export HOST_CC = "${BUILD_CC}" -export HOST_CXX = "${BUILD_CXX}" -export HOST_CFLAGS = "${BUILD_CFLAGS}" -export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" -export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" - -export AS = "${CC}" - -export RUSTFLAGS - -JIT ?= "" -JIT:mipsarch = "--disable-jit" -ICU ?= "--with-system-icu" -ICU:mipsarch = "" -ICU:powerpc:toolchain-clang = "" - -do_configure() { - cd ${B} - python3 ${S}/configure.py \ - --enable-project=js \ - --target=${RUST_HOST_SYS} \ - --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --disable-jemalloc \ - --disable-strip \ - ${JIT} \ - ${ICU} -} -do_configure[cleandirs] += "${B}" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -inherit multilib_script multilib_header - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" -MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config" - -do_install:append() { - oe_multilib_header mozjs-${MAJ_VER}/js-config.h - sed -e 's@${STAGING_DIR_HOST}@@g' \ - -i ${D}${bindir}/js${MAJ_VER}-config - rm -f ${D}${libdir}/libjs_static.ajs -} - -PACKAGES =+ "lib${BPN}" -FILES:lib${BPN} += "${libdir}/lib*" diff --git a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb new file mode 100644 index 0000000000..4e36acabb4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb @@ -0,0 +1,97 @@ +SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" +HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" + +SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ + file://0001-Cargo.toml-do-not-abort-on-panic.patch \ + file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ + file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ + file://0004-use-asm-sgidefs.h.patch \ + file://fix-musl-build.patch \ + file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ + file://riscv32.patch \ + file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ + file://0001-rewrite-cargo-host-linker-in-python3.patch \ + file://musl-disable-stackwalk.patch \ + file://0001-add-arm-to-list-of-mozinline.patch \ + file://armv5.patch \ + " +SRC_URI[sha256sum] = "af8086f23efc8492d286671f6035b1a915de6f4ed5c7897e40be0e1cb6b895ea" + +S = "${WORKDIR}/firefox-${PV}" + +inherit pkgconfig perlnative python3native rust + +DEPENDS += "zlib cargo-native python3 icu" +DEPENDS:remove:mipsarch = "icu" +DEPENDS:remove:powerpc:toolchain-clang = "icu" + +B = "${WORKDIR}/build" + +export PYTHONPATH = "${S}/build:\ +${S}/third_party/python/PyYAML/lib3:\ +${S}/testing/mozbase/mozfile:\ +${S}/python/mozboot:\ +${S}/third_party/python/distro:\ +${S}/testing/mozbase/mozinfo:\ +${S}/config:\ +${S}/testing/mozbase/manifestparser:\ +${S}/third_party/python/pytoml:\ +${S}/testing/mozbase/mozprocess:\ +${S}/third_party/python/six:\ +${S}/python/mozbuild:\ +${S}/python/mozbuild/mozbuild:\ +${S}/python/mach:\ +${S}/third_party/python/jsmin:\ +${S}/python/mozversioncontrol" + +export HOST_CC = "${BUILD_CC}" +export HOST_CXX = "${BUILD_CXX}" +export HOST_CFLAGS = "${BUILD_CFLAGS}" +export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" +export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" + +export AS = "${CC}" + +export RUSTFLAGS + +JIT ?= "" +JIT:mipsarch = "--disable-jit" +ICU ?= "--with-system-icu" +ICU:mipsarch = "" +ICU:powerpc:toolchain-clang = "" + +do_configure() { + cd ${B} + python3 ${S}/configure.py \ + --enable-project=js \ + --target=${RUST_HOST_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-jemalloc \ + --disable-strip \ + ${JIT} \ + ${ICU} +} +do_configure[cleandirs] += "${B}" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +inherit multilib_script multilib_header + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" +MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config" + +do_install:append() { + oe_multilib_header mozjs-${MAJ_VER}/js-config.h + sed -e 's@${STAGING_DIR_HOST}@@g' \ + -i ${D}${bindir}/js${MAJ_VER}-config + rm -f ${D}${libdir}/libjs_static.ajs +} + +PACKAGES =+ "lib${BPN}" +FILES:lib${BPN} += "${libdir}/lib*" diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-jsauthority-Bump-mozjs-to-115.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-jsauthority-Bump-mozjs-to-115.patch deleted file mode 100644 index 163a03cfc3..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-jsauthority-Bump-mozjs-to-115.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2f0de2a831ab106fce210c1d65baef041256bc18 Mon Sep 17 00:00:00 2001 -From: Xi Ruoyao -Date: Mon, 18 Sep 2023 01:53:04 +0800 -Subject: [PATCH] jsauthority: Bump mozjs to 115 - -No code change is needed! - -Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/b340f50b7bb963863ede7c63f9a0b5c50c80c1e1] -Signed-off-by: Alexander Kanavin ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 3b96562..92b68fd 100644 ---- a/meson.build -+++ b/meson.build -@@ -153,7 +153,7 @@ if js_engine == 'duktape' - func = 'pthread_condattr_setclock' - config_h.set('HAVE_' + func.to_upper(), cc.has_function(func, prefix : '#include ')) - elif js_engine == 'mozjs' -- js_dep = dependency('mozjs-102') -+ js_dep = dependency('mozjs-115') - - _system = host_machine.system().to_lower() - if _system.contains('freebsd') diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch index 9a097274a4..4f008f7a97 100644 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch @@ -1,4 +1,4 @@ -From 046d853818f18bac5df4dfc007151e06fd64a5b3 Mon Sep 17 00:00:00 2001 +From 95148a804be66092564f81306a02f625d5b8a5d0 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Sun, 17 Sep 2023 23:26:59 +0200 Subject: [PATCH] polkit.service.in: disable MemoryDenyWriteExecute @@ -16,11 +16,11 @@ Signed-off-by: Markus Volk 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/polkit.service.in b/data/polkit.service.in -index 2113ff7..42dfd90 100644 +index e6db351..4390cce 100644 --- a/data/polkit.service.in +++ b/data/polkit.service.in -@@ -14,7 +14,7 @@ Group=@polkitd_user@ - IPAddressDeny=any +@@ -12,7 +12,7 @@ ExecStart=@libprivdir@/polkitd --no-debug + User=@polkitd_user@ LimitMEMLOCK=0 LockPersonality=yes -MemoryDenyWriteExecute=yes @@ -28,6 +28,3 @@ index 2113ff7..42dfd90 100644 NoNewPrivileges=yes PrivateDevices=yes PrivateNetwork=yes --- -2.41.0 - diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_123.bb b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_123.bb deleted file mode 100644 index df9d25e9f4..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_123.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "PolicyKit Authorization Framework" -DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" - -SRC_URI = "git://gitlab.freedesktop.org/polkit/polkit.git;protocol=https;branch=master \ - file://0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch \ - file://0001-jsauthority-Bump-mozjs-to-115.patch \ - " - -S = "${WORKDIR}/git" -SRCREV = "fc8b07e71d99f88a29258cde99b913b44da1846d" - -DEPENDS = "expat glib-2.0" - -inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -PACKAGECONFIG = " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ - dbus \ - mozjs \ -" -PACKAGECONFIG[dbus] = ",,dbus" -PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" -PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" -PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd" -PACKAGECONFIG[consolekit] = ",,,consolekit" - -# Default to mozjs javascript library -PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" -# duktape javascript engine is much smaller and faster but is not compatible with -# same javascript standards as mozjs. For example array.includes() function is not -# supported. Test rule compatibility when switching to duktape. -PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" - -SYSTEMD_SERVICE:${PN} = "${BPN}.service" -SYSTEMD_AUTO_ENABLE = "disable" - -do_install:append() { - #Fix up permissions on polkit rules.d to work with rpm4 constraints - chmod 700 ${D}/${datadir}/polkit-1/rules.d - chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d - chown polkitd:root ${D}/${datadir}/polkit-1/rules.d - chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d -} - -FILES:${PN} += "${libdir}/polkit-1 ${nonarch_libdir}/polkit-1 ${datadir}" diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb new file mode 100644 index 0000000000..3eb0d52806 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb @@ -0,0 +1,61 @@ +SUMMARY = "PolicyKit Authorization Framework" +DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" + +SRC_URI = "git://gitlab.freedesktop.org/polkit/polkit.git;protocol=https;branch=master \ + file://0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch \ + " + +S = "${WORKDIR}/git" +SRCREV = "82f0924dc0eb23b9df68e88dbaf9e07c81940a5a" + +DEPENDS = "expat glib-2.0" + +inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +PACKAGECONFIG = " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ + dbus \ + mozjs \ +" +PACKAGECONFIG[dbus] = ",,dbus" +PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" +PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" +PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd" +PACKAGECONFIG[consolekit] = ",,,consolekit" + +# Default to mozjs javascript library +PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" +# duktape javascript engine is much smaller and faster but is not compatible with +# same javascript standards as mozjs. For example array.includes() function is not +# supported. Test rule compatibility when switching to duktape. +PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install:append() { + #Fix up permissions on polkit rules.d to work with rpm4 constraints + chmod 700 ${D}/${datadir}/polkit-1/rules.d + chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d + chown polkitd:root ${D}/${datadir}/polkit-1/rules.d + chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d +} + +FILES:${PN} += " \ + ${libdir}/pam.d/polkit-1 \ + ${libdir}/sysusers.d \ + ${libdir}/polkit-1 \ + ${nonarch_libdir}/pam.d/polkit-1 \ + ${nonarch_libdir}/sysusers.d \ + ${nonarch_libdir}/polkit-1 \ + ${datadir} \ +" diff --git a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb index 6cdfef9d11..7b3d728216 100644 --- a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb +++ b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb @@ -55,7 +55,7 @@ do_install_ptest () { } -RDEPENDS:${PN}-ptest += "bash lsb-release make" +RDEPENDS:${PN}-ptest += "bash file lsb-release make" RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils" RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils" diff --git a/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb b/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb index 339bb35f2d..d53e1a276b 100644 --- a/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb +++ b/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb @@ -9,8 +9,9 @@ GO_INSTALL = "\ ${GO_IMPORT}/cmd/crucible \ ${GO_IMPORT}/cmd/habtool \ " -SRCREV = "358b5e7adb7f101f870f2b42fe5371460a3cccb6" +SRCREV = "dec27cd4e0e0db106c0a21d429c04ca8d36bbdd5" +export GOPROXY = "https://proxy.golang.org,direct" # Workaround for network access issue during compile step. # This needs to be fixed in the recipes buildsystem so that # it can be accomplished during do_fetch task. diff --git a/meta-openembedded/meta-oe/recipes-support/emacs/emacs_29.1.bb b/meta-openembedded/meta-oe/recipes-support/emacs/emacs_29.1.bb index ae35367ac4..5cbe4551c0 100644 --- a/meta-openembedded/meta-oe/recipes-support/emacs/emacs_29.1.bb +++ b/meta-openembedded/meta-oe/recipes-support/emacs/emacs_29.1.bb @@ -18,6 +18,7 @@ CVE_STATUS[CVE-2007-6109] = "fixed-version: The CPE in the NVD database doesn't PACKAGECONFIG[gnutls] = "--with-gnutls=yes,--with-gnutls=no,gnutls" PACKAGECONFIG[kerberos] = "--with-kerberos=yes,--with-kerberos=no,krb5" PACKAGECONFIG[libgmp] = "--with-libgmp=yes,--with-libgmp=no,gmp" +PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux" PACKAGECONFIG ??= "gnutls kerberos libgmp" diff --git a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb index 1e92d00790..33df709a63 100644 --- a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb +++ b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb @@ -24,7 +24,7 @@ RDEPENDS:${PN}-ptest += " \ bash \ ${@bb.utils.contains('PTEST_ENABLED', '1', 'shunit2', '', d)} \ " -RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim" +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim kernel-module-configfs" do_install_ptest:append() { install -m 0755 ${S}/tools/gpio-tools-test.bash ${D}${PTEST_PATH}/tests/ diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-RH-fixup-udev-rules-for-redhat.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-RH-fixup-udev-rules-for-redhat.patch new file mode 100644 index 0000000000..0ec5b5b1cd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-RH-fixup-udev-rules-for-redhat.patch @@ -0,0 +1,74 @@ +From 1e1ba9ecc16895bf472eae345d44631b65629611 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 13 Apr 2017 07:22:23 -0500 +Subject: [PATCH 01/12] RH: fixup udev rules for redhat + +The multipath rules need to run after scsi_id is run. This means moving +them after 60-persistent-storage.rules for redhat. Redhat also uses a +different naming scheme for partitions than SuSE. Also, there are some +false warnings that gcc throws because of the changed options. Fix these +too. + +Signed-off-by: Benjamin Marzinski + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + Makefile.inc | 2 +- + kpartx/kpartx.rules | 2 +- + multipath/Makefile | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 5668e638..de89b21f 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -59,7 +59,7 @@ tmpfilesdir := $(systemd_prefix)lib/tmpfiles.d + modulesloaddir := $(systemd_prefix)lib/modules-load.d + libudevdir := $(systemd_prefix)lib/udev + udevrulesdir := $(libudevdir)/rules.d +-bindir := $(exec_prefix)sbin ++bindir := $(exec_prefix)/usr/sbin + mandir := $(usr_prefix)share/man + LIB := $(if $(shell test -d /lib64 && echo 1),lib64,lib) + syslibdir := $(prefix)$(LIB) +diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules +index 1969dee0..d2b28233 100644 +--- a/kpartx/kpartx.rules ++++ b/kpartx/kpartx.rules +@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end" + GOTO="kpartx_end" + + LABEL="run_kpartx" +-RUN+="/sbin/kpartx -un -p -part /dev/$name" ++RUN+="/sbin/kpartx -un /dev/$name" + + LABEL="kpartx_end" +diff --git a/multipath/Makefile b/multipath/Makefile +index 67fb5e62..2ea9e528 100644 +--- a/multipath/Makefile ++++ b/multipath/Makefile +@@ -27,7 +27,7 @@ install: + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) + $(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) + $(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir) +- $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules ++ $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir) + $(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8 +@@ -50,7 +50,7 @@ uninstall: + $(Q)$(RM) $(DESTDIR)$(udevrulesdir)/99-z-dm-mpath-late.rules + $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf + $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf +- $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules ++ $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules + $(Q)$(RM) $(DESTDIR)$(mandir)/man8/$(EXEC).8 + $(Q)$(RM) $(DESTDIR)$(mandir)/man5/$(EXEC).conf.5 + $(Q)$(RM) $(DESTDIR)$(tmpfilesdir)/multipath.conf +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch deleted file mode 100644 index 3b0a704480..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ee9f7b6e764be5668bc958f8bb97a46e5056d050 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Mon, 25 May 2020 23:22:55 -0700 -Subject: [PATCH] add explicit dependency on libraries - -[snip] -gcc/i686-overc-linux/10.1.0/ld: cannot find -lmpathpersist -collect2: error: ld returned 1 exit status -Makefile:36: recipe for target 'multipathd' failed -make[1]: *** [multipathd] Error 1 -make[1]: Leaving directory 'git/multipathd' -Makefile:29: recipe for target 'multipathd' failed -make: *** [multipathd] Error 2 -ln -sf libmpathpersist.so.0 libmpathpersist.so -[snip] - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile b/Makefile -index f195b570..2d22881c 100644 ---- a/Makefile -+++ b/Makefile -@@ -78,6 +78,7 @@ libmultipath: libmpathutil - libmpathpersist libmpathvalid multipath multipathd: libmultipath - libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath - mpathpersist multipathd: libmpathpersist -+libmultipath mpathpersist multipath multipathd: libmpathcmd - - DEPS_ON_MULTIPATH := \ - multipath \ --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch deleted file mode 100644 index bc07d75cc1..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 51f1f351262a31d94c10504e4d135526c6a7caeb Mon Sep 17 00:00:00 2001 -From: Wang Mingyu -Date: Sun, 10 May 2020 21:22:53 +0800 -Subject: [PATCH] fix bug of do_compile and do_install - -when multiple processes make run in parallel, -because of dependency error will occur. - -Signed-off-by: Wang Mingyu - -[OP: Rebase to 0.9.3] -[OP: Drop dependencies that are already present in the 0.9.3 Makefile] -Signed-off-by: Ovidiu Panait ---- -Upstream-Status: Pending - - Makefile | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/Makefile b/Makefile -index 27b4641f..f195b570 100644 ---- a/Makefile -+++ b/Makefile -@@ -79,6 +79,16 @@ libmpathpersist libmpathvalid multipath multipathd: libmultipath - libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath - mpathpersist multipathd: libmpathpersist - -+DEPS_ON_MULTIPATH := \ -+ multipath \ -+ multipathd \ -+ mpathpersist \ -+ libmpathpersist -+ -+$(DEPS_ON_MULTIPATH:=.install): libmultipath.install -+mpathpersist.install: libmpathpersist.install -+libdmmp.install libmultipath/foreign.install: mpathpersist.install -+ - libmultipath/checkers.install \ - libmultipath/prioritizers.install \ - libmultipath/foreign.install: libmultipath.install --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0002-RH-Remove-the-property-blacklist-exception-builtin.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0002-RH-Remove-the-property-blacklist-exception-builtin.patch new file mode 100644 index 0000000000..a24c827dc7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0002-RH-Remove-the-property-blacklist-exception-builtin.patch @@ -0,0 +1,63 @@ +From bb6db01cc19940bb5162c1cc0c9b5f8e4c209822 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 1 Mar 2024 10:34:06 +0800 +Subject: [PATCH 02/12] RH: Remove the property blacklist exception builtin + +Multipath set the default property blacklist exceptions to +(ID_SCSI_VPD|ID_WWN). This has the effect of blacklisting some internal +devices. These devices may never have multiple paths, but it is nice +to be able to set multipath up on them all the same. This patch simply +removes the default, and makes it so that if no property +blacklist_exception is given, then devices aren't failed for not matching +it. + +Signed-off-by: Benjamin Marzinski + +Upsteam-Status: Pending + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/blacklist.c | 16 +++++----------- + 1 file changed, 5 insertions(+), 11 deletions(-) + +diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c +index 75100b20..4fdaca76 100644 +--- a/libmultipath/blacklist.c ++++ b/libmultipath/blacklist.c +@@ -221,15 +221,6 @@ setup_default_blist (struct config * conf) + struct hwentry *hwe; + int i; + +- if (nvme_multipath_enabled()) { +- if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z])", +- ORIGIN_DEFAULT)) +- return 1; +- } else { +- if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", +- ORIGIN_DEFAULT)) +- return 1; +- } + if (store_ble(conf->elist_property, "(SCSI_IDENT_|ID_WWN)", ORIGIN_DEFAULT)) + return 1; + +@@ -464,8 +455,11 @@ filter_property(const struct config *conf, struct udev_device *udev, + r = MATCH_NOTHING; + } + +- log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); +- return r; ++ if (VECTOR_SIZE(conf->elist_property)) { ++ log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); ++ return r; ++ } ++ return 0; + } + + static void free_ble(struct blentry *ble) +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0003-RH-don-t-start-without-a-config-file.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0003-RH-don-t-start-without-a-config-file.patch new file mode 100644 index 0000000000..54b3bdc863 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0003-RH-don-t-start-without-a-config-file.patch @@ -0,0 +1,117 @@ +From de8ee3480ec7479ed014c197a9d747403f6e0237 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 23 Nov 2018 17:25:15 +0800 +Subject: [PATCH 03/12] RH: don't start without a config file + +If /etc/multipath.conf doesn't exist, don't start multipathd and blacklist +all devices when running multipath. A completely blank configuration file +is almost never what users want. Also, people may have the multipath +packages installed but don't want to use them. This patch provides a +simple way to disable multipath. Simply removing or renaming +/etc/multipath.conf will keep multipath from doing anything. + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/config.c | 18 ++++++++++++++++++ + libmultipath/config.h | 1 + + multipath/multipath.rules.in | 1 + + multipathd/multipathd.8.in | 2 ++ + multipathd/multipathd.service.in | 1 + + 5 files changed, 23 insertions(+) + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 83fa7369..8a3a8f37 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -26,6 +26,7 @@ + #include "mpath_cmd.h" + #include "propsel.h" + #include "foreign.h" ++#include "version.h" + + /* + * We don't support re-initialization after +@@ -959,6 +960,23 @@ int _init_config (const char *file, struct config *conf) + } + factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); + validate_pctable(conf->overrides, 0, file); ++ } else { ++ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); ++ if (conf->blist_devnode == NULL) { ++ conf->blist_devnode = vector_alloc(); ++ if (!conf->blist_devnode) { ++ conf->blist_devnode = vector_alloc(); ++ if (!conf->blist_devnode) { ++ condlog(0, "cannot allocate blacklist\n"); ++ goto out; ++ } ++ } ++ if (store_ble(conf->blist_devnode, strdup(".*"), ++ ORIGIN_NO_CONFIG)) { ++ condlog(0, "cannot store default no-config blacklist\n"); ++ goto out; ++ } ++ } + } + + conf->processed_main_config = 1; +diff --git a/libmultipath/config.h b/libmultipath/config.h +index 384193ab..158cebf0 100644 +--- a/libmultipath/config.h ++++ b/libmultipath/config.h +@@ -10,6 +10,7 @@ + + #define ORIGIN_DEFAULT 0 + #define ORIGIN_CONFIG 1 ++#define ORIGIN_NO_CONFIG 2 + + enum devtypes { + DEV_NONE, +diff --git a/multipath/multipath.rules.in b/multipath/multipath.rules.in +index 780bf852..2c518378 100644 +--- a/multipath/multipath.rules.in ++++ b/multipath/multipath.rules.in +@@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath" + ENV{nompath}=="?*", GOTO="end_mpath" + IMPORT{cmdline}="multipath" + ENV{multipath}=="off", GOTO="end_mpath" ++TEST!="/etc/multipath.conf", GOTO="end_mpath" + + ENV{DEVTYPE}!="partition", GOTO="test_dev" + IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH" +diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in +index f1cab3ff..5ae21db1 100644 +--- a/multipathd/multipathd.8.in ++++ b/multipathd/multipathd.8.in +@@ -49,6 +49,8 @@ map regains its maximum performance and redundancy. + With the \fB-k\fR option, \fBmultipathd\fR acts as a client utility that + sends commands to a running instance of the multipathd daemon (see + \fBCOMMANDS\fR below). ++ ++In this Linux distribution, multipathd does not run unless a /etc/multipath.conf file exists. + . + . + .\" ---------------------------------------------------------------------------- +diff --git a/multipathd/multipathd.service.in b/multipathd/multipathd.service.in +index 6d03ff71..0cd85102 100644 +--- a/multipathd/multipathd.service.in ++++ b/multipathd/multipathd.service.in +@@ -5,6 +5,7 @@ Before=local-fs-pre.target blk-availability.service shutdown.target + Wants=systemd-udevd-kernel.socket @MODPROBE_UNIT@ + After=systemd-udevd-kernel.socket @MODPROBE_UNIT@ + After=multipathd.socket systemd-remount-fs.service ++ConditionPathExists=/etc/multipath.conf + Before=initrd-cleanup.service + DefaultDependencies=no + Conflicts=shutdown.target +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch new file mode 100644 index 0000000000..91477a44cb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch @@ -0,0 +1,55 @@ +From f1b74f21875d6d9f0a5ac3d67df40a28b167052a Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 26 Nov 2018 09:19:17 +0800 +Subject: [PATCH 04/12] RH: use rpm optflags if present + +Use the passed in optflags when compiling as an RPM, and keep the +default flags as close as possible to the current fedora flags, while +still being generic. + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + Makefile.inc | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index de89b21f..6ac632ff 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -95,7 +95,15 @@ SYSTEMD_LIBDEPS := $(if $(SYSTEMD),$(if $(shell test $(SYSTEMD) -gt 209 && echo + MODPROBE_UNIT := $(shell test "0$(SYSTEMD)" -lt 245 2>/dev/null || \ + echo "modprobe@dm_multipath.service") + +-OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 ++ifndef RPM_OPT_FLAGS ++ OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 ++else ++ OPTFLAGS = $(RPM_OPT_FLAGS) ++endif ++OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=0 -Werror=implicit-int \ ++ -Werror=implicit-function-declaration -Wno-sign-compare \ ++ -Wno-unused-parameter -Werror=cast-qual \ ++ -Werror=discarded-qualifiers + WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ + -Werror=implicit-function-declaration -Werror=format-security \ + $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) $(W_URCU_TYPE_LIMITS) +@@ -105,7 +113,7 @@ CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \ + -DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(configdir)\" \ + -DDEFAULT_CONFIGFILE=\"$(configfile)\" -DSTATE_DIR=\"$(statedir)\" \ + -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP +-CFLAGS := -std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe ++CFLAGS := -std=gnu99 $(CFLAGS) $(OPTFLAGS) -pipe + BIN_CFLAGS := -fPIE -DPIE + LIB_CFLAGS := -fPIC + SHARED_FLAGS := -shared +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0005-RH-add-mpathconf.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0005-RH-add-mpathconf.patch new file mode 100644 index 0000000000..c6089612b3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0005-RH-add-mpathconf.patch @@ -0,0 +1,653 @@ +From 8f52504859704466667e042baf437c2b6272ffb9 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 26 Nov 2018 09:55:12 +0800 +Subject: [PATCH 05/12] RH: add mpathconf + +mpathconf is a program (largely based on lvmcomf) to help users +configure /etc/multipath.conf and enable or disable multipathing. It +has a couple of built-in options that can be set directly from the +command line. But, mostly it is used to get a multipath.conf file +with the OS defaults, and to enable and disable multipathing via +a single command. + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/config.c | 1 + + multipath/Makefile | 4 + + multipath/mpathconf | 464 ++++++++++++++++++++++++++++++++++++++++++ + multipath/mpathconf.8 | 101 +++++++++ + 4 files changed, 570 insertions(+) + create mode 100644 multipath/mpathconf + create mode 100644 multipath/mpathconf.8 + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 8a3a8f37..a40b41ab 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -962,6 +962,7 @@ int _init_config (const char *file, struct config *conf) + validate_pctable(conf->overrides, 0, file); + } else { + condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); ++ condlog(0, "You can run /sbin/mpathconf to create or modify /etc/multipath.conf"); + if (conf->blist_devnode == NULL) { + conf->blist_devnode = vector_alloc(); + if (!conf->blist_devnode) { +diff --git a/multipath/Makefile b/multipath/Makefile +index 2ea9e528..6b1fa09e 100644 +--- a/multipath/Makefile ++++ b/multipath/Makefile +@@ -24,6 +24,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so + install: + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(Q)$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ ++ $(Q)$(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/ + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) + $(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) + $(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir) +@@ -34,6 +35,7 @@ install: + $(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir)/man8 + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man5 + $(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(mandir)/man5 ++ $(Q)$(INSTALL_PROGRAM) -m 644 mpathconf.8 $(DESTDIR)$(mandir)/man8 + $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir) + ifeq ($(MODPROBE_UNIT),) + $(Q)$(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf +@@ -51,8 +53,10 @@ uninstall: + $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf + $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf + $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules ++ $(Q)$(RM) $(DESTDIR)$(bindir)/mpathconf + $(Q)$(RM) $(DESTDIR)$(mandir)/man8/$(EXEC).8 + $(Q)$(RM) $(DESTDIR)$(mandir)/man5/$(EXEC).conf.5 ++ $(Q)$(RM) $(DESTDIR)$(mandir)/man8/mpathconf.8 + $(Q)$(RM) $(DESTDIR)$(tmpfilesdir)/multipath.conf + + clean: dep_clean +diff --git a/multipath/mpathconf b/multipath/mpathconf +new file mode 100644 +index 00000000..e8391347 +--- /dev/null ++++ b/multipath/mpathconf +@@ -0,0 +1,464 @@ ++#!/bin/bash ++# ++# Copyright (C) 2010 Red Hat, Inc. All rights reserved. ++# ++# This file is part of the device-mapper-multipath package. ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions ++# of the GNU General Public License v.2. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software Foundation, ++# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++# ++# Simple editting of /etc/multipath.conf ++# This program was largely ripped off from lvmconf ++# ++ ++unset ENABLE FIND FRIENDLY MODULE MULTIPATHD HAVE_DISABLE HAVE_WWID_DISABLE HAVE_FIND HAVE_BLACKLIST HAVE_EXCEPTIONS HAVE_DEFAULTS HAVE_FRIENDLY HAVE_MULTIPATHD HAVE_MODULE HAVE_OUTFILE SHOW_STATUS CHANGED_CONFIG WWID_LIST ++ ++DEFAULT_CONFIG="# device-mapper-multipath configuration file ++ ++# For a complete list of the default configuration values, run either: ++# # multipath -t ++# or ++# # multipathd show config ++ ++# For a list of configuration options with descriptions, see the ++# multipath.conf man page. ++ ++defaults { ++ user_friendly_names yes ++ find_multipaths yes ++} ++ ++blacklist_exceptions { ++ property \"(SCSI_IDENT_|ID_WWN)\" ++}" ++ ++CONFIGFILE="/etc/multipath.conf" ++OUTPUTFILE="/etc/multipath.conf" ++MULTIPATHDIR="/etc/multipath" ++TMPFILE="/etc/multipath/.multipath.conf.tmp" ++WWIDS=0 ++ ++function usage ++{ ++ echo "usage: $0 " ++ echo "" ++ echo "Commands:" ++ echo "Enable: --enable " ++ echo "Disable: --disable" ++ echo "Only allow certain wwids (instead of enable): --allow " ++ echo "Set user_friendly_names (Default y): --user_friendly_names " ++ echo "Set find_multipaths (Default y): --find_multipaths " ++ echo "Load the dm-multipath modules on enable (Default y): --with_module " ++ echo "start/stop/reload multipathd (Default n): --with_multipathd " ++ echo "select output file (Default /etc/multipath.conf): --outfile " ++ echo "" ++} ++ ++function add_wwid ++{ ++ INDEX=0 ++ while [ "$INDEX" -lt "$WWIDS" ] ; do ++ if [ "$1" = "${WWID_LIST[$INDEX]}" ] ; then ++ return ++ fi ++ ((INDEX++)) ++ done ++ WWID_LIST[$WWIDS]="$1" ++ ((WWIDS++)) ++} ++ ++function get_dm_deps ++{ ++ shift 3 ++ while [ -n "$1" -a -n "$2" ]; do ++ MAJOR=$(echo $1 | tr -d '(,') ++ MINOR=$(echo $2 | tr -d ')') ++ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` ++ if [ -n "$UUID" ] ; then ++ set_dm_wwid $UUID ++ fi ++ shift 2 ++ done ++} ++ ++function set_dm_wwid ++{ ++ if [[ "$1" =~ ^part[[:digit:]]+-mpath- ]] ; then ++ add_wwid "${1##part*-mpath-}" ++ elif [[ "$1" =~ ^mpath- ]] ; then ++ add_wwid "${1##mpath-}" ++ else ++ get_dm_deps `dmsetup deps -u $1` ++ fi ++} ++ ++function set_wwid ++{ ++ UUID="" ++ if [[ "$1" =~ ^[[:digit:]]+:[[:digit:]]+$ ]] ; then ++ MAJOR=${1%%:*} ++ MINOR=${1##*:} ++ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` ++ else ++ UUID=`dmsetup info -c --noheadings -o uuid $1 2> /dev/null` ++ fi ++ if [ -n "$UUID" ] ; then ++ set_dm_wwid $UUID ++ else ++ add_wwid "$1" ++ fi ++} ++ ++function parse_args ++{ ++ while [ -n "$1" ]; do ++ case $1 in ++ --enable) ++ ENABLE=1 ++ shift ++ ;; ++ --disable) ++ ENABLE=0 ++ shift ++ ;; ++ --allow) ++ ENABLE=2 ++ if [ -n "$2" ]; then ++ set_wwid $2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --user_friendly_names) ++ if [ -n "$2" ]; then ++ FRIENDLY=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --find_multipaths) ++ if [ -n "$2" ]; then ++ FIND=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --with_module) ++ if [ -n "$2" ]; then ++ MODULE=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --with_multipathd) ++ if [ -n "$2" ]; then ++ MULTIPATHD=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --outfile) ++ if [ -n "$2" ]; then ++ OUTPUTFILE=$2 ++ HAVE_OUTFILE=1 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ *) ++ usage ++ exit ++ esac ++ done ++} ++ ++function validate_args ++{ ++ if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$MODULE" ]; then ++ echo "ignoring extra parameters on disable" ++ FRIENDLY="" ++ FIND="" ++ MODULE="" ++ fi ++ if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then ++ echo "--user_friendly_names must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$FIND" ] && [ "$FIND" != "y" -a "$FIND" != "n" ]; then ++ echo "--find_multipaths must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" ]; then ++ SHOW_STATUS=1 ++ fi ++ if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then ++ echo "--with_module must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then ++ echo "--with_multipathd must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then ++ echo "Because --allow makes changes that cannot be automatically reversed," ++ echo "you must set --outfile when you set --allow" ++ exit 1 ++ fi ++} ++ ++function add_blacklist_exceptions ++{ ++ INDEX=0 ++ while [ "$INDEX" -lt "$WWIDS" ] ; do ++ sed -i '/^blacklist_exceptions[[:space:]]*{/ a\ ++ wwid '"\"${WWID_LIST[$INDEX]}\""' ++' $TMPFILE ++ ((INDEX++)) ++ done ++} ++ ++umask 0077 ++ ++parse_args "$@" ++ ++validate_args ++ ++if [ ! -d "$MULTIPATHDIR" ]; then ++ echo "/etc/multipath/ does not exist. failing" ++ exit 1 ++fi ++ ++rm $TMPFILE 2> /dev/null ++echo "$DEFAULT_CONFIG" > $TMPFILE ++if [ -f "$CONFIGFILE" ]; then ++ cp $CONFIGFILE $TMPFILE ++fi ++ ++if grep -q "^blacklist[[:space:]]*{" $TMPFILE ; then ++ HAVE_BLACKLIST=1 ++fi ++ ++if grep -q "^blacklist_exceptions[[:space:]]*{" $TMPFILE ; then ++ HAVE_EXCEPTIONS=1 ++fi ++ ++if grep -q "^defaults[[:space:]]*{" $TMPFILE ; then ++ HAVE_DEFAULTS=1 ++fi ++ ++if [ -z "$MODULE" -o "$MODULE" = "y" ]; then ++ if lsmod | grep -q "dm_multipath" ; then ++ HAVE_MODULE=1 ++ else ++ HAVE_MODULE=0 ++ fi ++fi ++ ++if [ "$MULTIPATHD" = "y" ]; then ++ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then ++ HAVE_MULTIPATHD=1 ++ else ++ HAVE_MULTIPATHD=0 ++ fi ++fi ++ ++if [ "$HAVE_BLACKLIST" = "1" ]; then ++ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*devnode \"\.\?\*\"" ; then ++ HAVE_DISABLE=1 ++ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"" ; then ++ HAVE_DISABLE=0 ++ fi ++fi ++ ++if [ "$HAVE_BLACKLIST" = "1" ]; then ++ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*wwid \"\.\?\*\"" ; then ++ HAVE_WWID_DISABLE=1 ++ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"" ; then ++ HAVE_WWID_DISABLE=0 ++ fi ++fi ++ ++if [ "$HAVE_DEFAULTS" = "1" ]; then ++ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)" ; then ++ HAVE_FIND=1 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)" ; then ++ HAVE_FIND=0 ++ fi ++ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)" ; then ++ HAVE_FRIENDLY=1 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)" ; then ++ HAVE_FRIENDLY=0 ++ fi ++fi ++ ++if [ -n "$SHOW_STATUS" ]; then ++ if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then ++ echo "multipath is enabled" ++ else ++ echo "multipath is disabled" ++ fi ++ if [ -z "$HAVE_FIND" -o "$HAVE_FIND" = 0 ]; then ++ echo "find_multipaths is disabled" ++ else ++ echo "find_multipaths is enabled" ++ fi ++ if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then ++ echo "user_friendly_names is disabled" ++ else ++ echo "user_friendly_names is enabled" ++ fi ++ if [ -n "$HAVE_MODULE" ]; then ++ if [ "$HAVE_MODULE" = 1 ]; then ++ echo "dm_multipath module is loaded" ++ else ++ echo "dm_multipath module is not loaded" ++ fi ++ fi ++ if [ -z "$HAVE_MULTIPATHD" ]; then ++ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then ++ HAVE_MULTIPATHD=1 ++ else ++ HAVE_MULTIPATHD=0 ++ fi ++ fi ++ if [ "$HAVE_MULTIPATHD" = 1 ]; then ++ echo "multipathd is running" ++ else ++ echo "multipathd is not running" ++ fi ++ exit 0 ++fi ++ ++if [ -z "$HAVE_BLACKLIST" ]; then ++ cat >> $TMPFILE <<- _EOF_ ++ ++blacklist { ++} ++_EOF_ ++fi ++ ++if [ -z "$HAVE_DEFAULTS" ]; then ++ cat >> $TMPFILE <<- _EOF_ ++ ++defaults { ++} ++_EOF_ ++fi ++ ++if [ "$ENABLE" = 2 ]; then ++ if [ "$HAVE_DISABLE" = 1 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE ++ fi ++ if [ -z "$HAVE_WWID_DISABLE" ]; then ++ sed -i '/^blacklist[[:space:]]*{/ a\ ++ wwid ".*" ++' $TMPFILE ++ elif [ "$HAVE_WWID_DISABLE" = 0 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"/ wwid ".*"/' $TMPFILE ++ fi ++ if [ "$HAVE_EXCEPTIONS" = 1 ]; then ++ sed -i '/^blacklist_exceptions[[:space:]]*{/,/^}/ {/^[[:space:]]*wwid/ d}' $TMPFILE ++ else ++ cat >> $TMPFILE <<- _EOF_ ++ ++blacklist_exceptions { ++} ++_EOF_ ++ fi ++ add_blacklist_exceptions ++elif [ "$ENABLE" = 1 ]; then ++ if [ "$HAVE_DISABLE" = 1 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE ++ fi ++elif [ "$ENABLE" = 0 ]; then ++ if [ -z "$HAVE_DISABLE" ]; then ++ sed -i '/^blacklist[[:space:]]*{/ a\ ++ devnode ".*" ++' $TMPFILE ++ elif [ "$HAVE_DISABLE" = 0 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"/ devnode ".*"/' $TMPFILE ++ fi ++fi ++ ++if [ "$FIND" = "n" ]; then ++ if [ "$HAVE_FIND" = 1 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)/ find_multipaths no/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$FIND" = "y" ]; then ++ if [ -z "$HAVE_FIND" ]; then ++ sed -i '/^defaults[[:space:]]*{/ a\ ++ find_multipaths yes ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_FIND" = 0 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)/ find_multipaths yes/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ "$FRIENDLY" = "n" ]; then ++ if [ "$HAVE_FRIENDLY" = 1 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)/ user_friendly_names no/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$FRIENDLY" = "y" ]; then ++ if [ -z "$HAVE_FRIENDLY" ]; then ++ sed -i '/^defaults[[:space:]]*{/ a\ ++ user_friendly_names yes ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_FRIENDLY" = 0 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)/ user_friendly_names yes/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ -f "$OUTPUTFILE" ]; then ++ cp $OUTPUTFILE $OUTPUTFILE.old ++ if [ $? != 0 ]; then ++ echo "failed to backup old config file, $OUTPUTFILE not updated" ++ exit 1 ++ fi ++fi ++ ++cp $TMPFILE $OUTPUTFILE ++if [ $? != 0 ]; then ++ echo "failed to copy new config file into place, check $OUTPUTFILE is still OK" ++ exit 1 ++fi ++ ++rm -f $TMPFILE ++ ++if [ "$ENABLE" = 1 ]; then ++ if [ "$HAVE_MODULE" = 0 ]; then ++ modprobe dm_multipath ++ fi ++ if [ "$HAVE_MULTIPATHD" = 0 ]; then ++ systemctl start multipathd.service ++ fi ++elif [ "$ENABLE" = 0 ]; then ++ if [ "$HAVE_MULTIPATHD" = 1 ]; then ++ systemctl stop multipathd.service ++ fi ++elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then ++ systemctl reload multipathd.service ++fi +diff --git a/multipath/mpathconf.8 b/multipath/mpathconf.8 +new file mode 100644 +index 00000000..4cd32672 +--- /dev/null ++++ b/multipath/mpathconf.8 +@@ -0,0 +1,101 @@ ++.TH MPATHCONF 8 "June 2010" "" "Linux Administrator's Manual" ++.SH NAME ++mpathconf - A tool for configuring device-mapper-multipath ++.SH SYNOPSIS ++.B mpathconf ++.RB [\| commands \|] ++.RB [\| options \|] ++.SH DESCRIPTION ++.B mpathconf ++is a utility that creates or modifies ++.B /etc/multipath.conf. ++It can enable or disable multipathing and configure some common options. ++.B mpathconf ++can also load the ++.B dm_multipath ++module, start and stop the ++.B multipathd ++daemon, and configure the ++.B multipathd ++service to start automatically or not. If ++.B mpathconf ++is called with no commands, it will display the current configuration. ++ ++The default options for mpathconf are ++.B --with_module ++The ++.B --with_multipathd ++option is not set by default. Enabling multipathing will load the ++.B dm_multipath ++module but it will not immediately start it. This is so ++that users can manually edit their config file if necessary, before starting ++.B multipathd. ++ ++If ++.B /etc/multipath.conf ++already exists, mpathconf will edit it. If it does not exist, mpathconf will ++create a default file with ++.B user_friendly_names ++and ++.B find_multipaths ++set. To disable these, use the ++.B --user_friendly_names n ++and ++.B --find_multipaths n ++options ++.SH COMMANDS ++.TP ++.B --enable ++Removes any line that blacklists all device nodes from the ++.B /etc/multipath.conf ++blacklist section. ++.TP ++.B --disable ++Adds a line that blacklists all device nodes to the ++.B /etc/multipath.conf ++blacklist section. If no blacklist section exists, it will create one. ++.TP ++.B --user_friendly_name \fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this adds the line ++.B user_friendly_names yes ++to the ++.B /etc/multipath.conf ++defaults section. If set to \fBn\fP, this removes the line, if present. This ++command can be used along with any other command. ++.TP ++.B --find_multipaths\fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this adds the line ++.B find_multipaths yes ++to the ++.B /etc/multipath.conf ++defaults section. If set to \fBn\fP, this removes the line, if present. This ++command can be used aldong with any other command. ++.SH OPTIONS ++.TP ++.B --with_module\fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this runs ++.B modprobe dm_multipath ++to install the multipath modules. This option only works with the ++.B --enable ++command. This option is set to \fBy\fP by default. ++.TP ++.B --with_multipathd { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this runs ++.B service multipathd start ++to start the multipathd daemon on \fB--enable\fP, ++.B service multipathd stop ++to stop the multipathd daemon on \fB--disable\fP, and ++.B service multipathd reload ++to reconfigure multipathd on \fB--user_frindly_names\fP and ++\fB--find_multipaths\fP. ++This option is set to \fBn\fP by default. ++.SH FILES ++.BR /etc/multipath.conf ++.SH "SEE ALSO" ++.BR multipath.conf (5), ++.BR modprobe (8), ++.BR multipath (8), ++.BR multipathd (8), ++.BR service (8), ++.SH AUTHOR ++Benjamin Marzinski +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch new file mode 100644 index 0000000000..8df7de3b48 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch @@ -0,0 +1,95 @@ +From f93248d8e3598ccdc42b6d639107917c9cda268c Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Thu, 26 Sep 2019 16:29:48 +0800 +Subject: [PATCH 06/12] RH: add wwids from kernel cmdline mpath.wwids with -A + +This patch adds another option to multipath, "-A", which reads +/proc/cmdline for mpath.wwid= options, and adds any wwids it finds +to /etc/multipath/wwids. While this isn't usually important during +normal operation, since these wwids should already be added, it can be +helpful during installation, to make sure that multipath can claim +devices as its own, before LVM or something else makes use of them. The +patch also execs "/sbin/multipath -A" before running multipathd in +multipathd.service + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/wwids.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + libmultipath/wwids.h | 1 + + 2 files changed, 45 insertions(+) + +diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c +index 591cd09b..b01f1b85 100644 +--- a/libmultipath/wwids.c ++++ b/libmultipath/wwids.c +@@ -439,3 +439,47 @@ int unmark_failed_wwid(const char *wwid) + print_failed_wwid_result("unmark_failed", wwid, r); + return r; + } ++ ++int remember_cmdline_wwid(void) ++{ ++ FILE *f = NULL; ++ char buf[LINE_MAX], *next, *ptr; ++ int ret = 0; ++ ++ f = fopen("/proc/cmdline", "re"); ++ if (!f) { ++ condlog(0, "can't open /proc/cmdline : %s", strerror(errno)); ++ return -1; ++ } ++ ++ if (!fgets(buf, sizeof(buf), f)) { ++ if (ferror(f)) ++ condlog(0, "read of /proc/cmdline failed : %s", ++ strerror(errno)); ++ else ++ condlog(0, "couldn't read /proc/cmdline"); ++ fclose(f); ++ return -1; ++ } ++ fclose(f); ++ next = buf; ++ while((ptr = strstr(next, "mpath.wwid="))) { ++ ptr += 11; ++ next = strpbrk(ptr, " \t\n"); ++ if (next) { ++ *next = '\0'; ++ next++; ++ } ++ if (strlen(ptr)) { ++ if (remember_wwid(ptr) != 0) ++ ret = -1; ++ } ++ else { ++ condlog(0, "empty mpath.wwid kernel command line option"); ++ ret = -1; ++ } ++ if (!next) ++ break; ++ } ++ return ret; ++} +diff --git a/libmultipath/wwids.h b/libmultipath/wwids.h +index 0c6ee54d..e32a0b0e 100644 +--- a/libmultipath/wwids.h ++++ b/libmultipath/wwids.h +@@ -17,6 +17,7 @@ int remember_wwid(char *wwid); + int check_wwids_file(char *wwid, int write_wwid); + int remove_wwid(char *wwid); + int replace_wwids(vector mp); ++int remember_cmdline_wwid(void); + + enum { + WWID_IS_NOT_FAILED = 0, +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0007-RH-warn-on-invalid-regex-instead-of-failing.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0007-RH-warn-on-invalid-regex-instead-of-failing.patch new file mode 100644 index 0000000000..c64b8aeabc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0007-RH-warn-on-invalid-regex-instead-of-failing.patch @@ -0,0 +1,105 @@ +From 49d0b0279f54ceb96878e8e72e828efbb84a534c Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 1 Mar 2024 11:45:10 +0800 +Subject: [PATCH 07/12] RH: warn on invalid regex instead of failing + +multipath.conf used to allow "*" as a match everything regular expression, +instead of requiring ".*". Instead of erroring when the old style +regular expressions are used, it should print a warning and convert +them. + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +[OP: Rebase to 0.9.3] +[OP: adjusted FREE() -> free(), made set_regex_value() static] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/dict.c | 40 ++++++++++++++++++++++++++++++++++------ + 1 file changed, 34 insertions(+), 6 deletions(-) + +diff --git a/libmultipath/dict.c b/libmultipath/dict.c +index 5af036b7..e494419d 100644 +--- a/libmultipath/dict.c ++++ b/libmultipath/dict.c +@@ -189,6 +189,34 @@ set_str_noslash(vector strvec, void *ptr, const char *file, int line_nr) + return 0; + } + ++static void * ++set_regex_value(vector strvec) ++{ ++ char *buff = set_value(strvec); ++ ++ if (buff && strcmp("*", buff) == 0) { ++ condlog(0, "Invalid regular expression \"*\" in multipath.conf. Using \".*\""); ++ free(buff); ++ return strdup(".*"); ++ } ++ return buff; ++} ++ ++static int ++set_regex(vector strvec, void *ptr, const char *file, int line_nr) ++{ ++ char **str_ptr = (char **)ptr; ++ ++ if (*str_ptr) ++ free(*str_ptr); ++ *str_ptr = set_regex_value(strvec); ++ ++ if (!*str_ptr) ++ return 1; ++ ++ return 0; ++} ++ + static int + set_yes_no(vector strvec, void *ptr, const char *file, int line_nr) + { +@@ -1798,7 +1826,7 @@ ble_ ## option ## _handler (struct config *conf, vector strvec, \ + if (!conf->option) \ + return 1; \ + \ +- buff = set_value(strvec); \ ++ buff = set_regex_value(strvec); \ + if (!buff) \ + return 1; \ + \ +@@ -1818,7 +1846,7 @@ ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec, \ + if (!conf->option) \ + return 1; \ + \ +- buff = set_value(strvec); \ ++ buff = set_regex_value(strvec); \ + if (!buff) \ + return 1; \ + \ +@@ -1924,16 +1952,16 @@ device_handler(struct config *conf, vector strvec, const char *file, + return 0; + } + +-declare_hw_handler(vendor, set_str) ++declare_hw_handler(vendor, set_regex) + declare_hw_snprint(vendor, print_str) + +-declare_hw_handler(product, set_str) ++declare_hw_handler(product, set_regex) + declare_hw_snprint(product, print_str) + +-declare_hw_handler(revision, set_str) ++declare_hw_handler(revision, set_regex) + declare_hw_snprint(revision, print_str) + +-declare_hw_handler(bl_product, set_str) ++declare_hw_handler(bl_product, set_regex) + declare_hw_snprint(bl_product, print_str) + + declare_hw_arg_str_handler(hwhandler, 0) +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0008-RH-reset-default-find_mutipaths-value-to-off.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0008-RH-reset-default-find_mutipaths-value-to-off.patch new file mode 100644 index 0000000000..1fa1f3be27 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0008-RH-reset-default-find_mutipaths-value-to-off.patch @@ -0,0 +1,34 @@ +From fcba3e0d4c8448a2510025acb255c7335413bf56 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 26 Nov 2018 11:12:01 +0800 +Subject: [PATCH 08/12] RH: reset default find_mutipaths value to off + +Upstream has changed to default find_multipaths to "strict". For now +Redhat will retain the previous default of "off". + +Signed-off-by: Benjamin Marzinski + +Upstream-Status: Pending + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + libmultipath/defaults.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h +index 64b633f2..a06a8a41 100644 +--- a/libmultipath/defaults.h ++++ b/libmultipath/defaults.h +@@ -23,7 +23,7 @@ + #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF + #define DEFAULT_VERBOSITY 2 + #define DEFAULT_REASSIGN_MAPS 0 +-#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_STRICT ++#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_OFF + #define DEFAULT_FAST_IO_FAIL 5 + #define DEFAULT_DEV_LOSS_TMO 600 + #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0009-multipath-tools-modify-create-config.mk-for-cross-co.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0009-multipath-tools-modify-create-config.mk-for-cross-co.patch new file mode 100644 index 0000000000..041b79a9af --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0009-multipath-tools-modify-create-config.mk-for-cross-co.patch @@ -0,0 +1,40 @@ +From 7452549e572b1c40aefe25524bf4bbbf34c952e5 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Tue, 4 Jun 2019 11:39:39 +0800 +Subject: [PATCH 09/12] multipath-tools: modify create-config.mk for + cross-compilation + +Do not look for systemd info on the host, and allow us to pass in CFLAGS +using the OPTFLAGS variable. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Joe Slater + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + create-config.mk | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/create-config.mk b/create-config.mk +index 4d318b96..a65975ba 100644 +--- a/create-config.mk ++++ b/create-config.mk +@@ -127,10 +127,6 @@ ifeq ($(ENABLE_DMEVENTS_POLL),0) + DEFINES += -DNO_DMEVENTS_POLL + endif + +-SYSTEMD := $(strip $(or $(shell $(PKG_CONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \ +- $(shell systemctl --version 2>/dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p'))) +- +- + # $(call TEST_CC_OPTION,option,fallback) + # Test if the C compiler supports the option. + # Evaluates to "option" if yes, and "fallback" otherwise. +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0010-Subject-PATCH-Always-use-devmapper.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0010-Subject-PATCH-Always-use-devmapper.patch new file mode 100644 index 0000000000..b48720b8a1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0010-Subject-PATCH-Always-use-devmapper.patch @@ -0,0 +1,72 @@ +From 5d2fa3c5975266a6c02214afa6254e6eeeb1baad Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 26 Nov 2018 11:17:41 +0800 +Subject: [PATCH 10/12] Subject: [PATCH] Always use devmapper + +Do not try to compute several _API_ make variables +from host information when cross-compiling. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Aws Ismail +Signed-off-by: Joe Slater + +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait + +Rebase to 0.9.8 +Signed-off-by: Changqing Li +--- + create-config.mk | 36 ++++++++---------------------------- + 1 file changed, 8 insertions(+), 28 deletions(-) + +diff --git a/create-config.mk b/create-config.mk +index a65975ba..8ba592f4 100644 +--- a/create-config.mk ++++ b/create-config.mk +@@ -79,34 +79,14 @@ URCU_VERSION = $(shell \ + + DEFINES := + +-ifneq ($(call check_func,dm_task_no_flush,$(devmapper_incdir)/libdevmapper.h),0) +- DEFINES += LIBDM_API_FLUSH +-endif +- +-ifneq ($(call check_func,dm_task_get_errno,$(devmapper_incdir)/libdevmapper.h),0) +- DEFINES += LIBDM_API_GET_ERRNO +-endif +- +-ifneq ($(call check_func,dm_task_set_cookie,$(devmapper_incdir)/libdevmapper.h),0) +- DEFINES += LIBDM_API_COOKIE +-endif +- +-ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,$(libudev_incdir)/libudev.h),0) +- DEFINES += LIBUDEV_API_RECVBUF +-endif +- +-ifneq ($(call check_func,dm_task_deferred_remove,$(devmapper_incdir)/libdevmapper.h),0) +- DEFINES += LIBDM_API_DEFERRED +-endif +- +-ifneq ($(call check_func,dm_hold_control_dev,$(devmapper_incdir)/libdevmapper.h),0) +- DEFINES += LIBDM_API_HOLD_CONTROL +-endif +- +-ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(kernel_incdir)/scsi/fc/fc_els.h),0) +- DEFINES += FPIN_EVENT_HANDLER +- FPIN_SUPPORT = 1 +-endif ++DEFINES += LIBDM_API_FLUSH ++DEFINES += LIBDM_API_GET_ERRNO ++DEFINES += LIBDM_API_COOKIE ++DEFINES += LIBUDEV_API_RECVBUF ++DEFINES += LIBDM_API_DEFERRED ++DEFINES += LIBDM_API_HOLD_CONTROL ++DEFINES += FPIN_EVENT_HANDLER ++FPIN_SUPPORT = 1 + + libmount_h := $(shell $(PKG_CONFIG) --variable=includedir mount)/libmount/libmount.h + ifneq ($(call check_func,mnt_unref_cache,$(libmount_h)),0) +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0011-fix-bug-of-do_compile-and-do_install.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0011-fix-bug-of-do_compile-and-do_install.patch new file mode 100644 index 0000000000..f32d789b04 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0011-fix-bug-of-do_compile-and-do_install.patch @@ -0,0 +1,41 @@ +From 949070286692dfff89213792571da233fe82e440 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Sun, 10 May 2020 21:22:53 +0800 +Subject: [PATCH 11/12] fix bug of do_compile and do_install + +when multiple processes make run in parallel, +because of dependency error will occur. + +Signed-off-by: Wang Mingyu + +[OP: Rebase to 0.9.3] +[OP: Drop dependencies that are already present in the 0.9.3 Makefile] +Signed-off-by: Ovidiu Panait +--- + Makefile | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/Makefile b/Makefile +index 4df5f161..065249c2 100644 +--- a/Makefile ++++ b/Makefile +@@ -91,6 +91,16 @@ libmpathpersist libmpathvalid multipath multipathd: libmultipath + libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath + mpathpersist multipathd: libmpathpersist + ++DEPS_ON_MULTIPATH := \ ++ multipath \ ++ multipathd \ ++ mpathpersist \ ++ libmpathpersist ++ ++$(DEPS_ON_MULTIPATH:=.install): libmultipath.install ++mpathpersist.install: libmpathpersist.install ++libdmmp.install libmultipath/foreign.install: mpathpersist.install ++ + libmultipath/checkers.install \ + libmultipath/prioritizers.install \ + libmultipath/foreign.install: libmultipath.install +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0012-add-explicit-dependency-on-libraries.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0012-add-explicit-dependency-on-libraries.patch new file mode 100644 index 0000000000..2f774940d6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0012-add-explicit-dependency-on-libraries.patch @@ -0,0 +1,40 @@ +From 7a46f43682641436464579d8bf76c382e71ea557 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Mon, 25 May 2020 23:22:55 -0700 +Subject: [PATCH 12/12] add explicit dependency on libraries + +[snip] +gcc/i686-overc-linux/10.1.0/ld: cannot find -lmpathpersist +collect2: error: ld returned 1 exit status +Makefile:36: recipe for target 'multipathd' failed +make[1]: *** [multipathd] Error 1 +make[1]: Leaving directory 'git/multipathd' +Makefile:29: recipe for target 'multipathd' failed +make: *** [multipathd] Error 2 +ln -sf libmpathpersist.so.0 libmpathpersist.so +[snip] + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 065249c2..0444c2ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -90,6 +90,7 @@ libmultipath: libmpathutil + libmpathpersist libmpathvalid multipath multipathd: libmultipath + libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath + mpathpersist multipathd: libmpathpersist ++libmultipath mpathpersist multipath multipathd: libmpathcmd + + DEPS_ON_MULTIPATH := \ + multipath \ +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch deleted file mode 100644 index 395f9a9b03..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 9a941729d3c0d19d30d65e16b291c380e589eeb3 Mon Sep 17 00:00:00 2001 -From: Benjamin Marzinski -Date: Thu, 13 Apr 2017 07:22:23 -0500 -Subject: [PATCH] RH: fixup udev rules for redhat - -The multipath rules need to run after scsi_id is run. This means moving -them after 60-persistent-storage.rules for redhat. Redhat also uses a -different naming scheme for partitions than SuSE. Also, there are some -false warnings that gcc throws because of the changed options. Fix these -too. - -Signed-off-by: Benjamin Marzinski - -Update patch to 0.8.0 - -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- -Upstream-Status: Pending - - Makefile.inc | 2 +- - kpartx/kpartx.rules | 2 +- - multipath/Makefile | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile.inc b/Makefile.inc -index 4d843ce5..57779fd8 100644 ---- a/Makefile.inc -+++ b/Makefile.inc -@@ -81,7 +81,7 @@ endif - prefix = - exec_prefix = $(prefix) - usr_prefix = $(prefix) --bindir = $(exec_prefix)/sbin -+bindir = $(exec_prefix)/usr/sbin - libudevdir = $(prefix)/$(SYSTEMDPATH)/udev - tmpfilesdir = $(prefix)/$(SYSTEMDPATH)/tmpfiles.d - udevrulesdir = $(libudevdir)/rules.d -diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules -index 1969dee0..d2b28233 100644 ---- a/kpartx/kpartx.rules -+++ b/kpartx/kpartx.rules -@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end" - GOTO="kpartx_end" - - LABEL="run_kpartx" --RUN+="/sbin/kpartx -un -p -part /dev/$name" -+RUN+="/sbin/kpartx -un /dev/$name" - - LABEL="kpartx_end" -diff --git a/multipath/Makefile b/multipath/Makefile -index 116348e2..8482de6a 100644 ---- a/multipath/Makefile -+++ b/multipath/Makefile -@@ -23,7 +23,7 @@ install: - $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ - $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) - $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) -- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules -+ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules - $(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir) - $(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf - $(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir) -@@ -43,7 +43,7 @@ uninstall: - $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules - $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf - $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf -- $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules -+ $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules - $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8 - $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5 - --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch deleted file mode 100644 index c15444a85d..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 -00:00:00 2001 From:Benjamin Marzinski Date: Wed, 2 Jul -2014 12:49:53 -0500 Subject: [PATCH] RH: Remove the property blacklist -exception builtin - -Multipath set the default property blacklist exceptions to -(ID_SCSI_VPD|ID_WWN). This has the effect of blacklisting some internal -devices. These devices may never have multiple paths, but it is nice -to be able to set multipath up on them all the same. This patch simply -removes the default, and makes it so that if no property -blacklist_exception is given, then devices aren't failed for not matching -it. - -Signed-off-by: Benjamin Marzinski - -Upsteam-Status: Pending - -Update patch to 0.8.2 -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- -Upstream-Status: Pending - - libmultipath/blacklist.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c -index 8d15d2ea..820b0d68 100644 ---- a/libmultipath/blacklist.c -+++ b/libmultipath/blacklist.c -@@ -198,9 +198,6 @@ setup_default_blist (struct config * conf) - struct hwentry *hwe; - int i; - -- if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", ORIGIN_DEFAULT)) -- return 1; -- - if (store_ble(conf->elist_property, "(SCSI_IDENT_|ID_WWN)", ORIGIN_DEFAULT)) - return 1; - -@@ -435,8 +432,11 @@ filter_property(const struct config *conf, struct udev_device *udev, - r = MATCH_NOTHING; - } - -- log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); -- return r; -+ if (VECTOR_SIZE(conf->elist_property)) { -+ log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); -+ return r; -+ } -+ return 0; - } - - static void free_ble(struct blentry *ble) --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch deleted file mode 100644 index 840b00093d..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 056fdaece0f1a3a5ca92e8c08912730faa89875d Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Fri, 23 Nov 2018 17:25:15 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski Date: Wed, 15 - Oct 2014 10:39:30 -0500 Subject: [PATCH] RH: don't start without a config - file - -If /etc/multipath.conf doesn't exist, don't start multipathd and blacklist -all devices when running multipath. A completely blank configuration file -is almost never what users want. Also, people may have the multipath -packages installed but don't want to use them. This patch provides a -simple way to disable multipath. Simply removing or renaming -/etc/multipath.conf will keep multipath from doing anything. - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -update this patch to new version -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - libmultipath/config.c | 18 ++++++++++++++++++ - libmultipath/config.h | 1 + - multipath/multipath.rules.in | 1 + - multipathd/multipathd.8 | 2 ++ - multipathd/multipathd.service | 1 + - 5 files changed, 23 insertions(+) - -diff --git a/libmultipath/config.c b/libmultipath/config.c -index 5c5c0726..31894810 100644 ---- a/libmultipath/config.c -+++ b/libmultipath/config.c -@@ -26,6 +26,7 @@ - #include "mpath_cmd.h" - #include "propsel.h" - #include "foreign.h" -+#include "version.h" - - /* - * We don't support re-initialization after -@@ -966,6 +967,23 @@ int _init_config (const char *file, struct config *conf) - } - factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); - validate_pctable(conf->overrides, 0, file); -+ } else { -+ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); -+ if (conf->blist_devnode == NULL) { -+ conf->blist_devnode = vector_alloc(); -+ if (!conf->blist_devnode) { -+ conf->blist_devnode = vector_alloc(); -+ if (!conf->blist_devnode) { -+ condlog(0, "cannot allocate blacklist\n"); -+ goto out; -+ } -+ } -+ if (store_ble(conf->blist_devnode, strdup(".*"), -+ ORIGIN_NO_CONFIG)) { -+ condlog(0, "cannot store default no-config blacklist\n"); -+ goto out; -+ } -+ } - } - - conf->processed_main_config = 1; -diff --git a/libmultipath/config.h b/libmultipath/config.h -index 87947469..0dc89c16 100644 ---- a/libmultipath/config.h -+++ b/libmultipath/config.h -@@ -10,6 +10,7 @@ - - #define ORIGIN_DEFAULT 0 - #define ORIGIN_CONFIG 1 -+#define ORIGIN_NO_CONFIG 2 - - enum devtypes { - DEV_NONE, -diff --git a/multipath/multipath.rules.in b/multipath/multipath.rules.in -index 8d3cf33a..5c4447a2 100644 ---- a/multipath/multipath.rules.in -+++ b/multipath/multipath.rules.in -@@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath" - ENV{nompath}=="?*", GOTO="end_mpath" - IMPORT{cmdline}="multipath" - ENV{multipath}=="off", GOTO="end_mpath" -+TEST!="/etc/multipath.conf", GOTO="end_mpath" - - ENV{DEVTYPE}!="partition", GOTO="test_dev" - IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH" -diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8 -index bdf102eb..a16a0bd5 100644 ---- a/multipathd/multipathd.8 -+++ b/multipathd/multipathd.8 -@@ -48,6 +48,8 @@ map regains its maximum performance and redundancy. - With the \fB-k\fR option, \fBmultipathd\fR acts as a client utility that - sends commands to a running instance of the multipathd daemon (see - \fBCOMMANDS\fR below). -+ -+In this Linux distribution, multipathd does not run unless a /etc/multipath.conf file exists. - . - . - .\" ---------------------------------------------------------------------------- -diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service -index aec62dbb..ab7585de 100644 ---- a/multipathd/multipathd.service -+++ b/multipathd/multipathd.service -@@ -5,6 +5,7 @@ Before=local-fs-pre.target blk-availability.service shutdown.target - Wants=systemd-udevd-kernel.socket - After=systemd-udevd-kernel.socket - After=multipathd.socket systemd-remount-fs.service -+ConditionPathExists=/etc/multipath.conf - Before=initrd-cleanup.service - DefaultDependencies=no - Conflicts=shutdown.target --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch deleted file mode 100644 index e7b3e12238..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch +++ /dev/null @@ -1,74 +0,0 @@ -From cc38276a5d3926fd96e58366e15ba887d7d02ed0 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 26 Nov 2018 09:19:17 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep - -17 - 00:00:00 2001 From: Benjamin Marzinski Date: Wed, -19 - Apr 2017 06:10:01 -0500 Subject: [PATCH] RH: use rpm optflags if -present - -Use the passed in optflags when compiling as an RPM, and keep the -default flags as close as possible to the current fedora flags, while -still being generic. - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -update this patch to new version - -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - Makefile.inc | 28 ++++++++++++++++++---------- - 1 file changed, 18 insertions(+), 10 deletions(-) - -diff --git a/Makefile.inc b/Makefile.inc -index 57779fd8..34f2cc6d 100644 ---- a/Makefile.inc -+++ b/Makefile.inc -@@ -140,20 +140,28 @@ FORTIFY_OPT := $(shell \ - echo "-D_FORTIFY_SOURCE=2"; \ - fi) - --STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) --ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,) --WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,) --WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,) -- --OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 --WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ -- -Werror=implicit-function-declaration -Werror=format-security \ -- $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) -+ifndef RPM_OPT_FLAGS -+ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) -+ OPTFLAGS = -O2 -g -pipe -Wall -Werror=format-security \ -+ -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ -+ $(STACKPROT) --param=ssp-buffer-size=4 \ -+ -grecord-gcc-switches -+ ifeq ($(shell test -f /usr/lib/rpm/redhat/redhat-hardened-cc1 && echo 1),1) -+ OPTFLAGS += -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -+ endif -+else -+ OPTFLAGS = $(RPM_OPT_FLAGS) -+endif -+OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=2 -Werror=implicit-int \ -+ -Werror=implicit-function-declaration -Wno-sign-compare \ -+ -Wno-unused-parameter -Werror=cast-qual \ -+ -Werror=discarded-qualifiers -+ - CPPFLAGS := $(FORTIFY_OPT) \ - -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ - -DRUNTIME_DIR=\"$(runtimedir)\" \ - -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP --CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe -+CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) -pipe - BIN_CFLAGS = -fPIE -DPIE - LIB_CFLAGS = -fPIC - SHARED_FLAGS = -shared --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch deleted file mode 100644 index 471ff09323..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch +++ /dev/null @@ -1,655 +0,0 @@ -From b0b4cca566e3e0c3a232b3754555c41d4e0c1273 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 26 Nov 2018 09:55:12 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski Date: Thu, 16 - Oct 2014 15:49:01 -0500 Subject: [PATCH] RH: add mpathconf - -mpathconf is a program (largely based on lvmcomf) to help users -configure /etc/multipath.conf and enable or disable multipathing. It -has a couple of built-in options that can be set directly from the -command line. But, mostly it is used to get a multipath.conf file -with the OS defaults, and to enable and disable multipathing via -a single command. - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -update this patch to new version - -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - libmultipath/config.c | 1 + - multipath/Makefile | 4 + - multipath/mpathconf | 464 ++++++++++++++++++++++++++++++++++++++++++ - multipath/mpathconf.8 | 101 +++++++++ - 4 files changed, 570 insertions(+) - create mode 100644 multipath/mpathconf - create mode 100644 multipath/mpathconf.8 - -diff --git a/libmultipath/config.c b/libmultipath/config.c -index 31894810..af59dd3c 100644 ---- a/libmultipath/config.c -+++ b/libmultipath/config.c -@@ -969,6 +969,7 @@ int _init_config (const char *file, struct config *conf) - validate_pctable(conf->overrides, 0, file); - } else { - condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); -+ condlog(0, "You can run /sbin/mpathconf to create or modify /etc/multipath.conf"); - if (conf->blist_devnode == NULL) { - conf->blist_devnode = vector_alloc(); - if (!conf->blist_devnode) { -diff --git a/multipath/Makefile b/multipath/Makefile -index 8482de6a..780b1b73 100644 ---- a/multipath/Makefile -+++ b/multipath/Makefile -@@ -21,6 +21,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so - install: - $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) - $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ -+ $(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/ - $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) - $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) - $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules -@@ -32,6 +33,7 @@ install: - $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(man8dir) - $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) - $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) -+ $(INSTALL_PROGRAM) -m 644 mpathconf.8 $(DESTDIR)$(man8dir) - ifneq ($(SCSI_DH_MODULES_PRELOAD),) - $(INSTALL_PROGRAM) -m 644 scsi_dh.conf $(DESTDIR)$(modulesloaddir)/scsi_dh.conf - for _x in $(SCSI_DH_MODULES_PRELOAD); do echo "$$_x"; done \ -@@ -44,8 +46,10 @@ uninstall: - $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf - $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf - $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules -+ $(RM) $(DESTDIR)$(bindir)/mpathconf - $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8 - $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5 -+ $(RM) $(DESTDIR)$(man8dir)/mpathconf.8 - - clean: dep_clean - $(RM) core *.o $(EXEC) multipath.rules tmpfiles.conf -diff --git a/multipath/mpathconf b/multipath/mpathconf -new file mode 100644 -index 00000000..e8391347 ---- /dev/null -+++ b/multipath/mpathconf -@@ -0,0 +1,464 @@ -+#!/bin/bash -+# -+# Copyright (C) 2010 Red Hat, Inc. All rights reserved. -+# -+# This file is part of the device-mapper-multipath package. -+# -+# This copyrighted material is made available to anyone wishing to use, -+# modify, copy, or redistribute it subject to the terms and conditions -+# of the GNU General Public License v.2. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software Foundation, -+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+# -+# Simple editting of /etc/multipath.conf -+# This program was largely ripped off from lvmconf -+# -+ -+unset ENABLE FIND FRIENDLY MODULE MULTIPATHD HAVE_DISABLE HAVE_WWID_DISABLE HAVE_FIND HAVE_BLACKLIST HAVE_EXCEPTIONS HAVE_DEFAULTS HAVE_FRIENDLY HAVE_MULTIPATHD HAVE_MODULE HAVE_OUTFILE SHOW_STATUS CHANGED_CONFIG WWID_LIST -+ -+DEFAULT_CONFIG="# device-mapper-multipath configuration file -+ -+# For a complete list of the default configuration values, run either: -+# # multipath -t -+# or -+# # multipathd show config -+ -+# For a list of configuration options with descriptions, see the -+# multipath.conf man page. -+ -+defaults { -+ user_friendly_names yes -+ find_multipaths yes -+} -+ -+blacklist_exceptions { -+ property \"(SCSI_IDENT_|ID_WWN)\" -+}" -+ -+CONFIGFILE="/etc/multipath.conf" -+OUTPUTFILE="/etc/multipath.conf" -+MULTIPATHDIR="/etc/multipath" -+TMPFILE="/etc/multipath/.multipath.conf.tmp" -+WWIDS=0 -+ -+function usage -+{ -+ echo "usage: $0 " -+ echo "" -+ echo "Commands:" -+ echo "Enable: --enable " -+ echo "Disable: --disable" -+ echo "Only allow certain wwids (instead of enable): --allow " -+ echo "Set user_friendly_names (Default y): --user_friendly_names " -+ echo "Set find_multipaths (Default y): --find_multipaths " -+ echo "Load the dm-multipath modules on enable (Default y): --with_module " -+ echo "start/stop/reload multipathd (Default n): --with_multipathd " -+ echo "select output file (Default /etc/multipath.conf): --outfile " -+ echo "" -+} -+ -+function add_wwid -+{ -+ INDEX=0 -+ while [ "$INDEX" -lt "$WWIDS" ] ; do -+ if [ "$1" = "${WWID_LIST[$INDEX]}" ] ; then -+ return -+ fi -+ ((INDEX++)) -+ done -+ WWID_LIST[$WWIDS]="$1" -+ ((WWIDS++)) -+} -+ -+function get_dm_deps -+{ -+ shift 3 -+ while [ -n "$1" -a -n "$2" ]; do -+ MAJOR=$(echo $1 | tr -d '(,') -+ MINOR=$(echo $2 | tr -d ')') -+ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` -+ if [ -n "$UUID" ] ; then -+ set_dm_wwid $UUID -+ fi -+ shift 2 -+ done -+} -+ -+function set_dm_wwid -+{ -+ if [[ "$1" =~ ^part[[:digit:]]+-mpath- ]] ; then -+ add_wwid "${1##part*-mpath-}" -+ elif [[ "$1" =~ ^mpath- ]] ; then -+ add_wwid "${1##mpath-}" -+ else -+ get_dm_deps `dmsetup deps -u $1` -+ fi -+} -+ -+function set_wwid -+{ -+ UUID="" -+ if [[ "$1" =~ ^[[:digit:]]+:[[:digit:]]+$ ]] ; then -+ MAJOR=${1%%:*} -+ MINOR=${1##*:} -+ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` -+ else -+ UUID=`dmsetup info -c --noheadings -o uuid $1 2> /dev/null` -+ fi -+ if [ -n "$UUID" ] ; then -+ set_dm_wwid $UUID -+ else -+ add_wwid "$1" -+ fi -+} -+ -+function parse_args -+{ -+ while [ -n "$1" ]; do -+ case $1 in -+ --enable) -+ ENABLE=1 -+ shift -+ ;; -+ --disable) -+ ENABLE=0 -+ shift -+ ;; -+ --allow) -+ ENABLE=2 -+ if [ -n "$2" ]; then -+ set_wwid $2 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ --user_friendly_names) -+ if [ -n "$2" ]; then -+ FRIENDLY=$2 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ --find_multipaths) -+ if [ -n "$2" ]; then -+ FIND=$2 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ --with_module) -+ if [ -n "$2" ]; then -+ MODULE=$2 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ --with_multipathd) -+ if [ -n "$2" ]; then -+ MULTIPATHD=$2 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ --outfile) -+ if [ -n "$2" ]; then -+ OUTPUTFILE=$2 -+ HAVE_OUTFILE=1 -+ shift 2 -+ else -+ usage -+ exit 1 -+ fi -+ ;; -+ *) -+ usage -+ exit -+ esac -+ done -+} -+ -+function validate_args -+{ -+ if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$MODULE" ]; then -+ echo "ignoring extra parameters on disable" -+ FRIENDLY="" -+ FIND="" -+ MODULE="" -+ fi -+ if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then -+ echo "--user_friendly_names must be either 'y' or 'n'" -+ exit 1 -+ fi -+ if [ -n "$FIND" ] && [ "$FIND" != "y" -a "$FIND" != "n" ]; then -+ echo "--find_multipaths must be either 'y' or 'n'" -+ exit 1 -+ fi -+ if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" ]; then -+ SHOW_STATUS=1 -+ fi -+ if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then -+ echo "--with_module must be either 'y' or 'n'" -+ exit 1 -+ fi -+ if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then -+ echo "--with_multipathd must be either 'y' or 'n'" -+ exit 1 -+ fi -+ if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then -+ echo "Because --allow makes changes that cannot be automatically reversed," -+ echo "you must set --outfile when you set --allow" -+ exit 1 -+ fi -+} -+ -+function add_blacklist_exceptions -+{ -+ INDEX=0 -+ while [ "$INDEX" -lt "$WWIDS" ] ; do -+ sed -i '/^blacklist_exceptions[[:space:]]*{/ a\ -+ wwid '"\"${WWID_LIST[$INDEX]}\""' -+' $TMPFILE -+ ((INDEX++)) -+ done -+} -+ -+umask 0077 -+ -+parse_args "$@" -+ -+validate_args -+ -+if [ ! -d "$MULTIPATHDIR" ]; then -+ echo "/etc/multipath/ does not exist. failing" -+ exit 1 -+fi -+ -+rm $TMPFILE 2> /dev/null -+echo "$DEFAULT_CONFIG" > $TMPFILE -+if [ -f "$CONFIGFILE" ]; then -+ cp $CONFIGFILE $TMPFILE -+fi -+ -+if grep -q "^blacklist[[:space:]]*{" $TMPFILE ; then -+ HAVE_BLACKLIST=1 -+fi -+ -+if grep -q "^blacklist_exceptions[[:space:]]*{" $TMPFILE ; then -+ HAVE_EXCEPTIONS=1 -+fi -+ -+if grep -q "^defaults[[:space:]]*{" $TMPFILE ; then -+ HAVE_DEFAULTS=1 -+fi -+ -+if [ -z "$MODULE" -o "$MODULE" = "y" ]; then -+ if lsmod | grep -q "dm_multipath" ; then -+ HAVE_MODULE=1 -+ else -+ HAVE_MODULE=0 -+ fi -+fi -+ -+if [ "$MULTIPATHD" = "y" ]; then -+ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then -+ HAVE_MULTIPATHD=1 -+ else -+ HAVE_MULTIPATHD=0 -+ fi -+fi -+ -+if [ "$HAVE_BLACKLIST" = "1" ]; then -+ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*devnode \"\.\?\*\"" ; then -+ HAVE_DISABLE=1 -+ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"" ; then -+ HAVE_DISABLE=0 -+ fi -+fi -+ -+if [ "$HAVE_BLACKLIST" = "1" ]; then -+ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*wwid \"\.\?\*\"" ; then -+ HAVE_WWID_DISABLE=1 -+ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"" ; then -+ HAVE_WWID_DISABLE=0 -+ fi -+fi -+ -+if [ "$HAVE_DEFAULTS" = "1" ]; then -+ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)" ; then -+ HAVE_FIND=1 -+ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)" ; then -+ HAVE_FIND=0 -+ fi -+ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)" ; then -+ HAVE_FRIENDLY=1 -+ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)" ; then -+ HAVE_FRIENDLY=0 -+ fi -+fi -+ -+if [ -n "$SHOW_STATUS" ]; then -+ if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then -+ echo "multipath is enabled" -+ else -+ echo "multipath is disabled" -+ fi -+ if [ -z "$HAVE_FIND" -o "$HAVE_FIND" = 0 ]; then -+ echo "find_multipaths is disabled" -+ else -+ echo "find_multipaths is enabled" -+ fi -+ if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then -+ echo "user_friendly_names is disabled" -+ else -+ echo "user_friendly_names is enabled" -+ fi -+ if [ -n "$HAVE_MODULE" ]; then -+ if [ "$HAVE_MODULE" = 1 ]; then -+ echo "dm_multipath module is loaded" -+ else -+ echo "dm_multipath module is not loaded" -+ fi -+ fi -+ if [ -z "$HAVE_MULTIPATHD" ]; then -+ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then -+ HAVE_MULTIPATHD=1 -+ else -+ HAVE_MULTIPATHD=0 -+ fi -+ fi -+ if [ "$HAVE_MULTIPATHD" = 1 ]; then -+ echo "multipathd is running" -+ else -+ echo "multipathd is not running" -+ fi -+ exit 0 -+fi -+ -+if [ -z "$HAVE_BLACKLIST" ]; then -+ cat >> $TMPFILE <<- _EOF_ -+ -+blacklist { -+} -+_EOF_ -+fi -+ -+if [ -z "$HAVE_DEFAULTS" ]; then -+ cat >> $TMPFILE <<- _EOF_ -+ -+defaults { -+} -+_EOF_ -+fi -+ -+if [ "$ENABLE" = 2 ]; then -+ if [ "$HAVE_DISABLE" = 1 ]; then -+ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE -+ fi -+ if [ -z "$HAVE_WWID_DISABLE" ]; then -+ sed -i '/^blacklist[[:space:]]*{/ a\ -+ wwid ".*" -+' $TMPFILE -+ elif [ "$HAVE_WWID_DISABLE" = 0 ]; then -+ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"/ wwid ".*"/' $TMPFILE -+ fi -+ if [ "$HAVE_EXCEPTIONS" = 1 ]; then -+ sed -i '/^blacklist_exceptions[[:space:]]*{/,/^}/ {/^[[:space:]]*wwid/ d}' $TMPFILE -+ else -+ cat >> $TMPFILE <<- _EOF_ -+ -+blacklist_exceptions { -+} -+_EOF_ -+ fi -+ add_blacklist_exceptions -+elif [ "$ENABLE" = 1 ]; then -+ if [ "$HAVE_DISABLE" = 1 ]; then -+ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE -+ fi -+elif [ "$ENABLE" = 0 ]; then -+ if [ -z "$HAVE_DISABLE" ]; then -+ sed -i '/^blacklist[[:space:]]*{/ a\ -+ devnode ".*" -+' $TMPFILE -+ elif [ "$HAVE_DISABLE" = 0 ]; then -+ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"/ devnode ".*"/' $TMPFILE -+ fi -+fi -+ -+if [ "$FIND" = "n" ]; then -+ if [ "$HAVE_FIND" = 1 ]; then -+ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)/ find_multipaths no/' $TMPFILE -+ CHANGED_CONFIG=1 -+ fi -+elif [ "$FIND" = "y" ]; then -+ if [ -z "$HAVE_FIND" ]; then -+ sed -i '/^defaults[[:space:]]*{/ a\ -+ find_multipaths yes -+' $TMPFILE -+ CHANGED_CONFIG=1 -+ elif [ "$HAVE_FIND" = 0 ]; then -+ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)/ find_multipaths yes/' $TMPFILE -+ CHANGED_CONFIG=1 -+ fi -+fi -+ -+if [ "$FRIENDLY" = "n" ]; then -+ if [ "$HAVE_FRIENDLY" = 1 ]; then -+ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)/ user_friendly_names no/' $TMPFILE -+ CHANGED_CONFIG=1 -+ fi -+elif [ "$FRIENDLY" = "y" ]; then -+ if [ -z "$HAVE_FRIENDLY" ]; then -+ sed -i '/^defaults[[:space:]]*{/ a\ -+ user_friendly_names yes -+' $TMPFILE -+ CHANGED_CONFIG=1 -+ elif [ "$HAVE_FRIENDLY" = 0 ]; then -+ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)/ user_friendly_names yes/' $TMPFILE -+ CHANGED_CONFIG=1 -+ fi -+fi -+ -+if [ -f "$OUTPUTFILE" ]; then -+ cp $OUTPUTFILE $OUTPUTFILE.old -+ if [ $? != 0 ]; then -+ echo "failed to backup old config file, $OUTPUTFILE not updated" -+ exit 1 -+ fi -+fi -+ -+cp $TMPFILE $OUTPUTFILE -+if [ $? != 0 ]; then -+ echo "failed to copy new config file into place, check $OUTPUTFILE is still OK" -+ exit 1 -+fi -+ -+rm -f $TMPFILE -+ -+if [ "$ENABLE" = 1 ]; then -+ if [ "$HAVE_MODULE" = 0 ]; then -+ modprobe dm_multipath -+ fi -+ if [ "$HAVE_MULTIPATHD" = 0 ]; then -+ systemctl start multipathd.service -+ fi -+elif [ "$ENABLE" = 0 ]; then -+ if [ "$HAVE_MULTIPATHD" = 1 ]; then -+ systemctl stop multipathd.service -+ fi -+elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then -+ systemctl reload multipathd.service -+fi -diff --git a/multipath/mpathconf.8 b/multipath/mpathconf.8 -new file mode 100644 -index 00000000..4cd32672 ---- /dev/null -+++ b/multipath/mpathconf.8 -@@ -0,0 +1,101 @@ -+.TH MPATHCONF 8 "June 2010" "" "Linux Administrator's Manual" -+.SH NAME -+mpathconf - A tool for configuring device-mapper-multipath -+.SH SYNOPSIS -+.B mpathconf -+.RB [\| commands \|] -+.RB [\| options \|] -+.SH DESCRIPTION -+.B mpathconf -+is a utility that creates or modifies -+.B /etc/multipath.conf. -+It can enable or disable multipathing and configure some common options. -+.B mpathconf -+can also load the -+.B dm_multipath -+module, start and stop the -+.B multipathd -+daemon, and configure the -+.B multipathd -+service to start automatically or not. If -+.B mpathconf -+is called with no commands, it will display the current configuration. -+ -+The default options for mpathconf are -+.B --with_module -+The -+.B --with_multipathd -+option is not set by default. Enabling multipathing will load the -+.B dm_multipath -+module but it will not immediately start it. This is so -+that users can manually edit their config file if necessary, before starting -+.B multipathd. -+ -+If -+.B /etc/multipath.conf -+already exists, mpathconf will edit it. If it does not exist, mpathconf will -+create a default file with -+.B user_friendly_names -+and -+.B find_multipaths -+set. To disable these, use the -+.B --user_friendly_names n -+and -+.B --find_multipaths n -+options -+.SH COMMANDS -+.TP -+.B --enable -+Removes any line that blacklists all device nodes from the -+.B /etc/multipath.conf -+blacklist section. -+.TP -+.B --disable -+Adds a line that blacklists all device nodes to the -+.B /etc/multipath.conf -+blacklist section. If no blacklist section exists, it will create one. -+.TP -+.B --user_friendly_name \fP { \fBy\fP | \fBn\fP } -+If set to \fBy\fP, this adds the line -+.B user_friendly_names yes -+to the -+.B /etc/multipath.conf -+defaults section. If set to \fBn\fP, this removes the line, if present. This -+command can be used along with any other command. -+.TP -+.B --find_multipaths\fP { \fBy\fP | \fBn\fP } -+If set to \fBy\fP, this adds the line -+.B find_multipaths yes -+to the -+.B /etc/multipath.conf -+defaults section. If set to \fBn\fP, this removes the line, if present. This -+command can be used aldong with any other command. -+.SH OPTIONS -+.TP -+.B --with_module\fP { \fBy\fP | \fBn\fP } -+If set to \fBy\fP, this runs -+.B modprobe dm_multipath -+to install the multipath modules. This option only works with the -+.B --enable -+command. This option is set to \fBy\fP by default. -+.TP -+.B --with_multipathd { \fBy\fP | \fBn\fP } -+If set to \fBy\fP, this runs -+.B service multipathd start -+to start the multipathd daemon on \fB--enable\fP, -+.B service multipathd stop -+to stop the multipathd daemon on \fB--disable\fP, and -+.B service multipathd reload -+to reconfigure multipathd on \fB--user_frindly_names\fP and -+\fB--find_multipaths\fP. -+This option is set to \fBn\fP by default. -+.SH FILES -+.BR /etc/multipath.conf -+.SH "SEE ALSO" -+.BR multipath.conf (5), -+.BR modprobe (8), -+.BR multipath (8), -+.BR multipathd (8), -+.BR service (8), -+.SH AUTHOR -+Benjamin Marzinski --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch deleted file mode 100644 index 17c36e86c5..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 262de33671ede81e424344ea9125d9e546cf8612 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Thu, 26 Sep 2019 16:29:48 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep - -17 - 00:00:00 2001 From: Benjamin Marzinski Date: Fri, -17 - Oct 2014 11:20:34 -0500 Subject: [PATCH] RH: add wwids from kernel -cmdline - mpath.wwids with -A - -This patch adds another option to multipath, "-A", which reads -/proc/cmdline for mpath.wwid= options, and adds any wwids it finds -to /etc/multipath/wwids. While this isn't usually important during -normal operation, since these wwids should already be added, it can be -helpful during installation, to make sure that multipath can claim -devices as its own, before LVM or something else makes use of them. The -patch also execs "/sbin/multipath -A" before running multipathd in -multipathd.service - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -Update this patch to new version 0.8.2 - -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - libmultipath/wwids.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ - libmultipath/wwids.h | 1 + - 2 files changed, 45 insertions(+) - -diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c -index 89bb60ca..bab9aa85 100644 ---- a/libmultipath/wwids.c -+++ b/libmultipath/wwids.c -@@ -451,3 +451,47 @@ int unmark_failed_wwid(const char *wwid) - print_failed_wwid_result("unmark_failed", wwid, r); - return r; - } -+ -+int remember_cmdline_wwid(void) -+{ -+ FILE *f = NULL; -+ char buf[LINE_MAX], *next, *ptr; -+ int ret = 0; -+ -+ f = fopen("/proc/cmdline", "re"); -+ if (!f) { -+ condlog(0, "can't open /proc/cmdline : %s", strerror(errno)); -+ return -1; -+ } -+ -+ if (!fgets(buf, sizeof(buf), f)) { -+ if (ferror(f)) -+ condlog(0, "read of /proc/cmdline failed : %s", -+ strerror(errno)); -+ else -+ condlog(0, "couldn't read /proc/cmdline"); -+ fclose(f); -+ return -1; -+ } -+ fclose(f); -+ next = buf; -+ while((ptr = strstr(next, "mpath.wwid="))) { -+ ptr += 11; -+ next = strpbrk(ptr, " \t\n"); -+ if (next) { -+ *next = '\0'; -+ next++; -+ } -+ if (strlen(ptr)) { -+ if (remember_wwid(ptr) != 0) -+ ret = -1; -+ } -+ else { -+ condlog(0, "empty mpath.wwid kernel command line option"); -+ ret = -1; -+ } -+ if (!next) -+ break; -+ } -+ return ret; -+} -diff --git a/libmultipath/wwids.h b/libmultipath/wwids.h -index 0c6ee54d..e32a0b0e 100644 ---- a/libmultipath/wwids.h -+++ b/libmultipath/wwids.h -@@ -17,6 +17,7 @@ int remember_wwid(char *wwid); - int check_wwids_file(char *wwid, int write_wwid); - int remove_wwid(char *wwid); - int replace_wwids(vector mp); -+int remember_cmdline_wwid(void); - - enum { - WWID_IS_NOT_FAILED = 0, --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch deleted file mode 100644 index 22cb4beeb8..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 -00:00:00 2001 From: Benjamin Marzinski Date: Mon, 6 Nov -2017 21:39:28 -0600 Subject: [PATCH] RH: warn on invalid regex instead of -failing - -multipath.conf used to allow "*" as a match everything regular expression, -instead of requiring ".*". Instead of erroring when the old style -regular expressions are used, it should print a warning and convert -them. - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -update this patch to 0.8.2 - -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -[OP: adjusted FREE() -> free(), made set_regex_value() static] -Signed-off-by: Ovidiu Panait ---- - libmultipath/dict.c | 42 +++++++++++++++++++++++++++++++++++------- - 1 file changed, 35 insertions(+), 7 deletions(-) - -diff --git a/libmultipath/dict.c b/libmultipath/dict.c -index aa93fe43..55a22d32 100644 ---- a/libmultipath/dict.c -+++ b/libmultipath/dict.c -@@ -155,6 +155,34 @@ set_str_noslash(vector strvec, void *ptr, const char *file, int line_nr) - return 0; - } - -+static void * -+set_regex_value(vector strvec) -+{ -+ char *buff = set_value(strvec); -+ -+ if (buff && strcmp("*", buff) == 0) { -+ condlog(0, "Invalid regular expression \"*\" in multipath.conf. Using \".*\""); -+ free(buff); -+ return strdup(".*"); -+ } -+ return buff; -+} -+ -+static int -+set_regex(vector strvec, void *ptr, const char *file, int line_nr) -+{ -+ char **str_ptr = (char **)ptr; -+ -+ if (*str_ptr) -+ free(*str_ptr); -+ *str_ptr = set_regex_value(strvec); -+ -+ if (!*str_ptr) -+ return 1; -+ -+ return 0; -+} -+ - static int - set_yes_no(vector strvec, void *ptr, const char *file, int line_nr) - { -@@ -1679,8 +1707,8 @@ ble_ ## option ## _handler (struct config *conf, vector strvec, \ - \ - if (!conf->option) \ - return 1; \ -- \ -- buff = set_value(strvec); \ -+ \ -+ buff = set_regex_value(strvec); \ - if (!buff) \ - return 1; \ - \ -@@ -1700,7 +1728,7 @@ ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec, \ - if (!conf->option) \ - return 1; \ - \ -- buff = set_value(strvec); \ -+ buff = set_regex_value(strvec); \ - if (!buff) \ - return 1; \ - \ -@@ -1806,16 +1834,16 @@ device_handler(struct config *conf, vector strvec, const char *file, - return 0; - } - --declare_hw_handler(vendor, set_str) -+declare_hw_handler(vendor, set_regex) - declare_hw_snprint(vendor, print_str) - --declare_hw_handler(product, set_str) -+declare_hw_handler(product, set_regex) - declare_hw_snprint(product, print_str) - --declare_hw_handler(revision, set_str) -+declare_hw_handler(revision, set_regex) - declare_hw_snprint(revision, print_str) - --declare_hw_handler(bl_product, set_str) -+declare_hw_handler(bl_product, set_regex) - declare_hw_snprint(bl_product, print_str) - - declare_hw_handler(hwhandler, set_str) --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0028-RH-reset-default-find_mutipaths-value-to-off.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0028-RH-reset-default-find_mutipaths-value-to-off.patch deleted file mode 100644 index ad03b8acc4..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0028-RH-reset-default-find_mutipaths-value-to-off.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 16900150e02e5b367a8b33621b393975ad011130 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 26 Nov 2018 11:12:01 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski Date: Thu, 7 Jun - 2018 17:43:52 -0500 Subject: [PATCH] RH: reset default find_mutipaths value - to off - -Upstream has changed to default find_multipaths to "strict". For now -Redhat will retain the previous default of "off". - -Signed-off-by: Benjamin Marzinski - -Upstream-Status: Pending - -Update this patch to new version - -Signed-off-by: Changqing Li ---- - libmultipath/defaults.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h -index 6576939..a2404b2 100644 ---- a/libmultipath/defaults.h -+++ b/libmultipath/defaults.h -@@ -17,7 +17,7 @@ - #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF - #define DEFAULT_VERBOSITY 2 - #define DEFAULT_REASSIGN_MAPS 0 --#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_STRICT -+#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_OFF - #define DEFAULT_FAST_IO_FAIL 5 - #define DEFAULT_DEV_LOSS_TMO 600 - #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch deleted file mode 100644 index 952009b1d5..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch +++ /dev/null @@ -1,59 +0,0 @@ -From d139474f2a6d87c1cd20dfbb916fe650bfcce968 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 4 Jun 2019 11:39:39 +0800 -Subject: [PATCH] multipath-tools: modify Makefile.inc for cross-compilation - -Do not look for systemd info on the host, and allow us to pass in CFLAGS -using the OPTFLAGS variable. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Joe Slater - -Update for version 0.5.0-144-g770e6d0 - -Signed-off-by: Kai Kang - -Update for version 0.7.1 - -Signed-off-by: Hongxu Jia - -update for version 0.7.7 - -remove change about CFLAGS part, since patch 0024 already have similar function. - -Signed-off-by: Changqing Li - -update for version 0.8.1 -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - Makefile.inc | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/Makefile.inc b/Makefile.inc -index 34f2cc6d..ee6a4c9f 100644 ---- a/Makefile.inc -+++ b/Makefile.inc -@@ -42,17 +42,6 @@ ifndef RUN - endif - endif - --ifndef SYSTEMD -- ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1) -- SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}') -- else -- ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1) -- SYSTEMD = $(shell systemctl --version 2> /dev/null | \ -- sed -n 's/systemd \([0-9]*\).*/\1/p') -- endif -- endif --endif -- - ifndef SYSTEMDPATH - SYSTEMDPATH=usr/lib - endif --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch deleted file mode 100644 index c2025ed6ff..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch +++ /dev/null @@ -1,77 +0,0 @@ -From f20d7651a62efff818ebd0d1bc920f6f362c890d Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 26 Nov 2018 11:17:41 +0800 -Subject: [PATCH] Subject: [PATCH] Always use devmapper - -Do not try to compute several _API_ make variables -from host information when cross-compiling. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Aws Ismail -Signed-off-by: Joe Slater - -Rebase to 0.7.1 - -Signed-off-by: Hongxu Jia - -Rebase to 0.7.7 - -Signed-off-by: Changqing Li - -Rebase to 0.7.9 -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - libmultipath/Makefile | 34 +++++++--------------------------- - 1 file changed, 7 insertions(+), 27 deletions(-) - -diff --git a/libmultipath/Makefile b/libmultipath/Makefile -index 3b60a525..72aca7ca 100644 ---- a/libmultipath/Makefile -+++ b/libmultipath/Makefile -@@ -22,33 +22,13 @@ ifdef SYSTEMD - endif - endif - --ifneq ($(call check_func,dm_task_no_flush,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_FLUSH --endif -- --ifneq ($(call check_func,dm_task_get_errno,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_GET_ERRNO --endif -- --ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_COOKIE --endif -- --ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,$(LIBUDEV_INCDIR)/libudev.h),0) -- CPPFLAGS += -DLIBUDEV_API_RECVBUF --endif -- --ifneq ($(call check_func,dm_task_deferred_remove,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_DEFERRED --endif -- --ifneq ($(call check_func,dm_hold_control_dev,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_HOLD_CONTROL --endif -- --ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(LINUX_HEADERS_INCDIR)/scsi/fc/fc_els.h),0) -- CPPFLAGS += -DFPIN_EVENT_HANDLER --endif -+CPPFLAGS += -DLIBDM_API_FLUSH -+CPPFLAGS += -DLIBDM_API_GET_ERRNO -+CPPFLAGS += -DLIBDM_API_COOKIE -+CPPFLAGS += -DLIBUDEV_API_RECVBUF -+CPPFLAGS += -DLIBDM_API_DEFERRED -+CPPFLAGS += -DLIBDM_API_HOLD_CONTROL -+CPPFLAGS += -DFPIN_EVENT_HANDLER - - # object files referencing MULTIPATH_DIR or CONFIG_DIR - # they need to be recompiled for unit tests --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch deleted file mode 100644 index 2d043c3991..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 820d2ef3596189041da43d1139da8689336bb918 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 26 Nov 2018 11:19:45 +0800 -Subject: [PATCH] Subject: [PATCH] Always use devmapper for kpartx - -Do not try to compute the LIBDM_API_COOKIE make variable -from host information when cross-compiling. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Aws Ismail -Signed-off-by: Joe Slater - -Rebase to 0.7.1 -Signed-off-by: Hongxu Jia - -Rebase to 0.7.7 -Signed-off-by: Changqing Li - -Rebase to 0.7.9 -Signed-off-by: Changqing Li -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- - kpartx/Makefile | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/kpartx/Makefile b/kpartx/Makefile -index 742d3bcd..d886483d 100644 ---- a/kpartx/Makefile -+++ b/kpartx/Makefile -@@ -9,9 +9,7 @@ LDFLAGS += $(BIN_LDFLAGS) - - LIBDEPS += -ldevmapper - --ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) -- CPPFLAGS += -DLIBDM_API_COOKIE --endif -+CPPFLAGS += -DLIBDM_API_COOKIE - - OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ - gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch b/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch deleted file mode 100644 index ec123b212b..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 21a8680b7bd436867ac689a0b4b1b18a3359e208 Mon Sep 17 00:00:00 2001 -From: Geoff Parker -Date: Fri, 9 Oct 2020 17:48:47 +0000 -Subject: [PATCH] libdmmp/Makefile: replace perl with sed in install target to - work with pseudo - -The multipath-tools libdmmp/Makefile install target uses 'perl -i' instead -of 'sed -i' for string substitutions. The perl method creates a temporary file -and overwrites the original which changes the inodes and corrupts the pseudo -db. Changes to pseduo cause a build abort rather than allow possible bad -ownership or permissions settings on the files. 'sed -i' is compatible -with pseudo. - -Signed-off-by: Geoff Parker -[OP: Rebase to 0.9.3] -Signed-off-by: Ovidiu Panait ---- -Upstream-Status: Pending - - libdmmp/Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libdmmp/Makefile b/libdmmp/Makefile -index e4589250..34e06425 100644 ---- a/libdmmp/Makefile -+++ b/libdmmp/Makefile -@@ -39,11 +39,11 @@ install: - $(LN) $(LIBS) $(DESTDIR)$(usrlibdir)/$(DEVLIB) - $(INSTALL_PROGRAM) -m 644 -D \ - $(PKGFILE).in $(DESTDIR)$(pkgconfdir)/$(PKGFILE) -- perl -i -pe 's|__VERSION__|$(LIBDMMP_VERSION)|g' \ -+ sed -i 's|__VERSION__|$(LIBDMMP_VERSION)|g' \ - $(DESTDIR)$(pkgconfdir)/$(PKGFILE) -- perl -i -pe 's|__LIBDIR__|$(usrlibdir)|g' \ -+ sed -i 's|__LIBDIR__|$(usrlibdir)|g' \ - $(DESTDIR)$(pkgconfdir)/$(PKGFILE) -- perl -i -pe 's|__INCLUDEDIR__|$(includedir)|g' \ -+ sed -i 's|__INCLUDEDIR__|$(includedir)|g' \ - $(DESTDIR)$(pkgconfdir)/$(PKGFILE) - $(INSTALL_PROGRAM) -d 755 $(DESTDIR)$(man3dir) - $(INSTALL_PROGRAM) -m 644 -t $(DESTDIR)$(man3dir) docs/man/*.3 --- -2.38.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.3.bb b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.3.bb deleted file mode 100644 index a7a9019e33..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.3.bb +++ /dev/null @@ -1,125 +0,0 @@ -SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" - -DESCRIPTION = "It provides tools to manage multipath devices \ -by instructing the device-mapper kernel module what to do. These \ -tools include: \ -1. multipath - Scan the system for multipath devices and assemble them.\ -2. multipathd - Detects when paths fail and execs multipath to update \ -things.\ -3. mpathpersist - Persistent reservation management feature allows \ -cluster management software to manage persistent reservation through \ -mpath device. It processes management requests from callers and hides \ -the management task details. It also handles persistent reservation \ -management of data path life cycle and state changes.\ -4. kpartx - This tool, derived from util-linux's partx, reads partition \ -tables on specified device and create device maps over partitions \ -segments detected. It is called from hotplug upon device maps creation \ -and deletion" - -HOMEPAGE = "http://christophe.varoqui.free.fr/" - -DEPENDS = "libdevmapper \ - lvm2 \ - libaio \ - liburcu \ - readline \ - udev \ - json-c \ - " - -LICENSE = "GPL-2.0-only" - -SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=master \ - file://multipathd.oe \ - file://multipath.conf.example \ - file://0021-RH-fixup-udev-rules-for-redhat.patch \ - file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \ - file://0023-RH-don-t-start-without-a-config-file.patch \ - file://0024-RH-use-rpm-optflags-if-present.patch \ - file://0025-RH-add-mpathconf.patch \ - file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ - file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \ - file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \ - file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \ - file://0030-Always-use-devmapper.patch \ - file://0031-Always-use-devmapper-for-kpartx.patch \ - file://0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch \ - file://0001-fix-bug-of-do_compile-and-do_install.patch \ - file://0001-add-explicit-dependency-on-libraries.patch \ - " - -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -SRCREV = "1332947447133fdf26246012b836868a3d974f0e" - -S = "${WORKDIR}/git" - -inherit systemd pkgconfig - -SYSTEMD_SERVICE:${PN} = "multipathd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -TARGET_CC_ARCH += "${LDFLAGS}" - -# multipath-tools includes a copy of the valgrind.h header -# file and uses the macros to suppress some false positives. However, -# that only works on ARM when thumb is disabled. Otherwise one gets: -# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' -# ../Makefile.inc:66: recipe for target 'debug.o' failed -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" - -# The exact version of SYSTEMD does not matter but should be greater than 209. -# -EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ - OPTFLAGS="${CFLAGS}" \ - prefix=${prefix} \ - bindir=${base_sbindir} \ - LIB=${base_libdir} libdir=${base_libdir}/multipath \ - usrlibdir=${libdir} \ - plugindir=${base_libdir}/multipath \ - unitdir=${systemd_system_unitdir} \ - libudevdir=${nonarch_base_libdir}/udev \ - modulesloaddir=${sysconfdir}/modules-load.d \ - tmpfilesdir=${sysconfdir}/tmpfiles.d \ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ - ' - -do_install() { - oe_runmake install - - # We copy an initscript, but do not start multipathd at init time. - # - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then - install -d ${D}${sysconfdir}/init.d - cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd - fi - - sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ - ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules - - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/multipath.conf.example \ - ${D}${sysconfdir}/multipath.conf.example -} - -FILES:${PN}-dbg += "${base_libdir}/multipath/.debug" - -PACKAGES =+ "${PN}-libs" -FILES:${PN}-libs = "${base_libdir}/lib*.so.* \ - ${base_libdir}/multipath/lib*.so*" -RDEPENDS:${PN} += "${PN}-libs bash libgcc" - -PROVIDES += "device-mapper-multipath" -RPROVIDES:${PN} += "device-mapper-multipath" -RPROVIDES:${PN}-libs += "device-mapper-multipath-libs" - -FILES:${PN}-dev += "${base_libdir}/pkgconfig" - -PACKAGES =+ "kpartx" -FILES:kpartx = "${base_sbindir}/kpartx \ - ${nonarch_base_libdir}/udev/kpartx_id \ - " - -RDEPENDS:${PN} += "kpartx" -PARALLEL_MAKE = "" diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb new file mode 100644 index 0000000000..df95df6f70 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb @@ -0,0 +1,124 @@ +SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" + +DESCRIPTION = "It provides tools to manage multipath devices \ +by instructing the device-mapper kernel module what to do. These \ +tools include: \ +1. multipath - Scan the system for multipath devices and assemble them.\ +2. multipathd - Detects when paths fail and execs multipath to update \ +things.\ +3. mpathpersist - Persistent reservation management feature allows \ +cluster management software to manage persistent reservation through \ +mpath device. It processes management requests from callers and hides \ +the management task details. It also handles persistent reservation \ +management of data path life cycle and state changes.\ +4. kpartx - This tool, derived from util-linux's partx, reads partition \ +tables on specified device and create device maps over partitions \ +segments detected. It is called from hotplug upon device maps creation \ +and deletion" + +HOMEPAGE = "http://christophe.varoqui.free.fr/" + +DEPENDS = "libdevmapper \ + lvm2 \ + libaio \ + liburcu \ + readline \ + udev \ + json-c \ + " + +LICENSE = "GPL-2.0-only" + +SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=master \ + file://multipathd.oe \ + file://multipath.conf.example \ + file://0001-RH-fixup-udev-rules-for-redhat.patch \ + file://0002-RH-Remove-the-property-blacklist-exception-builtin.patch \ + file://0003-RH-don-t-start-without-a-config-file.patch \ + file://0004-RH-use-rpm-optflags-if-present.patch \ + file://0005-RH-add-mpathconf.patch \ + file://0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ + file://0007-RH-warn-on-invalid-regex-instead-of-failing.patch \ + file://0008-RH-reset-default-find_mutipaths-value-to-off.patch \ + file://0009-multipath-tools-modify-create-config.mk-for-cross-co.patch \ + file://0010-Subject-PATCH-Always-use-devmapper.patch \ + file://0011-fix-bug-of-do_compile-and-do_install.patch \ + file://0012-add-explicit-dependency-on-libraries.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +SRCREV = "3daacfdfd110b24a3a7d5a276dcf8512b7039199" + +S = "${WORKDIR}/git" + +inherit systemd pkgconfig + +SYSTEMD_SERVICE:${PN} = "multipathd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +TARGET_CC_ARCH += "${LDFLAGS}" + +# multipath-tools includes a copy of the valgrind.h header +# file and uses the macros to suppress some false positives. However, +# that only works on ARM when thumb is disabled. Otherwise one gets: +# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' +# ../Makefile.inc:66: recipe for target 'debug.o' failed +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +# The exact version of SYSTEMD does not matter but should be greater than 209. +# +EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ + OPTFLAGS="${CFLAGS}" \ + prefix=${prefix} \ + bindir=${base_sbindir} \ + LIB=${base_libdir} libdir=${base_libdir}/multipath \ + usrlibdir=${libdir} \ + plugindir=${base_libdir}/multipath \ + unitdir=${systemd_system_unitdir} \ + libudevdir=${nonarch_base_libdir}/udev \ + modulesloaddir=${sysconfdir}/modules-load.d \ + tmpfilesdir=${sysconfdir}/tmpfiles.d \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ + ' + +do_install() { + oe_runmake install + + # We copy an initscript, but do not start multipathd at init time. + # + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then + install -d ${D}${sysconfdir}/init.d + cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd + fi + + sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ + ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules + + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/multipath.conf.example \ + ${D}${sysconfdir}/multipath.conf.example +} + +FILES:${PN} += "${systemd_system_unitdir}" +FILES:${PN}-dbg += "${base_libdir}/multipath/.debug" + +PACKAGES =+ "${PN}-libs" +FILES:${PN}-libs = "${base_libdir}/lib*.so.* \ + ${base_libdir}/multipath/lib*.so*" +RDEPENDS:${PN} += "${PN}-libs bash libgcc" + +PROVIDES += "device-mapper-multipath" +RPROVIDES:${PN} += "device-mapper-multipath" +RPROVIDES:${PN}-libs += "device-mapper-multipath-libs" + +FILES:${PN}-dev += "${base_libdir}/pkgconfig" + +PACKAGES =+ "kpartx" +FILES:kpartx = "${base_sbindir}/kpartx \ + ${nonarch_base_libdir}/udev/kpartx_id \ + " + +RDEPENDS:${PN} += "kpartx" +PARALLEL_MAKE = "" diff --git a/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.5.16.bb b/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.5.16.bb deleted file mode 100644 index 8d13a4ddbd..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.5.16.bb +++ /dev/null @@ -1,234 +0,0 @@ -SUMMARY = "OpenLDAP Directory Service" -DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." -HOMEPAGE = "http://www.OpenLDAP.org/license.html" -# The OpenLDAP Public License - see the HOMEPAGE - defines -# the license. www.openldap.org claims this is Open Source -# (see http://www.openldap.org), the license appears to be -# basically BSD. opensource.org does not record this license -# at present (so it is apparently not OSI certified). -LICENSE = "OpenLDAP" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=beceb5ac7100b6430640c61655b25c1f \ - file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \ - " -SECTION = "libs" - -LDAP_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" - -SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${BP}.tgz \ - file://initscript \ - file://slapd.service \ - file://remove-user-host-pwd-from-version.patch \ - file://0001-build-top.mk-unset-STRIP_OPTS.patch \ -" - -SRC_URI[sha256sum] = "546ba591822e8bb0e467d40c4d4a30f89d937c3a507fe83a578f582f6a211327" - -DEPENDS = "util-linux groff-native" - -inherit autotools-brokensep update-rc.d systemd pkgconfig - -# CV SETTINGS -# Required to work round AC_FUNC_MEMCMP which gets the wrong answer -# when cross compiling (should be in site?) -EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" - -# CONFIG DEFINITIONS -# The following is necessary because it cannot be determined for a -# cross compile automagically. Select should yield fine on all OE -# systems... -EXTRA_OECONF += "--with-yielding-select=yes" -# Shared libraries are nice... -EXTRA_OECONF += "--enable-dynamic" - -PACKAGECONFIG ??= "asyncmeta gnutls modules \ - mdb ldap meta null passwd proxycache dnssrv \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ -" -#--with-tls with TLS/SSL support auto|openssl|gnutls [auto] -PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls" -PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" - -PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" -PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" - -# SLAPD options -# -# UNIX crypt(3) passwd support: -EXTRA_OECONF += "--enable-crypt" - -# SLAPD BACKEND -# -# The backend must be set by the configuration. This controls the -# required database. -# -# Backends="asyncmeta dnssrv ldap mdb meta ndb null passwd perl relay sock sql wt" -# -# Note that multiple backends can be built. The ldbm backend requires a -# build-time choice of database API. To use the gdbm (or other) API the -# Berkely database module must be removed from the build. -md = "${libexecdir}/openldap" -# - -#--enable-asyncmeta enable asyncmeta backend no|yes|mod no -PACKAGECONFIG[asyncmeta] = "--enable-asyncmeta=mod,--enable-asyncmeta=no" - -#--enable-dnssrv enable dnssrv backend no|yes|mod no -PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" - -#--enable-ldap enable ldap backend no|yes|mod no -PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," - -#--enable-mdb enable mdb database backend no|yes|mod [yes] -PACKAGECONFIG[mdb] = "--enable-mdb=yes,--enable-mdb=no," - -#--enable-meta enable metadirectory backend no|yes|mod no -PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," - -#--enable-ndb enable MySQL NDB Cluster backend no|yes|mod [no] -PACKAGECONFIG[ndb] = "--enable-ndb=mod,--enable-ndb=no," - -#--enable-null enable null backend no|yes|mod no -PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," - -#--enable-passwd enable passwd backend no|yes|mod no -PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," - -#--enable-perl enable perl backend no|yes|mod no -# This requires a loadable perl dynamic library, if enabled without -# doing something appropriate (building perl?) the build will pick -# up the build machine perl - not good (inherit perlnative?) -PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" - -#--enable-relay enable relay backend no|yes|mod [yes] -PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no," - -#--enable-sock enable sock backend no|yes|mod [no] -PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no," - -#--enable-sql enable sql backend no|yes|mod no -# sql requires some sql backend which provides sql.h, sqlite* provides -# sqlite.h (which may be compatible but hasn't been tried.) -PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" - -#--enable-wt enable wt backend no|yes|mod no -# back-wt is marked currently as experimental -PACKAGECONFIG[wt] = "--enable-wt=mod,--enable-wt=no" - -#--enable-dyngroup Dynamic Group overlay no|yes|mod no -# This is a demo, Proxy Cache defines init_module which conflicts with the -# same symbol in dyngroup -PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," - -#--enable-proxycache Proxy Cache overlay no|yes|mod no -PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," -FILES:${PN}-overlay-proxycache = "${md}/pcache-*.so.*" -PACKAGES += "${PN}-overlay-proxycache" - -# Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS: -# This allows tls to obtain random bits from /dev/urandom, by default -# it was disabled for cross-compiling. -CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC" - -LDFLAGS:append = " -pthread" - -do_configure() { - rm -f ${S}/libtool - aclocal - libtoolize --force --copy - gnu-configize - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/missing ${S}/build - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/compile ${S}/build - autoconf - oe_runconf -} - -LEAD_SONAME = "libldap-${LDAP_VER}.so.*" - -# The executables go in a separate package. This allows the -# installation of the libraries with no daemon support. -# Each module also has its own package - see above. -PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" - -# Package contents - shift most standard contents to -bin -FILES:${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data" -FILES:${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ - ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ - ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" -FILES:${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp" -FILES:${PN}-bin = "${bindir}" -FILES:${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so ${libdir}/pkgconfig/*.pc" -FILES:${PN}-dbg += "${libexecdir}/openldap/.debug" - -do_install:append() { - install -d ${D}${sysconfdir}/init.d - cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap - chmod 755 ${D}${sysconfdir}/init.d/openldap - # This is duplicated in /etc/openldap and is for slapd - rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example - - # Installing slapd under ${sbin} is more FHS and LSB compliance - mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd - rmdir --ignore-fail-on-non-empty ${D}${libexecdir} - SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema slapmodify" - cd ${D}/${sbindir}/ - rm -f ${SLAPTOOLS} - for i in ${SLAPTOOLS}; do ln -sf slapd $i; done - - rmdir "${D}${localstatedir}/run" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service - - # Uses mdm as the database - # and localstatedir as data directory ... - sed -e 's/# modulepath/modulepath/' \ - -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \ - -e 's/database\s*bdb/database mdb/' \ - -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%' \ - -i ${D}${sysconfdir}/openldap/slapd.conf - - mkdir -p ${D}${localstatedir}/${BPN}/data -} - -INITSCRIPT_PACKAGES = "${PN}-slapd" -INITSCRIPT_NAME:${PN}-slapd = "openldap" -INITSCRIPT_PARAMS:${PN}-slapd = "defaults" -SYSTEMD_PACKAGES = "${PN}-slapd" -SYSTEMD_SERVICE:${PN}-slapd = "slapd.service" -SYSTEMD_AUTO_ENABLE:${PN}-slapd ?= "disable" - -PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" - -# The modules require their .so to be dynamicaly loaded -INSANE_SKIP:${PN}-backend-asyncmeta += "dev-so" -INSANE_SKIP:${PN}-backend-dnssrv += "dev-so" -INSANE_SKIP:${PN}-backend-ldap += "dev-so" -INSANE_SKIP:${PN}-backend-meta += "dev-so" -INSANE_SKIP:${PN}-backend-mdb += "dev-so" -INSANE_SKIP:${PN}-backend-null += "dev-so" -INSANE_SKIP:${PN}-backend-passwd += "dev-so" - -python populate_packages:prepend () { - backend_dir = d.expand('${libexecdir}/openldap') - do_split_packages(d, backend_dir, r'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True) - do_split_packages(d, backend_dir, r'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) - - metapkg = "${PN}-backends" - d.setVar('ALLOW_EMPTY:' + metapkg, "1") - d.setVar('FILES:' + metapkg, "") - metapkg_rdepends = [] - packages = d.getVar('PACKAGES').split() - for pkg in packages[1:]: - if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): - metapkg_rdepends.append(pkg) - d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) - d.setVar('DESCRIPTION:' + metapkg, 'OpenLDAP backends meta package') - packages.append(metapkg) - d.setVar('PACKAGES', ' '.join(packages)) -} - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb b/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb new file mode 100644 index 0000000000..e807fdef16 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb @@ -0,0 +1,231 @@ +SUMMARY = "OpenLDAP Directory Service" +DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." +HOMEPAGE = "http://www.OpenLDAP.org/license.html" +# The OpenLDAP Public License - see the HOMEPAGE - defines +# the license. www.openldap.org claims this is Open Source +# (see http://www.openldap.org), the license appears to be +# basically BSD. opensource.org does not record this license +# at present (so it is apparently not OSI certified). +LICENSE = "OpenLDAP" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=beceb5ac7100b6430640c61655b25c1f \ + file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \ + " +SECTION = "libs" + +LDAP_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" + +SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${BP}.tgz \ + file://initscript \ + file://slapd.service \ + file://remove-user-host-pwd-from-version.patch \ + file://0001-build-top.mk-unset-STRIP_OPTS.patch \ +" + +SRC_URI[sha256sum] = "cd775f625c944ed78a3da18a03b03b08eea73c8aabc97b41bb336e9a10954930" + +DEPENDS = "util-linux groff-native" + +inherit autotools-brokensep update-rc.d systemd pkgconfig + +# CV SETTINGS +# Required to work round AC_FUNC_MEMCMP which gets the wrong answer +# when cross compiling (should be in site?) +EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" + +# CONFIG DEFINITIONS +# The following is necessary because it cannot be determined for a +# cross compile automagically. Select should yield fine on all OE +# systems... +EXTRA_OECONF += "--with-yielding-select=yes" +# Shared libraries are nice... +EXTRA_OECONF += "--enable-dynamic" + +PACKAGECONFIG ??= "asyncmeta gnutls modules \ + mdb ldap meta null passwd proxycache dnssrv \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +#--with-tls with TLS/SSL support auto|openssl|gnutls [auto] +PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls" +PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" + +PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" +PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" + +# SLAPD options +# +# UNIX crypt(3) passwd support: +EXTRA_OECONF += "--enable-crypt" + +# SLAPD BACKEND +# +# The backend must be set by the configuration. This controls the +# required database. +# +# Backends="asyncmeta dnssrv ldap mdb meta null passwd perl relay sock sql wt" +# +# Note that multiple backends can be built. The ldbm backend requires a +# build-time choice of database API. To use the gdbm (or other) API the +# Berkely database module must be removed from the build. +md = "${libexecdir}/openldap" +# + +#--enable-asyncmeta enable asyncmeta backend no|yes|mod no +PACKAGECONFIG[asyncmeta] = "--enable-asyncmeta=mod,--enable-asyncmeta=no" + +#--enable-dnssrv enable dnssrv backend no|yes|mod no +PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" + +#--enable-ldap enable ldap backend no|yes|mod no +PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," + +#--enable-mdb enable mdb database backend no|yes|mod [yes] +PACKAGECONFIG[mdb] = "--enable-mdb=yes,--enable-mdb=no," + +#--enable-meta enable metadirectory backend no|yes|mod no +PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," + +#--enable-null enable null backend no|yes|mod no +PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," + +#--enable-passwd enable passwd backend no|yes|mod no +PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," + +#--enable-perl enable perl backend no|yes|mod no +# This requires a loadable perl dynamic library, if enabled without +# doing something appropriate (building perl?) the build will pick +# up the build machine perl - not good (inherit perlnative?) +PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" + +#--enable-relay enable relay backend no|yes|mod [yes] +PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no," + +#--enable-sock enable sock backend no|yes|mod [no] +PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no," + +#--enable-sql enable sql backend no|yes|mod no +# sql requires some sql backend which provides sql.h, sqlite* provides +# sqlite.h (which may be compatible but hasn't been tried.) +PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" + +#--enable-wt enable wt backend no|yes|mod no +# back-wt is marked currently as experimental +PACKAGECONFIG[wt] = "--enable-wt=mod,--enable-wt=no" + +#--enable-dyngroup Dynamic Group overlay no|yes|mod no +# This is a demo, Proxy Cache defines init_module which conflicts with the +# same symbol in dyngroup +PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," + +#--enable-proxycache Proxy Cache overlay no|yes|mod no +PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," +FILES:${PN}-overlay-proxycache = "${md}/pcache.so.*" +PACKAGES += "${PN}-overlay-proxycache" + +# Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS: +# This allows tls to obtain random bits from /dev/urandom, by default +# it was disabled for cross-compiling. +CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC" + +LDFLAGS:append = " -pthread" + +do_configure() { + rm -f ${S}/libtool + aclocal + libtoolize --force --copy + gnu-configize + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/missing ${S}/build + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/compile ${S}/build + autoconf + oe_runconf +} + +LEAD_SONAME = "libldap-${LDAP_VER}.so.*" + +# The executables go in a separate package. This allows the +# installation of the libraries with no daemon support. +# Each module also has its own package - see above. +PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" + +# Package contents - shift most standard contents to -bin +FILES:${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data" +FILES:${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ + ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ + ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" +FILES:${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp" +FILES:${PN}-bin = "${bindir}" +FILES:${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so ${libdir}/pkgconfig/*.pc" +FILES:${PN}-dbg += "${libexecdir}/openldap/.debug" + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap + chmod 755 ${D}${sysconfdir}/init.d/openldap + # This is duplicated in /etc/openldap and is for slapd + rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example + + # Installing slapd under ${sbin} is more FHS and LSB compliance + mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd + rmdir --ignore-fail-on-non-empty ${D}${libexecdir} + SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema slapmodify" + cd ${D}/${sbindir}/ + rm -f ${SLAPTOOLS} + for i in ${SLAPTOOLS}; do ln -sf slapd $i; done + + rmdir "${D}${localstatedir}/run" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service + + # Uses mdm as the database + # and localstatedir as data directory ... + sed -e 's/# modulepath/modulepath/' \ + -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \ + -e 's/database\s*bdb/database mdb/' \ + -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%' \ + -i ${D}${sysconfdir}/openldap/slapd.conf + + mkdir -p ${D}${localstatedir}/${BPN}/data +} + +INITSCRIPT_PACKAGES = "${PN}-slapd" +INITSCRIPT_NAME:${PN}-slapd = "openldap" +INITSCRIPT_PARAMS:${PN}-slapd = "defaults" +SYSTEMD_PACKAGES = "${PN}-slapd" +SYSTEMD_SERVICE:${PN}-slapd = "slapd.service" +SYSTEMD_AUTO_ENABLE:${PN}-slapd ?= "disable" + +PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" + +# The modules require their .so to be dynamicaly loaded +INSANE_SKIP:${PN}-backend-asyncmeta += "dev-so" +INSANE_SKIP:${PN}-backend-dnssrv += "dev-so" +INSANE_SKIP:${PN}-backend-ldap += "dev-so" +INSANE_SKIP:${PN}-backend-meta += "dev-so" +INSANE_SKIP:${PN}-backend-mdb += "dev-so" +INSANE_SKIP:${PN}-backend-null += "dev-so" +INSANE_SKIP:${PN}-backend-passwd += "dev-so" + +python populate_packages:prepend () { + backend_dir = d.expand('${libexecdir}/openldap') + do_split_packages(d, backend_dir, r'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True) + do_split_packages(d, backend_dir, r'back_([a-z]*)\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) + + metapkg = "${PN}-backends" + d.setVar('ALLOW_EMPTY:' + metapkg, "1") + d.setVar('FILES:' + metapkg, "") + metapkg_rdepends = [] + packages = d.getVar('PACKAGES').split() + for pkg in packages[1:]: + if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): + metapkg_rdepends.append(pkg) + d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) + d.setVar('DESCRIPTION:' + metapkg, 'OpenLDAP backends meta package') + packages.append(metapkg) + d.setVar('PACKAGES', ' '.join(packages)) +} + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.0.1.bb b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.0.1.bb deleted file mode 100644 index 77a5e67a42..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.0.1.bb +++ /dev/null @@ -1,148 +0,0 @@ -SUMMARY = "Alternative system logger daemon" -DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ -but with new functionality for the new generation. The original syslogd \ -allows messages only to be sorted based on priority/facility pairs; \ -syslog-ng adds the possibility to filter based on message contents using \ -regular expressions. The new configuration scheme is intuitive and powerful. \ -Forwarding logs over TCP and remembering all forwarding hops makes it \ -ideal for firewalled environments. \ -" -HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=71d15c2fb22f43e1a380f3f799ebde30" - -# util-linux added to get libuuid -DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native" - -SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ - file://syslog-ng.conf.systemd \ - file://syslog-ng.conf.sysvinit \ - file://initscript \ - file://volatiles.03_syslog-ng \ - file://syslog-ng-tmp.conf \ - file://syslog-ng.service-the-syslog-ng-service.patch \ - file://0001-Fix-buildpaths-warning.patch \ -" -SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" - -SRC_URI[sha256sum] = "c16eafe447191c079f471846182876b7919d3d789af8c1f9fe55ab14521ceb2c" - -UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" - -CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" - -inherit autotools gettext systemd pkgconfig update-rc.d multilib_header - -EXTRA_OECONF = " \ - --enable-dynamic-linking \ - --disable-sub-streams \ - --disable-pacct \ - --localstatedir=${localstatedir}/lib/${BPN} \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-module-dir=${libdir}/${BPN} \ - --with-sysroot=${STAGING_DIR_HOST} \ - --without-mongoc --disable-mongodb \ - --with-librabbitmq-client=no \ - --disable-python \ - --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ -" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," -PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," -PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," -PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," -PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," -PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," -PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," -PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," -PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," -PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," -PACKAGECONFIG[native] = "--enable-native,--disable-native,," - -do_configure:prepend() { - olddir=$(pwd) - cd ${AUTOTOOLS_SCRIPT_PATH} - - ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." - - cd $olddir -} - -do_install:append() { - install -d ${D}${sysconfdir}/${BPN} - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog - - install -d ${D}${sysconfdir}/default/volatiles/ - install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng - install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 644 ${WORKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf - - install -d ${D}${localstatedir}/lib/${BPN} - # Remove /var/run as it is created on startup - rm -rf ${D}${localstatedir}/run - - # it causes install conflict when multilib enabled - # since python support is disabled, not deliver it - rm -f ${D}${bindir}/syslog-ng-update-virtualenv - - # support for systemd - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -m 644 ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf - - install -d ${D}${systemd_unitdir}/system/ - install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service - install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default - - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants - ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service - else - install -m 644 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf - fi - - oe_multilib_header syslog-ng/syslog-ng-config.h -} - -FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" -RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" - -FILES:${PN}-jconf += " \ -${datadir}/${BPN}/include/scl/cim \ -${datadir}/${BPN}/include/scl/elasticsearch \ -${datadir}/${BPN}/include/scl/ewmm \ -${datadir}/${BPN}/include/scl/graylog2 \ -${datadir}/${BPN}/include/scl/loggly \ -${datadir}/${BPN}/include/scl/logmatic \ -" - -# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error -PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" -RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" -FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" -FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" -FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" -FILES:${PN} += "${systemd_unitdir}/system/*.service" -INSANE_SKIP:${PN}-libs = "dev-so" -RDEPENDS:${PN} += "${PN}-libs" - -CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" - -RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" -RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}@.service" - -INITSCRIPT_NAME = "syslog" -INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb new file mode 100644 index 0000000000..4cc5d84519 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb @@ -0,0 +1,148 @@ +SUMMARY = "Alternative system logger daemon" +DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ +but with new functionality for the new generation. The original syslogd \ +allows messages only to be sorted based on priority/facility pairs; \ +syslog-ng adds the possibility to filter based on message contents using \ +regular expressions. The new configuration scheme is intuitive and powerful. \ +Forwarding logs over TCP and remembering all forwarding hops makes it \ +ideal for firewalled environments. \ +" +HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" + +# util-linux added to get libuuid +DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl" + +SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ + file://syslog-ng.conf.systemd \ + file://syslog-ng.conf.sysvinit \ + file://initscript \ + file://volatiles.03_syslog-ng \ + file://syslog-ng-tmp.conf \ + file://syslog-ng.service-the-syslog-ng-service.patch \ + file://0001-Fix-buildpaths-warning.patch \ +" +SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" + +SRC_URI[sha256sum] = "b69e3360dfb96a754a4e1cbead4daef37128b1152a23572356db4ab64a475d4f" + +UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" + +CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" + +inherit autotools gettext systemd pkgconfig update-rc.d multilib_header + +EXTRA_OECONF = " \ + --enable-dynamic-linking \ + --disable-sub-streams \ + --disable-pacct \ + --localstatedir=${localstatedir}/lib/${BPN} \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-module-dir=${libdir}/${BPN} \ + --with-sysroot=${STAGING_DIR_HOST} \ + --without-mongoc --disable-mongodb \ + --with-librabbitmq-client=no \ + --disable-python \ + --disable-java --disable-java-modules \ + --with-pidfile-dir=${localstatedir}/run/${BPN} \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ +" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," +PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," +PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," +PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," +PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," +PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," +PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," +PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," +PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +PACKAGECONFIG[native] = "--enable-native,--disable-native,," + +do_configure:prepend() { + olddir=$(pwd) + cd ${AUTOTOOLS_SCRIPT_PATH} + + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." + + cd $olddir +} + +do_install:append() { + install -d ${D}${sysconfdir}/${BPN} + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + + install -d ${D}${sysconfdir}/default/volatiles/ + install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 644 ${WORKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf + + install -d ${D}${localstatedir}/lib/${BPN} + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run + + # it causes install conflict when multilib enabled + # since python support is disabled, not deliver it + rm -f ${D}${bindir}/syslog-ng-update-virtualenv + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 644 ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + + install -d ${D}${systemd_unitdir}/system/ + install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service + else + install -m 644 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi + + oe_multilib_header syslog-ng/syslog-ng-config.h +} + +FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" +RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" + +FILES:${PN}-jconf += " \ +${datadir}/${BPN}/include/scl/cim \ +${datadir}/${BPN}/include/scl/elasticsearch \ +${datadir}/${BPN}/include/scl/ewmm \ +${datadir}/${BPN}/include/scl/graylog2 \ +${datadir}/${BPN}/include/scl/loggly \ +${datadir}/${BPN}/include/scl/logmatic \ +" + +# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error +PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" +RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" +FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" +FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" +FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" +FILES:${PN} += "${systemd_unitdir}/system/*.service" +INSANE_SKIP:${PN}-libs = "dev-so" +RDEPENDS:${PN} += "${PN}-libs" + +CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" + +RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" +RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}@.service" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." diff --git a/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb b/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb index 8c75f936de..1b05f3d336 100644 --- a/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb +++ b/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb @@ -10,11 +10,17 @@ S = "${WORKDIR}/git" SRCREV = "f8d7d77c06936315286eb55f8de22cd23c188571" SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https" -inherit cmake +inherit cmake pkgconfig + +# allow for shared libraries, but do not default to them +# +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + ALLOW_EMPTY:${PN} = "1" ALLOW_EMPTY:${PN}-dbg = "1" +ALLOW_EMPTY:${PN}-staticdev = "1" RDEPENDS:${PN}-dev += "${PN}-staticdev" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb index 2adc06a2bc..b43207f2a7 100644 --- a/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb +++ b/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb @@ -10,7 +10,13 @@ SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IM file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \ file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \ " -SRCREV = "6d01f20890edf11b99bb54573025b11c1acd2d52" +SRCREV = "25905f5d0a2a7883bd33491997556193582c6059" + +export GOPROXY = "https://proxy.golang.org,direct" +# Workaround for network access issue during compile step. +# This needs to be fixed in the recipes buildsystem so that +# it can be accomplished during do_fetch task. +do_compile[network] = "1" COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux" @@ -26,6 +32,8 @@ export TARGETVMARCH = '${GOARCH}' CGO_ENABLED = "1" +LDFLAGS:append:class-target = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", " -lc++", " -lstdc++", d)}" + DEPENDS:class-native += "qemu-system-native" do_compile:class-native() { @@ -46,7 +54,7 @@ do_compile:class-target() { unset GOOS unset GOARCH - oe_runmake GO="${GO}" CC="${CXX}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target + oe_runmake GO="${GO}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target } do_install:class-native() { diff --git a/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc index 22894487f1..5d9eb0fa1c 100644 --- a/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -17,7 +17,9 @@ PTESTS_FAST_META_PYTHON = "\ python3-click \ python3-dominate \ python3-execnet \ + python3-freezegun \ python3-geojson \ + python3-gpiod \ python3-gunicorn \ python3-html2text \ python3-inflection \ @@ -29,6 +31,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-jsmin \ python3-msgpack \ python3-multidict \ + python3-netaddr \ python3-ordered-set \ python3-parse \ python3-parse-type \ @@ -64,13 +67,17 @@ PTESTS_FAST_META_PYTHON = "\ python3-u-msgpack-python \ python3-unidiff \ python3-uritemplate \ + python3-wrapt \ + python3-xlrd \ python3-xmltodict \ python3-xxhash \ python3-yarl \ " PTESTS_SLOW_META_PYTHON = "\ + python3-arrow \ python3-lz4 \ + python3-marshmallow \ python3-yappi \ " @@ -78,11 +85,9 @@ PTESTS_PROBLEMS_META_PYTHON ="\ python3-betamax \ python3-dnspython \ python3-fastjsonschema \ - python3-gpiod \ python3-pillow \ python3-pint \ python3-pyzmq \ python3-scrypt \ python3-whoosh \ - python3-xlrd \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb index 0ca4834773..edad28e772 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb @@ -8,5 +8,5 @@ SRC_URI[sha256sum] = "77e15a733090547a1f5369a1287ddfc944bd30df0eb8993f585259c34b inherit pypi python_poetry_core -BBCLASSSEXTEND = "native nativesdk" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb index 90ba5de96f..c1b7c1a433 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb @@ -1,13 +1,35 @@ SUMMARY = "Better dates and times for Python" -HOMEPAGE = "https://github.com/crsmithdev/arrow" +HOMEPAGE = "https://github.com/arrow-py/arrow" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=14a2e29a9d542fb9052d75344d67619d" SRC_URI[sha256sum] = "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" -inherit setuptools3 pypi +inherit pypi python_flit_core ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-dateutil-zoneinfo \ + python3-pytest \ + python3-pytest-mock \ + python3-pytz \ + python3-simplejson \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} RDEPENDS:${PN} += " \ - python3-dateutil \ - " + python3-compression \ + python3-dateutil \ + python3-dateutil-zoneinfo \ + python3-json \ + python3-types-python-dateutil \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax/0001-Drop-ptests-fixtures-and-recorde_modes.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax/0001-Drop-ptests-fixtures-and-recorde_modes.patch index 7adcb68324..52745a9373 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax/0001-Drop-ptests-fixtures-and-recorde_modes.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax/0001-Drop-ptests-fixtures-and-recorde_modes.patch @@ -1,7 +1,7 @@ -From 0e0b63ae80df5d7849b2e1c5ab9a668e8378b5e8 Mon Sep 17 00:00:00 2001 +From e5aa66b1af2d49f159c4daefc598f96744ee988d Mon Sep 17 00:00:00 2001 From: Zhixiong Chi -Date: Tue, 28 Mar 2023 06:05:45 +0000 -Subject: [PATCH] Drop ptests fixtures and recorde_modes +Date: Thu, 29 Feb 2024 12:31:58 -0800 +Subject: [PATCH] [PATCH] Drop ptests fixtures and recorde_modes The usage of fixture in test_fixtures has been deprecated. See https://docs.pytest.org/en/stable/explanation/fixtures.html and @@ -12,14 +12,15 @@ re-sold several times, and it adds X-Amzn-Trace-Id header that can possibly diff for each request. It leads to ptest failure, so drop it now until we find the solution. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Zhixiong Chi +Signed-off-by: Khem Raj --- tests/integration/test_fixtures.py | 60 ----------- - tests/integration/test_record_modes.py | 132 ------------------------- - tests/unit/test_fixtures.py | 94 ------------------ - 3 files changed, 286 deletions(-) + tests/integration/test_record_modes.py | 141 ------------------------- + tests/unit/test_fixtures.py | 94 ----------------- + 3 files changed, 295 deletions(-) delete mode 100644 tests/integration/test_fixtures.py delete mode 100644 tests/integration/test_record_modes.py delete mode 100644 tests/unit/test_fixtures.py @@ -92,10 +93,12 @@ index fc3d1e7..0000000 - assert True diff --git a/tests/integration/test_record_modes.py b/tests/integration/test_record_modes.py deleted file mode 100644 -index 58c8846..0000000 +index 988b851..0000000 --- a/tests/integration/test_record_modes.py +++ /dev/null -@@ -1,132 +0,0 @@ +@@ -1,141 +0,0 @@ +-import re +- -from betamax import Betamax, BetamaxError - -from tests.integration.helper import IntegrationHelper @@ -137,8 +140,15 @@ index 58c8846..0000000 - # this test to succeed. - # NOTE(hroncok): httpbin.org added X-Processed-Time header that - # can possibly differ (and often does) +- r0_content = r0.content.decode(encoding='utf-8', errors='strict') +- r1_content = r1.content.decode(encoding='utf-8', errors='strict') +- r0_content = re.sub('"X-Amzn-Trace-Id": "[^"]+"', '"X-Amzn-Trace-Id": ""', r0_content) +- r1_content = re.sub('"X-Amzn-Trace-Id": "[^"]+"', '"X-Amzn-Trace-Id": ""', r1_content) +- # NOTE(jhatler): httpbin.org added "X-Amzn-Trace-Id" to their +- # response, which is a unique ID that will differ between requests. +- # We remove it from the response body before comparing. - assert r0_headers == r1_headers -- assert r0.content == r1.content +- assert r0_content == r1_content - - -class TestRecordNone(IntegrationHelper): @@ -230,7 +240,7 @@ index 58c8846..0000000 - assert len(cassette.interactions) == 5 diff --git a/tests/unit/test_fixtures.py b/tests/unit/test_fixtures.py deleted file mode 100644 -index 387d9ce..0000000 +index 41f33eb..0000000 --- a/tests/unit/test_fixtures.py +++ /dev/null @@ -1,94 +0,0 @@ @@ -263,9 +273,9 @@ index 387d9ce..0000000 - # Mock a pytest request object - request = mock.MagicMock() - request.cls = request.module = None -- request.function.__name__ = 'test' +- request.node.name = request.function.__name__ = 'test' - -- pytest_fixture.betamax_recorder(request) +- pytest_fixture._betamax_recorder(request) - assert request.addfinalizer.called is True - request.addfinalizer.assert_called_once_with(self.mocked_betamax.stop) - @@ -273,9 +283,9 @@ index 387d9ce..0000000 - # Mock a pytest request object - request = mock.MagicMock() - request.cls = request.module = None -- request.function.__name__ = 'test' +- request.node.name = request.function.__name__ = 'test' - -- pytest_fixture.betamax_recorder(request) +- pytest_fixture._betamax_recorder(request) - self.mocked_betamax.start.assert_called_once_with() - - @@ -329,5 +339,5 @@ index 387d9ce..0000000 - - recorder.stop.assert_called_once_with() -- -2.35.5 +2.44.0 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.8.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.8.1.bb deleted file mode 100644 index 468a1075b1..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.8.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION = "VCR imitation for python requests" -HOMEPAGE = "https://github.com/betamaxpy/betamax" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=61c15f0c146c5fb1a8ce8ba2f310d73c" - -SRC_URI += " \ - file://run-ptest \ - file://0001-Drop-ptests-fixtures-and-recorde_modes.patch \ -" - -SRC_URI[md5sum] = "b8182d43a200fc126a3bf7555626f964" -SRC_URI[sha256sum] = "5bf004ceffccae881213fb722f34517166b84a34919b92ffc14d1dbd050b71c2" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += " \ - python3-requests \ - python3-unittest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.9.0.bb new file mode 100644 index 0000000000..a0454686ee --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.9.0.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "VCR imitation for python requests" +HOMEPAGE = "https://github.com/betamaxpy/betamax" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=61c15f0c146c5fb1a8ce8ba2f310d73c" + +SRC_URI += " \ + file://run-ptest \ + file://0001-Drop-ptests-fixtures-and-recorde_modes.patch \ +" +SRC_URI[sha256sum] = "82316e1679bc6879e3c83318d016b54b7c9225ff08c4462de4813e22038d5f94" + +inherit pypi setuptools3 ptest + +RDEPENDS:${PN} += " \ + python3-requests \ + python3-unittest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.8.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.8.2.bb deleted file mode 100644 index c8e8a45c98..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.8.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Extensions to the standard Python datetime module" -DESCRIPTION = "The dateutil module provides powerful extensions to the datetime module available in the Python standard library." -HOMEPAGE = "https://dateutil.readthedocs.org" -LICENSE = "BSD-3-Clause & Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3155c7bdc71f66e02678411d2abf996" - -SRC_URI[sha256sum] = "0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86" - -PYPI_PACKAGE = "python-dateutil" -PIP_INSTALL_PACKAGE = "python_dateutil" -inherit pypi python_setuptools_build_meta - -PACKAGES =+ "${PN}-zoneinfo" -FILES:${PN}-zoneinfo = "${libdir}/${PYTHON_DIR}/site-packages/dateutil/zoneinfo" - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} = "\ - python3-datetime \ - python3-numbers \ - python3-six \ - python3-stringold \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb new file mode 100644 index 0000000000..bcb68d7714 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "Extensions to the standard Python datetime module" +DESCRIPTION = "The dateutil module provides powerful extensions to the datetime module available in the Python standard library." +HOMEPAGE = "https://dateutil.readthedocs.org" +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3155c7bdc71f66e02678411d2abf996" + +SRC_URI[sha256sum] = "78e73e19c63f5b20ffa567001531680d939dc042bf7850431877645523c66709" + +PYPI_PACKAGE = "python-dateutil" +PIP_INSTALL_PACKAGE = "python_dateutil" +inherit pypi python_setuptools_build_meta + +PACKAGES =+ "${PN}-zoneinfo" +FILES:${PN}-zoneinfo = "${libdir}/${PYTHON_DIR}/site-packages/dateutil/zoneinfo" + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} = "\ + python3-datetime \ + python3-numbers \ + python3-six \ + python3-stringold \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb index 6b74f7260c..b2e969c5c1 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb @@ -27,6 +27,7 @@ RDEPENDS:${PN}-ptest += "\ python3-pytest \ python3-pytest-benchmark \ python3-pytest-cache \ + python3-statistics \ python3-unittest-automake-output \ " RDEPENDS:${PN} += "\ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb new file mode 100644 index 0000000000..15c0bf06ba --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb @@ -0,0 +1,29 @@ +SUMMARY = "FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module." +HOMEPAGE = "https://github.com/spulec/freezegun" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=acf1d209bb6eddae4cbe6ffd6a0144fe" + +SRC_URI[sha256sum] = "10939b0ba0ff5adaecf3b06a5c2f73071d9678e507c5eaedb23c761d56ac774b" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-sqlite3 \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} = "\ + python3-asyncio \ + python3-dateutil \ + python3-unittest \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.0.bb deleted file mode 100644 index 5799db43ba..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Google Authentication Library" -HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "3cfc1b6e4e64797584fb53fc9bd0b7afa9b7c0dba2004fa7dcc9349e58cc3195" - -RDEPENDS:${PN} += "\ - python3-asyncio \ - python3-datetime \ - python3-io \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ -" - -RDEPENDS:${PN} += "\ - python3-aiohttp \ - python3-cachetools \ - python3-pyasn1-modules \ - python3-rsa \ - python3-six \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.1.bb new file mode 100644 index 0000000000..4524cca48c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.28.1.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Google Authentication Library" +HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "34fc3046c257cedcf1622fc4b31fc2be7923d9b4d44973d481125ecc50d83885" + +RDEPENDS:${PN} += "\ + python3-asyncio \ + python3-datetime \ + python3-io \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ +" + +RDEPENDS:${PN} += "\ + python3-aiohttp \ + python3-cachetools \ + python3-pyasn1-modules \ + python3-rsa \ + python3-six \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb index 0dbb38d200..d8c8628daa 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb @@ -24,6 +24,7 @@ RDEPENDS:${PN}-ptest += " \ libgpiod-ptest \ python3-setuptools \ " +RRECOMMENDS:${PN}-ptest += "kernel-module-configfs" export LINK_SYSTEM_LIBGPIOD = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb deleted file mode 100644 index c08aec5bec..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Simplified object serialization in python" -DESCRIPTION = "Marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes." -HOMEPAGE = "https://github.com/marshmallow-code/marshmallow" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "\ - file://LICENSE;md5=653847350fed2e0e7b02791a35b98d59 \ - file://docs/license.rst;md5=13da439ad060419fb7cf364523017cfb" - -SRC_URI[sha256sum] = "4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd" - -inherit setuptools3 pypi - -PIP_INSTALL_PACKAGE = "marshmallow" - -RDEPENDS:${PN} += " \ - python3-core \ - python3-datetime \ - python3-netclient \ - python3-numbers \ - python3-json \ - python3-pprint \ - python3-packaging \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb new file mode 100644 index 0000000000..5a0a79a541 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb @@ -0,0 +1,40 @@ +SUMMARY = "Simplified object serialization in python" +DESCRIPTION = "Marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes." +HOMEPAGE = "https://github.com/marshmallow-code/marshmallow" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=27586b20700d7544c06933afe56f7df4 \ + file://docs/license.rst;md5=13da439ad060419fb7cf364523017cfb" + +SRC_URI[sha256sum] = "4e65e9e0d80fc9e609574b9983cf32579f305c718afb30d7233ab818571768c3" + +inherit python_flit_core pypi ptest + +PIP_INSTALL_PACKAGE = "marshmallow" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-pytz \ + python3-simplejson \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + rm -rf ${S}/tests/mypy_test_cases + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-datetime \ + python3-email \ + python3-json \ + python3-numbers \ + python3-pprint \ + python3-packaging \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_0.10.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_0.10.1.bb deleted file mode 100644 index ce16cc1787..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_0.10.1.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "A network address manipulation library for Python." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e6345d695ffe3776f68a56fe7962db44" - -SRC_URI[sha256sum] = "f4da4222ca8c3f43c8e18a8263e5426c750a3a837fdfeccf74c68d0408eaa3bf" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-io \ - python3-pprint \ - python3-xml \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb new file mode 100644 index 0000000000..082e7c5025 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "A network address manipulation library for Python." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=8afa43eca873b71d5d85dd0be1f707fa" + +SRC_URI[sha256sum] = "6eb8fedf0412c6d294d06885c110de945cf4d22d2b510d0404f4e06950857987" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/netaddr/tests/* ${D}${PTEST_PATH}/tests/ +} + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb index 5793db55f6..ca602d2507 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb @@ -34,6 +34,7 @@ RDEPENDS:${PN}-ptest += "\ ${PN}-test \ python3-pytest \ python3-unittest-automake-output \ + python3-unixadmin \ " do_compile:prepend() { diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.8.19.20240106.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.8.19.20240106.bb new file mode 100644 index 0000000000..2075d96b4d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.8.19.20240106.bb @@ -0,0 +1,8 @@ +SUMMARY = "Typing stubs for python-dateutil" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" + +SRC_URI[sha256sum] = "1f8db221c3b98e6ca02ea83a58371b22c374f42ae5bbdf186db9c9a76581459f" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb index 84c0528446..056323cd39 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb @@ -6,7 +6,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=dc34cbad60bc961452eb7ade801d25f7" SRC_URI[sha256sum] = "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" -inherit pypi setuptools3 +inherit pypi setuptools3 ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} RDEPENDS:${PN}:class-target += "\ python3-stringold \ diff --git a/meta-openembedded/meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb b/meta-openembedded/meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb index 4aac89fe79..dcae982cee 100644 --- a/meta-openembedded/meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb +++ b/meta-openembedded/meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb @@ -4,9 +4,9 @@ SECTION = "x11/application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=35d145429ad3cbf5308d1dc93f66376b" -DEPENDS = "exo libexif libxfce4ui libxfce4util xfconf cairo file" +DEPENDS = "exo libexif libxfce4ui libxfce4util xfconf cairo file glib-2.0-native python3-packaging-native" -inherit xfce-app mime-xdg +inherit xfce-app mime-xdg python3native RRECOMMENDS:${PN} += "tumbler" diff --git a/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb b/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb index 7dbd90c188..96cfd32f7b 100644 --- a/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb +++ b/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb @@ -10,9 +10,11 @@ DEPENDS = " \ libxfce4ui \ xfconf \ xfce4-panel \ + python3-packaging-native \ " inherit xfce-app +inherit python3native SRC_URI:append = " file://xfce4-notifyd-get-var-abs-path.patch" -- cgit v1.2.3