diff options
Diffstat (limited to 'meta-oe/recipes-devtools')
290 files changed, 5694 insertions, 2774 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch index 5242b29e06..6fecf25603 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch @@ -1,7 +1,7 @@ -From 738549dea7a4e6c462a79962c414eaa450c2cffd Mon Sep 17 00:00:00 2001 +From 11faa06436fdeb0c9948080a11f9a99d3b5ba16c Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 9 Apr 2020 13:06:27 -0700 -Subject: [PATCH 1/3] absl: always use <asm/sgidefs.h> +Subject: [PATCH] absl: always use <asm/sgidefs.h> Fixes mips/musl build, since sgidefs.h is not present on all C libraries but on linux asm/sgidefs.h is there and contains same definitions, using @@ -10,13 +10,12 @@ that makes it portable. Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- absl/base/internal/direct_mmap.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h -index e492bb0..c8a4fba 100644 +index 1beb2ee4..140b0697 100644 --- a/absl/base/internal/direct_mmap.h +++ b/absl/base/internal/direct_mmap.h @@ -41,13 +41,9 @@ diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch index 7b7244b491..d49e860f21 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch @@ -1,18 +1,19 @@ -From d25cf3b9aa873595a19e197cc29ab46c0093bff1 Mon Sep 17 00:00:00 2001 +From a573ccd57e713486e7d8e782d6b3b34fde01ff9e Mon Sep 17 00:00:00 2001 From: Sinan Kaya <sinan.kaya@microsoft.com> Date: Mon, 3 Feb 2020 03:25:57 +0000 -Subject: [PATCH 2/3] Remove maes option from cross-compilation +Subject: [PATCH] Remove maes option from cross-compilation +Upstream-Status: Pending --- absl/copts/GENERATED_AbseilCopts.cmake | 4 ---- absl/copts/GENERATED_copts.bzl | 4 ---- 2 files changed, 8 deletions(-) diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index a4ab1aa2041e..23b9253c1f00 100644 +index da2282fe..5e0e8dfd 100644 --- a/absl/copts/GENERATED_AbseilCopts.cmake +++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -158,7 +158,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS +@@ -229,7 +229,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS ) @@ -21,10 +22,10 @@ index a4ab1aa2041e..23b9253c1f00 100644 - "-msse4.1" -) diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index a6efc98e11d4..1e847f769501 100644 +index b9e0071e..0072008c 100644 --- a/absl/copts/GENERATED_copts.bzl +++ b/absl/copts/GENERATED_copts.bzl -@@ -159,7 +159,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ +@@ -230,7 +230,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [ ] @@ -33,5 +34,5 @@ index a6efc98e11d4..1e847f769501 100644 - "-msse4.1", -] -- -2.36.1 +2.25.1 diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch index c0039c2107..c82b9e1b51 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch @@ -1,11 +1,13 @@ -From fb24c3e3539b5743d398a429a302a3886186f261 Mon Sep 17 00:00:00 2001 +From 632632508daf8bb3a5800dac937ffc33c6d85973 Mon Sep 17 00:00:00 2001 From: Jonas Gorski <jonas.gorski@bisdn.de> Date: Thu, 16 Jun 2022 11:46:31 +0000 -Subject: [PATCH 3/3] Remove neon option from cross compilation +Subject: [PATCH] Remove neon option from cross compilation Not every arm platform supports neon instructions, so do not enforce them. +Upstream-Status: Pending + Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> --- absl/copts/GENERATED_AbseilCopts.cmake | 4 ---- @@ -13,10 +15,10 @@ Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> 2 files changed, 8 deletions(-) diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index 23b9253c1f00..5d112a97f3e4 100644 +index 5e0e8dfd..57cfc4d3 100644 --- a/absl/copts/GENERATED_AbseilCopts.cmake +++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -147,10 +147,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS +@@ -218,10 +218,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS "/DNOMINMAX" ) @@ -28,10 +30,10 @@ index 23b9253c1f00..5d112a97f3e4 100644 "-march=armv8-a+crypto" ) diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index 1e847f769501..3e10db204faf 100644 +index 0072008c..72840fda 100644 --- a/absl/copts/GENERATED_copts.bzl +++ b/absl/copts/GENERATED_copts.bzl -@@ -148,10 +148,6 @@ ABSL_MSVC_TEST_FLAGS = [ +@@ -219,10 +219,6 @@ ABSL_MSVC_TEST_FLAGS = [ "/DNOMINMAX", ] @@ -43,5 +45,5 @@ index 1e847f769501..3e10db204faf 100644 "-march=armv8-a+crypto", ] -- -2.36.1 +2.25.1 diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch index ef3f50d9e7..ba0cd66920 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch @@ -1,3 +1,8 @@ +From f9607924225ca59fb6c60222e6424b84e6f70029 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 21 Sep 2024 20:53:06 +0800 +Subject: [PATCH] abseil: ppc fixes + An all-in-one patch that fixes several issues: 1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) @@ -7,46 +12,60 @@ An all-in-one patch that fixes several issues: Sourced from void linux +Upstream-Status: Pending + Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + absl/base/internal/unscaledcycleclock.cc | 4 ++-- + absl/base/internal/unscaledcycleclock_config.h | 3 ++- + absl/debugging/internal/examine_stack.cc | 8 +++++++- + absl/debugging/internal/stacktrace_config.h | 2 +- + 4 files changed, 12 insertions(+), 5 deletions(-) +diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc +index a0bf3a65..103b4f6a 100644 --- a/absl/base/internal/unscaledcycleclock.cc +++ b/absl/base/internal/unscaledcycleclock.cc @@ -20,7 +20,7 @@ #include <intrin.h> #endif - + -#if defined(__powerpc__) || defined(__ppc__) +#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) #ifdef __GLIBC__ #include <sys/platform/ppc.h> #elif defined(__FreeBSD__) -@@ -53,7 +53,7 @@ double UnscaledCycleClock::Frequency() { +@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() { return base_internal::NominalCPUFrequency(); } - + -#elif defined(__powerpc__) || defined(__ppc__) +#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) - + int64_t UnscaledCycleClock::Now() { #ifdef __GLIBC__ ---- a/absl/base/internal/unscaledcycleclock.h -+++ b/absl/base/internal/unscaledcycleclock.h -@@ -46,7 +46,8 @@ - +diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h +index 43a3dabe..196a8535 100644 +--- a/absl/base/internal/unscaledcycleclock_config.h ++++ b/absl/base/internal/unscaledcycleclock_config.h +@@ -21,7 +21,8 @@ + // The following platforms have an implementation of a hardware counter. #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ -- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ +- defined(__powerpc__) || defined(__ppc__) || defined(_M_IX86) || \ + ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ -+ defined(__riscv) || \ - defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) ++ defined(_M_IX86) || \ + (defined(_M_X64) && !defined(_M_ARM64EC)) #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 #else +diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc +index 3dd6ba1a..f923b055 100644 --- a/absl/debugging/internal/examine_stack.cc +++ b/absl/debugging/internal/examine_stack.cc -@@ -33,6 +33,10 @@ +@@ -36,6 +36,10 @@ #include <csignal> #include <cstdio> - + +#if defined(__powerpc__) +#include <asm/ptrace.h> +#endif @@ -54,7 +73,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include "absl/base/attributes.h" #include "absl/base/internal/raw_logging.h" #include "absl/base/macros.h" -@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) { +@@ -177,8 +181,10 @@ void* GetProgramCounter(void* const vuc) { return reinterpret_cast<void*>(context->uc_mcontext.pc); #elif defined(__powerpc64__) return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]); @@ -66,6 +85,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #elif defined(__riscv) return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]); #elif defined(__s390__) && !defined(__s390x__) +diff --git a/absl/debugging/internal/stacktrace_config.h b/absl/debugging/internal/stacktrace_config.h +index 3929b1b7..23d5e504 100644 --- a/absl/debugging/internal/stacktrace_config.h +++ b/absl/debugging/internal/stacktrace_config.h @@ -60,7 +60,7 @@ @@ -77,3 +98,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #define ABSL_STACKTRACE_INL_HEADER \ "absl/debugging/internal/stacktrace_powerpc-inl.inc" #elif defined(__aarch64__) +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb index b3dc06ca14..f44a5d9082 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb @@ -1,34 +1,53 @@ SUMMARY = "Abseil is a cpp library like STL" DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \ additional useful libraries like algorithm, container, debugging, hash, memory, \ -meta, numeric, strings, synchronization, time, types and utility" +meta, numeric, strings, synchronization, time, types and utility." HOMEPAGE = "https://abseil.io/" SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" -PV = "20220623.0" -SRCREV = "273292d1cfc0a94a65082ee350509af1d113344d" -BRANCH = "lts_2022_06_23" +SRCREV = "4447c7562e3bc702ade25105912dce503f0c4010" +BRANCH = "lts_2024_07_22" SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ file://0001-absl-always-use-asm-sgidefs.h.patch \ file://0002-Remove-maes-option-from-cross-compilation.patch \ - file://abseil-ppc-fixes.patch \ file://0003-Remove-neon-option-from-cross-compilation.patch \ + file://0004-abseil-ppc-fixes.patch \ " S = "${WORKDIR}/git" -ASNEEDED:class-native = "" -ASNEEDED:class-nativesdk = "" - inherit cmake EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF \ - -DCMAKE_CXX_STANDARD=14 \ + -DABSL_ENABLE_INSTALL=ON \ " -BBCLASSEXTEND = "native nativesdk" +SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" + +PACKAGES_DYNAMIC = "^libabsl-*" +PACKAGES_DYNAMIC:class-native = "" + +PACKAGESPLITFUNCS =+ "split_dynamic_packages" -FILES:${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig" +python split_dynamic_packages() { + libdir = d.getVar('libdir') + + libpackages = do_split_packages( + d, + root=libdir, + file_regex=r'^libabsl_(.*)\.so\..*$', + output_pattern='libabsl-%s', + description="abseil shared library %s", + prepend=True, + extra_depends='', + ) + if libpackages: + d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages)) +} + +ALLOW_EMPTY:${PN} = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/aer-inject/aer-inject/0001-include-libgen.h-for-basename.patch b/meta-oe/recipes-devtools/aer-inject/aer-inject/0001-include-libgen.h-for-basename.patch new file mode 100644 index 0000000000..358ff524ef --- /dev/null +++ b/meta-oe/recipes-devtools/aer-inject/aer-inject/0001-include-libgen.h-for-basename.patch @@ -0,0 +1,32 @@ +From a2ccd98076c2ac81830234555edf362ee19a337d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 25 Mar 2024 09:00:41 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [Emailed patch to Author] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + aer-inject.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/aer-inject.c b/aer-inject.c +index 74e7f72..eed1211 100644 +--- a/aer-inject.c ++++ b/aer-inject.c +@@ -11,6 +11,7 @@ + */ + + #include <stdio.h> ++#include <libgen.h> + #include <stdlib.h> + #include <string.h> + #include <fcntl.h> +-- +2.44.0 + diff --git a/meta-oe/recipes-devtools/aer-inject/aer-inject_1.0.bb b/meta-oe/recipes-devtools/aer-inject/aer-inject_1.0.bb new file mode 100644 index 0000000000..87c09f5118 --- /dev/null +++ b/meta-oe/recipes-devtools/aer-inject/aer-inject_1.0.bb @@ -0,0 +1,30 @@ +SUMMARY = "Inject PCIE AER errors on the software level into a running Linux kernel." +DESCRIPTION = "\ +aer-inject allows to inject PCIE AER errors on the software \ +level into a running Linux kernel. This is intended for \ +validation of the PCIE driver error recovery handler and \ +PCIE AER core handler." +HOMEPAGE = "https://git.kernel.org/cgit/linux/kernel/git/gong.chen/aer-inject.git/" +SECTION = "pcie/misc" +LICENSE = "GPL-2.0-only" + +LIC_FILES_CHKSUM = "file://README;beginline=25;endline=38;md5=643c2332ec702691a87ba6ea9499b2d6" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git;protocol=https;branch=master \ + file://0001-include-libgen.h-for-basename.patch \ +" +SRCREV = "9bd5e2c7886fca72f139cd8402488a2235957d41" + +S = "${WORKDIR}/git" + +DEPENDS = "bison-native" + +do_compile() { + oe_runmake CFLAGS="-Wall -D_GNU_SOURCE" +} + +do_install() { + oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install +} +FILES:${PN} += "${prefix}/aer-inject" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start index d67878fef9..76b5e29624 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start @@ -2,6 +2,8 @@ set -e -sleep 3 +sleep 10 -ls /sys/class/udc/ | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC +ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC + +echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage" diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb index 3f9d49a2d2..a91229f908 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb @@ -3,6 +3,9 @@ SECTION = "console/utils" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + SRC_URI = " \ file://android-gadget-setup \ file://android-gadget-start \ @@ -14,17 +17,17 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-start ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-cleanup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir} - if [ -r ${WORKDIR}/android-gadget-setup.machine ] ; then + if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/android-gadget-setup.machine ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir} fi install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d - install -m 0644 ${WORKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d + install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d } FILES:${PN} += " \ diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb index 34b1a9bdd2..abf21803e5 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb @@ -5,11 +5,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda SRC_URI = "file://android-gadget-setup" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + PACKAGE_ARCH = "${MACHINE_ARCH}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} } python () { diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service index ddf8d7f74e..b6661f2e39 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service +++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service @@ -1,6 +1,6 @@ [Unit] Description=Android Debug Bridge -ConditionPathExists=/var/usb-debugging-enabled +ConditionPathExists=/etc/usb-debugging-enabled Before=android-system.service [Service] diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch b/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch index 57c443b707..c091fd404b 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch @@ -4,6 +4,8 @@ Date: Mon, 20 Apr 2020 15:32:40 +0800 Subject: [PATCH 1/1] Riscv: Add risc-v Android config header --- +Upstream-Status: Pending + .../arch/linux-riscv64/AndroidConfig.h | 340 ++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 core/combo/include/arch/linux-riscv64/AndroidConfig.h diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch new file mode 100644 index 0000000000..82e97152be --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch @@ -0,0 +1,35 @@ +From db3a3714be07c8ab51b9ae7b035e4afe9f39c645 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 7 Sep 2022 13:20:22 -0700 +Subject: [PATCH] memory.h: Always define strlcpy for glibc based systems + +android-config.h file includes on compiler cmdline sets HAVE_STRLCPY +unconditionally, since bionic supports it, its no big deal on android +and also no problem when using musl since implementation exists for musl +too, but glibc does not provide this. So either we include libbsd or use +the implementation provided by android-tools here. We are currently +using the in tree implementation for systems which do not provide it + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/cutils/memory.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/cutils/memory.h b/include/cutils/memory.h +index e725cdd032..9e99353c58 100644 +--- a/include/cutils/memory.h ++++ b/include/cutils/memory.h +@@ -30,7 +30,7 @@ void android_memset16(uint16_t* dst, uint16_t value, size_t size); + /* size is given in bytes and must be multiple of 4 */ + void android_memset32(uint32_t* dst, uint32_t value, size_t size); + +-#if !HAVE_STRLCPY ++#if !HAVE_STRLCPY || defined(__GLIBC__) + /* Declaration of strlcpy() for platforms that don't already have it. */ + size_t strlcpy(char *dst, const char *src, size_t size); + #endif +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch index 79e9d4d3b2..7f03cd2beb 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch @@ -18,6 +18,8 @@ them to be used when initializing structures. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- +Upstream-Status: Pending + adb/usb_linux_client.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch index fcd4ae2388..4827ffe042 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch @@ -7,6 +7,8 @@ musl needs it Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + adb/adb_auth_client.c | 2 +- adb/base64.c | 315 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 316 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch index b5d383f383..182b1eb29e 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch @@ -9,14 +9,14 @@ Do not redefine close() and lseek() Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + adb/adb.h | 2 ++ adb/disable_verity_service.c | 13 ++++++++----- adb/framebuffer_service.c | 7 ++++--- adb/sysdeps.h | 12 ++++++------ 4 files changed, 20 insertions(+), 14 deletions(-) -diff --git a/adb/adb.h b/adb/adb.h -index 44e5981bdc..bcdc49f63c 100644 --- a/adb/adb.h +++ b/adb/adb.h @@ -18,7 +18,9 @@ @@ -29,11 +29,9 @@ index 44e5981bdc..bcdc49f63c 100644 #include "adb_trace.h" #include "transport.h" /* readx(), writex() */ -diff --git a/adb/disable_verity_service.c b/adb/disable_verity_service.c -index ed3da52108..29fa3d65a9 100644 --- a/adb/disable_verity_service.c +++ b/adb/disable_verity_service.c -@@ -14,25 +14,28 @@ +@@ -14,25 +14,32 @@ * limitations under the License. */ @@ -51,13 +49,18 @@ index ed3da52108..29fa3d65a9 100644 #include <sys/stat.h> #include <fcntl.h> #include <inttypes.h> -+#include <unistd.h> -+#include <errno.h> -+#include <stdbool.h> - +- -#include "cutils/properties.h" -#include "ext4_sb.h" -#include <fs_mgr.h> ++#include <unistd.h> ++#include <errno.h> ++#include <stdbool.h> ++ ++#if defined(__linux__) && !defined(__GLIBC__) ++#define lseek64 lseek ++#define off64_t off_t ++#endif #define FSTAB_PREFIX "/fstab." struct fstab *fstab; @@ -67,8 +70,6 @@ index ed3da52108..29fa3d65a9 100644 static void write_console(int fd, const char* format, ...) { char buffer[256]; -diff --git a/adb/framebuffer_service.c b/adb/framebuffer_service.c -index 8cbe8403cc..8f0ccfb7aa 100644 --- a/adb/framebuffer_service.c +++ b/adb/framebuffer_service.c @@ -14,6 +14,10 @@ @@ -92,11 +93,9 @@ index 8cbe8403cc..8f0ccfb7aa 100644 #include <linux/fb.h> #include <sys/ioctl.h> #include <sys/mman.h> -diff --git a/adb/sysdeps.h b/adb/sysdeps.h -index cc1f839e9f..ea39ac39cc 100644 --- a/adb/sysdeps.h +++ b/adb/sysdeps.h -@@ -123,8 +123,8 @@ static __inline__ int unix_close(int fd) +@@ -123,8 +123,8 @@ static __inline__ int unix_close(int fd { return close(fd); } @@ -118,7 +117,7 @@ index cc1f839e9f..ea39ac39cc 100644 static __inline__ int adb_read(int fd, void* buf, size_t len) -@@ -392,8 +392,8 @@ static __inline__ int adb_lseek(int fd, int pos, int where) +@@ -392,8 +392,8 @@ static __inline__ int adb_lseek(int f { return lseek(fd, pos, where); } diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch index e02a95687f..64fbce4cbe 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch @@ -7,6 +7,8 @@ Subject: [PATCH] adb: usb_linux.c: fix build with glibc-2.28 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- +Upstream-Status: Pending + adb/usb_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch index 7d223e05f1..ad21b5aaa6 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch @@ -4,6 +4,8 @@ Date: Mon, 30 Oct 2017 21:05:46 +0100 Subject: [PATCH] adb: Allow adbd to be ran as root --- +Upstream-Status: Pending + adb/adb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch index a8434afbad..5138556d63 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch @@ -4,6 +4,8 @@ Date: Mon, 20 Apr 2020 15:27:22 +0800 Subject: [PATCH 1/1] adb: Support riscv64 --- +Upstream-Status: Pending + include/cutils/atomic-inline.h | 2 + include/cutils/atomic-riscv64.h | 156 ++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch index 05973aaaf2..cf23f3c251 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch @@ -12,6 +12,8 @@ modified for backporting to android-tools_5.1.1.r37. Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com> Signed-off-by: Jiacheng Liu <jiacheng.liu@mediatek.com> --- +Upstream-Status: Pending + adb/usb_linux_client.c | 275 +++++++++++++++++++++++++++++++---------- 1 file changed, 207 insertions(+), 68 deletions(-) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch index b3893f0c80..5009c73a05 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch @@ -8,7 +8,7 @@ This carves out the core of sparse_file_read_normal and splits it off so it can be reused in the next patch. No functional change intended. Change-Id: Id00491fd7e5bb6fa28c517a0bb32b8b506539d4d -Upstream-status: Backport [95657f3e5976d96073f7bbfe3a49192509999d1d] +Upstream-Status: Backport [95657f3e5976d96073f7bbfe3a49192509999d1d] Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- libsparse/sparse_read.c | 21 ++++++++++++++++----- diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff b/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff index 3ead649b1d..ddb41ea4b0 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff @@ -4,8 +4,12 @@ Description: adb: Make compatible with openssl 1.1 Author: Chirayu Desai <chirayudesai1@gmail.com Last-Update: 2016-11-10 --- +Upstream-Status: Pending + This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- +Upstream-Status: Pending + system/core/adb/adb_auth_host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) @@ -13,9 +17,10 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +++ b/adb/adb_auth_host.c @@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, BIGNUM* rem = BN_new(); - BIGNUM* n = BN_new(); +- BIGNUM* n = BN_new(); ++ const BIGNUM* n; BIGNUM* n0inv = BN_new(); -+ BIGNUM* e = BN_new(); ++ const BIGNUM* e; if (RSA_size(rsa) != RSANUMBYTES) { ret = 0; @@ -28,7 +33,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ BN_set_bit(r, RSANUMWORDS * 32); BN_mod_sqr(rr, r, n, ctx); BN_div(NULL, rem, n, r32, ctx); -@@ -96,7 +97,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, +@@ -96,11 +97,10 @@ static int RSA_to_RSAPublicKey(RSA *rsa, BN_div(n, rem, n, r32, ctx); pkey->n[i] = BN_get_word(rem); } @@ -37,3 +42,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ out: BN_free(n0inv); +- BN_free(n); + BN_free(rem); + BN_free(r); + BN_free(rr); diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch new file mode 100644 index 0000000000..80410f1d2b --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch @@ -0,0 +1,14 @@ +Add protoype declaration for b64_pton + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/adb/adb_auth_client.c ++++ b/adb/adb_auth_client.c +@@ -29,6 +29,7 @@ + + #define TRACE_TAG TRACE_AUTH + ++extern int b64_pton(const char* src, uint8_t* target, size_t targsize); + + struct adb_public_key { + struct listnode node; diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch b/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch index 87771cba85..8b5e4cf999 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch +++ b/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch @@ -24,6 +24,8 @@ Signed-off-by: Petr Lautrbach <plautrba@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/procattr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb index 26393605d4..a291fc39a2 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb @@ -39,11 +39,13 @@ SRC_URI = " \ file://core/0011-Remove-bionic-specific-calls.patch;patchdir=system/core \ file://core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch;patchdir=system/core \ file://core/adb_libssl_11.diff;patchdir=system/core \ + file://core/b64_pton_function_decl.patch;patchdir=system/core \ file://core/0013-adb-Support-riscv64.patch;patchdir=system/core \ file://core/0014-add-u3-ss-descriptor-support-for-adb.patch;patchdir=system/core \ file://core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch;patchdir=system/core \ file://core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch;patchdir=system/core \ file://core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch;patchdir=system/core \ + file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \ file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \ file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \ file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \ @@ -86,11 +88,11 @@ TOOLS:class-native = "fastboot ext4_utils mkbootimg" TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg" do_compile() { - cp ${WORKDIR}/gitignore ${S}/.gitignore + cp ${UNPACKDIR}/gitignore ${S}/.gitignore # Setting both variables below causing our makefiles to not work with # implicit make rules - unset CFLAGS + CFLAGS="-ffile-prefix-map=${S}=${TARGET_DBGSRC_DIR}" unset CPPFLAGS export SRCDIR=${S} @@ -121,7 +123,7 @@ do_compile() { for tool in ${TOOLS}; do mkdir -p ${B}/${tool} - oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} + oe_runmake -f ${UNPACKDIR}/${BPN}/${tool}.mk -C ${B}/${tool} done } @@ -149,7 +151,7 @@ do_install() { fi # Outside the if statement to avoid errors during do_package - install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ + install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ ${D}${systemd_unitdir}/system/android-tools-adbd.service if echo ${TOOLS} | grep -q "fastboot" ; then @@ -187,7 +189,12 @@ FILES:${PN}-fstools = "\ BBCLASSEXTEND = "native" android_tools_enable_devmode() { - touch ${IMAGE_ROOTFS}/var/usb-debugging-enabled + touch ${IMAGE_ROOTFS}/etc/usb-debugging-enabled } ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}" + +# http://errors.yoctoproject.org/Errors/Details/766881/ +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:23: error: passing argument 2 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:27: error: passing argument 3 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +CC += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb b/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb index aed7977595..d872c4dbb5 100644 --- a/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb +++ b/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \ file://thirdparty/snappy/COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" SRCREV = "9352fc02bba106fbbeef9e8452ef34643c0d0764" -PV .= "+11.1+git${SRCPV}" +PV .= "+11.1+git" SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ " diff --git a/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13-native_2.13.bb b/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13-native_2.13.bb index 21d1356f7b..d0e0446eb8 100644 --- a/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13-native_2.13.bb +++ b/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13-native_2.13.bb @@ -43,7 +43,7 @@ CONFIGUREOPTS = " \ --localstatedir=${localstatedir} \ --libdir=${libdir} \ --includedir=${includedir} \ - --oldincludedir=${oldincludedir} \ + --oldincludedir=${includedir} \ --infodir=${infodir} \ --mandir=${mandir} \ --disable-silent-rules \ diff --git a/meta-oe/recipes-devtools/boost-url/boost-url_git.bb b/meta-oe/recipes-devtools/boost-url/boost-url_git.bb deleted file mode 100644 index 14da3ca3f1..0000000000 --- a/meta-oe/recipes-devtools/boost-url/boost-url_git.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Boost.URL is a library for manipulating Uniform Resource Identifiers (URI) and Locators (URL)" -HOMEPAGE = "https://github.com/CPPAlliance/url" -SECTION = "libs" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" - -SRC_URI = "git://github.com/CPPAlliance/url.git;branch=develop;protocol=https" - -SRCREV = "d740a92d38e3a8f4d5b2153f53b82f1c98e312ab" - -S = "${WORKDIR}/git" - -DEPENDS = "boost" - -BBCLASSEXTEND = "native nativesdk" - -do_install() { - mkdir -p ${D}/${includedir} - cp -r ${S}/include/** ${D}/${includedir}/ -} diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch deleted file mode 100644 index 6e58490980..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5c63eb5d56abd4e5232add4727247965a863d851 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 15 Dec 2019 14:02:45 -0800 -Subject: [PATCH] Do not add stack pointer to clobber list - -It was being ignored until now when gcc 9.0 became capable -of flagging these silent ignore via [1]. - -We weren't actually clobbering the stack pointers here -so it should not cause change in behavior. - -[1] https://gcc.gnu.org/PR52813 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - linux_syscall_support.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/linux_syscall_support.h b/linux_syscall_support.h -index 9276f56..6e73309 100644 ---- a/linux_syscall_support.h -+++ b/linux_syscall_support.h -@@ -1955,7 +1955,7 @@ struct kernel_statfs { - LSS_ENTRYPOINT \ - "pop %%ebx" \ - args \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res) - #undef _syscall0 - #define _syscall0(type,name) \ -@@ -2012,7 +2012,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "ri" ((long)(arg1)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall6 -@@ -2034,7 +2034,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "0" ((long)(&__s)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, -@@ -2120,7 +2120,7 @@ struct kernel_statfs { - : "0"(-EINVAL), "i"(__NR_clone), - "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), - "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) -- : "esp", "memory", "ecx", "edx", "esi", "edi"); -+ : "memory", "ecx", "edx", "esi", "edi"); - LSS_RETURN(int, __res); - } - --- -2.24.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch new file mode 100644 index 0000000000..943daf4d00 --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch @@ -0,0 +1,31 @@ +From 45ea097e864e566771d756c92619e984815acd1e Mon Sep 17 00:00:00 2001 +From: Nathan Moinvaziri <nathan@nathanm.com> +Date: Tue, 19 Dec 2023 14:35:05 -0800 +Subject: [PATCH] Fixed missing include for std::find_if. + +Throws an error when compiling on Windows. + +Upstream-Status: Backport [https://github.com/google/breakpad/commit/898a997855168c0e6a689072fefba89246271a5d] +Change-Id: Ieb34c00cf199aaa1b45a440086c48b8ed363b3c7 +Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5137658 +Reviewed-by: Ivan Penkov <ivanpe@chromium.org> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/common/module.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common/module.cc b/src/common/module.cc +index 0eb5aad8..b6f5da7e 100644 +--- a/src/common/module.cc ++++ b/src/common/module.cc +@@ -42,6 +42,7 @@ + #include <stdio.h> + #include <string.h> + ++#include <algorithm> + #include <functional> + #include <iostream> + #include <memory> +-- +2.43.0 + diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch index d7a5c06753..df41b4d6c0 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch @@ -12,11 +12,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Makefile.am | 12 ------------ 1 file changed, 12 deletions(-) -diff --git a/Makefile.am b/Makefile.am -index ee7454e4..69700192 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -187,10 +187,6 @@ src_client_linux_libbreakpad_client_a_SOURCES = \ +@@ -529,10 +529,6 @@ src_client_linux_libbreakpad_client_a_SO src/common/linux/linux_libc_support.cc \ src/common/linux/memory_mapped_file.cc \ src/common/linux/safe_readlink.cc @@ -24,10 +22,10 @@ index ee7454e4..69700192 100644 -src_client_linux_libbreakpad_client_a_SOURCES += \ - src/common/linux/breakpad_getcontext.S -endif - endif LINUX_HOST - if !DISABLE_PROCESSOR -@@ -508,10 +504,6 @@ src_client_linux_linux_client_unittest_shlib_SOURCES = \ + # Client tests + src_client_linux_linux_dumper_unittest_helper_SOURCES = \ +@@ -580,10 +576,6 @@ src_client_linux_linux_client_unittest_s src/processor/minidump.cc \ src/processor/pathname_stripper.cc \ src/processor/proc_maps_linux.cc @@ -38,7 +36,7 @@ index ee7454e4..69700192 100644 src_client_linux_linux_client_unittest_shlib_CPPFLAGS = \ $(AM_CPPFLAGS) $(TEST_CFLAGS) -@@ -541,10 +533,6 @@ src_client_linux_linux_client_unittest_shlib_LDADD = \ +@@ -613,10 +605,6 @@ src_client_linux_linux_client_unittest_s src/common/string_conversion.o \ $(TEST_LIBS) \ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) @@ -49,6 +47,3 @@ index ee7454e4..69700192 100644 if ANDROID_HOST src_client_linux_linux_client_unittest_shlib_LDFLAGS += \ -llog -lm --- -2.30.2 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch index 6b8d011d8b..b2d2c72cb1 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch @@ -10,6 +10,8 @@ Fix Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/client/linux/crash_generation/crash_generation_server.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch deleted file mode 100644 index afe8a61b29..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 66a2b6e4ba8e2b49115043127ce4aa0fcd71ad1e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 11 May 2021 11:12:35 -0700 -Subject: [PATCH] exception_handler.cc: Match the types for SIGSTKSZ - -In glibc 2.34, SIGSTKSZ is a syscall which returns a long int, therefore -current check fails - -| ../git/src/client/linux/handler/exception_handler.cc:141:49: error: no matching function for call to 'max(int, long int)' -| 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -| | ~~~~~~~~^~~~~~~~~~~~~~~~~ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/client/linux/handler/exception_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc -index ca353c40..dc0fc4a9 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384u, (unsigned)SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. --- -2.31.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch index 3dc55cf1fc..87e00c2422 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch @@ -4,6 +4,8 @@ Date: Sun, 1 Feb 2015 14:26:52 +0100 Subject: [PATCH 1/3] include <sys/reg.h> to get __WORDSIZE on musl libc --- +Upstream-Status: Pending + src/common/linux/elf_core_dump.h | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch index bdd787afd5..80e5a8a764 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch @@ -5,12 +5,14 @@ Subject: [PATCH] lss: Match syscalls to match musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + linux_syscall_support.h | 3 +++ 1 file changed, 3 insertions(+) --- a/linux_syscall_support.h +++ b/linux_syscall_support.h -@@ -816,6 +816,9 @@ struct kernel_statfs { +@@ -1006,6 +1006,9 @@ struct kernel_statx { #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) #endif @@ -20,17 +22,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #if defined(__x86_64__) #ifndef ARCH_SET_GS -@@ -947,6 +950,7 @@ struct kernel_statfs { - #ifndef __NR_fallocate - #define __NR_fallocate 324 +@@ -1140,6 +1143,7 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom 355 #endif + /* End of i386 definitions */ #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) #ifndef __NR_setresuid -@@ -1239,6 +1243,12 @@ struct kernel_statfs { - #ifndef __NR_fallocate - #define __NR_fallocate 285 +@@ -1448,6 +1452,12 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom 318 #endif +#ifndef __NR_pread +#define __NR_pread __NR_pread64 @@ -41,9 +43,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 -@@ -1418,6 +1428,12 @@ struct kernel_statfs { - #ifndef __NR_ioprio_get - #define __NR_ioprio_get (__NR_Linux + 274) +@@ -1633,6 +1643,12 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom (__NR_Linux + 313) #endif + +#undef __NR_pread diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch index 76b2088b01..81844d0d66 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch @@ -5,6 +5,8 @@ Subject: [PATCH 3/5] Dont include stab.h Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/common/stabs_reader.cc | 1 - src/common/stabs_reader.h | 12 +++++++++++- src/common/stabs_reader_unittest.cc | 1 - @@ -12,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> --- a/src/common/stabs_reader.cc +++ b/src/common/stabs_reader.cc -@@ -34,7 +34,9 @@ +@@ -38,7 +38,9 @@ #include "common/stabs_reader.h" #include <assert.h> @@ -24,7 +26,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include <string> --- a/src/common/stabs_reader.h +++ b/src/common/stabs_reader.h -@@ -58,6 +58,30 @@ +@@ -54,6 +54,30 @@ #elif defined(HAVE_A_OUT_H) #include <a.out.h> #endif @@ -57,7 +59,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include <vector> --- a/src/common/stabs_reader_unittest.cc +++ b/src/common/stabs_reader_unittest.cc -@@ -33,7 +33,9 @@ +@@ -36,7 +36,9 @@ #include <assert.h> #include <errno.h> @@ -69,8 +71,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include <string.h> --- a/configure.ac +++ b/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD -AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h]) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch index 851004704f..9b16dc3b2a 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch @@ -6,22 +6,22 @@ Subject: [PATCH 3/3] Fix conflict between musl libc <dirent.h> and lss Include <dirent.h> late to avoid the macro getdents64 in musl libc's <dirent.h> to conflict with linux_sycall_support.h. --- +Upstream-Status: Pending + src/client/linux/crash_generation/crash_generation_server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc -index 26c50a5c..2596afde 100644 --- a/src/client/linux/crash_generation/crash_generation_server.cc +++ b/src/client/linux/crash_generation/crash_generation_server.cc -@@ -28,7 +28,6 @@ - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@@ -31,7 +31,6 @@ + #endif #include <assert.h> -#include <dirent.h> #include <fcntl.h> #include <limits.h> #include <poll.h> -@@ -49,6 +48,8 @@ +@@ -52,6 +51,8 @@ #include "common/linux/guid_creator.h" #include "common/linux/safe_readlink.h" @@ -30,6 +30,3 @@ index 26c50a5c..2596afde 100644 static const char kCommandQuit = 'x'; namespace google_breakpad { --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch index 5892cfa7d6..ff331977b6 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch @@ -6,13 +6,15 @@ Subject: [PATCH 4/5] elf_reader.cc: include <sys/reg.h> to get __WORDSIZE on Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/common/dwarf/elf_reader.cc | 1 + 1 file changed, 1 insertion(+) --- a/src/common/dwarf/elf_reader.cc +++ b/src/common/dwarf/elf_reader.cc -@@ -30,12 +30,16 @@ - #define _GNU_SOURCE // needed for pread() +@@ -34,12 +34,16 @@ + #include <config.h> // Must come first #endif +#include <config.h> @@ -30,8 +32,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include <algorithm> --- a/configure.ac +++ b/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD -AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h]) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch index 51393967bc..cb323fbdcb 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch @@ -1,18 +1,16 @@ map the mcontext_t structure for musl -Upstream-Status: Inappropriate[need to consider Android] +Upstream-Status: Inappropriate [need to consider Android] Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc -=================================================================== ---- git.orig/src/client/linux/minidump_writer/linux_core_dumper.cc -+++ git/src/client/linux/minidump_writer/linux_core_dumper.cc -@@ -196,7 +196,7 @@ bool LinuxCoreDumper::EnumerateThreads() +--- a/src/client/linux/minidump_writer/linux_core_dumper.cc ++++ b/src/client/linux/minidump_writer/linux_core_dumper.cc +@@ -214,7 +214,7 @@ bool LinuxCoreDumper::EnumerateThreads() info.tgid = status->pr_pgrp; info.ppid = status->pr_ppid; #if defined(__mips__) --#if defined(__ANDROID__) -+#if defined(__ANDROID__) || !defined(__GLIBC__) +-# if defined(__ANDROID__) ++# if defined(__ANDROID__) || !defined(__GLIBC__) for (int i = EF_R0; i <= EF_R31; i++) info.mcontext.gregs[i - EF_R0] = status->pr_reg[i]; - #else // __ANDROID__ + # else // __ANDROID__ diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch index 96f5f48cc8..77d08399bf 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/linux_syscall_support.h +++ b/linux_syscall_support.h @@ -119,14 +119,7 @@ extern "C" { diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb index c752a10083..3bf4371e85 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb +++ b/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb @@ -6,33 +6,30 @@ SUMMARY = "An open-source multi-platform crash reporting system" DESCRIPTION = "Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact \"minidump\" files, send them back to your server, and produce C and C++ stack traces from these minidumps. " HOMEPAGE = "https://code.google.com/p/google-breakpad/" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8bb274ebd1901085fd71a8d8afe8831b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=07aeb530115539d62cacf9942fa60cac" SECTION = "libs" inherit autotools +DEPENDS += "zlib" DEPENDS:append:libc-musl = " libucontext" BBCLASSEXTEND = "native" PE = "2" -PV = "1.0" +SRCREV_FORMAT = "breakpad_gtest_protobuf_lss" -SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp" - -SRCREV_breakpad = "8b22babdf894e5aa98b2dbbe103f7e3856a71944" -#v1.10.0 -SRCREV_gtest = "4fe018038f87675c083d0cfb6a6b57c274fb1753" +SRCREV_breakpad = "8988364bcddd9b194b0bf931c10bc125987330ed" +#v1.11.0 +SRCREV_gtest = "e2239ee6043f73722e7aa812a459f54a28552929" SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac" -SRCREV_lss = "fd00dbbd0c06a309c657d89e9430143b179ff6db" -SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770" +SRCREV_lss = "9719c1e1e676814c456b55f5f070eabad6709d31" SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main;protocol=https \ git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest;branch=main;protocol=https \ git://github.com/protocolbuffers/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf;branch=master;protocol=https \ git://chromium.googlesource.com/linux-syscall-support;protocol=https;branch=main;destsuffix=git/src/third_party/lss;name=lss \ - git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp;branch=master \ file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \ file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \ file://0001-Turn-off-sign-compare-for-musl-libc.patch \ @@ -40,10 +37,9 @@ SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main;protocol=h file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \ file://mcontext.patch \ file://0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch \ - file://0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch \ + file://0001-Fixed-missing-include-for-std-find_if.patch \ file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \ file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \ - file://0001-Do-not-add-stack-pointer-to-clobber-list.patch;patchdir=src/third_party/lss \ " S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/capnproto/capnproto_0.10.2.bb b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb index 3d4f549b62..cb4aef5224 100644 --- a/meta-oe/recipes-devtools/capnproto/capnproto_0.10.2.bb +++ b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb @@ -5,9 +5,8 @@ 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 = "2e88221d3dde22266bfccf40eaee6ff9b40d113d" +SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV};protocol=https" +SRCREV = "1a0e12c0a3ba1f0dbbad45ddfef555166e0a14fc" S = "${WORKDIR}/git/c++" diff --git a/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch b/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch new file mode 100644 index 0000000000..989df8ed92 --- /dev/null +++ b/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch @@ -0,0 +1,34 @@ +From be56e955a32e5e9da0be32008afb8a8ee60e9b56 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 24 May 2023 19:31:23 -0700 +Subject: [PATCH] cgdb: Do not search for cgdb.txt in build dir + +If we do cross builds it encodes the build time workdir here and it wont +be useful to look into this dir since cross-built cgdb may not run on +build host and build workdir will not exist on target + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cgdb/interface.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/cgdb/interface.cpp b/cgdb/interface.cpp +index dc58137..d3aab5e 100644 +--- a/cgdb/interface.cpp ++++ b/cgdb/interface.cpp +@@ -1568,11 +1568,6 @@ void if_display_help(void) + + fs_util_get_path(PKGDATADIR, "cgdb.txt", cgdb_help_file); + +- /* File doesn't exist. Try to find cgdb.txt in the build dir in case +- * the user is running a built cgdb binary directly. */ +- if (!fs_verify_file_exists(cgdb_help_file)) +- fs_util_get_path(TOPBUILDDIR, "doc/cgdb.txt", cgdb_help_file); +- + ret_val = source_set_exec_line(src_viewer, cgdb_help_file, 1, 0); + + if (ret_val == 0) +-- +2.40.1 + diff --git a/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb b/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb index c5a0030823..922dfc7763 100644 --- a/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb +++ b/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb @@ -9,7 +9,8 @@ DEPENDS = "flex-native readline ncurses" inherit autotools texinfo -SRC_URI = "http://cgdb.me/files/${BP}.tar.gz" +SRC_URI = "http://cgdb.me/files/${BP}.tar.gz \ + file://0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch" SRC_URI[sha256sum] = "0d38b524d377257b106bad6d856d8ae3304140e1ee24085343e6ddf1b65811f1" CACHED_CONFIGUREVARS = "ac_cv_file__dev_ptmx=yes ac_cv_rl_version=6.2 ac_cv_file__proc_self_status=yes" diff --git a/meta-oe/recipes-devtools/cjson/cjson/run-ptest b/meta-oe/recipes-devtools/cjson/cjson/run-ptest new file mode 100644 index 0000000000..f061e94665 --- /dev/null +++ b/meta-oe/recipes-devtools/cjson/cjson/run-ptest @@ -0,0 +1,8 @@ +#!/bin/sh + +# exclude json_patch_tests +if ctest -E 'json_patch_tests' ; then + echo "PASS: cjson" +else + echo "FAIL: cjson" +fi diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.15.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.15.bb deleted file mode 100644 index 200f751669..0000000000 --- a/meta-oe/recipes-devtools/cjson/cjson_1.7.15.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "Ultralightweight JSON parser in ANSI C" -AUTHOR = "Dave Gamble" -HOMEPAGE = "https://github.com/DaveGamble/cJSON" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0" - -SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https" -SRCREV = "d348621ca93571343a56862df7de4ff3bc9b5667" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -EXTRA_OECMAKE += "\ - -DENABLE_CJSON_UTILS=On \ - -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \ - -DBUILD_SHARED_AND_STATIC_LIBS=On \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb new file mode 100644 index 0000000000..bdeab3055c --- /dev/null +++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Ultralightweight JSON parser in ANSI C" +HOMEPAGE = "https://github.com/DaveGamble/cJSON" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0" + +SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \ + file://run-ptest \ + " +SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig ptest + +RDEPENDS:${PN}-ptest += "cmake" + +do_install_ptest() { + # create directories + install -d ${D}${PTEST_PATH} ${D}${PTEST_PATH}/tests ${D}${PTEST_PATH}/fuzzing + install -d ${D}${PTEST_PATH}/tests/inputs ${D}${PTEST_PATH}/tests/json-patch-tests + # CTestTestfiles.cmake contain fully defined path generated by cmake. + # Change the fully defined path to ptest path on the target + sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake + sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake + sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake + # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property; + # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway. + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake + # install test artifacts + install ${B}/cJSON_test ${D}${PTEST_PATH} + install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_* ${B}/tests/print_* ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/ + install ${B}/tests/inputs/* ${D}${PTEST_PATH}/tests/inputs + install ${B}/fuzzing/fuzz_main ${D}${PTEST_PATH}/fuzzing +} + +EXTRA_OECMAKE += "\ + -DENABLE_CJSON_UTILS=On \ + -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \ + -DBUILD_SHARED_AND_STATIC_LIBS=On \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/cloc/cloc_1.94.bb b/meta-oe/recipes-devtools/cloc/cloc_1.98.bb index 2f92d81001..acf882cc76 100644 --- a/meta-oe/recipes-devtools/cloc/cloc_1.94.bb +++ b/meta-oe/recipes-devtools/cloc/cloc_1.98.bb @@ -1,14 +1,14 @@ SUMMARY = "Count blank lines, comment lines, and physical lines of source code \ in many programming languages." -AUTHOR = "Al Danial" LICENSE="GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" SRC_URI = "https://github.com/AlDanial/cloc/releases/download/v${PV}/${BP}.tar.gz" -SRC_URI[sha256sum] = "08212290c4e9b21c7bb1abc0a9b4a365ce1c5eb0d8f3ebb74d50b29559a71a9c" +SRC_URI[sha256sum] = "5fe0b159eb75718df7308a4f61470eaddf82170733929999e37a3fbb4651cf8a" UPSTREAM_CHECK_URI = "https://github.com/AlDanial/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" do_configure[noexec] = "1" do_compile[noexec] = "1" diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-build-Use-ilp32d-abi-on-riscv32-and-lp64d-on-rv64.patch b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-build-Use-ilp32d-abi-on-riscv32-and-lp64d-on-rv64.patch new file mode 100644 index 0000000000..a8ff77298f --- /dev/null +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-build-Use-ilp32d-abi-on-riscv32-and-lp64d-on-rv64.patch @@ -0,0 +1,32 @@ +From 00f822ab79b6c06936147af4d832e439cecf0fc0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 7 Jan 2023 19:31:58 -0800 +Subject: [PATCH] build: Use ilp32d abi on riscv32 and lp64d on rv64 + +ilp32d is common ABI used for linux distributions therefore a better +default, similarily lp64d is common ABI for rv64 linux + +Upstream-Status: Submitted [https://github.com/concurrencykit/ck/pull/204] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + build/ck.build.riscv | 2 +- + build/ck.build.riscv64 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/build/ck.build.riscv b/build/ck.build.riscv +index 61e0033..11ac840 100644 +--- a/build/ck.build.riscv ++++ b/build/ck.build.riscv +@@ -1 +1 @@ +-CFLAGS+=-mabi=ilp32 ++CFLAGS+=-mabi=ilp32d +diff --git a/build/ck.build.riscv64 b/build/ck.build.riscv64 +index 9f89791..7639bd6 100644 +--- a/build/ck.build.riscv64 ++++ b/build/ck.build.riscv64 +@@ -1 +1 @@ +-CFLAGS+=-mabi=lp64 ++CFLAGS+=-mabi=lp64d +-- +2.39.0 + diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch new file mode 100644 index 0000000000..718f8c19f1 --- /dev/null +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch @@ -0,0 +1,84 @@ +From e1dcd27e816520bdabc69511d90c4a2ebc242831 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 6 Jan 2023 18:51:34 -0800 +Subject: [PATCH] configure: Fix compoiler detection logic for + cross-compilation + +We can not run binaries during cross compile, so poke at compiler to +figure out if it is clang or gcc, for OE we do not have other compilers +in opensource world if there are we can extend this logic + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure | 56 ++++++++++++++++--------------------------------------- + 1 file changed, 16 insertions(+), 40 deletions(-) + +--- a/configure ++++ b/configure +@@ -661,48 +661,24 @@ if test "$PROFILE"; then + fi + + printf "Finding suitable compiler........" +-if test ! -x "${CC}"; then +- CC=`pathsearch "${CC:-cc}"` +- if test -z "$CC" -o ! -x "$CC"; then +- CC=`pathsearch "${CC:-gcc}"` +- fi ++if test -z "$CC"; then ++ if test ! -x "${CC}"; then ++ CC=`pathsearch "${CC:-cc}"` ++ if test -z "$CC" -o ! -x "$CC"; then ++ CC=`pathsearch "${CC:-gcc}"` ++ fi ++ fi ++ assert "$CC" "not found" ++fi ++if `$CC --version | grep gcc > /dev/null 2>&1`; then ++ COMPILER=gcc ++elif `$CC --version | grep clang > /dev/null 2>&1`; then ++ COMPILER=clang ++else ++ COMPILER="not-found" + fi +-assert "$CC" "not found" +- +-cat << EOF > .1.c +-#include <stdio.h> +-int main(void) { +-#if defined(_WIN32) +-#if defined(__MINGW64__) +- puts("mingw64"); +- return (0); +-#elif defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION >= 3) +- puts("mingw32"); +- return (0); +-#else +- return (1); +-#endif /* __MINGW32__ && __MINGW32_MAJOR_VERSION >= 3 */ +-#elif defined(__clang__) && (__clang_major__ >= 3) +- puts("clang"); +- return (0); +-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5110) +- puts("suncc"); +- return (0); +-#elif defined(__GNUC__) && (__GNUC__ >= 4) +- puts("gcc"); +- return (0); +-#else +- return (1); +-#endif +-} +-EOF +- +-$CC -o .1 .1.c +-COMPILER=`./.1 2> /dev/null` +-r=$? +-rm -f .1.c .1 + +-if test "$r" -ne 0; then ++if test "$COMPILER" = "not-found"; then + assert "" "update compiler" + else + echo "success [$CC]" diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch deleted file mode 100644 index 9e5058f2ca..0000000000 --- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ab0eec78382bd00ce533aec2c84fd50c1733033d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 5 Jan 2013 19:42:51 -0800 - ---- - configure | 32 ++++++++++++++++++-------------- - 1 file changed, 18 insertions(+), 14 deletions(-) - -diff --git a/configure b/configure -index 76c2812..78ce2ff 100755 ---- a/configure -+++ b/configure -@@ -535,14 +535,18 @@ else - GZIP_SUFFIX=".gz" - fi - --printf "Finding suitable compiler........" --CC=`pathsearch "${CC:-cc}"` --if test -z "$CC" -o ! -x "$CC"; then -- CC=`pathsearch "${CC:-gcc}"` -+if test -z "$CC"; then -+ printf "Finding suitable compiler........" -+ CC=`pathsearch "${CC:-cc}"` -+ if test -z "$CC" -o ! -x "$CC"; then -+ CC=`pathsearch "${CC:-gcc}"` -+ fi - fi - assert "$CC" "not found" - --cat << EOF > .1.c -+if test -z "$COMPILER"; then -+ -+ cat << EOF > .1.c - #include <stdio.h> - int main(void) { - #if defined(_WIN32) -@@ -569,16 +573,16 @@ int main(void) { - #endif - } - EOF -+ $CC -o .1 .1.c -+ COMPILER=`./.1` -+ r=$? -+ rm -f .1.c .1 - --$CC -o .1 .1.c --COMPILER=`./.1` --r=$? --rm -f .1.c .1 -- --if test "$r" -ne 0; then -- assert "" "update compiler" --else -- echo "success [$CC]" -+ if test "$r" -ne 0; then -+ assert "" "update compiler" -+ else -+ echo "success [$CC]" -+ fi - fi - - if test "$COMPILER" = "suncc"; then diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb index 0018064119..47a3d88853 100644 --- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb @@ -7,26 +7,26 @@ LICENSE = "BSD-2-Clause & Apache-2.0" HOMEPAGE = "http://concurrencykit.org" SECTION = "base" -PV = "0.5.1+git${SRCPV}" -SRCREV = "f97d3da5c375ac2fc5a9173cdd36cb828915a2e1" +PV = "0.7.0+git" +SRCREV = "6e8e5bec2e2f8cef2072a68579cbb07ababf3331" LIC_FILES_CHKSUM = "file://LICENSE;md5=a0b24c1a8f9ad516a297d055b0294231" SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \ - file://cross.patch \ -" + file://0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch \ + file://0001-build-Use-ilp32d-abi-on-riscv32-and-lp64d-on-rv64.patch" S = "${WORKDIR}/git" -COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64).*-linux*" +COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*" inherit autotools-brokensep PLAT:powerpc64 = "ppc64" PLAT:powerpc64le = "ppc64" +PLAT:riscv32 = "riscv" PLAT ?= "${HOST_ARCH}" do_configure () { export PLATFORM=${PLAT} - export COMPILER='gcc' ${S}/configure \ --prefix=${prefix} \ --includedir=${includedir} \ diff --git a/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb b/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb new file mode 100644 index 0000000000..0d7bdc83dc --- /dev/null +++ b/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb @@ -0,0 +1,14 @@ +SUMMARY = "C++ Code Generator library" +BUGTRACKER = "https://github.com/rm5248/libcppgenerate/issues" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" + +SRC_URI = "git://github.com/rm5248/libcppgenerate.git;branch=master;protocol=https" +SRCREV = "930c5503f76c877b72b9ff8546353d6f422bd010" + +S = "${WORKDIR}/git" + +inherit cmake + +BBCLASSEXTEND="native nativesdk" diff --git a/meta-oe/recipes-devtools/cpuid/cpuid_20211129.bb b/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb index 3218ba652a..ed339e0160 100644 --- a/meta-oe/recipes-devtools/cpuid/cpuid_20211129.bb +++ b/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb @@ -8,16 +8,18 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "http://www.etallen.com/${BPN}/${BP}.src.tar.gz \ + file://0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch \ " -SRC_URI[sha256sum] = "230772bb88c44732e68a42d2eff43bcff46d893bf4ea6e04151d4cb6e8c88e2f" +SRC_URI[sha256sum] = "b1c83045efc26076307751e0662d580277f5f9bf89cf027231a7812003c3a4e8" COMPATIBLE_HOST = "(i.86|x86_64).*-linux" inherit perlnative -# The install rule from the Makefile has hardcoded paths, so we duplicate -# the actions to accommodate different paths. do_install () { - install -D -m 0755 ${B}/cpuid ${D}/${bindir}/cpuid - install -D -m 0444 ${B}/cpuid.man.gz ${D}/${mandir} + oe_runmake DESTDIR=${D} bindir=${bindir} mandir=${mandir} install } + +RDEPENDS:${PN} = "perl" + +INSANE_SKIP:${PN} += "already-stripped" diff --git a/meta-oe/recipes-devtools/cpuid/files/0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch b/meta-oe/recipes-devtools/cpuid/files/0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch new file mode 100644 index 0000000000..8654fb86c3 --- /dev/null +++ b/meta-oe/recipes-devtools/cpuid/files/0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch @@ -0,0 +1,36 @@ +From 1339348c5b69b32378a638d65b16297d29c5fa22 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 7 Nov 2023 16:06:49 +0800 +Subject: [PATCH] Makefile: update the hardcode path to bindir/mandir + +Update the hardcode path to bindir/mandir + +Upstream-Status: Pending [ Send to cpuid@etallen.com ] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 828d2b1..365e26d 100644 +--- a/Makefile ++++ b/Makefile +@@ -55,10 +55,10 @@ cpuinfo2cpuid.man.gz: cpuinfo2cpuid.man + gzip < $< > $@ + + install: $(PROG) $(PROG).man.gz cpuinfo2cpuid cpuinfo2cpuid.man.gz +- install -D $(INSTALL_STRIP) -m 755 $(PROG) $(BUILDROOT)/usr/bin/$(PROG) +- install -D -m 444 $(PROG).man.gz $(BUILDROOT)/usr/share/man/man1/$(PROG).1.gz +- install -D -m 755 cpuinfo2cpuid $(BUILDROOT)/usr/bin/cpuinfo2cpuid +- install -D -m 444 cpuinfo2cpuid.man.gz $(BUILDROOT)/usr/share/man/man1/cpuinfo2cpuid.1.gz ++ install -D $(INSTALL_STRIP) -m 755 $(PROG) $(BUILDROOT)${bindir}/$(PROG) ++ install -D -m 444 $(PROG).man.gz $(BUILDROOT)${mandir}/man1/$(PROG).1.gz ++ install -D -m 755 cpuinfo2cpuid $(BUILDROOT)${bindir}/cpuinfo2cpuid ++ install -D -m 444 cpuinfo2cpuid.man.gz $(BUILDROOT)${mandir}/man1/cpuinfo2cpuid.1.gz + + clean: + rm -f $(PROG) $(PROG).i386 $(PROG).x86_64 +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb b/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb new file mode 100644 index 0000000000..b404d4131e --- /dev/null +++ b/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb @@ -0,0 +1,13 @@ +SUMMARY = "Cpuset manipulation tool" +HOMEPAGE = "https://github.com/SUSE/cpuset" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "git://github.com/SUSE/cpuset.git;protocol=https;branch=master" + +SRCREV = "4f80263208935f0df4f616cf9d8cb7285599a670" +S = "${WORKDIR}/git" + +inherit setuptools3 + +RDEPENDS:${PN} += "python3-core python3-logging python3-pydoc" diff --git a/meta-oe/recipes-devtools/ctags/ctags_5.9.20220703.0.bb b/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb index fb736db574..247e1a8446 100644 --- a/meta-oe/recipes-devtools/ctags/ctags_5.9.20220703.0.bb +++ b/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" inherit autotools-brokensep pkgconfig manpages -SRCREV = "787811b6eac03ab81ccf5b6957432d893eb982cb" +SRCREV = "40b58618f9f0dc4123a205cbd50b73c6ab2e6f5c" SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" S = "${WORKDIR}/git" @@ -32,3 +32,5 @@ 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-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch index 12dd238108..faa66e0268 100644 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch @@ -1,20 +1,20 @@ -From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 Mon Sep 17 00:00:00 2001 +From 6c8b0a3f9c09a7a135d95ff18038bcba22e87b86 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Thu, 8 Apr 2021 14:06:05 +0800 -Subject: [PATCH 1/2] support to override /usr/sbin and /usr/share +Subject: [PATCH] support to override /usr/sbin and /usr/share Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - Makefile | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) + Makefile | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile -index 8516803..a2d8c00 100644 +index 21a9a39..649f465 100644 --- a/Makefile +++ b/Makefile -@@ -5,14 +5,16 @@ all: +@@ -5,13 +5,15 @@ all: clean: @@ -28,14 +28,12 @@ index 8516803..a2d8c00 100644 + mkdir -p $(DESTDIR)$(sbindir) cp -a scripts/* $(DSDIR)/scripts/ - install -o root -g root -m 0644 functions $(DSDIR)/ + install -m 0644 functions $(DSDIR)/ - sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap -- chown root:root $(DESTDIR)/usr/sbin/debootstrap - chmod 0755 $(DESTDIR)/usr/sbin/debootstrap + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)$(sbindir)/debootstrap -+ chown root:root $(DESTDIR)$(sbindir)/debootstrap + chmod 0755 $(DESTDIR)$(sbindir)/debootstrap -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch index 69329df4ea..5de65779d4 100644 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch @@ -1,7 +1,7 @@ -From f0420b201f2fb5286ccf5657faa6b38cd2680e10 Mon Sep 17 00:00:00 2001 +From 3fee46c7e50f432fbd5c97c60b918d71c91f1adc Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Thu, 8 Apr 2021 14:08:06 +0800 -Subject: [PATCH 2/2] support to override /usr/bin/arch-test +Subject: [PATCH] support to override /usr/bin/arch-test Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] @@ -11,12 +11,12 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debootstrap b/debootstrap -index 9b9e58d..a3cf3af 100755 +index 552c8d6..11a9465 100755 --- a/debootstrap +++ b/debootstrap @@ -51,6 +51,10 @@ INRELEASE_PATH="" + DEF_MIRROR="http://deb.debian.org/debian" - DEF_HTTPS_MIRROR="https://deb.debian.org/debian" +if [ -z "$ARCH_TEST" ]; then + ARCH_TEST="/usr/bin/arch-test" @@ -25,7 +25,7 @@ index 9b9e58d..a3cf3af 100755 # set $CONTAINER detect_container -@@ -645,12 +649,12 @@ fi +@@ -661,12 +665,12 @@ fi ########################################################################### @@ -43,5 +43,5 @@ index 9b9e58d..a3cf3af 100755 ret=3 fi -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch index 2a5f233165..5cd1ce88af 100644 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch @@ -1,4 +1,4 @@ -From e735fb23f46f0c3c7a1144ba6b4050bfc0015a05 Mon Sep 17 00:00:00 2001 +From e92554e57b4aae242cb0416025883ccc2c539d2a Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Wed, 2 Jun 2021 13:34:35 +0800 Subject: [PATCH] do not hardcode the full path of dpkg @@ -16,10 +16,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debootstrap b/debootstrap -index a3cf3af..5e96c3e 100755 +index 11a9465..17ab05a 100755 --- a/debootstrap +++ b/debootstrap -@@ -538,7 +538,7 @@ fi +@@ -551,7 +551,7 @@ fi if in_path dpkg && \ dpkg --print-architecture >/dev/null 2>&1; then @@ -29,5 +29,5 @@ index a3cf3af..5e96c3e 100755 udpkg --print-architecture >/dev/null 2>&1; then HOST_ARCH=$(/usr/bin/udpkg --print-architecture) -- -2.27.0 +2.25.1 diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.127.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb index 5e0a488429..d4783b3549 100644 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.127.bb +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb @@ -2,16 +2,16 @@ SUMMARY = "Install a Debian system into a subdirectory" HOMEPAGE = "https://wiki.debian.org/Debootstrap" SECTION = "devel" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7b45429ef05610abf91ac199fdb3a6e" SRC_URI = "\ - http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${PV}.tar.gz \ + ${DEBIAN_MIRROR}/main/d/debootstrap/debootstrap_${PV}.tar.gz \ file://0001-support-to-override-usr-sbin-and-usr-share.patch \ file://0002-support-to-override-usr-bin-arch-test.patch \ - file://0001-do-not-hardcode-the-full-path-of-dpkg.patch \ + file://0003-do-not-hardcode-the-full-path-of-dpkg.patch \ " -SRC_URI[sha256sum] = "45887cf0582e6d16598e50713278d16b2272d02bdd117a9876e98277300dabd4" +SRC_URI[sha256sum] = "666927457ee4b0b3e68e55a0efbf3fb69189610b7abbd534017d7032cb3ae833" S = "${WORKDIR}/debootstrap" diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch index ea940e9932..a3a3df4a7b 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch @@ -8,6 +8,8 @@ system header. Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + dmalloc.h.3 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch index 967643badc..ba65d394f0 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Description: Changes for building shared libraries This patch includes changes for building shared libraries with PIC object files and the correct soname and libname. diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch index be09452573..9cbc0a2884 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Description: Fix LOCK_THREADS in settings.dist This patch takes into account that if --enable-threads is used, LOCK_THREADS doesn't get updated diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch index e1db690599..94ca93647f 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + This patch makes configure use the cross ld and ar rather than the native tools. It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch index 2581e54880..3b7344dbf9 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Index: dmalloc-5.5.2/Makefile.in =================================================================== --- dmalloc-5.5.2.orig/Makefile.in diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch index 935ac983a6..18f5993e47 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Patch to correctly handle the MIPS case. It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch index 7edd46412a..1a9b0060b9 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Make install rules use DESTDIR. Split installation of the utilitity from the global install. diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch index a5bd736610..9c928fc438 100644 --- a/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + We cant run tests during cross compile therefore pin to 4k pages Signed-off-by: Khem Raj <raj.khem@gmail.com> diff --git a/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb index f170b9f824..599675a345 100644 --- a/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb +++ b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb @@ -4,8 +4,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/ubinux/dnf-plugin-tui.git;branch=master;protocol=https" -SRCREV = "bac88927b253cdcfe0d06ac7dc5afb876cd2d996" -PV = "1.3" +SRCREV = "ad48d934c54ab01026634c90f47f151f148b8147" SRC_URI:append:class-target = " file://oe-remote.repo.sample" @@ -25,7 +24,7 @@ do_install:append() { do_install:append:class-target() { install -d ${D}${sysconfdir}/yum.repos.d - install -m 0644 ${WORKDIR}/oe-remote.repo.sample ${D}${sysconfdir}/yum.repos.d + install -m 0644 ${UNPACKDIR}/oe-remote.repo.sample ${D}${sysconfdir}/yum.repos.d } do_install:append:class-nativesdk() { @@ -42,6 +41,6 @@ RDEPENDS:${PN} += " \ dnf \ libnewt-python \ " - BBCLASSEXTEND = "nativesdk" + SKIP_RECIPE[dnf-plugin-tui] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}" diff --git a/meta-oe/recipes-devtools/doxygen/doxygen/0001-build-don-t-look-for-Iconv.patch b/meta-oe/recipes-devtools/doxygen/doxygen/0001-build-don-t-look-for-Iconv.patch index 6906efd1c0..47c8edb497 100644 --- a/meta-oe/recipes-devtools/doxygen/doxygen/0001-build-don-t-look-for-Iconv.patch +++ b/meta-oe/recipes-devtools/doxygen/doxygen/0001-build-don-t-look-for-Iconv.patch @@ -10,7 +10,7 @@ C library. We don't need this check in meta-openembedded. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> -Upstream-status: Inappropriate +Upstream-Status: Inappropriate - upstream doxygen must build on many architectures, this change is too intrusive for upstream --- diff --git a/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch b/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch index b6d007d8df..796bc61ddc 100644 --- a/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch +++ b/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch @@ -34,7 +34,7 @@ This patch is only needded by doxygen-native. Updated to apply to release 1.9.1. -Upstream-Status: Inappropriate[oe specific] +Upstream-Status: Inappropriate [oe specific] Co-Authored-By: Kai Kang <kai.kang@windriver.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> diff --git a/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb b/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb index 92fea981e1..16a4250b2d 100644 --- a/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb +++ b/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb @@ -12,6 +12,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.src.tar.gz \ SRC_URI:append:class-native = " file://doxygen-native-only-check-python3.patch" SRC_URI[sha256sum] = "f352dbc3221af7012b7b00935f2dfdc9fb67a97d43287d2f6c81c50449d254e0" +UPSTREAM_CHECK_URI = "https://github.com/doxygen/doxygen/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" + inherit cmake python3native +EXTRA_OECMAKE += "\ + -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \ + -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \ +" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb new file mode 100644 index 0000000000..b567f11f5c --- /dev/null +++ b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb @@ -0,0 +1,18 @@ +SUMMARY = "EditorConfig helps maintain consistent coding styles across various editors and IDEs." +HOMEPAGE = "https://https://editorconfig.org" +SECTION = "libs" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38f617473e9f7373b5e79baf437accf8" + +SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" +SRCREV = "e082c947e7f7b14240195d55c060a6e1eda1b0a1" + +inherit cmake + +DEPENDS = "pcre2" + +do_install:append() { + sed -i -e 's|${STAGING_DIR_HOST}||g' ${D}${libdir}/cmake/EditorConfig/EditorConfigTargets.cmake +} diff --git a/meta-oe/recipes-devtools/exprtk/exprtk_git.bb b/meta-oe/recipes-devtools/exprtk/exprtk_git.bb index 52975c8215..4019f26899 100644 --- a/meta-oe/recipes-devtools/exprtk/exprtk_git.bb +++ b/meta-oe/recipes-devtools/exprtk/exprtk_git.bb @@ -3,9 +3,9 @@ HOMEPAGE = "https://github.com/ArashPartow/exprtk" SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -SRCREV = "281c2ccc65b8f91c012ea3725ebcef406378a225" +SRCREV = "f46bffcd6966d38a09023fb37ba9335214c9b959" -SRC_URI = "git://github.com/ArashPartow/exprtk.git;branch=master;protocol=https" +SRC_URI = "git://github.com/ArashPartow/exprtk.git;branch=release;protocol=https" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/extract-cert/extract-cert_0.3.bb b/meta-oe/recipes-devtools/extract-cert/extract-cert_0.3.bb new file mode 100644 index 0000000000..a4cd7ad157 --- /dev/null +++ b/meta-oe/recipes-devtools/extract-cert/extract-cert_0.3.bb @@ -0,0 +1,14 @@ +SUMMARY = "small helper program to extract X.509 certificates from PKCS#11 tokens" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "openssl" + +SRC_URI = "git://git.pengutronix.de/git/extract-cert;protocol=https;branch=master;" +SRCREV = "d652b4e8279aef2a85f58676ab472744bafeafc9" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.6.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb index 3ca4772100..3103fd0091 100644 --- a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.6.bb +++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb @@ -2,6 +2,9 @@ SUMMARY = "Memory Efficient Serialization Library" HOMEPAGE = "https://github.com/google/flatbuffers" SECTION = "console/tools" LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +require flatbuffers.inc PACKAGE_BEFORE_PN = "${PN}-compiler" @@ -10,14 +13,8 @@ DEPENDS = "flatbuffers-native" RDEPENDS:${PN}-compiler = "${PN}" RDEPENDS:${PN}-dev += "${PN}-compiler" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "615616cb5549a34bdf288c04bc1b94bd7a65c396" -SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" S = "${WORKDIR}/git" -CVE_CHECK_IGNORE += "CVE-2020-35864" - EXTRA_OECMAKE += " \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ @@ -26,6 +23,11 @@ EXTRA_OECMAKE:append:class-target = " -DFLATBUFFERS_FLATC_EXECUTABLE=${STAGING_B inherit cmake python3native +rm_flatc_cmaketarget_for_target() { + rm -f "${SYSROOT_DESTDIR}/${libdir}/cmake/flatbuffers/FlatcTargets.cmake" +} +SYSROOT_PREPROCESS_FUNCS:class-target += "rm_flatc_cmaketarget_for_target" + FILES:${PN}-compiler = "${bindir}" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers.inc b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.inc new file mode 100644 index 0000000000..8f6c4c68f1 --- /dev/null +++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.inc @@ -0,0 +1,3 @@ +PV = "24.3.25" +SRCREV = "595bf0007ab1929570c7671f091313c8fc20644e" +SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" diff --git a/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.6.bb b/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers.bb index 7c05e76d9a..1fab013580 100644 --- a/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.6.bb +++ b/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers.bb @@ -2,15 +2,14 @@ SUMMARY = "Memory Efficient Serialization Library - Python3 Modules" HOMEPAGE = "https://github.com/google/flatbuffers" SECTION = "console/tools" LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -LIC_FILES_CHKSUM = "file://../LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" +require flatbuffers.inc -SRCREV = "615616cb5549a34bdf288c04bc1b94bd7a65c396" -SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" S = "${WORKDIR}/git/python" RDEPENDS:${PN} = "flatbuffers" inherit setuptools3 -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/flatcc/flatcc/0001-Check-for-C-standard-version-23-for-__fallthrough__.patch b/meta-oe/recipes-devtools/flatcc/flatcc/0001-Check-for-C-standard-version-23-for-__fallthrough__.patch new file mode 100644 index 0000000000..c9ff55a167 --- /dev/null +++ b/meta-oe/recipes-devtools/flatcc/flatcc/0001-Check-for-C-standard-version-23-for-__fallthrough__.patch @@ -0,0 +1,31 @@ +From 7c199e3b191a6f714694035f1eba40112e71675c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 1 Feb 2024 18:41:51 -0800 +Subject: [PATCH] Check for C standard version >= 23 for [[__fallthrough__]] + +This avoids warnings with clang-18+ e.g. + +pprintint.h:256:6: error: [[]] attributes are a C23 extension [-Werror,-Wc23-extensions] + +Upstream-Status: Submitted [https://github.com/dvidelabs/flatcc/pull/273] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/flatcc/portable/pattributes.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/flatcc/portable/pattributes.h b/include/flatcc/portable/pattributes.h +index 9240fa3..dd4918a 100644 +--- a/include/flatcc/portable/pattributes.h ++++ b/include/flatcc/portable/pattributes.h +@@ -57,7 +57,7 @@ extern "C" { + + + /* https://en.cppreference.com/w/c/language/attributes/fallthrough */ +-#if PORTABLE_HAS_C_ATTRIBUTE(__fallthrough__) ++#if PORTABLE_HAS_C_ATTRIBUTE(__fallthrough__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L + # define pattribute_fallthrough [[__fallthrough__]] + #elif PORTABLE_HAS_ATTRIBUTE(__fallthrough__) + # define pattribute_fallthrough __attribute__((__fallthrough__)) +-- +2.43.0 + diff --git a/meta-oe/recipes-devtools/flatcc/flatcc_git.bb b/meta-oe/recipes-devtools/flatcc/flatcc_git.bb new file mode 100644 index 0000000000..2530dac526 --- /dev/null +++ b/meta-oe/recipes-devtools/flatcc/flatcc_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "FlatCC FlatBuffers in C for C" +DESCRIPTION = "FlatCC is a compiler that generates FlatBuffers code for C \ +given a FlatBuffer schema file." +HOMEPAGE = "https://github.com/dvidelabs/flatcc" +SECTION = "devel/lib" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b3d8fb7158bf7e2600ba3191428dc4ef" + +PV = "0.6.2+git" + +SRC_URI = " \ + git://github.com/dvidelabs/flatcc.git;protocol=https;branch=master \ + file://0001-Check-for-C-standard-version-23-for-__fallthrough__.patch \ +" +SRCREV = "1653ec964730ec7d9892a08a1695ada6d20f5196" + +S = "${WORKDIR}/git" + +inherit cmake + +# Enable installation for target +# Disable tests as is not possible to execute with cross-compilation +EXTRA_OECMAKE += " \ + -DFLATCC_INSTALL=On \ + -DFLATCC_TEST=Off \ + -DFLATCC_ALLOW_WERROR=Off \ + -DFLATCC_INSTALL_LIB=${baselib} \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/geany/geany-plugins/0001-scope-Use-0-instead-of-NULL-for-gboolean.patch b/meta-oe/recipes-devtools/geany/geany-plugins/0001-scope-Use-0-instead-of-NULL-for-gboolean.patch new file mode 100644 index 0000000000..bb03fa63de --- /dev/null +++ b/meta-oe/recipes-devtools/geany/geany-plugins/0001-scope-Use-0-instead-of-NULL-for-gboolean.patch @@ -0,0 +1,34 @@ +From 9ee9388bc66e6cf68db96b2014dca2115f745dc9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Aug 2022 22:33:46 -0700 +Subject: [PATCH] scope: Use 0 instead of NULL for gboolean + +Fixes warnings with clang 15+ + +scope/src/stack.c:168:11: error: incompatible pointer to integer conversion initializing 'gboolean' (aka 'int') with an expression of type 'void *' [-Wint-conversion] + gboolean entry = NULL; + ^ ~~~~ +1 error generated. + +Upstream-Status: Submitted [https://github.com/geany/geany-plugins/pull/1191] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scope/src/stack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scope/src/stack.c b/scope/src/stack.c +index b03909fe..041dd415 100644 +--- a/scope/src/stack.c ++++ b/scope/src/stack.c +@@ -165,7 +165,7 @@ void on_stack_follow(GArray *nodes) + gboolean stack_entry(void) + { + GtkTreeIter iter; +- gboolean entry = NULL; ++ gboolean entry = 0; + + if (gtk_tree_selection_get_selected(selection, NULL, &iter)) + { +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb b/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb index fa4cccca03..1ed2993bf0 100644 --- a/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb +++ b/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb @@ -33,6 +33,7 @@ SRC_URI = " \ file://0001-Use-pkg-config-to-find-gpgme.patch \ file://0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch \ file://0001-geany.m4-Do-not-tinker-with-pkg-config-paths.patch \ + file://0001-scope-Use-0-instead-of-NULL-for-gboolean.patch \ " SRC_URI[sha256sum] = "1c578a7ebb390aa8882f195acd3d8da3ceb73925d291b28dec90cd3e5fd20586" diff --git a/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch b/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch new file mode 100644 index 0000000000..dc87ed60b9 --- /dev/null +++ b/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch @@ -0,0 +1,34 @@ +From 7f0cd4b6b56183b0afbefd01425e5ebd2b8733b4 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <martin.jansa@gmail.com> +Date: Mon, 8 Jul 2024 13:18:11 +0200 +Subject: [PATCH] Makefile: fix typo in soname argument + +* introduced in: + https://sourceforge.net/p/giflib/code/ci/b65c7ac2905c0842e7977a7b51d83af4486ca7b8/ + there is no LIBUTILMAJOR variable only LIBUTILSOMAJOR leading to: + + ld: fatal error: -soname: must take a non-empty argument + collect2: error: ld returned 1 exit status + + with some linkers like GOLD + +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> +--- +Upstream-Status: Submitted [https://sourceforge.net/p/giflib/code/merge-requests/17/] + + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 87966a9..41b149e 100644 +--- a/Makefile ++++ b/Makefile +@@ -109,7 +109,7 @@ $(LIBUTILSO): $(UOBJECTS) $(UHEADERS) + ifeq ($(UNAME), Darwin) + $(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBUTILSO) + else +- $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS) ++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILSOMAJOR) -o $(LIBUTILSO) $(UOBJECTS) + endif + + libutil.a: $(UOBJECTS) $(UHEADERS) diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb index 79afe9a70f..aa47f93095 100644 --- a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb +++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb @@ -7,8 +7,13 @@ CVE_PRODUCT = "giflib_project:giflib" DEPENDS = "xmlto-native" -SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz" -SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" +SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \ + https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/tree/doc/giflib-logo.gif?format=raw;subdir=${BP}/doc;name=logo;downloadfilename=giflib-logo.gif \ + file://0001-Makefile-fix-typo-in-soname-argument.patch \ +" + +SRC_URI[logo.sha256sum] = "1a54383986adad1521d00e003b4c482c27e8bc60690be944a1f3319c75abc2c9" +SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb" do_install() { # using autotools's default will end up in /usr/local diff --git a/meta-oe/recipes-devtools/glade/glade_3.22.2.bb b/meta-oe/recipes-devtools/glade/glade_3.22.2.bb index 6c1112038c..72c4036be2 100644 --- a/meta-oe/recipes-devtools/glade/glade_3.22.2.bb +++ b/meta-oe/recipes-devtools/glade/glade_3.22.2.bb @@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \ file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475" DEPENDS = "gtk+3 glib-2.0 libxml2 intltool-native \ gnome-common-native \ + autoconf-archive-native \ " - -inherit features_check autotools pkgconfig gnomebase gobject-introspection mime-xdg +GNOMEBASEBUILDCLASS = "autotools" +inherit features_check autotools pkgconfig gnomebase gobject-introspection mime-xdg gtk-doc # xfce4 depends on libwnck3, gtk+3 and libepoxy need to be built with x11 PACKAGECONFIG. # cairo would at least needed to be built with xlib. @@ -22,7 +23,11 @@ SRC_URI[sha256sum] = "edefa6eb24b4d15bd52589121dc109bc08c286157c41288deb74dd9cc3 EXTRA_OECONF += "--disable-man-pages" -FILES:${PN} += "${datadir}/* ${libdir}/glade/modules/libgladegtk.so" -FILES:${PN}-dev += "${libdir}/glade/modules/libgladegtk.la" -FILES:${PN}-dbg += "${libdir}/glade/modules/.debug/libgladegtk.so" +FILES:${PN} += "${datadir}/glade ${datadir}/metainfo ${libdir}/glade/modules/libgladegtk.so" +# http://errors.yoctoproject.org/Errors/Details/766882/ +# glade-3.22.2/gladeui/glade-widget.c:1822:36: error: assignment to 'GtkWidget *' {aka 'struct _GtkWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:920:23: error: assignment to 'GladeProperty *' {aka 'struct _GladeProperty *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:1253:21: error: assignment to 'GladeWidget *' {aka 'struct _GladeWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:1419:21: error: assignment to 'GladeWidget *' {aka 'struct _GladeWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch deleted file mode 100644 index 2f1483f97c..0000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch +++ /dev/null @@ -1,60 +0,0 @@ -From dc593958e556dd496b774f35c5992285510d6859 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Tue, 19 Oct 2021 17:09:55 +0200 -Subject: [PATCH] Revert "Changed GRPCPP_ABSEIL_SYNC to GPR_ABSEIL_SYNC - (#25681)" - -This reverts commit 931f91b745cd5b2864a0d1787815871d0bd844ae. - -Fixes sysdig from meta-oe and other recipes (like com.webos.service.tts -libgoogleassistant from meta-webosose) failing with: - -| FAILED: userspace/sysdig/sysdig -| : && /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-sec -urity --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -f -debug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/bu -ild/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build -/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wall -ggdb -std=c++0x -O3 -fno-strict-aliasing -DNDEBUG -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security ---sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-p -refix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe- -core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build/oe-cor -e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-cor -e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2- -64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/ -oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/ -core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -rdynamic userspace/sysdig/CMakeFiles/sysdig.dir/fields_info.cpp.o userspace/sysdig/CMakeFiles/sysdig.dir/sysdig.cpp.o -o userspace/sysdig/sysdig userspace/libsinsp/libsinsp.a userspace/libscap/libscap.a - -lelf -lz -lcurl -ljsoncpp -ltbb -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -ljq -lb64 -lrt -lanl -lssl -lcrypto -lluajit-5.1 -ldl -lpthread && : -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:259: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| collect2: error: ld returned 1 exit status - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- - include/grpcpp/impl/codegen/sync.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/grpcpp/impl/codegen/sync.h b/include/grpcpp/impl/codegen/sync.h -index 4cb8133c7c..3d10d9a3a0 100644 ---- a/include/grpcpp/impl/codegen/sync.h -+++ b/include/grpcpp/impl/codegen/sync.h -@@ -47,7 +47,7 @@ - namespace grpc { - namespace internal { - --#ifdef GPR_ABSEIL_SYNC -+#ifdef GRPCPP_ABSEIL_SYNC - - using Mutex = absl::Mutex; - using MutexLock = absl::MutexLock; -@@ -142,7 +142,7 @@ class CondVar { - gpr_cv cv_; - }; - --#endif // GPR_ABSEIL_SYNC -+#endif // GRPCPP_ABSEIL_SYNC - - template <typename Predicate> - GRPC_DEPRECATED("incompatible with thread safety analysis") diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch index c2afd4a92e..594503ae2a 100644 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch +++ b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch @@ -1,4 +1,4 @@ -From 592a4aaba20818bcff9a1448c34b09aff9e0d2e9 Mon Sep 17 00:00:00 2001 +From 54e8dca9b39b8c8a6532576a0286e548f97607fa Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 19 Apr 2022 16:07:19 -0700 Subject: [PATCH] cmake: Link with libatomic on rv32/rv64 @@ -9,24 +9,22 @@ riscv64-yoe-linux-musl/12.0.1/ld: libgrpc.so.23.0.0: undefined reference to `__a Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index a8fd3bf37b3..9f5b242683d 100644 +index 06e6453b5c..476d7f1576 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -303,6 +303,9 @@ if(UNIX) - if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) - set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} rt) +@@ -306,6 +306,9 @@ if(UNIX AND NOT HAIKU) + set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} rt) + endif() endif() + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv32") + set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} atomic) + endif() endif() - # configure ccache if requested --- -2.36.0 - + include(CheckCXXSourceCompiles) diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch deleted file mode 100644 index 679bd38829..0000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 3150cb043363e05588062dd392b940be25594713 Mon Sep 17 00:00:00 2001 -From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> -Date: Tue, 18 Feb 2020 14:17:07 +0100 -Subject: [PATCH] cmake: add separate export for plugin targets - -Upstream-Status: Submitted [https://github.com/grpc/grpc/pull/29328] - - ---- - CMakeLists.txt | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index efdaf8936d..6608b1b00c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -10935,7 +10935,7 @@ target_link_libraries(grpc_cpp_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_cpp_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -10975,7 +10975,7 @@ target_link_libraries(grpc_csharp_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_csharp_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11015,7 +11015,7 @@ target_link_libraries(grpc_node_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_node_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_node_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11055,7 +11055,7 @@ target_link_libraries(grpc_objective_c_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_objective_c_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11095,7 +11095,7 @@ target_link_libraries(grpc_php_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_php_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_php_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11135,7 +11135,7 @@ target_link_libraries(grpc_python_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_python_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_python_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11175,7 +11175,7 @@ target_link_libraries(grpc_ruby_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_ruby_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -17349,6 +17349,10 @@ if(gRPC_INSTALL) - DESTINATION ${gRPC_INSTALL_CMAKEDIR} - NAMESPACE gRPC:: - ) -+ install(EXPORT gRPCPluginTargets -+ DESTINATION ${gRPC_INSTALL_CMAKEDIR} -+ NAMESPACE gRPC:: -+ ) - endif() - - include(CMakePackageConfigHelpers) --- -2.30.2 - diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb b/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb index c2f952fc64..7968d63a87 100644 --- a/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb +++ b/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb @@ -3,10 +3,10 @@ Provides gRPC libraries for multiple languages written on top of shared C core l (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" HOMEPAGE = "https://github.com/grpc/grpc" SECTION = "libs" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6e4cf218112648d22420a84281b68b88" +LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" -DEPENDS = "c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2 abseil-cpp re2" +DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" DEPENDS:append:class-target = " googletest grpc-native " DEPENDS:append:class-nativesdk = " grpc-native " @@ -20,11 +20,9 @@ RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" # RDEPENDS:${PN}-dev += "${PN}-compiler" S = "${WORKDIR}/git" -SRCREV_grpc = "b39ffcc425ea990a537f98ec6fe6a1dcb90470d7" -BRANCH = "v1.45.x" -SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - file://0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch \ - file://0001-cmake-add-separate-export-for-plugin-targets.patch \ +SRCREV_grpc = "e821cdc231bda9ee93139a6daab6311dd8953832" +BRANCH = "v1.66.x" +SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ " # Fixes build with older compilers 4.8 especially on ubuntu 14.04 @@ -37,6 +35,7 @@ EXTRA_OECMAKE = " \ -DgRPC_ZLIB_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ + -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ -DgRPC_ABSL_PROVIDER=package \ -DgRPC_RE2_PROVIDER=package \ -DgRPC_INSTALL=ON \ diff --git a/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb new file mode 100644 index 0000000000..50d45ef57b --- /dev/null +++ b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb @@ -0,0 +1,28 @@ +# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Gstreamer editing services" +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-editing-services/" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d" + +DEPENDS = "flex-native gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad python3-pygobject" + +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +GIR_MESON_OPTION = "" + +inherit meson pkgconfig upstream-version-is-even gobject-introspection features_check bash-completion + +EXTRA_OEMESON = "-Dvalidate=disabled" + +SRC_URI = "http://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-${PV}.tar.xz" +SRC_URI[sha256sum] = "fec56a2c37a253cd048d288d4c7eda6eff191022b09db975e07a2c105d1b521e" + +PACKAGES += "gst-validate-launcher libges" + +FILES:gst-validate-launcher = "${nonarch_libdir}/gst-validate-launcher ${datadir}/gstreamer-1.0/validate" +FILES:libges = "${libdir}/gstreamer-1.0/*.so" + +FILES:${PN} += "/usr/lib/python${PYTHON_BASEVERSION}" diff --git a/meta-oe/recipes-devtools/guider/guider_3.9.8.bb b/meta-oe/recipes-devtools/guider/guider_3.9.8.bb index 30d17c84b3..0d93297a07 100644 --- a/meta-oe/recipes-devtools/guider/guider_3.9.8.bb +++ b/meta-oe/recipes-devtools/guider/guider_3.9.8.bb @@ -1,12 +1,11 @@ SUMMARY = "performance analyzer" HOMEPAGE = "https://github.com/iipeace/guider" BUGTRACKER = "https://github.com/iipeace/guider/issues" -AUTHOR = "Peace Lee <ipeace5@gmail.com>" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" -PV = "3.9.8+git${SRCPV}" +PV = "3.9.8+git" SRC_URI = "git://github.com/iipeace/${BPN};branch=master;protocol=https" SRCREV = "a502cd93b13235b7539557a91328de00b7c51bc3" diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb index 29937e26d0..599fd2c373 100644 --- a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb @@ -29,4 +29,34 @@ EXTRA_OECMAKE += "-DHEAPTRACK_BUILD_GUI=OFF" COMPATIBLE_HOST:riscv32 = "null" COMPATIBLE_HOST:riscv64 = "null" -BBCLASSEXTEND = "native nativesdk" +BBCLASSEXTEND = "native" + +# http://errors.yoctoproject.org/Errors/Details/766879/ +# buildResult: +# variable: "LIBUNWIND_HAS_UNW_BACKTRACE" +# cached: true +# stdout: | +# Change Dir: '/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO' +# +# Run Build Command(s): ninja -v cmTC_51d86 +# [1/2] ccache /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -DLIBUNWIND_HAS_UNW_BACKTRACE -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native= -o CMakeFiles/cmTC_51d86.dir/src.c.o -c /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO/src.c +# FAILED: CMakeFiles/cmTC_51d86.dir/src.c.o +# ccache /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -DLIBUNWIND_HAS_UNW_BACKTRACE -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native= -o CMakeFiles/cmTC_51d86.dir/src.c.o -c /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO/src.c +# src.c: In function 'main': +# src.c:3:43: error: passing argument 1 of 'unw_backtrace' from incompatible pointer type [-Wincompatible-pointer-types] +# 3 | int main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; } +# | ^~~~ +# | | +# | void * (*)[10] +# In file included from ../../../../recipe-sysroot/usr/include/libunwind-aarch64.h:232, +# from ../../../../recipe-sysroot/usr/include/libunwind-64.h:7, +# from ../../../../recipe-sysroot/usr/include/libunwind.h:27, +# from src.c:2: +# ../../../../recipe-sysroot/usr/include/libunwind-common.h:290:27: note: expected 'void **' but argument is of type 'void * (*)[10]' +# 290 | extern int unw_backtrace (void **, int); +# | ^~~~~~~ +# ninja: build stopped: subcommand failed. +# +# exitCode: 1 +# +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb index 0f6bbb4d54..f9e2c7873c 100644 --- a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb @@ -42,7 +42,7 @@ do_compile() { do_install() { oe_runmake DESTDIR=${D} install install -D -m 0644 -p ${S}/iptraf-ng-logrotate.conf ${D}${sysconfdir}/logrotate.d/iptraf-ng - install -Dm 0644 ${WORKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf + install -Dm 0644 ${UNPACKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf } FILES:${PN} += "${libdir}/tmpfiles.d" diff --git a/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch b/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch deleted file mode 100644 index 570202e800..0000000000 --- a/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3fe67deb9fcf0ae3c2ff31a9eccb6a0a9af33b9c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 14 Jan 2022 09:47:03 -0800 -Subject: [PATCH] test: Disable optimization with clang for aligned_alloc.c - -Clang crashes when using glibc 2.35, it works ok with older glibc or -musl, so its very specific problem. Its reported here - -https://github.com/llvm/llvm-project/issues/52765 - -Until it is fixed, workaround the build failure - -Upstream-Status: Inappropriate [Workaround] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - test/integration/aligned_alloc.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c -index 4375b172..6513bdd9 100644 ---- a/test/integration/aligned_alloc.c -+++ b/test/integration/aligned_alloc.c -@@ -1,5 +1,7 @@ - #include "test/jemalloc_test.h" - -+#pragma clang optimize off -+ - #define MAXALIGN (((size_t)1) << 23) - - /* --- -2.34.1 - diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest index b351f947e8..5c826a1766 100644 --- a/meta-oe/recipes-devtools/jemalloc/files/run-ptest +++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest @@ -1,9 +1,37 @@ #!/bin/sh +export MALLOC_CONF_ALL=${MALLOC_CONF} +# Concatenate the individual test's MALLOC_CONF and MALLOC_CONF_ALL. +export_malloc_conf() { + if [ "x${MALLOC_CONF}" != "x" -a "x${MALLOC_CONF_ALL}" != "x" ] ; then + export MALLOC_CONF="${MALLOC_CONF},${MALLOC_CONF_ALL}" + else + export MALLOC_CONF="${MALLOC_CONF}${MALLOC_CONF_ALL}" + fi +} + + + saved_dir=$PWD for dir in tests/* ; do cd $dir for atest in * ; do + if [[ "${atest##*.}" == "sh" ]]; then + continue + fi + if [ -e "${atest}.sh" ] ; then + # Source the shell script corresponding to the test in a subshell and + # execute the test. This allows the shell script to set MALLOC_CONF, which + # is then used to set MALLOC_CONF (thus allowing the + # per test shell script to ignore the detail). + enable_fill=1 \ + enable_prof=1 \ + . $(pwd)/${atest}.sh && \ + export_malloc_conf + else + export MALLOC_CONF= && \ + export_malloc_conf + fi if [ \( -x $atest \) -a \( -f $atest \) ] ; then rm -rf tests.log ./$atest > tests.log 2>&1 @@ -18,4 +46,3 @@ for dir in tests/* ; do done cd $saved_dir done - diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb index 950b64ee9b..cc21c8beae 100644 --- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb +++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb @@ -13,14 +13,12 @@ SECTION = "libs" LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" -SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https \ +SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=dev;protocol=https \ file://run-ptest \ " - -# Workaround for https://github.com/llvm/llvm-project/issues/52765 -SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch " - -SRCREV = "54eaed1d8b56b1aa528be3bdd1877e59c56fa90c" +SRCREV = "630434bb0ac619f7beec927569782d924c459385" +PV_LONG := "${PV}-171-g${SRCREV}" +PV .= "+git" S = "${WORKDIR}/git" @@ -29,6 +27,9 @@ inherit autotools ptest EXTRA_AUTORECONF += "--exclude=autoheader" EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_" +# For some reason VERSION file populated only in tarball distribution. +# Adding jemalloc version since this recipe is using source code from git tag +EXTRA_OECONF:append = " --with-version=${PV_LONG} --enable-xmalloc" do_install:append() { sed -i -e 's@${STAGING_DIR_HOST}@@g' \ @@ -42,10 +43,13 @@ do_compile_ptest() { do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - subdirs="test/unit test/integration test/stress " + subdirs="unit integration stress " for tooltest in ${subdirs} do - cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests + cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests + if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then + cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest} + fi done find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; } diff --git a/meta-oe/recipes-devtools/jq/jq/run-ptest b/meta-oe/recipes-devtools/jq/jq/run-ptest new file mode 100755 index 0000000000..a813958b5a --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq/run-ptest @@ -0,0 +1,37 @@ +#!/bin/sh + +JQ_LIB=@libdir@/jq +LOG="${JQ_LIB}/ptest/jq_ptest_$(date +%Y%m%d-%H%M%S).log" + +# clean up the log file to avoid a file has the same name and has existing content +echo "" > ${LOG} + +# The purpose of ptest is doing intergration test, so disable valgrind by default +# change PACKAGECOFIG to enable valgrind. +#export NO_VALGRIND=1 +# The --enable-valgrind configure option for jq only can be used within Makefiles, +# and it cannot be utilized here since it also checks compile, which cannot be avoid +# Requested enhancement to jq: https://github.com/stedolan/jq/issues/2493 + +for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do + ./tests/${test} >> ${LOG} 2>> ${LOG} + if [ $? -eq 0 ]; then + echo "PASS: ${test}" + echo "PASS: ${test}" >> ${LOG} + else + echo "FAIL: ${test}" + echo "FAIL: ${test}" >> ${LOG} + fi +done + +passed=`grep PASS: ${LOG}|wc -l` +failed=`grep FAIL: ${LOG}|wc -l` +skipped=`grep SKIP: ${LOG}|wc -l` +all=$((passed + failed + skipped)) + +( echo "=== Test Summary ===" + echo "TOTAL: ${all}" + echo "PASSED: ${passed}" + echo "FAILED: ${failed}" + echo "SKIPPED: ${skipped}" +) | tee -a /${LOG} diff --git a/meta-oe/recipes-devtools/jq/jq_1.7.1.bb b/meta-oe/recipes-devtools/jq/jq_1.7.1.bb new file mode 100644 index 0000000000..6b12335513 --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq_1.7.1.bb @@ -0,0 +1,46 @@ +SUMMARY = "Lightweight and flexible command-line JSON processor" +DESCRIPTION = "jq is like sed for JSON data, you can use it to slice and \ + filter and map and transform structured data with the same \ + ease that sed, awk, grep and friends let you play with text." +HOMEPAGE = "https://jqlang.github.io/jq/" +BUGTRACKER = "https://github.com/jqlang/jq/issues" +SECTION = "utils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba" + +GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/" +SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ + file://run-ptest \ + " +SRC_URI[sha256sum] = "478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2" + +inherit autotools github-releases ptest + +UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" + +PACKAGECONFIG ?= "oniguruma" + +PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" +PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" +PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" +# enable if you want ptest running under valgrind +PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" + +do_configure:append() { + sed -i -e "/^ac_cs_config=/ s:${WORKDIR}::g" ${B}/config.status +} + +do_install_ptest() { + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -rf ${B}/.libs ${D}${PTEST_PATH} + # libjq.so.* is packaged in the main jq component, so remove it from ptest + rm -f ${D}${PTEST_PATH}/.libs/libjq.so.* + ln -sf ${bindir}/jq ${D}${PTEST_PATH} + if [ "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'true', 'false', d)}" = "false" ]; then + sed -i 's:#export NO_VALGRIND=1:export NO_VALGRIND=1:g' ${D}${PTEST_PATH}/run-ptest + fi + # handle multilib + sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest +} + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/jq/jq_git.bb b/meta-oe/recipes-devtools/jq/jq_git.bb deleted file mode 100644 index 8b0218c83e..0000000000 --- a/meta-oe/recipes-devtools/jq/jq_git.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Lightweight and flexible command-line JSON processor" -DESCRIPTION = "jq is like sed for JSON data, you can use it to slice and \ - filter and map and transform structured data with the same \ - ease that sed, awk, grep and friends let you play with text." -HOMEPAGE = "https://stedolan.github.io/jq/" -BUGTRACKER = "https://github.com/stedolan/jq/issues" -SECTION = "utils" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4" - -PV = "1.6+git${SRCPV}" -SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master" -SRCREV = "a9f97e9e61a910a374a5d768244e8ad63f407d3e" -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -PACKAGECONFIG ?= "oniguruma" - -PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" -PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" -PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" - -EXTRA_OECONF += " \ - --disable-valgrind \ -" - -BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch new file mode 100644 index 0000000000..6e6a4b93e8 --- /dev/null +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch @@ -0,0 +1,29 @@ +From 35939115142db6cd366ab11b29692a0179338ddf Mon Sep 17 00:00:00 2001 +From: Parian Golchin <Parian.Golchin@iris-sensing.com> +Date: Fri, 18 Aug 2023 15:54:25 +0200 +Subject: [PATCH 1/3] Set Json_validator Install off if it finds it via linking + +Upstream-Status: Inappropriate [newer version of cmake in main branch] + +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f636734..9e4587f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,6 +55,9 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES "Build examples" ${JSON_VALIDATOR_IS_TOP_LE + + if(NOT TARGET nlohmann_json::nlohmann_json) + find_package(nlohmann_json REQUIRED) ++else() ++ message(STATUS "Found nlohmann_json::nlohmann_json-target - linking with it") ++ set(JSON_VALIDATOR_INSTALL OFF) + endif() + + target_link_libraries( +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch new file mode 100644 index 0000000000..1c4b871bb6 --- /dev/null +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch @@ -0,0 +1,71 @@ +From 2065015da40cf79dd8ec9e3f186538e17c3b592f Mon Sep 17 00:00:00 2001 +From: Robert Joslyn <robert.joslyn@redrectangle.org> +Date: Wed, 30 Nov 2022 13:07:29 -0800 +Subject: [PATCH 2/3] Fix assumed signed char + +The code assumes that char is signed, but whether char is signed or +unsigned is implementation defined. On some architectures like PowerPC, +GCC treats char as unsigned resulting in compile errors: + + smtp-address-validator.cpp:213:1: error: narrowing conversion of '-32' from 'int' to 'char' [-Wnarrowing] + +Fix this by specifying signed char. + +Upstream-Status: Backport [https://github.com/pboettch/json-schema-validator/commit/491ac44026e08f31790f5cacffa62e168bb35e32] + +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> +--- + src/smtp-address-validator.cpp | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/smtp-address-validator.cpp b/src/smtp-address-validator.cpp +index a63ead0..3903b51 100644 +--- a/src/smtp-address-validator.cpp ++++ b/src/smtp-address-validator.cpp +@@ -63,7 +63,7 @@ static const short _address_key_offsets[] = { + 1363, 1365, 1367, 1368, 1370, 1388, 0 + }; + +-static const char _address_trans_keys[] = { ++static const signed char _address_trans_keys[] = { + -32, -19, -16, -12, 34, 45, 61, 63, + -62, -33, -31, -17, -15, -13, 33, 39, + 42, 43, 47, 57, 65, 90, 94, 126, +@@ -711,7 +711,7 @@ bool is_address(const char* p, const char* pe) + { + int _klen; + unsigned int _trans = 0; +- const char * _keys; ++ const signed char * _keys; + const signed char * _acts; + unsigned int _nacts; + _resume: {} +@@ -728,9 +728,9 @@ bool is_address(const char* p, const char* pe) + + _klen = (int)_address_single_lengths[cs]; + if ( _klen > 0 ) { +- const char *_lower = _keys; +- const char *_upper = _keys + _klen - 1; +- const char *_mid; ++ const signed char *_lower = _keys; ++ const signed char *_upper = _keys + _klen - 1; ++ const signed char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _keys += _klen; +@@ -752,9 +752,9 @@ bool is_address(const char* p, const char* pe) + + _klen = (int)_address_range_lengths[cs]; + if ( _klen > 0 ) { +- const char *_lower = _keys; +- const char *_upper = _keys + (_klen<<1) - 2; +- const char *_mid; ++ const signed char *_lower = _keys; ++ const signed char *_upper = _keys + (_klen<<1) - 2; ++ const signed char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _trans += (unsigned int)_klen; +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch new file mode 100644 index 0000000000..eac997ae58 --- /dev/null +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch @@ -0,0 +1,41 @@ +From fa49c29942763285c51b7d2dea417d9f51e4961f Mon Sep 17 00:00:00 2001 +From: Sven Fink <sven.fink@wipotec.com> +Date: Fri, 13 Jan 2023 09:15:42 +0100 +Subject: [PATCH 3/3] For root value, use empty pointer + +Upstream-Status: Backport [https://github.com/pboettch/json-schema-validator/commit/59c9d6200bf3cd54b4fc717ec1660c91eddb4d1a] + +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> +--- + src/json-validator.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/json-validator.cpp b/src/json-validator.cpp +index 7f34553..3c73d98 100644 +--- a/src/json-validator.cpp ++++ b/src/json-validator.cpp +@@ -553,6 +553,9 @@ class type_schema : public schema + else_->validate(ptr, instance, patch, e); + } + } ++ if (instance.is_null()) { ++ patch.add(nlohmann::json::json_pointer{}, default_value_); ++ } + } + + protected: +@@ -1134,6 +1137,11 @@ public: + propertyNames_ = schema::make(attr.value(), root, {"propertyNames"}, uris); + sch.erase(attr); + } ++ ++ attr = sch.find("default"); ++ if (attr != sch.end()) { ++ set_default_value(*attr); ++ } + } + }; + +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch index 4b1184a394..8199e4f8d4 100644 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch @@ -1,4 +1,4 @@ -From e0b1ad02c678513412aba95a1b2fb4005c3c0452 Mon Sep 17 00:00:00 2001 +From a42d374aa260caec5f683c75d0db322811e51ab9 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 19 Mar 2022 22:40:49 -0700 Subject: [PATCH] cmake: Use GNUInstallDirs @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index c4cc218..594dc5f 100644 +index 9e4587f..3eff234 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -122,11 +122,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +@@ -93,11 +93,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") endif() endif() @@ -32,15 +32,12 @@ index c4cc218..594dc5f 100644 RUNTIME DESTINATION bin) install(FILES src/nlohmann/json-schema.hpp -@@ -155,7 +157,7 @@ if(JSON_VALIDATOR_INSTALL) - # Set Up the Project Targets and Config Files for CMake +@@ -129,7 +131,7 @@ endif() - # Set the install path to the cmake config files -- set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}) -+ set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + if(JSON_VALIDATOR_INSTALL) + # Set the install path to the cmake config files (Relative, so install works correctly under Hunter as well) +- set(INSTALL_CMAKE_DIR "lib/cmake/${PROJECT_NAME}") ++ set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + set(INSTALL_CMAKEDIR_ROOT share/cmake) - # Create the ConfigVersion file - include(CMakePackageConfigHelpers) # write_basic_package_version_file --- -2.35.1 - + # Install Targets diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.1.0.bb b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.1.0.bb deleted file mode 100644 index 00d26d7b34..0000000000 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.1.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "JSON schema validator for JSON for Modern C++" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006" - -SRC_URI = "git://github.com/pboettch/json-schema-validator;branch=master;protocol=https \ - file://0001-cmake-Use-GNUInstallDirs.patch \ - " -SRCREV = "27fc1d094503623dfe39365ba82581507524545c" - -S = "${WORKDIR}/git" - -DEPENDS += "nlohmann-json" - -inherit cmake -EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF" - diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb new file mode 100644 index 0000000000..02dcdb2696 --- /dev/null +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "JSON schema validator for JSON for Modern C++" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006" + +SRC_URI = "git://github.com/pboettch/json-schema-validator;branch=main;protocol=https \ + file://0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch \ + file://0002-Fix-assumed-signed-char.patch \ + file://0003-For-root-value-use-empty-pointer.patch \ + file://0004-cmake-Use-GNUInstallDirs.patch \ + " + +SRCREV = "6b17782d6a5d1dee5d2c4fc5d25ffb1123913431" + +S = "${WORKDIR}/git" + +DEPENDS += "nlohmann-json" + +inherit cmake +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DJSON_VALIDATOR_BUILD_TESTS=OFF -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF" diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb index c54dc94666..ade9f35d18 100644 --- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb +++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926" PE = "1" -SRCREV = "5defb4ed1a4293b8e2bf641e16b156fb9de498cc" +SRCREV = "89e2973c754a9c02a49974d839779b151e95afd6" SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-Fix-build-with-libmicrohttpd.patch b/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-Fix-build-with-libmicrohttpd.patch deleted file mode 100644 index a4cacb3fc0..0000000000 --- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-Fix-build-with-libmicrohttpd.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d983161415f5f5748fbdbaa5fbd168154ccf8867 Mon Sep 17 00:00:00 2001 -From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> -Date: Wed, 5 Aug 2020 12:31:24 +0900 -Subject: [PATCH] Fix build with libmicrohttpd 0.9.71 - ---- - src/jsonrpccpp/server/connectors/httpserver.cpp | 2 +- - src/jsonrpccpp/server/connectors/httpserver.h | 8 +++++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/jsonrpccpp/server/connectors/httpserver.cpp b/src/jsonrpccpp/server/connectors/httpserver.cpp -index a849615..dd3b841 100644 ---- a/src/jsonrpccpp/server/connectors/httpserver.cpp -+++ b/src/jsonrpccpp/server/connectors/httpserver.cpp -@@ -151,7 +151,7 @@ void HttpServer::SetUrlHandler(const string &url, - this->SetHandler(NULL); - } - --int HttpServer::callback(void *cls, MHD_Connection *connection, const char *url, -+mhd_result HttpServer::callback(void *cls, MHD_Connection *connection, const char *url, - const char *method, const char *version, - const char *upload_data, size_t *upload_data_size, - void **con_cls) { -diff --git a/src/jsonrpccpp/server/connectors/httpserver.h b/src/jsonrpccpp/server/connectors/httpserver.h -index 7785edb..0dcf032 100644 ---- a/src/jsonrpccpp/server/connectors/httpserver.h -+++ b/src/jsonrpccpp/server/connectors/httpserver.h -@@ -32,6 +32,12 @@ typedef intptr_t ssize_t; - #include <map> - #include <microhttpd.h> - -+#if MHD_VERSION >= 0x00097002 -+# define mhd_result enum MHD_Result -+#else -+# define mhd_result int -+#endif -+ - namespace jsonrpc { - /** - * This class provides an embedded HTTP Server, based on libmicrohttpd, to -@@ -79,7 +85,7 @@ private: - std::map<std::string, IClientConnectionHandler *> urlhandler; - struct sockaddr_in loopback_addr; - -- static int callback(void *cls, struct MHD_Connection *connection, -+ static mhd_result callback(void *cls, struct MHD_Connection *connection, - const char *url, const char *method, const char *version, - const char *upload_data, size_t *upload_data_size, - void **con_cls); --- -2.25.1 - diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb index 43dc2e36a4..f0c60e5a86 100644 --- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb +++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb @@ -9,11 +9,9 @@ SECTION = "libs" DEPENDS = "curl jsoncpp libmicrohttpd hiredis" -SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https \ - file://0001-Fix-build-with-libmicrohttpd.patch \ -" +SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https" -SRCREV = "c696f6932113b81cd20cd4a34fdb1808e773f23e" +SRCREV = "ec5ce12fc9c0299e1454cc002c70218b5a6f005b" S = "${WORKDIR}/git" @@ -27,4 +25,8 @@ EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO -DCOMPILE_EXAMPLES=NO -DCMAKE_LIBRARY_PATH=${libdir} \ " +do_install:append() { + sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${libdir}/libjson-rpc-cpp/cmake/libjson-rpc-cppTargets.cmake +} + FILES:${PN}-dev += "${libdir}/libjson-rpc-cpp/cmake" diff --git a/meta-oe/recipes-devtools/jwt-cpp/jwt-cpp_0.7.0.bb b/meta-oe/recipes-devtools/jwt-cpp/jwt-cpp_0.7.0.bb new file mode 100644 index 0000000000..19424337f7 --- /dev/null +++ b/meta-oe/recipes-devtools/jwt-cpp/jwt-cpp_0.7.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "A header only library for creating and validating json web tokens in c++" +HOMEPAGE = "https://thalhammer.github.io/jwt-cpp/" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8325a5ce4414c65ffdda392e0d96a9ff" + +SRC_URI = "git://github.com/Thalhammer/jwt-cpp.git;branch=master;protocol=https \ + " + +SRCREV = "08bcf77a687fb06e34138e9e9fa12a4ecbe12332" + +S = "${WORKDIR}/git" + +DEPENDS = "openssl" + +inherit cmake + +EXTRA_OECMAKE += "-DJWT_BUILD_EXAMPLES=OFF -DJWT_CMAKE_FILES_INSTALL_DIR=${libdir}/cmake/${BPN}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Avoid-using-hard-coded-usr-include-paths.patch b/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Avoid-using-hard-coded-usr-include-paths.patch new file mode 100644 index 0000000000..ac20e9b88e --- /dev/null +++ b/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Avoid-using-hard-coded-usr-include-paths.patch @@ -0,0 +1,33 @@ +From 2bd01e844096ab4ecaaab8eccfbfdc721a136d01 Mon Sep 17 00:00:00 2001 +From: Mark Hatle <mark.hatle@amd.com> +Date: Tue, 22 Aug 2023 12:28:01 -0600 +Subject: [PATCH] Avoid using hard coded /usr/include paths + +The system could end up using an include path that points to the host +system instead of the sysroot. Force the system to use the sysroot. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mark Hatle <mark.hatle@amd.com> +--- + configure.ac | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 150bc50..4dc684f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -344,10 +344,6 @@ AS_IF( + [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"], + [AC_SUBST([ncurses_nconf_CPPFLAGS]) + AC_SUBST([ncurses_panel_menu_LIBS]) +- AS_CASE( +- [$CURSES_LOC], +- [ncursesw/*],[ncurses_nconf_CPPFLAGS="-I/usr/include/ncursesw"], +- [ncurses/*],[ncurses_nconf_CPPFLAGS="-I/usr/include/ncurses"]) + LIBS_old="$LIBS" + LIBS= + AC_SEARCH_LIBS( +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb b/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb index 169500f6b4..efa8c936b4 100644 --- a/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb +++ b/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb @@ -15,10 +15,14 @@ DEPENDS += "ncurses flex-native gperf-native bison-native" RDEPENDS:${PN} += "python3 bash" SRC_URI = "git://gitlab.com/ymorin/kconfig-frontends.git;protocol=https;branch=4.11.x \ file://0001-Makefile-ensure-frontends-exits-before-writing-into-.patch \ - file://0001-Switch-utils-kconfig-diff-to-use-Python-3.patch" + file://0001-Switch-utils-kconfig-diff-to-use-Python-3.patch \ + file://0001-Avoid-using-hard-coded-usr-include-paths.patch" SRCREV = "f22fce3a308be1c7790ebefc6bbedb33c5f7c86a" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools pkgconfig diff --git a/meta-oe/recipes-devtools/lapack/lapack/run-ptest b/meta-oe/recipes-devtools/lapack/lapack/run-ptest new file mode 100755 index 0000000000..8bd5fd1efb --- /dev/null +++ b/meta-oe/recipes-devtools/lapack/lapack/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb b/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb deleted file mode 100644 index 15f394e13e..0000000000 --- a/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Linear Algebra PACKage" -URL = "http://www.netlib.org/lapack" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a32c99f24d097c72d1857e533b55642b" - -# Recipe needs FORTRAN support (copied from conf/local.conf.sample.extended) -# Enabling FORTRAN -# Note this is not officially supported and is just illustrated here to -# show an example of how it can be done -# You'll also need your fortran recipe to depend on libgfortran -#FORTRAN:forcevariable = ",fortran" -#RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath" - -DEPENDS = "libgfortran" - -SRCREV = "32b062a33352e05771dcc01b981ebe961bf2e42f" -SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master" -S = "${WORKDIR}/git" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" - -EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON " -OECMAKE_GENERATOR = "Unix Makefiles" - -inherit cmake pkgconfig -EXCLUDE_FROM_WORLD = "1" diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb new file mode 100644 index 0000000000..fef9d3a80e --- /dev/null +++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb @@ -0,0 +1,59 @@ +SUMMARY = "Linear Algebra PACKage" +URL = "http://www.netlib.org/lapack" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d0e7a458f9fcbf0a3ba97cef3128b85d" + +# Recipe needs FORTRAN support (copied from conf/local.conf.sample.extended) +# Enabling FORTRAN +# Note this is not officially supported and is just illustrated here to +# show an example of how it can be done +# You'll also need your fortran recipe to depend on libgfortran +#FORTRAN:forcevariable = ",fortran" +#RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath" + +DEPENDS = "libgfortran \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)} \ + " +RDEPENDS:${PN}-ptest += "cmake" + +SRCREV = "04b044e020a3560ccfa9988c8a80a1fb7083fc2e" +SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ + " +S = "${WORKDIR}/git" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" + +EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON \ + ${@bb.utils.contains('PTEST_ENABLED', '1', ' -DBUILD_TESTING=ON', '', d)} \ + " +OECMAKE_GENERATOR = "Unix Makefiles" + +inherit cmake pkgconfig ptest +EXCLUDE_FROM_WORLD = "1" + +do_install_ptest () { + rsync -a ${B}/TESTING ${D}${PTEST_PATH} \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile + rsync -a ${B}/BLAS ${D}${PTEST_PATH} \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile + rsync -a ${B}/LAPACKE ${D}${PTEST_PATH} \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile + cp -r ${B}/bin ${D}${PTEST_PATH} + cp -r ${B}/lapack_testing.py ${D}${PTEST_PATH} + cp ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} + cp ${S}/TESTING/*.in ${S}/TESTING/runtest.cmake ${D}${PTEST_PATH}/TESTING + cp ${S}/BLAS/TESTING/*.in ${D}${PTEST_PATH}/BLAS/TESTING + sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` + sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` + sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` + sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` +} diff --git a/meta-oe/recipes-devtools/ldns/ldns_1.8.2.bb b/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb index 90c369e651..f071f579df 100644 --- a/meta-oe/recipes-devtools/ldns/ldns_1.8.2.bb +++ b/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb @@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=34330f15b2b4abbbaaa7623f79a6a019" SRC_URI = "https://www.nlnetlabs.nl/downloads/ldns/ldns-${PV}.tar.gz" -SRC_URI[sha256sum] = "b92b001cdd382de653620a05445e42e17a827eec93d64ee587ad291a533cc1e9" +SRC_URI[sha256sum] = "838b907594baaff1cd767e95466a7745998ae64bc74be038dccc62e2de2e4247" DEPENDS = "openssl" @@ -19,5 +19,6 @@ do_install:append() { sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ - -i ${D}${libdir}/pkgconfig/*.pc + -e 's@${RECIPE_SYSROOT}@@g' \ + -i ${D}${libdir}/pkgconfig/*.pc ${D}${bindir}/ldns-config } diff --git a/meta-oe/recipes-devtools/lemon/files/lemon.1 b/meta-oe/recipes-devtools/lemon/files/lemon.1 deleted file mode 100644 index 914ee07013..0000000000 --- a/meta-oe/recipes-devtools/lemon/files/lemon.1 +++ /dev/null @@ -1,63 +0,0 @@ -.Dd 2002-10-04 -.Dt LEMON 1 -.Os "Debian GNU/Linux" -.\" Manual page created by Guus Sliepen <guus@debian.org> -.Sh NAME -.Nm lemon -.Nd The Lemon Parser Generator -.Sh SYNOPSIS -.Nm -.Op Fl bcgmqsx -.Ar input -.Sh DESCRIPTION -.Nm -is an LALR(1) parser generator for C or C++. -It does the same job as bison and yacc. -But -.Nm -is not another bison or yacc clone. -It uses a different grammar syntax which is designed to reduce the number of coding errors. -.Nm -also uses a more sophisticated parsing engine that is faster than yacc and bison -and which is both reentrant and thread-safe. -Furthermore, -.Nm -implements features that can be used to eliminate resource leaks, -making is suitable for use in long-running programs such as graphical user interfaces or embedded controllers. -.Pp -.Nm -will read the grammer from -.Ar input -and write out a parser for that grammar in the C language. -.Sh OPTIONS -.Bl -tag -width indent -.It Fl b -Print only the basis in report. -.It Fl c -Don't compress the action table. -.It Fl g -Print grammar without actions. -.It Fl m -Output a makeheaders compatible file. -.It Fl q -(Quiet) Don't print the report file. -.It Fl s -Print parser stats to standard output. -.It Fl x -Print the version number. -.El -.Sh FILES -.Bl -tag -width indent -.It Pa /usr/share/lemon/lempar.c -Driver template for the -.Nm -parser generator. -.El -.Sh AUTHOR -.Nm -has been written by -.An D. Richard Hipp Aq drh@hwaci.com . -.Pp -This manual page was written by -.An Guus Sliepen Aq guus@debian.org -for the Debian GNU/Linux system. diff --git a/meta-oe/recipes-devtools/lemon/lemon.inc b/meta-oe/recipes-devtools/lemon/lemon.inc deleted file mode 100644 index 57b9fb710e..0000000000 --- a/meta-oe/recipes-devtools/lemon/lemon.inc +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "The Lemon Parser Generator" -HOMEPAGE = "http://www.hwaci.com/sw/lemon/" -LICENSE = "PD" -SECTION = "devel" - -SRC_URI = "http://www.sqlite.org/sqlite-${PV}.tar.gz \ - file://lemon.1" - -S = "${WORKDIR}/sqlite-${PV}/tool" - -do_compile() { - ${CC} ${CFLAGS} lemon.c -c -o lemon.o - ${CCLD} ${LDFLAGS} lemon.o -o lemon -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 lemon ${D}${bindir} - install -m 0644 lempar.c ${D}${bindir} - install -d ${D}${mandir}/man1 - install -m 0644 ${WORKDIR}/lemon.1 ${D}${mandir}/man1/ -} - -BBCLASSEXTEND = "native" - diff --git a/meta-oe/recipes-devtools/lemon/lemon_3.44.2.bb b/meta-oe/recipes-devtools/lemon/lemon_3.44.2.bb new file mode 100644 index 0000000000..2904a454dc --- /dev/null +++ b/meta-oe/recipes-devtools/lemon/lemon_3.44.2.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "The Lemon Parser Generator" +HOMEPAGE = "https://sqlite.org/src/file/doc/lemon.html" +LICENSE = "PD" +SECTION = "devel" + +LIC_FILES_CHKSUM = "file://tool/lemon.c;endline=8;md5=c7551a78fa3fdecd96d1ad6761d205ee" + +SRC_URI = "git://github.com/sqlite/sqlite;protocol=https;branch=branch-3.44" + +SRCREV = "c8f9803dc32bfee78a9ca2b1abbe39499729219b" + +S = "${WORKDIR}/git" + +do_compile() { + ${CC} ${CFLAGS} ${LDFLAGS} tool/lemon.c -o lemon +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 lemon ${D}${bindir} + install -m 0644 tool/lempar.c ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/lemon/lemon_3.7.3.bb b/meta-oe/recipes-devtools/lemon/lemon_3.7.3.bb deleted file mode 100644 index 354db17e6e..0000000000 --- a/meta-oe/recipes-devtools/lemon/lemon_3.7.3.bb +++ /dev/null @@ -1,7 +0,0 @@ -require lemon.inc - -LIC_FILES_CHKSUM = "file://lemon.c;endline=8;md5=c7551a78fa3fdecd96d1ad6761d205ee" - -SRC_URI[md5sum] = "5437978aae90350cf984993091e0d695" -SRC_URI[sha256sum] = "dbf352e8fbb74829f5e7a88f9f6ceeb80a709537f668c36e4b6cdfb271309ef6" - diff --git a/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch b/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch new file mode 100644 index 0000000000..7c500e0b54 --- /dev/null +++ b/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch @@ -0,0 +1,91 @@ +From 0db4af09f1bf4456527b5f6ec60fc1305e770c4c Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Tue, 9 Jul 2024 15:19:35 +0100 +Subject: [PATCH] configure.ac: improve fts checks + +The current code checks explicitly for musl and if so uses pkg-config to +find fts-standalone. This is suboptimal because musl may not be the only +libc to need a standalone fts implementation, and fts-standalone is an +old gentoo-specific name[1] so libabigail won't build on any other system +against musl. + +Instead, use AC_SEARCH_LIBS to look for fts_open in libc then libfts. Do +this before the check for behaviour just in case someone has a standalone +and broken implementation. I assume that the standalone fts is installed +on the standard search path, which should be a fair assumption. + +As we're not using pkg-config anymore the required link flags are now in +LIBS, so remove all instances of FTS_CFLAGS and FTS_LIBS. + +[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/fts-standalone?id=a403fe6c61d1aaeecd58d521f3def2f6d3513449 + +Upstream-Status: Submitted [https://sourceware.org/pipermail/libabigail/2024q3/005973.html] +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + configure.ac | 9 ++++----- + src/Makefile.am | 4 ++-- + tools/Makefile.am | 2 -- + 3 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e118a9c0..0aff2ec2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -281,6 +281,10 @@ fi + + AC_SUBST(VISIBILITY_FLAGS) + ++# glibc and BSD include fts into their libc, but musl does not so check if we ++# need to explicitly link to the standalone musl-fts. ++AC_SEARCH_LIBS([fts_open], [fts]) ++ + dnl Older glibc had a broken fts that didn't work with Large File Systems. + dnl We want the version that can handler LFS, but include workaround if we + dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to +@@ -295,11 +299,6 @@ AS_IF([test "x$ac_cv_bad_fts" = "xyes"], + [CFLAGS="$CFLAGS -DBAD_FTS=1", + CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"]) + +-dnl On musl, we need to find fts-standalone +-AS_CASE( +- [${host_os}], [*-musl*], [ +- PKG_CHECK_MODULES([FTS], [fts-standalone]) +-]) + + dnl Check for dependency: libelf, libdw, libebl (elfutils) + dnl Note that we need to use at least elfutils 0.159 but +diff --git a/src/Makefile.am b/src/Makefile.am +index 3044c136..1c98bf84 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,12 +52,12 @@ if BTF_READER + libabigail_la_SOURCES += abg-btf-reader.cc + endif + +-libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS) ++libabigail_la_LIBADD = $(DEPS_LIBS) + libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined -version-info $(LIBABIGAIL_SO_CURRENT):$(LIBABIGAIL_SO_REVISION):$(LIBABIGAIL_SO_AGE) + + CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\" + + AM_CPPFLAGS=\ +-$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) $(FTS_CFLAGS) \ ++$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) \ + -Wall -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include \ + -I$(abs_top_builddir)/include -I$(abs_top_builddir) +diff --git a/tools/Makefile.am b/tools/Makefile.am +index cbb5ce10..ea2d300c 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -41,8 +41,6 @@ abicompatdir = $(bindir) + + abipkgdiff_SOURCES = abipkgdiff.cc + abipkgdiffdir = $(bindir) +-abipkgdiff_CPPFLAGS = $(FTS_CFLAGS) +-abipkgdiff_LDADD = $(FTS_LIBS) + abipkgdiff_LDFLAGS = $(abs_top_builddir)/src/libabigail.la -pthread + + kmidiff_SOURCES = kmidiff.cc +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb b/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb new file mode 100644 index 0000000000..5c262d2880 --- /dev/null +++ b/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb @@ -0,0 +1,17 @@ +SUMMARY = "The ABI Generic Analysis and Instrumentation Library" +HOMEPAGE = "https://sourceware.org/libabigail/" + +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab" + +SRC_URI = "http://mirrors.kernel.org/sourceware/${BPN}/${BP}.tar.xz \ + file://0001-Check-for-correct-fts-module.patch \ + " +SRC_URI[sha256sum] = "7cfc4e9b00ae38d87fb0c63beabb32b9cbf9ce410e52ceeb5ad5b3c5beb111f3" + +DEPENDS = "elfutils libxml2" +DEPENDS:append:libc-musl = " fts" + +inherit autotools pkgconfig lib_package + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/libgee/libgee_0.20.5.bb b/meta-oe/recipes-devtools/libgee/libgee_0.20.5.bb deleted file mode 100644 index adf73d4914..0000000000 --- a/meta-oe/recipes-devtools/libgee/libgee_0.20.5.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "libgee is a collection library providing GObject-based interfaces \ -and classes for commonly used data structures." -HOMEPAGE = "http://live.gnome.org/Libgee" -SECTION = "libs" -DEPENDS = "glib-2.0" - -BBCLASSEXTEND = "native" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" - -PE = "1" -inherit gnomebase vala gobject-introspection - -do_configure:prepend() { - MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4" - for i in ${MACROS}; do - rm -f m4/$i - done -} - -SRC_URI[archive.sha256sum] = "31863a8957d5a727f9067495cabf0a0889fa5d3d44626e54094331188d5c1518" diff --git a/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb b/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb new file mode 100644 index 0000000000..7e2781bcb0 --- /dev/null +++ b/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "libgee is a collection library providing GObject-based interfaces \ +and classes for commonly used data structures." +HOMEPAGE = "http://live.gnome.org/Libgee" +SECTION = "libs" +DEPENDS = "glib-2.0" + +BBCLASSEXTEND = "native" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase vala gobject-introspection + +CFLAGS += "-Wno-incompatible-pointer-types" + +do_configure:prepend() { + MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4" + for i in ${MACROS}; do + rm -f m4/$i + done +} + +SRC_URI[archive.sha256sum] = "1bf834f5e10d60cc6124d74ed3c1dd38da646787fbf7872220b8b4068e476d4d" + +# http://errors.yoctoproject.org/Errors/Details/766884/ +# libgee-0.20.6/gee/concurrentlist.c:1169:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:1175:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2385:194: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2438:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2460:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2469:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2481:185: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2640:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2641:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2750:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:469:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:514:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:713:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:3635:185: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:4950:201: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5378:201: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5428:226: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5480:218: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5530:238: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5532:234: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5623:246: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5625:242: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7088:194: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7157:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7184:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7198:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7215:185: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hashmap.c:4089:30: error: assignment to 'gboolean (*)(GeeMapIterator *)' {aka 'int (*)(struct _GeeMapIterator *)'} from incompatible pointer type 'gboolean (*)(GeeHashMapNodeIterator *)' {aka 'int (*)(struct _GeeHashMapNodeIterator *)'} [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:430:134: error: passing argument 4 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:430:171: error: passing argument 5 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:434:134: error: passing argument 4 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:434:171: error: passing argument 5 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb b/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb index 2a1234c57e..9b18269bcb 100644 --- a/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb +++ b/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb @@ -11,13 +11,12 @@ SRC_URI = "git://github.com/hatukanezumi/sombok.git;protocol=https;branch=master file://0001-configure.ac-fix-cross-compiling-issue.patch \ " -inherit autotools pkgconfig +inherit autotools-brokensep pkgconfig # sombok-2.4.0 SRCREV = "0098d85a037ef5c99a648a3669a077781a45e8cc" S = "${WORKDIR}/git" -B = "${S}" # Disable libthai support EXTRA_OECONF = "--disable-libthai" diff --git a/meta-oe/recipes-devtools/libubox/libubox/0001-version-libraries.patch b/meta-oe/recipes-devtools/libubox/libubox/0001-version-libraries.patch index 02117fa8d6..f82c31ad07 100644 --- a/meta-oe/recipes-devtools/libubox/libubox/0001-version-libraries.patch +++ b/meta-oe/recipes-devtools/libubox/libubox/0001-version-libraries.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + diff --git a/CMakeLists.txt b/CMakeLists.txt index 57804cf..1aa7f27 100644 --- a/CMakeLists.txt diff --git a/meta-oe/recipes-devtools/libubox/libubox_git.bb b/meta-oe/recipes-devtools/libubox/libubox_git.bb index b2898c9c7f..131929b30e 100644 --- a/meta-oe/recipes-devtools/libubox/libubox_git.bb +++ b/meta-oe/recipes-devtools/libubox/libubox_git.bb @@ -20,7 +20,10 @@ SRC_URI = "\ " SRCREV = "07413cce72e19520af55dfcbc765484f5ab41dd9" -PV = "1.0.1+git${SRCPV}" +PV = "1.0.1+git" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/lshw/files/0001-Fix-musl-build.patch b/meta-oe/recipes-devtools/lshw/files/0001-Fix-musl-build.patch deleted file mode 100644 index fa90aa1211..0000000000 --- a/meta-oe/recipes-devtools/lshw/files/0001-Fix-musl-build.patch +++ /dev/null @@ -1,125 +0,0 @@ -From a5a4bb4254b2109bd3e272174946f0bb36ee99a8 Mon Sep 17 00:00:00 2001 -From: Leon Anavi <leon.anavi@konsulko.com> -Date: Tue, 25 Aug 2020 11:45:45 +0300 -Subject: [PATCH] Fix musl build - -Apply the following fixes for musl: - -- Fix basename() is in libgen.h -- Fix wrong usage of LONG_BIT - -Same fixes have been submitted to the upstream of lshw by Sergio -Prado but they have not been merged yet. - -Upstream-Status: Submitted - -Co-Authored-By: Sergio Prado <sergio.prado@e-labworks.com> -Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> ---- - src/core/abi.cc | 4 +--- - src/core/sysfs.cc | 19 ++++++++++--------- - 2 files changed, 11 insertions(+), 12 deletions(-) - -diff --git a/src/core/abi.cc b/src/core/abi.cc -index adff7b5..76c664c 100644 ---- a/src/core/abi.cc -+++ b/src/core/abi.cc -@@ -20,9 +20,7 @@ __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $"); - bool scan_abi(hwNode & system) - { - // are we compiled as 32- or 64-bit process ? -- long sc = sysconf(LONG_BIT); -- if(sc==-1) sc = sysconf(_SC_LONG_BIT); -- if(sc!=-1) system.setWidth(sc); -+ system.setWidth(LONG_BIT); - - pushd(PROC_SYS); - -diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc -index 32d6564..c2fa84f 100644 ---- a/src/core/sysfs.cc -+++ b/src/core/sysfs.cc -@@ -16,6 +16,7 @@ - #include <sys/stat.h> - #include <sys/types.h> - #include <sys/mount.h> -+#include <libgen.h> - - - __ID("@(#) $Id$"); -@@ -100,7 +101,7 @@ static string sysfs_getbustype(const string & path) - { - devname = - string(fs.path + "/bus/") + string(namelist[i]->d_name) + -- "/devices/" + basename(path.c_str()); -+ "/devices/" + basename(const_cast<char*>(path.c_str())); - - if (samefile(devname, path)) - return string(namelist[i]->d_name); -@@ -140,7 +141,7 @@ static string sysfstobusinfo(const string & path) - - if (bustype == "usb") - { -- string name = basename(path.c_str()); -+ string name = basename(const_cast<char*>(path.c_str())); - if (matches(name, "^[0-9]+-[0-9]+(\\.[0-9]+)*:[0-9]+\\.[0-9]+$")) - { - size_t colon = name.rfind(":"); -@@ -151,7 +152,7 @@ static string sysfstobusinfo(const string & path) - - if (bustype == "virtio") - { -- string name = basename(path.c_str()); -+ string name = basename(const_cast<char*>(path.c_str())); - if (name.compare(0, 6, "virtio") == 0) - return "virtio@" + name.substr(6); - else -@@ -159,10 +160,10 @@ static string sysfstobusinfo(const string & path) - } - - if (bustype == "vio") -- return string("vio@") + basename(path.c_str()); -+ return string("vio@") + basename(const_cast<char*>(path.c_str())); - - if (bustype == "ccw") -- return string("ccw@") + basename(path.c_str()); -+ return string("ccw@") + basename(const_cast<char*>(path.c_str())); - - if (bustype == "ccwgroup") - { -@@ -240,7 +241,7 @@ string entry::driver() const - string driverlink = This->devpath + "/driver"; - if (!exists(driverlink)) - return ""; -- return basename(readlink(driverlink).c_str()); -+ return basename(const_cast<char*>(readlink(driverlink).c_str())); - } - - -@@ -328,7 +329,7 @@ string entry::name_in_class(const string & classname) const - - string entry::name() const - { -- return basename(This->devpath.c_str()); -+ return basename(const_cast<char*>(This->devpath.c_str())); - } - - -@@ -340,12 +341,12 @@ entry entry::parent() const - - string entry::classname() const - { -- return basename(dirname(This->devpath).c_str()); -+ return basename(const_cast<char*>(dirname(This->devpath).c_str())); - } - - bool entry::isvirtual() const - { -- return string(basename(dirname(dirname(This->devpath)).c_str())) == "virtual"; -+ return string(basename(const_cast<char*>(dirname(dirname(This->devpath)).c_str()))) == "virtual"; - } - - string entry::string_attr(const string & name, const string & def) const --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/lshw/files/0001-disable-docbook2man.patch b/meta-oe/recipes-devtools/lshw/files/0001-disable-docbook2man.patch new file mode 100644 index 0000000000..706f2d5248 --- /dev/null +++ b/meta-oe/recipes-devtools/lshw/files/0001-disable-docbook2man.patch @@ -0,0 +1,30 @@ +From 544df0f5fd99925a3ce568c777413e0c31cb0028 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <jose.quaresma@foundries.io> +Date: Mon, 2 Jan 2023 15:32:39 +0000 +Subject: [PATCH] build: Do not build .sgml file + +It needs docbook2man tool which we do not have recipe for + +Upstream-Status: Inappropriate [needs native docbook2man tool] + +Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index ac726d0..af6281d 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -102,7 +102,7 @@ $(PACKAGENAME)-compressed: $(PACKAGENAME)-static + upx -9 -o $@ $< + + $(PACKAGENAME).1: $(PACKAGENAME).sgml +- docbook2man $< ++ @echo "Needs docbook2man" + + pci.ids: + wget http://pciids.sourceforge.net/pci.ids +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/lshw/lshw_02.19.2.bb b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb index 8b3608a248..0fb68d8684 100644 --- a/meta-oe/recipes-devtools/lshw/lshw_02.19.2.bb +++ b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb @@ -9,16 +9,27 @@ SECTION = "console/tools" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64|riscv64).*-linux" +PV .= "+git" +SRCREV = "4c6497c8b0a67cd9fa9693e9101a7cafd3297e81" SRC_URI = " \ - http://ezix.org/software/files/lshw-B.${PV}.tar.gz \ - file://0001-Fix-musl-build.patch \ + git://github.com/lyonel/lshw.git;protocol=https;branch=master \ + file://0001-disable-docbook2man.patch \ " -SRC_URI[md5sum] = "8c70d46e906688309095c73ecb9396e3" -SRC_URI[sha256sum] = "9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80" -S = "${WORKDIR}/lshw-B.${PV}" +S = "${WORKDIR}/git" + +inherit pkgconfig + +DEPENDS = "gettext-native" + +PACKAGECONFIG ??= "zlib" +PACKAGECONFIG[sqlite] = "SQLITE=1,SQLITE=0,sqlite3" +PACKAGECONFIG[zlib] = "ZLIB=1,ZLIB=0,zlib gzip-native" + +# use the PACKAGECONFIG configurations arguments +EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} RPM_OPT_FLAGS='${CFLAGS}'" do_compile() { # build core only - don't ship gui diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch deleted file mode 100644 index 4d0e0392f7..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 95ff340a74af16cca89fd5c5ca99890821053209 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 22 Apr 2017 00:47:16 -0700 -Subject: [PATCH] ARM code has unreachable code after switch statement move - initialization - -Fixed -sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [-Werror=switch-unreachable] - uint32_t operand1, operand2, result = 0; - ^~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - sysdeps/linux-gnu/arm/trace.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c -index 5e51e91..f974d1f 100644 ---- a/sysdeps/linux-gnu/arm/trace.c -+++ b/sysdeps/linux-gnu/arm/trace.c -@@ -155,6 +155,8 @@ arm_get_next_pcs(struct process *proc, - const unsigned cond = BITS(this_instr, 28, 31); - const unsigned opcode = BITS(this_instr, 24, 27); - -+ uint32_t operand1, operand2, result = 0; -+ - if (cond == COND_NV) - switch (opcode) { - arch_addr_t addr; -@@ -170,7 +172,6 @@ arm_get_next_pcs(struct process *proc, - } - else - switch (opcode) { -- uint32_t operand1, operand2, result = 0; - case 0x0: - case 0x1: /* data processing */ - case 0x2: --- -2.12.2 - diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch deleted file mode 100644 index a599d0e191..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch +++ /dev/null @@ -1,261 +0,0 @@ -From 0af8ced6376f2256b9daac301c851e1c99c3b035 Mon Sep 17 00:00:00 2001 -From: Adam Trhon <adam.trhon@tbs-biometrics.com> -Date: Fri, 12 May 2017 13:39:11 +0200 -Subject: [PATCH] Fix tautological compare warning - -By default, gcc ignores warning from code generated by macros -(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80369). When -ltrace is compiled under icecream the warning *is generated* -(https://github.com/icecc/icecream/issues/202) -and the compilation fails (because of -Werror). - -Upstream-Status: Submitted [ltrace-devel@lists.alioth.debian.org] - -Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com> ---- - filter.c | 4 ++-- - sysdeps/linux-gnu/arm/fetch.c | 2 +- - sysdeps/linux-gnu/arm/trace.c | 2 +- - sysdeps/linux-gnu/ia64/fetch.c | 2 +- - sysdeps/linux-gnu/metag/trace.c | 2 +- - sysdeps/linux-gnu/mips/plt.c | 2 +- - sysdeps/linux-gnu/ppc/fetch.c | 2 +- - sysdeps/linux-gnu/ppc/plt.c | 2 +- - sysdeps/linux-gnu/ppc/trace.c | 4 ++-- - sysdeps/linux-gnu/s390/fetch.c | 2 +- - sysdeps/linux-gnu/s390/trace.c | 4 ++-- - sysdeps/linux-gnu/x86/fetch.c | 2 +- - sysdeps/linux-gnu/x86/trace.c | 4 ++-- - value.c | 4 ++-- - 14 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/filter.c b/filter.c -index ba50c40..a65856d 100644 ---- a/filter.c -+++ b/filter.c -@@ -79,7 +79,7 @@ filter_lib_matcher_name_init(struct filter_lib_matcher *matcher, - { - switch (type) { - case FLM_MAIN: -- assert(type != type); -+ assert(!"Unexpected value of type"); - abort(); - - case FLM_SONAME: -@@ -137,7 +137,7 @@ matcher_matches_library(struct filter_lib_matcher *matcher, struct library *lib) - case FLM_MAIN: - return lib->type == LT_LIBTYPE_MAIN; - } -- assert(matcher->type != matcher->type); -+ assert(!"Unexpected value of matcher->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c -index b500448..8f75fcf 100644 ---- a/sysdeps/linux-gnu/arm/fetch.c -+++ b/sysdeps/linux-gnu/arm/fetch.c -@@ -317,7 +317,7 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, - memmove(data, ctx->regs.uregs, sz); - return 0; - } -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c -index 5e51e91..e76bf63 100644 ---- a/sysdeps/linux-gnu/arm/trace.c -+++ b/sysdeps/linux-gnu/arm/trace.c -@@ -701,7 +701,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -diff --git a/sysdeps/linux-gnu/ia64/fetch.c b/sysdeps/linux-gnu/ia64/fetch.c -index 171c7a2..ee2fbc7 100644 ---- a/sysdeps/linux-gnu/ia64/fetch.c -+++ b/sysdeps/linux-gnu/ia64/fetch.c -@@ -409,7 +409,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, - case ARGTYPE_ARRAY: - /* Arrays decay into pointers. XXX Fortran? */ - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -diff --git a/sysdeps/linux-gnu/metag/trace.c b/sysdeps/linux-gnu/metag/trace.c -index ad5fffe..7a843d6 100644 ---- a/sysdeps/linux-gnu/metag/trace.c -+++ b/sysdeps/linux-gnu/metag/trace.c -@@ -142,7 +142,7 @@ get_regval_from_unit(enum metag_unitnum unit, unsigned int reg, - return regs->ax[reg][0]; - /* We really shouldn't be here. */ - default: -- assert(unit != unit); -+ assert(!"Unexpected value of unit"); - abort(); - } - return 0; -diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c -index c7c10ac..ca2307d 100644 ---- a/sysdeps/linux-gnu/mips/plt.c -+++ b/sysdeps/linux-gnu/mips/plt.c -@@ -651,7 +651,7 @@ mips_stub_bp_continue(struct breakpoint *bp, struct process *proc) - break; - } - -- assert(bp->libsym->arch.type != bp->libsym->arch.type); -+ assert(!"Unexpected value of bp->libsym->arch.type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c -index c6cbd71..5db5675 100644 ---- a/sysdeps/linux-gnu/ppc/fetch.c -+++ b/sysdeps/linux-gnu/ppc/fetch.c -@@ -502,7 +502,7 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, - case ARGTYPE_ARRAY: - /* Arrays decay into pointers. XXX Fortran? */ - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c -index 5f81889..781da03 100644 ---- a/sysdeps/linux-gnu/ppc/plt.c -+++ b/sysdeps/linux-gnu/ppc/plt.c -@@ -1085,7 +1085,7 @@ ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc) - break; - } - -- assert(bp->libsym->arch.type != bp->libsym->arch.type); -+ assert(!"Unexpected value of bp->libsym->arch.type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c -index 5aab538..caa6035 100644 ---- a/sysdeps/linux-gnu/ppc/trace.c -+++ b/sysdeps/linux-gnu/ppc/trace.c -@@ -217,7 +217,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - } -@@ -231,7 +231,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - -diff --git a/sysdeps/linux-gnu/s390/fetch.c b/sysdeps/linux-gnu/s390/fetch.c -index 4ad5951..4721c30 100644 ---- a/sysdeps/linux-gnu/s390/fetch.c -+++ b/sysdeps/linux-gnu/s390/fetch.c -@@ -266,7 +266,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, - return allocate_gpr(ctx, proc, info, valuep, sz); - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - return -1; -diff --git a/sysdeps/linux-gnu/s390/trace.c b/sysdeps/linux-gnu/s390/trace.c -index 78b04c3..24f7801 100644 ---- a/sysdeps/linux-gnu/s390/trace.c -+++ b/sysdeps/linux-gnu/s390/trace.c -@@ -213,7 +213,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -@@ -226,7 +226,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - break; - - case ARGTYPE_CHAR: -diff --git a/sysdeps/linux-gnu/x86/fetch.c b/sysdeps/linux-gnu/x86/fetch.c -index 6868101..ae2ed79 100644 ---- a/sysdeps/linux-gnu/x86/fetch.c -+++ b/sysdeps/linux-gnu/x86/fetch.c -@@ -523,7 +523,7 @@ classify(struct process *proc, struct fetch_context *context, - - default: - /* Unsupported type. */ -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - abort(); -diff --git a/sysdeps/linux-gnu/x86/trace.c b/sysdeps/linux-gnu/x86/trace.c -index 6a1a6a5..d8d2115 100644 ---- a/sysdeps/linux-gnu/x86/trace.c -+++ b/sysdeps/linux-gnu/x86/trace.c -@@ -145,7 +145,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -@@ -158,7 +158,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - -diff --git a/value.c b/value.c -index 2125ba9..30edb4e 100644 ---- a/value.c -+++ b/value.c -@@ -363,7 +363,7 @@ value_set_word(struct value *value, long word) - u.u64 = word; - break; - default: -- assert(sz != sz); -+ assert(!"Unexpected value of sz"); - abort(); - } - -@@ -414,7 +414,7 @@ value_extract_word(struct value *value, long *retp, - *retp = (long)u.u64; - return 0; - default: -- assert(sz != sz); -+ assert(!"Unexpected value of sz"); - abort(); - } - } --- -2.12.0 - diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch new file mode 100644 index 0000000000..61932269bd --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch @@ -0,0 +1,86 @@ +From 491b3b153f6b5cbf2d23a9778e5676eb29a6705f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 6 Feb 2023 16:37:19 -0800 +Subject: [PATCH] Fix type of single bit bitfields + +clang16 warns +trace.c:311:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] + +quash the warning by using an unsigned type to allow +an assignment of 0 or 1 without implicit conversion. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + library.h | 6 +++--- + prototype.h | 2 +- + sysdeps/linux-gnu/trace.h | 10 +++++----- + 3 files changed, 9 insertions(+), 9 deletions(-) + +--- a/library.h ++++ b/library.h +@@ -71,20 +71,20 @@ struct library_symbol { + * looking up one in LIB->protolib. */ + struct prototype *proto; + +- int own_name : 1; ++ unsigned int own_name : 1; + + /* This is relevant for PLT symbols. Latent PLT symbols are + * those that don't match any of the -e rules, but that might + * potentially become active if a library implementing them + * appears that matches a -l rule. Ltrace core is responsible + * for clearing latent flag. */ +- int latent : 1; ++ unsigned latent : 1; + + /* Delayed symbols are those for which a breakpoint shouldn't + * be enabled yet. They are similar to latent symbols, but + * backend is responsible for clearing the delayed flag. See + * proc_activate_delayed_symbol. */ +- int delayed : 1; ++ unsigned int delayed : 1; + + struct arch_library_symbol_data arch; + struct os_library_symbol_data os; +--- a/prototype.h ++++ b/prototype.h +@@ -162,7 +162,7 @@ struct protolib_cache { + + /* For tracking uses of cache during cache's own + * initialization. */ +- int bootstrap : 1; ++ unsigned int bootstrap : 1; + }; + + /* Initialize CACHE. Returns 0 on success or a negative value on +--- a/sysdeps/linux-gnu/trace.h ++++ b/sysdeps/linux-gnu/trace.h +@@ -33,11 +33,11 @@ + struct pid_task { + pid_t pid; /* This may be 0 for tasks that exited + * mid-handling. */ +- int sigstopped : 1; +- int got_event : 1; +- int delivered : 1; +- int vforked : 1; +- int sysret : 1; ++ unsigned int sigstopped : 1; ++ unsigned int got_event : 1; ++ unsigned int delivered : 1; ++ unsigned int vforked : 1; ++ unsigned int sysret : 1; + }; + + struct pid_set { +--- a/sysdeps/linux-gnu/trace.c ++++ b/sysdeps/linux-gnu/trace.c +@@ -1043,7 +1043,7 @@ ltrace_exiting_install_handler(struct pr + struct process_vfork_handler + { + struct event_handler super; +- int vfork_bp_refd:1; ++ unsigned int vfork_bp_refd:1; + }; + + static Event * diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch index 01a35842c8..38a7d055dc 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch @@ -7,6 +7,8 @@ Clang warns about wrong enum initializtion Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/aarch64/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch index 52264a17e6..f3a6d9e599 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch @@ -5,6 +5,8 @@ Subject: [PATCH] configure: Recognise linux-musl as a host OS Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch deleted file mode 100644 index 9def41ca60..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 67a8fa478a4484bc4dbfb3ac74e11be1dd5af594 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 23 Dec 2019 19:35:48 -0800 -Subject: [PATCH] ensure the struct pointers are null initilized - -Do not delete if pointer is already null - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - expr.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/expr.c b/expr.c -index 4059a32..5ffd0ad 100644 ---- a/expr.c -+++ b/expr.c -@@ -189,10 +189,8 @@ int - expr_clone(struct expr_node *retp, const struct expr_node *node) - { - *retp = *node; -- -+ struct expr_node *nlhs = 0, *nrhs = 0; - switch (node->kind) { -- struct expr_node *nlhs; -- struct expr_node *nrhs; - - case EXPR_OP_ARGNO: - case EXPR_OP_SELF: -@@ -236,8 +234,10 @@ expr_clone(struct expr_node *retp, const struct expr_node *node) - if (expr_alloc_and_clone(&nlhs, node->lhs, node->own_lhs) < 0) { - if (node->kind == EXPR_OP_CALL2 - && node->u.call.own_rhs) { -- expr_destroy(nrhs); -- free(nrhs); -+ if (nrhs) { -+ expr_destroy(nrhs); -+ free(nrhs); -+ } - return -1; - } - } --- -2.24.1 - diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch index 76ba7de785..ce4dcf8a98 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch @@ -7,6 +7,8 @@ Its not needed Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/mips/plt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch index 39e1f77a0a..35062debf2 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch @@ -8,6 +8,8 @@ with clang Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/ppc/plt.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch deleted file mode 100644 index 4793e561c0..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f47672bed5905ae382e80b09dafca9a8da45aa67 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 19 Apr 2022 18:44:36 -0700 -Subject: [PATCH] ppc/plt: do not free symbol libsym - -delete_symbol_chain() will call free as well if sybol is non-null -it also fixes use-after-free warnings that compiler emits - -Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/2] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - sysdeps/linux-gnu/ppc/plt.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c -index 5f81889..7c1c025 100644 ---- a/sysdeps/linux-gnu/ppc/plt.c -+++ b/sysdeps/linux-gnu/ppc/plt.c -@@ -687,7 +687,6 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, - if (libsym == NULL - || library_symbol_init(libsym, addr, full_name, 1, - LS_TOPLT_NONE) < 0) { -- free(libsym); - delete_symbol_chain(libsym); - libsym = NULL; - fprintf(stderr, "Couldn't add symbol %s" --- -2.36.0 - diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch new file mode 100644 index 0000000000..3e166f0deb --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch @@ -0,0 +1,34 @@ +From f2f6082cb112cf3b8a6a5bfc989e4a4f6a1bff27 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 3 Sep 2024 20:41:20 +0000 +Subject: [PATCH] proc: Make PROC_PID_FILE not use variable length array + +This helps in compiling with clang which is not happy about VLA + +| ../../../git/sysdeps/linux-gnu/proc.c:70:3: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] +| 70 | PROC_PID_FILE(proc_exe, "/proc/%d/exe", pid); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| ../../../git/sysdeps/linux-gnu/proc.c:59:11: note: expanded from macro 'PROC_PID_FILE' +| 59 | char VAR[strlen(FORMAT) + 6]; \ +| | ^~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sysdeps/linux-gnu/proc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c +index b954997..f37e4e8 100644 +--- a/sysdeps/linux-gnu/proc.c ++++ b/sysdeps/linux-gnu/proc.c +@@ -56,7 +56,8 @@ + #define MAX_DELAY 100000 /* 100000 microseconds = 0.1 seconds */ + + #define PROC_PID_FILE(VAR, FORMAT, PID) \ +- char VAR[strlen(FORMAT) + 6]; \ ++ enum { buflen_ ## VAR = strlen(FORMAT)}; \ ++ char VAR[buflen_ ## VAR + 6]; \ + sprintf(VAR, FORMAT, PID) + + /* diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch deleted file mode 100644 index 65c7d535eb..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 64f98f84fd88797e219f9dde1ca387fee4b509f0 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 24 Apr 2016 16:58:17 -0700 -Subject: [PATCH] replace readdir_r with readdir - -glibc 2.24 has deprecated readdir_r - -https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - sysdeps/linux-gnu/proc.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c -index 953fd86..edb716d 100644 ---- a/sysdeps/linux-gnu/proc.c -+++ b/sysdeps/linux-gnu/proc.c -@@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n) - size_t alloc = 0; - - while (1) { -- struct dirent entry; - struct dirent *result; -- if (readdir_r(d, &entry, &result) != 0) { -+ errno = 0; -+ result = readdir(d); -+ if (errno != 0) { - fail: - free(tasks); - closedir(d); --- -2.8.0 - diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch index c152771923..f78db5b0db 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch @@ -8,6 +8,8 @@ error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifi Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + dict.h | 2 +- library.c | 2 +- vect.h | 2 +- diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch index dff61b1502..dcd0285db6 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/sysdeps/linux-gnu/ppc/ptrace.h +++ b/sysdeps/linux-gnu/ppc/ptrace.h @@ -18,4 +18,5 @@ diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 72bec301fb..a3ddf2a76b 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -10,27 +10,24 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" PE = "1" -PV = "7.91+git${SRCPV}" -SRCREV = "c22d359433b333937ee3d803450dc41998115685" +PV = "7.91+git" +SRCREV = "8eabf684ba6b11ae7a1a843aca3c0657c6329d73" DEPENDS = "elfutils" -SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http;protocol=https \ +SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main \ file://configure-allow-to-disable-selinux-support.patch \ - file://0001-replace-readdir_r-with-readdir.patch \ file://0001-Use-correct-enum-type.patch \ file://0002-Fix-const-qualifier-error.patch \ - file://0001-ARM-code-has-unreachable-code-after-switch-statement.patch \ - file://0001-Fix-tautological-compare-warning.patch \ file://0001-Add-support-for-mips64-n32-n64.patch \ file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ file://0001-mips-plt.c-Delete-include-error.h.patch \ file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ file://0001-hook-Do-not-append-int-to-std-string.patch \ file://0001-Bug-fix-for-data-type-length-judgment.patch \ - file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ - file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ + file://0001-Fix-type-of-single-bit-bitfields.patch \ + file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ " SRC_URI:append:libc-musl = " file://add_ppc64le.patch" diff --git a/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch b/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch new file mode 100644 index 0000000000..2c41180d91 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch @@ -0,0 +1,29 @@ +From ca8f7d968a212f2da64492faac4f80384a5ba395 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 11 Sep 2022 13:23:19 -0700 +Subject: [PATCH] Use builtin for clear_cache + +This makes it compile on mips/clang and also portable across platforms + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lj_mcode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lj_mcode.c b/src/lj_mcode.c +index 163aada4..471897da 100644 +--- a/src/lj_mcode.c ++++ b/src/lj_mcode.c +@@ -46,7 +46,7 @@ void lj_mcode_sync(void *start, void *end) + #elif LJ_TARGET_PPC + lj_vm_cachesync(start, end); + #elif defined(__GNUC__) || defined(__clang__) +- __clear_cache(start, end); ++ __builtin___clear_cache(start, end); + #else + #error "Missing builtin to flush instruction cache" + #endif +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb index 3f3939eeb4..4189217541 100644 --- a/meta-oe/recipes-devtools/luajit/luajit_git.bb +++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb @@ -1,16 +1,15 @@ SUMMARY = "Just-In-Time Compiler for Lua" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=23d6278200de9b48fd1439f80507cba8" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=076b97f5c7e61532f7f6f3865f04da57" HOMEPAGE = "http://luajit.org" SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ - file://clang.patch \ + file://0001-Use-builtin-for-clear_cache.patch \ " -# Set PV to a version tag and date (YYMMDD) associated with SRCREV if it is later. -PV = "2.1.0~beta3-210112" -SRCREV = "43ebb949a249a16c49d232ad24dc9127cc4302bb" +PV = "2.1" +SRCREV = "c525bcb9024510cad9e170e12b6209aedb330f83" S = "${WORKDIR}/git" @@ -22,7 +21,7 @@ BBCLASSEXTEND = "native" # Host luajit needs to be compiled with the same pointer size # If you want to cross-compile to any 32 bit target on an x64 OS, # you need to install the multilib development package (e.g. -# libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part +# libc6-dev:i386 on Debian/Ubuntu) and build a 32 bit host part # (HOST_CC="gcc -m32"). BUILD_CC_ARCH:append = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}" @@ -92,10 +91,7 @@ FILES:${PN}-dev += "${libdir}/libluajit-5.1.a \ " FILES:luajit-common = "${datadir}/${BPN}-${PV}" -# mips64/ppc/ppc64/riscv64/riscv32 is not supported in this release -COMPATIBLE_HOST:mipsarchn32 = "null" -COMPATIBLE_HOST:mipsarchn64 = "null" -COMPATIBLE_HOST:powerpc = "null" +# ppc64/riscv64/riscv32 is not supported in this release COMPATIBLE_HOST:powerpc64 = "null" COMPATIBLE_HOST:powerpc64le = "null" COMPATIBLE_HOST:riscv64 = "null" diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_35.1.bb b/meta-oe/recipes-devtools/luaposix/luaposix_36.2.1.bb index a71bbebf70..1d27eb2588 100644 --- a/meta-oe/recipes-devtools/luaposix/luaposix_35.1.bb +++ b/meta-oe/recipes-devtools/luaposix/luaposix_36.2.1.bb @@ -1,13 +1,13 @@ DESCRIPTION = "luaposix is a POSIX binding for Lua." LICENSE = "MIT" HOMEPAGE = "https://github.com/luaposix/luaposix" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f81069e00c0cad249f20efe958276db1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f30d022f6ef53952fa87cc0b6fffb153" DEPENDS += "lua-native lua virtual/crypt" -SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release-v${PV};protocol=https \ +SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release-v36.2;protocol=https \ " -SRCREV = "14043c5086ae738823a5dfbc9170d9e14193fbef" +SRCREV = "5a8d8c768fc3c51f42cb591e9523a60399efc6a1" S = "${WORKDIR}/git" LUA_VERSION = "5.4" diff --git a/meta-oe/recipes-devtools/makeself/makeself_2.5.0.bb b/meta-oe/recipes-devtools/makeself/makeself_2.5.0.bb new file mode 100644 index 0000000000..f94025dd05 --- /dev/null +++ b/meta-oe/recipes-devtools/makeself/makeself_2.5.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "A self-extracting archiving tool for Unix systems, in 100% shell script." +DESCRIPTION = "\ + makeself.sh is a small shell script that generates a self-extractable \ + compressed tar archive from a directory. The resulting file appears as \ + a shell script (many of those have a .run suffix), and can be launched as is.\ +" +HOMEPAGE = "https://makeself.io/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "\ + git://github.com/megastep/${BPN}.git;protocol=https;branch=master \ +" + +SRCREV = "09488c50c6bdc40aec8e3a9b23a539c5054a634c" + +S = "${WORKDIR}/git" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/makeself.sh ${D}${bindir}/ + install -m 0755 ${S}/makeself-header.sh ${D}${bindir}/ +} + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.2.bb b/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.2.bb new file mode 100644 index 0000000000..028a8f9e46 --- /dev/null +++ b/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.2.bb @@ -0,0 +1,16 @@ +SUMMARY = "Command line utility to communicate with ModBus slave (RTU or TCP)" +DESCRIPTION = "mbpoll can: read discrete inputs; read and write binary outputs \ +(coil); read input registers; read and write output registers (holding register). \ +The reading and writing registers may be in decimal, hexadecimal or floating single \ +precision." +LICENSE = "GPL-3.0-only" +HOMEPAGE = "https://github.com/epsilonrt/mbpoll" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" +DEPENDS = "libmodbus (>=3.1.4)" + +SRC_URI = "git://github.com/epsilonrt/mbpoll;protocol=https;branch=master" +SRCREV = "a0bd6c08d3d15b086f2104477295c0705aed366a" + +S = "${WORKDIR}/git" + +inherit pkgconfig cmake diff --git a/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch b/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch new file mode 100644 index 0000000000..d9bdc01ca1 --- /dev/null +++ b/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch @@ -0,0 +1,44 @@ +From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 7 Sep 2022 00:02:08 -0700 +Subject: [PATCH] configure: Fix checks for system headers + +Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + src/system.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index cdf1eba..6fc81e6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -152,7 +152,7 @@ fi + + dnl Checks for header files. + +-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h]) ++AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h]) + + dnl Checks for typedefs, and compiler characteristics. + +diff --git a/src/system.c b/src/system.c +index 4e008fa..98631a6 100644 +--- a/src/system.c ++++ b/src/system.c +@@ -36,6 +36,8 @@ + * 1. specify the constants in "configed.H" or "noconfig.H", + * 2. append the system-dependent routines in this file. + */ ++ ++#define _DEFAULT_SOURCE + #if PREPROCESSED + #include "mcpp.H" + #else +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch b/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch index a0c6584ecb..b1e05c59d5 100644 --- a/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch +++ b/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch @@ -4,6 +4,8 @@ Date: Tue, 4 Feb 2014 11:00:40 -0800 Subject: [PATCH] line comment bug --- +Upstream-Status: Pending + src/support.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch b/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch index 1df3ae55bc..36cc2bd64d 100644 --- a/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch +++ b/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + diff -r -c -N ../mcpp-2.7.2-old/noconfig/vc2010.dif ./noconfig/vc2010.dif *** ../mcpp-2.7.2-old/noconfig/vc2010.dif Wed Dec 31 20:30:00 1969 --- ./noconfig/vc2010.dif Fri May 14 12:47:22 2010 diff --git a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb index f8125f72d9..b44c6d6663 100644 --- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb @@ -5,13 +5,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5ca370b75ec890321888a00cea9bc1d5" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://ice-mcpp.patch \ + file://0001-configure-Fix-checks-for-system-headers.patch \ file://CVE-2019-14274.patch" SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05" SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mcpp/files/mcpp/" +UPSTREAM_CHECK_REGEX = "${BPN}/V\.(?P<pver>\d+(\.\d+)+)" + inherit autotools EXTRA_OECONF = " --enable-mcpplib " BBCLASSEXTEND = "native nativesdk" +# http://errors.yoctoproject.org/Errors/Details/766883/ +# mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/memstat/memstat/0001-Include-limits.h-for-PATH_MAX-definition.patch b/meta-oe/recipes-devtools/memstat/memstat/0001-Include-limits.h-for-PATH_MAX-definition.patch index 9a0a17e0e4..907ac9edbd 100644 --- a/meta-oe/recipes-devtools/memstat/memstat/0001-Include-limits.h-for-PATH_MAX-definition.patch +++ b/meta-oe/recipes-devtools/memstat/memstat/0001-Include-limits.h-for-PATH_MAX-definition.patch @@ -9,6 +9,8 @@ error: use of undeclared identifier 'PATH_MAX' Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + memstat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/memtool/memtool/run-ptest b/meta-oe/recipes-devtools/memtool/memtool/run-ptest new file mode 100644 index 0000000000..865da9f69e --- /dev/null +++ b/meta-oe/recipes-devtools/memtool/memtool/run-ptest @@ -0,0 +1,27 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +fail_count=0 +all_count=0 + +for test_suite in tests/test_* +do + if "./$test_suite" + then + echo "PASS: $test_suite" + else + echo "FAIL: $test_suite" + fail_count=$((fail_count + 1)) + fi + all_count=$((all_count + 1)) +done + +if [ $fail_count -eq 0 ] +then + echo "PASS: All $all_count tests passed" +else + echo "FAIL: $fail_count of $all_count tests failed" +fi diff --git a/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh b/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh new file mode 100644 index 0000000000..a74975d392 --- /dev/null +++ b/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +# This script verifies the behavior of memtool against plain files. + +readonly PLAIN_FILE=$(mktemp) +FAIL_COUNT=0 + +setup() { + echo "Hello World!" >"$PLAIN_FILE" +} + +teardown() { + rm "$PLAIN_FILE" +} + +verify() { + ACTUAL=$1 + EXPECTED=$2 + TEST_NAME=$3 + + if [ "$ACTUAL" = "$EXPECTED" ]; then + echo "pass: $TEST_NAME" + else + echo "FAIL: $TEST_NAME" + echo " Expected: $EXPECTED" + echo " Actual: $ACTUAL" + FAIL_COUNT=$((FAIL_COUNT + 1)) + fi +} + +# Test Case: Verifies that the expected string of bytes is read from a plain file starting from +# the offset 6 and reading 6 bytes. +test_memtool_read() { + EXPECTED="00000006: 57 6f 72 6c 64 21 World!" + ACTUAL=$(memtool md -s "$PLAIN_FILE" -b 0x6+6) + verify "$ACTUAL" "$EXPECTED" "memtool read from plain file" +} + +# Test Case 2: Verifies that the expected string of bytes is written to a plain file starting from +# and then read the result. +test_memtool_write() { + # Usage of 'od' ensures correct endianess. + readonly replace_str_bytes=$(echo "Yocto!" | od -t d4 -A n) + + # shellcheck disable=SC2086 # We want to pass the bytes as separate arguments. + memtool mw -d "$PLAIN_FILE" 0x6+6 $replace_str_bytes + + EXPECTED="00000006: 59 6f 63 74 6f 21 Yocto!" + ACTUAL=$(memtool md -s "$PLAIN_FILE" -b 0x6+6) + verify "$ACTUAL" "$EXPECTED" "memtool write to plain file" +} + +for test_case in $(declare -F | grep test_memtool_ | cut -f 3 -d ' '); do + setup + $test_case + teardown +done + +if [ $FAIL_COUNT -eq 0 ]; then + echo "Test Passed: memtool plain file read/write functionality is correct." + exit 0 +else + echo "Test FAILED: memtool plain file read/write functionality is incorrect. Check the logs." + exit 1 +fi diff --git a/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb b/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb new file mode 100644 index 0000000000..1e2e93bcd5 --- /dev/null +++ b/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +SUMMARY = "A tool to manipulate and read memory mapped registers" +DESCRIPTION = "memtool is a program that allows to access memory mapped registers. This is useful \ +to inspect and modify registers from the command line. memtool can also operate on plain files, \ +and access PHY registers." +HOMEPAGE = "https://github.com/pengutronix/memtool" +BUGTRACKER = "https://github.com/pengutronix/memtool/issues" +SECTION = "devtool" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = " \ + http://www.pengutronix.de/software/memtool/downloads/memtool-${PV}.tar.xz \ + file://run-ptest \ + file://test_read_write_plainfiles.sh \ +" + +SRC_URI[sha256sum] = "87cb7175266ff3a00a9c1f541c4c6c93693ffbe8dcc0d97a60d13c45ff860900" + +inherit autotools ptest + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${UNPACKDIR}/test_* ${D}${PTEST_PATH}/tests +} + +RDEPENDS:${PN}-ptest += "bash coreutils" diff --git a/meta-oe/recipes-devtools/mercurial/mercurial_6.1.bb b/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb index 3abecc3054..395a330790 100644 --- a/meta-oe/recipes-devtools/mercurial/mercurial_6.1.bb +++ b/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb @@ -4,13 +4,13 @@ SECTION = "console/utils" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS = "python3 python3-native" +DEPENDS = "python3 python3-native python3-setuptools-native" RDEPENDS:${PN} = "python3 python3-modules" -inherit python3native +inherit python3native python3targetconfig SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" -SRC_URI[sha256sum] = "86f98645e4565a9256991dcde22b77b8e7d22ca6fbb60c1f4cdbd8469a38cc1f" +SRC_URI[sha256sum] = "f75d6a4a75823a1b7d713a4967eca2f596f466e58fc6bc06d72642932fd7e307" S = "${WORKDIR}/mercurial-${PV}" @@ -31,7 +31,7 @@ do_install () { } PACKAGES =+ "${PN}-python" -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" - +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}" FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" +CVE_STATUS[CVE-2022-43410] = "cpe-incorrect: The recipe used in the `meta-openembedded` is a different mercurial package compared to the one which has the CVE issue." diff --git a/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb b/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb new file mode 100644 index 0000000000..73d434cba5 --- /dev/null +++ b/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Minimalistic terminal program for communicating with devices over a serial connection" +HOMEPAGE = "https://github.com/pengutronix/microcom" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=c9f7c009791eaa4b9ca90dc4c9538d24" + +SRC_URI = "https://github.com/pengutronix/microcom/releases/download/v${PV}/microcom-${PV}.tar.xz" +SRC_URI[sha256sum] = "ef42184bb35c9762b3e9c70748696f7478efacad8412a88aaf2d9a6a500231a1" + +UPSTREAM_CHECK_URI = "${HOMEPAGE}/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" + +DEPENDS = "readline" + +inherit autotools update-alternatives + +PACKAGECONFIG ??= "" +PACKAGECONFIG[can] = "--enable-can,--disable-can" + +EXTRA_OECONF = "--enable-largefile" + +# higher priority than busybox' microcom +ALTERNATIVE:${PN} = "microcom" +ALTERNATIVE_PRIORITY[microcom] = "100" diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0001-Fix-initialization-in-test-1140.patch b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0001-Fix-initialization-in-test-1140.patch new file mode 100644 index 0000000000..84a585d3c5 --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0001-Fix-initialization-in-test-1140.patch @@ -0,0 +1,113 @@ +From 1b4d42ca2e97061042ec44a0b34ceb176c78c7e1 Mon Sep 17 00:00:00 2001 +From: d-winsor <danwin@microsoft.com> +Date: Mon, 26 Feb 2024 13:17:12 -0800 +Subject: [PATCH] Fix initialization in test (#1140) + +* Suppress unsafe-buffer-usage + +Upstream-Status: Backport [https://github.com/microsoft/GSL/commit/1b4d42ca2e97061042ec44a0b34ceb176c78c7e1] + +Signed-off-by: Peter Marko <peter.marko@siemens.com> +--- + include/gsl/span | 10 ++++++++++ + include/gsl/util | 10 ++++++++++ + tests/CMakeLists.txt | 10 ++++++++++ + tests/span_tests.cpp | 2 +- + 4 files changed, 31 insertions(+), 1 deletion(-) + +diff --git a/include/gsl/span b/include/gsl/span +index cc8a7b9..d254e4d 100644 +--- a/include/gsl/span ++++ b/include/gsl/span +@@ -58,6 +58,12 @@ + #pragma GCC diagnostic ignored "-Wsign-conversion" + #endif + ++// Turn off clang unsafe buffer warnings as all accessed are guarded by runtime checks ++#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" ++#endif // defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++ + namespace gsl + { + +@@ -818,4 +824,8 @@ as_writable_bytes(span<ElementType, Extent> s) noexcept + #pragma GCC diagnostic pop + #endif // __GNUC__ > 6 + ++#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#pragma clang diagnostic pop ++#endif ++ + #endif // GSL_SPAN_H +diff --git a/include/gsl/util b/include/gsl/util +index a215bad..11735a8 100644 +--- a/include/gsl/util ++++ b/include/gsl/util +@@ -39,6 +39,12 @@ + + #endif // _MSC_VER + ++// Turn off clang unsafe buffer warnings as all accessed are guarded by runtime checks ++#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" ++#endif // defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++ + #if defined(__cplusplus) && (__cplusplus >= 201703L) + #define GSL_NODISCARD [[nodiscard]] + #else +@@ -157,4 +163,8 @@ constexpr auto at(std::span<T, extent> sp, const index i) -> decltype(sp[sp.size + + #endif // _MSC_VER + ++#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#pragma clang diagnostic pop ++#endif ++ + #endif // GSL_UTIL_H +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index cab4e56..20de9e1 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -167,6 +167,11 @@ else() + > + ) + endif(MSVC) ++check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) ++if (WARN_UNSAFE_BUFFER) ++ # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" ++ target_compile_options(gsl_tests_config INTERFACE "-Wno-unsafe-buffer-usage") ++endif() + + # for tests to find the gtest header + target_include_directories(gsl_tests_config SYSTEM INTERFACE +@@ -267,6 +272,11 @@ else() + > + ) + endif(MSVC) ++check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) ++if (WARN_UNSAFE_BUFFER) ++ # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" ++ target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-unsafe-buffer-usage") ++endif() + + add_executable(gsl_noexcept_tests no_exception_ensure_tests.cpp) + target_link_libraries(gsl_noexcept_tests +diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp +index 33ccf56..3c1dfe5 100644 +--- a/tests/span_tests.cpp ++++ b/tests/span_tests.cpp +@@ -330,7 +330,7 @@ TEST(span_test, from_array_constructor) + EXPECT_TRUE(s.data() == std::addressof(arr2d[0])); + } + +- int arr3d[2][3][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; ++ int arr3d[2][3][2] = { { {1, 2}, {3, 4}, {5, 6} }, { {7, 8}, {9, 10}, {11, 12} } }; + + #ifdef CONFIRM_COMPILATION_ERRORS + { +-- +2.30.2 + diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0002-Fix-gcc-build-problem.patch b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0002-Fix-gcc-build-problem.patch new file mode 100644 index 0000000000..2f7542c62c --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0002-Fix-gcc-build-problem.patch @@ -0,0 +1,82 @@ +From aa4fd1f57794964640005900c2b47af1a0940b7b Mon Sep 17 00:00:00 2001 +From: Werner Henze <w.henze@avm.de> +Date: Fri, 1 Mar 2024 15:53:50 +0100 +Subject: [PATCH] Fix gcc build problem + +Closes issue #1148 by fixing problems introduced in PR #1140. + +Upstream-Status: Submitted [https://github.com/microsoft/GSL/pull/1149] + +Signed-off-by: Peter Marko <peter.marko@siemens.com> +--- + include/gsl/span | 12 ++++++++---- + include/gsl/util | 12 ++++++++---- + 2 files changed, 16 insertions(+), 8 deletions(-) + +diff --git a/include/gsl/span b/include/gsl/span +index 0de2932..d2ef9f7 100644 +--- a/include/gsl/span ++++ b/include/gsl/span +@@ -59,10 +59,12 @@ + #endif + + // Turn off clang unsafe buffer warnings as all accessed are guarded by runtime checks +-#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#if defined(__clang__) ++#if __has_warning("-Wunsafe-buffer-usage") + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +-#endif // defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#endif // __has_warning("-Wunsafe-buffer-usage") ++#endif // defined(__clang__) + + namespace gsl + { +@@ -824,8 +826,10 @@ as_writable_bytes(span<ElementType, Extent> s) noexcept + #pragma GCC diagnostic pop + #endif // __GNUC__ > 6 + +-#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#if defined(__clang__) ++#if __has_warning("-Wunsafe-buffer-usage") + #pragma clang diagnostic pop +-#endif ++#endif // __has_warning("-Wunsafe-buffer-usage") ++#endif // defined(__clang__) + + #endif // GSL_SPAN_H +diff --git a/include/gsl/util b/include/gsl/util +index b853017..26b2f5f 100644 +--- a/include/gsl/util ++++ b/include/gsl/util +@@ -40,10 +40,12 @@ + #endif // _MSC_VER + + // Turn off clang unsafe buffer warnings as all accessed are guarded by runtime checks +-#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#if defined(__clang__) ++#if __has_warning("-Wunsafe-buffer-usage") + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +-#endif // defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#endif // __has_warning("-Wunsafe-buffer-usage") ++#endif // defined(__clang__) + + #if defined(__cplusplus) && (__cplusplus >= 201703L) + #define GSL_NODISCARD [[nodiscard]] +@@ -163,8 +165,10 @@ constexpr auto at(std::span<T, extent> sp, const index i) -> decltype(sp[sp.size + + #endif // _MSC_VER + +-#if defined(__clang__) && __has_warning("-Wunsafe-buffer-usage") ++#if defined(__clang__) ++#if __has_warning("-Wunsafe-buffer-usage") + #pragma clang diagnostic pop +-#endif ++#endif // __has_warning("-Wunsafe-buffer-usage") ++#endif // defined(__clang__) + + #endif // GSL_UTIL_H +-- +2.30.2 + diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0003-Adapt-check_cxx_compiler_flag-to-cmake-3.0.2.patch b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0003-Adapt-check_cxx_compiler_flag-to-cmake-3.0.2.patch new file mode 100644 index 0000000000..ed057f5243 --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/0003-Adapt-check_cxx_compiler_flag-to-cmake-3.0.2.patch @@ -0,0 +1,53 @@ +From 85e1c38bcf84bd4e2ce63ef74f0cfa1f5e92261e Mon Sep 17 00:00:00 2001 +From: Peter Marko <peter.marko@siemens.com> +Date: Wed, 27 Mar 2024 23:46:31 +0100 +Subject: [PATCH] Adapt check_cxx_compiler_flag to cmake 3.0.2 + +Backporting commits which are upgrading cmake_minimum_required and +include check_cxx_compiler_flag have too many additional changes. + +Let's just do a simple adaptation of our backported patch so +it works with older cmake version instead. + +This can be safely removed when recipe version is upgraded. + +Upstream-Status: Inappropriate + +Signed-off-by: Peter Marko <peter.marko@siemens.com> +--- + tests/CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 20de9e1..54c3ac5 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -5,6 +5,7 @@ enable_testing() # again, for support standalone testing + + include(FindPkgConfig) + include(ExternalProject) ++include(CheckCXXCompilerFlag) + + # will make visual studio generated project group files + set_property(GLOBAL PROPERTY USE_FOLDERS ON) +@@ -167,7 +168,7 @@ else() + > + ) + endif(MSVC) +-check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) ++CHECK_CXX_COMPILER_FLAG("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) + if (WARN_UNSAFE_BUFFER) + # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" + target_compile_options(gsl_tests_config INTERFACE "-Wno-unsafe-buffer-usage") +@@ -272,7 +273,7 @@ else() + > + ) + endif(MSVC) +-check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) ++CHECK_CXX_COMPILER_FLAG("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) + if (WARN_UNSAFE_BUFFER) + # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" + target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-unsafe-buffer-usage") +-- +2.30.2 + diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest new file mode 100644 index 0000000000..2d5bdf4ff2 --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +gsl_tests && echo "PASS: gsl_tests" || echo "FAIL: gsl_tests" +gsl_noexcept_tests && echo "PASS: gsl_noexcept_tests" || echo "FAIL: gsl_noexcept_tests" diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb new file mode 100644 index 0000000000..8ba121d5ea --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb @@ -0,0 +1,50 @@ +SUMMARY = "GSL: Guidelines Support Library" +DESCRIPTION = "The Guidelines Support Library (GSL) contains functions \ + and types that are suggested for use by the C++ Core Guidelines \ + maintained by the Standard C++ Foundation. \ + This repo contains Microsoft's implementation of GSL." +HOMEPAGE = "https://github.com/microsoft/GSL" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=363055e71e77071107ba2bb9a54bd9a7" + +SRC_URI = "git://github.com/microsoft/GSL.git;protocol=https;branch=main \ + file://run-ptest \ + file://0001-Fix-initialization-in-test-1140.patch \ + file://0002-Fix-gcc-build-problem.patch \ + file://0003-Adapt-check_cxx_compiler_flag-to-cmake-3.0.2.patch \ +" +SRCREV = "a3534567187d2edc428efd3f13466ff75fe5805c" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig ptest + +# this is header-only library +ALLOW_EMPTY:${PN} = "1" + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest','', d)}" +PACKAGECONFIG[ptest] = "-DGSL_TEST=ON,-DGSL_TEST=OFF,googletest" + +# clang disagrees with https://github.com/google/googletest/pull/3457 +CXXFLAGS:append:toolchain-clang = " -Wno-error=switch-default" +# Disable disabled-macro-expansion warning as error as its seen on musl +CXXFLAGS:append:toolchain-clang:libc-musl = " -Wno-error=disabled-macro-expansion" + +do_install_ptest() { + install -d ${D}${bindir} + install -m 0755 ${B}/tests/gsl_tests ${D}${bindir} + install -m 0755 ${B}/tests/gsl_noexcept_tests ${D}${bindir} +} + +FILES:${PN}-ptest = "${bindir}/gsl*_tests" + +# there is already other gsl recipe, so recipe name does not match the real component name +CVE_PRODUCT = "microsoft:gsl" + +BBCLASSEXTEND = "native nativesdk" + +# This one is reproducible only on 32bit arm MACHINEs (didn't see it with qemux86 or qemux86-64 builds) +# http://errors.yoctoproject.org/Errors/Details/766976/ +# lib32-microsoft-gsl/4.0.0/git/tests/span_tests.cpp:1275:34: error: value computed is not used [-Werror=unused-value] +CXXFLAGS += "-Wno-error=unused-value" diff --git a/meta-oe/recipes-devtools/mpich/mpich_4.0.2.bb b/meta-oe/recipes-devtools/mpich/mpich_4.0.2.bb deleted file mode 100644 index d277f7e71c..0000000000 --- a/meta-oe/recipes-devtools/mpich/mpich_4.0.2.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "Message Passing Interface (MPI) implementation" -HOMEPAGE = "http://www.mpich.org/" -SECTION = "devel" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163" - -SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" -SRC_URI[sha256sum] = "5a42f1a889d4a2d996c26e48cbf9c595cbf4316c6814f7c181e3320d21dedd42" - -RDEPENDS:${PN} += "bash perl libxml2" - -EXTRA_OECONF = "--enable-debuginfo \ - --enable-fast \ - --enable-shared \ - --with-pm=gforker \ - --disable-rpath \ - --disable-f77 \ - --disable-fc \ - --disable-fortran \ - --disable-cxx \ - BASH_SHELL='${USRBINPATH}/env bash' \ - PERL='${USRBINPATH}/env perl' \ - --with-device=ch3:nemesis \ - --with-rdmacm=no \ - --disable-numa \ -" - -PACKAGECONFIG += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ -" -PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11" - -# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang -LDFLAGS:append:x86-64 = " -lgcc" -LDFLAGS:append:x86 = " -lgcc" - -inherit autotools gettext pkgconfig - -do_configure() { - for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \ - src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \ - modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \ - test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb; do - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d - done -# cd ${S} -# autoupdate -# autoreconf --verbose --install --force -# cd ${B} - oe_runconf -} - -do_install:append() { - sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la - sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc -} diff --git a/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb b/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb new file mode 100644 index 0000000000..f9ff07740d --- /dev/null +++ b/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb @@ -0,0 +1,67 @@ +SUMMARY = "Message Passing Interface (MPI) implementation" +HOMEPAGE = "http://www.mpich.org/" +SECTION = "devel" + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7a88f0d96d0d7396a7c66bf353235b62" + +SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" +SRC_URI[sha256sum] = "883f5bb3aeabf627cb8492ca02a03b191d09836bbe0f599d8508351179781d41" + +RDEPENDS:${PN} += "bash perl libxml2" + +EXTRA_OECONF = "--enable-debuginfo \ + --enable-fast \ + --enable-shared \ + --with-pm=gforker \ + BASH_SHELL='${USRBINPATH}/env bash' \ + PERL='${USRBINPATH}/env perl' \ + --with-device=ch3:nemesis \ +" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx" +PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fortran,libgfortran" + +# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang +LDFLAGS:append:x86-64 = " -lgcc" +LDFLAGS:append:x86 = " -lgcc" + +inherit autotools gettext pkgconfig qemu + +DEPENDS += "qemu-native" + +do_configure() { + if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then + qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" + cat > ${WORKDIR}/qemuwrapper << EOF +#!/bin/sh +$qemu_binary "\$@" +EOF + chmod +x ${WORKDIR}/qemuwrapper + + sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl + + cd ${WORKDIR} + perl ${S}/maint/gen_cross.pl + + sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt + fi + + cd ${S} + ./autogen.sh + + cd ${B} + oe_runconf + sed -i -e 's,${WORKDIR},,g' ${B}/src/include/mpichinfo.h +} + +do_install:append() { + sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicxx + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicc + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc + sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicc + sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicxx +} diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb b/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb index c6a6ac4673..40d997a52c 100644 --- a/meta-oe/recipes-devtools/msgpack/msgpack-c_4.0.0.bb +++ b/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb @@ -7,14 +7,14 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ 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" +SRCREV = "8160ede5e20fd3019a77eea46d9c72cf6163f802" S = "${WORKDIR}/git" inherit cmake pkgconfig +EXTRA_OECMAKE += "-DMSGPACK_BUILD_TESTS=off" + BBCLASSEXTEND += "native nativesdk" diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb index fd08bf85cc..ccbaf9cea7 100644 --- a/meta-oe/recipes-devtools/msgpack/msgpack-cpp_4.1.1.bb +++ b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb @@ -8,7 +8,10 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ " SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" -SRC_URI[sha256sum] = "8115c5edcf20bc1408c798a6bdaec16c1e52b1c34859d4982a0fb03300438f0b" +SRC_URI[sha256sum] = "5fd555742e37bbd58d166199e669f01f743c7b3c6177191dd7b31fb0c37fa191" + +UPSTREAM_CHECK_URI = "https://github.com/msgpack/msgpack-c/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/msgpack-cxx-${PV}" diff --git a/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb index ace3215396..36e46021bb 100644 --- a/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb +++ b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb @@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=b67209a1e36b682a8226de19d265b1e0" SRC_URI = "git://github.com/nlohmann/fifo_map.git;branch=master;protocol=https" -PV = "1.0.0+git${SRCPV}" +PV = "1.0.0+git" -SRCREV = "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9" +SRCREV = "d732aaf9a315415ae8fd7eb11e3a4c1f80e42a48" UPSTREAM_CHECK_COMMITS = "1" @@ -20,6 +20,9 @@ RDEPENDS:${PN}-dev = "" BBCLASSEXTEND = "native nativesdk" +# See https://github.com/SOCI/soci/issues/984 +CXXFLAGS:append:toolchain-clang:runtime-llvm = " -DCATCH_CONFIG_CPP11_NO_SHUFFLE" + do_install() { install -d ${D}${includedir} install -m 0644 ${S}/src/fifo_map.hpp ${D}${includedir} diff --git a/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest b/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest new file mode 100755 index 0000000000..2f00267d50 --- /dev/null +++ b/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest @@ -0,0 +1,12 @@ +#!/bin/sh + +cd tests +for atest in test-* ; do + rm -rf tests.log + ./${atest} > tests.log 2>&1 + if [ $? = 0 ] ; then + echo "PASS: ${atest}" + else + echo "FAIL: ${atest}" + fi +done diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb deleted file mode 100644 index 502262820a..0000000000 --- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "JSON for modern C++" -HOMEPAGE = "https://nlohmann.github.io/json/" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588" - -CVE_PRODUCT = "json-for-modern-cpp" - -SRC_URI = "git://github.com/nlohmann/json.git;nobranch=1;protocol=https \ - " - -SRCREV = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE += "-DJSON_BuildTests=OFF" - -# nlohmann-json is a header only C++ library, so the main package will be empty. - -RDEPENDS:${PN}-dev = "" - -BBCLASSEXTEND = "native nativesdk" - -# other packages commonly reference the file directly as "json.hpp" -# create symlink to allow this usage -do_install:append() { - ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp -} diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb new file mode 100644 index 0000000000..194e80546e --- /dev/null +++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.3.bb @@ -0,0 +1,45 @@ +SUMMARY = "JSON for modern C++" +HOMEPAGE = "https://nlohmann.github.io/json/" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588" + +CVE_PRODUCT = "json-for-modern-cpp" + +SRC_URI = "git://github.com/nlohmann/json.git;branch=develop;protocol=https \ + git://github.com/nlohmann/json_test_data.git;destsuffix=git/json_test_data;name=json-test-data;branch=master;protocol=https \ + file://run-ptest \ +" + +SRCREV = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" +SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37" + +SRCREV_FORMAT .= "_json-test-data" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSON_BuildTests=ON -DJSON_TestDataDirectory=${PTEST_PATH}/json_test_data', '-DJSON_BuildTests=OFF', d)}" + +# nlohmann-json is a header only C++ library, so the main package will be empty. +ALLOW_EMPTY:${PN} = "1" +RDEPENDS:${PN}-dev = "" +RDEPENDS:${PN}-ptest = "perl" + +BBCLASSEXTEND = "native nativesdk" + + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${S}/json_test_data/ ${D}${PTEST_PATH}/ + cp -r ${B}/tests/test-* ${D}${PTEST_PATH}/tests + rm -rf ${D}${PTEST_PATH}/json_test_data/.git +} + + +# other packages commonly reference the file directly as "json.hpp" +# create symlink to allow this usage +do_install:append() { + ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp +} diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.17/oe-npm-cache index f596207648..eb0f143eae 100755 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.17/oe-npm-cache @@ -30,7 +30,7 @@ const xlate = { time: Date.now(), url: key, reqHeaders: { - 'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*', + 'accept': 'application/json', }, resHeaders: { "content-type": "application/json", diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.17.bb index a61dd5018f..d4b818f967 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.17.bb @@ -8,10 +8,13 @@ SRC_URI = "\ inherit native +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + B = "${WORKDIR}/build" do_configure() { - sed -e 's!@@libdir@@!${libdir}!g' < '${WORKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' + sed -e 's!@@libdir@@!${libdir}!g' < '${UNPACKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' } do_install() { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch index d6e439ba22..12f6cd8b96 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch @@ -3,20 +3,44 @@ From: Zuzana Svetlikova <zsvetlik@redhat.com> Date: Thu, 27 Apr 2017 14:25:42 +0200 Subject: [PATCH] Disable running gyp on shared deps +Upstream-Status: Inappropriate [embedded specific] + +Probably imported from: +https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53 +which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in: +https://github.com/alpinelinux/aports/commit/6662eb3199902e8451fb20dce82554ad96f796bb + +We also explicitly prune some dependencies from source in the bitbake recipe: + +python prune_sources() { + import shutil + + shutil.rmtree(d.getVar('S') + '/deps/openssl') + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares') + if 'brotli' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/brotli') + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv') + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib') +} +do_unpack[postfuncs] += "prune_sources" + --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile b/Makefile -index 93d63110..79caaec2 100644 --- a/Makefile +++ b/Makefile -@@ -138,7 +138,7 @@ with-code-cache test-code-cache: +@@ -169,7 +169,7 @@ with-code-cache test-code-cache: $(warning '$@' target is a noop) out/Makefile: config.gypi common.gypi node.gyp \ - deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ + deps/llhttp/llhttp.gyp \ + deps/simdutf/simdutf.gyp deps/ada/ada.gyp \ tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \ tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp - $(PYTHON) tools/gyp_node.py -f make diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch index 8db1f1dd54..0178cec777 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch @@ -3,29 +3,50 @@ From: Guillaume Burel <guillaume.burel@stormshield.eu> Date: Fri, 3 Jan 2020 11:25:54 +0100 Subject: [PATCH] Using native binaries +Upstream-Status: Inappropriate [embedded specific] + +Originally added in: +https://git.openembedded.org/meta-openembedded/commit/?id=1c8e4a679ae382f953b2e5c7a4966a4646314f3e +later extended and renamed in: +https://git.openembedded.org/meta-openembedded/commit/?id=feeb172d1a8bf010490d22b8df9448b20d9d2aed + +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> --- - node.gyp | 4 ++-- - tools/v8_gypfiles/v8.gyp | 11 ++++------- - 2 files changed, 6 insertions(+), 9 deletions(-) + node.gyp | 3 + + tools/v8_gypfiles/v8.gyp | 5 +++++ + 2 files changed, 6 insertions(+) +diff --git a/node.gyp b/node.gyp +index e8e1d9f9..e60ccc10 100644 --- a/node.gyp +++ b/node.gyp -@@ -294,6 +294,7 @@ - 'action_name': 'run_mkcodecache', - 'process_outputs_as_sources': 1, - 'inputs': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', - '<(mkcodecache_exec)', - ], - 'outputs': [ -@@ -319,6 +320,7 @@ - 'action_name': 'node_mksnapshot', - 'process_outputs_as_sources': 1, - 'inputs': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', - '<(node_mksnapshot_exec)', - ], - 'outputs': [ +@@ -320,6 +320,7 @@ + 'action_name': 'node_mksnapshot', + 'process_outputs_as_sources': 1, + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_mksnapshot_exec)', + '<(node_snapshot_main)', + ], +@@ -935,6 +935,7 @@ + 'action_name': 'node_js2c', + 'process_outputs_as_sources': 1, + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_js2c_exec)', + '<@(library_files)', + '<@(deps_files)', +@@ -944,6 +945,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', + ], + 'action': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_js2c_exec)', + '<@(_outputs)', + 'lib', + +diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp +index 42e26cd9..bc721991 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -68,6 +68,7 @@ @@ -40,11 +61,11 @@ Subject: [PATCH] Using native binaries '<@(torque_outputs_inc)', ], 'action': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', '-v8-root', '<(V8_ROOT)', -@@ -225,6 +227,7 @@ +@@ -211,6 +213,7 @@ { 'action_name': 'generate_bytecode_builtins_list_action', 'inputs': [ @@ -52,7 +73,7 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', ], 'outputs': [ -@@ -415,6 +418,7 @@ +@@ -400,6 +403,7 @@ ], }, 'inputs': [ @@ -60,7 +81,7 @@ Subject: [PATCH] Using native binaries '<(mksnapshot_exec)', ], 'outputs': [ -@@ -1548,6 +1552,7 @@ +@@ -1539,6 +1543,7 @@ { 'action_name': 'run_gen-regexp-special-case_action', 'inputs': [ @@ -68,3 +89,6 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)', ], 'outputs': [ +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch new file mode 100644 index 0000000000..39026d0742 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch @@ -0,0 +1,55 @@ +From 656f6c91f1da7f1e1ffb01e2de7d9026a84958b5 Mon Sep 17 00:00:00 2001 +From: Luigi Pinca <luigipinca@gmail.com> +Date: Wed, 8 Nov 2023 21:20:53 +0100 +Subject: [PATCH] build: fix build with Python 3.12 + +Replace `distutils.version.StrictVersion` with +`packaging.version.Version`. + +Refs: https://github.com/nodejs/node/pull/50209#issuecomment-1795852539 +PR-URL: https://github.com/nodejs/node/pull/50582 +Reviewed-By: Richard Lau <rlau@redhat.com> +Reviewed-By: Chengzhong Wu <legendecas@gmail.com> + +Upstream-Status: Backport [https://github.com/nodejs/node/commit/95534ad82f4e33f53fd50efe633d43f8da70cba6] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + configure.py | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/configure.py b/configure.py +index 62f041ce..18fe7c14 100755 +--- a/configure.py ++++ b/configure.py +@@ -14,8 +14,6 @@ import bz2 + import io + from pathlib import Path + +-from distutils.version import StrictVersion +- + # If not run from node/, cd to node/. + os.chdir(Path(__file__).parent) + +@@ -30,6 +28,7 @@ tools_path = Path('tools') + + sys.path.insert(0, str(tools_path / 'gyp' / 'pylib')) + from gyp.common import GetFlavor ++from packaging.version import Version + + # imports in tools/configure.d + sys.path.insert(0, str(tools_path / 'configure.d')) +@@ -1565,10 +1564,10 @@ def configure_openssl(o): + # supported asm compiler for AVX2. See https://github.com/openssl/openssl/ + # blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69 + openssl110_asm_supported = \ +- ('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \ +- ('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \ +- ('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \ +- ('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10')) ++ ('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \ ++ ('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \ ++ ('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \ ++ ('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10')) + + if is_x86 and not openssl110_asm_supported: + error('''Did not find a new enough assembler, install one or build with diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch new file mode 100644 index 0000000000..9d878dfb8d --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch @@ -0,0 +1,63 @@ +From bf8c96ba6936050ed4a0de5bc8aeeaf2b3c50dc1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Thu, 7 Dec 2023 12:54:30 +0100 +Subject: [PATCH] gyp: resolve python 3.12 issues + +Upstream has updated gyp wholesale in the main branch, so +this patch can be dropped in due time. + +Upstream-Status: Inappropriate [issue will be fixed upstream with the next nodejs LTS update] + +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | 4 ++-- + tools/gyp/pylib/gyp/input.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +index d9699a0a..173e9465 100644 +--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py ++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +@@ -16,7 +16,7 @@ import subprocess + import sys + import threading + import traceback +-from distutils.version import StrictVersion ++from packaging.version import Version + from gyp.common import GypError + from gyp.common import OrderedSet + +@@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil + else: + ast_code = compile(cond_expr_expanded, "<string>", "eval") + cached_conditions_asts[cond_expr_expanded] = ast_code +- env = {"__builtins__": {}, "v": StrictVersion} ++ env = {"__builtins__": {}, "v": Version} + if eval(ast_code, env, variables): + return true_dict + return false_dict +diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py +index 354958bf..ab6112e5 100644 +--- a/tools/gyp/pylib/gyp/input.py ++++ b/tools/gyp/pylib/gyp/input.py +@@ -16,7 +16,7 @@ import subprocess + import sys + import threading + import traceback +-from distutils.version import StrictVersion ++from packaging.version import Version + from gyp.common import GypError + from gyp.common import OrderedSet + +@@ -1190,7 +1190,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil + else: + ast_code = compile(cond_expr_expanded, "<string>", "eval") + cached_conditions_asts[cond_expr_expanded] = ast_code +- env = {"__builtins__": {}, "v": StrictVersion} ++ env = {"__builtins__": {}, "v": Version} + if eval(ast_code, env, variables): + return true_dict + return false_dict +-- +2.39.2 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch index d7005ae972..5af87d866e 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch @@ -1,6 +1,6 @@ From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 20 Oct 2021 12:49:58 -0700 +Date: Mon, 3 Jul 2023 12:33:16 +0000 Subject: [PATCH] [liftoff] Correct function signatures Fixes builds on mips where clang reports an error @@ -9,14 +9,19 @@ Fixes builds on mips where clang reports an error ^~~~ Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674] -Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> --- - src/wasm/baseline/liftoff-assembler.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++--- + deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +- + deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) +diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h +index aef63c64..f2a11b01 100644 --- a/deps/v8/src/wasm/baseline/liftoff-assembler.h +++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h -@@ -613,7 +613,7 @@ class LiftoffAssembler : public TurboAss +@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler { void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); // Move {src} into {dst}. {src} and {dst} must be different. @@ -25,7 +30,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> // Parallel register move: For a list of tuples <dst, src, kind>, move the // {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore -@@ -759,8 +759,8 @@ class LiftoffAssembler : public TurboAss +@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler { inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, ValueKind); @@ -36,20 +41,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> inline void Spill(int offset, LiftoffRegister, ValueKind); inline void Spill(int offset, WasmValue); ---- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h -+++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h -@@ -658,7 +658,7 @@ void LiftoffAssembler::Store(Register ds - pinned = pinned | LiftoffRegList::ForRegs(dst_op.rm(), src); - LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); - // Save original value. -- Move(tmp, src, type.value_type()); -+ Move(tmp, src, type.value_type().kind()); - - src = tmp; - pinned.set(tmp); +diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +index 96cba24c..53e1842d 100644 --- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h -@@ -596,7 +596,7 @@ void LiftoffAssembler::Store(Register ds +@@ -592,7 +592,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, pinned.set(dst_op.rm()); LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); // Save original value. @@ -58,9 +54,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src = tmp; pinned.set(tmp); ---- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h -+++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h -@@ -580,7 +580,7 @@ void LiftoffAssembler::Store(Register ds +diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h +index 1d6ae09e..397e82b2 100644 +--- a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h ++++ b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h +@@ -286,7 +286,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, pinned.set(dst_op.rm()); LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); // Save original value. @@ -69,3 +67,5 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src = tmp; pinned.set(tmp); +-- +2.40.0 diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch deleted file mode 100644 index a0242d8e18..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e65dde8db17da5acddeef7eb9316199c4e5e0811 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 19 Apr 2022 12:40:25 -0700 -Subject: [PATCH] mips: Use 32bit cast for operand on mips32 - -Fixes -deps/v8/src/compiler/backend/mips/code-generator-mips.cc: In member function 'void v8::internal::compiler::CodeGenerator::AssembleReturn(v8::internal::compiler::InstructionOperand*)': -../deps/v8/src/compiler/backend/mips/code-generator-mips.cc:4233:48: error: call of overloaded 'Operand(int64_t)' is ambiguous - 4233 | Operand(static_cast<int64_t>(0))); - | ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - deps/v8/src/compiler/backend/mips/code-generator-mips.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -index 2b8197e..b226140 100644 ---- a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -+++ b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -@@ -4230,7 +4230,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { - } else if (FLAG_debug_code) { - __ Assert(eq, AbortReason::kUnexpectedAdditionalPopValue, - g.ToRegister(additional_pop_count), -- Operand(static_cast<int64_t>(0))); -+ Operand(static_cast<int32_t>(0))); - } - } - // Functions with JS linkage have at least one parameter (the receiver). --- -2.36.0 - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch index 4773f05109..dd9c9015e2 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch @@ -7,6 +7,8 @@ clang does not support this option Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch deleted file mode 100644 index 5cb2e97015..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 62ddf8499747fb1e366477d666c0634ad50039a9 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade <quantum.analyst@gmail.com> -Date: Tue, 19 Mar 2019 23:22:40 -0400 -Subject: [PATCH 2/2] Install both binaries and use libdir. - -This allows us to build with a shared library for other users while -still providing the normal executable. - -Taken from - https://src.fedoraproject.org/rpms/nodejs/raw/rawhide/f/0002-Install-both-binaries-and-use-libdir.patch - -Upstream-Status: Pending - -Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.py | 7 +++++++ - tools/install.py | 21 +++++++++------------ - 2 files changed, 16 insertions(+), 12 deletions(-) - -diff --git a/configure.py b/configure.py -index 6efb98c2316f089f3167e486282593245373af3f..a6d2ec939e4480dfae703f3978067537abf9f0f0 100755 ---- a/configure.py -+++ b/configure.py -@@ -721,10 +721,16 @@ parser.add_argument('--shared', - dest='shared', - default=None, - help='compile shared library for embedding node in another project. ' + - '(This mode is not officially supported for regular applications)') - -+parser.add_argument('--libdir', -+ action='store', -+ dest='libdir', -+ default='lib', -+ help='a directory to install the shared library into') -+ - parser.add_argument('--without-v8-platform', - action='store_true', - dest='without_v8_platform', - default=False, - help='do not initialize v8 platform during node.js startup. ' + -@@ -1305,10 +1311,11 @@ def configure_node(o): - o['variables']['debug_nghttp2'] = 'false' - - o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) - - o['variables']['node_shared'] = b(options.shared) -+ o['variables']['libdir'] = options.libdir - node_module_version = getmoduleversion.get_version() - - if options.dest_os == 'android': - shlib_suffix = 'so' - elif sys.platform == 'darwin': -diff --git a/tools/install.py b/tools/install.py -index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..11208f9e7166ab60da46d5ace2257c239a7e9263 100755 ---- a/tools/install.py -+++ b/tools/install.py -@@ -128,26 +128,23 @@ def subdir_files(path, dest, action): - for subdir, files_in_path in ret.items(): - action(files_in_path, subdir + '/') - - def files(action): - is_windows = sys.platform == 'win32' -- output_file = 'node' - output_prefix = 'out/Release/' -+ output_libprefix = output_prefix - -- if 'false' == variables.get('node_shared'): -- if is_windows: -- output_file += '.exe' -+ if is_windows: -+ output_bin = 'node.exe' -+ output_lib = 'node.dll' - else: -- if is_windows: -- output_file += '.dll' -- else: -- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix') -+ output_bin = 'node' -+ output_lib = 'libnode.' + variables.get('shlib_suffix') - -- if 'false' == variables.get('node_shared'): -- action([output_prefix + output_file], 'bin/' + output_file) -- else: -- action([output_prefix + output_file], 'lib/' + output_file) -+ action([output_prefix + output_bin], 'bin/' + output_bin) -+ if 'true' == variables.get('node_shared'): -+ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib) - - if 'true' == variables.get('node_use_dtrace'): - action(['out/Release/node.d'], 'lib/dtrace/node.d') - - # behave similarly for systemtap --- -2.33.0 - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch deleted file mode 100644 index 4d238c03f4..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 86d1c0cc6a5dcf57e413a1cc1c29203e87cf9a14 Mon Sep 17 00:00:00 2001 -From: Daniel Bevenius <daniel.bevenius@gmail.com> -Date: Sat, 16 Oct 2021 08:50:16 +0200 -Subject: [PATCH] src: add --openssl-legacy-provider option - -This commit adds an option to Node.js named --openssl-legacy-provider -and if specified will load OpenSSL 3.0 Legacy provider. - -$ ./node --help -... ---openssl-legacy-provider enable OpenSSL 3.0 legacy provider - -Example usage: - -$ ./node --openssl-legacy-provider -p 'crypto.createHash("md4")' -Hash { - _options: undefined, - [Symbol(kHandle)]: Hash {}, - [Symbol(kState)]: { [Symbol(kFinalized)]: false } -} - -Co-authored-by: Richard Lau <rlau@redhat.com> -Signed-off-by: Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Upstream-Status: Backport [https://github.com/nodejs/node/issues/40455] ---- - doc/api/cli.md | 10 ++++++++++ - src/crypto/crypto_util.cc | 10 ++++++++++ - src/node_options.cc | 10 ++++++++++ - src/node_options.h | 7 +++++++ - .../test-process-env-allowed-flags-are-documented.js | 5 +++++ - 5 files changed, 42 insertions(+) - -diff --git a/doc/api/cli.md b/doc/api/cli.md -index 74057706bf8d..608b9cdeddf1 100644 ---- a/doc/api/cli.md -+++ b/doc/api/cli.md -@@ -687,6 +687,14 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be - used to enable FIPS-compliant crypto if Node.js is built - against FIPS-enabled OpenSSL. - -+### `--openssl-legacy-provider` -+<!-- YAML -+added: REPLACEME -+--> -+ -+Enable OpenSSL 3.0 legacy provider. For more information please see -+[providers readme][]. -+ - ### `--pending-deprecation` - - <!-- YAML -@@ -1544,6 +1552,7 @@ Node.js options that are allowed are: - * `--no-warnings` - * `--node-memory-debug` - * `--openssl-config` -+* `--openssl-legacy-provider` - * `--pending-deprecation` - * `--policy-integrity` - * `--preserve-symlinks-main` -@@ -1933,6 +1942,7 @@ $ node --max-old-space-size=1536 index.js - [emit_warning]: process.md#processemitwarningwarning-options - [jitless]: https://v8.dev/blog/jitless - [libuv threadpool documentation]: https://docs.libuv.org/en/latest/threadpool.html -+[providers readme]: https://github.com/openssl/openssl/blob/openssl-3.0.0/README-PROVIDERS.md - [remote code execution]: https://www.owasp.org/index.php/Code_Injection - [security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure - [timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones -diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index 7e0c8ba3eb60..796ea3025e41 100644 ---- a/src/crypto/crypto_util.cc -+++ b/src/crypto/crypto_util.cc -@@ -148,6 +148,16 @@ void InitCryptoOnce() { - } - #endif - -+#if OPENSSL_VERSION_MAJOR >= 3 -+ // --openssl-legacy-provider -+ if (per_process::cli_options->openssl_legacy_provider) { -+ OSSL_PROVIDER* legacy_provider = OSSL_PROVIDER_load(nullptr, "legacy"); -+ if (legacy_provider == nullptr) { -+ fprintf(stderr, "Unable to load legacy provider.\n"); -+ } -+ } -+#endif -+ - OPENSSL_init_ssl(0, settings); - OPENSSL_INIT_free(settings); - settings = nullptr; -diff --git a/src/node_options.cc b/src/node_options.cc -index 00bdc6688a4c..3363860919a9 100644 ---- a/src/node_options.cc -+++ b/src/node_options.cc -@@ -4,6 +4,9 @@ - #include "env-inl.h" - #include "node_binding.h" - #include "node_internals.h" -+#if HAVE_OPENSSL -+#include "openssl/opensslv.h" -+#endif - - #include <errno.h> - #include <sstream> -diff --git a/src/node_options.h b/src/node_options.h -index fd772478d04d..1c0e018ab16f 100644 ---- a/src/node_options.h -+++ b/src/node_options.h -@@ -11,6 +11,10 @@ - #include "node_mutex.h" - #include "util.h" - -+#if HAVE_OPENSSL -+#include "openssl/opensslv.h" -+#endif -+ - namespace node { - - class HostPort { -@@ -251,6 +255,9 @@ class PerProcessOptions : public Options { - bool enable_fips_crypto = false; - bool force_fips_crypto = false; - #endif -+#if OPENSSL_VERSION_MAJOR >= 3 -+ bool openssl_legacy_provider = false; -+#endif - - // Per-process because reports can be triggered outside a known V8 context. - bool report_on_fatalerror = false; -diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js -index 64626b71f019..8a4e35997907 100644 ---- a/test/parallel/test-process-env-allowed-flags-are-documented.js -+++ b/test/parallel/test-process-env-allowed-flags-are-documented.js -@@ -43,6 +43,10 @@ for (const line of [...nodeOptionsLines, ...v8OptionsLines]) { - } - } - -+if (!common.hasOpenSSL3) { -+ documented.delete('--openssl-legacy-provider'); -+} -+ - // Filter out options that are conditionally present. - const conditionalOpts = [ - { -@@ -50,6 +54,7 @@ const conditionalOpts = [ - filter: (opt) => { - return [ - '--openssl-config', -+ common.hasOpenSSL3 ? '--openssl-legacy-provider' : '', - '--tls-cipher-list', - '--use-bundled-ca', - '--use-openssl-ca', - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch b/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch new file mode 100644 index 0000000000..689512cb64 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch @@ -0,0 +1,182 @@ +From 182d9c05e78b1ddb1cb8242cd3628a7855a0336f Mon Sep 17 00:00:00 2001 +From: Andrey Kosyakov <caseq@chromium.org> +Date: Thu, 17 Aug 2023 13:50:11 -0700 +Subject: [PATCH] Define UChar as char16_t + +We used to have UChar defined as uint16_t which does not go along +with STL these days if you try to have an std::basic_string<> of it, +as there are no standard std::char_traits<> specialization for uint16_t. + +This switches UChar to char16_t where practical, introducing a few +compatibility shims to keep CL size small, as (1) this would likely +have to be back-ported and (2) crdtp extensively uses uint16_t for +wide chars. + +Bug: b:296390693 +Change-Id: I66a32d8f0050915225b187de56896c26dd76163d +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4789966 +Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> +Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> +Auto-Submit: Andrey Kosyakov <caseq@chromium.org> +Cr-Commit-Position: refs/heads/main@{#89559} + +Upstream-Status: Backport [https://chromium-review.googlesource.com/c/v8/v8/+/4789966] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/inspector/string-16.cc | 8 +++++++- + src/inspector/string-16.h | 10 ++++++++-- + src/inspector/v8-string-conversions.cc | 6 +++--- + src/inspector/v8-string-conversions.h | 6 ++++-- + .../inspector_protocol/crdtp/test_platform_v8.cc | 9 ++++++--- + 5 files changed, 28 insertions(+), 11 deletions(-) + +--- a/deps/v8/src/inspector/string-16.cc ++++ b/deps/v8/src/inspector/string-16.cc +@@ -27,7 +27,7 @@ bool isSpaceOrNewLine(UChar c) { + return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); + } + +-int64_t charactersToInteger(const UChar* characters, size_t length, ++int64_t charactersToInteger(const uint16_t* characters, size_t length, + bool* ok = nullptr) { + std::vector<char> buffer; + buffer.reserve(length + 1); +@@ -50,6 +50,8 @@ int64_t charactersToInteger(const UChar* + + String16::String16(const UChar* characters, size_t size) + : m_impl(characters, size) {} ++String16::String16(const uint16_t* characters, size_t size) ++ : m_impl(reinterpret_cast<const UChar*>(characters), size) {} + + String16::String16(const UChar* characters) : m_impl(characters) {} + +@@ -241,6 +243,10 @@ String16 String16::fromUTF16LE(const UCh + #endif // V8_TARGET_BIG_ENDIAN + } + ++String16 String16::fromUTF16LE(const uint16_t* stringStart, size_t length) { ++ return fromUTF16LE(reinterpret_cast<const UChar*>(stringStart), length); ++} ++ + std::string String16::utf8() const { + return UTF16ToUTF8(m_impl.data(), m_impl.size()); + } +--- a/deps/v8/src/inspector/string-16.h ++++ b/deps/v8/src/inspector/string-16.h +@@ -6,6 +6,7 @@ + #define V8_INSPECTOR_STRING_16_H_ + + #include <stdint.h> ++#include <uchar.h> + + #include <cctype> + #include <climits> +@@ -17,7 +18,7 @@ + + namespace v8_inspector { + +-using UChar = uint16_t; ++using UChar = char16_t; + + class String16 { + public: +@@ -27,6 +28,7 @@ class String16 { + String16(const String16&) V8_NOEXCEPT = default; + String16(String16&&) V8_NOEXCEPT = default; + String16(const UChar* characters, size_t size); ++ String16(const uint16_t* characters, size_t size); + V8_EXPORT String16(const UChar* characters); + V8_EXPORT String16(const char* characters); + String16(const char* characters, size_t size); +@@ -48,7 +50,9 @@ class String16 { + int toInteger(bool* ok = nullptr) const; + std::pair<size_t, size_t> getTrimmedOffsetAndLength() const; + String16 stripWhiteSpace() const; +- const UChar* characters16() const { return m_impl.c_str(); } ++ const uint16_t* characters16() const { ++ return reinterpret_cast<const uint16_t*>(m_impl.c_str()); ++ } + size_t length() const { return m_impl.length(); } + bool isEmpty() const { return !m_impl.length(); } + UChar operator[](size_t index) const { return m_impl[index]; } +@@ -78,6 +82,8 @@ class String16 { + // On Big endian architectures, byte order needs to be flipped. + V8_EXPORT static String16 fromUTF16LE(const UChar* stringStart, + size_t length); ++ V8_EXPORT static String16 fromUTF16LE(const uint16_t* stringStart, ++ size_t length); + + std::size_t hash() const { + if (!hash_code) { +--- a/deps/v8/src/inspector/v8-string-conversions.cc ++++ b/deps/v8/src/inspector/v8-string-conversions.cc +@@ -12,7 +12,7 @@ + + namespace v8_inspector { + namespace { +-using UChar = uint16_t; ++using UChar = char16_t; + using UChar32 = uint32_t; + + bool isASCII(UChar c) { return !(c & ~0x7F); } +@@ -386,7 +386,7 @@ std::string UTF16ToUTF8(const UChar* str + + std::basic_string<UChar> UTF8ToUTF16(const char* stringStart, size_t length) { + if (!stringStart || !length) return std::basic_string<UChar>(); +- std::vector<uint16_t> buffer(length); ++ std::vector<UChar> buffer(length); + UChar* bufferStart = buffer.data(); + + UChar* bufferCurrent = bufferStart; +@@ -395,7 +395,7 @@ std::basic_string<UChar> UTF8ToUTF16(con + reinterpret_cast<const char*>(stringStart + length), + &bufferCurrent, bufferCurrent + buffer.size(), nullptr, + true) != conversionOK) +- return std::basic_string<uint16_t>(); ++ return std::basic_string<UChar>(); + size_t utf16Length = bufferCurrent - bufferStart; + return std::basic_string<UChar>(bufferStart, bufferStart + utf16Length); + } +--- a/deps/v8/src/inspector/v8-string-conversions.h ++++ b/deps/v8/src/inspector/v8-string-conversions.h +@@ -5,14 +5,16 @@ + #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + ++#include <uchar.h> ++ + #include <cstdint> + #include <string> + + // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may + // want to use string-16.h directly rather than these. + namespace v8_inspector { +-std::basic_string<uint16_t> UTF8ToUTF16(const char* stringStart, size_t length); +-std::string UTF16ToUTF8(const uint16_t* stringStart, size_t length); ++std::basic_string<char16_t> UTF8ToUTF16(const char* stringStart, size_t length); ++std::string UTF16ToUTF8(const char16_t* stringStart, size_t length); + } // namespace v8_inspector + + #endif // V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ +--- a/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc ++++ b/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc +@@ -11,13 +11,16 @@ + namespace v8_crdtp { + + std::string UTF16ToUTF8(span<uint16_t> in) { +- return v8_inspector::UTF16ToUTF8(in.data(), in.size()); ++ return v8_inspector::UTF16ToUTF8(reinterpret_cast<const char16_t*>(in.data()), ++ in.size()); + } + + std::vector<uint16_t> UTF8ToUTF16(span<uint8_t> in) { +- std::basic_string<uint16_t> utf16 = v8_inspector::UTF8ToUTF16( ++ std::basic_string<char16_t> utf16 = v8_inspector::UTF8ToUTF16( + reinterpret_cast<const char*>(in.data()), in.size()); +- return std::vector<uint16_t>(utf16.begin(), utf16.end()); ++ return std::vector<uint16_t>( ++ reinterpret_cast<const uint16_t*>(utf16.data()), ++ reinterpret_cast<const uint16_t*>(utf16.data()) + utf16.size()); + } + + } // namespace v8_crdtp diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch b/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch deleted file mode 100644 index 529381842f..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch +++ /dev/null @@ -1,18 +0,0 @@ - -https://github.com/v8/v8/commit/878ccb33bd3cf0e6dc018ff8d15843f585ac07be - -did some automated cleanups but it missed big-endian code. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/deps/v8/src/runtime/runtime-utils.h -+++ b/deps/v8/src/runtime/runtime-utils.h -@@ -126,7 +126,7 @@ static inline ObjectPair MakePair(Object - #if defined(V8_TARGET_LITTLE_ENDIAN) - return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32); - #elif defined(V8_TARGET_BIG_ENDIAN) -- return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32); -+ return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32); - #else - #error Unknown endianness - #endif diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch index cb0237309e..bc51f99d85 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch @@ -1,21 +1,77 @@ -Link mksnapshot with libatomic on x86 +From 15e751e4b79475fb34e4b32a3ca54119b20c564a Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 17 Aug 2024 21:33:18 +0800 +Subject: [PATCH] link libatomic for clang conditionally -Clang-12 on x86 emits atomic builtins +Clang emits atomic builtin, explicitly link libatomic conditionally: +- For target build, always link -latomic for clang as usual +- For host build, if host and target have same bit width, cross compiling + is enabled, and host toolchain is gcc which does not link -latomic; + if host and target have different bit width, no cross compiling, + host build is the same with target build that requires to link + -latomic; -Fixes -| module-compiler.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x558): un -defined reference to `__atomic_load' +Fix: +|tmp-glibc/work/core2-64-wrs-linux/nodejs/20.13.0/node-v20.13.0/out/Release/node_js2c: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + node.gyp | 13 ++++++++++++- + tools/v8_gypfiles/v8.gyp | 15 ++++++++++++--- + 2 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/node.gyp b/node.gyp +index b425f443..f296f35c 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -487,7 +487,18 @@ + ], + }], + ['OS == "linux" and llvm_version != "0.0"', { +- 'libraries': ['-latomic'], ++ 'target_conditions': [ ++ ['_toolset=="host"', { ++ 'conditions': [ ++ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', { ++ 'libraries': ['-latomic'], ++ }], ++ ], ++ }], ++ ['_toolset=="target"', { ++ 'libraries': ['-latomic'], ++ }], ++ ], + }], + ], + }, +diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp +index b23263cf..dcabf4ca 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -1436,6 +1436,7 @@ - { - 'target_name': 'mksnapshot', - 'type': 'executable', -+ 'libraries': [ '-latomic' ], - 'dependencies': [ - 'v8_base_without_compiler', - 'v8_compiler_for_mksnapshot', +@@ -1100,9 +1100,18 @@ + # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library + # to implement atomic memory access + ['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', { +- 'link_settings': { +- 'libraries': ['-latomic', ], +- }, ++ 'target_conditions': [ ++ ['_toolset=="host"', { ++ 'conditions': [ ++ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', { ++ 'libraries': ['-latomic'], ++ }], ++ ], ++ }], ++ ['_toolset=="target"', { ++ 'libraries': ['-latomic', ], ++ }], ++ ], + }], + ], + }, # v8_base_without_compiler +-- +2.35.5 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch b/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch deleted file mode 100644 index 56e93c50cf..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch +++ /dev/null @@ -1,32 +0,0 @@ -Description: mksnapshot uses too much memory on 32-bit mipsel -Author: Jérémy Lal <kapouer@melix.org> -Last-Update: 2020-06-03 -Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586 - -This ensures that we reserve 500M instead of 2G range for codegen -ensures that qemu-mips can allocate such large ranges - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/deps/v8/src/common/globals.h -+++ b/deps/v8/src/common/globals.h -@@ -224,7 +224,7 @@ constexpr size_t kMinimumCodeRangeSize = - constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux - #elif V8_TARGET_ARCH_MIPS - constexpr bool kPlatformRequiresCodeRange = false; --constexpr size_t kMaximalCodeRangeSize = 2048LL * MB; -+constexpr size_t kMaximalCodeRangeSize = 512 * MB; - constexpr size_t kMinimumCodeRangeSize = 0 * MB; - constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page. - #else ---- a/deps/v8/src/codegen/mips/constants-mips.h -+++ b/deps/v8/src/codegen/mips/constants-mips.h -@@ -140,7 +140,7 @@ const uint32_t kLeastSignificantByteInIn - namespace v8 { - namespace internal { - --constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096; -+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024; - - // ----------------------------------------------------------------------------- - // Registers and FPURegisters. diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest b/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest new file mode 100755 index 0000000000..e82f373626 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest @@ -0,0 +1,8 @@ +#!/bin/sh + +./cctest +if [ $? = 0 ]; then + echo "PASS: nodejs" +else + echo "FAIL: nodejs" +fi diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_20.17.0.bb index 62188f94a7..38e5ca9ff1 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_20.17.0.bb @@ -1,13 +1,15 @@ DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6ba5b21ac7a505195ca69344d3d7a94a" +LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ab85b3bae451276a10919163bcc5b74" -DEPENDS = "openssl" +CVE_PRODUCT = "nodejs node.js" + +DEPENDS = "openssl openssl-native file-replacement-native python3-packaging-native" DEPENDS:append:class-target = " qemu-native" DEPENDS:append:class-native = " c-ares-native" -inherit pkgconfig python3native qemu +inherit pkgconfig python3native qemu ptest siteinfo COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" @@ -19,28 +21,25 @@ COMPATIBLE_HOST:powerpc = "null" SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0002-Install-both-binaries-and-use-libdir.patch \ file://0004-v8-don-t-override-ARM-CFLAGS.patch \ - file://0005-add-openssl-legacy-provider-option.patch \ - file://big-endian.patch \ - file://mips-less-memory.patch \ file://system-c-ares.patch \ file://0001-liftoff-Correct-function-signatures.patch \ - file://0001-mips-Use-32bit-cast-for-operand-on-mips32.patch \ + file://libatomic.patch \ + file://182d9c05e78.patch \ + file://run-ptest \ " SRC_URI:append:class-target = " \ - file://0002-Using-native-binaries.patch \ - " -SRC_URI:append:toolchain-clang:x86 = " \ - file://libatomic.patch \ + file://0001-Using-native-binaries.patch \ " SRC_URI:append:toolchain-clang:powerpc64le = " \ file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ " -SRC_URI[sha256sum] = "e922e215cc68eb5f94d33e8a0b61e2c863b7731cc8600ab955d3822da90ff8d1" +SRC_URI[sha256sum] = "9abf03ac23362c60387ebb633a516303637145cb3c177be3348b16880fd8b28c" S = "${WORKDIR}/node-v${PV}" +CVE_PRODUCT += "node.js" + # v8 errors out if you have set CCACHE CCACHE = "" @@ -65,58 +64,52 @@ ARCHFLAGS ?= "" PACKAGECONFIG ??= "ares brotli icu zlib" -PACKAGECONFIG[ares] = "--shared-cares,,c-ares" -PACKAGECONFIG[brotli] = "--shared-brotli,,brotli" -PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" +PACKAGECONFIG[ares] = "--shared-cares,,c-ares c-ares-native" +PACKAGECONFIG[brotli] = "--shared-brotli,,brotli brotli-native" +PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu icu-native" PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" PACKAGECONFIG[shared] = "--shared" PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" -# We don't want to cross-compile during target compile, -# and we need to use the right flags during host compile, -# too. -EXTRA_OEMAKE = "\ - CC.host='${CC}' \ - CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ - CXX.host='${CXX}' \ - CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ - LDFLAGS.host='${LDFLAGS}' \ - AR.host='${AR}' \ - \ - builddir_name=./ \ -" - -python do_unpack() { +EXTRANATIVEPATH += "file-native" + +python prune_sources() { import shutil - bb.build.exec_func('base_do_unpack', d) - shutil.rmtree(d.getVar('S') + '/deps/openssl', True) + shutil.rmtree(d.getVar('S') + '/deps/openssl') if 'ares' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/cares', True) + shutil.rmtree(d.getVar('S') + '/deps/cares') if 'brotli' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/brotli', True) + shutil.rmtree(d.getVar('S') + '/deps/brotli') if 'libuv' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/uv', True) + shutil.rmtree(d.getVar('S') + '/deps/uv') if 'nghttp2' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True) + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') if 'zlib' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/zlib', True) + shutil.rmtree(d.getVar('S') + '/deps/zlib') } +do_unpack[postfuncs] += "prune_sources" # V8's JIT infrastructure requires binaries such as mksnapshot and # mkpeephole to be run in the host during the build. However, these # binaries must have the same bit-width as the target (e.g. a x86_64 -# host targeting ARMv6 needs to produce a 32-bit binary). Instead of -# depending on a third Yocto toolchain, we just build those binaries -# for the target and run them on the host with QEMU. +# host targeting ARMv6 needs to produce a 32-bit binary). +# 1. If host and target have the different bit width, run those +# binaries for the target and run them on the host with QEMU. +# 2. If host and target have the same bit width, enable upstream +# cross crompile support and no QEMU python do_create_v8_qemu_wrapper () { """Creates a small wrapper that invokes QEMU to run some target V8 binaries on the host.""" qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), d.expand('${STAGING_DIR_HOST}${base_libdir}')] - qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST', True), + qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), qemu_libdirs) + + if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": + qemu_cmd = "" + wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') with open(wrapper_path, 'w') as wrapper_file: wrapper_file.write("""#!/bin/sh @@ -135,24 +128,33 @@ addtask create_v8_qemu_wrapper after do_configure before do_compile LDFLAGS:append:x86 = " -latomic" +export CC_host +export CFLAGS_host +export CXX_host +export CXXFLAGS_host +export LDFLAGS_host +export AR_host +export HOST_AND_TARGET_SAME_WIDTH + +CROSS_FLAGS = "--cross-compiling" +CROSS_FLAGS:class-native = "--no-cross-compiling" + # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi do_configure () { - export LD="${CXX}" GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES # $TARGET_ARCH settings don't match --dest-cpu settings - python3 configure.py --prefix=${prefix} --cross-compiling \ + python3 configure.py --verbose --prefix=${prefix} \ --shared-openssl \ - --without-dtrace \ - --without-etw \ --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ --dest-os=linux \ - --libdir=${D}${libdir} \ + --libdir=${baselib} \ + ${CROSS_FLAGS} \ ${ARCHFLAGS} \ ${PACKAGECONFIG_CONFARGS} } do_compile () { - export LD="${CXX}" + install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh oe_runmake BUILDTYPE=Release } @@ -161,26 +163,50 @@ do_install () { oe_runmake install DESTDIR=${D} } -BINARIES = " \ - bytecode_builtins_list_generator \ - ${@bb.utils.contains('PACKAGECONFIG', 'icu', 'gen-regexp-special-case', '', d)} \ - mkcodecache \ - node_mksnapshot \ - torque \ -" - -do_install:append:class-native() { - # Install the native binaries to provide it within sysroot for the target compilation - install -d ${D}${bindir} - (cd ${S}/out/Release && install ${BINARIES} ${D}${bindir}) +do_install_ptest () { + cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ + cp -r ${B}/test ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH} } PACKAGES =+ "${PN}-npm" -FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx" +FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ python3-misc python3-multiprocessing" PACKAGES =+ "${PN}-systemtap" FILES:${PN}-systemtap = "${datadir}/systemtap" +do_configure[prefuncs] += "set_gyp_variables" +do_compile[prefuncs] += "set_gyp_variables" +do_install[prefuncs] += "set_gyp_variables" +python set_gyp_variables () { + if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "0": + # We don't want to cross-compile during target compile, + # and we need to use the right flags during host compile, + # too. + d.setVar("CC_host", d.getVar("CC") + " -pie -fPIE") + d.setVar("CFLAGS_host", d.getVar("CFLAGS")) + d.setVar("CXX_host", d.getVar("CXX") + " -pie -fPIE") + d.setVar("CXXFLAGS_host", d.getVar("CXXFLAGS")) + d.setVar("LDFLAGS_host", d.getVar("LDFLAGS")) + d.setVar("AR_host", d.getVar("AR")) + elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": + # Enable upstream cross crompile support + d.setVar("CC_host", d.getVar("BUILD_CC")) + d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS")) + d.setVar("CXX_host", d.getVar("BUILD_CXX")) + d.setVar("CXXFLAGS_host", d.getVar("BUILD_CXXFLAGS")) + d.setVar("LDFLAGS_host", d.getVar("BUILD_LDFLAGS")) + d.setVar("AR_host", d.getVar("BUILD_AR")) +} + +python __anonymous () { + # 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width + if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"): + d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0") + else: + d.setVar("HOST_AND_TARGET_SAME_WIDTH", "1") +} + BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/octave/files/fix-blas-library-integer-size.patch b/meta-oe/recipes-devtools/octave/files/fix-blas-library-integer-size.patch index e89d7d3466..4189d4083a 100644 --- a/meta-oe/recipes-devtools/octave/files/fix-blas-library-integer-size.patch +++ b/meta-oe/recipes-devtools/octave/files/fix-blas-library-integer-size.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + diff -Naur octave-4.4.1.orig/configure.ac octave-4.4.1/configure.ac --- octave-4.4.1.orig/configure.ac 2019-02-23 10:46:24.287240571 +0000 +++ octave-4.4.1/configure.ac 2019-02-23 10:46:42.255249333 +0000 diff --git a/meta-oe/recipes-devtools/octave/octave_7.1.0.bb b/meta-oe/recipes-devtools/octave/octave_7.2.0.bb index c9982a7bb2..eb96a624f6 100644 --- a/meta-oe/recipes-devtools/octave/octave_7.1.0.bb +++ b/meta-oe/recipes-devtools/octave/octave_7.2.0.bb @@ -32,7 +32,7 @@ SRC_URI = " \ ${GNU_MIRROR}/octave/${BPN}-${PV}.tar.gz \ file://fix-blas-library-integer-size.patch \ " -SRC_URI[sha256sum] = "d4a9d81f3f67b4a6e07cb7a80dcb10ad5e9176fcc30762c70a81580a64b8b0b6" +SRC_URI[sha256sum] = "b12cb652587d31c5c382b39ed73463c22a5259ecb2fa6b323a27da409222dacc" # Note: Qt5Help is required for gui -> qttools(-native) must be build with # clang in PACKAGECONFIG diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb index 1503bb6751..559fe29ff8 100644 --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb @@ -1,30 +1,30 @@ SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing" LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +LIC_FILES_CHKSUM = "file://COPYING;md5=599d2d1ee7fc84c0467b3d19801db870" DEPENDS = "libusb-compat libftdi" RDEPENDS:${PN} = "libusb1" SRC_URI = " \ git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \ git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \ - git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \ + git://github.com/msteveb/jimtcl.git;protocol=https;destsuffix=git/jimtcl;name=jimtcl;branch=master \ git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \ " SRCREV_FORMAT = "openocd" -SRCREV_openocd = "f342aac0845a69d591ad39a025d74e9c765f6420" +SRCREV_openocd = "91bd4313444c5a949ce49d88ab487608df7d6c37" SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba" -SRCREV_jimtcl = "0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6" +SRCREV_jimtcl = "fcbb4499a6b46ef69e7a95da53e30796e20817f0" SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4" -PV = "0.11+gitr${SRCPV}" +PV = "0.12+git" S = "${WORKDIR}/git" inherit pkgconfig autotools-brokensep gettext BBCLASSEXTEND += "native nativesdk" -EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html --disable-werror" +EXTRA_OECONF = "--enable-ftdi --enable-jtag_vpi --enable-buspirate --disable-doxygen-html --disable-werror" do_configure() { ./bootstrap nosubmodule diff --git a/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb b/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb index 441ab2ec95..ee7674a0c7 100644 --- a/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb +++ b/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb @@ -1,6 +1,5 @@ SUMMARY = "Packages required for a target (on-device) SDK" -PR = "r1" inherit packagegroup @@ -22,5 +21,5 @@ RDEPENDS:${PN} = "gcc-symlinks g++-symlinks cpp cpp-symlinks \ libtool libtool-dev \ pkgconfig" -# usefull, but not in oe-core/meta-oe yet: patchutils -RRECOMMENDS:${PN} = " g77-symlinks gfortran-symlinks" +# useful, but not in oe-core/meta-oe yet: patchutils +RRECOMMENDS:${PN} = "${@bb.utils.contains('FORTRAN', ',fortran', 'gfortran gfortran-symlinks', '', d)}" diff --git a/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch b/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch deleted file mode 100644 index d64cba109f..0000000000 --- a/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f6ca8c930d0fbd2491b3cc77169e32806a14e5e9 Mon Sep 17 00:00:00 2001 -From: Matteo Croce <mcroce@microsoft.com> -Date: Mon, 30 Aug 2021 16:25:56 +0200 -Subject: [PATCH] CMakeList.txt: make python optional - -Upstream-Status: Backport [https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=88431099950ab3e8bc1645353508d7978a6cad35] - -ostra-cg, which requires python, is installed in the destination dir. -Make it optional for embedded distributions which doesn't have the -python interpreter available. - -Signed-off-by: Matteo Croce <mcroce@microsoft.com> ---- - CMakeLists.txt | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4140574..8523bce 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -61,6 +61,7 @@ find_package(DWARF REQUIRED) - find_package(ZLIB REQUIRED) - find_package(argp REQUIRED) - find_package(obstack REQUIRED) -+find_package(Python3 QUIET) - - # make sure git submodule(s) are checked out - find_package(Git QUIET) -@@ -185,8 +186,10 @@ install(FILES dwarves.h dwarves_emit.h dwarves_reorganize.h - elfcreator.h elf_symtab.h hash.h libctf.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/dwarves/) - install(FILES man-pages/pahole.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1/) --install(PROGRAMS ostra/ostra-cg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -+if(Python3_FOUND) -+ install(PROGRAMS ostra/ostra-cg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -+ install(FILES ostra/python/ostra.py DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime/python) -+endif() - install(PROGRAMS btfdiff fullcircle DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) --install(FILES ostra/python/ostra.py DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime/python) - install(FILES lib/Makefile lib/ctracer_relay.c lib/ctracer_relay.h lib/linux.blacklist.cu - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime) --- -2.31.1 - diff --git a/meta-oe/recipes-devtools/pahole/files/0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch b/meta-oe/recipes-devtools/pahole/files/0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch index 54cd096e4f..4f7dfd4cca 100644 --- a/meta-oe/recipes-devtools/pahole/files/0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch +++ b/meta-oe/recipes-devtools/pahole/files/0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch @@ -3,7 +3,7 @@ From: Matteo Croce <mcroce@microsoft.com> Date: Wed, 15 Sep 2021 17:54:01 +0200 Subject: [PATCH] Use /usr/bin/env python3 instead of just /usr/bin/python3 -Upstream-Status: inappropriate [OE specific] +Upstream-Status: Inappropriate [OE specific] --- ostra/ostra-cg | 2 +- diff --git a/meta-oe/recipes-devtools/pahole/files/0003-CMakeList.txt-don-t-download-libbpf-source-when-syst.patch b/meta-oe/recipes-devtools/pahole/files/0003-CMakeList.txt-don-t-download-libbpf-source-when-syst.patch deleted file mode 100644 index 3d491e2ef2..0000000000 --- a/meta-oe/recipes-devtools/pahole/files/0003-CMakeList.txt-don-t-download-libbpf-source-when-syst.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3d20210d84f61ee2189927e2d9de9ce3e5a0a9c5 Mon Sep 17 00:00:00 2001 -From: Matteo Croce <mcroce@microsoft.com> -Date: Mon, 20 Sep 2021 18:44:52 +0200 -Subject: [PATCH] CMakeList.txt: Don't download libbpf source when system - library is used - -Upstream-Status: Backport [https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=3d20210d84f61ee2189927e2d9de9ce3e5a0a9c5] - -The build system always download the libbpf submodule, regardless if -we're using the embedded or the system version. -Download the libbpf source only if we're using the embedded one. - -Signed-off-by: Matteo Croce <mcroce@microsoft.com> -Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8523bce..2ab66e4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -65,7 +65,7 @@ find_package(Python3 QUIET) - - # make sure git submodule(s) are checked out - find_package(Git QUIET) --if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") -+if(LIBBPF_EMBEDDED AND GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") - # Update submodules as needed - option(GIT_SUBMODULE "Check submodules during build" ON) - if(GIT_SUBMODULE) --- -2.31.1 - diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.22.bb b/meta-oe/recipes-devtools/pahole/pahole_1.25.bb index 449508a5d5..1334c850e6 100644 --- a/meta-oe/recipes-devtools/pahole/pahole_1.22.bb +++ b/meta-oe/recipes-devtools/pahole/pahole_1.25.bb @@ -9,11 +9,9 @@ DEPENDS = "elfutils zlib libbpf" PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_HOST = "(x86_64|i.86|aarch64).*-linux" -SRCREV = "f02af2553ea58ae1186226af0d0ec835a248358f" +SRCREV = "81558a5a996005df0d607dd33f74ec5b7bdb619d" SRC_URI = "git://git.kernel.org/pub/scm/devel/pahole/pahole.git;branch=master \ - file://0001-CMakeList.txt-make-python-optional.patch \ - file://0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch \ - file://0003-CMakeList.txt-don-t-download-libbpf-source-when-syst.patch" + file://0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch" S = "${WORKDIR}/git" @@ -21,7 +19,7 @@ inherit cmake pkgconfig PACKAGECONFIG[python3] = ",,python3-core,python3-core" -EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF" +EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF" FILES:${PN} = "${bindir}/pahole \ ${libdir}/libdwarves.so* \ diff --git a/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb index 85c4fa95ae..52af9b99b1 100644 --- a/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb +++ b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb @@ -10,6 +10,9 @@ COMPATIBLE_HOST = "(x86_64|aarch64|arm|riscv64)" SRCREV = "09724edb1783a98da2b7ae53c5aaa87493aabc9b" SRC_URI = "git://github.com/billfarrow/pcimem.git;branch=master;protocol=https" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_install() { diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch b/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch new file mode 100644 index 0000000000..d08721ae65 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch @@ -0,0 +1,58 @@ +From e63949205682bbd2a0e33e256119472d704a2549 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 29 Jan 2023 22:03:01 -0800 +Subject: [PATCH] Add missing header <cstdint> for uintXX_t types + +This is detected by gcc-13 +gcc 13 moved some includes around and as a result <cstdint> is no +longer transitively included [1]. Explicitly include it for uintXX_t. + +[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Upstream-Status: Submitted [https://android-review.googlesource.com/c/platform/external/perfetto/+/2399128] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/perfetto/ext/base/http/sha1.h | 1 + + include/perfetto/ext/base/uuid.h | 1 + + src/traced/probes/common/cpu_freq_info.h | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/include/perfetto/ext/base/http/sha1.h b/include/perfetto/ext/base/http/sha1.h +index c583d69d4..7e3a48c83 100644 +--- a/include/perfetto/ext/base/http/sha1.h ++++ b/include/perfetto/ext/base/http/sha1.h +@@ -20,6 +20,7 @@ + #include <stddef.h> + + #include <array> ++#include <cstdint> + #include <string> + + namespace perfetto { +diff --git a/include/perfetto/ext/base/uuid.h b/include/perfetto/ext/base/uuid.h +index 1b4c53815..472042fab 100644 +--- a/include/perfetto/ext/base/uuid.h ++++ b/include/perfetto/ext/base/uuid.h +@@ -18,6 +18,7 @@ + #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ + + #include <array> ++#include <cstdint> + #include <string> + + #include "perfetto/ext/base/optional.h" +diff --git a/src/traced/probes/common/cpu_freq_info.h b/src/traced/probes/common/cpu_freq_info.h +index 36f7f9c09..8232cbf64 100644 +--- a/src/traced/probes/common/cpu_freq_info.h ++++ b/src/traced/probes/common/cpu_freq_info.h +@@ -17,6 +17,7 @@ + #ifndef SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ + #define SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ + ++#include <cstdint> + #include <map> + #include <string> + #include <vector> +-- +2.39.1 + diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch b/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch new file mode 100644 index 0000000000..c10400aef4 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch @@ -0,0 +1,73 @@ +From 3b7091243ec03054ca8800b51b85a1c09e7e3075 Mon Sep 17 00:00:00 2001 +From: Sui Chen <suichen6@gmail.com> +Date: Mon, 13 Jun 2022 17:46:49 +0000 +Subject: [PATCH] Remove "check_build_deps" build steps + +When building with Bitbake, we want Bitbake to manage our dependencies, +so we remove the "check_build_deps" steps from Perfetto. + +Also setting "is_cross_compiling" to true, so that the host-side tools +(such as protoc) will always be generated using the native toolchain, +rather than the Bitbake-generated one. + +Signed-off-by: Sui Chen <suichen6@gmail.com> +--- +Upstream-Status: Pending + + gn/BUILD.gn | 1 - + gn/standalone/BUILD.gn | 12 ++++++------ + gn/standalone/BUILDCONFIG.gn | 5 +++-- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/gn/BUILD.gn b/gn/BUILD.gn +index 8a7ca72a8..e4a2d39f0 100644 +--- a/gn/BUILD.gn ++++ b/gn/BUILD.gn +@@ -111,7 +111,6 @@ group("default_deps") { + deps = [ ":gen_buildflags" ] + if (perfetto_build_standalone) { + public_deps = [ +- "//gn/standalone:check_build_deps", + "//gn/standalone/libc++:deps", + "//gn/standalone/sanitizers:deps", + ] +diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn +index 582e9b867..9c77ac64c 100644 +--- a/gn/standalone/BUILD.gn ++++ b/gn/standalone/BUILD.gn +@@ -441,10 +441,10 @@ config("android_liblog") { + } + + # Checks that tools/install-build-deps has been run since it last changed. +-perfetto_check_build_deps("check_build_deps") { +- args = [] +-} ++#perfetto_check_build_deps("check_build_deps") { ++# args = [] ++#} + +-perfetto_check_build_deps("check_build_deps_android") { +- args = [ "--android" ] +-} ++#perfetto_check_build_deps("check_build_deps_android") { ++# args = [ "--android" ] ++#} +diff --git a/gn/standalone/BUILDCONFIG.gn b/gn/standalone/BUILDCONFIG.gn +index 6f32686c1..c041989b0 100644 +--- a/gn/standalone/BUILDCONFIG.gn ++++ b/gn/standalone/BUILDCONFIG.gn +@@ -59,8 +59,9 @@ declare_args() { + # the ossfuzz sanitizer overrides this to true. In that config the + # host/target cpu and arch are identical, but we want to build only the + # targets with the sanitizer/fuzzer flags +- is_cross_compiling = +- target_cpu != host_cpu || target_os != host_os || target_triplet != "" ++ ++ # for Bitbake build ++ is_cross_compiling = true + } + default_configs = [ + "//gn/standalone:debug_symbols", +-- +2.37.1 + diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch new file mode 100644 index 0000000000..ae644747c1 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch @@ -0,0 +1,49 @@ +From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@t-online.de> +Date: Mon, 17 Oct 2022 19:20:53 +0200 +Subject: [PATCH] meson: add PC file for lib_perfetto + +--- +Upstream-Status: Pending + + meson.build | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/meson.build ++++ b/meson.build +@@ -19,9 +19,12 @@ + project( + 'perfetto', + ['cpp'], +- default_options: ['cpp_std=c++17'] ++ default_options: ['cpp_std=c++17'], ++ version: '31.0' + ) + ++soversion = meson.project_version() ++ + fs = import('fs') + + if not fs.is_dir('sdk') +@@ -36,8 +39,9 @@ if host_machine.system() == 'android' + deps_perfetto += cpp.find_library('log') + endif + +-lib_perfetto = static_library( ++lib_perfetto = shared_library( + 'perfetto', ++ version: soversion, + sources: 'sdk/perfetto.cc', + dependencies: deps_perfetto, + install: true, +@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu + + install_data(dir_perfetto_trace / 'perfetto_trace.proto') + ++install_headers('sdk/perfetto.h') ++pkg = import('pkgconfig') ++pkg.generate(lib_perfetto) ++ + dep_perfetto = declare_dependency( + link_with: lib_perfetto, + include_directories: inc_perfetto, diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/meta-oe/recipes-devtools/perfetto/libperfetto.bb new file mode 100644 index 0000000000..c8f56fd527 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/libperfetto.bb @@ -0,0 +1,14 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" + +require perfetto.inc + +inherit meson + +SRC_URI:append = " file://0001-meson-add-pc-file-for-lib_perfetto.patch" + +LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" + +FILES:${PN} += "${datadir}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/recipes-devtools/perfetto/perfetto.bb new file mode 100644 index 0000000000..884e0a024b --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb @@ -0,0 +1,156 @@ +LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390 \ + file://buildtools/libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ + file://buildtools/libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ + file://buildtools/libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ + file://buildtools/protobuf/LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b \ + file://buildtools/zlib/LICENSE;md5=f09575dbfb09420642318b413159496f \ + file://debian/copyright;md5=4e08364c82141f181de69d0a2b89d612 \ + file://python/LICENSE;md5=c602a632c34ade9c78a976734077bce7" + +SRC_URI:append = " \ + git://github.com/protocolbuffers/protobuf.git;branch=3.9.x;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;branch=main;name=libcxx \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;branch=main;name=libcxxabi \ + git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;branch=main;name=libunwind \ + git://android.googlesource.com/platform/system/libbase.git;branch=master;protocol=https;destsuffix=git/buildtools/android-libbase;name=libbase \ + git://android.googlesource.com/platform/system/unwinding.git;branch=master;protocol=https;destsuffix=git/buildtools/android-unwinding;name=unwinding \ + git://android.googlesource.com/platform/system/logging.git;branch=master;protocol=https;destsuffix=git/buildtools/android-logging;name=logging \ + git://android.googlesource.com/platform/system/libprocinfo.git;branch=master;protocol=https;destsuffix=git/buildtools/android-libprocinfo;name=libprocinfo \ + git://android.googlesource.com/platform/system/core.git;branch=master;protocol=https;destsuffix=git/buildtools/android-core;name=core \ + git://android.googlesource.com/platform/bionic.git;branch=master;protocol=https;destsuffix=git/buildtools/bionic;name=bionic \ + git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib \ + git://android.googlesource.com/platform/external/lzma.git;branch=master;protocol=https;destsuffix=git/buildtools/lzma;name=lzma \ + https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d782;subdir=git/buildtools/;name=gn \ + \ + file://0001-Remove-check_build_deps-build-steps.patch \ + file://0001-Add-missing-header-cstdint-for-uintXX_t-types.patch" + +SRCREV_bionic = "4b0e16bc72a82a63c699977376a7d6eadca1b206" +SRCREV_core = "9e6cef7f07d8c11b3ea820938aeb7ff2e9dbaa52" +SRCREV_lzma = "7851dce6f4ca17f5caa1c93a4e0a45686b1d56c3" +SRCREV_libprocinfo = "fd214c13ededecae97a3b15b5fccc8925a749a84" +SRCREV_logging = "7b36b566c9113fc703d68f76e8f40c0c2432481c" +SRCREV_unwinding = "d66882575ebe3700d6a6b10185f3aee28acc1051" +SRCREV_protobuf = "6a59a2ad1f61d9696092f79b6d74368b4d7970a3" +SRCREV_libbase = "78f1c2f83e625bdf66d55b48bdb3a301c20d2fb3" +SRCREV_libcxx = "f8571eaba606bde2eb8cd34b30104ca33e7c207e" +SRCREV_libcxxabi = "8dd405113a4f3694e910b79785dd7fb7535a888a" +SRCREV_libunwind = "aabcd8753678f1536e15eb6385a948470debdae4" +SRCREV_zlib = "5c85a2da4c13eda07f69d81a1579a5afddd35f59" + +SRCREV_FORMAT .="_bionic_core_lzma_libprocinfo_logging_unwinding_protobuf_libbase_libcxx_libcxxabi_libunwind_zlib" + +SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa2358177b64f5cd" + +require perfetto.inc + +DEPENDS += " ninja-native" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm).*-linux*" + +CCACHE_DISABLE = "1" + +# Some musl hacks gets through compiling it for musl +# Nullifying -DTEMP_FAILURE_RETRY might be grossest of them +TUNE_CCARGS:append:libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC -Dgetprogname\(\)=program_invocation_name -DTEMP_FAILURE_RETRY=" +FILES:${PN}:append = " \ + ${bindir}/tracebox \ + " + +B = "${WORKDIR}/build" + +# Run the GN (Generate Ninja) script, and replace the compiler flags where applicable +do_configure () { + # Configuration needs to be done from the source directory + cd ${S} + # Rename a few build tools if they have not been renamed + cd buildtools + x="gn-linux64-1968-0725d782" + [ -f $x ] && mkdir linux64 && mv $x linux64/gn + chmod +x linux64/gn + cd .. + + CC_BIN=`echo $CC | awk '{print $1}'` + CXX_BIN=`echo $CXX | awk '{print $1}'` + STRIP_BIN=`echo $STRIP | awk '{print $1}'` + + ARGS="is_debug=false " # Tell gn to use release mode + + if [ -z `echo ${TOOLCHAIN} | grep clang` ]; then + ARGS=$ARGS" is_clang=false" + else + ARGS=$ARGS" is_clang=true" + fi + + # Architecture parameter accepted by Perfetto + arch=${TARGET_ARCH} + if [ $arch = "i686" ]; then + arch="x86" + elif [ $arch = "x86_64" ]; then + arch="x64" + elif [ $arch = "aarch64" ]; then + arch="arm64" + fi + + ARGS=$ARGS" target_os=\"linux\"" + ARGS=$ARGS" target_cpu=\"$arch\"" + ARGS=$ARGS" target_cc=\"$CC_BIN ${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}\"" + ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}\"" + ARGS=$ARGS" target_strip=\"$STRIP_BIN\"" # + ARGS=$ARGS" target_sysroot=\"${RECIPE_SYSROOT}\"" + ARGS=$ARGS" target_linker=\"$CC_BIN ${TUNE_CCARGS} ${LDFLAGS}\"" + ARGS=$ARGS" target_ar=\"$AR\"" + ARGS="'$ARGS'" + cmd="tools/gn gen --args=$ARGS ${B}" + + echo $cmd + # Use eval, not just call $cmd, due to escaping of single quotation marks + eval $cmd + + cd ${B} + # Eliminate a few incompatible build flags + REPLACES="s/-Wl,--icf=all//g" + REPLACES=$REPLACES";s/-Werror//g" + REPLACES=$REPLACES";s/-fcolor-diagnostics//g" + REPLACES=$REPLACES";s/=format-security//g" + REPLACES=$REPLACES";s/-fdiagnostics-show-template-tree//g" + REPLACES=$REPLACES";s/-D_FORTIFY_SOURCE=2//g" + REPLACES=$REPLACES";s/-fuse-ld=\S*//g" + + find . -name "*.ninja" | xargs sed $REPLACES -i + + # If using the clang toolchain: use the clang host-side binaries built by Bitbake + if [ "${TOOLCHAIN}" = "clang" ]; then + BB_CLANGXX="${BUILD_CXX} ${BUILD_LDFLAGS}" + BB_CLANG="${BUILD_CC}" + BB_LLVM_OBJCOPY="${RECIPE_SYSROOT_NATIVE}/usr/bin/llvm-objcopy" + + HOST_CLANGXX="${STAGING_DIR_NATIVE}/usr/bin/clang++ -stdlib=libc++ -rtlib=libgcc -unwindlib=libgcc" + HOST_CLANG="${STAGING_DIR_NATIVE}/usr/bin/clang" + HOST_LLVM_OBJCOPY="${STAGING_DIR_NATIVE}/usr/bin/llvm-objcopy" + + cd gcc_like_host + REPLACES="s:\S*clang++ :$HOST_CLANGXX :g" + REPLACES=$REPLACES";s:\S*clang :$HOST_CLANG :g" + REPLACES=$REPLACES";s:\S*llvm-objcopy :$HOST_LLVM_OBJCOPY :g" + find . -name "*.ninja" | xargs sed "$REPLACES" -i + cd .. + fi + # Done processing the Ninja files +} + +# Perfetto generates a few different binaries, such as traced and traced_probes and perfetto. +# The "tracebox" is a busybox that combines the 3 above and provides a single stop for trace capture, so we only build "tracebox" here. +do_compile () { + cd ${B} + ninja -C . tracebox +} + +do_install () { + BIN_DIR=${D}${bindir} + + install -d -m0755 $BIN_DIR + install ${B}/tracebox $BIN_DIR/tracebox +} diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.inc b/meta-oe/recipes-devtools/perfetto/perfetto.inc new file mode 100644 index 0000000000..4b06c5bf04 --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/perfetto.inc @@ -0,0 +1,10 @@ +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis." +HOMEPAGE = "https://github.com/google/perfetto" + +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1" + +SRCREV_perfetto = "b8da07095979310818f0efde2ef3c69ea70d62c5" +SRCREV_FORMAT = "perfetto" +PV = "31.0" + +S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb b/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb new file mode 100644 index 0000000000..0eaf2137b6 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb @@ -0,0 +1,20 @@ +DESPCRIPTION = "DBD::MariaDB is the Perl5 Database Interface driver for MariaDB and MySQL databases." +HOMEPAGE = "https://metacpan.org/dist/DBD-MariaDB" +LICENSE = "GPL-1.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c" + +DEPENDS = "libdbi-perl-native libdev-checklib-perl-native libmysqlclient" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PA/PALI/DBD-MariaDB-${PV}.tar.gz" +SRC_URI[sha256sum] = "0d0c76c660ddd55570e48f3e2fdea8f621a69ac0ed48190e8cfcafcb5e9b859d" + +RDEPENDS:${PN} = "libdbi-perl" + +S = "${WORKDIR}/DBD-MariaDB-${PV}" + +inherit cpan + +RDEPENDS:${PN}-ptest += " \ + libtest-warnings-perl \ + perl-module-test-more \ +" diff --git a/meta-oe/recipes-devtools/perl/exiftool_12.89.bb b/meta-oe/recipes-devtools/perl/exiftool_12.89.bb new file mode 100644 index 0000000000..3d745146f1 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/exiftool_12.89.bb @@ -0,0 +1,22 @@ +SUMMARY = "Exiftool" +DESCRIPTION = "ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files." +HOMEPAGE = "https://exiftool.org/" +SECTION = "libs" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://perl-Image-ExifTool.spec;beginline=5;endline=5;md5=ffefffc98dab025cb49489bd4d88ee10" + +inherit cpan + +SRCREV = "e04534a40925354187e8432d44248229d774f34a" +SRC_URI = "git://github.com/exiftool/exiftool;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +RDEPENDS:${PN} = " \ + perl \ + perl-module-list-util \ + perl-module-overload \ + perl-module-file-glob \ + perl-module-scalar-util \ + perl-module-compress-zlib \ +" diff --git a/meta-oe/recipes-devtools/perl/ipc-run_20220807.0.bb b/meta-oe/recipes-devtools/perl/ipc-run_20231003.0.bb index f597a8dab0..e28b6ea018 100644 --- a/meta-oe/recipes-devtools/perl/ipc-run_20220807.0.bb +++ b/meta-oe/recipes-devtools/perl/ipc-run_20231003.0.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e" DEPENDS = "perl" SRC_URI = "git://github.com/toddr/IPC-Run.git;branch=master;protocol=https" -SRCREV = "44b1f2d2021615c88f2f6b1a6cbdd9aebaeb4ad1" +SRCREV = "ad56c3b5f5a211d32bbb8ac29f180d707ee58c1b" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb b/meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb index ecc89d075e..b2266394d6 100644 --- a/meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb +++ b/meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb @@ -12,8 +12,6 @@ SRC_URI[sha256sum] = "4d6d5754be3a9f30906836f0cc10e554c8832e14e7a1341efb15b05d70 S = "${WORKDIR}/${SRCNAME}-${PV}" -COMPATIBLE_HOST:libc-musl = "null" - EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" inherit cpan diff --git a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb deleted file mode 100644 index fc505fe1e8..0000000000 --- a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "A Perl DBI driver for MySQL" -DESCRIPTION = "DBD::mysql is the Perl5 Database Interface driver for \ -the MySQL database. In other words: DBD::mysql is an interface between \ -the Perl programming language and the MySQL programming API that comes \ -with the MySQL relational database management system. Most functions \ -provided by this programming API are supported. Some rarely used \ -functions are missing, mainly because no-one ever requested them. \ -" -HOMEPAGE = "https://github.com/perl5-dbi/DBD-mysql" - -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -DEPENDS += "libdev-checklib-perl-native libdbi-perl-native libmysqlclient" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c" - -SRCREV = "9b5b70ea372f49fe9bc9e592dae3870596d1e3d6" -SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit cpan diff --git a/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch b/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch new file mode 100644 index 0000000000..f29d6c4d8f --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch @@ -0,0 +1,28 @@ +From dc970a868a4c2d7e2051b533e0a3588ef1d35530 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@myname.nl> +Date: Mon, 26 Aug 2024 10:17:01 +0200 +Subject: [PATCH] Fix building on Fedora 40 with GCC 14.2.1 + +Upstream-Status: Backport [https://github.com/perl5-dbi/dbi/commit/d6e2bf13ac6043f5b0a9a147805b4915bd70e631] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + DBI.xs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/DBI.xs b/DBI.xs +index 747e341..9b1d136 100644 +--- a/DBI.xs ++++ b/DBI.xs +@@ -1106,7 +1106,7 @@ dbih_inner(pTHX_ SV *orv, const char *what) + if (!SvMAGICAL(ohv)) { + if (!what) + return NULL; +- if (!hv_fetch(ohv,"_NO_DESTRUCT_WARN",17,0)) ++ if (!hv_fetch((HV*)ohv,"_NO_DESTRUCT_WARN",17,0)) + sv_dump(orv); + croak("%s handle %s is not a DBI handle (has no magic)", + what, neatsvpv(orv,0)); +-- +2.46.0 + diff --git a/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch b/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch deleted file mode 100644 index b41bbe0a50..0000000000 --- a/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch +++ /dev/null @@ -1,56 +0,0 @@ -Backport patch to fix CVE-2014-10402. - -CVE: CVE-2014-10402 -Upstream-Status: Backport [https://github.com/rehsack/dbi/commit/19d0fb1] - -Ref: -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972180#12 - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - - -From 19d0fb169eed475e1c053e99036b8668625cfa94 Mon Sep 17 00:00:00 2001 -From: Jens Rehsack <sno@netbsd.org> -Date: Tue, 6 Oct 2020 10:22:17 +0200 -Subject: [PATCH] lib/DBD/File.pm: fix CVE-2014-10401 - -Dig into the root cause of RT#99508 - which resulted in CVE-2014-10401 - and -figure out that DBI->parse_dsn is the wrong helper to parse our attributes in -DSN, since in DBD::dr::connect only the "dbname" remains from DSN which causes -parse_dsn to bailout. - -Parsing on our own similar to parse_dsn shows the way out. - -Signed-off-by: Jens Rehsack <sno@netbsd.org> ---- - lib/DBD/File.pm | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/lib/DBD/File.pm b/lib/DBD/File.pm -index fb14e9a..f55076f 100644 ---- a/lib/DBD/File.pm -+++ b/lib/DBD/File.pm -@@ -109,7 +109,11 @@ sub connect - # We do not (yet) care about conflicting attributes here - # my $dbh = DBI->connect ("dbi:CSV:f_dir=test", undef, undef, { f_dir => "text" }); - # will test here that both test and text should exist -- if (my $attr_hash = (DBI->parse_dsn ($dbname))[3]) { -+ # -+ # Parsing on our own similar to parse_dsn to find attributes in 'dbname' parameter. -+ if ($dbname) { -+ my @attrs = split /;/ => $dbname; -+ my $attr_hash = { map { split /\s*=>?\s*|\s*,\s*/, $_} @attrs }; - if (defined $attr_hash->{f_dir} && ! -d $attr_hash->{f_dir}) { - my $msg = "No such directory '$attr_hash->{f_dir}"; - $drh->set_err (2, $msg); -@@ -120,7 +124,6 @@ sub connect - if ($attr and defined $attr->{f_dir} && ! -d $attr->{f_dir}) { - my $msg = "No such directory '$attr->{f_dir}"; - $drh->set_err (2, $msg); -- $attr->{RaiseError} and croak $msg; - return; - } - --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb b/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb index 1fee83a8fd..7f6c9059d0 100644 --- a/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb +++ b/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb @@ -7,13 +7,12 @@ database interface independent of the actual database being used. \ HOMEPAGE = "http://search.cpan.org/dist/DBI/" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=10982c7148e0a012c0fd80534522f5c5" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8097b88c6165f0d43949441e6ea581cd" -SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz \ - file://CVE-2014-10402.patch \ +SRC_URI = "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-${PV}.tar.gz \ + file://0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch \ " -SRC_URI[md5sum] = "352f80b1e23769c116082a90905d7398" -SRC_URI[sha256sum] = "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" +SRC_URI[sha256sum] = "2297b99de09e67086640b590699e0e982fb469da63a93fe28dc14782db7a53c8" S = "${WORKDIR}/DBI-${PV}" diff --git a/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch b/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch index 78a7e63b9e..f79b158114 100644 --- a/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch +++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch @@ -21,7 +21,7 @@ and use the return status to determine the lib's checking status is not appropriate in cross compile env. $ /yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/git/assertlibCOw_eujb -Upstream-Status: Inappropriate[oe specific] +Upstream-Status: Inappropriate [oe specific] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- @@ -29,18 +29,18 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Devel/CheckLib.pm b/lib/Devel/CheckLib.pm -index e45cfb4..d228bb5 100644 +index 2e5a252..5c2f0b0 100644 --- a/lib/Devel/CheckLib.pm +++ b/lib/Devel/CheckLib.pm -@@ -424,7 +424,7 @@ sub assert_lib { - my $absexefile = File::Spec->rel2abs($exefile); - $absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/; - if (!$not_execute && system($absexefile) != 0) { -- push @wrongresult, $lib; -+ print "Checking the lib $lib\n"; +@@ -403,7 +403,7 @@ sub assert_lib { + if ($execute) { + my $retval = system($absexefile); + warn "# return value: $retval\n" if $args{debug}; +- push @wrongresult, $lib if $retval != 0; ++ print "Checking the lib $lib\n" if $retval != 0; } - else { - if ($analyze_binary) { + push @wronganalysis, $lib + if $analyze_binary and !$analyze_binary->($lib, $exefile); -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb index 0863bb862d..74a09e7bf8 100644 --- a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb +++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb @@ -11,8 +11,7 @@ LIC_FILES_CHKSUM = "file://README;md5=7911cdbb572d25c5f2e2ea17f669efc2" SRC_URI = "https://cpan.metacpan.org/modules/by-module/Devel/Devel-CheckLib-${PV}.tar.gz \ file://0001-CheckLib.pm-don-t-execute-the-binary.patch \ " -SRC_URI[md5sum] = "3519cbf9fe5ec3404449d5330ee5537f" -SRC_URI[sha256sum] = "f21c5e299ad3ce0fdc0cb0f41378dca85a70e8d6c9a7599f0e56a957200ec294" +SRC_URI[sha256sum] = "869d38c258e646dcef676609f0dd7ca90f085f56cf6fd7001b019a5d5b831fca" S = "${WORKDIR}/Devel-CheckLib-${PV}" diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb index e714851854..6029b7aae9 100644 --- a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb +++ b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb @@ -5,12 +5,22 @@ LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42 SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz" -SRC_URI[md5sum] = "5ee30bf7c76f00cc69f92388ad776e2a" -SRC_URI[sha256sum] = "8f1a09c070738adc695df903f2e7f74308dd8d991b914c0bc390a0e6021294dd" +SRC_URI[sha256sum] = "b15309fc85623893289cb9b2b88dfa9ed1e69156b75f29938553a45be6d730af" S = "${WORKDIR}/IO-Tty-${PV}" -inherit cpan +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-carp \ + perl-module-exporter \ + perl-module-io-handle \ + perl-module-posix \ +" + +RDEPENDS:${PN}-ptest += "\ + perl-module-test-more \ +" FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/IO/Tty/.debug/" diff --git a/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb b/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb new file mode 100644 index 0000000000..ff1552a99b --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb @@ -0,0 +1,24 @@ +SUMMARY = "Perl interface to the PC/SC smart card library" +DESCRIPTION = "Perl wrapper to the PC/SC smartcard library (pcsc-lite) \ +together with some small examples. \ +The provided modules are Chipcard::PCSC and Chipcard::PCSC::Card." +HOMEPAGE = "https://metacpan.org/dist/pcsc-perl" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://cpan.metacpan.org/authors/id/W/WH/WHOM/pcsc-perl-${PV}.tar.bz2" +SRC_URI[sha256sum] = "5cc834438739bd6e4e837fb7e10bd8befb809cd185ae6cf4b33e5fa9161f59fe" + +UPSTREAM_CHECK_URI = "https://cpan.metacpan.org/authors/id/W/WH/WHOM/" +UPSTREAM_CHECK_REGEX = "pcsc-perl-(?P<pver>\d+(\.\d+)+)" + +S = "${WORKDIR}/pcsc-perl-${PV}" + +inherit cpan pkgconfig + +DEPENDS += "pcsc-lite" + +RDEPENDS:${PN} += "perl-module-carp" + +BBCLASSEXTEND="native" diff --git a/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch new file mode 100644 index 0000000000..5b8c76209a --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch @@ -0,0 +1,93 @@ +From 1eeb59366d6140a799f6051fb9f57d988b81fd5b Mon Sep 17 00:00:00 2001 +From: easyaspi314 <easyaspi314@users.noreply.github.com> +Date: Wed, 12 Apr 2023 13:33:07 +0800 +Subject: [PATCH] Change whether to inline XXH3_hashLong_withSecret to a config + option + +Change whether to inline XXH3_hashLong_withSecret to a config option to fix +GCC 12 -Og. + +Upstream-Status: Submitted [https://github.com/php/php-src/pull/11062] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + ext/hash/xxhash/xxhash.h | 35 +++++++++++++++++++++++++++++++++-- + 1 file changed, 33 insertions(+), 2 deletions(-) + +diff --git a/ext/hash/xxhash/xxhash.h b/ext/hash/xxhash/xxhash.h +index b5bd2864..8e816c05 100644 +--- a/ext/hash/xxhash/xxhash.h ++++ b/ext/hash/xxhash/xxhash.h +@@ -1375,6 +1375,23 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, + */ + # define XXH_NO_INLINE_HINTS 0 + ++/*! ++ * @def XXH3_INLINE_SECRET ++ * @brief Determines whether to inline the XXH3 withSecret code. ++ * ++ * When the secret size is known, the compiler can improve the performance ++ * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret(). ++ * ++ * However, if the secret size is not known, it doesn't have any benefit. This ++ * happens when xxHash is compiled into a global symbol. Therefore, if ++ * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0. ++ * ++ * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers ++ * that are *sometimes* force inline on -Og, and it is impossible to automatically ++ * detect this optimization level. ++ */ ++# define XXH3_INLINE_SECRET 0 ++ + /*! + * @def XXH32_ENDJMP + * @brief Whether to use a jump for `XXH32_finalize`. +@@ -1439,6 +1456,15 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, + # endif + #endif + ++#ifndef XXH3_INLINE_SECRET ++# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \ ++ || !defined(XXH_INLINE_ALL) ++# define XXH3_INLINE_SECRET 0 ++# else ++# define XXH3_INLINE_SECRET 1 ++# endif ++#endif ++ + #ifndef XXH32_ENDJMP + /* generally preferable for performance */ + # define XXH32_ENDJMP 0 +@@ -1515,6 +1541,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) + # define XXH_NO_INLINE static + #endif + ++#if XXH3_INLINE_SECRET ++# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE ++#else ++# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE ++#endif + + + /* ************************************* +@@ -4465,7 +4496,7 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, + * so that the compiler can properly optimize the vectorized loop. + * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. + */ +-XXH_FORCE_INLINE XXH64_hash_t ++XXH3_WITH_SECRET_INLINE XXH64_hash_t + XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) + { +@@ -5263,7 +5294,7 @@ XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, + * It's important for performance to pass @secretLen (when it's static) + * to the compiler, so that it can properly optimize the vectorized loop. + */ +-XXH_FORCE_INLINE XXH128_hash_t ++XXH3_WITH_SECRET_INLINE XXH128_hash_t + XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch index a967d64120..c743697469 100644 --- a/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch +++ b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch @@ -1,6 +1,6 @@ -From ca9b419f2c146061f73ee045cb0a069c18b40cd0 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Wed, 15 Dec 2021 14:00:08 +0800 +From 889583912ddd7abc628f2703892ec4884db6419a Mon Sep 17 00:00:00 2001 +From: Soumya Sambu <soumya.sambu@windriver.com> +Date: Tue, 7 May 2024 08:39:16 +0000 Subject: [PATCH 01/11] ext/opcache/config.m4: enable opcache We can't use AC_TRY_RUN to run programs in a cross compile @@ -20,15 +20,18 @@ Signed-off-by: Claude Bing <cbing@cybernetics.com> update patch to version 8.1.0 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + +update patch to version 8.2.18 +Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> --- ext/opcache/config.m4 | 204 ++---------------------------------------- 1 file changed, 8 insertions(+), 196 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index 2a83fa2..9471b5d 100644 +index 6bf07ad3..5d645b86 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 -@@ -108,209 +108,21 @@ if test "$PHP_OPCACHE" != "no"; then +@@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then AC_CHECK_FUNCS([mprotect]) AC_MSG_CHECKING(for sysvipc shared memory support) @@ -40,7 +43,7 @@ index 2a83fa2..9471b5d 100644 -#include <unistd.h> -#include <string.h> - --int main() { +-int main(void) { - pid_t pid; - int status; - int ipc_id; @@ -121,7 +124,7 @@ index 2a83fa2..9471b5d 100644 -# define MAP_FAILED ((void*)-1) -#endif - --int main() { +-int main(void) { - pid_t pid; - int status; - char *shm; @@ -185,7 +188,7 @@ index 2a83fa2..9471b5d 100644 -# define MAP_FAILED ((void*)-1) -#endif - --int main() { +-int main(void) { - pid_t pid; - int status; - int fd; @@ -247,5 +250,5 @@ index 2a83fa2..9471b5d 100644 PHP_NEW_EXTENSION(opcache, ZendAccelerator.c \ -- -2.17.1 +2.40.0 diff --git a/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch index fa956e0284..37752ef949 100644 --- a/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch +++ b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch @@ -8,6 +8,8 @@ Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> update patch to 8.0.12 Signed-off-by: Claude Bing <cbing@cybernetics.com> --- +Upstream-Status: Pending + pear/Makefile.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch index 57b05e6a77..b5a33cca7f 100644 --- a/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch +++ b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch @@ -11,6 +11,8 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> update patch to version 8.0.12 Signed-off-by: Claude Bing <cbing@cybernetics.com> --- +Upstream-Status: Pending + build/Makefile.global | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service index eec76fb563..918ffe6749 100644 --- a/meta-oe/recipes-devtools/php/php/php-fpm.service +++ b/meta-oe/recipes-devtools/php/php/php-fpm.service @@ -1,10 +1,57 @@ +# It's not recommended to modify this file in-place, because it +# will be overwritten during upgrades. If you want to customize, +# the best way is to use the "systemctl edit" command. + [Unit] -Description=PHP-FPM +Description=The PHP FastCGI Process Manager After=network.target + [Service] -Type=forking -PIDFile=/run/php-fpm.pid -ExecStart=@SYSCONFDIR@/init.d/php-fpm start -ExecStop=@SYSCONFDIR@/init.d/php-fpm stop +Type=simple +PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid +ExecStart=@SBINDIR@/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf +ExecReload=@BINDIR@/kill -USR2 $MAINPID + +# Set up a new file system namespace and mounts private /tmp and /var/tmp directories +# so this service cannot access the global directories and other processes cannot +# access this service's directories. +PrivateTmp=true + +# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit. +ProtectSystem=full + +# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices +# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it, +# but no physical devices such as /dev/sda. +PrivateDevices=true + +# Explicit module loading will be denied. This allows to turn off module load and unload +# operations on modular kernels. It is recommended to turn this on for most services that +# do not need special file systems or extra kernel modules to work. +ProtectKernelModules=true + +# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats, +# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes +# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the +# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence +# recommended to turn this on for most services. +ProtectKernelTunables=true + +# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be +# made read-only to all processes of the unit. Except for container managers no services should +# require write access to the control groups hierarchies; it is hence recommended to turn this on +# for most services +ProtectControlGroups=true + +# Any attempts to enable realtime scheduling in a process of the unit are refused. +RestrictRealtime=true + +# Restricts the set of socket address families accessible to the processes of this unit. +# Protects against vulnerabilities such as CVE-2016-8655 +RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX + +# Takes away the ability to create or manage any kind of namespace +RestrictNamespaces=true + [Install] WantedBy=multi-user.target diff --git a/meta-oe/recipes-devtools/php/php_8.1.8.bb b/meta-oe/recipes-devtools/php/php_8.2.20.bb index c5a424cd22..f306b16931 100644 --- a/meta-oe/recipes-devtools/php/php_8.1.8.bb +++ b/meta-oe/recipes-devtools/php/php_8.2.20.bb @@ -3,10 +3,10 @@ HOMEPAGE = "http://www.php.net" SECTION = "console/network" LICENSE = "PHP-3.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d" BBCLASSEXTEND = "native" -DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native" +DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native" DEPENDS:append:libc-musl = " libucontext" DEPENDS:class-native = "zlib-native libxml2-native" @@ -19,6 +19,7 @@ SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \ file://0010-iconv-fix-detection.patch \ + file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \ " SRC_URI:append:class-target = " \ @@ -33,15 +34,18 @@ SRC_URI:append:class-target = " \ " S = "${WORKDIR}/php-${PV}" -SRC_URI[sha256sum] = "b8815a5a02431453d4261e3598bd1f28516e4c0354f328c12890f257870e4c01" +SRC_URI[sha256sum] = "5dec6fa61c7b9c47aa1d76666be651f2642ed2bcf6cd8638c57e3571ce2aac61" -CVE_CHECK_IGNORE += "\ +CVE_STATUS_GROUPS += "CVE_STATUS_PHP" +CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." +CVE_STATUS_PHP = " \ CVE-2007-2728 \ CVE-2007-3205 \ CVE-2007-4596 \ " +CVE_STATUS[CVE-2022-4900] = "cpe-incorrect: The current version (8.2.20) is not affected." -inherit autotools pkgconfig python3native gettext +inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd # phpize is not scanned for absolute paths by default (but php-config is). # @@ -120,7 +124,7 @@ PACKAGECONFIG[mbstring] = "--enable-mbstring,," export HOSTCC = "${BUILD_CC}" export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" -CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" +CFLAGS += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" # Adding these flags enables dynamic library support, which is disabled by # default when cross compiling @@ -128,6 +132,7 @@ CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_IN CFLAGS += " -DHAVE_LIBDL " LDFLAGS += " -ldl " LDFLAGS:append:libc-musl = " -lucontext " +LDFLAGS:append:riscv64 = " -latomic" EXTRA_OEMAKE = "INSTALL_ROOT=${D}" @@ -142,6 +147,13 @@ do_configure:append() { # No, libtool, we really don't want rpath set... sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + sed -i -e's@${RECIPE_SYSROOT}@@g' \ + -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \ + ${B}/main/build-defs.h \ + ${B}/scripts/php-config } do_install:append:class-native() { @@ -171,28 +183,28 @@ do_install:append:class-target() { rm -rf ${D}/.[a-z]* rm -rf ${D}/var rm -f ${D}/${sysconfdir}/php-fpm.conf.default - install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf + install -m 0644 ${UNPACKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf install -d ${D}/${sysconfdir}/apache2/conf.d - install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf install -d ${D}${sysconfdir}/init.d sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm - install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ - ${D}${systemd_unitdir}/system/php-fpm.service + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/php-fpm.service fi if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/apache2/modules.d install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} - install -m 644 ${WORKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d + install -m 644 ${UNPACKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf cat ${S}/php.ini-production | \ sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ @@ -201,6 +213,14 @@ do_install:append:class-target() { fi } +MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \ + ${PN}:${bindir}/phpize \ +" + +do_install:append () { + oe_multilib_header php/main/build-defs.h php/main/php_config.h +} + SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" php_sysroot_preprocess () { @@ -240,7 +260,7 @@ FILES:${PN}-cli = "${bindir}/php" FILES:${PN}-phpdbg = "${bindir}/phpdbg" FILES:${PN}-phar = "${bindir}/phar*" FILES:${PN}-cgi = "${bindir}/php-cgi" -FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service ${sysconfdir}/php-fpm.d/www.conf.default" +FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default" FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf" CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" @@ -271,16 +291,10 @@ RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" +SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service" +SYSTEMD_PACKAGES += "${PN}-fpm" + do_install:append:class-native() { create_wrapper ${D}${bindir}/php \ PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ } - -# Fails to build with thumb-1 (qemuarm) -# | {standard input}: Assembler messages: -# | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3' -# | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3' -# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | make: *** [ext/standard/math.lo] Error 1 -ARM_INSTRUCTION_SET = "arm" diff --git a/meta-oe/recipes-devtools/ply/ply_git.bb b/meta-oe/recipes-devtools/ply/ply_git.bb index 84a79c13e2..7793971083 100644 --- a/meta-oe/recipes-devtools/ply/ply_git.bb +++ b/meta-oe/recipes-devtools/ply/ply_git.bb @@ -5,13 +5,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS += "bison-native" -PV = "2.2.0" +PV = "2.3.0" SRC_URI = "git://github.com/iovisor/ply;branch=master;protocol=https" -SRCREV = "771c32b299355fb31fc296110e90ae0166409b95" +SRCREV = "864fac79116870df1ab7aa21e639578807e41e75" S = "${WORKDIR}/git" +CACHED_CONFIGUREVARS = 'LD="${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}"' + inherit autotools-brokensep COMPATIBLE_HOST = "(x86_64.*|aarch64.*|arm.*|powerpc)-linux" diff --git a/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch b/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch index 7ccdab0f22..3be18986fc 100644 --- a/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch +++ b/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch @@ -18,22 +18,41 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com> madt/madt.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -diff --git a/madt/madt.c b/madt/madt.c -index aed965c..8770cd5 100644 --- a/madt/madt.c +++ b/madt/madt.c -@@ -51,7 +51,9 @@ get_next_entry(acpi_table_entry_header * entry_header) +@@ -34,14 +34,16 @@ typedef unsigned long long u64; + //#include <sys/mman.h> + #include <stdio.h> // fread + #include <stdlib.h> // malloc ++#include <string.h> // memset/memcpy + + #include "./tables.c" + + int verbose = 0; + /* +-/* read standard input ++ * read standard input + * write decoded madt to standard output + */ ++size_t + get_next_entry(acpi_table_entry_header * entry_header) + { + size_t retval; +@@ -51,9 +53,11 @@ get_next_entry(acpi_table_entry_header * return retval; } -u8 buffer[1024]; -+ + +-main() +u8 buf[1024]; +u8 *buffer = buf; - - main() ++int ++main(int argc, char *argv[]) { -@@ -75,6 +77,17 @@ main() + size_t retval; + struct acpi_table_madt *madt_header; +@@ -75,6 +79,17 @@ main() if (verbose) printf("header.length %d\n", madt_header->header.length); @@ -51,7 +70,7 @@ index aed965c..8770cd5 100644 acpi_table_print((void*)&(buffer[bytes_read]), 0); bytes_read = sizeof(struct acpi_table_madt); -@@ -118,6 +131,9 @@ done: +@@ -118,6 +133,9 @@ done: printf("Checksum 0x%x != 0; 0x%x in header ERROR\n", csum, madt_header->header.checksum); @@ -61,6 +80,3 @@ index aed965c..8770cd5 100644 return 0; } --- -1.8.1.2 - diff --git a/meta-oe/recipes-devtools/pmtools/pmtools_git.bb b/meta-oe/recipes-devtools/pmtools/pmtools_git.bb index 56d895a099..ad149de12c 100644 --- a/meta-oe/recipes-devtools/pmtools/pmtools_git.bb +++ b/meta-oe/recipes-devtools/pmtools/pmtools_git.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://lesswatts.org/projects/acpi" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" -PV = "20130209+git${SRCPV}" +PV = "20130209+git" SRC_URI = "git://github.com/anyc/pmtools.git;branch=master;protocol=https \ file://pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch \ diff --git a/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch b/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch deleted file mode 100644 index 3bd041a0e7..0000000000 --- a/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch +++ /dev/null @@ -1,43 +0,0 @@ -From cef3fc90f02ef4fc49515745194bac3d81a2265b Mon Sep 17 00:00:00 2001 -From: "Jose E. Marchesi" <jose.marchesi@oracle.com> -Date: Fri, 30 Apr 2021 13:17:05 +0200 -Subject: [PATCH] build: do not check for Tcl/Tk if --disable-gui is specified - -2021-04-30 Jose E. Marchesi <jemarch@gnu.org> - - * configure.ac: Do not check for tcl/tk if --disable-gui is - specified at configure time. - -(cherry picked from commit 280a5e154287e43c0a40d9530a9cc658a7367a9c) -[Romain: remove Changelog entry] -Signed-off-by: Romain Naour <romain.naour@gmail.com> ---- - configure.ac | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c7205513..c2f0760a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -214,12 +214,15 @@ fi - dnl The GUI is optional, and depends on the availability of Tcl and - dnl Tk. - --POKE_TCLTK -- - AC_ARG_ENABLE([gui], - AS_HELP_STRING([--enable-gui], - [Enable the GUI (default is YES)]), -- [gui_enabled=$enableval], [gui_enabled=$has_tcltk]) -+ [gui_enabled=$enableval], [gui_enabled=yes]) -+ -+if test "x$gui_enabled" = "xyes"; then -+ POKE_TCLTK -+ gui_enabled=$has_tcltk -+fi - - AM_CONDITIONAL([GUI], [test "x$gui_enabled" = "xyes"]) - --- -2.30.2 - diff --git a/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch b/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch deleted file mode 100644 index fa55f817ff..0000000000 --- a/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c37419e459bd5863534719fa50755174d0912e6d Mon Sep 17 00:00:00 2001 -From: Romain Naour <romain.naour@gmail.com> -Date: Fri, 30 Apr 2021 14:32:21 +0200 -Subject: [PATCH] jitter: jitter-config.in: avoit host poisoning while - cross-compiling - -When jitter is bundled into another project (poke), jitter-config --cppflags -return an unsafe path "-I /usr/include". - -In the context of Buildroot, such configuration script woulf be "fixed" -after installation. But jitter-config is not installed by poke since it's -build as static library and liked to poke. - -For now, patch jitter-config.in instead of jitter-config.in.m4sh since -there is an issue while converting the M4sh m4sh script ( .in.m4sh ) -into a portable shell script ( .in ) ready to be processed by aclocal -for @-substitutions. - -[1] https://git.buildroot.net/buildroot/tree/package/pkg-generic.mk?h=2021.02.1#n291 - -Signed-off-by: Romain Naour <romain.naour@gmail.com> ---- - jitter/bin/jitter-config.in | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/jitter/bin/jitter-config.in b/jitter/bin/jitter-config.in -index 5e124f0..af0ac9d 100644 ---- a/jitter/bin/jitter-config.in -+++ b/jitter/bin/jitter-config.in -@@ -998,11 +998,7 @@ while test "$#" != "0"; do - append_to_output cflags;; - --cppflags) - no_option_argument -- append_to_output cppflags -- # Append a -I argument. This is defined separately from the rest, -- # as the installation prefix can be decided very late, at Jitter -- # installation time. -- output="$output -I $includedir";; -+ append_to_output cppflags;; - --ldadd) - no_option_argument - append_to_output ldadd;; --- -2.30.2 - diff --git a/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch b/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch index f217c917f1..67384b73d4 100644 --- a/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch +++ b/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch @@ -11,16 +11,16 @@ Avoid: ./../poke/poke -o ./poke.1 ../run: line 51: exec: :: not found +Upstream-Status: Pending Signed-off-by: Romain Naour <romain.naour@gmail.com> --- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index c2f0760a..93769ef9 100644 --- a/configure.ac +++ b/configure.ac -@@ -74,7 +74,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) +@@ -148,7 +148,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) if test $cross_compiling = no; then AM_MISSING_PROG(HELP2MAN, help2man) else @@ -28,7 +28,4 @@ index c2f0760a..93769ef9 100644 + HELP2MAN=true fi - dnl recfix is part of the GNU recutils suite, and is used in cfg.mk to --- -2.30.2 - + dnl The following Automake conditional is used in some Makefile.am files diff --git a/meta-oe/recipes-devtools/poke/poke_1.2.bb b/meta-oe/recipes-devtools/poke/poke_4.2.bb index af85d21705..eb840435c0 100644 --- a/meta-oe/recipes-devtools/poke/poke_1.2.bb +++ b/meta-oe/recipes-devtools/poke/poke_4.2.bb @@ -6,14 +6,12 @@ LICENSE = "GPL-3.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "${GNU_MIRROR}/poke/poke-${PV}.tar.gz \ - file://0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch \ - file://0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch \ file://0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch \ " DEPENDS = "flex-native bison-native bdwgc readline" -SRC_URI[sha256sum] = "f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62" +SRC_URI[sha256sum] = "8aaf36e61e367a53140ea40e2559e9ec512e779c42bee34e7ac24b34ba119bde" # poke does not support using out-of-tree builds inherit autotools-brokensep gettext pkgconfig @@ -29,4 +27,7 @@ EXTRA_OECONF = "--disable-gui \ PACKAGECONFIG[mi] = "--enable-mi,--disable-mi,json-c" -FILES:${PN} += "${datadir}/emacs/site-lisp" +PACKAGES =+ "${PN}-emacs ${PN}-vim" + +FILES:${PN}-emacs += "${datadir}/emacs/site-lisp" +FILES:${PN}-vim += "${datadir}/vim/vimfiles" diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch new file mode 100644 index 0000000000..896a568e19 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch @@ -0,0 +1,106 @@ +From 62b2fd0a150133b6439f6537cb1762d35f5790ee Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <xiangyu.chen@windriver.com> +Date: Fri, 31 Mar 2023 16:02:50 +0800 +Subject: [PATCH] Makefile.am: do not compile the code which was generated from + test-full.proto in protobuf-c-native + +Those code was auto generated by protoc command with test-full.proto, those code are not compatible +with protobuf 4.22.x, so temporarily disable compile those code until protobuf-c upstream adapt +the test-full.proto with latest version protobuf. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> +--- + Makefile.am | 75 ----------------------------------------------------- + 1 file changed, 75 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ff12664..7412aef 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -136,81 +136,6 @@ else + + LOG_COMPILER = $(VALGRIND) + +-check_PROGRAMS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/generated-code3/test-generated-code3 \ +- t/version/version +- +-TESTS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/generated-code3/test-generated-code3 \ +- t/version/version +- +-t_generated_code_test_generated_code_SOURCES = \ +- t/generated-code/test-generated-code.c \ +- t/test.pb-c.c +-t_generated_code_test_generated_code_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-t_generated_code2_test_generated_code2_SOURCES = \ +- t/generated-code2/test-generated-code2.c \ +- t/test-full.pb-c.c \ +- t/test-optimized.pb-c.c +-t_generated_code2_test_generated_code2_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-t_generated_code3_test_generated_code3_CPPFLAGS = \ +- -DPROTO3 +- +-t_generated_code3_test_generated_code3_SOURCES = \ +- t/generated-code/test-generated-code.c \ +- t/test-proto3.pb-c.c +- +-t_generated_code3_test_generated_code3_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-noinst_PROGRAMS += \ +- t/generated-code2/cxx-generate-packed-data +- +-t_generated_code2_cxx_generate_packed_data_SOURCES = \ +- t/generated-code2/cxx-generate-packed-data.cc \ +- t/test-full.pb.cc \ +- protobuf-c/protobuf-c.pb.cc +-$(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h +-t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ +- $(AM_CXXFLAGS) \ +- $(protobuf_CFLAGS) +-t_generated_code2_cxx_generate_packed_data_LDADD = \ +- $(protobuf_LIBS) +- +-t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto +- +-t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto +- +-t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/test-proto3.pb-c.c t/test-proto3.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-proto3.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-proto3.proto +- +-t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) +- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc +- +-BUILT_SOURCES += \ +- t/test.pb-c.c t/test.pb-c.h \ +- t/test-full.pb-c.c t/test-full.pb-c.h \ +- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ +- t/test-full.pb.cc t/test-full.pb.h \ +- t/test-proto3.pb-c.c t/test-proto3.pb-c.h \ +- t/generated-code2/test-full-cxx-output.inc +- + t_version_version_SOURCES = \ + t/version/version.c + t_version_version_LDADD = \ +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb index d724287d66..82aaf1bae6 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb @@ -8,12 +8,14 @@ has been split out into the protobuf-c-rpc project." HOMEPAGE = "https://github.com/protobuf-c/protobuf-c" SECTION = "console/tools" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d11077c6a2b5d2e64b9f32b61a9b78ba" DEPENDS = "protobuf-native protobuf" SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" -SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" +SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" + +SRCREV = "8c201f6e47a53feaab773922a743091eb6c8972a" S = "${WORKDIR}/git" @@ -34,3 +36,6 @@ RDEPENDS:${PN}-compiler = "protobuf-compiler" RDEPENDS:${PN}-dev += "${PN}-compiler" BBCLASSEXTEND = "native nativesdk" + +# No 64bit atomics +LDFLAGS:append:riscv32 = " -latomic" diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch index 8a0696edfe..9f6116c4c4 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch @@ -14,19 +14,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src/google/protobuf/port_def.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 71325c387..303475232 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc -@@ -230,7 +230,7 @@ +@@ -255,6 +255,7 @@ #error PROTOBUF_TAILCALL was previously defined #endif - #if __has_cpp_attribute(clang::musttail) && \ -- !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) -+ !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) && !defined(__mips__) - # ifndef PROTO2_OPENSOURCE - // Compilation fails on ARM32: b/195943306 - // Compilation fails on powerpc64le: b/187985113 --- -2.33.1 - + #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ ++ !defined(__mips__) && \ + !defined(_ARCH_PPC) && !defined(__wasm__) && \ + !(defined(_MSC_VER) && defined(_M_IX86)) && \ + !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch deleted file mode 100644 index 488c1f6ff9..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch +++ /dev/null @@ -1,69 +0,0 @@ -From ddb9c5147883f8b27b4205450139e4a115d9961f Mon Sep 17 00:00:00 2001 -From: Kyungjik Min <dp.min@lge.com> -Date: Mon, 28 Dec 2020 15:56:09 +0900 -Subject: [PATCH] Fix linking error with ld-gold - -:Release Notes: - -:Detailed Notes: -https://github.com/protocolbuffers/protobuf/issues/6113 -There's a bug in the CMake build leading it to not use the version -scripts, which hides the problem (because all symbols are now public) -but doesn't solve it properly. - -:Testing Performed: - -:QA Notes: -N/A - -:Issues Addressed: -[PLAT-130467] Fix build error for libgoogleassistant with latest - protobuf-3.11.4 ---- - src/libprotobuf-lite.map | 2 ++ - src/libprotobuf.map | 2 ++ - src/libprotoc.map | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotobuf-lite.map -+++ b/src/libprotobuf-lite.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; -diff --git a/src/libprotobuf.map b/src/libprotobuf.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotobuf.map -+++ b/src/libprotobuf.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; -diff --git a/src/libprotoc.map b/src/libprotoc.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotoc.map -+++ b/src/libprotoc.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch deleted file mode 100644 index a1200e01c1..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 8ff34dbff1eac612326b492d0b2cb93901ad7e2b Mon Sep 17 00:00:00 2001 -From: Jani Nurminen <jani.nurminen@windriver.com> -Date: Fri, 24 Sep 2021 09:56:11 +0200 -Subject: [PATCH] Lower init prio for extension attributes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Added PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY in -code generation for extension attributes. -It has lower prio than PROTOBUF_ATTRIBUTE_INIT_PRIORITY to -ensure that extension attributes are initialized after -other attribute. -This is needed in some applications to avoid segmentation fault. - -Reported by Karl-Herman Näslund. - -Signed-off-by: Jani Nurminen <jani.nurminen@windriver.com> - -Rebase on master - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - src/google/protobuf/compiler/cpp/cpp_extension.cc | 2 +- - src/google/protobuf/port_def.inc | 12 ++++++++++++ - src/google/protobuf/port_undef.inc | 1 + - 3 files changed, 14 insertions(+), 1 deletion(-) - -diff --git a/src/google/protobuf/compiler/cpp/cpp_extension.cc b/src/google/protobuf/compiler/cpp/cpp_extension.cc -index 8604da5f2..984345ebe 100644 ---- a/src/google/protobuf/compiler/cpp/cpp_extension.cc -+++ b/src/google/protobuf/compiler/cpp/cpp_extension.cc -@@ -164,7 +164,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) { - } - - format( -- "PROTOBUF_ATTRIBUTE_INIT_PRIORITY " -+ "PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY " - "::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n" - " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n" - " $scoped_name$($constant_name$, $1$);\n", -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 7e9119112..a5117090d 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -614,6 +614,18 @@ - #define PROTOBUF_ATTRIBUTE_INIT_PRIORITY - #endif - -+// Some embedded systems get a segmentation fault if extension attributes are -+// initialized with higher or equal priority as other attributes. This gives -+// extension attributes high priority, but lower than other attributes. -+#ifdef PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY -+#error PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY was previously defined -+#endif -+#if PROTOBUF_GNUC_MIN(3, 0) && (!defined(__APPLE__) || defined(__clang__)) && !((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))) -+#define PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY __attribute__((init_priority((103)))) -+#else -+#define PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY -+#endif -+ - #ifdef PROTOBUF_PRAGMA_INIT_SEG - #error PROTOBUF_PRAGMA_INIT_SEG was previously defined - #endif -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index ccc5daf56..2b28f3a31 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -83,6 +83,7 @@ - #undef PROTOBUF_HAVE_ATTRIBUTE_WEAK - #undef PROTOBUF_ATTRIBUTE_NO_DESTROY - #undef PROTOBUF_ATTRIBUTE_INIT_PRIORITY -+#undef PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY - #undef PROTOBUF_PRAGMA_INIT_SEG - #undef PROTOBUF_ASAN - #undef PROTOBUF_MSAN --- -2.26.2 - diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch deleted file mode 100644 index bd3a277a3d..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8515ceec5ba3e2fcdbc819b5bf10fe742d7c9d5d Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 27 Jun 2019 13:27:18 +0000 -Subject: [PATCH] Makefile.am: include descriptor.pb.cc when building - libprotoc.so - -* otherwise plugin.pb.o has undefined symbol scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto - and build with gold fails with: - core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `descriptor_table_google_2fprotobuf_2fdescriptor_2eproto' - core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto' - -Upstream-Status: Pending -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- - src/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/Makefile.am b/src/Makefile.am -index d4f11ce79..96d911746 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -323,6 +323,7 @@ libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map - EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map - endif - libprotoc_la_SOURCES = \ -+ google/protobuf/descriptor.pb.cc \ - google/protobuf/compiler/code_generator.cc \ - google/protobuf/compiler/command_line_interface.cc \ - google/protobuf/compiler/cpp/cpp_enum.cc \ diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch index 934c981938..7c4bf260eb 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch @@ -1,4 +1,4 @@ -From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001 +From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> Date: Fri, 28 Jun 2019 13:50:52 +0000 Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build @@ -24,12 +24,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build Upstream-Status: Pending Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> + --- examples/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index e9f9635ae..b2fbe2de1 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@ @@ -45,16 +46,16 @@ index e9f9635ae..b2fbe2de1 100644 add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp +- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp #$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp +- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp add_person_dart: add_person.dart protoc_middleman_dart --- -2.17.1 +-- +2.34.1 diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch deleted file mode 100644 index a2f7a4b771..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 52959e8e01e39139d18f752e97283e45b4b7a426 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Wed, 18 Jul 2018 17:52:34 +0800 -Subject: [PATCH] protobuf: fix configure error - -fix below error: -gnu-configize: 'configure.ac' or 'configure.in' is required - -third_party/googletest is git submodule of protobuf. Above error -caused by missing submodule googletest. - -Upstream-Status: Inappropriate [oe-specific] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index aec10cf..7fbe57d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -214,7 +214,6 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) - # too. - export CFLAGS - export CXXFLAGS --AC_CONFIG_SUBDIRS([third_party/googletest]) - - AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) - AC_OUTPUT --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.4.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb index 5662330840..d5fd901370 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.4.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb @@ -7,30 +7,37 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" -DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "22d0e265de7d2b3d2e9a00d071313502e7d4cccf" +SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.19.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ file://run-ptest \ - file://0001-protobuf-fix-configure-error.patch \ - file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ - file://0001-Fix-linking-error-with-ld-gold.patch \ - file://0001-Lower-init-prio-for-extension-attributes.patch \ " SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.(25\.(\d+)))" + S = "${WORKDIR}/git" -inherit autotools-brokensep pkgconfig ptest +inherit cmake pkgconfig ptest PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ?= "compiler" +PACKAGECONFIG:class-nativesdk ?= "compiler" PACKAGECONFIG[python] = ",," +PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" -EXTRA_OECONF += "--with-protoc=echo" +EXTRA_OECMAKE += "\ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dprotobuf_BUILD_LIBPROTOC=ON \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ +" TEST_SRC_DIR = "examples" LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" @@ -41,9 +48,24 @@ do_compile_ptest() { # Add the location of the cross-compiled header and library files # which haven't been installed yet. cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc" + cp ${S}/${TEST_SRC_DIR}/*.cc "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/*.proto "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/*.py "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" + # Adapt protobuf.pc sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${S}/src |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + # Adapt uf8_range.pc + cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" + # Until out-of-tree build of examples is supported, we have to use this approach + sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" # Save the pkgcfg sysroot variable, and update it to nothing so @@ -55,7 +77,7 @@ do_compile_ptest() { # Compile the tests for lang in ${LANG_SUPPORT}; do - oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang} + oe_runmake -C "${B}/${TEST_SRC_DIR}" ${lang} done # Restore the pkgconfig sysroot variable @@ -72,7 +94,7 @@ do_install_ptest() { install "$i" "${D}/${PTEST_PATH}" fi done - cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" + cp "${B}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" cd "$olddir" } @@ -81,9 +103,14 @@ PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" +# CMake requires protoc binary to exist in sysroot, even if it has wrong architecture. +SYSROOT_DIRS += "${bindir}" + +RDEPENDS:${PN} = "abseil-cpp" +RDEPENDS:${PN}-lite = "abseil-cpp" RDEPENDS:${PN}-compiler = "${PN}" RDEPENDS:${PN}-dev += "${PN}-compiler" -RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}" +RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" MIPS_INSTRUCTION_SET = "mips" @@ -93,3 +120,4 @@ LDFLAGS:append:arm = " -latomic" LDFLAGS:append:mips = " -latomic" LDFLAGS:append:powerpc = " -latomic" LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" diff --git a/meta-oe/recipes-devtools/pugixml/pugixml_1.12.bb b/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb index b09c46a66b..19207883bf 100644 --- a/meta-oe/recipes-devtools/pugixml/pugixml_1.12.bb +++ b/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb @@ -7,12 +7,13 @@ data-driven tree queries." HOMEPAGE = "https://pugixml.org/" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://readme.txt;beginline=29;endline=52;md5=d11b640daff611273752ec136394347c" +LIC_FILES_CHKSUM = "file://readme.txt;beginline=29;endline=52;md5=ad370df61d83846cf9e4726244671201" SRC_URI = "https://github.com/zeux/${BPN}/releases/download/v${PV}/${BP}.tar.gz" -SRC_URI[sha256sum] = "fd6922a4448ec2f3eb9db415d10a49660e5d84ce20ce66b8a07e72ffc84270a7" +SRC_URI[sha256sum] = "2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015" UPSTREAM_CHECK_URI = "https://github.com/zeux/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)" inherit cmake diff --git a/meta-oe/recipes-devtools/python/python3-apscheduler_3.10.4.bb b/meta-oe/recipes-devtools/python/python3-apscheduler_3.10.4.bb new file mode 100644 index 0000000000..01ffa25ac6 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-apscheduler_3.10.4.bb @@ -0,0 +1,13 @@ +SUMMARY = "Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically." +HOMEPAGE = "https://github.com/agronholm/apscheduler" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f0e423eea5c91e7aa21bdb70184b3e53" + +SRC_URI[sha256sum] = "e6df071b27d9be898e486bc7940a7be50b4af2e9da7c08f0744a96d4bd4cef4a" + +PYPI_PACKAGE = "APScheduler" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-setuptools-scm-native" diff --git a/meta-oe/recipes-devtools/python/python3-apt_2.3.0.bb b/meta-oe/recipes-devtools/python/python3-apt_2.5.3.bb index ec1539b442..1d54b9f6af 100644 --- a/meta-oe/recipes-devtools/python/python3-apt_2.3.0.bb +++ b/meta-oe/recipes-devtools/python/python3-apt_2.5.3.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3 \ SRC_URI = "git://salsa.debian.org/apt-team/python-apt.git;protocol=https;branch=main" -SRCREV = "6145b6484d220685edfd922d364afbf065127efe" +SRCREV = "3252935b6224b3bd2e2250894b9559b47c61b2e1" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb b/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb index e129c18d63..a98dfab6d9 100644 --- a/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb +++ b/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb @@ -10,8 +10,6 @@ SRC_URI[sha256sum] = "723f24f4d65fc8d99b33a002fbbb3771d4cc9d664c97085bf37f3997ae inherit setuptools3 -PIP_INSTALL_PACKAGE = "python_distutils_extra" - S = "${WORKDIR}/python-distutils-extra-${PV}" BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/python/python3-pefile/run-ptest b/meta-oe/recipes-devtools/python/python3-pefile/run-ptest new file mode 100644 index 0000000000..95ae72306f --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-pefile/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake --ignore=./tests/pefile_test.py diff --git a/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb b/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb new file mode 100644 index 0000000000..87e651d9d5 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb @@ -0,0 +1,28 @@ +SUMMARY = "Python PE parsing module" +DESCRIPTION = "A multi-platform Python module to parse and work with Portable Executable (PE) files." +HOMEPAGE = "https://github.com/erocarrera/pefile" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e34c75178086aca0a17551ffbacaca53" + +inherit setuptools3 ptest +SRCREV = "4b3b1e2e568a88d4f1897d694d684f23d9e270c4" +SRC_URI = "git://github.com/erocarrera/pefile;branch=master;protocol=https \ + file://run-ptest" +S = "${WORKDIR}/git" + +BBCLASSEXTEND = "native nativesdk" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-mmap \ + python3-netclient \ + python3-stringold \ +" +RDEPENDS:${PN}-ptest += "\ + python3-pytest \ + python3-unittest-automake-output \ +" diff --git a/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb b/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb new file mode 100644 index 0000000000..f92c556005 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb @@ -0,0 +1,14 @@ +SUMMARY = "Psycopg 3 is the implementation of a PostgreSQL adapter for Python." +DESCRIPTION = "Psycopg is the most popular PostgreSQL adapter for the Python \ +programming language. Its core is a complete implementation of the Python DB \ +API 2.0 specifications. Several extensions allow access to many of the \ +features offered by PostgreSQL." + +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000208d539ec061b899bce1d9ce9404" + +SRC_URI[sha256sum] = "8bad2e497ce22d556dac1464738cb948f8d6bab450d965cf1d8a8effd52412e0" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "libpq" diff --git a/meta-oe/recipes-devtools/python/python3-pycups_2.0.1.bb b/meta-oe/recipes-devtools/python/python3-pycups_2.0.4.bb index 1508273009..b7071fa4ff 100644 --- a/meta-oe/recipes-devtools/python/python3-pycups_2.0.1.bb +++ b/meta-oe/recipes-devtools/python/python3-pycups_2.0.4.bb @@ -14,6 +14,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS += "cups" # See https://pypi.org/project/pycups/ for data -SRC_URI[sha256sum] = "57434ce5f62548eb12949ca8217f066f4eeb21a5d6ab8b13471dce350e380c90" +SRC_URI[sha256sum] = "843e385c1dbf694996ca84ef02a7f30c28376035588f5fbeacd6bae005cf7c8d" inherit pypi python_setuptools_build_meta diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb index b6ff62b91c..8519479c4d 100644 --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb @@ -4,11 +4,11 @@ SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125" -SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1;protocol=https" +SRC_URI = "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https" SRCREV = "0ccdbf364c577803e2a751f5aededce935314313" -PV = "1.1.0+git${SRCPV}" +PV = "1.1.0+git" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb b/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb new file mode 100644 index 0000000000..1b064faf16 --- /dev/null +++ b/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb @@ -0,0 +1,12 @@ +SUMMARY = "sexpect is another implementation of Expect which is specifically designed for Shell scripts" +HOMEPAGE = "https://github.com/clarkwang/sexpect" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" + +BRANCH = "master" +SRC_URI = "git://github.com/clarkwang/sexpect;branch=${BRANCH};protocol=https" +SRCREV = "532a52d36aae442b7fe1ce20a59effd1dbc6e6fe" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb b/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb deleted file mode 100644 index d6335585e2..0000000000 --- a/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "SIP is a C++/Python Wrapper Generator" -HOMEPAGE = "https://riverbankcomputing.com/software/sip/" -SECTION = "devel" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303" - -SRC_URI = "https://www.riverbankcomputing.com/static/Downloads/sip/${PV}/sip-${PV}.tar.gz \ -" -SRC_URI[md5sum] = "70adc0c9734e2d9dcd241d3f931dfc74" -SRC_URI[sha256sum] = "22ca9bcec5388114e40d4aafd7ccd0c4fe072297b628d0c5cdfa2f010c0bc7e7" - -inherit python3-dir python3native - -S = "${WORKDIR}/sip-${PV}" - -DEPENDS = "python3" - -PACKAGES += "python3-sip3" - -BBCLASSEXTEND = "native" - -CONFIGURE_SYSROOT = "${STAGING_DIR_HOST}" -CONFIGURE_SYSROOT:class-native = "${STAGING_DIR_NATIVE}" - -do_configure:prepend() { - echo "py_platform = linux" > sip.cfg - echo "py_inc_dir = ${STAGING_INCDIR}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg - echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg - echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg - echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg - echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg - ${PYTHON} configure.py --configuration sip.cfg --sip-module PyQt5.sip --sysroot ${CONFIGURE_SYSROOT} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}" -} - -do_install() { - oe_runmake install -} - -FILES:python3-sip3 = "${libdir}/${PYTHON_DIR}/site-packages/" -FILES:${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug" diff --git a/meta-oe/recipes-devtools/sip/sip_6.8.3.bb b/meta-oe/recipes-devtools/sip/sip_6.8.3.bb new file mode 100644 index 0000000000..d12130af43 --- /dev/null +++ b/meta-oe/recipes-devtools/sip/sip_6.8.3.bb @@ -0,0 +1,24 @@ +# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "A Python bindings generator for C/C++ libraries" + +HOMEPAGE = "https://www.riverbankcomputing.com/software/sip/" +LICENSE = "GPL-2.0-or-later" +SECTION = "devel" +LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303" + +inherit pypi setuptools3 python3native + +PYPI_PACKAGE = "sip" +SRC_URI[sha256sum] = "888547b018bb24c36aded519e93d3e513d4c6aa0ba55b7cc1affbd45cf10762c" + +RDEPENDS:${PN} = " \ + python3-core \ + python3-packaging \ + python3-logging \ + python3-tomllib \ + python3-setuptools \ +" + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/smemstat/smemstat_0.02.13.bb b/meta-oe/recipes-devtools/smemstat/smemstat_0.02.13.bb new file mode 100644 index 0000000000..bf5c52fe50 --- /dev/null +++ b/meta-oe/recipes-devtools/smemstat/smemstat_0.02.13.bb @@ -0,0 +1,22 @@ +SUMMARY = "smemstat reports the physical memory usage taking into consideration shared memory" +HOMEPAGE = "https://github.com/ColinIanKing/smemstat" +LICENSE = "GPL-2.0-or-later" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "ncurses" + +SRC_URI = "git://github.com/ColinIanKing/smemstat.git;protocol=https;branch=master" +SRCREV = "1edc560602aa116b96408110b8b9d66a4edef60e" + +S = "${WORKDIR}/git" + +inherit bash-completion + +do_compile () { + oe_runmake smemstat +} + +do_install () { + oe_runmake DESTDIR=${D} install +} diff --git a/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb b/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb index c57324d89c..a542396d46 100644 --- a/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.1.4.bb +++ b/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb @@ -1,19 +1,18 @@ 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 \ +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/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" +SRCREV = "8f9966c8ea3ea8a854941d041e7fcb9eb4f772fb" +SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=fixes-1.3.0" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/ssd1306/ssd1306_git.bb b/meta-oe/recipes-devtools/ssd1306/ssd1306_git.bb new file mode 100644 index 0000000000..f9e3679590 --- /dev/null +++ b/meta-oe/recipes-devtools/ssd1306/ssd1306_git.bb @@ -0,0 +1,24 @@ +SUMMARY="SSD1306 OLED I2C drive" +DESCRIPTION = "SSD1306 OLED I2C driver working in Linux" +HOMEPAGE = "https://github.com/armlabs/ssd1306_linux" +SECTION = "console/utils" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=7b694e603a996c3bfdc6093ed1f70c8f" + +SRC_URI = " \ + git://github.com/armlabs/ssd1306_linux.git;protocol=https;branch=master \ +" +SRCREV = "34b42992a43fda69c6ba2557b718601cafe16251" + +S = "${WORKDIR}/git" + +# coreutils provides fmt which is used in the Makefile +DEPENDS = "i2c-tools coreutils-native" + +EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/ssd1306_bin ${D}${bindir} +} diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch index c955b5fa7d..47865de858 100644 --- a/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch @@ -8,6 +8,8 @@ build process, instead of overwriting them. This is useful in a cross compile context where the CXXFLAGS variable might contain necessary flags for cross compiling. --- +Upstream-Status: Pending + Mongoose/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch index 190eaf164d..d80c1a7362 100644 --- a/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch @@ -4,6 +4,8 @@ Date: Wed, 21 Oct 2020 15:26:52 -0600 Subject: [PATCH] Preserve links when installing libmetis --- +Upstream-Status: Pending + Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch index dee6039a81..fc83897a05 100644 --- a/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch @@ -4,6 +4,8 @@ Date: Wed, 21 Oct 2020 15:27:07 -0600 Subject: [PATCH] Add version information to libmetis --- +Upstream-Status: Pending + metis-5.1.0/Makefile | 8 ++++---- metis-5.1.0/libmetis/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb index 38e34b93c6..13e6fd066c 100644 --- a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb @@ -1,6 +1,6 @@ LICENSE = "GPL-2.0-only & GPL-3.0-only & BSD-3-Clause & LGPL-2.0-only & Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5fa987762101f748a6cdd951b64ffc6b" -SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branch=master \ +SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branch=stable \ file://0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch \ file://0002-Preserve-links-when-installing-libmetis.patch \ file://0003-Add-version-information-to-libmetis.patch \ @@ -19,14 +19,14 @@ RPROVIDES:${PN} = "mongoose graphblas" # the command line. To get around this problem, set these variables to only the # program name and prepend the rest of the value onto the corresponding FLAGS # variable. -CFLAGS:prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} " -export CC := "${@d.getVar('CC', True).split()[0]}" +CFLAGS:prepend := "${@" ".join(d.getVar('CC').split()[1:])} " +export CC := "${@d.getVar('CC').split()[0]}" -CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} " -export CXX := "${@d.getVar('CXX', True).split()[0]}" +CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} " +export CXX := "${@d.getVar('CXX').split()[0]}" -LDFLAGS:prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} " -export LD := "${@d.getVar('LD', True).split()[0]}" +LDFLAGS:prepend := "${@" ".join(d.getVar('LD').split()[1:])} " +export LD := "${@d.getVar('LD').split()[0]}" export CMAKE_OPTIONS = " \ -DCMAKE_INSTALL_PREFIX=${D}${prefix} \ diff --git a/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb new file mode 100644 index 0000000000..3360ccf357 --- /dev/null +++ b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb @@ -0,0 +1,16 @@ +SUMMARY = "Wrapper for enabling systemd services" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit nativesdk + +SRC_URI = "file://systemctl" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${UNPACKDIR}/systemctl ${D}${bindir} +} diff --git a/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl new file mode 100755 index 0000000000..07d24fd175 --- /dev/null +++ b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl @@ -0,0 +1,340 @@ +#!/usr/bin/env python3 +"""systemctl: subset of systemctl used for image construction + +Mask/preset systemd units +""" + +import argparse +import fnmatch +import os +import re +import sys + +from collections import namedtuple +from pathlib import Path + +version = 1.0 + +ROOT = Path("/") +SYSCONFDIR = Path("etc") +BASE_LIBDIR = Path("lib") +LIBDIR = Path("usr", "lib") + +locations = list() + + +class SystemdFile(): + """Class representing a single systemd configuration file""" + def __init__(self, root, path): + self.sections = dict() + self._parse(root, path) + dirname = os.path.basename(path.name) + ".d" + for location in locations: + for path2 in sorted((root / location / "system" / dirname).glob("*.conf")): + self._parse(root, path2) + + def _parse(self, root, path): + """Parse a systemd syntax configuration file + + Args: + path: A pathlib.Path object pointing to the file + + """ + skip_re = re.compile(r"^\s*([#;]|$)") + section_re = re.compile(r"^\s*\[(?P<section>.*)\]") + kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)") + section = None + + if path.is_symlink(): + try: + path.resolve() + except FileNotFoundError: + # broken symlink, try relative to root + path = root / Path(os.readlink(str(path))).relative_to(ROOT) + + with path.open() as f: + for line in f: + if skip_re.match(line): + continue + + line = line.strip() + m = section_re.match(line) + if m: + if m.group('section') not in self.sections: + section = dict() + self.sections[m.group('section')] = section + else: + section = self.sections[m.group('section')] + continue + + while line.endswith("\\"): + line += f.readline().rstrip("\n") + + m = kv_re.match(line) + k = m.group('key') + v = m.group('value') + if k not in section: + section[k] = list() + section[k].extend(v.split()) + + def get(self, section, prop): + """Get a property from section + + Args: + section: Section to retrieve property from + prop: Property to retrieve + + Returns: + List representing all properties of type prop in section. + + Raises: + KeyError: if ``section`` or ``prop`` not found + """ + return self.sections[section][prop] + + +class Presets(): + """Class representing all systemd presets""" + def __init__(self, scope, root): + self.directives = list() + self._collect_presets(scope, root) + + def _parse_presets(self, presets): + """Parse presets out of a set of preset files""" + skip_re = re.compile(r"^\s*([#;]|$)") + directive_re = re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))") + + Directive = namedtuple("Directive", "action unit_name") + for preset in presets: + with preset.open() as f: + for line in f: + m = directive_re.match(line) + if m: + directive = Directive(action=m.group('action'), + unit_name=m.group('unit_name')) + self.directives.append(directive) + elif skip_re.match(line): + pass + else: + sys.exit("Unparsed preset line in {}".format(preset)) + + def _collect_presets(self, scope, root): + """Collect list of preset files""" + presets = dict() + for location in locations: + paths = (root / location / scope).glob("*.preset") + for path in paths: + # earlier names override later ones + if path.name not in presets: + presets[path.name] = path + + self._parse_presets([v for k, v in sorted(presets.items())]) + + def state(self, unit_name): + """Return state of preset for unit_name + + Args: + presets: set of presets + unit_name: name of the unit + + Returns: + None: no matching preset + `enable`: unit_name is enabled + `disable`: unit_name is disabled + """ + for directive in self.directives: + if fnmatch.fnmatch(unit_name, directive.unit_name): + return directive.action + + return None + + +def add_link(path, target): + try: + path.parent.mkdir(parents=True) + except FileExistsError: + pass + if not path.is_symlink(): + print("ln -s {} {}".format(target, path)) + path.symlink_to(target) + + +class SystemdUnitNotFoundError(Exception): + def __init__(self, path, unit): + self.path = path + self.unit = unit + + +class SystemdUnit(): + def __init__(self, root, unit): + self.root = root + self.unit = unit + self.config = None + + def _path_for_unit(self, unit): + for location in locations: + path = self.root / location / "system" / unit + if path.exists() or path.is_symlink(): + return path + + raise SystemdUnitNotFoundError(self.root, unit) + + def _process_deps(self, config, service, location, prop, dirstem): + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + + target = ROOT / location.relative_to(self.root) + try: + for dependent in config.get('Install', prop): + wants = systemdir / "{}.{}".format(dependent, dirstem) / service + add_link(wants, target) + + except KeyError: + pass + + def enable(self, caller_unit=None): + # if we're enabling an instance, first extract the actual instance + # then figure out what the template unit is + template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) + if template: + instance = template.group('instance') + unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1) + else: + instance = None + unit = self.unit + + path = self._path_for_unit(unit) + + if path.is_symlink(): + # ignore aliases + return + + config = SystemdFile(self.root, path) + if instance == "": + try: + default_instance = config.get('Install', 'DefaultInstance')[0] + except KeyError: + # no default instance, so nothing to enable + return + + service = self.unit.replace("@.", + "@{}.".format(default_instance)) + else: + service = self.unit + + self._process_deps(config, service, path, 'WantedBy', 'wants') + self._process_deps(config, service, path, 'RequiredBy', 'requires') + + try: + for also in config.get('Install', 'Also'): + try: + if caller_unit != also: + SystemdUnit(self.root, also).enable(unit) + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) + + except KeyError: + pass + + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + target = ROOT / path.relative_to(self.root) + try: + for dest in config.get('Install', 'Alias'): + alias = systemdir / dest + add_link(alias, target) + + except KeyError: + pass + + def mask(self): + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + add_link(systemdir / self.unit, "/dev/null") + + +def collect_services(root): + """Collect list of service files""" + services = set() + for location in locations: + paths = (root / location / "system").glob("*") + for path in paths: + if path.is_dir(): + continue + services.add(path.name) + + return services + + +def preset_all(root): + presets = Presets('system-preset', root) + services = collect_services(root) + + for service in services: + state = presets.state(service) + + if state == "enable" or state is None: + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError: + sys.exit("Error: Systemctl preset_all issue in %s" % service) + + # If we populate the systemd links we also create /etc/machine-id, which + # allows systemd to boot with the filesystem read-only before generating + # a real value and then committing it back. + # + # For the stateless configuration, where /etc is generated at runtime + # (for example on a tmpfs), this script shouldn't run at all and we + # allow systemd to completely populate /etc. + (root / SYSCONFDIR / "machine-id").touch() + + +def main(): + if sys.version_info < (3, 4, 0): + sys.exit("Python 3.4 or greater is required") + + parser = argparse.ArgumentParser() + parser.add_argument('command', nargs='?', choices=['enable', 'mask', + 'preset-all']) + parser.add_argument('service', nargs=argparse.REMAINDER) + parser.add_argument('--root') + parser.add_argument('--preset-mode', + choices=['full', 'enable-only', 'disable-only'], + default='full') + + args = parser.parse_args() + + root = Path(args.root) if args.root else ROOT + + locations.append(SYSCONFDIR / "systemd") + # Handle the usrmerge case by ignoring /lib when it's a symlink + if not (root / BASE_LIBDIR).is_symlink(): + locations.append(BASE_LIBDIR / "systemd") + locations.append(LIBDIR / "systemd") + + command = args.command + if not command: + parser.print_help() + return 0 + + if command == "mask": + for service in args.service: + try: + SystemdUnit(root, service).mask() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main mask issue in %s (%s)" % (service, e.unit)) + elif command == "enable": + for service in args.service: + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main enable issue in %s (%s)" % (service, e.unit)) + elif command == "preset-all": + if len(args.service) != 0: + sys.exit("Too many arguments.") + if args.preset_mode != "enable-only": + sys.exit("Only enable-only is supported as preset-mode.") + preset_all(root) + else: + raise RuntimeError() + + +if __name__ == '__main__': + main() diff --git a/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff b/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff index 229acf3e7a..e13bf69b23 100644 --- a/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff +++ b/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff @@ -8,6 +8,8 @@ and tkConfig.sh in /usr/share/tcltk/tk8.5 where they are located in Debian installation. --- +Upstream-Status: Pending + unix/configure | 1 + unix/tcl.m4 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff b/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff index 4aa5d6b894..fdf3c66535 100644 --- a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff +++ b/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- /tmp/configure.in 2010-05-19 13:29:03.000000000 +0200 +++ unix/configure.in 2010-05-19 13:42:05.000000000 +0200 @@ -526,13 +526,9 @@ diff --git a/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff b/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff index 4e15469736..62467af1d5 100644 --- a/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff +++ b/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Patch by Chris Waters sets path which are normally point to a directory with Tk sources to a subdirectory of /usr/include/tcl8.4 (debian/rules puts private Tk headers there). diff --git a/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb b/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb index efab9618ec..7159e74c2a 100644 --- a/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb +++ b/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb @@ -26,15 +26,20 @@ SRC_URI = "\ SRC_URI[md5sum] = "602a47ad9ecac7bf655ada729d140a94" SRC_URI[sha256sum] = "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/tcl/files/Tcl/" +UPSTREAM_CHECK_REGEX = "Tcl/(?P<pver>\d+(\.\d+)+)/" + S = "${WORKDIR}/${BPN}${PV}/unix" +DEBUG_PREFIX_MAP += "-fdebug-prefix-map=${S}/../=${TARGET_DBGSRC_DIR}/.." + PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/${BPN}${PV}" # Short version format: "8.6" VER = "${@os.path.splitext(d.getVar('PV'))[0]}" LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib" -inherit autotools features_check +inherit autotools features_check pkgconfig # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta-oe/recipes-devtools/uftrace/uftrace/0001-include-libgen.h-for-basename.patch b/meta-oe/recipes-devtools/uftrace/uftrace/0001-include-libgen.h-for-basename.patch new file mode 100644 index 0000000000..4844003517 --- /dev/null +++ b/meta-oe/recipes-devtools/uftrace/uftrace/0001-include-libgen.h-for-basename.patch @@ -0,0 +1,34 @@ +From 8e4e5479cee153db7315d5134663fa87082b39fc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 25 Mar 2024 17:46:24 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/namhyung/uftrace/pull/1909] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/utils.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/utils/utils.h b/utils/utils.h +index 69a6072b..60265431 100644 +--- a/utils/utils.h ++++ b/utils/utils.h +@@ -11,6 +11,9 @@ + + #include <ctype.h> + #include <endian.h> ++#ifndef __GLIBC__ ++#include <libgen.h> ++#endif + #include <limits.h> + #include <signal.h> + #include <stdbool.h> +-- +2.44.0 + diff --git a/meta-oe/recipes-devtools/uftrace/uftrace_0.12.bb b/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb index 111e948669..320b5a88a6 100644 --- a/meta-oe/recipes-devtools/uftrace/uftrace_0.12.bb +++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb @@ -1,4 +1,4 @@ -SUMMARY = "Trace and analyze execution of a program written in C/C++" +SUMMARY = "Trace and analyze execution of a program written in C/C++, Rust and Python" HOMEPAGE = "https://github.com/namhyung/uftrace" BUGTRACKER = "https://github.com/namhyung/uftrace/issues" SECTION = "devel" @@ -10,9 +10,9 @@ DEPENDS:append:libc-musl = " argp-standalone" inherit autotools -SRCREV = "46d536709451609e5e99099216d9dcf567ceeaca" +SRCREV = "68aed9b0a20d3d1b5e1dc15e0f8aabba7e34735b" SRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https \ - " + file://0001-include-libgen.h-for-basename.patch" S = "${WORKDIR}/git" LDFLAGS:append:libc-musl = " -largp" @@ -37,7 +37,7 @@ do_configure() { FILES_SOLIBSDEV = "" FILES:${PN} += "${libdir}/*.so" -COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm)" +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|riscv64)" # uftrace supports armv6 and above COMPATIBLE_HOST:armv4 = 'null' diff --git a/meta-oe/recipes-devtools/unifex/unifex_git.bb b/meta-oe/recipes-devtools/unifex/unifex_git.bb deleted file mode 100644 index 85fe39b6de..0000000000 --- a/meta-oe/recipes-devtools/unifex/unifex_git.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "C++ Unified Executors library" -HOMEPAGE = "https://github.com/facebookexperimental/libunifex" -SECTION = "libs" -LICENSE = "Apache-2.0-with-LLVM-exception" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5b86506074cb3cdc493b4f96b73b2909" - -SRC_URI = "git://github.com/facebookexperimental/libunifex.git;branch=main;protocol=https" -SRCREV = "9df21c58d34ce8a1cd3b15c3a7347495e29417a0" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -PACKAGECONFIG ??= "liburing" -PACKAGECONFIG[liburing] = ",,liburing" - -EXTRA_OECMAKE += " \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF \ - -DCMAKE_CXX_STANDARD=20 \ - -DUNIFEX_BUILD_EXAMPLES=OFF \ - " - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Define-prototype-for-safe_flock.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Define-prototype-for-safe_flock.patch new file mode 100644 index 0000000000..11f1c18d4d --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Define-prototype-for-safe_flock.patch @@ -0,0 +1,105 @@ +From c512c877a7ca933bee980dcc1268a7319f233d59 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 00:07:47 -0700 +Subject: [PATCH] Define prototype for safe_flock + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/osdep/unix/env_unix.c | 3 +++ + src/osdep/unix/mbx.c | 2 ++ + src/osdep/unix/os_lnx.h | 2 ++ + src/osdep/unix/os_slx.h | 3 +++ + src/osdep/unix/unix.c | 4 ++++ + 5 files changed, 14 insertions(+) + +diff --git a/src/osdep/unix/env_unix.c b/src/osdep/unix/env_unix.c +index 6b2c447..cefefca 100644 +--- a/src/osdep/unix/env_unix.c ++++ b/src/osdep/unix/env_unix.c +@@ -59,6 +59,9 @@ + #define S_IXOTH (S_IEXEC >> 6) + #endif + ++ ++extern int safe_flock (int fd,int op); ++ + /* c-client environment parameters */ + + static char *myUserName = NIL; /* user name */ +diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c +index 1ece5d8..c8a45a5 100644 +--- a/src/osdep/unix/mbx.c ++++ b/src/osdep/unix/mbx.c +@@ -41,12 +41,14 @@ extern int errno; /* just in case */ + #include "mail.h" + #include "osdep.h" + #include <pwd.h> ++#include <utime.h> + #include <sys/stat.h> + #include <sys/time.h> + #include "misc.h" + #include "dummy.h" + #include "fdstring.h" + ++extern int safe_flock (int fd,int op); + + /* Build parameters */ + +diff --git a/src/osdep/unix/os_lnx.h b/src/osdep/unix/os_lnx.h +index b5f39ff..22c216b 100644 +--- a/src/osdep/unix/os_lnx.h ++++ b/src/osdep/unix/os_lnx.h +@@ -57,6 +57,8 @@ + + #define direct dirent + ++extern int safe_flock (int fd,int op); ++ + #define flock safe_flock + + +diff --git a/src/osdep/unix/os_slx.h b/src/osdep/unix/os_slx.h +index b5f39ff..c9adbcd 100644 +--- a/src/osdep/unix/os_slx.h ++++ b/src/osdep/unix/os_slx.h +@@ -46,11 +46,14 @@ + #include <sys/types.h> + #include <dirent.h> + #include <time.h> /* for struct tm */ ++#include <utime.h> /* for struct tm */ + #include <fcntl.h> + #include <syslog.h> + #include <sys/file.h> + + ++extern int safe_flock (int fd,int op); ++ + /* Linux gets this wrong */ + + #define setpgrp setpgid +diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c +index be3c437..86be3f9 100644 +--- a/src/osdep/unix/unix.c ++++ b/src/osdep/unix/unix.c +@@ -45,6 +45,7 @@ extern int errno; /* just in case */ + #include "mail.h" + #include "osdep.h" + #include <time.h> ++#include <utime.h> + #include <sys/stat.h> + #include "unix.h" + #include "pseudo.h" +@@ -52,6 +53,9 @@ extern int errno; /* just in case */ + #include "misc.h" + #include "dummy.h" + ++ ++extern int safe_flock (int fd,int op); ++ + /* UNIX I/O stream local data */ + + typedef struct unix_local { +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Do-not-build-mtest.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Do-not-build-mtest.patch new file mode 100644 index 0000000000..fd2f30cd14 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Do-not-build-mtest.patch @@ -0,0 +1,38 @@ +From f92becaf97be16a28013693cd99bac92c54074f2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 7 Sep 2022 13:54:58 -0700 +Subject: [PATCH 1/2] Do not build mtest + +its a test utility which is not generally used. We need to disable it +because it uses gets() function which is not available in glibc, if we +want to use it then port it to use something like fgets + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index cf6d405..1e2d0fb 100644 +--- a/Makefile ++++ b/Makefile +@@ -669,7 +669,6 @@ an ua: + $(TOOLS)/$@ "$(LN)" src/ansilib c-client + $(TOOLS)/$@ "$(LN)" src/charset c-client + $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client +- $(TOOLS)/$@ "$(LN)" src/mtest mtest + $(TOOLS)/$@ "$(LN)" src/ipopd ipopd + $(TOOLS)/$@ "$(LN)" src/imapd imapd + $(TOOLS)/$@ "$(LN)" src/mailutil mailutil +@@ -706,7 +705,6 @@ rebuildclean: + + bundled: + @echo Building bundled tools... +- $(CD) mtest;$(MAKE) + $(CD) ipopd;$(MAKE) + $(CD) imapd;$(MAKE) + $(CD) mailutil;$(MAKE) +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Fix-Wincompatible-function-pointer-types.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Fix-Wincompatible-function-pointer-types.patch new file mode 100644 index 0000000000..428ee91031 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Fix-Wincompatible-function-pointer-types.patch @@ -0,0 +1,178 @@ +From 3170b245aba99694390c3c87d326639b6685d4dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Jan 2023 14:34:05 -0800 +Subject: [PATCH] Fix -Wincompatible-function-pointer-types + +Fixes new found errors with clang 16 + +news.c:370:36: error: incompatible function pointer types passing 'int (struct dirent *)' to parameter of type 'int (*)(const struct dirent *)' [-Wincompatible-function-pointer-types] + if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) { + ^~~~~~~~~~~ +/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/uw-imap/2007f-r0/recipe-sysroot/usr/include/dirent.h:259:13: note: passing argument to parameter '__selector' here + int (*__selector) (const struct dirent *), + ^ +news.c:370:48: error: incompatible function pointer types passing 'int (const void *, const void *)' to parameter of type 'int (*)(const struct dirent **, const struct dirent **)' [-Wincompatible-function-pointer-types] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/osdep/unix/mh.c | 8 ++++---- + src/osdep/unix/mix.c | 12 ++++++------ + src/osdep/unix/mx.c | 8 ++++---- + src/osdep/unix/news.c | 8 ++++---- + 4 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c +index 0226b7a..9264624 100644 +--- a/src/osdep/unix/mh.c ++++ b/src/osdep/unix/mh.c +@@ -103,8 +103,8 @@ long mh_copy (MAILSTREAM *stream,char *sequence,char *mailbox, + long options); + long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data); + +-int mh_select (struct direct *name); +-int mh_numsort (const void *d1,const void *d2); ++int mh_select (const struct direct *name); ++int mh_numsort (const struct dirent **d1,const struct dirent **d2); + char *mh_file (char *dst,char *name); + long mh_canonicalize (char *pattern,char *ref,char *pat); + void mh_setdate (char *file,MESSAGECACHE *elt); +@@ -1194,7 +1194,7 @@ long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + * Returns: T to use file name, NIL to skip it + */ + +-int mh_select (struct direct *name) ++int mh_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -1209,7 +1209,7 @@ int mh_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int mh_numsort (const void *d1,const void *d2) ++int mh_numsort (const struct dirent **d1,const struct dirent **d2) + { + return atoi ((*(struct direct **) d1)->d_name) - + atoi ((*(struct direct **) d2)->d_name); +diff --git a/src/osdep/unix/mix.c b/src/osdep/unix/mix.c +index fbf4a02..c2207f6 100644 +--- a/src/osdep/unix/mix.c ++++ b/src/osdep/unix/mix.c +@@ -125,7 +125,7 @@ long mix_unsubscribe (MAILSTREAM *stream,char *mailbox); + long mix_create (MAILSTREAM *stream,char *mailbox); + long mix_delete (MAILSTREAM *stream,char *mailbox); + long mix_rename (MAILSTREAM *stream,char *old,char *newname); +-int mix_rselect (struct direct *name); ++int mix_rselect (const struct direct *name); + MAILSTREAM *mix_open (MAILSTREAM *stream); + void mix_close (MAILSTREAM *stream,long options); + void mix_abort (MAILSTREAM *stream); +@@ -140,8 +140,8 @@ THREADNODE *mix_thread (MAILSTREAM *stream,char *type,char *charset, + long mix_ping (MAILSTREAM *stream); + void mix_check (MAILSTREAM *stream); + long mix_expunge (MAILSTREAM *stream,char *sequence,long options); +-int mix_select (struct direct *name); +-int mix_msgfsort (const void *d1,const void *d2); ++int mix_select (const struct direct *name); ++int mix_msgfsort (const struct dirent **d1,const struct dirent **d2); + long mix_addset (SEARCHSET **set,unsigned long start,unsigned long size); + long mix_burp (MAILSTREAM *stream,MIXBURP *burp,unsigned long *reclaimed); + long mix_burp_check (SEARCHSET *set,size_t size,char *file); +@@ -587,7 +587,7 @@ long mix_rename (MAILSTREAM *stream,char *old,char *newname) + * Returns: T if mix file name, NIL otherwise + */ + +-int mix_rselect (struct direct *name) ++int mix_rselect (const struct direct *name) + { + return mix_dirfmttest (name->d_name); + } +@@ -1146,7 +1146,7 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,long options) + * ".mix" with no suffix was used by experimental versions + */ + +-int mix_select (struct direct *name) ++int mix_select (const struct direct *name) + { + char c,*s; + /* make sure name has prefix */ +@@ -1165,7 +1165,7 @@ int mix_select (struct direct *name) + * Returns: -1 if d1 < d2, 0 if d1 == d2, 1 d1 > d2 + */ + +-int mix_msgfsort (const void *d1,const void *d2) ++int mix_msgfsort (const struct dirent **d1,const struct dirent **d2) + { + char *n1 = (*(struct direct **) d1)->d_name + sizeof (MIXNAME) - 1; + char *n2 = (*(struct direct **) d2)->d_name + sizeof (MIXNAME) - 1; +diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c +index 4549527..b5c5adf 100644 +--- a/src/osdep/unix/mx.c ++++ b/src/osdep/unix/mx.c +@@ -98,8 +98,8 @@ long mx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data); + long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt, + STRING *st,SEARCHSET *set); + +-int mx_select (struct direct *name); +-int mx_numsort (const void *d1,const void *d2); ++int mx_select (const struct direct *name); ++int mx_numsort (const struct dirent **d1,const struct dirent **d2); + char *mx_file (char *dst,char *name); + long mx_lockindex (MAILSTREAM *stream); + void mx_unlockindex (MAILSTREAM *stream); +@@ -1110,7 +1110,7 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt, + * Returns: T to use file name, NIL to skip it + */ + +-int mx_select (struct direct *name) ++int mx_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -1125,7 +1125,7 @@ int mx_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int mx_numsort (const void *d1,const void *d2) ++int mx_numsort (const struct dirent **d1,const struct dirent **d2) + { + return atoi ((*(struct direct **) d1)->d_name) - + atoi ((*(struct direct **) d2)->d_name); +diff --git a/src/osdep/unix/news.c b/src/osdep/unix/news.c +index 4cf5bb7..3da5207 100644 +--- a/src/osdep/unix/news.c ++++ b/src/osdep/unix/news.c +@@ -76,8 +76,8 @@ long news_create (MAILSTREAM *stream,char *mailbox); + long news_delete (MAILSTREAM *stream,char *mailbox); + long news_rename (MAILSTREAM *stream,char *old,char *newname); + MAILSTREAM *news_open (MAILSTREAM *stream); +-int news_select (struct direct *name); +-int news_numsort (const void *d1,const void *d2); ++int news_select (const struct direct *name); ++int news_numsort (const struct dirent ** d1,const struct dirent ** d2); + void news_close (MAILSTREAM *stream,long options); + void news_fast (MAILSTREAM *stream,char *sequence,long flags); + void news_flags (MAILSTREAM *stream,char *sequence,long flags); +@@ -402,7 +402,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream) + * Returns: T to use file name, NIL to skip it + */ + +-int news_select (struct direct *name) ++int news_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -417,7 +417,7 @@ int news_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int news_numsort (const void *d1,const void *d2) ++int news_numsort (const struct dirent ** d1,const struct dirent ** d2) + { + return atoi ((*(struct direct **) d1)->d_name) - + atoi ((*(struct direct **) d2)->d_name); +-- +2.39.1 + diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Support-OpenSSL-1.1.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Support-OpenSSL-1.1.patch index d5610bbcd5..e9c80fa3af 100644 --- a/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Support-OpenSSL-1.1.patch +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/0001-Support-OpenSSL-1.1.patch @@ -8,7 +8,7 @@ When building with OpenSSL 1.1 and newer, use the new built-in structs having been made opaque. Bug-Debian: https://bugs.debian.org/828589 -Upstream-Status: Unknown +Upstream-Status: Pending [Unknown] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/0002-tmail-Include-ctype.h-for-isdigit.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/0002-tmail-Include-ctype.h-for-isdigit.patch new file mode 100644 index 0000000000..5778a00346 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/0002-tmail-Include-ctype.h-for-isdigit.patch @@ -0,0 +1,26 @@ +From fbd00d93cc07fa5da20414b355fffe628dcd37b3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 7 Sep 2022 13:57:19 -0700 +Subject: [PATCH 2/2] tmail: Include ctype.h for isdigit + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/tmail/tmail.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/tmail/tmail.c b/src/tmail/tmail.c +index ed5fc58..a9e3645 100644 +--- a/src/tmail/tmail.c ++++ b/src/tmail/tmail.c +@@ -26,6 +26,7 @@ + * Last Edited: 30 October 2008 + */ + ++#include <ctype.h> /* for isdigit */ + #include <stdio.h> + #include <pwd.h> + #include <errno.h> +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch index f729ee2074..10c91673c3 100644 --- a/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + diff -urN imap-2007.orig/Makefile imap-2007/Makefile --- imap-2007.orig/Makefile 2007-12-20 23:11:10.000000000 +0100 +++ imap-2007/Makefile 2008-03-19 14:08:47.000000000 +0100 diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file mode 100644 index 0000000000..8744cdd103 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch @@ -0,0 +1,355 @@ +Fix compile errors when gcc option '-Wincompatible-pointer-types' set: + +mx.c: In function 'mx_setdate': +mx.c:1286:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] + 1286 | utime (file,tp); /* set the times */ + | ^~ + | | + | time_t * {aka long int *} + +Upstream-Status: Inactive-Upstream [lastrelease: 2011] + +[1]: https://en.wikipedia.org/wiki/UW_IMAP + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +--- + src/osdep/unix/mbx.c | 12 ++++++------ + src/osdep/unix/mh.c | 2 +- + src/osdep/unix/mmdf.c | 10 +++++----- + src/osdep/unix/mtx.c | 16 ++++++++-------- + src/osdep/unix/mx.c | 2 +- + src/osdep/unix/tenex.c | 16 ++++++++-------- + src/osdep/unix/unix.c | 10 +++++----- + 7 files changed, 34 insertions(+), 34 deletions(-) + +diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c +index c8a45a5..0a587fe 100644 +--- a/src/osdep/unix/mbx.c ++++ b/src/osdep/unix/mbx.c +@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock, + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (tmp,tp); /* set the times */ ++ utime (tmp, (const struct utimbuf *)tp); /* set the times */ + } + } + /* in case INBOX but not mbx format */ +@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid)) + mbx_update_header (stream); + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + if (LOCAL->ld >= 0) { /* unlock now */ + unlockfd (LOCAL->ld,LOCAL->lock); +@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + MM_NOCRITICAL (stream); /* release critical */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ +@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + MM_NOCRITICAL (dstream); /* release critical */ + } +@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed, + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + unlockfd (ld,lock); /* release exclusive parse/append permission */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c +index 9264624..26f3539 100644 +--- a/src/osdep/unix/mh.c ++++ b/src/osdep/unix/mh.c +@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt) + time_t tp[2]; + tp[0] = time (0); /* atime is now */ + tp[1] = mail_longdate (elt); /* modification time */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } +diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c +index e962434..c0adbee 100644 +--- a/src/osdep/unix/mmdf.c ++++ b/src/osdep/unix/mmdf.c +@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp) + if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + else tp[0] = /* else preserve \Marked status */ + ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? + sbuf.st_atime : tp[1]; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */ + if (tstream) { /* update last UID if we can */ + MMDFLOCAL *local = (MMDFLOCAL *) tstream->local; +@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + ret = NIL; /* return error */ + } + else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (sf); /* done with scratch file */ + /* force UIDVALIDITY assignment now */ + if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); +@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) + } + else now = 0; /* no time change needed */ + /* set the times, note change */ +- if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + } + flock (fd,LOCK_UN); /* release flock'ers */ + if (!stream) close (fd); /* close the file if no stream */ +@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, + /* set atime to now, mtime a second earlier */ + tp[1] = (tp[0] = time (0)) - 1; + /* set the times, note change */ +- if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + close (LOCAL->fd); /* close and reopen file */ + if ((LOCAL->fd = open (stream->mailbox,O_RDWR, + (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) +diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c +index 8e6f76e..f64142b 100644 +--- a/src/osdep/unix/mtx.c ++++ b/src/osdep/unix/mtx.c +@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp) + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + +@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + MM_NOCRITICAL (stream); /* release critical */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure atime remains greater */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) +@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read is later */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + } +diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c +index b5c5adf..4146409 100644 +--- a/src/osdep/unix/mx.c ++++ b/src/osdep/unix/mx.c +@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt) + time_t tp[2]; + tp[0] = time (0); /* atime is now */ + tp[1] = mail_longdate (elt); /* modification time */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } +diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c +index eee61fb..622da61 100644 +--- a/src/osdep/unix/tenex.c ++++ b/src/osdep/unix/tenex.c +@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp) + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + +@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + MM_NOCRITICAL (stream); /* release critical */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure atime remains greater */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) +@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read is later */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + } +diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c +index 86be3f9..012dc83 100644 +--- a/src/osdep/unix/unix.c ++++ b/src/osdep/unix/unix.c +@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name) + if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { + tp[0] = sbuf.st_atime; /* yes, preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + else tp[0] = /* else preserve \Marked status */ + ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? + sbuf.st_atime : tp[1]; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */ + if (tstream) { /* update last UID if we can */ + UNIXLOCAL *local = (UNIXLOCAL *) tstream->local; +@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + ret = NIL; /* return error */ + } + else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (sf); /* done with scratch file */ + /* force UIDVALIDITY assignment now */ + if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); +@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) + } + else now = 0; /* no time change needed */ + /* set the times, note change */ +- if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + } + flock (fd,LOCK_UN); /* release flock'ers */ + if (!stream) close (fd); /* close the file if no stream */ +@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, + /* set atime to now, mtime a second earlier */ + tp[1] = (tp[0] = time (0)) - 1; + /* set the times, note change */ +- if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + close (LOCAL->fd); /* close and reopen file */ + if ((LOCAL->fd = open (stream->mailbox,O_RDWR, + (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch new file mode 100644 index 0000000000..958abc90f8 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch @@ -0,0 +1,29 @@ +Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> +Upstream-Status: Pending + +--- imap-2007f/src/osdep/unix/ssl_unix.c.old 2024-05-08 09:41:06.183450584 +0200 ++++ imap-2007f/src/osdep/unix/ssl_unix.c 2024-05-08 09:43:38.512931933 +0200 +@@ -220,7 +220,11 @@ + if (ssl_last_error) fs_give ((void **) &ssl_last_error); + ssl_last_host = host; + if (!(stream->context = SSL_CTX_new ((flags & NET_TLSCLIENT) ? ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ TLS_client_method () : ++#else + TLSv1_client_method () : ++#endif + SSLv23_client_method ()))) + return "SSL context failed"; + SSL_CTX_set_options (stream->context,0); +@@ -703,7 +707,11 @@ + } + /* create context */ + if (!(stream->context = SSL_CTX_new (start_tls ? ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ TLS_server_method () : ++#else + TLSv1_server_method () : ++#endif + SSLv23_server_method ()))) + syslog (LOG_ALERT,"Unable to create SSL context, host=%.80s", + tcp_clienthost ()); diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb index df90b629a9..3b8da91441 100644 --- a/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb @@ -11,6 +11,12 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \ file://imap-2007e-shared.patch \ file://imap-2007f-format-security.patch \ file://0001-Support-OpenSSL-1.1.patch \ + file://0001-Define-prototype-for-safe_flock.patch \ + file://0001-Do-not-build-mtest.patch \ + file://0002-tmail-Include-ctype.h-for-isdigit.patch \ + file://0001-Fix-Wincompatible-function-pointer-types.patch \ + file://uw-imap-newer-tls.patch \ + file://uw-imap-fix-incompatible-pointer-types.patch \ " SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369" @@ -18,14 +24,12 @@ SRC_URI[sha256sum] = "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520 S = "${WORKDIR}/imap-${PV}" -CVE_CHECK_IGNORE += "\ - CVE-2005-0198 \ -" +CVE_STATUS[CVE-2005-0198] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" PACKAGECONFIG[pam] = ",,libpam" -EXTRA_OEMAKE = "CC='${CC}' ARRC='${AR} -rc' RANLIB='${RANLIB}'" +EXTRA_OEMAKE = "CC='${CC} -std=c99 -D_GNU_SOURCE' ARRC='${AR} -rc' RANLIB='${RANLIB}' EXTRACFLAGS='${CFLAGS}'" HEADERS = "src/c-client/*.h src/osdep/unix/*.h c-client/auths.c c-client/linkage.c c-client/linkage.h c-client/osdep.h" @@ -47,3 +51,12 @@ RCONFLICTS:${PN} = "libc-client" ALLOW_EMPTY:${PN} = "1" +PARALLEL_MAKE = "" + +# http://errors.yoctoproject.org/Errors/Details/766915/ +# unix.c:235:21: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1002:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1163:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1428:40: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:2254:33: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-devtools/valijson/valijson_0.7.bb b/meta-oe/recipes-devtools/valijson/valijson_0.7.bb deleted file mode 100644 index 51b2bb9e0f..0000000000 --- a/meta-oe/recipes-devtools/valijson/valijson_0.7.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Header-only C++ library for JSON Schema validation" -HOMEPAGE = "https://github.com/tristanpenman/valijson" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=015106c62262b2383f6c72063f0998f2" - -SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https" -SRCREV = "94d3bfd39ad4dca1be0f700b5eea8e4234d0e7e8" - -S = "${WORKDIR}/git" - -inherit cmake - -PACKAGECONFIG ?= "boost" - -PACKAGECONFIG[boost] = "-Dvalijson_EXCLUDE_BOOST=FALSE,-Dvalijson_EXCLUDE_BOOST=TRUE,boost" -PACKAGECONFIG[examples] = "-Dvalijson_BUILD_EXAMPLES=TRUE,-Dvalijson_BUILD_EXAMPLES=FALSE,curlpp" -PACKAGECONFIG[tests] = "-Dvalijson_BUILD_TESTS=TRUE,-Dvalijson_BUILD_TESTS=FALSE,curlpp" - -# valijson is a header only C++ library, so the main package will be empty. -RDEPENDS:${PN}-dev = "" - -BBCLASSEXTEND = "native nativesdk" - -do_install() { - install -d ${D}${includedir}/compat - install -d ${D}${includedir}/valijson - install -d ${D}${includedir}/valijson/adapters - install -d ${D}${includedir}/valijson/constraints - install -d ${D}${includedir}/valijson/internal - install -d ${D}${includedir}/valijson/utils - - install -m 0644 ${S}/include/compat/* ${D}${includedir}/compat - install -D -m 0644 ${S}/include/valijson/*.hpp -t ${D}${includedir}/valijson - install -D -m 0644 ${S}/include/valijson/adapters/*.hpp -t ${D}${includedir}/valijson/adapters - install -D -m 0644 ${S}/include/valijson/constraints/*.hpp -t ${D}${includedir}/valijson/constraints - install -D -m 0644 ${S}/include/valijson/internal/*.hpp -t ${D}${includedir}/valijson/internal - install -D -m 0644 ${S}/include/valijson/utils/*.hpp -t ${D}${includedir}/valijson/utils -} diff --git a/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb b/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb new file mode 100644 index 0000000000..82201211b9 --- /dev/null +++ b/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb @@ -0,0 +1,22 @@ +SUMMARY = "Header-only C++ library for JSON Schema validation" +HOMEPAGE = "https://github.com/tristanpenman/valijson" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5c4583a434195e4f3b418e17c8ca2daf" + +SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https" +SRCREV = "fc9ddf14db683c9443c48ae3a6bf83e0ce3ad37c" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ?= "boost" + +PACKAGECONFIG[boost] = "-Dvalijson_EXCLUDE_BOOST=FALSE,-Dvalijson_EXCLUDE_BOOST=TRUE,boost" +PACKAGECONFIG[examples] = "-Dvalijson_BUILD_EXAMPLES=TRUE,-Dvalijson_BUILD_EXAMPLES=FALSE,curlpp" +PACKAGECONFIG[tests] = "-Dvalijson_BUILD_TESTS=TRUE,-Dvalijson_BUILD_TESTS=FALSE,curlpp" + +# valijson is a header only C++ library, so the main package will be empty. +RDEPENDS:${PN}-dev = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/xerces-c/xerces-c/0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch b/meta-oe/recipes-devtools/xerces-c/xerces-c/0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch new file mode 100644 index 0000000000..2ad7beb51c --- /dev/null +++ b/meta-oe/recipes-devtools/xerces-c/xerces-c/0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch @@ -0,0 +1,58 @@ +From d001f12d428f7adaeaadee5263a22c797c99d67b Mon Sep 17 00:00:00 2001 +From: Martin Jansa <martin.jansa@gmail.com> +Date: Fri, 30 Aug 2024 11:42:27 +0200 +Subject: [PATCH] aclocal.m4: don't use full path of $with_curl in xerces-c.pc + +* fixes: + ERROR: QA Issue: File /usr/lib32/pkgconfig/xerces-c.pc in package lib32-libxerces-c-dev contains reference to TMPDIR [buildpaths] + +* xerces-c was blacklisted due to tmpdir since 2016: + https://git.openembedded.org/meta-openembedded/commit/?id=1af196e42c811947bb483df30bfce758adee83d1 + +* then sed call: + sed -i -e 's:-L${STAGING_DIR}/lib:-L\$\{libdir\}:g' ${B}/xerces-c.pc + was added to do_install:append and blacklist dropped in: + https://git.openembedded.org/meta-openembedded/commit/?id=87b9efff79e62f569525e4760adc594d0d9ac476 + +* sed call was adjusted in: + https://git.openembedded.org/meta-openembedded/commit/?id=87c9e9537dc43468a6aaf706853b784ce6de14e0 + sed -i s:-L${STAGING_LIBDIR}::g ${B}/xerces-c.pc + +* but it was still failing in some cases, e.g. with multilib where libdir is /usr/lib64, so the sed call is: + sed -i s:-L{WORKDIR}/recipe-sysroot/usr/lib64::g ${WORKDIR}/build/xerces-c.pc + but the actual xerces-c.pc file still has: + + Libs: -L${libdir} -lxerces-c + Libs.private: -L${WORKDIR}/recipe-sysroot/usr/lib -lcurl + + because this aclocal was always hardcoding "lib" (appended to --with-curl + value which is passed together with ${prefix}) and not respecting the libdir value: + PACKAGECONFIG[curl] = "--with-curl=${STAGING_DIR_TARGET}${prefix},--with-curl=no,curl" + PACKAGECONFIG[icu] = "--with-icu=${STAGING_DIR_TARGET}${prefix},--with-icu=no,icu" + +* xerces-c supports CMake since 2017: + https://github.com/apache/xerces-c/commit/2606b2924c3e2bf0cf50f72b79378721b6bcf04e + switching from autotools to CMake would probably resolve some of this as well + +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> +--- +Upstream-Status: Pending [It would be better to just switch to CMake] + + m4/xerces_curl_prefix.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/m4/xerces_curl_prefix.m4 b/m4/xerces_curl_prefix.m4 +index d1d015c..7928bdc 100644 +--- a/m4/xerces_curl_prefix.m4 ++++ b/m4/xerces_curl_prefix.m4 +@@ -39,8 +39,8 @@ AC_DEFUN([XERCES_CURL_PREFIX], + curl_libs=`$curl_config --libs` + else + if test -n "$with_curl"; then +- curl_flags="-I$with_curl/include" +- curl_libs="-L$with_curl/lib -lcurl" ++ curl_flags="" ++ curl_libs="-lcurl" + else + # Default compiler paths. + # diff --git a/meta-oe/recipes-devtools/xerces-c/xerces-c_3.1.4.bb b/meta-oe/recipes-devtools/xerces-c/xerces-c_3.2.5.bb index 22fd94b093..9fd7e8fbab 100644 --- a/meta-oe/recipes-devtools/xerces-c/xerces-c_3.1.4.bb +++ b/meta-oe/recipes-devtools/xerces-c/xerces-c_3.2.5.bb @@ -9,9 +9,10 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "http://archive.apache.org/dist/xerces/c/3/sources/${BP}.tar.bz2" -SRC_URI[md5sum] = "d04ae9d8b2dee2157c6db95fa908abfd" -SRC_URI[sha256sum] = "9408f12c1628ecf80730bedbe8b2caad810edd01bb4c66f77b60c873e8cc6891" +SRC_URI = "http://archive.apache.org/dist/xerces/c/3/sources/${BP}.tar.bz2 \ + file://0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch \ +" +SRC_URI[sha256sum] = "1db4028c9b7f1f778efbf4a9462d65e13f9938f2c22f9e9994e12c49ba97e252" inherit autotools @@ -19,10 +20,6 @@ PACKAGECONFIG ??= "curl icu" PACKAGECONFIG[curl] = "--with-curl=${STAGING_DIR_TARGET}${prefix},--with-curl=no,curl" PACKAGECONFIG[icu] = "--with-icu=${STAGING_DIR_TARGET}${prefix},--with-icu=no,icu" -do_install:prepend () { - sed -i -e 's:-L${STAGING_DIR}/lib:-L\$\{libdir\}:g' ${B}/xerces-c.pc -} - PACKAGES = "libxerces-c \ libxerces-c-dev \ xerces-c-samples \ @@ -32,7 +29,7 @@ PACKAGES = "libxerces-c \ RPROVIDES:${PN}-dbg += "libxerces-c-dbg xerces-c-samples-dbg" -FILES:libxerces-c = "${libdir}/libxerces-c-3.1.so" +FILES:libxerces-c = "${libdir}/libxerces-c-3.2.so" FILES:libxerces-c-dev = "${libdir}/lib*.la \ ${libdir}/libxerces-c.so \ ${libdir}/pkgconfig/xerces-c.pc \ diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c/0003-src-Makefile-Fix-Makefile-macro-error.patch b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c/0003-src-Makefile-Fix-Makefile-macro-error.patch deleted file mode 100644 index 3d861fc625..0000000000 --- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c/0003-src-Makefile-Fix-Makefile-macro-error.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ea4ca50ca9cab755f3722096158a46deec0e663a Mon Sep 17 00:00:00 2001 -From: Arthur She <arthur.she@linaro.org> -Date: Tue, 25 Aug 2020 09:51:26 -0700 -Subject: [PATCH] src/Makefile: Fix Makefile macro error - -This error caused the curl library wouldn't be linked correctly. - -Upstream-Status: Pending -Signed-off-by: Arthur She <arthur.she@linaro.org> ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 1cdf8b0..acd04dd 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -57,7 +57,7 @@ ifeq ($(MUST_BUILD_CURL_CLIENT),yes) - TRANSPORT_MODS += $(BLDDIR)/lib/curl_transport/xmlrpc_curl_transport - TRANSPORT_MODS += $(BLDDIR)/lib/curl_transport/curltransaction - TRANSPORT_MODS += $(BLDDIR)/lib/curl_transport/curlmulti -- TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs) -+ TRANSPORT_LIBDEP += $(shell $(CURL_CONFIG) --libs) - TRANSPORT_INCLUDES += -Isrcdir/lib/curl_transport - endif - ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes) --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.54.02.bb b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.59.01.bb index 36205009a4..5d5152b834 100644 --- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.54.02.bb +++ b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.59.01.bb @@ -8,11 +8,9 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=aefbf81ba0750f02176b6f86752ea951" SRC_URI = "git://github.com/mirror/xmlrpc-c.git;branch=master;protocol=https \ file://0001-test-cpp-server_abyss-Fix-build-with-clang-libc.patch \ file://0002-fix-formatting-issues.patch \ - file://0003-src-Makefile-Fix-Makefile-macro-error.patch \ " - -#Release 1.54.02 -SRCREV = "86405c7e1bd4f70287204a28d242a1054daab520" +#Release 1.59.01 +SRCREV = "352aeaa9ae49e90e55187cbda839f2113df06278" S = "${WORKDIR}/git/stable" @@ -42,6 +40,10 @@ do_configure() { rm -fv ${S}/tools/turbocharger/mod_gzip.c } +do_install:append:class-target() { + sed -i 's,${WORKDIR},${TARGET_DBGSRC_DIR},g' ${D}${bindir}/xmlrpc-c-config +} + BBCLASSEXTEND = "native" CLEANBROKEN = "1" diff --git a/meta-oe/recipes-devtools/yajl/yajl/CVE-2017-16516.patch b/meta-oe/recipes-devtools/yajl/yajl/CVE-2017-16516.patch new file mode 100644 index 0000000000..1241ff9e31 --- /dev/null +++ b/meta-oe/recipes-devtools/yajl/yajl/CVE-2017-16516.patch @@ -0,0 +1,37 @@ +From 0b5e73c4321de0ba1d495fdc0967054b2a77931c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com> +Date: Mon, 10 Jul 2023 13:36:10 +0100 +Subject: [PATCH] Fix for CVE-2017-16516 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Description: Fix for CVE-2017-16516 + Potential buffer overread: A JSON file can cause denial of service. +Origin: https://github.com/brianmario/yajl-ruby/commit/a8ca8f476655adaa187eedc60bdc770fff3c51ce + +CVE: CVE-2017-16516 +Upstream-Status: Submitted [https://github.com/lloyd/yajl/issues/248] +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + src/yajl_encode.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/yajl_encode.c b/src/yajl_encode.c +index fd08258..0d97cc5 100644 +--- a/src/yajl_encode.c ++++ b/src/yajl_encode.c +@@ -139,8 +139,8 @@ void yajl_string_decode(yajl_buf buf, const unsigned char * str, + end+=3; + /* check if this is a surrogate */ + if ((codepoint & 0xFC00) == 0xD800) { +- end++; +- if (str[end] == '\\' && str[end + 1] == 'u') { ++ if (end + 2 < len && str[end + 1] == '\\' && str[end + 2] == 'u') { ++ end++; + unsigned int surrogate = 0; + hexToDigit(&surrogate, str + end + 2); + codepoint = +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/yajl/yajl/CVE-2022-24795.patch b/meta-oe/recipes-devtools/yajl/yajl/CVE-2022-24795.patch new file mode 100644 index 0000000000..0dc859099d --- /dev/null +++ b/meta-oe/recipes-devtools/yajl/yajl/CVE-2022-24795.patch @@ -0,0 +1,59 @@ +From 17de4d15687aa30c49660dc4b792b1fb4d38b569 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> +Date: Thu, 7 Apr 2022 17:29:54 +0200 +Subject: [PATCH] Fix CVE-2022-24795 + +There was an integer overflow in yajl_buf_ensure_available() leading +to allocating less memory than requested. Then data were written past +the allocated heap buffer in yajl_buf_append(), the only caller of +yajl_buf_ensure_available(). Another result of the overflow was an +infinite loop without a return from yajl_buf_ensure_available(). + +yajl-ruby project, which bundles yajl, fixed it +<https://github.com/brianmario/yajl-ruby/pull/211> by checking for the +integer overflow, fortifying buffer allocations, and report the +failures to a caller. But then the caller yajl_buf_append() skips +a memory write if yajl_buf_ensure_available() failed leading to a data +corruption. + +A yajl fork mainter recommended calling memory allocation callbacks with +the large memory request and let them to handle it. But that has the +problem that it's not possible pass the overely large size to the +callbacks. + +This patch catches the integer overflow and terminates the process +with abort(). + +CVE: CVE-2022-24795 +Upstream-Status: Submitted [https://github.com/lloyd/yajl/issues/239] +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + src/yajl_buf.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/yajl_buf.c b/src/yajl_buf.c +index 1aeafde..55c11ad 100644 +--- a/src/yajl_buf.c ++++ b/src/yajl_buf.c +@@ -45,7 +45,17 @@ void yajl_buf_ensure_available(yajl_buf buf, size_t want) + + need = buf->len; + +- while (want >= (need - buf->used)) need <<= 1; ++ if (((buf->used > want) ? buf->used : want) > (size_t)(buf->used + want)) { ++ /* We cannot allocate more memory than SIZE_MAX. */ ++ abort(); ++ } ++ while (want >= (need - buf->used)) { ++ if (need >= (size_t)((size_t)(-1)<<1)>>1) { ++ /* need would overflow. */ ++ abort(); ++ } ++ need <<= 1; ++ } + + if (need != buf->len) { + buf->data = (unsigned char *) YA_REALLOC(buf->alloc, buf->data, need); +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch b/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch new file mode 100644 index 0000000000..47454dc8af --- /dev/null +++ b/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch @@ -0,0 +1,35 @@ +Fix memory leaks. Taken from the Fedora packaging (https://src.fedoraproject.org/rpms/yajl) +where it was backported from openEuler. + +CVE: CVE-2023-33460 +Upstream-Status: Submitted [https://github.com/lloyd/yajl/issues/250] +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/src/yajl_tree.c b/src/yajl_tree.c +index 3d357a3..56c7012 100644 +--- a/src/yajl_tree.c ++++ b/src/yajl_tree.c +@@ -143,7 +143,7 @@ static yajl_val context_pop(context_t *ctx) + ctx->stack = stack->next; + + v = stack->value; +- ++ free (stack->key); + free (stack); + + return (v); +@@ -444,7 +444,14 @@ yajl_val yajl_tree_parse (const char *input, + snprintf(error_buffer, error_buffer_size, "%s", internal_err_str); + YA_FREE(&(handle->alloc), internal_err_str); + } ++ while(ctx.stack != NULL) { ++ yajl_val v = context_pop(&ctx); ++ yajl_tree_free(v); ++ } + yajl_free (handle); ++ //If the requested memory is not released in time, it will cause memory leakage ++ if(ctx.root) ++ yajl_tree_free(ctx.root); + return NULL; + } + diff --git a/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb b/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb index cf8dbb183e..c5b5e60027 100644 --- a/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb +++ b/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb @@ -3,12 +3,16 @@ SUMMARY = "Yet Another JSON Library." DESCRIPTION = "YAJL is a small event-driven (SAX-style) JSON parser \ written in ANSI C, and a small validating JSON generator." -HOMEPAGE = "http://lloyd.github.com/yajl/" +HOMEPAGE = "https://lloyd.github.io/yajl/" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://COPYING;md5=39af6eb42999852bdd3ea00ad120a36d" -SRC_URI = "git://github.com/lloyd/yajl;branch=master;protocol=https" +SRC_URI = "git://github.com/lloyd/yajl;branch=master;protocol=https \ + file://CVE-2017-16516.patch \ + file://CVE-2022-24795.patch \ + file://CVE-2023-33460.patch \ + " SRCREV = "a0ecdde0c042b9256170f2f8890dd9451a4240aa" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/yasm/yasm/0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch b/meta-oe/recipes-devtools/yasm/yasm/0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch new file mode 100644 index 0000000000..42f5559e3f --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch @@ -0,0 +1,37 @@ +From eb164bb201c0f792fa8aa78270c47294065183a3 Mon Sep 17 00:00:00 2001 +From: Oleh Matiusha <omatiush@cisco.com> +Date: Tue, 6 Feb 2024 09:33:11 +0000 +Subject: [PATCH 1/2] yasm: Set build date to SOURCE_DATE_EPOCH + +If SOURCE_DATE_EPOCH is set, use it to generate a reproducible +string for BUILD_DATE. + +Signed-off-by: Oleh Matiusha <omatiush@cisco.com> + +Upstream-Status: Pending +--- + configure.ac | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 2823ecd..eeb51ce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,6 +103,14 @@ AM_WITH_DMALLOC + # + AC_CHECK_HEADERS([strings.h libgen.h unistd.h direct.h sys/stat.h]) + ++# Use reproducible build date and time ++if test "$SOURCE_DATE_EPOCH"; then ++ DATE_FMT="%d %b %Y %H:%M:%S" ++ BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT") ++ AC_DEFINE_UNQUOTED([BUILD_DATE], ["$BUILD_DATE"], [Use reproducidle build date]) ++fi ++ ++ + # + # Checks for typedefs, structures, and compiler characteristics. + # +-- +2.33.0 + diff --git a/meta-oe/recipes-devtools/yasm/yasm/0002-yasm-Use-BUILD_DATE-for-reproducibility.patch b/meta-oe/recipes-devtools/yasm/yasm/0002-yasm-Use-BUILD_DATE-for-reproducibility.patch new file mode 100644 index 0000000000..4b9c933d01 --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/0002-yasm-Use-BUILD_DATE-for-reproducibility.patch @@ -0,0 +1,42 @@ +From 19fffab74a201dc41c3da7e74d86eafa8f68bbc6 Mon Sep 17 00:00:00 2001 +From: Oleh Matiusha <omatiush@cisco.com> +Date: Tue, 6 Feb 2024 09:34:26 +0000 +Subject: [PATCH] yasm: Use BUILD_DATE for reproducibility + +Use reproducible build date instead of compilation time and date. + +Signed-off-by: Oleh Matiusha <omatiush@cisco.com> + + +Upstream-Status: Pending +--- + tools/re2c/parser.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tools/re2c/parser.c b/tools/re2c/parser.c +index 02d5c66..1c90aee 100644 +--- a/tools/re2c/parser.c ++++ b/tools/re2c/parser.c +@@ -5,6 +5,7 @@ + #include "tools/re2c/globals.h" + #include "tools/re2c/parse.h" + #include "tools/re2c/parser.h" ++#include "config.h" + + int yylex(void); + static RegExp *parse_expr(void); +@@ -233,7 +234,11 @@ void parse(FILE *i, FILE *o){ + peektok = NONE; + + fputs("/* Generated by re2c 0.9.1-C on ", o); ++#ifndef BUILD_DATE + fprintf(o, "%-24s", ctime(&now)); ++#else ++ fprintf(o, "%-24s", BUILD_DATE " "); ++#endif + fputs(" */\n", o); oline+=2; + + in = Scanner_new(i); +-- +2.33.0 + diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch new file mode 100644 index 0000000000..ae10e99c2f --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch @@ -0,0 +1,29 @@ +From b2cc5a1693b17ac415df76d0795b15994c106441 Mon Sep 17 00:00:00 2001 +From: Katsuhiko Gondow <gondow@cs.titech.ac.jp> +Date: Tue, 13 Jun 2023 05:00:47 +0900 +Subject: [PATCH] Fix memory leak in bin-objfmt (#231) + +Upstream-Status: Backport [https://github.com/yasm/yasm/commit/b2cc5a1693b17ac415df76d0795b15994c106441] + +CVE: CVE-2023-31975 +--- + modules/objfmts/bin/bin-objfmt.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c +index 18026750..a38c3422 100644 +--- a/modules/objfmts/bin/bin-objfmt.c ++++ b/modules/objfmts/bin/bin-objfmt.c +@@ -1680,6 +1680,10 @@ static void + bin_section_data_destroy(void *data) + { + bin_section_data *bsd = (bin_section_data *)data; ++ if (bsd->align) ++ yasm_xfree(bsd->align); ++ if (bsd->valign) ++ yasm_xfree(bsd->valign); + if (bsd->start) + yasm_expr_destroy(bsd->start); + if (bsd->vstart) +-- +2.40.0 diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch new file mode 100644 index 0000000000..1ca33f0a92 --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch @@ -0,0 +1,41 @@ +From 2cd3bb50e256f5ed5f611ac611d25fe673f2cec3 Mon Sep 17 00:00:00 2001 +From: Peter Johnson <johnson.peter@gmail.com> +Date: Fri, 11 Aug 2023 10:49:51 +0000 +Subject: [PATCH] elf.c: Fix NULL deref on bad xsize expression (#234) + +CVE: CVE-2023-37732 + +Upstream-Status: Backport [https://github.com/yasm/yasm/commit/2cd3bb50e256f5ed5f611ac611d25fe673f2cec3] + +Signed-off-by: Soumya <soumya.sambu@windriver.com> +--- + modules/objfmts/elf/elf.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules/objfmts/elf/elf.c b/modules/objfmts/elf/elf.c +index 2486bba8..bab4c9ca 100644 +--- a/modules/objfmts/elf/elf.c ++++ b/modules/objfmts/elf/elf.c +@@ -482,15 +482,15 @@ elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab, + + /* get size (if specified); expr overrides stored integer */ + if (entry->xsize) { +- size_intn = yasm_intnum_copy( +- yasm_expr_get_intnum(&entry->xsize, 1)); +- if (!size_intn) { ++ yasm_intnum *intn = yasm_expr_get_intnum(&entry->xsize, 1); ++ if (!intn) { + yasm_error_set(YASM_ERROR_VALUE, + N_("size specifier not an integer expression")); + yasm_errwarn_propagate(errwarns, entry->xsize->line); +- } ++ } else ++ size_intn = yasm_intnum_copy(intn); + } +- else ++ if (!size_intn) + size_intn = yasm_intnum_create_uint(entry->size); + + /* get EQU value for constants */ +-- +2.40.0 diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb index 044fcbea74..216b777667 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb @@ -4,13 +4,18 @@ HOMEPAGE = "http://www.tortall.net/projects/yasm/" LIC_FILES_CHKSUM = "file://COPYING;md5=a12d8903508fb6bfd49d8d82c6170dd9" -DEPENDS += "flex-native bison-native xmlto-native" +DEPENDS += "flex-native bison-native" +PACKAGECONFIG[docs] = ",,xmlto-native," -PV = "1.3.0+git${SRCPV}" +PV = "1.3.0+git" # v1.3.0 SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a" SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ file://0001-Do-not-use-AC_HEADER_STDC.patch \ + file://CVE-2023-31975.patch \ + file://CVE-2023-37732.patch \ + file://0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch \ + file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \ " S = "${WORKDIR}/git" @@ -27,3 +32,4 @@ do_configure:prepend() { # Don't include $CC (which includes path to sysroot) in generated header. sed -i -e "s/^echo \"\/\* generated \$ac_cv_stdint_message \*\/\" >>\$ac_stdint$"// ${S}/m4/ax_create_stdint_h.m4 } + |