From da295319aa739dfa657fb4a1ba7e81804ba48658 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 5 Dec 2023 16:48:56 -0600 Subject: subtree updates meta-arm: 1dff3300fb..0b61cc659a: Ross Burton (1): meta-arm/selftest: add test that PAC/BTI instructions are used meta-openembedded: 991e6852a5..5ad7203f68: Alexander Kanavin (1): fio: revert "fio: upgrade 3.32 -> 2022" BELOUARGA Mohamed (1): monocypher: add crypto library recipe Dylan Turner (1): apache2: v2.4.57 to v2.4.58 to fix CVE-2023-43622 Hongxu Jia (1): freeradius: make sub packages to runtime depends on freeradius Kai Kang (1): libnma: remove conflict xml file Khem Raj (12): nlohmann-json: Fix SRCREV_FORMAT and do not package git metadata into ptests ptest-packagelists-meta-oe.inc: Move poco to slow tests sdbus-c++-libsystemd: Upgrade to 254 sdbus-c++-tools: Upgrade to 1.4.0 gstd: Fix systemd user unit packaging basu: Update to latest master sdbus-c++: Install ptests into PTEST_PATH liblognorm:Add asprintf to autoconf function check macro gnome-console,gnome-terminal: Depend on vte from core layer Revert "gnome-terminal: Remove recommendation on vte-prompt" vte9: Drop recipe basu: Update the SRCREV to get lld fix Luca Fancellu (1): linuxptp: Update downstream patches Markus Volk (9): libcacard: fix version string in libcacard.pc cups-filters: fix Makefile race condition system-config-printer: Add packageconfig for polkit pipewire: upgrade 0.3.85 > 1.0.0 libcacard: set meson version based on PV spice: Set meson version based on PV spice-gtk: Set meson version based on PV libdecor: update 0.2.0 -> 0.2.1 xdg-desktop-portal-gnome: upgrade 45.0 -> 45.1 Naveen Saini (2): tbb: upgrade 2021.9.0 -> 2021.11.0 tbb: enable NUMA/Hybrid CPU support Patrick Wicki (6): squid: update from v5.7 to v6.5 squid: add nm dispatcher reload hook squid: add auth packageconfig squid: move configs to sub package squid: add url-rewrite-helpers packageconfig squid: add systemd service Patrick Williams (1): glog: Disable 64bit atomics on armv{5,6} Peter Kjellerstedt (1): redis: Inherit pkgconfig Ross Burton (1): python3-validators: add new recipe Wang Mingyu (26): ctags: upgrade 6.0.20231119.0 -> 6.0.20231126.0 dnfdragora: upgrade 2.1.4 -> 2.1.5 gensio: upgrade 2.7.7 -> 2.8.0 frr: upgrade 9.0.1 -> 9.1 capnproto: upgrade 1.0.1 -> 1.0.1.1 libbpf: upgrade 1.2.2 -> 1.3.0 paho-mqtt-cpp: upgrade 1.2.0 -> 1.3.1 tomoyo-tools: upgrade 2.5.0 -> 2.6.1 python3-aiohttp: upgrade 3.9.0 -> 3.9.1 python3-bitstring: upgrade 4.1.2 -> 4.1.3 python3-dbus-fast: upgrade 2.14.0 -> 2.15.0 python3-humanize: upgrade 4.8.0 -> 4.9.0 python3-ipython: upgrade 8.17.2 -> 8.18.0 python3-mypy: upgrade 1.7.0 -> 1.7.1 python3-pdm: upgrade 2.10.3 -> 2.10.4 python3-pexpect: upgrade 4.8.0 -> 4.9.0 python3-pychromecast: upgrade 13.0.7 -> 13.0.8 python3-pydantic: upgrade 2.5.1 -> 2.5.2 python3-pymisp: upgrade 2.4.178 -> 2.4.179 python3-pytest-xdist: upgrade 3.4.0 -> 3.5.0 python3-sentry-sdk: upgrade 1.35.0 -> 1.37.1 python3-types-setuptools: upgrade 68.2.0.1 -> 68.2.0.2 python3-virtualenv: upgrade 20.24.6 -> 20.24.7 redis: upgrade 7.2.2 -> 7.2.3 ser2net: upgrade 4.5.1 -> 4.6.0 thingsboard-gateway: upgrade 3.4.2 -> 3.4.3.1 alperak (12): squashfs-tools-ng: upgrade 1.1.4 -> 1.2.0 tmate: Fix finding msgpack 6+ msgpack-c: upgrade 4.0.0 -> 6.0.0 msgpack-cpp: upgrade 4.1.1 -> 6.1.0 brotli: upgrade 1.0.9 -> 1.1.0 icewm: upgrade 2.9.9 -> 3.4.4 iotop: upgrade 1.21 -> 1.25 liblognorm: upgrade 1.0.1 -> 2.0.6 libmodbus: upgrade 3.1.7 -> 3.1.10 libpwquality: upgrade 1.4.4 -> 1.4.5 libspiro: upgrade 20200505 -> 20221101 gtkwave: upgrade 3.3.111 -> 3.3.117 poky: 2696bf8cf3..028b6f6226: Adrian Freihofer (1): cmake-qemu.bbclass: support qemu for cmake Alassane Yattara (9): bitbake: toaster/tests: Update methods wait_until_~ to skip using time.sleep bitbake: toaster/tests: Override table edit columns TestCase from image recipe page bitbake: toaster/tests: Test software recipe page bitbake: toaster/tests: Added Machine page TestCase bitbake: toaster/tests: Added Layers page TestCase bitbake: toaster/tests: Added distro page TestCase bitbake: toaster/tests: Bug-fix on tests/functional/test_project_page bitbake: toaster/tests: Test single layer page bitbake: toaster/tests: Test single recipe page Alex Kiernan (4): rust: Delete python2 configparser code path rust: Drop TARGET_VENDOR export eudev: Upgrade 3.2.12 -> 3.2.14 rust: Drop targets and hosts override magic Alexander Kanavin (15): python3-pyproject-hooks: fix upstream version check cmake: upgrade 3.27.5 -> 3.27.7 desktop-file-utils: upgrade 0.26 -> 0.27 erofs-utils: upgrade 1.6 -> 1.7.1 webkitgtk: update 2.40.5 -> 2.42.2 epiphany: upgrade 44.6 -> 45.1 virglrenderer: upgrade 0.10.4 -> 1.0.0 libxkbcommon: upgrade 1.5.0 -> 1.6.0 mpg123: upgrade 1.31.3 -> 1.32.3 icu: upgrade 73-2 -> 74-1 p11-kit: upgrade 0.25.0 -> 0.25.2 glib-2.0: install gio-querymodules into bindir as well as libexecdir for native meson: update 1.2.2 -> 1.3.0 repo: update 2.37 -> 2.39 rt-tests: update 2.5 -> 2.6 Bruce Ashfield (1): lttng-modules: fix build for v6.7+ Changhyeok Bae (1): iptables: upgrade 1.8.9 -> 1.8.10 Charlie Johnston (2): bitbake.conf: Add gsutil as hosttool for gcp fetcher. bitbake: fetch2: Ensure GCP fetcher checks if file exists before download. Jan Vermaete (1): systemd: fixed typo Joao Marcos Costa (1): documentation.conf: fix do_menuconfig description Joshua Watt (2): bitbake: bitbake-hashclient: Add commands to get hashes bitbake: hashserv: sqlite: Ensure sync propagates to database connections Julien Stephan (6): devtool: fix update-recipe dry-run mode lib/oe/recipeutils.py: remove trailing white-spaces devtool: finish/update-recipe: restrict mode srcrev to recipes fetched from SCM devtool: tag all submodules devtool: add support for git submodules oeqa/selftest/devtool: add test for git submodules Justin Bronder (1): contributor-guide: add License-Update tag Kareem Zarka (2): wic: bootimg-efi: Make kernel image installation configurable oeqa/selftest/wic: Add tests for kernel image installation Khem Raj (8): shared-mime-info: Fix build with clang-17+ libsoup-2.4: Fix build with clang-17 and libxml2-2.12 busybox: Enable utmp support on musl systems virglrenderer: Fix build with clang llvm: Upgrade to 17.0.6 rust-common.bbclass: Define rust arch for x32 platforms vte: Upgrade to 0.74.1 vte: Separate out gtk4 pieces of vte into individual packages Lee Chee Yang (3): wic: add test for partition hidden attributes migration-guides: add release notes for 4.3.1 openssl: upgrade to 3.2.0 Malte Schmidt (1): wic: rawcopy: add support for zstd decompression Marco Felsch (1): json-c: fix icecc compilation Markus Volk (3): bluez5: fix connection for ps5/dualshock controllers cups: Add root,sys,wheel to system groups vte: upgrade 0.72.2 -> 0.74.0 Martin Hundeb?ll (1): libpam: split /etc/environment into pam-plugin-env package Matsunaga-Shinji (1): cve-check: Modify judgment processing using "=" in version comparison Michael Opdenacker (4): systemd-compat-units.bb: fix postinstall script dev-manual: layers: update link to YP Compatible form contributor-guide: fix command option migration-guides: release 3.5 is actually 4.0 Niko Mauno (1): rust-llvm: Allow overriding LLVM target archs Patrick Williams (1): shared-mime-info-native: handle old GCC for AlmaLinux8 Peter Marko (2): cve-update-nvd2-native: remove unused variable CVE_SOCKET_TIMEOUT cve-update-nvd2-native: make number of fetch attemtps configurable Richard Haar (1): bitbake: bitbake: tests: Fix duplicate test_underscore_override test Richard Purdie (2): bitbake: ui/ncurses: Add missing function call to avoid traceback bitbake: cooker: Avoid eventlog variable listing lockups Robert Yang (2): gnu-config: Update to latest revision gettext: Upgrade 0.22 -> 0.22.3 Ross Burton (3): core-image-minimal-initramfs: don't install a kernel into the initramfs autoconf: upgrade to 2.72d Revert "cve-check: Modify judgment processing using "=" in version comparison" Sundeep KOKKONDA (3): rust: Split rustdoc into a separate package glibc: stable 2.38 branch updates binutils: stable 2.41 branch updates Tim Orling (8): python3-sphinxcontrib-applehelp: 1.0.4 -> 1.0.7 python3-sphinxcontrib-devhelp: 1.0.2 -> 1.0.5 python3-sphinxcontrib-htmlhelp: 2.0.1 -> 2.0.4 python3-sphinxcontrib-qthelp: 1.0.3 -> 1.0.6 python3-sphinxcontrib-serializinghtml: 1.1.5 -> 1.1.9 vim: upgrade 9.0.2068 -> 9.0.2130 python3-cryptography-vectors: add RECIPE_NO_UPDATE_REASON python3-cryptography{-vectors}: 41.0.5 -> 41.0.7 Trevor Gamblin (2): python3-ptest: skip test_storlines patchtest: shorten patch signed-off-by test output Viswanath Kraleti (1): systemd-boot: Fix build issues on armv7a-linux Wang Mingyu (27): bind: upgrade 9.18.19 -> 9.18.20 diffoscope: upgrade 251 -> 252 ell: upgrade 0.59 -> 0.60 git: upgrade 2.42.1 -> 2.43.0 gnutls: upgrade 3.8.1 -> 3.8.2 libdrm: upgrade 2.4.117 -> 2.4.118 libgcrypt: upgrade 1.10.2 -> 1.10.3 libksba: upgrade 1.6.4 -> 1.6.5 libxslt: upgrade 1.1.38 -> 1.1.39 log4cplus: upgrade 2.1.0 -> 2.1.1 python3-certifi: upgrade 2023.7.22 -> 2023.11.17 python3-setuptools: upgrade 68.2.2 -> 69.0.2 python3-wcwidth: upgrade 0.2.9 -> 0.2.11 python3-hypothesis: upgrade 6.89.0 -> 6.90.0 python3-pyasn1: upgrade 0.5.0 -> 0.5.1 python3-scons: upgrade 4.5.2 -> 4.6.0 python3-urllib3: upgrade 2.0.7 -> 2.1.0 ethtool: upgrade 6.5 -> 6.6 gi-docgen: upgrade 2023.1 -> 2023.3 init-system-helpers: upgrade 1.65.2 -> 1.66 libsolv: upgrade 0.7.26 -> 0.7.27 python3-idna: upgrade 3.4 -> 3.6 ofono: upgrade 2.1 -> 2.2 python3-sphinx-rtd-theme: upgrade 1.3.0 -> 2.0.0 python3-trove-classifiers: upgrade 2023.11.14 -> 2023.11.22 python3-wheel: upgrade 0.41.3 -> 0.42.0 resolvconf: upgrade 1.91 -> 1.92 Xiangyu Chen (2): shadow: Fix for CVE-2023-4641 bash: changes to SIGINT handler while waiting for a child Zahir Hussain (1): cmake: Unset CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES meta-raspberrypi: 8231f97534..fde68b24f0: Lorenzo Arena (1): docs: fix syntax for overriding fs type for initramfs image Change-Id: Idc6f6b1e913442bae03dfec9f207924c56f31056 Signed-off-by: Patrick Williams --- .../recipes-connectivity/libnma/libnma_1.10.6.bb | 5 + .../gnome-console/gnome-console_45.0.bb | 2 +- .../gnome-terminal/gnome-terminal_3.50.1.bb | 4 +- .../xdg-desktop-portal-gnome_45.0.bb | 31 - .../xdg-desktop-portal-gnome_45.1.bb | 31 + .../recipes-multimedia/gstreamer-1.0/gstd_git.bb | 6 +- .../recipes-multimedia/pipewire/pipewire_0.3.85.bb | 388 ------ .../recipes-multimedia/pipewire/pipewire_1.0.0.bb | 388 ++++++ .../system-config-printer_1.5.18.bb | 3 +- .../freeradius/freeradius_3.0.26.bb | 7 + ...heck-for-Wno-error-format-truncation-comp.patch | 18 +- ...ake-squid-conf-tests-run-on-target-device.patch | 74 ++ ...flawed-dynamic-ldb-link-test-in-configure.patch | 40 - .../squid/files/Set-up-for-cross-compilation.patch | 10 +- .../squid/files/Skip-AC_RUN_IFELSE-tests.patch | 25 +- .../recipes-daemons/squid/files/run-ptest | 1 + .../squid/files/set_sysroot_patch.patch | 41 - ...d-don-t-do-squid-conf-tests-at-build-time.patch | 61 - .../recipes-daemons/squid/files/squid.nm | 7 + .../recipes-daemons/squid/squid_5.7.bb | 128 -- .../recipes-daemons/squid/squid_6.5.bb | 146 +++ ...tools-make-quiet-actually-suppress-output.patch | 58 - .../recipes-protocols/frr/frr/CVE-2023-46752.patch | 125 -- .../recipes-protocols/frr/frr/CVE-2023-46753.patch | 117 -- .../recipes-protocols/frr/frr/CVE-2023-47234.patch | 95 -- .../recipes-protocols/frr/frr/CVE-2023-47235.patch | 112 -- .../recipes-protocols/frr/frr_9.0.1.bb | 134 -- .../recipes-protocols/frr/frr_9.1.bb | 129 ++ .../recipes-support/spice/libcacard_2.8.1.bb | 4 + .../recipes-support/spice/spice-gtk_0.42.bb | 4 + .../recipes-support/spice/spice_git.bb | 4 + .../conf/include/ptest-packagelists-meta-oe.inc | 2 +- .../thingsboard-gateway_3.4.2.bb | 67 - .../thingsboard-gateway_3.4.3.1.bb | 67 + .../recipes-benchmark/fio/fio/0001-Fio-3.31.patch | 23 - ...hance-__fill_random_buf-using-the-multi-r.patch | 136 -- ...b-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch | 31 - ...erge-filecreate-filestat-filedelete-engin.patch | 800 ------------ ...ines-http-Add-storage-class-option-for-s3.patch | 87 -- ...engines-http-Add-s3-crypto-options-for-s3.patch | 246 ---- ...ge-and-example-about-s3-storage-class-and.patch | 155 --- ...EADME-link-to-GitHub-releases-for-Windows.patch | 33 - ...me-fix-segfault-issue-with-xnvme-ioengine.patch | 54 - .../0010-doc-update-fio-doc-for-xnvme-engine.patch | 168 --- ...-add-latency-test-using-posixaio-ioengine.patch | 55 - .../fio/fio/0012-test-fix-hash-for-t0016.patch | 33 - .../0013-doc-get-rid-of-trailing-whitespace.patch | 82 -- ...-that-I-O-errors-may-go-unnoticed-without.patch | 54 - .../fio/fio/0015-Revert-Minor-style-fixups.patch | 41 - ...multithread-issues-when-operating-on-a-si.patch | 141 --- .../fio/0017-Add-wait-for-handling-SIGBREAK.patch | 59 - ...uring-pass-back-correct-error-value-when-.patch | 58 - ...19-Enable-CPU-affinity-support-on-Android.patch | 64 - ...-io_uring-Replace-pthread_self-with-s-tid.patch | 41 - .../0021-engines-io_uring-delete-debug-code.patch | 37 - ...prep-for-including-engines-nvme.h-in-t-io.patch | 72 -- ...t-io_uring-add-support-for-async-passthru.patch | 379 ------ ...-io_uring-fix-64-bit-cast-on-32-bit-archs.patch | 37 - ...test-add-basic-test-for-io_uring-ioengine.patch | 91 -- ...ing-remove-duplicate-definition-of-gettid.patch | 59 - ...t-add-some-tests-for-seq-and-rand-offsets.patch | 157 --- ...28-test-use-Ubuntu-22.04-for-64-bit-tests.patch | 72 -- ...est-get-32-bit-Ubuntu-22.04-build-working.patch | 79 -- ...0-test-add-tests-for-lfsr-and-norandommap.patch | 143 --- .../0031-backend-revert-bad-memory-leak-fix.patch | 39 - .../recipes-benchmark/fio/fio/0032-Fio-3.32.patch | 23 - .../meta-oe/recipes-benchmark/fio/fio_2022.bb | 77 -- .../meta-oe/recipes-benchmark/fio/fio_3.32.bb | 44 + .../recipes-connectivity/gensio/gensio_2.7.7.bb | 26 - .../recipes-connectivity/gensio/gensio_2.8.0.bb | 26 + .../0001-include-string.h-for-strncpy.patch | 13 +- .../0002-linuxptp-Use-CC-in-incdefs.sh.patch | 24 +- ...MAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch | 26 +- .../paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb | 24 - .../paho-mqtt-cpp/paho-mqtt-cpp_1.3.1.bb | 24 + .../recipes-connectivity/ser2net/ser2net_4.5.1.bb | 16 - .../recipes-connectivity/ser2net/ser2net_4.6.0.bb | 16 + .../meta-oe/recipes-core/basu/basu_0.2.1.bb | 4 +- .../packagegroups/packagegroup-meta-oe.bb | 1 - .../sdbus-c++/sdbus-c++-1.4.0/run-ptest | 4 +- .../0001-Adjust-for-musl-headers.patch | 137 +- ...nt-util-Remove-asserts-on-dirent64-dirent.patch | 38 - .../0002-Add-sys-stat.h-for-S_IFDIR.patch | 29 - .../0002-don-t-use-glibc-specific-qsort_r.patch | 157 --- ...rrno-util-Make-STRERROR-portable-for-musl.patch | 41 + ...e.h-add-__compare_fn_t-and-comparison_fn_.patch | 68 - ...llback-parse_printf_format-implementation.patch | 419 ------- ...005-pass-correct-parameters-to-getdents64.patch | 37 + ...asic-missing.h-check-for-missing-strndupa.patch | 602 --------- ...ror-strerror-is-assumed-to-be-GNU-specifi.patch | 52 + ...if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 147 --- .../0008-add-missing-FTW_-macros-for-musl.patch | 64 - ...-of-__register_atfork-for-non-glibc-build.patch | 43 - .../0009-missing_type.h-add-comparison_fn_t.patch | 61 + .../0010-Use-uintmax_t-for-handling-rlim_t.patch | 98 -- ...llback-parse_printf_format-implementation.patch | 417 +++++++ ...asic-missing.h-check-for-missing-strndupa.patch | 684 ++++++++++ ....c-Disable-tests-for-missing-typedefs-in-.patch | 37 - ...if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 155 +++ ...ass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 93 -- ...c-compatible-basename-for-non-glibc-syste.patch | 30 - .../0013-add-missing-FTW_-macros-for-musl.patch | 44 + ...ble-buffering-when-writing-to-oom_score_a.patch | 37 - .../0014-Use-uintmax_t-for-handling-rlim_t.patch | 97 ++ ...-XSI-compliant-strerror_r-from-GNU-specif.patch | 56 - ...rt_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch | 33 - ...ass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 99 ++ ...c-compatible-basename-for-non-glibc-syste.patch | 34 + ...ing_type.h-add-__compar_d_fn_t-definition.patch | 28 - ...ble-buffering-when-writing-to-oom_score_a.patch | 41 + ...id-redefinition-of-prctl_mm_map-structure.patch | 30 - .../0019-Handle-missing-LOCK_EX.patch | 24 - ...-XSI-compliant-strerror_r-from-GNU-specif.patch | 76 ++ ...ompatible-pointer-type-struct-sockaddr_un.patch | 36 - ...id-redefinition-of-prctl_mm_map-structure.patch | 32 + ...21-do-not-disable-buffer-in-writing-files.patch | 397 ++++++ .../0021-test-json.c-define-M_PIl.patch | 29 - .../0022-Handle-__cpu_mask-usage.patch | 53 + ...22-do-not-disable-buffer-in-writing-files.patch | 420 ------- .../0023-Handle-missing-gshadow.patch | 173 +++ ...yscall.h-Define-MIPS-ABI-defines-for-musl.patch | 49 + .../0025-Handle-__cpu_mask-usage.patch | 58 - .../0026-Handle-missing-gshadow.patch | 165 --- ...yscall.h-Define-MIPS-ABI-defines-for-musl.patch | 32 - ...ent-Make-malloc_trim-conditional-on-glibc.patch | 39 + ...029-shared-Do-not-use-malloc_info-on-musl.patch | 50 + .../sdbus-c++/sdbus-c++-libsystemd_250.9.bb | 79 -- .../sdbus-c++/sdbus-c++-libsystemd_254.4.bb | 74 ++ .../sdbus-c++/sdbus-c++-tools_1.3.0.bb | 16 - .../sdbus-c++/sdbus-c++-tools_1.4.0.bb | 16 + .../recipes-core/sdbus-c++/sdbus-c++_1.4.0.bb | 9 +- .../recipes-crypto/monocypher/monocypher_4.0.2.bb | 26 + .../capnproto/capnproto_1.0.1.1.bb | 28 + .../recipes-devtools/capnproto/capnproto_1.0.1.bb | 28 - .../recipes-devtools/ctags/ctags_6.0.20231119.0.bb | 36 - .../recipes-devtools/ctags/ctags_6.0.20231126.0.bb | 36 + .../recipes-devtools/msgpack/msgpack-c_4.0.0.bb | 20 - .../recipes-devtools/msgpack/msgpack-c_6.0.0.bb | 20 + .../recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb | 21 - .../recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb | 21 + .../nlohmann-json/nlohmann-json_3.11.2.bb | 3 +- .../squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb | 33 - .../squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb | 32 + .../recipes-extended/brotli/brotli/838.patch | 48 - .../recipes-extended/brotli/brotli_1.0.9.bb | 24 - .../recipes-extended/brotli/brotli_1.1.0.bb | 23 + .../meta-oe/recipes-extended/icewm/icewm_2.9.9.bb | 46 - .../meta-oe/recipes-extended/icewm/icewm_3.4.4.bb | 46 + .../meta-oe/recipes-extended/iotop/iotop_1.21.bb | 24 - .../meta-oe/recipes-extended/iotop/iotop_1.25.bb | 25 + .../recipes-extended/liblognorm/liblognorm.inc | 17 - ...asprintf-to-autoconf-function-check-macro.patch | 28 + .../liblognorm/liblognorm_1.0.1.bb | 5 - .../liblognorm/liblognorm_2.0.6.bb | 27 + .../recipes-extended/libmodbus/libmodbus.inc | 16 - ...float-endianness-issue-on-big-endian-arch.patch | 316 ----- .../recipes-extended/libmodbus/libmodbus_3.0.6.bb | 4 - .../recipes-extended/libmodbus/libmodbus_3.1.10.bb | 17 + .../recipes-extended/libmodbus/libmodbus_3.1.7.bb | 9 - .../libpwquality/files/0001-fix-musl-build.patch | 72 -- .../libpwquality/libpwquality_1.4.4.bb | 43 - .../libpwquality/libpwquality_1.4.5.bb | 40 + .../0001-src-Do-not-reset-FINAL_LIBS.patch | 30 - .../0006-Define-correct-gregs-for-RISCV32.patch | 62 - .../redis/redis-7.2.2/GNU_SOURCE-7.patch | 29 - .../hiredis-use-default-CC-if-it-is-set.patch | 38 - .../redis/redis-7.2.2/init-redis-server | 71 -- ...Makefile-to-use-environment-build-setting.patch | 78 -- .../redis/redis-7.2.2/oe-use-libc-malloc.patch | 36 - .../recipes-extended/redis/redis-7.2.2/redis.conf | 1314 -------------------- .../redis/redis-7.2.2/redis.service | 16 - .../0001-src-Do-not-reset-FINAL_LIBS.patch | 30 + .../0006-Define-correct-gregs-for-RISCV32.patch | 62 + .../redis/redis-7.2.3/GNU_SOURCE-7.patch | 29 + .../hiredis-use-default-CC-if-it-is-set.patch | 38 + .../redis/redis-7.2.3/init-redis-server | 71 ++ ...Makefile-to-use-environment-build-setting.patch | 78 ++ .../redis/redis-7.2.3/oe-use-libc-malloc.patch | 36 + .../recipes-extended/redis/redis-7.2.3/redis.conf | 1314 ++++++++++++++++++++ .../redis/redis-7.2.3/redis.service | 16 + .../meta-oe/recipes-extended/redis/redis_7.2.2.bb | 70 -- .../meta-oe/recipes-extended/redis/redis_7.2.3.bb | 70 ++ .../tmate/files/0001-fix-finding-msgpack.patch | 43 + .../meta-oe/recipes-extended/tmate/tmate_2.4.0.bb | 1 + .../recipes-gnome/vte9/vte9/cve-2012-2738.patch | 136 -- .../vte9/vte9/obsolete_automake_macros.patch | 14 - .../meta-oe/recipes-gnome/vte9/vte9_0.74.1.bb | 30 - .../dnfdragora/dnfdragora_2.1.4.bb | 31 - .../dnfdragora/dnfdragora_2.1.5.bb | 31 + .../fontforge/libspiro_20200505.bb | 14 - .../fontforge/libspiro_20221101.bb | 14 + .../recipes-graphics/gtkwave/gtkwave_3.3.111.bb | 44 - .../recipes-graphics/gtkwave/gtkwave_3.3.117.bb | 44 + .../recipes-graphics/libdecor/libdecor_0.2.0.bb | 31 - .../recipes-graphics/libdecor/libdecor_0.2.1.bb | 31 + .../meta-oe/recipes-kernel/libbpf/libbpf_1.2.2.bb | 36 - .../meta-oe/recipes-kernel/libbpf/libbpf_1.3.0.bb | 36 + .../cups/cups-filters/fix-make-race.patch | 33 + .../recipes-printing/cups/cups-filters_2.0.0.bb | 5 +- .../tomoyo-tools/tomoyo-tools_2.5.0.bb | 29 - .../tomoyo-tools/tomoyo-tools_2.6.1.bb | 29 + .../meta-oe/recipes-support/glog/glog_0.6.0.bb | 2 + ...01-CMakeLists.txt-exclude-riscv64-riscv32.patch | 35 - ...ction.cmake-remove-cross-compiation-check.patch | 33 + .../meta-oe/recipes-support/tbb/tbb_2021.11.0.bb | 62 + .../meta-oe/recipes-support/tbb/tbb_2021.9.0.bb | 53 - .../python/python3-aiohttp_3.9.0.bb | 27 - .../python/python3-aiohttp_3.9.1.bb | 27 + .../python/python3-bitstring_4.1.2.bb | 19 - .../python/python3-bitstring_4.1.3.bb | 19 + .../python/python3-dbus-fast_2.14.0.bb | 15 - .../python/python3-dbus-fast_2.15.0.bb | 15 + .../python/python3-humanize_4.8.0.bb | 22 - .../python/python3-humanize_4.9.0.bb | 22 + .../python/python3-ipython_8.17.2.bb | 28 - .../python/python3-ipython_8.18.0.bb | 28 + .../recipes-devtools/python/python3-mypy_1.7.0.bb | 23 - .../recipes-devtools/python/python3-mypy_1.7.1.bb | 23 + .../recipes-devtools/python/python3-pdm_2.10.3.bb | 15 - .../recipes-devtools/python/python3-pdm_2.10.4.bb | 15 + .../python/python3-pexpect_4.8.0.bb | 25 - .../python/python3-pexpect_4.9.0.bb | 24 + .../python/python3-pychromecast_13.0.7.bb | 19 - .../python/python3-pychromecast_13.0.8.bb | 19 + .../python/python3-pydantic_2.5.1.bb | 23 - .../python/python3-pydantic_2.5.2.bb | 23 + .../python/python3-pymisp_2.4.178.bb | 26 - .../python/python3-pymisp_2.4.179.bb | 26 + .../python/python3-pytest-xdist_3.4.0.bb | 17 - .../python/python3-pytest-xdist_3.5.0.bb | 17 + .../python/python3-sentry-sdk_1.35.0.bb | 22 - .../python/python3-sentry-sdk_1.37.1.bb | 22 + .../python/python3-types-setuptools_68.2.0.1.bb | 10 - .../python/python3-types-setuptools_68.2.0.2.bb | 10 + .../python/python3-validators_0.22.0.bb | 10 + .../python/python3-virtualenv_20.24.6.bb | 22 - .../python/python3-virtualenv_20.24.7.bb | 22 + ...pers-config9.m4-Add-server-directory-to-i.patch | 31 - .../recipes-httpd/apache2/apache2_2.4.57.bb | 238 ---- .../recipes-httpd/apache2/apache2_2.4.58.bb | 237 ++++ 240 files changed, 6940 insertions(+), 11583 deletions(-) delete mode 100644 meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.0.bb create mode 100644 meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.1.bb delete mode 100644 meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.85.bb create mode 100644 meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.0.bb create mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch create mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/files/squid.nm delete mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/squid_5.7.bb create mode 100644 meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.5.bb delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr/0001-tools-make-quiet-actually-suppress-output.patch delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46752.patch delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46753.patch delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47234.patch delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47235.patch delete mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.0.1.bb create mode 100644 meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb delete mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.2.bb create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.3.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0001-Fio-3.31.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0002-lib-rand-Enhance-__fill_random_buf-using-the-multi-r.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0004-ioengines-merge-filecreate-filestat-filedelete-engin.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0005-engines-http-Add-storage-class-option-for-s3.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0006-engines-http-Add-s3-crypto-options-for-s3.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0007-doc-Add-usage-and-example-about-s3-storage-class-and.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0008-README-link-to-GitHub-releases-for-Windows.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0009-engines-xnvme-fix-segfault-issue-with-xnvme-ioengine.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0010-doc-update-fio-doc-for-xnvme-engine.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0011-test-add-latency-test-using-posixaio-ioengine.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0012-test-fix-hash-for-t0016.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0013-doc-get-rid-of-trailing-whitespace.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0014-doc-clarify-that-I-O-errors-may-go-unnoticed-without.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0015-Revert-Minor-style-fixups.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0016-Revert-Fix-multithread-issues-when-operating-on-a-si.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0017-Add-wait-for-handling-SIGBREAK.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0018-engines-io_uring-pass-back-correct-error-value-when-.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0019-Enable-CPU-affinity-support-on-Android.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0020-io_uring-Replace-pthread_self-with-s-tid.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0021-engines-io_uring-delete-debug-code.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0022-t-io_uring-prep-for-including-engines-nvme.h-in-t-io.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0023-t-io_uring-add-support-for-async-passthru.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0024-t-io_uring-fix-64-bit-cast-on-32-bit-archs.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0025-test-add-basic-test-for-io_uring-ioengine.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0026-t-io_uring-remove-duplicate-definition-of-gettid.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0027-test-add-some-tests-for-seq-and-rand-offsets.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0028-test-use-Ubuntu-22.04-for-64-bit-tests.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0029-test-get-32-bit-Ubuntu-22.04-build-working.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0030-test-add-tests-for-lfsr-and-norandommap.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0031-backend-revert-bad-memory-leak-fix.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0032-Fio-3.32.patch delete mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio_2022.bb create mode 100644 meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.32.bb delete mode 100644 meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.7.7.bb create mode 100644 meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.5.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb delete mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.3.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.4.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-crypto/monocypher/monocypher_4.0.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231119.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231126.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/brotli/brotli/838.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.9.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.1.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.9.9.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.4.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.21.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.25.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm.inc create mode 100644 meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm/0001-Add-asprintf-to-autoconf-function-check-macro.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_1.0.1.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_2.0.6.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.0.6.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.7.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0001-src-Do-not-reset-FINAL_LIBS.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0006-Define-correct-gregs-for-RISCV32.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/GNU_SOURCE-7.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/hiredis-use-default-CC-if-it-is-set.patch delete mode 100755 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/lua-update-Makefile-to-use-environment-build-setting.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/oe-use-libc-malloc.patch delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.conf delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.service create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0001-src-Do-not-reset-FINAL_LIBS.patch create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0006-Define-correct-gregs-for-RISCV32.patch create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/GNU_SOURCE-7.patch create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/hiredis-use-default-CC-if-it-is-set.patch create mode 100755 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/init-redis-server create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/lua-update-Makefile-to-use-environment-build-setting.patch create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/oe-use-libc-malloc.patch create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.conf create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.service delete mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.3.bb create mode 100644 meta-openembedded/meta-oe/recipes-extended/tmate/files/0001-fix-finding-msgpack.patch delete mode 100644 meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/cve-2012-2738.patch delete mode 100644 meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/obsolete_automake_macros.patch delete mode 100644 meta-openembedded/meta-oe/recipes-gnome/vte9/vte9_0.74.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.4.bb create mode 100644 meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.5.bb delete mode 100644 meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb create mode 100644 meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb delete mode 100644 meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.111.bb create mode 100644 meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.117.bb delete mode 100644 meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.3.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-printing/cups/cups-filters/fix-make-race.patch delete mode 100644 meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb create mode 100644 meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.6.1.bb delete mode 100644 meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch create mode 100644 meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb delete mode 100644 meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.14.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.17.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.8.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.178.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.4.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.5.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.35.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.22.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.6.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb delete mode 100644 meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch delete mode 100644 meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.57.bb create mode 100644 meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb (limited to 'meta-openembedded') diff --git a/meta-openembedded/meta-gnome/recipes-connectivity/libnma/libnma_1.10.6.bb b/meta-openembedded/meta-gnome/recipes-connectivity/libnma/libnma_1.10.6.bb index 997a5a71b3..9a4dad35d1 100644 --- a/meta-openembedded/meta-gnome/recipes-connectivity/libnma/libnma_1.10.6.bb +++ b/meta-openembedded/meta-gnome/recipes-connectivity/libnma/libnma_1.10.6.bb @@ -26,3 +26,8 @@ EXTRA_OEMESON:append:riscv32 = " -Dvapi=false" EXTRA_OEMESON:append:powerpc64le = " -Dvapi=false" GTKDOC_MESON_OPTION = "gtk_doc" + +do_install:append() { + # conflicts with the file provided by network-manager-applet + rm -f ${D}${datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml +} diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-console/gnome-console_45.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-console/gnome-console_45.0.bb index 748ea7b5a5..9669e337a8 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-console/gnome-console_45.0.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-console/gnome-console_45.0.bb @@ -14,7 +14,7 @@ DEPENDS = " \ libadwaita \ libgtop \ pcre2 \ - vte9 \ + vte \ " SRC_URI[archive.sha256sum] = "e7462128d2df2324a1d748062c40429cd0504af09e407067b33f3a9d0c59c8e1" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb index 014b329b34..8616f2c9b0 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb @@ -13,7 +13,7 @@ DEPENDS = " \ desktop-file-utils-native \ gtk+3 \ gsettings-desktop-schemas \ - vte9 \ + vte \ dconf \ libhandy \ libpcre2 \ @@ -35,4 +35,4 @@ FILES:${PN} += " \ ${systemd_user_unitdir} \ " -RRECOMMENDS:${PN} += "gsettings-desktop-schemas" +RRECOMMENDS:${PN} += "vte-prompt gsettings-desktop-schemas" diff --git a/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.0.bb b/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.0.bb deleted file mode 100644 index 6cf706a925..0000000000 --- a/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "A xdg-desktop-portal backend for gnome." -HOMEPAGE = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = " \ - glib-2.0-native \ - gtk4\ - xdg-desktop-portal \ - xdg-desktop-portal-gtk \ - libadwaita \ - fontconfig \ - gsettings-desktop-schemas \ - gnome-desktop \ - dconf \ -" - -RDEPENDS:${PN} = "xdg-desktop-portal xdg-desktop-portal-gtk" - -inherit gnomebase pkgconfig gsettings features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -SRC_URI[archive.sha256sum] = "949598861c80000febf18cc12b3721c95c1bb1d19371fc2156dc4f33def5aff0" - -PACKAGECONFIG ?= "screenshot screencast ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" -PACKAGECONFIG[wayland] = ",,wayland-native" -PACKAGECONFIG[screenshot] = ",,,gnome-shell" -PACKAGECONFIG[screencast] = ",,,mutter" - -FILES:${PN} += "${systemd_user_unitdir} ${datadir}" diff --git a/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.1.bb b/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.1.bb new file mode 100644 index 0000000000..a5477301bc --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_45.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "A xdg-desktop-portal backend for gnome." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = " \ + glib-2.0-native \ + gtk4\ + xdg-desktop-portal \ + xdg-desktop-portal-gtk \ + libadwaita \ + fontconfig \ + gsettings-desktop-schemas \ + gnome-desktop \ + dconf \ +" + +RDEPENDS:${PN} = "xdg-desktop-portal xdg-desktop-portal-gtk" + +inherit gnomebase pkgconfig gsettings features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +SRC_URI[archive.sha256sum] = "3e9ca821044005fb37bd68ebe4ad196fc3d072835581467a22a4879dac7b5fdd" + +PACKAGECONFIG ?= "screenshot screencast ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" +PACKAGECONFIG[wayland] = ",,wayland-native" +PACKAGECONFIG[screenshot] = ",,,gnome-shell" +PACKAGECONFIG[screencast] = ",,,mutter" + +FILES:${PN} += "${systemd_user_unitdir} ${datadir}" diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_git.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_git.bb index 88acdb190e..cabbf2cc11 100644 --- a/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_git.bb +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_git.bb @@ -17,7 +17,7 @@ PV = "1.0+really0.15.0" GTKDOC_MESON_OPTION = "enable-gtk-doc" -inherit meson pkgconfig gettext gtk-doc systemd python3native python3-dir python3targetconfig +inherit meson pkgconfig gettext gtk-doc python3native python3-dir python3targetconfig do_install:append() { rmdir ${D}${root_prefix}${localstatedir}/run/${BPN} ${D}${root_prefix}${localstatedir}/run \ @@ -28,7 +28,7 @@ do_install:append() { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN} - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d /${localstatedir}/log/${BPN} 0755 root root -" \ + echo "d ${localstatedir}/log/${BPN} 0755 root root -" \ >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf fi ln -sf gst-client-1.0 ${D}${bindir}/gst-client @@ -38,5 +38,3 @@ PACKAGES =+ "${PN}-python" FILES:${PN} += "${systemd_user_unitdir}" FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*" - -SYSTEMD_SERVICE:${PN} = "gstd.service" diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.85.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.85.bb deleted file mode 100644 index 883d02d51b..0000000000 --- a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.85.bb +++ /dev/null @@ -1,388 +0,0 @@ -SUMMARY = "Multimedia processing server for Linux" -DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" -HOMEPAGE = "https://pipewire.org/" -BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" -SECTION = "multimedia" - -LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ - file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ -" - -DEPENDS = "dbus ncurses" - -SRCREV = "7db1e7f643a454056327999b2d8e35d8097b5593" -SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd gettext useradd - -USERADD_PACKAGES = "${PN}" - -GROUPADD_PARAM:${PN} = "--system pipewire" - -USERADD_PARAM:${PN} = "--system --home / --no-create-home \ - --comment 'PipeWire multimedia daemon' \ - --gid pipewire --groups audio,video \ - pipewire" - -SYSTEMD_PACKAGES = "${PN}" - -# For "EVL", look up https://evlproject.org/ . It involves -# a specially prepared kernel, and is currently unavailable -# in Yocto. -# -# -# manpage generation requires xmltoman, which is not available. -# -# The session-managers list specifies which session managers Meson -# shall download (via git clone) and build as subprojects. In OE, -# this is not how a session manager should be built. Instead, they -# should be integrated as separate OE recipes. To prevent PipeWire -# from using this Meson feature, set an empty list. -# This does not disable support or the need for session managers, -# it just prevents this subproject feature. -# -# AptX and LDAC are not available in OE. Currently, neither -# are lv2, ROC, and libmysofa. -# -# The RTKit module is deprecated in favor of the newer RT module. -# It still exists for legacy setups that still include it in -# their PipeWire configuration files. -EXTRA_OEMESON += " \ - -Devl=disabled \ - -Dtests=disabled \ - -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ - -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ - -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ - -Dman=disabled \ - -Dsession-managers='[]' \ - -Dlv2=disabled \ - -Droc=disabled \ - -Dbluez5-codec-aptx=disabled \ - -Dbluez5-codec-ldac=disabled \ - -Dlegacy-rtkit=false \ - -Dlibmysofa=disabled \ -" - -# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. -# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 -# mode but it looks like clang still does -CFLAGS:append = " -Wno-typedef-redefinition" - -# According to wireplumber documentation only one session manager should be installed at a time -# Possible options are media-session, which has fewer dependencies but is very simple, -# or wireplumber, which is more powerful. -PIPEWIRE_SESSION_MANAGER ??= "wireplumber" - -FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" -BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" - -PACKAGECONFIG:class-target ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ - ${PIPEWIRE_SESSION_MANAGER} \ - ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ -" - -# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, -# since "jack" imports libjack, and "pipewire-jack" generates -# libjack.so* files, thus colliding with the libpack package. This -# is why these two are marked in their respective packageconfigs -# as being in conflict. -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" -PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" -PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" -PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" -PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" -PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" -# From the pipewire git log: -# "Some Linux phones doesn't use oFono but ModemManager to control the modem." -# This packageconfig enables modemmanager specific code in the BlueZ backend. -PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" -PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" -PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" -PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" -PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" -PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" -PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" -PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" -PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" -PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" -PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" -PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" -PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" -PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" -PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" -# Starting with version 0.3.60, readline usage can be turned off in pw-cli. -# If it is disabled, getline() is used as a fallback. -PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" -PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" -# "systemd-user-service" packageconfig will only install service -# files to rootfs but not enable them as systemd.bbclass -# currently lacks the feature of enabling user services. -PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" -# pw-cat needs sndfile packageconfig to be enabled -PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" -PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" -PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" -PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" -PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" -PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" - -PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " -PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " - -SPA_SUBDIR = "spa-0.2" -PW_MODULE_SUBDIR = "pipewire-0.3" - -remove_unused_installed_files() { - # jack.conf is used by pipewire-jack (not the JACK SPA plugin). - # Remove it if pipewire-jack is not built to avoid creating the - # pipewire-jack package. - if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then - rm -f "${D}${datadir}/pipewire/jack.conf" - fi - - # minimal.conf is an example of how to minimally configure the - # daemon and is not meant to be used for production. - rm -f "${D}${datadir}/pipewire/minimal.conf" -} - -do_install[postfuncs] += "remove_unused_installed_files" - -python split_dynamic_packages () { - # Create packages for each SPA plugin. These plugins are located - # in individual subdirectories, so a recursive search is needed. - spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') - do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) - - # Create packages for each PipeWire module. - pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') - do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) -} - -python set_dynamic_metapkg_rdepends () { - import os - import oe.utils - - if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): - return - - # Go through all generated SPA plugin and PipeWire module packages - # (excluding the main package and the -meta package itself) and - # add them to the -meta package as RDEPENDS. - - base_pn = d.getVar('PN') - - spa_pn = base_pn + '-spa-plugins' - spa_metapkg = spa_pn + '-meta' - - pw_module_pn = base_pn + '-modules' - pw_module_metapkg = pw_module_pn + '-meta' - - d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") - d.setVar('FILES:' + spa_metapkg, "") - - d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") - d.setVar('FILES:' + pw_module_metapkg, "") - - blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] - spa_metapkg_rdepends = [] - pw_module_metapkg_rdepends = [] - pkgdest = d.getVar('PKGDEST') - - for pkg in oe.utils.packages_filter_out_system(d): - if pkg in blacklist: - continue - - is_spa_pkg = pkg.startswith(spa_pn) - is_pw_module_pkg = pkg.startswith(pw_module_pn) - if not is_spa_pkg and not is_pw_module_pkg: - continue - - if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: - continue - - # See if the package is empty by looking at the contents of its - # PKGDEST subdirectory. If this subdirectory is empty, then then - # package is empty as well. Empty packages do not get added to - # the meta package's RDEPENDS. - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - if is_spa_pkg: - spa_metapkg_rdepends.append(pkg) - if is_pw_module_pkg: - pw_module_metapkg_rdepends.append(pkg) - - d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') - - d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') -} - -PACKAGES =+ "\ - libpipewire \ - ${PN}-tools \ - ${PN}-pulse \ - ${PN}-alsa \ - ${PN}-jack \ - ${PN}-spa-plugins \ - ${PN}-spa-plugins-meta \ - ${PN}-spa-tools \ - ${PN}-modules \ - ${PN}-modules-meta \ - ${PN}-alsa-card-profile \ - ${PN}-v4l2 \ - ${PN}-aes67 \ - gstreamer1.0-pipewire \ -" - -PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" -PACKAGES_DYNAMIC:class-native = "" - -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" -CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" -FILES:${PN} = " \ - ${datadir}/pipewire \ - ${systemd_system_unitdir}/pipewire* \ - ${systemd_user_unitdir} \ - ${bindir}/pipewire \ - ${bindir}/pipewire-avb \ - ${bindir}/pipewire-vulkan \ -" - -RRECOMMENDS:${PN}:class-target += " \ - pipewire-modules-meta \ - pipewire-spa-plugins-meta \ -" - -FILES:${PN}-dev += " \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ -" - -CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" -FILES:libpipewire = " \ - ${datadir}/pipewire/client.conf \ - ${libdir}/libpipewire-*.so.* \ -" -# Add the bare minimum modules and plugins required to be able -# to use libpipewire. Without these, it is essentially unusable. -RDEPENDS:libpipewire += " \ - ${PN}-modules-client-node \ - ${PN}-modules-protocol-native \ - ${PN}-spa-plugins-support \ -" - -FILES:${PN}-tools = " \ - ${bindir}/pw-cat \ - ${bindir}/pw-cli \ - ${bindir}/pw-config \ - ${bindir}/pw-dot \ - ${bindir}/pw-dsdplay \ - ${bindir}/pw-dump \ - ${bindir}/pw-encplay \ - ${bindir}/pw-link \ - ${bindir}/pw-loopback \ - ${bindir}/pw-metadata \ - ${bindir}/pw-mididump \ - ${bindir}/pw-midiplay \ - ${bindir}/pw-midirecord \ - ${bindir}/pw-mon \ - ${bindir}/pw-play \ - ${bindir}/pw-profiler \ - ${bindir}/pw-record \ - ${bindir}/pw-reserve \ - ${bindir}/pw-top \ -" - -# This is a shim daemon that is intended to be used as a -# drop-in PulseAudio replacement, providing a pulseaudio-compatible -# socket that can be used by applications that use libpulse. -CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" -FILES:${PN}-pulse = " \ - ${datadir}/pipewire/pipewire-pulse.conf \ - ${systemd_system_unitdir}/pipewire-pulse.* \ - ${systemd_user_unitdir}/pipewire-pulse.* \ - ${bindir}/pipewire-pulse \ -" -RDEPENDS:${PN}-pulse += " \ - ${PN}-modules-protocol-pulse \ -" - -# ALSA plugin to redirect audio to pipewire. -FILES:${PN}-alsa = "\ - ${libdir}/alsa-lib/* \ - ${datadir}/alsa/alsa.conf.d/* \ -" - -# JACK drop-in libraries to redirect audio to pipewire. -CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" -FILES:${PN}-jack = "\ - ${bindir}/pw-jack \ - ${datadir}/pipewire/jack.conf \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ -" - -# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-spa-plugins = "" -RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" - -FILES:${PN}-spa-plugins-bluez5 += " \ - ${datadir}/${SPA_SUBDIR}/bluez5/* \ -" - -FILES:${PN}-spa-tools = " \ - ${bindir}/spa-* \ -" - -# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-modules = "" -RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" - -CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" -FILES:${PN}-modules-rt += " \ - ${datadir}/pipewire/client-rt.conf \ - ${sysconfdir}/security/limits.d/* \ - " - -CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" -FILES:${PN}-modules-filter-chain += " \ - ${datadir}/pipewire/filter-chain/* \ -" - -FILES:${PN}-alsa-card-profile = " \ - ${datadir}/alsa-card-profile/* \ - ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ -" - -# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. -FILES:${PN}-v4l2 += " \ - ${bindir}/pw-v4l2 \ - ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ -" - -# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). -FILES:${PN}-aes67 += " \ - ${bindir}/pipewire-aes67 \ -" - -FILES:gstreamer1.0-pipewire = " \ - ${libdir}/gstreamer-1.0/* \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.0.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.0.bb new file mode 100644 index 0000000000..b4da781f0f --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.0.bb @@ -0,0 +1,388 @@ +SUMMARY = "Multimedia processing server for Linux" +DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" +HOMEPAGE = "https://pipewire.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" +SECTION = "multimedia" + +LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ + file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ +" + +DEPENDS = "dbus ncurses" + +SRCREV = "4debdcd40b055b3eaa83a8f4443aa990ea566bfe" +SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd gettext useradd + +USERADD_PACKAGES = "${PN}" + +GROUPADD_PARAM:${PN} = "--system pipewire" + +USERADD_PARAM:${PN} = "--system --home / --no-create-home \ + --comment 'PipeWire multimedia daemon' \ + --gid pipewire --groups audio,video \ + pipewire" + +SYSTEMD_PACKAGES = "${PN}" + +# For "EVL", look up https://evlproject.org/ . It involves +# a specially prepared kernel, and is currently unavailable +# in Yocto. +# +# +# manpage generation requires xmltoman, which is not available. +# +# The session-managers list specifies which session managers Meson +# shall download (via git clone) and build as subprojects. In OE, +# this is not how a session manager should be built. Instead, they +# should be integrated as separate OE recipes. To prevent PipeWire +# from using this Meson feature, set an empty list. +# This does not disable support or the need for session managers, +# it just prevents this subproject feature. +# +# AptX and LDAC are not available in OE. Currently, neither +# are lv2, ROC, and libmysofa. +# +# The RTKit module is deprecated in favor of the newer RT module. +# It still exists for legacy setups that still include it in +# their PipeWire configuration files. +EXTRA_OEMESON += " \ + -Devl=disabled \ + -Dtests=disabled \ + -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ + -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ + -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ + -Dman=disabled \ + -Dsession-managers='[]' \ + -Dlv2=disabled \ + -Droc=disabled \ + -Dbluez5-codec-aptx=disabled \ + -Dbluez5-codec-ldac=disabled \ + -Dlegacy-rtkit=false \ + -Dlibmysofa=disabled \ +" + +# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. +# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 +# mode but it looks like clang still does +CFLAGS:append = " -Wno-typedef-redefinition" + +# According to wireplumber documentation only one session manager should be installed at a time +# Possible options are media-session, which has fewer dependencies but is very simple, +# or wireplumber, which is more powerful. +PIPEWIRE_SESSION_MANAGER ??= "wireplumber" + +FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" +BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" + +PACKAGECONFIG:class-target ??= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ + ${PIPEWIRE_SESSION_MANAGER} \ + ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ +" + +# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, +# since "jack" imports libjack, and "pipewire-jack" generates +# libjack.so* files, thus colliding with the libpack package. This +# is why these two are marked in their respective packageconfigs +# as being in conflict. +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" +PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" +PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" +PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" +PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" +PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" +# From the pipewire git log: +# "Some Linux phones doesn't use oFono but ModemManager to control the modem." +# This packageconfig enables modemmanager specific code in the BlueZ backend. +PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" +PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" +PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" +PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" +PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" +PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" +PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" +PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" +PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" +PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" +PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" +PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" +PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" +PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" +PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" +# Starting with version 0.3.60, readline usage can be turned off in pw-cli. +# If it is disabled, getline() is used as a fallback. +PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" +PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" +# "systemd-user-service" packageconfig will only install service +# files to rootfs but not enable them as systemd.bbclass +# currently lacks the feature of enabling user services. +PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" +# pw-cat needs sndfile packageconfig to be enabled +PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" +PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" +PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" +PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" + +PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " +PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " + +SPA_SUBDIR = "spa-0.2" +PW_MODULE_SUBDIR = "pipewire-0.3" + +remove_unused_installed_files() { + # jack.conf is used by pipewire-jack (not the JACK SPA plugin). + # Remove it if pipewire-jack is not built to avoid creating the + # pipewire-jack package. + if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then + rm -f "${D}${datadir}/pipewire/jack.conf" + fi + + # minimal.conf is an example of how to minimally configure the + # daemon and is not meant to be used for production. + rm -f "${D}${datadir}/pipewire/minimal.conf" +} + +do_install[postfuncs] += "remove_unused_installed_files" + +python split_dynamic_packages () { + # Create packages for each SPA plugin. These plugins are located + # in individual subdirectories, so a recursive search is needed. + spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') + do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) + + # Create packages for each PipeWire module. + pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') + do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) +} + +python set_dynamic_metapkg_rdepends () { + import os + import oe.utils + + if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): + return + + # Go through all generated SPA plugin and PipeWire module packages + # (excluding the main package and the -meta package itself) and + # add them to the -meta package as RDEPENDS. + + base_pn = d.getVar('PN') + + spa_pn = base_pn + '-spa-plugins' + spa_metapkg = spa_pn + '-meta' + + pw_module_pn = base_pn + '-modules' + pw_module_metapkg = pw_module_pn + '-meta' + + d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") + d.setVar('FILES:' + spa_metapkg, "") + + d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") + d.setVar('FILES:' + pw_module_metapkg, "") + + blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] + spa_metapkg_rdepends = [] + pw_module_metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in blacklist: + continue + + is_spa_pkg = pkg.startswith(spa_pn) + is_pw_module_pkg = pkg.startswith(pw_module_pn) + if not is_spa_pkg and not is_pw_module_pkg: + continue + + if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: + continue + + # See if the package is empty by looking at the contents of its + # PKGDEST subdirectory. If this subdirectory is empty, then then + # package is empty as well. Empty packages do not get added to + # the meta package's RDEPENDS. + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + if is_spa_pkg: + spa_metapkg_rdepends.append(pkg) + if is_pw_module_pkg: + pw_module_metapkg_rdepends.append(pkg) + + d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') + + d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') +} + +PACKAGES =+ "\ + libpipewire \ + ${PN}-tools \ + ${PN}-pulse \ + ${PN}-alsa \ + ${PN}-jack \ + ${PN}-spa-plugins \ + ${PN}-spa-plugins-meta \ + ${PN}-spa-tools \ + ${PN}-modules \ + ${PN}-modules-meta \ + ${PN}-alsa-card-profile \ + ${PN}-v4l2 \ + ${PN}-aes67 \ + gstreamer1.0-pipewire \ +" + +PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" +PACKAGES_DYNAMIC:class-native = "" + +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" +CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" +FILES:${PN} = " \ + ${datadir}/pipewire \ + ${systemd_system_unitdir}/pipewire* \ + ${systemd_user_unitdir} \ + ${bindir}/pipewire \ + ${bindir}/pipewire-avb \ + ${bindir}/pipewire-vulkan \ +" + +RRECOMMENDS:${PN}:class-target += " \ + pipewire-modules-meta \ + pipewire-spa-plugins-meta \ +" + +FILES:${PN}-dev += " \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ +" + +CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" +FILES:libpipewire = " \ + ${datadir}/pipewire/client.conf \ + ${libdir}/libpipewire-*.so.* \ +" +# Add the bare minimum modules and plugins required to be able +# to use libpipewire. Without these, it is essentially unusable. +RDEPENDS:libpipewire += " \ + ${PN}-modules-client-node \ + ${PN}-modules-protocol-native \ + ${PN}-spa-plugins-support \ +" + +FILES:${PN}-tools = " \ + ${bindir}/pw-cat \ + ${bindir}/pw-cli \ + ${bindir}/pw-config \ + ${bindir}/pw-dot \ + ${bindir}/pw-dsdplay \ + ${bindir}/pw-dump \ + ${bindir}/pw-encplay \ + ${bindir}/pw-link \ + ${bindir}/pw-loopback \ + ${bindir}/pw-metadata \ + ${bindir}/pw-mididump \ + ${bindir}/pw-midiplay \ + ${bindir}/pw-midirecord \ + ${bindir}/pw-mon \ + ${bindir}/pw-play \ + ${bindir}/pw-profiler \ + ${bindir}/pw-record \ + ${bindir}/pw-reserve \ + ${bindir}/pw-top \ +" + +# This is a shim daemon that is intended to be used as a +# drop-in PulseAudio replacement, providing a pulseaudio-compatible +# socket that can be used by applications that use libpulse. +CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" +FILES:${PN}-pulse = " \ + ${datadir}/pipewire/pipewire-pulse.conf \ + ${systemd_system_unitdir}/pipewire-pulse.* \ + ${systemd_user_unitdir}/pipewire-pulse.* \ + ${bindir}/pipewire-pulse \ +" +RDEPENDS:${PN}-pulse += " \ + ${PN}-modules-protocol-pulse \ +" + +# ALSA plugin to redirect audio to pipewire. +FILES:${PN}-alsa = "\ + ${libdir}/alsa-lib/* \ + ${datadir}/alsa/alsa.conf.d/* \ +" + +# JACK drop-in libraries to redirect audio to pipewire. +CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" +FILES:${PN}-jack = "\ + ${bindir}/pw-jack \ + ${datadir}/pipewire/jack.conf \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ +" + +# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-spa-plugins = "" +RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" + +FILES:${PN}-spa-plugins-bluez5 += " \ + ${datadir}/${SPA_SUBDIR}/bluez5/* \ +" + +FILES:${PN}-spa-tools = " \ + ${bindir}/spa-* \ +" + +# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-modules = "" +RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" + +CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" +FILES:${PN}-modules-rt += " \ + ${datadir}/pipewire/client-rt.conf \ + ${sysconfdir}/security/limits.d/* \ + " + +CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" +FILES:${PN}-modules-filter-chain += " \ + ${datadir}/pipewire/filter-chain/* \ +" + +FILES:${PN}-alsa-card-profile = " \ + ${datadir}/alsa-card-profile/* \ + ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ +" + +# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. +FILES:${PN}-v4l2 += " \ + ${bindir}/pw-v4l2 \ + ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ +" + +# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). +FILES:${PN}-aes67 += " \ + ${bindir}/pipewire-aes67 \ +" + +FILES:gstreamer1.0-pipewire = " \ + ${libdir}/gstreamer-1.0/* \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb index 4f14985469..ead875824d 100644 --- a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb +++ b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb @@ -13,8 +13,9 @@ REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" DEPENDS = "cups glib-2.0 libusb xmlto-native desktop-file-utils-native autoconf-archive-native" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)}" PACKAGECONFIG[systemd] = ",--without-systemdsystemunitdir,systemd" +PACKAGECONFIG[polkit] = ",,,cups-pk-helper" do_configure:prepend() { # This file is not provided if fetching from git but required for configure diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.26.bb b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.26.bb index e38ef2b04a..e3730cfaa6 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.26.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.26.bb @@ -286,5 +286,12 @@ FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" RDEPENDS:${PN} += "perl" RDEPENDS:${PN}-utils = "${PN} perl" +RDEPENDS:${PN}-krb5 = "${PN}" +RDEPENDS:${PN}-ldap = "${PN}" +RDEPENDS:${PN}-mysql = "${PN}" +RDEPENDS:${PN}-perl = "${PN}" +RDEPENDS:${PN}-postgresql = "${PN}" +RDEPENDS:${PN}-python = "${PN}" +RDEPENDS:${PN}-unixodbc = "${PN}" CLEANBROKEN = "1" diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index acebd6dce5..a478dcd80d 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch @@ -1,4 +1,4 @@ -From c21adbb0b230ffba97cf5d059e2bd024e13a37df Mon Sep 17 00:00:00 2001 +From 38e7e90cc2075952c1b74f5fca826f9c6cadb2f0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Apr 2017 11:54:57 -0700 Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler @@ -13,8 +13,8 @@ Signed-off-by: Khem Raj --- Upstream-Status: Pending - acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 ++ + acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++ + configure.ac | 2 + 2 files changed, 76 insertions(+) create mode 100644 acinclude/ax_check_compile_flag.m4 @@ -99,20 +99,20 @@ index 0000000..dcabb92 +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/configure.ac b/configure.ac -index ff4688c..9382fdf 100644 +index 2543676..4635474 100644 --- a/configure.ac +++ b/configure.ac -@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4]) +@@ -28,6 +28,7 @@ m4_include([acinclude/pkg.m4]) + m4_include([acinclude/tdb.m4]) m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) + m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) +m4_include([acinclude/ax_check_compile_flag.m4]) HOSTCXX="$BUILD_CXX" PRESET_CFLAGS="$CFLAGS" -@@ -44,6 +45,7 @@ AC_PROG_CXX +@@ -59,6 +60,7 @@ AC_USE_SYSTEM_EXTENSIONS + AC_LANG([C++]) - AC_CANONICAL_HOST +AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"]) # Clang 3.2 on some CPUs requires -march-native to detect correctly. diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch new file mode 100644 index 0000000000..56c91de3c4 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch @@ -0,0 +1,74 @@ +From cd8bf8a4bf881f84c23a5fc1f48bb716efa51512 Mon Sep 17 00:00:00 2001 +From: Patrick Wicki +Date: Wed, 22 Nov 2023 15:35:44 +0100 +Subject: [PATCH] squid: make squid-conf-tests run on target device + +* Fix paths to allow tests to run outside the original builddir +* Allow the tests to run on read-only root + * Don't overwrite tests with true on success + * Change logfile path to /var/log + +Upstream-Status: Inappropriate [cross compile specific] + +Signed-off-by: Patrick Wicki + +--- + test-suite/Makefile.am | 16 ++++++++-------- + test-suite/test-squid-conf.sh | 2 +- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am +index 8becdbc..eccd49c 100644 +--- a/test-suite/Makefile.am ++++ b/test-suite/Makefile.am +@@ -21,7 +21,7 @@ LDADD = \ + EXTRA_PROGRAMS = mem_node_test splay + + EXTRA_DIST = \ +- $(srcdir)/squidconf/* \ ++ squidconf/* \ + test-functionality.sh \ + test-sources.sh \ + test-squid-conf.sh \ +@@ -134,21 +134,21 @@ VirtualDeleteOperator_SOURCES = \ + + installcheck-local: squid-conf-tests + +-squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* +- @failed=0; cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; rm -f $@ || $(TRUE); \ ++squid-conf-tests: test-squid-conf.sh $(top_builddir)/src/squid.conf.default squidconf/* ++ @failed=0; cfglist="$(top_builddir)/src/squid.conf.default squidconf/*.conf"; rm -f $@ || $(TRUE); \ + for cfg in $$cfglist ; do \ +- $(srcdir)/test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ ++ ./test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ + { echo "FAIL: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + failed=1; break; \ + }; \ + if test "$$failed" -eq 0; then \ + echo "PASS: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + else break; fi; \ + done; \ +- if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi ++ exit "$$failed" + +-CLEANFILES += squid-conf-tests squid-stderr.log ++CLEANFILES += squid-conf-tests /var/log/squid-stderr.log +diff --git a/test-suite/test-squid-conf.sh b/test-suite/test-squid-conf.sh +index 05fcaf3..a5a8a5a 100755 +--- a/test-suite/test-squid-conf.sh ++++ b/test-suite/test-squid-conf.sh +@@ -111,7 +111,7 @@ then + done < $instructionsFile + fi + +-errorLog="squid-stderr.log" ++errorLog="/var/log/squid-stderr.log" + + $sbindir/squid -k parse -f $configFile 2> $errorLog + result=$? diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch deleted file mode 100644 index 738e609c05..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b73b802282bf95d214c86ba943c5765ba6930bc1 Mon Sep 17 00:00:00 2001 -From: Jim Somerville -Date: Mon, 21 Oct 2013 12:50:44 -0400 -Subject: [PATCH] Fix flawed dynamic -ldb link test in configure - -The test uses dbopen, but just ignores the fact -that this function may not exist in the db version -used. This leads to the dynamic link test failing -and the configure script just making assumptions -about why and setting the need for -ldb incorrectly. - -Signed-off-by: Jim Somerville - ---- -Upstream-Status: Pending - - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/configure.ac b/configure.ac -index d2f7feb..c7ae568 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3268,6 +3268,16 @@ case "$host" in - ;; - esac - -+if test "x$ac_cv_have_decl_dbopen" = "xyes"; then -+ dnl 1.85 -+ SQUID_CHECK_DBOPEN_NEEDS_LIBDB -+else -+ # dbopen isn't there. So instead of running a compile/link test that -+ # uses it and is thus guaranteed to fail, we just assume that we will -+ # need to link in the db library, rather than fabricate some other -+ # dynamic compile/link test. -+ ac_cv_dbopen_libdb="yes" -+fi - dnl System-specific library modifications - dnl - case "$host" in diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch index ffb7371640..ae8706df72 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch @@ -1,4 +1,4 @@ -From 995aaf30799fa972441354b6feb45f0621968929 Mon Sep 17 00:00:00 2001 +From c0be3192f608037682464bcb728e97f9d9b543aa Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Wed, 16 Oct 2013 16:41:03 -0400 Subject: [PATCH] Set up for cross compilation @@ -17,12 +17,12 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac -index fe80ee0..57cd1ac 100644 +index ca0bc79..c222851 100644 --- a/configure.ac +++ b/configure.ac -@@ -27,6 +27,7 @@ m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) +@@ -29,6 +29,7 @@ m4_include([acinclude/tdb.m4]) + m4_include([acinclude/lib-checks.m4]) + m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) +HOSTCXX="$BUILD_CXX" PRESET_CFLAGS="$CFLAGS" diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch index 10853333e2..5bb30bfcb2 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch @@ -1,4 +1,4 @@ -From e4778299a3e49a634d2c7fe4fd9ac77777e829e3 Mon Sep 17 00:00:00 2001 +From 050f8ab275a7a5f3d94045da6b15a2b63dfbeb3f Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Tue, 14 Oct 2014 02:56:08 -0400 Subject: [PATCH] Skip AC_RUN_IFELSE tests @@ -17,10 +17,10 @@ Signed-off-by: Jackie Huang 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 -index ad0ba60..4477446 100644 +index 2c4e340..64648e3 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 -@@ -61,7 +61,15 @@ main(void) +@@ -57,7 +57,15 @@ main(void) return 0; } @@ -35,13 +35,13 @@ index ad0ba60..4477446 100644 + dnl Can't test in cross compiled env - so assume good + squid_cv_broken_heimdal_krb5_h=no ]) + SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test) ]) - ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4 -index 1e9333527c..2d42787029 100644 +index 53847a8..850322a 100644 --- a/acinclude/lib-checks.m4 +++ b/acinclude/lib-checks.m4 -@@ -227,7 +227,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ +@@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ [ AC_MSG_RESULT([no]) ], @@ -52,15 +52,14 @@ index 1e9333527c..2d42787029 100644 SQUID_STATE_ROLLBACK(check_const_SSL_METHOD) ]) -@@ -386,8 +386,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ - [ - AC_MSG_RESULT([yes]) - AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) -- ], --[]) +@@ -347,7 +349,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) +- ],[]) + ],[ + AC_MSG_RESULT([skipped - can't test in cross-compiled env]) + ]) - SQUID_STATE_ROLLBACK(check_TXTDB) + SQUID_STATE_ROLLBACK(check_TXTDB) ]) diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest b/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest index de79a293c5..8f8e28f92b 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest @@ -1,3 +1,4 @@ #!/bin/sh # +make -C test-suite -k squid-conf-tests make -C test-suite -k runtest-TESTS diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch deleted file mode 100644 index 124e04490f..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 702bd881b66dc034e711c0ff47805f2da40b6e0d Mon Sep 17 00:00:00 2001 -From: Yue Tao -Date: Mon, 8 Aug 2016 16:04:33 +0800 -Subject: [PATCH] Set the SYSROOT for libxml2 header file to avoid host - contamination. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Yue Tao -Signed-off-by: Yi Zhao - ---- - configure.ac | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 504a844..ff4688c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -931,15 +931,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then - dnl Find the main header and include path... - AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [ - AC_CHECK_HEADERS([libxml/parser.h], [], [ -- AC_MSG_NOTICE([Testing in /usr/include/libxml2]) -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2]) - SAVED_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" -+ CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/include/libxml2"], [ -- AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) -- CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS" -+ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/include/libxml2"], [ -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2]) -+ CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/local/include/libxml2"], [ -+ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/local/include/libxml2"], [ - AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h]) - ]) - ]) diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch deleted file mode 100644 index ea27285e09..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 8786b91488dae3f6dfeadd686e80d2ffc5c29320 Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Thu, 25 Aug 2016 15:22:57 +0800 -Subject: [PATCH] squid: don't do squid-conf-tests at build time - -* squid-conf-tests is a test to run "squid -k parse -f" - to perse the config files, which should not be run - at build time since we are cross compiling, so remove - it but it will be added back for the runtime ptest. - -* Fix the directories of the conf files for squid-conf-tests - so that it can run on the target board. - -Upstream-Status: Inappropriate [cross compile specific] - -Signed-off-by: Jackie Huang - ---- - test-suite/Makefile.am | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am -index 0233c0e..e0021b6 100644 ---- a/test-suite/Makefile.am -+++ b/test-suite/Makefile.am -@@ -40,8 +40,7 @@ TESTS += debug \ - splay\ - mem_node_test\ - mem_hdr_test\ -- $(ESI_TESTS) \ -- squid-conf-tests -+ $(ESI_TESTS) - - ## Sort by alpha - any build failures are significant. - check_PROGRAMS += debug \ -@@ -159,19 +158,19 @@ VirtualDeleteOperator_SOURCES = \ - ##$(TARGLIB): $(LIBOBJS) - ## $(AR_R) $(TARGLIB) $(LIBOBJS) - --squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* -+squid-conf-tests: $(sysconfdir)/squid.conf.default squidconf/* - @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \ - for cfg in $$cfglist ; do \ -- $(top_builddir)/src/squid -k parse -f $$cfg || \ -+ squid -k parse -f $$cfg || \ - { echo "FAIL: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - failed=1; break; \ - }; \ - if test "$$failed" -eq 0; then \ - echo "PASS: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - else break; fi; \ - done; \ - if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid.nm b/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid.nm new file mode 100644 index 0000000000..b58ee11bdc --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid.nm @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$2" in + up|down|vpn-up|vpn-down) + systemctl -q reload squid.service || : + ;; +esac diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/squid_5.7.bb b/meta-openembedded/meta-networking/recipes-daemons/squid/squid_5.7.bb deleted file mode 100644 index 2a5de1872d..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/squid_5.7.bb +++ /dev/null @@ -1,128 +0,0 @@ -SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" -DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ -Squid offers a rich access control, authorization and logging environment to \ -develop web proxy and content serving applications. \ -Squid offers a rich set of traffic optimization options, most of which are \ -enabled by default for simpler installation and high performance. \ -" -HOMEPAGE = "http://www.squid-cache.org" -SECTION = "web" -LICENSE = "GPL-2.0-or-later" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" -MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 \ - file://Set-up-for-cross-compilation.patch \ - file://Skip-AC_RUN_IFELSE-tests.patch \ - file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ - file://squid-use-serial-tests-config-needed-by-ptest.patch \ - file://run-ptest \ - file://volatiles.03_squid \ - file://set_sysroot_patch.patch \ - file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ - file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ - " - -SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" - -SRC_URI[sha256sum] = "4c17e1eb324c4b7aa3c6889eba66eeca7ed98625d44076f7db7b027b2b093bd5" - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://errors/COPYRIGHT;md5=0a7deb73d8fb7a9849af7145987829a4 \ - " -DEPENDS = "libtool krb5 openldap db cyrus-sasl" - -inherit autotools pkgconfig useradd ptest perlnative - -LDFLAGS:append:mipsarch = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:riscv64 = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ - " -PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," -PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" -PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" - -BASIC_AUTH = "DB SASL LDAP" - -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" - -EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-logdir=${localstatedir}/log/${BPN} \ - 'PERL=${USRBINPATH}/env perl'" - -export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" - -TESTDIR = "test-suite" - -do_configure:prepend() { - export SYSROOT=$PKG_CONFIG_SYSROOT_DIR -} - -do_configure:append() { - sed -i -e 's|${WORKDIR}||g' ${B}/include/autoconf.h -} - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - - # Needed to generate file squid.conf.default - oe_runmake DESTDIR=${D}${PTEST_PATH} -C src install-data-local - install -d ${D}${sysconfdir}/squid - install -m 0644 ${D}${PTEST_PATH}/${sysconfdir}/squid/squid.conf.default ${D}${sysconfdir}/squid - - # Don't need these directories - rm -rf ${D}${PTEST_PATH}/${sysconfdir} - rm -rf ${D}${PTEST_PATH}/usr - rm -rf ${D}${PTEST_PATH}/var - - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # Add squid-conf-tests for runtime tests - sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \ - -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # Ensure the path for command true is correct - sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile -} - -do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi - - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid - - rmdir "${D}${localstatedir}/run/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" - - rmdir "${D}${localstatedir}/log/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" -} - -FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" -FILES:${PN}-dbg += "/usr/src/debug" -FILES:${PN}-doc += "${datadir}/*.txt" -FILES:${PN}-ptest += "${sysconfdir}/squid/squid.conf.default" - -RDEPENDS:${PN} += "perl" -RDEPENDS:${PN}-ptest += "perl make" diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.5.bb new file mode 100644 index 0000000000..8d5d1a3849 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -0,0 +1,146 @@ +SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" +DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ +Squid offers a rich access control, authorization and logging environment to \ +develop web proxy and content serving applications. \ +Squid offers a rich set of traffic optimization options, most of which are \ +enabled by default for simpler installation and high performance. \ +" +HOMEPAGE = "http://www.squid-cache.org" +SECTION = "web" +LICENSE = "GPL-2.0-or-later" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" +MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 \ + file://Set-up-for-cross-compilation.patch \ + file://Skip-AC_RUN_IFELSE-tests.patch \ + file://squid-use-serial-tests-config-needed-by-ptest.patch \ + file://run-ptest \ + file://volatiles.03_squid \ + file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ + file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ + file://squid.nm \ + " + +SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" + +SRC_URI[sha256sum] = "99acd54ec9d68b2a9080d19fcc43eca1a245146cf162dbba689510d01e6d0f25" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ + " +DEPENDS = "libtool" + +inherit autotools pkgconfig useradd ptest perlnative systemd + +LDFLAGS:append:mipsarch = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv64 = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" + +PACKAGECONFIG ??= "auth url-rewrite-helpers \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," +PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" +PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" +PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" +PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" + +PACKAGES =+ " \ + ${PN}-conf \ + ${PN}-networkmanager \ +" + +BASIC_AUTH = "DB SASL LDAP" + +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" + +EXTRA_OECONF += "--with-default-user=squid \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-logdir=${localstatedir}/log/${BPN} \ + 'PERL=${USRBINPATH}/env perl'" + +export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" + +TESTDIR = "test-suite" + +do_configure:prepend() { + export SYSROOT=$PKG_CONFIG_SYSROOT_DIR +} + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/include/autoconf.h +} + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + + # Install default config + install -d ${D}${PTEST_PATH}/src + install -m 0644 ${B}/src/squid.conf.default ${D}${PTEST_PATH}/src + + # autoconf.h is needed during squid-conf-tests + install -d ${D}${PTEST_PATH}/include + install -m 0644 ${B}/include/autoconf.h ${D}${PTEST_PATH}/include + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # Ensure the path for command true is correct + sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile +} + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # Install service unit file + install -d ${D}/${systemd_unitdir}/system + install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system + sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service + + # Configure tmpfiles.d + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid + + rmdir "${D}${localstatedir}/run/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" + + rmdir "${D}${localstatedir}/log/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" + + # Install NetworkManager dispatcher reload hooks + install -d ${D}${libdir}/NetworkManager/dispatcher.d + install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid +} + +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "squid.service" + +FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" +FILES:${PN}-dbg += "/usr/src/debug" +FILES:${PN}-doc += "${datadir}/*.txt" +FILES:${PN}-conf += "${sysconfdir}/squid" +FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" + +RDEPENDS:${PN} += "perl ${PN}-conf" +RDEPENDS:${PN}-ptest += "perl make" diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/0001-tools-make-quiet-actually-suppress-output.patch b/meta-openembedded/meta-networking/recipes-protocols/frr/frr/0001-tools-make-quiet-actually-suppress-output.patch deleted file mode 100644 index 3e93cf3c47..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/0001-tools-make-quiet-actually-suppress-output.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 312d5ee1592f8c5b616d330233d1de2643f759e2 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 14 Sep 2023 17:04:16 +0200 -Subject: [PATCH] tools: make --quiet actually suppress output - -When calling daemon_stop() with --quiet and e.g. the pidfile is empty, -it won't return early since while "$fail" is set, "$2" is "--quiet", so -the if condition isn't met and it will continue executing, resulting -in error messages in the log: - -> Sep 14 14:48:33 localhost watchfrr[2085]: [YFT0P-5Q5YX] Forked background command [pid 2086]: /usr/lib/frr/watchfrr.sh restart all -> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec -> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec -> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec - -Fix this by moving the --quiet check into the block to log_failure_msg(), -and also add the check to all other invocations of log_*_msg() to make ---quiet properly suppress output. - -Fixes: 19a99d89f088 ("tools: suppress unuseful warnings during restarting frr") -Signed-off-by: Jonas Gorski -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/312d5ee1592f8c5b616d330233d1de2643f759e2] ---- - tools/frrcommon.sh.in | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in -index f1f70119097e..00b63a78e2bc 100755 ---- a/tools/frrcommon.sh.in -+++ b/tools/frrcommon.sh.in -@@ -207,8 +207,8 @@ daemon_stop() { - [ -z "$fail" -a -z "$pid" ] && fail="pid file is empty" - [ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running" - -- if [ -n "$fail" ] && [ "$2" != "--quiet" ]; then -- log_failure_msg "Cannot stop $dmninst: $fail" -+ if [ -n "$fail" ]; then -+ [ "$2" = "--quiet" ] || log_failure_msg "Cannot stop $dmninst: $fail" - return 1 - fi - -@@ -220,11 +220,11 @@ daemon_stop() { - [ $(( cnt -= 1 )) -gt 0 ] || break - done - if kill -0 "$pid" 2>/dev/null; then -- log_failure_msg "Failed to stop $dmninst, pid $pid still running" -+ [ "$2" = "--quiet" ] || log_failure_msg "Failed to stop $dmninst, pid $pid still running" - still_running=1 - return 1 - else -- log_success_msg "Stopped $dmninst" -+ [ "$2" = "--quiet" ] || log_success_msg "Stopped $dmninst" - rm -f "$pidfile" - return 0 - fi --- -2.42.0 - diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46752.patch b/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46752.patch deleted file mode 100644 index e1f30248ca..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46752.patch +++ /dev/null @@ -1,125 +0,0 @@ -From b08afc81c60607a4f736f418f2e3eb06087f1a35 Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Fri, 20 Oct 2023 17:49:18 +0300 -Subject: [PATCH] bgpd: Handle MP_REACH_NLRI malformed packets with session - reset - -Avoid crashing bgpd. - -``` -(gdb) -bgp_mp_reach_parse (args=, mp_update=0x7fffffffe140) at bgpd/bgp_attr.c:2341 -2341 stream_get(&attr->mp_nexthop_global, s, IPV6_MAX_BYTELEN); -(gdb) -stream_get (dst=0x7fffffffe1ac, s=0x7ffff0006e80, size=16) at lib/stream.c:320 -320 { -(gdb) -321 STREAM_VERIFY_SANE(s); -(gdb) -323 if (STREAM_READABLE(s) < size) { -(gdb) -34 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); -(gdb) - -Thread 1 "bgpd" received signal SIGSEGV, Segmentation fault. -0x00005555556e37be in route_set_aspath_prepend (rule=0x555555aac0d0, prefix=0x7fffffffe050, - object=0x7fffffffdb00) at bgpd/bgp_routemap.c:2282 -2282 if (path->attr->aspath->refcnt) -(gdb) -``` - -With the configuration: - -``` - neighbor 127.0.0.1 remote-as external - neighbor 127.0.0.1 passive - neighbor 127.0.0.1 ebgp-multihop - neighbor 127.0.0.1 disable-connected-check - neighbor 127.0.0.1 update-source 127.0.0.2 - neighbor 127.0.0.1 timers 3 90 - neighbor 127.0.0.1 timers connect 1 - address-family ipv4 unicast - redistribute connected - neighbor 127.0.0.1 default-originate - neighbor 127.0.0.1 route-map RM_IN in - exit-address-family -! -route-map RM_IN permit 10 - set as-path prepend 200 -exit -``` - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/b08afc81c60607a4f736f418f2e3eb06087f1a35] -CVE: CVE-2023-46752 -Signed-off-by: Jonas Gorski ---- - bgpd/bgp_attr.c | 6 +----- - bgpd/bgp_attr.h | 1 - - bgpd/bgp_packet.c | 6 +----- - 3 files changed, 2 insertions(+), 11 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index 6925aff727e2..e7bb42a5d989 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -2421,7 +2421,7 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, - - mp_update->afi = afi; - mp_update->safi = safi; -- return BGP_ATTR_PARSE_EOR; -+ return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_MAL_ATTR, 0); - } - - mp_update->afi = afi; -@@ -3759,10 +3759,6 @@ enum bgp_attr_parse_ret bgp_attr_parse(struct peer *peer, struct attr *attr, - goto done; - } - -- if (ret == BGP_ATTR_PARSE_EOR) { -- goto done; -- } -- - if (ret == BGP_ATTR_PARSE_ERROR) { - flog_warn(EC_BGP_ATTRIBUTE_PARSE_ERROR, - "%s: Attribute %s, parse error", peer->host, -diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h -index 961e5f122470..fc347e7a1b4b 100644 ---- a/bgpd/bgp_attr.h -+++ b/bgpd/bgp_attr.h -@@ -364,7 +364,6 @@ enum bgp_attr_parse_ret { - /* only used internally, send notify + convert to BGP_ATTR_PARSE_ERROR - */ - BGP_ATTR_PARSE_ERROR_NOTIFYPLS = -3, -- BGP_ATTR_PARSE_EOR = -4, - }; - - struct bpacket_attr_vec_arr; -diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c -index b585591e2f69..5ecf343b6657 100644 ---- a/bgpd/bgp_packet.c -+++ b/bgpd/bgp_packet.c -@@ -2397,8 +2397,7 @@ static int bgp_update_receive(struct peer_connection *connection, - * Non-MP IPv4/Unicast EoR is a completely empty UPDATE - * and MP EoR should have only an empty MP_UNREACH - */ -- if ((!update_len && !withdraw_len && nlris[NLRI_MP_UPDATE].length == 0) -- || (attr_parse_ret == BGP_ATTR_PARSE_EOR)) { -+ if (!update_len && !withdraw_len && nlris[NLRI_MP_UPDATE].length == 0) { - afi_t afi = 0; - safi_t safi; - struct graceful_restart_info *gr_info; -@@ -2419,9 +2418,6 @@ static int bgp_update_receive(struct peer_connection *connection, - && nlris[NLRI_MP_WITHDRAW].length == 0) { - afi = nlris[NLRI_MP_WITHDRAW].afi; - safi = nlris[NLRI_MP_WITHDRAW].safi; -- } else if (attr_parse_ret == BGP_ATTR_PARSE_EOR) { -- afi = nlris[NLRI_MP_UPDATE].afi; -- safi = nlris[NLRI_MP_UPDATE].safi; - } - - if (afi && peer->afc[afi][safi]) { --- -2.42.1 - diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46753.patch b/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46753.patch deleted file mode 100644 index 6bf159aba8..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-46753.patch +++ /dev/null @@ -1,117 +0,0 @@ -From d8482bf011cb2b173e85b65b4bf3d5061250cdb9 Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Mon, 23 Oct 2023 23:34:10 +0300 -Subject: [PATCH] bgpd: Check mandatory attributes more carefully for UPDATE - message - -If we send a crafted BGP UPDATE message without mandatory attributes, we do -not check if the length of the path attributes is zero or not. We only check -if attr->flag is at least set or not. Imagine we send only unknown transit -attribute, then attr->flag is always 0. Also, this is true only if graceful-restart -capability is received. - -A crash: - -``` -bgpd[7834]: [TJ23Y-GY0RH] 127.0.0.1 Unknown attribute is received (type 31, length 16) -bgpd[7834]: [PCFFM-WMARW] 127.0.0.1(donatas-pc) rcvd UPDATE wlen 0 attrlen 20 alen 17 -BGP[7834]: Received signal 11 at 1698089639 (si_addr 0x0, PC 0x55eefd375b4a); aborting... -BGP[7834]: /usr/local/lib/libfrr.so.0(zlog_backtrace_sigsafe+0x6d) [0x7f3205ca939d] -BGP[7834]: /usr/local/lib/libfrr.so.0(zlog_signal+0xf3) [0x7f3205ca9593] -BGP[7834]: /usr/local/lib/libfrr.so.0(+0xf5181) [0x7f3205cdd181] -BGP[7834]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7f3204ff3980] -BGP[7834]: /usr/lib/frr/bgpd(+0x18ab4a) [0x55eefd375b4a] -BGP[7834]: /usr/local/lib/libfrr.so.0(route_map_apply_ext+0x310) [0x7f3205cd1290] -BGP[7834]: /usr/lib/frr/bgpd(+0x163610) [0x55eefd34e610] -BGP[7834]: /usr/lib/frr/bgpd(bgp_update+0x9a5) [0x55eefd35c1d5] -BGP[7834]: /usr/lib/frr/bgpd(bgp_nlri_parse_ip+0xb7) [0x55eefd35e867] -BGP[7834]: /usr/lib/frr/bgpd(+0x1555e6) [0x55eefd3405e6] -BGP[7834]: /usr/lib/frr/bgpd(bgp_process_packet+0x747) [0x55eefd345597] -BGP[7834]: /usr/local/lib/libfrr.so.0(event_call+0x83) [0x7f3205cef4a3] -BGP[7834]: /usr/local/lib/libfrr.so.0(frr_run+0xc0) [0x7f3205ca10a0] -BGP[7834]: /usr/lib/frr/bgpd(main+0x409) [0x55eefd2dc979] -``` - -Sending: - -``` -import socket -import time - -OPEN = (b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" -b"\xff\xff\x00\x62\x01\x04\xfd\xea\x00\x5a\x0a\x00\x00\x01\x45\x02" -b"\x06\x01\x04\x00\x01\x00\x01\x02\x02\x02\x00\x02\x02\x46\x00\x02" -b"\x06\x41\x04\x00\x00\xfd\xea\x02\x02\x06\x00\x02\x06\x45\x04\x00" -b"\x01\x01\x03\x02\x0e\x49\x0c\x0a\x64\x6f\x6e\x61\x74\x61\x73\x2d" -b"\x70\x63\x00\x02\x04\x40\x02\x00\x78\x02\x09\x47\x07\x00\x01\x01" -b"\x80\x00\x00\x00") - -KEEPALIVE = (b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" -b"\xff\xff\xff\xff\xff\xff\x00\x13\x04") - -UPDATE = bytearray.fromhex("ffffffffffffffffffffffffffffffff003c0200000014ff1f001000040146464646460004464646464646664646f50d05800100010200ffff000000") - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -s.connect(('127.0.0.2', 179)) -s.send(OPEN) -data = s.recv(1024) -s.send(KEEPALIVE) -data = s.recv(1024) -s.send(UPDATE) -data = s.recv(1024) -time.sleep(1000) -s.close() -``` - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/d8482bf011cb2b173e85b65b4bf3d5061250cdb9] -CVE: CVE-2023-46753 -Signed-off-by: Jonas Gorski ---- - bgpd/bgp_attr.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index e7bb42a5d989..cf2dbe65b805 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -3385,13 +3385,15 @@ bgp_attr_unknown(struct bgp_attr_parser_args *args) - } - - /* Well-known attribute check. */ --static int bgp_attr_check(struct peer *peer, struct attr *attr) -+static int bgp_attr_check(struct peer *peer, struct attr *attr, -+ bgp_size_t length) - { - uint8_t type = 0; - - /* BGP Graceful-Restart End-of-RIB for IPv4 unicast is signaled as an - * empty UPDATE. */ -- if (CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV) && !attr->flag) -+ if (CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV) && !attr->flag && -+ !length) - return BGP_ATTR_PARSE_PROCEED; - - /* "An UPDATE message that contains the MP_UNREACH_NLRI is not required -@@ -3443,7 +3445,7 @@ enum bgp_attr_parse_ret bgp_attr_parse(struct peer *peer, struct attr *attr, - enum bgp_attr_parse_ret ret; - uint8_t flag = 0; - uint8_t type = 0; -- bgp_size_t length; -+ bgp_size_t length = 0; - uint8_t *startp, *endp; - uint8_t *attr_endp; - uint8_t seen[BGP_ATTR_BITMAP_SIZE]; -@@ -3831,7 +3833,7 @@ enum bgp_attr_parse_ret bgp_attr_parse(struct peer *peer, struct attr *attr, - } - - /* Check all mandatory well-known attributes are present */ -- ret = bgp_attr_check(peer, attr); -+ ret = bgp_attr_check(peer, attr, length); - if (ret < 0) - goto done; - --- -2.42.1 - diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47234.patch b/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47234.patch deleted file mode 100644 index 754f9345a0..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47234.patch +++ /dev/null @@ -1,95 +0,0 @@ -From c37119df45bbf4ef713bc10475af2ee06e12f3bf Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Sun, 29 Oct 2023 22:44:45 +0200 -Subject: [PATCH] bgpd: Ignore handling NLRIs if we received MP_UNREACH_NLRI - -If we receive MP_UNREACH_NLRI, we should stop handling remaining NLRIs if -no mandatory path attributes received. - -In other words, if MP_UNREACH_NLRI received, the remaining NLRIs should be handled -as a new data, but without mandatory attributes, it's a malformed packet. - -In normal case, this MUST not happen at all, but to avoid crashing bgpd, we MUST -handle that. - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/c37119df45bbf4ef713bc10475af2ee06e12f3bf] -CVE: CVE-2023-47234 -Signed-off-by: Jonas Gorski ---- - bgpd/bgp_attr.c | 19 ++++++++++--------- - bgpd/bgp_attr.h | 1 + - bgpd/bgp_packet.c | 7 ++++++- - 3 files changed, 17 insertions(+), 10 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index 1473dc772502..75aa2ac7cce6 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -3399,15 +3399,6 @@ static int bgp_attr_check(struct peer *peer, struct attr *attr, - !length) - return BGP_ATTR_PARSE_WITHDRAW; - -- /* "An UPDATE message that contains the MP_UNREACH_NLRI is not required -- to carry any other path attributes.", though if MP_REACH_NLRI or NLRI -- are present, it should. Check for any other attribute being present -- instead. -- */ -- if ((!CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MP_REACH_NLRI)) && -- CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MP_UNREACH_NLRI)))) -- return BGP_ATTR_PARSE_PROCEED; -- - if (!CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_ORIGIN))) - type = BGP_ATTR_ORIGIN; - -@@ -3426,6 +3417,16 @@ static int bgp_attr_check(struct peer *peer, struct attr *attr, - && !CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_LOCAL_PREF))) - type = BGP_ATTR_LOCAL_PREF; - -+ /* An UPDATE message that contains the MP_UNREACH_NLRI is not required -+ * to carry any other path attributes. Though if MP_REACH_NLRI or NLRI -+ * are present, it should. Check for any other attribute being present -+ * instead. -+ */ -+ if (!CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MP_REACH_NLRI)) && -+ CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MP_UNREACH_NLRI))) -+ return type ? BGP_ATTR_PARSE_MISSING_MANDATORY -+ : BGP_ATTR_PARSE_PROCEED; -+ - /* If any of the well-known mandatory attributes are not present - * in an UPDATE message, then "treat-as-withdraw" MUST be used. - */ -diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h -index fc347e7a1b4b..d30155e6dba0 100644 ---- a/bgpd/bgp_attr.h -+++ b/bgpd/bgp_attr.h -@@ -364,6 +364,7 @@ enum bgp_attr_parse_ret { - /* only used internally, send notify + convert to BGP_ATTR_PARSE_ERROR - */ - BGP_ATTR_PARSE_ERROR_NOTIFYPLS = -3, -+ BGP_ATTR_PARSE_MISSING_MANDATORY = -4, - }; - - struct bpacket_attr_vec_arr; -diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c -index a7514a26aa64..5dc35157ebf6 100644 ---- a/bgpd/bgp_packet.c -+++ b/bgpd/bgp_packet.c -@@ -2359,7 +2359,12 @@ static int bgp_update_receive(struct peer_connection *connection, - /* Network Layer Reachability Information. */ - update_len = end - stream_pnt(s); - -- if (update_len && attribute_len) { -+ /* If we received MP_UNREACH_NLRI attribute, but also NLRIs, then -+ * NLRIs should be handled as a new data. Though, if we received -+ * NLRIs without mandatory attributes, they should be ignored. -+ */ -+ if (update_len && attribute_len && -+ attr_parse_ret != BGP_ATTR_PARSE_MISSING_MANDATORY) { - /* Set NLRI portion to structure. */ - nlris[NLRI_UPDATE].afi = AFI_IP; - nlris[NLRI_UPDATE].safi = SAFI_UNICAST; --- -2.42.1 - diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47235.patch b/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47235.patch deleted file mode 100644 index b06ba94a34..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2023-47235.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 6814f2e0138a6ea5e1f83bdd9085d9a77999900b Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Fri, 27 Oct 2023 11:56:45 +0300 -Subject: [PATCH] bgpd: Treat EOR as withdrawn to avoid unwanted handling of - malformed attrs - -Treat-as-withdraw, otherwise if we just ignore it, we will pass it to be -processed as a normal UPDATE without mandatory attributes, that could lead -to harmful behavior. In this case, a crash for route-maps with the configuration -such as: - -``` -router bgp 65001 - no bgp ebgp-requires-policy - neighbor 127.0.0.1 remote-as external - neighbor 127.0.0.1 passive - neighbor 127.0.0.1 ebgp-multihop - neighbor 127.0.0.1 disable-connected-check - neighbor 127.0.0.1 update-source 127.0.0.2 - neighbor 127.0.0.1 timers 3 90 - neighbor 127.0.0.1 timers connect 1 - ! - address-family ipv4 unicast - neighbor 127.0.0.1 addpath-tx-all-paths - neighbor 127.0.0.1 default-originate - neighbor 127.0.0.1 route-map RM_IN in - exit-address-family -exit -! -route-map RM_IN permit 10 - set as-path prepend 200 -exit -``` - -Send a malformed optional transitive attribute: - -``` -import socket -import time - -OPEN = (b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" -b"\xff\xff\x00\x62\x01\x04\xfd\xea\x00\x5a\x0a\x00\x00\x01\x45\x02" -b"\x06\x01\x04\x00\x01\x00\x01\x02\x02\x02\x00\x02\x02\x46\x00\x02" -b"\x06\x41\x04\x00\x00\xfd\xea\x02\x02\x06\x00\x02\x06\x45\x04\x00" -b"\x01\x01\x03\x02\x0e\x49\x0c\x0a\x64\x6f\x6e\x61\x74\x61\x73\x2d" -b"\x70\x63\x00\x02\x04\x40\x02\x00\x78\x02\x09\x47\x07\x00\x01\x01" -b"\x80\x00\x00\x00") - -KEEPALIVE = (b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" -b"\xff\xff\xff\xff\xff\xff\x00\x13\x04") - -UPDATE = bytearray.fromhex("ffffffffffffffffffffffffffffffff002b0200000003c0ff00010100eb00ac100b0b001ad908ac100b0b") - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -s.connect(('127.0.0.2', 179)) -s.send(OPEN) -data = s.recv(1024) -s.send(KEEPALIVE) -data = s.recv(1024) -s.send(UPDATE) -data = s.recv(1024) -time.sleep(100) -s.close() -``` - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/6814f2e0138a6ea5e1f83bdd9085d9a77999900b] -CVE: CVE-2023-47235 -Signed-off-by: Jonas Gorski ---- - bgpd/bgp_attr.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index cf2dbe65b805..1473dc772502 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -3391,10 +3391,13 @@ static int bgp_attr_check(struct peer *peer, struct attr *attr, - uint8_t type = 0; - - /* BGP Graceful-Restart End-of-RIB for IPv4 unicast is signaled as an -- * empty UPDATE. */ -+ * empty UPDATE. Treat-as-withdraw, otherwise if we just ignore it, -+ * we will pass it to be processed as a normal UPDATE without mandatory -+ * attributes, that could lead to harmful behavior. -+ */ - if (CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV) && !attr->flag && - !length) -- return BGP_ATTR_PARSE_PROCEED; -+ return BGP_ATTR_PARSE_WITHDRAW; - - /* "An UPDATE message that contains the MP_UNREACH_NLRI is not required - to carry any other path attributes.", though if MP_REACH_NLRI or NLRI -@@ -3889,7 +3892,13 @@ done: - aspath_unintern(&as4_path); - - transit = bgp_attr_get_transit(attr); -- if (ret != BGP_ATTR_PARSE_ERROR) { -+ /* If we received an UPDATE with mandatory attributes, then -+ * the unrecognized transitive optional attribute of that -+ * path MUST be passed. Otherwise, it's an error, and from -+ * security perspective it might be very harmful if we continue -+ * here with the unrecognized attributes. -+ */ -+ if (ret == BGP_ATTR_PARSE_PROCEED) { - /* Finally intern unknown attribute. */ - if (transit) - bgp_attr_set_transit(attr, transit_intern(transit)); --- -2.42.1 - diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.0.1.bb b/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.0.1.bb deleted file mode 100644 index c447df0512..0000000000 --- a/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.0.1.bb +++ /dev/null @@ -1,134 +0,0 @@ -SUMMARY = "BGP/OSPF/RIP routing daemon" -DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ -and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ -and VRRP, with alpha support for EIGRP and NHRP." -HOMEPAGE = "https://frrouting.org/" -SECTION = "net" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" - -PR = "r1" - -SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.0 \ - file://frr.pam \ - file://0001-tools-make-quiet-actually-suppress-output.patch \ - file://CVE-2023-46752.patch \ - file://CVE-2023-46753.patch \ - file://CVE-2023-47235.patch \ - file://CVE-2023-47234.patch \ - " - -SRCREV = "31ed3dd753d62b5d8916998bc32814007e91364b" - -UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P\d+(\.\d+)+)$" - -CVE_PRODUCT = "frrouting" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep python3native pkgconfig useradd systemd - -DEPENDS:class-native = "bison-native elfutils-native" -DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c" - -RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG:class-native = "" - -PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" -PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" -PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" -PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" -PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" -PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" -PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" -PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" -PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" - -EXTRA_OECONF:class-native = "--enable-clippy-only" - -EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \ - --sysconfdir=${sysconfdir}/frr \ - --localstatedir=${localstatedir}/run/frr \ - --enable-vtysh \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --disable-doc \ - --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ - " - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" - -# https://github.com/FRRouting/frr/issues/14469 -DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" - -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:mipsel = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "frr.service" -SYSTEMD_AUTO_ENABLE = "disable" - -do_compile:prepend () { - sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ - -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h -} - -do_compile:class-native () { - oe_runmake clippy-only -} - -do_install:class-native () { - install -d ${D}${libdir} - install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy -} - -do_install:append:class-target () { - install -m 0755 -d ${D}${sysconfdir}/frr - install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ - chown frr:frrvty ${D}${sysconfdir}/frr - chown frr:frr ${D}${sysconfdir}/frr/* - chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf - chmod 640 ${D}${sysconfdir}/frr/* - - if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then - install -d ${D}/${sysconfdir}/pam.d - install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr - - install -d ${D}${sysconfdir}/default/volatiles - echo "d frr frr 0755 ${localstatedir}/run/frr none" \ - > ${D}${sysconfdir}/default/volatiles/99_frr - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} - - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/frr 0755 frr frr -" \ - > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi -} - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" -USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" - -FILES:${PN} += "${datadir}/yang" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb b/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb new file mode 100644 index 0000000000..9db6710d9c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb @@ -0,0 +1,129 @@ +SUMMARY = "BGP/OSPF/RIP routing daemon" +DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ +and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ +and VRRP, with alpha support for EIGRP and NHRP." +HOMEPAGE = "https://frrouting.org/" +SECTION = "net" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" + +PR = "r1" + +SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ + file://frr.pam \ + " + +SRCREV = "312faf8008bb4f3b9e84b8e2758cd2cbdf5742b5" + +UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P\d+(\.\d+)+)$" + +CVE_PRODUCT = "frrouting" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep python3native pkgconfig useradd systemd + +DEPENDS:class-native = "bison-native elfutils-native" +DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c" + +RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG:class-native = "" + +PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" +PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" +PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" +PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" +PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" +PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" +PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" +PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" +PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" + +EXTRA_OECONF:class-native = "--enable-clippy-only" + +EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \ + --sysconfdir=${sysconfdir}/frr \ + --localstatedir=${localstatedir}/run/frr \ + --enable-vtysh \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --disable-doc \ + --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ + " + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +# https://github.com/FRRouting/frr/issues/14469 +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" + +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "frr.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_compile:prepend () { + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h +} + +do_compile:class-native () { + oe_runmake clippy-only +} + +do_install:class-native () { + install -d ${D}${libdir} + install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy +} + +do_install:append:class-target () { + install -m 0755 -d ${D}${sysconfdir}/frr + install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ + chown frr:frrvty ${D}${sysconfdir}/frr + chown frr:frr ${D}${sysconfdir}/frr/* + chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf + chmod 640 ${D}${sysconfdir}/frr/* + + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + install -d ${D}/${sysconfdir}/pam.d + install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr + + install -d ${D}${sysconfdir}/default/volatiles + echo "d frr frr 0755 ${localstatedir}/run/frr none" \ + > ${D}${sysconfdir}/default/volatiles/99_frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} + + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/frr 0755 frr frr -" \ + > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi +} + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" +USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" + +FILES:${PN} += "${datadir}/yang" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-networking/recipes-support/spice/libcacard_2.8.1.bb b/meta-openembedded/meta-networking/recipes-support/spice/libcacard_2.8.1.bb index c81322e680..65f2f80ace 100644 --- a/meta-openembedded/meta-networking/recipes-support/spice/libcacard_2.8.1.bb +++ b/meta-openembedded/meta-networking/recipes-support/spice/libcacard_2.8.1.bb @@ -11,3 +11,7 @@ SRC_URI = "git://gitlab.freedesktop.org/spice/libcacard.git;protocol=https;branc S = "${WORKDIR}/git" inherit meson pkgconfig + +do_configure:prepend() { + echo ${PV} > ${S}/.tarball-version +} diff --git a/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb b/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb index 3d34f222d0..82ce7067d9 100644 --- a/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb +++ b/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb @@ -52,6 +52,10 @@ GTKDOC_MESON_OPTION = 'gtk_doc' GTKDOC_MESON_ENABLE_FLAG = 'enabled' GTKDOC_MESON_DISABLE_FLAG = 'disabled' +do_configure:prepend() { + echo ${PV} > ${S}/.tarball-version +} + PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)} smartcard" PACKAGECONFIG[vapi] = "-Dvapi=enabled,-Dvapi=disabled" PACKAGECONFIG[smartcard] = "-Dsmartcard=enabled,-Dsmartcard=disabled,libcacard" diff --git a/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb b/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb index a1f3010dd1..419316a26e 100644 --- a/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb +++ b/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb @@ -30,6 +30,10 @@ DEPENDS:append:class-nativesdk = " nativesdk-openssl" export PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3" +do_configure:prepend() { + echo ${PV} > ${S}/.tarball-version +} + PACKAGECONFIG:class-native = "" PACKAGECONFIG:class-nativesdk = "" PACKAGECONFIG ?= "sasl opus smartcard gstreamer" 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 33aff7f442..9182acf449 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 @@ -31,7 +31,6 @@ PTESTS_FAST_META_OE = "\ nlohmann-json \ nodejs \ onig \ - poco \ protobuf \ sdbus-c++ \ uthash \ @@ -51,6 +50,7 @@ PTESTS_SLOW_META_OE = "\ libusb-compat \ rsyslog \ mariadb \ + poco \ re2 \ " PTESTS_SLOW_META_OE:append:x86 = " kernel-selftest" diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.2.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.2.bb deleted file mode 100644 index 52bcffe713..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.2.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management" -DESCRIPTION = "\ -The Thingsboard IoT Gateway is an open-source solution that allows you \ -to integrate devices connected to legacy and third-party systems with Thingsboard." -HOMEPAGE = "https://thingsboard.io/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI[sha256sum] = "a54953c53c0ee72a1aa270bc018db7cc853f56ca29e2c98938ff4138109fd41a" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "thingsboard-gateway" - -RDEPENDS:${PN} += " python3-jsonpath-rw \ - python3-regex \ - python3-paho-mqtt \ - python3-pyyaml \ - python3-simplejson \ - python3-requests \ - python3-pip \ - python3-pyrsistent \ -" - -SRC_URI += "file://bacnet.json \ - file://ble.json \ - file://can.json \ - file://custom_serial.json \ - file://modbus.json \ - file://modbus_serial.json \ - file://mqtt.json \ - file://opcua.json \ - file://odbc.json \ - file://request.json \ - file://rest.json \ - file://snmp.json \ - file://tb_gateway.yaml \ - file://logs.conf \ - file://thingsboard-gateway.service \ - " - - -inherit systemd - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service" - -FILES:${PN} += "/etc \ - /lib \ - /usr \ -" - -do_install:append(){ - - install -d ${D}${sysconfdir}/thingsboard-gateway/config - - for file in $(find ${WORKDIR} -maxdepth 1 -type f -name *.json); do - install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config - done - - install -m 0644 ${WORKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config - install -m 0644 ${WORKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/thingsboard-gateway.service ${D}${systemd_system_unitdir}/thingsboard-gateway.service -} diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.3.1.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.3.1.bb new file mode 100644 index 0000000000..868887a47f --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.3.1.bb @@ -0,0 +1,67 @@ +SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management" +DESCRIPTION = "\ +The Thingsboard IoT Gateway is an open-source solution that allows you \ +to integrate devices connected to legacy and third-party systems with Thingsboard." +HOMEPAGE = "https://thingsboard.io/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI[sha256sum] = "52e9aa97b39a3309ba5f3a2e0dc127ebe04cadfefc8eb57222a9ebd32e8faa16" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "thingsboard-gateway" + +RDEPENDS:${PN} += " python3-jsonpath-rw \ + python3-regex \ + python3-paho-mqtt \ + python3-pyyaml \ + python3-simplejson \ + python3-requests \ + python3-pip \ + python3-pyrsistent \ +" + +SRC_URI += "file://bacnet.json \ + file://ble.json \ + file://can.json \ + file://custom_serial.json \ + file://modbus.json \ + file://modbus_serial.json \ + file://mqtt.json \ + file://opcua.json \ + file://odbc.json \ + file://request.json \ + file://rest.json \ + file://snmp.json \ + file://tb_gateway.yaml \ + file://logs.conf \ + file://thingsboard-gateway.service \ + " + + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service" + +FILES:${PN} += "/etc \ + /lib \ + /usr \ +" + +do_install:append(){ + + install -d ${D}${sysconfdir}/thingsboard-gateway/config + + for file in $(find ${WORKDIR} -maxdepth 1 -type f -name *.json); do + install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config + done + + install -m 0644 ${WORKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config + install -m 0644 ${WORKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/thingsboard-gateway.service ${D}${systemd_system_unitdir}/thingsboard-gateway.service +} diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0001-Fio-3.31.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0001-Fio-3.31.patch deleted file mode 100644 index 9b8b7d02e3..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0001-Fio-3.31.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 6cafe8445fd1e04e5f7d67bbc73029a538d1b253 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Tue, 9 Aug 2022 14:41:25 -0600 -Subject: [PATCH] Fio 3.31 - -Signed-off-by: Jens Axboe ---- - FIO-VERSION-GEN | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/FIO-VERSION-GEN b/FIO-VERSION-GEN -index fa64f50f..72630dd0 100755 ---- a/FIO-VERSION-GEN -+++ b/FIO-VERSION-GEN -@@ -1,7 +1,7 @@ - #!/bin/sh - - GVF=FIO-VERSION-FILE --DEF_VER=fio-3.30 -+DEF_VER=fio-3.31 - - LF=' - ' diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0002-lib-rand-Enhance-__fill_random_buf-using-the-multi-r.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0002-lib-rand-Enhance-__fill_random_buf-using-the-multi-r.patch deleted file mode 100644 index 16506566c2..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0002-lib-rand-Enhance-__fill_random_buf-using-the-multi-r.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 40ba7a05de6a08cfd382b116f76dbeaa7237df45 Mon Sep 17 00:00:00 2001 -From: Sungup Moon -Date: Mon, 8 Aug 2022 17:21:46 +0900 -Subject: [PATCH] lib/rand: Enhance __fill_random_buf using the multi random - seed - -The __fill_random_buf fills a buffer using the random 8byte integer to -write. But, this mechanism is depend on the CPU performance and could -not reach the max performance on the PCIe Gen5 devices. I have tested -128KB single worker sequential write on PCIe Gen5 NVMe, but it cannot -reach write throughput 6.0GB/s. - -So, I have reviewed the __fill_random_buf and focused the multiplier -dependency to generate the random number. So, I have changed -__fill_random_buf using the multiple-random-seed to reduce the -dependencies in the small data filling loop. - -I'll attach detail analysis result in the PR of this branch. - -Signed-off-by: Sungup Moon ---- - configure | 17 +++++++++++++++++ - lib/rand.c | 37 ++++++++++++++++++++++++++++++++++++- - 2 files changed, 53 insertions(+), 1 deletion(-) - -diff --git a/configure b/configure -index 36450df8..a2b9bd4c 100755 ---- a/configure -+++ b/configure -@@ -116,6 +116,10 @@ has() { - type "$1" >/dev/null 2>&1 - } - -+num() { -+ echo "$1" | grep -P -q "^[0-9]+$" -+} -+ - check_define() { - cat > $TMPC <> $config_host_h -+print_config "seed_buckets" "$seed_buckets" - - echo "LIBS+=$LIBS" >> $config_host_mak - echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak -diff --git a/lib/rand.c b/lib/rand.c -index 1e669116..1ce4a849 100644 ---- a/lib/rand.c -+++ b/lib/rand.c -@@ -95,7 +95,7 @@ void init_rand_seed(struct frand_state *state, uint64_t seed, bool use64) - __init_rand64(&state->state64, seed); - } - --void __fill_random_buf(void *buf, unsigned int len, uint64_t seed) -+void __fill_random_buf_small(void *buf, unsigned int len, uint64_t seed) - { - uint64_t *b = buf; - uint64_t *e = b + len / sizeof(*b); -@@ -110,6 +110,41 @@ void __fill_random_buf(void *buf, unsigned int len, uint64_t seed) - __builtin_memcpy(e, &seed, rest); - } - -+void __fill_random_buf(void *buf, unsigned int len, uint64_t seed) -+{ -+#define MAX_SEED_BUCKETS 16 -+ static uint64_t prime[MAX_SEED_BUCKETS] = {1, 2, 3, 5, -+ 7, 11, 13, 17, -+ 19, 23, 29, 31, -+ 37, 41, 43, 47}; -+ -+ uint64_t *b, *e, s[CONFIG_SEED_BUCKETS]; -+ unsigned int rest; -+ int p; -+ -+ /* -+ * Calculate the max index which is multiples of the seed buckets. -+ */ -+ rest = (len / sizeof(*b) / CONFIG_SEED_BUCKETS) * CONFIG_SEED_BUCKETS; -+ -+ b = buf; -+ e = b + rest; -+ -+ rest = len - (rest * sizeof(*b)); -+ -+ for (p = 0; p < CONFIG_SEED_BUCKETS; p++) -+ s[p] = seed * prime[p]; -+ -+ for (; b != e; b += CONFIG_SEED_BUCKETS) { -+ for (p = 0; p < CONFIG_SEED_BUCKETS; ++p) { -+ b[p] = s[p]; -+ s[p] = __hash_u64(s[p]); -+ } -+ } -+ -+ __fill_random_buf_small(b, rest, s[0]); -+} -+ - uint64_t fill_random_buf(struct frand_state *fs, void *buf, - unsigned int len) - { diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch deleted file mode 100644 index fc4af0a519..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f4dd3f2ad435a75862ad3f34a661b169f72c7885 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Wed, 10 Aug 2022 09:51:49 -0600 -Subject: [PATCH] lib/rand: get rid of unused MAX_SEED_BUCKETS - -It's only used to size the array, we don't need it. - -Signed-off-by: Jens Axboe ---- - lib/rand.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/lib/rand.c b/lib/rand.c -index 1ce4a849..0e787a62 100644 ---- a/lib/rand.c -+++ b/lib/rand.c -@@ -112,12 +112,8 @@ void __fill_random_buf_small(void *buf, unsigned int len, uint64_t seed) - - void __fill_random_buf(void *buf, unsigned int len, uint64_t seed) - { --#define MAX_SEED_BUCKETS 16 -- static uint64_t prime[MAX_SEED_BUCKETS] = {1, 2, 3, 5, -- 7, 11, 13, 17, -- 19, 23, 29, 31, -- 37, 41, 43, 47}; -- -+ static uint64_t prime[] = {1, 2, 3, 5, 7, 11, 13, 17, -+ 19, 23, 29, 31, 37, 41, 43, 47}; - uint64_t *b, *e, s[CONFIG_SEED_BUCKETS]; - unsigned int rest; - int p; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0004-ioengines-merge-filecreate-filestat-filedelete-engin.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0004-ioengines-merge-filecreate-filestat-filedelete-engin.patch deleted file mode 100644 index 1b59ad304c..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0004-ioengines-merge-filecreate-filestat-filedelete-engin.patch +++ /dev/null @@ -1,800 +0,0 @@ -From 1cfbaff9806f17c2afbabe79c1c87b96eba7f35a Mon Sep 17 00:00:00 2001 -From: "Friendy.Su@sony.com" -Date: Mon, 8 Aug 2022 08:35:50 +0000 -Subject: [PATCH] ioengines: merge filecreate, filestat, filedelete engines to - fileoperations.c - -file operation engines have similar structure, implement them -in one file. - -Signed-off-by: friendy-su ---- - Makefile | 2 +- - engines/filecreate.c | 118 --------------- - engines/filedelete.c | 115 -------------- - engines/fileoperations.c | 318 +++++++++++++++++++++++++++++++++++++++ - engines/filestat.c | 190 ----------------------- - 5 files changed, 319 insertions(+), 424 deletions(-) - delete mode 100644 engines/filecreate.c - delete mode 100644 engines/filedelete.c - create mode 100644 engines/fileoperations.c - delete mode 100644 engines/filestat.c - -diff --git a/Makefile b/Makefile -index 188a74d7..634d2c93 100644 ---- a/Makefile -+++ b/Makefile -@@ -56,7 +56,7 @@ SOURCE := $(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \ - pshared.c options.c \ - smalloc.c filehash.c profile.c debug.c engines/cpu.c \ - engines/mmap.c engines/sync.c engines/null.c engines/net.c \ -- engines/ftruncate.c engines/filecreate.c engines/filestat.c engines/filedelete.c \ -+ engines/ftruncate.c engines/fileoperations.c \ - engines/exec.c \ - server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \ - gettime-thread.c helpers.c json.c idletime.c td_error.c \ -diff --git a/engines/filecreate.c b/engines/filecreate.c -deleted file mode 100644 -index 7884752d..00000000 ---- a/engines/filecreate.c -+++ /dev/null -@@ -1,118 +0,0 @@ --/* -- * filecreate engine -- * -- * IO engine that doesn't do any IO, just creates files and tracks the latency -- * of the file creation. -- */ --#include --#include --#include -- --#include "../fio.h" -- --struct fc_data { -- enum fio_ddir stat_ddir; --}; -- --static int open_file(struct thread_data *td, struct fio_file *f) --{ -- struct timespec start; -- int do_lat = !td->o.disable_lat; -- -- dprint(FD_FILE, "fd open %s\n", f->file_name); -- -- if (f->filetype != FIO_TYPE_FILE) { -- log_err("fio: only files are supported\n"); -- return 1; -- } -- if (!strcmp(f->file_name, "-")) { -- log_err("fio: can't read/write to stdin/out\n"); -- return 1; -- } -- -- if (do_lat) -- fio_gettime(&start, NULL); -- -- f->fd = open(f->file_name, O_CREAT|O_RDWR, 0600); -- -- if (f->fd == -1) { -- char buf[FIO_VERROR_SIZE]; -- int e = errno; -- -- snprintf(buf, sizeof(buf), "open(%s)", f->file_name); -- td_verror(td, e, buf); -- return 1; -- } -- -- if (do_lat) { -- struct fc_data *data = td->io_ops_data; -- uint64_t nsec; -- -- nsec = ntime_since_now(&start); -- add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -- } -- -- return 0; --} -- --static enum fio_q_status queue_io(struct thread_data *td, -- struct io_u fio_unused *io_u) --{ -- return FIO_Q_COMPLETED; --} -- --/* -- * Ensure that we at least have a block size worth of IO to do for each -- * file. If the job file has td->o.size < nr_files * block_size, then -- * fio won't do anything. -- */ --static int get_file_size(struct thread_data *td, struct fio_file *f) --{ -- f->real_file_size = td_min_bs(td); -- return 0; --} -- --static int init(struct thread_data *td) --{ -- struct fc_data *data; -- -- data = calloc(1, sizeof(*data)); -- -- if (td_read(td)) -- data->stat_ddir = DDIR_READ; -- else if (td_write(td)) -- data->stat_ddir = DDIR_WRITE; -- -- td->io_ops_data = data; -- return 0; --} -- --static void cleanup(struct thread_data *td) --{ -- struct fc_data *data = td->io_ops_data; -- -- free(data); --} -- --static struct ioengine_ops ioengine = { -- .name = "filecreate", -- .version = FIO_IOOPS_VERSION, -- .init = init, -- .cleanup = cleanup, -- .queue = queue_io, -- .get_file_size = get_file_size, -- .open_file = open_file, -- .close_file = generic_close_file, -- .flags = FIO_DISKLESSIO | FIO_SYNCIO | FIO_FAKEIO | -- FIO_NOSTATS | FIO_NOFILEHASH, --}; -- --static void fio_init fio_filecreate_register(void) --{ -- register_ioengine(&ioengine); --} -- --static void fio_exit fio_filecreate_unregister(void) --{ -- unregister_ioengine(&ioengine); --} -diff --git a/engines/filedelete.c b/engines/filedelete.c -deleted file mode 100644 -index df388ac9..00000000 ---- a/engines/filedelete.c -+++ /dev/null -@@ -1,115 +0,0 @@ --/* -- * file delete engine -- * -- * IO engine that doesn't do any IO, just delete files and track the latency -- * of the file deletion. -- */ --#include --#include --#include --#include --#include --#include "../fio.h" -- --struct fc_data { -- enum fio_ddir stat_ddir; --}; -- --static int delete_file(struct thread_data *td, struct fio_file *f) --{ -- struct timespec start; -- int do_lat = !td->o.disable_lat; -- int ret; -- -- dprint(FD_FILE, "fd delete %s\n", f->file_name); -- -- if (f->filetype != FIO_TYPE_FILE) { -- log_err("fio: only files are supported\n"); -- return 1; -- } -- if (!strcmp(f->file_name, "-")) { -- log_err("fio: can't read/write to stdin/out\n"); -- return 1; -- } -- -- if (do_lat) -- fio_gettime(&start, NULL); -- -- ret = unlink(f->file_name); -- -- if (ret == -1) { -- char buf[FIO_VERROR_SIZE]; -- int e = errno; -- -- snprintf(buf, sizeof(buf), "delete(%s)", f->file_name); -- td_verror(td, e, buf); -- return 1; -- } -- -- if (do_lat) { -- struct fc_data *data = td->io_ops_data; -- uint64_t nsec; -- -- nsec = ntime_since_now(&start); -- add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -- } -- -- return 0; --} -- -- --static enum fio_q_status queue_io(struct thread_data *td, struct io_u fio_unused *io_u) --{ -- return FIO_Q_COMPLETED; --} -- --static int init(struct thread_data *td) --{ -- struct fc_data *data; -- -- data = calloc(1, sizeof(*data)); -- -- if (td_read(td)) -- data->stat_ddir = DDIR_READ; -- else if (td_write(td)) -- data->stat_ddir = DDIR_WRITE; -- -- td->io_ops_data = data; -- return 0; --} -- --static int delete_invalidate(struct thread_data *td, struct fio_file *f) --{ -- /* do nothing because file not opened */ -- return 0; --} -- --static void cleanup(struct thread_data *td) --{ -- struct fc_data *data = td->io_ops_data; -- -- free(data); --} -- --static struct ioengine_ops ioengine = { -- .name = "filedelete", -- .version = FIO_IOOPS_VERSION, -- .init = init, -- .invalidate = delete_invalidate, -- .cleanup = cleanup, -- .queue = queue_io, -- .get_file_size = generic_get_file_size, -- .open_file = delete_file, -- .flags = FIO_SYNCIO | FIO_FAKEIO | -- FIO_NOSTATS | FIO_NOFILEHASH, --}; -- --static void fio_init fio_filedelete_register(void) --{ -- register_ioengine(&ioengine); --} -- --static void fio_exit fio_filedelete_unregister(void) --{ -- unregister_ioengine(&ioengine); --} -diff --git a/engines/fileoperations.c b/engines/fileoperations.c -new file mode 100644 -index 00000000..1db60da1 ---- /dev/null -+++ b/engines/fileoperations.c -@@ -0,0 +1,318 @@ -+/* -+ * fileoperations engine -+ * -+ * IO engine that doesn't do any IO, just operates files and tracks the latency -+ * of the file operation. -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "../fio.h" -+#include "../optgroup.h" -+#include "../oslib/statx.h" -+ -+ -+struct fc_data { -+ enum fio_ddir stat_ddir; -+}; -+ -+struct filestat_options { -+ void *pad; -+ unsigned int stat_type; -+}; -+ -+enum { -+ FIO_FILESTAT_STAT = 1, -+ FIO_FILESTAT_LSTAT = 2, -+ FIO_FILESTAT_STATX = 3, -+}; -+ -+static struct fio_option options[] = { -+ { -+ .name = "stat_type", -+ .lname = "stat_type", -+ .type = FIO_OPT_STR, -+ .off1 = offsetof(struct filestat_options, stat_type), -+ .help = "Specify stat system call type to measure lookup/getattr performance", -+ .def = "stat", -+ .posval = { -+ { .ival = "stat", -+ .oval = FIO_FILESTAT_STAT, -+ .help = "Use stat(2)", -+ }, -+ { .ival = "lstat", -+ .oval = FIO_FILESTAT_LSTAT, -+ .help = "Use lstat(2)", -+ }, -+ { .ival = "statx", -+ .oval = FIO_FILESTAT_STATX, -+ .help = "Use statx(2) if exists", -+ }, -+ }, -+ .category = FIO_OPT_C_ENGINE, -+ .group = FIO_OPT_G_FILESTAT, -+ }, -+ { -+ .name = NULL, -+ }, -+}; -+ -+ -+static int open_file(struct thread_data *td, struct fio_file *f) -+{ -+ struct timespec start; -+ int do_lat = !td->o.disable_lat; -+ -+ dprint(FD_FILE, "fd open %s\n", f->file_name); -+ -+ if (f->filetype != FIO_TYPE_FILE) { -+ log_err("fio: only files are supported\n"); -+ return 1; -+ } -+ if (!strcmp(f->file_name, "-")) { -+ log_err("fio: can't read/write to stdin/out\n"); -+ return 1; -+ } -+ -+ if (do_lat) -+ fio_gettime(&start, NULL); -+ -+ f->fd = open(f->file_name, O_CREAT|O_RDWR, 0600); -+ -+ if (f->fd == -1) { -+ char buf[FIO_VERROR_SIZE]; -+ int e = errno; -+ -+ snprintf(buf, sizeof(buf), "open(%s)", f->file_name); -+ td_verror(td, e, buf); -+ return 1; -+ } -+ -+ if (do_lat) { -+ struct fc_data *data = td->io_ops_data; -+ uint64_t nsec; -+ -+ nsec = ntime_since_now(&start); -+ add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -+ } -+ -+ return 0; -+} -+ -+static int stat_file(struct thread_data *td, struct fio_file *f) -+{ -+ struct filestat_options *o = td->eo; -+ struct timespec start; -+ int do_lat = !td->o.disable_lat; -+ struct stat statbuf; -+#ifndef WIN32 -+ struct statx statxbuf; -+ char *abspath; -+#endif -+ int ret; -+ -+ dprint(FD_FILE, "fd stat %s\n", f->file_name); -+ -+ if (f->filetype != FIO_TYPE_FILE) { -+ log_err("fio: only files are supported\n"); -+ return 1; -+ } -+ if (!strcmp(f->file_name, "-")) { -+ log_err("fio: can't read/write to stdin/out\n"); -+ return 1; -+ } -+ -+ if (do_lat) -+ fio_gettime(&start, NULL); -+ -+ switch (o->stat_type) { -+ case FIO_FILESTAT_STAT: -+ ret = stat(f->file_name, &statbuf); -+ break; -+ case FIO_FILESTAT_LSTAT: -+ ret = lstat(f->file_name, &statbuf); -+ break; -+ case FIO_FILESTAT_STATX: -+#ifndef WIN32 -+ abspath = realpath(f->file_name, NULL); -+ if (abspath) { -+ ret = statx(-1, abspath, 0, STATX_ALL, &statxbuf); -+ free(abspath); -+ } else -+ ret = -1; -+#else -+ ret = -1; -+#endif -+ break; -+ default: -+ ret = -1; -+ break; -+ } -+ -+ if (ret == -1) { -+ char buf[FIO_VERROR_SIZE]; -+ int e = errno; -+ -+ snprintf(buf, sizeof(buf), "stat(%s) type=%u", f->file_name, -+ o->stat_type); -+ td_verror(td, e, buf); -+ return 1; -+ } -+ -+ if (do_lat) { -+ struct fc_data *data = td->io_ops_data; -+ uint64_t nsec; -+ -+ nsec = ntime_since_now(&start); -+ add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -+ } -+ -+ return 0; -+} -+ -+ -+static int delete_file(struct thread_data *td, struct fio_file *f) -+{ -+ struct timespec start; -+ int do_lat = !td->o.disable_lat; -+ int ret; -+ -+ dprint(FD_FILE, "fd delete %s\n", f->file_name); -+ -+ if (f->filetype != FIO_TYPE_FILE) { -+ log_err("fio: only files are supported\n"); -+ return 1; -+ } -+ if (!strcmp(f->file_name, "-")) { -+ log_err("fio: can't read/write to stdin/out\n"); -+ return 1; -+ } -+ -+ if (do_lat) -+ fio_gettime(&start, NULL); -+ -+ ret = unlink(f->file_name); -+ -+ if (ret == -1) { -+ char buf[FIO_VERROR_SIZE]; -+ int e = errno; -+ -+ snprintf(buf, sizeof(buf), "delete(%s)", f->file_name); -+ td_verror(td, e, buf); -+ return 1; -+ } -+ -+ if (do_lat) { -+ struct fc_data *data = td->io_ops_data; -+ uint64_t nsec; -+ -+ nsec = ntime_since_now(&start); -+ add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -+ } -+ -+ return 0; -+} -+ -+static int invalidate_do_nothing(struct thread_data *td, struct fio_file *f) -+{ -+ /* do nothing because file not opened */ -+ return 0; -+} -+ -+static enum fio_q_status queue_io(struct thread_data *td, struct io_u *io_u) -+{ -+ return FIO_Q_COMPLETED; -+} -+ -+/* -+ * Ensure that we at least have a block size worth of IO to do for each -+ * file. If the job file has td->o.size < nr_files * block_size, then -+ * fio won't do anything. -+ */ -+static int get_file_size(struct thread_data *td, struct fio_file *f) -+{ -+ f->real_file_size = td_min_bs(td); -+ return 0; -+} -+ -+static int init(struct thread_data *td) -+{ -+ struct fc_data *data; -+ -+ data = calloc(1, sizeof(*data)); -+ -+ if (td_read(td)) -+ data->stat_ddir = DDIR_READ; -+ else if (td_write(td)) -+ data->stat_ddir = DDIR_WRITE; -+ -+ td->io_ops_data = data; -+ return 0; -+} -+ -+static void cleanup(struct thread_data *td) -+{ -+ struct fc_data *data = td->io_ops_data; -+ -+ free(data); -+} -+ -+static struct ioengine_ops ioengine_filecreate = { -+ .name = "filecreate", -+ .version = FIO_IOOPS_VERSION, -+ .init = init, -+ .cleanup = cleanup, -+ .queue = queue_io, -+ .get_file_size = get_file_size, -+ .open_file = open_file, -+ .close_file = generic_close_file, -+ .flags = FIO_DISKLESSIO | FIO_SYNCIO | FIO_FAKEIO | -+ FIO_NOSTATS | FIO_NOFILEHASH, -+}; -+ -+static struct ioengine_ops ioengine_filestat = { -+ .name = "filestat", -+ .version = FIO_IOOPS_VERSION, -+ .init = init, -+ .cleanup = cleanup, -+ .queue = queue_io, -+ .invalidate = invalidate_do_nothing, -+ .get_file_size = generic_get_file_size, -+ .open_file = stat_file, -+ .flags = FIO_SYNCIO | FIO_FAKEIO | -+ FIO_NOSTATS | FIO_NOFILEHASH, -+ .options = options, -+ .option_struct_size = sizeof(struct filestat_options), -+}; -+ -+static struct ioengine_ops ioengine_filedelete = { -+ .name = "filedelete", -+ .version = FIO_IOOPS_VERSION, -+ .init = init, -+ .invalidate = invalidate_do_nothing, -+ .cleanup = cleanup, -+ .queue = queue_io, -+ .get_file_size = generic_get_file_size, -+ .open_file = delete_file, -+ .flags = FIO_SYNCIO | FIO_FAKEIO | -+ FIO_NOSTATS | FIO_NOFILEHASH, -+}; -+ -+ -+static void fio_init fio_fileoperations_register(void) -+{ -+ register_ioengine(&ioengine_filecreate); -+ register_ioengine(&ioengine_filestat); -+ register_ioengine(&ioengine_filedelete); -+} -+ -+static void fio_exit fio_fileoperations_unregister(void) -+{ -+ unregister_ioengine(&ioengine_filecreate); -+ unregister_ioengine(&ioengine_filestat); -+ unregister_ioengine(&ioengine_filedelete); -+} -diff --git a/engines/filestat.c b/engines/filestat.c -deleted file mode 100644 -index e587eb54..00000000 ---- a/engines/filestat.c -+++ /dev/null -@@ -1,190 +0,0 @@ --/* -- * filestat engine -- * -- * IO engine that doesn't do any IO, just stat files and tracks the latency -- * of the file stat. -- */ --#include --#include --#include --#include --#include --#include --#include --#include "../fio.h" --#include "../optgroup.h" --#include "../oslib/statx.h" -- --struct fc_data { -- enum fio_ddir stat_ddir; --}; -- --struct filestat_options { -- void *pad; -- unsigned int stat_type; --}; -- --enum { -- FIO_FILESTAT_STAT = 1, -- FIO_FILESTAT_LSTAT = 2, -- FIO_FILESTAT_STATX = 3, --}; -- --static struct fio_option options[] = { -- { -- .name = "stat_type", -- .lname = "stat_type", -- .type = FIO_OPT_STR, -- .off1 = offsetof(struct filestat_options, stat_type), -- .help = "Specify stat system call type to measure lookup/getattr performance", -- .def = "stat", -- .posval = { -- { .ival = "stat", -- .oval = FIO_FILESTAT_STAT, -- .help = "Use stat(2)", -- }, -- { .ival = "lstat", -- .oval = FIO_FILESTAT_LSTAT, -- .help = "Use lstat(2)", -- }, -- { .ival = "statx", -- .oval = FIO_FILESTAT_STATX, -- .help = "Use statx(2) if exists", -- }, -- }, -- .category = FIO_OPT_C_ENGINE, -- .group = FIO_OPT_G_FILESTAT, -- }, -- { -- .name = NULL, -- }, --}; -- --static int stat_file(struct thread_data *td, struct fio_file *f) --{ -- struct filestat_options *o = td->eo; -- struct timespec start; -- int do_lat = !td->o.disable_lat; -- struct stat statbuf; --#ifndef WIN32 -- struct statx statxbuf; -- char *abspath; --#endif -- int ret; -- -- dprint(FD_FILE, "fd stat %s\n", f->file_name); -- -- if (f->filetype != FIO_TYPE_FILE) { -- log_err("fio: only files are supported\n"); -- return 1; -- } -- if (!strcmp(f->file_name, "-")) { -- log_err("fio: can't read/write to stdin/out\n"); -- return 1; -- } -- -- if (do_lat) -- fio_gettime(&start, NULL); -- -- switch (o->stat_type){ -- case FIO_FILESTAT_STAT: -- ret = stat(f->file_name, &statbuf); -- break; -- case FIO_FILESTAT_LSTAT: -- ret = lstat(f->file_name, &statbuf); -- break; -- case FIO_FILESTAT_STATX: --#ifndef WIN32 -- abspath = realpath(f->file_name, NULL); -- if (abspath) { -- ret = statx(-1, abspath, 0, STATX_ALL, &statxbuf); -- free(abspath); -- } else -- ret = -1; --#else -- ret = -1; --#endif -- break; -- default: -- ret = -1; -- break; -- } -- -- if (ret == -1) { -- char buf[FIO_VERROR_SIZE]; -- int e = errno; -- -- snprintf(buf, sizeof(buf), "stat(%s) type=%u", f->file_name, -- o->stat_type); -- td_verror(td, e, buf); -- return 1; -- } -- -- if (do_lat) { -- struct fc_data *data = td->io_ops_data; -- uint64_t nsec; -- -- nsec = ntime_since_now(&start); -- add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0); -- } -- -- return 0; --} -- --static enum fio_q_status queue_io(struct thread_data *td, struct io_u fio_unused *io_u) --{ -- return FIO_Q_COMPLETED; --} -- --static int init(struct thread_data *td) --{ -- struct fc_data *data; -- -- data = calloc(1, sizeof(*data)); -- -- if (td_read(td)) -- data->stat_ddir = DDIR_READ; -- else if (td_write(td)) -- data->stat_ddir = DDIR_WRITE; -- -- td->io_ops_data = data; -- return 0; --} -- --static void cleanup(struct thread_data *td) --{ -- struct fc_data *data = td->io_ops_data; -- -- free(data); --} -- --static int stat_invalidate(struct thread_data *td, struct fio_file *f) --{ -- /* do nothing because file not opened */ -- return 0; --} -- --static struct ioengine_ops ioengine = { -- .name = "filestat", -- .version = FIO_IOOPS_VERSION, -- .init = init, -- .cleanup = cleanup, -- .queue = queue_io, -- .invalidate = stat_invalidate, -- .get_file_size = generic_get_file_size, -- .open_file = stat_file, -- .flags = FIO_SYNCIO | FIO_FAKEIO | -- FIO_NOSTATS | FIO_NOFILEHASH, -- .options = options, -- .option_struct_size = sizeof(struct filestat_options), --}; -- --static void fio_init fio_filestat_register(void) --{ -- register_ioengine(&ioengine); --} -- --static void fio_exit fio_filestat_unregister(void) --{ -- unregister_ioengine(&ioengine); --} diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0005-engines-http-Add-storage-class-option-for-s3.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0005-engines-http-Add-storage-class-option-for-s3.patch deleted file mode 100644 index 587df1adae..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0005-engines-http-Add-storage-class-option-for-s3.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 5b0b5247f0770a89084964274bb951f5a4393299 Mon Sep 17 00:00:00 2001 -From: "Feng, Hualong" -Date: Wed, 20 Jul 2022 12:01:35 +0800 -Subject: [PATCH] engines/http: Add storage class option for s3 - -Amazon S3 offers a range of storage classes that you can choose from -based on the data access, resiliency, and cost requirements of your -workloads. (https://aws.amazon.com/s3/storage-classes/) - -For example, we have **STANDARD** storage class to test normal -workload, and have **COLD** storage class to test the workload -with gzip compression. It is convenient to select which -storage class to access for different kinds data. - -Signed-off-by: Feng, Hualong ---- - engines/http.c | 25 +++++++++++++++++++------ - 1 file changed, 19 insertions(+), 6 deletions(-) - -diff --git a/engines/http.c b/engines/http.c -index 1de9e66c..dbcde287 100644 ---- a/engines/http.c -+++ b/engines/http.c -@@ -57,6 +57,7 @@ struct http_options { - char *s3_key; - char *s3_keyid; - char *s3_region; -+ char *s3_storage_class; - char *swift_auth_token; - int verbose; - unsigned int mode; -@@ -161,6 +162,16 @@ static struct fio_option options[] = { - .category = FIO_OPT_C_ENGINE, - .group = FIO_OPT_G_HTTP, - }, -+ { -+ .name = "http_s3_storage_class", -+ .lname = "S3 Storage class", -+ .type = FIO_OPT_STR_STORE, -+ .help = "S3 Storage Class", -+ .off1 = offsetof(struct http_options, s3_storage_class), -+ .def = "STANDARD", -+ .category = FIO_OPT_C_ENGINE, -+ .group = FIO_OPT_G_HTTP, -+ }, - { - .name = "http_mode", - .lname = "Request mode to use", -@@ -335,8 +346,8 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - char date_iso[32]; - char method[8]; - char dkey[128]; -- char creq[512]; -- char sts[256]; -+ char creq[4096]; -+ char sts[512]; - char s[512]; - char *uri_encoded = NULL; - char *dsha = NULL; -@@ -373,11 +384,12 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - "host:%s\n" - "x-amz-content-sha256:%s\n" - "x-amz-date:%s\n" -+ "x-amz-storage-class:%s\n" - "\n" -- "host;x-amz-content-sha256;x-amz-date\n" -+ "host;x-amz-content-sha256;x-amz-date;x-amz-storage-class\n" - "%s" - , method -- , uri_encoded, o->host, dsha, date_iso, dsha); -+ , uri_encoded, o->host, dsha, date_iso, o->s3_storage_class, dsha); - - csha = _gen_hex_sha256(creq, strlen(creq)); - snprintf(sts, sizeof(sts), "AWS4-HMAC-SHA256\n%s\n%s/%s/%s/%s\n%s", -@@ -400,9 +412,10 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - - snprintf(s, sizeof(s), "x-amz-date: %s", date_iso); - slist = curl_slist_append(slist, s); -- -+ snprintf(s, sizeof(s), "x-amz-storage-class: %s", o->s3_storage_class); -+ slist = curl_slist_append(slist, s); - snprintf(s, sizeof(s), "Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/s3/aws4_request," -- "SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=%s", -+ "SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-storage-class,Signature=%s", - o->s3_keyid, date_short, o->s3_region, signature); - slist = curl_slist_append(slist, s); - diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0006-engines-http-Add-s3-crypto-options-for-s3.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0006-engines-http-Add-s3-crypto-options-for-s3.patch deleted file mode 100644 index d8222c4d1d..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0006-engines-http-Add-s3-crypto-options-for-s3.patch +++ /dev/null @@ -1,246 +0,0 @@ -From d196fda02eb73958c2acd367de650858c6203420 Mon Sep 17 00:00:00 2001 -From: "Feng, Hualong" -Date: Wed, 20 Jul 2022 09:41:35 +0800 -Subject: [PATCH] engines/http: Add s3 crypto options for s3 - -Server-side encryption is about protecting data at rest. -(https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) - -When we want to test server-side encryption, we need to specify -server-side encryption with customer-provided encryption keys (SSE-C). -The two option **http_s3_sse_customer_key** and -**http_s3_sse_customer_algorithm** is for server-side encryption. - -Signed-off-by: Feng, Hualong ---- - engines/http.c | 163 +++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 146 insertions(+), 17 deletions(-) - -diff --git a/engines/http.c b/engines/http.c -index dbcde287..56dc7d1b 100644 ---- a/engines/http.c -+++ b/engines/http.c -@@ -57,6 +57,8 @@ struct http_options { - char *s3_key; - char *s3_keyid; - char *s3_region; -+ char *s3_sse_customer_key; -+ char *s3_sse_customer_algorithm; - char *s3_storage_class; - char *swift_auth_token; - int verbose; -@@ -162,6 +164,26 @@ static struct fio_option options[] = { - .category = FIO_OPT_C_ENGINE, - .group = FIO_OPT_G_HTTP, - }, -+ { -+ .name = "http_s3_sse_customer_key", -+ .lname = "SSE Customer Key", -+ .type = FIO_OPT_STR_STORE, -+ .help = "S3 SSE Customer Key", -+ .off1 = offsetof(struct http_options, s3_sse_customer_key), -+ .def = "", -+ .category = FIO_OPT_C_ENGINE, -+ .group = FIO_OPT_G_HTTP, -+ }, -+ { -+ .name = "http_s3_sse_customer_algorithm", -+ .lname = "SSE Customer Algorithm", -+ .type = FIO_OPT_STR_STORE, -+ .help = "S3 SSE Customer Algorithm", -+ .off1 = offsetof(struct http_options, s3_sse_customer_algorithm), -+ .def = "AES256", -+ .category = FIO_OPT_C_ENGINE, -+ .group = FIO_OPT_G_HTTP, -+ }, - { - .name = "http_s3_storage_class", - .lname = "S3 Storage class", -@@ -277,6 +299,54 @@ static char *_gen_hex_md5(const char *p, size_t len) - return _conv_hex(hash, MD5_DIGEST_LENGTH); - } - -+static char *_conv_base64_encode(const unsigned char *p, size_t len) -+{ -+ char *r, *ret; -+ int i; -+ static const char sEncodingTable[] = { -+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', -+ 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', -+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', -+ 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', -+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', -+ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', -+ 'w', 'x', 'y', 'z', '0', '1', '2', '3', -+ '4', '5', '6', '7', '8', '9', '+', '/' -+ }; -+ -+ size_t out_len = 4 * ((len + 2) / 3); -+ ret = r = malloc(out_len + 1); -+ -+ for (i = 0; i < len - 2; i += 3) { -+ *r++ = sEncodingTable[(p[i] >> 2) & 0x3F]; -+ *r++ = sEncodingTable[((p[i] & 0x3) << 4) | ((int) (p[i + 1] & 0xF0) >> 4)]; -+ *r++ = sEncodingTable[((p[i + 1] & 0xF) << 2) | ((int) (p[i + 2] & 0xC0) >> 6)]; -+ *r++ = sEncodingTable[p[i + 2] & 0x3F]; -+ } -+ -+ if (i < len) { -+ *r++ = sEncodingTable[(p[i] >> 2) & 0x3F]; -+ if (i == (len - 1)) { -+ *r++ = sEncodingTable[((p[i] & 0x3) << 4)]; -+ *r++ = '='; -+ } else { -+ *r++ = sEncodingTable[((p[i] & 0x3) << 4) | ((int) (p[i + 1] & 0xF0) >> 4)]; -+ *r++ = sEncodingTable[((p[i + 1] & 0xF) << 2)]; -+ } -+ *r++ = '='; -+ } -+ -+ ret[out_len]=0; -+ return ret; -+} -+ -+static char *_gen_base64_md5(const unsigned char *p, size_t len) -+{ -+ unsigned char hash[MD5_DIGEST_LENGTH]; -+ MD5((unsigned char*)p, len, hash); -+ return _conv_base64_encode(hash, MD5_DIGEST_LENGTH); -+} -+ - static void _hmac(unsigned char *md, void *key, int key_len, char *data) { - #ifndef CONFIG_HAVE_OPAQUE_HMAC_CTX - HMAC_CTX _ctx; -@@ -356,6 +426,9 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - const char *service = "s3"; - const char *aws = "aws4_request"; - unsigned char md[SHA256_DIGEST_LENGTH]; -+ unsigned char sse_key[33] = {0}; -+ char *sse_key_base64 = NULL; -+ char *sse_key_md5_base64 = NULL; - - time_t t = time(NULL); - struct tm *gtm = gmtime(&t); -@@ -364,6 +437,9 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - strftime (date_iso, sizeof(date_iso), "%Y%m%dT%H%M%SZ", gtm); - uri_encoded = _aws_uriencode(uri); - -+ if (o->s3_sse_customer_key != NULL) -+ strncpy((char*)sse_key, o->s3_sse_customer_key, sizeof(sse_key) - 1); -+ - if (op == DDIR_WRITE) { - dsha = _gen_hex_sha256(buf, len); - sprintf(method, "PUT"); -@@ -377,23 +453,50 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - } - - /* Create the canonical request first */ -- snprintf(creq, sizeof(creq), -- "%s\n" -- "%s\n" -- "\n" -- "host:%s\n" -- "x-amz-content-sha256:%s\n" -- "x-amz-date:%s\n" -- "x-amz-storage-class:%s\n" -- "\n" -- "host;x-amz-content-sha256;x-amz-date;x-amz-storage-class\n" -- "%s" -- , method -- , uri_encoded, o->host, dsha, date_iso, o->s3_storage_class, dsha); -+ if (sse_key[0] != '\0') { -+ sse_key_base64 = _conv_base64_encode(sse_key, sizeof(sse_key) - 1); -+ sse_key_md5_base64 = _gen_base64_md5(sse_key, sizeof(sse_key) - 1); -+ snprintf(creq, sizeof(creq), -+ "%s\n" -+ "%s\n" -+ "\n" -+ "host:%s\n" -+ "x-amz-content-sha256:%s\n" -+ "x-amz-date:%s\n" -+ "x-amz-server-side-encryption-customer-algorithm:%s\n" -+ "x-amz-server-side-encryption-customer-key:%s\n" -+ "x-amz-server-side-encryption-customer-key-md5:%s\n" -+ "x-amz-storage-class:%s\n" -+ "\n" -+ "host;x-amz-content-sha256;x-amz-date;" -+ "x-amz-server-side-encryption-customer-algorithm;" -+ "x-amz-server-side-encryption-customer-key;" -+ "x-amz-server-side-encryption-customer-key-md5;" -+ "x-amz-storage-class\n" -+ "%s" -+ , method -+ , uri_encoded, o->host, dsha, date_iso -+ , o->s3_sse_customer_algorithm, sse_key_base64 -+ , sse_key_md5_base64, o->s3_storage_class, dsha); -+ } else { -+ snprintf(creq, sizeof(creq), -+ "%s\n" -+ "%s\n" -+ "\n" -+ "host:%s\n" -+ "x-amz-content-sha256:%s\n" -+ "x-amz-date:%s\n" -+ "x-amz-storage-class:%s\n" -+ "\n" -+ "host;x-amz-content-sha256;x-amz-date;x-amz-storage-class\n" -+ "%s" -+ , method -+ , uri_encoded, o->host, dsha, date_iso, o->s3_storage_class, dsha); -+ } - - csha = _gen_hex_sha256(creq, strlen(creq)); - snprintf(sts, sizeof(sts), "AWS4-HMAC-SHA256\n%s\n%s/%s/%s/%s\n%s", -- date_iso, date_short, o->s3_region, service, aws, csha); -+ date_iso, date_short, o->s3_region, service, aws, csha); - - snprintf((char *)dkey, sizeof(dkey), "AWS4%s", o->s3_key); - _hmac(md, dkey, strlen(dkey), date_short); -@@ -412,11 +515,33 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - - snprintf(s, sizeof(s), "x-amz-date: %s", date_iso); - slist = curl_slist_append(slist, s); -+ -+ if (sse_key[0] != '\0') { -+ snprintf(s, sizeof(s), "x-amz-server-side-encryption-customer-algorithm: %s", o->s3_sse_customer_algorithm); -+ slist = curl_slist_append(slist, s); -+ snprintf(s, sizeof(s), "x-amz-server-side-encryption-customer-key: %s", sse_key_base64); -+ slist = curl_slist_append(slist, s); -+ snprintf(s, sizeof(s), "x-amz-server-side-encryption-customer-key-md5: %s", sse_key_md5_base64); -+ slist = curl_slist_append(slist, s); -+ } -+ - snprintf(s, sizeof(s), "x-amz-storage-class: %s", o->s3_storage_class); - slist = curl_slist_append(slist, s); -- snprintf(s, sizeof(s), "Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/s3/aws4_request," -- "SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-storage-class,Signature=%s", -- o->s3_keyid, date_short, o->s3_region, signature); -+ -+ if (sse_key[0] != '\0') { -+ snprintf(s, sizeof(s), "Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/s3/aws4_request," -+ "SignedHeaders=host;x-amz-content-sha256;" -+ "x-amz-date;x-amz-server-side-encryption-customer-algorithm;" -+ "x-amz-server-side-encryption-customer-key;" -+ "x-amz-server-side-encryption-customer-key-md5;" -+ "x-amz-storage-class," -+ "Signature=%s", -+ o->s3_keyid, date_short, o->s3_region, signature); -+ } else { -+ snprintf(s, sizeof(s), "Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/s3/aws4_request," -+ "SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-storage-class,Signature=%s", -+ o->s3_keyid, date_short, o->s3_region, signature); -+ } - slist = curl_slist_append(slist, s); - - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist); -@@ -425,6 +550,10 @@ static void _add_aws_auth_header(CURL *curl, struct curl_slist *slist, struct ht - free(csha); - free(dsha); - free(signature); -+ if (sse_key_base64 != NULL) { -+ free(sse_key_base64); -+ free(sse_key_md5_base64); -+ } - } - - static void _add_swift_header(CURL *curl, struct curl_slist *slist, struct http_options *o, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0007-doc-Add-usage-and-example-about-s3-storage-class-and.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0007-doc-Add-usage-and-example-about-s3-storage-class-and.patch deleted file mode 100644 index d5815935d7..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0007-doc-Add-usage-and-example-about-s3-storage-class-and.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 0cad4b6957818937519604b466a2da5b0c395cfe Mon Sep 17 00:00:00 2001 -From: "Feng, Hualong" -Date: Thu, 28 Jul 2022 01:47:48 +0000 -Subject: [PATCH] doc: Add usage and example about s3 storage class and crypto - -There add option usage about s3 storage class -`http_s3_storage_class` and -s3 SSE server side encryption -`http_s3_sse_customer_key` and -`http_s3_sse_customer_algorithm` - -And add example file in example folder. - -Signed-off-by: Feng, Hualong ---- - HOWTO.rst | 14 +++++++++++ - examples/http-s3-crypto.fio | 38 ++++++++++++++++++++++++++++++ - examples/http-s3-storage-class.fio | 37 +++++++++++++++++++++++++++++ - fio.1 | 9 +++++++ - 4 files changed, 98 insertions(+) - create mode 100644 examples/http-s3-crypto.fio - create mode 100644 examples/http-s3-storage-class.fio - -diff --git a/HOWTO.rst b/HOWTO.rst -index 104cce2d..05fc117f 100644 ---- a/HOWTO.rst -+++ b/HOWTO.rst -@@ -2692,6 +2692,20 @@ with the caveat that when used on the command line, they must come after the - - The S3 key/access id. - -+.. option:: http_s3_sse_customer_key=str : [http] -+ -+ The encryption customer key in SSE server side. -+ -+.. option:: http_s3_sse_customer_algorithm=str : [http] -+ -+ The encryption customer algorithm in SSE server side. -+ Default is **AES256** -+ -+.. option:: http_s3_storage_class=str : [http] -+ -+ Which storage class to access. User-customizable settings. -+ Default is **STANDARD** -+ - .. option:: http_swift_auth_token=str : [http] - - The Swift auth token. See the example configuration file on how -diff --git a/examples/http-s3-crypto.fio b/examples/http-s3-crypto.fio -new file mode 100644 -index 00000000..2403746e ---- /dev/null -+++ b/examples/http-s3-crypto.fio -@@ -0,0 +1,38 @@ -+# Example test for the HTTP engine's S3 support against Amazon AWS. -+# Obviously, you have to adjust the S3 credentials; for this example, -+# they're passed in via the environment. -+# And you can set the SSE Customer Key and Algorithm to test Server -+# Side Encryption. -+# -+ -+[global] -+ioengine=http -+name=test -+direct=1 -+filename=/larsmb-fio-test/object -+http_verbose=0 -+https=on -+http_mode=s3 -+http_s3_key=${S3_KEY} -+http_s3_keyid=${S3_ID} -+http_host=s3.eu-central-1.amazonaws.com -+http_s3_region=eu-central-1 -+http_s3_sse_customer_key=${SSE_KEY} -+http_s3_sse_customer_algorithm=AES256 -+group_reporting -+ -+# With verify, this both writes and reads the object -+[create] -+rw=write -+bs=4k -+size=64k -+io_size=4k -+verify=sha256 -+ -+[trim] -+stonewall -+rw=trim -+bs=4k -+size=64k -+io_size=4k -+ -diff --git a/examples/http-s3-storage-class.fio b/examples/http-s3-storage-class.fio -new file mode 100644 -index 00000000..9ee23837 ---- /dev/null -+++ b/examples/http-s3-storage-class.fio -@@ -0,0 +1,37 @@ -+# Example test for the HTTP engine's S3 support against Amazon AWS. -+# Obviously, you have to adjust the S3 credentials; for this example, -+# they're passed in via the environment. -+# And here add storage class parameter, you can set normal test for -+# STANDARD and compression test for another storage class. -+# -+ -+[global] -+ioengine=http -+name=test -+direct=1 -+filename=/larsmb-fio-test/object -+http_verbose=0 -+https=on -+http_mode=s3 -+http_s3_key=${S3_KEY} -+http_s3_keyid=${S3_ID} -+http_host=s3.eu-central-1.amazonaws.com -+http_s3_region=eu-central-1 -+http_s3_storage_class=${STORAGE_CLASS} -+group_reporting -+ -+# With verify, this both writes and reads the object -+[create] -+rw=write -+bs=4k -+size=64k -+io_size=4k -+verify=sha256 -+ -+[trim] -+stonewall -+rw=trim -+bs=4k -+size=64k -+io_size=4k -+ -diff --git a/fio.1 b/fio.1 -index ce9bf3ef..6630525f 100644 ---- a/fio.1 -+++ b/fio.1 -@@ -2308,6 +2308,15 @@ The S3 secret key. - .BI (http)http_s3_keyid \fR=\fPstr - The S3 key/access id. - .TP -+.BI (http)http_s3_sse_customer_key \fR=\fPstr -+The encryption customer key in SSE server side. -+.TP -+.BI (http)http_s3_sse_customer_algorithm \fR=\fPstr -+The encryption customer algorithm in SSE server side. Default is \fBAES256\fR -+.TP -+.BI (http)http_s3_storage_class \fR=\fPstr -+Which storage class to access. User-customizable settings. Default is \fBSTANDARD\fR -+.TP - .BI (http)http_swift_auth_token \fR=\fPstr - The Swift auth token. See the example configuration file on how to - retrieve this. diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0008-README-link-to-GitHub-releases-for-Windows.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0008-README-link-to-GitHub-releases-for-Windows.patch deleted file mode 100644 index 3f7ba4ccb4..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0008-README-link-to-GitHub-releases-for-Windows.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6809d81b2a9b854697c65e0d69455a39d4497a6b Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 15 Aug 2022 10:37:57 -0400 -Subject: [PATCH] README: link to GitHub releases for Windows - -Note that Windows installers are now available as releases on GitHub. - -Signed-off-by: Vincent Fu ---- - README.rst | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/README.rst b/README.rst -index 67420903..79582dea 100644 ---- a/README.rst -+++ b/README.rst -@@ -123,10 +123,12 @@ Solaris: - ``pkgutil -i fio``. - - Windows: -- Rebecca Cran has fio packages for Windows at -- https://bsdio.com/fio/ . The latest builds for Windows can also -- be grabbed from https://ci.appveyor.com/project/axboe/fio by clicking -- the latest x86 or x64 build, then selecting the ARTIFACTS tab. -+ Beginning with fio 3.31 Windows installers are available on GitHub at -+ https://github.com/axboe/fio/releases. Rebecca Cran -+ has fio packages for Windows at -+ https://bsdio.com/fio/ . The latest builds for Windows can also be -+ grabbed from https://ci.appveyor.com/project/axboe/fio by clicking the -+ latest x86 or x64 build and then selecting the Artifacts tab. - - BSDs: - Packages for BSDs may be available from their binary package repositories. diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0009-engines-xnvme-fix-segfault-issue-with-xnvme-ioengine.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0009-engines-xnvme-fix-segfault-issue-with-xnvme-ioengine.patch deleted file mode 100644 index 6e322b8f91..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0009-engines-xnvme-fix-segfault-issue-with-xnvme-ioengine.patch +++ /dev/null @@ -1,54 +0,0 @@ -From d5aac3401e180f3d4ff3db04ebb4e3165b975987 Mon Sep 17 00:00:00 2001 -From: Ankit Kumar -Date: Tue, 16 Aug 2022 11:08:20 +0530 -Subject: [PATCH] engines/xnvme: fix segfault issue with xnvme ioengine - -fix segfault when xnvme ioengine is called without thread=1. -The segfault happens because td->io_ops_data is accessed at -two locations xnvme_fioe_cleanup and xnvme_fioe_iomem_free, -during the error handling call. - -Signed-off-by: Ankit Kumar -Link: https://lore.kernel.org/r/20220816053821.440-2-ankit.kumar@samsung.com -Signed-off-by: Jens Axboe ---- - engines/xnvme.c | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -diff --git a/engines/xnvme.c b/engines/xnvme.c -index c11b33a8..d8647481 100644 ---- a/engines/xnvme.c -+++ b/engines/xnvme.c -@@ -205,9 +205,14 @@ static void _dev_close(struct thread_data *td, struct xnvme_fioe_fwrap *fwrap) - - static void xnvme_fioe_cleanup(struct thread_data *td) - { -- struct xnvme_fioe_data *xd = td->io_ops_data; -+ struct xnvme_fioe_data *xd = NULL; - int err; - -+ if (!td->io_ops_data) -+ return; -+ -+ xd = td->io_ops_data; -+ - err = pthread_mutex_lock(&g_serialize); - if (err) - log_err("ioeng->cleanup(): pthread_mutex_lock(), err(%d)\n", err); -@@ -367,8 +372,14 @@ static int xnvme_fioe_iomem_alloc(struct thread_data *td, size_t total_mem) - /* NOTE: using the first device for buffer-allocators) */ - static void xnvme_fioe_iomem_free(struct thread_data *td) - { -- struct xnvme_fioe_data *xd = td->io_ops_data; -- struct xnvme_fioe_fwrap *fwrap = &xd->files[0]; -+ struct xnvme_fioe_data *xd = NULL; -+ struct xnvme_fioe_fwrap *fwrap = NULL; -+ -+ if (!td->io_ops_data) -+ return; -+ -+ xd = td->io_ops_data; -+ fwrap = &xd->files[0]; - - if (!fwrap->dev) { - log_err("ioeng->iomem_free(): failed no dev-handle\n"); diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0010-doc-update-fio-doc-for-xnvme-engine.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0010-doc-update-fio-doc-for-xnvme-engine.patch deleted file mode 100644 index 6c85cfc204..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0010-doc-update-fio-doc-for-xnvme-engine.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 8e318fd65ba5c0f6ce82860984bc8d69a7843f97 Mon Sep 17 00:00:00 2001 -From: Ankit Kumar -Date: Tue, 16 Aug 2022 11:08:21 +0530 -Subject: [PATCH] doc: update fio doc for xnvme engine - -- Elaborate about the various sync, async and admin - interfaces. -- add missing io_uring_cmd async backend entry. -- xnvme ioengine doesn't support file stat. - -Signed-off-by: Ankit Kumar -Link: https://lore.kernel.org/r/20220816053821.440-3-ankit.kumar@samsung.com -Signed-off-by: Jens Axboe ---- - HOWTO.rst | 37 ++++++++++++++++++++++++++----------- - fio.1 | 34 +++++++++++++++++++++------------- - 2 files changed, 47 insertions(+), 24 deletions(-) - -diff --git a/HOWTO.rst b/HOWTO.rst -index 05fc117f..b2750b56 100644 ---- a/HOWTO.rst -+++ b/HOWTO.rst -@@ -2780,41 +2780,56 @@ with the caveat that when used on the command line, they must come after the - Select the xnvme async command interface. This can take these values. - - **emu** -- This is default and used to emulate asynchronous I/O. -+ This is default and use to emulate asynchronous I/O by using a -+ single thread to create a queue pair on top of a synchronous -+ I/O interface using the NVMe driver IOCTL. - **thrpool** -- Use thread pool for Asynchronous I/O. -+ Emulate an asynchronous I/O interface with a pool of userspace -+ threads on top of a synchronous I/O interface using the NVMe -+ driver IOCTL. By default four threads are used. - **io_uring** -- Use Linux io_uring/liburing for Asynchronous I/O. -+ Linux native asynchronous I/O interface which supports both -+ direct and buffered I/O. -+ **io_uring_cmd** -+ Fast Linux native asynchronous I/O interface for NVMe pass -+ through commands. This only works with NVMe character device -+ (/dev/ngXnY). - **libaio** - Use Linux aio for Asynchronous I/O. - **posix** -- Use POSIX aio for Asynchronous I/O. -+ Use the posix asynchronous I/O interface to perform one or -+ more I/O operations asynchronously. - **nil** -- Use nil-io; For introspective perf. evaluation -+ Do not transfer any data; just pretend to. This is mainly used -+ for introspective performance evaluation. - - .. option:: xnvme_sync=str : [xnvme] - - Select the xnvme synchronous command interface. This can take these values. - - **nvme** -- This is default and uses Linux NVMe Driver ioctl() for synchronous I/O. -+ This is default and uses Linux NVMe Driver ioctl() for -+ synchronous I/O. - **psync** -- Use pread()/write() for synchronous I/O. -+ This supports regular as well as vectored pread() and pwrite() -+ commands. -+ **block** -+ This is the same as psync except that it also supports zone -+ management commands using Linux block layer IOCTLs. - - .. option:: xnvme_admin=str : [xnvme] - - Select the xnvme admin command interface. This can take these values. - - **nvme** -- This is default and uses linux NVMe Driver ioctl() for admin commands. -+ This is default and uses linux NVMe Driver ioctl() for admin -+ commands. - **block** - Use Linux Block Layer ioctl() and sysfs for admin commands. -- **file_as_ns** -- Use file-stat to construct NVMe idfy responses. - - .. option:: xnvme_dev_nsid=int : [xnvme] - -- xnvme namespace identifier, for userspace NVMe driver. -+ xnvme namespace identifier for userspace NVMe driver, such as SPDK. - - .. option:: xnvme_iovec=int : [xnvme] - -diff --git a/fio.1 b/fio.1 -index 6630525f..f3f3dc5d 100644 ---- a/fio.1 -+++ b/fio.1 -@@ -2530,22 +2530,29 @@ Select the xnvme async command interface. This can take these values. - .RS - .TP - .B emu --This is default and used to emulate asynchronous I/O -+This is default and use to emulate asynchronous I/O by using a single thread to -+create a queue pair on top of a synchronous I/O interface using the NVMe driver -+IOCTL. - .TP - .BI thrpool --Use thread pool for Asynchronous I/O -+Emulate an asynchronous I/O interface with a pool of userspace threads on top -+of a synchronous I/O interface using the NVMe driver IOCTL. By default four -+threads are used. - .TP - .BI io_uring --Use Linux io_uring/liburing for Asynchronous I/O -+Linux native asynchronous I/O interface which supports both direct and buffered -+I/O. - .TP - .BI libaio - Use Linux aio for Asynchronous I/O - .TP - .BI posix --Use POSIX aio for Asynchronous I/O -+Use the posix asynchronous I/O interface to perform one or more I/O operations -+asynchronously. - .TP - .BI nil --Use nil-io; For introspective perf. evaluation -+Do not transfer any data; just pretend to. This is mainly used for -+introspective performance evaluation. - .RE - .RE - .TP -@@ -2555,10 +2562,14 @@ Select the xnvme synchronous command interface. This can take these values. - .RS - .TP - .B nvme --This is default and uses Linux NVMe Driver ioctl() for synchronous I/O -+This is default and uses Linux NVMe Driver ioctl() for synchronous I/O. - .TP - .BI psync --Use pread()/write() for synchronous I/O -+This supports regular as well as vectored pread() and pwrite() commands. -+.TP -+.BI block -+This is the same as psync except that it also supports zone management -+commands using Linux block layer IOCTLs. - .RE - .RE - .TP -@@ -2568,18 +2579,15 @@ Select the xnvme admin command interface. This can take these values. - .RS - .TP - .B nvme --This is default and uses Linux NVMe Driver ioctl() for admin commands -+This is default and uses Linux NVMe Driver ioctl() for admin commands. - .TP - .BI block --Use Linux Block Layer ioctl() and sysfs for admin commands --.TP --.BI file_as_ns --Use file-stat as to construct NVMe idfy responses -+Use Linux Block Layer ioctl() and sysfs for admin commands. - .RE - .RE - .TP - .BI (xnvme)xnvme_dev_nsid\fR=\fPint --xnvme namespace identifier, for userspace NVMe driver. -+xnvme namespace identifier for userspace NVMe driver such as SPDK. - .TP - .BI (xnvme)xnvme_iovec - If this option is set, xnvme will use vectored read/write commands. diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0011-test-add-latency-test-using-posixaio-ioengine.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0011-test-add-latency-test-using-posixaio-ioengine.patch deleted file mode 100644 index d86ac11abb..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0011-test-add-latency-test-using-posixaio-ioengine.patch +++ /dev/null @@ -1,55 +0,0 @@ -From fa64b199318318af7fe598a5b9ec62b981a55e2d Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 15 Aug 2022 11:34:43 -0400 -Subject: [PATCH] test: add latency test using posixaio ioengine - -Make sure that mean(slat) + mean(clat) = mean(total lat). - -Tests 15 and 16 use the libaio and null ioengines, respectively. Both of -those ioengines have commit hooks. Add this new test using the posixaio -ioengine which does not have a commit hook so that we can better cover -the possible ways that latency is calcualted. - -Signed-off-by: Vincent Fu ---- - t/jobs/t0017.fio | 9 +++++++++ - t/run-fio-tests.py | 10 ++++++++++ - 2 files changed, 19 insertions(+) - create mode 100644 t/jobs/t0017.fio - -diff --git a/t/jobs/t0017.fio b/t/jobs/t0017.fio -new file mode 100644 -index 00000000..14486d98 ---- /dev/null -+++ b/t/jobs/t0017.fio -@@ -0,0 +1,9 @@ -+# Expected result: mean(slat) + mean(clat) = mean(lat) -+# Buggy result: equality does not hold -+# This is similar to t0015 and t0016 except that is uses posixaio which is -+# available on more platforms and does not have a commit hook -+ -+[test] -+ioengine=posixaio -+size=1M -+iodepth=16 -diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py -index d77f20e0..2bd02a2a 100755 ---- a/t/run-fio-tests.py -+++ b/t/run-fio-tests.py -@@ -857,6 +857,16 @@ TEST_LIST = [ - 'output_format': 'json', - 'requirements': [], - }, -+ { -+ 'test_id': 17, -+ 'test_class': FioJobTest_t0015, -+ 'job': 't0017.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'output_format': 'json', -+ 'requirements': [Requirements.not_windows], -+ }, - { - 'test_id': 1000, - 'test_class': FioExeTest, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0012-test-fix-hash-for-t0016.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0012-test-fix-hash-for-t0016.patch deleted file mode 100644 index 8f10f415cc..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0012-test-fix-hash-for-t0016.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1e68459d85f56f805c70236ad47a65a65f426867 Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 15 Aug 2022 11:40:58 -0400 -Subject: [PATCH] test: fix hash for t0016 - -I used the wrong hash for t0016 in the original commit. Fix it to refer -to the hash that fixed the issue in this tree. - -Fixes: de31fe9a ("testing: add test for slat + clat = tlat") -Signed-off-by: Vincent Fu ---- - t/jobs/{t0016-259ebc00.fio => t0016-d54ae22.fio} | 0 - t/run-fio-tests.py | 2 +- - 2 files changed, 1 insertion(+), 1 deletion(-) - rename t/jobs/{t0016-259ebc00.fio => t0016-d54ae22.fio} (100%) - -diff --git a/t/jobs/t0016-259ebc00.fio b/t/jobs/t0016-d54ae22.fio -similarity index 100% -rename from t/jobs/t0016-259ebc00.fio -rename to t/jobs/t0016-d54ae22.fio -diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py -index 2bd02a2a..504b7cdb 100755 ---- a/t/run-fio-tests.py -+++ b/t/run-fio-tests.py -@@ -850,7 +850,7 @@ TEST_LIST = [ - { - 'test_id': 16, - 'test_class': FioJobTest_t0015, -- 'job': 't0016-259ebc00.fio', -+ 'job': 't0016-d54ae22.fio', - 'success': SUCCESS_DEFAULT, - 'pre_job': None, - 'pre_success': None, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0013-doc-get-rid-of-trailing-whitespace.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0013-doc-get-rid-of-trailing-whitespace.patch deleted file mode 100644 index 5f72f47b07..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0013-doc-get-rid-of-trailing-whitespace.patch +++ /dev/null @@ -1,82 +0,0 @@ -From ff16b7c0c855d5242d92d7f902247525ff1f889a Mon Sep 17 00:00:00 2001 -From: Konstantin Kharlamov -Date: Tue, 16 Aug 2022 19:14:13 +0300 -Subject: [PATCH] doc: get rid of trailing whitespace - -Signed-off-by: Konstantin Kharlamov ---- - HOWTO.rst | 4 ++-- - fio.1 | 10 +++++----- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/HOWTO.rst b/HOWTO.rst -index b2750b56..c94238ed 100644 ---- a/HOWTO.rst -+++ b/HOWTO.rst -@@ -1301,7 +1301,7 @@ I/O type - effectively caps the file size at `real_size - offset`. Can be combined with - :option:`size` to constrain the start and end range of the I/O workload. - A percentage can be specified by a number between 1 and 100 followed by '%', -- for example, ``offset=20%`` to specify 20%. In ZBD mode, value can be set as -+ for example, ``offset=20%`` to specify 20%. In ZBD mode, value can be set as - number of zones using 'z'. - - .. option:: offset_align=int -@@ -1877,7 +1877,7 @@ I/O size - If this option is not specified, fio will use the full size of the given - files or devices. If the files do not exist, size must be given. It is also - possible to give size as a percentage between 1 and 100. If ``size=20%`` is -- given, fio will use 20% of the full size of the given files or devices. -+ given, fio will use 20% of the full size of the given files or devices. - In ZBD mode, value can also be set as number of zones using 'z'. - Can be combined with :option:`offset` to constrain the start and end range - that I/O will be done within. -diff --git a/fio.1 b/fio.1 -index f3f3dc5d..d40b4247 100644 ---- a/fio.1 -+++ b/fio.1 -@@ -292,7 +292,7 @@ For Zone Block Device Mode: - .RS - .P - .PD 0 --z means Zone -+z means Zone - .P - .PD - .RE -@@ -1083,7 +1083,7 @@ provided. Data before the given offset will not be touched. This - effectively caps the file size at `real_size \- offset'. Can be combined with - \fBsize\fR to constrain the start and end range of the I/O workload. - A percentage can be specified by a number between 1 and 100 followed by '%', --for example, `offset=20%' to specify 20%. In ZBD mode, value can be set as -+for example, `offset=20%' to specify 20%. In ZBD mode, value can be set as - number of zones using 'z'. - .TP - .BI offset_align \fR=\fPint -@@ -1099,7 +1099,7 @@ specified). This option is useful if there are several jobs which are - intended to operate on a file in parallel disjoint segments, with even - spacing between the starting points. Percentages can be used for this option. - If a percentage is given, the generated offset will be aligned to the minimum --\fBblocksize\fR or to the value of \fBoffset_align\fR if provided.In ZBD mode, value -+\fBblocksize\fR or to the value of \fBoffset_align\fR if provided.In ZBD mode, value - can be set as number of zones using 'z'. - .TP - .BI number_ios \fR=\fPint -@@ -1678,7 +1678,7 @@ If this option is not specified, fio will use the full size of the given - files or devices. If the files do not exist, size must be given. It is also - possible to give size as a percentage between 1 and 100. If `size=20%' is - given, fio will use 20% of the full size of the given files or devices. In ZBD mode, --size can be given in units of number of zones using 'z'. Can be combined with \fBoffset\fR to -+size can be given in units of number of zones using 'z'. Can be combined with \fBoffset\fR to - constrain the start and end range that I/O will be done within. - .TP - .BI io_size \fR=\fPint[%|z] "\fR,\fB io_limit" \fR=\fPint[%|z] -@@ -1697,7 +1697,7 @@ also be set as number of zones using 'z'. - .BI filesize \fR=\fPirange(int) - Individual file sizes. May be a range, in which case fio will select sizes - for files at random within the given range. If not given, each created file --is the same size. This option overrides \fBsize\fR in terms of file size, -+is the same size. This option overrides \fBsize\fR in terms of file size, - i.e. \fBsize\fR becomes merely the default for \fBio_size\fR (and - has no effect it all if \fBio_size\fR is set explicitly). - .TP diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0014-doc-clarify-that-I-O-errors-may-go-unnoticed-without.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0014-doc-clarify-that-I-O-errors-may-go-unnoticed-without.patch deleted file mode 100644 index 3196afa2b1..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0014-doc-clarify-that-I-O-errors-may-go-unnoticed-without.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 331023be2b20d177d533e5fa18f5d8834570613f Mon Sep 17 00:00:00 2001 -From: Konstantin Kharlamov -Date: Tue, 16 Aug 2022 19:10:38 +0300 -Subject: [PATCH] doc: clarify that I/O errors may go unnoticed without - direct=1 - -Fixes: https://github.com/axboe/fio/issues/1443 - -Reported-by: Konstantin Kharlamov -Signed-off-by: Konstantin Kharlamov ---- - HOWTO.rst | 7 +++++++ - fio.1 | 10 ++++++++++ - 2 files changed, 17 insertions(+) - -diff --git a/HOWTO.rst b/HOWTO.rst -index c94238ed..08be687c 100644 ---- a/HOWTO.rst -+++ b/HOWTO.rst -@@ -3927,6 +3927,13 @@ Error handling - appended, the total error count and the first error. The error field given - in the stats is the first error that was hit during the run. - -+ Note: a write error from the device may go unnoticed by fio when using -+ buffered IO, as the write() (or similar) system call merely dirties the -+ kernel pages, unless :option:`sync` or :option:`direct` is used. Device IO -+ errors occur when the dirty data is actually written out to disk. If fully -+ sync writes aren't desirable, :option:`fsync` or :option:`fdatasync` can be -+ used as well. This is specific to writes, as reads are always synchronous. -+ - The allowed values are: - - **none** -diff --git a/fio.1 b/fio.1 -index d40b4247..27454b0b 100644 ---- a/fio.1 -+++ b/fio.1 -@@ -3606,6 +3606,16 @@ EILSEQ) until the runtime is exceeded or the I/O size specified is - completed. If this option is used, there are two more stats that are - appended, the total error count and the first error. The error field given - in the stats is the first error that was hit during the run. -+.RS -+.P -+Note: a write error from the device may go unnoticed by fio when using buffered -+IO, as the write() (or similar) system call merely dirties the kernel pages, -+unless `sync' or `direct' is used. Device IO errors occur when the dirty data is -+actually written out to disk. If fully sync writes aren't desirable, `fsync' or -+`fdatasync' can be used as well. This is specific to writes, as reads are always -+synchronous. -+.RS -+.P - The allowed values are: - .RS - .RS diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0015-Revert-Minor-style-fixups.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0015-Revert-Minor-style-fixups.patch deleted file mode 100644 index fd962eaf2d..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0015-Revert-Minor-style-fixups.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 48ceba9c1870c9312d7214503371e0b781abba27 Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Tue, 23 Aug 2022 12:38:20 -0400 -Subject: [PATCH] Revert "Minor style fixups" - -This reverts commit 48f8268e88629d408ffd09b1601ad13366bd4ce1. - -Signed-off-by: Vincent Fu ---- - backend.c | 2 +- - filesetup.c | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/backend.c b/backend.c -index 5159b60d..3a99850d 100644 ---- a/backend.c -+++ b/backend.c -@@ -2321,7 +2321,7 @@ static void run_threads(struct sk_out *sk_out) - * when setup_files() does not run into issues - * later. - */ -- if (!i && td->o.nr_files == 1) { -+ if (!i && td->o.nr_files==1) { - if (setup_shared_file(td)) { - exit_value++; - if (td->error) -diff --git a/filesetup.c b/filesetup.c -index 3e2ccf9b..144a0572 100644 ---- a/filesetup.c -+++ b/filesetup.c -@@ -1109,8 +1109,9 @@ int setup_shared_file(struct thread_data *td) - dprint(FD_FILE, "fio: extending shared file\n"); - f->real_file_size = file_size; - err = extend_file(td, f); -- if (!err) -+ if (!err) { - err = __file_invalidate_cache(td, f, 0, f->real_file_size); -+ } - get_file_sizes(td); - dprint(FD_FILE, "shared setup new real_file_size=%llu\n", - (unsigned long long)f->real_file_size); diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0016-Revert-Fix-multithread-issues-when-operating-on-a-si.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0016-Revert-Fix-multithread-issues-when-operating-on-a-si.patch deleted file mode 100644 index 31d8345378..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0016-Revert-Fix-multithread-issues-when-operating-on-a-si.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 1bc0dec3f54e67fa4767d0096ab377e900d5146f Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Tue, 23 Aug 2022 12:38:51 -0400 -Subject: [PATCH] Revert "Fix multithread issues when operating on a single - shared file" - -This reverts commit acbda87c34c743ff2d9e125d9539bcfbbf49eb75. - -This commit introduced a lot of unintended consequences for -create_serialize=0. The aim of the commit can be accomplished with a -combination of filesize and io_size. - -Fixes: https://github.com/axboe/fio/issues/1442 -Signed-off-by: Vincent Fu ---- - backend.c | 19 +------------------ - file.h | 1 - - filesetup.c | 46 ++-------------------------------------------- - 3 files changed, 3 insertions(+), 63 deletions(-) - -diff --git a/backend.c b/backend.c -index 3a99850d..e5bb4e25 100644 ---- a/backend.c -+++ b/backend.c -@@ -2314,25 +2314,8 @@ static void run_threads(struct sk_out *sk_out) - for_each_td(td, i) { - print_status_init(td->thread_number - 1); - -- if (!td->o.create_serialize) { -- /* -- * When operating on a single rile in parallel, -- * perform single-threaded early setup so that -- * when setup_files() does not run into issues -- * later. -- */ -- if (!i && td->o.nr_files==1) { -- if (setup_shared_file(td)) { -- exit_value++; -- if (td->error) -- log_err("fio: pid=%d, err=%d/%s\n", -- (int) td->pid, td->error, td->verror); -- td_set_runstate(td, TD_REAPED); -- todo--; -- } -- } -+ if (!td->o.create_serialize) - continue; -- } - - if (fio_verify_load_state(td)) - goto reap; -diff --git a/file.h b/file.h -index e646cf22..da1b8947 100644 ---- a/file.h -+++ b/file.h -@@ -201,7 +201,6 @@ struct thread_data; - extern void close_files(struct thread_data *); - extern void close_and_free_files(struct thread_data *); - extern uint64_t get_start_offset(struct thread_data *, struct fio_file *); --extern int __must_check setup_shared_file(struct thread_data *); - extern int __must_check setup_files(struct thread_data *); - extern int __must_check file_invalidate_cache(struct thread_data *, struct fio_file *); - #ifdef __cplusplus -diff --git a/filesetup.c b/filesetup.c -index 144a0572..1d3cc5ad 100644 ---- a/filesetup.c -+++ b/filesetup.c -@@ -143,7 +143,7 @@ static int extend_file(struct thread_data *td, struct fio_file *f) - if (unlink_file || new_layout) { - int ret; - -- dprint(FD_FILE, "layout %d unlink %d %s\n", new_layout, unlink_file, f->file_name); -+ dprint(FD_FILE, "layout unlink %s\n", f->file_name); - - ret = td_io_unlink_file(td, f); - if (ret != 0 && ret != ENOENT) { -@@ -198,9 +198,6 @@ static int extend_file(struct thread_data *td, struct fio_file *f) - } - } - -- -- dprint(FD_FILE, "fill file %s, size %llu\n", f->file_name, (unsigned long long) f->real_file_size); -- - left = f->real_file_size; - bs = td->o.max_bs[DDIR_WRITE]; - if (bs > left) -@@ -1081,45 +1078,6 @@ static bool create_work_dirs(struct thread_data *td, const char *fname) - return true; - } - --int setup_shared_file(struct thread_data *td) --{ -- struct fio_file *f; -- uint64_t file_size; -- int err = 0; -- -- if (td->o.nr_files > 1) { -- log_err("fio: shared file setup called for multiple files\n"); -- return -1; -- } -- -- get_file_sizes(td); -- -- f = td->files[0]; -- -- if (f == NULL) { -- log_err("fio: NULL shared file\n"); -- return -1; -- } -- -- file_size = thread_number * td->o.size; -- dprint(FD_FILE, "shared setup %s real_file_size=%llu, desired=%llu\n", -- f->file_name, (unsigned long long)f->real_file_size, (unsigned long long)file_size); -- -- if (f->real_file_size < file_size) { -- dprint(FD_FILE, "fio: extending shared file\n"); -- f->real_file_size = file_size; -- err = extend_file(td, f); -- if (!err) { -- err = __file_invalidate_cache(td, f, 0, f->real_file_size); -- } -- get_file_sizes(td); -- dprint(FD_FILE, "shared setup new real_file_size=%llu\n", -- (unsigned long long)f->real_file_size); -- } -- -- return err; --} -- - /* - * Open the files and setup files sizes, creating files if necessary. - */ -@@ -1134,7 +1092,7 @@ int setup_files(struct thread_data *td) - const unsigned long long bs = td_min_bs(td); - uint64_t fs = 0; - -- dprint(FD_FILE, "setup files (thread_number=%d, subjob_number=%d)\n", td->thread_number, td->subjob_number); -+ dprint(FD_FILE, "setup files\n"); - - old_state = td_bump_runstate(td, TD_SETTING_UP); - diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0017-Add-wait-for-handling-SIGBREAK.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0017-Add-wait-for-handling-SIGBREAK.patch deleted file mode 100644 index e8cb337583..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0017-Add-wait-for-handling-SIGBREAK.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 98beea79a30f1541e646efae911dfce10ae18f5c Mon Sep 17 00:00:00 2001 -From: Brandon Paupore -Date: Fri, 5 Aug 2022 12:57:27 -0500 -Subject: [PATCH] Add wait for handling SIGBREAK - -When closing a command prompt window or terminating it using something -like the taskkill command, each child process (such as a running FIO -workload) is sent a SIGBREAK signal. Once those child processes have -responded to that signal, Windows terminates them if they're still -executing. - -This change has the main thread to wait for others to exit when handling -a SIGBREAK signal, such that each job will still have time to wrap-up -and give stats before the entire program terminates. - -Signed-off-by: Brandon Paupore ---- - backend.c | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/backend.c b/backend.c -index e5bb4e25..375a23e4 100644 ---- a/backend.c -+++ b/backend.c -@@ -90,6 +90,25 @@ static void sig_int(int sig) - } - } - -+#ifdef WIN32 -+static void sig_break(int sig) -+{ -+ struct thread_data *td; -+ int i; -+ -+ sig_int(sig); -+ -+ /** -+ * Windows terminates all job processes on SIGBREAK after the handler -+ * returns, so give them time to wrap-up and give stats -+ */ -+ for_each_td(td, i) { -+ while (td->runstate < TD_EXITED) -+ sleep(1); -+ } -+} -+#endif -+ - void sig_show_status(int sig) - { - show_running_run_stats(); -@@ -112,7 +131,7 @@ static void set_sig_handlers(void) - /* Windows uses SIGBREAK as a quit signal from other applications */ - #ifdef WIN32 - memset(&act, 0, sizeof(act)); -- act.sa_handler = sig_int; -+ act.sa_handler = sig_break; - act.sa_flags = SA_RESTART; - sigaction(SIGBREAK, &act, NULL); - #endif diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0018-engines-io_uring-pass-back-correct-error-value-when-.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0018-engines-io_uring-pass-back-correct-error-value-when-.patch deleted file mode 100644 index 8aea3abac9..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0018-engines-io_uring-pass-back-correct-error-value-when-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 1e6918419f4a2e5dbd77dd2da82598f1af63f533 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Wed, 24 Aug 2022 12:01:39 -0600 -Subject: [PATCH] engines/io_uring: pass back correct error value when - interrupted - -Running with an io_uring engine and using a USR1 signal to show -current status will end up terminating the job with: - -fio: pid=91726, err=-4/file:ioengines.c:320, func=get_events, error=Unknown error -4 -sfx: (groupid=0, jobs=1): err=-4 (file:ioengines.c:320, func=get_events, error=Unknown error -4): pid=91726: Wed Aug 24 11:59:51 2022 - -Ensure that the return value is set correctly based on the errno. - -Signed-off-by: Jens Axboe ---- - engines/io_uring.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/engines/io_uring.c b/engines/io_uring.c -index cffc7371..89d64b06 100644 ---- a/engines/io_uring.c -+++ b/engines/io_uring.c -@@ -445,12 +445,18 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event) - struct io_uring_cqe *cqe; - struct io_u *io_u; - unsigned index; -+ static int eio; - - index = (event + ld->cq_ring_off) & ld->cq_ring_mask; - - cqe = &ld->cq_ring.cqes[index]; - io_u = (struct io_u *) (uintptr_t) cqe->user_data; - -+ if (eio++ == 5) { -+ printf("mark EIO\n"); -+ cqe->res = -EIO; -+ } -+ - if (cqe->res != io_u->xfer_buflen) { - if (cqe->res > io_u->xfer_buflen) - io_u->error = -cqe->res; -@@ -532,6 +538,7 @@ static int fio_ioring_getevents(struct thread_data *td, unsigned int min, - if (r < 0) { - if (errno == EAGAIN || errno == EINTR) - continue; -+ r = -errno; - td_verror(td, errno, "io_uring_enter"); - break; - } -@@ -665,6 +672,7 @@ static int fio_ioring_commit(struct thread_data *td) - usleep(1); - continue; - } -+ ret = -errno; - td_verror(td, errno, "io_uring_enter submit"); - break; - } diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0019-Enable-CPU-affinity-support-on-Android.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0019-Enable-CPU-affinity-support-on-Android.patch deleted file mode 100644 index f47741612f..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0019-Enable-CPU-affinity-support-on-Android.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 02fd5b722bdfef2e7ce8d4aeb1bc65308d37003f Mon Sep 17 00:00:00 2001 -From: Bart Van Assche -Date: Wed, 24 Aug 2022 13:42:29 -0700 -Subject: [PATCH] Enable CPU affinity support on Android - -This patch enables the --cpumask=, --cpus_allowed= and ---cpus_allowed_policy= fio options. - -Signed-off-by: Bart Van Assche ---- - os/os-android.h | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -diff --git a/os/os-android.h b/os/os-android.h -index 2f73d249..34534239 100644 ---- a/os/os-android.h -+++ b/os/os-android.h -@@ -24,6 +24,7 @@ - #define __has_builtin(x) 0 // Compatibility with non-clang compilers. - #endif - -+#define FIO_HAVE_CPU_AFFINITY - #define FIO_HAVE_DISK_UTIL - #define FIO_HAVE_IOSCHED_SWITCH - #define FIO_HAVE_IOPRIO -@@ -44,6 +45,13 @@ - - #define OS_MAP_ANON MAP_ANONYMOUS - -+typedef cpu_set_t os_cpu_mask_t; -+ -+#define fio_setaffinity(pid, cpumask) \ -+ sched_setaffinity((pid), sizeof(cpumask), &(cpumask)) -+#define fio_getaffinity(pid, ptr) \ -+ sched_getaffinity((pid), sizeof(cpu_set_t), (ptr)) -+ - #ifndef POSIX_MADV_DONTNEED - #define posix_madvise madvise - #define POSIX_MADV_DONTNEED MADV_DONTNEED -@@ -64,6 +72,24 @@ - pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) - #endif - -+#define fio_cpu_clear(mask, cpu) CPU_CLR((cpu), (mask)) -+#define fio_cpu_set(mask, cpu) CPU_SET((cpu), (mask)) -+#define fio_cpu_isset(mask, cpu) (CPU_ISSET((cpu), (mask)) != 0) -+#define fio_cpu_count(mask) CPU_COUNT((mask)) -+ -+static inline int fio_cpuset_init(os_cpu_mask_t *mask) -+{ -+ CPU_ZERO(mask); -+ return 0; -+} -+ -+static inline int fio_cpuset_exit(os_cpu_mask_t *mask) -+{ -+ return 0; -+} -+ -+#define FIO_MAX_CPUS CPU_SETSIZE -+ - #ifndef CONFIG_NO_SHM - /* - * Bionic doesn't support SysV shared memory, so implement it using ashmem diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0020-io_uring-Replace-pthread_self-with-s-tid.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0020-io_uring-Replace-pthread_self-with-s-tid.patch deleted file mode 100644 index 24952f19f5..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0020-io_uring-Replace-pthread_self-with-s-tid.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 72d7f2139454528b9ebfb2f988a35f9a739680d0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 24 Aug 2022 18:08:53 -0700 -Subject: [PATCH] io_uring: Replace pthread_self with s->tid - -__init_rand64 takes 64bit value and srand48 takes unsigned 32bit value, -pthread_t is opaque type and some libcs ( e.g. musl ) do not define them -in plain old data types and ends up with errors - -| t/io_uring.c:809:32: error: incompatible pointer to integer conversion passing 'pthread_t' (aka 'struct __pthread *') to parameter of type 'uint64_t' (aka 'unsigned long') [-Wint-conver -sion] -| __init_rand64(&s->rand_state, pthread_self()); -| ^~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj ---- - t/io_uring.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/t/io_uring.c b/t/io_uring.c -index 35bf1956..f34a3554 100644 ---- a/t/io_uring.c -+++ b/t/io_uring.c -@@ -799,15 +799,14 @@ static int submitter_init(struct submitter *s) - int i, nr_batch, err; - static int init_printed; - char buf[80]; -- - s->tid = gettid(); - printf("submitter=%d, tid=%d, file=%s, node=%d\n", s->index, s->tid, - s->filename, s->numa_node); - - set_affinity(s); - -- __init_rand64(&s->rand_state, pthread_self()); -- srand48(pthread_self()); -+ __init_rand64(&s->rand_state, s->tid); -+ srand48(s->tid); - - for (i = 0; i < MAX_FDS; i++) - s->files[i].fileno = i; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0021-engines-io_uring-delete-debug-code.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0021-engines-io_uring-delete-debug-code.patch deleted file mode 100644 index b4f3d0d27f..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0021-engines-io_uring-delete-debug-code.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 85f8181d42050f8a8c9ddf6d30f621054f0e6890 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Thu, 25 Aug 2022 11:19:34 -0600 -Subject: [PATCH] engines/io_uring: delete debug code - -This was inadvertently introduced by a previous commit, get rid -of it. - -Fixes: 1816895b788e ("engines/io_uring: pass back correct error value when interrupted") -Signed-off-by: Jens Axboe ---- - engines/io_uring.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/engines/io_uring.c b/engines/io_uring.c -index 89d64b06..94376efa 100644 ---- a/engines/io_uring.c -+++ b/engines/io_uring.c -@@ -445,18 +445,12 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event) - struct io_uring_cqe *cqe; - struct io_u *io_u; - unsigned index; -- static int eio; - - index = (event + ld->cq_ring_off) & ld->cq_ring_mask; - - cqe = &ld->cq_ring.cqes[index]; - io_u = (struct io_u *) (uintptr_t) cqe->user_data; - -- if (eio++ == 5) { -- printf("mark EIO\n"); -- cqe->res = -EIO; -- } -- - if (cqe->res != io_u->xfer_buflen) { - if (cqe->res > io_u->xfer_buflen) - io_u->error = -cqe->res; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0022-t-io_uring-prep-for-including-engines-nvme.h-in-t-io.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0022-t-io_uring-prep-for-including-engines-nvme.h-in-t-io.patch deleted file mode 100644 index f32c8867df..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0022-t-io_uring-prep-for-including-engines-nvme.h-in-t-io.patch +++ /dev/null @@ -1,72 +0,0 @@ -From a10cec0440a7574ffb76ff52fbc33a250f067d6a Mon Sep 17 00:00:00 2001 -From: Anuj Gupta -Date: Fri, 26 Aug 2022 17:03:05 +0530 -Subject: [PATCH] t/io_uring: prep for including engines/nvme.h in t/io_uring - -Change page_size and cal_clat_percentiles name to something different -as these are indirectly picked from engines/nvme.h (fio.h and stat.h) - -Signed-off-by: Anuj Gupta -Link: https://lore.kernel.org/r/20220826113306.4139-2-anuj20.g@samsung.com -Signed-off-by: Jens Axboe ---- - t/io_uring.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/t/io_uring.c b/t/io_uring.c -index f34a3554..6e4737e4 100644 ---- a/t/io_uring.c -+++ b/t/io_uring.c -@@ -117,7 +117,7 @@ static struct submitter *submitter; - static volatile int finish; - static int stats_running; - static unsigned long max_iops; --static long page_size; -+static long t_io_uring_page_size; - - static int depth = DEPTH; - static int batch_submit = BATCH_SUBMIT; -@@ -195,9 +195,9 @@ static unsigned long plat_idx_to_val(unsigned int idx) - return cycles_to_nsec(base + ((k + 0.5) * (1 << error_bits))); - } - --unsigned int calc_clat_percentiles(unsigned long *io_u_plat, unsigned long nr, -- unsigned long **output, -- unsigned long *maxv, unsigned long *minv) -+unsigned int calculate_clat_percentiles(unsigned long *io_u_plat, -+ unsigned long nr, unsigned long **output, -+ unsigned long *maxv, unsigned long *minv) - { - unsigned long sum = 0; - unsigned int len = plist_len, i, j = 0; -@@ -251,7 +251,7 @@ static void show_clat_percentiles(unsigned long *io_u_plat, unsigned long nr, - bool is_last; - char fmt[32]; - -- len = calc_clat_percentiles(io_u_plat, nr, &ovals, &maxv, &minv); -+ len = calculate_clat_percentiles(io_u_plat, nr, &ovals, &maxv, &minv); - if (!len || !ovals) - goto out; - -@@ -786,7 +786,7 @@ static void *allocate_mem(struct submitter *s, int size) - return numa_alloc_onnode(size, s->numa_node); - #endif - -- if (posix_memalign(&buf, page_size, bs)) { -+ if (posix_memalign(&buf, t_io_uring_page_size, bs)) { - printf("failed alloc\n"); - return NULL; - } -@@ -1542,9 +1542,9 @@ int main(int argc, char *argv[]) - - arm_sig_int(); - -- page_size = sysconf(_SC_PAGESIZE); -- if (page_size < 0) -- page_size = 4096; -+ t_io_uring_page_size = sysconf(_SC_PAGESIZE); -+ if (t_io_uring_page_size < 0) -+ t_io_uring_page_size = 4096; - - for (j = 0; j < nthreads; j++) { - s = get_submitter(j); diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0023-t-io_uring-add-support-for-async-passthru.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0023-t-io_uring-add-support-for-async-passthru.patch deleted file mode 100644 index 8ef7d13e98..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0023-t-io_uring-add-support-for-async-passthru.patch +++ /dev/null @@ -1,379 +0,0 @@ -From fa4a1345ca7cd60ae0b96da286f45621a3f45a33 Mon Sep 17 00:00:00 2001 -From: Anuj Gupta -Date: Fri, 26 Aug 2022 17:03:06 +0530 -Subject: [PATCH] t/io_uring: add support for async-passthru - -This patch adds support for async-passthru in t/io_uring. User needs to -specify -u1 option in the command - -Example commandline: -t/io_uring -b512 -d128 -c32 -s32 -p0 -F1 -B0 -O0 -n1 -u1 /dev/ng0n1 - -Signed-off-by: Anuj Gupta -Link: https://lore.kernel.org/r/20220826113306.4139-3-anuj20.g@samsung.com -Signed-off-by: Jens Axboe ---- - t/io_uring.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 230 insertions(+), 8 deletions(-) - -diff --git a/t/io_uring.c b/t/io_uring.c -index 6e4737e4..0a90f85c 100644 ---- a/t/io_uring.c -+++ b/t/io_uring.c -@@ -35,6 +35,7 @@ - #include "../lib/rand.h" - #include "../minmax.h" - #include "../os/linux/io_uring.h" -+#include "../engines/nvme.h" - - struct io_sq_ring { - unsigned *head; -@@ -67,6 +68,8 @@ struct file { - unsigned long max_size; - unsigned long cur_off; - unsigned pending_ios; -+ unsigned int nsid; /* nsid field required for nvme-passthrough */ -+ unsigned int lba_shift; /* lba_shift field required for nvme-passthrough */ - int real_fd; - int fixed_fd; - int fileno; -@@ -139,6 +142,7 @@ static int random_io = 1; /* random or sequential IO */ - static int register_ring = 1; /* register ring */ - static int use_sync = 0; /* use preadv2 */ - static int numa_placement = 0; /* set to node of device */ -+static int pt = 0; /* passthrough I/O or not */ - - static unsigned long tsc_rate; - -@@ -161,6 +165,54 @@ struct io_uring_map_buffers { - }; - #endif - -+static int nvme_identify(int fd, __u32 nsid, enum nvme_identify_cns cns, -+ enum nvme_csi csi, void *data) -+{ -+ struct nvme_passthru_cmd cmd = { -+ .opcode = nvme_admin_identify, -+ .nsid = nsid, -+ .addr = (__u64)(uintptr_t)data, -+ .data_len = NVME_IDENTIFY_DATA_SIZE, -+ .cdw10 = cns, -+ .cdw11 = csi << NVME_IDENTIFY_CSI_SHIFT, -+ .timeout_ms = NVME_DEFAULT_IOCTL_TIMEOUT, -+ }; -+ -+ return ioctl(fd, NVME_IOCTL_ADMIN_CMD, &cmd); -+} -+ -+static int nvme_get_info(int fd, __u32 *nsid, __u32 *lba_sz, __u64 *nlba) -+{ -+ struct nvme_id_ns ns; -+ int namespace_id; -+ int err; -+ -+ namespace_id = ioctl(fd, NVME_IOCTL_ID); -+ if (namespace_id < 0) { -+ fprintf(stderr, "error failed to fetch namespace-id\n"); -+ close(fd); -+ return -errno; -+ } -+ -+ /* -+ * Identify namespace to get namespace-id, namespace size in LBA's -+ * and LBA data size. -+ */ -+ err = nvme_identify(fd, namespace_id, NVME_IDENTIFY_CNS_NS, -+ NVME_CSI_NVM, &ns); -+ if (err) { -+ fprintf(stderr, "error failed to fetch identify namespace\n"); -+ close(fd); -+ return err; -+ } -+ -+ *nsid = namespace_id; -+ *lba_sz = 1 << ns.lbaf[(ns.flbas & 0x0f)].ds; -+ *nlba = ns.nsze; -+ -+ return 0; -+} -+ - static unsigned long cycles_to_nsec(unsigned long cycles) - { - uint64_t val; -@@ -520,6 +572,65 @@ static void init_io(struct submitter *s, unsigned index) - sqe->user_data |= ((uint64_t)s->clock_index << 32); - } - -+static void init_io_pt(struct submitter *s, unsigned index) -+{ -+ struct io_uring_sqe *sqe = &s->sqes[index << 1]; -+ unsigned long offset; -+ struct file *f; -+ struct nvme_uring_cmd *cmd; -+ unsigned long long slba; -+ unsigned long long nlb; -+ long r; -+ -+ if (s->nr_files == 1) { -+ f = &s->files[0]; -+ } else { -+ f = &s->files[s->cur_file]; -+ if (f->pending_ios >= file_depth(s)) { -+ s->cur_file++; -+ if (s->cur_file == s->nr_files) -+ s->cur_file = 0; -+ f = &s->files[s->cur_file]; -+ } -+ } -+ f->pending_ios++; -+ -+ if (random_io) { -+ r = __rand64(&s->rand_state); -+ offset = (r % (f->max_blocks - 1)) * bs; -+ } else { -+ offset = f->cur_off; -+ f->cur_off += bs; -+ if (f->cur_off + bs > f->max_size) -+ f->cur_off = 0; -+ } -+ -+ if (register_files) { -+ sqe->fd = f->fixed_fd; -+ sqe->flags = IOSQE_FIXED_FILE; -+ } else { -+ sqe->fd = f->real_fd; -+ sqe->flags = 0; -+ } -+ sqe->opcode = IORING_OP_URING_CMD; -+ sqe->user_data = (unsigned long) f->fileno; -+ if (stats) -+ sqe->user_data |= ((unsigned long)s->clock_index << 32); -+ sqe->cmd_op = NVME_URING_CMD_IO; -+ slba = offset >> f->lba_shift; -+ nlb = (bs >> f->lba_shift) - 1; -+ cmd = (struct nvme_uring_cmd *)&sqe->cmd; -+ /* cdw10 and cdw11 represent starting slba*/ -+ cmd->cdw10 = slba & 0xffffffff; -+ cmd->cdw11 = slba >> 32; -+ /* cdw12 represent number of lba to be read*/ -+ cmd->cdw12 = nlb; -+ cmd->addr = (unsigned long) s->iovecs[index].iov_base; -+ cmd->data_len = bs; -+ cmd->nsid = f->nsid; -+ cmd->opcode = 2; -+} -+ - static int prep_more_ios_uring(struct submitter *s, int max_ios) - { - struct io_sq_ring *ring = &s->sq_ring; -@@ -532,7 +643,10 @@ static int prep_more_ios_uring(struct submitter *s, int max_ios) - break; - - index = tail & sq_ring_mask; -- init_io(s, index); -+ if (pt) -+ init_io_pt(s, index); -+ else -+ init_io(s, index); - ring->array[index] = index; - prepped++; - tail = next_tail; -@@ -549,7 +663,29 @@ static int get_file_size(struct file *f) - - if (fstat(f->real_fd, &st) < 0) - return -1; -- if (S_ISBLK(st.st_mode)) { -+ if (pt) { -+ __u64 nlba; -+ __u32 lbs; -+ int ret; -+ -+ if (!S_ISCHR(st.st_mode)) { -+ fprintf(stderr, "passthrough works with only nvme-ns " -+ "generic devices (/dev/ngXnY)\n"); -+ return -1; -+ } -+ ret = nvme_get_info(f->real_fd, &f->nsid, &lbs, &nlba); -+ if (ret) -+ return -1; -+ if ((bs % lbs) != 0) { -+ printf("error: bs:%d should be a multiple logical_block_size:%d\n", -+ bs, lbs); -+ return -1; -+ } -+ f->max_blocks = nlba / bs; -+ f->max_size = nlba; -+ f->lba_shift = ilog2(lbs); -+ return 0; -+ } else if (S_ISBLK(st.st_mode)) { - unsigned long long bytes; - - if (ioctl(f->real_fd, BLKGETSIZE64, &bytes) != 0) -@@ -620,6 +756,60 @@ static int reap_events_uring(struct submitter *s) - return reaped; - } - -+static int reap_events_uring_pt(struct submitter *s) -+{ -+ struct io_cq_ring *ring = &s->cq_ring; -+ struct io_uring_cqe *cqe; -+ unsigned head, reaped = 0; -+ int last_idx = -1, stat_nr = 0; -+ unsigned index; -+ int fileno; -+ -+ head = *ring->head; -+ do { -+ struct file *f; -+ -+ read_barrier(); -+ if (head == atomic_load_acquire(ring->tail)) -+ break; -+ index = head & cq_ring_mask; -+ cqe = &ring->cqes[index << 1]; -+ fileno = cqe->user_data & 0xffffffff; -+ f = &s->files[fileno]; -+ f->pending_ios--; -+ -+ if (cqe->res != 0) { -+ printf("io: unexpected ret=%d\n", cqe->res); -+ if (polled && cqe->res == -EINVAL) -+ printf("passthrough doesn't support polled IO\n"); -+ return -1; -+ } -+ if (stats) { -+ int clock_index = cqe->user_data >> 32; -+ -+ if (last_idx != clock_index) { -+ if (last_idx != -1) { -+ add_stat(s, last_idx, stat_nr); -+ stat_nr = 0; -+ } -+ last_idx = clock_index; -+ } -+ stat_nr++; -+ } -+ reaped++; -+ head++; -+ } while (1); -+ -+ if (stat_nr) -+ add_stat(s, last_idx, stat_nr); -+ -+ if (reaped) { -+ s->inflight -= reaped; -+ atomic_store_release(ring->head, head); -+ } -+ return reaped; -+} -+ - static void set_affinity(struct submitter *s) - { - #ifdef CONFIG_LIBNUMA -@@ -697,6 +887,7 @@ static int setup_ring(struct submitter *s) - struct io_uring_params p; - int ret, fd; - void *ptr; -+ size_t len; - - memset(&p, 0, sizeof(p)); - -@@ -709,6 +900,10 @@ static int setup_ring(struct submitter *s) - p.sq_thread_cpu = sq_thread_cpu; - } - } -+ if (pt) { -+ p.flags |= IORING_SETUP_SQE128; -+ p.flags |= IORING_SETUP_CQE32; -+ } - - fd = io_uring_setup(depth, &p); - if (fd < 0) { -@@ -761,11 +956,22 @@ static int setup_ring(struct submitter *s) - sring->array = ptr + p.sq_off.array; - sq_ring_mask = *sring->ring_mask; - -- s->sqes = mmap(0, p.sq_entries * sizeof(struct io_uring_sqe), -+ if (p.flags & IORING_SETUP_SQE128) -+ len = 2 * p.sq_entries * sizeof(struct io_uring_sqe); -+ else -+ len = p.sq_entries * sizeof(struct io_uring_sqe); -+ s->sqes = mmap(0, len, - PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE, fd, - IORING_OFF_SQES); - -- ptr = mmap(0, p.cq_off.cqes + p.cq_entries * sizeof(struct io_uring_cqe), -+ if (p.flags & IORING_SETUP_CQE32) { -+ len = p.cq_off.cqes + -+ 2 * p.cq_entries * sizeof(struct io_uring_cqe); -+ } else { -+ len = p.cq_off.cqes + -+ p.cq_entries * sizeof(struct io_uring_cqe); -+ } -+ ptr = mmap(0, len, - PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE, fd, - IORING_OFF_CQ_RING); - cring->head = ptr + p.cq_off.head; -@@ -855,7 +1061,16 @@ static int submitter_init(struct submitter *s) - s->plat = NULL; - nr_batch = 0; - } -+ /* perform the expensive command initialization part for passthrough here -+ * rather than in the fast path -+ */ -+ if (pt) { -+ for (i = 0; i < roundup_pow2(depth); i++) { -+ struct io_uring_sqe *sqe = &s->sqes[i << 1]; - -+ memset(&sqe->cmd, 0, sizeof(struct nvme_uring_cmd)); -+ } -+ } - return nr_batch; - } - -@@ -1111,7 +1326,10 @@ submit: - do { - int r; - -- r = reap_events_uring(s); -+ if (pt) -+ r = reap_events_uring_pt(s); -+ else -+ r = reap_events_uring(s); - if (r == -1) { - s->finish = 1; - break; -@@ -1305,11 +1523,12 @@ static void usage(char *argv, int status) - " -a : Use legacy aio, default %d\n" - " -S : Use sync IO (preadv2), default %d\n" - " -X : Use registered ring %d\n" -- " -P : Automatically place on device home node %d\n", -+ " -P : Automatically place on device home node %d\n" -+ " -u : Use nvme-passthrough I/O, default %d\n", - argv, DEPTH, BATCH_SUBMIT, BATCH_COMPLETE, BS, polled, - fixedbufs, dma_map, register_files, nthreads, !buffered, do_nop, - stats, runtime == 0 ? "unlimited" : runtime_str, random_io, aio, -- use_sync, register_ring, numa_placement); -+ use_sync, register_ring, numa_placement, pt); - exit(status); - } - -@@ -1368,7 +1587,7 @@ int main(int argc, char *argv[]) - if (!do_nop && argc < 2) - usage(argv[0], 1); - -- while ((opt = getopt(argc, argv, "d:s:c:b:p:B:F:n:N:O:t:T:a:r:D:R:X:S:P:h?")) != -1) { -+ while ((opt = getopt(argc, argv, "d:s:c:b:p:B:F:n:N:O:t:T:a:r:D:R:X:S:P:u:h?")) != -1) { - switch (opt) { - case 'a': - aio = !!atoi(optarg); -@@ -1449,6 +1668,9 @@ int main(int argc, char *argv[]) - case 'P': - numa_placement = !!atoi(optarg); - break; -+ case 'u': -+ pt = !!atoi(optarg); -+ break; - case 'h': - case '?': - default: diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0024-t-io_uring-fix-64-bit-cast-on-32-bit-archs.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0024-t-io_uring-fix-64-bit-cast-on-32-bit-archs.patch deleted file mode 100644 index ba687e0418..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0024-t-io_uring-fix-64-bit-cast-on-32-bit-archs.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 286bed8bc95fbc7d8a1d00b1861037bc215948ee Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Fri, 26 Aug 2022 07:52:54 -0600 -Subject: [PATCH] t/io_uring: fix 64-bit cast on 32-bit archs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -gcc complains that: - -t/io_uring.c: In function ‘init_io_pt’: -t/io_uring.c:618:52: error: left shift count >= width of type [-Werror=shift-count-overflow] - 618 | sqe->user_data |= ((unsigned long)s->clock_index << 32); - | ^~ - -we're shifting more than the size of the type. Cast to a 64-bit value -so that it'll work on 32-bit as well. - -Fixes: 7d04588a7663 ("t/io_uring: add support for async-passthru") -Signed-off-by: Jens Axboe ---- - t/io_uring.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/io_uring.c b/t/io_uring.c -index 0a90f85c..b90bcf78 100644 ---- a/t/io_uring.c -+++ b/t/io_uring.c -@@ -615,7 +615,7 @@ static void init_io_pt(struct submitter *s, unsigned index) - sqe->opcode = IORING_OP_URING_CMD; - sqe->user_data = (unsigned long) f->fileno; - if (stats) -- sqe->user_data |= ((unsigned long)s->clock_index << 32); -+ sqe->user_data |= ((__u64) s->clock_index << 32ULL); - sqe->cmd_op = NVME_URING_CMD_IO; - slba = offset >> f->lba_shift; - nlb = (bs >> f->lba_shift) - 1; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0025-test-add-basic-test-for-io_uring-ioengine.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0025-test-add-basic-test-for-io_uring-ioengine.patch deleted file mode 100644 index 7472eea628..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0025-test-add-basic-test-for-io_uring-ioengine.patch +++ /dev/null @@ -1,91 +0,0 @@ -From c3df3532a507e6d7c66339dee6eb022feab68f59 Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Thu, 25 Aug 2022 12:08:33 -0700 -Subject: [PATCH] test: add basic test for io_uring ioengine - -We should have a quick smoke test for the io_uring ioengine to -automatically detect breakage. - -Signed-off-by: Vincent Fu ---- - t/jobs/t0018.fio | 9 +++++++++ - t/run-fio-tests.py | 22 ++++++++++++++++++++++ - 2 files changed, 31 insertions(+) - create mode 100644 t/jobs/t0018.fio - -diff --git a/t/jobs/t0018.fio b/t/jobs/t0018.fio -new file mode 100644 -index 00000000..e2298b1f ---- /dev/null -+++ b/t/jobs/t0018.fio -@@ -0,0 +1,9 @@ -+# Expected result: job completes without error -+# Buggy result: job fails -+ -+[test] -+ioengine=io_uring -+filesize=256K -+time_based -+runtime=3s -+rw=randrw -diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py -index 504b7cdb..1e5e9f24 100755 ---- a/t/run-fio-tests.py -+++ b/t/run-fio-tests.py -@@ -582,6 +582,7 @@ class Requirements(object): - - _linux = False - _libaio = False -+ _io_uring = False - _zbd = False - _root = False - _zoned_nullb = False -@@ -605,6 +606,12 @@ class Requirements(object): - Requirements._zbd = "CONFIG_HAS_BLKZONED" in contents - Requirements._libaio = "CONFIG_LIBAIO" in contents - -+ contents, success = FioJobTest.get_file("/proc/kallsyms") -+ if not success: -+ print("Unable to open '/proc/kallsyms' to probe for io_uring support") -+ else: -+ Requirements._io_uring = "io_uring_setup" in contents -+ - Requirements._root = (os.geteuid() == 0) - if Requirements._zbd and Requirements._root: - try: -@@ -627,6 +634,7 @@ class Requirements(object): - - req_list = [Requirements.linux, - Requirements.libaio, -+ Requirements.io_uring, - Requirements.zbd, - Requirements.root, - Requirements.zoned_nullb, -@@ -648,6 +656,11 @@ class Requirements(object): - """Is libaio available?""" - return Requirements._libaio, "libaio required" - -+ @classmethod -+ def io_uring(cls): -+ """Is io_uring available?""" -+ return Requirements._io_uring, "io_uring required" -+ - @classmethod - def zbd(cls): - """Is ZBD support available?""" -@@ -867,6 +880,15 @@ TEST_LIST = [ - 'output_format': 'json', - 'requirements': [Requirements.not_windows], - }, -+ { -+ 'test_id': 18, -+ 'test_class': FioJobTest, -+ 'job': 't0018.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'requirements': [Requirements.linux, Requirements.io_uring], -+ }, - { - 'test_id': 1000, - 'test_class': FioExeTest, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0026-t-io_uring-remove-duplicate-definition-of-gettid.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0026-t-io_uring-remove-duplicate-definition-of-gettid.patch deleted file mode 100644 index c75ec36d18..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0026-t-io_uring-remove-duplicate-definition-of-gettid.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 575bea1c9b642a11ac5b7162aea6a9f905c60318 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Fri, 26 Aug 2022 14:14:44 -0600 -Subject: [PATCH] t/io_uring: remove duplicate definition of gettid() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With a recent change, we now include os.h through nvme.h, and this -can cause a duplicate gettid() definition: - -t/io_uring.c:499:12: error: redefinition of ‘gettid’ - static int gettid(void) - ^~~~~~ -In file included from t/../engines/../os/os.h:39, - from t/../engines/../thread_options.h:5, - from t/../engines/../fio.h:18, - from t/../engines/nvme.h:10, - from t/io_uring.c:38: -t/../engines/../os/os-linux.h:147:19: note: previous definition of -‘gettid’ was here - static inline int gettid(void) - ^~~~~~ - -Include os.h directly to make it clear that we use it, and remove the -gettid() definition from io_uring.c. - -Reported-by: Yi Zhang -Signed-off-by: Jens Axboe ---- - t/io_uring.c | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -diff --git a/t/io_uring.c b/t/io_uring.c -index b90bcf78..e8e41796 100644 ---- a/t/io_uring.c -+++ b/t/io_uring.c -@@ -30,6 +30,7 @@ - #include - - #include "../arch/arch.h" -+#include "../os/os.h" - #include "../lib/types.h" - #include "../lib/roundup.h" - #include "../lib/rand.h" -@@ -495,13 +496,6 @@ static int io_uring_enter(struct submitter *s, unsigned int to_submit, - #endif - } - --#ifndef CONFIG_HAVE_GETTID --static int gettid(void) --{ -- return syscall(__NR_gettid); --} --#endif -- - static unsigned file_depth(struct submitter *s) - { - return (depth + s->nr_files - 1) / s->nr_files; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0027-test-add-some-tests-for-seq-and-rand-offsets.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0027-test-add-some-tests-for-seq-and-rand-offsets.patch deleted file mode 100644 index 2abd449b8b..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0027-test-add-some-tests-for-seq-and-rand-offsets.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 1eef6cddda678b0d1a120970bc4cc961c285c81e Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 29 Aug 2022 11:30:30 -0400 -Subject: [PATCH] test: add some tests for seq and rand offsets - -t/jobs/t0019.fio is a seq read test -t/jobs/t0020.fio is a rand read test - -We don't have any automated tests which make sure that sequential access -patterns are actually sequential and that random access patterns are not -sequential. Add these two tests to help detect the possibility that -these features could break. - -Signed-off-by: Vincent Fu ---- - t/jobs/t0019.fio | 10 ++++++ - t/jobs/t0020.fio | 11 ++++++ - t/run-fio-tests.py | 84 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 105 insertions(+) - create mode 100644 t/jobs/t0019.fio - create mode 100644 t/jobs/t0020.fio - -diff --git a/t/jobs/t0019.fio b/t/jobs/t0019.fio -new file mode 100644 -index 00000000..b60d27d2 ---- /dev/null -+++ b/t/jobs/t0019.fio -@@ -0,0 +1,10 @@ -+# Expected result: offsets are accessed sequentially and all offsets are read -+# Buggy result: offsets are not accessed sequentially and one or more offsets are missed -+# run with --debug=io or logging to see which offsets are accessed -+ -+[test] -+ioengine=null -+filesize=1M -+write_bw_log=test -+per_job_logs=0 -+log_offset=1 -diff --git a/t/jobs/t0020.fio b/t/jobs/t0020.fio -new file mode 100644 -index 00000000..1c1c5166 ---- /dev/null -+++ b/t/jobs/t0020.fio -@@ -0,0 +1,11 @@ -+# Expected result: offsets are not accessed sequentially and all offsets are touched -+# Buggy result: offsets are accessed sequentially and one or more offsets are missed -+# run with --debug=io or logging to see which offsets are read -+ -+[test] -+ioengine=null -+filesize=1M -+rw=randread -+write_bw_log=test -+per_job_logs=0 -+log_offset=1 -diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py -index 1e5e9f24..78f43521 100755 ---- a/t/run-fio-tests.py -+++ b/t/run-fio-tests.py -@@ -548,6 +548,72 @@ class FioJobTest_t0015(FioJobTest): - self.passed = False - - -+class FioJobTest_t0019(FioJobTest): -+ """Test consists of fio test job t0019 -+ Confirm that all offsets were touched sequentially""" -+ -+ def check_result(self): -+ super(FioJobTest_t0019, self).check_result() -+ -+ bw_log_filename = os.path.join(self.test_dir, "test_bw.log") -+ file_data, success = self.get_file(bw_log_filename) -+ log_lines = file_data.split('\n') -+ -+ prev = -4096 -+ for line in log_lines: -+ if len(line.strip()) == 0: -+ continue -+ cur = int(line.split(',')[4]) -+ if cur - prev != 4096: -+ self.passed = False -+ self.failure_reason = "offsets {0}, {1} not sequential".format(prev, cur) -+ return -+ prev = cur -+ -+ if cur/4096 != 255: -+ self.passed = False -+ self.failure_reason = "unexpected last offset {0}".format(cur) -+ -+ -+class FioJobTest_t0020(FioJobTest): -+ """Test consists of fio test job t0020 -+ Confirm that almost all offsets were touched non-sequentially""" -+ -+ def check_result(self): -+ super(FioJobTest_t0020, self).check_result() -+ -+ bw_log_filename = os.path.join(self.test_dir, "test_bw.log") -+ file_data, success = self.get_file(bw_log_filename) -+ log_lines = file_data.split('\n') -+ -+ seq_count = 0 -+ offsets = set() -+ -+ prev = int(log_lines[0].split(',')[4]) -+ for line in log_lines[1:]: -+ offsets.add(prev/4096) -+ if len(line.strip()) == 0: -+ continue -+ cur = int(line.split(',')[4]) -+ if cur - prev == 4096: -+ seq_count += 1 -+ prev = cur -+ -+ # 10 is an arbitrary threshold -+ if seq_count > 10: -+ self.passed = False -+ self.failure_reason = "too many ({0}) consecutive offsets".format(seq_count) -+ -+ if len(offsets) != 256: -+ self.passed = False -+ self.failure_reason += " number of offsets is {0} instead of 256".format(len(offsets)) -+ -+ for i in range(256): -+ if not i in offsets: -+ self.passed = False -+ self.failure_reason += " missing offset {0}".format(i*4096) -+ -+ - class FioJobTest_iops_rate(FioJobTest): - """Test consists of fio test job t0009 - Confirm that job0 iops == 1000 -@@ -889,6 +955,24 @@ TEST_LIST = [ - 'pre_success': None, - 'requirements': [Requirements.linux, Requirements.io_uring], - }, -+ { -+ 'test_id': 19, -+ 'test_class': FioJobTest_t0019, -+ 'job': 't0019.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'requirements': [], -+ }, -+ { -+ 'test_id': 20, -+ 'test_class': FioJobTest_t0020, -+ 'job': 't0020.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'requirements': [], -+ }, - { - 'test_id': 1000, - 'test_class': FioExeTest, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0028-test-use-Ubuntu-22.04-for-64-bit-tests.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0028-test-use-Ubuntu-22.04-for-64-bit-tests.patch deleted file mode 100644 index b471d9c325..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0028-test-use-Ubuntu-22.04-for-64-bit-tests.patch +++ /dev/null @@ -1,72 +0,0 @@ -From abfe30b1fe8118a4ff935bd7cb03243329eba4b8 Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 29 Aug 2022 14:24:16 -0400 -Subject: [PATCH] test: use Ubuntu 22.04 for 64-bit tests - -On 22.04 there was a conflict among libunwind-14-dev, libunwind-dev, and -libunwind8 that was resolved by removing libunwind-14-dev. - -The 32-bit Ubuntu setup steps require more attention to get them to work -on 22.04. Stay on 20.04 for now and figure it out later. - -Starting pkgProblemResolver with broken count: 1 -Starting 2 pkgProblemResolver with broken count: 1 -Investigating (0) libunwind-14-dev:amd64 < 1:14.0.0-1ubuntu1 @ii K Ib > -Broken libunwind-14-dev:amd64 Breaks on libunwind-dev:amd64 < none -> 1.3.2-2build2 @un puN > - Considering libunwind-dev:amd64 -1 as a solution to libunwind-14-dev:amd64 2 -Done -Some packages could not be installed. This may mean that you have -requested an impossible situation or if you are using the unstable -distribution that some required packages have not yet been created -or been moved out of Incoming. -The following information may help to resolve the situation: - -The following packages have unmet dependencies: - libunwind-14-dev : Breaks: libunwind-dev but 1.3.2-2build2 is to be installed -E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. - -Signed-off-by: Vincent Fu ---- - .github/workflows/ci.yml | 6 +++--- - ci/actions-install.sh | 2 ++ - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml -index 650366b2..85104e5a 100644 ---- a/.github/workflows/ci.yml -+++ b/.github/workflows/ci.yml -@@ -18,10 +18,10 @@ jobs: - - android - include: - - build: linux-gcc -- os: ubuntu-20.04 -+ os: ubuntu-22.04 - cc: gcc - - build: linux-clang -- os: ubuntu-20.04 -+ os: ubuntu-22.04 - cc: clang - - build: macos - os: macos-11 -@@ -29,7 +29,7 @@ jobs: - os: ubuntu-20.04 - arch: i686 - - build: android -- os: ubuntu-20.04 -+ os: ubuntu-22.04 - arch: aarch64-linux-android32 - - env: -diff --git a/ci/actions-install.sh b/ci/actions-install.sh -index b5c4198f..7017de2a 100755 ---- a/ci/actions-install.sh -+++ b/ci/actions-install.sh -@@ -54,6 +54,8 @@ DPKGCFG - libtcmalloc-minimal4 - nvidia-cuda-dev - ) -+ echo "Removing libunwind-14-dev because of conflicts with libunwind-dev" -+ sudo apt remove -y libunwind-14-dev - ;; - esac - diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0029-test-get-32-bit-Ubuntu-22.04-build-working.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0029-test-get-32-bit-Ubuntu-22.04-build-working.patch deleted file mode 100644 index 163ebf3b33..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0029-test-get-32-bit-Ubuntu-22.04-build-working.patch +++ /dev/null @@ -1,79 +0,0 @@ -From aa1075ba2ff300e4017bd7813423f63b1fbc325f Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Mon, 29 Aug 2022 15:15:56 -0400 -Subject: [PATCH] test: get 32-bit Ubuntu 22.04 build working - -Ubuntu 22.04 no longer has i386 builds for the packages libibverbs and -librdmacm. So stop trying to install those packages for the 32-bit -build. - -Signed-off-by: Vincent Fu ---- - .github/workflows/ci.yml | 2 +- - ci/actions-install.sh | 11 ++++------- - 2 files changed, 5 insertions(+), 8 deletions(-) - -diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml -index 85104e5a..bdc4db85 100644 ---- a/.github/workflows/ci.yml -+++ b/.github/workflows/ci.yml -@@ -26,7 +26,7 @@ jobs: - - build: macos - os: macos-11 - - build: linux-i686-gcc -- os: ubuntu-20.04 -+ os: ubuntu-22.04 - arch: i686 - - build: android - os: ubuntu-22.04 -diff --git a/ci/actions-install.sh b/ci/actions-install.sh -index 7017de2a..c209a089 100755 ---- a/ci/actions-install.sh -+++ b/ci/actions-install.sh -@@ -23,26 +23,21 @@ DPKGCFG - libcunit1-dev - libcurl4-openssl-dev - libfl-dev -- libibverbs-dev - libnuma-dev -- librdmacm-dev - libnfs-dev - valgrind - ) - case "${CI_TARGET_ARCH}" in - "i686") - sudo dpkg --add-architecture i386 -- opts="--allow-downgrades" - pkgs=("${pkgs[@]/%/:i386}") - pkgs+=( - gcc-multilib - pkg-config:i386 - zlib1g-dev:i386 -- libpcre2-8-0=10.34-7 - ) - ;; - "x86_64") -- opts="" - pkgs+=( - libglusterfs-dev - libgoogle-perftools-dev -@@ -53,6 +48,8 @@ DPKGCFG - librbd-dev - libtcmalloc-minimal4 - nvidia-cuda-dev -+ libibverbs-dev -+ librdmacm-dev - ) - echo "Removing libunwind-14-dev because of conflicts with libunwind-dev" - sudo apt remove -y libunwind-14-dev -@@ -68,8 +65,8 @@ DPKGCFG - - echo "Updating APT..." - sudo apt-get -qq update -- echo "Installing packages..." -- sudo apt-get install "$opts" -o APT::Immediate-Configure=false --no-install-recommends -qq -y "${pkgs[@]}" -+ echo "Installing packages... ${pkgs[@]}" -+ sudo apt-get install -o APT::Immediate-Configure=false --no-install-recommends -qq -y "${pkgs[@]}" - } - - install_linux() { diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0030-test-add-tests-for-lfsr-and-norandommap.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0030-test-add-tests-for-lfsr-and-norandommap.patch deleted file mode 100644 index fa1d49e145..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0030-test-add-tests-for-lfsr-and-norandommap.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 8d2b6305a6d0497bc6d78832be256380b1691694 Mon Sep 17 00:00:00 2001 -From: Vincent Fu -Date: Tue, 30 Aug 2022 09:59:55 -0400 -Subject: [PATCH] test: add tests for lfsr and norandommap - -t0021 checks whether the lfsr random generator actually touches every -offset. - -t0022 checks whether fio touches offsets more than once when -norandommap=1. - -We should have automated tests for basic functionality to detect -problems early. - -Signed-off-by: Vincent Fu ---- - t/jobs/t0021.fio | 15 +++++++++++++ - t/jobs/t0022.fio | 13 +++++++++++ - t/run-fio-tests.py | 55 +++++++++++++++++++++++++++++++++++++++++++++- - 3 files changed, 82 insertions(+), 1 deletion(-) - create mode 100644 t/jobs/t0021.fio - create mode 100644 t/jobs/t0022.fio - -diff --git a/t/jobs/t0021.fio b/t/jobs/t0021.fio -new file mode 100644 -index 00000000..47fbae71 ---- /dev/null -+++ b/t/jobs/t0021.fio -@@ -0,0 +1,15 @@ -+# make sure the lfsr random generator actually does touch all the offsets -+# -+# Expected result: offsets are not accessed sequentially and all offsets are touched -+# Buggy result: offsets are accessed sequentially and one or more offsets are missed -+# run with --debug=io or logging to see which offsets are read -+ -+[test] -+ioengine=null -+filesize=1M -+rw=randread -+write_bw_log=test -+per_job_logs=0 -+log_offset=1 -+norandommap=1 -+random_generator=lfsr -diff --git a/t/jobs/t0022.fio b/t/jobs/t0022.fio -new file mode 100644 -index 00000000..2324571e ---- /dev/null -+++ b/t/jobs/t0022.fio -@@ -0,0 +1,13 @@ -+# make sure that when we enable norandommap we touch some offsets more than once -+# -+# Expected result: at least one offset is touched more than once -+# Buggy result: each offset is touched only once -+ -+[test] -+ioengine=null -+filesize=1M -+rw=randread -+write_bw_log=test -+per_job_logs=0 -+log_offset=1 -+norandommap=1 -diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py -index 78f43521..47823761 100755 ---- a/t/run-fio-tests.py -+++ b/t/run-fio-tests.py -@@ -576,7 +576,7 @@ class FioJobTest_t0019(FioJobTest): - - - class FioJobTest_t0020(FioJobTest): -- """Test consists of fio test job t0020 -+ """Test consists of fio test jobs t0020 and t0021 - Confirm that almost all offsets were touched non-sequentially""" - - def check_result(self): -@@ -614,6 +614,41 @@ class FioJobTest_t0020(FioJobTest): - self.failure_reason += " missing offset {0}".format(i*4096) - - -+class FioJobTest_t0022(FioJobTest): -+ """Test consists of fio test job t0022""" -+ -+ def check_result(self): -+ super(FioJobTest_t0022, self).check_result() -+ -+ bw_log_filename = os.path.join(self.test_dir, "test_bw.log") -+ file_data, success = self.get_file(bw_log_filename) -+ log_lines = file_data.split('\n') -+ -+ filesize = 1024*1024 -+ bs = 4096 -+ seq_count = 0 -+ offsets = set() -+ -+ prev = int(log_lines[0].split(',')[4]) -+ for line in log_lines[1:]: -+ offsets.add(prev/bs) -+ if len(line.strip()) == 0: -+ continue -+ cur = int(line.split(',')[4]) -+ if cur - prev == bs: -+ seq_count += 1 -+ prev = cur -+ -+ # 10 is an arbitrary threshold -+ if seq_count > 10: -+ self.passed = False -+ self.failure_reason = "too many ({0}) consecutive offsets".format(seq_count) -+ -+ if len(offsets) == filesize/bs: -+ self.passed = False -+ self.failure_reason += " no duplicate offsets found with norandommap=1".format(len(offsets)) -+ -+ - class FioJobTest_iops_rate(FioJobTest): - """Test consists of fio test job t0009 - Confirm that job0 iops == 1000 -@@ -973,6 +1008,24 @@ TEST_LIST = [ - 'pre_success': None, - 'requirements': [], - }, -+ { -+ 'test_id': 21, -+ 'test_class': FioJobTest_t0020, -+ 'job': 't0021.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'requirements': [], -+ }, -+ { -+ 'test_id': 22, -+ 'test_class': FioJobTest_t0022, -+ 'job': 't0022.fio', -+ 'success': SUCCESS_DEFAULT, -+ 'pre_job': None, -+ 'pre_success': None, -+ 'requirements': [], -+ }, - { - 'test_id': 1000, - 'test_class': FioExeTest, diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0031-backend-revert-bad-memory-leak-fix.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0031-backend-revert-bad-memory-leak-fix.patch deleted file mode 100644 index 335798cea7..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0031-backend-revert-bad-memory-leak-fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c060732180c981712f9a6fb7108c28a3c301c2c3 Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Tue, 30 Aug 2022 10:48:18 -0600 -Subject: [PATCH] backend: revert bad memory leak fix - -This essentially reverts the commit mentioned in the fixes line, as it -causes crashes with using a trigger timeout + command. - -Fixes: 807473c36e10 ("fixed memory leak detected by ASAN") -Signed-off-by: Jens Axboe ---- - backend.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/backend.c b/backend.c -index 375a23e4..fe614f6e 100644 ---- a/backend.c -+++ b/backend.c -@@ -2451,10 +2451,8 @@ reap: - strerror(ret)); - } else { - pid_t pid; -- struct fio_file **files; - void *eo; - dprint(FD_PROCESS, "will fork\n"); -- files = td->files; - eo = td->eo; - read_barrier(); - pid = fork(); -@@ -2465,9 +2463,6 @@ reap: - _exit(ret); - } else if (i == fio_debug_jobno) - *fio_debug_jobp = pid; -- // freeing previously allocated memory for files -- // this memory freed MUST NOT be shared between processes, only the pointer itself may be shared within TD -- free(files); - free(eo); - free(fd); - fd = NULL; diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0032-Fio-3.32.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0032-Fio-3.32.patch deleted file mode 100644 index 6aa86d1fcf..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0032-Fio-3.32.patch +++ /dev/null @@ -1,23 +0,0 @@ -From aaad03c6c8a9ef8cc0507a356a9fa2372e1f611b Mon Sep 17 00:00:00 2001 -From: Jens Axboe -Date: Tue, 30 Aug 2022 10:51:13 -0600 -Subject: [PATCH] Fio 3.32 - -Signed-off-by: Jens Axboe ---- - FIO-VERSION-GEN | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/FIO-VERSION-GEN b/FIO-VERSION-GEN -index 72630dd0..db073818 100755 ---- a/FIO-VERSION-GEN -+++ b/FIO-VERSION-GEN -@@ -1,7 +1,7 @@ - #!/bin/sh - - GVF=FIO-VERSION-FILE --DEF_VER=fio-3.31 -+DEF_VER=fio-3.32 - - LF=' - ' diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_2022.bb b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_2022.bb deleted file mode 100644 index 108b2b5c10..0000000000 --- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_2022.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "Filesystem and hardware benchmark and stress tool" -DESCRIPTION = "fio is an I/O tool meant to be used both for benchmark and \ -stress/hardware verification. It has support for a number of I/O engines, \ -I/O priorities (for newer Linux kernels), rate I/O, forked or threaded jobs, \ -and much more. It can work on block devices as well as files. fio accepts \ -job descriptions in a simple-to-understand text format. Several example job \ -files are included. fio displays all sorts of I/O performance information." -HOMEPAGE = "http://freecode.com/projects/fio" -SECTION = "console/tests" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "libaio zlib coreutils-native" -DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'pmem', 'pmdk', '', d)}" -RDEPENDS:${PN} = "python3-core bash" - -PACKAGECONFIG_NUMA = "numa" -# ARM does not currently support NUMA -PACKAGECONFIG_NUMA:arm = "" -PACKAGECONFIG_NUMA:armeb = "" - -PACKAGECONFIG ??= "${PACKAGECONFIG_NUMA}" -PACKAGECONFIG[numa] = ",--disable-numa,numactl" - -SRCREV = "6e44f31b9241cdc56d0857fb10ddb2ec40faa541" -SRC_URI = "git://git.kernel.dk/fio.git;branch=master \ - file://0001-Fio-3.31.patch \ - file://0002-lib-rand-Enhance-__fill_random_buf-using-the-multi-r.patch \ - file://0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch \ - file://0004-ioengines-merge-filecreate-filestat-filedelete-engin.patch \ - file://0005-engines-http-Add-storage-class-option-for-s3.patch \ - file://0006-engines-http-Add-s3-crypto-options-for-s3.patch \ - file://0007-doc-Add-usage-and-example-about-s3-storage-class-and.patch \ - file://0008-README-link-to-GitHub-releases-for-Windows.patch \ - file://0009-engines-xnvme-fix-segfault-issue-with-xnvme-ioengine.patch \ - file://0010-doc-update-fio-doc-for-xnvme-engine.patch \ - file://0011-test-add-latency-test-using-posixaio-ioengine.patch \ - file://0012-test-fix-hash-for-t0016.patch \ - file://0013-doc-get-rid-of-trailing-whitespace.patch \ - file://0014-doc-clarify-that-I-O-errors-may-go-unnoticed-without.patch \ - file://0015-Revert-Minor-style-fixups.patch \ - file://0016-Revert-Fix-multithread-issues-when-operating-on-a-si.patch \ - file://0017-Add-wait-for-handling-SIGBREAK.patch \ - file://0018-engines-io_uring-pass-back-correct-error-value-when-.patch \ - file://0019-Enable-CPU-affinity-support-on-Android.patch \ - file://0020-io_uring-Replace-pthread_self-with-s-tid.patch \ - file://0021-engines-io_uring-delete-debug-code.patch \ - file://0022-t-io_uring-prep-for-including-engines-nvme.h-in-t-io.patch \ - file://0023-t-io_uring-add-support-for-async-passthru.patch \ - file://0024-t-io_uring-fix-64-bit-cast-on-32-bit-archs.patch \ - file://0025-test-add-basic-test-for-io_uring-ioengine.patch \ - file://0026-t-io_uring-remove-duplicate-definition-of-gettid.patch \ - file://0027-test-add-some-tests-for-seq-and-rand-offsets.patch \ - file://0028-test-use-Ubuntu-22.04-for-64-bit-tests.patch \ - file://0029-test-get-32-bit-Ubuntu-22.04-build-working.patch \ - file://0030-test-add-tests-for-lfsr-and-norandommap.patch \ - file://0031-backend-revert-bad-memory-leak-fix.patch \ - file://0032-Fio-3.32.patch \ - " - -S = "${WORKDIR}/git" - -# avoids build breaks when using no-static-libs.inc -DISABLE_STATIC = "" - -EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}'" -EXTRA_OECONF = "${@bb.utils.contains('MACHINE_FEATURES', 'x86', '--disable-optimizations', '', d)}" - -do_configure() { - ./configure ${EXTRA_OECONF} -} - -do_install() { - oe_runmake install DESTDIR=${D} prefix=${prefix} mandir=${mandir} - install -d ${D}/${docdir}/${PN} - cp -R --no-dereference --preserve=mode,links -v ${S}/examples ${D}/${docdir}/${PN}/ -} diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.32.bb b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.32.bb new file mode 100644 index 0000000000..90e28340c6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.32.bb @@ -0,0 +1,44 @@ +SUMMARY = "Filesystem and hardware benchmark and stress tool" +DESCRIPTION = "fio is an I/O tool meant to be used both for benchmark and \ +stress/hardware verification. It has support for a number of I/O engines, \ +I/O priorities (for newer Linux kernels), rate I/O, forked or threaded jobs, \ +and much more. It can work on block devices as well as files. fio accepts \ +job descriptions in a simple-to-understand text format. Several example job \ +files are included. fio displays all sorts of I/O performance information." +HOMEPAGE = "http://freecode.com/projects/fio" +SECTION = "console/tests" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "libaio zlib coreutils-native" +DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'pmem', 'pmdk', '', d)}" +RDEPENDS:${PN} = "python3-core bash" + +PACKAGECONFIG_NUMA = "numa" +# ARM does not currently support NUMA +PACKAGECONFIG_NUMA:arm = "" +PACKAGECONFIG_NUMA:armeb = "" + +PACKAGECONFIG ??= "${PACKAGECONFIG_NUMA}" +PACKAGECONFIG[numa] = ",--disable-numa,numactl" + +SRCREV = "db7fc8d864dc4fb607a0379333a0db60431bd649" +SRC_URI = "git://git.kernel.dk/fio.git;branch=master" + +S = "${WORKDIR}/git" + +# avoids build breaks when using no-static-libs.inc +DISABLE_STATIC = "" + +EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}'" +EXTRA_OECONF = "${@bb.utils.contains('MACHINE_FEATURES', 'x86', '--disable-optimizations', '', d)}" + +do_configure() { + ./configure ${EXTRA_OECONF} +} + +do_install() { + oe_runmake install DESTDIR=${D} prefix=${prefix} mandir=${mandir} + install -d ${D}/${docdir}/${PN} + cp -R --no-dereference --preserve=mode,links -v ${S}/examples ${D}/${docdir}/${PN}/ +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.7.7.bb b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.7.7.bb deleted file mode 100644 index 3deab25ea5..0000000000 --- a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.7.7.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A library to abstract stream I/O like serial port, TCP, telnet, etc" -HOMEPAGE = "https://github.com/cminyard/gensio" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - " - -SRCREV = "6af40181c33bf97bde8cb99cccc4c2168abcd24e" - -SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit autotools - -PACKAGECONFIG ??= "openssl tcp-wrappers" - -PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_HOST}${prefix},--without-openssl, openssl" -PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers, tcp-wrappers" -PACKAGECONFIG[swig] = "--with-swig,--without-swig, swig" - -EXTRA_OECONF = "--without-python" - -RDEPENDS:${PN} += "bash" - -FILES:${PN}-staticdev += "${libexecdir}/gensio/${PV}/libgensio_*.a" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.0.bb new file mode 100644 index 0000000000..65fcf0a3ab --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "A library to abstract stream I/O like serial port, TCP, telnet, etc" +HOMEPAGE = "https://github.com/cminyard/gensio" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + " + +SRCREV = "2f959c4596d87461a84f6132ca596754ca0beeda" + +SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG ??= "openssl tcp-wrappers" + +PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_HOST}${prefix},--without-openssl, openssl" +PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers, tcp-wrappers" +PACKAGECONFIG[swig] = "--with-swig,--without-swig, swig" + +EXTRA_OECONF = "--without-python" + +RDEPENDS:${PN} += "bash" + +FILES:${PN}-staticdev += "${libexecdir}/gensio/${PV}/libgensio_*.a" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch index ae54469927..b117dcf670 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch @@ -1,18 +1,16 @@ -From ecfc8e287eb6811e42c4e2800a913822f554d7c8 Mon Sep 17 00:00:00 2001 +From 6120cee594c543d17ae015bc601012debcf57177 Mon Sep 17 00:00:00 2001 From: Khem Raj -Date: Wed, 31 Aug 2022 19:09:18 -0700 +Date: Mon, 23 Oct 2023 10:43:42 +0100 Subject: [PATCH] include string.h for strncpy() -Upstream-Status: Pending - Signed-off-by: Khem Raj - +Upstream-Status: Backport [master: 6120cee594c543d17ae015bc601012debcf57177] --- interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/interface.c b/interface.c -index 29229ad..9a83c36 100644 +index 29229ad6f53d..9a83c36933e7 100644 --- a/interface.c +++ b/interface.c @@ -5,6 +5,7 @@ @@ -23,3 +21,6 @@ index 29229ad..9a83c36 100644 #include "interface.h" struct interface { +-- +2.34.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch index e6a3386df0..3cf3a63b94 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch @@ -1,6 +1,6 @@ -From 2cc19a679ec37715df546dd9f00d8d9b0ab20059 Mon Sep 17 00:00:00 2001 +From cffb4807ac0b9ff7aea2aa4f3842985b5363d184 Mon Sep 17 00:00:00 2001 From: Luca Fancellu -Date: Wed, 18 Oct 2023 11:10:18 +0100 +Date: Mon, 23 Oct 2023 10:43:43 +0100 Subject: [PATCH] linuxptp: Use ${CC} in incdefs.sh The Makefile is defining CC and incdefs.sh is using @@ -8,13 +8,14 @@ ${CROSS_COMPILE}cpp inside it, allowing both to use different compilers depending on what the user pass during make invocation as CC. -Align them using ${CC} also inside incdefs.sh +Align them using ${CC} also inside incdefs.sh. Signed-off-by: Luca Fancellu -Upstream-Status: Pending +Upstream-Status: Backport [master: cffb4807ac0b9ff7aea2aa4f3842985b5363d184] --- incdefs.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/incdefs.sh b/incdefs.sh index a9e94f777f6b..391e63c7fac6 100755 @@ -29,6 +30,19 @@ index a9e94f777f6b..391e63c7fac6 100755 # Look for clock_adjtime(). for d in $dirs; do +diff --git a/makefile b/makefile +index 3e3b8b35fc96..7fc5f6fb8fa8 100644 +--- a/makefile ++++ b/makefile +@@ -39,7 +39,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \ + SRC = $(OBJECTS:.o=.c) + DEPEND = $(OBJECTS:.o=.d) + srcdir := $(dir $(lastword $(MAKEFILE_LIST))) +-incdefs := $(shell $(srcdir)/incdefs.sh) ++incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh) + version := $(shell $(srcdir)/version.sh $(srcdir)) + VPATH = $(srcdir) + -- 2.34.1 diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch index 2436b36f2d..fba9a8767f 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch +++ b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch @@ -8,7 +8,7 @@ This ensures the install paths are not hardcoded. Signed-off-by: Khem Raj --- Upstream-Status: Pending - +--- cmake/CMakeLists.txt | 4 ++-- src/samples/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) @@ -33,19 +33,27 @@ index a9f8908..7eadc60 100644 - DESTINATION lib/cmake/${package_name}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name}) diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt -index 953f5dc..d26729a 100644 +index 3ca0a75..c915cd5 100644 --- a/src/samples/CMakeLists.txt +++ b/src/samples/CMakeLists.txt -@@ -103,7 +103,7 @@ endif() +@@ -71,7 +71,7 @@ endforeach() ## install binaries - install(TARGETS ${INSTALL_TARGETS} EXPORT PahoMqttCppSamples -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + install(TARGETS ${EXECUTABLES} EXPORT PahoMqttCppSamples +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) + ## Build the SSL/TLS samples, if selected +@@ -89,7 +89,7 @@ if(PAHO_WITH_SSL) + endforeach() + + install(TARGETS ${SSL_EXECUTABLES} EXPORT PahoMqttCppSamples +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + endif() + -- -2.35.1 +2.34.1 diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb deleted file mode 100644 index bb5aa69077..0000000000 --- a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Paho MQTT - C++ libraries for the MQTT and MQTT-SN protocols" -DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." -HOMEPAGE = "http://www.eclipse.org/paho/" -SECTION = "console/network" -LICENSE = "EPL-1.0 | EDL-1.0" - -LIC_FILES_CHKSUM = " \ - file://src/mqtt/message.h;beginline=9;endline=18;md5=5eec304e6066523386c222963ceeb6ff \ - file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ - file://epl-v10;md5=659c8e92a40b6df1d9e3dccf5ae45a08 \ -" - -SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=https;branch=master \ - file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch \ -" -SRCREV = "33921c8b68b351828650c36816e7ecf936764379" - -DEPENDS = "openssl paho-mqtt-c" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE += "-DPAHO_WITH_SSL=ON" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.1.bb b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.1.bb new file mode 100644 index 0000000000..1e1e923399 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "Paho MQTT - C++ libraries for the MQTT and MQTT-SN protocols" +DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." +HOMEPAGE = "http://www.eclipse.org/paho/" +SECTION = "console/network" +LICENSE = "EPL-2.0 | EDL-1.0" + +LIC_FILES_CHKSUM = " \ + file://src/mqtt/message.h;beginline=9;endline=18;md5=c5ceecf5ab99d44dcfaaabdce289071b \ + file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ + file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \ +" + +SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=https;branch=master \ + file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch \ +" +SRCREV = "4691652479bb4b398c7b81bde639482b164ae6d6" + +DEPENDS = "openssl paho-mqtt-c" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE += "-DPAHO_WITH_SSL=ON" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.5.1.bb b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.5.1.bb deleted file mode 100644 index 2507933098..0000000000 --- a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.5.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "A serial to network proxy" -SECTION = "console/network" -HOMEPAGE = "http://sourceforge.net/projects/ser2net/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "gensio libyaml" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz" - -SRC_URI[sha256sum] = "6d60c2eb9e15f6a23743ce7fc3687a8880042d7fca43572e73ca76ed003de258" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net" - -inherit autotools pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.0.bb new file mode 100644 index 0000000000..2156889eb1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "A serial to network proxy" +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/ser2net/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "gensio libyaml" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz" + +SRC_URI[sha256sum] = "58a7ba97761f96b9228bccf6367c2715c0c0be1f99e0a114d429d8c1fcb9c8b2" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net" + +inherit autotools pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-core/basu/basu_0.2.1.bb b/meta-openembedded/meta-oe/recipes-core/basu/basu_0.2.1.bb index 500408e11e..1b4d5a0fe5 100644 --- a/meta-openembedded/meta-oe/recipes-core/basu/basu_0.2.1.bb +++ b/meta-openembedded/meta-oe/recipes-core/basu/basu_0.2.1.bb @@ -9,8 +9,8 @@ SRC_URI = "git://git.sr.ht/~emersion/basu;protocol=https;branch=master" DEPENDS += "gperf-native" S = "${WORKDIR}/git" -PV = "0.2.1" -SRCREV = "684a41d68cfbb05e38aacb60a8548e21ddfbecdb" +PV = "0.2.1+git" +SRCREV = "a08cf5a575325435040d35710dbac3d0c32b1676" inherit meson pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 0f01356129..1a588eb29c 100644 --- a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb @@ -466,7 +466,6 @@ RDEPENDS:packagegroup-meta-oe-gnome ="\ gtkmm \ ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "libpeas", "", d)} \ pyxdg \ - vte9 \ gnome-theme-adwaita \ " diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.4.0/run-ptest b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.4.0/run-ptest index f6ade0c7e4..2dc6e1eca1 100755 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.4.0/run-ptest +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.4.0/run-ptest @@ -4,12 +4,12 @@ set -o pipefail SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" -${SCRIPTPATH}/../tests/sdbus-c++-unit-tests 2>&1 | \ +${SCRIPTPATH}/sdbus-c++-unit-tests 2>&1 | \ sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' -${SCRIPTPATH}/../tests/sdbus-c++-integration-tests 2>&1 | \ +${SCRIPTPATH}/sdbus-c++-integration-tests 2>&1 | \ sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch index 2363679c98..5e9646c569 100644 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch @@ -1,4 +1,4 @@ -From 4c2e932664ec67662f4a0306cca4a7cd82853bda Mon Sep 17 00:00:00 2001 +From e5f067cb3dc845dd865e450f4e64077b28feb4c0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 Jan 2022 22:19:37 -0800 Subject: [PATCH] Adjust for musl headers @@ -29,20 +29,25 @@ Signed-off-by: Khem Raj src/network/netdev/vrf.c | 2 +- src/network/netdev/vxcan.c | 2 +- src/network/netdev/vxlan.c | 2 +- + src/network/netdev/wireguard.c | 2 +- src/network/netdev/xfrm.c | 2 +- src/network/networkd-bridge-mdb.c | 4 ++-- src/network/networkd-dhcp-common.c | 3 ++- src/network/networkd-dhcp-prefix-delegation.c | 4 ++-- src/network/networkd-dhcp-server.c | 2 +- src/network/networkd-dhcp4.c | 2 +- + src/network/networkd-ipv6ll.c | 2 +- src/network/networkd-link.c | 2 +- + src/network/networkd-ndisc.c | 2 +- src/network/networkd-route.c | 8 ++++---- src/network/networkd-setlink.c | 2 +- src/shared/linux/ethtool.h | 3 ++- src/shared/netif-util.c | 2 +- src/udev/udev-builtin-net_id.c | 2 +- - 34 files changed, 41 insertions(+), 39 deletions(-) + 37 files changed, 44 insertions(+), 42 deletions(-) +diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c +index 57dd91f81f..2b7f4fa3a7 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,7 @@ @@ -54,6 +59,8 @@ Signed-off-by: Khem Raj #include #include "sd-dhcp6-client.h" +diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c +index 24d3afb877..f6241b41ee 100644 --- a/src/network/netdev/bareudp.c +++ b/src/network/netdev/bareudp.c @@ -2,7 +2,7 @@ @@ -65,6 +72,8 @@ Signed-off-by: Khem Raj #include "bareudp.h" #include "netlink-util.h" +diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c +index 7e97619657..50fcffcfdf 100644 --- a/src/network/netdev/batadv.c +++ b/src/network/netdev/batadv.c @@ -3,7 +3,7 @@ @@ -76,6 +85,8 @@ Signed-off-by: Khem Raj #include "batadv.h" #include "fileio.h" +diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c +index 601bff0a9c..dfed8d9e54 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -1,7 +1,7 @@ @@ -87,6 +98,8 @@ Signed-off-by: Khem Raj #include "alloc-util.h" #include "bond.h" +diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c +index b65c3b49fc..6875b4fbdb 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -2,7 +2,7 @@ @@ -98,6 +111,8 @@ Signed-off-by: Khem Raj #include #include "bridge.h" +diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c +index 00df1d2787..77b506b422 100644 --- a/src/network/netdev/dummy.c +++ b/src/network/netdev/dummy.c @@ -1,6 +1,6 @@ @@ -108,6 +123,8 @@ Signed-off-by: Khem Raj #include "dummy.h" +diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c +index 777a32d75c..73bfa2b5c1 100644 --- a/src/network/netdev/geneve.c +++ b/src/network/netdev/geneve.c @@ -2,7 +2,7 @@ @@ -119,6 +136,8 @@ Signed-off-by: Khem Raj #include "alloc-util.h" #include "conf-parser.h" +diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c +index d7ff44cb9e..e037629ae4 100644 --- a/src/network/netdev/ifb.c +++ b/src/network/netdev/ifb.c @@ -1,7 +1,7 @@ @@ -130,6 +149,8 @@ Signed-off-by: Khem Raj #include "ifb.h" +diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c +index 5dd9286d57..4036d66dad 100644 --- a/src/network/netdev/ipoib.c +++ b/src/network/netdev/ipoib.c @@ -1,6 +1,6 @@ @@ -140,6 +161,8 @@ Signed-off-by: Khem Raj #include #include "ipoib.h" +diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c +index 058eadebd7..c470ebb6d7 100644 --- a/src/network/netdev/ipvlan.c +++ b/src/network/netdev/ipvlan.c @@ -2,7 +2,7 @@ @@ -151,6 +174,8 @@ Signed-off-by: Khem Raj #include "conf-parser.h" #include "ipvlan.h" +diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c +index 0da3dd4bd2..eb20f04469 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -1,7 +1,7 @@ @@ -162,6 +187,8 @@ Signed-off-by: Khem Raj #include #include #include +diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c +index 1114bb0cb1..6c79a219a4 100644 --- a/src/network/netdev/macvlan.c +++ b/src/network/netdev/macvlan.c @@ -2,7 +2,7 @@ @@ -173,6 +200,8 @@ Signed-off-by: Khem Raj #include "conf-parser.h" #include "macvlan.h" +diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c +index 038a27c118..67155f0db7 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -2,7 +2,7 @@ @@ -184,6 +213,8 @@ Signed-off-by: Khem Raj #include #include "alloc-util.h" +diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c +index 15d5c132f9..a3ffa48b15 100644 --- a/src/network/netdev/netdevsim.c +++ b/src/network/netdev/netdevsim.c @@ -1,6 +1,6 @@ @@ -194,6 +225,8 @@ Signed-off-by: Khem Raj #include "netdevsim.h" +diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c +index ff372092e6..eef66811f4 100644 --- a/src/network/netdev/nlmon.c +++ b/src/network/netdev/nlmon.c @@ -1,6 +1,6 @@ @@ -204,6 +237,8 @@ Signed-off-by: Khem Raj #include "nlmon.h" +diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c +index 2addfeecaa..954987f26d 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -2,7 +2,7 @@ @@ -215,6 +250,8 @@ Signed-off-by: Khem Raj #include #include #include +diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c +index 380547ee1e..137c1adf8a 100644 --- a/src/network/netdev/vcan.c +++ b/src/network/netdev/vcan.c @@ -1,6 +1,6 @@ @@ -225,6 +262,8 @@ Signed-off-by: Khem Raj #include "vcan.h" +diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c +index fb00e6667f..f52d9ee89a 100644 --- a/src/network/netdev/veth.c +++ b/src/network/netdev/veth.c @@ -3,7 +3,7 @@ @@ -236,6 +275,8 @@ Signed-off-by: Khem Raj #include #include "netlink-util.h" +diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c +index a3d961dac3..386b567a42 100644 --- a/src/network/netdev/vlan.c +++ b/src/network/netdev/vlan.c @@ -2,7 +2,7 @@ @@ -247,6 +288,8 @@ Signed-off-by: Khem Raj #include #include "parse-util.h" +diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c +index 05ef3ff13d..825fc4a398 100644 --- a/src/network/netdev/vrf.c +++ b/src/network/netdev/vrf.c @@ -2,7 +2,7 @@ @@ -258,6 +301,8 @@ Signed-off-by: Khem Raj #include "vrf.h" +diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c +index 83269b0707..39c6dbe29c 100644 --- a/src/network/netdev/vxcan.c +++ b/src/network/netdev/vxcan.c @@ -1,7 +1,7 @@ @@ -269,6 +314,8 @@ Signed-off-by: Khem Raj #include "vxcan.h" +diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c +index 589161938a..0ec9625b7a 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -2,7 +2,7 @@ @@ -280,6 +327,21 @@ Signed-off-by: Khem Raj #include "conf-parser.h" #include "alloc-util.h" +diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c +index 51e7e02990..fc36c0623a 100644 +--- a/src/network/netdev/wireguard.c ++++ b/src/network/netdev/wireguard.c +@@ -6,7 +6,7 @@ + #include + #include + #include +-#include ++//#include + #include + + #include "sd-resolve.h" +diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c +index a961d8fef2..6c1815b257 100644 --- a/src/network/netdev/xfrm.c +++ b/src/network/netdev/xfrm.c @@ -1,6 +1,6 @@ @@ -290,6 +352,8 @@ Signed-off-by: Khem Raj #include "missing_network.h" #include "xfrm.h" +diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c +index bd1a9745dc..949d3da029 100644 --- a/src/network/networkd-bridge-mdb.c +++ b/src/network/networkd-bridge-mdb.c @@ -1,7 +1,5 @@ @@ -309,6 +373,8 @@ Signed-off-by: Khem Raj #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U +diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c +index ca9a825e7b..8735e261ad 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -1,7 +1,8 @@ @@ -320,7 +386,9 @@ Signed-off-by: Khem Raj +#include #include "bus-error.h" - #include "dhcp-identifier.h" + #include "bus-locator.h" +diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c +index 66c5e979d9..581b6b8c29 100644 --- a/src/network/networkd-dhcp-prefix-delegation.c +++ b/src/network/networkd-dhcp-prefix-delegation.c @@ -1,7 +1,5 @@ @@ -340,6 +408,8 @@ Signed-off-by: Khem Raj bool link_dhcp_pd_is_enabled(Link *link) { assert(link); +diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c +index 620fbbddc7..c8af20fb34 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,7 +1,7 @@ @@ -351,6 +421,8 @@ Signed-off-by: Khem Raj #include #include "sd-dhcp-server.h" +diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c +index d4b4942173..3d78da5609 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -3,7 +3,7 @@ @@ -362,6 +434,21 @@ Signed-off-by: Khem Raj #include "alloc-util.h" #include "dhcp-client-internal.h" +diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c +index 32229a3fc7..662a345d6e 100644 +--- a/src/network/networkd-ipv6ll.c ++++ b/src/network/networkd-ipv6ll.c +@@ -1,7 +1,7 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + + #include +-#include ++//#include + + #include "in-addr-util.h" + #include "networkd-address.h" +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index 019bef0590..657fc41ae6 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -3,7 +3,7 @@ @@ -373,6 +460,21 @@ Signed-off-by: Khem Raj #include #include #include +diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c +index 99a07e16fc..e51cd81d96 100644 +--- a/src/network/networkd-ndisc.c ++++ b/src/network/networkd-ndisc.c +@@ -6,7 +6,7 @@ + #include + #include + #include +-#include ++//#include + + #include "sd-ndisc.h" + +diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c +index 5214a8ad2c..9dd758daae 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,9 +1,5 @@ @@ -396,6 +498,8 @@ Signed-off-by: Khem Raj int route_new(Route **ret) { _cleanup_(route_freep) Route *route = NULL; +diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c +index 541c4b8a72..06ebda8f0f 100644 --- a/src/network/networkd-setlink.c +++ b/src/network/networkd-setlink.c @@ -2,7 +2,7 @@ @@ -407,28 +511,35 @@ Signed-off-by: Khem Raj #include #include "missing_network.h" +diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h +index 1458de3627..d5c2d2e0ac 100644 --- a/src/shared/linux/ethtool.h +++ b/src/shared/linux/ethtool.h @@ -16,7 +16,8 @@ - #include + #include #include -#include +#include +//#include - #ifndef __KERNEL__ #include /* for INT_MAX */ + +diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c +index f56c5646c1..5af28ff119 100644 --- a/src/shared/netif-util.c +++ b/src/shared/netif-util.c -@@ -1,6 +1,6 @@ +@@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ + #include -#include +//#include #include "arphrd-util.h" #include "device-util.h" +diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c +index a48d5dedf8..31a8bc1b3c 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -18,7 +18,7 @@ @@ -440,14 +551,6 @@ Signed-off-by: Khem Raj #include #include ---- a/src/network/netdev/wireguard.c -+++ b/src/network/netdev/wireguard.c -@@ -6,7 +6,7 @@ - #include - #include - #include --#include -+//#include - #include - - #include "sd-resolve.h" +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch deleted file mode 100644 index 517886c727..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 19cc68d4a89b59889be442d2997ff030cdc3de73 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 20 Dec 2022 20:11:17 -0800 -Subject: [PATCH] dirent-util: Remove asserts on dirent64 == dirent - -We already have assert_cc(_FILE_OFFSET_BITS == 64) which ensures that 64bit LFS functions are same as their original counterparts - -Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/25809] -Signed-off-by: Khem Raj ---- - src/basic/dirent-util.h | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h -index 04bc53003f..4cb317184d 100644 ---- a/src/basic/dirent-util.h -+++ b/src/basic/dirent-util.h -@@ -35,17 +35,6 @@ struct dirent *readdir_no_dot(DIR *dirp); - /* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and - * we want them to be interchangeable to make getdents64() work, hence verify that. */ - assert_cc(_FILE_OFFSET_BITS == 64); --assert_cc(sizeof(struct dirent) == sizeof(struct dirent64)); --assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino)); --assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino)); --assert_cc(offsetof(struct dirent, d_off) == offsetof(struct dirent64, d_off)); --assert_cc(sizeof_field(struct dirent, d_off) == sizeof_field(struct dirent64, d_off)); --assert_cc(offsetof(struct dirent, d_reclen) == offsetof(struct dirent64, d_reclen)); --assert_cc(sizeof_field(struct dirent, d_reclen) == sizeof_field(struct dirent64, d_reclen)); --assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type)); --assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type)); --assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name)); --assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name)); - - #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz) \ - for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \ --- -2.39.0 - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch deleted file mode 100644 index 7dfa1a0df2..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d16f7b37c917b91e951b9313e2c8264c72ed93e5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 21 Jan 2022 15:17:37 -0800 -Subject: [PATCH 2/2] Add sys/stat.h for S_IFDIR - -../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR' - r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR); - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - src/shared/mkdir-label.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c -index d36a6466d7..63b764cd83 100644 ---- a/src/shared/mkdir-label.c -+++ b/src/shared/mkdir-label.c -@@ -4,6 +4,7 @@ - #include "selinux-util.h" - #include "smack-util.h" - #include "user-util.h" -+#include - - int mkdirat_label(int dirfd, const char *path, mode_t mode) { - int r; --- -2.34.1 - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch deleted file mode 100644 index 5027682df2..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 5d730902f47498a2866b46875352f6810a01d67c Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 13:41:41 +0800 -Subject: [PATCH] don't use glibc-specific qsort_r - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -[Rebased for v241] -Signed-off-by: Chen Qi -[Rebased for v242] -Signed-off-by: Andrej Valek -[Rebased for v247] -Signed-off-by: Luca Boccassi - ---- - src/basic/sort-util.h | 14 -------------- - src/shared/format-table.c | 36 ++++++++++++++++++++++++------------ - src/shared/hwdb-util.c | 19 ++++++++++++++----- - 3 files changed, 38 insertions(+), 31 deletions(-) - ---- a/src/basic/sort-util.h -+++ b/src/basic/sort-util.h -@@ -61,18 +61,4 @@ static inline void _qsort_safe(void *bas - _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \ - }) - --static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) { -- if (nmemb <= 1) -- return; -- -- assert(base); -- qsort_r(base, nmemb, size, compar, userdata); --} -- --#define typesafe_qsort_r(p, n, func, userdata) \ -- ({ \ -- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ -- qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \ -- }) -- - int cmp_int(const int *a, const int *b); ---- a/src/shared/format-table.c -+++ b/src/shared/format-table.c -@@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData * - return CMP(index_a, index_b); - } - --static int table_data_compare(const size_t *a, const size_t *b, Table *t) { -+static Table *user_table; -+static int table_data_compare(const void *x, const void *y) { -+ const size_t *a = x, *b=y; - int r; - -- assert(t); -- assert(t->sort_map); -+ assert(user_table); -+ assert(user_table->sort_map); - - /* Make sure the header stays at the beginning */ -- if (*a < t->n_columns && *b < t->n_columns) -+ if (*a < user_table->n_columns && *b < user_table->n_columns) - return 0; -- if (*a < t->n_columns) -+ if (*a < user_table->n_columns) - return -1; -- if (*b < t->n_columns) -+ if (*b < user_table->n_columns) - return 1; - - /* Order other lines by the sorting map */ -- for (size_t i = 0; i < t->n_sort_map; i++) { -+ for (size_t i = 0; i < user_table->n_sort_map; i++) { - TableData *d, *dd; - -- d = t->data[*a + t->sort_map[i]]; -- dd = t->data[*b + t->sort_map[i]]; -+ d = user_table->data[*a + user_table->sort_map[i]]; -+ dd = user_table->data[*b + user_table->sort_map[i]]; - - r = cell_data_compare(d, *a, dd, *b); - if (r != 0) -- return t->reverse_map && t->reverse_map[t->sort_map[i]] ? -r : r; -+ return user_table->reverse_map && user_table->reverse_map[user_table->sort_map[i]] ? -r : r; - } - - /* Order identical lines by the order there were originally added in */ -@@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) { - for (size_t i = 0; i < n_rows; i++) - sorted[i] = i * t->n_columns; - -- typesafe_qsort_r(sorted, n_rows, table_data_compare, t); -+ if (n_rows <= 1) -+ return 0; -+ assert(sorted); -+ user_table = t; -+ qsort(sorted, n_rows, sizeof(size_t), table_data_compare); -+ user_table = NULL; - } - - if (t->display_map) -@@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant - for (size_t i = 0; i < n_rows; i++) - sorted[i] = i * t->n_columns; - -- typesafe_qsort_r(sorted, n_rows, table_data_compare, t); -+ if (n_rows <= 1) -+ return 0; -+ assert(sorted); -+ user_table = t; -+ qsort(sorted, n_rows, sizeof(size_t), table_data_compare); -+ user_table = NULL; - } - - if (t->display_map) ---- a/src/shared/hwdb-util.c -+++ b/src/shared/hwdb-util.c -@@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri - - DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); - --static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) { -- return strcmp(trie->strings->buf + a->key_off, -- trie->strings->buf + b->key_off); -+static struct trie *trie_node_add_value_trie; -+static int trie_values_cmp(const void *v1, const void *v2) { -+ const struct trie_value_entry *a = v1; -+ const struct trie_value_entry *b = v2; -+ -+ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off, -+ trie_node_add_value_trie->strings->buf + b->key_off); - } - - static int trie_node_add_value(struct trie *trie, struct trie_node *node, -@@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr - .value_off = v, - }; - -- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie); -+ trie_node_add_value_trie = trie; -+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp); -+ trie_node_add_value_trie = NULL; -+ - if (val) { - /* At this point we have 2 identical properties on the same match-string. - * Since we process files in order, we just replace the previous value. */ -@@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr - .line_number = line_number, - }; - node->values_count++; -- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie); -+ trie_node_add_value_trie = trie; -+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp); -+ trie_node_add_value_trie = NULL; - return 0; - } - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch new file mode 100644 index 0000000000..fcc56a2e65 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch @@ -0,0 +1,41 @@ +From f629a76e0fba300a9d511614160fee38dd4a5e57 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 23 Jan 2023 23:39:46 -0800 +Subject: [PATCH] errno-util: Make STRERROR portable for musl + +Sadly, systemd has decided to use yet another GNU extention in a macro +lets make this such that we can use XSI compliant strerror_r() for +non-glibc hosts + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +--- + src/basic/errno-util.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h +index 091f99c590..eb5c1f9961 100644 +--- a/src/basic/errno-util.h ++++ b/src/basic/errno-util.h +@@ -14,8 +14,16 @@ + * https://stackoverflow.com/questions/34880638/compound-literal-lifetime-and-if-blocks + * + * Note that we use the GNU variant of strerror_r() here. */ +-#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) ++static inline const char * STRERROR(int errnum); + ++static inline const char * STRERROR(int errnum) { ++#ifdef __GLIBC__ ++ return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN); ++#else ++ static __thread char buf[ERRNO_BUF_LEN]; ++ return strerror_r(abs(errnum), buf, ERRNO_BUF_LEN) ? "unknown error" : buf; ++#endif ++} + /* A helper to print an error message or message for functions that return 0 on EOF. + * Note that we can't use ({ … }) to define a temporary variable, so errnum is + * evaluated twice. */ +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch deleted file mode 100644 index f3edc7d82b..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 3b42a888685aee1776a12cff84a5fe0063378483 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t - -Make it work with musl where comparison_fn_t and __compare_fn_t -is not provided. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Alex Kiernan -[Rebased for v244] -Signed-off-by: Chen Qi -[Rebased for v242] -Signed-off-by: Andrej Valek - ---- - src/basic/missing_type.h | 9 +++++++++ - src/basic/sort-util.h | 1 + - src/core/kmod-setup.c | 1 + - src/libsystemd/sd-journal/catalog.c | 1 + - 4 files changed, 12 insertions(+) - ---- a/src/basic/missing_type.h -+++ b/src/basic/missing_type.h -@@ -10,3 +10,12 @@ - #if !HAVE_CHAR16_T - #define char16_t uint16_t - #endif -+ -+#ifndef __GLIBC__ -+typedef int (*comparison_fn_t)(const void *, const void *); -+#endif -+ -+#ifndef __COMPAR_FN_T -+#define __COMPAR_FN_T -+typedef int (*__compar_fn_t)(const void *, const void *); -+#endif ---- a/src/basic/sort-util.h -+++ b/src/basic/sort-util.h -@@ -4,6 +4,7 @@ - #include - - #include "macro.h" -+#include "missing_type.h" - - /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the - * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that ---- a/src/core/kmod-setup.c -+++ b/src/core/kmod-setup.c -@@ -10,6 +10,7 @@ - #include "macro.h" - #include "recurse-dir.h" - #include "string-util.h" -+#include "missing_type.h" - - #if HAVE_KMOD - #include "module-util.h" ---- a/src/libsystemd/sd-journal/catalog.c -+++ b/src/libsystemd/sd-journal/catalog.c -@@ -28,6 +28,7 @@ - #include "string-util.h" - #include "strv.h" - #include "tmpfile-util.h" -+#include "missing_type.h" - - const char * const catalog_file_dirs[] = { - "/usr/local/lib/systemd/catalog/", diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch deleted file mode 100644 index d93f630752..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch +++ /dev/null @@ -1,419 +0,0 @@ -From 3e0df2c22bfd37bc62bf09a01ec498e40d3599de Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Sat, 22 May 2021 20:26:24 +0200 -Subject: [PATCH] add fallback parse_printf_format implementation - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Emil Renner Berthing -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - meson.build | 1 + - src/basic/meson.build | 5 + - src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++ - src/basic/parse-printf-format.h | 57 +++++ - src/basic/stdio-util.h | 2 +- - src/libsystemd/sd-journal/journal-send.c | 2 +- - 6 files changed, 338 insertions(+), 2 deletions(-) - create mode 100644 src/basic/parse-printf-format.c - create mode 100644 src/basic/parse-printf-format.h - ---- a/meson.build -+++ b/meson.build -@@ -686,6 +686,7 @@ endif - foreach header : ['crypt.h', - 'linux/memfd.h', - 'linux/vm_sockets.h', -+ 'printf.h', - 'sys/auxv.h', - 'valgrind/memcheck.h', - 'valgrind/valgrind.h', ---- a/src/basic/meson.build -+++ b/src/basic/meson.build -@@ -335,6 +335,11 @@ endforeach - - basic_sources += generated_gperf_headers - -+if conf.get('HAVE_PRINTF_H') != 1 -+ basic_sources += [files('parse-printf-format.c')] -+endif -+ -+ - ############################################################ - - arch_list = [ ---- /dev/null -+++ b/src/basic/parse-printf-format.c -@@ -0,0 +1,273 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Emil Renner Berthing -+ -+ With parts from the musl C library -+ Copyright 2005-2014 Rich Felker, et al. -+ -+ systemd is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+#include -+#include -+ -+#include "parse-printf-format.h" -+ -+static const char *consume_nonarg(const char *fmt) -+{ -+ do { -+ if (*fmt == '\0') -+ return fmt; -+ } while (*fmt++ != '%'); -+ return fmt; -+} -+ -+static const char *consume_num(const char *fmt) -+{ -+ for (;*fmt >= '0' && *fmt <= '9'; fmt++) -+ /* do nothing */; -+ return fmt; -+} -+ -+static const char *consume_argn(const char *fmt, size_t *arg) -+{ -+ const char *p = fmt; -+ size_t val = 0; -+ -+ if (*p < '1' || *p > '9') -+ return fmt; -+ do { -+ val = 10*val + (*p++ - '0'); -+ } while (*p >= '0' && *p <= '9'); -+ -+ if (*p != '$') -+ return fmt; -+ *arg = val; -+ return p+1; -+} -+ -+static const char *consume_flags(const char *fmt) -+{ -+ while (1) { -+ switch (*fmt) { -+ case '#': -+ case '0': -+ case '-': -+ case ' ': -+ case '+': -+ case '\'': -+ case 'I': -+ fmt++; -+ continue; -+ } -+ return fmt; -+ } -+} -+ -+enum state { -+ BARE, -+ LPRE, -+ LLPRE, -+ HPRE, -+ HHPRE, -+ BIGLPRE, -+ ZTPRE, -+ JPRE, -+ STOP -+}; -+ -+enum type { -+ NONE, -+ PTR, -+ INT, -+ UINT, -+ ULLONG, -+ LONG, -+ ULONG, -+ SHORT, -+ USHORT, -+ CHAR, -+ UCHAR, -+ LLONG, -+ SIZET, -+ IMAX, -+ UMAX, -+ PDIFF, -+ UIPTR, -+ DBL, -+ LDBL, -+ MAXTYPE -+}; -+ -+static const short pa_types[MAXTYPE] = { -+ [NONE] = PA_INT, -+ [PTR] = PA_POINTER, -+ [INT] = PA_INT, -+ [UINT] = PA_INT, -+ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG, -+ [LONG] = PA_INT | PA_FLAG_LONG, -+ [ULONG] = PA_INT | PA_FLAG_LONG, -+ [SHORT] = PA_INT | PA_FLAG_SHORT, -+ [USHORT] = PA_INT | PA_FLAG_SHORT, -+ [CHAR] = PA_CHAR, -+ [UCHAR] = PA_CHAR, -+ [LLONG] = PA_INT | PA_FLAG_LONG_LONG, -+ [SIZET] = PA_INT | PA_FLAG_LONG, -+ [IMAX] = PA_INT | PA_FLAG_LONG_LONG, -+ [UMAX] = PA_INT | PA_FLAG_LONG_LONG, -+ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG, -+ [UIPTR] = PA_INT | PA_FLAG_LONG, -+ [DBL] = PA_DOUBLE, -+ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE -+}; -+ -+#define S(x) [(x)-'A'] -+#define E(x) (STOP + (x)) -+ -+static const unsigned char states[]['z'-'A'+1] = { -+ { /* 0: bare types */ -+ S('d') = E(INT), S('i') = E(INT), -+ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT), -+ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL), -+ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL), -+ S('c') = E(CHAR),S('C') = E(INT), -+ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR), -+ S('m') = E(NONE), -+ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE, -+ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE -+ }, { /* 1: l-prefixed */ -+ S('d') = E(LONG), S('i') = E(LONG), -+ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG), -+ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL), -+ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL), -+ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR), -+ S('l') = LLPRE -+ }, { /* 2: ll-prefixed */ -+ S('d') = E(LLONG), S('i') = E(LLONG), -+ S('o') = E(ULLONG),S('u') = E(ULLONG), -+ S('x') = E(ULLONG),S('X') = E(ULLONG), -+ S('n') = E(PTR) -+ }, { /* 3: h-prefixed */ -+ S('d') = E(SHORT), S('i') = E(SHORT), -+ S('o') = E(USHORT),S('u') = E(USHORT), -+ S('x') = E(USHORT),S('X') = E(USHORT), -+ S('n') = E(PTR), -+ S('h') = HHPRE -+ }, { /* 4: hh-prefixed */ -+ S('d') = E(CHAR), S('i') = E(CHAR), -+ S('o') = E(UCHAR),S('u') = E(UCHAR), -+ S('x') = E(UCHAR),S('X') = E(UCHAR), -+ S('n') = E(PTR) -+ }, { /* 5: L-prefixed */ -+ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL), -+ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL), -+ S('n') = E(PTR) -+ }, { /* 6: z- or t-prefixed (assumed to be same size) */ -+ S('d') = E(PDIFF),S('i') = E(PDIFF), -+ S('o') = E(SIZET),S('u') = E(SIZET), -+ S('x') = E(SIZET),S('X') = E(SIZET), -+ S('n') = E(PTR) -+ }, { /* 7: j-prefixed */ -+ S('d') = E(IMAX), S('i') = E(IMAX), -+ S('o') = E(UMAX), S('u') = E(UMAX), -+ S('x') = E(UMAX), S('X') = E(UMAX), -+ S('n') = E(PTR) -+ } -+}; -+ -+size_t parse_printf_format(const char *fmt, size_t n, int *types) -+{ -+ size_t i = 0; -+ size_t last = 0; -+ -+ memset(types, 0, n); -+ -+ while (1) { -+ size_t arg; -+ unsigned int state; -+ -+ fmt = consume_nonarg(fmt); -+ if (*fmt == '\0') -+ break; -+ if (*fmt == '%') { -+ fmt++; -+ continue; -+ } -+ arg = 0; -+ fmt = consume_argn(fmt, &arg); -+ /* flags */ -+ fmt = consume_flags(fmt); -+ /* width */ -+ if (*fmt == '*') { -+ size_t warg = 0; -+ fmt = consume_argn(fmt+1, &warg); -+ if (warg == 0) -+ warg = ++i; -+ if (warg > last) -+ last = warg; -+ if (warg <= n && types[warg-1] == NONE) -+ types[warg-1] = INT; -+ } else -+ fmt = consume_num(fmt); -+ /* precision */ -+ if (*fmt == '.') { -+ fmt++; -+ if (*fmt == '*') { -+ size_t parg = 0; -+ fmt = consume_argn(fmt+1, &parg); -+ if (parg == 0) -+ parg = ++i; -+ if (parg > last) -+ last = parg; -+ if (parg <= n && types[parg-1] == NONE) -+ types[parg-1] = INT; -+ } else { -+ if (*fmt == '-') -+ fmt++; -+ fmt = consume_num(fmt); -+ } -+ } -+ /* length modifier and conversion specifier */ -+ state = BARE; -+ do { -+ unsigned char c = *fmt++; -+ -+ if (c < 'A' || c > 'z') -+ continue; -+ state = states[state]S(c); -+ if (state == 0) -+ continue; -+ } while (state < STOP); -+ -+ if (state == E(NONE)) -+ continue; -+ -+ if (arg == 0) -+ arg = ++i; -+ if (arg > last) -+ last = arg; -+ if (arg <= n) -+ types[arg-1] = state - STOP; -+ } -+ -+ if (last > n) -+ last = n; -+ for (i = 0; i < last; i++) -+ types[i] = pa_types[types[i]]; -+ -+ return last; -+} ---- /dev/null -+++ b/src/basic/parse-printf-format.h -@@ -0,0 +1,57 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Emil Renner Berthing -+ -+ With parts from the GNU C Library -+ Copyright 1991-2014 Free Software Foundation, Inc. -+ -+ systemd is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+#pragma once -+ -+#include "config.h" -+ -+#if HAVE_PRINTF_H -+#include -+#else -+ -+#include -+ -+enum { /* C type: */ -+ PA_INT, /* int */ -+ PA_CHAR, /* int, cast to char */ -+ PA_WCHAR, /* wide char */ -+ PA_STRING, /* const char *, a '\0'-terminated string */ -+ PA_WSTRING, /* const wchar_t *, wide character string */ -+ PA_POINTER, /* void * */ -+ PA_FLOAT, /* float */ -+ PA_DOUBLE, /* double */ -+ PA_LAST -+}; -+ -+/* Flag bits that can be set in a type returned by `parse_printf_format'. */ -+#define PA_FLAG_MASK 0xff00 -+#define PA_FLAG_LONG_LONG (1 << 8) -+#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG -+#define PA_FLAG_LONG (1 << 9) -+#define PA_FLAG_SHORT (1 << 10) -+#define PA_FLAG_PTR (1 << 11) -+ -+size_t parse_printf_format(const char *fmt, size_t n, int *types); -+ -+#endif /* HAVE_PRINTF_H */ ---- a/src/basic/stdio-util.h -+++ b/src/basic/stdio-util.h -@@ -1,13 +1,13 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - #pragma once - --#include - #include - #include - #include - - #include "macro.h" - #include "memory-util.h" -+#include "parse-printf-format.h" - - #define snprintf_ok(buf, len, fmt, ...) \ - ({ \ ---- a/src/libsystemd/sd-journal/journal-send.c -+++ b/src/libsystemd/sd-journal/journal-send.c -@@ -2,7 +2,6 @@ - - #include - #include --#include - #include - #include - #include -@@ -21,6 +20,7 @@ - #include "stdio-util.h" - #include "string-util.h" - #include "tmpfile-util.h" -+#include "parse-printf-format.h" - - #define SNDBUF_SIZE (8*1024*1024) - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch new file mode 100644 index 0000000000..c634d8ec3d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch @@ -0,0 +1,37 @@ +From 17766c64ecc7dedf09ed2d361690fc4eda77bf42 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 21 Jan 2022 15:15:11 -0800 +Subject: [PATCH] pass correct parameters to getdents64 + +Fixes +../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +../git/src/basic/stat-util.c:102:28: error: incompatible pointer types passing 'union (unnamed union at ../git/src/basic/stat-util.c:78:9) *' to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(fd, &buffer, sizeof(buffer)); + ^~~~~~~ + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Khem Raj +Signed-off-by: Jiaqing Zhao +--- + src/basic/recurse-dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c +index 5e98b7a5d8..aef065047b 100644 +--- a/src/basic/recurse-dir.c ++++ b/src/basic/recurse-dir.c +@@ -55,7 +55,7 @@ int readdir_all(int dir_fd, + bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); + assert(bs > de->buffer_size); + +- n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); ++ n = getdents64(dir_fd, (struct dirent*)((uint8_t*) de->buffer + de->buffer_size), bs - de->buffer_size); + if (n < 0) + return -errno; + if (n == 0) +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch deleted file mode 100644 index 005ef022fd..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ /dev/null @@ -1,602 +0,0 @@ -From cef23a651ea200e30e1e6ed2a2564505e3a42d46 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 14:18:21 +0800 -Subject: [PATCH] src/basic/missing.h: check for missing strndupa - -include missing.h for definition of strndupa - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi -[Rebased for v242] -Signed-off-by: Andrej Valek -[rebased for systemd 243] -Signed-off-by: Scott Murray -Signed-off-by: Alex Kiernan -[rebased for systemd 244] -[Rebased for v247] -Signed-off-by: Luca Boccassi - ---- - meson.build | 1 + - src/backlight/backlight.c | 1 + - src/basic/cgroup-util.c | 1 + - src/basic/env-util.c | 1 + - src/basic/log.c | 1 + - src/basic/missing_stdlib.h | 12 ++++++++++++ - src/basic/mkdir.c | 1 + - src/basic/mountpoint-util.c | 1 + - src/basic/parse-util.c | 1 + - src/basic/path-lookup.c | 1 + - src/basic/percent-util.c | 1 + - src/basic/proc-cmdline.c | 1 + - src/basic/procfs-util.c | 1 + - src/basic/time-util.c | 1 + - src/boot/bless-boot.c | 1 + - src/core/dbus-cgroup.c | 1 + - src/core/dbus-execute.c | 1 + - src/core/dbus-util.c | 1 + - src/core/execute.c | 1 + - src/core/kmod-setup.c | 1 + - src/core/service.c | 1 + - src/coredump/coredump-vacuum.c | 1 + - src/journal-remote/journal-remote-main.c | 1 + - src/journal/journalctl.c | 1 + - src/libsystemd/sd-bus/bus-message.c | 1 + - src/libsystemd/sd-bus/bus-objects.c | 1 + - src/libsystemd/sd-bus/bus-socket.c | 1 + - src/libsystemd/sd-bus/sd-bus.c | 1 + - src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + - src/libsystemd/sd-journal/sd-journal.c | 1 + - src/locale/keymap-util.c | 1 + - src/login/pam_systemd.c | 1 + - src/network/generator/network-generator.c | 1 + - src/nspawn/nspawn-settings.c | 1 + - src/nss-mymachines/nss-mymachines.c | 1 + - src/portable/portable.c | 1 + - src/resolve/resolvectl.c | 1 + - src/shared/bus-get-properties.c | 1 + - src/shared/bus-unit-procs.c | 1 + - src/shared/bus-unit-util.c | 1 + - src/shared/bus-util.c | 1 + - src/shared/dns-domain.c | 1 + - src/shared/journal-importer.c | 1 + - src/shared/logs-show.c | 1 + - src/shared/pager.c | 1 + - src/shared/uid-range.c | 1 + - src/socket-proxy/socket-proxyd.c | 1 + - src/test/test-hexdecoct.c | 1 + - src/udev/udev-builtin-path_id.c | 1 + - src/udev/udev-event.c | 1 + - src/udev/udev-rules.c | 1 + - 51 files changed, 62 insertions(+) - ---- a/meson.build -+++ b/meson.build -@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec - endforeach - - foreach ident : [ -+ ['strndupa' , '''#include '''], - ['memfd_create', '''#include '''], - ['gettid', '''#include - #include '''], ---- a/src/backlight/backlight.c -+++ b/src/backlight/backlight.c -@@ -19,6 +19,7 @@ - #include "string-util.h" - #include "strv.h" - #include "util.h" -+#include "missing_stdlib.h" - - static int help(void) { - _cleanup_free_ char *link = NULL; ---- a/src/basic/cgroup-util.c -+++ b/src/basic/cgroup-util.c -@@ -37,6 +37,7 @@ - #include "unit-name.h" - #include "user-util.h" - #include "xattr-util.h" -+#include "missing_stdlib.h" - - static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { - _cleanup_free_ char *fs = NULL; ---- a/src/basic/env-util.c -+++ b/src/basic/env-util.c -@@ -19,6 +19,7 @@ - #include "string-util.h" - #include "strv.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - /* We follow bash for the character set. Different shells have different rules. */ - #define VALID_BASH_ENV_NAME_CHARS \ ---- a/src/basic/log.c -+++ b/src/basic/log.c -@@ -36,6 +36,7 @@ - #include "terminal-util.h" - #include "time-util.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - #define SNDBUF_SIZE (8*1024*1024) - ---- a/src/basic/missing_stdlib.h -+++ b/src/basic/missing_stdlib.h -@@ -11,3 +11,15 @@ - # error "neither secure_getenv nor __secure_getenv are available" - # endif - #endif -+ -+/* string.h */ -+#if ! HAVE_STRNDUPA -+#define strndupa(s, n) \ -+ ({ \ -+ const char *__old = (s); \ -+ size_t __len = strnlen(__old, (n)); \ -+ char *__new = (char *)alloca(__len + 1); \ -+ __new[__len] = '\0'; \ -+ (char *)memcpy(__new, __old, __len); \ -+ }) -+#endif ---- a/src/basic/mkdir.c -+++ b/src/basic/mkdir.c -@@ -15,6 +15,7 @@ - #include "stat-util.h" - #include "stdio-util.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - int mkdir_safe_internal( - const char *path, ---- a/src/basic/mountpoint-util.c -+++ b/src/basic/mountpoint-util.c -@@ -13,6 +13,7 @@ - #include "missing_stat.h" - #include "missing_syscall.h" - #include "mkdir.h" -+#include "missing_stdlib.h" - #include "mountpoint-util.h" - #include "nulstr-util.h" - #include "parse-util.h" ---- a/src/basic/parse-util.c -+++ b/src/basic/parse-util.c -@@ -18,6 +18,7 @@ - #include "stat-util.h" - #include "string-util.h" - #include "strv.h" -+#include "missing_stdlib.h" - - int parse_boolean(const char *v) { - if (!v) ---- a/src/basic/path-lookup.c -+++ b/src/basic/path-lookup.c -@@ -16,6 +16,7 @@ - #include "strv.h" - #include "tmpfile-util.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - int xdg_user_runtime_dir(char **ret, const char *suffix) { - const char *e; ---- a/src/basic/percent-util.c -+++ b/src/basic/percent-util.c -@@ -3,6 +3,7 @@ - #include "percent-util.h" - #include "string-util.h" - #include "parse-util.h" -+#include "missing_stdlib.h" - - static int parse_parts_value_whole(const char *p, const char *symbol) { - const char *pc, *n; ---- a/src/basic/proc-cmdline.c -+++ b/src/basic/proc-cmdline.c -@@ -15,6 +15,7 @@ - #include "string-util.h" - #include "util.h" - #include "virt.h" -+#include "missing_stdlib.h" - - int proc_cmdline(char **ret) { - const char *e; ---- a/src/basic/procfs-util.c -+++ b/src/basic/procfs-util.c -@@ -12,6 +12,7 @@ - #include "procfs-util.h" - #include "stdio-util.h" - #include "string-util.h" -+#include "missing_stdlib.h" - - int procfs_get_pid_max(uint64_t *ret) { - _cleanup_free_ char *value = NULL; ---- a/src/basic/time-util.c -+++ b/src/basic/time-util.c -@@ -26,6 +26,7 @@ - #include "string-util.h" - #include "strv.h" - #include "time-util.h" -+#include "missing_stdlib.h" - - static clockid_t map_clock_id(clockid_t c) { - ---- a/src/boot/bless-boot.c -+++ b/src/boot/bless-boot.c -@@ -19,6 +19,7 @@ - #include "util.h" - #include "verbs.h" - #include "virt.h" -+#include "missing_stdlib.h" - - static char **arg_path = NULL; - ---- a/src/core/dbus-execute.c -+++ b/src/core/dbus-execute.c -@@ -44,6 +44,7 @@ - #include "unit-printf.h" - #include "user-util.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); - static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); ---- a/src/core/dbus-util.c -+++ b/src/core/dbus-util.c -@@ -9,6 +9,7 @@ - #include "unit-printf.h" - #include "user-util.h" - #include "unit.h" -+#include "missing_stdlib.h" - - int bus_property_get_triggered_unit( - sd_bus *bus, ---- a/src/core/execute.c -+++ b/src/core/execute.c -@@ -102,6 +102,7 @@ - #include "unit-serialize.h" - #include "user-util.h" - #include "utmp-wtmp.h" -+#include "missing_stdlib.h" - - #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) - #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) ---- a/src/core/kmod-setup.c -+++ b/src/core/kmod-setup.c -@@ -11,6 +11,7 @@ - #include "recurse-dir.h" - #include "string-util.h" - #include "missing_type.h" -+#include "missing_stdlib.h" - - #if HAVE_KMOD - #include "module-util.h" ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -42,6 +42,7 @@ - #include "unit.h" - #include "utf8.h" - #include "util.h" -+#include "missing_stdlib.h" - - static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { - [SERVICE_DEAD] = UNIT_INACTIVE, ---- a/src/coredump/coredump-vacuum.c -+++ b/src/coredump/coredump-vacuum.c -@@ -16,6 +16,7 @@ - #include "string-util.h" - #include "time-util.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ - #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ ---- a/src/journal-remote/journal-remote-main.c -+++ b/src/journal-remote/journal-remote-main.c -@@ -24,6 +24,7 @@ - #include "stat-util.h" - #include "string-table.h" - #include "strv.h" -+#include "missing_stdlib.h" - - #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" - #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" ---- a/src/journal/journalctl.c -+++ b/src/journal/journalctl.c -@@ -73,6 +73,7 @@ - #include "unit-name.h" - #include "user-util.h" - #include "varlink.h" -+#include "missing_stdlib.h" - - #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) - #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ ---- a/src/libsystemd/sd-bus/bus-message.c -+++ b/src/libsystemd/sd-bus/bus-message.c -@@ -20,6 +20,7 @@ - #include "strv.h" - #include "time-util.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); - ---- a/src/libsystemd/sd-bus/bus-objects.c -+++ b/src/libsystemd/sd-bus/bus-objects.c -@@ -11,6 +11,7 @@ - #include "missing_capability.h" - #include "string-util.h" - #include "strv.h" -+#include "missing_stdlib.h" - - static int node_vtable_get_userdata( - sd_bus *bus, ---- a/src/libsystemd/sd-bus/bus-socket.c -+++ b/src/libsystemd/sd-bus/bus-socket.c -@@ -28,6 +28,7 @@ - #include "string-util.h" - #include "user-util.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - #define SNDBUF_SIZE (8*1024*1024) - ---- a/src/libsystemd/sd-bus/sd-bus.c -+++ b/src/libsystemd/sd-bus/sd-bus.c -@@ -43,6 +43,7 @@ - #include "string-util.h" - #include "strv.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - #define log_debug_bus_message(m) \ - do { \ ---- a/src/libsystemd/sd-bus/test-bus-benchmark.c -+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c -@@ -14,6 +14,7 @@ - #include "string-util.h" - #include "time-util.h" - #include "util.h" -+#include "missing_stdlib.h" - - #define MAX_SIZE (2*1024*1024) - ---- a/src/libsystemd/sd-journal/sd-journal.c -+++ b/src/libsystemd/sd-journal/sd-journal.c -@@ -41,6 +41,7 @@ - #include "string-util.h" - #include "strv.h" - #include "syslog-util.h" -+#include "missing_stdlib.h" - - #define JOURNAL_FILES_MAX 7168 - ---- a/src/locale/keymap-util.c -+++ b/src/locale/keymap-util.c -@@ -24,6 +24,7 @@ - #include "string-util.h" - #include "strv.h" - #include "tmpfile-util.h" -+#include "missing_stdlib.h" - - static bool startswith_comma(const char *s, const char *prefix) { - s = startswith(s, prefix); ---- a/src/login/pam_systemd.c -+++ b/src/login/pam_systemd.c -@@ -31,6 +31,7 @@ - #include "locale-util.h" - #include "login-util.h" - #include "macro.h" -+#include "missing_stdlib.h" - #include "pam-util.h" - #include "parse-util.h" - #include "path-util.h" ---- a/src/network/generator/network-generator.c -+++ b/src/network/generator/network-generator.c -@@ -13,6 +13,7 @@ - #include "string-table.h" - #include "string-util.h" - #include "strv.h" -+#include "missing_stdlib.h" - - /* - # .network ---- a/src/nspawn/nspawn-settings.c -+++ b/src/nspawn/nspawn-settings.c -@@ -17,6 +17,7 @@ - #include "strv.h" - #include "user-util.h" - #include "util.h" -+#include "missing_stdlib.h" - - Settings *settings_new(void) { - Settings *s; ---- a/src/nss-mymachines/nss-mymachines.c -+++ b/src/nss-mymachines/nss-mymachines.c -@@ -21,6 +21,7 @@ - #include "nss-util.h" - #include "signal-util.h" - #include "string-util.h" -+#include "missing_stdlib.h" - - static void setup_logging_once(void) { - static pthread_once_t once = PTHREAD_ONCE_INIT; ---- a/src/portable/portable.c -+++ b/src/portable/portable.c -@@ -39,6 +39,7 @@ - #include "strv.h" - #include "tmpfile-util.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was - * dropped there by the portable service logic and b) for which image it was dropped there. */ ---- a/src/resolve/resolvectl.c -+++ b/src/resolve/resolvectl.c -@@ -43,6 +43,7 @@ - #include "utf8.h" - #include "verb-log-control.h" - #include "verbs.h" -+#include "missing_stdlib.h" - - static int arg_family = AF_UNSPEC; - static int arg_ifindex = 0; ---- a/src/shared/bus-get-properties.c -+++ b/src/shared/bus-get-properties.c -@@ -4,6 +4,7 @@ - #include "rlimit-util.h" - #include "stdio-util.h" - #include "string-util.h" -+#include "missing_stdlib.h" - - int bus_property_get_bool( - sd_bus *bus, ---- a/src/shared/bus-unit-procs.c -+++ b/src/shared/bus-unit-procs.c -@@ -10,6 +10,7 @@ - #include "sort-util.h" - #include "string-util.h" - #include "terminal-util.h" -+#include "missing_stdlib.h" - - struct CGroupInfo { - char *cgroup_path; ---- a/src/shared/bus-unit-util.c -+++ b/src/shared/bus-unit-util.c -@@ -49,6 +49,7 @@ - #include "unit-def.h" - #include "user-util.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { - assert(message); ---- a/src/shared/bus-util.c -+++ b/src/shared/bus-util.c -@@ -21,6 +21,7 @@ - #include "path-util.h" - #include "socket-util.h" - #include "stdio-util.h" -+#include "missing_stdlib.h" - - static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { - sd_event *e = userdata; ---- a/src/shared/dns-domain.c -+++ b/src/shared/dns-domain.c -@@ -17,6 +17,7 @@ - #include "string-util.h" - #include "strv.h" - #include "utf8.h" -+#include "missing_stdlib.h" - - int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { - const char *n; ---- a/src/shared/journal-importer.c -+++ b/src/shared/journal-importer.c -@@ -15,6 +15,7 @@ - #include "parse-util.h" - #include "string-util.h" - #include "unaligned.h" -+#include "missing_stdlib.h" - - enum { - IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ ---- a/src/shared/logs-show.c -+++ b/src/shared/logs-show.c -@@ -42,6 +42,7 @@ - #include "utf8.h" - #include "util.h" - #include "web-util.h" -+#include "missing_stdlib.h" - - /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ - #define PRINT_LINE_THRESHOLD 3 ---- a/src/shared/pager.c -+++ b/src/shared/pager.c -@@ -26,6 +26,7 @@ - #include "strv.h" - #include "terminal-util.h" - #include "util.h" -+#include "missing_stdlib.h" - - static pid_t pager_pid = 0; - ---- a/src/shared/uid-range.c -+++ b/src/shared/uid-range.c -@@ -9,6 +9,7 @@ - #include "sort-util.h" - #include "uid-range.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { - assert(range); ---- a/src/socket-proxy/socket-proxyd.c -+++ b/src/socket-proxy/socket-proxyd.c -@@ -26,6 +26,7 @@ - #include "socket-util.h" - #include "string-util.h" - #include "util.h" -+#include "missing_stdlib.h" - - #define BUFFER_SIZE (256 * 1024) - ---- a/src/test/test-hexdecoct.c -+++ b/src/test/test-hexdecoct.c -@@ -7,6 +7,7 @@ - #include "macro.h" - #include "random-util.h" - #include "string-util.h" -+#include "missing_stdlib.h" - #include "tests.h" - - TEST(hexchar) { ---- a/src/udev/udev-builtin-path_id.c -+++ b/src/udev/udev-builtin-path_id.c -@@ -22,6 +22,7 @@ - #include "sysexits.h" - #include "udev-builtin.h" - #include "udev-util.h" -+#include "missing_stdlib.h" - - _printf_(2,3) - static void path_prepend(char **path, const char *fmt, ...) { ---- a/src/udev/udev-event.c -+++ b/src/udev/udev-event.c -@@ -35,6 +35,7 @@ - #include "udev-util.h" - #include "udev-watch.h" - #include "user-util.h" -+#include "missing_stdlib.h" - - typedef struct Spawn { - sd_device *device; ---- a/src/udev/udev-rules.c -+++ b/src/udev/udev-rules.c -@@ -34,6 +34,7 @@ - #include "udev-util.h" - #include "user-util.h" - #include "virt.h" -+#include "missing_stdlib.h" - - #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") - ---- a/src/core/dbus-cgroup.c -+++ b/src/core/dbus-cgroup.c -@@ -21,6 +21,7 @@ - #include "parse-util.h" - #include "path-util.h" - #include "percent-util.h" -+#include "missing_stdlib.h" - #include "socket-util.h" - - BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); ---- a/src/fstab-generator/fstab-generator.c -+++ b/src/fstab-generator/fstab-generator.c -@@ -29,6 +29,7 @@ - #include "util.h" - #include "virt.h" - #include "volatile-util.h" -+#include "missing_stdlib.h" - - typedef enum MountPointFlags { - MOUNT_NOAUTO = 1 << 0, diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch new file mode 100644 index 0000000000..96322e5a56 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch @@ -0,0 +1,52 @@ +From fa598869cca684c001f3dc23ce2198f5a6169e2a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 8 Nov 2022 13:31:34 -0800 +Subject: [PATCH] test-bus-error: strerror() is assumed to be GNU specific + version mark it so + +Upstream-Status: Inappropriate [Upstream systemd only supports glibc] + +Signed-off-by: Khem Raj +--- + src/libsystemd/sd-bus/test-bus-error.c | 2 ++ + src/test/test-errno-util.c | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c +index a55f3f9856..4123bf3da0 100644 +--- a/src/libsystemd/sd-bus/test-bus-error.c ++++ b/src/libsystemd/sd-bus/test-bus-error.c +@@ -99,7 +99,9 @@ TEST(error) { + assert_se(!sd_bus_error_is_set(&error)); + assert_se(sd_bus_error_set_errno(&error, EBUSY) == -EBUSY); + assert_se(streq(error.name, "System.Error.EBUSY")); ++#ifdef __GLIBC__ + assert_se(streq(error.message, STRERROR(EBUSY))); ++#endif + assert_se(sd_bus_error_has_name(&error, "System.Error.EBUSY")); + assert_se(sd_bus_error_get_errno(&error) == EBUSY); + assert_se(sd_bus_error_is_set(&error)); +diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c +index d3d022c33f..74e95c804d 100644 +--- a/src/test/test-errno-util.c ++++ b/src/test/test-errno-util.c +@@ -4,7 +4,7 @@ + #include "stdio-util.h" + #include "string-util.h" + #include "tests.h" +- ++#ifdef __GLIBC__ + TEST(strerror_not_threadsafe) { + /* Just check that strerror really is not thread-safe. */ + log_info("strerror(%d) → %s", 200, strerror(200)); +@@ -46,6 +46,7 @@ TEST(STRERROR_OR_ELSE) { + log_info("STRERROR_OR_ELSE(EPERM, \"EOF\") → %s", STRERROR_OR_EOF(EPERM)); + log_info("STRERROR_OR_ELSE(-EPERM, \"EOF\") → %s", STRERROR_OR_EOF(-EPERM)); + } ++#endif /* __GLIBC__ */ + + TEST(PROTECT_ERRNO) { + errno = 12; +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch deleted file mode 100644 index 846c01bd4f..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ /dev/null @@ -1,147 +0,0 @@ -From fb068403b25002156435350165ea418a6338a313 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined - -If the standard library doesn't provide brace -expansion users just won't get it. - -Dont use GNU GLOB extentions on non-glibc systems - -Conditionalize use of GLOB_ALTDIRFUNC - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/glob-util.c | 12 ++++++++++++ - src/test/test-glob-util.c | 16 ++++++++++++++++ - src/tmpfiles/tmpfiles.c | 10 ++++++++++ - 3 files changed, 38 insertions(+) - ---- a/src/basic/glob-util.c -+++ b/src/basic/glob-util.c -@@ -12,6 +12,12 @@ - #include "path-util.h" - #include "strv.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - static void closedir_wrapper(void* v) { - (void) closedir(v); - } -@@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) { - int safe_glob(const char *path, int flags, glob_t *pglob) { - int k; - -+#ifdef GLOB_ALTDIRFUNC - /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ - assert(!(flags & GLOB_ALTDIRFUNC)); - -@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag - pglob->gl_lstat = lstat; - if (!pglob->gl_stat) - pglob->gl_stat = stat; -+#endif - - errno = 0; -+#ifdef GLOB_ALTDIRFUNC - k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); -+#else -+ k = glob(path, flags, NULL, pglob); -+#endif - if (k == GLOB_NOMATCH) - return -ENOENT; - if (k == GLOB_NOSPACE) ---- a/src/test/test-glob-util.c -+++ b/src/test/test-glob-util.c -@@ -13,6 +13,12 @@ - #include "tests.h" - #include "tmpfile-util.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - TEST(glob_exists) { - char name[] = "/tmp/test-glob_exists.XXXXXX"; - int fd = -1; -@@ -40,11 +46,13 @@ TEST(glob_no_dot) { - const char *fn; - - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_closedir = closedir_wrapper, - .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, - .gl_opendir = (void *(*)(const char *)) opendir, - .gl_lstat = lstat, - .gl_stat = stat, -+#endif - }; - - int r; -@@ -52,11 +60,19 @@ TEST(glob_no_dot) { - assert_se(mkdtemp(template)); - - fn = strjoina(template, "/*"); -+#ifdef GLOB_ALTDIRFUNC - r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); -+#else -+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); -+#endif - assert_se(r == GLOB_NOMATCH); - - fn = strjoina(template, "/.*"); -+#ifdef GLOB_ALTDIRFUNC - r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); -+#else -+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); -+#endif - assert_se(r == GLOB_NOMATCH); - - (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); ---- a/src/tmpfiles/tmpfiles.c -+++ b/src/tmpfiles/tmpfiles.c -@@ -67,6 +67,12 @@ - #include "umask-util.h" - #include "user-util.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates - * them in the file system. This is intended to be used to create - * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1961,7 +1967,9 @@ finish: - - static int glob_item(Item *i, action_t action) { - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_opendir = (void *(*)(const char *)) opendir_nomod, -+#endif - }; - int r = 0, k; - char **fn; -@@ -1981,7 +1989,9 @@ static int glob_item(Item *i, action_t a - - static int glob_item_recursively(Item *i, fdaction_t action) { - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_opendir = (void *(*)(const char *)) opendir_nomod, -+#endif - }; - int r = 0, k; - char **fn; diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch deleted file mode 100644 index 57e18a5808..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH] add missing FTW_ macros for musl - -This is to avoid build failures like below for musl. - - locale-util.c:296:24: error: 'FTW_STOP' undeclared - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/basic/missing_type.h | 20 ++++++++++++++++++++ - src/shared/mount-setup.c | 1 + - 2 files changed, 21 insertions(+) - ---- a/src/basic/missing_type.h -+++ b/src/basic/missing_type.h -@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi - #define __COMPAR_FN_T - typedef int (*__compar_fn_t)(const void *, const void *); - #endif -+ -+#ifndef FTW_ACTIONRETVAL -+#define FTW_ACTIONRETVAL 16 -+#endif -+ -+#ifndef FTW_CONTINUE -+#define FTW_CONTINUE 0 -+#endif -+ -+#ifndef FTW_STOP -+#define FTW_STOP 1 -+#endif -+ -+#ifndef FTW_SKIP_SUBTREE -+#define FTW_SKIP_SUBTREE 2 -+#endif -+ -+#ifndef FTW_SKIP_SIBLINGS -+#define FTW_SKIP_SIBLINGS 3 -+#endif ---- a/src/shared/mount-setup.c -+++ b/src/shared/mount-setup.c -@@ -32,6 +32,7 @@ - #include "strv.h" - #include "user-util.h" - #include "virt.h" -+#include "missing_type.h" - - typedef enum MountMode { - MNT_NONE = 0, ---- a/src/test/test-recurse-dir.c -+++ b/src/test/test-recurse-dir.c -@@ -6,6 +6,7 @@ - #include "recurse-dir.h" - #include "strv.h" - #include "tests.h" -+#include "missing_type.h" - - static char **list_nftw = NULL; - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch deleted file mode 100644 index 0fc320420e..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c7453b716ae308b89cf4b2b231a36ddd38a49752 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:03:47 +0800 -Subject: [PATCH] fix missing of __register_atfork for non-glibc builds - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/basic/process-util.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 461bbfe9a5..2d06f9f60a 100644 ---- a/src/basic/process-util.c -+++ b/src/basic/process-util.c -@@ -18,6 +18,9 @@ - #if HAVE_VALGRIND_VALGRIND_H - #include - #endif -+#ifndef __GLIBC__ -+#include -+#endif - - #include "alloc-util.h" - #include "architecture.h" -@@ -1202,11 +1205,15 @@ void reset_cached_pid(void) { - cached_pid = CACHED_PID_UNSET; - } - -+#ifdef __GLIBC__ - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against - * libpthread, as it is part of glibc anyway. */ - extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); - extern void* __dso_handle _weak_; -+#else -+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child) -+#endif - - pid_t getpid_cached(void) { - static bool installed = false; diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch new file mode 100644 index 0000000000..e50b47a5a0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch @@ -0,0 +1,61 @@ +From 542f999a846dfd49d9373d30fffb2a44168d7b5e Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 13:55:12 +0800 +Subject: [PATCH] missing_type.h: add comparison_fn_t + +Make it work with musl where comparison_fn_t and is not provided. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Alex Kiernan +[Rebased for v244] +Signed-off-by: Chen Qi +[Rebased for v242] +Signed-off-by: Andrej Valek +[Rebased for v250, Drop __compare_fn_t] +Signed-off-by: Jiaqing Zhao +--- + src/basic/missing_type.h | 4 ++++ + src/basic/sort-util.h | 1 + + src/libsystemd/sd-journal/catalog.c | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h +index f6233090a9..6c0456349d 100644 +--- a/src/basic/missing_type.h ++++ b/src/basic/missing_type.h +@@ -10,3 +10,7 @@ + #if !HAVE_CHAR16_T + #define char16_t uint16_t + #endif ++ ++#ifndef __GLIBC__ ++typedef int (*comparison_fn_t)(const void *, const void *); ++#endif +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index f0bf246aa3..33669c7a75 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -4,6 +4,7 @@ + #include + + #include "macro.h" ++#include "missing_type.h" + + /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the + * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that +diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c +index 7527abf636..f33383e57f 100644 +--- a/src/libsystemd/sd-journal/catalog.c ++++ b/src/libsystemd/sd-journal/catalog.c +@@ -28,6 +28,7 @@ + #include "string-util.h" + #include "strv.h" + #include "tmpfile-util.h" ++#include "missing_type.h" + + const char * const catalog_file_dirs[] = { + "/usr/local/lib/systemd/catalog/", +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch deleted file mode 100644 index 029f413aa8..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 856010e268a6aca8e5f02502457afe289bd877f1 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH] Use uintmax_t for handling rlim_t - -PRIu{32,64} is not right format to represent rlim_t type -therefore use %ju and typecast the rlim_t variables to -uintmax_t. - -Fixes portablility errors like - -execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=] -| fprintf(f, "%s%s: " RLIM_FMT "\n", -| ^~~~~~~~ -| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); -| ~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] - -Signed-off-by: Khem Raj -[Rebased for v241] -Signed-off-by: Chen Qi - ---- - src/basic/format-util.h | 8 +------- - src/basic/rlimit-util.c | 12 ++++++------ - src/core/execute.c | 4 ++-- - 3 files changed, 9 insertions(+), 15 deletions(-) - ---- a/src/basic/format-util.h -+++ b/src/basic/format-util.h -@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 - # error Unknown timex member size - #endif - --#if SIZEOF_RLIM_T == 8 --# define RLIM_FMT "%" PRIu64 --#elif SIZEOF_RLIM_T == 4 --# define RLIM_FMT "%" PRIu32 --#else --# error Unknown rlim_t size --#endif -+#define RLIM_FMT "%ju" - - #if SIZEOF_DEV_T == 8 - # define DEV_FMT "%" PRIu64 ---- a/src/basic/rlimit-util.c -+++ b/src/basic/rlimit-util.c -@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons - fixed.rlim_max == highest.rlim_max) - return 0; - -- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); -+ log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); - - return RET_NERRNO(setrlimit(resource, &fixed)); - } -@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r - if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) - r = free_and_strdup(&s, "infinity"); - else if (rl->rlim_cur >= RLIM_INFINITY) -- r = asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); -+ r = asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); - else if (rl->rlim_max >= RLIM_INFINITY) -- r = asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); -+ r = asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); - else if (rl->rlim_cur == rl->rlim_max) -- r = asprintf(&s, RLIM_FMT, rl->rlim_cur); -+ r = asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); - else -- r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); -+ r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); - if (r < 0) - return -ENOMEM; - -@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { - - rl.rlim_cur = FD_SETSIZE; - if (setrlimit(RLIMIT_NOFILE, &rl) < 0) -- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); -+ return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); - - return 1; - } ---- a/src/core/execute.c -+++ b/src/core/execute.c -@@ -5639,9 +5639,9 @@ void exec_context_dump(const ExecContext - for (unsigned i = 0; i < RLIM_NLIMITS; i++) - if (c->rlimit[i]) { - fprintf(f, "%sLimit%s: " RLIM_FMT "\n", -- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); -+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max); - fprintf(f, "%sLimit%sSoft: " RLIM_FMT "\n", -- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur); -+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur); - } - - if (c->ioprio_set) { diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch new file mode 100644 index 0000000000..4143ab4d70 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch @@ -0,0 +1,417 @@ +From 383e85e15f16a46aac925aa439b8b60f58b40aa6 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sat, 22 May 2021 20:26:24 +0200 +Subject: [PATCH] add fallback parse_printf_format implementation + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Emil Renner Berthing +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + meson.build | 1 + + src/basic/meson.build | 5 + + src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++ + src/basic/parse-printf-format.h | 57 +++++ + src/basic/stdio-util.h | 2 +- + src/libsystemd/sd-journal/journal-send.c | 2 +- + 6 files changed, 338 insertions(+), 2 deletions(-) + create mode 100644 src/basic/parse-printf-format.c + create mode 100644 src/basic/parse-printf-format.h + +--- a/meson.build ++++ b/meson.build +@@ -781,6 +781,7 @@ endif + foreach header : ['crypt.h', + 'linux/memfd.h', + 'linux/vm_sockets.h', ++ 'printf.h', + 'sys/auxv.h', + 'threads.h', + 'valgrind/memcheck.h', +--- a/src/basic/meson.build ++++ b/src/basic/meson.build +@@ -179,6 +179,11 @@ endforeach + + basic_sources += generated_gperf_headers + ++if conf.get('HAVE_PRINTF_H') != 1 ++ basic_sources += [files('parse-printf-format.c')] ++endif ++ ++ + ############################################################ + + arch_list = [ +--- /dev/null ++++ b/src/basic/parse-printf-format.c +@@ -0,0 +1,273 @@ ++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ ++ ++/*** ++ This file is part of systemd. ++ ++ Copyright 2014 Emil Renner Berthing ++ ++ With parts from the musl C library ++ Copyright 2005-2014 Rich Felker, et al. ++ ++ systemd is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation; either version 2.1 of the License, or ++ (at your option) any later version. ++ ++ systemd is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with systemd; If not, see . ++***/ ++ ++#include ++#include ++ ++#include "parse-printf-format.h" ++ ++static const char *consume_nonarg(const char *fmt) ++{ ++ do { ++ if (*fmt == '\0') ++ return fmt; ++ } while (*fmt++ != '%'); ++ return fmt; ++} ++ ++static const char *consume_num(const char *fmt) ++{ ++ for (;*fmt >= '0' && *fmt <= '9'; fmt++) ++ /* do nothing */; ++ return fmt; ++} ++ ++static const char *consume_argn(const char *fmt, size_t *arg) ++{ ++ const char *p = fmt; ++ size_t val = 0; ++ ++ if (*p < '1' || *p > '9') ++ return fmt; ++ do { ++ val = 10*val + (*p++ - '0'); ++ } while (*p >= '0' && *p <= '9'); ++ ++ if (*p != '$') ++ return fmt; ++ *arg = val; ++ return p+1; ++} ++ ++static const char *consume_flags(const char *fmt) ++{ ++ while (1) { ++ switch (*fmt) { ++ case '#': ++ case '0': ++ case '-': ++ case ' ': ++ case '+': ++ case '\'': ++ case 'I': ++ fmt++; ++ continue; ++ } ++ return fmt; ++ } ++} ++ ++enum state { ++ BARE, ++ LPRE, ++ LLPRE, ++ HPRE, ++ HHPRE, ++ BIGLPRE, ++ ZTPRE, ++ JPRE, ++ STOP ++}; ++ ++enum type { ++ NONE, ++ PTR, ++ INT, ++ UINT, ++ ULLONG, ++ LONG, ++ ULONG, ++ SHORT, ++ USHORT, ++ CHAR, ++ UCHAR, ++ LLONG, ++ SIZET, ++ IMAX, ++ UMAX, ++ PDIFF, ++ UIPTR, ++ DBL, ++ LDBL, ++ MAXTYPE ++}; ++ ++static const short pa_types[MAXTYPE] = { ++ [NONE] = PA_INT, ++ [PTR] = PA_POINTER, ++ [INT] = PA_INT, ++ [UINT] = PA_INT, ++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG, ++ [LONG] = PA_INT | PA_FLAG_LONG, ++ [ULONG] = PA_INT | PA_FLAG_LONG, ++ [SHORT] = PA_INT | PA_FLAG_SHORT, ++ [USHORT] = PA_INT | PA_FLAG_SHORT, ++ [CHAR] = PA_CHAR, ++ [UCHAR] = PA_CHAR, ++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG, ++ [SIZET] = PA_INT | PA_FLAG_LONG, ++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG, ++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG, ++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG, ++ [UIPTR] = PA_INT | PA_FLAG_LONG, ++ [DBL] = PA_DOUBLE, ++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE ++}; ++ ++#define S(x) [(x)-'A'] ++#define E(x) (STOP + (x)) ++ ++static const unsigned char states[]['z'-'A'+1] = { ++ { /* 0: bare types */ ++ S('d') = E(INT), S('i') = E(INT), ++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT), ++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL), ++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL), ++ S('c') = E(CHAR),S('C') = E(INT), ++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR), ++ S('m') = E(NONE), ++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE, ++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE ++ }, { /* 1: l-prefixed */ ++ S('d') = E(LONG), S('i') = E(LONG), ++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG), ++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL), ++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL), ++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR), ++ S('l') = LLPRE ++ }, { /* 2: ll-prefixed */ ++ S('d') = E(LLONG), S('i') = E(LLONG), ++ S('o') = E(ULLONG),S('u') = E(ULLONG), ++ S('x') = E(ULLONG),S('X') = E(ULLONG), ++ S('n') = E(PTR) ++ }, { /* 3: h-prefixed */ ++ S('d') = E(SHORT), S('i') = E(SHORT), ++ S('o') = E(USHORT),S('u') = E(USHORT), ++ S('x') = E(USHORT),S('X') = E(USHORT), ++ S('n') = E(PTR), ++ S('h') = HHPRE ++ }, { /* 4: hh-prefixed */ ++ S('d') = E(CHAR), S('i') = E(CHAR), ++ S('o') = E(UCHAR),S('u') = E(UCHAR), ++ S('x') = E(UCHAR),S('X') = E(UCHAR), ++ S('n') = E(PTR) ++ }, { /* 5: L-prefixed */ ++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL), ++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL), ++ S('n') = E(PTR) ++ }, { /* 6: z- or t-prefixed (assumed to be same size) */ ++ S('d') = E(PDIFF),S('i') = E(PDIFF), ++ S('o') = E(SIZET),S('u') = E(SIZET), ++ S('x') = E(SIZET),S('X') = E(SIZET), ++ S('n') = E(PTR) ++ }, { /* 7: j-prefixed */ ++ S('d') = E(IMAX), S('i') = E(IMAX), ++ S('o') = E(UMAX), S('u') = E(UMAX), ++ S('x') = E(UMAX), S('X') = E(UMAX), ++ S('n') = E(PTR) ++ } ++}; ++ ++size_t parse_printf_format(const char *fmt, size_t n, int *types) ++{ ++ size_t i = 0; ++ size_t last = 0; ++ ++ memset(types, 0, n); ++ ++ while (1) { ++ size_t arg; ++ unsigned int state; ++ ++ fmt = consume_nonarg(fmt); ++ if (*fmt == '\0') ++ break; ++ if (*fmt == '%') { ++ fmt++; ++ continue; ++ } ++ arg = 0; ++ fmt = consume_argn(fmt, &arg); ++ /* flags */ ++ fmt = consume_flags(fmt); ++ /* width */ ++ if (*fmt == '*') { ++ size_t warg = 0; ++ fmt = consume_argn(fmt+1, &warg); ++ if (warg == 0) ++ warg = ++i; ++ if (warg > last) ++ last = warg; ++ if (warg <= n && types[warg-1] == NONE) ++ types[warg-1] = INT; ++ } else ++ fmt = consume_num(fmt); ++ /* precision */ ++ if (*fmt == '.') { ++ fmt++; ++ if (*fmt == '*') { ++ size_t parg = 0; ++ fmt = consume_argn(fmt+1, &parg); ++ if (parg == 0) ++ parg = ++i; ++ if (parg > last) ++ last = parg; ++ if (parg <= n && types[parg-1] == NONE) ++ types[parg-1] = INT; ++ } else { ++ if (*fmt == '-') ++ fmt++; ++ fmt = consume_num(fmt); ++ } ++ } ++ /* length modifier and conversion specifier */ ++ state = BARE; ++ do { ++ unsigned char c = *fmt++; ++ ++ if (c < 'A' || c > 'z') ++ continue; ++ state = states[state]S(c); ++ if (state == 0) ++ continue; ++ } while (state < STOP); ++ ++ if (state == E(NONE)) ++ continue; ++ ++ if (arg == 0) ++ arg = ++i; ++ if (arg > last) ++ last = arg; ++ if (arg <= n) ++ types[arg-1] = state - STOP; ++ } ++ ++ if (last > n) ++ last = n; ++ for (i = 0; i < last; i++) ++ types[i] = pa_types[types[i]]; ++ ++ return last; ++} +--- /dev/null ++++ b/src/basic/parse-printf-format.h +@@ -0,0 +1,57 @@ ++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ ++ ++/*** ++ This file is part of systemd. ++ ++ Copyright 2014 Emil Renner Berthing ++ ++ With parts from the GNU C Library ++ Copyright 1991-2014 Free Software Foundation, Inc. ++ ++ systemd is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation; either version 2.1 of the License, or ++ (at your option) any later version. ++ ++ systemd is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with systemd; If not, see . ++***/ ++ ++#pragma once ++ ++#include "config.h" ++ ++#if HAVE_PRINTF_H ++#include ++#else ++ ++#include ++ ++enum { /* C type: */ ++ PA_INT, /* int */ ++ PA_CHAR, /* int, cast to char */ ++ PA_WCHAR, /* wide char */ ++ PA_STRING, /* const char *, a '\0'-terminated string */ ++ PA_WSTRING, /* const wchar_t *, wide character string */ ++ PA_POINTER, /* void * */ ++ PA_FLOAT, /* float */ ++ PA_DOUBLE, /* double */ ++ PA_LAST ++}; ++ ++/* Flag bits that can be set in a type returned by `parse_printf_format'. */ ++#define PA_FLAG_MASK 0xff00 ++#define PA_FLAG_LONG_LONG (1 << 8) ++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG ++#define PA_FLAG_LONG (1 << 9) ++#define PA_FLAG_SHORT (1 << 10) ++#define PA_FLAG_PTR (1 << 11) ++ ++size_t parse_printf_format(const char *fmt, size_t n, int *types); ++ ++#endif /* HAVE_PRINTF_H */ +--- a/src/basic/stdio-util.h ++++ b/src/basic/stdio-util.h +@@ -1,12 +1,12 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + #pragma once + +-#include + #include + #include + #include + + #include "macro.h" ++#include "parse-printf-format.h" + + _printf_(3, 4) + static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) { +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c +@@ -2,7 +2,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -27,6 +26,7 @@ + #include "stdio-util.h" + #include "string-util.h" + #include "tmpfile-util.h" ++#include "parse-printf-format.h" + + #define SNDBUF_SIZE (8*1024*1024) + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch new file mode 100644 index 0000000000..ec451cddb7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch @@ -0,0 +1,684 @@ +From ee5c8b494a3269edd154a0b799a03b39dba2ceb0 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 14:18:21 +0800 +Subject: [PATCH] src/basic/missing.h: check for missing strndupa + +include missing.h for definition of strndupa + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +[Rebased for v242] +Signed-off-by: Andrej Valek +[rebased for systemd 243] +Signed-off-by: Scott Murray +Signed-off-by: Alex Kiernan +[rebased for systemd 244] +[Rebased for v247] +Signed-off-by: Luca Boccassi +[Rebased for v254] +--- + meson.build | 1 + + src/backlight/backlight.c | 1 + + src/basic/cgroup-util.c | 1 + + src/basic/env-util.c | 1 + + src/basic/log.c | 1 + + src/basic/missing_stdlib.h | 12 ++++++++++++ + src/basic/mkdir.c | 1 + + src/basic/mountpoint-util.c | 1 + + src/basic/parse-util.c | 1 + + src/basic/path-lookup.c | 1 + + src/basic/percent-util.c | 1 + + src/basic/proc-cmdline.c | 1 + + src/basic/procfs-util.c | 1 + + src/basic/time-util.c | 1 + + src/boot/bless-boot.c | 1 + + src/core/dbus-cgroup.c | 1 + + src/core/dbus-execute.c | 1 + + src/core/dbus-util.c | 1 + + src/core/execute.c | 1 + + src/core/kmod-setup.c | 1 + + src/core/service.c | 1 + + src/coredump/coredump-vacuum.c | 1 + + src/fstab-generator/fstab-generator.c | 1 + + src/journal-remote/journal-remote-main.c | 1 + + src/journal/journalctl.c | 1 + + src/libsystemd/sd-bus/bus-message.c | 1 + + src/libsystemd/sd-bus/bus-objects.c | 1 + + src/libsystemd/sd-bus/bus-socket.c | 1 + + src/libsystemd/sd-bus/sd-bus.c | 1 + + src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + + src/libsystemd/sd-journal/sd-journal.c | 1 + + src/login/pam_systemd.c | 1 + + src/network/generator/network-generator.c | 1 + + src/nspawn/nspawn-settings.c | 1 + + src/nss-mymachines/nss-mymachines.c | 1 + + src/portable/portable.c | 1 + + src/resolve/resolvectl.c | 1 + + src/shared/bus-get-properties.c | 1 + + src/shared/bus-unit-procs.c | 1 + + src/shared/bus-unit-util.c | 1 + + src/shared/bus-util.c | 1 + + src/shared/dns-domain.c | 1 + + src/shared/journal-importer.c | 1 + + src/shared/logs-show.c | 1 + + src/shared/pager.c | 1 + + src/socket-proxy/socket-proxyd.c | 1 + + src/test/test-hexdecoct.c | 1 + + src/udev/udev-builtin-path_id.c | 1 + + src/udev/udev-event.c | 1 + + src/udev/udev-rules.c | 1 + + 50 files changed, 61 insertions(+) + +diff --git a/meson.build b/meson.build +index fb96143c37..739b2f7f72 100644 +--- a/meson.build ++++ b/meson.build +@@ -595,6 +595,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] + endforeach + + foreach ident : [ ++ ['strndupa' , '''#include '''], + ['memfd_create', '''#include '''], + ['gettid', '''#include + #include '''], +diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c +index e66477f328..2613d1e3f9 100644 +--- a/src/backlight/backlight.c ++++ b/src/backlight/backlight.c +@@ -19,6 +19,7 @@ + #include "string-util.h" + #include "strv.h" + #include "terminal-util.h" ++#include "missing_stdlib.h" + + #define PCI_CLASS_GRAPHICS_CARD 0x30000 + +diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c +index feda596939..11b4375ed5 100644 +--- a/src/basic/cgroup-util.c ++++ b/src/basic/cgroup-util.c +@@ -38,6 +38,7 @@ + #include "unit-name.h" + #include "user-util.h" + #include "xattr-util.h" ++#include "missing_stdlib.h" + + static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { + _cleanup_free_ char *fs = NULL; +diff --git a/src/basic/env-util.c b/src/basic/env-util.c +index 55ac11a512..7ccb1d7887 100644 +--- a/src/basic/env-util.c ++++ b/src/basic/env-util.c +@@ -19,6 +19,7 @@ + #include "string-util.h" + #include "strv.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + /* We follow bash for the character set. Different shells have different rules. */ + #define VALID_BASH_ENV_NAME_CHARS \ +diff --git a/src/basic/log.c b/src/basic/log.c +index fc5793139e..515218fca8 100644 +--- a/src/basic/log.c ++++ b/src/basic/log.c +@@ -40,6 +40,7 @@ + #include "terminal-util.h" + #include "time-util.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + #define SNDBUF_SIZE (8*1024*1024) + #define IOVEC_MAX 256U +diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h +index 8c76f93eb2..9068bfb4f0 100644 +--- a/src/basic/missing_stdlib.h ++++ b/src/basic/missing_stdlib.h +@@ -11,3 +11,15 @@ + # error "neither secure_getenv nor __secure_getenv are available" + # endif + #endif ++ ++/* string.h */ ++#if ! HAVE_STRNDUPA ++#define strndupa(s, n) \ ++ ({ \ ++ const char *__old = (s); \ ++ size_t __len = strnlen(__old, (n)); \ ++ char *__new = (char *)alloca(__len + 1); \ ++ __new[__len] = '\0'; \ ++ (char *)memcpy(__new, __old, __len); \ ++ }) ++#endif +diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c +index 7ad19ee33b..cc1d5e1e5b 100644 +--- a/src/basic/mkdir.c ++++ b/src/basic/mkdir.c +@@ -15,6 +15,7 @@ + #include "stat-util.h" + #include "stdio-util.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + int mkdirat_safe_internal( + int dir_fd, +diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c +index bc74fbef8f..cdb609bb84 100644 +--- a/src/basic/mountpoint-util.c ++++ b/src/basic/mountpoint-util.c +@@ -18,6 +18,7 @@ + #include "missing_stat.h" + #include "missing_syscall.h" + #include "mkdir.h" ++#include "missing_stdlib.h" + #include "mountpoint-util.h" + #include "nulstr-util.h" + #include "parse-util.h" +diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c +index 3445d31307..d82b4415d9 100644 +--- a/src/basic/parse-util.c ++++ b/src/basic/parse-util.c +@@ -18,6 +18,7 @@ + #include "stat-util.h" + #include "string-util.h" + #include "strv.h" ++#include "missing_stdlib.h" + + int parse_boolean(const char *v) { + if (!v) +diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c +index c99e9d8786..71a917a0b0 100644 +--- a/src/basic/path-lookup.c ++++ b/src/basic/path-lookup.c +@@ -16,6 +16,7 @@ + #include "strv.h" + #include "tmpfile-util.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + int xdg_user_runtime_dir(char **ret, const char *suffix) { + const char *e; +diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c +index cab9d0eaea..5f6ca258e9 100644 +--- a/src/basic/percent-util.c ++++ b/src/basic/percent-util.c +@@ -3,6 +3,7 @@ + #include "percent-util.h" + #include "string-util.h" + #include "parse-util.h" ++#include "missing_stdlib.h" + + static int parse_parts_value_whole(const char *p, const char *symbol) { + const char *pc, *n; +diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c +index eea70d8606..ae3abd8402 100644 +--- a/src/basic/proc-cmdline.c ++++ b/src/basic/proc-cmdline.c +@@ -16,6 +16,7 @@ + #include "string-util.h" + #include "strv.h" + #include "virt.h" ++#include "missing_stdlib.h" + + int proc_cmdline_filter_pid1_args(char **argv, char ***ret) { + enum { +diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c +index bcba5a5208..64a95dd866 100644 +--- a/src/basic/procfs-util.c ++++ b/src/basic/procfs-util.c +@@ -12,6 +12,7 @@ + #include "procfs-util.h" + #include "stdio-util.h" + #include "string-util.h" ++#include "missing_stdlib.h" + + int procfs_get_pid_max(uint64_t *ret) { + _cleanup_free_ char *value = NULL; +diff --git a/src/basic/time-util.c b/src/basic/time-util.c +index b700f364ef..48a26bcec9 100644 +--- a/src/basic/time-util.c ++++ b/src/basic/time-util.c +@@ -27,6 +27,7 @@ + #include "string-util.h" + #include "strv.h" + #include "time-util.h" ++#include "missing_stdlib.h" + + static clockid_t map_clock_id(clockid_t c) { + +diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c +index 59f02b761a..7496646350 100644 +--- a/src/boot/bless-boot.c ++++ b/src/boot/bless-boot.c +@@ -22,6 +22,7 @@ + #include "terminal-util.h" + #include "verbs.h" + #include "virt.h" ++#include "missing_stdlib.h" + + static char **arg_path = NULL; + +diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c +index b5484eda78..54ed62c790 100644 +--- a/src/core/dbus-cgroup.c ++++ b/src/core/dbus-cgroup.c +@@ -23,6 +23,7 @@ + #include "parse-util.h" + #include "path-util.h" + #include "percent-util.h" ++#include "missing_stdlib.h" + #include "socket-util.h" + + BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); +diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c +index f514b8fd12..4febd0d496 100644 +--- a/src/core/dbus-execute.c ++++ b/src/core/dbus-execute.c +@@ -48,6 +48,7 @@ + #include "unit-printf.h" + #include "user-util.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); + static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); +diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c +index edfa0eb69a..6fd2ec9062 100644 +--- a/src/core/dbus-util.c ++++ b/src/core/dbus-util.c +@@ -9,6 +9,7 @@ + #include "unit-printf.h" + #include "user-util.h" + #include "unit.h" ++#include "missing_stdlib.h" + + int bus_property_get_triggered_unit( + sd_bus *bus, +diff --git a/src/core/execute.c b/src/core/execute.c +index 853e87450f..8ef76de9ab 100644 +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -113,6 +113,7 @@ + #include "unit-serialize.h" + #include "user-util.h" + #include "utmp-wtmp.h" ++#include "missing_stdlib.h" + + #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) + #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) +diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c +index e843743777..e149807492 100644 +--- a/src/core/kmod-setup.c ++++ b/src/core/kmod-setup.c +@@ -13,6 +13,7 @@ + #include "string-util.h" + #include "strv.h" + #include "virt.h" ++#include "missing_stdlib.h" + + #if HAVE_KMOD + #include "module-util.h" +diff --git a/src/core/service.c b/src/core/service.c +index 9ad3c3d995..b112d64919 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -45,6 +45,7 @@ + #include "unit-name.h" + #include "unit.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + #define service_spawn(...) service_spawn_internal(__func__, __VA_ARGS__) + +diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c +index c6e201ecf2..ab034475e2 100644 +--- a/src/coredump/coredump-vacuum.c ++++ b/src/coredump/coredump-vacuum.c +@@ -17,6 +17,7 @@ + #include "string-util.h" + #include "time-util.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ + #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index efc553b698..acea922311 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -37,6 +37,7 @@ + #include "unit-name.h" + #include "virt.h" + #include "volatile-util.h" ++#include "missing_stdlib.h" + + typedef enum MountPointFlags { + MOUNT_NOAUTO = 1 << 0, +diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c +index 7df264fb53..9463a0e9fb 100644 +--- a/src/journal-remote/journal-remote-main.c ++++ b/src/journal-remote/journal-remote-main.c +@@ -26,6 +26,7 @@ + #include "stat-util.h" + #include "string-table.h" + #include "strv.h" ++#include "missing_stdlib.h" + + #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" + #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" +diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c +index da0fac548e..c1c043e0e0 100644 +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -77,6 +77,7 @@ + #include "unit-name.h" + #include "user-util.h" + #include "varlink.h" ++#include "missing_stdlib.h" + + #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) + #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ +diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c +index 9719f97c02..75decd9834 100644 +--- a/src/libsystemd/sd-bus/bus-message.c ++++ b/src/libsystemd/sd-bus/bus-message.c +@@ -19,6 +19,7 @@ + #include "strv.h" + #include "time-util.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); + static int message_parse_fields(sd_bus_message *m); +diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c +index 2ad7a9993d..bba72f99f4 100644 +--- a/src/libsystemd/sd-bus/bus-objects.c ++++ b/src/libsystemd/sd-bus/bus-objects.c +@@ -11,6 +11,7 @@ + #include "missing_capability.h" + #include "string-util.h" + #include "strv.h" ++#include "missing_stdlib.h" + + static int node_vtable_get_userdata( + sd_bus *bus, +diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c +index 64037e4fe0..9b9ce0aaa9 100644 +--- a/src/libsystemd/sd-bus/bus-socket.c ++++ b/src/libsystemd/sd-bus/bus-socket.c +@@ -28,6 +28,7 @@ + #include "string-util.h" + #include "user-util.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + #define SNDBUF_SIZE (8*1024*1024) + +diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c +index f6a5e4aa06..b36faa79a3 100644 +--- a/src/libsystemd/sd-bus/sd-bus.c ++++ b/src/libsystemd/sd-bus/sd-bus.c +@@ -46,6 +46,7 @@ + #include "string-util.h" + #include "strv.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + #define log_debug_bus_message(m) \ + do { \ +diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c +index 1eb6edd329..d434a3c178 100644 +--- a/src/libsystemd/sd-bus/test-bus-benchmark.c ++++ b/src/libsystemd/sd-bus/test-bus-benchmark.c +@@ -13,6 +13,7 @@ + #include "missing_resource.h" + #include "string-util.h" + #include "time-util.h" ++#include "missing_stdlib.h" + + #define MAX_SIZE (2*1024*1024) + +diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c +index 9947947ef2..8dc6f93159 100644 +--- a/src/libsystemd/sd-journal/sd-journal.c ++++ b/src/libsystemd/sd-journal/sd-journal.c +@@ -44,6 +44,7 @@ + #include "strv.h" + #include "syslog-util.h" + #include "uid-alloc-range.h" ++#include "missing_stdlib.h" + + #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) + +diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c +index ba2fca32c6..e1f9caa13b 100644 +--- a/src/login/pam_systemd.c ++++ b/src/login/pam_systemd.c +@@ -34,6 +34,7 @@ + #include "locale-util.h" + #include "login-util.h" + #include "macro.h" ++#include "missing_stdlib.h" + #include "pam-util.h" + #include "parse-util.h" + #include "path-util.h" +diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c +index 1090934bfc..69a77f66e2 100644 +--- a/src/network/generator/network-generator.c ++++ b/src/network/generator/network-generator.c +@@ -14,6 +14,7 @@ + #include "string-table.h" + #include "string-util.h" + #include "strv.h" ++#include "missing_stdlib.h" + + /* + # .network +diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c +index 05bde1c756..aa29587868 100644 +--- a/src/nspawn/nspawn-settings.c ++++ b/src/nspawn/nspawn-settings.c +@@ -16,6 +16,7 @@ + #include "string-util.h" + #include "strv.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + Settings *settings_new(void) { + Settings *s; +diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c +index c64e79bdff..eda26b0b9a 100644 +--- a/src/nss-mymachines/nss-mymachines.c ++++ b/src/nss-mymachines/nss-mymachines.c +@@ -21,6 +21,7 @@ + #include "nss-util.h" + #include "signal-util.h" + #include "string-util.h" ++#include "missing_stdlib.h" + + static void setup_logging_once(void) { + static pthread_once_t once = PTHREAD_ONCE_INIT; +diff --git a/src/portable/portable.c b/src/portable/portable.c +index 7811833fac..c6414da91c 100644 +--- a/src/portable/portable.c ++++ b/src/portable/portable.c +@@ -40,6 +40,7 @@ + #include "strv.h" + #include "tmpfile-util.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was + * dropped there by the portable service logic and b) for which image it was dropped there. */ +diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c +index 2638e985fb..82c903fd66 100644 +--- a/src/resolve/resolvectl.c ++++ b/src/resolve/resolvectl.c +@@ -48,6 +48,7 @@ + #include "varlink.h" + #include "verb-log-control.h" + #include "verbs.h" ++#include "missing_stdlib.h" + + static int arg_family = AF_UNSPEC; + static int arg_ifindex = 0; +diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c +index 8b4f66b22e..5926e4c61b 100644 +--- a/src/shared/bus-get-properties.c ++++ b/src/shared/bus-get-properties.c +@@ -4,6 +4,7 @@ + #include "rlimit-util.h" + #include "stdio-util.h" + #include "string-util.h" ++#include "missing_stdlib.h" + + int bus_property_get_bool( + sd_bus *bus, +diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c +index 8b462b5627..183ce1c18e 100644 +--- a/src/shared/bus-unit-procs.c ++++ b/src/shared/bus-unit-procs.c +@@ -11,6 +11,7 @@ + #include "sort-util.h" + #include "string-util.h" + #include "terminal-util.h" ++#include "missing_stdlib.h" + + struct CGroupInfo { + char *cgroup_path; +diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c +index 1e95e36678..640ee031d5 100644 +--- a/src/shared/bus-unit-util.c ++++ b/src/shared/bus-unit-util.c +@@ -51,6 +51,7 @@ + #include "unit-def.h" + #include "user-util.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { + assert(message); +diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c +index d09ec5148d..f38a8f7cc1 100644 +--- a/src/shared/bus-util.c ++++ b/src/shared/bus-util.c +@@ -24,6 +24,7 @@ + #include "path-util.h" + #include "socket-util.h" + #include "stdio-util.h" ++#include "missing_stdlib.h" + + static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { + sd_event *e = ASSERT_PTR(userdata); +diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c +index 620b156563..5ee5b09186 100644 +--- a/src/shared/dns-domain.c ++++ b/src/shared/dns-domain.c +@@ -18,6 +18,7 @@ + #include "string-util.h" + #include "strv.h" + #include "utf8.h" ++#include "missing_stdlib.h" + + int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { + const char *n; +diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c +index d9eabec886..534c6cf7e3 100644 +--- a/src/shared/journal-importer.c ++++ b/src/shared/journal-importer.c +@@ -16,6 +16,7 @@ + #include "string-util.h" + #include "strv.h" + #include "unaligned.h" ++#include "missing_stdlib.h" + + enum { + IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ +diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c +index b72e516c8d..6e832b74c3 100644 +--- a/src/shared/logs-show.c ++++ b/src/shared/logs-show.c +@@ -41,6 +41,7 @@ + #include "time-util.h" + #include "utf8.h" + #include "web-util.h" ++#include "missing_stdlib.h" + + /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ + #define PRINT_LINE_THRESHOLD 3 +diff --git a/src/shared/pager.c b/src/shared/pager.c +index 6ed35a3ca9..99d9d36140 100644 +--- a/src/shared/pager.c ++++ b/src/shared/pager.c +@@ -25,6 +25,7 @@ + #include "string-util.h" + #include "strv.h" + #include "terminal-util.h" ++#include "missing_stdlib.h" + + static pid_t pager_pid = 0; + +diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c +index 821049e667..08a5bdae3d 100644 +--- a/src/socket-proxy/socket-proxyd.c ++++ b/src/socket-proxy/socket-proxyd.c +@@ -27,6 +27,7 @@ + #include "set.h" + #include "socket-util.h" + #include "string-util.h" ++#include "missing_stdlib.h" + + #define BUFFER_SIZE (256 * 1024) + +diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c +index 9d71db6ae1..a9938c1e6e 100644 +--- a/src/test/test-hexdecoct.c ++++ b/src/test/test-hexdecoct.c +@@ -7,6 +7,7 @@ + #include "macro.h" + #include "random-util.h" + #include "string-util.h" ++#include "missing_stdlib.h" + #include "tests.h" + + TEST(hexchar) { +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index 8e4d57ee72..6b4555b4d5 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -24,6 +24,7 @@ + #include "sysexits.h" + #include "udev-builtin.h" + #include "udev-util.h" ++#include "missing_stdlib.h" + + _printf_(2,3) + static void path_prepend(char **path, const char *fmt, ...) { +diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c +index ec4ad30824..bc40303a46 100644 +--- a/src/udev/udev-event.c ++++ b/src/udev/udev-event.c +@@ -34,6 +34,7 @@ + #include "udev-util.h" + #include "udev-watch.h" + #include "user-util.h" ++#include "missing_stdlib.h" + + typedef struct Spawn { + sd_device *device; +diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c +index 5bd09a64d1..0ce79f815c 100644 +--- a/src/udev/udev-rules.c ++++ b/src/udev/udev-rules.c +@@ -35,6 +35,7 @@ + #include "udev-util.h" + #include "user-util.h" + #include "virt.h" ++#include "missing_stdlib.h" + + #define RULES_DIRS ((const char* const*) CONF_PATHS_STRV("udev/rules.d")) + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch deleted file mode 100644 index 327084bae9..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ad395dda5db9b1ae156be121cfc8a38960de6c55 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 28 Feb 2018 21:25:22 -0800 -Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi - ---- - src/test/test-sizeof.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/src/test/test-sizeof.c -+++ b/src/test/test-sizeof.c -@@ -55,8 +55,10 @@ int main(void) { - info(unsigned); - info(long unsigned); - info(long long unsigned); -+#ifdef __GLIBC__ - info(__syscall_ulong_t); - info(__syscall_slong_t); -+#endif - info(intmax_t); - info(uintmax_t); - -@@ -76,7 +78,9 @@ int main(void) { - info(ssize_t); - info(time_t); - info(usec_t); -+#ifdef __GLIBC__ - info(__time_t); -+#endif - info(pid_t); - info(uid_t); - info(gid_t); diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch new file mode 100644 index 0000000000..0d69e8e9cd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch @@ -0,0 +1,155 @@ +From 747ff78ecda6afe01c7eab4d7c27aea6af810c86 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 14:56:21 +0800 +Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined + +If the standard library doesn't provide brace +expansion users just won't get it. + +Dont use GNU GLOB extentions on non-glibc systems + +Conditionalize use of GLOB_ALTDIRFUNC + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + src/basic/glob-util.c | 12 ++++++++++++ + src/test/test-glob-util.c | 16 ++++++++++++++++ + src/tmpfiles/tmpfiles.c | 10 ++++++++++ + 3 files changed, 38 insertions(+) + +diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c +index fd60a6eda2..c73edc41ea 100644 +--- a/src/basic/glob-util.c ++++ b/src/basic/glob-util.c +@@ -12,6 +12,12 @@ + #include "path-util.h" + #include "strv.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + static void closedir_wrapper(void* v) { + (void) closedir(v); + } +@@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) { + int safe_glob(const char *path, int flags, glob_t *pglob) { + int k; + ++#ifdef GLOB_ALTDIRFUNC + /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ + assert(!(flags & GLOB_ALTDIRFUNC)); + +@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { + pglob->gl_lstat = lstat; + if (!pglob->gl_stat) + pglob->gl_stat = stat; ++#endif + + errno = 0; ++#ifdef GLOB_ALTDIRFUNC + k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); ++#else ++ k = glob(path, flags, NULL, pglob); ++#endif + if (k == GLOB_NOMATCH) + return -ENOENT; + if (k == GLOB_NOSPACE) +diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c +index 9b3e73cce0..3790ba3be5 100644 +--- a/src/test/test-glob-util.c ++++ b/src/test/test-glob-util.c +@@ -34,6 +34,12 @@ TEST(glob_first) { + assert_se(first == NULL); + } + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + TEST(glob_exists) { + char name[] = "/tmp/test-glob_exists.XXXXXX"; + int fd = -EBADF; +@@ -61,11 +67,13 @@ TEST(glob_no_dot) { + const char *fn; + + _cleanup_globfree_ glob_t g = { ++#ifdef GLOB_ALTDIRFUNC + .gl_closedir = closedir_wrapper, + .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, + .gl_opendir = (void *(*)(const char *)) opendir, + .gl_lstat = lstat, + .gl_stat = stat, ++#endif + }; + + int r; +@@ -73,11 +81,19 @@ TEST(glob_no_dot) { + assert_se(mkdtemp(template)); + + fn = strjoina(template, "/*"); ++#ifdef GLOB_ALTDIRFUNC + r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); ++#else ++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); ++#endif + assert_se(r == GLOB_NOMATCH); + + fn = strjoina(template, "/.*"); ++#ifdef GLOB_ALTDIRFUNC + r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); ++#else ++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); ++#endif + assert_se(r == GLOB_NOMATCH); + + (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 458aed7054..2cf24b38c0 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -73,6 +73,12 @@ + #include "user-util.h" + #include "virt.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates + * them in the file system. This is intended to be used to create + * properly owned directories beneath /tmp, /var/tmp, /run, which are +@@ -2355,7 +2361,9 @@ finish: + + static int glob_item(Item *i, action_t action) { + _cleanup_globfree_ glob_t g = { ++#ifdef GLOB_ALTDIRFUNC + .gl_opendir = (void *(*)(const char *)) opendir_nomod, ++#endif + }; + int r = 0, k; + +@@ -2375,7 +2383,9 @@ static int glob_item(Item *i, action_t action) { + + static int glob_item_recursively(Item *i, fdaction_t action) { + _cleanup_globfree_ glob_t g = { ++#ifdef GLOB_ALTDIRFUNC + .gl_opendir = (void *(*)(const char *)) opendir_nomod, ++#endif + }; + int r = 0, k; + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch deleted file mode 100644 index 0026a7b72a..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5d4c6b2f4b88b69b31f967371d2a6136c65dc3fd Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() - -Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right -thing to do and it's not portable (not supported by musl). See: - - http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html - http://www.openwall.com/lists/musl/2015/02/05/2 - -Note that laccess() is never passing AT_EACCESS so a lot of the -discussion in the links above doesn't apply. Note also that -(currently) all systemd callers of laccess() pass mode as F_OK, so -only check for existence of a file, not access permissions. -Therefore, in this case, the only distiction between faccessat() -with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour -for broken symlinks; laccess() on a broken symlink will succeed with -(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). - -The laccess() macros was added to systemd some time ago and it's not -clear if or why it needs to return success for broken symlinks. Maybe -just historical and not actually necessary or desired behaviour? - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Andre McCurdy - ---- - src/basic/fs-util.h | 23 +++++++++++++++++++++-- - src/shared/base-filesystem.c | 6 +++--- - 2 files changed, 24 insertions(+), 5 deletions(-) - ---- a/src/basic/fs-util.h -+++ b/src/basic/fs-util.h -@@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct - int fd_warn_permissions(const char *path, int fd); - int stat_warn_permissions(const char *path, const struct stat *st); - -+/* -+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to -+ do and it's not portable (not supported by musl). See: -+ -+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html -+ http://www.openwall.com/lists/musl/2015/02/05/2 -+ -+ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in -+ the links above doesn't apply. Note also that (currently) all systemd callers -+ of laccess() pass mode as F_OK, so only check for existence of a file, not -+ access permissions. Therefore, in this case, the only distiction between -+ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the -+ behaviour for broken symlinks; laccess() on a broken symlink will succeed -+ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). -+ -+ The laccess() macros was added to systemd some time ago and it's not clear if -+ or why it needs to return success for broken symlinks. Maybe just historical -+ and not actually necessary or desired behaviour? -+*/ - #define laccess(path, mode) \ -- RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) -+ RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) - - int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); - int touch(const char *path); ---- a/src/shared/base-filesystem.c -+++ b/src/shared/base-filesystem.c -@@ -117,7 +117,7 @@ int base_filesystem_create(const char *r - return log_error_errno(errno, "Failed to open root file system: %m"); - - for (size_t i = 0; i < ELEMENTSOF(table); i++) { -- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) -+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) - continue; - - if (table[i].target) { -@@ -125,7 +125,7 @@ int base_filesystem_create(const char *r - - /* check if one of the targets exists */ - NULSTR_FOREACH(s, table[i].target) { -- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0) -+ if (faccessat(fd, s, F_OK, 0) < 0) - continue; - - /* check if a specific file exists at the target path */ -@@ -136,7 +136,7 @@ int base_filesystem_create(const char *r - if (!p) - return log_oom(); - -- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0) -+ if (faccessat(fd, p, F_OK, 0) < 0) - continue; - } - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch deleted file mode 100644 index 612a535d3c..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1803ea271b93370fdcf7ec497277344f1e775429 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH] Define glibc compatible basename() for non-glibc systems - -Fixes builds with musl, even though systemd is adamant about -using non-posix basename implementation, we have a way out - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj - ---- - src/machine/machine-dbus.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/src/machine/machine-dbus.c -+++ b/src/machine/machine-dbus.c -@@ -10,6 +10,11 @@ - #include - #undef basename - -+#if !defined(__GLIBC__) -+#include -+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) -+#endif -+ - #include "alloc-util.h" - #include "bus-common-errors.h" - #include "bus-get-properties.h" diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch new file mode 100644 index 0000000000..d6aaadc006 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch @@ -0,0 +1,44 @@ +From efd7b41cf270c7b07ee3b9aec0fedd8e52dd422f Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:00:06 +0800 +Subject: [PATCH] add missing FTW_ macros for musl + +This is to avoid build failures like below for musl. + + locale-util.c:296:24: error: 'FTW_STOP' undeclared + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/basic/missing_type.h | 4 ++++ + src/test/test-recurse-dir.c | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h +index 6c0456349d..73a5b90e3c 100644 +--- a/src/basic/missing_type.h ++++ b/src/basic/missing_type.h +@@ -14,3 +14,7 @@ + #ifndef __GLIBC__ + typedef int (*comparison_fn_t)(const void *, const void *); + #endif ++ ++#ifndef FTW_CONTINUE ++#define FTW_CONTINUE 0 ++#endif +diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c +index 2c2120b136..bc60a178a2 100644 +--- a/src/test/test-recurse-dir.c ++++ b/src/test/test-recurse-dir.c +@@ -6,6 +6,7 @@ + #include "recurse-dir.h" + #include "strv.h" + #include "tests.h" ++#include "missing_type.h" + + static char **list_nftw = NULL; + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch deleted file mode 100644 index baf4903803..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 30b08f76ea7f5c324afedf97f0867b76dac9f128 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH] Do not disable buffering when writing to oom_score_adj - -On musl, disabling buffering when writing to oom_score_adj will -cause the following error. - - Failed to adjust OOM setting: Invalid argument - -This error appears for systemd-udevd.service and dbus.service. -This is because kernel receives '-' instead of the whole '-900' -if buffering is disabled. - -This is libc implementation specific, as glibc does not have this issue. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/process-util.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/basic/process-util.c -+++ b/src/basic/process-util.c -@@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) { - xsprintf(t, "%i", value); - - return write_string_file("/proc/self/oom_score_adj", t, -- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); -+ WRITE_STRING_FILE_VERIFY_ON_FAILURE); - } - - int get_oom_score_adjust(int *ret) { diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch new file mode 100644 index 0000000000..2071f4fb20 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch @@ -0,0 +1,97 @@ +From 60f7d2c62bc3718023df93c01688d3ee1625d64d Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:12:41 +0800 +Subject: [PATCH] Use uintmax_t for handling rlim_t + +PRIu{32,64} is not right format to represent rlim_t type +therefore use %ju and typecast the rlim_t variables to +uintmax_t. + +Fixes portablility errors like + +execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=] +| fprintf(f, "%s%s: " RLIM_FMT "\n", +| ^~~~~~~~ +| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); +| ~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] + +Signed-off-by: Khem Raj +[Rebased for v241] +Signed-off-by: Chen Qi +--- + src/basic/format-util.h | 8 +------- + src/basic/rlimit-util.c | 12 ++++++------ + src/core/execute.c | 4 ++-- + 3 files changed, 9 insertions(+), 15 deletions(-) + +--- a/src/basic/format-util.h ++++ b/src/basic/format-util.h +@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 + # error Unknown timex member size + #endif + +-#if SIZEOF_RLIM_T == 8 +-# define RLIM_FMT "%" PRIu64 +-#elif SIZEOF_RLIM_T == 4 +-# define RLIM_FMT "%" PRIu32 +-#else +-# error Unknown rlim_t size +-#endif ++#define RLIM_FMT "%ju" + + #if SIZEOF_DEV_T == 8 + # define DEV_FMT "%" PRIu64 +--- a/src/basic/rlimit-util.c ++++ b/src/basic/rlimit-util.c +@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons + fixed.rlim_max == highest.rlim_max) + return 0; + +- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); ++ log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); + + return RET_NERRNO(setrlimit(resource, &fixed)); + } +@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r + if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) + r = free_and_strdup(&s, "infinity"); + else if (rl->rlim_cur >= RLIM_INFINITY) +- r = asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); ++ r = asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); + else if (rl->rlim_max >= RLIM_INFINITY) +- r = asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); ++ r = asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); + else if (rl->rlim_cur == rl->rlim_max) +- r = asprintf(&s, RLIM_FMT, rl->rlim_cur); ++ r = asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); + else +- r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); ++ r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); + if (r < 0) + return -ENOMEM; + +@@ -407,7 +407,7 @@ int rlimit_nofile_safe(void) { + rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open()); + rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max); + if (setrlimit(RLIMIT_NOFILE, &rl) < 0) +- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); ++ return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); + + return 1; + } +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -6707,9 +6707,9 @@ void exec_context_dump(const ExecContext + for (unsigned i = 0; i < RLIM_NLIMITS; i++) + if (c->rlimit[i]) { + fprintf(f, "%sLimit%s: " RLIM_FMT "\n", +- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); ++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max); + fprintf(f, "%sLimit%sSoft: " RLIM_FMT "\n", +- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur); ++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur); + } + + if (c->ioprio_set) { diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch deleted file mode 100644 index 878914b307..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 873202f63f9f117c6e5a98e444cc709057042979 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi - strerror_r - -XSI-compliant strerror_r and GNU-specifi strerror_r are different. - - int strerror_r(int errnum, char *buf, size_t buflen); - /* XSI-compliant */ - - char *strerror_r(int errnum, char *buf, size_t buflen); - /* GNU-specific */ - -We need to distinguish between them. Otherwise, we'll get an int value -assigned to (char *) variable, resulting in segment fault. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/libsystemd/sd-bus/bus-error.c | 5 +++++ - src/libsystemd/sd-journal/journal-send.c | 5 +++++ - 2 files changed, 10 insertions(+) - ---- a/src/libsystemd/sd-bus/bus-error.c -+++ b/src/libsystemd/sd-bus/bus-error.c -@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er - return; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(error, m, k); -+ x = m; -+#else - x = strerror_r(error, m, k); -+#endif - if (errno == ERANGE || strlen(x) >= k - 1) { - free(m); - k *= 2; ---- a/src/libsystemd/sd-journal/journal-send.c -+++ b/src/libsystemd/sd-journal/journal-send.c -@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co - char* j; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+ j = buffer + 8 + k; -+#else - j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+#endif - if (errno == 0) { - char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch deleted file mode 100644 index e6507c5f89..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e7441559266074e7a33e3c11ff5cdaf5ba9c0e24 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:18:00 +0800 -Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP - -for currently unknown reasons they get exported to the shared libries -even without being listed in the sym file - -Upstream-Status: Pending - -Signed-off-by: Khem Raj -[Rebased for v241] -Signed-off-by: Chen Qi - ---- - src/libsystemd/sd-bus/bus-error.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index c49be29e46..90731bd7e7 100644 ---- a/src/libsystemd/sd-bus/bus-error.c -+++ b/src/libsystemd/sd-bus/bus-error.c -@@ -55,8 +55,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { - }; - - /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */ --extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[]; --extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[]; -+extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[] _hidden_; -+extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[] _hidden_; - - /* Additional maps registered with sd_bus_error_add_map() are in this - * NULL terminated array */ diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch new file mode 100644 index 0000000000..543fba7cdb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -0,0 +1,99 @@ +From 26b02348e39fe72b73dd61bba8a0cefb0352717d Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Tue, 10 Oct 2017 14:33:30 -0700 +Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() + +Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right +thing to do and it's not portable (not supported by musl). See: + + http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html + http://www.openwall.com/lists/musl/2015/02/05/2 + +Note that laccess() is never passing AT_EACCESS so a lot of the +discussion in the links above doesn't apply. Note also that +(currently) all systemd callers of laccess() pass mode as F_OK, so +only check for existence of a file, not access permissions. +Therefore, in this case, the only distiction between faccessat() +with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour +for broken symlinks; laccess() on a broken symlink will succeed with +(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). + +The laccess() macros was added to systemd some time ago and it's not +clear if or why it needs to return success for broken symlinks. Maybe +just historical and not actually necessary or desired behaviour? + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Andre McCurdy +--- + src/basic/fs-util.h | 21 ++++++++++++++++++++- + src/shared/base-filesystem.c | 6 +++--- + 2 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h +index 932d003f19..33215dbf5f 100644 +--- a/src/basic/fs-util.h ++++ b/src/basic/fs-util.h +@@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); + int fd_warn_permissions(const char *path, int fd); + int stat_warn_permissions(const char *path, const struct stat *st); + ++/* ++ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to ++ do and it's not portable (not supported by musl). See: ++ ++ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html ++ http://www.openwall.com/lists/musl/2015/02/05/2 ++ ++ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in ++ the links above doesn't apply. Note also that (currently) all systemd callers ++ of laccess() pass mode as F_OK, so only check for existence of a file, not ++ access permissions. Therefore, in this case, the only distiction between ++ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the ++ behaviour for broken symlinks; laccess() on a broken symlink will succeed ++ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). ++ ++ The laccess() macros was added to systemd some time ago and it's not clear if ++ or why it needs to return success for broken symlinks. Maybe just historical ++ and not actually necessary or desired behaviour? ++*/ + #define laccess(path, mode) \ +- RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) ++ RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) + + int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); + +diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c +index be6dd1654a..2726dc946a 100644 +--- a/src/shared/base-filesystem.c ++++ b/src/shared/base-filesystem.c +@@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { + /* The "root" parameter is decoration only – it's only used as part of log messages */ + + for (size_t i = 0; i < ELEMENTSOF(table); i++) { +- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) ++ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) + continue; + + if (table[i].target) { /* Create as symlink? */ +@@ -153,7 +153,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { + + /* check if one of the targets exists */ + NULSTR_FOREACH(s, table[i].target) { +- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0) ++ if (faccessat(fd, s, F_OK, 0) < 0) + continue; + + /* check if a specific file exists at the target path */ +@@ -164,7 +164,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { + if (!p) + return log_oom(); + +- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0) ++ if (faccessat(fd, p, F_OK, 0) < 0) + continue; + } + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch new file mode 100644 index 0000000000..7d74cfcc24 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -0,0 +1,34 @@ +From fdc7fb940bb41020271b9db41d5608004efdbde5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 27 May 2018 08:36:44 -0700 +Subject: [PATCH] Define glibc compatible basename() for non-glibc systems + +Fixes builds with musl, even though systemd is adamant about +using non-posix basename implementation, we have a way out + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +--- + src/machine/machine-dbus.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c +index 45bc056326..aee51d5da5 100644 +--- a/src/machine/machine-dbus.c ++++ b/src/machine/machine-dbus.c +@@ -4,6 +4,11 @@ + #include + #include + ++#if !defined(__GLIBC__) ++#include ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif ++ + #include "alloc-util.h" + #include "bus-common-errors.h" + #include "bus-get-properties.h" +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch deleted file mode 100644 index eeff693bc4..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 64f4d2eb976b9f23ce85b3655a876f7299eafd58 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:27:54 +0800 -Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition - -Fix the following compile failure: -src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'? - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/basic/missing_type.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h -index 3df1084ef2..697aa7f58a 100644 ---- a/src/basic/missing_type.h -+++ b/src/basic/missing_type.h -@@ -13,6 +13,7 @@ - - #ifndef __GLIBC__ - typedef int (*comparison_fn_t)(const void *, const void *); -+typedef int (*__compar_d_fn_t) (const void *, const void *, void *); - #endif - - #ifndef __COMPAR_FN_T diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch new file mode 100644 index 0000000000..8162bc2c57 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -0,0 +1,41 @@ +From 32fd0dc67b6df531f0769dbb099dbe8f30c28514 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Wed, 4 Jul 2018 15:00:44 +0800 +Subject: [PATCH] Do not disable buffering when writing to oom_score_adj + +On musl, disabling buffering when writing to oom_score_adj will +cause the following error. + + Failed to adjust OOM setting: Invalid argument + +This error appears for systemd-udevd.service and dbus.service. +This is because kernel receives '-' instead of the whole '-900' +if buffering is disabled. + +This is libc implementation specific, as glibc does not have this issue. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + src/basic/process-util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/process-util.c b/src/basic/process-util.c +index 0747c14c1c..8d0c5aae92 100644 +--- a/src/basic/process-util.c ++++ b/src/basic/process-util.c +@@ -1516,7 +1516,7 @@ int set_oom_score_adjust(int value) { + xsprintf(t, "%i", value); + + return write_string_file("/proc/self/oom_score_adj", t, +- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); ++ WRITE_STRING_FILE_VERIFY_ON_FAILURE); + } + + int get_oom_score_adjust(int *ret) { +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch deleted file mode 100644 index 5ca5386289..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d95330f328c23c1cd6c51aeca43f081746cf2899 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH] avoid redefinition of prctl_mm_map structure - -Fix the following compile failure: -error: redefinition of 'struct prctl_mm_map' - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/basic/missing_prctl.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h -index ab851306ba..5547cad875 100644 ---- a/src/basic/missing_prctl.h -+++ b/src/basic/missing_prctl.h -@@ -1,7 +1,9 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - #pragma once - -+#ifdef __GLIBC__ - #include -+#endif - - /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ - #ifndef PR_CAP_AMBIENT diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch deleted file mode 100644 index d51ac4265a..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2284f2f44b1b30f10b9196e0f5c6d0a2e0c1871f Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -Date: Fri, 7 Aug 2020 15:19:27 +0000 -Subject: [PATCH] Handle missing LOCK_EX - -Upstream-Status: Inappropriate [musl specific] -Signed-off-by: Alex Kiernan - ---- - src/partition/makefs.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/partition/makefs.c b/src/partition/makefs.c -index 7c94fbfedb..42f966722d 100644 ---- a/src/partition/makefs.c -+++ b/src/partition/makefs.c -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #include "alloc-util.h" - #include "blockdev-util.h" diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch new file mode 100644 index 0000000000..f6d908f947 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -0,0 +1,76 @@ +From ed46afcbc6bc1f6277a0a54c3db8cf1b056bca1e Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Tue, 10 Jul 2018 15:40:17 +0800 +Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi + strerror_r + +XSI-compliant strerror_r and GNU-specifi strerror_r are different. + + int strerror_r(int errnum, char *buf, size_t buflen); + /* XSI-compliant */ + + char *strerror_r(int errnum, char *buf, size_t buflen); + /* GNU-specific */ + +We need to distinguish between them. Otherwise, we'll get an int value +assigned to (char *) variable, resulting in segment fault. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/libsystemd/sd-bus/bus-error.c | 11 ++++++++++- + src/libsystemd/sd-journal/journal-send.c | 5 +++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c +index 413e2dd43f..805e5da0c0 100644 +--- a/src/libsystemd/sd-bus/bus-error.c ++++ b/src/libsystemd/sd-bus/bus-error.c +@@ -408,7 +408,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { + return; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(error, m, k); ++ x = m; ++#else + x = strerror_r(error, m, k); ++#endif + if (errno == ERANGE || strlen(x) >= k - 1) { + free(m); + k *= 2; +@@ -593,8 +598,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static + + if (e && e->message) + return e->message; +- ++#ifndef __GLIBC__ ++ strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++ return buf; ++#else + return strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++#endif + } + + static bool map_ok(const sd_bus_error_map *map) { +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c +index 136ebcb153..8a75ba4ecd 100644 +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c +@@ -360,7 +360,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch deleted file mode 100644 index 1ba5c1292b..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a6a25e1ecae91f48a4f87bf0cc17eaaf0a919ffe Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -Date: Fri, 7 Aug 2020 15:20:17 +0000 -Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un * - -| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns': -| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] -| 4893 | if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { -| | ^~~~~~ -| | | -| | struct sockaddr_un * -| In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22, -| from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21: -| /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' -| 384 | int connect (int, const struct sockaddr *, socklen_t); -| | ^~~~~~~~~~~~~~~~~~~~~~~ -| cc1: some warnings being treated as errors - -Upstream-Status: Inappropriate [musl specific] -Signed-off-by: Alex Kiernan - ---- - src/nspawn/nspawn.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/nspawn/nspawn.c -+++ b/src/nspawn/nspawn.c -@@ -5389,7 +5389,7 @@ static int cant_be_in_netns(void) { - if (fd < 0) - return log_error_errno(errno, "Failed to allocate udev control socket: %m"); - -- if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) { -+ if (connect(fd, (struct sockaddr *)&sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) { - - if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) - return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch new file mode 100644 index 0000000000..e5f017347c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -0,0 +1,32 @@ +From 277b680d07a178b8278862b60417052d05c1376f Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:44:54 +0800 +Subject: [PATCH] avoid redefinition of prctl_mm_map structure + +Fix the following compile failure: +error: redefinition of 'struct prctl_mm_map' + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/basic/missing_prctl.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h +index ab851306ba..5547cad875 100644 +--- a/src/basic/missing_prctl.h ++++ b/src/basic/missing_prctl.h +@@ -1,7 +1,9 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + #pragma once + ++#ifdef __GLIBC__ + #include ++#endif + + /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ + #ifndef PR_CAP_AMBIENT +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch new file mode 100644 index 0000000000..c85087219c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch @@ -0,0 +1,397 @@ +From aa6e5588e6d01c12e2f101d140cc710ab199df16 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Fri, 1 Mar 2019 15:22:15 +0800 +Subject: [PATCH] do not disable buffer in writing files + +Do not disable buffer in writing files, otherwise we get +failure at boot for musl like below. + + [!!!!!!] Failed to allocate manager object. + +And there will be other failures, critical or not critical. +This is specific to musl. + +Upstream-Status: Inappropriate [musl] + +Signed-off-by: Chen Qi +[Rebased for v242] +Signed-off-by: Andrej Valek +[rebased for systemd 243] +Signed-off-by: Scott Murray +[rebased for systemd 254] +--- + src/basic/cgroup-util.c | 12 ++++++------ + src/basic/namespace-util.c | 4 ++-- + src/basic/procfs-util.c | 4 ++-- + src/basic/sysctl-util.c | 2 +- + src/binfmt/binfmt.c | 6 +++--- + src/core/cgroup.c | 2 +- + src/core/main.c | 2 +- + src/core/smack-setup.c | 8 ++++---- + src/home/homework.c | 2 +- + src/libsystemd/sd-device/sd-device.c | 2 +- + src/nspawn/nspawn-cgroup.c | 2 +- + src/nspawn/nspawn.c | 6 +++--- + src/shared/binfmt-util.c | 2 +- + src/shared/cgroup-setup.c | 4 ++-- + src/shared/coredump-util.c | 2 +- + src/shared/sleep-util.c | 4 ++-- + src/shared/smack-util.c | 2 +- + src/sleep/sleep.c | 4 ++-- + src/udev/udev-rules.c | 1 - + src/vconsole/vconsole-setup.c | 2 +- + 20 files changed, 36 insertions(+), 37 deletions(-) + +--- a/src/basic/cgroup-util.c ++++ b/src/basic/cgroup-util.c +@@ -400,7 +400,7 @@ int cg_kill_kernel_sigkill(const char *c + if (r < 0) + return r; + +- r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(killfile, "1", 0); + if (r < 0) + return r; + +@@ -806,7 +806,7 @@ int cg_install_release_agent(const char + + sc = strstrip(contents); + if (isempty(sc)) { +- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, agent, 0); + if (r < 0) + return r; + } else if (!path_equal(sc, agent)) +@@ -824,7 +824,7 @@ int cg_install_release_agent(const char + + sc = strstrip(contents); + if (streq(sc, "0")) { +- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "1", 0); + if (r < 0) + return r; + +@@ -851,7 +851,7 @@ int cg_uninstall_release_agent(const cha + if (r < 0) + return r; + +- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "0", 0); + if (r < 0) + return r; + +@@ -861,7 +861,7 @@ int cg_uninstall_release_agent(const cha + if (r < 0) + return r; + +- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "", 0); + if (r < 0) + return r; + +@@ -1764,7 +1764,7 @@ int cg_set_attribute(const char *control + if (r < 0) + return r; + +- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, 0); + } + + int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { +--- a/src/basic/namespace-util.c ++++ b/src/basic/namespace-util.c +@@ -227,12 +227,12 @@ int userns_acquire(const char *uid_map, + freeze(); + + xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); +- r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(path, uid_map, 0); + if (r < 0) + return log_error_errno(r, "Failed to write UID map: %m"); + + xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); +- r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(path, gid_map, 0); + if (r < 0) + return log_error_errno(r, "Failed to write GID map: %m"); + +--- a/src/basic/procfs-util.c ++++ b/src/basic/procfs-util.c +@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi + * decrease it, as threads-max is the much more relevant sysctl. */ + if (limit > pid_max-1) { + sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ +- r = write_string_file("/proc/sys/kernel/pid_max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/pid_max", buffer, 0); + if (r < 0) + return r; + } + + sprintf(buffer, "%" PRIu64, limit); +- r = write_string_file("/proc/sys/kernel/threads-max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/threads-max", buffer, 0); + if (r < 0) { + uint64_t threads_max; + +--- a/src/basic/sysctl-util.c ++++ b/src/basic/sysctl-util.c +@@ -58,7 +58,7 @@ int sysctl_write(const char *property, c + + log_debug("Setting '%s' to '%s'", p, value); + +- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); ++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); + } + + int sysctl_writef(const char *property, const char *format, ...) { +--- a/src/binfmt/binfmt.c ++++ b/src/binfmt/binfmt.c +@@ -30,7 +30,7 @@ static bool arg_unregister = false; + + static int delete_rule(const char *rulename) { + const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename); +- return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(fn, "-1", 0); + } + + static int apply_rule(const char *filename, unsigned line, const char *rule) { +@@ -58,7 +58,7 @@ static int apply_rule(const char *filena + if (r >= 0) + log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); + +- r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); + if (r < 0) + return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m", + filename, line, rulename); +@@ -244,7 +244,7 @@ static int run(int argc, char *argv[]) { + return r; + + /* Flush out all rules */ +- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); + if (r < 0) + log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); + else +--- a/src/core/cgroup.c ++++ b/src/core/cgroup.c +@@ -4349,7 +4349,7 @@ int unit_cgroup_freezer_action(Unit *u, + u->freezer_state = FREEZER_THAWING; + } + +- r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); + if (r < 0) + return r; + +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool + if (getpid_cached() != 1) + return; + +- r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); + if (r < 0) + log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", + arg_early_core_pattern); +--- a/src/core/smack-setup.c ++++ b/src/core/smack-setup.c +@@ -319,17 +319,17 @@ int mac_smack_setup(bool *loaded_policy) + } + + #if HAVE_SMACK_RUN_LABEL +- r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK label \"" SMACK_RUN_LABEL "\" on self: %m"); +- r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); + r = write_string_file("/sys/fs/smackfs/netlabel", +- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ "0.0.0.0/0 " SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); +- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); + #endif +--- a/src/home/homework.c ++++ b/src/home/homework.c +@@ -278,7 +278,7 @@ static void drop_caches_now(void) { + * for details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but + * not more. */ + +- r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); + if (r < 0) + log_warning_errno(r, "Failed to drop caches, ignoring: %m"); + else +--- a/src/libsystemd/sd-device/sd-device.c ++++ b/src/libsystemd/sd-device/sd-device.c +@@ -2515,7 +2515,7 @@ _public_ int sd_device_set_sysattr_value + if (!value) + return -ENOMEM; + +- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); ++ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); + if (r < 0) { + /* On failure, clear cache entry, as we do not know how it fails. */ + device_remove_cached_sysattr_value(device, sysattr); +--- a/src/nspawn/nspawn-cgroup.c ++++ b/src/nspawn/nspawn-cgroup.c +@@ -122,7 +122,7 @@ int sync_cgroup(pid_t pid, CGroupUnified + fn = strjoina(tree, cgroup, "/cgroup.procs"); + + sprintf(pid_string, PID_FMT, pid); +- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); ++ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); + if (r < 0) { + log_error_errno(r, "Failed to move process: %m"); + goto finish; +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -2774,7 +2774,7 @@ static int reset_audit_loginuid(void) { + if (streq(p, "4294967295")) + return 0; + +- r = write_string_file("/proc/self/loginuid", "4294967295", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/self/loginuid", "4294967295", 0); + if (r < 0) { + log_error_errno(r, + "Failed to reset audit login UID. This probably means that your kernel is too\n" +@@ -4214,7 +4214,7 @@ static int setup_uid_map( + return log_oom(); + + xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); +- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(uid_map, s, 0); + if (r < 0) + return log_error_errno(r, "Failed to write UID map: %m"); + +@@ -4224,7 +4224,7 @@ static int setup_uid_map( + return log_oom(); + + xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); +- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(uid_map, s, 0); + if (r < 0) + return log_error_errno(r, "Failed to write GID map: %m"); + +--- a/src/shared/binfmt-util.c ++++ b/src/shared/binfmt-util.c +@@ -46,7 +46,7 @@ int disable_binfmt(void) { + return 0; + } + +- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); + if (r < 0) + return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); + +--- a/src/shared/cgroup-setup.c ++++ b/src/shared/cgroup-setup.c +@@ -351,7 +351,7 @@ int cg_attach(const char *controller, co + + xsprintf(c, PID_FMT "\n", pid); + +- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, c, 0); + if (r == -EOPNOTSUPP && cg_is_threaded(controller, path) > 0) + /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ + return -EUCLEAN; +@@ -964,7 +964,7 @@ int cg_enable_everywhere( + return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); + } + +- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_stream(f, s, 0); + if (r < 0) { + log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", + FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); +--- a/src/shared/coredump-util.c ++++ b/src/shared/coredump-util.c +@@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) + xsprintf(t, "0x%"PRIx64, value); + + return write_string_file("/proc/self/coredump_filter", t, +- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); ++ 0); + } + + /* Turn off core dumps but only if we're running outside of a container. */ +--- a/src/shared/sleep-util.c ++++ b/src/shared/sleep-util.c +@@ -1044,7 +1044,7 @@ int write_resume_config(dev_t devno, uin + + /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so + * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ +- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/power/resume_offset", offset_str, 0); + if (r == -ENOENT) { + if (offset != 0) + return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), +@@ -1060,7 +1060,7 @@ int write_resume_config(dev_t devno, uin + log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", + offset_str, device); + +- r = write_string_file("/sys/power/resume", devno_str, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/power/resume", devno_str, 0); + if (r < 0) + return log_error_errno(r, + "Failed to write device '%s' (%s) to /sys/power/resume: %m", +--- a/src/shared/smack-util.c ++++ b/src/shared/smack-util.c +@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const + return 0; + + p = procfs_file_alloca(pid, "attr/current"); +- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(p, label, 0); + if (r < 0) + return r; + +--- a/src/sleep/sleep.c ++++ b/src/sleep/sleep.c +@@ -139,7 +139,7 @@ static int write_mode(char **modes) { + STRV_FOREACH(mode, modes) { + int k; + +- k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER); ++ k = write_string_file("/sys/power/disk", *mode, 0); + if (k >= 0) + return 0; + +@@ -160,7 +160,7 @@ static int write_state(FILE **f, char ** + STRV_FOREACH(state, states) { + int k; + +- k = write_string_stream(*f, *state, WRITE_STRING_FILE_DISABLE_BUFFER); ++ k = write_string_stream(*f, *state, 0); + if (k >= 0) + return 0; + log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); +--- a/src/udev/udev-rules.c ++++ b/src/udev/udev-rules.c +@@ -2634,7 +2634,6 @@ static int udev_rule_apply_token_to_even + log_event_debug(dev, token, "ATTR '%s' writing '%s'", buf, value); + r = write_string_file(buf, value, + WRITE_STRING_FILE_VERIFY_ON_FAILURE | +- WRITE_STRING_FILE_DISABLE_BUFFER | + WRITE_STRING_FILE_AVOID_NEWLINE | + WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); + if (r < 0) +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -260,7 +260,7 @@ static int toggle_utf8_vc(const char *na + static int toggle_utf8_sysfs(bool utf8) { + int r; + +- r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0); + if (r < 0) + return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch deleted file mode 100644 index dfab8fbbdf..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 47472da6e8900773c26da8fd26699367447d97a6 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 16:53:06 +0800 -Subject: [PATCH] test-json.c: define M_PIl - -Fix the following compile failure: -src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/test/test-json.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/src/test/test-json.c -+++ b/src/test/test-json.c -@@ -14,6 +14,10 @@ - #include "tests.h" - #include "util.h" - -+#ifndef M_PIl -+#define M_PIl 3.141592653589793238462643383279502884L -+#endif -+ - static void test_tokenizer_one(const char *data, ...) { - unsigned line = 0, column = 0; - void *state = NULL; diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch new file mode 100644 index 0000000000..580aff327d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch @@ -0,0 +1,53 @@ +From a50ec65dbe660421052656dda7499c925005f486 Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Fri, 13 Sep 2019 19:26:27 -0400 +Subject: [PATCH] Handle __cpu_mask usage + +Fixes errors: + +src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) +src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) + +__cpu_mask is an internal type of glibc's cpu_set implementation, not +part of the POSIX definition, which is problematic when building with +musl, which does not define a matching type. From inspection of musl's +sched.h, however, it is clear that the corresponding type would be +unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, +add a typedef to cpu-set-util.h defining __cpu_mask appropriately. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Scott Murray +--- + src/shared/cpu-set-util.h | 2 ++ + src/test/test-sizeof.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +--- a/src/shared/cpu-set-util.h ++++ b/src/shared/cpu-set-util.h +@@ -6,6 +6,8 @@ + #include "macro.h" + #include "missing_syscall.h" + ++typedef unsigned long __cpu_mask; ++ + /* This wraps the libc interface with a variable to keep the allocated size. */ + typedef struct CPUSet { + cpu_set_t *set; +--- a/src/test/test-sizeof.c ++++ b/src/test/test-sizeof.c +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + +-#include + #include + #include + #include +@@ -12,6 +11,7 @@ + #include + + #include "time-util.h" ++#include "cpu-set-util.h" + + /* Print information about various types. Useful when diagnosing + * gcc diagnostics on an unfamiliar architecture. */ diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch deleted file mode 100644 index d389e1d9f9..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch +++ /dev/null @@ -1,420 +0,0 @@ -From 0f9422780a569c79a4b28e44c79c70b4a354bd92 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Fri, 1 Mar 2019 15:22:15 +0800 -Subject: [PATCH] do not disable buffer in writing files - -Do not disable buffer in writing files, otherwise we get -failure at boot for musl like below. - - [!!!!!!] Failed to allocate manager object. - -And there will be other failures, critical or not critical. -This is specific to musl. - -Upstream-Status: Inappropriate [musl] - -Signed-off-by: Chen Qi -[Rebased for v242] -Signed-off-by: Andrej Valek -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/cgroup-util.c | 10 +++++----- - src/basic/procfs-util.c | 4 ++-- - src/basic/sysctl-util.c | 2 +- - src/basic/util.c | 2 +- - src/binfmt/binfmt.c | 6 +++--- - src/core/main.c | 4 ++-- - src/core/smack-setup.c | 8 ++++---- - src/hibernate-resume/hibernate-resume.c | 2 +- - src/libsystemd/sd-device/sd-device.c | 2 +- - src/nspawn/nspawn-cgroup.c | 2 +- - src/nspawn/nspawn.c | 6 +++--- - src/shared/cgroup-setup.c | 4 ++-- - src/shared/mount-util.c | 4 ++-- - src/shared/smack-util.c | 2 +- - src/sleep/sleep.c | 8 ++++---- - src/vconsole/vconsole-setup.c | 2 +- - 16 files changed, 34 insertions(+), 34 deletions(-) - ---- a/src/basic/cgroup-util.c -+++ b/src/basic/cgroup-util.c -@@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *c - if (r < 0) - return r; - -- r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(killfile, "1", 0); - if (r < 0) - return r; - -@@ -803,7 +803,7 @@ int cg_install_release_agent(const char - - sc = strstrip(contents); - if (isempty(sc)) { -- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, agent, 0); - if (r < 0) - return r; - } else if (!path_equal(sc, agent)) -@@ -821,7 +821,7 @@ int cg_install_release_agent(const char - - sc = strstrip(contents); - if (streq(sc, "0")) { -- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "1", 0); - if (r < 0) - return r; - -@@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const cha - if (r < 0) - return r; - -- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "0", 0); - if (r < 0) - return r; - -@@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const cha - if (r < 0) - return r; - -- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "", 0); - if (r < 0) - return r; - -@@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *control - if (r < 0) - return r; - -- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(p, value, 0); - } - - int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { ---- a/src/basic/procfs-util.c -+++ b/src/basic/procfs-util.c -@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi - * decrease it, as threads-max is the much more relevant sysctl. */ - if (limit > pid_max-1) { - sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ -- r = write_string_file("/proc/sys/kernel/pid_max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/pid_max", buffer, 0); - if (r < 0) - return r; - } - - sprintf(buffer, "%" PRIu64, limit); -- r = write_string_file("/proc/sys/kernel/threads-max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/threads-max", buffer, 0); - if (r < 0) { - uint64_t threads_max; - ---- a/src/basic/sysctl-util.c -+++ b/src/basic/sysctl-util.c -@@ -58,7 +58,7 @@ int sysctl_write(const char *property, c - - log_debug("Setting '%s' to '%s'", p, value); - -- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); -+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); - } - - int sysctl_writef(const char *property, const char *format, ...) { ---- a/src/basic/util.c -+++ b/src/basic/util.c -@@ -168,7 +168,7 @@ void disable_coredumps(void) { - if (detect_container() > 0) - return; - -- r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); - if (r < 0) - log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); - } ---- a/src/binfmt/binfmt.c -+++ b/src/binfmt/binfmt.c -@@ -29,7 +29,7 @@ static bool arg_unregister = false; - - static int delete_rule(const char *rulename) { - const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename); -- return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(fn, "-1", 0); - } - - static int apply_rule(const char *filename, unsigned line, const char *rule) { -@@ -59,7 +59,7 @@ static int apply_rule(const char *filena - if (r >= 0) - log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); - -- r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); - if (r < 0) - return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m", - filename, line, rulename); -@@ -226,7 +226,7 @@ static int run(int argc, char *argv[]) { - } - - /* Flush out all rules */ -- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); - if (r < 0) - log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); - else ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void - if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) - return 0; - -- r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, -+ r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, - "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); - if (r < 0) - return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, -@@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool - if (getpid_cached() != 1) - return; - -- r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); - if (r < 0) - log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", - arg_early_core_pattern); ---- a/src/core/smack-setup.c -+++ b/src/core/smack-setup.c -@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) - } - - #if HAVE_SMACK_RUN_LABEL -- r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK label \"" SMACK_RUN_LABEL "\" on self: %m"); -- r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); - r = write_string_file("/sys/fs/smackfs/netlabel", -- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ "0.0.0.0/0 " SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); -- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); - #endif ---- a/src/hibernate-resume/hibernate-resume.c -+++ b/src/hibernate-resume/hibernate-resume.c -@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { - return EXIT_FAILURE; - } - -- r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume", major_minor, 0); - if (r < 0) { - log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); - return EXIT_FAILURE; ---- a/src/libsystemd/sd-device/sd-device.c -+++ b/src/libsystemd/sd-device/sd-device.c -@@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value - if (!value) - return -ENOMEM; - -- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); -+ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); - if (r < 0) { - /* On failure, clear cache entry, as we do not know how it fails. */ - device_remove_cached_sysattr_value(device, sysattr); ---- a/src/nspawn/nspawn-cgroup.c -+++ b/src/nspawn/nspawn-cgroup.c -@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified - fn = strjoina(tree, cgroup, "/cgroup.procs"); - - sprintf(pid_string, PID_FMT, pid); -- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); -+ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); - if (r < 0) { - log_error_errno(r, "Failed to move process: %m"); - goto finish; ---- a/src/nspawn/nspawn.c -+++ b/src/nspawn/nspawn.c -@@ -2757,7 +2757,7 @@ static int reset_audit_loginuid(void) { - if (streq(p, "4294967295")) - return 0; - -- r = write_string_file("/proc/self/loginuid", "4294967295", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/self/loginuid", "4294967295", 0); - if (r < 0) { - log_error_errno(r, - "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -4163,7 +4163,7 @@ static int setup_uid_map( - return log_oom(); - - xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); -- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(uid_map, s, 0); - if (r < 0) - return log_error_errno(r, "Failed to write UID map: %m"); - -@@ -4173,7 +4173,7 @@ static int setup_uid_map( - return log_oom(); - - xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); -- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(uid_map, s, 0); - if (r < 0) - return log_error_errno(r, "Failed to write GID map: %m"); - ---- a/src/shared/cgroup-setup.c -+++ b/src/shared/cgroup-setup.c -@@ -345,7 +345,7 @@ int cg_attach(const char *controller, co - - xsprintf(c, PID_FMT "\n", pid); - -- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, c, 0); - if (r < 0) - return r; - -@@ -877,7 +877,7 @@ int cg_enable_everywhere( - return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); - } - -- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_stream(f, s, 0); - if (r < 0) { - log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", - FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); ---- a/src/shared/smack-util.c -+++ b/src/shared/smack-util.c -@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const - return 0; - - p = procfs_file_alloca(pid, "attr/current"); -- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, label, 0); - if (r < 0) - return r; - ---- a/src/sleep/sleep.c -+++ b/src/sleep/sleep.c -@@ -46,7 +46,7 @@ static int write_hibernate_location_info - assert(hibernate_location->swap); - - xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); -- r = write_string_file("/sys/power/resume", resume_str, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume", resume_str, 0); - if (r < 0) - return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", - hibernate_location->swap->device, resume_str); -@@ -73,7 +73,7 @@ static int write_hibernate_location_info - } - - xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); -- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume_offset", offset_str, 0); - if (r < 0) - return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", - hibernate_location->swap->device, offset_str); -@@ -90,7 +90,7 @@ static int write_mode(char **modes) { - STRV_FOREACH(mode, modes) { - int k; - -- k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER); -+ k = write_string_file("/sys/power/disk", *mode, 0); - if (k >= 0) - return 0; - -@@ -112,7 +112,7 @@ static int write_state(FILE **f, char ** - STRV_FOREACH(state, states) { - int k; - -- k = write_string_stream(*f, *state, WRITE_STRING_FILE_DISABLE_BUFFER); -+ k = write_string_stream(*f, *state, 0); - if (k >= 0) - return 0; - log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); ---- a/src/vconsole/vconsole-setup.c -+++ b/src/vconsole/vconsole-setup.c -@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na - static int toggle_utf8_sysfs(bool utf8) { - int r; - -- r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0); - if (r < 0) - return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); - ---- a/src/basic/namespace-util.c -+++ b/src/basic/namespace-util.c -@@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map, - freeze(); - - xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); -- r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(path, uid_map, 0); - if (r < 0) - return log_error_errno(r, "Failed to write UID map: %m"); - - xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); -- r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(path, gid_map, 0); - if (r < 0) - return log_error_errno(r, "Failed to write GID map: %m"); - ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u, - else - u->freezer_state = FREEZER_THAWING; - -- r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); - if (r < 0) - return r; - ---- a/src/home/homework.c -+++ b/src/home/homework.c -@@ -284,7 +284,7 @@ static void drop_caches_now(void) { - * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not - * more. */ - -- r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); - if (r < 0) - log_warning_errno(r, "Failed to drop caches, ignoring: %m"); - else ---- a/src/shared/binfmt-util.c -+++ b/src/shared/binfmt-util.c -@@ -26,7 +26,7 @@ int disable_binfmt(void) { - if (r < 0) - return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m"); - -- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); - if (r < 0) - return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); - ---- a/src/shared/coredump-util.c -+++ b/src/shared/coredump-util.c -@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value) - sprintf(t, "0x%"PRIx64, value); - - return write_string_file("/proc/self/coredump_filter", t, -- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); -+ WRITE_STRING_FILE_VERIFY_ON_FAILURE); - } ---- a/src/udev/udev-rules.c -+++ b/src/udev/udev-rules.c -@@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_even - log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value); - r = write_string_file(buf, value, - WRITE_STRING_FILE_VERIFY_ON_FAILURE | -- WRITE_STRING_FILE_DISABLE_BUFFER | - WRITE_STRING_FILE_AVOID_NEWLINE | - WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); - if (r < 0) diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch new file mode 100644 index 0000000000..19ee3ff311 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch @@ -0,0 +1,173 @@ +From ebf0f69d8614b8d86a971b97ff0d847d1e5d47c9 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan +Date: Tue, 10 Mar 2020 11:05:20 +0000 +Subject: [PATCH] Handle missing gshadow + +gshadow usage is now present in the userdb code. Mask all uses of it to +allow compilation on musl + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Alex Kiernan +[Rebased for v247] +Signed-off-by: Luca Boccassi +--- + src/shared/user-record-nss.c | 20 ++++++++++++++++++++ + src/shared/user-record-nss.h | 4 ++++ + src/shared/userdb.c | 7 ++++++- + 3 files changed, 30 insertions(+), 1 deletion(-) + +diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c +index 88b8fc2f8f..a819d41bac 100644 +--- a/src/shared/user-record-nss.c ++++ b/src/shared/user-record-nss.c +@@ -329,8 +329,10 @@ int nss_group_to_group_record( + if (isempty(grp->gr_name)) + return -EINVAL; + ++#if ENABLE_GSHADOW + if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name)) + return -EINVAL; ++#endif + + g = group_record_new(); + if (!g) +@@ -346,6 +348,7 @@ int nss_group_to_group_record( + + g->gid = grp->gr_gid; + ++#if ENABLE_GSHADOW + if (sgrp) { + if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { + g->hashed_password = strv_new(sgrp->sg_passwd); +@@ -361,6 +364,7 @@ int nss_group_to_group_record( + if (r < 0) + return r; + } ++#endif + + r = json_build(&g->json, JSON_BUILD_OBJECT( + JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), +@@ -387,6 +391,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re + assert(ret_sgrp); + assert(ret_buffer); + ++#if ENABLE_GSHADOW + for (;;) { + _cleanup_free_ char *buf = NULL; + struct sgrp sgrp, *result; +@@ -415,6 +420,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re + buflen *= 2; + buf = mfree(buf); + } ++#else ++ return -ESRCH; ++#endif + } + + int nss_group_record_by_name( +@@ -426,7 +434,9 @@ int nss_group_record_by_name( + struct group grp, *result; + bool incomplete = false; + size_t buflen = 4096; ++#if ENABLE_GSHADOW + struct sgrp sgrp, *sresult = NULL; ++#endif + int r; + + assert(name); +@@ -455,6 +465,7 @@ int nss_group_record_by_name( + buf = mfree(buf); + } + ++#if ENABLE_GSHADOW + if (with_shadow) { + r = nss_sgrp_for_group(result, &sgrp, &sbuf); + if (r < 0) { +@@ -466,6 +477,9 @@ int nss_group_record_by_name( + incomplete = true; + + r = nss_group_to_group_record(result, sresult, ret); ++#else ++ r = nss_group_to_group_record(result, NULL, ret); ++#endif + if (r < 0) + return r; + +@@ -483,7 +497,9 @@ int nss_group_record_by_gid( + struct group grp, *result; + bool incomplete = false; + size_t buflen = 4096; ++#if ENABLE_GSHADOW + struct sgrp sgrp, *sresult = NULL; ++#endif + int r; + + for (;;) { +@@ -509,6 +525,7 @@ int nss_group_record_by_gid( + buf = mfree(buf); + } + ++#if ENABLE_GSHADOW + if (with_shadow) { + r = nss_sgrp_for_group(result, &sgrp, &sbuf); + if (r < 0) { +@@ -520,6 +537,9 @@ int nss_group_record_by_gid( + incomplete = true; + + r = nss_group_to_group_record(result, sresult, ret); ++#else ++ r = nss_group_to_group_record(result, NULL, ret); ++#endif + if (r < 0) + return r; + +diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h +index 22ab04d6ee..4e52e7a911 100644 +--- a/src/shared/user-record-nss.h ++++ b/src/shared/user-record-nss.h +@@ -2,7 +2,11 @@ + #pragma once + + #include ++#if ENABLE_GSHADOW + #include ++#else ++struct sgrp; ++#endif + #include + #include + +diff --git a/src/shared/userdb.c b/src/shared/userdb.c +index a77eff4407..955e361d3a 100644 +--- a/src/shared/userdb.c ++++ b/src/shared/userdb.c +@@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + if (gr) { + _cleanup_free_ char *buffer = NULL; + bool incomplete = false; ++#if ENABLE_GSHADOW + struct sgrp sgrp; +- ++#endif + if (streq_ptr(gr->gr_name, "root")) + iterator->synthesize_root = false; + if (gr->gr_gid == GID_NOBODY) + iterator->synthesize_nobody = false; + ++#if ENABLE_GSHADOW + if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { + r = nss_sgrp_for_group(gr, &sgrp, &buffer); + if (r < 0) { +@@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + } + + r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); ++#else ++ r = nss_group_to_group_record(gr, NULL, ret); ++#endif + if (r < 0) + return r; + +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch new file mode 100644 index 0000000000..d64cec1585 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch @@ -0,0 +1,49 @@ +From a2f56a2a6cdd5137bb1e680aa9f6c40540107166 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 12 Apr 2021 23:44:53 -0700 +Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl + +musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 +unlike glibc where these are provided by libc headers, therefore define +them here in case they are undefined + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/basic/missing_syscall.h | 6 ++++++ + src/shared/base-filesystem.c | 1 + + 2 files changed, 7 insertions(+) + +diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h +index 98cd037962..ea6a76c2e2 100644 +--- a/src/basic/missing_syscall.h ++++ b/src/basic/missing_syscall.h +@@ -20,6 +20,12 @@ + #include + #endif + ++#ifndef _MIPS_SIM_ABI32 ++#define _MIPS_SIM_ABI32 1 ++#define _MIPS_SIM_NABI32 2 ++#define _MIPS_SIM_ABI64 3 ++#endif ++ + #include "macro.h" + #include "missing_keyctl.h" + #include "missing_stat.h" +diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c +index 2726dc946a..484f63e0b4 100644 +--- a/src/shared/base-filesystem.c ++++ b/src/shared/base-filesystem.c +@@ -20,6 +20,7 @@ + #include "string-util.h" + #include "umask-util.h" + #include "user-util.h" ++#include "missing_syscall.h" + + typedef struct BaseFilesystem { + const char *dir; /* directory or symlink to create */ +-- +2.39.2 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch deleted file mode 100644 index e001ed59e8..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e4f9ef547fa342102db15188544daa18e71e9c66 Mon Sep 17 00:00:00 2001 -From: Scott Murray -Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH] Handle __cpu_mask usage - -Fixes errors: - -src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) -src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) - -__cpu_mask is an internal type of glibc's cpu_set implementation, not -part of the POSIX definition, which is problematic when building with -musl, which does not define a matching type. From inspection of musl's -sched.h, however, it is clear that the corresponding type would be -unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, -add a typedef to cpu-set-util.h defining __cpu_mask appropriately. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Scott Murray - ---- - src/shared/cpu-set-util.h | 2 ++ - src/test/test-sizeof.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h -index 3c63a58826..4c2d4347fc 100644 ---- a/src/shared/cpu-set-util.h -+++ b/src/shared/cpu-set-util.h -@@ -6,6 +6,8 @@ - #include "macro.h" - #include "missing_syscall.h" - -+typedef unsigned long __cpu_mask; -+ - /* This wraps the libc interface with a variable to keep the allocated size. */ - typedef struct CPUSet { - cpu_set_t *set; -diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c -index 4403c0aa52..e7e4ae112d 100644 ---- a/src/test/test-sizeof.c -+++ b/src/test/test-sizeof.c -@@ -1,6 +1,5 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - --#include - #include - #include - #include -@@ -10,6 +9,7 @@ - #include - - #include "time-util.h" -+#include "cpu-set-util.h" - - /* Print information about various types. Useful when diagnosing - * gcc diagnostics on an unfamiliar architecture. */ diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch deleted file mode 100644 index 2d06ab84a2..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 66a926cf906260c2fb5ea851e55efe03edd444dc Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH] Handle missing gshadow - -gshadow usage is now present in the userdb code. Mask all uses of it to -allow compilation on musl - -Upstream-Status: Inappropriate [musl specific] -Signed-off-by: Alex Kiernan -[Rebased for v247] -Signed-off-by: Luca Boccassi - ---- - src/shared/user-record-nss.c | 20 ++++++++++++++++++++ - src/shared/user-record-nss.h | 4 ++++ - src/shared/userdb.c | 7 ++++++- - 3 files changed, 30 insertions(+), 1 deletion(-) - ---- a/src/shared/user-record-nss.c -+++ b/src/shared/user-record-nss.c -@@ -331,8 +331,10 @@ int nss_group_to_group_record( - if (isempty(grp->gr_name)) - return -EINVAL; - -+#if ENABLE_GSHADOW - if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name)) - return -EINVAL; -+#endif - - g = group_record_new(); - if (!g) -@@ -348,6 +350,7 @@ int nss_group_to_group_record( - - g->gid = grp->gr_gid; - -+#if ENABLE_GSHADOW - if (sgrp) { - if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { - g->hashed_password = strv_new(sgrp->sg_passwd); -@@ -363,6 +366,7 @@ int nss_group_to_group_record( - if (r < 0) - return r; - } -+#endif - - r = json_build(&g->json, JSON_BUILD_OBJECT( - JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), -@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou - assert(ret_sgrp); - assert(ret_buffer); - -+#if ENABLE_GSHADOW - for (;;) { - _cleanup_free_ char *buf = NULL; - struct sgrp sgrp, *result; -@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou - buflen *= 2; - buf = mfree(buf); - } -+#else -+ return -ESRCH; -+#endif - } - - int nss_group_record_by_name( -@@ -427,7 +435,9 @@ int nss_group_record_by_name( - struct group grp, *result; - bool incomplete = false; - size_t buflen = 4096; -+#if ENABLE_GSHADOW - struct sgrp sgrp, *sresult = NULL; -+#endif - int r; - - assert(name); -@@ -457,6 +467,7 @@ int nss_group_record_by_name( - buf = mfree(buf); - } - -+#if ENABLE_GSHADOW - if (with_shadow) { - r = nss_sgrp_for_group(result, &sgrp, &sbuf); - if (r < 0) { -@@ -468,6 +479,9 @@ int nss_group_record_by_name( - incomplete = true; - - r = nss_group_to_group_record(result, sresult, ret); -+#else -+ r = nss_group_to_group_record(result, NULL, ret); -+#endif - if (r < 0) - return r; - -@@ -484,7 +498,9 @@ int nss_group_record_by_gid( - struct group grp, *result; - bool incomplete = false; - size_t buflen = 4096; -+#if ENABLE_GSHADOW - struct sgrp sgrp, *sresult = NULL; -+#endif - int r; - - assert(ret); -@@ -512,6 +528,7 @@ int nss_group_record_by_gid( - buf = mfree(buf); - } - -+#if ENABLE_GSHADOW - if (with_shadow) { - r = nss_sgrp_for_group(result, &sgrp, &sbuf); - if (r < 0) { -@@ -523,6 +540,9 @@ int nss_group_record_by_gid( - incomplete = true; - - r = nss_group_to_group_record(result, sresult, ret); -+#else -+ r = nss_group_to_group_record(result, NULL, ret); -+#endif - if (r < 0) - return r; - ---- a/src/shared/user-record-nss.h -+++ b/src/shared/user-record-nss.h -@@ -2,7 +2,11 @@ - #pragma once - - #include -+#if ENABLE_GSHADOW - #include -+#else -+struct sgrp; -+#endif - #include - #include - ---- a/src/shared/userdb.c -+++ b/src/shared/userdb.c -@@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator - if (gr) { - _cleanup_free_ char *buffer = NULL; - bool incomplete = false; -+#if ENABLE_GSHADOW - struct sgrp sgrp; -- -+#endif - if (streq_ptr(gr->gr_name, "root")) - iterator->synthesize_root = false; - if (gr->gr_gid == GID_NOBODY) - iterator->synthesize_nobody = false; - -+#if ENABLE_GSHADOW - if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { - r = nss_sgrp_for_group(gr, &sgrp, &buffer); - if (r < 0) { -@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator - } - - r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); -+#else -+ r = nss_group_to_group_record(gr, NULL, ret); -+#endif - if (r < 0) - return r; - diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch deleted file mode 100644 index 700a04a264..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6f0dd2ba75b68036d7b4ebfe47ac5eaf44d26f06 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 12 Apr 2021 23:44:53 -0700 -Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl - -musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 -unlike glibc where these are provided by libc headers, therefore define -them here in case they are undefined - -Upstream-Status: Pending - -Signed-off-by: Khem Raj - ---- - src/basic/missing_syscall.h | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/src/basic/missing_syscall.h -+++ b/src/basic/missing_syscall.h -@@ -20,6 +20,12 @@ - #include - #endif - -+#ifndef _MIPS_SIM_ABI32 -+#define _MIPS_SIM_ABI32 1 -+#define _MIPS_SIM_NABI32 2 -+#define _MIPS_SIM_ABI64 3 -+#endif -+ - #include "macro.h" - #include "missing_keyctl.h" - #include "missing_stat.h" diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch new file mode 100644 index 0000000000..c9ec00012e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch @@ -0,0 +1,39 @@ +From 148645ba8b62f04c7c5ff5907378663f97880f22 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Aug 2023 12:06:27 -0700 +Subject: [PATCH 1/4] sd-event: Make malloc_trim() conditional on glibc + +musl does not have this API + +Upstream-Status: Inappropriate [musl-specific] +Signed-off-by: Khem Raj +--- + src/libsystemd/sd-event/sd-event.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c +index aba458185b..48c94a7672 100644 +--- a/src/libsystemd/sd-event/sd-event.c ++++ b/src/libsystemd/sd-event/sd-event.c +@@ -1874,7 +1874,7 @@ _public_ int sd_event_add_exit( + } + + _public_ int sd_event_trim_memory(void) { +- int r; ++ int r = 0; + + /* A default implementation of a memory pressure callback. Simply releases our own allocation caches + * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a +@@ -1888,7 +1888,9 @@ _public_ int sd_event_trim_memory(void) { + + usec_t before_timestamp = now(CLOCK_MONOTONIC); + hashmap_trim_pools(); ++#ifdef __GLIBC__ + r = malloc_trim(0); ++#endif + usec_t after_timestamp = now(CLOCK_MONOTONIC); + + if (r > 0) +-- +2.41.0 + diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch new file mode 100644 index 0000000000..8e386551a1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch @@ -0,0 +1,50 @@ +From 9430646e72ea5d260ade300038a6d976fecf7da5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Aug 2023 12:20:40 -0700 +Subject: [PATCH 4/4] shared: Do not use malloc_info on musl + +Upstream-Status: Inappropriate [musl-specific] +Signed-off-by: Khem Raj +--- + src/shared/bus-util.c | 5 +++-- + src/shared/common-signal.c | 4 ++-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +--- a/src/shared/bus-util.c ++++ b/src/shared/bus-util.c +@@ -617,15 +617,16 @@ static int method_dump_memory_state_by_f + _cleanup_close_ int fd = -EBADF; + size_t dump_size; + FILE *f; +- int r; ++ int r = 0; + + assert(message); + + f = memstream_init(&m); + if (!f) + return -ENOMEM; +- ++#ifdef __GLIBC__ + r = RET_NERRNO(malloc_info(/* options= */ 0, f)); ++#endif + if (r < 0) + return r; + +--- a/src/shared/common-signal.c ++++ b/src/shared/common-signal.c +@@ -65,12 +65,12 @@ int sigrtmin18_handler(sd_event_source * + log_oom(); + break; + } +- ++#ifdef __GLIBC__ + if (malloc_info(0, f) < 0) { + log_error_errno(errno, "Failed to invoke malloc_info(): %m"); + break; + } +- ++#endif + (void) memstream_dump(LOG_INFO, &m); + break; + } diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb deleted file mode 100644 index 14e927d075..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb +++ /dev/null @@ -1,79 +0,0 @@ -SUMMARY = "libsystemd static library" -DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" - -SECTION = "libs" - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" - -inherit meson pkgconfig - -DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" - -SRCREV = "1d5e0e9910500f3c3584485f77bfc35e601036e3" -SRCBRANCH = "v250-stable" -SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ - file://static-libsystemd-pkgconfig.patch \ - file://0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch \ - " - -# patches needed by musl -SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" - -SRC_URI_MUSL = "\ - file://0002-don-t-use-glibc-specific-qsort_r.patch \ - file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ - file://0004-add-fallback-parse_printf_format-implementation.patch \ - file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ - file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ - file://0008-add-missing-FTW_-macros-for-musl.patch \ - file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ - file://0010-Use-uintmax_t-for-handling-rlim_t.patch \ - file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ - file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ - file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ - file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ - file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ - file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ - file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \ - file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \ - file://0019-Handle-missing-LOCK_EX.patch \ - file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \ - file://0021-test-json.c-define-M_PIl.patch \ - file://0022-do-not-disable-buffer-in-writing-files.patch \ - file://0025-Handle-__cpu_mask-usage.patch \ - file://0026-Handle-missing-gshadow.patch \ - file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ - file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ - file://0001-Adjust-for-musl-headers.patch \ - " - -PACKAGECONFIG ??= "gshadow idn" -PACKAGECONFIG:remove:libc-musl = " gshadow idn" -PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" -PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" - -CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " - -EXTRA_OEMESON += "-Dstatic-libsystemd=pic" - -S = "${WORKDIR}/git" - -RDEPENDS:${PN}-dev = "" - -do_compile() { - ninja -v ${PARALLEL_MAKE} version.h - ninja -v ${PARALLEL_MAKE} libsystemd.a - ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc -} - -do_install () { - install -d ${D}${libdir} - install ${B}/libsystemd.a ${D}${libdir} - - install -d ${D}${includedir}/systemd - install ${S}/src/systemd/*.h ${D}${includedir}/systemd - - install -d ${D}${libdir}/pkgconfig - install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig -} diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb new file mode 100644 index 0000000000..0b211948cf --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb @@ -0,0 +1,74 @@ +SUMMARY = "libsystemd static library" +DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" + +SECTION = "libs" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + +inherit meson pkgconfig + +DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" + +SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51" +SRCBRANCH = "v254-stable" +SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ + file://static-libsystemd-pkgconfig.patch \ + " + +# patches needed by musl +SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" + +SRC_URI_MUSL = "\ + file://0009-missing_type.h-add-comparison_fn_t.patch \ + file://0010-add-fallback-parse_printf_format-implementation.patch \ + file://0011-src-basic-missing.h-check-for-missing-strndupa.patch \ + file://0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ + file://0013-add-missing-FTW_-macros-for-musl.patch \ + file://0014-Use-uintmax_t-for-handling-rlim_t.patch \ + file://0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ + file://0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ + file://0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ + file://0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ + file://0020-avoid-redefinition-of-prctl_mm_map-structure.patch \ + file://0021-do-not-disable-buffer-in-writing-files.patch \ + file://0022-Handle-__cpu_mask-usage.patch \ + file://0023-Handle-missing-gshadow.patch \ + file://0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ + file://0005-pass-correct-parameters-to-getdents64.patch \ + file://0001-Adjust-for-musl-headers.patch \ + file://0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ + file://0003-errno-util-Make-STRERROR-portable-for-musl.patch \ + file://0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ + file://0029-shared-Do-not-use-malloc_info-on-musl.patch \ + " + +PACKAGECONFIG ??= "gshadow idn" +PACKAGECONFIG:remove:libc-musl = " gshadow idn" +PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" +PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" + +CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " + +EXTRA_OEMESON += "-Dstatic-libsystemd=pic" + +S = "${WORKDIR}/git" + +RDEPENDS:${PN}-dev = "" + +do_compile() { + ninja -v ${PARALLEL_MAKE} version.h + ninja -v ${PARALLEL_MAKE} libsystemd.a + ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc +} + +do_install () { + install -d ${D}${libdir} + install ${B}/libsystemd.a ${D}${libdir} + + install -d ${D}${includedir}/systemd + install ${S}/src/systemd/*.h ${D}${includedir}/systemd + + install -d ${D}${libdir}/pkgconfig + install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig +} diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.3.0.bb b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.3.0.bb deleted file mode 100644 index a7e147877b..0000000000 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.3.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "sdbus-c++ native tools" -DESCRIPTION = "Native interface code generator for development with sdbus-c++" - -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742" - -inherit cmake - -DEPENDS += "expat" - -SRCREV = "0eda85574546d19d9f06d6d5418bc192b3846f96" -SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;subpath=tools" - -S = "${WORKDIR}/tools" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.4.0.bb b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.4.0.bb new file mode 100644 index 0000000000..956b4b82f4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools_1.4.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "sdbus-c++ native tools" +DESCRIPTION = "Native interface code generator for development with sdbus-c++" + +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742" + +inherit cmake + +DEPENDS += "expat" + +SRCREV = "b482cd6d0890e3f9ae141b4aeb07d3724e48b3db" +SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;subpath=tools" + +S = "${WORKDIR}/tools" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.4.0.bb b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.4.0.bb index 869bfa951f..ca91b351ed 100644 --- a/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.4.0.bb +++ b/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.4.0.bb @@ -10,9 +10,9 @@ inherit cmake pkgconfig systemd ptest PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \ ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}" -PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap" +PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap,basu" PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd" -PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF,googletest gmock" +PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${PTEST_PATH},-DBUILD_TESTS=OFF,googletest gmock" DEPENDS += "expat" @@ -39,14 +39,13 @@ do_install:append() { fi } -PTEST_PATH = "${libdir}/${BPN}/ptest" do_install_ptest() { - install -d ${D}${PTEST_PATH} - cp -r ${B}/tests/sdbus-c++-unit-tests ${D}${PTEST_PATH} + DESTDIR='${D}' cmake_runcmake_build --target tests/install } FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/" FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp" +RDEPENDS:${PN}-ptest += "dbus" # It adds -isystem which is spurious, no idea where it gets it from CCACHE_DISABLE = "1" diff --git a/meta-openembedded/meta-oe/recipes-crypto/monocypher/monocypher_4.0.2.bb b/meta-openembedded/meta-oe/recipes-crypto/monocypher/monocypher_4.0.2.bb new file mode 100644 index 0000000000..899638161a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-crypto/monocypher/monocypher_4.0.2.bb @@ -0,0 +1,26 @@ +SUMMARY = "Monocypher is an easy-to-use crypto library" +DESCRIPTION = "Monocypher is an easy to use, easy to deploy, \ +auditable crypto library written in portable C. It approaches the size of TweetNaCl and the speed of libsodium." +HOMEPAGE = "https://monocypher.org/" +SECTION = "libs" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENCE.md;md5=6a251155d943c8531e01a139f3fc531a" + +SRC_URI = "git://github.com/LoupVaillant/Monocypher.git;protocol=https;branch=master" +SRCREV = "0d85f98c9d9b0227e42cf795cb527dff372b40a4" + +S = "${WORKDIR}/git" + +CFLAGS+="-pedantic -Wall -Wextra -O3" +EXTRA_OEMAKE = "'PREFIX=${prefix}' 'DESTDIR=${D}' 'CFLAGS=${CFLAGS}'" + +do_compile() { + oe_runmake library +} + +do_install() { + oe_runmake install-lib + oe_runmake install-pc +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.1.bb b/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.1.bb new file mode 100644 index 0000000000..649bb39457 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.1.bb @@ -0,0 +1,28 @@ +SUMMARY = "Cap'n Proto serialization/RPC system" +DESCRIPTION = "Cap’n Proto is an insanely fast data interchange format and capability-based RPC system. " +HOMEPAGE = "https://github.com/sandstorm-io/capnproto" +SECTION = "console/tools" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=a05663ae6cca874123bf667a60dca8c9" + +SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV};protocol=https" +SRCREV = "15dc687f573311ac721c0df9d2123d2959268e92" + +S = "${WORKDIR}/git/c++" + +inherit cmake + +CXXFLAGS:append:mips = " -latomic" +CXXFLAGS:append:powerpc = " -latomic" +CXXFLAGS:append:riscv32 = " -latomic" + +EXTRA_OECMAKE += "\ + -DBUILD_TESTING=OFF \ +" + +FILES:${PN}-compiler = "${bindir}" + +PACKAGE_BEFORE_PN = "${PN}-compiler" +RDEPENDS:${PN}-dev += "${PN}-compiler" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.bb b/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.bb deleted file mode 100644 index 99a76d454a..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Cap'n Proto serialization/RPC system" -DESCRIPTION = "Cap’n Proto is an insanely fast data interchange format and capability-based RPC system. " -HOMEPAGE = "https://github.com/sandstorm-io/capnproto" -SECTION = "console/tools" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://../LICENSE;md5=a05663ae6cca874123bf667a60dca8c9" - -SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV};protocol=https" -SRCREV = "c7f810a76ca88ff28613fa165927e0269255aab0" - -S = "${WORKDIR}/git/c++" - -inherit cmake - -CXXFLAGS:append:mips = " -latomic" -CXXFLAGS:append:powerpc = " -latomic" -CXXFLAGS:append:riscv32 = " -latomic" - -EXTRA_OECMAKE += "\ - -DBUILD_TESTING=OFF \ -" - -FILES:${PN}-compiler = "${bindir}" - -PACKAGE_BEFORE_PN = "${PN}-compiler" -RDEPENDS:${PN}-dev += "${PN}-compiler" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231119.0.bb b/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231119.0.bb deleted file mode 100644 index b53753c12d..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231119.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2015 Igor Santos -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Universal Ctags" -DESCRIPTION = "Universal Ctags is a multilanguage reimplementation of the \ - Unix ctags utility. Ctags generates an index of source code \ - definitions which is used by numerous editors and utilities \ - to instantly locate the definitions." - -HOMEPAGE = "https://ctags.io/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -inherit autotools-brokensep pkgconfig manpages - -SRCREV = "f727e74001ec5081818669635fc2bae377be6eda" -SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= " \ - readcmd \ - xml \ - json \ - yaml \ -" -PACKAGECONFIG[readcmd] = "--enable-readcmd,--disable-readcmd" -PACKAGECONFIG[etags] = "--enable-etags,--disable-etags" -PACKAGECONFIG[xml] = "--enable-xml,--disable-xml,libxml2" -PACKAGECONFIG[json] = "--enable-json,--disable-json,jansson" -PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" -PACKAGECONFIG[yaml] = "--enable-yaml,--disable-yaml,libyaml" -PACKAGECONFIG[manpages] = ",,python3-docutils-native" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231126.0.bb b/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231126.0.bb new file mode 100644 index 0000000000..44a7f6855e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20231126.0.bb @@ -0,0 +1,36 @@ +# Copyright (C) 2015 Igor Santos +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Universal Ctags" +DESCRIPTION = "Universal Ctags is a multilanguage reimplementation of the \ + Unix ctags utility. Ctags generates an index of source code \ + definitions which is used by numerous editors and utilities \ + to instantly locate the definitions." + +HOMEPAGE = "https://ctags.io/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +inherit autotools-brokensep pkgconfig manpages + +SRCREV = "c480d71e19ad842a1217e9e84e6e4afca124b95e" +SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= " \ + readcmd \ + xml \ + json \ + yaml \ +" +PACKAGECONFIG[readcmd] = "--enable-readcmd,--disable-readcmd" +PACKAGECONFIG[etags] = "--enable-etags,--disable-etags" +PACKAGECONFIG[xml] = "--enable-xml,--disable-xml,libxml2" +PACKAGECONFIG[json] = "--enable-json,--disable-json,jansson" +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" +PACKAGECONFIG[yaml] = "--enable-yaml,--disable-yaml,libyaml" +PACKAGECONFIG[manpages] = ",,python3-docutils-native" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb deleted file mode 100644 index c6a6ac4673..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "MessagePack implementation for C and C++" -DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" -HOMEPAGE = "http://msgpack.org/index.html" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ - file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ - file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ - " - -PV .= "+git${SRCPV}" - -SRC_URI = "git://github.com/msgpack/msgpack-c;branch=c_master;protocol=https \ - " -SRCREV = "a9a48cea3a78ba661ee8096b5dab456361b0ff23" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -BBCLASSEXTEND += "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb new file mode 100644 index 0000000000..40d997a52c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "MessagePack implementation for C and C++" +DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" +HOMEPAGE = "http://msgpack.org/index.html" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ + file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ + file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ + " + +SRC_URI = "git://github.com/msgpack/msgpack-c;branch=c_master;protocol=https \ + " +SRCREV = "8160ede5e20fd3019a77eea46d9c72cf6163f802" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +EXTRA_OECMAKE += "-DMSGPACK_BUILD_TESTS=off" + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb deleted file mode 100644 index fd08bf85cc..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "MessagePack implementation for C and C++" -DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" -HOMEPAGE = "http://msgpack.org/index.html" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ - file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ - file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ - " - -SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" -SRC_URI[sha256sum] = "8115c5edcf20bc1408c798a6bdaec16c1e52b1c34859d4982a0fb03300438f0b" - -S = "${WORKDIR}/msgpack-cxx-${PV}" - -DEPENDS += "boost" - -inherit cmake pkgconfig - -RDEPENDS:${PN}-dev = "" - -BBCLASSEXTEND += "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb new file mode 100644 index 0000000000..5f5507bc74 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "MessagePack implementation for C and C++" +DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" +HOMEPAGE = "http://msgpack.org/index.html" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ + file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ + file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ + " + +SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" +SRC_URI[sha256sum] = "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" + +S = "${WORKDIR}/msgpack-cxx-${PV}" + +DEPENDS += "boost" + +inherit cmake pkgconfig + +RDEPENDS:${PN}-dev = "" + +BBCLASSEXTEND += "native nativesdk" 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 index 694d632cb1..350932388c 100644 --- 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 @@ -16,7 +16,7 @@ SRC_URI = "git://github.com/nlohmann/json.git;branch=develop;protocol=https \ SRCREV = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37" -SRCREV_FORMAT = "json-test-data" +SRCREV_FORMAT .= "_json-test-data" S = "${WORKDIR}/git" @@ -36,6 +36,7 @@ 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 } diff --git a/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb b/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb deleted file mode 100644 index c57324d89c..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "New set of tools for working with SquashFS images" -SECTION = "base" -LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & MIT & BSD-2-Clause & Zlib" -LIC_FILES_CHKSUM = "file://COPYING.md;md5=5789fb0572753ed69014cd90a445cd74 \ - file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \ - file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \ - file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \ - file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \ - file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \ - file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \ - file://licenses/zlib.txt;md5=ae27c72096606131f760e5f59cf98b06 \ - file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8 \ - " - -SRCREV = "7667b84cc34707c28ca0db8d24f046ec34e8c25d" -SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" -PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib" -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" -PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" -PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" -PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" -PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" - -PACKAGES =+ "libsquashfs" -FILES:libsquashfs = "${libdir}/libsquashfs*${SOLIBS}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb b/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb new file mode 100644 index 0000000000..880af82bba --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "New set of tools for working with SquashFS images" +SECTION = "base" +LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & MIT & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING.md;md5=a709b68f1ce8a9f10aeea6401446c1f4 \ + file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \ + file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \ + file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \ + file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \ + file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \ + file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \ + file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8 \ + " + +SRCREV = "f2a3ad56e40c9711b23371238f9fa07dd24245f1" +SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +PACKAGES =+ "libsquashfs" +FILES:libsquashfs = "${libdir}/libsquashfs*${SOLIBS}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-extended/brotli/brotli/838.patch b/meta-openembedded/meta-oe/recipes-extended/brotli/brotli/838.patch deleted file mode 100644 index 98b888760f..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/brotli/brotli/838.patch +++ /dev/null @@ -1,48 +0,0 @@ -Upstream-Status: Backport [https://github.com/google/brotli/pull/838] -From 092446fafb4bfb81738853b7c7f76b293cd92a80 Mon Sep 17 00:00:00 2001 -From: Evgenii Kliuchnikov -Date: Wed, 2 Sep 2020 10:49:49 +0200 -Subject: [PATCH] Revert "Add runtime linker path to pkg-config files (#740)" - -This reverts commit 31754d4ffce14153b5c2addf7a11019ec23f51c1. ---- - scripts/libbrotlicommon.pc.in | 2 +- - scripts/libbrotlidec.pc.in | 2 +- - scripts/libbrotlienc.pc.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in -index 10ca969e..2a8cf7a3 100644 ---- a/scripts/libbrotlicommon.pc.in -+++ b/scripts/libbrotlicommon.pc.in -@@ -7,5 +7,5 @@ Name: libbrotlicommon - URL: https://github.com/google/brotli - Description: Brotli common dictionary library - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -R${libdir} -lbrotlicommon -+Libs: -L${libdir} -lbrotlicommon - Cflags: -I${includedir} -diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in -index e7c3124f..6f8ef2e4 100644 ---- a/scripts/libbrotlidec.pc.in -+++ b/scripts/libbrotlidec.pc.in -@@ -7,6 +7,6 @@ Name: libbrotlidec - URL: https://github.com/google/brotli - Description: Brotli decoder library - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -R${libdir} -lbrotlidec -+Libs: -L${libdir} -lbrotlidec - Requires.private: libbrotlicommon >= 1.0.2 - Cflags: -I${includedir} -diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in -index 4dd0811b..2098afe2 100644 ---- a/scripts/libbrotlienc.pc.in -+++ b/scripts/libbrotlienc.pc.in -@@ -7,6 +7,6 @@ Name: libbrotlienc - URL: https://github.com/google/brotli - Description: Brotli encoder library - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -R${libdir} -lbrotlienc -+Libs: -L${libdir} -lbrotlienc - Requires.private: libbrotlicommon >= 1.0.2 - Cflags: -I${includedir} diff --git a/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.9.bb b/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.9.bb deleted file mode 100644 index 708c1c194a..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Lossless compression library and tool" -DESCRIPTION = "Brotli is a generic-purpose lossless compression algorithm \ -that it is similar in speed to deflate but offers more dense compression." -HOMEPAGE = "https://github.com/google/brotli" -BUGTRACKER = "https://github.com/google/brotli/issues" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=941ee9cd1609382f946352712a319b4b" - -SRC_URI = "git://github.com/google/brotli.git;branch=master;protocol=https \ - file://838.patch " -# tag 1.0.9 -SRCREV= "e61745a6b7add50d380cfd7d3883dd6c62fc2c71" -S = "${WORKDIR}/git" - -inherit cmake lib_package - -do_install:append () { - for lib in $(ls ${D}${libdir}/*-static.a); do - basename=$(basename ${lib}) - mv -v "${lib}" "${D}${libdir}/$(echo ${basename} | sed s/-static//)" - done -} - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.1.0.bb b/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.1.0.bb new file mode 100644 index 0000000000..83f44833b6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.1.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Lossless compression library and tool" +DESCRIPTION = "Brotli is a generic-purpose lossless compression algorithm \ +that it is similar in speed to deflate but offers more dense compression." +HOMEPAGE = "https://github.com/google/brotli" +BUGTRACKER = "https://github.com/google/brotli/issues" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=941ee9cd1609382f946352712a319b4b" + +SRC_URI = "git://github.com/google/brotli.git;branch=master;protocol=https" +SRCREV= "ed738e842d2fbdf2d6459e39267a633c4a9b2f5d" + +S = "${WORKDIR}/git" + +inherit cmake lib_package + +do_install:append () { + for lib in $(ls ${D}${libdir}/*-static.a); do + basename=$(basename ${lib}) + mv -v "${lib}" "${D}${libdir}/$(echo ${basename} | sed s/-static//)" + done +} + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.9.9.bb b/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.9.9.bb deleted file mode 100644 index ecb0dbe73f..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.9.9.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "Ice Window Manager (IceWM)" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" - -SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ - file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ - " -SRC_URI[sha256sum] = "af7bab3472189febf50753eaecfac586901419d282cbcbff92e860d4b74894b3" - -UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" - -inherit autotools pkgconfig gettext perlnative features_check qemu update-alternatives -REQUIRED_DISTRO_FEATURES = "x11" - -EXTRA_OECONF += "--with-libdir=${datadir}/icewm \ - --with-cfgdir=${sysconfdir}/icewm \ - --with-docdir=${docdir}/icewm \ - --enable-fribidi \ - --enable-xinerama \ - --enable-shape" - -DEPENDS = "asciidoc-native fontconfig fribidi gdk-pixbuf imlib2 libxft libxpm libxrandr \ - libxinerama libice libsm libx11 libxext libxrender libxcomposite libxdamage \ - libxfixes" -DEPENDS:append = " qemu-native" -RDEPENDS:${PN} = "perl fribidi imlib2 imlib2-loaders" - -do_compile:prepend:class-target() { - - cd ${B} - oe_runmake -C src genpref - - qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}',['${B}/src/.libs','${STAGING_DIR_TARGET}/${libdir}','${STAGING_DIR_TARGET}/${base_libdir}'])}" - cat >qemuwrapper < src/preferences -} - -ALTERNATIVE:${PN} = "x-session-manager" -ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/icewm-session" -ALTERNATIVE_PRIORITY_${PN} = "100" - -FILES:${PN} += "${datadir}/xsessions" diff --git a/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.4.bb b/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.4.bb new file mode 100644 index 0000000000..8a150f5a91 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.4.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Ice Window Manager (IceWM)" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" + +SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ + file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ + " +SRC_URI[sha256sum] = "1bca9a0b5f959c1f715f5e49d2e0036b5ef3ca07d049529bc88cb7429a58ba31" + +UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" + +inherit autotools pkgconfig gettext perlnative features_check qemu update-alternatives +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF += "--with-libdir=${datadir}/icewm \ + --with-cfgdir=${sysconfdir}/icewm \ + --with-docdir=${docdir}/icewm \ + --enable-fribidi \ + --enable-xinerama \ + --enable-shape" + +DEPENDS = "asciidoc-native fontconfig fribidi gdk-pixbuf imlib2 libxft libxpm libxrandr \ + libxinerama libice libsm libx11 libxext libxrender libxcomposite libxdamage \ + libxfixes" +DEPENDS:append = " qemu-native" +RDEPENDS:${PN} = "perl fribidi imlib2 imlib2-loaders" + +do_compile:prepend:class-target() { + + cd ${B} + oe_runmake -C src genpref + + qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}',['${B}/src/.libs','${STAGING_DIR_TARGET}/${libdir}','${STAGING_DIR_TARGET}/${base_libdir}'])}" + cat >qemuwrapper < src/preferences +} + +ALTERNATIVE:${PN} = "x-session-manager" +ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/icewm-session" +ALTERNATIVE_PRIORITY_${PN} = "100" + +FILES:${PN} += "${datadir}/xsessions" diff --git a/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.21.bb b/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.21.bb deleted file mode 100644 index 8eebd691a7..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.21.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "A top utility for I/O" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=48e7be78bd2671d08c9c3bad71f1cfaa" - -DEPENDS = "ncurses" - -SRC_URI = "https://github.com/Tomas-M/iotop/releases/download/v1.21/iotop-1.21.tar.xz" -SRC_URI[sha256sum] = "7b4862ebc93909a3f800193140ca2464e926291a9c873b50dc31fa77e6d9383e" -UPSTREAM_CHECK_URI = "https://github.com/Tomas-M/iotop/releases" - -inherit pkgconfig - -EXTRA_OEMAKE = "V=1 STRIP=true" -# Fixes llvm-bc70b5.o: can't link soft-float modules with double-float modules -EXTRA_OEMAKE:append:toolchain-clang:riscv64 = " NO_FLTO=1" -EXTRA_OEMAKE:append:toolchain-clang:riscv32 = " NO_FLTO=1" - -# Workaround BFD linker crash with clang on arm -# revisit when upgrading binutils and see if its fixed -LDFLAGS:append:toolchain-clang:arm = " -fuse-ld=lld" - -do_install() { - oe_runmake install DESTDIR=${D} -} diff --git a/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.25.bb b/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.25.bb new file mode 100644 index 0000000000..8d19c62980 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_1.25.bb @@ -0,0 +1,25 @@ +SUMMARY = "A top utility for I/O" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=72ad44c0841d1e759669d27744e39389" + +DEPENDS = "ncurses" + +SRC_URI = "git://github.com/Tomas-M/iotop.git;branch=master;protocol=https" +SRCREV = "9d60bb7e262e0d41b0aa3bcfaa806fa4f42e548a" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +EXTRA_OEMAKE = "V=1 STRIP=true" +# Fixes llvm-bc70b5.o: can't link soft-float modules with double-float modules +EXTRA_OEMAKE:append:toolchain-clang:riscv64 = " NO_FLTO=1" +EXTRA_OEMAKE:append:toolchain-clang:riscv32 = " NO_FLTO=1" + +# Workaround BFD linker crash with clang on arm +# revisit when upgrading binutils and see if its fixed +LDFLAGS:append:toolchain-clang:arm = " -fuse-ld=lld" + +do_install() { + oe_runmake install DESTDIR=${D} +} diff --git a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm.inc b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm.inc deleted file mode 100644 index 5a6cda6ca4..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm.inc +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Fast samples-based log normalization library" -DESCRIPTION = "Briefly described, liblognorm is a tool to normalize log data." - -HOMEPAGE = "http://www.liblognorm.com" -SECTION = "base" - -LICENSE = "LGPL-2.1-or-later" - -SRC_URI = "http://www.liblognorm.com/files/download/${BPN}-${PV}.tar.gz\ -" - -inherit autotools pkgconfig - -DEPENDS += "libee libestr json-c" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," -PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,sphinx," diff --git a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm/0001-Add-asprintf-to-autoconf-function-check-macro.patch b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm/0001-Add-asprintf-to-autoconf-function-check-macro.patch new file mode 100644 index 0000000000..abb09bc648 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm/0001-Add-asprintf-to-autoconf-function-check-macro.patch @@ -0,0 +1,28 @@ +From b8c65236cd6cd68b57004479006c683455680a82 Mon Sep 17 00:00:00 2001 +From: Alfred Wingate +Date: Sun, 15 Oct 2023 12:34:52 +0100 +Subject: [PATCH] Add asprintf to autoconf function check macro + +Upstream-Status: Submitted [https://github.com/rsyslog/liblognorm/pull/376] +Signed-off-by: Alfred Wingate +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b6f92f1..b057550 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,7 +55,7 @@ AC_TYPE_SIZE_T + AC_FUNC_SELECT_ARGTYPES + AC_TYPE_SIGNAL + AC_FUNC_STRERROR_R +-AC_CHECK_FUNCS([strdup strndup strtok_r]) ++AC_CHECK_FUNCS([asprintf strdup strndup strtok_r]) + + LIBLOGNORM_CFLAGS="-I\$(top_srcdir)/src" + LIBLOGNORM_LIBS="\$(top_builddir)/src/liblognorm.la" +-- +2.43.0 + diff --git a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_1.0.1.bb b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_1.0.1.bb deleted file mode 100644 index 5d89e3540d..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_1.0.1.bb +++ /dev/null @@ -1,5 +0,0 @@ -require ${BPN}.inc - -SRC_URI[md5sum] = "7b9a826542af9686127110deab09d7a1" -SRC_URI[sha256sum] = "1f6cdfd901a8f6a97a3cb74bc6107c6746b3e9381f7889e4cd866a488e0c59a5" -LIC_FILES_CHKSUM = "file://COPYING;md5=ca016db57e008528dace002188c73dad" diff --git a/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_2.0.6.bb b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_2.0.6.bb new file mode 100644 index 0000000000..0cc128c8c4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/liblognorm/liblognorm_2.0.6.bb @@ -0,0 +1,27 @@ +SUMMARY = "Liblognorm is a fast-samples based normalization library." +DESCRIPTION = "Briefly described, liblognorm is a tool to normalize log data." +HOMEPAGE = "http://www.liblognorm.com" +SECTION = "base" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=ca016db57e008528dace002188c73dad" + +DEPENDS = "libfastjson libestr" + +SRC_URI = "git://github.com/rsyslog/liblognorm;branch=master;protocol=https \ + file://0001-Add-asprintf-to-autoconf-function-check-macro.patch \ + " +SRCREV = "46c6ee4c8e5f827893e485a4ef1aff04ea881273" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "testbench tools" +PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,pcre2," +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," +PACKAGECONFIG[advstats] = "--enable-advanced-stats,--disable-advanced-stats,," +PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,sphinx," +PACKAGECONFIG[testbench] = "--enable-testbench,--disable-testbench,," +PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,," +PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,," diff --git a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc deleted file mode 100644 index 0857cc455b..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "A Modbus library" -DESCRIPTION = "libmodbus is a C library designed to provide a fast and robust \ -implementation of the Modbus protocol. It runs on Linux, Mac OS X, FreeBSD, \ -QNX and Windows." -HOMEPAGE = "http://www.libmodbus.org/" -SECTION = "libs" - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "http://libmodbus.org/releases/${BP}.tar.gz" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[documentation] = "--with-documentation,--without-documentation,asciidoc-native xmlto-native" - -inherit autotools pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch deleted file mode 100644 index e7fbb0389f..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch +++ /dev/null @@ -1,316 +0,0 @@ -From: =?utf-8?b?IlNaIExpbiAo5p6X5LiK5pm6KSI=?= -Date: Wed, 19 Dec 2018 10:24:47 +0800 -Subject: Fix float endianness issue on big endian arch - -It converts float values depending on what order they come in. - -This patch was modified from rm5248 [1] - -[1] https://github.com/synexxus/libmodbus/commit/a511768e7fe7ec52d7bae1d9ae04e33f87a59627 - ---- -Upstream-Status: Pending - - src/modbus-data.c | 110 ++++++++++++++++++++++++++++++++++++++--------- - tests/unit-test-client.c | 22 ++++++---- - tests/unit-test.h.in | 41 ++++++++++++++++-- - 3 files changed, 141 insertions(+), 32 deletions(-) - -diff --git a/src/modbus-data.c b/src/modbus-data.c -index 902b8c6..7a744fa 100644 ---- a/src/modbus-data.c -+++ b/src/modbus-data.c -@@ -119,9 +119,18 @@ float modbus_get_float_abcd(const uint16_t *src) - { - float f; - uint32_t i; -+ uint8_t a, b, c, d; - -- i = ntohl(((uint32_t)src[0] << 16) + src[1]); -- memcpy(&f, &i, sizeof(float)); -+ a = (src[0] >> 8) & 0xFF; -+ b = (src[0] >> 0) & 0xFF; -+ c = (src[1] >> 8) & 0xFF; -+ d = (src[1] >> 0) & 0xFF; -+ -+ i = (a << 24) | -+ (b << 16) | -+ (c << 8) | -+ (d << 0); -+ memcpy(&f, &i, 4); - - return f; - } -@@ -131,9 +140,18 @@ float modbus_get_float_dcba(const uint16_t *src) - { - float f; - uint32_t i; -+ uint8_t a, b, c, d; - -- i = ntohl(bswap_32((((uint32_t)src[0]) << 16) + src[1])); -- memcpy(&f, &i, sizeof(float)); -+ a = (src[0] >> 8) & 0xFF; -+ b = (src[0] >> 0) & 0xFF; -+ c = (src[1] >> 8) & 0xFF; -+ d = (src[1] >> 0) & 0xFF; -+ -+ i = (d << 24) | -+ (c << 16) | -+ (b << 8) | -+ (a << 0); -+ memcpy(&f, &i, 4); - - return f; - } -@@ -143,9 +161,18 @@ float modbus_get_float_badc(const uint16_t *src) - { - float f; - uint32_t i; -+ uint8_t a, b, c, d; - -- i = ntohl((uint32_t)(bswap_16(src[0]) << 16) + bswap_16(src[1])); -- memcpy(&f, &i, sizeof(float)); -+ a = (src[0] >> 8) & 0xFF; -+ b = (src[0] >> 0) & 0xFF; -+ c = (src[1] >> 8) & 0xFF; -+ d = (src[1] >> 0) & 0xFF; -+ -+ i = (b << 24) | -+ (a << 16) | -+ (d << 8) | -+ (c << 0); -+ memcpy(&f, &i, 4); - - return f; - } -@@ -155,9 +182,18 @@ float modbus_get_float_cdab(const uint16_t *src) - { - float f; - uint32_t i; -+ uint8_t a, b, c, d; - -- i = ntohl((((uint32_t)src[1]) << 16) + src[0]); -- memcpy(&f, &i, sizeof(float)); -+ a = (src[0] >> 8) & 0xFF; -+ b = (src[0] >> 0) & 0xFF; -+ c = (src[1] >> 8) & 0xFF; -+ d = (src[1] >> 0) & 0xFF; -+ -+ i = (c << 24) | -+ (d << 16) | -+ (a << 8) | -+ (b << 0); -+ memcpy(&f, &i, 4); - - return f; - } -@@ -172,50 +208,84 @@ float modbus_get_float(const uint16_t *src) - memcpy(&f, &i, sizeof(float)); - - return f; -+ - } - - /* Set a float to 4 bytes for Modbus w/o any conversion (ABCD) */ - void modbus_set_float_abcd(float f, uint16_t *dest) - { - uint32_t i; -+ uint8_t *out = (uint8_t*) dest; -+ uint8_t a, b, c, d; - - memcpy(&i, &f, sizeof(uint32_t)); -- i = htonl(i); -- dest[0] = (uint16_t)(i >> 16); -- dest[1] = (uint16_t)i; -+ a = (i >> 24) & 0xFF; -+ b = (i >> 16) & 0xFF; -+ c = (i >> 8) & 0xFF; -+ d = (i >> 0) & 0xFF; -+ -+ out[0] = a; -+ out[1] = b; -+ out[2] = c; -+ out[3] = d; - } - - /* Set a float to 4 bytes for Modbus with byte and word swap conversion (DCBA) */ - void modbus_set_float_dcba(float f, uint16_t *dest) - { - uint32_t i; -+ uint8_t *out = (uint8_t*) dest; -+ uint8_t a, b, c, d; - - memcpy(&i, &f, sizeof(uint32_t)); -- i = bswap_32(htonl(i)); -- dest[0] = (uint16_t)(i >> 16); -- dest[1] = (uint16_t)i; -+ a = (i >> 24) & 0xFF; -+ b = (i >> 16) & 0xFF; -+ c = (i >> 8) & 0xFF; -+ d = (i >> 0) & 0xFF; -+ -+ out[0] = d; -+ out[1] = c; -+ out[2] = b; -+ out[3] = a; -+ - } - - /* Set a float to 4 bytes for Modbus with byte swap conversion (BADC) */ - void modbus_set_float_badc(float f, uint16_t *dest) - { - uint32_t i; -+ uint8_t *out = (uint8_t*) dest; -+ uint8_t a, b, c, d; - - memcpy(&i, &f, sizeof(uint32_t)); -- i = htonl(i); -- dest[0] = (uint16_t)bswap_16(i >> 16); -- dest[1] = (uint16_t)bswap_16(i & 0xFFFF); -+ a = (i >> 24) & 0xFF; -+ b = (i >> 16) & 0xFF; -+ c = (i >> 8) & 0xFF; -+ d = (i >> 0) & 0xFF; -+ -+ out[0] = b; -+ out[1] = a; -+ out[2] = d; -+ out[3] = c; - } - - /* Set a float to 4 bytes for Modbus with word swap conversion (CDAB) */ - void modbus_set_float_cdab(float f, uint16_t *dest) - { - uint32_t i; -+ uint8_t *out = (uint8_t*) dest; -+ uint8_t a, b, c, d; - - memcpy(&i, &f, sizeof(uint32_t)); -- i = htonl(i); -- dest[0] = (uint16_t)i; -- dest[1] = (uint16_t)(i >> 16); -+ a = (i >> 24) & 0xFF; -+ b = (i >> 16) & 0xFF; -+ c = (i >> 8) & 0xFF; -+ d = (i >> 0) & 0xFF; -+ -+ out[0] = c; -+ out[1] = d; -+ out[2] = a; -+ out[3] = b; - } - - /* DEPRECATED - Set a float to 4 bytes in a sort of Modbus format! */ -diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c -index 3e315f4..3fccf3e 100644 ---- a/tests/unit-test-client.c -+++ b/tests/unit-test-client.c -@@ -27,6 +27,7 @@ int send_crafted_request(modbus_t *ctx, int function, - uint16_t max_value, uint16_t bytes, - int backend_length, int backend_offset); - int equal_dword(uint16_t *tab_reg, const uint32_t value); -+int is_memory_equal(const void *s1, const void *s2, size_t size); - - #define BUG_REPORT(_cond, _format, _args ...) \ - printf("\nLine %d: assertion error for '%s': " _format "\n", __LINE__, # _cond, ## _args) -@@ -40,6 +41,11 @@ int equal_dword(uint16_t *tab_reg, const uint32_t value); - } \ - }; - -+int is_memory_equal(const void *s1, const void *s2, size_t size) -+{ -+ return (memcmp(s1, s2, size) == 0); -+} -+ - int equal_dword(uint16_t *tab_reg, const uint32_t value) { - return ((tab_reg[0] == (value >> 16)) && (tab_reg[1] == (value & 0xFFFF))); - } -@@ -286,26 +292,26 @@ int main(int argc, char *argv[]) - /** FLOAT **/ - printf("1/4 Set/get float ABCD: "); - modbus_set_float_abcd(UT_REAL, tab_rp_registers); -- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_ABCD), "FAILED Set float ABCD"); -- real = modbus_get_float_abcd(tab_rp_registers); -+ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_ABCD_SET, 4), "FAILED Set float ABCD"); -+ real = modbus_get_float_abcd(UT_IREAL_ABCD_GET); - ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); - - printf("2/4 Set/get float DCBA: "); - modbus_set_float_dcba(UT_REAL, tab_rp_registers); -- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_DCBA), "FAILED Set float DCBA"); -- real = modbus_get_float_dcba(tab_rp_registers); -+ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_DCBA_SET, 4), "FAILED Set float DCBA"); -+ real = modbus_get_float_dcba(UT_IREAL_DCBA_GET); - ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); - - printf("3/4 Set/get float BADC: "); - modbus_set_float_badc(UT_REAL, tab_rp_registers); -- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_BADC), "FAILED Set float BADC"); -- real = modbus_get_float_badc(tab_rp_registers); -+ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_BADC_SET, 4), "FAILED Set float BADC"); -+ real = modbus_get_float_badc(UT_IREAL_BADC_GET); - ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); - - printf("4/4 Set/get float CDAB: "); - modbus_set_float_cdab(UT_REAL, tab_rp_registers); -- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_CDAB), "FAILED Set float CDAB"); -- real = modbus_get_float_cdab(tab_rp_registers); -+ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_CDAB_SET, 4), "FAILED Set float CDAB"); -+ real = modbus_get_float_cdab(UT_IREAL_CDAB_GET); - ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); - - printf("\nAt this point, error messages doesn't mean the test has failed\n"); -diff --git a/tests/unit-test.h.in b/tests/unit-test.h.in -index dca826f..4ffa254 100644 ---- a/tests/unit-test.h.in -+++ b/tests/unit-test.h.in -@@ -56,12 +56,45 @@ const uint16_t UT_INPUT_REGISTERS_ADDRESS = 0x108; - const uint16_t UT_INPUT_REGISTERS_NB = 0x1; - const uint16_t UT_INPUT_REGISTERS_TAB[] = { 0x000A }; - -+/* -+ * This float value is 0x47F12000 (in big-endian format). -+ * In Little-endian(intel) format, it will be stored in memory as follows: -+ * 0x00 0x20 0xF1 0x47 -+ * -+ * You can check this with the following code: -+ -+ float fl = UT_REAL; -+ uint8_t *inmem = (uint8_t*)&fl; -+ int x; -+ for(x = 0; x < 4; x++){ -+ printf("0x%02X ", inmem[ x ]); -+ } -+ printf("\n"); -+ */ - const float UT_REAL = 123456.00; - --const uint32_t UT_IREAL_ABCD = 0x0020F147; --const uint32_t UT_IREAL_DCBA = 0x47F12000; --const uint32_t UT_IREAL_BADC = 0x200047F1; --const uint32_t UT_IREAL_CDAB = 0xF1470020; -+/* -+ * The following arrays assume that 'A' is the MSB, -+ * and 'D' is the LSB. -+ * Thus, the following is the case: -+ * A = 0x47 -+ * B = 0xF1 -+ * C = 0x20 -+ * D = 0x00 -+ * -+ * There are two sets of arrays: one to test that the setting is correct, -+ * the other to test that the getting is correct. -+ * Note that the 'get' values must be constants in processor-endianness, -+ * as libmodbus will convert all words to processor-endianness as they come in. -+ */ -+const uint8_t UT_IREAL_ABCD_SET[] = {0x47, 0xF1, 0x20, 0x00}; -+const uint16_t UT_IREAL_ABCD_GET[] = {0x47F1, 0x2000}; -+const uint8_t UT_IREAL_DCBA_SET[] = {0x00, 0x20, 0xF1, 0x47}; -+const uint16_t UT_IREAL_DCBA_GET[] = {0x0020, 0xF147}; -+const uint8_t UT_IREAL_BADC_SET[] = {0xF1, 0x47, 0x00, 0x20}; -+const uint16_t UT_IREAL_BADC_GET[] = {0xF147, 0x0020}; -+const uint8_t UT_IREAL_CDAB_SET[] = {0x20, 0x00, 0x47, 0xF1}; -+const uint16_t UT_IREAL_CDAB_GET[] = {0x2000, 0x47F1}; - - /* const uint32_t UT_IREAL_ABCD = 0x47F12000); - const uint32_t UT_IREAL_DCBA = 0x0020F147; diff --git a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.0.6.bb b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.0.6.bb deleted file mode 100644 index b4d32fb2c7..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.0.6.bb +++ /dev/null @@ -1,4 +0,0 @@ -require libmodbus.inc - -SRC_URI[md5sum] = "c80f88b6ca19cabc4ceffc195ca07771" -SRC_URI[sha256sum] = "046d63f10f755e2160dc56ef681e5f5ad3862a57c1955fd82e0ce036b69471b6" diff --git a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb new file mode 100644 index 0000000000..9e17f91669 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb @@ -0,0 +1,17 @@ +SUMMARY = "A Modbus library for Linux, Mac OS, FreeBSD and Windows" +DESCRIPTION = "libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection." +HOMEPAGE = "http://www.libmodbus.org/" +SECTION = "libs" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/stephane/libmodbus;branch=master;protocol=https" +SRCREV = "2cbafa3113e276c3697d297f68e88d112b53174d" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[test] = "--enable-tests,--disable-tests,," diff --git a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.7.bb b/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.7.bb deleted file mode 100644 index 6c0e315d79..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.7.bb +++ /dev/null @@ -1,9 +0,0 @@ -require libmodbus.inc - -SRC_URI += "file://Fix-float-endianness-issue-on-big-endian-arch.patch" -SRC_URI[sha256sum] = "7dfe958431d0570b271e1a5b329b76a658e89c614cf119eb5aadb725c87f8fbd" - -# this file has been created one minute after the configure file, so it doesn't get recreated during configure step -do_configure:prepend() { - rm -rf ${S}/tests/unit-test.h -} diff --git a/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch deleted file mode 100644 index 2cbdd6c74c..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch +++ /dev/null @@ -1,72 +0,0 @@ -Do not use fgetpwent_r - -fgetpwent_r does not exist on musl - -Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- a/src/pam_pwquality.c -+++ b/src/pam_pwquality.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include "pwquality.h" - - /* -@@ -43,8 +44,6 @@ struct module_options { - - #define CO_RETRY_TIMES 1 - --#define PATH_PASSWD "/etc/passwd" -- - static int - _pam_parse (pam_handle_t *pamh, struct module_options *opt, - int argc, const char **argv) -@@ -98,44 +97,7 @@ static int - check_local_user (pam_handle_t *pamh, - const char *user) - { -- struct passwd pw, *pwp; -- char buf[4096]; -- int found = 0; -- FILE *fp; -- int errn; -- -- fp = fopen(PATH_PASSWD, "r"); -- if (fp == NULL) { -- pam_syslog(pamh, LOG_ERR, "unable to open %s: %s", -- PATH_PASSWD, pam_strerror(pamh, errno)); -- return -1; -- } -- -- for (;;) { -- errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp); -- if (errn == ERANGE) { -- pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?", -- PATH_PASSWD); -- /* we can continue here as next call will read further */ -- continue; -- } -- if (errn != 0) -- break; -- if (strcmp(pwp->pw_name, user) == 0) { -- found = 1; -- break; -- } -- } -- -- fclose (fp); -- -- if (errn != 0 && errn != ENOENT) { -- pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s", -- pam_strerror(pamh, errn)); -- return -1; -- } else { -- return found; -- } -+ return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS; - } - - PAM_EXTERN int diff --git a/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb b/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb deleted file mode 100644 index b50c0f7de7..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "Library for password quality checking and generating random passwords" -HOMEPAGE = "https://github.com/libpwquality/libpwquality" -SECTION = "devel/lib" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" - -SRCNAME = "libpwquality" -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \ - file://add-missing-python-include-dir-for-cross.patch \ -" -SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch " - -SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3" -SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545" - -UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -DEPENDS = "cracklib virtual/gettext" - -inherit autotools setuptools3-base gettext - -B = "${S}" - -export PYTHON_DIR -export BUILD_SYS -export HOST_SYS - -EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ - --with-python-binary=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \ - --with-pythonsitedir=${PYTHON_SITEPACKAGES_DIR} \ - --libdir=${libdir} \ - --with-securedir=${base_libdir}/security \ -" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" -PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" - -FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" -FILES:${PN}-dbg += "${base_libdir}/security/.debug" -FILES:${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" -FILES:${PN}-dev += "${base_libdir}/security/pam_pwquality.la" diff --git a/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb b/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb new file mode 100644 index 0000000000..5287430c41 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Library for password quality checking and generating random passwords" +HOMEPAGE = "https://github.com/libpwquality/libpwquality" +SECTION = "devel/lib" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" + +DEPENDS = "cracklib" + +SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \ + file://add-missing-python-include-dir-for-cross.patch \ +" +SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep gettext setuptools3-base + +do_configure:prepend() { + cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/ +} + +export PYTHON_DIR +export BUILD_SYS +export HOST_SYS + +EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ + --with-python-binary=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \ + --with-pythonsitedir=${PYTHON_SITEPACKAGES_DIR} \ + --libdir=${libdir} \ + --with-securedir=${base_libdir}/security \ +" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" +PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" + +FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" +FILES:${PN}-dbg += "${base_libdir}/security/.debug" +FILES:${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" +FILES:${PN}-dev += "${base_libdir}/security/pam_pwquality.la" diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0001-src-Do-not-reset-FINAL_LIBS.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0001-src-Do-not-reset-FINAL_LIBS.patch deleted file mode 100644 index e8d8b1d53f..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0001-src-Do-not-reset-FINAL_LIBS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e97a572d4aef099a961e43d528c0268e10d9f1e2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 10 Sep 2019 20:04:26 -0700 -Subject: [PATCH] src: Do not reset FINAL_LIBS - -This helps case where additional libraries are needed to be passed from -environment to get it going - -e.g. -latomic is needed on clang/x86 to provide for 64bit atomics - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index ddabd44..5133884 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -118,7 +118,7 @@ endif - - FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) - FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) --FINAL_LIBS=-lm -+FINAL_LIBS+=-lm - DEBUG=-g -ggdb - - # Linux ARM32 needs -latomic at linking time diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0006-Define-correct-gregs-for-RISCV32.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0006-Define-correct-gregs-for-RISCV32.patch deleted file mode 100644 index 385b0aeed0..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/0006-Define-correct-gregs-for-RISCV32.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b6b2c652abfa98093401b232baca8719c50cadf4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 26 Oct 2020 21:32:22 -0700 -Subject: [PATCH] Define correct gregs for RISCV32 - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Updated patch for 6.2.8 -Signed-off-by: Changqing Li ---- - src/debug.c | 26 ++++++++++++++++++++++++-- - 1 file changed, 24 insertions(+), 2 deletions(-) - -diff --git a/src/debug.c b/src/debug.c -index ebda858..90bc450 100644 ---- a/src/debug.c -+++ b/src/debug.c -@@ -1168,7 +1168,9 @@ static void* getAndSetMcontextEip(ucontext_t *uc, void *eip) { - #endif - #elif defined(__linux__) - /* Linux */ -- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) -+ #if defined(__riscv) && __riscv_xlen == 32 -+ return (void*) uc->uc_mcontext.__gregs[REG_PC]; -+ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) - GET_SET_RETURN(uc->uc_mcontext.gregs[14], eip); - #elif defined(__X86_64__) || defined(__x86_64__) - GET_SET_RETURN(uc->uc_mcontext.gregs[16], eip); -@@ -1350,8 +1352,28 @@ void logRegisters(ucontext_t *uc) { - #endif - /* Linux */ - #elif defined(__linux__) -+ /* Linux RISCV32 */ -+ #if defined(__riscv) && __riscv_xlen == 32 -+ serverLog(LL_WARNING, -+ "\n" -+ "RA:%08lx S0:%08lx S1:%08lx S2:%08lx\n" -+ "SP:%08lx PC:%08lx A0:%08lx A1:%08lx\n" -+ "A2 :%08lx A3:%08lx A4:%08lx", -+ (unsigned long) uc->uc_mcontext.__gregs[REG_RA], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_S0], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_S1], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_S2], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_SP], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_PC], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 0], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 1], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 2], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 3], -+ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 4] -+ ); -+ logStackContent((void**)uc->uc_mcontext.__gregs[REG_SP]); - /* Linux x86 */ -- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) -+ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) - serverLog(LL_WARNING, - "\n" - "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" --- -2.25.1 - diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/GNU_SOURCE-7.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/GNU_SOURCE-7.patch deleted file mode 100644 index 6e07c25c6a..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/GNU_SOURCE-7.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a22512ac1cbd6de1f5646219722e49752d1f60ac Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 21 Dec 2019 12:09:51 -0800 -Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER - -Fixes -| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) -| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; -| | ^~~~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- - src/zmalloc.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/zmalloc.c b/src/zmalloc.c -index ba03685..322304f 100644 ---- a/src/zmalloc.c -+++ b/src/zmalloc.c -@@ -32,6 +32,7 @@ - #include "config.h" - #include "solarisfixes.h" - -+#define _GNU_SOURCE - #include - #include - #include diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/hiredis-use-default-CC-if-it-is-set.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/hiredis-use-default-CC-if-it-is-set.patch deleted file mode 100644 index 7785acca5c..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/hiredis-use-default-CC-if-it-is-set.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 41efa2f0cf08c91ff935bbb2d16ab233df7f5811 Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Fri, 8 Feb 2013 17:39:52 -0600 -Subject: [PATCH] hiredis: use default CC if it is set -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Instead of trying to automagically figure out CC, which breaks with OE -as CC has spaces in it, just skip it if one was already passed in. - -Signed-off-by: Venture Research - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis - -Reworked for 6.0.4 -Signed-off-by: Andreas Müller - ---- -Upstream-Status: Pending - - deps/hiredis/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile -index bd2106b..9ce768d 100644 ---- a/deps/hiredis/Makefile -+++ b/deps/hiredis/Makefile -@@ -36,8 +36,6 @@ endef - export REDIS_TEST_CONFIG - - # Fallback to gcc when $CC is not in $PATH. --CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') --CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') - OPTIMIZATION?=-O3 - WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers - DEBUG_FLAGS?= -g -ggdb diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server deleted file mode 100755 index c5f335f57d..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -### BEGIN INIT INFO -# Provides: redis-server -# Required-Start: $network -# Required-Stop: $network -# Default-Start: S 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Redis, a key-value store -# Description: Redis is an open source, advanced key-value store. -# http://redis.io -### END INIT INFO - -test -f /usr/bin/redis-server || exit 0 - -ARGS="/etc/redis/redis.conf" - -case "$1" in - start) - echo "Starting redis-server..." - start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS - ;; - stop) - echo "Stopping redis-server..." - start-stop-daemon --stop --quiet --exec /usr/bin/redis-server - ;; - restart) - echo "Stopping redis-server..." - start-stop-daemon --stop --quiet --exec /usr/bin/redis-server - - # Since busybox implementation ignores --retry arguments repeatedly check - # if the process is still running and try another signal after a timeout, - # efectively simulating a stop with --retry=TERM/5/KILL/5 schedule. - waitAfterTerm=5000000 # us / 5000 ms / 5 s - waitAfterKill=5000000 # us / 5000 ms / 5 s - waitStep=100000 # us / 100 ms / 0.1 s - waited=0 - start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server - processOff=$? - while [ $processOff -eq 0 ] && [ $waited -le $waitAfterTerm ] ; do - usleep ${waitStep} - ((waited+=${waitStep})) - start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server - processOff=$? - done - if [ $processOff -eq 0 ] ; then - start-stop-daemon --stop --signal KILL --exec /usr/bin/redis-server - start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server - processOff=$? - fi - waited=0 - while [ $processOff -eq 0 ] && [ $waited -le $waitAfterKill ] ; do - usleep ${waitStep} - ((waited+=${waitStep})) - start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server - processOff=$? - done - # Here $processOff will indicate if waiting and retrying according to - # the schedule ended in a successfull stop or not. - - echo "Starting redis-server..." - start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS - ;; - *) - echo "Usage: /etc/init.d/redis-server {start|stop|restart}" - exit 1 - ;; -esac - -exit 0 - diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/lua-update-Makefile-to-use-environment-build-setting.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/lua-update-Makefile-to-use-environment-build-setting.patch deleted file mode 100644 index bff07535de..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/lua-update-Makefile-to-use-environment-build-setting.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 734ab2f7879c6f94fc18ea6a10adb9bd156ba769 Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Fri, 8 Feb 2013 20:22:19 -0600 -Subject: [PATCH] lua: update Makefile to use environment build settings - -OE-specific parameters, instead of overriding all of these simply use -the ones that are already passed in. Also configure for only Linux... - -Signed-off-by: Venture Research - -Updated to work with 3.0.x - -Signed-off-by: Armin Kuster - -updated to work wtih 6.2.1 -Signed-off-by: Yi Fan Yu - ---- -Upstream-Status: Pending - - deps/Makefile | 1 - - deps/lua/Makefile | 1 - - deps/lua/src/Makefile | 16 ++++++---------- - 3 files changed, 6 insertions(+), 12 deletions(-) - -diff --git a/deps/Makefile b/deps/Makefile -index 8592e17..1807af5 100644 ---- a/deps/Makefile -+++ b/deps/Makefile -@@ -81,7 +81,6 @@ endif - # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more - # challenging to cross-compile lua (and redis). These defines make it easier - # to fit redis into cross-compilation environments, which typically set AR. --AR=ar - ARFLAGS=rc - - lua: .make-prerequisites -diff --git a/deps/lua/Makefile b/deps/lua/Makefile -index 209a132..72f4b2b 100644 ---- a/deps/lua/Makefile -+++ b/deps/lua/Makefile -@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644 - - # Utilities. - MKDIR= mkdir -p --RANLIB= ranlib - - # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= - -diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile -index f3bba2f..1555ec0 100644 ---- a/deps/lua/src/Makefile -+++ b/deps/lua/src/Makefile -@@ -5,18 +5,14 @@ - # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= - - # Your platform. See PLATS for possible values. --PLAT= none -+PLAT= linux - --CC?= gcc --CFLAGS= -O2 -Wall $(MYCFLAGS) --AR= ar rcu --RANLIB= ranlib --RM= rm -f --LIBS= -lm $(MYLIBS) -- --MYCFLAGS= -+MYCFLAGS=-DLUA_USE_LINUX - MYLDFLAGS= --MYLIBS= -+MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses -+ -+CFLAGS += $(MYCFLAGS) -+LIBS += -lm $(MYLIBS) - - # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= - diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/oe-use-libc-malloc.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/oe-use-libc-malloc.patch deleted file mode 100644 index 7b601e02a9..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/oe-use-libc-malloc.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 38a5f403b033d03cdac3ff814687d83f61527d8e Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Wed, 6 Feb 2013 20:51:02 -0600 -Subject: [PATCH] hack to force use of libc malloc - -Hack to force libc usage as it seems the option to pass it in has been -removed in favor of magic. - -Note that this of course doesn't allow tcmalloc and jemalloc, however -jemalloc wasn't building correctly. - -Signed-off-by: Venture Research - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis - ---- -Upstream-Status: Pending - - src/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index ecbd275..39decee 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -13,7 +13,8 @@ - # Just use 'make dep', but this is only needed by developers. - - release_hdr := $(shell sh -c './mkreleasehdr.sh') --uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -+# use fake uname option to force use of generic libc -+uname_S := "USE_LIBC_MALLOC" - uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') - CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1')) - OPTIMIZATION?=-O3 diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.conf b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.conf deleted file mode 100644 index 75037d6dc8..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.conf +++ /dev/null @@ -1,1314 +0,0 @@ -# Redis configuration file example. -# -# Note that in order to read the configuration file, Redis must be -# started with the file path as first argument: -# -# ./redis-server /path/to/redis.conf - -# Note on units: when memory size is needed, it is possible to specify -# it in the usual form of 1k 5GB 4M and so forth: -# -# 1k => 1000 bytes -# 1kb => 1024 bytes -# 1m => 1000000 bytes -# 1mb => 1024*1024 bytes -# 1g => 1000000000 bytes -# 1gb => 1024*1024*1024 bytes -# -# units are case insensitive so 1GB 1Gb 1gB are all the same. - -################################## INCLUDES ################################### - -# Include one or more other config files here. This is useful if you -# have a standard template that goes to all Redis servers but also need -# to customize a few per-server settings. Include files can include -# other files, so use this wisely. -# -# Notice option "include" won't be rewritten by command "CONFIG REWRITE" -# from admin or Redis Sentinel. Since Redis always uses the last processed -# line as value of a configuration directive, you'd better put includes -# at the beginning of this file to avoid overwriting config change at runtime. -# -# If instead you are interested in using includes to override configuration -# options, it is better to use include as the last line. -# -# include /path/to/local.conf -# include /path/to/other.conf - -################################## MODULES ##################################### - -# Load modules at startup. If the server is not able to load modules -# it will abort. It is possible to use multiple loadmodule directives. -# -# loadmodule /path/to/my_module.so -# loadmodule /path/to/other_module.so - -################################## NETWORK ##################################### - -# By default, if no "bind" configuration directive is specified, Redis listens -# for connections from all the network interfaces available on the server. -# It is possible to listen to just one or multiple selected interfaces using -# the "bind" configuration directive, followed by one or more IP addresses. -# -# Examples: -# -# bind 192.168.1.100 10.0.0.1 -# bind 127.0.0.1 ::1 -# -# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the -# internet, binding to all the interfaces is dangerous and will expose the -# instance to everybody on the internet. So by default we uncomment the -# following bind directive, that will force Redis to listen only into -# the IPv4 lookback interface address (this means Redis will be able to -# accept connections only from clients running into the same computer it -# is running). -# -# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES -# JUST COMMENT THE FOLLOWING LINE. -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -bind 127.0.0.1 - -# Protected mode is a layer of security protection, in order to avoid that -# Redis instances left open on the internet are accessed and exploited. -# -# When protected mode is on and if: -# -# 1) The server is not binding explicitly to a set of addresses using the -# "bind" directive. -# 2) No password is configured. -# -# The server only accepts connections from clients connecting from the -# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain -# sockets. -# -# By default protected mode is enabled. You should disable it only if -# you are sure you want clients from other hosts to connect to Redis -# even if no authentication is configured, nor a specific set of interfaces -# are explicitly listed using the "bind" directive. -protected-mode yes - -# Accept connections on the specified port, default is 6379 (IANA #815344). -# If port 0 is specified Redis will not listen on a TCP socket. -port 6379 - -# TCP listen() backlog. -# -# In high requests-per-second environments you need an high backlog in order -# to avoid slow clients connections issues. Note that the Linux kernel -# will silently truncate it to the value of /proc/sys/net/core/somaxconn so -# make sure to raise both the value of somaxconn and tcp_max_syn_backlog -# in order to get the desired effect. -tcp-backlog 511 - -# Unix socket. -# -# Specify the path for the Unix socket that will be used to listen for -# incoming connections. There is no default, so Redis will not listen -# on a unix socket when not specified. -# -# unixsocket /tmp/redis.sock -# unixsocketperm 700 - -# Close the connection after a client is idle for N seconds (0 to disable) -timeout 0 - -# TCP keepalive. -# -# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence -# of communication. This is useful for two reasons: -# -# 1) Detect dead peers. -# 2) Take the connection alive from the point of view of network -# equipment in the middle. -# -# On Linux, the specified value (in seconds) is the period used to send ACKs. -# Note that to close the connection the double of the time is needed. -# On other kernels the period depends on the kernel configuration. -# -# A reasonable value for this option is 300 seconds, which is the new -# Redis default starting with Redis 3.2.1. -tcp-keepalive 300 - -################################# GENERAL ##################################### - -# OE: run as a daemon. -daemonize yes - -# If you run Redis from upstart or systemd, Redis can interact with your -# supervision tree. Options: -# supervised no - no supervision interaction -# supervised upstart - signal upstart by putting Redis into SIGSTOP mode -# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET -# supervised auto - detect upstart or systemd method based on -# UPSTART_JOB or NOTIFY_SOCKET environment variables -# Note: these supervision methods only signal "process is ready." -# They do not enable continuous liveness pings back to your supervisor. -supervised no - -# If a pid file is specified, Redis writes it where specified at startup -# and removes it at exit. -# -# When the server runs non daemonized, no pid file is created if none is -# specified in the configuration. When the server is daemonized, the pid file -# is used even if not specified, defaulting to "/var/run/redis.pid". -# -# Creating a pid file is best effort: if Redis is not able to create it -# nothing bad happens, the server will start and run normally. - -# When running daemonized, Redis writes a pid file in /var/run/redis.pid by -# default. You can specify a custom pid file location here. -pidfile /var/run/redis.pid - -# Specify the server verbosity level. -# This can be one of: -# debug (a lot of information, useful for development/testing) -# verbose (many rarely useful info, but not a mess like the debug level) -# notice (moderately verbose, what you want in production probably) -# warning (only very important / critical messages are logged) -loglevel notice - -# Specify the log file name. Also the empty string can be used to force -# Redis to log on the standard output. Note that if you use standard -# output for logging but daemonize, logs will be sent to /dev/null -logfile "" - -# To enable logging to the system logger, just set 'syslog-enabled' to yes, -# and optionally update the other syslog parameters to suit your needs. -syslog-enabled yes - -# Specify the syslog identity. -syslog-ident redis - -# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. -# syslog-facility local0 - -# Set the number of databases. The default database is DB 0, you can select -# a different one on a per-connection basis using SELECT where -# dbid is a number between 0 and 'databases'-1 -databases 16 - -# By default Redis shows an ASCII art logo only when started to log to the -# standard output and if the standard output is a TTY. Basically this means -# that normally a logo is displayed only in interactive sessions. -# -# However it is possible to force the pre-4.0 behavior and always show a -# ASCII art logo in startup logs by setting the following option to yes. -always-show-logo yes - -################################ SNAPSHOTTING ################################ -# -# Save the DB on disk: -# -# save -# -# Will save the DB if both the given number of seconds and the given -# number of write operations against the DB occurred. -# -# In the example below the behaviour will be to save: -# after 900 sec (15 min) if at least 1 key changed -# after 300 sec (5 min) if at least 10 keys changed -# after 60 sec if at least 10000 keys changed -# -# Note: you can disable saving completely by commenting out all "save" lines. -# -# It is also possible to remove all the previously configured save -# points by adding a save directive with a single empty string argument -# like in the following example: -# -# save "" - -#save 900 1 -#save 300 10 -#save 60 10000 - -# OE: tune for a small embedded system with a limited # of keys. -save 120 1 -save 60 100 -save 30 1000 - -# By default Redis will stop accepting writes if RDB snapshots are enabled -# (at least one save point) and the latest background save failed. -# This will make the user aware (in a hard way) that data is not persisting -# on disk properly, otherwise chances are that no one will notice and some -# disaster will happen. -# -# If the background saving process will start working again Redis will -# automatically allow writes again. -# -# However if you have setup your proper monitoring of the Redis server -# and persistence, you may want to disable this feature so that Redis will -# continue to work as usual even if there are problems with disk, -# permissions, and so forth. -stop-writes-on-bgsave-error yes - -# Compress string objects using LZF when dump .rdb databases? -# For default that's set to 'yes' as it's almost always a win. -# If you want to save some CPU in the saving child set it to 'no' but -# the dataset will likely be bigger if you have compressible values or keys. -rdbcompression yes - -# Since version 5 of RDB a CRC64 checksum is placed at the end of the file. -# This makes the format more resistant to corruption but there is a performance -# hit to pay (around 10%) when saving and loading RDB files, so you can disable it -# for maximum performances. -# -# RDB files created with checksum disabled have a checksum of zero that will -# tell the loading code to skip the check. -rdbchecksum yes - -# The filename where to dump the DB -dbfilename dump.rdb - -# The working directory. -# -# The DB will be written inside this directory, with the filename specified -# above using the 'dbfilename' configuration directive. -# -# The Append Only File will also be created inside this directory. -# -# Note that you must specify a directory here, not a file name. -dir /var/lib/redis/ - -################################# REPLICATION ################################# - -# Master-Slave replication. Use slaveof to make a Redis instance a copy of -# another Redis server. A few things to understand ASAP about Redis replication. -# -# 1) Redis replication is asynchronous, but you can configure a master to -# stop accepting writes if it appears to be not connected with at least -# a given number of slaves. -# 2) Redis slaves are able to perform a partial resynchronization with the -# master if the replication link is lost for a relatively small amount of -# time. You may want to configure the replication backlog size (see the next -# sections of this file) with a sensible value depending on your needs. -# 3) Replication is automatic and does not need user intervention. After a -# network partition slaves automatically try to reconnect to masters -# and resynchronize with them. -# -# slaveof - -# If the master is password protected (using the "requirepass" configuration -# directive below) it is possible to tell the slave to authenticate before -# starting the replication synchronization process, otherwise the master will -# refuse the slave request. -# -# masterauth - -# When a slave loses its connection with the master, or when the replication -# is still in progress, the slave can act in two different ways: -# -# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will -# still reply to client requests, possibly with out of date data, or the -# data set may just be empty if this is the first synchronization. -# -# 2) if slave-serve-stale-data is set to 'no' the slave will reply with -# an error "SYNC with master in progress" to all the kind of commands -# but to INFO and SLAVEOF. -# -slave-serve-stale-data yes - -# You can configure a slave instance to accept writes or not. Writing against -# a slave instance may be useful to store some ephemeral data (because data -# written on a slave will be easily deleted after resync with the master) but -# may also cause problems if clients are writing to it because of a -# misconfiguration. -# -# Since Redis 2.6 by default slaves are read-only. -# -# Note: read only slaves are not designed to be exposed to untrusted clients -# on the internet. It's just a protection layer against misuse of the instance. -# Still a read only slave exports by default all the administrative commands -# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve -# security of read only slaves using 'rename-command' to shadow all the -# administrative / dangerous commands. -slave-read-only yes - -# Replication SYNC strategy: disk or socket. -# -# ------------------------------------------------------- -# WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY -# ------------------------------------------------------- -# -# New slaves and reconnecting slaves that are not able to continue the replication -# process just receiving differences, need to do what is called a "full -# synchronization". An RDB file is transmitted from the master to the slaves. -# The transmission can happen in two different ways: -# -# 1) Disk-backed: The Redis master creates a new process that writes the RDB -# file on disk. Later the file is transferred by the parent -# process to the slaves incrementally. -# 2) Diskless: The Redis master creates a new process that directly writes the -# RDB file to slave sockets, without touching the disk at all. -# -# With disk-backed replication, while the RDB file is generated, more slaves -# can be queued and served with the RDB file as soon as the current child producing -# the RDB file finishes its work. With diskless replication instead once -# the transfer starts, new slaves arriving will be queued and a new transfer -# will start when the current one terminates. -# -# When diskless replication is used, the master waits a configurable amount of -# time (in seconds) before starting the transfer in the hope that multiple slaves -# will arrive and the transfer can be parallelized. -# -# With slow disks and fast (large bandwidth) networks, diskless replication -# works better. -repl-diskless-sync no - -# When diskless replication is enabled, it is possible to configure the delay -# the server waits in order to spawn the child that transfers the RDB via socket -# to the slaves. -# -# This is important since once the transfer starts, it is not possible to serve -# new slaves arriving, that will be queued for the next RDB transfer, so the server -# waits a delay in order to let more slaves arrive. -# -# The delay is specified in seconds, and by default is 5 seconds. To disable -# it entirely just set it to 0 seconds and the transfer will start ASAP. -repl-diskless-sync-delay 5 - -# Slaves send PINGs to server in a predefined interval. It's possible to change -# this interval with the repl_ping_slave_period option. The default value is 10 -# seconds. -# -# repl-ping-slave-period 10 - -# The following option sets the replication timeout for: -# -# 1) Bulk transfer I/O during SYNC, from the point of view of slave. -# 2) Master timeout from the point of view of slaves (data, pings). -# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings). -# -# It is important to make sure that this value is greater than the value -# specified for repl-ping-slave-period otherwise a timeout will be detected -# every time there is low traffic between the master and the slave. -# -# repl-timeout 60 - -# Disable TCP_NODELAY on the slave socket after SYNC? -# -# If you select "yes" Redis will use a smaller number of TCP packets and -# less bandwidth to send data to slaves. But this can add a delay for -# the data to appear on the slave side, up to 40 milliseconds with -# Linux kernels using a default configuration. -# -# If you select "no" the delay for data to appear on the slave side will -# be reduced but more bandwidth will be used for replication. -# -# By default we optimize for low latency, but in very high traffic conditions -# or when the master and slaves are many hops away, turning this to "yes" may -# be a good idea. -repl-disable-tcp-nodelay no - -# Set the replication backlog size. The backlog is a buffer that accumulates -# slave data when slaves are disconnected for some time, so that when a slave -# wants to reconnect again, often a full resync is not needed, but a partial -# resync is enough, just passing the portion of data the slave missed while -# disconnected. -# -# The bigger the replication backlog, the longer the time the slave can be -# disconnected and later be able to perform a partial resynchronization. -# -# The backlog is only allocated once there is at least a slave connected. -# -# repl-backlog-size 1mb - -# After a master has no longer connected slaves for some time, the backlog -# will be freed. The following option configures the amount of seconds that -# need to elapse, starting from the time the last slave disconnected, for -# the backlog buffer to be freed. -# -# Note that slaves never free the backlog for timeout, since they may be -# promoted to masters later, and should be able to correctly "partially -# resynchronize" with the slaves: hence they should always accumulate backlog. -# -# A value of 0 means to never release the backlog. -# -# repl-backlog-ttl 3600 - -# The slave priority is an integer number published by Redis in the INFO output. -# It is used by Redis Sentinel in order to select a slave to promote into a -# master if the master is no longer working correctly. -# -# A slave with a low priority number is considered better for promotion, so -# for instance if there are three slaves with priority 10, 100, 25 Sentinel will -# pick the one with priority 10, that is the lowest. -# -# However a special priority of 0 marks the slave as not able to perform the -# role of master, so a slave with priority of 0 will never be selected by -# Redis Sentinel for promotion. -# -# By default the priority is 100. -slave-priority 100 - -# It is possible for a master to stop accepting writes if there are less than -# N slaves connected, having a lag less or equal than M seconds. -# -# The N slaves need to be in "online" state. -# -# The lag in seconds, that must be <= the specified value, is calculated from -# the last ping received from the slave, that is usually sent every second. -# -# This option does not GUARANTEE that N replicas will accept the write, but -# will limit the window of exposure for lost writes in case not enough slaves -# are available, to the specified number of seconds. -# -# For example to require at least 3 slaves with a lag <= 10 seconds use: -# -# min-slaves-to-write 3 -# min-slaves-max-lag 10 -# -# Setting one or the other to 0 disables the feature. -# -# By default min-slaves-to-write is set to 0 (feature disabled) and -# min-slaves-max-lag is set to 10. - -# A Redis master is able to list the address and port of the attached -# slaves in different ways. For example the "INFO replication" section -# offers this information, which is used, among other tools, by -# Redis Sentinel in order to discover slave instances. -# Another place where this info is available is in the output of the -# "ROLE" command of a master. -# -# The listed IP and address normally reported by a slave is obtained -# in the following way: -# -# IP: The address is auto detected by checking the peer address -# of the socket used by the slave to connect with the master. -# -# Port: The port is communicated by the slave during the replication -# handshake, and is normally the port that the slave is using to -# list for connections. -# -# However when port forwarding or Network Address Translation (NAT) is -# used, the slave may be actually reachable via different IP and port -# pairs. The following two options can be used by a slave in order to -# report to its master a specific set of IP and port, so that both INFO -# and ROLE will report those values. -# -# There is no need to use both the options if you need to override just -# the port or the IP address. -# -# slave-announce-ip 5.5.5.5 -# slave-announce-port 1234 - -################################## SECURITY ################################### - -# Require clients to issue AUTH before processing any other -# commands. This might be useful in environments in which you do not trust -# others with access to the host running redis-server. -# -# This should stay commented out for backward compatibility and because most -# people do not need auth (e.g. they run their own servers). -# -# Warning: since Redis is pretty fast an outside user can try up to -# 150k passwords per second against a good box. This means that you should -# use a very strong password otherwise it will be very easy to break. -# -# requirepass foobared - -# Command renaming. -# -# It is possible to change the name of dangerous commands in a shared -# environment. For instance the CONFIG command may be renamed into something -# hard to guess so that it will still be available for internal-use tools -# but not available for general clients. -# -# Example: -# -# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 -# -# It is also possible to completely kill a command by renaming it into -# an empty string: -# -# rename-command CONFIG "" -# -# Please note that changing the name of commands that are logged into the -# AOF file or transmitted to slaves may cause problems. - -################################### CLIENTS #################################### - -# Set the max number of connected clients at the same time. By default -# this limit is set to 10000 clients, however if the Redis server is not -# able to configure the process file limit to allow for the specified limit -# the max number of allowed clients is set to the current file limit -# minus 32 (as Redis reserves a few file descriptors for internal uses). -# -# Once the limit is reached Redis will close all the new connections sending -# an error 'max number of clients reached'. -# -# maxclients 10000 - -############################## MEMORY MANAGEMENT ################################ - -# Set a memory usage limit to the specified amount of bytes. -# When the memory limit is reached Redis will try to remove keys -# according to the eviction policy selected (see maxmemory-policy). -# -# If Redis can't remove keys according to the policy, or if the policy is -# set to 'noeviction', Redis will start to reply with errors to commands -# that would use more memory, like SET, LPUSH, and so on, and will continue -# to reply to read-only commands like GET. -# -# This option is usually useful when using Redis as an LRU or LFU cache, or to -# set a hard memory limit for an instance (using the 'noeviction' policy). -# -# WARNING: If you have slaves attached to an instance with maxmemory on, -# the size of the output buffers needed to feed the slaves are subtracted -# from the used memory count, so that network problems / resyncs will -# not trigger a loop where keys are evicted, and in turn the output -# buffer of slaves is full with DELs of keys evicted triggering the deletion -# of more keys, and so forth until the database is completely emptied. -# -# In short... if you have slaves attached it is suggested that you set a lower -# limit for maxmemory so that there is some free RAM on the system for slave -# output buffers (but this is not needed if the policy is 'noeviction'). -# -# maxmemory - -# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory -# is reached. You can select among five behaviors: -# -# volatile-lru -> Evict using approximated LRU among the keys with an expire set. -# allkeys-lru -> Evict any key using approximated LRU. -# volatile-lfu -> Evict using approximated LFU among the keys with an expire set. -# allkeys-lfu -> Evict any key using approximated LFU. -# volatile-random -> Remove a random key among the ones with an expire set. -# allkeys-random -> Remove a random key, any key. -# volatile-ttl -> Remove the key with the nearest expire time (minor TTL) -# noeviction -> Don't evict anything, just return an error on write operations. -# -# LRU means Least Recently Used -# LFU means Least Frequently Used -# -# Both LRU, LFU and volatile-ttl are implemented using approximated -# randomized algorithms. -# -# Note: with any of the above policies, Redis will return an error on write -# operations, when there are no suitable keys for eviction. -# -# At the date of writing these commands are: set setnx setex append -# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd -# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby -# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby -# getset mset msetnx exec sort -# -# The default is: -# -# maxmemory-policy noeviction - -# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated -# algorithms (in order to save memory), so you can tune it for speed or -# accuracy. For default Redis will check five keys and pick the one that was -# used less recently, you can change the sample size using the following -# configuration directive. -# -# The default of 5 produces good enough results. 10 Approximates very closely -# true LRU but costs more CPU. 3 is faster but not very accurate. -# -# maxmemory-samples 5 - -############################# LAZY FREEING #################################### - -# Redis has two primitives to delete keys. One is called DEL and is a blocking -# deletion of the object. It means that the server stops processing new commands -# in order to reclaim all the memory associated with an object in a synchronous -# way. If the key deleted is associated with a small object, the time needed -# in order to execute the DEL command is very small and comparable to most other -# O(1) or O(log_N) commands in Redis. However if the key is associated with an -# aggregated value containing millions of elements, the server can block for -# a long time (even seconds) in order to complete the operation. -# -# For the above reasons Redis also offers non blocking deletion primitives -# such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and -# FLUSHDB commands, in order to reclaim memory in background. Those commands -# are executed in constant time. Another thread will incrementally free the -# object in the background as fast as possible. -# -# DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled. -# It's up to the design of the application to understand when it is a good -# idea to use one or the other. However the Redis server sometimes has to -# delete keys or flush the whole database as a side effect of other operations. -# Specifically Redis deletes objects independently of a user call in the -# following scenarios: -# -# 1) On eviction, because of the maxmemory and maxmemory policy configurations, -# in order to make room for new data, without going over the specified -# memory limit. -# 2) Because of expire: when a key with an associated time to live (see the -# EXPIRE command) must be deleted from memory. -# 3) Because of a side effect of a command that stores data on a key that may -# already exist. For example the RENAME command may delete the old key -# content when it is replaced with another one. Similarly SUNIONSTORE -# or SORT with STORE option may delete existing keys. The SET command -# itself removes any old content of the specified key in order to replace -# it with the specified string. -# 4) During replication, when a slave performs a full resynchronization with -# its master, the content of the whole database is removed in order to -# load the RDB file just transfered. -# -# In all the above cases the default is to delete objects in a blocking way, -# like if DEL was called. However you can configure each case specifically -# in order to instead release memory in a non-blocking way like if UNLINK -# was called, using the following configuration directives: - -lazyfree-lazy-eviction no -lazyfree-lazy-expire no -lazyfree-lazy-server-del no -slave-lazy-flush no - -############################## APPEND ONLY MODE ############################### - -# By default Redis asynchronously dumps the dataset on disk. This mode is -# good enough in many applications, but an issue with the Redis process or -# a power outage may result into a few minutes of writes lost (depending on -# the configured save points). -# -# The Append Only File is an alternative persistence mode that provides -# much better durability. For instance using the default data fsync policy -# (see later in the config file) Redis can lose just one second of writes in a -# dramatic event like a server power outage, or a single write if something -# wrong with the Redis process itself happens, but the operating system is -# still running correctly. -# -# AOF and RDB persistence can be enabled at the same time without problems. -# If the AOF is enabled on startup Redis will load the AOF, that is the file -# with the better durability guarantees. -# -# Please check http://redis.io/topics/persistence for more information. - -# OE: changed default to enable this -appendonly yes - -# The name of the append only file (default: "appendonly.aof") - -appendfilename "appendonly.aof" - -# The fsync() call tells the Operating System to actually write data on disk -# instead of waiting for more data in the output buffer. Some OS will really flush -# data on disk, some other OS will just try to do it ASAP. -# -# Redis supports three different modes: -# -# no: don't fsync, just let the OS flush the data when it wants. Faster. -# always: fsync after every write to the append only log. Slow, Safest. -# everysec: fsync only one time every second. Compromise. -# -# The default is "everysec", as that's usually the right compromise between -# speed and data safety. It's up to you to understand if you can relax this to -# "no" that will let the operating system flush the output buffer when -# it wants, for better performances (but if you can live with the idea of -# some data loss consider the default persistence mode that's snapshotting), -# or on the contrary, use "always" that's very slow but a bit safer than -# everysec. -# -# More details please check the following article: -# http://antirez.com/post/redis-persistence-demystified.html -# -# If unsure, use "everysec". - -# appendfsync always -appendfsync everysec -# appendfsync no - -# When the AOF fsync policy is set to always or everysec, and a background -# saving process (a background save or AOF log background rewriting) is -# performing a lot of I/O against the disk, in some Linux configurations -# Redis may block too long on the fsync() call. Note that there is no fix for -# this currently, as even performing fsync in a different thread will block -# our synchronous write(2) call. -# -# In order to mitigate this problem it's possible to use the following option -# that will prevent fsync() from being called in the main process while a -# BGSAVE or BGREWRITEAOF is in progress. -# -# This means that while another child is saving, the durability of Redis is -# the same as "appendfsync none". In practical terms, this means that it is -# possible to lose up to 30 seconds of log in the worst scenario (with the -# default Linux settings). -# -# If you have latency problems turn this to "yes". Otherwise leave it as -# "no" that is the safest pick from the point of view of durability. - -no-appendfsync-on-rewrite no - -# Automatic rewrite of the append only file. -# Redis is able to automatically rewrite the log file implicitly calling -# BGREWRITEAOF when the AOF log size grows by the specified percentage. -# -# This is how it works: Redis remembers the size of the AOF file after the -# latest rewrite (if no rewrite has happened since the restart, the size of -# the AOF at startup is used). -# -# This base size is compared to the current size. If the current size is -# bigger than the specified percentage, the rewrite is triggered. Also -# you need to specify a minimal size for the AOF file to be rewritten, this -# is useful to avoid rewriting the AOF file even if the percentage increase -# is reached but it is still pretty small. -# -# Specify a percentage of zero in order to disable the automatic AOF -# rewrite feature. - -auto-aof-rewrite-percentage 100 -auto-aof-rewrite-min-size 64mb - -# An AOF file may be found to be truncated at the end during the Redis -# startup process, when the AOF data gets loaded back into memory. -# This may happen when the system where Redis is running -# crashes, especially when an ext4 filesystem is mounted without the -# data=ordered option (however this can't happen when Redis itself -# crashes or aborts but the operating system still works correctly). -# -# Redis can either exit with an error when this happens, or load as much -# data as possible (the default now) and start if the AOF file is found -# to be truncated at the end. The following option controls this behavior. -# -# If aof-load-truncated is set to yes, a truncated AOF file is loaded and -# the Redis server starts emitting a log to inform the user of the event. -# Otherwise if the option is set to no, the server aborts with an error -# and refuses to start. When the option is set to no, the user requires -# to fix the AOF file using the "redis-check-aof" utility before to restart -# the server. -# -# Note that if the AOF file will be found to be corrupted in the middle -# the server will still exit with an error. This option only applies when -# Redis will try to read more data from the AOF file but not enough bytes -# will be found. -aof-load-truncated yes - -# When rewriting the AOF file, Redis is able to use an RDB preamble in the -# AOF file for faster rewrites and recoveries. When this option is turned -# on the rewritten AOF file is composed of two different stanzas: -# -# [RDB file][AOF tail] -# -# When loading Redis recognizes that the AOF file starts with the "REDIS" -# string and loads the prefixed RDB file, and continues loading the AOF -# tail. -# -# This is currently turned off by default in order to avoid the surprise -# of a format change, but will at some point be used as the default. -aof-use-rdb-preamble no - -################################ LUA SCRIPTING ############################### - -# Max execution time of a Lua script in milliseconds. -# -# If the maximum execution time is reached Redis will log that a script is -# still in execution after the maximum allowed time and will start to -# reply to queries with an error. -# -# When a long running script exceeds the maximum execution time only the -# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be -# used to stop a script that did not yet called write commands. The second -# is the only way to shut down the server in the case a write command was -# already issued by the script but the user doesn't want to wait for the natural -# termination of the script. -# -# Set it to 0 or a negative value for unlimited execution without warnings. -lua-time-limit 5000 - -################################ REDIS CLUSTER ############################### -# -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however -# in order to mark it as "mature" we need to wait for a non trivial percentage -# of users to deploy it in production. -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# -# Normal Redis instances can't be part of a Redis Cluster; only nodes that are -# started as cluster nodes can. In order to start a Redis instance as a -# cluster node enable the cluster support uncommenting the following: -# -# cluster-enabled yes - -# Every cluster node has a cluster configuration file. This file is not -# intended to be edited by hand. It is created and updated by Redis nodes. -# Every Redis Cluster node requires a different cluster configuration file. -# Make sure that instances running in the same system do not have -# overlapping cluster configuration file names. -# -# cluster-config-file nodes-6379.conf - -# Cluster node timeout is the amount of milliseconds a node must be unreachable -# for it to be considered in failure state. -# Most other internal time limits are multiple of the node timeout. -# -# cluster-node-timeout 15000 - -# A slave of a failing master will avoid to start a failover if its data -# looks too old. -# -# There is no simple way for a slave to actually have an exact measure of -# its "data age", so the following two checks are performed: -# -# 1) If there are multiple slaves able to failover, they exchange messages -# in order to try to give an advantage to the slave with the best -# replication offset (more data from the master processed). -# Slaves will try to get their rank by offset, and apply to the start -# of the failover a delay proportional to their rank. -# -# 2) Every single slave computes the time of the last interaction with -# its master. This can be the last ping or command received (if the master -# is still in the "connected" state), or the time that elapsed since the -# disconnection with the master (if the replication link is currently down). -# If the last interaction is too old, the slave will not try to failover -# at all. -# -# The point "2" can be tuned by user. Specifically a slave will not perform -# the failover if, since the last interaction with the master, the time -# elapsed is greater than: -# -# (node-timeout * slave-validity-factor) + repl-ping-slave-period -# -# So for example if node-timeout is 30 seconds, and the slave-validity-factor -# is 10, and assuming a default repl-ping-slave-period of 10 seconds, the -# slave will not try to failover if it was not able to talk with the master -# for longer than 310 seconds. -# -# A large slave-validity-factor may allow slaves with too old data to failover -# a master, while a too small value may prevent the cluster from being able to -# elect a slave at all. -# -# For maximum availability, it is possible to set the slave-validity-factor -# to a value of 0, which means, that slaves will always try to failover the -# master regardless of the last time they interacted with the master. -# (However they'll always try to apply a delay proportional to their -# offset rank). -# -# Zero is the only value able to guarantee that when all the partitions heal -# the cluster will always be able to continue. -# -# cluster-slave-validity-factor 10 - -# Cluster slaves are able to migrate to orphaned masters, that are masters -# that are left without working slaves. This improves the cluster ability -# to resist to failures as otherwise an orphaned master can't be failed over -# in case of failure if it has no working slaves. -# -# Slaves migrate to orphaned masters only if there are still at least a -# given number of other working slaves for their old master. This number -# is the "migration barrier". A migration barrier of 1 means that a slave -# will migrate only if there is at least 1 other working slave for its master -# and so forth. It usually reflects the number of slaves you want for every -# master in your cluster. -# -# Default is 1 (slaves migrate only if their masters remain with at least -# one slave). To disable migration just set it to a very large value. -# A value of 0 can be set but is useful only for debugging and dangerous -# in production. -# -# cluster-migration-barrier 1 - -# By default Redis Cluster nodes stop accepting queries if they detect there -# is at least an hash slot uncovered (no available node is serving it). -# This way if the cluster is partially down (for example a range of hash slots -# are no longer covered) all the cluster becomes, eventually, unavailable. -# It automatically returns available as soon as all the slots are covered again. -# -# However sometimes you want the subset of the cluster which is working, -# to continue to accept queries for the part of the key space that is still -# covered. In order to do so, just set the cluster-require-full-coverage -# option to no. -# -# cluster-require-full-coverage yes - -# In order to setup your cluster make sure to read the documentation -# available at http://redis.io web site. - -########################## CLUSTER DOCKER/NAT support ######################## - -# In certain deployments, Redis Cluster nodes address discovery fails, because -# addresses are NAT-ted or because ports are forwarded (the typical case is -# Docker and other containers). -# -# In order to make Redis Cluster working in such environments, a static -# configuration where each node knows its public address is needed. The -# following two options are used for this scope, and are: -# -# * cluster-announce-ip -# * cluster-announce-port -# * cluster-announce-bus-port -# -# Each instruct the node about its address, client port, and cluster message -# bus port. The information is then published in the header of the bus packets -# so that other nodes will be able to correctly map the address of the node -# publishing the information. -# -# If the above options are not used, the normal Redis Cluster auto-detection -# will be used instead. -# -# Note that when remapped, the bus port may not be at the fixed offset of -# clients port + 10000, so you can specify any port and bus-port depending -# on how they get remapped. If the bus-port is not set, a fixed offset of -# 10000 will be used as usually. -# -# Example: -# -# cluster-announce-ip 10.1.1.5 -# cluster-announce-port 6379 -# cluster-announce-bus-port 6380 - -################################## SLOW LOG ################################### - -# The Redis Slow Log is a system to log queries that exceeded a specified -# execution time. The execution time does not include the I/O operations -# like talking with the client, sending the reply and so forth, -# but just the time needed to actually execute the command (this is the only -# stage of command execution where the thread is blocked and can not serve -# other requests in the meantime). -# -# You can configure the slow log with two parameters: one tells Redis -# what is the execution time, in microseconds, to exceed in order for the -# command to get logged, and the other parameter is the length of the -# slow log. When a new command is logged the oldest one is removed from the -# queue of logged commands. - -# The following time is expressed in microseconds, so 1000000 is equivalent -# to one second. Note that a negative number disables the slow log, while -# a value of zero forces the logging of every command. -slowlog-log-slower-than 10000 - -# There is no limit to this length. Just be aware that it will consume memory. -# You can reclaim memory used by the slow log with SLOWLOG RESET. -slowlog-max-len 128 - -################################ LATENCY MONITOR ############################## - -# The Redis latency monitoring subsystem samples different operations -# at runtime in order to collect data related to possible sources of -# latency of a Redis instance. -# -# Via the LATENCY command this information is available to the user that can -# print graphs and obtain reports. -# -# The system only logs operations that were performed in a time equal or -# greater than the amount of milliseconds specified via the -# latency-monitor-threshold configuration directive. When its value is set -# to zero, the latency monitor is turned off. -# -# By default latency monitoring is disabled since it is mostly not needed -# if you don't have latency issues, and collecting data has a performance -# impact, that while very small, can be measured under big load. Latency -# monitoring can easily be enabled at runtime using the command -# "CONFIG SET latency-monitor-threshold " if needed. -latency-monitor-threshold 0 - -############################# EVENT NOTIFICATION ############################## - -# Redis can notify Pub/Sub clients about events happening in the key space. -# This feature is documented at http://redis.io/topics/notifications -# -# For instance if keyspace events notification is enabled, and a client -# performs a DEL operation on key "foo" stored in the Database 0, two -# messages will be published via Pub/Sub: -# -# PUBLISH __keyspace@0__:foo del -# PUBLISH __keyevent@0__:del foo -# -# It is possible to select the events that Redis will notify among a set -# of classes. Every class is identified by a single character: -# -# K Keyspace events, published with __keyspace@__ prefix. -# E Keyevent events, published with __keyevent@__ prefix. -# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... -# $ String commands -# l List commands -# s Set commands -# h Hash commands -# z Sorted set commands -# x Expired events (events generated every time a key expires) -# e Evicted events (events generated when a key is evicted for maxmemory) -# A Alias for g$lshzxe, so that the "AKE" string means all the events. -# -# The "notify-keyspace-events" takes as argument a string that is composed -# of zero or multiple characters. The empty string means that notifications -# are disabled. -# -# Example: to enable list and generic events, from the point of view of the -# event name, use: -# -# notify-keyspace-events Elg -# -# Example 2: to get the stream of the expired keys subscribing to channel -# name __keyevent@0__:expired use: -# -# notify-keyspace-events Ex -# -# By default all notifications are disabled because most users don't need -# this feature and the feature has some overhead. Note that if you don't -# specify at least one of K or E, no events will be delivered. -notify-keyspace-events "" - -############################### ADVANCED CONFIG ############################### - -# Hashes are encoded using a memory efficient data structure when they have a -# small number of entries, and the biggest entry does not exceed a given -# threshold. These thresholds can be configured using the following directives. -hash-max-ziplist-entries 512 -hash-max-ziplist-value 64 - -# Lists are also encoded in a special way to save a lot of space. -# The number of entries allowed per internal list node can be specified -# as a fixed maximum size or a maximum number of elements. -# For a fixed maximum size, use -5 through -1, meaning: -# -5: max size: 64 Kb <-- not recommended for normal workloads -# -4: max size: 32 Kb <-- not recommended -# -3: max size: 16 Kb <-- probably not recommended -# -2: max size: 8 Kb <-- good -# -1: max size: 4 Kb <-- good -# Positive numbers mean store up to _exactly_ that number of elements -# per list node. -# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size), -# but if your use case is unique, adjust the settings as necessary. -list-max-ziplist-size -2 - -# Lists may also be compressed. -# Compress depth is the number of quicklist ziplist nodes from *each* side of -# the list to *exclude* from compression. The head and tail of the list -# are always uncompressed for fast push/pop operations. Settings are: -# 0: disable all list compression -# 1: depth 1 means "don't start compressing until after 1 node into the list, -# going from either the head or tail" -# So: [head]->node->node->...->node->[tail] -# [head], [tail] will always be uncompressed; inner nodes will compress. -# 2: [head]->[next]->node->node->...->node->[prev]->[tail] -# 2 here means: don't compress head or head->next or tail->prev or tail, -# but compress all nodes between them. -# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail] -# etc. -list-compress-depth 0 - -# Sets have a special encoding in just one case: when a set is composed -# of just strings that happen to be integers in radix 10 in the range -# of 64 bit signed integers. -# The following configuration setting sets the limit in the size of the -# set in order to use this special memory saving encoding. -set-max-intset-entries 512 - -# Similarly to hashes and lists, sorted sets are also specially encoded in -# order to save a lot of space. This encoding is only used when the length and -# elements of a sorted set are below the following limits: -zset-max-ziplist-entries 128 -zset-max-ziplist-value 64 - -# HyperLogLog sparse representation bytes limit. The limit includes the -# 16 bytes header. When an HyperLogLog using the sparse representation crosses -# this limit, it is converted into the dense representation. -# -# A value greater than 16000 is totally useless, since at that point the -# dense representation is more memory efficient. -# -# The suggested value is ~ 3000 in order to have the benefits of -# the space efficient encoding without slowing down too much PFADD, -# which is O(N) with the sparse encoding. The value can be raised to -# ~ 10000 when CPU is not a concern, but space is, and the data set is -# composed of many HyperLogLogs with cardinality in the 0 - 15000 range. -hll-sparse-max-bytes 3000 - -# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in -# order to help rehashing the main Redis hash table (the one mapping top-level -# keys to values). The hash table implementation Redis uses (see dict.c) -# performs a lazy rehashing: the more operation you run into a hash table -# that is rehashing, the more rehashing "steps" are performed, so if the -# server is idle the rehashing is never complete and some more memory is used -# by the hash table. -# -# The default is to use this millisecond 10 times every second in order to -# actively rehash the main dictionaries, freeing memory when possible. -# -# If unsure: -# use "activerehashing no" if you have hard latency requirements and it is -# not a good thing in your environment that Redis can reply from time to time -# to queries with 2 milliseconds delay. -# -# use "activerehashing yes" if you don't have such hard requirements but -# want to free memory asap when possible. -activerehashing yes - -# The client output buffer limits can be used to force disconnection of clients -# that are not reading data from the server fast enough for some reason (a -# common reason is that a Pub/Sub client can't consume messages as fast as the -# publisher can produce them). -# -# The limit can be set differently for the three different classes of clients: -# -# normal -> normal clients including MONITOR clients -# slave -> slave clients -# pubsub -> clients subscribed to at least one pubsub channel or pattern -# -# The syntax of every client-output-buffer-limit directive is the following: -# -# client-output-buffer-limit -# -# A client is immediately disconnected once the hard limit is reached, or if -# the soft limit is reached and remains reached for the specified number of -# seconds (continuously). -# So for instance if the hard limit is 32 megabytes and the soft limit is -# 16 megabytes / 10 seconds, the client will get disconnected immediately -# if the size of the output buffers reach 32 megabytes, but will also get -# disconnected if the client reaches 16 megabytes and continuously overcomes -# the limit for 10 seconds. -# -# By default normal clients are not limited because they don't receive data -# without asking (in a push way), but just after a request, so only -# asynchronous clients may create a scenario where data is requested faster -# than it can read. -# -# Instead there is a default limit for pubsub and slave clients, since -# subscribers and slaves receive data in a push fashion. -# -# Both the hard or the soft limit can be disabled by setting them to zero. -client-output-buffer-limit normal 0 0 0 -client-output-buffer-limit slave 256mb 64mb 60 -client-output-buffer-limit pubsub 32mb 8mb 60 - -# Client query buffers accumulate new commands. They are limited to a fixed -# amount by default in order to avoid that a protocol desynchronization (for -# instance due to a bug in the client) will lead to unbound memory usage in -# the query buffer. However you can configure it here if you have very special -# needs, such us huge multi/exec requests or alike. -# -# client-query-buffer-limit 1gb - -# In the Redis protocol, bulk requests, that are, elements representing single -# strings, are normally limited ot 512 mb. However you can change this limit -# here. -# -# proto-max-bulk-len 512mb - -# Redis calls an internal function to perform many background tasks, like -# closing connections of clients in timeout, purging expired keys that are -# never requested, and so forth. -# -# Not all tasks are performed with the same frequency, but Redis checks for -# tasks to perform according to the specified "hz" value. -# -# By default "hz" is set to 10. Raising the value will use more CPU when -# Redis is idle, but at the same time will make Redis more responsive when -# there are many keys expiring at the same time, and timeouts may be -# handled with more precision. -# -# The range is between 1 and 500, however a value over 100 is usually not -# a good idea. Most users should use the default of 10 and raise this up to -# 100 only in environments where very low latency is required. -hz 10 - -# When a child rewrites the AOF file, if the following option is enabled -# the file will be fsync-ed every 32 MB of data generated. This is useful -# in order to commit the file to the disk more incrementally and avoid -# big latency spikes. -aof-rewrite-incremental-fsync yes - -# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good -# idea to start with the default settings and only change them after investigating -# how to improve the performances and how the keys LFU change over time, which -# is possible to inspect via the OBJECT FREQ command. -# -# There are two tunable parameters in the Redis LFU implementation: the -# counter logarithm factor and the counter decay time. It is important to -# understand what the two parameters mean before changing them. -# -# The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis -# uses a probabilistic increment with logarithmic behavior. Given the value -# of the old counter, when a key is accessed, the counter is incremented in -# this way: -# -# 1. A random number R between 0 and 1 is extracted. -# 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1). -# 3. The counter is incremented only if R < P. -# -# The default lfu-log-factor is 10. This is a table of how the frequency -# counter changes with a different number of accesses with different -# logarithmic factors: -# -# +--------+------------+------------+------------+------------+------------+ -# | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits | -# +--------+------------+------------+------------+------------+------------+ -# | 0 | 104 | 255 | 255 | 255 | 255 | -# +--------+------------+------------+------------+------------+------------+ -# | 1 | 18 | 49 | 255 | 255 | 255 | -# +--------+------------+------------+------------+------------+------------+ -# | 10 | 10 | 18 | 142 | 255 | 255 | -# +--------+------------+------------+------------+------------+------------+ -# | 100 | 8 | 11 | 49 | 143 | 255 | -# +--------+------------+------------+------------+------------+------------+ -# -# NOTE: The above table was obtained by running the following commands: -# -# redis-benchmark -n 1000000 incr foo -# redis-cli object freq foo -# -# NOTE 2: The counter initial value is 5 in order to give new objects a chance -# to accumulate hits. -# -# The counter decay time is the time, in minutes, that must elapse in order -# for the key counter to be divided by two (or decremented if it has a value -# less <= 10). -# -# The default value for the lfu-decay-time is 1. A Special value of 0 means to -# decay the counter every time it happens to be scanned. -# -# lfu-log-factor 10 -# lfu-decay-time 1 - -########################### ACTIVE DEFRAGMENTATION ####################### -# -# WARNING THIS FEATURE IS EXPERIMENTAL. However it was stress tested -# even in production and manually tested by multiple engineers for some -# time. -# -# What is active defragmentation? -# ------------------------------- -# -# Active (online) defragmentation allows a Redis server to compact the -# spaces left between small allocations and deallocations of data in memory, -# thus allowing to reclaim back memory. -# -# Fragmentation is a natural process that happens with every allocator (but -# less so with Jemalloc, fortunately) and certain workloads. Normally a server -# restart is needed in order to lower the fragmentation, or at least to flush -# away all the data and create it again. However thanks to this feature -# implemented by Oran Agra for Redis 4.0 this process can happen at runtime -# in an "hot" way, while the server is running. -# -# Basically when the fragmentation is over a certain level (see the -# configuration options below) Redis will start to create new copies of the -# values in contiguous memory regions by exploiting certain specific Jemalloc -# features (in order to understand if an allocation is causing fragmentation -# and to allocate it in a better place), and at the same time, will release the -# old copies of the data. This process, repeated incrementally for all the keys -# will cause the fragmentation to drop back to normal values. -# -# Important things to understand: -# -# 1. This feature is disabled by default, and only works if you compiled Redis -# to use the copy of Jemalloc we ship with the source code of Redis. -# This is the default with Linux builds. -# -# 2. You never need to enable this feature if you don't have fragmentation -# issues. -# -# 3. Once you experience fragmentation, you can enable this feature when -# needed with the command "CONFIG SET activedefrag yes". -# -# The configuration parameters are able to fine tune the behavior of the -# defragmentation process. If you are not sure about what they mean it is -# a good idea to leave the defaults untouched. - -# Enabled active defragmentation -# activedefrag yes - -# Minimum amount of fragmentation waste to start active defrag -# active-defrag-ignore-bytes 100mb - -# Minimum percentage of fragmentation to start active defrag -# active-defrag-threshold-lower 10 - -# Maximum percentage of fragmentation at which we use maximum effort -# active-defrag-threshold-upper 100 - -# Minimal effort for defrag in CPU percentage -# active-defrag-cycle-min 25 - -# Maximal effort for defrag in CPU percentage -# active-defrag-cycle-max 75 diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.service b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.service deleted file mode 100644 index a52204cc70..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.2/redis.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Redis In-Memory Data Store -After=network.target - -[Service] -User=redis -Group=redis -ExecStart=/usr/bin/redis-server /etc/redis/redis.conf -ExecStop=/usr/bin/redis-cli shutdown -Restart=always -LimitNOFILE=10032 -Type=notify - -[Install] -WantedBy=multi-user.target - diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0001-src-Do-not-reset-FINAL_LIBS.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0001-src-Do-not-reset-FINAL_LIBS.patch new file mode 100644 index 0000000000..e8d8b1d53f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0001-src-Do-not-reset-FINAL_LIBS.patch @@ -0,0 +1,30 @@ +From e97a572d4aef099a961e43d528c0268e10d9f1e2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 10 Sep 2019 20:04:26 -0700 +Subject: [PATCH] src: Do not reset FINAL_LIBS + +This helps case where additional libraries are needed to be passed from +environment to get it going + +e.g. -latomic is needed on clang/x86 to provide for 64bit atomics + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index ddabd44..5133884 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -118,7 +118,7 @@ endif + + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) +-FINAL_LIBS=-lm ++FINAL_LIBS+=-lm + DEBUG=-g -ggdb + + # Linux ARM32 needs -latomic at linking time diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0006-Define-correct-gregs-for-RISCV32.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0006-Define-correct-gregs-for-RISCV32.patch new file mode 100644 index 0000000000..385b0aeed0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/0006-Define-correct-gregs-for-RISCV32.patch @@ -0,0 +1,62 @@ +From b6b2c652abfa98093401b232baca8719c50cadf4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 26 Oct 2020 21:32:22 -0700 +Subject: [PATCH] Define correct gregs for RISCV32 + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Updated patch for 6.2.8 +Signed-off-by: Changqing Li +--- + src/debug.c | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/src/debug.c b/src/debug.c +index ebda858..90bc450 100644 +--- a/src/debug.c ++++ b/src/debug.c +@@ -1168,7 +1168,9 @@ static void* getAndSetMcontextEip(ucontext_t *uc, void *eip) { + #endif + #elif defined(__linux__) + /* Linux */ +- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) ++ #if defined(__riscv) && __riscv_xlen == 32 ++ return (void*) uc->uc_mcontext.__gregs[REG_PC]; ++ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) + GET_SET_RETURN(uc->uc_mcontext.gregs[14], eip); + #elif defined(__X86_64__) || defined(__x86_64__) + GET_SET_RETURN(uc->uc_mcontext.gregs[16], eip); +@@ -1350,8 +1352,28 @@ void logRegisters(ucontext_t *uc) { + #endif + /* Linux */ + #elif defined(__linux__) ++ /* Linux RISCV32 */ ++ #if defined(__riscv) && __riscv_xlen == 32 ++ serverLog(LL_WARNING, ++ "\n" ++ "RA:%08lx S0:%08lx S1:%08lx S2:%08lx\n" ++ "SP:%08lx PC:%08lx A0:%08lx A1:%08lx\n" ++ "A2 :%08lx A3:%08lx A4:%08lx", ++ (unsigned long) uc->uc_mcontext.__gregs[REG_RA], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_S0], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_S1], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_S2], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_SP], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_PC], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 0], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 1], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 2], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 3], ++ (unsigned long) uc->uc_mcontext.__gregs[REG_A0 + 4] ++ ); ++ logStackContent((void**)uc->uc_mcontext.__gregs[REG_SP]); + /* Linux x86 */ +- #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) ++ #elif defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) + serverLog(LL_WARNING, + "\n" + "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/GNU_SOURCE-7.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/GNU_SOURCE-7.patch new file mode 100644 index 0000000000..6e07c25c6a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/GNU_SOURCE-7.patch @@ -0,0 +1,29 @@ +From a22512ac1cbd6de1f5646219722e49752d1f60ac Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 21 Dec 2019 12:09:51 -0800 +Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER + +Fixes +| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) +| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; +| | ^~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- + src/zmalloc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/zmalloc.c b/src/zmalloc.c +index ba03685..322304f 100644 +--- a/src/zmalloc.c ++++ b/src/zmalloc.c +@@ -32,6 +32,7 @@ + #include "config.h" + #include "solarisfixes.h" + ++#define _GNU_SOURCE + #include + #include + #include diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/hiredis-use-default-CC-if-it-is-set.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/hiredis-use-default-CC-if-it-is-set.patch new file mode 100644 index 0000000000..7785acca5c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/hiredis-use-default-CC-if-it-is-set.patch @@ -0,0 +1,38 @@ +From 41efa2f0cf08c91ff935bbb2d16ab233df7f5811 Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Fri, 8 Feb 2013 17:39:52 -0600 +Subject: [PATCH] hiredis: use default CC if it is set +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Instead of trying to automagically figure out CC, which breaks with OE +as CC has spaces in it, just skip it if one was already passed in. + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis + +Reworked for 6.0.4 +Signed-off-by: Andreas Müller + +--- +Upstream-Status: Pending + + deps/hiredis/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile +index bd2106b..9ce768d 100644 +--- a/deps/hiredis/Makefile ++++ b/deps/hiredis/Makefile +@@ -36,8 +36,6 @@ endef + export REDIS_TEST_CONFIG + + # Fallback to gcc when $CC is not in $PATH. +-CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') +-CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') + OPTIMIZATION?=-O3 + WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers + DEBUG_FLAGS?= -g -ggdb diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/init-redis-server b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/init-redis-server new file mode 100755 index 0000000000..c5f335f57d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/init-redis-server @@ -0,0 +1,71 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: redis-server +# Required-Start: $network +# Required-Stop: $network +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Redis, a key-value store +# Description: Redis is an open source, advanced key-value store. +# http://redis.io +### END INIT INFO + +test -f /usr/bin/redis-server || exit 0 + +ARGS="/etc/redis/redis.conf" + +case "$1" in + start) + echo "Starting redis-server..." + start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS + ;; + stop) + echo "Stopping redis-server..." + start-stop-daemon --stop --quiet --exec /usr/bin/redis-server + ;; + restart) + echo "Stopping redis-server..." + start-stop-daemon --stop --quiet --exec /usr/bin/redis-server + + # Since busybox implementation ignores --retry arguments repeatedly check + # if the process is still running and try another signal after a timeout, + # efectively simulating a stop with --retry=TERM/5/KILL/5 schedule. + waitAfterTerm=5000000 # us / 5000 ms / 5 s + waitAfterKill=5000000 # us / 5000 ms / 5 s + waitStep=100000 # us / 100 ms / 0.1 s + waited=0 + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + while [ $processOff -eq 0 ] && [ $waited -le $waitAfterTerm ] ; do + usleep ${waitStep} + ((waited+=${waitStep})) + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + done + if [ $processOff -eq 0 ] ; then + start-stop-daemon --stop --signal KILL --exec /usr/bin/redis-server + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + fi + waited=0 + while [ $processOff -eq 0 ] && [ $waited -le $waitAfterKill ] ; do + usleep ${waitStep} + ((waited+=${waitStep})) + start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server + processOff=$? + done + # Here $processOff will indicate if waiting and retrying according to + # the schedule ended in a successfull stop or not. + + echo "Starting redis-server..." + start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS + ;; + *) + echo "Usage: /etc/init.d/redis-server {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/lua-update-Makefile-to-use-environment-build-setting.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/lua-update-Makefile-to-use-environment-build-setting.patch new file mode 100644 index 0000000000..bff07535de --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/lua-update-Makefile-to-use-environment-build-setting.patch @@ -0,0 +1,78 @@ +From 734ab2f7879c6f94fc18ea6a10adb9bd156ba769 Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Fri, 8 Feb 2013 20:22:19 -0600 +Subject: [PATCH] lua: update Makefile to use environment build settings + +OE-specific parameters, instead of overriding all of these simply use +the ones that are already passed in. Also configure for only Linux... + +Signed-off-by: Venture Research + +Updated to work with 3.0.x + +Signed-off-by: Armin Kuster + +updated to work wtih 6.2.1 +Signed-off-by: Yi Fan Yu + +--- +Upstream-Status: Pending + + deps/Makefile | 1 - + deps/lua/Makefile | 1 - + deps/lua/src/Makefile | 16 ++++++---------- + 3 files changed, 6 insertions(+), 12 deletions(-) + +diff --git a/deps/Makefile b/deps/Makefile +index 8592e17..1807af5 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -81,7 +81,6 @@ endif + # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more + # challenging to cross-compile lua (and redis). These defines make it easier + # to fit redis into cross-compilation environments, which typically set AR. +-AR=ar + ARFLAGS=rc + + lua: .make-prerequisites +diff --git a/deps/lua/Makefile b/deps/lua/Makefile +index 209a132..72f4b2b 100644 +--- a/deps/lua/Makefile ++++ b/deps/lua/Makefile +@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644 + + # Utilities. + MKDIR= mkdir -p +-RANLIB= ranlib + + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + +diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile +index f3bba2f..1555ec0 100644 +--- a/deps/lua/src/Makefile ++++ b/deps/lua/src/Makefile +@@ -5,18 +5,14 @@ + # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + + # Your platform. See PLATS for possible values. +-PLAT= none ++PLAT= linux + +-CC?= gcc +-CFLAGS= -O2 -Wall $(MYCFLAGS) +-AR= ar rcu +-RANLIB= ranlib +-RM= rm -f +-LIBS= -lm $(MYLIBS) +- +-MYCFLAGS= ++MYCFLAGS=-DLUA_USE_LINUX + MYLDFLAGS= +-MYLIBS= ++MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses ++ ++CFLAGS += $(MYCFLAGS) ++LIBS += -lm $(MYLIBS) + + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/oe-use-libc-malloc.patch b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/oe-use-libc-malloc.patch new file mode 100644 index 0000000000..7b601e02a9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/oe-use-libc-malloc.patch @@ -0,0 +1,36 @@ +From 38a5f403b033d03cdac3ff814687d83f61527d8e Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Wed, 6 Feb 2013 20:51:02 -0600 +Subject: [PATCH] hack to force use of libc malloc + +Hack to force libc usage as it seems the option to pass it in has been +removed in favor of magic. + +Note that this of course doesn't allow tcmalloc and jemalloc, however +jemalloc wasn't building correctly. + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis + +--- +Upstream-Status: Pending + + src/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index ecbd275..39decee 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -13,7 +13,8 @@ + # Just use 'make dep', but this is only needed by developers. + + release_hdr := $(shell sh -c './mkreleasehdr.sh') +-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') ++# use fake uname option to force use of generic libc ++uname_S := "USE_LIBC_MALLOC" + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1')) + OPTIMIZATION?=-O3 diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.conf b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.conf new file mode 100644 index 0000000000..75037d6dc8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.conf @@ -0,0 +1,1314 @@ +# Redis configuration file example. +# +# Note that in order to read the configuration file, Redis must be +# started with the file path as first argument: +# +# ./redis-server /path/to/redis.conf + +# Note on units: when memory size is needed, it is possible to specify +# it in the usual form of 1k 5GB 4M and so forth: +# +# 1k => 1000 bytes +# 1kb => 1024 bytes +# 1m => 1000000 bytes +# 1mb => 1024*1024 bytes +# 1g => 1000000000 bytes +# 1gb => 1024*1024*1024 bytes +# +# units are case insensitive so 1GB 1Gb 1gB are all the same. + +################################## INCLUDES ################################### + +# Include one or more other config files here. This is useful if you +# have a standard template that goes to all Redis servers but also need +# to customize a few per-server settings. Include files can include +# other files, so use this wisely. +# +# Notice option "include" won't be rewritten by command "CONFIG REWRITE" +# from admin or Redis Sentinel. Since Redis always uses the last processed +# line as value of a configuration directive, you'd better put includes +# at the beginning of this file to avoid overwriting config change at runtime. +# +# If instead you are interested in using includes to override configuration +# options, it is better to use include as the last line. +# +# include /path/to/local.conf +# include /path/to/other.conf + +################################## MODULES ##################################### + +# Load modules at startup. If the server is not able to load modules +# it will abort. It is possible to use multiple loadmodule directives. +# +# loadmodule /path/to/my_module.so +# loadmodule /path/to/other_module.so + +################################## NETWORK ##################################### + +# By default, if no "bind" configuration directive is specified, Redis listens +# for connections from all the network interfaces available on the server. +# It is possible to listen to just one or multiple selected interfaces using +# the "bind" configuration directive, followed by one or more IP addresses. +# +# Examples: +# +# bind 192.168.1.100 10.0.0.1 +# bind 127.0.0.1 ::1 +# +# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the +# internet, binding to all the interfaces is dangerous and will expose the +# instance to everybody on the internet. So by default we uncomment the +# following bind directive, that will force Redis to listen only into +# the IPv4 lookback interface address (this means Redis will be able to +# accept connections only from clients running into the same computer it +# is running). +# +# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES +# JUST COMMENT THE FOLLOWING LINE. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +bind 127.0.0.1 + +# Protected mode is a layer of security protection, in order to avoid that +# Redis instances left open on the internet are accessed and exploited. +# +# When protected mode is on and if: +# +# 1) The server is not binding explicitly to a set of addresses using the +# "bind" directive. +# 2) No password is configured. +# +# The server only accepts connections from clients connecting from the +# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain +# sockets. +# +# By default protected mode is enabled. You should disable it only if +# you are sure you want clients from other hosts to connect to Redis +# even if no authentication is configured, nor a specific set of interfaces +# are explicitly listed using the "bind" directive. +protected-mode yes + +# Accept connections on the specified port, default is 6379 (IANA #815344). +# If port 0 is specified Redis will not listen on a TCP socket. +port 6379 + +# TCP listen() backlog. +# +# In high requests-per-second environments you need an high backlog in order +# to avoid slow clients connections issues. Note that the Linux kernel +# will silently truncate it to the value of /proc/sys/net/core/somaxconn so +# make sure to raise both the value of somaxconn and tcp_max_syn_backlog +# in order to get the desired effect. +tcp-backlog 511 + +# Unix socket. +# +# Specify the path for the Unix socket that will be used to listen for +# incoming connections. There is no default, so Redis will not listen +# on a unix socket when not specified. +# +# unixsocket /tmp/redis.sock +# unixsocketperm 700 + +# Close the connection after a client is idle for N seconds (0 to disable) +timeout 0 + +# TCP keepalive. +# +# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence +# of communication. This is useful for two reasons: +# +# 1) Detect dead peers. +# 2) Take the connection alive from the point of view of network +# equipment in the middle. +# +# On Linux, the specified value (in seconds) is the period used to send ACKs. +# Note that to close the connection the double of the time is needed. +# On other kernels the period depends on the kernel configuration. +# +# A reasonable value for this option is 300 seconds, which is the new +# Redis default starting with Redis 3.2.1. +tcp-keepalive 300 + +################################# GENERAL ##################################### + +# OE: run as a daemon. +daemonize yes + +# If you run Redis from upstart or systemd, Redis can interact with your +# supervision tree. Options: +# supervised no - no supervision interaction +# supervised upstart - signal upstart by putting Redis into SIGSTOP mode +# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET +# supervised auto - detect upstart or systemd method based on +# UPSTART_JOB or NOTIFY_SOCKET environment variables +# Note: these supervision methods only signal "process is ready." +# They do not enable continuous liveness pings back to your supervisor. +supervised no + +# If a pid file is specified, Redis writes it where specified at startup +# and removes it at exit. +# +# When the server runs non daemonized, no pid file is created if none is +# specified in the configuration. When the server is daemonized, the pid file +# is used even if not specified, defaulting to "/var/run/redis.pid". +# +# Creating a pid file is best effort: if Redis is not able to create it +# nothing bad happens, the server will start and run normally. + +# When running daemonized, Redis writes a pid file in /var/run/redis.pid by +# default. You can specify a custom pid file location here. +pidfile /var/run/redis.pid + +# Specify the server verbosity level. +# This can be one of: +# debug (a lot of information, useful for development/testing) +# verbose (many rarely useful info, but not a mess like the debug level) +# notice (moderately verbose, what you want in production probably) +# warning (only very important / critical messages are logged) +loglevel notice + +# Specify the log file name. Also the empty string can be used to force +# Redis to log on the standard output. Note that if you use standard +# output for logging but daemonize, logs will be sent to /dev/null +logfile "" + +# To enable logging to the system logger, just set 'syslog-enabled' to yes, +# and optionally update the other syslog parameters to suit your needs. +syslog-enabled yes + +# Specify the syslog identity. +syslog-ident redis + +# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. +# syslog-facility local0 + +# Set the number of databases. The default database is DB 0, you can select +# a different one on a per-connection basis using SELECT where +# dbid is a number between 0 and 'databases'-1 +databases 16 + +# By default Redis shows an ASCII art logo only when started to log to the +# standard output and if the standard output is a TTY. Basically this means +# that normally a logo is displayed only in interactive sessions. +# +# However it is possible to force the pre-4.0 behavior and always show a +# ASCII art logo in startup logs by setting the following option to yes. +always-show-logo yes + +################################ SNAPSHOTTING ################################ +# +# Save the DB on disk: +# +# save +# +# Will save the DB if both the given number of seconds and the given +# number of write operations against the DB occurred. +# +# In the example below the behaviour will be to save: +# after 900 sec (15 min) if at least 1 key changed +# after 300 sec (5 min) if at least 10 keys changed +# after 60 sec if at least 10000 keys changed +# +# Note: you can disable saving completely by commenting out all "save" lines. +# +# It is also possible to remove all the previously configured save +# points by adding a save directive with a single empty string argument +# like in the following example: +# +# save "" + +#save 900 1 +#save 300 10 +#save 60 10000 + +# OE: tune for a small embedded system with a limited # of keys. +save 120 1 +save 60 100 +save 30 1000 + +# By default Redis will stop accepting writes if RDB snapshots are enabled +# (at least one save point) and the latest background save failed. +# This will make the user aware (in a hard way) that data is not persisting +# on disk properly, otherwise chances are that no one will notice and some +# disaster will happen. +# +# If the background saving process will start working again Redis will +# automatically allow writes again. +# +# However if you have setup your proper monitoring of the Redis server +# and persistence, you may want to disable this feature so that Redis will +# continue to work as usual even if there are problems with disk, +# permissions, and so forth. +stop-writes-on-bgsave-error yes + +# Compress string objects using LZF when dump .rdb databases? +# For default that's set to 'yes' as it's almost always a win. +# If you want to save some CPU in the saving child set it to 'no' but +# the dataset will likely be bigger if you have compressible values or keys. +rdbcompression yes + +# Since version 5 of RDB a CRC64 checksum is placed at the end of the file. +# This makes the format more resistant to corruption but there is a performance +# hit to pay (around 10%) when saving and loading RDB files, so you can disable it +# for maximum performances. +# +# RDB files created with checksum disabled have a checksum of zero that will +# tell the loading code to skip the check. +rdbchecksum yes + +# The filename where to dump the DB +dbfilename dump.rdb + +# The working directory. +# +# The DB will be written inside this directory, with the filename specified +# above using the 'dbfilename' configuration directive. +# +# The Append Only File will also be created inside this directory. +# +# Note that you must specify a directory here, not a file name. +dir /var/lib/redis/ + +################################# REPLICATION ################################# + +# Master-Slave replication. Use slaveof to make a Redis instance a copy of +# another Redis server. A few things to understand ASAP about Redis replication. +# +# 1) Redis replication is asynchronous, but you can configure a master to +# stop accepting writes if it appears to be not connected with at least +# a given number of slaves. +# 2) Redis slaves are able to perform a partial resynchronization with the +# master if the replication link is lost for a relatively small amount of +# time. You may want to configure the replication backlog size (see the next +# sections of this file) with a sensible value depending on your needs. +# 3) Replication is automatic and does not need user intervention. After a +# network partition slaves automatically try to reconnect to masters +# and resynchronize with them. +# +# slaveof + +# If the master is password protected (using the "requirepass" configuration +# directive below) it is possible to tell the slave to authenticate before +# starting the replication synchronization process, otherwise the master will +# refuse the slave request. +# +# masterauth + +# When a slave loses its connection with the master, or when the replication +# is still in progress, the slave can act in two different ways: +# +# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will +# still reply to client requests, possibly with out of date data, or the +# data set may just be empty if this is the first synchronization. +# +# 2) if slave-serve-stale-data is set to 'no' the slave will reply with +# an error "SYNC with master in progress" to all the kind of commands +# but to INFO and SLAVEOF. +# +slave-serve-stale-data yes + +# You can configure a slave instance to accept writes or not. Writing against +# a slave instance may be useful to store some ephemeral data (because data +# written on a slave will be easily deleted after resync with the master) but +# may also cause problems if clients are writing to it because of a +# misconfiguration. +# +# Since Redis 2.6 by default slaves are read-only. +# +# Note: read only slaves are not designed to be exposed to untrusted clients +# on the internet. It's just a protection layer against misuse of the instance. +# Still a read only slave exports by default all the administrative commands +# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve +# security of read only slaves using 'rename-command' to shadow all the +# administrative / dangerous commands. +slave-read-only yes + +# Replication SYNC strategy: disk or socket. +# +# ------------------------------------------------------- +# WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY +# ------------------------------------------------------- +# +# New slaves and reconnecting slaves that are not able to continue the replication +# process just receiving differences, need to do what is called a "full +# synchronization". An RDB file is transmitted from the master to the slaves. +# The transmission can happen in two different ways: +# +# 1) Disk-backed: The Redis master creates a new process that writes the RDB +# file on disk. Later the file is transferred by the parent +# process to the slaves incrementally. +# 2) Diskless: The Redis master creates a new process that directly writes the +# RDB file to slave sockets, without touching the disk at all. +# +# With disk-backed replication, while the RDB file is generated, more slaves +# can be queued and served with the RDB file as soon as the current child producing +# the RDB file finishes its work. With diskless replication instead once +# the transfer starts, new slaves arriving will be queued and a new transfer +# will start when the current one terminates. +# +# When diskless replication is used, the master waits a configurable amount of +# time (in seconds) before starting the transfer in the hope that multiple slaves +# will arrive and the transfer can be parallelized. +# +# With slow disks and fast (large bandwidth) networks, diskless replication +# works better. +repl-diskless-sync no + +# When diskless replication is enabled, it is possible to configure the delay +# the server waits in order to spawn the child that transfers the RDB via socket +# to the slaves. +# +# This is important since once the transfer starts, it is not possible to serve +# new slaves arriving, that will be queued for the next RDB transfer, so the server +# waits a delay in order to let more slaves arrive. +# +# The delay is specified in seconds, and by default is 5 seconds. To disable +# it entirely just set it to 0 seconds and the transfer will start ASAP. +repl-diskless-sync-delay 5 + +# Slaves send PINGs to server in a predefined interval. It's possible to change +# this interval with the repl_ping_slave_period option. The default value is 10 +# seconds. +# +# repl-ping-slave-period 10 + +# The following option sets the replication timeout for: +# +# 1) Bulk transfer I/O during SYNC, from the point of view of slave. +# 2) Master timeout from the point of view of slaves (data, pings). +# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings). +# +# It is important to make sure that this value is greater than the value +# specified for repl-ping-slave-period otherwise a timeout will be detected +# every time there is low traffic between the master and the slave. +# +# repl-timeout 60 + +# Disable TCP_NODELAY on the slave socket after SYNC? +# +# If you select "yes" Redis will use a smaller number of TCP packets and +# less bandwidth to send data to slaves. But this can add a delay for +# the data to appear on the slave side, up to 40 milliseconds with +# Linux kernels using a default configuration. +# +# If you select "no" the delay for data to appear on the slave side will +# be reduced but more bandwidth will be used for replication. +# +# By default we optimize for low latency, but in very high traffic conditions +# or when the master and slaves are many hops away, turning this to "yes" may +# be a good idea. +repl-disable-tcp-nodelay no + +# Set the replication backlog size. The backlog is a buffer that accumulates +# slave data when slaves are disconnected for some time, so that when a slave +# wants to reconnect again, often a full resync is not needed, but a partial +# resync is enough, just passing the portion of data the slave missed while +# disconnected. +# +# The bigger the replication backlog, the longer the time the slave can be +# disconnected and later be able to perform a partial resynchronization. +# +# The backlog is only allocated once there is at least a slave connected. +# +# repl-backlog-size 1mb + +# After a master has no longer connected slaves for some time, the backlog +# will be freed. The following option configures the amount of seconds that +# need to elapse, starting from the time the last slave disconnected, for +# the backlog buffer to be freed. +# +# Note that slaves never free the backlog for timeout, since they may be +# promoted to masters later, and should be able to correctly "partially +# resynchronize" with the slaves: hence they should always accumulate backlog. +# +# A value of 0 means to never release the backlog. +# +# repl-backlog-ttl 3600 + +# The slave priority is an integer number published by Redis in the INFO output. +# It is used by Redis Sentinel in order to select a slave to promote into a +# master if the master is no longer working correctly. +# +# A slave with a low priority number is considered better for promotion, so +# for instance if there are three slaves with priority 10, 100, 25 Sentinel will +# pick the one with priority 10, that is the lowest. +# +# However a special priority of 0 marks the slave as not able to perform the +# role of master, so a slave with priority of 0 will never be selected by +# Redis Sentinel for promotion. +# +# By default the priority is 100. +slave-priority 100 + +# It is possible for a master to stop accepting writes if there are less than +# N slaves connected, having a lag less or equal than M seconds. +# +# The N slaves need to be in "online" state. +# +# The lag in seconds, that must be <= the specified value, is calculated from +# the last ping received from the slave, that is usually sent every second. +# +# This option does not GUARANTEE that N replicas will accept the write, but +# will limit the window of exposure for lost writes in case not enough slaves +# are available, to the specified number of seconds. +# +# For example to require at least 3 slaves with a lag <= 10 seconds use: +# +# min-slaves-to-write 3 +# min-slaves-max-lag 10 +# +# Setting one or the other to 0 disables the feature. +# +# By default min-slaves-to-write is set to 0 (feature disabled) and +# min-slaves-max-lag is set to 10. + +# A Redis master is able to list the address and port of the attached +# slaves in different ways. For example the "INFO replication" section +# offers this information, which is used, among other tools, by +# Redis Sentinel in order to discover slave instances. +# Another place where this info is available is in the output of the +# "ROLE" command of a master. +# +# The listed IP and address normally reported by a slave is obtained +# in the following way: +# +# IP: The address is auto detected by checking the peer address +# of the socket used by the slave to connect with the master. +# +# Port: The port is communicated by the slave during the replication +# handshake, and is normally the port that the slave is using to +# list for connections. +# +# However when port forwarding or Network Address Translation (NAT) is +# used, the slave may be actually reachable via different IP and port +# pairs. The following two options can be used by a slave in order to +# report to its master a specific set of IP and port, so that both INFO +# and ROLE will report those values. +# +# There is no need to use both the options if you need to override just +# the port or the IP address. +# +# slave-announce-ip 5.5.5.5 +# slave-announce-port 1234 + +################################## SECURITY ################################### + +# Require clients to issue AUTH before processing any other +# commands. This might be useful in environments in which you do not trust +# others with access to the host running redis-server. +# +# This should stay commented out for backward compatibility and because most +# people do not need auth (e.g. they run their own servers). +# +# Warning: since Redis is pretty fast an outside user can try up to +# 150k passwords per second against a good box. This means that you should +# use a very strong password otherwise it will be very easy to break. +# +# requirepass foobared + +# Command renaming. +# +# It is possible to change the name of dangerous commands in a shared +# environment. For instance the CONFIG command may be renamed into something +# hard to guess so that it will still be available for internal-use tools +# but not available for general clients. +# +# Example: +# +# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 +# +# It is also possible to completely kill a command by renaming it into +# an empty string: +# +# rename-command CONFIG "" +# +# Please note that changing the name of commands that are logged into the +# AOF file or transmitted to slaves may cause problems. + +################################### CLIENTS #################################### + +# Set the max number of connected clients at the same time. By default +# this limit is set to 10000 clients, however if the Redis server is not +# able to configure the process file limit to allow for the specified limit +# the max number of allowed clients is set to the current file limit +# minus 32 (as Redis reserves a few file descriptors for internal uses). +# +# Once the limit is reached Redis will close all the new connections sending +# an error 'max number of clients reached'. +# +# maxclients 10000 + +############################## MEMORY MANAGEMENT ################################ + +# Set a memory usage limit to the specified amount of bytes. +# When the memory limit is reached Redis will try to remove keys +# according to the eviction policy selected (see maxmemory-policy). +# +# If Redis can't remove keys according to the policy, or if the policy is +# set to 'noeviction', Redis will start to reply with errors to commands +# that would use more memory, like SET, LPUSH, and so on, and will continue +# to reply to read-only commands like GET. +# +# This option is usually useful when using Redis as an LRU or LFU cache, or to +# set a hard memory limit for an instance (using the 'noeviction' policy). +# +# WARNING: If you have slaves attached to an instance with maxmemory on, +# the size of the output buffers needed to feed the slaves are subtracted +# from the used memory count, so that network problems / resyncs will +# not trigger a loop where keys are evicted, and in turn the output +# buffer of slaves is full with DELs of keys evicted triggering the deletion +# of more keys, and so forth until the database is completely emptied. +# +# In short... if you have slaves attached it is suggested that you set a lower +# limit for maxmemory so that there is some free RAM on the system for slave +# output buffers (but this is not needed if the policy is 'noeviction'). +# +# maxmemory + +# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory +# is reached. You can select among five behaviors: +# +# volatile-lru -> Evict using approximated LRU among the keys with an expire set. +# allkeys-lru -> Evict any key using approximated LRU. +# volatile-lfu -> Evict using approximated LFU among the keys with an expire set. +# allkeys-lfu -> Evict any key using approximated LFU. +# volatile-random -> Remove a random key among the ones with an expire set. +# allkeys-random -> Remove a random key, any key. +# volatile-ttl -> Remove the key with the nearest expire time (minor TTL) +# noeviction -> Don't evict anything, just return an error on write operations. +# +# LRU means Least Recently Used +# LFU means Least Frequently Used +# +# Both LRU, LFU and volatile-ttl are implemented using approximated +# randomized algorithms. +# +# Note: with any of the above policies, Redis will return an error on write +# operations, when there are no suitable keys for eviction. +# +# At the date of writing these commands are: set setnx setex append +# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd +# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby +# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby +# getset mset msetnx exec sort +# +# The default is: +# +# maxmemory-policy noeviction + +# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated +# algorithms (in order to save memory), so you can tune it for speed or +# accuracy. For default Redis will check five keys and pick the one that was +# used less recently, you can change the sample size using the following +# configuration directive. +# +# The default of 5 produces good enough results. 10 Approximates very closely +# true LRU but costs more CPU. 3 is faster but not very accurate. +# +# maxmemory-samples 5 + +############################# LAZY FREEING #################################### + +# Redis has two primitives to delete keys. One is called DEL and is a blocking +# deletion of the object. It means that the server stops processing new commands +# in order to reclaim all the memory associated with an object in a synchronous +# way. If the key deleted is associated with a small object, the time needed +# in order to execute the DEL command is very small and comparable to most other +# O(1) or O(log_N) commands in Redis. However if the key is associated with an +# aggregated value containing millions of elements, the server can block for +# a long time (even seconds) in order to complete the operation. +# +# For the above reasons Redis also offers non blocking deletion primitives +# such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and +# FLUSHDB commands, in order to reclaim memory in background. Those commands +# are executed in constant time. Another thread will incrementally free the +# object in the background as fast as possible. +# +# DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled. +# It's up to the design of the application to understand when it is a good +# idea to use one or the other. However the Redis server sometimes has to +# delete keys or flush the whole database as a side effect of other operations. +# Specifically Redis deletes objects independently of a user call in the +# following scenarios: +# +# 1) On eviction, because of the maxmemory and maxmemory policy configurations, +# in order to make room for new data, without going over the specified +# memory limit. +# 2) Because of expire: when a key with an associated time to live (see the +# EXPIRE command) must be deleted from memory. +# 3) Because of a side effect of a command that stores data on a key that may +# already exist. For example the RENAME command may delete the old key +# content when it is replaced with another one. Similarly SUNIONSTORE +# or SORT with STORE option may delete existing keys. The SET command +# itself removes any old content of the specified key in order to replace +# it with the specified string. +# 4) During replication, when a slave performs a full resynchronization with +# its master, the content of the whole database is removed in order to +# load the RDB file just transfered. +# +# In all the above cases the default is to delete objects in a blocking way, +# like if DEL was called. However you can configure each case specifically +# in order to instead release memory in a non-blocking way like if UNLINK +# was called, using the following configuration directives: + +lazyfree-lazy-eviction no +lazyfree-lazy-expire no +lazyfree-lazy-server-del no +slave-lazy-flush no + +############################## APPEND ONLY MODE ############################### + +# By default Redis asynchronously dumps the dataset on disk. This mode is +# good enough in many applications, but an issue with the Redis process or +# a power outage may result into a few minutes of writes lost (depending on +# the configured save points). +# +# The Append Only File is an alternative persistence mode that provides +# much better durability. For instance using the default data fsync policy +# (see later in the config file) Redis can lose just one second of writes in a +# dramatic event like a server power outage, or a single write if something +# wrong with the Redis process itself happens, but the operating system is +# still running correctly. +# +# AOF and RDB persistence can be enabled at the same time without problems. +# If the AOF is enabled on startup Redis will load the AOF, that is the file +# with the better durability guarantees. +# +# Please check http://redis.io/topics/persistence for more information. + +# OE: changed default to enable this +appendonly yes + +# The name of the append only file (default: "appendonly.aof") + +appendfilename "appendonly.aof" + +# The fsync() call tells the Operating System to actually write data on disk +# instead of waiting for more data in the output buffer. Some OS will really flush +# data on disk, some other OS will just try to do it ASAP. +# +# Redis supports three different modes: +# +# no: don't fsync, just let the OS flush the data when it wants. Faster. +# always: fsync after every write to the append only log. Slow, Safest. +# everysec: fsync only one time every second. Compromise. +# +# The default is "everysec", as that's usually the right compromise between +# speed and data safety. It's up to you to understand if you can relax this to +# "no" that will let the operating system flush the output buffer when +# it wants, for better performances (but if you can live with the idea of +# some data loss consider the default persistence mode that's snapshotting), +# or on the contrary, use "always" that's very slow but a bit safer than +# everysec. +# +# More details please check the following article: +# http://antirez.com/post/redis-persistence-demystified.html +# +# If unsure, use "everysec". + +# appendfsync always +appendfsync everysec +# appendfsync no + +# When the AOF fsync policy is set to always or everysec, and a background +# saving process (a background save or AOF log background rewriting) is +# performing a lot of I/O against the disk, in some Linux configurations +# Redis may block too long on the fsync() call. Note that there is no fix for +# this currently, as even performing fsync in a different thread will block +# our synchronous write(2) call. +# +# In order to mitigate this problem it's possible to use the following option +# that will prevent fsync() from being called in the main process while a +# BGSAVE or BGREWRITEAOF is in progress. +# +# This means that while another child is saving, the durability of Redis is +# the same as "appendfsync none". In practical terms, this means that it is +# possible to lose up to 30 seconds of log in the worst scenario (with the +# default Linux settings). +# +# If you have latency problems turn this to "yes". Otherwise leave it as +# "no" that is the safest pick from the point of view of durability. + +no-appendfsync-on-rewrite no + +# Automatic rewrite of the append only file. +# Redis is able to automatically rewrite the log file implicitly calling +# BGREWRITEAOF when the AOF log size grows by the specified percentage. +# +# This is how it works: Redis remembers the size of the AOF file after the +# latest rewrite (if no rewrite has happened since the restart, the size of +# the AOF at startup is used). +# +# This base size is compared to the current size. If the current size is +# bigger than the specified percentage, the rewrite is triggered. Also +# you need to specify a minimal size for the AOF file to be rewritten, this +# is useful to avoid rewriting the AOF file even if the percentage increase +# is reached but it is still pretty small. +# +# Specify a percentage of zero in order to disable the automatic AOF +# rewrite feature. + +auto-aof-rewrite-percentage 100 +auto-aof-rewrite-min-size 64mb + +# An AOF file may be found to be truncated at the end during the Redis +# startup process, when the AOF data gets loaded back into memory. +# This may happen when the system where Redis is running +# crashes, especially when an ext4 filesystem is mounted without the +# data=ordered option (however this can't happen when Redis itself +# crashes or aborts but the operating system still works correctly). +# +# Redis can either exit with an error when this happens, or load as much +# data as possible (the default now) and start if the AOF file is found +# to be truncated at the end. The following option controls this behavior. +# +# If aof-load-truncated is set to yes, a truncated AOF file is loaded and +# the Redis server starts emitting a log to inform the user of the event. +# Otherwise if the option is set to no, the server aborts with an error +# and refuses to start. When the option is set to no, the user requires +# to fix the AOF file using the "redis-check-aof" utility before to restart +# the server. +# +# Note that if the AOF file will be found to be corrupted in the middle +# the server will still exit with an error. This option only applies when +# Redis will try to read more data from the AOF file but not enough bytes +# will be found. +aof-load-truncated yes + +# When rewriting the AOF file, Redis is able to use an RDB preamble in the +# AOF file for faster rewrites and recoveries. When this option is turned +# on the rewritten AOF file is composed of two different stanzas: +# +# [RDB file][AOF tail] +# +# When loading Redis recognizes that the AOF file starts with the "REDIS" +# string and loads the prefixed RDB file, and continues loading the AOF +# tail. +# +# This is currently turned off by default in order to avoid the surprise +# of a format change, but will at some point be used as the default. +aof-use-rdb-preamble no + +################################ LUA SCRIPTING ############################### + +# Max execution time of a Lua script in milliseconds. +# +# If the maximum execution time is reached Redis will log that a script is +# still in execution after the maximum allowed time and will start to +# reply to queries with an error. +# +# When a long running script exceeds the maximum execution time only the +# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be +# used to stop a script that did not yet called write commands. The second +# is the only way to shut down the server in the case a write command was +# already issued by the script but the user doesn't want to wait for the natural +# termination of the script. +# +# Set it to 0 or a negative value for unlimited execution without warnings. +lua-time-limit 5000 + +################################ REDIS CLUSTER ############################### +# +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however +# in order to mark it as "mature" we need to wait for a non trivial percentage +# of users to deploy it in production. +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# +# Normal Redis instances can't be part of a Redis Cluster; only nodes that are +# started as cluster nodes can. In order to start a Redis instance as a +# cluster node enable the cluster support uncommenting the following: +# +# cluster-enabled yes + +# Every cluster node has a cluster configuration file. This file is not +# intended to be edited by hand. It is created and updated by Redis nodes. +# Every Redis Cluster node requires a different cluster configuration file. +# Make sure that instances running in the same system do not have +# overlapping cluster configuration file names. +# +# cluster-config-file nodes-6379.conf + +# Cluster node timeout is the amount of milliseconds a node must be unreachable +# for it to be considered in failure state. +# Most other internal time limits are multiple of the node timeout. +# +# cluster-node-timeout 15000 + +# A slave of a failing master will avoid to start a failover if its data +# looks too old. +# +# There is no simple way for a slave to actually have an exact measure of +# its "data age", so the following two checks are performed: +# +# 1) If there are multiple slaves able to failover, they exchange messages +# in order to try to give an advantage to the slave with the best +# replication offset (more data from the master processed). +# Slaves will try to get their rank by offset, and apply to the start +# of the failover a delay proportional to their rank. +# +# 2) Every single slave computes the time of the last interaction with +# its master. This can be the last ping or command received (if the master +# is still in the "connected" state), or the time that elapsed since the +# disconnection with the master (if the replication link is currently down). +# If the last interaction is too old, the slave will not try to failover +# at all. +# +# The point "2" can be tuned by user. Specifically a slave will not perform +# the failover if, since the last interaction with the master, the time +# elapsed is greater than: +# +# (node-timeout * slave-validity-factor) + repl-ping-slave-period +# +# So for example if node-timeout is 30 seconds, and the slave-validity-factor +# is 10, and assuming a default repl-ping-slave-period of 10 seconds, the +# slave will not try to failover if it was not able to talk with the master +# for longer than 310 seconds. +# +# A large slave-validity-factor may allow slaves with too old data to failover +# a master, while a too small value may prevent the cluster from being able to +# elect a slave at all. +# +# For maximum availability, it is possible to set the slave-validity-factor +# to a value of 0, which means, that slaves will always try to failover the +# master regardless of the last time they interacted with the master. +# (However they'll always try to apply a delay proportional to their +# offset rank). +# +# Zero is the only value able to guarantee that when all the partitions heal +# the cluster will always be able to continue. +# +# cluster-slave-validity-factor 10 + +# Cluster slaves are able to migrate to orphaned masters, that are masters +# that are left without working slaves. This improves the cluster ability +# to resist to failures as otherwise an orphaned master can't be failed over +# in case of failure if it has no working slaves. +# +# Slaves migrate to orphaned masters only if there are still at least a +# given number of other working slaves for their old master. This number +# is the "migration barrier". A migration barrier of 1 means that a slave +# will migrate only if there is at least 1 other working slave for its master +# and so forth. It usually reflects the number of slaves you want for every +# master in your cluster. +# +# Default is 1 (slaves migrate only if their masters remain with at least +# one slave). To disable migration just set it to a very large value. +# A value of 0 can be set but is useful only for debugging and dangerous +# in production. +# +# cluster-migration-barrier 1 + +# By default Redis Cluster nodes stop accepting queries if they detect there +# is at least an hash slot uncovered (no available node is serving it). +# This way if the cluster is partially down (for example a range of hash slots +# are no longer covered) all the cluster becomes, eventually, unavailable. +# It automatically returns available as soon as all the slots are covered again. +# +# However sometimes you want the subset of the cluster which is working, +# to continue to accept queries for the part of the key space that is still +# covered. In order to do so, just set the cluster-require-full-coverage +# option to no. +# +# cluster-require-full-coverage yes + +# In order to setup your cluster make sure to read the documentation +# available at http://redis.io web site. + +########################## CLUSTER DOCKER/NAT support ######################## + +# In certain deployments, Redis Cluster nodes address discovery fails, because +# addresses are NAT-ted or because ports are forwarded (the typical case is +# Docker and other containers). +# +# In order to make Redis Cluster working in such environments, a static +# configuration where each node knows its public address is needed. The +# following two options are used for this scope, and are: +# +# * cluster-announce-ip +# * cluster-announce-port +# * cluster-announce-bus-port +# +# Each instruct the node about its address, client port, and cluster message +# bus port. The information is then published in the header of the bus packets +# so that other nodes will be able to correctly map the address of the node +# publishing the information. +# +# If the above options are not used, the normal Redis Cluster auto-detection +# will be used instead. +# +# Note that when remapped, the bus port may not be at the fixed offset of +# clients port + 10000, so you can specify any port and bus-port depending +# on how they get remapped. If the bus-port is not set, a fixed offset of +# 10000 will be used as usually. +# +# Example: +# +# cluster-announce-ip 10.1.1.5 +# cluster-announce-port 6379 +# cluster-announce-bus-port 6380 + +################################## SLOW LOG ################################### + +# The Redis Slow Log is a system to log queries that exceeded a specified +# execution time. The execution time does not include the I/O operations +# like talking with the client, sending the reply and so forth, +# but just the time needed to actually execute the command (this is the only +# stage of command execution where the thread is blocked and can not serve +# other requests in the meantime). +# +# You can configure the slow log with two parameters: one tells Redis +# what is the execution time, in microseconds, to exceed in order for the +# command to get logged, and the other parameter is the length of the +# slow log. When a new command is logged the oldest one is removed from the +# queue of logged commands. + +# The following time is expressed in microseconds, so 1000000 is equivalent +# to one second. Note that a negative number disables the slow log, while +# a value of zero forces the logging of every command. +slowlog-log-slower-than 10000 + +# There is no limit to this length. Just be aware that it will consume memory. +# You can reclaim memory used by the slow log with SLOWLOG RESET. +slowlog-max-len 128 + +################################ LATENCY MONITOR ############################## + +# The Redis latency monitoring subsystem samples different operations +# at runtime in order to collect data related to possible sources of +# latency of a Redis instance. +# +# Via the LATENCY command this information is available to the user that can +# print graphs and obtain reports. +# +# The system only logs operations that were performed in a time equal or +# greater than the amount of milliseconds specified via the +# latency-monitor-threshold configuration directive. When its value is set +# to zero, the latency monitor is turned off. +# +# By default latency monitoring is disabled since it is mostly not needed +# if you don't have latency issues, and collecting data has a performance +# impact, that while very small, can be measured under big load. Latency +# monitoring can easily be enabled at runtime using the command +# "CONFIG SET latency-monitor-threshold " if needed. +latency-monitor-threshold 0 + +############################# EVENT NOTIFICATION ############################## + +# Redis can notify Pub/Sub clients about events happening in the key space. +# This feature is documented at http://redis.io/topics/notifications +# +# For instance if keyspace events notification is enabled, and a client +# performs a DEL operation on key "foo" stored in the Database 0, two +# messages will be published via Pub/Sub: +# +# PUBLISH __keyspace@0__:foo del +# PUBLISH __keyevent@0__:del foo +# +# It is possible to select the events that Redis will notify among a set +# of classes. Every class is identified by a single character: +# +# K Keyspace events, published with __keyspace@__ prefix. +# E Keyevent events, published with __keyevent@__ prefix. +# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... +# $ String commands +# l List commands +# s Set commands +# h Hash commands +# z Sorted set commands +# x Expired events (events generated every time a key expires) +# e Evicted events (events generated when a key is evicted for maxmemory) +# A Alias for g$lshzxe, so that the "AKE" string means all the events. +# +# The "notify-keyspace-events" takes as argument a string that is composed +# of zero or multiple characters. The empty string means that notifications +# are disabled. +# +# Example: to enable list and generic events, from the point of view of the +# event name, use: +# +# notify-keyspace-events Elg +# +# Example 2: to get the stream of the expired keys subscribing to channel +# name __keyevent@0__:expired use: +# +# notify-keyspace-events Ex +# +# By default all notifications are disabled because most users don't need +# this feature and the feature has some overhead. Note that if you don't +# specify at least one of K or E, no events will be delivered. +notify-keyspace-events "" + +############################### ADVANCED CONFIG ############################### + +# Hashes are encoded using a memory efficient data structure when they have a +# small number of entries, and the biggest entry does not exceed a given +# threshold. These thresholds can be configured using the following directives. +hash-max-ziplist-entries 512 +hash-max-ziplist-value 64 + +# Lists are also encoded in a special way to save a lot of space. +# The number of entries allowed per internal list node can be specified +# as a fixed maximum size or a maximum number of elements. +# For a fixed maximum size, use -5 through -1, meaning: +# -5: max size: 64 Kb <-- not recommended for normal workloads +# -4: max size: 32 Kb <-- not recommended +# -3: max size: 16 Kb <-- probably not recommended +# -2: max size: 8 Kb <-- good +# -1: max size: 4 Kb <-- good +# Positive numbers mean store up to _exactly_ that number of elements +# per list node. +# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size), +# but if your use case is unique, adjust the settings as necessary. +list-max-ziplist-size -2 + +# Lists may also be compressed. +# Compress depth is the number of quicklist ziplist nodes from *each* side of +# the list to *exclude* from compression. The head and tail of the list +# are always uncompressed for fast push/pop operations. Settings are: +# 0: disable all list compression +# 1: depth 1 means "don't start compressing until after 1 node into the list, +# going from either the head or tail" +# So: [head]->node->node->...->node->[tail] +# [head], [tail] will always be uncompressed; inner nodes will compress. +# 2: [head]->[next]->node->node->...->node->[prev]->[tail] +# 2 here means: don't compress head or head->next or tail->prev or tail, +# but compress all nodes between them. +# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail] +# etc. +list-compress-depth 0 + +# Sets have a special encoding in just one case: when a set is composed +# of just strings that happen to be integers in radix 10 in the range +# of 64 bit signed integers. +# The following configuration setting sets the limit in the size of the +# set in order to use this special memory saving encoding. +set-max-intset-entries 512 + +# Similarly to hashes and lists, sorted sets are also specially encoded in +# order to save a lot of space. This encoding is only used when the length and +# elements of a sorted set are below the following limits: +zset-max-ziplist-entries 128 +zset-max-ziplist-value 64 + +# HyperLogLog sparse representation bytes limit. The limit includes the +# 16 bytes header. When an HyperLogLog using the sparse representation crosses +# this limit, it is converted into the dense representation. +# +# A value greater than 16000 is totally useless, since at that point the +# dense representation is more memory efficient. +# +# The suggested value is ~ 3000 in order to have the benefits of +# the space efficient encoding without slowing down too much PFADD, +# which is O(N) with the sparse encoding. The value can be raised to +# ~ 10000 when CPU is not a concern, but space is, and the data set is +# composed of many HyperLogLogs with cardinality in the 0 - 15000 range. +hll-sparse-max-bytes 3000 + +# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in +# order to help rehashing the main Redis hash table (the one mapping top-level +# keys to values). The hash table implementation Redis uses (see dict.c) +# performs a lazy rehashing: the more operation you run into a hash table +# that is rehashing, the more rehashing "steps" are performed, so if the +# server is idle the rehashing is never complete and some more memory is used +# by the hash table. +# +# The default is to use this millisecond 10 times every second in order to +# actively rehash the main dictionaries, freeing memory when possible. +# +# If unsure: +# use "activerehashing no" if you have hard latency requirements and it is +# not a good thing in your environment that Redis can reply from time to time +# to queries with 2 milliseconds delay. +# +# use "activerehashing yes" if you don't have such hard requirements but +# want to free memory asap when possible. +activerehashing yes + +# The client output buffer limits can be used to force disconnection of clients +# that are not reading data from the server fast enough for some reason (a +# common reason is that a Pub/Sub client can't consume messages as fast as the +# publisher can produce them). +# +# The limit can be set differently for the three different classes of clients: +# +# normal -> normal clients including MONITOR clients +# slave -> slave clients +# pubsub -> clients subscribed to at least one pubsub channel or pattern +# +# The syntax of every client-output-buffer-limit directive is the following: +# +# client-output-buffer-limit +# +# A client is immediately disconnected once the hard limit is reached, or if +# the soft limit is reached and remains reached for the specified number of +# seconds (continuously). +# So for instance if the hard limit is 32 megabytes and the soft limit is +# 16 megabytes / 10 seconds, the client will get disconnected immediately +# if the size of the output buffers reach 32 megabytes, but will also get +# disconnected if the client reaches 16 megabytes and continuously overcomes +# the limit for 10 seconds. +# +# By default normal clients are not limited because they don't receive data +# without asking (in a push way), but just after a request, so only +# asynchronous clients may create a scenario where data is requested faster +# than it can read. +# +# Instead there is a default limit for pubsub and slave clients, since +# subscribers and slaves receive data in a push fashion. +# +# Both the hard or the soft limit can be disabled by setting them to zero. +client-output-buffer-limit normal 0 0 0 +client-output-buffer-limit slave 256mb 64mb 60 +client-output-buffer-limit pubsub 32mb 8mb 60 + +# Client query buffers accumulate new commands. They are limited to a fixed +# amount by default in order to avoid that a protocol desynchronization (for +# instance due to a bug in the client) will lead to unbound memory usage in +# the query buffer. However you can configure it here if you have very special +# needs, such us huge multi/exec requests or alike. +# +# client-query-buffer-limit 1gb + +# In the Redis protocol, bulk requests, that are, elements representing single +# strings, are normally limited ot 512 mb. However you can change this limit +# here. +# +# proto-max-bulk-len 512mb + +# Redis calls an internal function to perform many background tasks, like +# closing connections of clients in timeout, purging expired keys that are +# never requested, and so forth. +# +# Not all tasks are performed with the same frequency, but Redis checks for +# tasks to perform according to the specified "hz" value. +# +# By default "hz" is set to 10. Raising the value will use more CPU when +# Redis is idle, but at the same time will make Redis more responsive when +# there are many keys expiring at the same time, and timeouts may be +# handled with more precision. +# +# The range is between 1 and 500, however a value over 100 is usually not +# a good idea. Most users should use the default of 10 and raise this up to +# 100 only in environments where very low latency is required. +hz 10 + +# When a child rewrites the AOF file, if the following option is enabled +# the file will be fsync-ed every 32 MB of data generated. This is useful +# in order to commit the file to the disk more incrementally and avoid +# big latency spikes. +aof-rewrite-incremental-fsync yes + +# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good +# idea to start with the default settings and only change them after investigating +# how to improve the performances and how the keys LFU change over time, which +# is possible to inspect via the OBJECT FREQ command. +# +# There are two tunable parameters in the Redis LFU implementation: the +# counter logarithm factor and the counter decay time. It is important to +# understand what the two parameters mean before changing them. +# +# The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis +# uses a probabilistic increment with logarithmic behavior. Given the value +# of the old counter, when a key is accessed, the counter is incremented in +# this way: +# +# 1. A random number R between 0 and 1 is extracted. +# 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1). +# 3. The counter is incremented only if R < P. +# +# The default lfu-log-factor is 10. This is a table of how the frequency +# counter changes with a different number of accesses with different +# logarithmic factors: +# +# +--------+------------+------------+------------+------------+------------+ +# | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits | +# +--------+------------+------------+------------+------------+------------+ +# | 0 | 104 | 255 | 255 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 1 | 18 | 49 | 255 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 10 | 10 | 18 | 142 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 100 | 8 | 11 | 49 | 143 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# +# NOTE: The above table was obtained by running the following commands: +# +# redis-benchmark -n 1000000 incr foo +# redis-cli object freq foo +# +# NOTE 2: The counter initial value is 5 in order to give new objects a chance +# to accumulate hits. +# +# The counter decay time is the time, in minutes, that must elapse in order +# for the key counter to be divided by two (or decremented if it has a value +# less <= 10). +# +# The default value for the lfu-decay-time is 1. A Special value of 0 means to +# decay the counter every time it happens to be scanned. +# +# lfu-log-factor 10 +# lfu-decay-time 1 + +########################### ACTIVE DEFRAGMENTATION ####################### +# +# WARNING THIS FEATURE IS EXPERIMENTAL. However it was stress tested +# even in production and manually tested by multiple engineers for some +# time. +# +# What is active defragmentation? +# ------------------------------- +# +# Active (online) defragmentation allows a Redis server to compact the +# spaces left between small allocations and deallocations of data in memory, +# thus allowing to reclaim back memory. +# +# Fragmentation is a natural process that happens with every allocator (but +# less so with Jemalloc, fortunately) and certain workloads. Normally a server +# restart is needed in order to lower the fragmentation, or at least to flush +# away all the data and create it again. However thanks to this feature +# implemented by Oran Agra for Redis 4.0 this process can happen at runtime +# in an "hot" way, while the server is running. +# +# Basically when the fragmentation is over a certain level (see the +# configuration options below) Redis will start to create new copies of the +# values in contiguous memory regions by exploiting certain specific Jemalloc +# features (in order to understand if an allocation is causing fragmentation +# and to allocate it in a better place), and at the same time, will release the +# old copies of the data. This process, repeated incrementally for all the keys +# will cause the fragmentation to drop back to normal values. +# +# Important things to understand: +# +# 1. This feature is disabled by default, and only works if you compiled Redis +# to use the copy of Jemalloc we ship with the source code of Redis. +# This is the default with Linux builds. +# +# 2. You never need to enable this feature if you don't have fragmentation +# issues. +# +# 3. Once you experience fragmentation, you can enable this feature when +# needed with the command "CONFIG SET activedefrag yes". +# +# The configuration parameters are able to fine tune the behavior of the +# defragmentation process. If you are not sure about what they mean it is +# a good idea to leave the defaults untouched. + +# Enabled active defragmentation +# activedefrag yes + +# Minimum amount of fragmentation waste to start active defrag +# active-defrag-ignore-bytes 100mb + +# Minimum percentage of fragmentation to start active defrag +# active-defrag-threshold-lower 10 + +# Maximum percentage of fragmentation at which we use maximum effort +# active-defrag-threshold-upper 100 + +# Minimal effort for defrag in CPU percentage +# active-defrag-cycle-min 25 + +# Maximal effort for defrag in CPU percentage +# active-defrag-cycle-max 75 diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.service b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.service new file mode 100644 index 0000000000..a52204cc70 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.3/redis.service @@ -0,0 +1,16 @@ +[Unit] +Description=Redis In-Memory Data Store +After=network.target + +[Service] +User=redis +Group=redis +ExecStart=/usr/bin/redis-server /etc/redis/redis.conf +ExecStop=/usr/bin/redis-cli shutdown +Restart=always +LimitNOFILE=10032 +Type=notify + +[Install] +WantedBy=multi-user.target + diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.2.bb b/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.2.bb deleted file mode 100644 index 44fb01bc85..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.2.bb +++ /dev/null @@ -1,70 +0,0 @@ -SUMMARY = "Redis key-value store" -DESCRIPTION = "Redis is an open source, advanced key-value store." -HOMEPAGE = "http://redis.io" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" -DEPENDS = "readline lua ncurses" - -SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ - file://redis.conf \ - file://init-redis-server \ - file://redis.service \ - file://hiredis-use-default-CC-if-it-is-set.patch \ - file://lua-update-Makefile-to-use-environment-build-setting.patch \ - file://oe-use-libc-malloc.patch \ - file://0001-src-Do-not-reset-FINAL_LIBS.patch \ - file://GNU_SOURCE-7.patch \ - file://0006-Define-correct-gregs-for-RISCV32.patch \ - " -SRC_URI[sha256sum] = "ca999be08800edc6d265379c4c7aafad92f0ee400692e4e2d69829ab4b4c3d08" - -inherit autotools-brokensep update-rc.d systemd useradd - -FINAL_LIBS:x86:toolchain-clang = "-latomic" -FINAL_LIBS:riscv32:toolchain-clang = "-latomic" -FINAL_LIBS:mips = "-latomic" -FINAL_LIBS:arm = "-latomic" -FINAL_LIBS:powerpc = "-latomic" - -export FINAL_LIBS - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" -GROUPADD_PARAM:${PN} = "--system redis" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "USE_SYSTEMD=yes,USE_SYSTEMD=no,systemd" - -EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" - -do_compile:prepend() { - (cd deps && oe_runmake hiredis lua linenoise) -} - -do_install() { - export PREFIX=${D}/${prefix} - oe_runmake install - install -d ${D}/${sysconfdir}/redis - install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server - install -d ${D}/var/lib/redis/ - chown redis.redis ${D}/var/lib/redis/ - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf - sed -i 's!supervised no!supervised systemd!' ${D}/${sysconfdir}/redis/redis.conf - fi -} - -CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" - -INITSCRIPT_NAME = "redis-server" -INITSCRIPT_PARAMS = "defaults 87" - -SYSTEMD_SERVICE:${PN} = "redis.service" diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.3.bb b/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.3.bb new file mode 100644 index 0000000000..7fa0e6372a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.3.bb @@ -0,0 +1,70 @@ +SUMMARY = "Redis key-value store" +DESCRIPTION = "Redis is an open source, advanced key-value store." +HOMEPAGE = "http://redis.io" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" +DEPENDS = "readline lua ncurses" + +SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ + file://redis.conf \ + file://init-redis-server \ + file://redis.service \ + file://hiredis-use-default-CC-if-it-is-set.patch \ + file://lua-update-Makefile-to-use-environment-build-setting.patch \ + file://oe-use-libc-malloc.patch \ + file://0001-src-Do-not-reset-FINAL_LIBS.patch \ + file://GNU_SOURCE-7.patch \ + file://0006-Define-correct-gregs-for-RISCV32.patch \ + " +SRC_URI[sha256sum] = "3e2b196d6eb4ddb9e743088bfc2915ccbb42d40f5a8a3edd8cb69c716ec34be7" + +inherit autotools-brokensep pkgconfig update-rc.d systemd useradd + +FINAL_LIBS:x86:toolchain-clang = "-latomic" +FINAL_LIBS:riscv32:toolchain-clang = "-latomic" +FINAL_LIBS:mips = "-latomic" +FINAL_LIBS:arm = "-latomic" +FINAL_LIBS:powerpc = "-latomic" + +export FINAL_LIBS + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" +GROUPADD_PARAM:${PN} = "--system redis" + +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "USE_SYSTEMD=yes,USE_SYSTEMD=no,systemd" + +EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" + +do_compile:prepend() { + (cd deps && oe_runmake hiredis lua linenoise) +} + +do_install() { + export PREFIX=${D}/${prefix} + oe_runmake install + install -d ${D}/${sysconfdir}/redis + install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server + install -d ${D}/var/lib/redis/ + chown redis.redis ${D}/var/lib/redis/ + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf + sed -i 's!supervised no!supervised systemd!' ${D}/${sysconfdir}/redis/redis.conf + fi +} + +CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" + +INITSCRIPT_NAME = "redis-server" +INITSCRIPT_PARAMS = "defaults 87" + +SYSTEMD_SERVICE:${PN} = "redis.service" diff --git a/meta-openembedded/meta-oe/recipes-extended/tmate/files/0001-fix-finding-msgpack.patch b/meta-openembedded/meta-oe/recipes-extended/tmate/files/0001-fix-finding-msgpack.patch new file mode 100644 index 0000000000..46463abbc4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/tmate/files/0001-fix-finding-msgpack.patch @@ -0,0 +1,43 @@ +From 26a5aa6f70a0b98962884559668b3879dfe6fd02 Mon Sep 17 00:00:00 2001 +From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> +Date: Tue, 28 Nov 2023 12:32:51 +0300 +Subject: [PATCH] Fix finding msgpack 6+ + +msgpack.pc was renamed to msgpack-c.pc upstream in msgpack/msgpack-c#1053. + +Upstream-Status: Submitted [https://github.com/tmate-io/tmate/pull/281] + +Co-authored-by: Sam James +Signed-off-by: alperak +--- + configure.ac | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 028d5559..3badf9e2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -207,7 +207,19 @@ PKG_CHECK_MODULES( + LIBS="$MSGPACK_LIBS $LIBS" + found_msgpack=yes + ], +- found_msgpack=no ++ [ ++ # msgpack.pc was renamed to msgpack-c.pc in 6.0.0. ++ PKG_CHECK_MODULES( ++ MSGPACKC, ++ msgpack-c >= 1.1.0, ++ [ ++ CPPFLAGS="$MSGPACKC_CFLAGS $CPPFLAGS" ++ LIBS="$MSGPACKC_LIBS $LIBS" ++ found_msgpack=yes ++ ], ++ found_msgpack=no ++ ) ++ ] + ) + if test "x$found_msgpack" = xno; then + AC_MSG_ERROR("msgpack >= 1.1.0 not found") +-- +2.25.1 + diff --git a/meta-openembedded/meta-oe/recipes-extended/tmate/tmate_2.4.0.bb b/meta-openembedded/meta-oe/recipes-extended/tmate/tmate_2.4.0.bb index 53030f2779..4e66d8d05a 100644 --- a/meta-openembedded/meta-oe/recipes-extended/tmate/tmate_2.4.0.bb +++ b/meta-openembedded/meta-oe/recipes-extended/tmate/tmate_2.4.0.bb @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f7d9aab84ec6567139a4755c48d147fb" DEPENDS:append = " libevent libssh msgpack-c ncurses" SRC_URI = "\ git://github.com/tmate-io/tmate.git;protocol=https;branch=master \ + file://0001-fix-finding-msgpack.patch \ " SRCREV = "5e00bfa5e137e76c81888727712ced2b3fd99f5b" diff --git a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/cve-2012-2738.patch b/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/cve-2012-2738.patch deleted file mode 100644 index 9b9980397a..0000000000 --- a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/cve-2012-2738.patch +++ /dev/null @@ -1,136 +0,0 @@ -Upstream-Status: Backport -CVE: CVE-2012-2738 -Signed-off-by: Ross Burton - -From e524b0b3bd8fad844ffa73927c199545b892cdbd Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Sat, 19 May 2012 19:36:09 +0200 -Subject: [PATCH 1/2] emulation: Limit integer arguments to 65535 - -To guard against malicious sequences containing excessively big numbers, -limit all parsed numbers to 16 bit range. Doing this here in the parsing -routine is a catch-all guard; this doesn't preclude enforcing -more stringent limits in the handlers themselves. - -https://bugzilla.gnome.org/show_bug.cgi?id=676090 ---- - src/table.c | 2 +- - src/vteseq.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/table.c b/src/table.c -index 140e8c8..85cf631 100644 ---- a/src/table.c -+++ b/src/table.c -@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array, - if (G_UNLIKELY (*array == NULL)) { - *array = g_value_array_new(1); - } -- g_value_set_long(&value, total); -+ g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT)); - g_value_array_append(*array, &value); - } while (i++ < arginfo->length); - g_value_unset(&value); -diff --git a/src/vteseq.c b/src/vteseq.c -index 7ef4c8c..10991db 100644 ---- a/src/vteseq.c -+++ b/src/vteseq.c -@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal, - GValueArray *params, - VteTerminalSequenceHandler handler) - { -- vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG); -+ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT); - } - - static void --- -2.4.9 (Apple Git-60) - - -From cf1ad453a8def873c49cf6d88162593402f32bb2 Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Sat, 19 May 2012 20:04:12 +0200 -Subject: [PATCH 2/2] emulation: Limit repetitions - -Don't allow malicious sequences to cause excessive repetitions. - -https://bugzilla.gnome.org/show_bug.cgi?id=676090 ---- - src/vteseq.c | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/src/vteseq.c b/src/vteseq.c -index 10991db..209522f 100644 ---- a/src/vteseq.c -+++ b/src/vteseq.c -@@ -1392,7 +1392,7 @@ vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params) - static void - vte_sequence_handler_DC (VteTerminal *terminal, GValueArray *params) - { -- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_dc); -+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_dc); - } - - /* Delete a line at the current cursor position. */ -@@ -1785,7 +1785,7 @@ vte_sequence_handler_reverse_index (VteTerminal *terminal, GValueArray *params) - static void - vte_sequence_handler_RI (VteTerminal *terminal, GValueArray *params) - { -- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_nd); -+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_nd); - } - - /* Save cursor (position). */ -@@ -2777,8 +2777,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params) - { - GValue *value; - VteScreen *screen; -- long param, end, row; -- int i; -+ long param, end, row, i, limit; - screen = terminal->pvt->screen; - /* The default is one. */ - param = 1; -@@ -2796,7 +2795,13 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params) - } else { - end = screen->insert_delta + terminal->row_count - 1; - } -- /* Insert the new lines at the cursor. */ -+ -+ /* Only allow to insert as many lines as there are between this row -+ * and the end of the scrolling region. See bug #676090. -+ */ -+ limit = end - row + 1; -+ param = MIN (param, limit); -+ - for (i = 0; i < param; i++) { - /* Clear a line off the end of the region and add one to the - * top of the region. */ -@@ -2817,8 +2822,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params) - { - GValue *value; - VteScreen *screen; -- long param, end, row; -- int i; -+ long param, end, row, i, limit; - - screen = terminal->pvt->screen; - /* The default is one. */ -@@ -2837,6 +2841,13 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params) - } else { - end = screen->insert_delta + terminal->row_count - 1; - } -+ -+ /* Only allow to delete as many lines as there are between this row -+ * and the end of the scrolling region. See bug #676090. -+ */ -+ limit = end - row + 1; -+ param = MIN (param, limit); -+ - /* Clear them from below the current cursor. */ - for (i = 0; i < param; i++) { - /* Insert a line at the end of the region and remove one from --- -2.4.9 (Apple Git-60) - diff --git a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/obsolete_automake_macros.patch b/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/obsolete_automake_macros.patch deleted file mode 100644 index 6763d37540..0000000000 --- a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9/obsolete_automake_macros.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=691545] - -Signed-off-by: Marko Lindqvist -diff -Nurd vte-0.28.2/gnome-pty-helper/configure.in vte-0.28.2/gnome-pty-helper/configure.in ---- vte-0.28.2/gnome-pty-helper/configure.in 2010-07-15 20:08:44.000000000 +0300 -+++ vte-0.28.2/gnome-pty-helper/configure.in 2013-01-11 14:50:34.971027440 +0200 -@@ -8,7 +8,6 @@ - AC_ISC_POSIX - AC_PROG_CC - AC_STDC_HEADERS --AM_PROG_CC_STDC - - if test -z "$enable_maintainer_mode"; then - enable_maintainer_mode=yes diff --git a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9_0.74.1.bb b/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9_0.74.1.bb deleted file mode 100644 index a10b917394..0000000000 --- a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9_0.74.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Virtual terminal emulator GTK+ widget library" -BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte" -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING.LGPL3;md5=b52f2d57d10c4f7ee67a7eb9615d5d24" - -DEPENDS = "glib-2.0-native glib-2.0 gnutls gtk+3 gtk4 intltool-native gnome-common-native ncurses" - -# help gnomebase get the SRC_URI correct -GNOMEBN = "vte" -S = "${WORKDIR}/vte-${PV}" - -SRC_URI[archive.sha256sum] = "2328c3f1c998350a18e0e513348e9fc581d57ea4e7b89aedf11e0e3c65042b4f" - -inherit gnomebase gi-docgen gobject-introspection features_check systemd upstream-version-is-even vala -ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" -GIR_MESON_OPTION = "gir" -GIDOCGEN_MESON_OPTION = "docs" - -PACKAGECONFIG ?= "gnutls ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" -PACKAGECONFIG[fribidi] = "-Dfribidi=true,-Dfribidi=false,fribidi" -PACKAGECONFIG[systemd] = "-D_systemd=true,-D_systemd=false," - -CFLAGS += "-D_GNU_SOURCE" - -PACKAGES =+ "libvte9 vte9-termcap" -FILES:libvte9 = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper ${datadir}/glade ${systemd_user_unitdir}" -FILES:vte9-termcap = "${datadir}/vte/termcap-0.0" - -RDEPENDS:libvte = "vte-termcap" diff --git a/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.4.bb b/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.4.bb deleted file mode 100644 index 25b16121e8..0000000000 --- a/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.4.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "dnfdragora is a DNF frontend, based on rpmdragora from Mageia (originally rpmdrake) Perl code." -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ - " - -SRC_URI = "git://github.com/manatools/dnfdragora.git;branch=master;protocol=https \ - file://0001-disable-build-manpages.patch \ - file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0001-To-fix-error-when-do_package.patch \ - " - -SRCREV = "e38e1127e56f5c7cc38e22c6dd4c2728fc4f0b3c" - -S = "${WORKDIR}/git" - -inherit cmake gettext pkgconfig python3-dir python3native setuptools3-base mime-xdg - -DEPENDS += "dnf python3 " -#DEPENDS:class-nativesdk += "nativesdk-python3" - -RDEPENDS:${PN}:class-target = " python3-core libyui libyui-ncurses " - -# manpages generation requires http://www.sphinx-doc.org/ -EXTRA_OECMAKE = " -DWITH_MAN=OFF -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" - -BBCLASSEXTEND = "nativesdk" - -FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/ ${datadir}/ ${bindir}/ ${sysconfdir}/dnfdragora ${sysconfdir}/xdg" - -SKIP_RECIPE[dnfdragora] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}" - diff --git a/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.5.bb b/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.5.bb new file mode 100644 index 0000000000..1d6ffa3312 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_2.1.5.bb @@ -0,0 +1,31 @@ +SUMMARY = "dnfdragora is a DNF frontend, based on rpmdragora from Mageia (originally rpmdrake) Perl code." +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ + " + +SRC_URI = "git://github.com/manatools/dnfdragora.git;branch=master;protocol=https \ + file://0001-disable-build-manpages.patch \ + file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ + file://0001-To-fix-error-when-do_package.patch \ + " + +SRCREV = "d808904fc6082578c02d7c8bf543380ed447e925" + +S = "${WORKDIR}/git" + +inherit cmake gettext pkgconfig python3-dir python3native setuptools3-base mime-xdg + +DEPENDS += "dnf python3 " +#DEPENDS:class-nativesdk += "nativesdk-python3" + +RDEPENDS:${PN}:class-target = " python3-core libyui libyui-ncurses " + +# manpages generation requires http://www.sphinx-doc.org/ +EXTRA_OECMAKE = " -DWITH_MAN=OFF -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" + +BBCLASSEXTEND = "nativesdk" + +FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/ ${datadir}/ ${bindir}/ ${sysconfdir}/dnfdragora ${sysconfdir}/xdg" + +SKIP_RECIPE[dnfdragora] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}" + diff --git a/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb b/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb deleted file mode 100644 index c885a00c5b..0000000000 --- a/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2022 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library" -HOMEPAGE = "https://github.com/fontforge/libspiro" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz" -SRC_URI[sha256sum] = "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49" - -inherit autotools - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb b/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb new file mode 100644 index 0000000000..0adac8464e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb @@ -0,0 +1,14 @@ +# Copyright (C) 2022 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library" +HOMEPAGE = "https://github.com/fontforge/libspiro" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "https://github.com/fontforge/libspiro/releases/download/${PV}/libspiro-dist-${PV}.tar.gz" +SRC_URI[sha256sum] = "5984fb5af3e4e1f927f3a74850b705a711fb86284802a5e6170b09786440e8be" + +inherit autotools + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.111.bb b/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.111.bb deleted file mode 100644 index eee9de7497..0000000000 --- a/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.111.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "VCD (Value Change Dump) file waveform viewer" -DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) " -HOMEPAGE = "http://gtkwave.sourceforge.net/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" - -SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz" -SRC_URI[sha256sum] = "b4e1c2f718fb3c4b4f412a220876b9da599fe11745fb6f7eb4aed107b1106233" -S = "${WORKDIR}/${BPN}-gtk3-${PV}" - -DEPENDS = " \ - gperf-native \ - gtk+3 \ - gdk-pixbuf \ - tcl \ - tk \ - bzip2 \ - xz \ - pango \ - zlib \ -" - -inherit pkgconfig autotools gettext texinfo mime mime-xdg - -inherit features_check -# depends on gtk+3 which has this restriction -# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10 -# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29) -# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them) -REQUIRED_DISTRO_FEATURES = "wayland x11" - -EXTRA_OECONF = " \ - --enable-gtk3 \ - --with-tcl=${STAGING_BINDIR_CROSS} \ - --with-tk=${STAGING_BINDIR_CROSS} \ - --with-tirpc \ - --disable-mime-update \ -" - -FILES:${PN} = "${bindir} ${datadir}" - -RDEPENDS:${PN} += "tk-lib" diff --git a/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.117.bb b/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.117.bb new file mode 100644 index 0000000000..d23d89f2b1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.117.bb @@ -0,0 +1,44 @@ +SUMMARY = "VCD (Value Change Dump) file waveform viewer" +DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) " +HOMEPAGE = "http://gtkwave.sourceforge.net/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" + +SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz" +SRC_URI[sha256sum] = "3cf1537586a911cbb0601af8fa18cf6da708c8a14a71f69ce3cb9118e8571db9" +S = "${WORKDIR}/${BPN}-gtk3-${PV}" + +DEPENDS = " \ + gperf-native \ + gtk+3 \ + gdk-pixbuf \ + tcl \ + tk \ + bzip2 \ + xz \ + pango \ + zlib \ +" + +inherit pkgconfig autotools gettext texinfo mime mime-xdg + +inherit features_check +# depends on gtk+3 which has this restriction +# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10 +# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29) +# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them) +REQUIRED_DISTRO_FEATURES = "wayland x11" + +EXTRA_OECONF = " \ + --enable-gtk3 \ + --with-tcl=${STAGING_BINDIR_CROSS} \ + --with-tk=${STAGING_BINDIR_CROSS} \ + --with-tirpc \ + --disable-mime-update \ +" + +FILES:${PN} = "${bindir} ${datadir}" + +RDEPENDS:${PN} += "tk-lib" diff --git a/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.0.bb b/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.0.bb deleted file mode 100644 index 7c1ebc159c..0000000000 --- a/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "libdecor - A client-side decorations library for Wayland clients" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7ae2be7fb1637141840314b51970a9f7" - -SRC_URI = " \ - git://gitlab.freedesktop.org/libdecor/libdecor.git;protocol=https;branch=master \ -" - -DEPENDS = " \ - cairo \ - pango \ - wayland \ - wayland-native \ - wayland-protocols \ -" - -S = "${WORKDIR}/git" -SRCREV = "ad320fc0e0ec2cd75a87fed454a9c7d6d1921464" - -PACKAGECONFIG ?= "dbus ${@bb.utils.filter('DISTRO_FEATURES', 'gtk+3', d)}" - -PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus" -PACKAGECONFIG[demo] = "-Ddemo=true,-Ddemo=false,virtual/libegl libxkbcommon" -PACKAGECONFIG[install_demo] = "-Dinstall_demo=true,-Dinstall_demo=false" -PACKAGECONFIG[gtk+3] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3" - -inherit meson pkgconfig - -EXTRA_OEMESON += "--buildtype release" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.1.bb b/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.1.bb new file mode 100644 index 0000000000..4c9c64c28a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/libdecor/libdecor_0.2.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "libdecor - A client-side decorations library for Wayland clients" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7ae2be7fb1637141840314b51970a9f7" + +SRC_URI = " \ + git://gitlab.freedesktop.org/libdecor/libdecor.git;protocol=https;branch=master \ +" + +DEPENDS = " \ + cairo \ + pango \ + wayland \ + wayland-native \ + wayland-protocols \ +" + +S = "${WORKDIR}/git" +SRCREV = "060fe7611aedb5779929e6b1468419c2d4e7168f" + +PACKAGECONFIG ?= "dbus ${@bb.utils.filter('DISTRO_FEATURES', 'gtk+3', d)}" + +PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus" +PACKAGECONFIG[demo] = "-Ddemo=true,-Ddemo=false,virtual/libegl libxkbcommon" +PACKAGECONFIG[install_demo] = "-Dinstall_demo=true,-Dinstall_demo=false" +PACKAGECONFIG[gtk+3] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3" + +inherit meson pkgconfig + +EXTRA_OEMESON += "--buildtype release" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.2.bb b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.2.bb deleted file mode 100644 index 8dbf7933bb..0000000000 --- a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.2.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Library for BPF handling" -DESCRIPTION = "Library for BPF handling" -HOMEPAGE = "https://github.com/libbpf/libbpf" -SECTION = "libs" -LICENSE = "LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = "file://../LICENSE.LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" - -DEPENDS = "zlib elfutils" - -SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https;branch=libbpf-v1.2.2-bugfix" -SRCREV = "1728e3e4bef0e138ea95ffe62163eb9a6ac6fa32" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|riscv64|powerpc|powerpc64|mips64).*-linux" - -S = "${WORKDIR}/git/src" - -EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" -EXTRA_OEMAKE:append:class-native = " UAPIDIR=${includedir}" - -inherit pkgconfig - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake install -} - -do_install:append:class-native() { - oe_runmake install_uapi_headers -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.3.0.bb b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.3.0.bb new file mode 100644 index 0000000000..9b8ca07fe7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.3.0.bb @@ -0,0 +1,36 @@ +SUMMARY = "Library for BPF handling" +DESCRIPTION = "Library for BPF handling" +HOMEPAGE = "https://github.com/libbpf/libbpf" +SECTION = "libs" +LICENSE = "LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "file://../LICENSE.LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" + +DEPENDS = "zlib elfutils" + +SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https;branch=master" +SRCREV = "20c0a9e3d7e7d4aeb283eae982543c9cacc29477" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|riscv64|powerpc|powerpc64|mips64).*-linux" + +S = "${WORKDIR}/git/src" + +EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" +EXTRA_OEMAKE:append:class-native = " UAPIDIR=${includedir}" + +inherit pkgconfig + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install +} + +do_install:append:class-native() { + oe_runmake install_uapi_headers +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters/fix-make-race.patch b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters/fix-make-race.patch new file mode 100644 index 0000000000..9a4e31c1d2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters/fix-make-race.patch @@ -0,0 +1,33 @@ +From 7aba7c690fd84ca1e48d0cb6829410eeb658c594 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Fri, 24 Nov 2023 17:53:49 +0100 +Subject: [PATCH] Fix a Makefile race condition + +utils/driverless-fax script may be written before utils directory was created + +| make[2]: Entering directory '/home/flk/poky/build/tmp/work/corei7-64-poky-linux/cups-filters/2.0.0/build' +| sed \ +| -e "s|\@CUPS_SERVERBIN\@|/usr/libexec/cups|" \ +| ../cups-filters-2.0.0/utils/driverless-fax.in > utils/driverless-fax +| /bin/bash: line 2: utils/driverless-fax: No such file or directory + +Upstream-Status: Pending +--- + Makefile.am | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/Makefile.am 2023-09-22 18:14:03.000000000 +0200 ++++ b/Makefile.am 2023-11-24 19:09:09.339653936 +0100 +@@ -62,7 +62,7 @@ + # "driverless" utility + # ==================== + utils/driverless-fax: utils/driverless-fax.in Makefile +- sed \ ++ mkdir -p utils && sed \ + -e "s|\@CUPS_SERVERBIN\@|$(CUPS_SERVERBIN)|" \ + $< > $@ + + + + + diff --git a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb index 0370ae79d2..efcd1aab8a 100644 --- a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb +++ b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb @@ -5,7 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6d5b952b53dbe7752199903d082e5f07" DEPENDS = "libcupsfilters libppd glib-2.0 poppler" -SRC_URI = "https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz" +SRC_URI = " \ + https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://fix-make-race.patch \ +" SRC_URI[sha256sum] = "b5152e3dd148ed73835827ac2f219df7cf5808dbf9dbaec2aa0127b44de800d8" inherit autotools gettext pkgconfig github-releases diff --git a/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb b/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb deleted file mode 100644 index 2fcdb6bd61..0000000000 --- a/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "TOMOYO Linux tools" -DESCRIPTION = "TOMOYO Linux is a Mandatory Access Control (MAC) implementation \ -for Linux that can be used to increase the security of a system, while also \ -being useful purely as a system analysis tool." -HOMEPAGE = "http://tomoyo.sourceforge.jp/" -SECTION = "System Environment/Kernel" - -SRC_URI = "http://jaist.dl.sourceforge.jp/tomoyo/53357/${BP}-20170102.tar.gz" -SRC_URI[sha256sum] = "00fedfac5e514321250bbe69eaccc732c8a8158596f77a785c2e3ae9f9968283" - -S = "${WORKDIR}/${BPN}" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING.tomoyo;md5=751419260aa954499f7abaabaa882bbe" - -FILES:${PN} += "${libdir}/tomoyo" -FILES:${PN}-dbg += "${libdir}/tomoyo/.debug" - -DEPENDS = "linux-libc-headers ncurses" - -EXTRA_OEMAKE = "-e USRLIBDIR=${libdir}" - -do_compile () { - oe_runmake 'CC=${CC}' -} - -do_install() { - oe_runmake install SBINDIR=${base_sbindir} INSTALLDIR=${D} -} diff --git a/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.6.1.bb b/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.6.1.bb new file mode 100644 index 0000000000..86acdc7aa1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.6.1.bb @@ -0,0 +1,29 @@ +SUMMARY = "TOMOYO Linux tools" +DESCRIPTION = "TOMOYO Linux is a Mandatory Access Control (MAC) implementation \ +for Linux that can be used to increase the security of a system, while also \ +being useful purely as a system analysis tool." +HOMEPAGE = "http://tomoyo.sourceforge.jp/" +SECTION = "System Environment/Kernel" + +SRC_URI = "http://jaist.dl.sourceforge.jp/tomoyo/70710/${BP}-20210910.tar.gz" +SRC_URI[sha256sum] = "47a12cdb1fe7bbd0b2e3486150fe1e754fa9c869aeefd42fd311c4022b78010a" + +S = "${WORKDIR}/${BPN}" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING.tomoyo;md5=751419260aa954499f7abaabaa882bbe" + +FILES:${PN} += "${libdir}/tomoyo" +FILES:${PN}-dbg += "${libdir}/tomoyo/.debug" + +DEPENDS = "linux-libc-headers ncurses" + +EXTRA_OEMAKE = "-e USRLIBDIR=${libdir}" + +do_compile () { + oe_runmake 'CC=${CC}' +} + +do_install() { + oe_runmake install SBINDIR=${base_sbindir} INSTALLDIR=${D} +} diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog_0.6.0.bb b/meta-openembedded/meta-oe/recipes-support/glog/glog_0.6.0.bb index c09ce73f98..ec39604f44 100644 --- a/meta-openembedded/meta-oe/recipes-support/glog/glog_0.6.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/glog/glog_0.6.0.bb @@ -22,6 +22,8 @@ PACKAGECONFIG ?= "shared unwind 64bit-atomics" PACKAGECONFIG:remove:riscv64 = "unwind" PACKAGECONFIG:remove:riscv32 = "unwind 64bit-atomics" PACKAGECONFIG:remove:mipsarch = "64bit-atomics" +PACKAGECONFIG:remove:armv5 = "64bit-atomics" +PACKAGECONFIG:remove:armv6 = "64bit-atomics" PACKAGECONFIG:append:libc-musl:riscv64 = " execinfo" PACKAGECONFIG:append:libc-musl:riscv32 = " execinfo" diff --git a/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch b/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch deleted file mode 100644 index b34762710d..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cb9e9b5b1ad05dd9de07a65ee7147cdb3433746a Mon Sep 17 00:00:00 2001 -From: Naveen Saini -Date: Fri, 9 Apr 2021 15:41:35 +0800 -Subject: [PATCH] CMakeLists.txt: exclude riscv64 & riscv32 - -Upstream-Status: Pending - -Signed-off-by: Naveen Saini ---- - src/tbb/CMakeLists.txt | 2 +- - src/tbbmalloc/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/src/tbb/CMakeLists.txt -+++ b/src/tbb/CMakeLists.txt -@@ -58,7 +58,7 @@ target_compile_definitions(tbb - $<$>:__TBB_DYNAMIC_LOAD_ENABLED=0> - $<$>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>) - --if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64)" OR -+if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64|riscv64|riscv32)" OR - "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64" OR - WINDOWS_STORE OR - TBB_WINDOWS_DRIVER)) ---- a/src/tbbmalloc/CMakeLists.txt -+++ b/src/tbbmalloc/CMakeLists.txt -@@ -30,7 +30,7 @@ target_compile_definitions(tbbmalloc - $<$>:__TBB_DYNAMIC_LOAD_ENABLED=0> - $<$>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>) - --if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64)" OR -+if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64|riscv64|riscv32)" OR - "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64" OR - WINDOWS_STORE OR - TBB_WINDOWS_DRIVER OR diff --git a/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch b/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch new file mode 100644 index 0000000000..640b131703 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch @@ -0,0 +1,33 @@ +From 7ffc1eba8596544d6e3af0fd5f4004fff6d56f84 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Wed, 29 Nov 2023 15:48:57 +0800 +Subject: [PATCH] hwloc_detection.cmake: remove cross-compiation check + +This check is preventing pkgconfig to +search for hwloc under cross-compilation. + +pkgconfig able to find hwloc pkg from sysroot. + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini +--- + cmake/hwloc_detection.cmake | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake +index 47233b17..5a7e84c3 100644 +--- a/cmake/hwloc_detection.cmake ++++ b/cmake/hwloc_detection.cmake +@@ -46,8 +46,6 @@ endforeach() + unset(HWLOC_TARGET_NAME) + + if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND +- # No hwloc auto detection for cross compilation +- NOT CMAKE_CROSSCOMPILING AND + NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH + ) + find_package(PkgConfig QUIET) +-- +2.37.3 + diff --git a/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb b/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb new file mode 100644 index 0000000000..f834726bd6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb @@ -0,0 +1,62 @@ +DESCRIPTION = "Parallelism library for C++ - runtime files \ + TBB is a library that helps you leverage multi-core processor \ + performance without having to be a threading expert. It represents a \ + higher-level, task-based parallelism that abstracts platform details \ + and threading mechanism for performance and scalability." +HOMEPAGE = "https://software.intel.com/en-us/tbb" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" + +DEPENDS:append:libc-musl = " libucontext" +DEPENDS:append:class-target = " hwloc" + +PE = "1" + +BRANCH = "onetbb_2021" +SRCREV = "8b829acc65569019edb896c5150d427f288e8aba" +SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ + file://0001-hwloc_detection.cmake-remove-cross-compiation-check.patch \ +" +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +# test build fails, error: 'mallinfo mallinfo()' is deprecated +EXTRA_OECMAKE += " \ + -DTBB_TEST=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + " + +# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) +# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules +# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o +EXTRA_OECMAKE:append:riscv32:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " +EXTRA_OECMAKE:append:riscv64:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " + +# fails with thumb enabled: +# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp +# | {standard input}: Assembler messages: +# | {standard input}:250: Error: thumb conditional instruction should be in IT block -- `strexeq r2,r3,[r4]' +# ... +# | make[1]: *** [concurrent_queue.o] Error 1 +ARM_INSTRUCTION_SET = "arm" + +ASNEEDED = "" + +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:riscv32:toolchain-clang = " -latomic" + +LDFLAGS:append:libc-musl = " -lucontext" + +# The latest version of oneTBB does not support PPC +COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" + + +do_install:append:class-target() { + # fix for qa check buildpaths + sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake +} + + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.9.0.bb b/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.9.0.bb deleted file mode 100644 index 028291c965..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.9.0.bb +++ /dev/null @@ -1,53 +0,0 @@ -DESCRIPTION = "Parallelism library for C++ - runtime files \ - TBB is a library that helps you leverage multi-core processor \ - performance without having to be a threading expert. It represents a \ - higher-level, task-based parallelism that abstracts platform details \ - and threading mechanism for performance and scalability." -HOMEPAGE = "https://software.intel.com/en-us/tbb" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" - -DEPENDS:append:libc-musl = " libucontext" - -PE = "1" - -BRANCH = "onetbb_2021" -SRCREV = "a00cc3b8b5fb4d8115e9de56bf713157073ed68c" -SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ - file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ -" -S = "${WORKDIR}/git" - -inherit cmake - -# test build fails, error: 'mallinfo mallinfo()' is deprecated -EXTRA_OECMAKE += " \ - -DTBB_TEST=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - " -# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) -# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules -# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o -EXTRA_OECMAKE:append:riscv32:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " -EXTRA_OECMAKE:append:riscv64:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " - -# fails with thumb enabled: -# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp -# | {standard input}: Assembler messages: -# | {standard input}:250: Error: thumb conditional instruction should be in IT block -- `strexeq r2,r3,[r4]' -# ... -# | make[1]: *** [concurrent_queue.o] Error 1 -ARM_INSTRUCTION_SET = "arm" - -ASNEEDED = "" - -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:mipsel = " -latomic" -LDFLAGS:append:riscv32:toolchain-clang = " -latomic" - -LDFLAGS:append:libc-musl = " -lucontext" - -# The latest version of oneTBB does not support PPC -COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.0.bb deleted file mode 100644 index d71f3df004..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.0.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Async http client/server framework" -DESCRIPTION = "Asynchronous HTTP client/server framework for asyncio and Python" -HOMEPAGE = "https://github.com/aio-libs/aiohttp" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" - -SRC_URI[sha256sum] = "09f23292d29135025e19e8ff4f0a68df078fe4ee013bca0105b2e803989de92d" - -PYPI_PACKAGE = "aiohttp" -inherit python_setuptools_build_meta pypi - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-async-timeout \ - ${PYTHON_PN}-attrs \ - ${PYTHON_PN}-chardet \ - ${PYTHON_PN}-html \ - ${PYTHON_PN}-idna-ssl \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-multidict \ - ${PYTHON_PN}-netserver \ - ${PYTHON_PN}-typing-extensions \ - ${PYTHON_PN}-yarl \ - ${PYTHON_PN}-cchardet \ - ${PYTHON_PN}-charset-normalizer \ - ${PYTHON_PN}-aiosignal \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.1.bb new file mode 100644 index 0000000000..566417047e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Async http client/server framework" +DESCRIPTION = "Asynchronous HTTP client/server framework for asyncio and Python" +HOMEPAGE = "https://github.com/aio-libs/aiohttp" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" + +SRC_URI[sha256sum] = "8fc49a87ac269d4529da45871e2ffb6874e87779c3d0e2ccd813c0899221239d" + +PYPI_PACKAGE = "aiohttp" +inherit python_setuptools_build_meta pypi + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-async-timeout \ + ${PYTHON_PN}-attrs \ + ${PYTHON_PN}-chardet \ + ${PYTHON_PN}-html \ + ${PYTHON_PN}-idna-ssl \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-misc \ + ${PYTHON_PN}-multidict \ + ${PYTHON_PN}-netserver \ + ${PYTHON_PN}-typing-extensions \ + ${PYTHON_PN}-yarl \ + ${PYTHON_PN}-cchardet \ + ${PYTHON_PN}-charset-normalizer \ + ${PYTHON_PN}-aiosignal \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.2.bb deleted file mode 100644 index 7a049733be..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.2.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Simple construction, analysis and modification of binary data." -HOMEPAGE = "https://github.com/scott-griffiths/bitstring" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" - -SRC_URI[sha256sum] = "c22283d60fd3e1a8f386ccd4f1915d7fe13481d6349db39711421e24d4a9cccf" - -PYPI_PACKAGE = "bitstring" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-mmap \ - ${PYTHON_PN}-numbers \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb new file mode 100644 index 0000000000..8831d84cb1 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb @@ -0,0 +1,19 @@ +SUMMARY = "Simple construction, analysis and modification of binary data." +HOMEPAGE = "https://github.com/scott-griffiths/bitstring" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" + +SRC_URI[sha256sum] = "1b47c84644a961ba8503db2bba8a5965ab53e81474becdf0a18383b5b5f3f795" + +PYPI_PACKAGE = "bitstring" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-mmap \ + ${PYTHON_PN}-numbers \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.14.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.14.0.bb deleted file mode 100644 index 5ce05c3838..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.14.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A faster version of dbus-next originally from the great DBus next library." -HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" - -SRC_URI[sha256sum] = "91a88fea66b4e69ce73ac4c1ac04952c4fbd5e9b902400649013778a177129ea" - -PYPI_PACKAGE = "dbus_fast" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-core (>=3.7) \ - python3-async-timeout \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb new file mode 100644 index 0000000000..b3cb377ec2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "A faster version of dbus-next originally from the great DBus next library." +HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" + +SRC_URI[sha256sum] = "c98c7dfc3c589d6a5ded3427addfef1f9199525422f976e10d70a5c10558f5bf" + +PYPI_PACKAGE = "dbus_fast" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-core (>=3.7) \ + python3-async-timeout \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.8.0.bb deleted file mode 100644 index aa56a90119..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.8.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Python humanize utilities" -HOMEPAGE = "http://github.com/jmoiron/humanize" -SECTION = "devel/python" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENCE;md5=4ecc42519e84f6f3e23529464df7bd1d" - -SRC_URI[sha256sum] = "9783373bf1eec713a770ecaa7c2d7a7902c98398009dfa3d8a2df91eec9311e8" - -inherit pypi python_hatchling - -DEPENDS += "\ - ${PYTHON_PN}-setuptools-scm-native \ - ${PYTHON_PN}-hatch-vcs-native \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-setuptools \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb new file mode 100644 index 0000000000..d74070876d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "Python humanize utilities" +HOMEPAGE = "http://github.com/jmoiron/humanize" +SECTION = "devel/python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE;md5=4ecc42519e84f6f3e23529464df7bd1d" + +SRC_URI[sha256sum] = "582a265c931c683a7e9b8ed9559089dea7edcf6cc95be39a3cbc2c5d5ac2bcfa" + +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-setuptools-scm-native \ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-setuptools \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.17.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.17.2.bb deleted file mode 100644 index 134a358bf7..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.17.2.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "IPython: Productive Interactive Computing" -HOMEPAGE = "https://ipython.org" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" - -PYPI_PACKAGE = "ipython" - -SRC_URI[sha256sum] = "126bb57e1895594bb0d91ea3090bbd39384f6fe87c3d57fd558d0670f50339bb" - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-jedi \ - ${PYTHON_PN}-decorator \ - ${PYTHON_PN}-pickleshare \ - ${PYTHON_PN}-traitlets \ - ${PYTHON_PN}-prompt-toolkit \ - ${PYTHON_PN}-pygments \ - ${PYTHON_PN}-backcall \ - ${PYTHON_PN}-pydoc \ - ${PYTHON_PN}-debugger \ - ${PYTHON_PN}-pexpect \ - ${PYTHON_PN}-unixadmin \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-sqlite3 \ - ${PYTHON_PN}-stack-data \ -" - -inherit setuptools3 pypi diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb new file mode 100644 index 0000000000..aaeb720e6c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "IPython: Productive Interactive Computing" +HOMEPAGE = "https://ipython.org" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" + +PYPI_PACKAGE = "ipython" + +SRC_URI[sha256sum] = "4feb61210160f75e229ce932dbf8b719bff37af123c0b985fd038b14233daa16" + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-jedi \ + ${PYTHON_PN}-decorator \ + ${PYTHON_PN}-pickleshare \ + ${PYTHON_PN}-traitlets \ + ${PYTHON_PN}-prompt-toolkit \ + ${PYTHON_PN}-pygments \ + ${PYTHON_PN}-backcall \ + ${PYTHON_PN}-pydoc \ + ${PYTHON_PN}-debugger \ + ${PYTHON_PN}-pexpect \ + ${PYTHON_PN}-unixadmin \ + ${PYTHON_PN}-misc \ + ${PYTHON_PN}-sqlite3 \ + ${PYTHON_PN}-stack-data \ +" + +inherit setuptools3 pypi diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.0.bb deleted file mode 100644 index 432cefcbfa..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" -HOMEPAGE = "https://github.com/python/mypy" -LICENSE = "MIT & Python-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "1e280b5697202efa698372d2f39e9a6713a0395a756b1c6bd48995f8d72690dc" - -BBCLASSEXTEND = "native" - -DEPENDS += " \ - python3-mypy-extensions-native \ - python3-types-psutil-native \ - python3-types-setuptools-native \ - python3-typing-extensions-native \ -" - -RDEPENDS:${PN} += " \ - python3-modules \ - python3-mypy-extensions \ - python3-typing-extensions \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb new file mode 100644 index 0000000000..90301f3ccb --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" +HOMEPAGE = "https://github.com/python/mypy" +LICENSE = "MIT & Python-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2" + +BBCLASSEXTEND = "native" + +DEPENDS += " \ + python3-mypy-extensions-native \ + python3-types-psutil-native \ + python3-types-setuptools-native \ + python3-typing-extensions-native \ +" + +RDEPENDS:${PN} += " \ + python3-modules \ + python3-mypy-extensions \ + python3-typing-extensions \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.3.bb deleted file mode 100644 index 54da389273..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.3.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" -HOMEPAGE = "https://pdm-project.org/latest/" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" - -SRC_URI[sha256sum] = "46dafc8a4fe268c46479876e52c6967f7a9aa385e1e574e64248670a37b358ff" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - ${PYTHON_PN}-pdm-backend-native \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb new file mode 100644 index 0000000000..fffefb3c69 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb @@ -0,0 +1,15 @@ +SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" +HOMEPAGE = "https://pdm-project.org/latest/" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" + +SRC_URI[sha256sum] = "6dfd9d4cb59043edecb2d0b47d208e55d89d333ba7197deb05cca2dfbc7a4bfb" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + ${PYTHON_PN}-pdm-backend-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.8.0.bb deleted file mode 100644 index ed25406085..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.8.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "A Pure Python Expect like Module for Python" -HOMEPAGE = "http://pexpect.readthedocs.org/" -SECTION = "devel/python" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b" - -SRC_URI += "file://0001-FSM.py-change-shebang-from-python-to-python3.patch" - -SRC_URI[md5sum] = "153eb25184249d6a85fde9acf4804085" -SRC_URI[sha256sum] = "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - -inherit pypi setuptools3 - -UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect" - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-terminal \ - ${PYTHON_PN}-resource \ - ${PYTHON_PN}-fcntl \ - ${PYTHON_PN}-ptyprocess \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.9.0.bb new file mode 100644 index 0000000000..6ee5b25bda --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.9.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "A Pure Python Expect like Module for Python" +HOMEPAGE = "http://pexpect.readthedocs.org/" +SECTION = "devel/python" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b" + +SRC_URI += "file://0001-FSM.py-change-shebang-from-python-to-python3.patch" + +SRC_URI[sha256sum] = "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + +inherit pypi setuptools3 + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect" + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-terminal \ + ${PYTHON_PN}-resource \ + ${PYTHON_PN}-fcntl \ + ${PYTHON_PN}-ptyprocess \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.7.bb deleted file mode 100644 index c27d490f4c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.7.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Library for Python 3.6+ to communicate with the Google Chromecast." -HOMEPAGE = "https://github.com/balloob/pychromecast" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5" - -SRC_URI[sha256sum] = "0de98e9e5be43269dd41efb16126ab0d5ba941ca4acae024329712851c0c0324" - -PYPI_PACKAGE = "PyChromecast" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-zeroconf \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-requests \ - ${PYTHON_PN}-protobuf \ - ${PYTHON_PN}-compression \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.8.bb new file mode 100644 index 0000000000..dff1876c3f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_13.0.8.bb @@ -0,0 +1,19 @@ +SUMMARY = "Library for Python 3.6+ to communicate with the Google Chromecast." +HOMEPAGE = "https://github.com/balloob/pychromecast" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5" + +SRC_URI[sha256sum] = "e4b7523db137f8de05eedcc6154113b68532848629442b448c2334fac966a447" + +PYPI_PACKAGE = "PyChromecast" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-zeroconf \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-requests \ + ${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-compression \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.1.bb deleted file mode 100644 index 609411fe14..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Data validation and settings management using Python type hinting" -HOMEPAGE = "https://github.com/samuelcolvin/pydantic" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "0b8be5413c06aadfbe56f6dc1d45c9ed25fd43264414c571135c97dd77c2bedb" - -DEPENDS += "python3-hatch-fancy-pypi-readme-native" - -RDEPENDS:${PN} += "\ - python3-core \ - python3-datetime \ - python3-image \ - python3-io \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-profile \ - python3-typing-extensions \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb new file mode 100644 index 0000000000..3750d49a97 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb @@ -0,0 +1,23 @@ +SUMMARY = "Data validation and settings management using Python type hinting" +HOMEPAGE = "https://github.com/samuelcolvin/pydantic" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "ff177ba64c6faf73d7afa2e8cad38fd456c0dbe01c9954e71038001cd15a6edd" + +DEPENDS += "python3-hatch-fancy-pypi-readme-native" + +RDEPENDS:${PN} += "\ + python3-core \ + python3-datetime \ + python3-image \ + python3-io \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-profile \ + python3-typing-extensions \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.178.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.178.bb deleted file mode 100644 index e969dbe5b6..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.178.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Python API for MISP" -HOMEPAGE = "https://github.com/MISP/PyMISP" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" - -SRC_URI = "git://github.com/MISP/PyMISP.git;protocol=https;branch=main" -SRCREV = "3a3096664109639322bff7285956ef7cc376a260" -S = "${WORKDIR}/git" - -inherit python_poetry_core - -PIP_INSTALL_PACKAGE = "pymisp" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-dateutil \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-jsonschema \ - ${PYTHON_PN}-requests \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-deprecated \ - ${PYTHON_PN}-wrapt \ -" - -# Fixes: python3-pymisp requires /bin/bash, but no -# providers found in RDEPENDS:python3-pymisp? [file-rdep] -RDEPENDS:${PN} += "bash" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb new file mode 100644 index 0000000000..69c7742215 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Python API for MISP" +HOMEPAGE = "https://github.com/MISP/PyMISP" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" + +SRC_URI = "git://github.com/MISP/PyMISP.git;protocol=https;branch=main" +SRCREV = "cc6391233c01362a1b4b483c4ea8e67f306e3459" +S = "${WORKDIR}/git" + +inherit python_poetry_core + +PIP_INSTALL_PACKAGE = "pymisp" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-dateutil \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-jsonschema \ + ${PYTHON_PN}-requests \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-deprecated \ + ${PYTHON_PN}-wrapt \ +" + +# Fixes: python3-pymisp requires /bin/bash, but no +# providers found in RDEPENDS:python3-pymisp? [file-rdep] +RDEPENDS:${PN} += "bash" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.4.0.bb deleted file mode 100644 index c3b84c70c2..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.4.0.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "pytest xdist plugin for distributed testing and loop-on-failing modes" -HOMEPAGE = "https://github.com/pytest-dev/pytest-xdist" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=772fcdaca14b378878d05c7d857e6c3e" - -SRC_URI[sha256sum] = "3a94a931dd9e268e0b871a877d09fe2efb6175c2c23d60d56a6001359002b832" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "python3-setuptools-scm-native" - -# Note that the dependency on pytest-forked is scheduled to be dropped in 3.0 -RDEPENDS:${PN} += " \ - python3-execnet \ - python3-pytest \ - python3-pytest-forked \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.5.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.5.0.bb new file mode 100644 index 0000000000..89b5039571 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.5.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "pytest xdist plugin for distributed testing and loop-on-failing modes" +HOMEPAGE = "https://github.com/pytest-dev/pytest-xdist" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=772fcdaca14b378878d05c7d857e6c3e" + +SRC_URI[sha256sum] = "cbb36f3d67e0c478baa57fa4edc8843887e0f6cfc42d677530a36d7472b32d8a" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-setuptools-scm-native" + +# Note that the dependency on pytest-forked is scheduled to be dropped in 3.0 +RDEPENDS:${PN} += " \ + python3-execnet \ + python3-pytest \ + python3-pytest-forked \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.35.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.35.0.bb deleted file mode 100644 index b2bc875f5e..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.35.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "The new Python SDK for Sentry.io" -DESCRIPTION = "This is the next line of the Python SDK \ -for Sentry, intended to replace the raven package on PyPI." -HOMEPAGE = "https://github.com/getsentry/sentry-python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=03dc788d9a9486be5e6a1d99c2c1ce3a" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-urllib3 \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-threading \ - ${PYTHON_PN}-compression \ - ${PYTHON_PN}-datetime \ -" - -SRC_URI[sha256sum] = "04e392db9a0d59bd49a51b9e3a92410ac5867556820465057c2ef89a38e953e9" - -PYPI_PACKAGE = "sentry-sdk" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb new file mode 100644 index 0000000000..868a7e2f30 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "The new Python SDK for Sentry.io" +DESCRIPTION = "This is the next line of the Python SDK \ +for Sentry, intended to replace the raven package on PyPI." +HOMEPAGE = "https://github.com/getsentry/sentry-python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=03dc788d9a9486be5e6a1d99c2c1ce3a" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-urllib3 \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-threading \ + ${PYTHON_PN}-compression \ + ${PYTHON_PN}-datetime \ +" + +SRC_URI[sha256sum] = "7cd324dd2877fdc861f75cba4242bce23a58272a6fea581fcb218bb718bd9cc5" + +PYPI_PACKAGE = "sentry-sdk" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.1.bb deleted file mode 100644 index 1061213357..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Typing stubs for setuptools" -HOMEPAGE = "https://github.com/python/typeshed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "8f31e8201e7969789e0eb23463b53ebe5f67d92417df4b648a6ea3c357ca4f51" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb new file mode 100644 index 0000000000..4042ab55f0 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb @@ -0,0 +1,10 @@ +SUMMARY = "Typing stubs for setuptools" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "09efc380ad5c7f78e30bca1546f706469568cf26084cfab73ecf83dea1d28446" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.22.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.22.0.bb new file mode 100644 index 0000000000..1da7ee4a04 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.22.0.bb @@ -0,0 +1,10 @@ +SUMMARY = "Python Data Validation for Humans" +HOMEPAGE = "https://python-validators.github.io/validators" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=fcf28bd09a60e145c3171c531b9e677d" +SRC_URI[sha256sum] = "77b2689b172eeeb600d9605ab86194641670cdb73b60afd577142a9397873370" + +inherit pypi python_setuptools_build_meta + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.6.bb deleted file mode 100644 index aa11534f7d..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.6.bb +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "A tool for creating isolated virtual python environments." -HOMEPAGE = "https://github.com/pypa/virtualenv" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" - -SRC_URI[sha256sum] = "02ece4f56fbf939dbbc33c0715159951d6bf14aaf5457b092e4548e1382455af" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - ${PYTHON_PN}-hatch-vcs-native \ -" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-distlib \ - ${PYTHON_PN}-filelock \ - ${PYTHON_PN}-platformdirs \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb new file mode 100644 index 0000000000..a4e5607e7e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "A tool for creating isolated virtual python environments." +HOMEPAGE = "https://github.com/pypa/virtualenv" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" + +SRC_URI[sha256sum] = "69050ffb42419c91f6c1284a7b24e0475d793447e35929b488bf6a0aade39353" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-distlib \ + ${PYTHON_PN}-filelock \ + ${PYTHON_PN}-platformdirs \ +" diff --git a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch deleted file mode 100644 index 9accbf18a1..0000000000 --- a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5c9257fa34335ff83f7c01581cf953111072a457 Mon Sep 17 00:00:00 2001 -From: Valeria Petrov -Date: Tue, 18 Apr 2023 15:38:53 +0200 -Subject: [PATCH] * modules/mappers/config9.m4: Add 'server' directory to - include path if mod_rewrite is enabled. - -Upstream-Status: Backport [https://svn.apache.org/viewvc?view=revision&revision=1909241] - ---- - modules/mappers/config9.m4 | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4 -index 55a97ab993..7120b729b7 100644 ---- a/modules/mappers/config9.m4 -+++ b/modules/mappers/config9.m4 -@@ -14,6 +14,11 @@ APACHE_MODULE(userdir, mapping of requests to user-specific directories, , , mos - APACHE_MODULE(alias, mapping of requests to different filesystem parts, , , yes) - APACHE_MODULE(rewrite, rule based URL manipulation, , , most) - -+if test "x$enable_rewrite" != "xno"; then -+ # mod_rewrite needs test_char.h -+ APR_ADDTO(INCLUDES, [-I\$(top_builddir)/server]) -+fi -+ - APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) - - APACHE_MODPATH_FINISH --- -2.25.1 - diff --git a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.57.bb b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.57.bb deleted file mode 100644 index bbc1c6c48a..0000000000 --- a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.57.bb +++ /dev/null @@ -1,238 +0,0 @@ -DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \ -extensible web server." -SUMMARY = "Apache HTTP Server" -HOMEPAGE = "http://httpd.apache.org/" -SECTION = "net" -LICENSE = "Apache-2.0" - -SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \ - file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ - file://0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch \ - file://0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch \ - file://0004-apache2-log-the-SELinux-context-at-startup.patch \ - file://0005-replace-lynx-to-curl-in-apachectl-script.patch \ - file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \ - file://0007-apache2-allow-to-disable-selinux-support.patch \ - file://0008-Fix-perl-install-directory-to-usr-bin.patch \ - file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \ - file://0001-make_exports.awk-not-expose-the-path.patch \ - file://0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch \ - " - -SRC_URI:append:class-target = " \ - file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \ - file://init \ - file://apache2-volatile.conf \ - file://apache2.service \ - file://volatiles.04_apache2 \ - " - -LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3" -SRC_URI[sha256sum] = "dbccb84aee95e095edfbb81e5eb926ccd24e6ada55dcd83caecb262e5cf94d2a" - -S = "${WORKDIR}/httpd-${PV}" - -inherit autotools update-rc.d pkgconfig systemd update-alternatives - -DEPENDS = "openssl expat pcre apr apr-util apache2-native " - -CVE_PRODUCT = "apache:http_server" - -SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" -PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap" -PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib" - -CFLAGS:append = " -DPATH_MAX=4096" - -EXTRA_OECONF:class-target = "\ - --enable-layout=Debian \ - --prefix=${base_prefix} \ - --exec_prefix=${exec_prefix} \ - --includedir=${includedir}/${BPN} \ - --sysconfdir=${sysconfdir}/${BPN} \ - --datadir=${datadir}/${BPN} \ - --libdir=${libdir} \ - --libexecdir=${libexecdir}/${BPN}/modules \ - --localstatedir=${localstatedir} \ - --enable-ssl \ - --with-dbm=sdbm \ - --with-gdbm=no \ - --with-ndbm=no \ - --with-berkeley-db=no \ - --enable-info \ - --enable-rewrite \ - --enable-mpms-shared \ - ap_cv_void_ptr_lt_long=no \ - ac_cv_have_threadsafe_pollset=no \ - " - -EXTRA_OECONF:class-native = "\ - --prefix=${prefix} \ - --includedir=${includedir}/${BPN} \ - --sysconfdir=${sysconfdir}/${BPN} \ - --datadir=${datadir}/${BPN} \ - --libdir=${libdir} \ - --libexecdir=${libdir}/${BPN}/modules \ - --localstatedir=${localstatedir} \ - " - -do_configure:prepend() { - sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout -} - -do_install:append:class-target() { - install -d ${D}/${sysconfdir}/init.d - - cat ${WORKDIR}/init | \ - sed -e 's,/usr/sbin/,${sbindir}/,g' \ - -e 's,/usr/bin/,${bindir}/,g' \ - -e 's,/usr/lib/,${libdir}/,g' \ - -e 's,/etc/,${sysconfdir}/,g' \ - -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN} - - chmod 755 ${D}/${sysconfdir}/init.d/${BPN} - - # Remove the goofy original files... - rm -rf ${D}/${sysconfdir}/${BPN}/original - - install -d ${D}${sysconfdir}/${BPN}/conf.d - install -d ${D}${sysconfdir}/${BPN}/modules.d - - # Ensure configuration file pulls in conf.d and modules.d - printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf - printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf - printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf - - # Match with that is in init script - printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf - - # Set 'ServerName' to fix error messages when restart apache service - sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf - - sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf - - sed -i -e 's,${STAGING_DIR_TARGET},,g' \ - -e 's,${DEBUG_PREFIX_MAP},,g' \ - -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \ - -e 's,${HOSTTOOLS_DIR}/,,g' \ - -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ - -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk - - sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's,${DEBUG_PREFIX_MAP},,g' \ - -e 's,${RECIPE_SYSROOT},,g' \ - -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \ - -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ - -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service - elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 - fi - - rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars* - chown -R root:root ${D} -} - -do_install:append:class-native() { - install -d ${D}${bindir} ${D}${libdir} - install -m 755 server/gen_test_char ${D}${bindir} -} - -SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess" - -apache_sysroot_preprocess() { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} - install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts} - install -d ${SYSROOT_DESTDIR}${sbindir} - install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir} - sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs - - sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk -} - -# Implications - used by update-rc.d scripts -INITSCRIPT_NAME = "apache2" -INITSCRIPT_PARAMS = "defaults 91 20" - -SYSTEMD_SERVICE:${PN} = "apache2.service" -SYSTEMD_AUTO_ENABLE:${PN} = "enable" - -ALTERNATIVE:${PN}-doc = "htpasswd.1" -ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1" - -PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}" - -CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \ - ${sysconfdir}/${BPN}/magic \ - ${sysconfdir}/${BPN}/mime.types \ - ${sysconfdir}/${BPN}/extra/*" - -FILES:${PN}-utils = "${bindir}/ab \ - ${bindir}/htdbm \ - ${bindir}/htdigest \ - ${bindir}/htpasswd \ - ${bindir}/logresolve \ - ${bindir}/httxt2dbm \ - ${sbindir}/htcacheclean \ - ${sbindir}/fcgistarter \ - ${sbindir}/checkgid \ - ${sbindir}/rotatelogs \ - " - -# We override here rather than append so that .so links are -# included in the runtime package rather than here (-dev) -# and to get build, icons, error into the -dev package -FILES:${PN}-dev = "${datadir}/${BPN}/build \ - ${datadir}/${BPN}/icons \ - ${datadir}/${BPN}/error \ - ${includedir}/${BPN} \ - ${bindir}/apxs \ - " - -# Add the manual to -doc -FILES:${PN}-doc += " ${datadir}/${BPN}/manual" - -FILES:${PN}-scripts += "${bindir}/dbmmanage" - -# Override this too - here is the default, less datadir -FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \ - ${sysconfdir} ${libdir}/${BPN}" - -# We want htdocs and cgi-bin to go with the binary -FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin" - -FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug" - -RDEPENDS:${PN} += "openssl libgcc ${PN}-utils" -RDEPENDS:${PN}-scripts += "perl ${PN}" -RDEPENDS:${PN}-dev = "perl" - -BBCLASSEXTEND = "native" - -pkg_postinst:${PN}() { - if [ -z "$D" ]; then - if type systemd-tmpfiles >/dev/null; then - systemd-tmpfiles --create - elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then - ${sysconfdir}/init.d/populate-volatile.sh update - fi - fi -} diff --git a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb new file mode 100644 index 0000000000..e4f7e1ceb8 --- /dev/null +++ b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb @@ -0,0 +1,237 @@ +DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \ +extensible web server." +SUMMARY = "Apache HTTP Server" +HOMEPAGE = "http://httpd.apache.org/" +SECTION = "net" +LICENSE = "Apache-2.0" + +SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \ + file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ + file://0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch \ + file://0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch \ + file://0004-apache2-log-the-SELinux-context-at-startup.patch \ + file://0005-replace-lynx-to-curl-in-apachectl-script.patch \ + file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \ + file://0007-apache2-allow-to-disable-selinux-support.patch \ + file://0008-Fix-perl-install-directory-to-usr-bin.patch \ + file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \ + file://0001-make_exports.awk-not-expose-the-path.patch \ + " + +SRC_URI:append:class-target = " \ + file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \ + file://init \ + file://apache2-volatile.conf \ + file://apache2.service \ + file://volatiles.04_apache2 \ + " + +LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3" +SRC_URI[sha256sum] = "fa16d72a078210a54c47dd5bef2f8b9b8a01d94909a51453956b3ec6442ea4c5" + +S = "${WORKDIR}/httpd-${PV}" + +inherit autotools update-rc.d pkgconfig systemd update-alternatives + +DEPENDS = "openssl expat pcre apr apr-util apache2-native " + +CVE_PRODUCT = "apache:http_server" + +SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" +PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap" +PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib" + +CFLAGS:append = " -DPATH_MAX=4096" + +EXTRA_OECONF:class-target = "\ + --enable-layout=Debian \ + --prefix=${base_prefix} \ + --exec_prefix=${exec_prefix} \ + --includedir=${includedir}/${BPN} \ + --sysconfdir=${sysconfdir}/${BPN} \ + --datadir=${datadir}/${BPN} \ + --libdir=${libdir} \ + --libexecdir=${libexecdir}/${BPN}/modules \ + --localstatedir=${localstatedir} \ + --enable-ssl \ + --with-dbm=sdbm \ + --with-gdbm=no \ + --with-ndbm=no \ + --with-berkeley-db=no \ + --enable-info \ + --enable-rewrite \ + --enable-mpms-shared \ + ap_cv_void_ptr_lt_long=no \ + ac_cv_have_threadsafe_pollset=no \ + " + +EXTRA_OECONF:class-native = "\ + --prefix=${prefix} \ + --includedir=${includedir}/${BPN} \ + --sysconfdir=${sysconfdir}/${BPN} \ + --datadir=${datadir}/${BPN} \ + --libdir=${libdir} \ + --libexecdir=${libdir}/${BPN}/modules \ + --localstatedir=${localstatedir} \ + " + +do_configure:prepend() { + sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout +} + +do_install:append:class-target() { + install -d ${D}/${sysconfdir}/init.d + + cat ${WORKDIR}/init | \ + sed -e 's,/usr/sbin/,${sbindir}/,g' \ + -e 's,/usr/bin/,${bindir}/,g' \ + -e 's,/usr/lib/,${libdir}/,g' \ + -e 's,/etc/,${sysconfdir}/,g' \ + -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN} + + chmod 755 ${D}/${sysconfdir}/init.d/${BPN} + + # Remove the goofy original files... + rm -rf ${D}/${sysconfdir}/${BPN}/original + + install -d ${D}${sysconfdir}/${BPN}/conf.d + install -d ${D}${sysconfdir}/${BPN}/modules.d + + # Ensure configuration file pulls in conf.d and modules.d + printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf + printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf + printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf + + # Match with that is in init script + printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf + + # Set 'ServerName' to fix error messages when restart apache service + sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf + + sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf + + sed -i -e 's,${STAGING_DIR_TARGET},,g' \ + -e 's,${DEBUG_PREFIX_MAP},,g' \ + -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \ + -e 's,${HOSTTOOLS_DIR}/,,g' \ + -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ + -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk + + sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,${DEBUG_PREFIX_MAP},,g' \ + -e 's,${RECIPE_SYSROOT},,g' \ + -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \ + -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ + -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service + elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 + fi + + rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars* + chown -R root:root ${D} +} + +do_install:append:class-native() { + install -d ${D}${bindir} ${D}${libdir} + install -m 755 server/gen_test_char ${D}${bindir} +} + +SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess" + +apache_sysroot_preprocess() { + install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} + install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts} + install -d ${SYSROOT_DESTDIR}${sbindir} + install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir} + sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs + + sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk +} + +# Implications - used by update-rc.d scripts +INITSCRIPT_NAME = "apache2" +INITSCRIPT_PARAMS = "defaults 91 20" + +SYSTEMD_SERVICE:${PN} = "apache2.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" + +ALTERNATIVE:${PN}-doc = "htpasswd.1" +ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1" + +PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}" + +CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \ + ${sysconfdir}/${BPN}/magic \ + ${sysconfdir}/${BPN}/mime.types \ + ${sysconfdir}/${BPN}/extra/*" + +FILES:${PN}-utils = "${bindir}/ab \ + ${bindir}/htdbm \ + ${bindir}/htdigest \ + ${bindir}/htpasswd \ + ${bindir}/logresolve \ + ${bindir}/httxt2dbm \ + ${sbindir}/htcacheclean \ + ${sbindir}/fcgistarter \ + ${sbindir}/checkgid \ + ${sbindir}/rotatelogs \ + " + +# We override here rather than append so that .so links are +# included in the runtime package rather than here (-dev) +# and to get build, icons, error into the -dev package +FILES:${PN}-dev = "${datadir}/${BPN}/build \ + ${datadir}/${BPN}/icons \ + ${datadir}/${BPN}/error \ + ${includedir}/${BPN} \ + ${bindir}/apxs \ + " + +# Add the manual to -doc +FILES:${PN}-doc += " ${datadir}/${BPN}/manual" + +FILES:${PN}-scripts += "${bindir}/dbmmanage" + +# Override this too - here is the default, less datadir +FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \ + ${sysconfdir} ${libdir}/${BPN}" + +# We want htdocs and cgi-bin to go with the binary +FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin" + +FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug" + +RDEPENDS:${PN} += "openssl libgcc ${PN}-utils" +RDEPENDS:${PN}-scripts += "perl ${PN}" +RDEPENDS:${PN}-dev = "perl" + +BBCLASSEXTEND = "native" + +pkg_postinst:${PN}() { + if [ -z "$D" ]; then + if type systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi +} -- cgit v1.2.3