diff options
Diffstat (limited to 'meta-oe/recipes-devtools')
378 files changed, 10210 insertions, 4653 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 new file mode 100644 index 0000000000..5242b29e06 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch @@ -0,0 +1,39 @@ +From 738549dea7a4e6c462a79962c414eaa450c2cffd 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> + +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 +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 +--- a/absl/base/internal/direct_mmap.h ++++ b/absl/base/internal/direct_mmap.h +@@ -41,13 +41,9 @@ + + #ifdef __mips__ + // Include definitions of the ABI currently in use. +-#if defined(__BIONIC__) || !defined(__GLIBC__) +-// Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the ++// bionic/musl C libs don't have sgidefs.h, but do have asm/sgidefs.h, which has the + // definitions we need. + #include <asm/sgidefs.h> +-#else +-#include <sgidefs.h> +-#endif // __BIONIC__ || !__GLIBC__ + #endif // __mips__ + + // SYS_mmap and SYS_munmap are not defined in Android. +-- +2.25.1 + 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 new file mode 100644 index 0000000000..b92a487523 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch @@ -0,0 +1,39 @@ +From d25cf3b9aa873595a19e197cc29ab46c0093bff1 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 + +--- +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 +--- a/absl/copts/GENERATED_AbseilCopts.cmake ++++ b/absl/copts/GENERATED_AbseilCopts.cmake +@@ -158,7 +158,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS + list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS + ) + +-list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS +- "-maes" +- "-msse4.1" +-) +diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl +index a6efc98e11d4..1e847f769501 100644 +--- a/absl/copts/GENERATED_copts.bzl ++++ b/absl/copts/GENERATED_copts.bzl +@@ -159,7 +159,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ + ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [ + ] + +-ABSL_RANDOM_HWAES_X64_FLAGS = [ +- "-maes", +- "-msse4.1", +-] +-- +2.36.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 new file mode 100644 index 0000000000..1a80a428b7 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch @@ -0,0 +1,49 @@ +From fb24c3e3539b5743d398a429a302a3886186f261 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 + +Not every arm platform supports neon instructions, so do not enforce +them. + +Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> +--- +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 23b9253c1f00..5d112a97f3e4 100644 +--- a/absl/copts/GENERATED_AbseilCopts.cmake ++++ b/absl/copts/GENERATED_AbseilCopts.cmake +@@ -147,10 +147,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS + "/DNOMINMAX" + ) + +-list(APPEND ABSL_RANDOM_HWAES_ARM32_FLAGS +- "-mfpu=neon" +-) +- + list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS + "-march=armv8-a+crypto" + ) +diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl +index 1e847f769501..3e10db204faf 100644 +--- a/absl/copts/GENERATED_copts.bzl ++++ b/absl/copts/GENERATED_copts.bzl +@@ -148,10 +148,6 @@ ABSL_MSVC_TEST_FLAGS = [ + "/DNOMINMAX", + ] + +-ABSL_RANDOM_HWAES_ARM32_FLAGS = [ +- "-mfpu=neon", +-] +- + ABSL_RANDOM_HWAES_ARM64_FLAGS = [ + "-march=armv8-a+crypto", + ] +-- +2.36.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/abseil-ppc-fixes.patch new file mode 100644 index 0000000000..f2ebd9f08c --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch @@ -0,0 +1,81 @@ +Upstream-Status: Pending + +An all-in-one patch that fixes several issues: + +1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) +2) powerpc stacktrace implementation only works on glibc (disabled on musl) +3) powerpc stacktrace implementation has ppc64 assumptions (fixed) +4) examine_stack.cpp makes glibc assumptions on powerpc (fixed) + +Sourced from void linux + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- 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__) +@@ -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_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(__GLIBC__)) || \ ++ defined(__riscv) || \ + defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 + #else +--- a/absl/debugging/internal/examine_stack.cc ++++ b/absl/debugging/internal/examine_stack.cc +@@ -33,6 +33,10 @@ + #include <csignal> + #include <cstdio> + ++#if defined(__powerpc__) ++#include <asm/ptrace.h> ++#endif ++ + #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) { + return reinterpret_cast<void*>(context->uc_mcontext.pc); + #elif defined(__powerpc64__) + return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]); +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) && defined(__GLIBC__) + return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]); ++#elif defined(__powerpc__) ++ return reinterpret_cast<void*>((context->uc_regs)->gregs[32]); + #elif defined(__riscv) + return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]); + #elif defined(__s390__) && !defined(__s390x__) +--- a/absl/debugging/internal/stacktrace_config.h ++++ b/absl/debugging/internal/stacktrace_config.h +@@ -60,7 +60,7 @@ + #elif defined(__i386__) || defined(__x86_64__) + #define ABSL_STACKTRACE_INL_HEADER \ + "absl/debugging/internal/stacktrace_x86-inl.inc" +-#elif defined(__ppc__) || defined(__PPC__) ++#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__) + #define ABSL_STACKTRACE_INL_HEADER \ + "absl/debugging/internal/stacktrace_powerpc-inl.inc" + #elif defined(__aarch64__) diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb new file mode 100644 index 0000000000..2aef973910 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb @@ -0,0 +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." +HOMEPAGE = "https://abseil.io/" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" + +SRCREV = "d7aaad83b488fd62bd51c81ecf16cd938532cc0a" +BRANCH = "lts_2024_01_16" +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 \ + " + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DABSL_ENABLE_INSTALL=ON \ + " + +SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" + +PACKAGES_DYNAMIC = "^libabsl-*" +PACKAGES_DYNAMIC:class-native = "" + +PACKAGESPLITFUNCS =+ "split_dynamic_packages" + +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/10-adbd-configfs.conf b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf new file mode 100644 index 0000000000..ddf155a907 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf @@ -0,0 +1,4 @@ +[Service] +ExecStartPre=/usr/bin/android-gadget-setup +ExecStartPost=/usr/bin/android-gadget-start +ExecStopPost=/usr/bin/android-gadget-cleanup diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup new file mode 100644 index 0000000000..f27d77df51 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup @@ -0,0 +1,24 @@ +#!/bin/sh + +[ -d /sys/kernel/config/usb_gadget ] || exit 0 + +cd /sys/kernel/config/usb_gadget + +cd adb + +echo -n "" > UDC || true + +killall adbd || true + +umount /dev/usb-ffs/adb + +rm configs/c.1/ffs.usb0 + +rmdir configs/c.1/strings/0x409 +rmdir configs/c.1 + +rmdir functions/ffs.usb0 +rmdir strings/0x409 + +cd .. +rmdir adb diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup new file mode 100644 index 0000000000..dbd7115151 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +manufacturer=RPB +model="Android device" +serial=0123456789ABCDEF + +if [ -r /etc/android-gadget-setup.machine ] ; then + . /etc/android-gadget-setup.machine +fi + +[ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite + +cd /sys/kernel/config/usb_gadget + +[ -d adb ] && /usr/bin/android-gadget-cleanup || true + +mkdir adb +cd adb + +mkdir configs/c.1 +mkdir functions/ffs.usb0 +mkdir strings/0x409 +mkdir configs/c.1/strings/0x409 +echo -n 0x18d1 > idVendor +echo -n 0xd002 > idProduct +echo "$serial" > strings/0x409/serialnumber +echo "$manufacturer" > strings/0x409/manufacturer +echo "$model" > strings/0x409/product +echo "Conf 1" > configs/c.1/strings/0x409/configuration +ln -s functions/ffs.usb0 configs/c.1 + +mkdir -p /dev/usb-ffs/adb +mount -t functionfs usb0 /dev/usb-ffs/adb 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 new file mode 100644 index 0000000000..76b5e29624 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +sleep 10 + +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 new file mode 100644 index 0000000000..a91229f908 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Different utilities from Android - corressponding configuration files for using ConfigFS" +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 \ + file://android-gadget-cleanup \ + file://10-adbd-configfs.conf \ +" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install() { + install -d ${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 ${UNPACKDIR}/android-gadget-setup.machine ] ; then + install -d ${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 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d +} + +FILES:${PN} += " \ + ${systemd_unitdir}/system/ \ +" + +PROVIDES += "android-tools-conf" +RPROVIDES:${PN} = "android-tools-conf" 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 af98f92f05..f73be8dbbf 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 @@ -9,5 +9,12 @@ 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 () { + pn = d.getVar('PN') + profprov = d.getVar("PREFERRED_PROVIDER_" + pn) + if profprov and pn != profprov: + raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (pn, profprov, pn)) } 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 new file mode 100644 index 0000000000..c091fd404b --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch @@ -0,0 +1,361 @@ +From 82dce13ea7b5b31c63851bd67f66072413917e73 Mon Sep 17 00:00:00 2001 +From: Chenxi Mao <maochenxi@eswin.com> +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/core/combo/include/arch/linux-riscv64/AndroidConfig.h b/core/combo/include/arch/linux-riscv64/AndroidConfig.h +new file mode 100644 +index 0000000000..bcbda8f87f +--- /dev/null ++++ b/core/combo/include/arch/linux-riscv64/AndroidConfig.h +@@ -0,0 +1,340 @@ ++/* ++ * Copyright (C) 2013 The Android Open Source Project ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++/* ++ * Android config -- "android-aarch64". Used for ARM aarch64 device builds. ++ */ ++#ifndef _ANDROID_CONFIG_H ++#define _ANDROID_CONFIG_H ++ ++/* ++ * =========================================================================== ++ * !!! IMPORTANT !!! ++ * =========================================================================== ++ * ++ * This file is included by ALL C/C++ source files. Don't put anything in ++ * here unless you are absolutely certain it can't go anywhere else. ++ * ++ * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" ++ * comments. ++ */ ++ ++/* ++ * Threading model. Choose one: ++ * ++ * HAVE_PTHREADS - use the pthreads library. ++ * HAVE_WIN32_THREADS - use Win32 thread primitives. ++ * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX ++ */ ++#define HAVE_PTHREADS ++ ++/* ++ * Do we have pthread_setname_np()? ++ * ++ * (HAVE_PTHREAD_SETNAME_NP is used by WebKit to enable a function with ++ * the same name but different parameters, so we can't use that here.) ++ */ ++#define HAVE_ANDROID_PTHREAD_SETNAME_NP ++ ++/* ++ * Do we have the futex syscall? ++ */ ++#define HAVE_FUTEX ++ ++/* ++ * Process creation model. Choose one: ++ * ++ * HAVE_FORKEXEC - use fork() and exec() ++ * HAVE_WIN32_PROC - use CreateProcess() ++ */ ++#define HAVE_FORKEXEC ++ ++/* ++ * Process out-of-memory adjustment. Set if running on Linux, ++ * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory ++ * badness adjustment. ++ */ ++#define HAVE_OOM_ADJ ++ ++/* ++ * IPC model. Choose one: ++ * ++ * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). ++ * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). ++ * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). ++ * HAVE_ANDROID_IPC - use Android versions (?, mmap). ++ */ ++#define HAVE_ANDROID_IPC ++ ++/* ++ * Memory-mapping model. Choose one: ++ * ++ * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h ++ * HAVE_WIN32_FILEMAP - use Win32 filemaps ++ */ ++#define HAVE_POSIX_FILEMAP ++ ++/* ++ * Define this if you have <termio.h> ++ */ ++#define HAVE_TERMIO_H 1 ++ ++/* ++ * Define this if you have <sys/sendfile.h> ++ */ ++#define HAVE_SYS_SENDFILE_H 1 ++ ++/* ++ * Define this if you build against MSVCRT.DLL ++ */ ++/* #define HAVE_MS_C_RUNTIME */ ++ ++/* ++ * Define this if you have sys/uio.h ++ */ ++#define HAVE_SYS_UIO_H 1 ++ ++/* ++ * Define this if your platforms implements symbolic links ++ * in its filesystems ++ */ ++#define HAVE_SYMLINKS ++ ++/* ++ * Define this if we have localtime_r(). ++ */ ++/* #define HAVE_LOCALTIME_R 1 */ ++ ++/* ++ * Define this if we have gethostbyname_r(). ++ */ ++/* #define HAVE_GETHOSTBYNAME_R */ ++ ++/* ++ * Define this if we have ioctl(). ++ */ ++#define HAVE_IOCTL ++ ++/* ++ * Define this if we want to use WinSock. ++ */ ++/* #define HAVE_WINSOCK */ ++ ++/* ++ * Define this if have clock_gettime() and friends ++ */ ++#define HAVE_POSIX_CLOCKS ++ ++/* ++ * Define this if we have linux style epoll() ++ */ ++#define HAVE_EPOLL ++ ++/* ++ * Endianness of the target machine. Choose one: ++ * ++ * HAVE_ENDIAN_H -- have endian.h header we can include. ++ * HAVE_LITTLE_ENDIAN -- we are little endian. ++ * HAVE_BIG_ENDIAN -- we are big endian. ++ */ ++#define HAVE_ENDIAN_H ++#define HAVE_LITTLE_ENDIAN ++ ++#define _FILE_OFFSET_BITS 64 ++/* #define _LARGEFILE_SOURCE 1 */ ++ ++/* ++ * Define if platform has off64_t (and lseek64 and other xxx64 functions) ++ */ ++#define HAVE_OFF64_T ++ ++/* ++ * Defined if we have the backtrace() call for retrieving a stack trace. ++ * Needed for CallStack to operate; if not defined, CallStack is ++ * non-functional. ++ */ ++#define HAVE_BACKTRACE 0 ++ ++/* ++ * Defined if we have the cxxabi.h header for demangling C++ symbols. If ++ * not defined, stack crawls will be displayed with raw mangled symbols ++ */ ++#define HAVE_CXXABI 0 ++ ++/* ++ * Defined if we have the gettid() system call. ++ */ ++#define HAVE_GETTID ++ ++/* ++ * Defined if we have the sched_setscheduler() call ++ */ ++#define HAVE_SCHED_SETSCHEDULER ++ ++/* ++ * Add any extra platform-specific defines here. ++ */ ++#ifndef __linux__ ++#define __linux__ ++#endif ++ ++/* ++ * Define if we have <malloc.h> header ++ */ ++#define HAVE_MALLOC_H ++ ++/* ++ * Define if we're running on *our* linux on device or emulator. ++ */ ++#define HAVE_ANDROID_OS 1 ++ ++/* ++ * Define if we have Linux-style non-filesystem Unix Domain Sockets ++ */ ++#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1 ++ ++/* ++ * Define if we have Linux's inotify in <sys/inotify.h>. ++ */ ++#define HAVE_INOTIFY 1 ++ ++/* ++ * Define if we have madvise() in <sys/mman.h> ++ */ ++#define HAVE_MADVISE 1 ++ ++/* ++ * Define if tm struct has tm_gmtoff field ++ */ ++#define HAVE_TM_GMTOFF 1 ++ ++/* ++ * Define if dirent struct has d_type field ++ */ ++#define HAVE_DIRENT_D_TYPE 1 ++ ++/* ++ * Define if libc includes Android system properties implementation. ++ */ ++#define HAVE_LIBC_SYSTEM_PROPERTIES 1 ++ ++/* ++ * Define if system provides a system property server (should be ++ * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). ++ */ ++/* #define HAVE_SYSTEM_PROPERTY_SERVER */ ++ ++/* ++ * What CPU architecture does this platform use? ++ */ ++#define ARCH_AARCH64 ++ ++/* ++ * Define if the size of enums is as short as possible, ++ */ ++/* #define HAVE_SHORT_ENUMS */ ++ ++/* ++ * sprintf() format string for shared library naming. ++ */ ++#define OS_SHARED_LIB_FORMAT_STR "lib%s.so" ++ ++/* ++ * type for the third argument to mincore(). ++ */ ++#define MINCORE_POINTER_TYPE unsigned char * ++ ++/* ++ * The default path separator for the platform ++ */ ++#define OS_PATH_SEPARATOR '/' ++ ++/* ++ * Is the filesystem case sensitive? ++ */ ++#define OS_CASE_SENSITIVE ++ ++/* ++ * Define if <sys/socket.h> exists. ++ */ ++#define HAVE_SYS_SOCKET_H 1 ++ ++/* ++ * Define if the strlcpy() function exists on the system. ++ */ ++#define HAVE_STRLCPY 1 ++ ++/* ++ * Define if the open_memstream() function exists on the system. ++ */ ++/* #define HAVE_OPEN_MEMSTREAM 1 */ ++ ++/* ++ * Define if the BSD funopen() function exists on the system. ++ */ ++#define HAVE_FUNOPEN 1 ++ ++/* ++ * Define if prctl() exists ++ */ ++#define HAVE_PRCTL 1 ++ ++/* ++ * Define if writev() exists ++ */ ++#define HAVE_WRITEV 1 ++ ++/* ++ * Define if <stdint.h> exists. ++ */ ++#define HAVE_STDINT_H 1 ++ ++/* ++ * Define if <stdbool.h> exists. ++ */ ++#define HAVE_STDBOOL_H 1 ++ ++/* ++ * Define if <sched.h> exists. ++ */ ++#define HAVE_SCHED_H 1 ++ ++/* ++ * Define if pread() exists ++ */ ++#define HAVE_PREAD 1 ++ ++/* ++ * Define if we have st_mtim in struct stat ++ */ ++#define HAVE_STAT_ST_MTIM 1 ++ ++/* ++ * Define if printf() supports %zd for size_t arguments ++ */ ++#define HAVE_PRINTF_ZD 1 ++ ++/* ++ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype. ++ */ ++#define HAVE_BSD_QSORT_R 0 ++ ++/* ++ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype. ++ */ ++#define HAVE_GNU_QSORT_R 0 ++ ++#endif /* _ANDROID_CONFIG_H */ +-- +2.17.1 + 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 new file mode 100644 index 0000000000..5138556d63 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch @@ -0,0 +1,191 @@ +From 48ddf4fb999931942c359350fb31cd557514e1c6 Mon Sep 17 00:00:00 2001 +From: Chenxi Mao <maochenxi@eswin.com> +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(+) + create mode 100644 include/cutils/atomic-riscv64.h + +diff --git a/include/cutils/atomic-inline.h b/include/cutils/atomic-inline.h +index a31e913579..b5dc38209c 100644 +--- a/include/cutils/atomic-inline.h ++++ b/include/cutils/atomic-inline.h +@@ -55,6 +55,8 @@ extern "C" { + #include <cutils/atomic-mips64.h> + #elif defined(__mips__) + #include <cutils/atomic-mips.h> ++#elif defined(__riscv) && __riscv_xlen == 64 ++#include <cutils/atomic-riscv64.h> + #else + #error atomic operations are unsupported + #endif +diff --git a/include/cutils/atomic-riscv64.h b/include/cutils/atomic-riscv64.h +new file mode 100644 +index 0000000000..2664db5a86 +--- /dev/null ++++ b/include/cutils/atomic-riscv64.h +@@ -0,0 +1,156 @@ ++/* ++ * Copyright (C) 2014 The Android Open Source Project ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED ++ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#ifndef ANDROID_CUTILS_ATOMIC_RISCV64_H ++#define ANDROID_CUTILS_ATOMIC_RISCV64_H ++ ++#include <stdint.h> ++ ++#ifndef ANDROID_ATOMIC_INLINE ++#define ANDROID_ATOMIC_INLINE inline __attribute__((always_inline)) ++#endif ++ ++/* ++ TODOAArch64: Revisit the below functions and check for potential ++ optimizations using assembly code or otherwise. ++*/ ++ ++extern ANDROID_ATOMIC_INLINE ++void android_compiler_barrier(void) ++{ ++ __asm__ __volatile__ ("" : : : "memory"); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++void android_memory_barrier(void) ++{ ++ __asm__ __volatile__ ("fence rw,rw" : : : "memory"); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_acquire_load(volatile const int32_t *ptr) ++{ ++ int32_t value = *ptr; ++ android_memory_barrier(); ++ return value; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_release_load(volatile const int32_t *ptr) ++{ ++ android_memory_barrier(); ++ return *ptr; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++void android_atomic_acquire_store(int32_t value, volatile int32_t *ptr) ++{ ++ *ptr = value; ++ android_memory_barrier(); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++void android_atomic_release_store(int32_t value, volatile int32_t *ptr) ++{ ++ android_memory_barrier(); ++ *ptr = value; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int android_atomic_cas(int32_t old_value, int32_t new_value, ++ volatile int32_t *ptr) ++{ ++ return __sync_val_compare_and_swap(ptr, old_value, new_value) != old_value; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int android_atomic_acquire_cas(int32_t old_value, int32_t new_value, ++ volatile int32_t *ptr) ++{ ++ int status = android_atomic_cas(old_value, new_value, ptr); ++ android_memory_barrier(); ++ return status; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int android_atomic_release_cas(int32_t old_value, int32_t new_value, ++ volatile int32_t *ptr) ++{ ++ android_memory_barrier(); ++ return android_atomic_cas(old_value, new_value, ptr); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_add(int32_t increment, volatile int32_t *ptr) ++{ ++ int32_t prev, status; ++ android_memory_barrier(); ++ do { ++ prev = *ptr; ++ status = android_atomic_cas(prev, prev + increment, ptr); ++ } while (__builtin_expect(status != 0, 0)); ++ return prev; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_inc(volatile int32_t *addr) ++{ ++ return android_atomic_add(1, addr); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_dec(volatile int32_t *addr) ++{ ++ return android_atomic_add(-1, addr); ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_and(int32_t value, volatile int32_t *ptr) ++{ ++ int32_t prev, status; ++ android_memory_barrier(); ++ do { ++ prev = *ptr; ++ status = android_atomic_cas(prev, prev & value, ptr); ++ } while (__builtin_expect(status != 0, 0)); ++ return prev; ++} ++ ++extern ANDROID_ATOMIC_INLINE ++int32_t android_atomic_or(int32_t value, volatile int32_t *ptr) ++{ ++ int32_t prev, status; ++ android_memory_barrier(); ++ do { ++ prev = *ptr; ++ status = android_atomic_cas(prev, prev | value, ptr); ++ } while (__builtin_expect(status != 0, 0)); ++ return prev; ++} ++ ++#endif /* ANDROID_CUTILS_ATOMIC_RISCV_H */ +-- +2.17.1 + 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 new file mode 100644 index 0000000000..cf23f3c251 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch @@ -0,0 +1,344 @@ +From dae9a11f3a158357966399aef97c48b5f16934d9 Mon Sep 17 00:00:00 2001 +From: Jiacheng Liu <jiacheng.liu@mediatek.com> +Date: Sat, 24 Jul 2021 11:01:18 +0800 +Subject: [PATCH] android-tools: adb: add u3 ss descriptor support + +Porting u3 Superspeed descriptor support to open-embedded android-tools package. +This patch origins from the the patch in android project [1], but has been +modified for backporting to android-tools_5.1.1.r37. + +[1] https://android.googlesource.com/platform/system/core/+/d6ee9f26a5163af4121f4380264fcbd4e6851a17%5E%21 + +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/adb/usb_linux_client.c b/adb/usb_linux_client.c +index 6e8b5bb..884e85e 100644 +--- a/adb/usb_linux_client.c ++++ b/adb/usb_linux_client.c +@@ -31,8 +31,10 @@ + #define TRACE_TAG TRACE_USB + #include "adb.h" + ++#define USB_EXT_PROP_UNICODE 1 + #define MAX_PACKET_SIZE_FS 64 + #define MAX_PACKET_SIZE_HS 512 ++#define MAX_PACKET_SIZE_SS 1024 + + #if __BYTE_ORDER == __LITTLE_ENDIAN + # define cpu_to_le16(x) (x) +@@ -62,74 +64,185 @@ struct usb_handle + int bulk_in; /* "in" from the host's perspective => sink for adbd */ + }; + +-static const struct { +- struct usb_functionfs_descs_head header; +- struct { +- struct usb_interface_descriptor intf; +- struct usb_endpoint_descriptor_no_audio source; +- struct usb_endpoint_descriptor_no_audio sink; +- } __attribute__((packed)) fs_descs, hs_descs; +-} __attribute__((packed)) descriptors = { +- .header = { +- .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC), +- .length = cpu_to_le32(sizeof(descriptors)), +- .fs_count = 3, +- .hs_count = 3, ++struct func_desc { ++ struct usb_interface_descriptor intf; ++ struct usb_endpoint_descriptor_no_audio source; ++ struct usb_endpoint_descriptor_no_audio sink; ++} __attribute__((packed)); ++ ++struct ss_func_desc { ++ struct usb_interface_descriptor intf; ++ struct usb_endpoint_descriptor_no_audio source; ++ struct usb_ss_ep_comp_descriptor source_comp; ++ struct usb_endpoint_descriptor_no_audio sink; ++ struct usb_ss_ep_comp_descriptor sink_comp; ++} __attribute__((packed)); ++ ++struct desc_v1 { ++ struct usb_functionfs_descs_head_v1 { ++ __le32 magic; ++ __le32 length; ++ __le32 fs_count; ++ __le32 hs_count; ++ } __attribute__((packed)) header; ++ struct func_desc fs_descs, hs_descs; ++} __attribute__((packed)); ++ ++struct usb_os_desc_ext_prop { ++ uint32_t dwSize; ++ uint32_t dwPropertyDataType; ++ ++ // Property name and value are transmitted as UTF-16, but the kernel only ++ // accepts ASCII values and performs the conversion for us. ++ uint16_t wPropertyNameLength; ++ char bPropertyName[20]; ++ ++ uint32_t dwPropertyDataLength; ++ char bProperty[39]; ++} __attribute__((packed)) os_desc_guid = { ++ .dwSize = sizeof(struct usb_os_desc_ext_prop), ++ .dwPropertyDataType = cpu_to_le32(USB_EXT_PROP_UNICODE), ++ .wPropertyNameLength = cpu_to_le16(20), ++ .bPropertyName = "DeviceInterfaceGUID", ++ .dwPropertyDataLength = cpu_to_le32(39), ++ .bProperty = "{F72FE0D4-CBCB-407D-8814-9ED673D0DD6B}", ++}; ++ ++struct usb_ext_prop_values { ++ struct usb_os_desc_ext_prop guid; ++} __attribute__((packed)); ++ ++struct desc_v2 { ++ struct usb_functionfs_descs_head_v2 header; ++ // The rest of the structure depends on the flags in the header. ++ __le32 fs_count; ++ __le32 hs_count; ++ __le32 ss_count; ++ __le32 os_count; ++ struct func_desc fs_descs, hs_descs; ++ struct ss_func_desc ss_descs; ++ struct usb_os_desc_header os_header; ++ struct usb_ext_compat_desc os_desc; ++ struct usb_os_desc_header os_prop_header; ++ struct usb_ext_prop_values os_prop_values; ++} __attribute__((packed)); ++ ++static struct func_desc fs_descriptors = { ++ .intf = { ++ .bLength = sizeof(fs_descriptors.intf), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bNumEndpoints = 2, ++ .bInterfaceClass = ADB_CLASS, ++ .bInterfaceSubClass = ADB_SUBCLASS, ++ .bInterfaceProtocol = ADB_PROTOCOL, ++ .iInterface = 1, /* first string from the provided table */ ++ }, ++ .source = { ++ .bLength = sizeof(fs_descriptors.source), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 1 | USB_DIR_OUT, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_FS, ++ }, ++ .sink = { ++ .bLength = sizeof(fs_descriptors.sink), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 2 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_FS, ++ }, ++}; ++ ++static struct func_desc hs_descriptors = { ++ .intf = { ++ .bLength = sizeof(hs_descriptors.intf), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bNumEndpoints = 2, ++ .bInterfaceClass = ADB_CLASS, ++ .bInterfaceSubClass = ADB_SUBCLASS, ++ .bInterfaceProtocol = ADB_PROTOCOL, ++ .iInterface = 1, /* first string from the provided table */ ++ }, ++ .source = { ++ .bLength = sizeof(hs_descriptors.source), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 1 | USB_DIR_OUT, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_HS, ++ }, ++ .sink = { ++ .bLength = sizeof(hs_descriptors.sink), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 2 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_HS, ++ }, ++}; ++ ++static struct ss_func_desc ss_descriptors = { ++ .intf = { ++ .bLength = sizeof(ss_descriptors.intf), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bNumEndpoints = 2, ++ .bInterfaceClass = ADB_CLASS, ++ .bInterfaceSubClass = ADB_SUBCLASS, ++ .bInterfaceProtocol = ADB_PROTOCOL, ++ .iInterface = 1, /* first string from the provided table */ ++ }, ++ .source = { ++ .bLength = sizeof(ss_descriptors.source), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 1 | USB_DIR_OUT, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_SS, ++ }, ++ .source_comp = { ++ .bLength = sizeof(ss_descriptors.source_comp), ++ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, ++ .bMaxBurst = 4, + }, +- .fs_descs = { +- .intf = { +- .bLength = sizeof(descriptors.fs_descs.intf), +- .bDescriptorType = USB_DT_INTERFACE, +- .bInterfaceNumber = 0, +- .bNumEndpoints = 2, +- .bInterfaceClass = ADB_CLASS, +- .bInterfaceSubClass = ADB_SUBCLASS, +- .bInterfaceProtocol = ADB_PROTOCOL, +- .iInterface = 1, /* first string from the provided table */ +- }, +- .source = { +- .bLength = sizeof(descriptors.fs_descs.source), +- .bDescriptorType = USB_DT_ENDPOINT, +- .bEndpointAddress = 1 | USB_DIR_OUT, +- .bmAttributes = USB_ENDPOINT_XFER_BULK, +- .wMaxPacketSize = MAX_PACKET_SIZE_FS, +- }, +- .sink = { +- .bLength = sizeof(descriptors.fs_descs.sink), +- .bDescriptorType = USB_DT_ENDPOINT, +- .bEndpointAddress = 2 | USB_DIR_IN, +- .bmAttributes = USB_ENDPOINT_XFER_BULK, +- .wMaxPacketSize = MAX_PACKET_SIZE_FS, +- }, ++ .sink = { ++ .bLength = sizeof(ss_descriptors.sink), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 2 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = MAX_PACKET_SIZE_SS, + }, +- .hs_descs = { +- .intf = { +- .bLength = sizeof(descriptors.hs_descs.intf), +- .bDescriptorType = USB_DT_INTERFACE, +- .bInterfaceNumber = 0, +- .bNumEndpoints = 2, +- .bInterfaceClass = ADB_CLASS, +- .bInterfaceSubClass = ADB_SUBCLASS, +- .bInterfaceProtocol = ADB_PROTOCOL, +- .iInterface = 1, /* first string from the provided table */ +- }, +- .source = { +- .bLength = sizeof(descriptors.hs_descs.source), +- .bDescriptorType = USB_DT_ENDPOINT, +- .bEndpointAddress = 1 | USB_DIR_OUT, +- .bmAttributes = USB_ENDPOINT_XFER_BULK, +- .wMaxPacketSize = MAX_PACKET_SIZE_HS, +- }, +- .sink = { +- .bLength = sizeof(descriptors.hs_descs.sink), +- .bDescriptorType = USB_DT_ENDPOINT, +- .bEndpointAddress = 2 | USB_DIR_IN, +- .bmAttributes = USB_ENDPOINT_XFER_BULK, +- .wMaxPacketSize = MAX_PACKET_SIZE_HS, +- }, ++ .sink_comp = { ++ .bLength = sizeof(ss_descriptors.sink_comp), ++ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, ++ .bMaxBurst = 4, + }, + }; + ++struct usb_ext_compat_desc os_desc_compat = { ++ .bFirstInterfaceNumber = 0, ++ .Reserved1 = cpu_to_le32(1), ++ .CompatibleID = { 'W', 'I', 'N', 'U', 'S', 'B', '\0', '\0'}, ++ .SubCompatibleID = {0}, ++ .Reserved2 = {0}, ++}; ++ ++static struct usb_os_desc_header os_desc_header = { ++ .interface = cpu_to_le32(0), ++ .dwLength = cpu_to_le32(sizeof(os_desc_header) + sizeof(os_desc_compat)), ++ .bcdVersion = cpu_to_le32(1), ++ .wIndex = cpu_to_le32(4), ++ .bCount = cpu_to_le32(1), ++ .Reserved = cpu_to_le32(0), ++}; ++ ++static struct usb_os_desc_header os_prop_header = { ++ .interface = cpu_to_le32(0), ++ .dwLength = cpu_to_le32(sizeof(os_desc_header) + sizeof(struct usb_ext_prop_values)), ++ .bcdVersion = cpu_to_le32(1), ++ .wIndex = cpu_to_le32(5), ++ .wCount = cpu_to_le16(1), ++}; ++ + #define STR_INTERFACE_ "ADB Interface" + + static const struct { +@@ -151,8 +264,6 @@ static const struct { + }, + }; + +- +- + static void *usb_adb_open_thread(void *x) + { + struct usb_handle *usb = (struct usb_handle *)x; +@@ -270,6 +381,24 @@ static void usb_adb_init() + static void init_functionfs(struct usb_handle *h) + { + ssize_t ret; ++ struct desc_v1 v1_descriptor = {}; ++ struct desc_v2 v2_descriptor = {}; ++ ++ v2_descriptor.header.magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2); ++ v2_descriptor.header.length = cpu_to_le32(sizeof(v2_descriptor)); ++ v2_descriptor.header.flags = FUNCTIONFS_HAS_FS_DESC | FUNCTIONFS_HAS_HS_DESC | ++ FUNCTIONFS_HAS_SS_DESC | FUNCTIONFS_HAS_MS_OS_DESC; ++ v2_descriptor.fs_count = 3; ++ v2_descriptor.hs_count = 3; ++ v2_descriptor.ss_count = 5; ++ v2_descriptor.os_count = 2; ++ v2_descriptor.fs_descs = fs_descriptors; ++ v2_descriptor.hs_descs = hs_descriptors; ++ v2_descriptor.ss_descs = ss_descriptors; ++ v2_descriptor.os_header = os_desc_header; ++ v2_descriptor.os_desc = os_desc_compat; ++ v2_descriptor.os_prop_header = os_prop_header; ++ v2_descriptor.os_prop_values.guid = os_desc_guid; + + if (h->control < 0) { // might have already done this before + D("OPENING %s\n", USB_FFS_ADB_EP0); +@@ -279,10 +408,20 @@ static void init_functionfs(struct usb_handle *h) + goto err; + } + +- ret = adb_write(h->control, &descriptors, sizeof(descriptors)); ++ ret = adb_write(h->control, &v2_descriptor, sizeof(v2_descriptor)); + if (ret < 0) { +- D("[ %s: write descriptors failed: errno=%d ]\n", USB_FFS_ADB_EP0, errno); +- goto err; ++ D("[ %s: write v2_descriptor failed: errno=%d ]\n", USB_FFS_ADB_EP0, errno); ++ v1_descriptor.header.magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC); ++ v1_descriptor.header.length = cpu_to_le32(sizeof(v1_descriptor)); ++ v1_descriptor.header.fs_count = 3; ++ v1_descriptor.header.hs_count = 3; ++ v1_descriptor.fs_descs = fs_descriptors; ++ v1_descriptor.hs_descs = hs_descriptors; ++ ret = adb_write(h->control, &v1_descriptor, sizeof(v1_descriptor)); ++ if (ret < 0) { ++ D("[ %s: failed to write USB descriptors]\n", USB_FFS_ADB_EP0); ++ goto err; ++ } + } + + ret = adb_write(h->control, &strings, sizeof(strings)); +-- +2.18.0 + 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 new file mode 100644 index 0000000000..5009c73a05 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch @@ -0,0 +1,60 @@ +From 7b74d23ed955206a789a96bdc3288593e702afac Mon Sep 17 00:00:00 2001 +From: Sean Anderson <sean.anderson@seco.com> +Date: Thu, 30 Dec 2021 15:16:08 -0500 +Subject: [PATCH] libsparse: Split off most of sparse_file_read_normal into a + helper function + +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] +Signed-off-by: Sean Anderson <sean.anderson@seco.com> +--- + libsparse/sparse_read.c | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c +index 8e188e9a4..ee4abd86a 100644 +--- a/libsparse/sparse_read.c ++++ b/libsparse/sparse_read.c +@@ -353,13 +353,11 @@ static int sparse_file_read_sparse(struct sparse_file *s, int fd, bool crc) + return 0; + } + +-static int sparse_file_read_normal(struct sparse_file *s, int fd) ++static int do_sparse_file_read_normal(struct sparse_file *s, int fd, uint32_t* buf, int64_t offset, ++ int64_t remain) + { + int ret; +- uint32_t *buf = malloc(s->block_size); +- unsigned int block = 0; +- int64_t remain = s->len; +- int64_t offset = 0; ++ unsigned int block = offset / s->block_size; + unsigned int to_read; + unsigned int i; + bool sparse_block; +@@ -403,6 +401,19 @@ static int sparse_file_read_normal(struct sparse_file *s, int fd) + return 0; + } + ++static int sparse_file_read_normal(struct sparse_file* s, int fd) ++{ ++ int ret; ++ uint32_t* buf = (uint32_t*)malloc(s->block_size); ++ ++ if (!buf) ++ return -ENOMEM; ++ ++ ret = do_sparse_file_read_normal(s, fd, buf, 0, s->len); ++ free(buf); ++ return ret; ++} ++ + int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc) + { + if (crc && !sparse) { +-- +2.35.1.1320.gc452695387.dirty + diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch new file mode 100644 index 0000000000..e5221d2b4c --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch @@ -0,0 +1,188 @@ +From 41574b628ec4229c24dfe289af7b6978edcca4ed Mon Sep 17 00:00:00 2001 +From: Sean Anderson <sean.anderson@seco.com> +Date: Thu, 30 Dec 2021 15:19:41 -0500 +Subject: [PATCH] libsparse: Add "hole" mode to sparse_file_read + +This adds support for filesystem-level sparse files. These files have +holes which are not stored in the filesystem and when read are full of +zeros. While these zeros may be significant in some types of files, +other types of files may not care about the contents of holes. For +example, most filesystem creation tools write to all the blocks they +care about. Those blocks not written to will remain holes, and can be +safely represented by "don't care" chunks. Using "don't care" chunks +instead of fill chunks can result in a substantial reduction of the time +it takes to program a sparse image. + +To accomplish this, we extend the existing "sparse" boolean parameter to +be an enum of mode types. This enum represents the strategy we take when +reading in a file. For the most part the implementation is +straightforward. We use lseek to determine where the holes in the file +are, and then use do_sparse_file_read_normal to create chunks for the +data section. Note that every file has an implicit hole at its end. + +Change-Id: I0cfbf08886fca9a91cb753ec8734c84fcbe52c9f +Upstream-Status: Backport [f96466b05543b984ef7315d830bab4a409228d35] +Signed-off-by: Sean Anderson <sean.anderson@seco.com> +--- + libsparse/img2simg.c | 2 +- + libsparse/include/sparse/sparse.h | 32 +++++++++++--- + libsparse/sparse_read.c | 71 +++++++++++++++++++++++++++++-- + 3 files changed, 93 insertions(+), 12 deletions(-) + +diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c +index a0db36f45..2e171b613 100644 +--- a/libsparse/img2simg.c ++++ b/libsparse/img2simg.c +@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) + } + + sparse_file_verbose(s); +- ret = sparse_file_read(s, in, false, false); ++ ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false); + if (ret) { + fprintf(stderr, "Failed to read file\n"); + exit(-1); +diff --git a/libsparse/include/sparse/sparse.h b/libsparse/include/sparse/sparse.h +index 8b757d22a..b68aa21a8 100644 +--- a/libsparse/include/sparse/sparse.h ++++ b/libsparse/include/sparse/sparse.h +@@ -196,23 +196,41 @@ int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc); + int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc, + int (*write)(void *priv, const void *data, int len), void *priv); + ++/** ++ * enum sparse_read_mode - The method to use when reading in files ++ * @SPARSE_READ_MODE_NORMAL: The input is a regular file. Constant chunks of ++ * data (including holes) will be be converted to ++ * fill chunks. ++ * @SPARSE_READ_MODE_SPARSE: The input is an Android sparse file. ++ * @SPARSE_READ_MODE_HOLE: The input is a regular file. Holes will be converted ++ * to "don't care" chunks. Other constant chunks will ++ * be converted to fill chunks. ++ */ ++enum sparse_read_mode { ++ SPARSE_READ_MODE_NORMAL = false, ++ SPARSE_READ_MODE_SPARSE = true, ++ SPARSE_READ_MODE_HOLE, ++}; ++ + /** + * sparse_file_read - read a file into a sparse file cookie + * + * @s - sparse file cookie + * @fd - file descriptor to read from +- * @sparse - read a file in the Android sparse file format ++ * @mode - mode to use when reading the input file + * @crc - verify the crc of a file in the Android sparse file format + * +- * Reads a file into a sparse file cookie. If sparse is true, the file is +- * assumed to be in the Android sparse file format. If sparse is false, the +- * file will be sparsed by looking for block aligned chunks of all zeros or +- * another 32 bit value. If crc is true, the crc of the sparse file will be +- * verified. ++ * Reads a file into a sparse file cookie. If @mode is ++ * %SPARSE_READ_MODE_SPARSE, the file is assumed to be in the Android sparse ++ * file format. If @mode is %SPARSE_READ_MODE_NORMAL, the file will be sparsed ++ * by looking for block aligned chunks of all zeros or another 32 bit value. If ++ * @mode is %SPARSE_READ_MODE_HOLE, the file will be sparsed like ++ * %SPARSE_READ_MODE_NORMAL, but holes in the file will be converted to "don't ++ * care" chunks. If crc is true, the crc of the sparse file will be verified. + * + * Returns 0 on success, negative errno on error. + */ +-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc); ++int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc); + + /** + * sparse_file_import - import an existing sparse file +diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c +index ee4abd86a..81f48cc13 100644 +--- a/libsparse/sparse_read.c ++++ b/libsparse/sparse_read.c +@@ -414,16 +414,79 @@ static int sparse_file_read_normal(struct sparse_file* s, int fd) + return ret; + } + +-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc) ++#ifdef __linux__ ++static int sparse_file_read_hole(struct sparse_file* s, int fd) + { +- if (crc && !sparse) { ++ int ret; ++ uint32_t* buf = (uint32_t*)malloc(s->block_size); ++ int64_t end = 0; ++ int64_t start = 0; ++ ++ if (!buf) { ++ return -ENOMEM; ++ } ++ ++ do { ++ start = lseek(fd, end, SEEK_DATA); ++ if (start < 0) { ++ if (errno == ENXIO) ++ /* The rest of the file is a hole */ ++ break; ++ ++ error("could not seek to data"); ++ free(buf); ++ return -errno; ++ } else if (start > s->len) { ++ break; ++ } ++ ++ end = lseek(fd, start, SEEK_HOLE); ++ if (end < 0) { ++ error("could not seek to end"); ++ free(buf); ++ return -errno; ++ } ++ end = min(end, s->len); ++ ++ start = ALIGN_DOWN(start, s->block_size); ++ end = ALIGN(end, s->block_size); ++ if (lseek(fd, start, SEEK_SET) < 0) { ++ free(buf); ++ return -errno; ++ } ++ ++ ret = do_sparse_file_read_normal(s, fd, buf, start, end - start); ++ if (ret) { ++ free(buf); ++ return ret; ++ } ++ } while (end < s->len); ++ ++ free(buf); ++ return 0; ++} ++#else ++static int sparse_file_read_hole(struct sparse_file* s __unused, int fd __unused) ++{ ++ return -ENOTSUP; ++} ++#endif ++ ++int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc) ++{ ++ if (crc && mode != SPARSE_READ_MODE_SPARSE) { + return -EINVAL; + } + +- if (sparse) { ++ switch (mode) { ++ case SPARSE_READ_MODE_SPARSE: + return sparse_file_read_sparse(s, fd, crc); +- } else { ++ case SPARSE_READ_MODE_NORMAL: + return sparse_file_read_normal(s, fd); ++ case SPARSE_READ_MODE_HOLE: ++ return sparse_file_read_hole(s, fd); ++ default: ++ return -EINVAL; + } + } + +-- +2.35.1.1320.gc452695387.dirty + diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch new file mode 100644 index 0000000000..9d19f58095 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch @@ -0,0 +1,114 @@ +From 00cce57eff1a0de3b93efa5da225e9eb33d19659 Mon Sep 17 00:00:00 2001 +From: Sean Anderson <sean.anderson@seco.com> +Date: Thu, 30 Dec 2021 15:34:28 -0500 +Subject: [PATCH] img2simg: Add support for converting holes to "don't care" + chunks + +This adds support for converting files with holes to "don't care" +chunks. This can result in a substantial reduction in the time it takes +to program an image if it has many holes. + +Generally, constants compared to argc have been reduced by one, since we +no longer have the program name as the first argument. + +Change-Id: I00750edc07d6415dcc07ae0351e9397b0222b7ba +Upstream-Status: Backport [6150b00b6025918da8c28e5c2f929ecdf480a9d6] +Signed-off-by: Sean Anderson <sean.anderson@seco.com> +--- + libsparse/img2simg.c | 41 ++++++++++++++++++++++++++++++----------- + 1 file changed, 30 insertions(+), 11 deletions(-) + +diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c +index 2e171b613..c985d5449 100644 +--- a/libsparse/img2simg.c ++++ b/libsparse/img2simg.c +@@ -40,25 +40,42 @@ + + void usage() + { +- fprintf(stderr, "Usage: img2simg <raw_image_file> <sparse_image_file> [<block_size>]\n"); ++ fprintf(stderr, "Usage: img2simg [-s] <raw_image_file> <sparse_image_file> [<block_size>]\n"); + } + + int main(int argc, char *argv[]) + { ++ char *arg_in; ++ char *arg_out; ++ enum sparse_read_mode mode = SPARSE_READ_MODE_NORMAL; ++ int extra; + int in; ++ int opt; + int out; + int ret; + struct sparse_file *s; + unsigned int block_size = 4096; + off64_t len; + +- if (argc < 3 || argc > 4) { ++ while ((opt = getopt(argc, argv, "s")) != -1) { ++ switch (opt) { ++ case 's': ++ mode = SPARSE_READ_MODE_HOLE; ++ break; ++ default: ++ usage(); ++ exit(-1); ++ } ++ } ++ ++ extra = argc - optind; ++ if (extra < 2 || extra > 3) { + usage(); + exit(-1); + } + +- if (argc == 4) { +- block_size = atoi(argv[3]); ++ if (extra == 3) { ++ block_size = atoi(argv[optind + 2]); + } + + if (block_size < 1024 || block_size % 4 != 0) { +@@ -66,22 +83,24 @@ int main(int argc, char *argv[]) + exit(-1); + } + +- if (strcmp(argv[1], "-") == 0) { ++ arg_in = argv[optind]; ++ if (strcmp(arg_in, "-") == 0) { + in = STDIN_FILENO; + } else { +- in = open(argv[1], O_RDONLY | O_BINARY); ++ in = open(arg_in, O_RDONLY | O_BINARY); + if (in < 0) { +- fprintf(stderr, "Cannot open input file %s\n", argv[1]); ++ fprintf(stderr, "Cannot open input file %s\n", arg_in); + exit(-1); + } + } + +- if (strcmp(argv[2], "-") == 0) { ++ arg_out = argv[optind + 1]; ++ if (strcmp(arg_out, "-") == 0) { + out = STDOUT_FILENO; + } else { +- out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664); ++ out = open(arg_out, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664); + if (out < 0) { +- fprintf(stderr, "Cannot open output file %s\n", argv[2]); ++ fprintf(stderr, "Cannot open output file %s\n", arg_out); + exit(-1); + } + } +@@ -96,7 +115,7 @@ int main(int argc, char *argv[]) + } + + sparse_file_verbose(s); +- ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false); ++ ret = sparse_file_read(s, in, mode, false); + if (ret) { + fprintf(stderr, "Failed to read file\n"); + exit(-1); +-- +2.35.1.1320.gc452695387.dirty + 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 8524517cb6..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,29 +24,28 @@ 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(-) --- a/src/procattr.c +++ b/src/procattr.c -@@ -8,7 +8,19 @@ +@@ -8,12 +8,16 @@ #include "selinux_internal.h" #include "policy.h" -#ifndef __BIONIC__ +/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and + * has a definition for it */ -+#ifdef __BIONIC__ -+ #define OVERRIDE_GETTID 0 -+#elif !defined(__GLIBC_PREREQ) -+ #define OVERRIDE_GETTID 1 -+#elif !__GLIBC_PREREQ(2,29) -+ #define OVERRIDE_GETTID 1 -+#else -+ #define OVERRIDE_GETTID 0 -+#endif -+ -+#if OVERRIDE_GETTID ++#if defined(__GLIBC_) ++#if !__GLIBC_PREREQ(2,30) static pid_t gettid(void) { return syscall(__NR_gettid); + } + #endif ++#endif + + static int getprocattrcon(char ** context, + pid_t pid, const char *attr) 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 c0d08db174..6343256d39 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 @@ -1,14 +1,14 @@ DESCRIPTION = "Different utilities from Android" SECTION = "console/utils" -LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause" +LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-2-Clause & BSD-3-Clause" LIC_FILES_CHKSUM = " \ file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ - file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \ file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ " DEPENDS = "libbsd libpcre zlib libcap" -DEPENDS_append_class-target = " openssl" +DEPENDS:append:class-target = " openssl" ANDROID_MIRROR = "android.googlesource.com" @@ -19,6 +19,7 @@ SRCREV_libhardware = "be55eb1f4d840c82ffaf7c47460df17ff5bc4d9b" SRCREV_libselinux = "07e9e1339ad1ba608acfba9dce2d0f474b252feb" SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc" +SRCREV_FORMAT = "core_extras_libhardware_libselinux_build" SRC_URI = " \ git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=git/system/core \ git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \ @@ -38,11 +39,19 @@ 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 \ file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \ file://android-tools-adbd.service \ + file://build/0001-Riscv-Add-risc-v-Android-config-header.patch;patchdir=build \ file://gitignore \ file://adb.mk;subdir=${BPN} \ file://adbd.mk;subdir=${BPN} \ @@ -56,32 +65,34 @@ S = "${WORKDIR}/git" B = "${WORKDIR}/${BPN}" # http://errors.yoctoproject.org/Errors/Details/133881/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" -COMPATIBLE_HOST_powerpc = "(null)" -COMPATIBLE_HOST_powerpc64 = "(null)" +COMPATIBLE_HOST:powerpc = "(null)" +COMPATIBLE_HOST:powerpc64 = "(null)" +COMPATIBLE_HOST:powerpc64le = "(null)" inherit systemd -SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service" +SYSTEMD_PACKAGES = "${PN}-adbd" +SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service" # Find libbsd headers during native builds -CC_append_class-native = " -I${STAGING_INCDIR}" -CC_append_class-nativesdk = " -I${STAGING_INCDIR}" +CC:append:class-native = " -I${STAGING_INCDIR}" +CC:append:class-nativesdk = " -I${STAGING_INCDIR}" TOOLS = "adb fastboot ext4_utils mkbootimg adbd" # Adb needs sys/capability.h, which is not available for native* -TOOLS_class-native = "fastboot ext4_utils mkbootimg" -TOOLS_class-nativesdk = "fastboot ext4_utils mkbootimg" +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} @@ -93,6 +104,9 @@ do_compile() { aarch64) export android_arch=linux-arm64 ;; + riscv64) + export android_arch=linux-riscv64 + ;; mips|mipsel) export android_arch=linux-mips ;; @@ -109,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 } @@ -126,7 +140,7 @@ do_install() { install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} fi - if echo ${TOOLS} | grep -q "adb " ; then + if echo ${TOOLS} | grep -q "adb\>" ; then install -d ${D}${bindir} install -m0755 ${B}/adb/adb ${D}${bindir} fi @@ -137,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 @@ -151,11 +165,17 @@ do_install() { fi } -PACKAGES += "${PN}-fstools" +PACKAGES =+ "${PN}-fstools ${PN}-adbd" + +RDEPENDS:${PN}-adbd = "${PN}-conf" +RDEPENDS:${PN}-fstools = "bash" -RDEPENDS_${BPN} = "${BPN}-conf bash" +FILES:${PN}-adbd = "\ + ${bindir}/adbd \ + ${systemd_unitdir}/system/android-tools-adbd.service \ +" -FILES_${PN}-fstools = "\ +FILES:${PN}-fstools = "\ ${bindir}/ext2simg \ ${bindir}/ext4fixup \ ${bindir}/img2simg \ @@ -167,3 +187,9 @@ FILES_${PN}-fstools = "\ " BBCLASSEXTEND = "native" + +android_tools_enable_devmode() { + touch ${IMAGE_ROOTFS}/var/usb-debugging-enabled +} + +ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}" diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb b/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb new file mode 100644 index 0000000000..d872c4dbb5 --- /dev/null +++ b/meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb @@ -0,0 +1,34 @@ +SUMMARY = "Tools for tracing OpenGL, Direct3D, and other graphics APIs" +HOMEPAGE = "http://apitrace.github.io/" +SECTION = "console/tools" +LICENSE = "MIT & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \ + file://thirdparty/snappy/COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" + +SRCREV = "9352fc02bba106fbbeef9e8452ef34643c0d0764" +PV .= "+11.1+git" +SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ + " + +S = "${WORKDIR}/git" + +DEPENDS += "zlib libpng python3-native" + +inherit cmake + +PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} " +PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF,libx11" + +EXTRA_OECMAKE += "\ + -DENABLE_GUI=OFF \ + -DENABLE_STATIC_LIBGCC=OFF \ + -DENABLE_STATIC_LIBSTDCXX=OFF \ + -DPython3_ROOT_DIR=/usr/bin/python3-native \ +" + +# Use the bundled snappy library +EXTRA_OECMAKE += "\ + -DENABLE_STATIC_SNAPPY=ON \ +" + +SECURITY_CFLAGS:toolchain-clang = "" 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 new file mode 100644 index 0000000000..d0e0446eb8 --- /dev/null +++ b/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13-native_2.13.bb @@ -0,0 +1,67 @@ +SUMMARY = "A GNU tool that produce shell scripts to automatically configure software" +DESCRIPTION = "Autoconf is an extensible package of M4 macros that produce shell scripts to automatically \ +configure software source code packages. Autoconf creates a configuration script for a package from a template \ +file that lists the operating system features that the package can use, in the form of M4 macro calls." +SECTION = "devel" + +HOMEPAGE = "http://www.gnu.org/software/autoconf/" + +LICENSE = "GPL-3.0-only" +LICENSE = "GPL-2.0-only & GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f" + +SRC_URI = " \ + ${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \ + file://0001-Add-config.guess-config.sub-install-to-destdir.patch \ +" + +S = "${WORKDIR}/${BPN}" +SRC_URI[md5sum] = "9de56d4a161a723228220b0f425dc711" +SRC_URI[sha256sum] = "f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e" + +inherit texinfo native + +DEPENDS += "m4-native gnu-config-native" +RDEPENDS:${PN} = "m4-native gnu-config-native" + +PERL = "${USRBINPATH}/perl" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" + +CONFIGUREOPTS = " \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${includedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + --disable-silent-rules \ +" + +EXTRA_OECONF += "ac_cv_path_M4=m4 ac_cv_prog_TEST_EMACS=no" + +do_configure() { + ./configure ${CONFIGUREOPTS} +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + + # avoid conflicts with standard autotools + ver="213" + for file in `find ${D}${bindir} -type f`; do + mv $file $file$ver + done + mv ${D}${datadir}/autoconf ${D}${datadir}/autoconf213 +} diff --git a/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13/0001-Add-config.guess-config.sub-install-to-destdir.patch b/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13/0001-Add-config.guess-config.sub-install-to-destdir.patch new file mode 100644 index 0000000000..f6e9ecb9a0 --- /dev/null +++ b/meta-oe/recipes-devtools/autoconf-2.13/autoconf-2.13/0001-Add-config.guess-config.sub-install-to-destdir.patch @@ -0,0 +1,67 @@ +From 3d3e23f7b14e87849405a4e109a69b76696615fc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Wed, 11 Dec 2019 23:18:19 +0100 +Subject: [PATCH] Add config.guess config.sub / install to destdir +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + Makefile.in | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index a6c94d4..4b1b708 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -137,23 +137,23 @@ installcheck: all install + cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@ + + installdirs: +- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir) ++ $(SHELL) ${srcdir}/mkinstalldirs ${DESTDIR}$(bindir) ${DESTDIR}$(infodir) ${DESTDIR}$(acdatadir) + + install: all $(M4FILES) acconfig.h installdirs install-info + for p in $(ASCRIPTS); do \ +- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + for i in $(M4FROZEN); do \ +- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \ ++ $(INSTALL_DATA) $$i ${DESTDIR}$(acdatadir)/$$i; \ + done + for i in $(M4FILES) acconfig.h; do \ +- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \ ++ $(INSTALL_DATA) $(srcdir)/$$i ${DESTDIR}$(acdatadir)/$$i; \ + done + -if test -f autoscan; then \ +- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \ ++ $(INSTALL_PROGRAM) autoscan ${DESTDIR}$(bindir)/`echo autoscan|sed '$(transform)'`; \ + for i in acfunctions acheaders acidentifiers acprograms \ +- acmakevars; do \ +- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \ ++ acmakevars config.guess config.sub; do \ ++ $(INSTALL_DATA) $(srcdir)/$$i ${DESTDIR}$(acdatadir)/$$i; \ + done; \ + else :; fi + +@@ -161,11 +161,11 @@ install: all $(M4FILES) acconfig.h installdirs install-info + install-info: info installdirs + if test -f autoconf.info; then \ + for i in *.info*; do \ +- $(INSTALL_DATA) $$i $(infodir)/$$i; \ ++ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \ + done; \ + else \ + for i in $(srcdir)/*.info*; do \ +- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \ ++ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \ + done; \ + fi + +-- +2.21.0 + diff --git a/meta-oe/recipes-devtools/bootchart/bootchart/0001-svg-add-rudimentary-support-for-ARM-cpuinfo.patch b/meta-oe/recipes-devtools/bootchart/bootchart/0001-svg-add-rudimentary-support-for-ARM-cpuinfo.patch deleted file mode 100644 index 4581ef25fc..0000000000 --- a/meta-oe/recipes-devtools/bootchart/bootchart/0001-svg-add-rudimentary-support-for-ARM-cpuinfo.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 8d40b4c286e005e82fa50b66fbbbde22b7e65e15 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Sun, 20 May 2012 21:35:34 +0200 -Subject: [PATCH 1/2] svg: add rudimentary support for ARM cpuinfo - -On ARM /proc/cpuinfo looks like this: - -root@beagleboneA3-0428:~# cat /proc/cpuinfo -Processor : ARMv7 Processor rev 2 (v7l) -BogoMIPS : 498.89 -Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls -CPU implementer : 0x41 -CPU architecture: 7 -CPU variant : 0x3 -CPU part : 0xc08 -CPU revision : 2 - -Hardware : am335xevm -Revision : 0000 -Serial : 0000000000000000 - -So no real way to get the actual SoC name, TI AM3359, but a lot better than 'Unknown' - -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> ---- - -Upstream-Status: submitted - - svg.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/svg.c b/svg.c -index 80e0292..53724b2 100644 ---- a/svg.c -+++ b/svg.c -@@ -178,6 +178,10 @@ void svg_title(void) - strncpy(cpu, &buf[13], 255); - break; - } -+ if (strstr(buf, "Processor")) { -+ strncpy(cpu, &buf[12], 255); -+ break; -+ } - } - fclose(f); - } --- -1.7.10 - diff --git a/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch b/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch deleted file mode 100644 index f63d98aee5..0000000000 --- a/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e3adb4c312c6ba3491b7c173559efac7a53e5abc Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Sun, 20 May 2012 22:12:29 +0200 -Subject: [PATCH 2/2] svg: open /etc/os-release and use PRETTY_NAME for the - 'Build' name - -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> ---- - -Upstream-Status: Submitted - - svg.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/svg.c b/svg.c -index 53724b2..c675d84 100644 ---- a/svg.c -+++ b/svg.c -@@ -194,6 +194,17 @@ void svg_title(void) - fclose(f); - } - -+ f = fopen("/etc/os-release", "r"); -+ if(f) { -+ while (fgets(buf, 255, f)) { -+ if (strstr(buf, "PRETTY_NAME=")) { -+ strncpy(build, &buf[12], 255); -+ break; -+ } -+ } -+ fclose(f); -+ } -+ - svg("<text class=\"t1\" x=\"0\" y=\"30\">Bootchart for %s - %s</text>\n", - uts.nodename, date); - svg("<text class=\"t2\" x=\"20\" y=\"50\">System: %s %s %s %s</text>\n", --- -1.7.10 - diff --git a/meta-oe/recipes-devtools/bootchart/bootchart_git.bb b/meta-oe/recipes-devtools/bootchart/bootchart_git.bb deleted file mode 100644 index 2b75eaac9d..0000000000 --- a/meta-oe/recipes-devtools/bootchart/bootchart_git.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "Monitors where the system spends its time at start, creating a graph of all processes, disk utilization, and wait time." -HOMEPAGE = "http://meego.gitorious.org/meego-developer-tools/bootchart" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" - -PV = "1.17" -PR = "r1" -PE = "1" - -SRC_URI = "git://gitorious.org/meego-developer-tools/bootchart.git;protocol=https \ - file://0001-svg-add-rudimentary-support-for-ARM-cpuinfo.patch \ - file://0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch \ -" - -SRCREV = "a2c7561d4060a9f075339bda89e793c76f2ff6dd" - -S = "${WORKDIR}/git" - -inherit autotools - 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 new file mode 100644 index 0000000000..df41b4d6c0 --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch @@ -0,0 +1,49 @@ +From 70441611d4e8200d9d16dfed493873b8c1bb57c5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 15 Mar 2021 11:33:38 -0700 +Subject: [PATCH] Remove HAVE_GETCONTEXT check to add local implementation + +On musl getcontext/setcontext APIs are implemented in libucontext which +can be used + +Upstream-Status: Inappropriate [Musl Specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 12 ------------ + 1 file changed, 12 deletions(-) + +--- a/Makefile.am ++++ b/Makefile.am +@@ -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 +-if !HAVE_GETCONTEXT +-src_client_linux_libbreakpad_client_a_SOURCES += \ +- src/common/linux/breakpad_getcontext.S +-endif + + # 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 +-if !HAVE_GETCONTEXT +-src_client_linux_linux_client_unittest_shlib_SOURCES += \ +- src/common/linux/breakpad_getcontext.S +-endif + + src_client_linux_linux_client_unittest_shlib_CPPFLAGS = \ + $(AM_CPPFLAGS) $(TEST_CFLAGS) +@@ -613,10 +605,6 @@ src_client_linux_linux_client_unittest_s + src/common/string_conversion.o \ + $(TEST_LIBS) \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) +-if !HAVE_GETCONTEXT +-src_client_linux_linux_client_unittest_shlib_SOURCES += \ +- src/common/linux/breakpad_getcontext_unittest.cc +-endif + if ANDROID_HOST + src_client_linux_linux_client_unittest_shlib_LDFLAGS += \ + -llog -lm 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 33bae1a373..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,14 +10,14 @@ 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/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc -index 2596afde..2faeb9e5 100644 --- a/src/client/linux/crash_generation/crash_generation_server.cc +++ b/src/client/linux/crash_generation/crash_generation_server.cc -@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short revents) +@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short // Walk the control payload and extract the file descriptor and validated pid. pid_t crashing_pid = -1; int signal_fd = -1; @@ -28,7 +28,7 @@ index 2596afde..2faeb9e5 100644 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wsign-compare" +#endif - for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr; + for (struct cmsghdr* hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) { +#ifndef __GLIBC__ + #pragma clang diagnostic pop @@ -36,6 +36,3 @@ index 2596afde..2faeb9e5 100644 if (hdr->cmsg_level != SOL_SOCKET) continue; if (hdr->cmsg_type == SCM_RIGHTS) { --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch deleted file mode 100644 index bc79727edd..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 57ecf7205feedd23f901e1bb9d193787e559e433 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 23 Jan 2018 15:13:26 -0800 -Subject: [PATCH] disable calls to getcontext() with musl - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - src/client/linux/handler/exception_handler.cc | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -Index: git/src/client/linux/handler/exception_handler.cc -=================================================================== ---- git.orig/src/client/linux/handler/exception_handler.cc -+++ git/src/client/linux/handler/exception_handler.cc -@@ -495,7 +495,19 @@ bool ExceptionHandler::SimulateSignalDel - siginfo.si_code = SI_USER; - siginfo.si_pid = getpid(); - ucontext_t context; -+#if defined(__GLIBC__) - getcontext(&context); -+#else -+ // Extreme hack: Allow musl builds to compile - but don't expect them to work. -+ // Although musl provides a definition for getcontext() in ucontext.h (which -+ // enough to build libbreakpad_client) musl does not provide a corresponding -+ // getcontext() function, so builds will fail when attempting to link anything -+ // with libbreakpad_client. Disabling calls to getcontext() is a temporary -+ // hack. The real fix is probably to enable Breakpad's own implementation of -+ // getcontext() when building for musl (it's currently only enabled when -+ // building for Android). -+ memset (&context, 0, sizeof(context)); -+#endif - return HandleSignal(sig, &siginfo, &context); - } - -@@ -680,9 +692,14 @@ bool ExceptionHandler::WriteMinidump() { - sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); - - CrashContext context; -+#if defined(__GLIBC__) - int getcontext_result = getcontext(&context.context); - if (getcontext_result) - return false; -+#else -+ // Extreme hack - see comments above. -+ memset (&context.context, 0, sizeof(context.context)); -+#endif - - #if defined(__i386__) - // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved 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 4583d601a8..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,25 +4,25 @@ 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(+) -Index: git/src/common/linux/elf_core_dump.h -=================================================================== ---- git.orig/src/common/linux/elf_core_dump.h -+++ git/src/common/linux/elf_core_dump.h -@@ -33,10 +33,13 @@ +--- a/src/common/linux/elf_core_dump.h ++++ b/src/common/linux/elf_core_dump.h +@@ -33,10 +33,14 @@ #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ #define COMMON_LINUX_ELF_CORE_DUMP_H_ +#include <config.h> #include <elf.h> + #include <limits.h> #include <link.h> #include <stddef.h> -- +#ifdef HAVE_SYS_REG_H +#include <sys/reg.h> +#endif + #include "common/memory_range.h" - namespace google_breakpad { 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 2b892ad64f..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,14 +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(+) -Index: lss/linux_syscall_support.h -=================================================================== ---- lss.orig/linux_syscall_support.h -+++ lss/linux_syscall_support.h -@@ -793,6 +793,9 @@ struct kernel_statfs { +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -1006,6 +1006,9 @@ struct kernel_statx { #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) #endif @@ -22,17 +22,17 @@ Index: lss/linux_syscall_support.h #if defined(__x86_64__) #ifndef ARCH_SET_GS -@@ -924,6 +927,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 -@@ -1211,6 +1215,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 @@ -43,3 +43,16 @@ Index: lss/linux_syscall_support.h /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 +@@ -1633,6 +1643,12 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom (__NR_Linux + 313) + #endif ++ ++#undef __NR_pread ++#define __NR_pread __NR_pread64 ++#undef __NR_pwrite ++#define __NR_pwrite __NR_pwrite64 ++ + /* End of MIPS (64bit API) definitions */ + #else + #ifndef __NR_setresuid diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch deleted file mode 100644 index 6c097cd22e..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0ba1b3e35e7c743b670bedc3e90001dfb868df10 Mon Sep 17 00:00:00 2001 -From: Felix Janda <felix.janda@posteo.de> -Date: Sun, 1 Feb 2015 13:45:51 +0100 -Subject: [PATCH 2/6] Use _fpstate instead of _libc_fpstate on linux - -glibc defines both. musl libc only the former. ---- - src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++-- - src/client/linux/dump_writer_common/ucontext_reader.h | 2 +- - src/client/linux/minidump_writer/minidump_writer.h | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ git/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstruction - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstruction - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; -Index: git/src/client/linux/dump_writer_common/ucontext_reader.h -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.h -+++ git/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -50,7 +50,7 @@ struct UContextReader { - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); -Index: git/src/client/linux/minidump_writer/minidump_writer.h -=================================================================== ---- git.orig/src/client/linux/minidump_writer/minidump_writer.h -+++ git/src/client/linux/minidump_writer/minidump_writer.h -@@ -48,7 +48,7 @@ class ExceptionHandler; - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch deleted file mode 100644 index cfd9a9b34e..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 15582e19c2545d5ffe8ff07f957d0ed602aeca74 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 23:15:09 -0700 -Subject: [PATCH 2/5] <sys/signal.h> is a nonportable alias for <signal.h> - -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 05936d28..cca023fd 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -78,7 +78,7 @@ - #include <sys/wait.h> - #include <unistd.h> - --#include <sys/signal.h> -+#include <signal.h> - #include <sys/ucontext.h> - #include <sys/user.h> - #include <ucontext.h> --- -2.14.1 - 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 2593ea93ea..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,16 +5,16 @@ 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 - 3 files changed, 11 insertions(+), 3 deletions(-) -Index: git/src/common/stabs_reader.cc -=================================================================== ---- git.orig/src/common/stabs_reader.cc -+++ git/src/common/stabs_reader.cc -@@ -34,7 +34,9 @@ +--- a/src/common/stabs_reader.cc ++++ b/src/common/stabs_reader.cc +@@ -38,7 +38,9 @@ #include "common/stabs_reader.h" #include <assert.h> @@ -24,11 +24,9 @@ Index: git/src/common/stabs_reader.cc #include <string.h> #include <string> -Index: git/src/common/stabs_reader.h -=================================================================== ---- git.orig/src/common/stabs_reader.h -+++ git/src/common/stabs_reader.h -@@ -58,6 +58,30 @@ +--- a/src/common/stabs_reader.h ++++ b/src/common/stabs_reader.h +@@ -54,6 +54,30 @@ #elif defined(HAVE_A_OUT_H) #include <a.out.h> #endif @@ -59,11 +57,9 @@ Index: git/src/common/stabs_reader.h #include <string> #include <vector> -Index: git/src/common/stabs_reader_unittest.cc -=================================================================== ---- git.orig/src/common/stabs_reader_unittest.cc -+++ git/src/common/stabs_reader_unittest.cc -@@ -33,7 +33,9 @@ +--- a/src/common/stabs_reader_unittest.cc ++++ b/src/common/stabs_reader_unittest.cc +@@ -36,7 +36,9 @@ #include <assert.h> #include <errno.h> @@ -73,16 +69,14 @@ Index: git/src/common/stabs_reader_unittest.cc #include <stdarg.h> #include <stdlib.h> #include <string.h> -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD --AC_CHECK_HEADERS([a.out.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h stab.h sys/random.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +-AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h]) + AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes]) 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 525a1555bd..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,38 +6,38 @@ 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(+) -Index: git/src/common/dwarf/elf_reader.cc -=================================================================== ---- git.orig/src/common/dwarf/elf_reader.cc -+++ git/src/common/dwarf/elf_reader.cc -@@ -29,10 +29,13 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE // needed for pread() +--- a/src/common/dwarf/elf_reader.cc ++++ b/src/common/dwarf/elf_reader.cc +@@ -34,12 +34,16 @@ + #include <config.h> // Must come first #endif -- + +#include <config.h> - #include <sys/types.h> - #include <sys/stat.h> + #include <fcntl.h> + #include <limits.h> + #include <string.h> #include <sys/mman.h> + #include <sys/stat.h> + #include <sys/types.h> +#ifdef HAVE_SYS_REG_H +#include <sys/reg.h> +#endif #include <unistd.h> - #include <fcntl.h> - #include <string.h> -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC + + #include <algorithm> +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD --AC_CHECK_HEADERS([a.out.h stab.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h stab.h sys/random.h sys/reg.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +-AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h sys/reg.h]) + AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes]) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch b/meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch deleted file mode 100644 index edf903552d..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch +++ /dev/null @@ -1,76 +0,0 @@ -From d1d7b616219fd47736c804ff4c2f393d7184a75b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 23 Dec 2018 16:58:04 -0800 -Subject: [PATCH] chromium: stack pointer clobber - -Do not add stack pointer to clobber list - -it was being ignored until gcc 9.0 became capable -of flagging this silent ignoring via [1] - -[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813<Paste> - -Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/third_party/lss/linux_syscall_support.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -Index: b/src/third_party/lss/linux_syscall_support.h -=================================================================== ---- a/src/third_party/lss/linux_syscall_support.h -+++ b/src/third_party/lss/linux_syscall_support.h -@@ -1957,7 +1957,7 @@ struct kernel_statfs { - LSS_ENTRYPOINT \ - "pop %%ebx" \ - args \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res) - #undef _syscall0 - #define _syscall0(type,name) \ -@@ -1966,7 +1966,7 @@ struct kernel_statfs { - __asm__ volatile(LSS_ENTRYPOINT \ - : "=a" (__res) \ - : "0" (__NR_##name) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall1 -@@ -2014,7 +2014,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 -@@ -2036,7 +2036,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, -@@ -2122,7 +2122,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); - } - -@@ -2407,7 +2407,7 @@ struct kernel_statfs { - "d"(LSS_SYSCALL_ARG(parent_tidptr)), - "r"(LSS_SYSCALL_ARG(newtls)), - "r"(LSS_SYSCALL_ARG(child_tidptr)) -- : "rsp", "memory", "r8", "r10", "r11", "rcx"); -+ : "memory", "r8", "r10", "r11", "rcx"); - } - LSS_RETURN(int, __res); - } diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch index 42e073b94d..cb323fbdcb 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch @@ -1,77 +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/dump_writer_common/thread_info.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/thread_info.cc -+++ git/src/client/linux/dump_writer_common/thread_info.cc -@@ -229,7 +229,6 @@ void ThreadInfo::FillCPUContext(RawConte - } - - #elif defined(__mips__) -- - uintptr_t ThreadInfo::GetInstructionPointer() const { - return mcontext.pc; - } -@@ -263,8 +262,11 @@ void ThreadInfo::FillCPUContext(RawConte - out->cause = 0; // Not stored in mcontext - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) -+#ifdef __GLIBC__ - out->float_save.regs[i] = mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs; -- -+#else -+ out->float_save.regs[i] = mcontext.fpregs[i]; -+#endif - out->float_save.fpcsr = mcontext.fpc_csr; - #if _MIPS_SIM == _ABIO32 - out->float_save.fir = mcontext.fpc_eir; -Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ git/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -247,8 +247,11 @@ void UContextReader::FillCPUContext(RawC - out->cause = 0; // Not reported in signal context. - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) -+#ifdef __GLIBC__ - out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i]; -- -+#else -+ out->float_save.regs[i] = uc->uc_mcontext.fpregs[i]; -+#endif - out->float_save.fpcsr = uc->uc_mcontext.fpc_csr; - #if _MIPS_SIM == _ABIO32 - out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused. -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__ -Index: git/src/tools/linux/md2core/minidump-2-core.cc -=================================================================== ---- git.orig/src/tools/linux/md2core/minidump-2-core.cc -+++ git/src/tools/linux/md2core/minidump-2-core.cc -@@ -516,8 +516,12 @@ ParseThreadRegisters(CrashedProcess::Thr - thread->mcontext.lo3 = rawregs->lo[2]; - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) { -+#ifdef __GLIBC__ - thread->mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs = - rawregs->float_save.regs[i]; -+#else -+ thread->mcontext.fpregs[i] = rawregs->float_save.regs[i]; -+#endif - } - - thread->mcontext.fpc_csr = rawregs->float_save.fpcsr; + # 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 19bb560445..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,12 +1,11 @@ -Index: lss/linux_syscall_support.h -=================================================================== ---- lss.orig/linux_syscall_support.h -+++ lss/linux_syscall_support.h -@@ -118,21 +118,13 @@ extern "C" { - #include <endian.h> +Upstream-Status: Pending + +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -119,14 +119,7 @@ extern "C" { #ifdef __mips__ --/* Include definitions of the ABI currently in use. */ + /* Include definitions of the ABI currently in use. */ -#ifdef __ANDROID__ -/* Android doesn't have sgidefs.h, but does have asm/sgidefs.h, - * which has the definitions we need. @@ -18,10 +17,3 @@ Index: lss/linux_syscall_support.h #endif #endif - /* The Android NDK's <sys/stat.h> #defines these macros as aliases - * to their non-64 counterparts. To avoid naming conflict, remove them. */ --#ifdef __ANDROID__ -+#if defined(__ANDROID__) || (defined(__linux__) && !defined(__glibc__)) - /* These are restored by the corresponding #pragma pop_macro near - * the end of this file. */ - # pragma push_macro("stat64") diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb index 06f3ee87da..3bf4371e85 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb +++ b/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb @@ -6,51 +6,53 @@ 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=56c24a43c81c3af6fcf590851931489e" +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_gyp" +SRCREV_FORMAT = "breakpad_gtest_protobuf_lss" -SRCREV_breakpad = "5467393a3d1e7ab929fd01d79971701bf4e2c2c6" -#v1.8.0 -SRCREV_gtest = "ec44c6c1675c25b9827aacd08c02433cccde7780" +SRCREV_breakpad = "8988364bcddd9b194b0bf931c10bc125987330ed" +#v1.11.0 +SRCREV_gtest = "e2239ee6043f73722e7aa812a459f54a28552929" SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac" -SRCREV_lss = "a89bf7903f3169e6bc7b8efc10a73a7571de21cf" -SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770" - -SRC_URI = "git://github.com/google/breakpad;name=breakpad \ - git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest \ - git://github.com/google/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf \ - git://chromium.googlesource.com/linux-syscall-support;protocol=https;destsuffix=git/src/third_party/lss;name=lss \ - git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp \ +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 \ 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 \ - file://0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch \ file://0003-Dont-include-stab.h.patch \ file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \ - file://0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch \ file://mcontext.patch \ - file://0001-disable-calls-to-getcontext-with-musl.patch \ + file://0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.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://dont-clobber-rsp.patch;patchdir=src/third_party/lss;striplevel=4 \ " S = "${WORKDIR}/git" CXXFLAGS += "-D_GNU_SOURCE" +LDFLAGS:append:libc-musl = " -lucontext" -COMPATIBLE_HOST_powerpc = "null" +COMPATIBLE_HOST:powerpc = "null" +COMPATIBLE_HOST:powerpc64 = "null" +COMPATIBLE_HOST:powerpc64le = "null" +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" -do_install_append() { +do_install:append() { install -d ${D}${includedir} install -d ${D}${includedir}/breakpad @@ -98,8 +100,8 @@ do_install_append() { PACKAGES =+ "${PN}-minidump-upload ${PN}-sym-upload" -FILES_${PN}-minidump-upload = "${bindir}/minidump_upload" -FILES_${PN}-sym-upload = "${bindir}/sym_upload" +FILES:${PN}-minidump-upload = "${bindir}/minidump_upload" +FILES:${PN}-sym-upload = "${bindir}/sym_upload" SYSROOT_PREPROCESS_FUNCS += "breakpad_populate_sysroot" @@ -119,5 +121,7 @@ breakpad_populate_sysroot() { #| {standard input}:2184: Error: Thumb does not support this addressing mode -- `str r6,[r1,#-4]!' #| {standard input}:2191: Error: lo register required -- `ldr pc,[sp]' #| make: *** [src/client/linux/handler/exception_handler.o] Error 1 -ARM_INSTRUCTION_SET_armv5 = "arm" -ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" + +TOOLCHAIN = "gcc" diff --git a/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb index c6bab5ec2b..cb4aef5224 100644 --- a/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb +++ b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb @@ -5,20 +5,24 @@ SECTION = "console/tools" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://../LICENSE;md5=a05663ae6cca874123bf667a60dca8c9" -SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV}" -SRCREV = "3f44c6db0f0f6c0cab0633f15f15d0a2acd01d19" +SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV};protocol=https" +SRCREV = "1a0e12c0a3ba1f0dbbad45ddfef555166e0a14fc" S = "${WORKDIR}/git/c++" inherit cmake +CXXFLAGS:append:mips = " -latomic" +CXXFLAGS:append:powerpc = " -latomic" +CXXFLAGS:append:riscv32 = " -latomic" + EXTRA_OECMAKE += "\ -DBUILD_TESTING=OFF \ " -FILES_${PN}-compiler = "${bindir}" +FILES:${PN}-compiler = "${bindir}" PACKAGE_BEFORE_PN = "${PN}-compiler" -RDEPENDS_${PN}-dev += "${PN}-compiler" +RDEPENDS:${PN}-dev += "${PN}-compiler" BBCLASSEXTEND = "native nativesdk" 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/remove-help2man.patch b/meta-oe/recipes-devtools/cgdb/cgdb/remove-help2man.patch deleted file mode 100644 index 4358629b7b..0000000000 --- a/meta-oe/recipes-devtools/cgdb/cgdb/remove-help2man.patch +++ /dev/null @@ -1,47 +0,0 @@ -Disable building manpages so that make install doesn't fail due to lack of help2man - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> ---- - configure.ac | 3 --- - doc/Makefile.am | 5 ----- - 2 files changed, 8 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ee7eca0..1f0d924 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -134,9 +134,6 @@ dnl check that the required tools are available to generate documentation - if test "$HAS_MAKEINFO" != "yes" ; then - AC_MSG_ERROR([Please install makeinfo before installing]) - fi --if test "$HAS_HELP2MAN" != "yes" ; then -- AC_MSG_ERROR([Please install help2man]) --fi - - dnl Checking for log10 function in math - I would like to remove this - AC_CHECK_LIB(m, log10) -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 60662f6..0ae0013 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -1,15 +1,10 @@ - info_TEXINFOS = cgdb.texi - cgdb_TEXINFOS = gpl.texi - --dist_man_MANS = cgdb.1 - EXTRA_DIST = cgdb.txt - - dist_pkgdata_DATA = cgdb.txt - --# generate the man page using help2man. --cgdb.1: -- help2man --output=$(top_srcdir)/doc/cgdb.1 $(top_builddir)/cgdb/cgdb$(EXEEXT) -- - cgdb.txt: cgdb.texi $(srcdir)/version.texi $(cgdb_TEXINFOS) - TEXTS = cgdb.txt - text-am: $(TEXTS) --- -1.9.1 - diff --git a/meta-oe/recipes-devtools/cgdb/cgdb_0.6.8.bb b/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb index 74019fb622..922dfc7763 100644 --- a/meta-oe/recipes-devtools/cgdb/cgdb_0.6.8.bb +++ b/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb @@ -2,20 +2,19 @@ SUMMARY = "curses-based interface to GDB" DESCRIPTION = "cgdb is a lightweight curses (terminal-based) interface to the GNU Debugger (GDB)." HOMEPAGE = "http://cgdb.github.io/" SECTION = "devel" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "flex-native readline ncurses" -inherit autotools +inherit autotools texinfo SRC_URI = "http://cgdb.me/files/${BP}.tar.gz \ - file://remove-help2man.patch" -SRC_URI[md5sum] = "7bd38c79bf4d794d239928fef401fca3" -SRC_URI[sha256sum] = "be203e29be295097439ab67efe3dc8261f742c55ff3647718d67d52891f4cf41" + 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" +CACHED_CONFIGUREVARS = "ac_cv_file__dev_ptmx=yes ac_cv_rl_version=6.2 ac_cv_file__proc_self_status=yes" EXTRA_OECONF = "--with-readline=${STAGING_LIBDIR} \ --with-ncurses=${STAGING_LIBDIR}" -RDEPENDS_${PN} = "gdb" +RDEPENDS:${PN} = "gdb" 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.18.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb new file mode 100644 index 0000000000..5e992845a1 --- /dev/null +++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb @@ -0,0 +1,40 @@ +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 + # 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.98.bb b/meta-oe/recipes-devtools/cloc/cloc_1.98.bb new file mode 100644 index 0000000000..ea5f00669f --- /dev/null +++ b/meta-oe/recipes-devtools/cloc/cloc_1.98.bb @@ -0,0 +1,19 @@ +SUMMARY = "Count blank lines, comment lines, and physical lines of source code \ +in many programming languages." + +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] = "5fe0b159eb75718df7308a4f61470eaddf82170733929999e37a3fbb4651cf8a" + +UPSTREAM_CHECK_URI = "https://github.com/AlDanial/${BPN}/releases" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -D -m 0755 ${S}/cloc ${D}${bindir}/cloc +} + +RDEPENDS:${PN} = "perl perl-modules" 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 19767c311e..47a3d88853 100644 --- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb @@ -3,29 +3,30 @@ safe memory reclamation mechanisms and non-blocking data structures \ designed to aid in the design and implementation of high performance \ concurrent systems." -LICENSE = "BSD & Apache-2.0" +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 \ - file://cross.patch \ -" +SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \ + 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 = "(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: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/cpuid/cpuid_20180519.bb b/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb index 533a00026e..ed339e0160 100644 --- a/meta-oe/recipes-devtools/cpuid/cpuid_20180519.bb +++ b/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb @@ -3,19 +3,23 @@ DESCRIPTION = "cpuid dumps detailed information about the CPU(s) gathered \ from the CPUID instruction, and also determines the exact model of CPU(s). \ It supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, \ UMC, NexGen, Rise, and SiS CPUs" -LICENSE = "GPLv2" +HOMEPAGE="http://www.etallen.com/cpuid.html" +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[md5sum] = "b3b4e44ef49575043a91def0207dcc76" -SRC_URI[sha256sum] = "967823be36f23cbc972eb0aa882d069c1d155a5978990ac3bcf425e6a2e7ff9a" +SRC_URI[sha256sum] = "b1c83045efc26076307751e0662d580277f5f9bf89cf027231a7812003c3a4e8" COMPATIBLE_HOST = "(i.86|x86_64).*-linux" -# The install rule from the Makefile has hardcoded paths, so we duplicate -# the actions to accommodate different paths. +inherit perlnative + 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/cscope/cscope_15.8b.bb b/meta-oe/recipes-devtools/cscope/cscope_15.9.bb index 8aa5947d0d..99f3ba85de 100644 --- a/meta-oe/recipes-devtools/cscope/cscope_15.8b.bb +++ b/meta-oe/recipes-devtools/cscope/cscope_15.9.bb @@ -11,14 +11,14 @@ DESCRIPTION = "Cscope is a developer's tool for browsing source code. \ HOMEPAGE = "http://cscope.sourceforge.net/" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d4667b67b483823043fcffa489ea343b" inherit autotools DEPENDS += "ncurses" -SRC_URI = "http://downloads.sourceforge.net/project/cscope/cscope/${PV}/${BP}.tar.gz" +SRC_URI = "http://downloads.sourceforge.net/project/cscope/cscope/v${PV}/${BP}.tar.gz" -SRC_URI[md5sum] = "8f9409a238ee313a96f9f87fe0f3b176" -SRC_URI[sha256sum] = "4889d091f05aa0845384b1e4965aa31d2b20911fb2c001b2cdcffbcb7212d3af" +SRC_URI[md5sum] = "16f3cce078b6c0e42299def4028eea6f" +SRC_URI[sha256sum] = "c5505ae075a871a9cd8d9801859b0ff1c09782075df281c72c23e72115d9f159" diff --git a/meta-oe/recipes-devtools/ctags/ctags_5.8.bb b/meta-oe/recipes-devtools/ctags/ctags_5.8.bb deleted file mode 100644 index d006d83aa5..0000000000 --- a/meta-oe/recipes-devtools/ctags/ctags_5.8.bb +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2015 Igor Santos <igor.santos@aker.com.br> -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Exuberant Ctags" -DESCRIPTION = "Exuberant Ctags is a multilanguage reimplementation of the \ - Unix ctags utility. Ctags generates an index of source code \ - definitions which is used by numerous editors and utilities \ - to instantly locate the definitions." - -HOMEPAGE = "http://ctags.sourceforge.net/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -inherit autotools-brokensep - -SRC_URI = "http://prdownloads.sourceforge.net/${BPN}/${BP}.tar.gz" - -SRC_URI[md5sum] = "c00f82ecdcc357434731913e5b48630d" -SRC_URI[sha256sum] = "0e44b45dcabe969e0bbbb11e30c246f81abe5d32012db37395eb57d66e9e99c7" - -do_install() { - install -Dm 755 ${B}/ctags ${D}${bindir}/ctags - install -Dm 644 ${B}/ctags.1 ${D}${mandir}/man1/ctags.1 -} diff --git a/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb b/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb new file mode 100644 index 0000000000..d4ffbb7f03 --- /dev/null +++ b/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb @@ -0,0 +1,36 @@ +# Copyright (C) 2015 Igor Santos <igor.santos@aker.com.br> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Universal Ctags" +DESCRIPTION = "Universal Ctags is a multilanguage reimplementation of the \ + Unix ctags utility. Ctags generates an index of source code \ + definitions which is used by numerous editors and utilities \ + to instantly locate the definitions." + +HOMEPAGE = "https://ctags.io/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +inherit autotools-brokensep pkgconfig manpages + +SRCREV = "38fd8e39b877a79666393b90e38400fd8d7d5d14" +SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= " \ + readcmd \ + xml \ + json \ + yaml \ +" +PACKAGECONFIG[readcmd] = "--enable-readcmd,--disable-readcmd" +PACKAGECONFIG[etags] = "--enable-etags,--disable-etags" +PACKAGECONFIG[xml] = "--enable-xml,--disable-xml,libxml2" +PACKAGECONFIG[json] = "--enable-json,--disable-json,jansson" +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" +PACKAGECONFIG[yaml] = "--enable-yaml,--disable-yaml,libyaml" +PACKAGECONFIG[manpages] = ",,python3-docutils-native" + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch new file mode 100644 index 0000000000..2a5f233165 --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch @@ -0,0 +1,33 @@ +From e735fb23f46f0c3c7a1144ba6b4050bfc0015a05 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 + +While calling debootstrap in sdk, if host does not install dpkg package, +the full path calling will fail + +Do not hardcode the full path of dpkg, then then sdk's dpkg will be used. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + debootstrap | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debootstrap b/debootstrap +index a3cf3af..5e96c3e 100755 +--- a/debootstrap ++++ b/debootstrap +@@ -538,7 +538,7 @@ fi + + if in_path dpkg && \ + dpkg --print-architecture >/dev/null 2>&1; then +- HOST_ARCH=$(/usr/bin/dpkg --print-architecture) ++ HOST_ARCH=$(dpkg --print-architecture) + elif in_path udpkg && \ + udpkg --print-architecture >/dev/null 2>&1; then + HOST_ARCH=$(/usr/bin/udpkg --print-architecture) +-- +2.27.0 + 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 new file mode 100644 index 0000000000..12dd238108 --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch @@ -0,0 +1,41 @@ +From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 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 + +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(-) + +diff --git a/Makefile b/Makefile +index 8516803..a2d8c00 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,14 +5,16 @@ all: + + clean: + +-DSDIR=$(DESTDIR)/usr/share/debootstrap ++datadir ?= "/usr/share" ++sbindir ?= "/usr/sbin" ++DSDIR=$(DESTDIR)${datadir}/debootstrap + install: + mkdir -p $(DSDIR)/scripts +- mkdir -p $(DESTDIR)/usr/sbin ++ mkdir -p $(DESTDIR)$(sbindir) + + cp -a scripts/* $(DSDIR)/scripts/ + install -o root -g root -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 + 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 new file mode 100644 index 0000000000..69329df4ea --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch @@ -0,0 +1,47 @@ +From f0420b201f2fb5286ccf5657faa6b38cd2680e10 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 + +Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + debootstrap | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/debootstrap b/debootstrap +index 9b9e58d..a3cf3af 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" ++fi ++ + # set $CONTAINER + detect_container + +@@ -645,12 +649,12 @@ fi + + ########################################################################### + +-if [ -x /usr/bin/arch-test ] && am_doing_phase second_stage; then ++if [ -x ${ARCH_TEST} ] && am_doing_phase second_stage; then + if doing_variant fakechroot; then +- ret=0; arch-test "$ARCH" || ret=$? ++ ret=0; ${ARCH_TEST} "$ARCH" || ret=$? + # Avoid failure with old arch-test package +- elif arch-test --version > /dev/null 2>&1; then +- ret=0; arch-test -c "$TARGET" "$ARCH" || ret=$? ++ elif ${ARCH_TEST} --version > /dev/null 2>&1; then ++ ret=0; ${ARCH_TEST} -c "$TARGET" "$ARCH" || ret=$? + else + ret=3 + fi +-- +2.17.1 + diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz b/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz Binary files differdeleted file mode 100644 index 20eaba3ad2..0000000000 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz +++ /dev/null diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb new file mode 100644 index 0000000000..c28a51749c --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb @@ -0,0 +1,27 @@ +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" + +SRC_URI = "\ + ${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 \ +" + +SRC_URI[sha256sum] = "d963a465314ac0e8fd5392573def042e6663e8edf3d08ace4bbd0d27ee8431f7" + +S = "${WORKDIR}/debootstrap" + +DEPENDS = " \ + virtual/fakeroot-native \ +" + +fakeroot do_install() { + oe_runmake 'DESTDIR=${D}' install + chown -R root:root ${D}${datadir}/debootstrap +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb deleted file mode 100644 index 8472aca6c1..0000000000 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb +++ /dev/null @@ -1,35 +0,0 @@ -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" - -inherit pkgconfig - -SRC_URI = "\ - http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_1.0.67.tar.gz \ - file://devices.tar.gz;unpack=0 \ -" - -SRC_URI[md5sum] = "eacabfe2e45415af60b1d74c3a23418a" -SRC_URI[sha256sum] = "0a12e0a2bbff185d47711a716b1f2734856100e8784361203e834fed0cffa51b" - -S = "${WORKDIR}/${BP}" - -# All Makefile does is creation of devices.tar.gz, which fails in OE build, we use -# static devices.tar.gz as work around -# | NOTE: make -j 8 -e MAKEFLAGS= -# | rm -rf dev -# | mkdir -p dev -# | chown 0:0 dev -# | chown: changing ownership of `dev': Operation not permitted -# | make: *** [devices.tar.gz] Error 1 -# | WARNING: exit code 1 from a shell command. -do_compile_prepend() { - cp ${WORKDIR}/devices.tar.gz ${B} -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install - chown -R root:root ${D}${datadir}/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_1.4.bb b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb new file mode 100644 index 0000000000..599675a345 --- /dev/null +++ b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb @@ -0,0 +1,46 @@ +SUMMARY = "A text-based user interface plugin of dnf for user to manage packages. " +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 = "ad48d934c54ab01026634c90f47f151f148b8147" + +SRC_URI:append:class-target = " file://oe-remote.repo.sample" + +inherit setuptools3-base + +S = "${WORKDIR}/git" + +do_install:append() { + install -d ${D}${datadir}/dnf + install -m 0755 ${S}/samples/* ${D}${datadir}/dnf + install -d ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins/mkimg + install -m 0755 ${S}/dnf-plugins/mkimg/* ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins/mkimg + for file in $(ls ${S}/dnf-plugins/ | grep -v mkimg); do + install -m 0755 ${S}/dnf-plugins/$file ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins + done +} + +do_install:append:class-target() { + install -d ${D}${sysconfdir}/yum.repos.d + install -m 0644 ${UNPACKDIR}/oe-remote.repo.sample ${D}${sysconfdir}/yum.repos.d +} + +do_install:append:class-nativesdk() { + install -d -p ${D}/${SDKPATH}/postinst-intercepts + cp -r ${COREBASE}/scripts/postinst-intercepts/* ${D}/${SDKPATH}/postinst-intercepts/ + sed -i -e 's/STAGING_DIR_NATIVE/NATIVE_ROOT/g' ${D}/${SDKPATH}/postinst-intercepts/* +} + +FILES:${PN} += "${datadir}/dnf" +FILES:${PN} += "${SDKPATH}/postinst-intercepts" + +RDEPENDS:${PN} += " \ + bash \ + 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/dnf-plugin-tui/dnf-plugin-tui_git.bb b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb deleted file mode 100644 index a8367b5d91..0000000000 --- a/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "A text-based user interface plugin of dnf for user to manage packages. " -LICENSE = "GPLv2" - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "git://github.com/ubinux/dnf-plugin-tui.git;branch=master " -SRCREV = "31d6866d5eda02be9a6bfb1fca9e9095b12eecd1" -PV = "1.0" - -SRC_URI_append_class-target = "file://oe-remote.repo.sample" - -inherit distutils3-base - -S = "${WORKDIR}/git" - -do_install_append() { - install -d ${D}${datadir}/dnf - install -m 0755 ${S}/samples/* ${D}${datadir}/dnf - install -d ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins/mkimg - install -m 0755 ${S}/dnf-plugins/mkimg/* ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins/mkimg - for file in $(ls ${S}/dnf-plugins/ | grep -v mkimg); do - install -m 0755 ${S}/dnf-plugins/$file ${D}${PYTHON_SITEPACKAGES_DIR}/dnf-plugins - done -} - -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 -} - -FILES_${PN} += "${datadir}/dnf" - -RDEPENDS_${PN} += " \ - bash \ - dnf \ - libnewt-python \ -" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta-oe/recipes-devtools/doxygen/doxygen/0001-Fix-6906.patch b/meta-oe/recipes-devtools/doxygen/doxygen/0001-Fix-6906.patch deleted file mode 100644 index bbebc4dc74..0000000000 --- a/meta-oe/recipes-devtools/doxygen/doxygen/0001-Fix-6906.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 81b213b98f51ec3eed5774f6f797c074ac35db3e Mon Sep 17 00:00:00 2001 -From: Ton van den Heuvel <tonvandenheuvel@gmail.com> -Date: Mon, 6 May 2019 15:17:28 +0200 -Subject: [PATCH] Fix #6906 - -Generate configvalues.h only as a dependency for the VHDL parser. Fixes -a problem in combination with Ninja v1.9.0 because of duplicate rules -for generating configvalues.h. - -Upstream-Status: Backport -Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> ---- - addon/doxyapp/CMakeLists.txt | 8 -------- - addon/doxyparse/CMakeLists.txt | 8 -------- - src/CMakeLists.txt | 4 ++++ - vhdlparser/CMakeLists.txt | 12 +++--------- - 4 files changed, 7 insertions(+), 25 deletions(-) - -diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt -index a7377112..0aaf4655 100644 ---- a/addon/doxyapp/CMakeLists.txt -+++ b/addon/doxyapp/CMakeLists.txt -@@ -1,11 +1,3 @@ --# configvalues.h --add_custom_command( -- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h -- DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py -- OUTPUT ${GENERATED_SRC}/configvalues.h --) --set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) -- - find_package(Iconv) - - include_directories( -diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt -index ff198fb4..1620c72e 100644 ---- a/addon/doxyparse/CMakeLists.txt -+++ b/addon/doxyparse/CMakeLists.txt -@@ -1,11 +1,3 @@ --# configvalues.h --add_custom_command( -- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h -- DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py -- OUTPUT ${GENERATED_SRC}/configvalues.h --) --set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) -- - find_package(Iconv) - - include_directories( -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 92a302ab..37a21ff6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -43,6 +43,10 @@ add_custom_command( - OUTPUT ${GENERATED_SRC}/configvalues.h - ) - set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) -+add_custom_target( -+ generate_configvalues_header -+ DEPENDS ${GENERATED_SRC}/configvalues.h -+) - - # configvalues.cpp - add_custom_command( -diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt -index 71e97df5..f89008c5 100644 ---- a/vhdlparser/CMakeLists.txt -+++ b/vhdlparser/CMakeLists.txt -@@ -1,14 +1,5 @@ --# configvalues.h --add_custom_command( -- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h -- DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py -- OUTPUT ${GENERATED_SRC}/configvalues.h --) --set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) -- - include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/qtools ${GENERATED_SRC}) - add_library(vhdlparser STATIC --${GENERATED_SRC}/configvalues.h - CharStream.cc - ParseException.cc - Token.cc -@@ -17,3 +8,6 @@ VhdlParser.cc - VhdlParserTokenManager.cc - VhdlParserIF.cpp - ) -+add_dependencies(vhdlparser -+ generate_configvalues_header -+) --- -2.17.1 - 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 c86dc1691e..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 @@ -8,8 +8,9 @@ native build but all modern systems supply it as part of the standard 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 --- @@ -17,10 +18,10 @@ Upstream-status: Inappropriate 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 45c2f2c1..22cf0144 100644 +index 06b9696f..f30b46b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -92,10 +92,6 @@ if (sqlite3) +@@ -117,10 +117,6 @@ if (sqlite3) endif() endif() @@ -28,9 +29,9 @@ index 45c2f2c1..22cf0144 100644 -include_directories(${ICONV_INCLUDE_DIR}) - - - #set(DOXYDOCS ${CMAKE_SOURCE_DIR}/doc CACHE INTERNAL "Path to doxygen docs") + #set(DOXYDOCS ${PROJECT_SOURCE_DIR}/doc CACHE INTERNAL "Path to doxygen docs") set(DOXYDOCS ${PROJECT_BINARY_DIR}/doc) set(ENV{DOXYGEN_DOCDIR} ${DOXYDOCS}) -- -2.17.1 +2.27.0 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 new file mode 100644 index 0000000000..796bc61ddc --- /dev/null +++ b/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch @@ -0,0 +1,232 @@ +From daf686508f2ee4711d93e96e5b100e50bf161656 Mon Sep 17 00:00:00 2001 +From: Leon Anavi <leon.anavi@konsulko.com> +Date: Wed, 26 Aug 2020 10:52:10 +0300 +Subject: [PATCH] doxygen: Fix Python issues for doxygen-native + +It fails to compile doxygen-native when /usr/bin/python is a link +to python3 on build host: + +| Failed to import the site module +| Traceback (most recent call last): +| File "/usr/lib64/python3.6/site.py", line 564, in <module> +| main() +| File "/usr/lib64/python3.6/site.py", line 550, in main +| known_paths = addusersitepackages(known_paths) +| File "/usr/lib64/python3.6/site.py", line 282, in addusersitepackages +| user_site = getusersitepackages() +| File "/usr/lib64/python3.6/site.py", line 258, in getusersitepackages +| user_base = getuserbase() # this will also set USER_BASE +| File "/usr/lib64/python3.6/site.py", line 248, in getuserbase +| USER_BASE = get_config_var('userbase') +| File "/usr/lib64/python3.6/sysconfig.py", line 604, in get_config_var +| return get_config_vars().get(name) +| File "/usr/lib64/python3.6/sysconfig.py", line 553, in get_config_vars +| _init_posix(_CONFIG_VARS) +| File "/usr/lib64/python3.6/sysconfig.py", line 424, in _init_posix +| _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) +| ModuleNotFoundError: No module named '_sysconfigdata' + +Replace find_package PythonInterp with Python3 to fix this issue +that it uses python3 from python3-native. And it also replaces the +result variable PYTHON_EXECUTABLE with Python3_EXECUTABLE. + +This patch is only needded by doxygen-native. + +Updated to apply to release 1.9.1. + +Upstream-Status: Inappropriate [oe specific] + +Co-Authored-By: Kai Kang <kai.kang@windriver.com> +Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> + +--- + CMakeLists.txt | 2 +- + addon/doxywizard/CMakeLists.txt | 6 +++--- + doc/CMakeLists.txt | 6 +++--- + examples/CMakeLists.txt | 4 ++-- + libmscgen/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 10 +++++----- + testing/CMakeLists.txt | 4 ++-- + 7 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2455793..28f0d83 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -105,7 +105,7 @@ else () + endif () + + find_program(DOT NAMES dot) +-find_package(PythonInterp REQUIRED) ++find_package(Python3 REQUIRED) + find_package(FLEX REQUIRED) + find_package(BISON REQUIRED) + if (BISON_VERSION VERSION_LESS 2.7) +diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt +index 63ac8e3..d37d1d0 100644 +--- a/addon/doxywizard/CMakeLists.txt ++++ b/addon/doxywizard/CMakeLists.txt +@@ -57,7 +57,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/settings.h PROPERTIES GENERA + + # generate version.cpp + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/version.py ${VERSION} > ${GENERATED_SRC_WIZARD}/version.cpp ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/version.py ${VERSION} > ${GENERATED_SRC_WIZARD}/version.cpp + DEPENDS ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/src/version.py + OUTPUT ${GENERATED_SRC_WIZARD}/version.cpp + ) +@@ -65,7 +65,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/version.cpp PROPERTIES GENER + + # generate configdoc.cpp + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/configgen.py -wiz ${PROJECT_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC_WIZARD}/configdoc.cpp ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/configgen.py -wiz ${PROJECT_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC_WIZARD}/configdoc.cpp + DEPENDS ${PROJECT_SOURCE_DIR}/src/configgen.py ${PROJECT_SOURCE_DIR}/src/config.xml + OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp + ) +@@ -74,7 +74,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GEN + set(LEX_FILES config_doxyw) + foreach(lex_file ${LEX_FILES}) + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l > ${GENERATED_SRC_WIZARD}/${lex_file}.l.h ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l > ${GENERATED_SRC_WIZARD}/${lex_file}.l.h + DEPENDS ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l + OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.l.h + ) +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index ec63ceb..49a2bda 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -168,7 +168,7 @@ configure_file(${PROJECT_SOURCE_DIR}/doc/doxyindexer.1 ${PROJECT_BINARY_DIR + + # doc/language.doc (see tag Doxyfile:INPUT) + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} translator.py ${PROJECT_SOURCE_DIR} ++ COMMAND ${Python3_EXECUTABLE} translator.py ${PROJECT_SOURCE_DIR} + DEPENDS ${PROJECT_SOURCE_DIR}/doc/maintainers.txt ${PROJECT_SOURCE_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py ${LANG_FILES} + OUTPUT language.doc + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc +@@ -177,7 +177,7 @@ set_source_files_properties(language.doc PROPERTIES GENERATED 1) + + # doc/config.doc (see tag Doxyfile:INPUT) + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/src/configgen.py -doc ${TOP}/src/config.xml > config.doc ++ COMMAND ${Python3_EXECUTABLE} ${TOP}/src/configgen.py -doc ${TOP}/src/config.xml > config.doc + DEPENDS ${TOP}/src/config.xml ${TOP}/src/configgen.py + OUTPUT config.doc + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/ +@@ -228,7 +228,7 @@ add_custom_target(docs_chm + COMMAND ${CMAKE_COMMAND} -E echo " for file in files:" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py + COMMAND ${CMAKE_COMMAND} -E echo " if file.endswith('.html') or file.endswith('.png') or file.endswith('.css') or file.endswith('.gif'):" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py + COMMAND ${CMAKE_COMMAND} -E echo " print(os.path.join(root, file))" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py +- COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp ++ COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm ${Python3_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp + COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm "${HTML_HELP_COMPILER}" doxygen_manual.hhp || echo > nul + COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BINARY_DIR}/chm/index.chm ${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm + DEPENDS ${PROJECT_BINARY_DIR}/doc/language.doc ${PROJECT_BINARY_DIR}/doc/config.doc +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 194b427..248b807 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -54,7 +54,7 @@ foreach (f_inp ${BASIC_EXAMPLES}) + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/examples/${f} + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/latex/examples/${f} + COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen ${f}.cfg +- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman.tex > ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman_doc.tex ++ COMMAND ${Python3_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman.tex > ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman_doc.tex + DEPENDS doxygen ${f}.${f_ext} ${f}.cfg ${TOP}/examples/strip_example.py + OUTPUT ${PROJECT_BINARY_DIR}/html/examples/${f}/html/index.html ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman_doc.tex + ) +@@ -73,7 +73,7 @@ if (DOT) + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/examples/diagrams + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/latex/examples/diagrams + COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen diagrams.cfg +- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman.tex > ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman_doc.tex ++ COMMAND ${Python3_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman_doc.tex + DEPENDS doxygen diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg ${TOP}/examples/strip_example.py + OUTPUT ${PROJECT_BINARY_DIR}/html/examples/diagrams/html/index.html ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman_doc.tex + ) +diff --git a/libmscgen/CMakeLists.txt b/libmscgen/CMakeLists.txt +index 34cf4d8..f015afc 100644 +--- a/libmscgen/CMakeLists.txt ++++ b/libmscgen/CMakeLists.txt +@@ -7,7 +7,7 @@ include_directories( + set(LEX_FILES mscgen_lexer) + foreach(lex_file ${LEX_FILES}) + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/libmscgen/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/libmscgen/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h + DEPENDS ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/libmscgen/${lex_file}.l + OUTPUT ${GENERATED_SRC}/${lex_file}.l.h + ) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0e0c5f7..c1d3ca5 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -40,7 +40,7 @@ set_source_files_properties(${GENERATED_SRC}/settings.h PROPERTIES GENERATED 1) + + # configvalues.h + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maph ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.h ++ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maph ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.h + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py + OUTPUT ${GENERATED_SRC}/configvalues.h + ) +@@ -52,7 +52,7 @@ add_custom_target( + + # configvalues.cpp + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maps ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.cpp ++ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maps ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.cpp + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py + OUTPUT ${GENERATED_SRC}/configvalues.cpp + ) +@@ -60,7 +60,7 @@ set_source_files_properties(${GENERATED_SRC}/configvalues.cpp PROPERTIES GENERAT + + # configoptions.cpp + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -cpp ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configoptions.cpp ++ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -cpp ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configoptions.cpp + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py + OUTPUT ${GENERATED_SRC}/configoptions.cpp + ) +@@ -95,7 +95,7 @@ endif() + # resources.cpp + add_custom_command( + COMMENT "Generating ${GENERATED_SRC}/resources.cpp" +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/res2cc_cmd.py ${PROJECT_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp ++ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/res2cc_cmd.py ${PROJECT_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp + DEPENDS ${RESOURCES} ${CMAKE_CURRENT_LIST_DIR}/res2cc_cmd.py + OUTPUT ${GENERATED_SRC}/resources.cpp + ) +@@ -126,7 +126,7 @@ foreach(lex_file ${LEX_FILES}) + set(LEX_FILES_H ${LEX_FILES_H} " " ${GENERATED_SRC}/${lex_file}.l.h CACHE INTERNAL "Stores generated files") + set(LEX_FILES_CPP ${LEX_FILES_CPP} " " ${GENERATED_SRC}/${lex_file}.cpp CACHE INTERNAL "Stores generated files") + add_custom_command( +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scan_states.py ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h ++ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scan_states.py ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/scan_states.py ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l + OUTPUT ${GENERATED_SRC}/${lex_file}.l.h + ) +diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt +index fd6912e..0af1865 100644 +--- a/testing/CMakeLists.txt ++++ b/testing/CMakeLists.txt +@@ -1,7 +1,7 @@ + # run all tests sequentially (keep for backward compatibility) + add_custom_target(tests + COMMENT "Running doxygen tests..." +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing + DEPENDS doxygen + ) + +@@ -19,6 +19,6 @@ foreach(TEST_FILE ${TEST_FILES}) + string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*).*$" "\\1" TEST_ID "${TEST_FILE}") + # add a test target for each test + add_test(NAME ${TEST_NAME} +- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --id ${TEST_ID} --doxygen $<TARGET_FILE:doxygen> --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing ++ COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --id ${TEST_ID} --doxygen $<TARGET_FILE:doxygen> --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing + ) + endforeach() diff --git a/meta-oe/recipes-devtools/doxygen/doxygen_1.8.15.bb b/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb index b49fbd4d02..8bd0992bd6 100644 --- a/meta-oe/recipes-devtools/doxygen/doxygen_1.8.15.bb +++ b/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb @@ -1,17 +1,21 @@ DESCRIPTION = "Doxygen is the de facto standard tool for generating documentation from annotated C++ sources." HOMEPAGE = "http://www.doxygen.org/" -LICENSE = "GPL-2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "flex-native bison-native" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.src.tar.gz \ file://0001-build-don-t-look-for-Iconv.patch \ - file://0001-Fix-6906.patch" -SRC_URI[md5sum] = "2c98c73eba392d334f5bbaf15e09bae3" -SRC_URI[sha256sum] = "bd9c0ec462b6a9b5b41ede97bede5458e0d7bb40d4cfa27f6f622eb33c59245d" +" +SRC_URI:append:class-native = " file://doxygen-native-only-check-python3.patch" +SRC_URI[sha256sum] = "f352dbc3221af7012b7b00935f2dfdc9fb67a97d43287d2f6c81c50449d254e0" inherit cmake python3native -BBCLASSEXTEND = "native" +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.6.bb b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.bb new file mode 100644 index 0000000000..976120b515 --- /dev/null +++ b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.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=f515fff3ea0a2b9797eda60d83c0e5ca" + +SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" +SRCREV = "b7837029494c03af5ea70ed9d265e8c2123bff53" + +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 new file mode 100644 index 0000000000..4019f26899 --- /dev/null +++ b/meta-oe/recipes-devtools/exprtk/exprtk_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "Expression parser" +HOMEPAGE = "https://github.com/ArashPartow/exprtk" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +SRCREV = "f46bffcd6966d38a09023fb37ba9335214c9b959" + +SRC_URI = "git://github.com/ArashPartow/exprtk.git;branch=release;protocol=https" + +S = "${WORKDIR}/git" + +# other packages commonly reference the file directly as "exprtk.hpp" +# create symlink to allow this usage +do_install() { + install -d ${D}/${includedir} + install -m 0644 ${S}/exprtk.hpp ${D}/${includedir}/exprtk.hpp +} + +# exprtk 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/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.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb new file mode 100644 index 0000000000..183554e2c8 --- /dev/null +++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb @@ -0,0 +1,28 @@ +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" + +DEPENDS = "flatbuffers-native" + +RDEPENDS:${PN}-compiler = "${PN}" +RDEPENDS:${PN}-dev += "${PN}-compiler" + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += " \ + -DFLATBUFFERS_BUILD_TESTS=OFF \ + -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ +" +EXTRA_OECMAKE:append:class-target = " -DFLATBUFFERS_FLATC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/flatc" + +inherit cmake python3native + +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/flatbuffers_1.10.0.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.10.0.bb deleted file mode 100644 index 452e1e65ab..0000000000 --- a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.10.0.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Memory Efficient Serialization Library" -HOMEPAGE = "https://github.com/google/flatbuffers" -SECTION = "console/tools" -LICENSE = "Apache-2.0" - -PACKAGE_BEFORE_PN = "${PN}-compiler" - -RDEPENDS_${PN}-compiler = "${PN}" -RDEPENDS_${PN}-dev += "${PN}-compiler" - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a873c5645c184d51e0f9b34e1d7cf559" - -SRCREV = "c0698cc33f1e534bb59c455909b88cc2726089af" - -SRC_URI = "git://github.com/google/flatbuffers.git" - -# Make sure C++11 is used, required for example for GCC 4.9 -CXXFLAGS += "-std=c++11" -BUILD_CXXFLAGS += "-std=c++11" - -# BUILD_TYPE=Release is required, otherwise flatc is not installed -EXTRA_OECMAKE += "\ - -DCMAKE_BUILD_TYPE=Release \ - -DFLATBUFFERS_BUILD_TESTS=OFF \ - -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ -" - -inherit cmake - -S = "${WORKDIR}/git" - -FILES_${PN}-compiler = "${bindir}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers.bb b/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers.bb new file mode 100644 index 0000000000..5d3c73fd9a --- /dev/null +++ b/meta-oe/recipes-devtools/flatbuffers/python3-flatbuffers.bb @@ -0,0 +1,15 @@ +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" + +require flatbuffers.inc + +S = "${WORKDIR}/git/python" + +RDEPENDS:${PN} = "flatbuffers" + +inherit setuptools3 + +BBCLASSEXTEND = "native" 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-geany.m4-Do-not-tinker-with-pkg-config-paths.patch b/meta-oe/recipes-devtools/geany/geany-plugins/0001-geany.m4-Do-not-tinker-with-pkg-config-paths.patch new file mode 100644 index 0000000000..cd417e0d7b --- /dev/null +++ b/meta-oe/recipes-devtools/geany/geany-plugins/0001-geany.m4-Do-not-tinker-with-pkg-config-paths.patch @@ -0,0 +1,32 @@ +From b2187b45f61ce362a9d58d9081d66daddb4e577f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 20 Mar 2022 15:54:14 -0700 +Subject: [PATCH] geany.m4: Do not tinker with pkg-config paths + +OE sets up these paths correctly w.r.t. target sysroot + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + build/geany.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/build/geany.m4 ++++ b/build/geany.m4 +@@ -32,7 +32,8 @@ AC_DEFUN([GP_CHECK_GEANY], + [ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + +- GP_GEANY_PKG_CONFIG_PATH_PUSH ++ dnl GP_GEANY_PKG_CONFIG_PATH_PUSH ++ AC_REQUIRE([_GP_GEANY_LIBDIR]) + + PKG_CHECK_MODULES([GEANY], [geany >= $1]) + geanypluginsdir=$geany_libdir/geany +@@ -40,5 +41,5 @@ AC_DEFUN([GP_CHECK_GEANY], + AC_SUBST([geanypluginsdir]) + AC_SUBST([GEANY_VERSION]) + +- GP_GEANY_PKG_CONFIG_PATH_POP ++ dnl GP_GEANY_PKG_CONFIG_PATH_POP + ]) diff --git a/meta-oe/recipes-devtools/geany/geany-plugins/0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch b/meta-oe/recipes-devtools/geany/geany-plugins/0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch new file mode 100644 index 0000000000..fe2d9f54ba --- /dev/null +++ b/meta-oe/recipes-devtools/geany/geany-plugins/0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch @@ -0,0 +1,36 @@ +From 90c46235ad69a411d83a5e978492421e8e378934 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 18 Feb 2022 23:35:58 -0800 +Subject: [PATCH] git-changebar: Adjust structs for libgit2 1.4.x + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + git-changebar/src/gcb-plugin.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/git-changebar/src/gcb-plugin.c b/git-changebar/src/gcb-plugin.c +index f8ce20c..4488b22 100644 +--- a/git-changebar/src/gcb-plugin.c ++++ b/git-changebar/src/gcb-plugin.c +@@ -216,7 +216,7 @@ static int + gcb_git_buf_grow (git_buf *buf, + size_t target_size) + { +- if (buf->asize == 0) { ++ if (buf->reserved == 0) { + if (target_size == 0) { + target_size = buf->size; + } +@@ -234,7 +234,7 @@ buf_zero (git_buf *buf) + if (buf) { + buf->ptr = NULL; + buf->size = 0; +- buf->asize = 0; ++ buf->reserved = 0; + } + } + +-- +2.35.1 + 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.34.bb b/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb index 84adc7abe4..1ed2993bf0 100644 --- a/meta-oe/recipes-devtools/geany/geany-plugins_1.34.bb +++ b/meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb @@ -1,13 +1,13 @@ DESCRIPTION = "A fast and lightweight IDE" HOMEPAGE = "http://plugins.geany.org/" -LICENSE_DEFAULT = "GPLv2" -LICENSE = "${LICENSE_DEFAULT} & BSD-2-Clause & GPLv3" +LICENSE_DEFAULT = "GPL-2.0-only" +LICENSE = "${LICENSE_DEFAULT} & BSD-2-Clause & GPL-3.0-only" python () { for plugin in d.getVar('PLUGINS').split(): - if 'LICENSE_%s' % plugin not in d: - d.setVar('LICENSE_' + plugin, '${LICENSE_DEFAULT}') + if 'LICENSE:%s' % plugin not in d: + d.setVar('LICENSE:' + plugin, '${LICENSE_DEFAULT}') } DEPENDS = " \ @@ -16,7 +16,7 @@ DEPENDS = " \ geany \ libxml2 \ libsoup-2.4 \ - enchant \ + enchant2 \ intltool-native \ libassuan \ gpgme \ @@ -24,223 +24,225 @@ DEPENDS = " \ libgit2 \ " -inherit distro_features_check autotools pkgconfig gtk-icon-cache +inherit features_check autotools pkgconfig gtk-icon-cache REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = " \ - http://plugins.geany.org/${BPN}/${BP}.tar.bz2 \ + https://plugins.geany.org/${BPN}/${BP}.tar.bz2 \ 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[md5sum] = "bf5fdd50727ad8bbbfe00027ccf2dac5" -SRC_URI[sha256sum] = "244417c681636e82a63cf6f9901b5b7f3889168f7d9b5ba9b45601767a589c3b" +SRC_URI[sha256sum] = "1c578a7ebb390aa8882f195acd3d8da3ceb73925d291b28dec90cd3e5fd20586" -do_configure_prepend() { +do_configure:prepend() { rm -f ${S}/build/cache/glib-gettext.m4 } -FILES_${PN} += "${datadir}/icons" -FILES_${PN}-dev += "${libdir}/geany/*.la ${libdir}/${BPN}/*/*.la" +FILES:${PN} += "${datadir}/icons" +FILES:${PN}-dev += "${libdir}/geany/*.la ${libdir}/${BPN}/*/*.la" PLUGINS += "${PN}-addons" LIC_FILES_CHKSUM += "file://addons/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-addons = "${libdir}/geany/addons.so" +FILES:${PN}-addons = "${libdir}/geany/addons.so" PLUGINS += "${PN}-autoclose" LIC_FILES_CHKSUM += "file://autoclose/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-autoclose = "${libdir}/geany/autoclose.so" +FILES:${PN}-autoclose = "${libdir}/geany/autoclose.so" PLUGINS += "${PN}-automark" LIC_FILES_CHKSUM += "file://automark/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-automark = "${libdir}/geany/automark.so" +FILES:${PN}-automark = "${libdir}/geany/automark.so" PLUGINS += "${PN}-codenav" LIC_FILES_CHKSUM += "file://codenav/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-codenav = "${libdir}/geany/codenav.so" +FILES:${PN}-codenav = "${libdir}/geany/codenav.so" PLUGINS += "${PN}-commander" LIC_FILES_CHKSUM += "file://commander/COPYING;md5=d32239bcb673463ab874e80d47fae504" -LICENSE_${PN}-commander = "GPLv3" -FILES_${PN}-commander = "${libdir}/geany/commander.so" +LICENSE:${PN}-commander = "GPL-3.0-only" +FILES:${PN}-commander = "${libdir}/geany/commander.so" # | checking whether the GTK version in use is compatible with plugin Debugger... no EXTRA_OECONF += "--disable-debugger" #PLUGINS += "${PN}-debugger" #LIC_FILES_CHKSUM += "file://debugger/COPYING;md5=4325afd396febcb659c36b49533135d4" -#FILES_${PN}-debugger = "${libdir}/geany/debugger.so ${datadir}/${PN}/debugger" +#FILES:${PN}-debugger = "${libdir}/geany/debugger.so ${datadir}/${PN}/debugger" PLUGINS += "${PN}-defineformat" LIC_FILES_CHKSUM += "file://defineformat/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-defineformat = "${libdir}/geany/defineformat.so" +FILES:${PN}-defineformat = "${libdir}/geany/defineformat.so" # no gnome devhelp in some common layer EXTRA_OECONF += "--disable-devhelp" #PLUGINS += "${PN}-devhelp" #LIC_FILES_CHKSUM += "file://devhelp/COPYING;md5=d32239bcb673463ab874e80d47fae504" -#LICENSE_${PN}-devhelp = "GPLv3" -#FILES_${PN}-devhelp = "${libdir}/geany/devhelp.so" +#LICENSE:${PN}-devhelp = "GPLv3" +#FILES:${PN}-devhelp = "${libdir}/geany/devhelp.so" PLUGINS += "${PN}-geanyctags" LIC_FILES_CHKSUM += "file://geanyctags/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanyctags = "${libdir}/geany/geanyctags.so" +FILES:${PN}-geanyctags = "${libdir}/geany/geanyctags.so" PLUGINS += "${PN}-geanydoc" LIC_FILES_CHKSUM += "file://geanydoc/COPYING;md5=d32239bcb673463ab874e80d47fae504" -LICENSE_${PN}-geanydoc = "GPLv3" -FILES_${PN}-geanydoc = "${libdir}/geany/geanydoc.so" +LICENSE:${PN}-geanydoc = "GPL-3.0-only" +FILES:${PN}-geanydoc = "${libdir}/geany/geanydoc.so" PLUGINS += "${PN}-geanyextrasel" LIC_FILES_CHKSUM += "file://geanyextrasel/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanyextrasel = "${libdir}/geany/geanyextrasel.so" +FILES:${PN}-geanyextrasel = "${libdir}/geany/geanyextrasel.so" PLUGINS += "${PN}-geanyinsertnum" LIC_FILES_CHKSUM += "file://geanyinsertnum/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanyinsertnum = "${libdir}/geany/geanyinsertnum.so" +FILES:${PN}-geanyinsertnum = "${libdir}/geany/geanyinsertnum.so" # no lua: max supported version is 5.2 EXTRA_OECONF += "--disable-geanylua" #PLUGINS += "${PN}-geanylua" #LIC_FILES_CHKSUM += "file://geanylua/COPYING;md5=4325afd396febcb659c36b49533135d4" -#FILES_${PN}-geanylua = "${libdir}/geany/geanylua.so ${libdir}/${PN}/geanylua/*.so" +#FILES:${PN}-geanylua = "${libdir}/geany/geanylua.so ${libdir}/${PN}/geanylua/*.so" PLUGINS += "${PN}-geanymacro" LIC_FILES_CHKSUM += "file://geanymacro/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanymacro = "${libdir}/geany/geanymacro.so" +FILES:${PN}-geanymacro = "${libdir}/geany/geanymacro.so" PLUGINS += "${PN}-geanyminiscript" LIC_FILES_CHKSUM += "file://geanyminiscript/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-geanyminiscript = "${libdir}/geany/geanyminiscript.so" +FILES:${PN}-geanyminiscript = "${libdir}/geany/geanyminiscript.so" PLUGINS += "${PN}-geanynumberedbookmarks" LIC_FILES_CHKSUM += "file://geanynumberedbookmarks/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanynumberedbookmarks = "${libdir}/geany/geanynumberedbookmarks.so" +FILES:${PN}-geanynumberedbookmarks = "${libdir}/geany/geanynumberedbookmarks.so" PLUGINS += "${PN}-geanypg" LIC_FILES_CHKSUM += "file://geanypg/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -FILES_${PN}-geanypg = "${libdir}/geany/geanypg.so" +FILES:${PN}-geanypg = "${libdir}/geany/geanypg.so" PLUGINS += "${PN}-geanyprj" LIC_FILES_CHKSUM += "file://geanyprj/COPYING;md5=d32239bcb673463ab874e80d47fae504" -LICENSE_${PN}-geanyprj = "GPLv3" -FILES_${PN}-geanyprj = "${libdir}/geany/geanyprj.so" +LICENSE:${PN}-geanyprj = "GPL-3.0-only" +FILES:${PN}-geanyprj = "${libdir}/geany/geanyprj.so" #PLUGINS += "${PN}-geanypy" #LIC_FILES_CHKSUM += "file://geanypy/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -#FILES_${PN}-geanypy = "${libdir}/geany/geanypy.so" +#FILES:${PN}-geanypy = "${libdir}/geany/geanypy.so" PLUGINS += "${PN}-geanyvc" LIC_FILES_CHKSUM += "file://geanyvc/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-geanyvc = "${libdir}/geany/geanyvc.so" +FILES:${PN}-geanyvc = "${libdir}/geany/geanyvc.so" PLUGINS += "${PN}-geniuspaste" LIC_FILES_CHKSUM += "file://geniuspaste/COPYING;md5=bfc203269f8862ebfc1198cdc809a95a" -FILES_${PN}-geniuspaste = "${libdir}/geany/geniuspaste.so ${datadir}/${PN}/geniuspaste" +FILES:${PN}-geniuspaste = "${libdir}/geany/geniuspaste.so ${datadir}/${PN}/geniuspaste" PLUGINS += "${PN}-git-changebar" LIC_FILES_CHKSUM += "file://git-changebar/COPYING;md5=d32239bcb673463ab874e80d47fae504" -LICENSE_${PN}-git-changebar = "GPLv3" -FILES_${PN}-git-changebar = "${datadir}/${BPN}/git-changebar ${libdir}/geany/git-changebar.so" +LICENSE:${PN}-git-changebar = "GPL-3.0-only" +FILES:${PN}-git-changebar = "${datadir}/${BPN}/git-changebar ${libdir}/geany/git-changebar.so" PLUGINS += "${PN}-keyrecord" LIC_FILES_CHKSUM += "file://keyrecord/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-keyrecord = "${libdir}/geany/keyrecord.so" +FILES:${PN}-keyrecord = "${libdir}/geany/keyrecord.so" PLUGINS += "${PN}-latex" LIC_FILES_CHKSUM += "file://latex/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-latex = "${libdir}/geany/latex.so" +FILES:${PN}-latex = "${libdir}/geany/latex.so" PLUGINS += "${PN}-lineoperations" LIC_FILES_CHKSUM += "file://lineoperations/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-lineoperations = "${libdir}/geany/lineoperations.so" +FILES:${PN}-lineoperations = "${libdir}/geany/lineoperations.so" PLUGINS += "${PN}-lipsum" LIC_FILES_CHKSUM += "file://lipsum/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-lipsum = "${libdir}/geany/lipsum.so" +FILES:${PN}-lipsum = "${libdir}/geany/lipsum.so" # no markdown - avoid floating dependencies EXTRA_OECONF += "--disable-peg-markdown" #PLUGINS += "${PN}-markdown" #LIC_FILES_CHKSUM += "file://markdown/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -#FILES_${PN}-markdown = "${libdir}/geany/markdown.so" +#FILES:${PN}-markdown = "${libdir}/geany/markdown.so" # | checking whether the GTK version in use is compatible with plugin multiterm... no EXTRA_OECONF += "--disable-multiterm" #PLUGINS += "${PN}-multiterm" #LIC_FILES_CHKSUM += "file://multiterm/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -#FILES_${PN}-multiterm = "${libdir}/geany/multiterm.so" +#FILES:${PN}-multiterm = "${libdir}/geany/multiterm.so" PLUGINS += "${PN}-overview" LIC_FILES_CHKSUM += "file://overview/overview/overviewplugin.c;beginline=4;endline=20;md5=1aa33522916cdeb46cccac0c629da0d0" -FILES_${PN}-overview = "${libdir}/geany/overview.so ${datadir}/${PN}/overview" +FILES:${PN}-overview = "${libdir}/geany/overview.so ${datadir}/${PN}/overview" PLUGINS += "${PN}-pairtaghighlighter" -LICENSE_${PN}-pairtaghighlighter = "BSD-2-Clause" +LICENSE:${PN}-pairtaghighlighter = "BSD-2-Clause" LIC_FILES_CHKSUM += "file://pairtaghighlighter/COPYING;md5=d6d927525a612b3a8dbebc4b2e9b47c1" -FILES_${PN}-pairtaghighlighter = "${libdir}/geany/pairtaghighlighter.so" +FILES:${PN}-pairtaghighlighter = "${libdir}/geany/pairtaghighlighter.so" PLUGINS += "${PN}-pohelper" -LICENSE_${PN}-pohelper = "GPLv3" +LICENSE:${PN}-pohelper = "GPL-3.0-only" LIC_FILES_CHKSUM += "file://pohelper/COPYING;md5=d32239bcb673463ab874e80d47fae504" -FILES_${PN}-pohelper = "${datadir}/${BPN}/pohelper ${libdir}/geany/pohelper.so" +FILES:${PN}-pohelper = "${datadir}/${BPN}/pohelper ${libdir}/geany/pohelper.so" PLUGINS += "${PN}-pretty-printer" LIC_FILES_CHKSUM += "file://pretty-printer/src/PrettyPrinter.c;beginline=1;endline=17;md5=1665115c2fadb17c1b53cdb4e43b2440" -FILES_${PN}-pretty-printer = "${libdir}/geany/pretty-printer.so" +FILES:${PN}-pretty-printer = "${libdir}/geany/pretty-printer.so" PLUGINS += "${PN}-projectorganizer" LIC_FILES_CHKSUM += "file://projectorganizer/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-projectorganizer = "${libdir}/geany/projectorganizer.so" +FILES:${PN}-projectorganizer = "${libdir}/geany/projectorganizer.so" PLUGINS += "${PN}-scope" LIC_FILES_CHKSUM += "file://scope/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-scope = "${datadir}/${BPN}/scope ${libdir}/geany/scope.so" +FILES:${PN}-scope = "${datadir}/${BPN}/scope ${libdir}/geany/scope.so" PLUGINS += "${PN}-sendmail" LIC_FILES_CHKSUM += "file://sendmail/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-sendmail = "${libdir}/geany/sendmail.so" +FILES:${PN}-sendmail = "${libdir}/geany/sendmail.so" PLUGINS += "${PN}-shiftcolumn" LIC_FILES_CHKSUM += "file://shiftcolumn/COPYING;md5=751419260aa954499f7abaabaa882bbe" -FILES_${PN}-shiftcolumn = "${libdir}/geany/shiftcolumn.so" +FILES:${PN}-shiftcolumn = "${libdir}/geany/shiftcolumn.so" PLUGINS += "${PN}-spellcheck" LIC_FILES_CHKSUM += "file://spellcheck/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-spellcheck = "${libdir}/geany/spellcheck.so" +FILES:${PN}-spellcheck = "${libdir}/geany/spellcheck.so" PLUGINS += "${PN}-tableconvert" LIC_FILES_CHKSUM += "file://tableconvert/COPYING;md5=6753686878d090a1f3f9445661d3dfbc" -FILES_${PN}-tableconvert = "${libdir}/geany/tableconvert.so" +FILES:${PN}-tableconvert = "${libdir}/geany/tableconvert.so" PLUGINS += "${PN}-treebrowser" LIC_FILES_CHKSUM += "file://treebrowser/README;beginline=67;endline=67;md5=1f17f0f2abb88e0fa0f1b342112d871c" -FILES_${PN}-treebrowser = "${libdir}/geany/treebrowser.so" +FILES:${PN}-treebrowser = "${libdir}/geany/treebrowser.so" PLUGINS += "${PN}-updatechecker" LIC_FILES_CHKSUM += "file://updatechecker/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-updatechecker = "${libdir}/geany/updatechecker.so" +FILES:${PN}-updatechecker = "${libdir}/geany/updatechecker.so" PLUGINS += "${PN}-vimode" LIC_FILES_CHKSUM += "file://vimode/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-vimode = "${libdir}/geany/vimode.so" +FILES:${PN}-vimode = "${libdir}/geany/vimode.so" # no webkit - lasts ages and is not properly detected EXTRA_OECONF += " --disable-webhelper" #PLUGINS += "${PN}-webhelper" #LIC_FILES_CHKSUM += "file://webhelper/COPYING;md5=d32239bcb673463ab874e80d47fae504" -#LICENSE_${PN}-webhelper = "GPLv3" -#FILES_${PN}-webhelper = "${libdir}/geany/webhelper.so" +#LICENSE:${PN}-webhelper = "GPLv3" +#FILES:${PN}-webhelper = "${libdir}/geany/webhelper.so" PLUGINS += "${PN}-workbench" LIC_FILES_CHKSUM += "file://workbench/COPYING;md5=c107cf754550e65755c42985a5d4e9c9" -FILES_${PN}-workbench = "${libdir}/geany/workbench.so" +FILES:${PN}-workbench = "${libdir}/geany/workbench.so" PLUGINS += "${PN}-xmlsnippets" LIC_FILES_CHKSUM += "file://xmlsnippets/COPYING;md5=4325afd396febcb659c36b49533135d4" -FILES_${PN}-xmlsnippets = "${libdir}/geany/xmlsnippets.so" +FILES:${PN}-xmlsnippets = "${libdir}/geany/xmlsnippets.so" PACKAGES =+ "${PN}-common ${PLUGINS}" -FILES_${PN}-common = "${libdir}/libgeanypluginutils${SOLIBS}" +FILES:${PN}-common = "${libdir}/libgeanypluginutils${SOLIBS}" # geany-plugins is meta package for all plugins -RDEPENDS_${PN} = "${PLUGINS}" -ALLOW_EMPTY_${PN} = "1" +RDEPENDS:${PN} = "${PLUGINS}" +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-oe/recipes-devtools/geany/geany/0001-configure-Upgrade-to-a-modern-Gettext.patch b/meta-oe/recipes-devtools/geany/geany/0001-configure-Upgrade-to-a-modern-Gettext.patch new file mode 100644 index 0000000000..b966847195 --- /dev/null +++ b/meta-oe/recipes-devtools/geany/geany/0001-configure-Upgrade-to-a-modern-Gettext.patch @@ -0,0 +1,22 @@ +From 51e145b43e66134aa4b33c9af0319331ec8a5bce Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 5 Feb 2021 23:15:45 -0800 +Subject: [PATCH] configure: Use AC_PROG_INTLTOOL + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/configure.ac ++++ b/configure.ac +@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([1.11 -Wall parallel-tests subdir-objects]) + AC_CONFIG_HEADERS([config.h]) +- ++AC_PROG_INTLTOOL + m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + + GEANY_PREFIX diff --git a/meta-oe/recipes-devtools/geany/geany_1.34.1.bb b/meta-oe/recipes-devtools/geany/geany_1.34.1.bb deleted file mode 100644 index aab535d85b..0000000000 --- a/meta-oe/recipes-devtools/geany/geany_1.34.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "A fast and lightweight IDE" -HOMEPAGE = "http://www.geany.org/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=bd7b2c994af21d318bd2cd3b3f80c2d5" - -DEPENDS = "gtk+3 libxml-parser-perl-native python3-docutils-native intltool-native" - -inherit distro_features_check autotools pkgconfig perlnative pythonnative gettext - -REQUIRED_DISTRO_FEATURES = "x11" - -SRC_URI = "http://download.geany.org/${BP}.tar.bz2" -SRC_URI[md5sum] = "87220f4a0e03623ab9d86820f6be7b5d" -SRC_URI[sha256sum] = "e765efd89e759defe3fd797d8a2052afbb4b23522efbcc72e3a72b7f1093ec11" - -FILES_${PN} += "${datadir}/icons" - -EXTRA_OECONF = "--disable-html-docs" diff --git a/meta-oe/recipes-devtools/geany/geany_1.38.bb b/meta-oe/recipes-devtools/geany/geany_1.38.bb new file mode 100644 index 0000000000..d75e3b57fb --- /dev/null +++ b/meta-oe/recipes-devtools/geany/geany_1.38.bb @@ -0,0 +1,21 @@ +SUMMARY = "A fast and lightweight IDE" +HOMEPAGE = "http://www.geany.org/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=bd7b2c994af21d318bd2cd3b3f80c2d5" + +DEPENDS = "gtk+3 libxml-parser-perl-native python3-docutils-native intltool-native" + +inherit features_check autotools pkgconfig perlnative gettext mime-xdg + +REQUIRED_DISTRO_FEATURES = "x11" + +SRC_URI = "https://download.geany.org/${BP}.tar.bz2 \ + file://0001-configure-Upgrade-to-a-modern-Gettext.patch \ + " +SRC_URI[sha256sum] = "abff176e4d48bea35ee53037c49c82f90b6d4c23e69aed6e4a5ca8ccd3aad546" + +FILES:${PN} += "${datadir}/icons" + +EXTRA_OECONF = "--disable-html-docs" + +RRECOMMENDS:${PN} += "source-code-pro-fonts" diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.1.4.bb b/meta-oe/recipes-devtools/giflib/giflib_5.1.4.bb deleted file mode 100644 index 21fa352cdc..0000000000 --- a/meta-oe/recipes-devtools/giflib/giflib_5.1.4.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "shared library for GIF images" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a" - -SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.bz2" - -inherit autotools - -PACKAGES += "${PN}-utils" -FILES_${PN} = "${libdir}/libgif.so.*" -FILES_${PN}-utils = "${bindir}" - -BBCLASSEXTEND = "native" - -RDEPENDS_${PN}-utils = "perl" - -SRC_URI[md5sum] = "2c171ced93c0e83bb09e6ccad8e3ba2b" -SRC_URI[sha256sum] = "df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5" diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb new file mode 100644 index 0000000000..79afe9a70f --- /dev/null +++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "shared library for GIF images" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a" + +CVE_PRODUCT = "giflib_project:giflib" + +DEPENDS = "xmlto-native" + +SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz" +SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" + +do_install() { + # using autotools's default will end up in /usr/local + oe_runmake DESTDIR=${D} PREFIX=${prefix} LIBDIR=${libdir} install +} + +PACKAGES += "${PN}-utils" +FILES:${PN} = "${libdir}/libgif.so.*" +FILES:${PN}-utils = "${bindir}" + +BBCLASSEXTEND = "native" + +RDEPENDS:${PN}-utils = "perl" diff --git a/meta-oe/recipes-devtools/glade/glade_3.22.1.bb b/meta-oe/recipes-devtools/glade/glade_3.22.1.bb deleted file mode 100644 index bd4b586f1b..0000000000 --- a/meta-oe/recipes-devtools/glade/glade_3.22.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Glade - A User Interface Designer" -HOMEPAGE = "http://www.gnu.org/software/gnash" -LICENSE = "GPLv2 & LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \ - file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \ - file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475" -DEPENDS = "gtk+ gtk+3 glib-2.0 libxml2 intltool-native \ - gnome-common-native \ -" - - -inherit distro_features_check autotools pkgconfig gnomebase gobject-introspection - -REQUIRED_DISTRO_FEATURES = "x11" - -SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.22/glade-${PV}.tar.xz \ - file://remove-yelp-help-rules-var.patch \ - " -SRC_URI[md5sum] = "226802cf3b06861240524805aa6fe6ff" -SRC_URI[sha256sum] = "dff89a2ef2eaf000ff2a46979978d03cb9202cb04668e01d0ea5c5bb5547e39a" - -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" - diff --git a/meta-oe/recipes-devtools/glade/glade_3.22.2.bb b/meta-oe/recipes-devtools/glade/glade_3.22.2.bb new file mode 100644 index 0000000000..d11751a4b2 --- /dev/null +++ b/meta-oe/recipes-devtools/glade/glade_3.22.2.bb @@ -0,0 +1,26 @@ +SUMMARY = "Glade - A User Interface Designer" +HOMEPAGE = "http://www.gnu.org/software/gnash" +LICENSE = "GPL-2.0-only & LGPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \ + file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \ + file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475" +DEPENDS = "gtk+3 glib-2.0 libxml2 intltool-native \ + gnome-common-native \ + autoconf-archive-native \ +" +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. +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.22/glade-${PV}.tar.xz \ + file://remove-yelp-help-rules-var.patch \ + " +SRC_URI[md5sum] = "c074fa378c8f1ad80d20133c4ae6f42d" +SRC_URI[sha256sum] = "edefa6eb24b4d15bd52589121dc109bc08c286157c41288deb74dd9cc3f26a21" + +EXTRA_OECONF += "--disable-man-pages" + +FILES:${PN} += "${datadir}/glade ${datadir}/metainfo ${libdir}/glade/modules/libgladegtk.so" 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 new file mode 100644 index 0000000000..594503ae2a --- /dev/null +++ b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch @@ -0,0 +1,30 @@ +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 + +Fixes +riscv64-yoe-linux-musl/12.0.1/ld: libgrpc.so.23.0.0: undefined reference to `__atomic_exchange_1' +| collect2: error: ld returned 1 exit status + +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 06e6453b5c..476d7f1576 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -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() + + include(CheckCXXSourceCompiles) diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb new file mode 100644 index 0000000000..63c696a623 --- /dev/null +++ b/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb @@ -0,0 +1,67 @@ +DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ +Provides gRPC libraries for multiple languages written on top of shared C core library \ +(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" +HOMEPAGE = "https://github.com/grpc/grpc" +SECTION = "libs" +LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" + +DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" +DEPENDS:append:class-target = " googletest grpc-native " +DEPENDS:append:class-nativesdk = " grpc-native " + +PACKAGE_BEFORE_PN = "${PN}-compiler" + +RDEPENDS:${PN}-compiler = "${PN}" +RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" +# Configuration above allows to cross-compile gRPC applications +# In order to compile applications on the target, use the dependency below +# Both dependencies are mutually exclusive +# RDEPENDS:${PN}-dev += "${PN}-compiler" + +S = "${WORKDIR}/git" +SRCREV_grpc = "e5ae3b6b44bf3b64d24bfb4b4f82556239b986db" +BRANCH = "v1.60.x" +SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ + file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ + " +# Fixes build with older compilers 4.8 especially on ubuntu 14.04 +CXXFLAGS:append:class-native = " -Wl,--no-as-needed" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = " \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_INSTALL=ON \ + -DCMAKE_CROSSCOMPILING=ON \ + -DgRPC_INSTALL_LIBDIR=${baselib} \ + -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ + " + +PACKAGECONFIG ??= "cpp shared" +PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" +PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" +PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" +PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF" +PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF" +PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF" +PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF" +PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite" +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +do_configure:prepend() { + sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt +} + +BBCLASSEXTEND = "native nativesdk" + +FILES:${PN}-compiler += " \ + ${bindir} \ + ${libdir}/libgrpc_plugin_support${SOLIBS} \ + " diff --git a/meta-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.4.bb b/meta-oe/recipes-devtools/guider/guider_3.9.4.bb deleted file mode 100644 index 1a413452a3..0000000000 --- a/meta-oe/recipes-devtools/guider/guider_3.9.4.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "runtime performance analyzer" -HOMEPAGE = "https://github.com/iipeace/guider" -BUGTRACKER = "https://github.com/iipeace/guider/issues" -AUTHOR = "Peace Lee <ipeace5@gmail.com>" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" - -PV = "3.9.4+git${SRCPV}" -PR = "r0" - -SRC_URI = "git://github.com/iipeace/${BPN}" -#SRCREV = "${AUTOREV}" -SRCREV = "b433f3805674ef4588c1a161986c74eeac6a48e7" - -S = "${WORKDIR}/git" -R = "${RECIPE_SYSROOT}" - -inherit distutils - -GUIDER_OBJ = "guider.pyc" -GUIDER_SCRIPT = "guider" - -do_install() { - python ${S}/setup.py install - - install -d ${D}${bindir} - install -v -m 0755 ${STAGING_BINDIR_NATIVE}/${GUIDER_SCRIPT} ${D}${bindir}/${GUIDER_SCRIPT} - - install -d ${D}${datadir}/${BPN} - install -v -m 0755 ${STAGING_LIBDIR_NATIVE}/python${PYTHON_BASEVERSION}/site-packages/${BPN}/${GUIDER_OBJ} ${D}${datadir}/${BPN}/${GUIDER_OBJ} -} - -RDEPENDS_${PN} = "python-ctypes python-shell \ - python-json python-subprocess" diff --git a/meta-oe/recipes-devtools/guider/guider_3.9.8.bb b/meta-oe/recipes-devtools/guider/guider_3.9.8.bb new file mode 100644 index 0000000000..0d93297a07 --- /dev/null +++ b/meta-oe/recipes-devtools/guider/guider_3.9.8.bb @@ -0,0 +1,18 @@ +SUMMARY = "performance analyzer" +HOMEPAGE = "https://github.com/iipeace/guider" +BUGTRACKER = "https://github.com/iipeace/guider/issues" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" + +PV = "3.9.8+git" + +SRC_URI = "git://github.com/iipeace/${BPN};branch=master;protocol=https" +SRCREV = "a502cd93b13235b7539557a91328de00b7c51bc3" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +RDEPENDS:${PN} = "python3 python3-core \ + python3-ctypes python3-shell python3-json" diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-libheaptrack-Replace-__pid_t-with-pid_t.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-libheaptrack-Replace-__pid_t-with-pid_t.patch new file mode 100644 index 0000000000..9681086a52 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-libheaptrack-Replace-__pid_t-with-pid_t.patch @@ -0,0 +1,26 @@ +From 18671cd6028f996c138c6eb4282caf313f3fc605 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Nov 2020 15:25:18 -0800 +Subject: [PATCH] libheaptrack: Replace __pid_t with pid_t + +__pid_t is for internal libc use + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/track/libheaptrack.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/track/libheaptrack.cpp b/src/track/libheaptrack.cpp +index e138bce..4120ecd 100644 +--- a/src/track/libheaptrack.cpp ++++ b/src/track/libheaptrack.cpp +@@ -79,7 +79,7 @@ chrono::milliseconds elapsedTime() + return chrono::duration_cast<chrono::milliseconds>(clock::now() - startTime()); + } + +-__pid_t gettid() ++pid_t gettid() + { + return syscall(SYS_gettid); + } diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch new file mode 100644 index 0000000000..a6547eded8 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch @@ -0,0 +1,41 @@ +From bcfc4c8d7dc70bd81367c183a68cc9ee02ab4744 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 28 May 2021 17:52:57 -0700 +Subject: [PATCH] track: Check for unw_set_caching_policy before using + +llvm libunwind does not implement unw_cache_* functions yet +Include inttypes.h got PRI* macros + +Upstream-Status: Submitted [https://github.com/KDE/heaptrack/pull/33] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/track/trace_libunwind.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/track/trace_libunwind.cpp b/src/track/trace_libunwind.cpp +index c76337c..96b2176 100644 +--- a/src/track/trace_libunwind.cpp ++++ b/src/track/trace_libunwind.cpp +@@ -26,6 +26,7 @@ + + #define UNW_LOCAL_ONLY + #include <libunwind.h> ++#include <inttypes.h> + + #include <stdio.h> + +@@ -60,9 +61,11 @@ void Trace::print() + void Trace::setup() + { + // configure libunwind for better speed ++#if UNW_CACHE_PER_THREAD + if (unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD)) { + fprintf(stderr, "WARNING: Failed to enable per-thread libunwind caching.\n"); + } ++#endif + #if LIBUNWIND_HAS_UNW_SET_CACHE_SIZE + if (unw_set_cache_size(unw_local_addr_space, 1024, 0)) { + fprintf(stderr, "WARNING: Failed to set libunwind cache size.\n"); +-- +2.31.1 + diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch new file mode 100644 index 0000000000..5fa802cb38 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch @@ -0,0 +1,38 @@ +From 8ebcf5f2dd27dbeb6c81e9c40a5d17916cb243e6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Nov 2020 15:26:31 -0800 +Subject: [PATCH] heaptrack_inject: Include dlfcn.h for dlopen/dlclose + +Do not use __WORDSIZE which is for libc internal use + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/track/heaptrack_inject.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/track/heaptrack_inject.cpp b/src/track/heaptrack_inject.cpp +index 325d87e..fb1c154 100644 +--- a/src/track/heaptrack_inject.cpp ++++ b/src/track/heaptrack_inject.cpp +@@ -28,6 +28,7 @@ + #include <link.h> + #include <malloc.h> + #include <unistd.h> ++#include <dlfcn.h> + + #include <sys/mman.h> + +@@ -39,9 +40,10 @@ + * @brief Experimental support for symbol overloading after runtime injection. + */ + +-#if __WORDSIZE == 64 ++#include <limits.h> ++#if ULONG_MAX == 0xffffffffffffffff + #define ELF_R_SYM(i) ELF64_R_SYM(i) +-#elif __WORDSIZE == 32 ++#elif ULONG_MAX == 0xffffffff + #define ELF_R_SYM(i) ELF32_R_SYM(i) + #else + #error unsupported word size diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch new file mode 100644 index 0000000000..c3c852e39e --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch @@ -0,0 +1,118 @@ +From b8435c6523d9377f04d5e21629f3dc68b8865016 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Nov 2020 15:31:45 -0800 +Subject: [PATCH] heaptrack_preload: Make noexcept attribute conditional + +musl does not define these functions with noexcept and hence compiler +complains about them + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/track/heaptrack_preload.cpp | 26 ++++++++++++++++---------- + 1 file changed, 16 insertions(+), 10 deletions(-) + +diff --git a/src/track/heaptrack_preload.cpp b/src/track/heaptrack_preload.cpp +index 63110ce..ee85331 100644 +--- a/src/track/heaptrack_preload.cpp ++++ b/src/track/heaptrack_preload.cpp +@@ -171,11 +171,17 @@ void init() + } + } + ++#ifdef __GLIBC__ ++#define NOEXECPT noexcept ++#else ++#define NOEXECPT ++#endif ++ + extern "C" { + + /// TODO: memalign, pvalloc, ...? + +-void* malloc(size_t size) noexcept ++void* malloc(size_t size) NOEXECPT + { + if (!hooks::malloc) { + hooks::init(); +@@ -186,7 +192,7 @@ void* malloc(size_t size) noexcept + return ptr; + } + +-void free(void* ptr) noexcept ++void free(void* ptr) NOEXECPT + { + if (!hooks::free) { + hooks::init(); +@@ -204,7 +210,7 @@ void free(void* ptr) noexcept + hooks::free(ptr); + } + +-void* realloc(void* ptr, size_t size) noexcept ++void* realloc(void* ptr, size_t size) NOEXECPT + { + if (!hooks::realloc) { + hooks::init(); +@@ -219,7 +225,7 @@ void* realloc(void* ptr, size_t size) noexcept + return ret; + } + +-void* calloc(size_t num, size_t size) noexcept ++void* calloc(size_t num, size_t size) NOEXECPT + { + if (!hooks::calloc) { + hooks::init(); +@@ -235,7 +241,7 @@ void* calloc(size_t num, size_t size) noexcept + } + + #if HAVE_CFREE +-void cfree(void* ptr) noexcept ++void cfree(void* ptr) NOEXECPT + { + if (!hooks::cfree) { + hooks::init(); +@@ -252,7 +258,7 @@ void cfree(void* ptr) noexcept + } + #endif + +-int posix_memalign(void** memptr, size_t alignment, size_t size) noexcept ++int posix_memalign(void** memptr, size_t alignment, size_t size) NOEXECPT + { + if (!hooks::posix_memalign) { + hooks::init(); +@@ -268,7 +274,7 @@ int posix_memalign(void** memptr, size_t alignment, size_t size) noexcept + } + + #if HAVE_ALIGNED_ALLOC +-void* aligned_alloc(size_t alignment, size_t size) noexcept ++void* aligned_alloc(size_t alignment, size_t size) NOEXECPT + { + if (!hooks::aligned_alloc) { + hooks::init(); +@@ -285,7 +291,7 @@ void* aligned_alloc(size_t alignment, size_t size) noexcept + #endif + + #if HAVE_VALLOC +-void* valloc(size_t size) noexcept ++void* valloc(size_t size) NOEXECPT + { + if (!hooks::valloc) { + hooks::init(); +@@ -301,7 +307,7 @@ void* valloc(size_t size) noexcept + } + #endif + +-void* dlopen(const char* filename, int flag) noexcept ++void* dlopen(const char* filename, int flag) NOEXECPT + { + if (!hooks::dlopen) { + hooks::init(); +@@ -316,7 +322,7 @@ void* dlopen(const char* filename, int flag) noexcept + return ret; + } + +-int dlclose(void* handle) noexcept ++int dlclose(void* handle) NOEXECPT + { + if (!hooks::dlclose) { + hooks::init(); diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0004-backtrace-Always-include-stdint.h.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0004-backtrace-Always-include-stdint.h.patch new file mode 100644 index 0000000000..3db03cf85d --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0004-backtrace-Always-include-stdint.h.patch @@ -0,0 +1,42 @@ +From 200f71ea8c0756594ac7e079ccc686d9a20cea5c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Nov 2020 15:32:58 -0800 +Subject: [PATCH] backtrace: Always include stdint.h + +in OE we will always have system headers which supports C99/stdint.h + +Upstream-Status: Inappropriate [Unless upstream drops legacy] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 3rdparty/libbacktrace/backtrace.h | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/3rdparty/libbacktrace/backtrace.h b/3rdparty/libbacktrace/backtrace.h +index 14863cf..d0ac38f 100644 +--- a/3rdparty/libbacktrace/backtrace.h ++++ b/3rdparty/libbacktrace/backtrace.h +@@ -36,24 +36,8 @@ POSSIBILITY OF SUCH DAMAGE. */ + #include <stddef.h> + #include <stdio.h> + +-/* We want to get a definition for uintptr_t, but we still care about +- systems that don't have <stdint.h>. */ +-#if defined(__GLIBC__) && __GLIBC__ >= 2 +- +-#include <stdint.h> +- +-#elif defined(HAVE_STDINT_H) +- + #include <stdint.h> + +-#else +- +-/* Systems that don't have <stdint.h> must provide gstdint.h, e.g., +- from GCC_HEADER_STDINT in configure.ac. */ +-#include "gstdint.h" +- +-#endif +- + #ifdef __cplusplus + extern "C" { + #endif diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb new file mode 100644 index 0000000000..be2c0f5394 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "Heap memory profiler for Linux" +DESCRIPTION = "Heaptrack traces all memory allocations and annotates these \ +events with stack traces. Dedicated analysis tools then allow you to interpret \ +the heap memory profile to find hotspots to reduce memory, leaks, allocation \ +hotspots and temporary allocations" +HOMEPAGE = "https://phabricator.kde.org/source/heaptrack/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "zlib boost libunwind elfutils" + +SRC_URI = "git://github.com/KDE/heaptrack.git;protocol=https;branch=master \ + file://0001-libheaptrack-Replace-__pid_t-with-pid_t.patch \ + file://0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch \ + file://0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch \ + file://0004-backtrace-Always-include-stdint.h.patch \ + file://0001-track-Check-for-unw_set_caching_policy-before-using.patch \ + " + +SRCREV = "bc9e3744bcc47de978673d1e382f4125a1ab5fa8" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE += "-DHEAPTRACK_BUILD_GUI=OFF" + +# libunwind is not yet ported to RISCV +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:riscv64 = "null" + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/icon-slicer/icon-slicer_0.3.bb b/meta-oe/recipes-devtools/icon-slicer/icon-slicer_0.3.bb index 9768a6e716..8e7b0ba5a0 100644 --- a/meta-oe/recipes-devtools/icon-slicer/icon-slicer_0.3.bb +++ b/meta-oe/recipes-devtools/icon-slicer/icon-slicer_0.3.bb @@ -1,4 +1,4 @@ -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "gdk-pixbuf popt" diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch deleted file mode 100644 index 5b9afd9616..0000000000 --- a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 31 Aug 2017 20:47:50 -0700 -Subject: [PATCH] Fix printd formatting strings - -Fixes -error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/ipfilter.c | 2 +- - src/othptab.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/ipfilter.c b/src/ipfilter.c -index eb17ec7..8c76e4c 100644 ---- a/src/ipfilter.c -+++ b/src/ipfilter.c -@@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask, - snprintf(msgstr, 60, - "Invalid protocol input at or near token \"%s\"", - bptr); -- tui_error(ANYKEY_MSG, msgstr); -+ tui_error(ANYKEY_MSG, "%s", msgstr); - doagain = 1; - } else - doagain = 0; -diff --git a/src/othptab.c b/src/othptab.c -index 142c9c2..fe395c2 100644 ---- a/src/othptab.c -+++ b/src/othptab.c -@@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, - break; - } - -- sprintf(scratchpad, rarp_mac_addr); -+ sprintf(scratchpad, "%s", rarp_mac_addr); - strcat(msgstring, scratchpad); - wattrset(table->othpwin, ARPATTR); - break; -@@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, - wattrset(table->othpwin, UNKNIPATTR); - protptr = getprotobynumber(entry->protocol); - if (protptr != NULL) { -- sprintf(protname, protptr->p_aliases[0]); -+ sprintf(protname, "%s", protptr->p_aliases[0]); - } else { - sprintf(protname, "IP protocol"); - unknown = 1; --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch new file mode 100644 index 0000000000..342c78f0f1 --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch @@ -0,0 +1,44 @@ +From 223de708552b1ab00ac1a119e82e13deed573036 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 30 Oct 2021 10:22:38 -0700 +Subject: [PATCH] make: Make CC weak assignment + +This ensures that if environment overrrides it then its respected, this +helps cross-compiling cases + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Makefile ++++ b/Makefile +@@ -18,14 +18,14 @@ VERSION-FILE: FORCE + @$(SHELL_PATH) ./GEN-VERSION-FILE + -include VERSION-FILE + +-CFLAGS = -g -O2 -Wall -W -Werror=format-security +-LDFLAGS = ++CFLAGS += -g -O2 -Wall -W -Werror=format-security ++LDFLAGS ?= + IPTRAF_CFLAGS := -std=gnu99 -D_GNU_SOURCE + ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(IPTRAF_CFLAGS) + ALL_LDFLAGS = $(LDFLAGS) + STRIP ?= strip + +-prefix = $(HOME) ++prefix ?= $(HOME) + sbindir_relative = sbin + sbindir = $(prefix)/$(sbindir_relative) + mandir = $(prefix)/share/man +@@ -39,7 +39,7 @@ pathsep = : + + export prefix bindir sharedir sysconfdir gitwebdir localedir + +-CC = cc ++CC ?= cc + RM = rm -f + INSTALL = install + RPMBUILD = rpmbuild diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf b/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf new file mode 100644 index 0000000000..ebb9d67800 --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf @@ -0,0 +1,3 @@ +d /run/iptraf-ng 0755 root root - +d /var/log/iptraf-ng 0755 root root - +d /var/lib/iptraf-ng 0755 root root - diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch index 65b92dade2..8704310406 100644 --- a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch @@ -2,11 +2,9 @@ Use pkg-config to search for ncurses libraries Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending -Index: iptraf-ng-1.1.4/Makefile -=================================================================== ---- iptraf-ng-1.1.4.orig/Makefile -+++ iptraf-ng-1.1.4/Makefile -@@ -205,8 +205,8 @@ endif +--- a/Makefile ++++ b/Makefile +@@ -201,8 +201,8 @@ endif ifndef NCURSES_LDFLAGS ifdef NEEDS_NCURSES5 @@ -17,7 +15,7 @@ Index: iptraf-ng-1.1.4/Makefile ifndef NO_PANEL NCURSES_LDFLAGS += -lpanel endif -@@ -215,8 +215,8 @@ endif +@@ -211,8 +211,8 @@ endif ifndef NCURSES_LDFLAGS ifdef NEEDS_NCURSESW5 @@ -26,9 +24,9 @@ Index: iptraf-ng-1.1.4/Makefile + NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null) + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) ifndef NO_PANEL - NCURSES_LDFLAGS += -lpanel + NCURSES_LDFLAGS += -lpanelw endif -@@ -225,8 +225,8 @@ endif +@@ -221,8 +221,8 @@ endif ifndef NCURSES_LDFLAGS ifdef NEEDS_NCURSES6 @@ -39,7 +37,7 @@ Index: iptraf-ng-1.1.4/Makefile ifndef NO_PANEL NCURSES_LDFLAGS += -lpanel endif -@@ -235,8 +235,8 @@ endif +@@ -231,8 +231,8 @@ endif ifndef NCURSES_LDFLAGS ifdef NEEDS_NCURSESW6 @@ -48,34 +46,45 @@ Index: iptraf-ng-1.1.4/Makefile + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) ifndef NO_PANEL - NCURSES_LDFLAGS += -lpanel + NCURSES_LDFLAGS += -lpanelw endif -@@ -246,17 +246,17 @@ endif +@@ -241,27 +241,27 @@ endif + # try find ncuses by autodetect ifndef NCURSES_LDFLAGS - ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) +- ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) ++ ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) ++ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) ++ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanelw + endif - else ifneq ($(shell ncurses6-config --libs 2>/dev/null),) - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) ++ else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) ++ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) ++ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanel + endif - else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),) - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) ++ else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) ++ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) ++ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanelw + endif - else ifneq ($(shell ncurses5-config --libs 2>/dev/null),) - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) -+ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) -+ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) -+ else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) -+ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) -+ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) -+ else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) -+ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) -+ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) - endif - - ifneq ($(NCURSES_LDFLAGS),) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanel + endif diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb index c53e66300d..f9e2c7873c 100644 --- a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb @@ -20,23 +20,34 @@ built-in raw socket interface of the Linux kernel, so it can be used \ on a wide variety of supported network cards." HOMEPAGE = "https://fedorahosted.org/iptraf-ng/" -LICENSE = "GPL-2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731" DEPENDS = "ncurses" -SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/iptraf-ng/iptraf-ng-1.1.4.tar.gz/e0f8df3b7baf2b5106709abc4f8c029a/${BP}.tar.gz \ +SRC_URI = "https://src.fedoraproject.org/repo/pkgs/iptraf-ng/v${PV}.tar.gz/sha512/44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384/v${PV}.tar.gz \ + file://iptraf-ng-tmpfiles.conf \ file://ncurses-config.patch \ - file://0001-Fix-printd-formatting-strings.patch \ + file://0001-make-Make-CC-weak-assignment.patch \ " -SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a" -SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c" +SRC_URI[sha256sum] = "9f5cef584065420dea1ba32c86126aede1fa9bd25b0f8362b0f9fd9754f00870" -inherit autotools-brokensep pkgconfig +inherit pkgconfig CFLAGS += "-D_GNU_SOURCE" +do_compile() { + oe_runmake +} + +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 ${UNPACKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf +} + +FILES:${PN} += "${libdir}/tmpfiles.d" PROVIDES = "iptraf" -RPROVIDES_${PN} += "iptraf" -RREPLACES_${PN} += "iptraf" -RCONFLICTS_${PN} += "iptraf" +RPROVIDES:${PN} += "iptraf" +RREPLACES:${PN} += "iptraf" +RCONFLICTS:${PN} += "iptraf" diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest new file mode 100644 index 0000000000..5c826a1766 --- /dev/null +++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest @@ -0,0 +1,48 @@ +#!/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 + sed -e '/: pass/ s/^/PASS: /g' \ + -e '/: skip/ s/^/SKIP: /g' \ + -e '/: fail/ s/^/FAIL: /g' \ + -e 's/: pass//g' \ + -e 's/: skip//g' \ + -e 's/: fail//g' \ + -e '/^--- pass:/d' tests.log + fi + 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 new file mode 100644 index 0000000000..cc21c8beae --- /dev/null +++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb @@ -0,0 +1,55 @@ +# Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "General-purpose scalable concurrent malloc implementation" + +DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \ +fragmentation avoidance and scalable concurrency support." + +HOMEPAGE = "https://github.com/jemalloc/jemalloc" +LICENSE = "BSD-2-Clause" + +SECTION = "libs" + +LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" + +SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=dev;protocol=https \ + file://run-ptest \ + " +SRCREV = "630434bb0ac619f7beec927569782d924c459385" +PV_LONG := "${PV}-171-g${SRCREV}" +PV .= "+git" + +S = "${WORKDIR}/git" + +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' \ + -e 's@${STAGING_DIR_NATIVE}@@g' \ + -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config +} + +do_compile_ptest() { + oe_runmake tests +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + subdirs="unit integration stress " + for tooltest in ${subdirs} + do + 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.6.bb b/meta-oe/recipes-devtools/jq/jq_1.6.bb deleted file mode 100644 index 0086eae5c3..0000000000 --- a/meta-oe/recipes-devtools/jq/jq_1.6.bb +++ /dev/null @@ -1,29 +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=15d03e360fa7399f76d5a4359fc72cbf" - -SRC_URI = "https://github.com/stedolan/${BPN}/releases/download/${BP}/${BP}.tar.gz \ -" - -SRC_URI[md5sum] = "e68fbd6a992e36f1ac48c99bbf825d6b" -SRC_URI[sha256sum] = "5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72" - -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" - -OE_EXTRACONF += " \ - --disable-valgrind \ -" - -BBCLASSEXTEND = "native" 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/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/0004-cmake-Use-GNUInstallDirs.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch new file mode 100644 index 0000000000..8199e4f8d4 --- /dev/null +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch @@ -0,0 +1,43 @@ +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 + +This helps it make it platform independent, some platforms e.g. +ppc64/linux use /usr/lib64 for system libraries + +Upstream-Status: Submitted [https://github.com/pboettch/json-schema-validator/pull/197] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e4587f..3eff234 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -93,11 +93,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + endif() + endif() + ++include(GNUInstallDirs) ++ + if(JSON_VALIDATOR_INSTALL) + install(TARGETS nlohmann_json_schema_validator + EXPORT ${PROJECT_NAME}Targets +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR} + RUNTIME DESTINATION bin) + + install(FILES src/nlohmann/json-schema.hpp +@@ -129,7 +131,7 @@ endif() + + 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) + + # Install Targets 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.8.4.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb index 97fc6c73b2..c54dc94666 100644 --- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.4.bb +++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb @@ -9,15 +9,17 @@ HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp" SECTION = "libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926" -SRCREV = "ddabf50f72cf369bf652a95c4d9fe31a1865a781" -SRC_URI = "git://github.com/open-source-parsers/jsoncpp" +PE = "1" + +SRCREV = "5defb4ed1a4293b8e2bf641e16b156fb9de498cc" +SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https" S = "${WORKDIR}/git" inherit cmake -EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF" +EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF" BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.2.0.bb b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb index dbf44d796f..544922f05d 100644 --- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.2.0.bb +++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb @@ -9,8 +9,9 @@ SECTION = "libs" DEPENDS = "curl jsoncpp libmicrohttpd hiredis" -SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp" -SRCREV = "4ed5b00dcc409405a19e6d8c6478f703153430e1" +SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https" + +SRCREV = "ec5ce12fc9c0299e1454cc002c70218b5a6f005b" S = "${WORKDIR}/git" @@ -24,4 +25,4 @@ EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO -DCOMPILE_EXAMPLES=NO -DCMAKE_LIBRARY_PATH=${libdir} \ " -FILES_${PN}-dev += "${libdir}/libjson-rpc-cpp/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 fae80a79e7..b894f0ba03 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 @@ -8,25 +8,26 @@ kconfig infrastructure, ready for use by third-party projects. \ The kconfig-frontends package provides the kconfig parser, as well as all \ the frontends" HOMEPAGE = "https://gitlab.com/ymorin/kconfig-frontends" -LICENSE = "GPL-2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408" SECTION = "devel" -DEPENDS += "ncurses flex bison gperf-native bison-native" -RDEPENDS_${PN} += "python3 bash" +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" S = "${WORKDIR}/git" inherit autotools pkgconfig -do_configure_prepend () { +do_configure:prepend () { mkdir -p ${S}/scripts/.autostuff/m4 } -do_install_append() { +do_install:append() { ln -s kconfig-conf ${D}${bindir}/conf ln -s kconfig-mconf ${D}${bindir}/mconf } 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.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/lapack/lapack_3.8.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.8.0.bb deleted file mode 100644 index 7544744b34..0000000000 --- a/meta-oe/recipes-devtools/lapack/lapack_3.8.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Linear Algebra PACKage" -URL = "http://www.netlib.org/lapack" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=930f8aa500a47c7dab0f8efb5a1c9a40" - -# 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" - -SRC_URI = "http://www.netlib.org/lapack/lapack-${PV}.tar.gz" -SRC_URI[md5sum] = "96591affdbf58c450d45c1daa540dbd2" -SRC_URI[sha256sum] = "deb22cc4a6120bff72621155a9917f485f96ef8319ac074a7afbc68aab88bcf6" - -EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON " -OECMAKE_GENERATOR = "Unix Makefiles" - -inherit cmake pkgconfig -EXCLUDE_FROM_WORLD = "1" diff --git a/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb b/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb new file mode 100644 index 0000000000..16816e62d8 --- /dev/null +++ b/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb @@ -0,0 +1,23 @@ +SUMMARY = "LDNS is a DNS library that facilitates DNS tool programming" +HOMEPAGE = "https://nlnetlabs.nl/ldns" +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] = "c3f72dd1036b2907e3a56e6acf9dfb2e551256b3c1bbd9787942deeeb70e7860" + +DEPENDS = "openssl" + +inherit autotools-brokensep + +PACKAGECONFIG ??= "" +PACKAGECONFIG[drill] = "--with-drill,--without-drill" + +EXTRA_OECONF = "--with-ssl=${STAGING_EXECPREFIXDIR}" + +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 +} 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/libgee/libgee_0.20.2.bb b/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb index a048e48326..0ed6e8235d 100644 --- a/meta-oe/recipes-devtools/libgee/libgee_0.20.2.bb +++ b/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb @@ -5,18 +5,17 @@ SECTION = "libs" DEPENDS = "glib-2.0" BBCLASSEXTEND = "native" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" -PE = "1" +GNOMEBASEBUILDCLASS = "autotools" inherit gnomebase vala gobject-introspection -do_configure_prepend() { +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.md5sum] = "45db478f2b300ada8e039ebc6c9458de" -SRC_URI[archive.sha256sum] = "9e035c4b755f46bfae70ba81cdcf8328b03f554373cec8c816e8b5680f85353c" +SRC_URI[archive.sha256sum] = "1bf834f5e10d60cc6124d74ed3c1dd38da646787fbf7872220b8b4068e476d4d" 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 b83e86a488..9b18269bcb 100644 --- a/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb +++ b/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb @@ -4,20 +4,19 @@ Unicode Standard Annex #14 (UAX #14). East_Asian_Width informative \ properties defined by Annex #11 (UAX #11) may be concerned to determin \ breaking positions. This package also implements "default" Grapheme \ Cluster segmentation described in Annex #29 (UAX #29)." -LICENSE = "Artistic-1.0 | GPLv1+" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=5b122a36d0f6dc55279a0ebc69f3c60b" -SRC_URI = "git://github.com/hatukanezumi/sombok.git;protocol=https \ +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-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch b/meta-oe/recipes-devtools/libubox/libubox/0001-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch new file mode 100644 index 0000000000..4f1dd76326 --- /dev/null +++ b/meta-oe/recipes-devtools/libubox/libubox/0001-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch @@ -0,0 +1,42 @@ +From a12325a0cbf3bf1d66a0b0f8d85e08083bae6066 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz> +Date: Wed, 25 Dec 2019 10:27:59 +0100 +Subject: [PATCH] blobmsg: fix array out of bounds GCC 10 warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes following warning reported by GCC 10.0.0 20191203: + + blobmsg.c:234:2: error: 'strcpy' offset 6 from the object at 'attr' is out of the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka 'unsigned char[0]'} at offset 6 [-Werror=array-bounds] + 234 | strcpy((char *) hdr->name, (const char *)name); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + In file included from blobmsg.c:16: + blobmsg.h:42:10: note: subobject 'name' declared here + 42 | uint8_t name[]; + | ^~~~ + +Upstream-Status: Submitted [https://gitlab.com/ynezz/openwrt-libubox/commit/3775b3aa28de8c20d96b6f02786a327423b0748a] +Reported-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Petr Štetiar <ynezz@true.cz> +--- + blobmsg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blobmsg.c b/blobmsg.c +index a860483..b6b7535 100644 +--- a/blobmsg.c ++++ b/blobmsg.c +@@ -195,7 +195,7 @@ blobmsg_new(struct blob_buf *buf, int type, const char *name, int payload_len, v + attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED); + hdr = blob_data(attr); + hdr->namelen = cpu_to_be16(namelen); +- strcpy((char *) hdr->name, (const char *)name); ++ memcpy(hdr->name, name, namelen); + pad_end = *data = blobmsg_data(attr); + pad_start = (char *) &hdr->name[namelen]; + if (pad_start < pad_end) +-- +2.24.1 + 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 f9f4e08b71..39e18cdafd 100644 --- a/meta-oe/recipes-devtools/libubox/libubox_git.bb +++ b/meta-oe/recipes-devtools/libubox/libubox_git.bb @@ -1,6 +1,6 @@ DESCRIPTION = "C utility functions for OpenWrt" SECTION = "libs" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "\ file://avl.c;endline=39;md5=00810155fed3d604816ec5814523d60a \ file://avl-cmp.c;endline=15;md5=1603e6094b432a5f3f320877a06f41b5 \ @@ -13,17 +13,18 @@ LIC_FILES_CHKSUM = "\ " SRC_URI = "\ - git://git.openwrt.org/project/libubox.git \ + git://git.openwrt.org/project/libubox.git;branch=master \ file://0001-version-libraries.patch \ file://fix-libdir.patch \ + file://0001-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch \ " -SRCREV = "155bf39896f126b1ba121b816922a88dc34c31e3" -PV = "1.0.1+git${SRCPV}" +SRCREV = "07413cce72e19520af55dfcbc765484f5ab41dd9" +PV = "1.0.1+git" S = "${WORKDIR}/git" -inherit cmake +inherit cmake pkgconfig DEPENDS = "json-c" diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch deleted file mode 100644 index 44a835c35f..0000000000 --- a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001 -From: Vaclav Haisman <vhaisman@gmail.com> -Date: Sun, 21 Jul 2019 23:23:16 -0700 -Subject: [PATCH] Remove log4cplus version entry from ELF .comment section - -Reverts -https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b - -Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb] - -Suggested-by: Adrian Bunk <bunk@stusta.de> -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/version.cxx | 12 ------------ - 1 file changed, 12 deletions(-) - -diff --git a/src/version.cxx b/src/version.cxx -index ce18212..e002de9 100644 ---- a/src/version.cxx -+++ b/src/version.cxx -@@ -34,16 +34,4 @@ namespace log4cplus - unsigned const version = LOG4CPLUS_VERSION; - char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX; - --namespace --{ -- --#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__)) --char const versionStrComment[] -- __attribute__ ((__used__, __section__ ((".comment")))) -- = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX; --#endif -- -- --} // namespace -- - } // namespace log4cplus --- -2.22.0 - diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb deleted file mode 100644 index 566de28535..0000000000 --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "log4cplus provides a simple C++ logging API for log management" -SECTION = "libs" -HOMEPAGE = "http://sourceforge.net/projects/log4cplus/" -BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/" - -LICENSE = "Apache-2.0 & BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \ - file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \ - " -SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2" -SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a" - -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/log4cplus/files/log4cplus-stable/" -UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/" - -inherit autotools pkgconfig - -BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/lshw/files/0001-Makefile-Fix-cross-compilation.patch b/meta-oe/recipes-devtools/lshw/files/0001-Makefile-Fix-cross-compilation.patch deleted file mode 100644 index 6db6ab95ee..0000000000 --- a/meta-oe/recipes-devtools/lshw/files/0001-Makefile-Fix-cross-compilation.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 62f9ed95b5d0feab426bff452be793c62a6b795a Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski <krzk@kernel.org> -Date: Wed, 6 Jun 2018 12:49:21 +0200 -Subject: [PATCH 1/2] Makefile: Fix cross compilation - -Allow building on ARMv7 and ARMv8. - -Upstream-Status: Submitted -Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> ---- - src/Makefile | 2 +- - src/core/Makefile | 2 +- - src/gui/Makefile | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index b50586bc9234..654b786dd899 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -18,7 +18,7 @@ export MANDIR - export DATADIR - export SQLITE - --CXX?=c++ -+CXX?=$(CROSS_COMPILE)c++ - INCLUDES=-I./core/ - DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" - CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) -diff --git a/src/core/Makefile b/src/core/Makefile -index 5bf5a69cc6a6..2bd1b94c4175 100644 ---- a/src/core/Makefile -+++ b/src/core/Makefile -@@ -1,6 +1,6 @@ - PACKAGENAME?=lshw - --CXX=c++ -+CXX?=$(CROSS_COMPILE)c++ - INCLUDES= - DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" - CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) -diff --git a/src/gui/Makefile b/src/gui/Makefile -index 332ce5704819..b0f925490356 100644 ---- a/src/gui/Makefile -+++ b/src/gui/Makefile -@@ -1,7 +1,7 @@ - PACKAGENAME?=lshw - --CXX?=c++ --CC?=cc -+CXX?=$(CROSS_COMPILE)c++ -+CC?=$(CROSS_COMPILE)cc - STRIP?=strip - OBJCOPY?=objcopy - --- -2.7.4 - 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/files/0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch b/meta-oe/recipes-devtools/lshw/files/0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch deleted file mode 100644 index d3da01b403..0000000000 --- a/meta-oe/recipes-devtools/lshw/files/0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 75667f8a0ae4f1689ff03eb1768b1ee8cdfbf00d Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski <krzk@kernel.org> -Date: Wed, 6 Jun 2018 12:49:30 +0200 -Subject: [PATCH 2/2] Makefile: Use supplied LDFLAGS to silence OE GNU_HASH QA - warning - -Fix OpenEmbedded/Yocto QA warning: - - ERROR: lshw-02.16-r1 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'build/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/lshw/02.16-r1/packages-split/lshw/usr/sbin/lshw' [ldflags] - ERROR: lshw-02.16-r1 do_package_qa: QA run found fatal errors. Please consider fixing them. - ERROR: lshw-02.16-r1 do_package_qa: Function failed: do_package_qa - -Upstream-Status: Submitted -Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 654b786dd899..a441ba2bb666 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -25,7 +25,7 @@ CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) - ifeq ($(SQLITE), 1) - CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) - endif --LDFLAGS=-L./core/ -g -+LDFLAGS+=-L./core/ -g - ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) - LDFLAGS+= -Wl,--as-needed - endif --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/lshw/files/0003-sysfs-Fix-basename-build-with-musl.patch b/meta-oe/recipes-devtools/lshw/files/0003-sysfs-Fix-basename-build-with-musl.patch deleted file mode 100644 index 34924939de..0000000000 --- a/meta-oe/recipes-devtools/lshw/files/0003-sysfs-Fix-basename-build-with-musl.patch +++ /dev/null @@ -1,92 +0,0 @@ -From a89f2ba8496994c8b5e28a89202df15d64c648f9 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski <krzk@kernel.org> -Date: Wed, 6 Jun 2018 12:47:02 +0200 -Subject: [PATCH] sysfs: Fix basename() build with musl - -musl provides only standard basename() which accepts non-const string. -This fixes build error with musl C library: - - | sysfs.cc: In function 'std::__cxx11::string sysfs_getbustype(const string&)': - | sysfs.cc:102:21: error: 'basename' was not declared in this scope - | "/devices/" + basename(path.c_str()); - | ^~~~~~~~ - -Upstream-Status: Submitted -Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> ---- - src/core/dasd.cc | 3 ++- - src/core/sysfs.cc | 9 +++++---- - 2 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/src/core/dasd.cc b/src/core/dasd.cc -index 626b8a872b0f..b27844215cc4 100644 ---- a/src/core/dasd.cc -+++ b/src/core/dasd.cc -@@ -2,6 +2,7 @@ - #include "osutils.h" - #include "dasd.h" - #include <glob.h> -+#include <libgen.h> - #include <string.h> - #include <fcntl.h> - #include <unistd.h> -@@ -42,7 +43,7 @@ bool scan_dasd(hwNode & n) - { - for(dev_num=0;dev_num<devices.gl_pathc;dev_num++) - { -- dev_name = basename(devices.gl_pathv[dev_num]); -+ dev_name = basename(const_cast<char *>(devices.gl_pathv[dev_num])); - for (std::vector<std::string>::iterator it = sysfs_attribs.begin(); it != sysfs_attribs.end(); ++it) - { - std::string attrib_fname = std::string(SYSFS_PREFIX) + dev_name + "/device/" + *it; -diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc -index acc9d0056d5e..c56bab7b3b9f 100644 ---- a/src/core/sysfs.cc -+++ b/src/core/sysfs.cc -@@ -7,6 +7,7 @@ - #include "version.h" - #include "sysfs.h" - #include "osutils.h" -+#include <libgen.h> - #include <limits.h> - #include <unistd.h> - #include <stdlib.h> -@@ -99,7 +100,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); -@@ -139,7 +140,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 -@@ -207,7 +208,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())); - } - - -@@ -288,7 +289,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())); - } - - --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/lshw/lshw_02.18.bb b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb index d1a7334248..0fb68d8684 100644 --- a/meta-oe/recipes-devtools/lshw/lshw_02.18.bb +++ b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb @@ -6,21 +6,30 @@ SUMMARY = "Hardware lister" HOMEPAGE = "http://ezix.org/project/wiki/HardwareLiSter" SECTION = "console/tools" -LICENSE = "GPLv2+" +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-Makefile-Fix-cross-compilation.patch \ - file://0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch \ - file://0003-sysfs-Fix-basename-build-with-musl.patch \ + git://github.com/lyonel/lshw.git;protocol=https;branch=master \ + file://0001-disable-docbook2man.patch \ " -SRC_URI[md5sum] = "8671c6d94d6324a744b7f21f1bfecfd2" -SRC_URI[sha256sum] = "ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f" -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 index 4d0e0392f7..c896e3ebb0 100644 --- 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 @@ -11,6 +11,8 @@ sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [- Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/arm/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch new file mode 100644 index 0000000000..98cc9ba907 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch @@ -0,0 +1,42 @@ +From 5226333bddb755dbefd780d31450e0238dd5d3bd Mon Sep 17 00:00:00 2001 +From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +Date: Wed, 16 Oct 2019 08:24:23 +0900 +Subject: [PATCH] Bug fix for data type length judgment. + +... +if (byte_size == sizeof(long)) { + + *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG; + + return true; + +} +... + +If ltrace's target command has a dbg package, ltrace will look for the debug file and analyze its contents. +Ltrace determines the type of analysis result variable. The type of the variable is longlong. +On 32-bit systems, longlong is 8 and long is 4 (same as in). +An error occurred because the ltrace code did not process a variable of length 8. + +Upstream-Status: Pending +Signed-off-by: Wang Mingyu <wangmy.fnst@cn.fujitsu.com> +--- + dwarf_prototypes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c +index bfac177..9887d4b 100644 +--- a/dwarf_prototypes.c ++++ b/dwarf_prototypes.c +@@ -190,7 +190,7 @@ static bool get_integer_base_type(enum arg_type *type, int byte_size, + return true; + } + +- if (byte_size == sizeof(long)) { ++ if (byte_size == sizeof(long long)) { + *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG; + return true; + } +-- +2.7.4 + 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 new file mode 100644 index 0000000000..9def41ca60 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch @@ -0,0 +1,46 @@ +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-hook-Do-not-append-int-to-std-string.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch index 8f1c4b9b9b..2890373821 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch @@ -23,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> if (sysconfdir != NULL && *sysconfdir != '\0') { /* No +1, we skip the initial period. */ - syspath = malloc(strlen(sysconfdir) + sizeof FN); -+ syspath = malloc(strlen(sysconfdir) + sizeof FN + 1); ++ syspath = malloc(strlen(sysconfdir) + sizeof FN + 2); + syspath[strlen(sysconfdir) + sizeof FN + 1] = '\0'; if (syspath == NULL - || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch new file mode 100644 index 0000000000..f83e0a2738 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch @@ -0,0 +1,50 @@ +From ed8dbe1c793f2f770fef61adc4390277f903cceb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 9 Jul 2021 01:32:42 -0700 +Subject: [PATCH] mips: Use hardcodes values for ABI syscall bases + +mips kernels 5.13+ have stopped exposing the UAPIs which provided these +defines, the values are more or less static so just use the hardcoded +values for now. Use __NR_syscalls to get number of syscalls supported +and include asm-generic/unistd.h to get this definition + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sysdeps/linux-gnu/mips/trace.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/sysdeps/linux-gnu/mips/trace.c b/sysdeps/linux-gnu/mips/trace.c +index d54818e..e72184d 100644 +--- a/sysdeps/linux-gnu/mips/trace.c ++++ b/sysdeps/linux-gnu/mips/trace.c +@@ -33,6 +33,7 @@ + #include <asm/unistd.h> + #include <assert.h> + #include <asm/unistd.h> ++#include <asm-generic/unistd.h> + + #include "backend.h" + #include "common.h" +@@ -135,12 +136,12 @@ syscall_p(struct process *proc, int status, int *sysnum) + int min_syscall, max_syscall, sigreturn, rt_sigreturn; + struct callstack_element *top = NULL; + int depth = proc->callstack_depth; +- const int syscallbase[] = {__NR_O32_Linux, __NR_N32_Linux, +- __NR_64_Linux, __NR_O32_Linux}; +- const int syscallnum[] = {__NR_O32_Linux_syscalls, +- __NR_N32_Linux_syscalls, +- __NR_64_Linux_syscalls, +- __NR_O32_Linux_syscalls}; ++ const int syscallbase[] = {4000, 6000, ++ 5000, 4000}; ++ const int syscallnum[] = {__NR_syscalls, ++ __NR_syscalls, ++ __NR_syscalls, ++ __NR_syscalls}; + const int rt_sigreturn_list[] = {193, 211, 211, 193}; + const int sigreturn_list[] = {119, -1, -1, 119}; + +-- +2.32.0 + 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 new file mode 100644 index 0000000000..35062debf2 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch @@ -0,0 +1,39 @@ +From 4517bf59838f40eb6e3f46e39adb5e5090c59df8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 15 Jun 2021 18:14:36 -0700 +Subject: [PATCH] ppc: Remove unused host_powerpc64 function + +This function is dead code, remove it which avoids compiler warnings +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/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 5f81889..9d1838b 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -142,16 +142,6 @@ + #define PPC64_PLT_STUB_SIZE 4 + #endif + +-static inline int +-host_powerpc64() +-{ +-#ifdef __powerpc64__ +- return 1; +-#else +- return 0; +-#endif +-} +- + static void + mark_as_resolved(struct library_symbol *libsym, GElf_Addr value) + { +-- +2.32.0 + 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 new file mode 100644 index 0000000000..4793e561c0 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch @@ -0,0 +1,29 @@ +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/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 new file mode 100644 index 0000000000..dcd0285db6 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch @@ -0,0 +1,41 @@ +Upstream-Status: Pending + +--- a/sysdeps/linux-gnu/ppc/ptrace.h ++++ b/sysdeps/linux-gnu/ppc/ptrace.h +@@ -18,4 +18,5 @@ + * 02110-1301 USA + */ + ++#include <asm/ptrace.h> + #include <sys/ptrace.h> +--- a/sysdeps/linux-gnu/ppc/regs.c ++++ b/sysdeps/linux-gnu/ppc/regs.c +@@ -23,11 +23,14 @@ + + #include "config.h" + ++#include <string.h> + #include <sys/types.h> + #include <sys/ptrace.h> + #include <asm/ptrace.h> + #include <errno.h> ++#ifdef HAVE_ERROR_H + #include <error.h> ++#endif + + #include "proc.h" + #include "common.h" +@@ -49,8 +52,11 @@ get_instruction_pointer(struct process * + void + set_instruction_pointer(struct process *proc, void *addr) + { +- if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0) +- error(0, errno, "set_instruction_pointer"); ++ if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){ ++ report_global_error("%s: set_instruction_pointer", ++ strerror(errno)); ++ exit(1); ++ } + } + + void * diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch deleted file mode 100644 index e4490bbb9e..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch +++ /dev/null @@ -1,30 +0,0 @@ -kernel headers have restructured mips syscall generation in kernel -in recent versions, however, ltrace still has logic to define the -syscall numbers based on old logic, this patch includes the legacy -UAPI headers to get these defines - -Fixes errors e.g. -../../../../git/sysdeps/linux-gnu/mips/trace.c:138:29: error: '__NR_O32_Linux' undeclared (first use in this function) - const int syscallbase[] = {__NR_O32_Linux, __NR_N32_Linux, - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/sysdeps/linux-gnu/mips/trace.c -+++ b/sysdeps/linux-gnu/mips/trace.c -@@ -34,6 +34,16 @@ - #include <assert.h> - #include <asm/unistd.h> - -+#ifndef __NR_O32_Linux -+#include <asm/unistd_nr_o32.h> -+#endif -+#ifndef __NR_N32_Linux -+#include <asm/unistd_nr_n64.h> -+#endif -+#ifndef __NR_N64_Linux -+#include <asm/unistd_nr_n32.h> -+#endif -+ - #include "backend.h" - #include "common.h" - #include "debug.h" diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index ead637cb7e..63971970cf 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -6,16 +6,15 @@ It can also intercept and print the system calls executed by the program.\ " HOMEPAGE = "http://ltrace.org/" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" PE = "1" -PV = "7.91+git${SRCPV}" +PV = "7.91+git" SRCREV = "c22d359433b333937ee3d803450dc41998115685" DEPENDS = "elfutils" -RDEPENDS_${PN} = "elfutils" -SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http \ +SRC_URI = "git://github.com/sparkleholic/ltrace.git;protocol=https;branch=master \ file://configure-allow-to-disable-selinux-support.patch \ file://0001-replace-readdir_r-with-readdir.patch \ file://0001-Use-correct-enum-type.patch \ @@ -27,8 +26,15 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http 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://include_unistd_nr.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 \ " +SRC_URI:append:libc-musl = " file://add_ppc64le.patch" + S = "${WORKDIR}/git" inherit autotools @@ -37,6 +43,9 @@ PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" PACKAGECONFIG[unwind] = "--with-libunwind,--without-libunwind,libunwind" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" -do_configure_prepend () { +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" + +do_configure:prepend () { ( cd ${S}; ./autogen.sh ) } diff --git a/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch deleted file mode 100644 index e767900864..0000000000 --- a/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 2 Oct 2019 17:54:15 +0200 -Subject: [PATCH] Allow building lua without readline on Linux - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Makefile | 2 +- - src/Makefile | 3 +++ - src/luaconf.h | 5 +++++ - 3 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 119110d..9f6df45 100644 ---- a/Makefile -+++ b/Makefile -@@ -36,7 +36,7 @@ RM= rm -f - # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= - - # Convenience platforms targets. --PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris -+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris - - # What to install. - TO_BIN= lua luac -diff --git a/src/Makefile b/src/Makefile -index 64c78f7..5c0428a 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -109,6 +109,9 @@ generic: $(ALL) - linux: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" - -+linux-no-readline: -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl" -+ - macosx: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" - -diff --git a/src/luaconf.h b/src/luaconf.h -index 9eeeea6..d71ca25 100644 ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -64,6 +64,11 @@ - #define LUA_USE_READLINE /* needs some extra libraries */ - #endif - -+#if defined(LUA_USE_LINUX_NO_READLINE) -+#define LUA_USE_POSIX -+#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ -+#endif -+ - - #if defined(LUA_USE_MACOSX) - #define LUA_USE_POSIX --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/lua/lua/lua.pc.in b/meta-oe/recipes-devtools/lua/lua/lua.pc.in deleted file mode 100644 index c27e86e85d..0000000000 --- a/meta-oe/recipes-devtools/lua/lua/lua.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/usr -libdir=${prefix}/lib -includedir=${prefix}/include - -Name: Lua -Description: Lua language engine -Version: @VERSION@ -Requires: -Libs: -L${libdir} -llua -lm -ldl -Cflags: -I${includedir} diff --git a/meta-oe/recipes-devtools/lua/lua/run-ptest b/meta-oe/recipes-devtools/lua/lua/run-ptest deleted file mode 100644 index 8e085e1af9..0000000000 --- a/meta-oe/recipes-devtools/lua/lua/run-ptest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -cd test -lua -e"_U=true" all.lua > lua-test.tmp - -echo "--- test output ---" -cat lua-test.tmp -echo "" -echo "" -echo "--- ptest result ---" - -grep "final OK \!\!\!" lua-test.tmp > /dev/null -if [ $? -eq 0 ]; then - echo "PASS: lua" -else - echo "FAIL: lua" -fi - -rm -f lua-test.tmp diff --git a/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch b/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch deleted file mode 100644 index f4cdc5d8c5..0000000000 --- a/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: lua-5.1.4/src/Makefile -=================================================================== ---- a/src/Makefile.orig 2013-10-22 22:17:19.929103523 -0400 -+++ a/src/Makefile 2013-10-22 22:18:27.992104545 -0400 -@@ -9,7 +9,7 @@ - CC= gcc - CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS) - LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) --LIBS= -lm $(SYSLIBS) $(MYLIBS) -+LIBS= -lm -lpthread $(SYSLIBS) $(MYLIBS) - - AR= ar rcu - RANLIB= ranlib diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.5.bb b/meta-oe/recipes-devtools/lua/lua_5.3.5.bb deleted file mode 100644 index ae41e627f0..0000000000 --- a/meta-oe/recipes-devtools/lua/lua_5.3.5.bb +++ /dev/null @@ -1,66 +0,0 @@ -DESCRIPTION = "Lua is a powerful light-weight programming language designed \ -for extending applications." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=60aa5cfdbd40086501778d9b6ebf29ee" -HOMEPAGE = "http://www.lua.org/" - -SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \ - file://lua.pc.in \ - file://0001-Allow-building-lua-without-readline-on-Linux.patch \ - " - -# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release. -PV_testsuites = "5.3.4" - -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \ - 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \ - file://run-ptest \ - ', '', d)}" - -SRC_URI[tarballsrc.md5sum] = "4f4b4f323fd3514a68e0ab3da8ce3455" -SRC_URI[tarballsrc.sha256sum] = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac" -SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3" -SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f" - -inherit pkgconfig binconfig ptest - -PACKAGECONFIG ??= "readline" -PACKAGECONFIG[readline] = ",,readline" - -UCLIBC_PATCHES += "file://uclibc-pthread.patch" -SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}" - -TARGET_CC_ARCH += " -fPIC ${LDFLAGS}" -EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'" - -do_configure_prepend() { - sed -i -e s:/usr/local:${prefix}:g src/luaconf.h -} - -do_compile () { - oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)} -} - -do_install () { - oe_runmake \ - 'INSTALL_TOP=${D}${prefix}' \ - 'INSTALL_BIN=${D}${bindir}' \ - 'INSTALL_INC=${D}${includedir}/' \ - 'INSTALL_MAN=${D}${mandir}/man1' \ - 'INSTALL_SHARE=${D}${datadir}/lua' \ - 'INSTALL_LIB=${D}${libdir}' \ - 'INSTALL_CMOD=${D}${libdir}/lua/5.3' \ - install - install -d ${D}${libdir}/pkgconfig - - sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc - install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/ - rmdir ${D}${datadir}/lua/5.3 - rmdir ${D}${datadir}/lua -} - -do_install_ptest () { - cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch b/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch index f123b3f55a..a29c8ce87c 100644 --- a/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch +++ b/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch @@ -1,8 +1,7 @@ From 528009f5ca0685c95ef27f6c8957160499c0576a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 10 May 2013 10:42:45 -0700 -Subject: [PATCH] Do not strip automatically, this leaves the stripping - busines to OE +Subject: [PATCH] Do not strip automatically, this leaves the stripping busines to OE Upstream-Status: Inappropriate [OE-Specific] 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/clang.patch b/meta-oe/recipes-devtools/luajit/luajit/clang.patch index c39ef6fd4a..807cc4417f 100644 --- a/meta-oe/recipes-devtools/luajit/luajit/clang.patch +++ b/meta-oe/recipes-devtools/luajit/luajit/clang.patch @@ -8,8 +8,8 @@ Index: LuaJIT-2.0.5/src/lj_arch.h =================================================================== --- LuaJIT-2.0.5.orig/src/lj_arch.h +++ LuaJIT-2.0.5/src/lj_arch.h -@@ -313,7 +313,7 @@ - #error "Need at least GCC 4.2 or newer" +@@ -436,7 +436,7 @@ + #endif #endif #elif !LJ_TARGET_PS3 -#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb index c2d2180bae..240271d410 100644 --- a/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb +++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb @@ -1,14 +1,15 @@ SUMMARY = "Just-In-Time Compiler for Lua" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=076b97f5c7e61532f7f6f3865f04da57" HOMEPAGE = "http://luajit.org" -PV .= "+git${SRCPV}" -SRCREV = "02b521981a1ab919ff2cd4d9bcaee80baf77dce2" -SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http \ +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 \ + " + +PV = "2.1" +SRCREV = "c525bcb9024510cad9e170e12b6209aedb330f83" S = "${WORKDIR}/git" @@ -22,15 +23,15 @@ BBCLASSEXTEND = "native" # you need to install the multilib development package (e.g. # 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']}" +BUILD_CC_ARCH:append = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}" # The lua makefiles expect the TARGET_SYS to be from uname -s # Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD LUA_TARGET_OS = "Unknown" -LUA_TARGET_OS_darwin = "Darwin" -LUA_TARGET_OS_linux = "Linux" -LUA_TARGET_OS_linux-gnueabi = "Linux" -LUA_TARGET_OS_mingw32 = "Windows" +LUA_TARGET_OS:darwin = "Darwin" +LUA_TARGET_OS:linux = "Linux" +LUA_TARGET_OS:linux-gnueabi = "Linux" +LUA_TARGET_OS:mingw32 = "Windows" # We don't want the lua buildsystem's compiler optimizations, or its # stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply @@ -80,17 +81,18 @@ PACKAGES += 'luajit-common' # See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded # paths are packaged regardless of what the libdir and datadir paths are. -FILES_${PN} += "${prefix}/${baselib} ${prefix}/share" -FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ +FILES:${PN} += "${prefix}/${baselib} ${prefix}/share" +FILES:${PN} += "${libdir}/libluajit-5.1.so.2 \ ${libdir}/libluajit-5.1.so.${PV} \ " -FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \ +FILES:${PN}-dev += "${libdir}/libluajit-5.1.a \ ${libdir}/libluajit-5.1.so \ ${libdir}/pkgconfig/luajit.pc \ " -FILES_luajit-common = "${datadir}/${BPN}-${PV}" +FILES:luajit-common = "${datadir}/${BPN}-${PV}" -# Aarch64/mips64 is not supported in this release -COMPATIBLE_HOST_aarch64 = "null" -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" +# ppc64/riscv64/riscv32 is not supported in this release +COMPATIBLE_HOST:powerpc64 = "null" +COMPATIBLE_HOST:powerpc64le = "null" +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_36.2.1.bb b/meta-oe/recipes-devtools/luaposix/luaposix_36.2.1.bb new file mode 100644 index 0000000000..1d27eb2588 --- /dev/null +++ b/meta-oe/recipes-devtools/luaposix/luaposix_36.2.1.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "luaposix is a POSIX binding for Lua." +LICENSE = "MIT" +HOMEPAGE = "https://github.com/luaposix/luaposix" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f30d022f6ef53952fa87cc0b6fffb153" + +DEPENDS += "lua-native lua virtual/crypt" + +SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release-v36.2;protocol=https \ +" +SRCREV = "5a8d8c768fc3c51f42cb591e9523a60399efc6a1" +S = "${WORKDIR}/git" +LUA_VERSION = "5.4" + +B = "${S}" + +inherit pkgconfig + +do_compile() { + ${S}/build-aux/luke +} + +do_install() { + ${S}/build-aux/luke PREFIX=${D}${prefix} INST_LIBDIR=${D}${libdir}/lua/${LUA_VERSION} install +} + +FILES:${PN} = "${datadir}/lua/${LUA_VERSION} \ + ${libdir}/lua/${LUA_VERSION}" 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 new file mode 100644 index 0000000000..b1e05c59d5 --- /dev/null +++ b/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch @@ -0,0 +1,36 @@ +From ea453aca2742be6ac43ba4ce0da6f938a7e5a5d8 Mon Sep 17 00:00:00 2001 +From: He Liu <liulonnie@gmail.com> +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/src/support.c b/src/support.c +index c57eaef..e3357e4 100644 +--- a/src/support.c ++++ b/src/support.c +@@ -188,7 +188,7 @@ static char * append_to_buffer( + size_t length + ) + { +- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ ++ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ + size_t size = MAX( BUF_INCR_SIZE, length); + + if (mem_buf_p->buffer == NULL) { /* 1st append */ +@@ -1722,6 +1722,8 @@ com_start: + sp -= 2; + while (*sp != '\n') /* Until end of line */ + mcpp_fputc( *sp++, OUT); ++ mcpp_fputc('\n', OUT); ++ wrong_line = TRUE; + } + goto end_line; + default: /* Not a comment */ +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch b/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch index 8103cf0920..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 @@ -114,37 +116,6 @@ diff -r -c -N ../mcpp-2.7.2-old/src/main.c ./src/main.c } int mcpp_lib_main -diff -r -c -N ../mcpp-2.7.2-old/src/support.c ./src/support.c -*** ../mcpp-2.7.2-old/src/support.c Tue Jun 10 06:02:33 2008 ---- ./src/support.c Fri May 14 12:40:56 2010 -*************** -*** 188,194 **** - size_t length - ) - { -! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ - size_t size = MAX( BUF_INCR_SIZE, length); - - if (mem_buf_p->buffer == NULL) { /* 1st append */ ---- 188,194 ---- - size_t length - ) - { -! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ - size_t size = MAX( BUF_INCR_SIZE, length); - - if (mem_buf_p->buffer == NULL) { /* 1st append */ -*************** -*** 1722,1727 **** ---- 1722,1729 ---- - sp -= 2; - while (*sp != '\n') /* Until end of line */ - mcpp_fputc( *sp++, OUT); -+ mcpp_fputc( '\n', OUT); -+ wrong_line = TRUE; - } - goto end_line; - default: /* Not a comment */ diff -r -c -N ../mcpp-2.7.2-old/src/system.c ./src/system.c *** ../mcpp-2.7.2-old/src/system.c 2008-11-26 10:53:51.000000000 +0100 --- ./src/system.c 2011-02-21 16:18:05.678058106 +0100 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 a7163a35a8..9445856730 100644 --- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb @@ -1,10 +1,12 @@ SUMMARY = "MCPP is a portable C/C++ preprocessor" HOMEPAGE = "http://mcpp.sourceforge.net/" -LICENSE = "BSD" +LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=5ca370b75ec890321888a00cea9bc1d5" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ - file://ice-mcpp.patch " + 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" 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/memstat/memstat_1.0.bb b/meta-oe/recipes-devtools/memstat/memstat_1.0.bb index 91a9200c34..7e0ff54dc5 100644 --- a/meta-oe/recipes-devtools/memstat/memstat_1.0.bb +++ b/meta-oe/recipes-devtools/memstat/memstat_1.0.bb @@ -6,7 +6,7 @@ is used and which 'old' libs are loaded. \ HOMEPAGE = "http://memstattool.sourceforge.net/" SECTION = "devtool" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" S = "${WORKDIR}/memstattool" @@ -19,7 +19,7 @@ SRC_URI = "http://sourceforge.net/projects/memstattool/files/memstat_${PV}.tar.g SRC_URI[md5sum] = "2c3acc0c62b2a18f6601b84e54aa7462" SRC_URI[sha256sum] = "245d5fc7fb87bcfd14486cd34917cae2856e799559ac568434af12c4852bce94" -do_install_append(){ +do_install:append(){ install -d ${D}${bindir} install -m 0755 memstat ${D}${bindir} install -d ${D}${sysconfdir} diff --git a/meta-oe/recipes-devtools/mercurial/mercurial_4.6.1.bb b/meta-oe/recipes-devtools/mercurial/mercurial_4.6.1.bb deleted file mode 100644 index 13710aaea3..0000000000 --- a/meta-oe/recipes-devtools/mercurial/mercurial_4.6.1.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "The Mercurial distributed SCM" -HOMEPAGE = "http://mercurial.selenic.com/" -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS = "python python-native" -DEPENDS_class-native = "python-native" -RDEPENDS_${PN} = "python python-modules" - -inherit python-dir - -SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" -SRC_URI[md5sum] = "f9b2e4a3b5901ef744fa3abe4196e97e" -SRC_URI[sha256sum] = "89fa8ecbc8aa6e48e98f9803a1683ba91367124295dba2407b28c34ca621108d" - -S = "${WORKDIR}/mercurial-${PV}" - -BBCLASSEXTEND = "native" - -EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \ - PREFIX=${prefix}" - -do_configure_append () { - sed -i -e 's:PYTHON=python:PYTHON=${STAGING_BINDIR_NATIVE}/python-native/python:g' ${S}/Makefile -} - -do_install () { - oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix} -} - -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" diff --git a/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb b/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb new file mode 100644 index 0000000000..2451a36be2 --- /dev/null +++ b/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb @@ -0,0 +1,36 @@ +SUMMARY = "The Mercurial distributed SCM" +HOMEPAGE = "http://mercurial.selenic.com/" +SECTION = "console/utils" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "python3 python3-native python3-setuptools-native" +RDEPENDS:${PN} = "python3 python3-modules" + +inherit python3native python3targetconfig + +SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" +SRC_URI[sha256sum] = "a5603d0d395ebf67fe5d27abbb3bd37fcc01871ecf394c793672d2c1e68be7e7" + +S = "${WORKDIR}/mercurial-${PV}" + +BBCLASSEXTEND = "native" + +export LDSHARED="${CCLD} -shared" + +EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \ + PREFIX=${prefix}" + +do_configure:append () { + sed -i -e 's:PYTHON?=python:PYTHON=python3:g' ${S}/Makefile +} + +do_install () { + oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix} + sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/hg +} +PACKAGES =+ "${PN}-python" + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}" +FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" + 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..4bb3e62d9f --- /dev/null +++ b/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb @@ -0,0 +1,20 @@ +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" + +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..6e29b2459d --- /dev/null +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb @@ -0,0 +1,45 @@ +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" diff --git a/meta-oe/recipes-devtools/mpich/mpich_3.2.bb b/meta-oe/recipes-devtools/mpich/mpich_3.2.bb deleted file mode 100644 index 51b313cef4..0000000000 --- a/meta-oe/recipes-devtools/mpich/mpich_3.2.bb +++ /dev/null @@ -1,47 +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=2106f0435056f3dd9349747a766e5816" - -SRC_URI = " \ - http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz \ -" - -SRC_URI[md5sum] = "f414cfa77099cd1fa1a5ae4e22db508a" -SRC_URI[sha256sum] = "0778679a6b693d7b7caff37ff9d2856dc2bfc51318bf8373859bfa74253da3dc" - -RDEPENDS_${PN} += "bash perl libxml2" -S = "${WORKDIR}/${BP}" - -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' \ -" - -inherit autotools-brokensep gettext - -do_configure_prepend() { - for d in confdb test/mpi/confdb src/openpa/confdb src/pm/hydra/confdb src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/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 - - autoreconf --verbose --install --force -I . -I confdb/ -I maint/ - oe_runconf - exit -} - -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.1.bb b/meta-oe/recipes-devtools/mpich/mpich_4.2.1.bb new file mode 100644 index 0000000000..9fd8c3bb7b --- /dev/null +++ b/meta-oe/recipes-devtools/mpich/mpich_4.2.1.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] = "23331b2299f287c3419727edc2df8922d7e7abbb9fd0ac74e03b9966f9ad42d7" + +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_3.1.1.bb b/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb index 90fd44e607..40d997a52c 100644 --- a/meta-oe/recipes-devtools/msgpack/msgpack-c_3.1.1.bb +++ b/meta-oe/recipes-devtools/msgpack/msgpack-c_6.0.0.bb @@ -7,13 +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 \ +SRC_URI = "git://github.com/msgpack/msgpack-c;branch=c_master;protocol=https \ " -# cpp-3.1.1 -SRCREV = "83a82e3eb512b18d4149cabb7eb43c7e8bc081af" +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_6.1.0.bb b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb new file mode 100644 index 0000000000..5f5507bc74 --- /dev/null +++ b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "MessagePack implementation for C and C++" +DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" +HOMEPAGE = "http://msgpack.org/index.html" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ + file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ + file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ + " + +SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" +SRC_URI[sha256sum] = "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" + +S = "${WORKDIR}/msgpack-cxx-${PV}" + +DEPENDS += "boost" + +inherit cmake pkgconfig + +RDEPENDS:${PN}-dev = "" + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta-oe/recipes-devtools/msr-tools/msr-tools_1.3.bb b/meta-oe/recipes-devtools/msr-tools/msr-tools_1.3.bb index e4701afa87..05220c2492 100644 --- a/meta-oe/recipes-devtools/msr-tools/msr-tools_1.3.bb +++ b/meta-oe/recipes-devtools/msr-tools/msr-tools_1.3.bb @@ -1,6 +1,6 @@ SUMMARY = "utilies to read and write Intel model-specific registers" HOMEPAGE = "https://01.org/msr-tools" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=11;md5=678a3928c856042424c734f4a7586e65" SECTION = "devel" diff --git a/meta-oe/recipes-devtools/musl/musl-nscd/0001-nsswitch.y-Replace-empty-bison-extension.patch b/meta-oe/recipes-devtools/musl/musl-nscd/0001-nsswitch.y-Replace-empty-bison-extension.patch new file mode 100644 index 0000000000..67c8b1bcfd --- /dev/null +++ b/meta-oe/recipes-devtools/musl/musl-nscd/0001-nsswitch.y-Replace-empty-bison-extension.patch @@ -0,0 +1,50 @@ +From 82e51fb8ba2640b318826ef4e17b0f5c09c8dded Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 8 Mar 2021 20:10:18 -0800 +Subject: [PATCH] nsswitch.y: Replace %empty bison extension + +POSIX compliant yacc do not understand %empty therefore replace it with +/* empty */ + +https://github.com/pikhq/musl-nscd/issues/13 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/nsswitch.y | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/nsswitch.y b/src/nsswitch.y +index 107073b..0b7c71e 100644 +--- a/src/nsswitch.y ++++ b/src/nsswitch.y +@@ -38,7 +38,7 @@ top: + ; + + file: +- %empty { ++ /* empty */ { + list_init(&$$); + } + | file line { +@@ -88,7 +88,7 @@ modifier: + ; + + modifiers: +- %empty { ++ /* empty */ { + memcpy($$, default_actions, sizeof($$)); + } + | modifiers modifier { +@@ -112,7 +112,7 @@ item: + ; + + list: +- %empty { ++ /* empty */ { + list_init(&$$); + } + | list item { +-- +2.30.1 + diff --git a/meta-oe/recipes-devtools/musl/musl-nscd_git.bb b/meta-oe/recipes-devtools/musl/musl-nscd_git.bb new file mode 100644 index 0000000000..82e5c3bc5e --- /dev/null +++ b/meta-oe/recipes-devtools/musl/musl-nscd_git.bb @@ -0,0 +1,39 @@ +# Copyright (C) 2020 Armin Kuster <akuster808@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Musl-nscd is an implementation of the NSCD protocol, suitable for use with musl and with standard NSS modules" +HOMEPAGE = "https://github.com/pikhq/musl-nscd" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fff9baeb9a392879d7fb25ba3a2696e4" +SECTION = "utils" + +DEPENDS += "flex-native bison-native flex bison" + +PV = "1.1.0" + +SRCREV = "cddd6be6c629ca96f2d2e74ee52daf12bbef1f83" +SRC_URI = "git://github.com/pikhq/musl-nscd;branch=master;protocol=https \ + file://0001-nsswitch.y-Replace-empty-bison-extension.patch \ + " + +UPSTREAM_CHECK_COMMITS = "1" + +inherit autotools-brokensep + +S = "${WORKDIR}/git" + +do_configure () { + # no debug set -s flag + sed -i -e 's/LDFLAGS_AUTO=-s/LDFLAGS_AUTO=/' ${S}/configure + ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} +} + +do_compile () { + oe_runmake +} + +do_install () { + make DESTDIR=${D} install +} + +COMPATIBLE_HOST = ".*-musl.*" diff --git a/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb new file mode 100644 index 0000000000..36e46021bb --- /dev/null +++ b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "fifo maps for c++" +HOMEPAGE = "https://github.com/nlohmann/fifo_map" +SECTION = "libs" +LICENSE = "MIT" +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" + +SRCREV = "d732aaf9a315415ae8fd7eb11e3a4c1f80e42a48" + +UPSTREAM_CHECK_COMMITS = "1" + +S = "${WORKDIR}/git" + +# nlohmann-fifo is a header only C++ library, so the main package will be empty. + +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.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/nlohmann-json/nlohmann-json_git.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_git.bb deleted file mode 100644 index 65e49bc95b..0000000000 --- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_git.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "JSON for modern C++" -HOMEPAGE = "https://nlohmann.github.io/json/" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=9a8ae1c2d606c432a2aa2e2de15be22a" - -SRC_URI = "git://github.com/nlohmann/json.git" - -PV = "3.3.0+git${SRCPV}" - -SRCREV = "aafad2be1f3cd259a1e79d2f6fcf267d1ede9ec7" - -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/nodejs/nodejs-oe-cache-20.13/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.13/oe-npm-cache new file mode 100755 index 0000000000..eb0f143eae --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.13/oe-npm-cache @@ -0,0 +1,77 @@ +#!/usr/bin/env node + +/// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name> +/// <type> ... meta - metainformation about package +/// tgz - tarball + +const process = require("node:process"); + +module.paths.unshift("@@libdir@@/node_modules/npm/node_modules"); + +const cacache = require('cacache') +const fs = require('fs') + +// argv[0] is 'node', argv[1] is this script +const cache_dir = process.argv[2] +const type = process.argv[3] +const key = process.argv[4] +const file = process.argv[5] + +const data = fs.readFileSync(file) + +// metadata content is highly nodejs dependent; when cache entries are not +// found, place debug statements in 'make-fetch-happen/lib/cache/policy.js' +// (CachePolicy::satisfies()) +const xlate = { + 'meta': { + 'key_prefix': 'make-fetch-happen:request-cache:', + 'metadata': function() { + return { + time: Date.now(), + url: key, + reqHeaders: { + 'accept': 'application/json', + }, + resHeaders: { + "content-type": "application/json", + "status": 200, + }, + options: { + compress: true, + } + }; + }, + }, + + 'tgz': { + 'key_prefix': 'make-fetch-happen:request-cache:', + 'metadata': function() { + return { + time: Date.now(), + url: key, + reqHeaders: { + 'accept': '*/*', + }, + resHeaders: { + "content-type": "application/octet-stream", + "status": 200, + }, + options: { + compress: true, + }, + }; + }, + }, +}; + +const info = xlate[type]; +let opts = {} + +if (info.metadata) { + opts['metadata'] = info.metadata(); +} + +cacache.put(cache_dir, info.key_prefix + key, data, opts) + .then(integrity => { + console.log(`Saved content of ${key} (${file}).`); +}) diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.13.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.13.bb new file mode 100644 index 0000000000..d4b818f967 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.13.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "OE helper for manipulating npm cache" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "\ + file://oe-npm-cache \ +" + +inherit native + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + +B = "${WORKDIR}/build" + +do_configure() { + sed -e 's!@@libdir@@!${libdir}!g' < '${UNPACKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' +} + +do_install() { + install -D -p -m 0755 ${B}/oe-npm-cache ${D}${bindir}/oe-npm-cache +} + +RDEPENDS:${PN} = "nodejs-native" 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 5d0dc03b66..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 @@ -1,26 +1,46 @@ -From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001 +From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 Mon Sep 17 00:00:00 2001 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 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile b/Makefile -index a98772f..f5663e2 100644 --- a/Makefile +++ b/Makefile -@@ -123,8 +123,8 @@ with-code-cache: - test-code-cache: with-code-cache - $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) code-cache +@@ -169,7 +169,7 @@ with-code-cache test-code-cache: + $(warning '$@' target is a noop) --out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ -- deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \ -+out/Makefile: common.gypi deps/http_parser/http_parser.gyp \ -+ deps/v8/gypfiles/toolchain.gypi \ - deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \ - config.gypi - $(PYTHON) tools/gyp_node.py -f make --- -2.19.2 + 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 diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch new file mode 100644 index 0000000000..0178cec777 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch @@ -0,0 +1,94 @@ +From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001 +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 | 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 +@@ -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 @@ + { + 'action_name': 'run_torque_action', + 'inputs': [ # Order matters. ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', + '<@(torque_files)', + ], +@@ -99,6 +100,7 @@ + '<@(torque_outputs_inc)', + ], + 'action': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', + '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', + '-v8-root', '<(V8_ROOT)', +@@ -211,6 +213,7 @@ + { + 'action_name': 'generate_bytecode_builtins_list_action', + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', + ], + 'outputs': [ +@@ -400,6 +403,7 @@ + ], + }, + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(mksnapshot_exec)', + ], + 'outputs': [ +@@ -1539,6 +1543,7 @@ + { + 'action_name': 'run_gen-regexp-special-case_action', + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(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 new file mode 100644 index 0000000000..5af87d866e --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch @@ -0,0 +1,71 @@ +From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 3 Jul 2023 12:33:16 +0000 +Subject: [PATCH] [liftoff] Correct function signatures + +Fixes builds on mips where clang reports an error +../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move' + Move(tmp, src, type.value_type()); + ^~~~ + +Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674] + +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> +--- + 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 +@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler { + void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); + + // Move {src} into {dst}. {src} and {dst} must be different. +- void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind); ++ void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind kind); + + // 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 +@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler { + inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, + ValueKind); + +- inline void Move(Register dst, Register src, ValueKind); +- inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind); ++ inline void Move(Register dst, Register src, ValueKind kind); ++ inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind kind); + + inline void Spill(int offset, LiftoffRegister, ValueKind); + inline void Spill(int offset, WasmValue); +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 +@@ -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. +- 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/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. +- Move(tmp, src, type.value_type()); ++ Move(tmp, src, type.value_type().kind()); + + src = tmp; + pinned.set(tmp); +-- +2.40.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 new file mode 100644 index 0000000000..dd9c9015e2 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch @@ -0,0 +1,25 @@ +From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 15 Jun 2021 19:01:31 -0700 +Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang + +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(-) + +--- a/common.gypi ++++ b/common.gypi +@@ -417,7 +417,7 @@ + 'ldflags': [ '-m32' ], + }], + [ 'target_arch=="ppc64" and OS!="aix"', { +- 'cflags': [ '-m64', '-mminimal-toc' ], ++ 'cflags': [ '-m64' ], + 'ldflags': [ '-m64' ], + }], + [ 'target_arch=="s390x"', { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch deleted file mode 100644 index e9035f9eb3..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4bbee5e3d58bc4911999f3ec2cc5aab8ded6717b Mon Sep 17 00:00:00 2001 -From: "Winker Matthias (TT-CA/ENG1)" <Matthias.Winker@de.bosch.com> -Date: Tue, 11 Dec 2018 10:44:29 +0100 -Subject: [PATCH] Using native torque - ---- - deps/v8/gypfiles/v8.gyp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp -index 8c78f02255..434168844e 100644 ---- a/deps/v8/gypfiles/v8.gyp -+++ b/deps/v8/gypfiles/v8.gyp -@@ -2831,7 +2831,6 @@ - { - 'action_name': 'run_torque', - 'inputs': [ # Order matters. -- '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', - '../src/builtins/base.tq', - '../src/builtins/array.tq', - '../src/builtins/typed-array.tq', -@@ -2845,7 +2844,10 @@ - '<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-typed-array-from-dsl-gen.cc', - '<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-typed-array-from-dsl-gen.h', - ], -- 'action': ['<@(_inputs)', '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated'], -+ 'action': [ -+ 'torque', -+ '<@(_inputs)', -+ '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated'], - }, - ], - }, # torque --- -2.19.2 - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0003-Crypto-reduce-memory-usage-of-SignFinal.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0003-Crypto-reduce-memory-usage-of-SignFinal.patch deleted file mode 100644 index ed3bac39bd..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0003-Crypto-reduce-memory-usage-of-SignFinal.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 20282b1cb0389553421c4c5b14de198c5dfff50b Mon Sep 17 00:00:00 2001 -From: Anna Henningsen <anna@addaleax.net> -Date: Sat, 20 Oct 2018 05:24:54 +0200 -Subject: [PATCH] src: use more explicit return type in Sign::SignFinal() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Using the non-indexed variant of `std::get<>` broke Travis CI. -Also, this allows us to be a bit more concise when returning -from `SignFinal()` due to some error condition. - -Refs: https://github.com/nodejs/node/pull/23427 - -PR-URL: https://github.com/nodejs/node/pull/23779 -Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> -Reviewed-By: Tobias Nießen <tniessen@tnie.de> -Reviewed-By: Refael Ackermann <refack@gmail.com> -Reviewed-By: Colin Ihrig <cjihrig@gmail.com> ---- - src/node_crypto.cc | 23 +++++++++++------------ - src/node_crypto.h | 12 +++++++++++- - 2 files changed, 22 insertions(+), 13 deletions(-) - -diff --git a/src/node_crypto.cc b/src/node_crypto.cc -index bd8d9e032554..ec7d4f2bb5be 100644 ---- a/src/node_crypto.cc -+++ b/src/node_crypto.cc -@@ -3562,22 +3562,20 @@ static MallocedBuffer<unsigned char> Node_SignFinal(EVPMDPointer&& mdctx, - return MallocedBuffer<unsigned char>(); - } - --std::pair<SignBase::Error, MallocedBuffer<unsigned char>> Sign::SignFinal( -+Sign::SignResult Sign::SignFinal( - const char* key_pem, - int key_pem_len, - const char* passphrase, - int padding, - int salt_len) { -- MallocedBuffer<unsigned char> buffer; -- - if (!mdctx_) -- return std::make_pair(kSignNotInitialised, std::move(buffer)); -+ return SignResult(kSignNotInitialised); - - EVPMDPointer mdctx = std::move(mdctx_); - - BIOPointer bp(BIO_new_mem_buf(const_cast<char*>(key_pem), key_pem_len)); - if (!bp) -- return std::make_pair(kSignPrivateKey, std::move(buffer)); -+ return SignResult(kSignPrivateKey); - - EVPKeyPointer pkey(PEM_read_bio_PrivateKey(bp.get(), - nullptr, -@@ -3588,7 +3586,7 @@ std::pair<SignBase::Error, MallocedBuffer<unsigned char>> Sign::SignFinal( - // without `pkey` being set to nullptr; - // cf. the test of `test_bad_rsa_privkey.pem` for an example. - if (!pkey || 0 != ERR_peek_error()) -- return std::make_pair(kSignPrivateKey, std::move(buffer)); -+ return SignResult(kSignPrivateKey); - - #ifdef NODE_FIPS_MODE - /* Validate DSA2 parameters from FIPS 186-4 */ -@@ -3612,9 +3610,10 @@ std::pair<SignBase::Error, MallocedBuffer<unsigned char>> Sign::SignFinal( - } - #endif // NODE_FIPS_MODE - -- buffer = Node_SignFinal(std::move(mdctx), pkey, padding, salt_len); -+ MallocedBuffer<unsigned char> buffer = -+ Node_SignFinal(std::move(mdctx), pkey, padding, salt_len); - Error error = buffer.is_empty() ? kSignPrivateKey : kSignOk; -- return std::make_pair(error, std::move(buffer)); -+ return SignResult(error, std::move(buffer)); - } - - -@@ -3639,18 +3638,18 @@ void Sign::SignFinal(const FunctionCallbackInfo<Value>& args) { - - ClearErrorOnReturn clear_error_on_return; - -- std::pair<Error, MallocedBuffer<unsigned char>> ret = sign->SignFinal( -+ SignResult ret = sign->SignFinal( - buf, - buf_len, - len >= 2 && !args[1]->IsNull() ? *passphrase : nullptr, - padding, - salt_len); - -- if (std::get<Error>(ret) != kSignOk) -- return sign->CheckThrow(std::get<Error>(ret)); -+ if (ret.error != kSignOk) -+ return sign->CheckThrow(ret.error); - - MallocedBuffer<unsigned char> sig = -- std::move(std::get<MallocedBuffer<unsigned char>>(ret)); -+ std::move(ret.signature); - - Local<Object> rc = - Buffer::New(env, reinterpret_cast<char*>(sig.release()), sig.size) -diff --git a/src/node_crypto.h b/src/node_crypto.h -index 6fcf737f6c43..0c26c1f6ff1d 100644 ---- a/src/node_crypto.h -+++ b/src/node_crypto.h -@@ -518,7 +518,17 @@ class Sign : public SignBase { - public: - static void Initialize(Environment* env, v8::Local<v8::Object> target); - -- std::pair<Error, MallocedBuffer<unsigned char>> SignFinal( -+ struct SignResult { -+ Error error; -+ MallocedBuffer<unsigned char> signature; -+ -+ explicit SignResult( -+ Error err, -+ MallocedBuffer<unsigned char>&& sig = MallocedBuffer<unsigned char>()) -+ : error(err), signature(std::move(sig)) {} -+ }; -+ -+ SignResult SignFinal( - const char* key_pem, - int key_pem_len, - const char* passphrase, diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch deleted file mode 100644 index 925c085e9b..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch +++ /dev/null @@ -1,69 +0,0 @@ -Implement function as wrapper for std::make_unique -method to be compatible with gcc < 4.9 . -"error::make_unique is not a member of 'std'" - -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> - -diff -Naur node-v10.15.1/src/cares_wrap.cc node-v10.15.1/src/cares_wrap.cc ---- node-v10.15.1/src/cares_wrap.cc 2019-01-29 08:20:50.000000000 +0100 -+++ node-v10.15.1/src/cares_wrap.cc 2019-02-21 16:22:25.489131665 +0100 -@@ -52,6 +52,16 @@ - # define AI_V4MAPPED 0 - #endif - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template<typename T, typename... Args> -+ std::unique_ptr<T> make_unique(Args&&... args) { -+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace cares_wrap { - -diff -Naur node-v10.15.1/src/inspector_agent.cc node-v10.15.1/src/inspector_agent.cc ---- node-v10.15.1/src/inspector_agent.cc 2019-01-29 08:20:50.000000000 +0100 -+++ node-v10.15.1/src/inspector_agent.cc 2019-02-21 16:22:09.000185992 +0100 -@@ -24,6 +24,16 @@ - #include <pthread.h> - #endif // __POSIX__ - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template<typename T, typename... Args> -+ std::unique_ptr<T> make_unique(Args&&... args) { -+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace inspector { - namespace { - -diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc -index e374c0fd70..05d7d8c60f 100644 ---- a/src/inspector/main_thread_interface.cc -+++ b/src/inspector/main_thread_interface.cc -@@ -6,6 +6,16 @@ - #include <functional> - #include <unicode/unistr.h> - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template<typename T, typename... Args> -+ std::unique_ptr<T> make_unique(Args&&... args) { -+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace inspector { - namespace { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch new file mode 100644 index 0000000000..97ed972cee --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch @@ -0,0 +1,102 @@ +From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> +Date: Sat, 9 Nov 2019 14:45:30 +0000 +Subject: [PATCH] v8: don't override ARM CFLAGS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This overrides yocto-provided build flags with its own, e.g we get + arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \ + ... \ + -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm + +Causing the latter to override the former, and compiler warnings: + cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch + +Patch this out, so that yocto-provided flags take precedence. +Note that in reality the same should probably be done for all the other +supported architectures, too. + +Note that this also switches to Thumb(2) mode (in my case). No obvious +problems have been noted during compilation or runtime. + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: André Draszik <git@andred.net> +--- + tools/v8_gypfiles/toolchain.gypi | 52 ++------------------------------ + 1 file changed, 2 insertions(+), 50 deletions(-) + +diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi +index 264b3e478e..0b41848145 100644 +--- a/tools/v8_gypfiles/toolchain.gypi ++++ b/tools/v8_gypfiles/toolchain.gypi +@@ -211,31 +211,7 @@ + 'target_conditions': [ + ['_toolset=="host"', { + 'conditions': [ +- ['v8_target_arch==host_arch', { +- # Host built with an Arm CXX compiler. +- 'conditions': [ +- [ 'arm_version==7', { +- 'cflags': ['-march=armv7-a',], +- }], +- [ 'arm_version==7 or arm_version=="default"', { +- 'conditions': [ +- [ 'arm_fpu!="default"', { +- 'cflags': ['-mfpu=<(arm_fpu)',], +- }], +- ], +- }], +- [ 'arm_float_abi!="default"', { +- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], +- }], +- [ 'arm_thumb==1', { +- 'cflags': ['-mthumb',], +- }], +- [ 'arm_thumb==0', { +- 'cflags': ['-marm',], +- }], +- ], +- }, { +- # 'v8_target_arch!=host_arch' ++ ['v8_target_arch!=host_arch', { + # Host not built with an Arm CXX compiler (simulator build). + 'conditions': [ + [ 'arm_float_abi=="hard"', { +@@ -254,31 +230,7 @@ + }], # _toolset=="host" + ['_toolset=="target"', { + 'conditions': [ +- ['v8_target_arch==target_arch', { +- # Target built with an Arm CXX compiler. +- 'conditions': [ +- [ 'arm_version==7', { +- 'cflags': ['-march=armv7-a',], +- }], +- [ 'arm_version==7 or arm_version=="default"', { +- 'conditions': [ +- [ 'arm_fpu!="default"', { +- 'cflags': ['-mfpu=<(arm_fpu)',], +- }], +- ], +- }], +- [ 'arm_float_abi!="default"', { +- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], +- }], +- [ 'arm_thumb==1', { +- 'cflags': ['-mthumb',], +- }], +- [ 'arm_thumb==0', { +- 'cflags': ['-marm',], +- }], +- ], +- }, { +- # 'v8_target_arch!=target_arch' ++ ['v8_target_arch!=target_arch', { + # Target not built with an Arm CXX compiler (simulator build). + 'conditions': [ + [ 'arm_float_abi=="hard"', { +-- +2.20.1 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch deleted file mode 100644 index 66ff18b4a3..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch +++ /dev/null @@ -1,20 +0,0 @@ -Link atomic library to fix missing undefined referrences -like "undefined reference to `__atomic_fetch_add_8'" - -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff -Naur node-v10.15.1/deps/v8/gypfiles/v8.gyp node-v10.15.1/deps/v8/gypfiles/v8.gyp ---- node-v10.15.1/deps/v8/gypfiles/v8.gyp 2019-02-13 09:02:21.000000000 +0100 -+++ node-v10.15.1/deps/v8/gypfiles/v8.gyp 2019-02-15 21:27:11.755679660 +0100 -@@ -452,6 +452,11 @@ - '<(DEPTH)', - '<(SHARED_INTERMEDIATE_DIR)' - ], -+ 'link_settings': { -+ 'libraries': [ -+ '-latomic' -+ ], -+ }, - 'sources': [ - '<@(inspector_all_sources)', - '../include//v8-inspector-protocol.h', diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch deleted file mode 100644 index f6569cd57a..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch +++ /dev/null @@ -1,24 +0,0 @@ -The target LDFLAGS have been ignored. Tools like torque -have been loaded from system libraries, even if a native -one was the target. -|$ ldd torque -| libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 -| libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 -| libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 -| libicui18n.so.63 => not found -| libicuuc.so.63 => not found -... - -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff -Naur node-v10.15.1/deps/v8/gypfiles/toolchain.gypi node-v10.15.1/deps/v8/gypfiles/toolchain.gypi ---- node-v10.15.1/deps/v8/gypfiles/toolchain.gypi 2019-03-18 15:01:39.000000000 +0100 -+++ node-v10.15.1/deps/v8/gypfiles/toolchain.gypi 2019-03-18 15:04:08.628361308 +0100 -@@ -1106,6 +1106,7 @@ - 'cflags': [ '-fno-strict-aliasing' ], - }], - ], # conditions -+ 'ldflags+': [ '$(LDFLAGS)' ], - }], - ['OS=="solaris"', { - 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch new file mode 100644 index 0000000000..cb0237309e --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch @@ -0,0 +1,21 @@ +Link mksnapshot with libatomic on x86 + +Clang-12 on x86 emits atomic builtins + +Fixes +| module-compiler.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x558): un +defined reference to `__atomic_load' + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- 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', 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/system-c-ares.patch b/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch new file mode 100644 index 0000000000..141889ad23 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch @@ -0,0 +1,24 @@ +keep nodejs compatible with c-ares 1.17.1 + +Upstream-Status: Inappropriate [c-ares specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/src/cares_wrap.h ++++ b/src/cares_wrap.h +@@ -22,7 +22,15 @@ + # include <netdb.h> + #endif // __POSIX__ + +-# include <ares_nameser.h> ++#if defined(__ANDROID__) || \ ++ defined(__MINGW32__) || \ ++ defined(__OpenBSD__) || \ ++ defined(_MSC_VER) ++ ++# include <nameser.h> ++#else ++# include <arpa/nameser.h> ++#endif + + namespace node { + namespace cares_wrap { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb deleted file mode 100644 index a978eebe47..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb +++ /dev/null @@ -1,113 +0,0 @@ -DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" -HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & BSD & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=be980eb7ccafe287cb438076a65e888c" - -DEPENDS = "openssl" -DEPENDS_append_class-target = " nodejs-native" - -inherit pkgconfig - -COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" -COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" - -COMPATIBLE_HOST_riscv64 = "null" -COMPATIBLE_HOST_riscv32 = "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://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \ - file://0004-Make-compatibility-with-gcc-4.8.patch \ - file://0005-Link-atomic-library.patch \ - file://0006-Use-target-ldflags.patch \ - " -SRC_URI_append_class-target = " \ - file://0002-Using-native-torque.patch \ - " - -SRC_URI[md5sum] = "b41275a018e670947c1950b12f050a2f" -SRC_URI[sha256sum] = "7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd" - -S = "${WORKDIR}/node-v${PV}" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -def map_nodejs_arch(a, d): - import re - - if re.match('i.86$', a): return 'ia32' - elif re.match('x86_64$', a): return 'x64' - elif re.match('aarch64$', a): return 'arm64' - elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64' - elif re.match('powerpc$', a): return 'ppc' - return a - -ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " -ARCHFLAGS ?= "" - -PACKAGECONFIG ??= "zlib icu" -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" -PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" - -# 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 () { - rm -rf ${S}/deps/openssl - export LD="${CXX}" - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - # $TARGET_ARCH settings don't match --dest-cpu settings - ./configure --prefix=${prefix} --without-snapshot --shared-openssl \ - --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ - --dest-os=linux \ - ${ARCHFLAGS} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - export LD="${CXX}" - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR=${D} -} - -do_install_append_class-native() { - # use node from PATH instead of absolute path to sysroot - # node-v0.10.25/tools/install.py is using: - # shebang = os.path.join(node_prefix, 'bin/node') - # update_shebang(link_path, shebang) - # and node_prefix can be very long path to bindir in native sysroot and - # when it exceeds 128 character shebang limit it's stripped to incorrect path - # and npm fails to execute like in this case with 133 characters show in log.do_install: - # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node - # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js - # use sed on npm-cli.js because otherwise symlink is replaced with normal file and - # npm-cli.js continues to use old shebang - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js - - # Install the native torque to provide it within sysroot for the target compilation - install -d ${D}${bindir} - install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque -} - -do_install_append_class-target() { - sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -PACKAGES =+ "${PN}-npm" -FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" -RDEPENDS_${PN}-npm = "bash python-core python-shell python-datetime python-subprocess python-textutils \ - python-compiler python-misc python-multiprocessing" - -PACKAGES =+ "${PN}-systemtap" -FILES_${PN}-systemtap = "${datadir}/systemtap" - - -BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_20.13.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_20.13.0.bb new file mode 100644 index 0000000000..25b59495e2 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs_20.13.0.bb @@ -0,0 +1,182 @@ +DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" +HOMEPAGE = "http://nodejs.org" +LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cef54676c547a5bbab44aa8be3be9ef7" + +CVE_PRODUCT = "nodejs node.js" + +DEPENDS = "openssl file-replacement-native python3-packaging-native" +DEPENDS:append:class-target = " qemu-native" +DEPENDS:append:class-native = " c-ares-native" + +inherit pkgconfig python3native qemu ptest + +COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" +COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" +COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" + +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:powerpc = "null" + +SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ + file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ + file://0004-v8-don-t-override-ARM-CFLAGS.patch \ + file://system-c-ares.patch \ + file://0001-liftoff-Correct-function-signatures.patch \ + file://run-ptest \ + " + +SRC_URI:append:class-target = " \ + file://0001-Using-native-binaries.patch \ + " +SRC_URI:append:toolchain-clang:x86 = " \ + file://libatomic.patch \ + " +SRC_URI:append:toolchain-clang:powerpc64le = " \ + file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ + " +SRC_URI[sha256sum] = "11d229fcad7e6e10f450301223c602043f021cda51259ffafc7e55e484b37dc7" + +S = "${WORKDIR}/node-v${PV}" + +CVE_PRODUCT += "node.js" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +def map_nodejs_arch(a, d): + import re + + if re.match('i.86$', a): return 'ia32' + elif re.match('x86_64$', a): return 'x64' + elif re.match('aarch64$', a): return 'arm64' + elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64' + elif re.match('powerpc$', a): return 'ppc' + return a + +ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ + '--with-arm-fpu=vfp', d), d), d)}" +ARCHFLAGS:append:mips = " --v8-lite-mode" +ARCHFLAGS:append:mipsel = " --v8-lite-mode" +ARCHFLAGS ?= "" + +PACKAGECONFIG ??= "ares brotli icu zlib" + +PACKAGECONFIG[ares] = "--shared-cares,,c-ares" +PACKAGECONFIG[brotli] = "--shared-brotli,,brotli" +PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" +PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" +PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" +PACKAGECONFIG[shared] = "--shared" +PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" + +# We don't want to cross-compile during target compile, +# and we need to use the right flags during host compile, +# too. +EXTRA_OEMAKE = "\ + CC.host='${CC} -pie -fPIE' \ + CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ + CXX.host='${CXX} -pie -fPIE' \ + CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ + LDFLAGS.host='${LDFLAGS}' \ + AR.host='${AR}' \ + \ + builddir_name=./ \ +" + +EXTRANATIVEPATH += "file-native" + +python prune_sources() { + import shutil + + shutil.rmtree(d.getVar('S') + '/deps/openssl') + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares') + if 'brotli' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/brotli') + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv') + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib') +} +do_unpack[postfuncs] += "prune_sources" + +# V8's JIT infrastructure requires binaries such as mksnapshot and +# mkpeephole to be run in the host during the build. However, these +# binaries must have the same bit-width as the target (e.g. a x86_64 +# host targeting ARMv6 needs to produce a 32-bit binary). Instead of +# depending on a third Yocto toolchain, we just build those binaries +# for the target and run them on the host with QEMU. +python do_create_v8_qemu_wrapper () { + """Creates a small wrapper that invokes QEMU to run some target V8 binaries + on the host.""" + qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), + d.expand('${STAGING_DIR_HOST}${base_libdir}')] + qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), + qemu_libdirs) + wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') + with open(wrapper_path, 'w') as wrapper_file: + wrapper_file.write("""#!/bin/sh + +# This file has been generated automatically. +# It invokes QEMU to run binaries built for the target in the host during the +# build process. + +%s "$@" +""" % qemu_cmd) + os.chmod(wrapper_path, 0o755) +} + +do_create_v8_qemu_wrapper[dirs] = "${B}" +addtask create_v8_qemu_wrapper after do_configure before do_compile + +LDFLAGS:append:x86 = " -latomic" + +CROSS_FLAGS = "--cross-compiling" +CROSS_FLAGS:class-native = "--no-cross-compiling" + +# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi +do_configure () { + GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES + # $TARGET_ARCH settings don't match --dest-cpu settings + python3 configure.py --verbose --prefix=${prefix} \ + --shared-openssl \ + --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ + --dest-os=linux \ + --libdir=${baselib} \ + ${CROSS_FLAGS} \ + ${ARCHFLAGS} \ + ${PACKAGECONFIG_CONFARGS} +} + +do_compile () { + install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf + install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh + oe_runmake BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +do_install_ptest () { + cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ + cp -r ${B}/test ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH} +} + +PACKAGES =+ "${PN}-npm" +FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" +RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ + python3-misc python3-multiprocessing" + +PACKAGES =+ "${PN}-systemtap" +FILES:${PN}-systemtap = "${datadir}/systemtap" + +BBCLASSEXTEND = "native" diff --git a/meta-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_4.4.1.bb b/meta-oe/recipes-devtools/octave/octave_4.4.1.bb deleted file mode 100644 index 71d24504fb..0000000000 --- a/meta-oe/recipes-devtools/octave/octave_4.4.1.bb +++ /dev/null @@ -1,40 +0,0 @@ -DESCRIPTION = "High-level language, primarily intended for numerical computations" -HOMEPAGE = "http://www.gnu.org/software/octave/" -SECTION = "math" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" - -DEPENDS = "gperf-native texinfo lapack pcre readline" - -inherit autotools pkgconfig texinfo gettext - -EXTRA_OECONF = "--disable-java --disable-docs" - -SRC_URI = "${GNU_MIRROR}/octave/${PN}-${PV}.tar.gz \ - file://fix-blas-library-integer-size.patch \ -" - -SRC_URI[md5sum] = "b43bd5f4309a0c048c91af10cf8e8674" -SRC_URI[sha256sum] = "09fbd0f212f4ef21e53f1d9c41cf30ce3d7f9450fb44911601e21ed64c67ae97" - -do_compile_prepend() { - for folder in "liboctave/operators liboctave/numeric liboctave/array liboctave/util"; do - mkdir -p ${B}/${folder} - done -} - -PACKAGES =+ " octave-common liboctave liboctave-dev liboctave-dbg" - -FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${datadir}/${PN} \ - ${libdir}/${PN}/${PV}/oct ${libdir}/${PN}/${PV}/site \ - ${libdir}/${PN}/site ${datadir}/applications ${datadir}/metainfo" -FILES_${PN}-common = "${datadir}/icons" - -FILES_liboctave = "${libdir}/${PN}/${PV}/lib*${SOLIBS}" -FILES_liboctave-dev = "${libdir}/${PN}/${PV}/lib*${SOLIBSDEV}" -FILES_liboctave-dbg = "${libdir}/${PN}/${PV}/.debug" - -FILES_${PN}-dbg = "${bindir}/.debug ${libdir}/${PN}/${PV}/oct/${TARGET_SYS}/.debug" - -EXCLUDE_FROM_WORLD = "1" diff --git a/meta-oe/recipes-devtools/octave/octave_7.2.0.bb b/meta-oe/recipes-devtools/octave/octave_7.2.0.bb new file mode 100644 index 0000000000..eb96a624f6 --- /dev/null +++ b/meta-oe/recipes-devtools/octave/octave_7.2.0.bb @@ -0,0 +1,56 @@ +SUMMARY = "High-level language, primarily intended for numerical computations" +HOMEPAGE = "http://www.gnu.org/software/octave/" +SECTION = "math" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +# To build, add 'FORTRAN:forcevariable = ",fortran"' to your local.conf (or use +# meta-mortsgna as distro :) + +DEPENDS = " \ + gperf-native \ + libglu \ + lapack \ + fftw \ + curl \ + freetype \ + fontconfig \ + texinfo \ + pcre \ + readline \ + fltk \ + hdf5 \ + libsndfile1 \ +" + +inherit autotools pkgconfig texinfo gettext gtk-icon-cache mime-xdg features_check + +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +SRC_URI = " \ + ${GNU_MIRROR}/octave/${BPN}-${PV}.tar.gz \ + file://fix-blas-library-integer-size.patch \ +" +SRC_URI[sha256sum] = "b12cb652587d31c5c382b39ed73463c22a5259ecb2fa6b323a27da409222dacc" + +# Note: Qt5Help is required for gui -> qttools(-native) must be build with +# clang in PACKAGECONFIG +PACKAGECONFIG[gui] = "--with-qt=yes,--with-qt=no,qttools-native qttools qtbase" + +EXTRA_OECONF = " \ + --disable-java \ + --disable-docs \ +" + +do_compile:prepend() { + for folder in "liboctave/operators liboctave/numeric liboctave/array liboctave/util"; do + mkdir -p ${B}/${folder} + done +} + +FILES:${PN} += "${datadir}/metainfo" +FILES:${PN}-dev += "${libdir}/${BPN}/${PV}/lib*${SOLIBSDEV}" + +# fortran is not enabled by default +EXCLUDE_FROM_WORLD = "1" diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-Do-not-include-syscrtl.h-with-glibc.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-Do-not-include-syscrtl.h-with-glibc.patch deleted file mode 100644 index 618ce26890..0000000000 --- a/meta-oe/recipes-devtools/openocd/openocd/0001-Do-not-include-syscrtl.h-with-glibc.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a763610719e7d7f6cdc45569b6fbfdb91bb7c87b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 27 Jul 2019 14:30:08 -0700 -Subject: [PATCH] Do not include syscrtl.h with glibc - -glibc 2.30 has deprecated it see [1] -Fixes -sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings] - -[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=744e829637162bb7d5029632aacf341c64b86990 - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/helper/options.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/helper/options.c b/src/helper/options.c -index 12755e010..4007e37f6 100644 ---- a/src/helper/options.c -+++ b/src/helper/options.c -@@ -34,7 +34,7 @@ - #if IS_DARWIN - #include <libproc.h> - #endif --#ifdef HAVE_SYS_SYSCTL_H -+#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) - #include <sys/sysctl.h> - #endif - #if IS_WIN32 && !IS_CYGWIN --- -2.22.0 - diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-esirisc_flash-Rename-PAGE_SIZE-to-FLASH_PAGE_SIZE.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-esirisc_flash-Rename-PAGE_SIZE-to-FLASH_PAGE_SIZE.patch deleted file mode 100644 index c80d9f19f8..0000000000 --- a/meta-oe/recipes-devtools/openocd/openocd/0001-esirisc_flash-Rename-PAGE_SIZE-to-FLASH_PAGE_SIZE.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bee22f143ffa0457aefcf31053f76416e6d242e5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 20 May 2019 23:24:26 -0700 -Subject: [PATCH] esirisc_flash: Rename PAGE_SIZE to FLASH_PAGE_SIZE - -PAGE_SIZE is defined in system includes on some systems, this would -avoid the unintended conflict - -Fixes -| src/flash/nor/esirisc_flash.c:95:9: error: 'PAGE_SIZE' macro redefined [-Werror,-Wmacro-redefined] -| #define PAGE_SIZE 4096 -| ^ -| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/openocd/0.10+gitrAUTOINC+7ee618692f-r0/recipe-sysroot/usr/inclu -de/limits.h:89:9: note: previous definition is here -| #define PAGE_SIZE PAGESIZE - -Upstream-Status: Submitted [http://openocd.zylin.com/#/c/5180/2] -Change-Id: I195b303fc88a7c848ca4e55fd6ba893796df55cc -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/flash/nor/esirisc_flash.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/flash/nor/esirisc_flash.c b/src/flash/nor/esirisc_flash.c -index 4e33b942..3bed0658 100644 ---- a/src/flash/nor/esirisc_flash.c -+++ b/src/flash/nor/esirisc_flash.c -@@ -92,7 +92,7 @@ - #endif - - #define CONTROL_TIMEOUT 5000 /* 5s */ --#define PAGE_SIZE 4096 -+#define FLASH_PAGE_SIZE 4096 - #define PB_MAX 32 - - #define NUM_NS_PER_S 1000000000ULL -@@ -264,7 +264,7 @@ static int esirisc_flash_erase(struct flash_bank *bank, int first, int last) - (void)esirisc_flash_disable_protect(bank); - - for (int page = first; page < last; ++page) { -- uint32_t address = page * PAGE_SIZE; -+ uint32_t address = page * FLASH_PAGE_SIZE; - - target_write_u32(target, esirisc_info->cfg + ADDRESS, address); - -@@ -464,8 +464,8 @@ static int esirisc_flash_probe(struct flash_bank *bank) - if (target->state != TARGET_HALTED) - return ERROR_TARGET_NOT_HALTED; - -- bank->num_sectors = bank->size / PAGE_SIZE; -- bank->sectors = alloc_block_array(0, PAGE_SIZE, bank->num_sectors); -+ bank->num_sectors = bank->size / FLASH_PAGE_SIZE; -+ bank->sectors = alloc_block_array(0, FLASH_PAGE_SIZE, bank->num_sectors); - - retval = esirisc_flash_init(bank); - if (retval != ERROR_OK) { --- -2.21.0 - diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb index 241b4baa33..559fe29ff8 100644 --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb @@ -1,32 +1,30 @@ SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=599d2d1ee7fc84c0467b3d19801db870" DEPENDS = "libusb-compat libftdi" -RDEPENDS_${PN} = "libusb1" +RDEPENDS:${PN} = "libusb1" SRC_URI = " \ - git://repo.or.cz/openocd.git;protocol=http;name=openocd \ - git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl \ - git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \ - git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \ - file://0001-esirisc_flash-Rename-PAGE_SIZE-to-FLASH_PAGE_SIZE.patch \ - file://0001-Do-not-include-syscrtl.h-with-glibc.patch \ + 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://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 = "7ee618692f56b0efea864890da45d73d28e393d9" +SRCREV_openocd = "91bd4313444c5a949ce49d88ab487608df7d6c37" SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba" -SRCREV_jimtcl = "a9bf5975fd0f89974d689a2d9ebd0873c8d64787" -SRCREV_libjaylink = "8645845c1abebd004e991ba9a7f808f4fd0c608b" +SRCREV_jimtcl = "fcbb4499a6b46ef69e7a95da53e30796e20817f0" +SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4" -PV = "0.10+gitr${SRCPV}" +PV = "0.12+git" S = "${WORKDIR}/git" inherit pkgconfig autotools-brokensep gettext -BBCLASSEXTEND += "nativesdk" +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 @@ -48,10 +46,14 @@ do_install() { fi } -FILES_${PN} = " \ +FILES:${PN} = " \ ${datadir}/openocd/* \ ${bindir}/openocd \ " PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio" -PACKAGECONFIG ??= "sysfsgpio" +PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang" +PACKAGECONFIG ??= "sysfsgpio remote-bitbang" + +# Can't be built with ccache +CCACHE_DISABLE = "1" diff --git a/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb b/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb index 4bd9a12554..4a0383e0a1 100644 --- a/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb +++ b/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb @@ -1,13 +1,12 @@ SUMMARY = "Packages required for a target (on-device) SDK" -PR = "r1" inherit packagegroup -RPROVIDES_${PN} += "packagegroup-native-sdk" -RREPLACES_${PN} += "packagegroup-native-sdk" -RCONFLICTS_${PN} += "packagegroup-native-sdk" -RDEPENDS_${PN} = "gcc-symlinks g++-symlinks cpp cpp-symlinks \ +RPROVIDES:${PN} += "packagegroup-native-sdk" +RREPLACES:${PN} += "packagegroup-native-sdk" +RCONFLICTS:${PN} += "packagegroup-native-sdk" +RDEPENDS:${PN} = "gcc-symlinks g++-symlinks cpp cpp-symlinks \ binutils-symlinks \ perl-modules \ flex flex-dev \ @@ -23,4 +22,4 @@ RDEPENDS_${PN} = "gcc-symlinks g++-symlinks cpp cpp-symlinks \ pkgconfig" # usefull, but not in oe-core/meta-oe yet: patchutils -RRECOMMENDS_${PN} = " g77-symlinks gfortran-symlinks" +RRECOMMENDS:${PN} = " g77-symlinks gfortran-symlinks" 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 new file mode 100644 index 0000000000..4f7dfd4cca --- /dev/null +++ b/meta-oe/recipes-devtools/pahole/files/0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch @@ -0,0 +1,35 @@ +From 436163ab845c263312cf3d4717a43727cf5f0747 Mon Sep 17 00:00:00 2001 +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] + +--- + ostra/ostra-cg | 2 +- + ostra/python/ostra.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ostra/ostra-cg b/ostra/ostra-cg +index 52c902e..8142e67 100755 +--- a/ostra/ostra-cg ++++ b/ostra/ostra-cg +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/env python3 + # ostra-cg - generate callgraphs from encoded trace + # + # Arnaldo Carvalho de Melo <acme@redhat.com> +diff --git a/ostra/python/ostra.py b/ostra/python/ostra.py +index 86fe079..9bb5ad1 100755 +--- a/ostra/python/ostra.py ++++ b/ostra/python/ostra.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/env python3 + # + # Copyright (C) 2005, 2006, 2007 Arnaldo Carvalho de Melo + # +-- +2.31.1 + diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.25.bb b/meta-oe/recipes-devtools/pahole/pahole_1.25.bb new file mode 100644 index 0000000000..1334c850e6 --- /dev/null +++ b/meta-oe/recipes-devtools/pahole/pahole_1.25.bb @@ -0,0 +1,32 @@ +SUMMARY = "Shows and manipulates data structure layout" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "elfutils zlib libbpf" + +# Depends on MACHINE_ARCH libbpf +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST = "(x86_64|i.86|aarch64).*-linux" + +SRCREV = "81558a5a996005df0d607dd33f74ec5b7bdb619d" +SRC_URI = "git://git.kernel.org/pub/scm/devel/pahole/pahole.git;branch=master \ + file://0002-Use-usr-bin-env-python3-instead-of-just-usr-bin-pyth.patch" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +PACKAGECONFIG[python3] = ",,python3-core,python3-core" + +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* \ + ${libdir}/libdwarves_reorganize.so*" + +PACKAGES += "${PN}-extra" +FILES:${PN}-extra = "${datadir} ${bindir} ${libdir}/libdwarves_emit.so*" +RDEPENDS:${PN}-extra += "bash python3-core" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/pax-utils/pax-utils_1.2.2.bb b/meta-oe/recipes-devtools/pax-utils/pax-utils_1.3.3.bb index 9635a5e708..d512c85704 100644 --- a/meta-oe/recipes-devtools/pax-utils/pax-utils_1.2.2.bb +++ b/meta-oe/recipes-devtools/pax-utils/pax-utils_1.3.3.bb @@ -4,18 +4,17 @@ utilities for ELF binaries. It can check ELF binary files and running \ processes for issues that might be relevant when using ELF binaries \ along with PaX, such as non-PIC code or executable stack and heap." HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" SRC_URI = "https://dev.gentoo.org/~vapier/dist/pax-utils-${PV}.tar.xz" -SRC_URI[md5sum] = "a580468318f0ff42edf4a8cd314cc942" -SRC_URI[sha256sum] = "7f4a7f8db6b4743adde7582fa48992ad01776796fcde030683732f56221337d9" +SRC_URI[sha256sum] = "eeca7fbd98bc66bead4a77000c2025d9f17ea8201b84245882406ce00b9b6b14" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" export GNULIB_OVERRIDES_WINT_T = "0" -do_configure_prepend() { +do_configure:prepend() { touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/README } diff --git a/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb new file mode 100644 index 0000000000..85c4fa95ae --- /dev/null +++ b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "Simple program to read & write to a pci device from userspace" +HOMEPAGE = "https://github.com/billfarrow/pcimem" +BUGTRACKER = "https://github.com/billfarrow/pcimem/issues" +SECTION = "devel" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +COMPATIBLE_HOST = "(x86_64|aarch64|arm|riscv64)" + +SRCREV = "09724edb1783a98da2b7ae53c5aaa87493aabc9b" +SRC_URI = "git://github.com/billfarrow/pcimem.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +do_install() { + install -D -m 0755 ${B}/pcimem ${D}${bindir}/pcimem +} 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..7e9408b0b2 --- /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}\"" + ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${TUNE_CCARGS}\"" + 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/exiftool_12.72.bb b/meta-oe/recipes-devtools/perl/exiftool_12.72.bb new file mode 100644 index 0000000000..ba3e3fdf7e --- /dev/null +++ b/meta-oe/recipes-devtools/perl/exiftool_12.72.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 = "fc4f6614ff0c19bb5f332a9c464dcef7267931df" +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_20180523.0.bb b/meta-oe/recipes-devtools/perl/ipc-run_20231003.0.bb index c812ae1374..e28b6ea018 100644 --- a/meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb +++ b/meta-oe/recipes-devtools/perl/ipc-run_20231003.0.bb @@ -5,12 +5,12 @@ usages are supported and may be mixed. Likewise, functional and OO API \ styles are both supported and may be mixed." HOMEPAGE = "https://metacpan.org/release/IPC-Run" SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e" DEPENDS = "perl" -SRC_URI = "git://github.com/toddr/IPC-Run.git" -SRCREV = "0b409702490729eeb97ae65f5b94d949ec083134" +SRC_URI = "git://github.com/toddr/IPC-Run.git;branch=master;protocol=https" +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 new file mode 100644 index 0000000000..b2266394d6 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Config file parser module" +HOMEPAGE = "http://search.cpan.org/dist/Config-General/" +LICENSE = "Artistic-2.0 | GPL-1.0-or-later" +SECTION = "libs" +LIC_FILES_CHKSUM = "file://README;beginline=90;endline=90;md5=53fe13727e61798809ec5c160dc93e6e" + +SRCNAME = "Config-General" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TL/TLINDEN/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[sha256sum] = "4d6d5754be3a9f30906836f0cc10e554c8832e14e7a1341efb15b05d706fc58f" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" + +inherit cpan + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} 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 index 049dc665dd..fc505fe1e8 100644 --- a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb +++ b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb @@ -9,13 +9,13 @@ 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+" +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" +SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master" S = "${WORKDIR}/git" 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 new file mode 100644 index 0000000000..b41bbe0a50 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch @@ -0,0 +1,56 @@ +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.642.bb b/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb index 7532b3fa22..1fee83a8fd 100644 --- a/meta-oe/recipes-devtools/perl/libdbi-perl_1.642.bb +++ b/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb @@ -6,18 +6,20 @@ 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+" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=10982c7148e0a012c0fd80534522f5c5" -SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz" -SRC_URI[md5sum] = "f2ba18b5cea1c8cb322a62be0a847f3d" -SRC_URI[sha256sum] = "3f2025023a56286cebd15cb495e36ccd9b456c3cc229bf2ce1f69e9ebfc27f5d" +SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz \ + file://CVE-2014-10402.patch \ + " +SRC_URI[md5sum] = "352f80b1e23769c116082a90905d7398" +SRC_URI[sha256sum] = "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" S = "${WORKDIR}/DBI-${PV}" inherit cpan ptest-perl -do_install_prepend() { +do_install:prepend() { # test requires "-T" (taint) command line option rm -rf ${B}/t/pod-coverage.t rm -rf ${B}/t/13taint.t @@ -27,7 +29,12 @@ do_install_prepend() { rm -rf ${B}/t/z*.t } -RDEPENDS_${PN}_class-target = " \ +do_install:append() { + sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/dbiproxy \ + ${D}${bindir}/dbiprof ${D}${bindir}/dbilogstrip +} + +RDEPENDS:${PN}:class-target = " \ perl \ perl-module-carp \ perl-module-exporter \ @@ -38,7 +45,7 @@ RDEPENDS_${PN}_class-target = " \ perl-module-universal \ " -RDEPENDS_${PN}-ptest = " \ +RDEPENDS:${PN}-ptest = " \ ${PN} \ perl-module-b \ perl-module-benchmark \ 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.13.bb b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb index f5bdb2087f..74a09e7bf8 100644 --- a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.13.bb +++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb @@ -4,18 +4,25 @@ and its headers are available, by attempting to compile a simple program and \ link against it." HOMEPAGE = "https://metacpan.org/pod/Devel::CheckLib" SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" 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] = "930216c5abc0f016df8a7539d48c891a" -SRC_URI[sha256sum] = "24adfd908705dfac4bb320711763f37126b75cf54b3566c2c27c7cdef9c429a8" +SRC_URI[sha256sum] = "869d38c258e646dcef676609f0dd7ca90f085f56cf6fd7001b019a5d5b831fca" S = "${WORKDIR}/Devel-CheckLib-${PV}" inherit cpan +do_install:append() { + # update interpreter on shebang line + # since old version env doesn't support multiple arguments, replace option + # '-w' with 'use warnings;' + sed -i -e "s:^#!.*:#!/usr/bin/env perl:" \ + -e "/use strict;/ause warnings;" ${D}${bindir}/use-devel-checklib +} + BBCLASSEXTEND="native" diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.12.bb b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.12.bb deleted file mode 100644 index b1a95e5771..0000000000 --- a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.12.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Perl module for pseudo tty IO" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" -LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42e8ce9d45f628e587" - -SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz" - -SRC_URI[md5sum] = "11695a1a516b3bd1b90ce75ff0ce3e6d" -SRC_URI[sha256sum] = "a2ef8770d3309178203f8c8ac25e623e63cf76e97830fd3be280ade1a555290d" - -S = "${WORKDIR}/IO-Tty-${PV}" - -inherit cpan - -FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/IO/Tty/.debug/" - diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb new file mode 100644 index 0000000000..6029b7aae9 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb @@ -0,0 +1,26 @@ +SUMMARY = "Perl module for pseudo tty IO" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42e8ce9d45f628e587" + +SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz" + +SRC_URI[sha256sum] = "b15309fc85623893289cb9b2b88dfa9ed1e69156b75f29938553a45be6d730af" + +S = "${WORKDIR}/IO-Tty-${PV}" + +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/libjson-perl_4.03000.bb b/meta-oe/recipes-devtools/perl/libjson-perl_4.03000.bb new file mode 100644 index 0000000000..88d0d26d03 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libjson-perl_4.03000.bb @@ -0,0 +1,22 @@ +SUMMARY = "Perl module to decode/encode json files" +DESCRIPTION = "This package contains the JSON.pm module with friends. \ +The module implements JSON encode/decode." + +HOMEPAGE = "https://metacpan.org/pod/JSON" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://README;beginline=1171;endline=1176;md5=3be2cb8159d094768e67386c453e8bbe" + +DEPENDS += "perl" + +SRC_URI = "git://github.com/makamaka/JSON.git;protocol=https;branch=master" + +SRCREV = "ebbae181c5e311fa80ee4c6379b598c7a6400570" + +S = "${WORKDIR}/git" + +inherit cpan + +RDEPENDS:${PN} += "perl" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/perl/libparse-yapp-perl_1.21.bb b/meta-oe/recipes-devtools/perl/libparse-yapp-perl_1.21.bb new file mode 100644 index 0000000000..be9704a313 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libparse-yapp-perl_1.21.bb @@ -0,0 +1,25 @@ +SUMMARY = "Perl extension for generating and using LALR parsers" +DESCRIPTION = "Parse::Yapp (Yet Another Perl Parser compiler) is a collection \ +of modules that let you generate and use yacc like thread safe (reentrant) parsers \ +with perl object oriented interface." + +HOMEPAGE = "http://search.cpan.org/dist/Parse-Yapp/" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://lib/Parse/Yapp.pm;beginline=508;endline=521;md5=41a4542fcde97a600c9de0d782a90256" + +SRC_URI = "https://www.cpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-${PV}.tar.gz" + +SRC_URI[md5sum] = "69584d5b0f0304bb2a23cffcd982c5de" +SRC_URI[sha256sum] = "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" + +S = "${WORKDIR}/Parse-Yapp-${PV}" + +inherit cpan + +do_install:append() { + sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/yapp +} + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb b/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb new file mode 100644 index 0000000000..ff4e1f0563 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb @@ -0,0 +1,22 @@ +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[md5sum] = "45601505dbb7b27329811ac9bad35fab" +SRC_URI[sha256sum] = "2722b7e5543e4faf3ba1ec6b29a7dfec6d92be1edec09d0a3191992d4d88c69d" + +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/perl/libperlio-gzip-perl_0.20.bb b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb new file mode 100644 index 0000000000..11f6a1ad19 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb @@ -0,0 +1,30 @@ +SUMMARY = "Perl module to manipulate and access gzip files" +DESCRIPTION = "This package contains the gzip.pm module with friends. \ +The module implements perlio layer for gzip." + +HOMEPAGE = "https://metacpan.org/pod/PerlIO::gzip" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://README;beginline=55;endline=61;md5=bc3da2dec1fbea59ac91172c5e0eb837" + +DEPENDS += "perl" + +SRC_URI = "https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/PerlIO-gzip-${PV}.tar.gz" + +SRC_URI[md5sum] = "0393eae5d0b23df6cf40ed44af7d711c" +SRC_URI[sha256sum] = "4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5" + +S = "${WORKDIR}/PerlIO-gzip-${PV}" + +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" + +inherit cpan + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +RDEPENDS:${PN} += "perl perl-module-perlio" + +BBCLASSEXTEND = "native nativesdk" 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-Use-pkg-config-for-libxml2-detection.patch b/meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch deleted file mode 100644 index ccc6d4ede1..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch +++ /dev/null @@ -1,23 +0,0 @@ -Use pkg-config for libxml2 detection. - -xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.in | 15 ++------------- - 1 file changed, 2 insertions(+), 13 deletions(-) ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2481,8 +2481,8 @@ AC_DEFUN([PHP_SETUP_LIBXML], [ - LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` - if test "$LIBXML_VERSION" -ge "2006011"; then - found_libxml=yes -- LIBXML_LIBS=`$XML2_CONFIG --libs` -- LIBXML_INCS=`$XML2_CONFIG --cflags` -+ LIBXML_LIBS=`pkg-config --libs libxml-2.0` -+ LIBXML_INCS=`pkg-config --cflags libxml-2.0` - else - AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) - fi diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch deleted file mode 100644 index 51dbe269cb..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d2679c89c0b15b90e5360b4863258a7955e5f4e5 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Tue, 12 Feb 2019 15:59:19 +0800 -Subject: [PATCH] acinclude.m4: don't unset cache variables - -Unsetting prevents cache variable from being passed to configure. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - -update patch to version 7.3.2 -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - acinclude.m4 | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 25f900d..2641969 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -1921,8 +1921,6 @@ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])) - dnl - AC_DEFUN([PHP_CHECK_FUNC_LIB],[ - ifelse($2,,:,[ -- unset ac_cv_lib_$2[]_$1 -- unset ac_cv_lib_$2[]___$1 - unset found - AC_CHECK_LIB($2, $1, [found=yes], [ - AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) -@@ -1954,8 +1952,6 @@ dnl in the default libraries and as a fall back in the specified library. - dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. - dnl - AC_DEFUN([PHP_CHECK_FUNC],[ -- unset ac_cv_func_$1 -- unset ac_cv_func___$1 - unset found - - AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch deleted file mode 100644 index 15329261bf..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a2d146b8dd9d02f523d1e205d79792626a71dec3 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Mon, 2 Apr 2018 15:27:09 +0800 -Subject: [PATCH] acinclude.m4: skip binconfig check for libxml - -We want libxml flags to be picked up using pkg-config instead of the -xml2-config file. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - acinclude.m4 | 29 ----------------------------- - 1 file changed, 29 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index d42d708..d32766a 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2525,35 +2525,6 @@ dnl - AC_DEFUN([PHP_SETUP_LIBXML], [ - found_libxml=no - -- dnl First try to find xml2-config -- AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path, -- [ -- for i in $PHP_LIBXML_DIR /usr/local /usr; do -- if test -x "$i/bin/xml2-config"; then -- ac_cv_php_xml2_config_path="$i/bin/xml2-config" -- break -- fi -- done -- ]) -- -- if test -x "$ac_cv_php_xml2_config_path"; then -- XML2_CONFIG="$ac_cv_php_xml2_config_path" -- libxml_full_version=`$XML2_CONFIG --version` -- ac_IFS=$IFS -- IFS="." -- set $libxml_full_version -- IFS=$ac_IFS -- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` -- if test "$LIBXML_VERSION" -ge "2006011"; then -- found_libxml=yes -- LIBXML_LIBS=`$XML2_CONFIG --libs` -- LIBXML_INCS=`$XML2_CONFIG --cflags` -- else -- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) -- fi -- fi -- -- dnl If xml2-config fails, try pkg-config - if test "$found_libxml" = "no"; then - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch index 34f433f40a..c743697469 100644 --- a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +++ b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch @@ -1,30 +1,38 @@ -From 8de5ba69d20d049b8ca983a9470c7303142ec0b3 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Sun, 28 Apr 2019 16:55:13 +0800 -Subject: [PATCH] From fb139d9707dabe1684b472a08a6eb5761ede4a3a Mon Sep 17 - 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Tue, 12 - Feb 2019 14:56:16 +0800 Subject: [PATCH] opcache/config.m4: enable opcache +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 environment. Set -the variables directly instead since we know that we'd be running on latest -enough linux kernel. +We can't use AC_TRY_RUN to run programs in a cross compile +environment. Set the variables directly instead since we know +that we'd be running on latest enough linux kernel. Upstream-Status: Inappropriate [Configuration] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> -update patch to version 7.3.4 +update patch to version 7.4.4 Signed-off-by: Changqing Li <changqing.li@windriver.com> + +update patch to version 8.0.12 +fix issue linking with librt +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 | 312 +------------------------------------------------- - 1 file changed, 6 insertions(+), 306 deletions(-) + 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 4810217..22c3d61 100644 +index 6bf07ad3..5d645b86 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 -@@ -27,319 +27,19 @@ if test "$PHP_OPCACHE" != "no"; then - AC_CHECK_HEADERS([unistd.h sys/uio.h]) +@@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then + AC_CHECK_FUNCS([mprotect]) AC_MSG_CHECKING(for sysvipc shared memory support) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -35,7 +43,7 @@ index 4810217..22c3d61 100644 -#include <unistd.h> -#include <string.h> - --int main() { +-int main(void) { - pid_t pid; - int status; - int ipc_id; @@ -91,13 +99,14 @@ index 4810217..22c3d61 100644 - } - return 0; -} --]])],[dnl +-]])],[have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no]) +- if test "$have_shm_ipc" = "yes"; then - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) -- +- fi + AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) -+ ++ have_shm_ipc=yes + AC_MSG_RESULT([$have_shm_ipc]) + AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> @@ -115,7 +124,7 @@ index 4810217..22c3d61 100644 -# define MAP_FAILED ((void*)-1) -#endif - --int main() { +-int main(void) { - pid_t pid; - int status; - char *shm; @@ -145,68 +154,24 @@ index 4810217..22c3d61 100644 - } - return 0; -} --]])],[dnl +-]])],[have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[ +- case $host_alias in +- *linux*) +- have_shm_mmap_anon=yes +- ;; +- *) +- have_shm_mmap_anon=no +- ;; +- esac +-]) +- if test "$have_shm_mmap_anon" = "yes"; then - AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) +- fi + AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) ++ have_shm_mmap_anon=yes + AC_MSG_RESULT([$have_shm_mmap_anon]) - AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <sys/types.h> --#include <sys/wait.h> --#include <sys/mman.h> --#include <sys/stat.h> --#include <fcntl.h> --#include <unistd.h> --#include <string.h> -- --#ifndef MAP_FAILED --# define MAP_FAILED ((void*)-1) --#endif -- --int main() { -- pid_t pid; -- int status; -- int fd; -- char *shm; -- -- fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); -- if (fd == -1) { -- return 1; -- } -- -- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); -- if (shm == MAP_FAILED) { -- return 2; -- } -- -- strcpy(shm, "hello"); -- -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --]])],[dnl -- AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) -+ AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) - + PHP_CHECK_FUNC_LIB(shm_open, rt, root) AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> @@ -223,14 +188,14 @@ index 4810217..22c3d61 100644 -# define MAP_FAILED ((void*)-1) -#endif - --int main() { +-int main(void) { - pid_t pid; - int status; - int fd; - char *shm; - char tmpname[4096]; - -- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid()); - if (mktemp(tmpname) == NULL) { - return 1; - } @@ -271,84 +236,19 @@ index 4810217..22c3d61 100644 - } - return 0; -} --]])],[dnl +-]])],[have_shm_mmap_posix=yes],[have_shm_mmap_posix=no],[have_shm_mmap_posix=no]) +- if test "$have_shm_mmap_posix" = "yes"; then - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) +- PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) +- fi +- AC_MSG_RESULT([$have_shm_mmap_posix]) + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) - - AC_MSG_CHECKING(for mmap() using regular file shared memory support) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <sys/types.h> --#include <sys/wait.h> --#include <sys/mman.h> --#include <sys/stat.h> --#include <fcntl.h> --#include <unistd.h> --#include <string.h> --#include <stdlib.h> --#include <stdio.h> -- --#ifndef MAP_FAILED --# define MAP_FAILED ((void*)-1) --#endif -- --int main() { -- pid_t pid; -- int status; -- int fd; -- char *shm; -- char tmpname[4096]; -- -- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); -- if (mktemp(tmpname) == NULL) { -- return 1; -- } -- fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); -- if (fd == -1) { -- return 2; -- } -- if (ftruncate(fd, 4096) < 0) { -- close(fd); -- unlink(tmpname); -- return 3; -- } -- -- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); -- if (shm == MAP_FAILED) { -- return 4; -- } -- unlink(tmpname); -- close(fd); -- -- strcpy(shm, "hello"); -- -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --]])],[dnl -- AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) -+ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) ++ AC_MSG_RESULT([yes]) ++ have_shm_mmap_posix=yes ++ PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) PHP_NEW_EXTENSION(opcache, ZendAccelerator.c \ -- -2.7.4 +2.40.0 diff --git a/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch deleted file mode 100644 index fce9738f54..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 2842aa2a078eb1cad55540b61e7edf111395150d Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> -Date: Mon, 26 Feb 2018 19:30:55 +0100 -Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when - !HAVE_LIBDL - -Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866 -extension_dir = "./ext" now use current directory for base") modified -the php_load_zend_extension_cb() function to use php_load_shlib(), and -pass a handle to the newly introduced zend_load_extension_handle() -function instead of passing the extension path to -zend_load_extension(). - -While doing so, it introduced a call to php_load_shlib() from code -that is built even when HAVE_LIBDL is not defined. However, -php_load_shlib() is not implemented when HAVE_LIBDL is not defined, -for obvious reasons. - -It turns out that zend_load_extension_handle() anyway doesn't do -anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and -ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined -(Zend/zend_portability.h). - -Fixes the following build failure when building on a system that -doesn't have libdl: - -main/php_ini.o: In function `php_load_zend_extension_cb': -php_ini.c:(.text+0x478): undefined reference to `php_load_shlib' -php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib' -collect2: error: ld returned 1 exit status - -Upstream-Status: Backport [http://git.php.net/?p=php-src.git;a=commit;h=2842aa2a078eb1cad55540b61e7edf111395150d] -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - main/php_ini.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/main/php_ini.c b/main/php_ini.c -index ba58eb1..fca263e 100644 ---- a/main/php_ini.c -+++ b/main/php_ini.c -@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg) - - /* {{{ php_load_zend_extension_cb - */ -+#ifdef HAVE_LIBDL - static void php_load_zend_extension_cb(void *arg) - { - char *filename = *((char **) arg); -@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg) - efree(libpath); - } - } -+#else -+static void php_load_zend_extension_cb(void *arg) { } -+#endif - /* }}} */ - - /* {{{ php_init_config --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch deleted file mode 100644 index 2f7d581555..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ebc101e0728b9db6c687cff525e5dfc8eb0edbf3 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Thu, 3 Nov 2011 14:27:15 +0100 -Subject: [PATCH 2/8] php: don't use broken wrapper for mkdir - -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> ---- - -Upstream-Status: Inappropriate - - Makefile.global | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.global b/Makefile.global -index ff858c2..ae554b4 100644 ---- a/Makefile.global -+++ b/Makefile.global -@@ -1,4 +1,4 @@ --mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p -+mkinstalldirs = mkdir -p - INSTALL = $(top_srcdir)/build/shtool install -c - INSTALL_DATA = $(INSTALL) -m 644 - --- -1.9.3 - diff --git a/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch new file mode 100644 index 0000000000..6183f49c28 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch @@ -0,0 +1,45 @@ +From 1af203e8e385d46ad3e33b1c253b1c564aa99034 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:01:55 -0500 +Subject: [PATCH 02/11] build/php.m4: don't unset cache variables + +Unsetting prevents cache variable from being passed to configure. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> + +update this patch to 7.4.4, acinclude.m4 move to build/php.m4 +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +update patch to 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> +--- + build/php.m4 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/build/php.m4 b/build/php.m4 +index 9746ba28f3..93551d9ca7 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -1568,8 +1568,6 @@ dnl PHP_CHECK_FUNC_LIB + dnl + AC_DEFUN([PHP_CHECK_FUNC_LIB],[ + ifelse($2,,:,[ +- unset ac_cv_lib_$2[]_$1 +- unset ac_cv_lib_$2[]___$1 + unset found + AC_CHECK_LIB($2, $1, [found=yes], [ + AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) +@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and + dnl HAVE_library if found and adds the library to LIBS. + dnl + AC_DEFUN([PHP_CHECK_FUNC],[ +- unset ac_cv_func_$1 +- unset ac_cv_func___$1 + unset found + + AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch new file mode 100644 index 0000000000..9637ed9516 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch @@ -0,0 +1,36 @@ +From c81d0bd3491a6c6371d9df2f43956d109f984310 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:02:29 -0500 +Subject: [PATCH 03/11] php: remove host specific info from header file + +Based on: +https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/ + 0036-php-5.4.9-fixheader.patch + +Upstream-Status: Inappropriate [not author] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> +Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> + +update patch to 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1eafd62a44..90c94323aa 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1289,7 +1289,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" + EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" + +-UNAME=`uname -a | xargs` ++UNAME=`uname | xargs` + PHP_UNAME=${PHP_UNAME:-$UNAME} + AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output]) + PHP_OS=`uname | xargs` +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch new file mode 100644 index 0000000000..19a8bf8e4f --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch @@ -0,0 +1,33 @@ +From 41ef1121682c245b10df7de4b78c45baf9114c04 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:03:46 -0500 +Subject: [PATCH 04/11] configure.ac: don't include build/libtool.m4 + +we delete build/libtool.m4 before do_configure, +we will use libtool.m4 under ACLOCALDIR + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +update patch to 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 90c94323aa..161e7c3f53 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6,7 +6,6 @@ dnl ---------------------------------------------------------------------------- + m4_include([build/ax_check_compile_flag.m4]) + m4_include([build/ax_func_which_gethostbyname_r.m4]) + m4_include([build/ax_gcc_func_attribute.m4]) +-m4_include([build/libtool.m4]) + m4_include([build/php_cxx_compile_stdcxx.m4]) + m4_include([build/php.m4]) + m4_include([build/pkg.m4]) +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch index fcbf25be9b..37752ef949 100644 --- a/meta-oe/recipes-devtools/php/php/pear-makefile.patch +++ b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch @@ -1,17 +1,23 @@ -From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Wed, 2 Nov 2011 16:54:57 +0100 -Subject: [PATCH] Upstream-Status: Pending +From f22958b4c1348eec3bb4c0f2cbe2d22676e0ad23 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:04:29 -0500 +Subject: [PATCH 05/11] pear: fix Makefile.frag for Yocto +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/pear/Makefile.frag b/pear/Makefile.frag -index bbe8ec3..16f43e2 100644 +index 9408757a3a..69072f39e0 100644 --- a/pear/Makefile.frag +++ b/pear/Makefile.frag -@@ -12,7 +12,7 @@ PEAR_SUFFIX = -ds a$(program_suffix) +@@ -10,7 +10,7 @@ PEAR_SUFFIX = -ds a$(program_suffix) PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar install-pear-installer: $(SAPI_CLI_PATH) @@ -20,3 +26,6 @@ index bbe8ec3..16f43e2 100644 install-pear: @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/" +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch index 336cf0d629..acf2940839 100644 --- a/meta-oe/recipes-devtools/php/php/phar-makefile.patch +++ b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch @@ -1,24 +1,28 @@ -From 08962a56f69963e01892d98ca5b75de8354bd3f5 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Wed, 2 Nov 2011 16:54:57 +0100 -Subject: [PATCH] Fix phar packaging +From eab5babdadea487bbbef025068c553f5ba741774 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:07:25 -0500 +Subject: [PATCH 06/11] ext/phar/Makefile.frag: Fix phar packaging Inherited from OE-Classic, with some additions to fix host paths leaking into the target package. Upstream-Status: Inappropriate [config] +update patch to version 7.4.4 +Signed-off-by: Changqing Li <changqing.li@windriver.com> +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +update patch to version 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> --- ext/phar/Makefile.frag | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) -diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag -index 0e3713f..22f7898 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag -@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar +@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir - PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' + PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 PHP_PHARCMD_EXECUTABLE = ` \ - if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \ - $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \ @@ -34,9 +38,9 @@ index 0e3713f..22f7898 100644 - $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ - fi;` -PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` -+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` ++ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` + -+PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` ++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "/usr/bin/env $(program_prefix)php$(program_suffix)$(EXEEXT)";` $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc -@test -d $(builddir)/phar || mkdir $(builddir)/phar diff --git a/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch new file mode 100644 index 0000000000..9776e7f6db --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch @@ -0,0 +1,32 @@ +From 03aa51625e0d1aa156c2f7cd71503b1f435d35a4 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:08:06 -0500 +Subject: [PATCH 07/11] sapi/cli/config.m4: fix build directory + +Upstream-Status: Inappropriate + +update patch to version 7.4.4 +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +update patch to version 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> +--- + sapi/cli/config.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 +index d17d531683..f2f87f9164 100644 +--- a/sapi/cli/config.m4 ++++ b/sapi/cli/config.m4 +@@ -47,7 +47,7 @@ if test "$PHP_CLI" != "no"; then + esac + + dnl Set executable for tests. +- PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)" ++ PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php" + PHP_SUBST(PHP_EXECUTABLE) + + dnl Expose to Makefile. +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch index 16359af9fd..78bae58e00 100644 --- a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch +++ b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch @@ -1,32 +1,23 @@ -From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Wed, 2 Nov 2011 16:54:57 +0100 -Subject: [PATCH] Upstream-Status: Pending +From c3c20db4415e0f6c4a601d6f9da1f3746a96b301 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:08:58 -0500 +Subject: [PATCH 08/11] ext/imap/config.m4: fix include paths +Upstream-Status: Pending +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +update patch to version 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> --- - acinclude.m4 | 2 +- ext/imap/config.m4 | 10 ++-------- - 2 files changed, 3 insertions(+), 9 deletions(-) + 1 file changed, 2 insertions(+), 8 deletions(-) -diff --git a/acinclude.m4 b/acinclude.m4 -index ad5166e..f6a55ec 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2350,7 +2350,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[ - PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" - fi - -- for i in $PHP_OPENSSL_DIR; do -+ for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do - if test -r $i/include/openssl/evp.h; then - OPENSSL_INCDIR=$i/include - fi diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 -index badb6e2..8ff803c 100644 +index 5086a312d0..0e938bd544 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 -@@ -109,7 +109,7 @@ if test "$PHP_IMAP" != "no"; then - PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared) +@@ -110,7 +110,7 @@ if test "$PHP_IMAP" != "no"; then + PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) AC_DEFINE(HAVE_IMAP,1,[ ]) - for i in $PHP_IMAP /usr/local /usr; do @@ -34,7 +25,7 @@ index badb6e2..8ff803c 100644 IMAP_INC_CHK() el[]IMAP_INC_CHK(/include/c-client) el[]IMAP_INC_CHK(/include/imap) -@@ -198,13 +198,7 @@ if test "$PHP_IMAP" != "no"; then +@@ -199,13 +199,7 @@ if test "$PHP_IMAP" != "no"; then AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) fi @@ -49,3 +40,6 @@ index badb6e2..8ff803c 100644 IMAP_LIB=$lib IMAP_LIB_CHK($PHP_LIBDIR) IMAP_LIB_CHK(c-client) +-- +2.25.1 + 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 new file mode 100644 index 0000000000..b5a33cca7f --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch @@ -0,0 +1,31 @@ +From 8707720c0aea405f0e06d67354f239232cc823cc Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:10:02 -0500 +Subject: [PATCH 09/11] php: don't use broken wrapper for mkdir + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +update patch to version 7.4.4 +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/build/Makefile.global b/build/Makefile.global +index 6566d052de..eb39421f2a 100644 +--- a/build/Makefile.global ++++ b/build/Makefile.global +@@ -1,4 +1,4 @@ +-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p ++mkinstalldirs = mkdir -p + INSTALL = $(top_srcdir)/build/shtool install -c + INSTALL_DATA = $(INSTALL) -m 644 + +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch new file mode 100644 index 0000000000..e3b8cd4707 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch @@ -0,0 +1,35 @@ +From a04aabc5b80371e579fbaffdd417627390d22722 Mon Sep 17 00:00:00 2001 +From: Claude Bing <cbing@cybernetics.com> +Date: Tue, 9 Nov 2021 13:10:33 -0500 +Subject: [PATCH 10/11] iconv: fix detection + +Upstream-Status: Pending + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +update patch to version 7.4.4 +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +update patch to version 8.0.12 +Signed-off-by: Claude Bing <cbing@cybernetics.com> +--- + build/php.m4 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/build/php.m4 b/build/php.m4 +index 93551d9ca7..dba50825fb 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ + unset ICONV_DIR + + dnl Check libc first if no path is provided in --with-iconv. +- if test "$PHP_ICONV" = "yes"; then ++ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes ++ if test "$PHP_ICONV" != "no"; then + dnl Reset LIBS temporarily as it may have already been included -liconv in. + LIBS_save="$LIBS" + LIBS= +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch b/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch deleted file mode 100644 index f36ddac262..0000000000 --- a/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@sury.org> -Date: Mon, 22 Oct 2018 06:54:31 +0000 -Subject: Use pkg-config for FreeType2 detection - ---- - ext/gd/config.m4 | 30 +++++++++++++++++++----------- - 1 file changed, 19 insertions(+), 11 deletions(-) - -diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 -index 498d870..d28c6ae 100644 ---- a/ext/gd/config.m4 -+++ b/ext/gd/config.m4 -@@ -184,21 +184,29 @@ AC_DEFUN([PHP_GD_XPM],[ - AC_DEFUN([PHP_GD_FREETYPE2],[ - if test "$PHP_FREETYPE_DIR" != "no"; then - -- for i in $PHP_FREETYPE_DIR /usr/local /usr; do -- if test -f "$i/bin/freetype-config"; then -- FREETYPE2_DIR=$i -- FREETYPE2_CONFIG="$i/bin/freetype-config" -- break -+ if test -z "$PKG_CONFIG"; then -+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -+ fi -+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then -+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2` -+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2` -+ else -+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do -+ if test -f "$i/bin/freetype-config"; then -+ FREETYPE2_DIR=$i -+ FREETYPE2_CONFIG="$i/bin/freetype-config" -+ break -+ fi -+ done -+ -+ if test -z "$FREETYPE2_DIR"; then -+ AC_MSG_ERROR([freetype-config not found.]) - fi -- done - -- if test -z "$FREETYPE2_DIR"; then -- AC_MSG_ERROR([freetype-config not found.]) -+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` -+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` - fi - -- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` -- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` -- - PHP_EVAL_INCLINE($FREETYPE2_CFLAGS) - PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBFREETYPE,1,[ ]) diff --git a/meta-oe/recipes-devtools/php/php/0049-ext-intl-Use-pkg-config-to-detect-icu.patch b/meta-oe/recipes-devtools/php/php/0049-ext-intl-Use-pkg-config-to-detect-icu.patch deleted file mode 100644 index 2258c4c7fa..0000000000 --- a/meta-oe/recipes-devtools/php/php/0049-ext-intl-Use-pkg-config-to-detect-icu.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 03fecab78f9fa747ad8ab3484e7ca00c0148321d Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Sun, 28 Apr 2019 16:45:02 +0800 -Subject: [PATCH] From: Hugh McMaster <hugh.mcmaster@outlook.com> Date: Wed, 5 - Dec 2018 23:27:30 +1100 Subject: ext/intl: Use pkg-config to detect icu - -The developers of icu recommend using pkg-config to detect icu, -because icu-config is deprecated. - -Upstream-Status: Pending - -update to version 7.3.4 -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - acinclude.m4 | 95 ++++++------------------------------------------------ - ext/intl/config.m4 | 16 ++++----- - 2 files changed, 15 insertions(+), 96 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 7d77c33..86b0ecc 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2158,92 +2158,15 @@ dnl - dnl Common setup macro for ICU - dnl - AC_DEFUN([PHP_SETUP_ICU],[ -- PHP_ARG_WITH(icu-dir,, -- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no) -- -- if test "$PHP_ICU_DIR" = "no"; then -- PHP_ICU_DIR=DEFAULT -- fi -- -- AC_MSG_CHECKING([for location of ICU headers and libraries]) -- found_icu=no -- -- dnl First try to find pkg-config -- if test -z "$PKG_CONFIG"; then -- AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -- fi -- -- dnl If pkg-config is found try using it -- if test "$PHP_ICU_DIR" = "DEFAULT" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists icu-uc icu-io icu-i18n; then -- if $PKG_CONFIG --atleast-version=40 icu-uc; then -- found_icu=yes -- icu_version_full=`$PKG_CONFIG --modversion icu-uc` -- ac_IFS=$IFS -- IFS="." -- set $icu_version_full -- IFS=$ac_IFS -- icu_version=`expr [$]1 \* 1000 + [$]2` -- AC_MSG_RESULT([found $icu_version_full]) -- -- ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n` -- ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n` -- ICU_CXXFLAGS="-DU_USING_ICU_NAMESPACE=1" -- -- AC_MSG_RESULT([found $ICU_VERSION]) -- -- PHP_EVAL_LIBLINE($ICU_LIBS, $1) -- PHP_EVAL_INCLINE($ICU_INCS) -- else -- AC_MSG_ERROR([ICU version 4.0 or later required.]) -- fi -- fi -- -- dnl If pkg-config fails for some reason, revert to the old method -- if test "$found_icu" = "no"; then -- if test "$PHP_ICU_DIR" = "DEFAULT"; then -- dnl Try to find icu-config -- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) -- else -- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" -- fi -- -- dnl Trust icu-config to know better what the install prefix is.. -- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null` -- if test "$?" != "0" || test -z "$icu_install_prefix"; then -- AC_MSG_RESULT([not found]) -- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.]) -- else -- AC_MSG_RESULT([$icu_install_prefix]) -- -- dnl Check ICU version -- AC_MSG_CHECKING([for ICU 4.0 or greater]) -- icu_version_full=`$ICU_CONFIG --version` -- ac_IFS=$IFS -- IFS="." -- set $icu_version_full -- IFS=$ac_IFS -- icu_version=`expr [$]1 \* 1000 + [$]2` -- AC_MSG_RESULT([found $icu_version_full]) -- -- if test "$icu_version" -lt "4000"; then -- AC_MSG_ERROR([ICU version 4.0 or later is required]) -- fi -- -- ICU_VERSION=$icu_version -- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath` -- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio` -- PHP_EVAL_INCLINE($ICU_INCS) -- PHP_EVAL_LIBLINE($ICU_LIBS, $1) -- -- ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags` -- if test "$icu_version" -ge "49000"; then -- ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit" -- ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1" -- fi -- if test "$icu_version" -ge "60000"; then -- ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1" -- fi -- fi -+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1]) -+ PHP_EVAL_INCLINE($ICU_CFLAGS) -+ PHP_EVAL_LIBLINE($ICU_LIBS, $1) -+ -+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1" -+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit" -+ -+ if $PKG_CONFIG icu-io --atleast-version=60; then -+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1" - fi - ]) - -diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 -index 4b9f469..fdae88a 100644 ---- a/ext/intl/config.m4 -+++ b/ext/intl/config.m4 -@@ -9,15 +9,7 @@ if test "$PHP_INTL" != "no"; then - PHP_SETUP_ICU(INTL_SHARED_LIBADD) - PHP_SUBST(INTL_SHARED_LIBADD) - PHP_REQUIRE_CXX() -- INTL_COMMON_FLAGS="$ICU_INCS $ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" -- if test "$icu_version" -ge "4002"; then -- icu_spoof_src=" spoofchecker/spoofchecker_class.c \ -- spoofchecker/spoofchecker.c\ -- spoofchecker/spoofchecker_create.c\ -- spoofchecker/spoofchecker_main.c" -- else -- icu_spoof_src="" -- fi -+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - PHP_NEW_EXTENSION(intl, php_intl.c \ - intl_error.c \ - intl_convert.c \ -@@ -68,7 +60,11 @@ if test "$PHP_INTL" != "no"; then - transliterator/transliterator_methods.c \ - uchar/uchar.c \ - idn/idn.c \ -- $icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx) -+ spoofchecker/spoofchecker_class.c \ -+ spoofchecker/spoofchecker.c\ -+ spoofchecker/spoofchecker_create.c\ -+ spoofchecker/spoofchecker_main.c \ -+ , $ext_shared,,$INTL_COMMON_FLAGS,cxx) - - PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \ - common/common_enum.cpp \ --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php5.conf b/meta-oe/recipes-devtools/php/php/70_mod_php5.conf deleted file mode 100644 index 1de6fb11ac..0000000000 --- a/meta-oe/recipes-devtools/php/php/70_mod_php5.conf +++ /dev/null @@ -1,12 +0,0 @@ -# vim: ft=apache sw=4 ts=4 -<IfDefine PHP5> - # Load the module first - <IfModule !sapi_apache2.c> - LoadModule php5_module lib/apache2/modules/libphp5.so - </IfModule> - - # Set it to handle the files - AddHandler php5-script .php .phtml .php3 .php4 .php5 - AddType application/x-httpd-php-source .phps - DirectoryIndex index.html index.html.var index.php index.phtml -</IfDefine> diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf index d206265a25..58ce408aa4 100644 --- a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf +++ b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf @@ -1,6 +1,6 @@ -LoadModule php7_module lib/apache2/modules/libphp7.so +LoadModule php_module lib/apache2/modules/libphp.so -<FilesMatch "\.ph(p[2-7]?|tml)$"> +<FilesMatch "\.ph(p[2-8]?|tml)$"> SetHandler application/x-httpd-php </FilesMatch> diff --git a/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch b/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch deleted file mode 100644 index b7cdfd964c..0000000000 --- a/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Sat, 19 Jan 2019 10:35:39 +0100 -Subject: [PATCH] Sync with upstream - -Even though libgd/libgd#492 is not a relevant bug fix for PHP, since -the binding doesn't use the `gdImage*Ptr()` functions at all, we're -porting the fix to stay in sync here. ---- - ext/gd/libgd/gd_gif_out.c | 20 +++++++++++++++++--- - ext/gd/libgd/gd_jpeg.c | 17 ++++++++++++++--- - ext/gd/libgd/gd_wbmp.c | 18 +++++++++++++++--- - 3 files changed, 46 insertions(+), 9 deletions(-) - -Upstream-Status: Backport [http://git.php.net/?p=php-src.git;a=commit;h=089f7c0bc28d399b0420aa6ef058e4c1c120b2ae] -CVE: CVE-2019-6978 - -Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> - -diff --git a/ext/gd/libgd/gd_gif_out.c b/ext/gd/libgd/gd_gif_out.c -index 1f2a6b936a..2e1f38af70 100644 ---- a/ext/gd/libgd/gd_gif_out.c -+++ b/ext/gd/libgd/gd_gif_out.c -@@ -97,12 +97,18 @@ static void cl_hash (register count_int chsize, GifCtx *ctx); - static void char_init (GifCtx *ctx); - static void char_out (int c, GifCtx *ctx); - static void flush_char (GifCtx *ctx); -+ -+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out); -+ - void * gdImageGifPtr (gdImagePtr im, int *size) - { - void *rv; - gdIOCtx *out = gdNewDynamicCtx (2048, NULL); -- gdImageGifCtx (im, out); -- rv = gdDPExtractData (out, size); -+ if (!_gdImageGifCtx(im, out)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free (out); - return rv; - } -@@ -115,6 +121,12 @@ void gdImageGif (gdImagePtr im, FILE * outFile) - } - - void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) -+{ -+ _gdImageGifCtx(im, out); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - { - gdImagePtr pim = 0, tim = im; - int interlace, BitsPerPixel; -@@ -125,7 +137,7 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - based temporary image. */ - pim = gdImageCreatePaletteFromTrueColor(im, 1, 256); - if (!pim) { -- return; -+ return 1; - } - tim = pim; - } -@@ -138,6 +150,8 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - /* Destroy palette based temporary image. */ - gdImageDestroy( pim); - } -+ -+ return 0; - } - - static int -diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c -index 8cf71fcbc9..ef46c4a22c 100644 ---- a/ext/gd/libgd/gd_jpeg.c -+++ b/ext/gd/libgd/gd_jpeg.c -@@ -132,6 +132,7 @@ const char * gdJpegGetVersionString() - } - } - -+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality); - - /* - * Write IM to OUTFILE as a JFIF-formatted JPEG image, using quality -@@ -153,8 +154,11 @@ void *gdImageJpegPtr (gdImagePtr im, int *size, int quality) - { - void *rv; - gdIOCtx *out = gdNewDynamicCtx (2048, NULL); -- gdImageJpegCtx (im, out, quality); -- rv = gdDPExtractData (out, size); -+ if (!_gdImageJpegCtx(im, out, quality)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free (out); - - return rv; -@@ -163,6 +167,12 @@ void *gdImageJpegPtr (gdImagePtr im, int *size, int quality) - void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile); - - void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality) -+{ -+ _gdImageJpegCtx(im, outfile, quality); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) - { - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -@@ -184,7 +194,7 @@ void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality) - if (row) { - gdFree (row); - } -- return; -+ return 1; - } - - cinfo.err->error_exit = fatal_jpeg_error; -@@ -277,6 +287,7 @@ void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality) - jpeg_finish_compress (&cinfo); - jpeg_destroy_compress (&cinfo); - gdFree (row); -+ return 0; - } - - gdImagePtr gdImageCreateFromJpeg (FILE * inFile) -diff --git a/ext/gd/libgd/gd_wbmp.c b/ext/gd/libgd/gd_wbmp.c -index 55ced3443d..fd9edad2ca 100644 ---- a/ext/gd/libgd/gd_wbmp.c -+++ b/ext/gd/libgd/gd_wbmp.c -@@ -82,6 +82,7 @@ int gd_getin (void *in) - return (gdGetC((gdIOCtx *) in)); - } - -+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out); - - /* gdImageWBMPCtx - ** -------------- -@@ -93,6 +94,12 @@ int gd_getin (void *in) - ** out: the stream where to write - */ - void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out) -+{ -+ _gdImageWBMPCtx(image, fg, out); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) - { - int x, y, pos; - Wbmp *wbmp; -@@ -100,7 +107,7 @@ void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out) - /* create the WBMP */ - if ((wbmp = createwbmp (gdImageSX (image), gdImageSY (image), WBMP_WHITE)) == NULL) { - gd_error("Could not create WBMP"); -- return; -+ return 1; - } - - /* fill up the WBMP structure */ -@@ -116,7 +123,9 @@ void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out) - - /* write the WBMP to a gd file descriptor */ - if (writewbmp (wbmp, &gd_putout, out)) { -+ freewbmp(wbmp); - gd_error("Could not save WBMP"); -+ return 1; - } - /* des submitted this bugfix: gdFree the memory. */ - freewbmp(wbmp); -@@ -204,8 +213,11 @@ void * gdImageWBMPPtr (gdImagePtr im, int *size, int fg) - { - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); -- gdImageWBMPCtx(im, fg, out); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageWBMPCtx(im, fg, out)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free(out); - - return rv; --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch deleted file mode 100755 index 21050f7605..0000000000 --- a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +++ /dev/null @@ -1,31 +0,0 @@ -php: remove host specific info from header file - -https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/ - 0036-php-5.4.9-fixheader.patch - -Upstream-Status: Inappropriate [not author] -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- -From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org> -Date: Sat, 2 May 2015 10:26:56 +0200 -Subject: php-5.4.9-fixheader - -Make generated php_config.h constant across rebuilds. ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 433d7e6..41893d7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1357,7 +1357,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d` - fi - AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date]) - --PHP_UNAME=`uname -a | xargs` -+PHP_UNAME=`uname | xargs` - AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output]) - PHP_OS=`uname | xargs` - AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output]) diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-oe/recipes-devtools/php/php/iconv.patch deleted file mode 100644 index ecf7d87207..0000000000 --- a/meta-oe/recipes-devtools/php/php/iconv.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Wed, 2 Nov 2011 16:54:57 +0100 -Subject: [PATCH] Upstream-Status: Pending - ---- - acinclude.m4 | 3 ++- - ext/iconv/config.m4 | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index d32766a..ad5166e 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2445,7 +2445,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ - dnl Check libc first if no path is provided in --with-iconv - dnl - -- if test "$PHP_ICONV" = "yes"; then -+ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes -+ if test "$PHP_ICONV" != "no"; then - dnl Reset LIBS temporarily as it may have already been included - dnl -liconv in. - LIBS_save="$LIBS" -diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index 6a05697..973e750 100644 ---- a/ext/iconv/config.m4 -+++ b/ext/iconv/config.m4 -@@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then - - if test "$iconv_avail" != "no"; then - if test -z "$ICONV_DIR"; then -- for i in /usr/local /usr; do -+ for i in $PHP_ICONV /usr/local /usr; do - if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then - PHP_ICONV_PREFIX="$i" - break diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service index ac79dc931a..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 +Type=simple PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid -ExecStart=@SYSCONFDIR@/init.d/php-fpm start -ExecStop=@SYSCONFDIR@/init.d/php-fpm stop +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/php_exec_native.patch b/meta-oe/recipes-devtools/php/php/php_exec_native.patch deleted file mode 100644 index 80409000d3..0000000000 --- a/meta-oe/recipes-devtools/php/php/php_exec_native.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Wed, 2 Nov 2011 16:54:57 +0100 -Subject: [PATCH] Upstream-Status: Inappriate - ---- - sapi/cli/config.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 -index 2168151..20a81db 100644 ---- a/sapi/cli/config.m4 -+++ b/sapi/cli/config.m4 -@@ -50,7 +50,7 @@ if test "$PHP_CLI" != "no"; then - esac - - dnl Set executable for tests -- PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)" -+ PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php" - PHP_SUBST(PHP_EXECUTABLE) - - dnl Expose to Makefile diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch deleted file mode 100644 index 21057439c9..0000000000 --- a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +++ /dev/null @@ -1,34 +0,0 @@ -php-ptest: xfail two tests - -If and when these tests are modified to expect the correct output, they will -succeed and generate warnings in the test summary. This patch can then be removed. - -Note that we add a closing '?>' to one test so that it can be executed directly by php. - -Upstream-Status: Pending - -Signed-off-By: Joe Slater <joe.slater@windriver.com> - - ---- a/tests/basic/bug71273.phpt -+++ b/tests/basic/bug71273.phpt -@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i - var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out)); - ?> - ==DONE== -+--XFAIL-- -+Output is int(0), not int(1) - --EXPECT-- - int(1) - ==DONE== ---- a/tests/run-test/bug75042-3.phpt -+++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@ display_errors=1 - nonexistentsharedmodule - --FILE-- - <?php -+?> -+--XFAIL-- -+No warning message printed. - --EXPECTF-- - PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A diff --git a/meta-oe/recipes-devtools/php/php_7.3.9.bb b/meta-oe/recipes-devtools/php/php_7.3.9.bb deleted file mode 100644 index a5c7b9b6ba..0000000000 --- a/meta-oe/recipes-devtools/php/php_7.3.9.bb +++ /dev/null @@ -1,20 +0,0 @@ -require php.inc - -LIC_FILES_CHKSUM = "file://LICENSE;md5=fb07bfc51f6d5e0c30b65d9701233b2e" - -SRC_URI += "file://0001-acinclude.m4-don-t-unset-cache-variables.patch \ - file://0048-Use-pkg-config-for-FreeType2-detection.patch \ - file://0049-ext-intl-Use-pkg-config-to-detect-icu.patch \ - file://0001-Use-pkg-config-for-libxml2-detection.patch \ - file://debian-php-fixheader.patch \ - file://CVE-2019-6978.patch \ - " -SRC_URI_append_class-target = " \ - file://pear-makefile.patch \ - file://phar-makefile.patch \ - file://0001-opcache-config.m4-enable-opcache.patch \ - file://xfail_two_bug_tests.patch \ - " - -SRC_URI[md5sum] = "bcc37749815009c9201e4c126e1ab8ee" -SRC_URI[sha256sum] = "a39c9709a8c9eb7ea8ac4933ef7a78b92f7e5735a405c8b8e42ee39541d963c4" diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php_8.2.18.bb index 3d537e5b6a..e662f6806e 100644 --- a/meta-oe/recipes-devtools/php/php.inc +++ b/meta-oe/recipes-devtools/php/php_8.2.18.bb @@ -3,29 +3,48 @@ HOMEPAGE = "http://www.php.net" SECTION = "console/network" LICENSE = "PHP-3.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d" BBCLASSEXTEND = "native" -DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native" -DEPENDS_class-native = "zlib-native libxml2-native" +DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native" +DEPENDS:append:libc-musl = " libucontext" +DEPENDS:class-native = "zlib-native libxml2-native" PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ - file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ + file://0002-build-php.m4-don-t-unset-cache-variables.patch \ + file://0003-php-remove-host-specific-info-from-header-file.patch \ + file://0004-configure.ac-don-t-include-build-libtool.m4.patch \ + 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 = " \ - file://iconv.patch \ - file://imap-fix-autofoo.patch \ - file://php_exec_native.patch \ +SRC_URI:append:class-target = " \ + file://0001-ext-opcache-config.m4-enable-opcache.patch \ + file://0005-pear-fix-Makefile.frag-for-Yocto.patch \ + file://0007-sapi-cli-config.m4-fix-build-directory.patch \ + file://0008-ext-imap-config.m4-fix-include-paths.patch \ file://php-fpm.conf \ file://php-fpm-apache.conf \ file://70_mod_php${PHP_MAJOR_VERSION}.conf \ file://php-fpm.service \ " + S = "${WORKDIR}/php-${PV}" +SRC_URI[sha256sum] = "ca0b07c254200320f518ac5b3df540a9cf14d866f3c93edc3013b52e06fac796" + +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 \ +" -inherit autotools pkgconfig pythonnative gettext +inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd # phpize is not scanned for absolute paths by default (but php-config is). # @@ -43,7 +62,6 @@ COMMON_EXTRA_OECONF = "--enable-sockets \ --libdir=${PHP_LIBDIR} \ " EXTRA_OECONF = "--enable-mbstring \ - --enable-wddx \ --enable-fpm \ --with-libdir=${baselib} \ --with-gettext=${STAGING_LIBDIR}/.. \ @@ -56,12 +74,16 @@ EXTRA_OECONF = "--enable-mbstring \ ${COMMON_EXTRA_OECONF} \ " -EXTRA_OECONF_append_riscv64 = " --with-pcre-jit=no" -EXTRA_OECONF_append_riscv32 = " --with-pcre-jit=no" +EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" +EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" +# Needs fibers assembly implemented for rv32 +# for example rv64 implementation is below +# see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68 +EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm" CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes" -EXTRA_OECONF_class-native = " \ +EXTRA_OECONF:class-native = " \ --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ --without-iconv \ ${COMMON_EXTRA_OECONF} \ @@ -70,9 +92,9 @@ EXTRA_OECONF_class-native = " \ PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ " -PACKAGECONFIG_class-native = "" +PACKAGECONFIG:class-native = "" -PACKAGECONFIG[zip] = "--enable-zip --with-libzip=${STAGING_EXECPREFIXDIR},,libzip" +PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip" PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ @@ -84,7 +106,7 @@ PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ ,--without-sqlite3 --without-pdo-sqlite \ ,sqlite3" PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" -PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2" +PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" PACKAGECONFIG[pam] = ",,libpam" PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ @@ -95,38 +117,56 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind" +PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma" +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 +# See https://bugs.php.net/bug.php?id=60109 +CFLAGS += " -DHAVE_LIBDL " +LDFLAGS += " -ldl " +LDFLAGS:append:libc-musl = " -lucontext " +LDFLAGS:append:riscv64 = " -latomic" EXTRA_OEMAKE = "INSTALL_ROOT=${D}" acpaths = "" -do_configure_prepend () { +do_configure:prepend () { rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_SBINDIR_NATIVE}/httpd!' } -do_configure_append() { +do_configure:append() { # No, libtool, we really don't want rpath set... - sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool - sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool + 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() { +do_install:append:class-native() { rm -rf ${D}/${PHP_LIBDIR}/php/.registry rm -rf ${D}/${PHP_LIBDIR}/php/.channels rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* } -do_install_prepend() { +do_install:prepend() { cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \ ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4 } -do_install_prepend_class-target() { +do_install:prepend:class-target() { if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then # Install dummy config file so apxs doesn't fail install -d ${D}${sysconfdir}/apache2 @@ -135,48 +175,35 @@ do_install_prepend_class-target() { } # fixme -do_install_append_class-target() { +do_install:append:class-target() { install -d ${D}${sysconfdir}/ - if [ -d ${RECIPE_SYSROOT_NATIVE}${sysconfdir} ];then - install -m 0644 ${RECIPE_SYSROOT_NATIVE}${sysconfdir}/pear.conf ${D}${sysconfdir}/ - fi - rm -rf ${D}/${TMPDIR} rm -rf ${D}/.registry rm -rf ${D}/.channels rm -rf ${D}/.[a-z]* rm -rf ${D}/var rm -f ${D}/${sysconfdir}/php-fpm.conf.default - sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}${sysconfdir}/pear.conf - 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 - TMP=`dirname ${D}/${TMPDIR}` - while test ${TMP} != ${D}; do - if [ -d ${TMP} ]; then - rmdir ${TMP} - fi - TMP=`dirname ${TMP}`; - done - 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\",' \ @@ -185,6 +212,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 () { @@ -198,31 +233,39 @@ php_sysroot_preprocess () { MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" -PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" +PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" -RDEPENDS_${PN} += "libgcc" -RDEPENDS_${PN}-pear = "${PN}" -RDEPENDS_${PN}-phar = "${PN}-cli" -RDEPENDS_${PN}-cli = "${PN}" -RDEPENDS_${PN}-modphp = "${PN} apache2" -RDEPENDS_${PN}-opcache = "${PN}" +RDEPENDS:${PN} += "libgcc" +RDEPENDS:${PN}-pear = "${PN}" +RDEPENDS:${PN}-phar = "${PN}-cli" +RDEPENDS:${PN}-cli = "${PN}" +RDEPENDS:${PN}-modphp = "${PN} apache2" +RDEPENDS:${PN}-opcache = "${PN}" + +ALLOW_EMPTY:${PN} = "1" INITSCRIPT_PACKAGES = "${PN}-fpm" inherit update-rc.d -FILES_${PN}-dbg =+ "${bindir}/.debug \ +# WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php: ELF binary /usr/libexec/apache2/modules/libphp.so has relocations in .text [textrel] +#WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php-opcache: ELF binary /usr/lib/php8/extensions/no-debug-zts-20200930/opcache.so has relocations in .text [textrel] +INSANE_SKIP:${PN}:append:x86 = " textrel" +INSANE_SKIP:${PN}-opcache:append:x86 = " textrel" + +FILES:${PN}-dbg =+ "${bindir}/.debug \ ${libexecdir}/apache2/modules/.debug" -FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" -FILES_${PN}-cli = "${bindir}/php" -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-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" -INITSCRIPT_NAME_${PN}-fpm = "php-fpm" -INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" -FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ +FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc" +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 ${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" +INITSCRIPT_NAME:${PN}-fpm = "php-fpm" +INITSCRIPT_PARAMS:${PN}-fpm = "defaults 60" +FILES:${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ @@ -230,34 +273,27 @@ FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ ${PHP_LIBDIR}/php/data/PEAR \ ${sysconfdir}/pear.conf" -FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ +FILES:${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" -FILES_${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" -FILES_${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" -FILES_${PN} = "${PHP_LIBDIR}/php" -FILES_${PN} += "${bindir} ${libexecdir}/apache2" +FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" +FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" +FILES:${PN} = "${PHP_LIBDIR}/php" +FILES:${PN} += "${bindir} ${libexecdir}/apache2" -SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server" -FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" +SUMMARY:${PN}-modphp = "PHP module for the Apache HTTP server" +FILES:${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" -RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" -RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" -RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" -do_install_append_class-native() { +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 new file mode 100644 index 0000000000..7793971083 --- /dev/null +++ b/meta-oe/recipes-devtools/ply/ply_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Ply: A light-weight dynamic tracer for eBPF" +HOMEPAGE = "https://github.com/iovisor/ply" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS += "bison-native" + +PV = "2.3.0" + +SRC_URI = "git://github.com/iovisor/ply;branch=master;protocol=https" +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 9afcbbb7f5..ad149de12c 100644 --- a/meta-oe/recipes-devtools/pmtools/pmtools_git.bb +++ b/meta-oe/recipes-devtools/pmtools/pmtools_git.bb @@ -1,12 +1,12 @@ DESCRIPTION = "This is a small collection of power management \ test and investigation tools" HOMEPAGE = "http://lesswatts.org/projects/acpi" -LICENSE = "GPLv2+" +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 \ +SRC_URI = "git://github.com/anyc/pmtools.git;branch=master;protocol=https \ file://pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch \ " SRCREV = "3ebe0e54c54061b4c627236cbe35d820de2e1168" @@ -18,7 +18,7 @@ S = "${WORKDIR}/git" inherit update-alternatives ALTERNATIVE_PRIORITY = "90" -ALTERNATIVE_${PN} = "acpixtract acpidump" +ALTERNATIVE:${PN} = "acpixtract acpidump" do_configure[noexec] = "1" do_compile() { 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 new file mode 100644 index 0000000000..67384b73d4 --- /dev/null +++ b/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch @@ -0,0 +1,31 @@ +From 8ba76a5a7ce311f67890199c5595bc1f626495ad Mon Sep 17 00:00:00 2001 +From: Romain Naour <romain.naour@gmail.com> +Date: Fri, 30 Apr 2021 15:43:59 +0200 +Subject: [PATCH] configure.ac: HELP2MAN replace ':' by 'true' when + cross-compiling + +Avoid: +/usr/bin/make ./../poke/poke +../run \ + : -p poke --name="The GNU extensible binary editor" \ + ./../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(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -148,7 +148,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) + if test $cross_compiling = no; then + AM_MISSING_PROG(HELP2MAN, help2man) + else +- HELP2MAN=: ++ HELP2MAN=true + fi + + dnl The following Automake conditional is used in some Makefile.am files diff --git a/meta-oe/recipes-devtools/poke/poke_4.0.bb b/meta-oe/recipes-devtools/poke/poke_4.0.bb new file mode 100644 index 0000000000..9e68ba4ead --- /dev/null +++ b/meta-oe/recipes-devtools/poke/poke_4.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "GNU poke is an extensible editor for structured binary data" +HOMEPAGE = "https://pokology.org" +DESCRIPTION = "GNU poke is an interactive, extensible editor for binary data. Not limited to editing basic entities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them." +SECTION = "console/utils" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/poke/poke-${PV}.tar.gz \ + file://0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch \ + " + +DEPENDS = "flex-native bison-native bdwgc readline" + +SRC_URI[sha256sum] = "02bab22cb1fa6153a1b6a927c8bb3cd58d508543c144842a6d7ee74f19973a77" + +# poke does not support using out-of-tree builds +inherit autotools-brokensep gettext pkgconfig + +# The automatic m4 path detection gets confused, so force the right value from +# the poke bootstrap script. +acpaths = "-I ./m4" + +EXTRA_OECONF = "--disable-gui \ + --disable-libnbd \ + --with-libreadline-prefix=${STAGING_INCDIR} \ + " + +PACKAGECONFIG[mi] = "--enable-mi,--disable-mi,json-c" + +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/0001-avoid-race-condition.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch deleted file mode 100644 index 4fc7703d81..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 216e31260b618ec73862f9f5336597f391444dac Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Sun, 29 Sep 2019 17:20:42 +0800 -Subject: [PATCH] avoid race condition - -It's possible that the cxx-generate-packed-data.cc is compiled -while the t/test-full.pb.h is being generated. This will result -the following error. - - DEBUG: ./t/test-full.pb.h:4:0: error: unterminated #ifndef - ./t/test-full.pb.h:4:0: error: unterminated #ifndef - -Add a dependency to avoid such problem. - -Upstream-Status: Pending - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.am b/Makefile.am -index b0cb065..1608ae0 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -156,6 +156,7 @@ noinst_PROGRAMS += \ - t_generated_code2_cxx_generate_packed_data_SOURCES = \ - t/generated-code2/cxx-generate-packed-data.cc \ - t/test-full.pb.cc -+t/generated-code2/cxx-generate-packed-data.cc: t/test-full.pb.h - $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h - t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ - $(AM_CXXFLAGS) \ --- -2.17.1 - diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb index b92f82dec2..24de6b8119 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb @@ -8,29 +8,31 @@ 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=cb901168715f4782a2b06c3ddaefa558" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d11077c6a2b5d2e64b9f32b61a9b78ba" DEPENDS = "protobuf-native protobuf" -SRCREV = "1390409f4ee4e26d0635310995b516eb702c3f9e" +SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" +SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" -SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \ - file://0001-avoid-race-condition.patch \ - " +SRCREV = "8c201f6e47a53feaab773922a743091eb6c8972a" S = "${WORKDIR}/git" -#make sure c++11 is used -CXXFLAGS += "-std=c++11" -BUILD_CXXFLAGS += "-std=c++11" - inherit autotools pkgconfig +export PROTOC = "${STAGING_BINDIR_NATIVE}/protoc" + +# After several fix attempts there is still a race between generating +# t.test-full.pb.h and compiling cxx_generate_packed_data.c despite +# BUILT_SOURCES and explicit dependencies. +PARALLEL_MAKE = "" + PACKAGE_BEFORE_PN = "${PN}-compiler" -FILES_${PN}-compiler = "${bindir}" +FILES:${PN}-compiler = "${bindir}" -RDEPENDS_${PN}-compiler = "protobuf-compiler" -RDEPENDS_${PN}-dev += "${PN}-compiler" +RDEPENDS:${PN}-compiler = "protobuf-compiler" +RDEPENDS:${PN}-dev += "${PN}-compiler" BBCLASSEXTEND = "native nativesdk" 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 new file mode 100644 index 0000000000..9f6116c4c4 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch @@ -0,0 +1,26 @@ +From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 31 Oct 2021 23:39:44 -0700 +Subject: [PATCH] Fix build on mips/clang + +clang13 crashes on mips, until its fixed upstream disable tailcall on +mips + +https://bugs.llvm.org/show_bug.cgi?id=52367 + +Upstream-Status: Inappropriate [Clang workaround] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/google/protobuf/port_def.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/google/protobuf/port_def.inc ++++ b/src/google/protobuf/port_def.inc +@@ -255,6 +255,7 @@ + #error PROTOBUF_TAILCALL was previously defined + #endif + #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-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 fc7286122c..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 321709837f412e2f590e36e3fe33571bb40036a7 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 be18ba761..57e3daec1 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -313,6 +313,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/plugin.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 0a2e5e2df3..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 a28e15092a298e0c73c6fc1ded0913275cf27cb0 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 @@ -23,12 +23,14 @@ 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 4ad605641..31d887639 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@ @@ -44,13 +46,16 @@ index 4ad605641..31d887639 100644 add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ 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++ 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.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.9.2.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.9.2.bb deleted file mode 100644 index a007b2a697..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.9.2.bb +++ /dev/null @@ -1,90 +0,0 @@ -SUMMARY = "Protocol Buffers - structured data serialisation mechanism" -DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \ -efficient yet extensible format. Google uses Protocol Buffers for almost \ -all of its internal RPC protocols and file formats." -HOMEPAGE = "https://github.com/google/protobuf" -SECTION = "console/tools" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" - -DEPENDS = "zlib" -DEPENDS_append_class-target = " protobuf-native" - -SRCREV = "52b2447247f535663ac1c292e088b4b27d2910ef" - -SRC_URI = "git://github.com/google/protobuf.git;branch=3.9.x \ - 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 \ -" -S = "${WORKDIR}/git" - -inherit autotools-brokensep pkgconfig ptest - -PACKAGECONFIG ??= "" -PACKAGECONFIG[python] = ",," - -EXTRA_OECONF += "--with-protoc=echo" - -TEST_SRC_DIR = "examples" -LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" - -do_compile_ptest() { - mkdir -p "${B}/${TEST_SRC_DIR}" - - # 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" - 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" - export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" - - # Save the pkgcfg sysroot variable, and update it to nothing so - # that it doesn't append the sysroot to the beginning of paths. - # The header and library files aren't installed to the target - # system yet. So the absolute paths were specified above. - save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR - export PKG_CONFIG_SYSROOT_DIR= - - # Compile the tests - for lang in ${LANG_SUPPORT}; do - oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang} - done - - # Restore the pkgconfig sysroot variable - export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir -} - -do_install_ptest() { - local olddir=`pwd` - - cd "${S}/${TEST_SRC_DIR}" - install -d "${D}/${PTEST_PATH}" - for i in add_person* list_people*; do - if [ -x "$i" ]; then - install "$i" "${D}/${PTEST_PATH}" - fi - done - cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" - cd "$olddir" -} - -PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" - -FILES_${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" -FILES_${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" - -RDEPENDS_${PN}-compiler = "${PN}" -RDEPENDS_${PN}-dev += "${PN}-compiler" -RDEPENDS_${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}" - -MIPS_INSTRUCTION_SET = "mips" - -BBCLASSEXTEND = "native nativesdk" - -LDFLAGS_append_arm = " -latomic" -LDFLAGS_append_mips = " -latomic" -LDFLAGS_append_powerpc = " -latomic" -LDFLAGS_append_mipsel = " -latomic" diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb new file mode 100644 index 0000000000..4f8515471f --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb @@ -0,0 +1,119 @@ +SUMMARY = "Protocol Buffers - structured data serialisation mechanism" +DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \ +efficient yet extensible format. Google uses Protocol Buffers for almost \ +all of its internal RPC protocols and file formats." +HOMEPAGE = "https://github.com/google/protobuf" +SECTION = "console/tools" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" + +DEPENDS = "zlib abseil-cpp" +DEPENDS:append:class-target = " protobuf-native" + +SRCREV = "4a2aef570deb2bfb8927426558701e8bfc26f2a4" + +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ + file://run-ptest \ + file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.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 " + +S = "${WORKDIR}/git" + +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_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)}" + +do_compile_ptest() { + mkdir -p "${B}/${TEST_SRC_DIR}" + + # 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|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 + # that it doesn't append the sysroot to the beginning of paths. + # The header and library files aren't installed to the target + # system yet. So the absolute paths were specified above. + save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR + export PKG_CONFIG_SYSROOT_DIR= + + # Compile the tests + for lang in ${LANG_SUPPORT}; do + oe_runmake -C "${B}/${TEST_SRC_DIR}" ${lang} + done + + # Restore the pkgconfig sysroot variable + export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir +} + +do_install_ptest() { + local olddir=`pwd` + + cd "${S}/${TEST_SRC_DIR}" + install -d "${D}/${PTEST_PATH}" + for i in add_person* list_people*; do + if [ -x "$i" ]; then + install "$i" "${D}/${PTEST_PATH}" + fi + done + cp "${B}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" + cd "$olddir" +} + +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}-compiler = "${PN}" +RDEPENDS:${PN}-dev += "${PN}-compiler" +RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" + +MIPS_INSTRUCTION_SET = "mips" + +BBCLASSEXTEND = "native nativesdk" + +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.9.bb b/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb index ad45f87ecd..458958edf5 100644 --- a/meta-oe/recipes-devtools/pugixml/pugixml_1.9.bb +++ b/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb @@ -4,17 +4,21 @@ DOM-like interface with rich traversal/modification capabilities, \ an extremely fast XML parser which constructs the DOM tree from \ n XML file/buffer, and an XPath 1.0 implementation for complex \ data-driven tree queries." -HOMPAGE = "https://pugixml.org/" +HOMEPAGE = "https://pugixml.org/" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://readme.txt;beginline=29;endline=52;md5=1d569c2ed59c94ddd9586051f8c67da6" +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[md5sum] = "7286ee2ed11376b6b780ced19fae0b64" -SRC_URI[sha256sum] = "d156d35b83f680e40fd6412c4455fdd03544339779134617b9b28d19e11fdba6" +SRC_URI[sha256sum] = "2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015" + +UPSTREAM_CHECK_URI = "https://github.com/zeux/${BPN}/releases" inherit cmake -EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON \ +EXTRA_OECMAKE += "-DBUILD_PKGCONFIG=ON \ + -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=Release \ " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/python/python-cpuset_1.6.bb b/meta-oe/recipes-devtools/python/python-cpuset_1.6.bb deleted file mode 100644 index 1255a51f75..0000000000 --- a/meta-oe/recipes-devtools/python/python-cpuset_1.6.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Cpuset is a Python application to make using the cpusets facilities in the Linux kernel easier" -SECTION = "devel/python" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -S = "${WORKDIR}/git" -SRCREV = "6c46d71a1c6ee711063153b9f7787280128f7252" -SRC_URI = "git://github.com/lpechacek/cpuset.git;protocol=https;" - -inherit distutils - -RDEPENDS_${PN} = "\ - python-core \ - python-re \ - python-logging \ - python-textutils \ - python-unixadmin \ - " diff --git a/meta-oe/recipes-devtools/python/python-distutils-extra.bb b/meta-oe/recipes-devtools/python/python-distutils-extra.bb deleted file mode 100644 index eb84f74365..0000000000 --- a/meta-oe/recipes-devtools/python/python-distutils-extra.bb +++ /dev/null @@ -1,7 +0,0 @@ -require python-distutils-extra.inc - -inherit setuptools - -RDEPENDS_${PN} = "\ - python-distutils \ -" diff --git a/meta-oe/recipes-devtools/python/python-futures_3.3.0.bb b/meta-oe/recipes-devtools/python/python-futures_3.3.0.bb deleted file mode 100644 index 1636f7371d..0000000000 --- a/meta-oe/recipes-devtools/python/python-futures_3.3.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "The concurrent.futures module provides a high-level interface for asynchronously executing callables." -SECTION = "devel/python" -LICENSE = "PSF" -LIC_FILES_CHKSUM = "file://LICENSE;md5=834d982f973c48b6d662b5944c5ab567" -HOMEPAGE = "https://github.com/agronholm/pythonfutures" -DEPENDS = "python" - -SRC_URI[md5sum] = "b43a39ae1475e3fd6940f2b4f7214675" -SRC_URI[sha256sum] = "7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794" - -inherit pypi setuptools - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/python/python-jsmin_2.2.2.bb b/meta-oe/recipes-devtools/python/python-jsmin_2.2.2.bb deleted file mode 100644 index d00d1e2a08..0000000000 --- a/meta-oe/recipes-devtools/python/python-jsmin_2.2.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "JavaScript minifier." -HOMEPAGE = "https://github.com/tikitu/jsmin/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a3301ce2ad647e172f4a1016c67324d" - -inherit setuptools pypi -SRC_URI[md5sum] = "00e7a3179a4591aab2ee707b3214e2fd" -SRC_URI[sha256sum] = "b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch b/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch deleted file mode 100644 index 848cda5aad..0000000000 --- a/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 8b4648d5bc50cb1c14961ed38bf97d5a693f5237 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Mon, 24 Jun 2019 14:51:52 +0800 -Subject: [PATCH] python-pyobject: fix the wrong install dir for python2 - -* after upgrade to 3.32.1, pygobject switch to build with meson, and - default python option is python3, switch to python2 - -* default install dir get by python.install_sources and -python.get_install_dir is get from python's sysconfig info, -not like python3, for python2, the install dir include the basedir of -recipe-sysroot-native, add stagedir option for user to config -correct install dir. - -Upstream-Status: Inappropriate [oe-specific] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - gi/meson.build | 7 +++---- - gi/overrides/meson.build | 4 ++-- - gi/repository/meson.build | 4 ++-- - meson.build | 4 +++- - meson_options.txt | 1 + - pygtkcompat/meson.build | 4 ++-- - 6 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/gi/meson.build b/gi/meson.build -index c1afd68..249c23d 100644 ---- a/gi/meson.build -+++ b/gi/meson.build -@@ -60,9 +60,8 @@ python_sources = [ - 'types.py', - ] - --python.install_sources(python_sources, -- pure : false, -- subdir : 'gi' -+install_data(python_sources, -+ install_dir: join_paths(stagedir, 'gi') - ) - - # https://github.com/mesonbuild/meson/issues/4117 -@@ -76,7 +75,7 @@ giext = python.extension_module('_gi', sources, - dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep], - include_directories: include_directories('..'), - install: true, -- subdir : 'gi', -+ install_dir: join_paths(stagedir, 'gi'), - c_args: pyext_c_args + main_c_args - ) - -diff --git a/gi/overrides/meson.build b/gi/overrides/meson.build -index 6ff073f..964fef1 100644 ---- a/gi/overrides/meson.build -+++ b/gi/overrides/meson.build -@@ -10,6 +10,6 @@ python_sources = [ - 'keysyms.py', - '__init__.py'] - --python.install_sources(python_sources, -- subdir : join_paths('gi', 'overrides') -+install_data(python_sources, -+ install_dir: join_paths(stagedir, 'gi', 'overrides') - ) -diff --git a/gi/repository/meson.build b/gi/repository/meson.build -index fdc136b..fc88adf 100644 ---- a/gi/repository/meson.build -+++ b/gi/repository/meson.build -@@ -1,5 +1,5 @@ - python_sources = ['__init__.py'] - --python.install_sources(python_sources, -- subdir : join_paths('gi', 'repository') -+install_data(python_sources, -+ install_dir: join_paths(stagedir, 'gi', 'repository') - ) -diff --git a/meson.build b/meson.build -index d27a005..ecd55d5 100644 ---- a/meson.build -+++ b/meson.build -@@ -165,12 +165,14 @@ else - py_version = pygobject_version - endif - -+stagedir = get_option('stagedir') -+ - pkginfo_conf = configuration_data() - pkginfo_conf.set('VERSION', py_version) - configure_file(input : 'PKG-INFO.in', - output : 'PyGObject-@0@.egg-info'.format(py_version), - configuration : pkginfo_conf, -- install_dir : python.get_install_dir(pure : false)) -+ install_dir : stagedir) - - subdir('gi') - subdir('pygtkcompat') -diff --git a/meson_options.txt b/meson_options.txt -index 5dd4cbc..21def16 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -1,3 +1,4 @@ - option('python', type : 'string', value : 'python3') - option('pycairo', type : 'boolean', value : true, description : 'build with pycairo integration') - option('tests', type : 'boolean', value : true, description : 'build unit tests') -+option('stagedir', type : 'string', value : '') -diff --git a/pygtkcompat/meson.build b/pygtkcompat/meson.build -index 9e43c44..ef3322d 100644 ---- a/pygtkcompat/meson.build -+++ b/pygtkcompat/meson.build -@@ -3,6 +3,6 @@ python_sources = [ - 'generictreemodel.py', - 'pygtkcompat.py'] - --python.install_sources(python_sources, -- subdir : 'pygtkcompat' -+install_data(python_sources, -+ install_dir: join_paths(stagedir, 'pygtkcompat') - ) --- -2.7.4 - diff --git a/meta-oe/recipes-devtools/python/python-pygobject_3.34.0.bb b/meta-oe/recipes-devtools/python/python-pygobject_3.34.0.bb deleted file mode 100644 index 0cbd07f666..0000000000 --- a/meta-oe/recipes-devtools/python/python-pygobject_3.34.0.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Python GObject bindings" -HOMEPAGE = "http://www.pygtk.org/" -SECTION = "devel/python" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" - -GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gobject-introspection distutils-base upstream-version-is-even - -DEPENDS += "python glib-2.0" - -SRCNAME = "pygobject" -SRC_URI = " \ - http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ - file://0001-python-pyobject-fix-install-dir.patch \ -" - -SRC_URI[md5sum] = "ca1dc4f31c1d6d283758e8f315a88ab6" -SRC_URI[sha256sum] = "87e2c9aa785f352ef111dcc5f63df9b85cf6e05e52ff04f803ffbebdacf5271a" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -UNKNOWN_CONFIGURE_WHITELIST = "introspection" - -PACKAGECONFIG ??= "stagedir" - -PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python-pycairo, python-pycairo" -PACKAGECONFIG[tests] = "-Dtests=true, -Dtests=false, , " -PACKAGECONFIG[python] = "-Dpython=python3, -Dpython=python2, , " -PACKAGECONFIG[stagedir] = "-Dstagedir=${PYTHON_SITEPACKAGES_DIR}, -Dstagedir="", , " - -BBCLASSEXTEND = "native" -RDEPENDS_${PN} = "python-pkgutil" -RDEPENDS_${PN}_class-native = "" - -do_install_append() { - # Remove files that clash with python3-pygobject; their content is same - rm -r ${D}${includedir}/pygobject-3.0/pygobject.h ${D}${libdir}/pkgconfig -} diff --git a/meta-oe/recipes-devtools/python/python-pytoml.inc b/meta-oe/recipes-devtools/python/python-pytoml.inc deleted file mode 100644 index 180531d750..0000000000 --- a/meta-oe/recipes-devtools/python/python-pytoml.inc +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "A TOML-0.4.0 parser/writer for Python" -HOMEPAGE = "https://pypi.python.org/pypi/pytoml/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cfff423699bdaef24331933ac4f56078" - -SRC_URI[md5sum] = "e59dd36a559dd2a876e4c149c69e947b" -SRC_URI[sha256sum] = "8eecf7c8d0adcff3b375b09fe403407aa9b645c499e5ab8cac670ac4a35f61e7" - -inherit pypi - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/python/python-pytoml_0.1.21.bb b/meta-oe/recipes-devtools/python/python-pytoml_0.1.21.bb deleted file mode 100644 index 88fa95317f..0000000000 --- a/meta-oe/recipes-devtools/python/python-pytoml_0.1.21.bb +++ /dev/null @@ -1,2 +0,0 @@ -inherit pypi setuptools -require python-pytoml.inc diff --git a/meta-oe/recipes-devtools/python/python-six_1.12.0.bb b/meta-oe/recipes-devtools/python/python-six_1.12.0.bb deleted file mode 100644 index af26e83d60..0000000000 --- a/meta-oe/recipes-devtools/python/python-six_1.12.0.bb +++ /dev/null @@ -1,2 +0,0 @@ -inherit pypi setuptools -require recipes-devtools/python/python-six.inc diff --git a/meta-oe/recipes-devtools/python/python-which_1.1.0.bb b/meta-oe/recipes-devtools/python/python-which_1.1.0.bb deleted file mode 100644 index 901fdc7637..0000000000 --- a/meta-oe/recipes-devtools/python/python-which_1.1.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "which.py -- a portable GNU which replacement" -HOMEPAGE = "http://code.google.com/p/which/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=030b09798681482b9ad12ac47be496ea" - -inherit setuptools pypi python-dir - -SRCREV = "425bdeeb2d87c36e2313dc4b8d69ff2bb5a02ee9" -PYPI_SRC_URI = "git://github.com/trentm/which" - -S = "${WORKDIR}/git" - -do_install_append() { - rmdir -p --ignore-fail-on-non-empty ${D}${STAGING_BINDIR_NATIVE} - rmdir -p --ignore-fail-on-non-empty ${D}${datadir} -} - -BBCLASSEXTEND = "native nativesdk" 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.5.3.bb b/meta-oe/recipes-devtools/python/python3-apt_2.5.3.bb new file mode 100644 index 0000000000..1d54b9f6af --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-apt_2.5.3.bb @@ -0,0 +1,17 @@ +SUMMARY = "Python-apt is a wrapper to use features of apt from python." +LICENSE = "GPL-2.0-only & FSFAP" +LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://debian/copyright;md5=4ed7b6862ca422678b17e7d4ed592285" + +SRC_URI = "git://salsa.debian.org/apt-team/python-apt.git;protocol=https;branch=main" + +SRCREV = "3252935b6224b3bd2e2250894b9559b47c61b2e1" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "apt" +RDEPENDS:${PN} += "apt python3-core" + +FILES:${PN} = "${libdir} ${datadir}/python-apt" diff --git a/meta-oe/recipes-devtools/python/python3-distutils-extra.bb b/meta-oe/recipes-devtools/python/python3-distutils-extra.bb deleted file mode 100644 index 5836b090e0..0000000000 --- a/meta-oe/recipes-devtools/python/python3-distutils-extra.bb +++ /dev/null @@ -1,9 +0,0 @@ -require python-distutils-extra.inc - -inherit setuptools3 - -S = "${WORKDIR}/python-distutils-extra-${PV}" - -RDEPENDS_${PN} = "\ - python3-setuptools \ -" diff --git a/meta-oe/recipes-devtools/python/python-distutils-extra.inc b/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb index 4d87d77cdb..a98dfab6d9 100644 --- a/meta-oe/recipes-devtools/python/python-distutils-extra.inc +++ b/meta-oe/recipes-devtools/python/python3-distutils-extra_2.39.bb @@ -1,13 +1,15 @@ SUMMARY = "python-distutils extension" -DESCRITION = "python-distutils extension integrating gettext support, themed icons and scrollkeeper based documentation" +DESCRIPTION = "python-distutils extension integrating gettext support, themed icons and scrollkeeper based documentation" HOMEPAGE = "https://launchpad.net/python-distutils-extra" SECTION = "devel/python" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=4325afd396febcb659c36b49533135d4" -PV = "2.39" SRC_URI = "https://launchpad.net/python-distutils-extra/trunk/${PV}/+download/python-distutils-extra-${PV}.tar.gz" -SRC_URI[md5sum] = "16e06db0ef73a35b4bff4b9eed5699b5" SRC_URI[sha256sum] = "723f24f4d65fc8d99b33a002fbbb3771d4cc9d664c97085bf37f3997ae8063af" +inherit setuptools3 + +S = "${WORKDIR}/python-distutils-extra-${PV}" + BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/python/python3-pycups_2.0.4.bb b/meta-oe/recipes-devtools/python/python3-pycups_2.0.4.bb new file mode 100644 index 0000000000..b7071fa4ff --- /dev/null +++ b/meta-oe/recipes-devtools/python/python3-pycups_2.0.4.bb @@ -0,0 +1,19 @@ +# Python bindings for libcups, from the CUPS project. +# +# Copyright (c) Ambu A/S - All rights reserved +# SPDX-License-Identifier: MIT +# +# Author(s) +# clst@ambu.com (Claus Stovgaard) +# + +DESCRIPTION = "pycups - CUPS bindings for Python" +HOMEPAGE = "https://github.com/OpenPrinting/pycups" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +DEPENDS += "cups" + +# See https://pypi.org/project/pycups/ for data +SRC_URI[sha256sum] = "843e385c1dbf694996ca84ef02a7f30c28376035588f5fbeacd6bae005cf7c8d" + +inherit pypi python_setuptools_build_meta diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch deleted file mode 100644 index 745f5d0132..0000000000 --- a/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8d272e53a4d1dc405e08ce2dd50159c58f4451e9 Mon Sep 17 00:00:00 2001 -From: Ruslan Bilovol <rbilovol@cisco.com> -Date: Thu, 24 Jan 2019 18:11:39 +0200 -Subject: [PATCH] CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path - -Currently this path is hardcoded to lib/cmake. -Some distributions have different library path (like lib64). -So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR -configurable and usable in such distros. - -Upstream-Status: Backport [https://github.com/Tencent/rapidjson/commit/8d272e53a4d1dc405e08ce2dd50159c58f4451e9] - -Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7c60407..0275672 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -199,9 +199,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY) - - # ... for the install tree --SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} ) -+SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} ) - FILE( RELATIVE_PATH REL_INCLUDE_DIR -- "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}" -+ "${CMAKECONFIG_INSTALL_DIR}" - "${CMAKE_INSTALL_PREFIX}/include" ) - - SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" ) --- -1.9.1 - diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson/remove-march-native-from-CMAKE_CXX_FLAGS.patch b/meta-oe/recipes-devtools/rapidjson/rapidjson/remove-march-native-from-CMAKE_CXX_FLAGS.patch deleted file mode 100644 index cf3e16ea5d..0000000000 --- a/meta-oe/recipes-devtools/rapidjson/rapidjson/remove-march-native-from-CMAKE_CXX_FLAGS.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 827155e5e659b2a5065b00d701bc59b57feab2bf Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Mon, 19 Dec 2016 01:37:11 -0800 -Subject: [PATCH] remove -march=native from CMAKE_CXX_FLAGS - -Not appropriate when cross compiling. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/CMakeLists.txt -=================================================================== ---- git.orig/CMakeLists.txt -+++ git/CMakeLists.txt -@@ -51,10 +51,10 @@ endif(CCACHE_FOUND) - - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - else() - #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER. -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") - set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wsign-conversion) -@@ -84,7 +84,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "C - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native") - else() - #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER. -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers") - set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough -Weverything) diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb index e3ed9c6a17..8519479c4d 100644 --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb @@ -4,21 +4,23 @@ SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125" -SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1 \ - file://0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch" +SRC_URI = "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https" -SRCREV = "6a905f9311f82d306da77bd963ec5aa5da07da9c" +SRCREV = "0ccdbf364c577803e2a751f5aededce935314313" -PV = "1.1.0+git${SRCPV}" +PV = "1.1.0+git" S = "${WORKDIR}/git" inherit cmake -EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DLIB_INSTALL_DIR:STRING=${libdir}" +EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF" +# the install path for cmake modules etc. is hardcoded as ${prefix}/lib in +# CMakeLists.txt, which breaks the package split with multilib +EXTRA_OECMAKE += "-DLIB_INSTALL_DIR=${libdir}" # RapidJSON is a header-only C++ library, so the main package will be empty. -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Add-option-to-enable-internal-loopback.patch b/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Add-option-to-enable-internal-loopback.patch deleted file mode 100644 index f69254a292..0000000000 --- a/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Add-option-to-enable-internal-loopback.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 059d5512e840fe68e2bb37add6c9208fa9c34d15 Mon Sep 17 00:00:00 2001 -From: Sekhar Nori <nsekhar@ti.com> -Date: Tue, 24 Feb 2015 22:16:37 +0530 -Subject: [PATCH 1/2] Add option to enable internal loopback - -Upstream-status: Pending ---- - serialcheck.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/serialcheck.c b/serialcheck.c -index 4f5b747..4100c37 100644 ---- a/serialcheck.c -+++ b/serialcheck.c -@@ -12,6 +12,8 @@ - #include <sys/ioctl.h> - #include <linux/serial.h> - -+#define TIOCM_LOOP 0x8000 -+ - #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) - #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) - #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) -@@ -40,6 +42,7 @@ struct g_opt { - unsigned char hflow; - unsigned char do_termios; - unsigned char *cmp_buff; -+ unsigned char loopback; - }; - - /* name, key, arg, flags, doc, group */ -@@ -51,6 +54,7 @@ static struct argp_option options[] = { - {"mode", 'm', "M", 0, "transfer mode (d = duplex, t = send r = receive)", 0}, - {"loops", 'l', "NUM", 0, "loops to perform (0 => wait fot CTRL-C", 0}, - {"no-termios", 'n', NULL, 0, "No termios change (baud rate etc. remains unchanged)", 0}, -+ {"loopback", 'k', NULL, 0, "loopback mode", 0}, - {NULL, 0, NULL, 0, NULL, 0} - }; - -@@ -67,6 +71,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) - go->baudrate = 115200; - go->loops = UINT_MAX; - go->do_termios = 1; -+ go->loopback = 0; - break; - case ARGP_KEY_ARG: - ret = ARGP_ERR_UNKNOWN; -@@ -113,6 +118,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) - } else - go->loops = num; - break; -+ case 'k': -+ go->loopback = 1; -+ break; - default: - ret = ARGP_ERR_UNKNOWN; - } -@@ -487,6 +495,21 @@ int main(int argc, char *argv[]) - die("tcflush failed: %m\n"); - } - -+ if (opts.loopback) { -+ unsigned int mcr; -+ -+ ret = ioctl(fd, TIOCMGET, &mcr); -+ if (ret < 0) -+ die("mcr get failed: %m\n"); -+ -+ mcr |= TIOCM_LOOP; -+ -+ ret = ioctl(fd, TIOCMSET, &mcr); -+ if (ret < 0) -+ die ("mcr set failed: %m\n"); -+ -+ } -+ - ret = fcntl(fd, F_SETFL, 0); - if (ret) - printf("Failed to remove nonblock mode\n"); --- -1.9.1 diff --git a/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Makefile-Change-order-of-link-flags.patch b/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Makefile-Change-order-of-link-flags.patch deleted file mode 100644 index 2ab48345dc..0000000000 --- a/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Makefile-Change-order-of-link-flags.patch +++ /dev/null @@ -1,34 +0,0 @@ -From efc8a4e717ba919c869c2da1c7de2d08bc976926 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 24 Feb 2016 18:48:07 +0000 -Subject: [PATCH] Makefile: Change order of link flags - -This helps in injectcting LDFLAGS from env to take effect -as it appears last on cmdline now - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - Makefile | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index ba2bfbb..6d13e68 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,3 +1,9 @@ --CFLAGS=-O2 -Wall -Wextra -g -Wno-sign-compare -Wno-pointer-sign --CC=gcc -+CFLAGS?=-O2 -Wall -Wextra -g -Wno-sign-compare -Wno-pointer-sign -+CC?=gcc - all: serialcheck -+serialcheck : serialcheck.o -+ $(CC) -o serialcheck serialcheck.o $(CFLAGS) $(LDFLAGS) -+ -+%.o : %.c -+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -+ --- -1.9.1 - diff --git a/meta-oe/recipes-devtools/serialcheck/serialcheck/0002-Restore-original-loopback-config.patch b/meta-oe/recipes-devtools/serialcheck/serialcheck/0002-Restore-original-loopback-config.patch deleted file mode 100644 index 1b8c95b10c..0000000000 --- a/meta-oe/recipes-devtools/serialcheck/serialcheck/0002-Restore-original-loopback-config.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a6e5813d2f8402bf3a311c8bcda02623bfb76882 Mon Sep 17 00:00:00 2001 -From: Carlos Hernandez <ceh@ti.com> -Date: Tue, 24 Feb 2015 16:00:34 -0500 -Subject: [PATCH 2/2] Restore original loopback config - -If loopback option is enabled, disable it at the end of the test. - -Signed-off-by: Carlos Hernandez <ceh@ti.com> -Upstream-status: Pending ---- - serialcheck.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/serialcheck.c b/serialcheck.c -index 4100c37..06470f7 100644 ---- a/serialcheck.c -+++ b/serialcheck.c -@@ -427,6 +427,7 @@ int main(int argc, char *argv[]) - unsigned char *data; - unsigned int open_mode; - off_t data_len; -+ unsigned int mcr; - - argp_parse(&argp, argc, argv, 0, NULL, &opts); - if (!opts.file_trans) -@@ -496,8 +497,6 @@ int main(int argc, char *argv[]) - } - - if (opts.loopback) { -- unsigned int mcr; -- - ret = ioctl(fd, TIOCMGET, &mcr); - if (ret < 0) - die("mcr get failed: %m\n"); -@@ -535,6 +534,12 @@ int main(int argc, char *argv[]) - ret = tcsetattr(fd, TCSAFLUSH, &old_term); - if (ret) - printf("tcsetattr() of old ones failed: %m\n"); -+ if (opts.loopback) { -+ mcr &= ~(TIOCM_LOOP); -+ ret = ioctl(fd, TIOCMSET, &mcr); -+ } -+ if (ret) -+ printf("disabling loopback failed: %m\n"); - - close(fd); - return status; --- -1.9.1 diff --git a/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb b/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb index cd5e0a4e5c..29abfe1af5 100644 --- a/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb +++ b/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb @@ -1,30 +1,31 @@ SUMMARY = "Application to verify operation of serial ports" -HOMEPAGE = "http://git.breakpoint.cc/cgit/bigeasy/serialcheck.git/" -LICENSE = "GPLv2" +HOMEPAGE = "https://github.com/nsekhar/serialcheck" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://git.breakpoint.cc/bigeasy/serialcheck.git \ - file://0001-Add-option-to-enable-internal-loopback.patch \ - file://0002-Restore-original-loopback-config.patch \ - file://0001-Makefile-Change-order-of-link-flags.patch \ - " +SRC_URI = " \ + git://github.com/nsekhar/serialcheck.git;branch=master;protocol=https \ +" -SRCREV = "63854a2d0c0129efab132ec328a75279e013fb84" +SRCREV = "45eb2ffa5378396e85432872833890b0a1cba872" S = "${WORKDIR}/git" -DEPENDS_append_libc-musl = " argp-standalone" -EXTRA_OEMAKE = "-e MAKEFLAGS=" +inherit autotools -CFLAGS_prepend = "-Wall -Wextra -Wno-sign-compare -Wno-pointer-sign " -LDFLAGS_append_libc-musl = " -largp" +DEPENDS:append:libc-musl = " argp-standalone" +EXTRA_OEMAKE:append:libc-musl = " LIBS='-largp'" + +PACKAGE_BEFORE_PN += "${PN}-stats" do_install() { install -d ${D}${bindir} - install ${S}/serialcheck ${D}${bindir} + install ${B}/serialcheck ${D}${bindir} + install ${B}/serialstats ${D}${bindir} install -d ${D}${docdir}/${BP} - install ${S}/Readme.txt ${D}${docdir}/${BP} + install ${S}/README ${D}${docdir}/${BP} } -CLEANBROKEN = "1" + +FILES:${PN}-stats = "${bindir}/serialstats" BBCLASSEXTEND = "nativesdk" diff --git a/meta-oe/recipes-devtools/sip/sip.inc b/meta-oe/recipes-devtools/sip/sip.inc deleted file mode 100644 index 092531b322..0000000000 --- a/meta-oe/recipes-devtools/sip/sip.inc +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "SIP is a C++/Python Wrapper Generator" -HOMEPAGE = "http://www.riverbankcomputing.co.uk/sip" -SECTION = "devel" -LICENSE = "GPLv2+" -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] = "7e854b0da395ddc8fb5da82d0321994d" -SRC_URI[sha256sum] = "184c790d58e9527fc6bdac2bbf8638f3d1b41dea922cad8eb83172b4ba70c620" - -S = "${WORKDIR}/sip-${PV}" - -BBCLASSEXTEND = "native" - -do_configure_prepend_class-target() { - echo "py_platform = linux" > sip.cfg - echo "py_inc_dir = %(sysroot)/${includedir}/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 ${STAGING_DIR_HOST} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}" -} -do_configure_prepend_class-native() { - echo "py_platform = linux" > sip.cfg - echo "py_inc_dir = ${includedir}/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=${STAGING_DIR_NATIVE} -} -do_install() { - oe_runmake install -} diff --git a/meta-oe/recipes-devtools/sip/sip3_4.19.16.bb b/meta-oe/recipes-devtools/sip/sip3_4.19.16.bb deleted file mode 100644 index 010fa30fe3..0000000000 --- a/meta-oe/recipes-devtools/sip/sip3_4.19.16.bb +++ /dev/null @@ -1,11 +0,0 @@ -require sip.inc - -DEPENDS = "python3" - -inherit python3-dir python3native - -PACKAGES += "python3-sip3" - -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_4.19.16.bb b/meta-oe/recipes-devtools/sip/sip_4.19.16.bb deleted file mode 100644 index 3da15b842b..0000000000 --- a/meta-oe/recipes-devtools/sip/sip_4.19.16.bb +++ /dev/null @@ -1,11 +0,0 @@ -require sip.inc - -DEPENDS = "python" - -inherit python-dir pythonnative - -PACKAGES += "python-sip" - -FILES_python-sip = "${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/sqlite-orm/sqlite-orm_1.5.bb b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb new file mode 100644 index 0000000000..db90bc589e --- /dev/null +++ b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb @@ -0,0 +1,24 @@ +SUMMARY = "SQLite ORM light header only library for modern C++" +HOMEPAGE = "https://github.com/fnc12/sqlite_orm" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5bf5ee8bb16d8e19359efe11bdc3f2" + +inherit cmake + +DEPENDS += "sqlite3" + +SRCREV = "e8a9e9416f421303f4b8970caab26dadf8bae98b" +SRC_URI = "git://github.com/fnc12/sqlite_orm;protocol=https;branch=master" +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += "-DSqliteOrm_BuildTests=OFF -DLIB_INSTALL_DIR=${libdir} \ + -DCMAKE_INSTALL_DIR=${libdir}/cmake \ + -DPKGCONFIG_INSTALL_DIR=${libdir}/pkgconfig" + +BBCLASSEXTEND = "native nativesdk" + +FILES:${PN}-dev += "${libdir}/cmake/${BPN}" + +# Header-only library +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb b/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb new file mode 100644 index 0000000000..880af82bba --- /dev/null +++ b/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "New set of tools for working with SquashFS images" +SECTION = "base" +LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & MIT & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING.md;md5=a709b68f1ce8a9f10aeea6401446c1f4 \ + file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \ + file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \ + file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \ + file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \ + file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \ + file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \ + file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8 \ + " + +SRCREV = "f2a3ad56e40c9711b23371238f9fa07dd24245f1" +SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +PACKAGES =+ "libsquashfs" +FILES:libsquashfs = "${libdir}/libsquashfs*${SOLIBS}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-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 new file mode 100644 index 0000000000..47865de858 --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch @@ -0,0 +1,45 @@ +From 83628b471a1a79dae50bb158fca9448b668dd3a6 Mon Sep 17 00:00:00 2001 +From: Gregory Anders <greg@gpanders.com> +Date: Wed, 21 Oct 2020 10:43:16 -0600 +Subject: [PATCH] Preserve CXXFLAGS from environment in Mongoose + +This allows CXXFLAGS set in the environment to also be used in the CMake +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/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt +index 7e134ab..91a7f70 100644 +--- a/Mongoose/CMakeLists.txt ++++ b/Mongoose/CMakeLists.txt +@@ -321,14 +321,14 @@ add_test(Unit_Test_EdgeSep ./tests/mongoose_unit_test_edgesep) + message(STATUS "CMAKE_CXX_COMPILER: " ${BoldBlue} ${CMAKE_CXX_COMPILER_ID} ${ColourReset}) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") + # using Clang +- SET(CMAKE_CXX_FLAGS "-O3 -fwrapv") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fwrapv") + # Debug flags for Clang + SET(CMAKE_CXX_FLAGS_DEBUG "--coverage -g -fwrapv") + SET(CMAKE_C_FLAGS_DEBUG "--coverage -g") + SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "--coverage -g") + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # using GCC +- SET(CMAKE_CXX_FLAGS "-O3 -fwrapv") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fwrapv") + # Debug flags for GCC + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.6") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +@@ -339,7 +339,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage") + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + # using Intel C++ +- SET(CMAKE_CXX_FLAGS "-O3 -no-prec-div -xHOST -ipo -fwrapv") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -no-prec-div -xHOST -ipo -fwrapv") + # Debug flags for Intel + SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -fwrapv") + SET(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall") 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 new file mode 100644 index 0000000000..d80c1a7362 --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch @@ -0,0 +1,24 @@ +From 31175fb408a4f5e85e39a9aabd4a29f9d9c1fe25 Mon Sep 17 00:00:00 2001 +From: Gregory Anders <greg@gpanders.com> +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/Makefile b/Makefile +index 7631955..57fd022 100644 +--- a/Makefile ++++ b/Makefile +@@ -76,7 +76,7 @@ ifeq (,$(MY_METIS_LIB)) + @mkdir -p $(INSTALL_LIB) + @mkdir -p $(INSTALL_INCLUDE) + @mkdir -p $(INSTALL_DOC) +- - $(CP) lib/libmetis.* $(INSTALL_LIB) ++ - $(CP) -d lib/libmetis.* $(INSTALL_LIB) + - $(CP) metis-5.1.0/manual/manual.pdf $(INSTALL_DOC)/METIS_manual.pdf + - $(CP) metis-5.1.0/README.txt $(INSTALL_DOC)/METIS_README.txt + # the following is needed only on the Mac, so *.dylib is hardcoded: 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 new file mode 100644 index 0000000000..fc83897a05 --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch @@ -0,0 +1,51 @@ +From 11ab355fdda93b762fcc07ac3f7c6ab1be0a5f5a Mon Sep 17 00:00:00 2001 +From: Gregory Anders <greg@gpanders.com> +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/metis-5.1.0/Makefile b/metis-5.1.0/Makefile +index 9cc03b9..c445d85 100644 +--- a/metis-5.1.0/Makefile ++++ b/metis-5.1.0/Makefile +@@ -18,8 +18,11 @@ systype = $(shell uname -s) + + BUILDDIR = build/$(systype)-$(cputype) + ++VERNUM=5.1.0 ++PKGNAME=metis-$(VERNUM) ++ + # Process configuration options. +-CONFIG_FLAGS = ++CONFIG_FLAGS = -DMETIS_VERSION=$(VERNUM) + ifeq ($(gklib_path), not-set) + gklib_path = GKlib + endif +@@ -52,9 +55,6 @@ ifneq ($(cc), not-set) + CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc) + endif + +-VERNUM=5.1.0 +-PKGNAME=metis-$(VERNUM) +- + JOBS ?= 1 + + define run-config +diff --git a/metis-5.1.0/libmetis/CMakeLists.txt b/metis-5.1.0/libmetis/CMakeLists.txt +index 120e94d..11bde87 100644 +--- a/metis-5.1.0/libmetis/CMakeLists.txt ++++ b/metis-5.1.0/libmetis/CMakeLists.txt +@@ -4,6 +4,7 @@ include_directories(.) + file(GLOB metis_sources *.c) + # Build libmetis. + add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources}) ++set_target_properties(metis PROPERTIES VERSION ${METIS_VERSION}) + if(UNIX) + target_link_libraries(metis m) + endif() diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb new file mode 100644 index 0000000000..13e6fd066c --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb @@ -0,0 +1,75 @@ +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=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 \ + " +SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" + +S = "${WORKDIR}/git" + +DEPENDS = "cmake-native lapack gmp mpfr chrpath-native" + +PROVIDES = "mongoose graphblas" +RPROVIDES:${PN} = "mongoose graphblas" + +# The values of $CC, $CXX, and $LD that Bitbake uses have spaces in them which +# causes problems when the SuiteSparse Makefiles try to pass these values on +# 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').split()[1:])} " +export CC := "${@d.getVar('CC').split()[0]}" + +CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} " +export CXX := "${@d.getVar('CXX').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} \ + -DCMAKE_INSTALL_LIBDIR=${baselib} \ +" + +do_compile () { + oe_runmake library +} + +do_install () { + oe_runmake prefix=${D}${prefix} INSTALL=${D}${prefix} install + + # Remove runtime paths from shared libraries + for file in ${D}${libdir}/*.so.*; do + if [ ! -L "$file" ]; then + chrpath -d "$file" + fi + done +} + +FILES:${PN} += " \ + ${libdir}/libmongoose.so.* \ + ${libdir}/libgraphblas.so.* \ + ${libdir}/libmetis.so.* \ + ${libdir}/libsuitesparseconfig.so.* \ + ${libdir}/libamd.so.* \ + ${libdir}/libbtf.so.* \ + ${libdir}/libcamd.so.* \ + ${libdir}/libccolamd.so.* \ + ${libdir}/libcolamd.so.* \ + ${libdir}/libcholmod.so.* \ + ${libdir}/libcxsparse.so.* \ + ${libdir}/libldl.so.* \ + ${libdir}/libklu.so.* \ + ${libdir}/libumfpack.so.* \ + ${libdir}/librbio.so.* \ + ${libdir}/libspqr.so.* \ + ${libdir}/libsliplu.so.* \ + ${bindir}/mongoose \ +" + +FILES:${PN}-staticdev += "${libdir}/libmongoose.a" +FILES:${PN}-dev += "${includedir} ${libdir}/*.so" + +EXCLUDE_FROM_WORLD = "1" 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/tclap/files/0001-tclap-add-pkg-config-file.patch b/meta-oe/recipes-devtools/tclap/files/0001-tclap-add-pkg-config-file.patch new file mode 100644 index 0000000000..58c9aec088 --- /dev/null +++ b/meta-oe/recipes-devtools/tclap/files/0001-tclap-add-pkg-config-file.patch @@ -0,0 +1,50 @@ +From 9d47d2fd45c455339759dbfe9a0d6fd24b0a0fa1 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 24 Mar 2021 15:39:36 +0800 +Subject: [PATCH] tclap: add pkg-config file + +The tclap switched from autotools to CMake in 1.4.0 and drop the +pkg-config file tclap.pc. Some projects (e.g. ima-inspect) still require +it. So add it back. + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + CMakeLists.txt | 5 +++++ + tclap.pc.in | 7 +++++++ + 2 files changed, 12 insertions(+) + create mode 100644 tclap.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2c9a26..b56eac7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,6 +25,11 @@ install(FILES "${PROJECT_BINARY_DIR}/tclap/TCLAPConfig.h" + DESTINATION include/tclap + ) + ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tclap.pc.in ++ ${CMAKE_CURRENT_BINARY_DIR}/tclap.pc @ONLY) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tclap.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ + add_subdirectory(docs) + add_subdirectory(examples) + add_subdirectory(tests) +diff --git a/tclap.pc.in b/tclap.pc.in +new file mode 100644 +index 0000000..ef51c94 +--- /dev/null ++++ b/tclap.pc.in +@@ -0,0 +1,7 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++Name: tclap ++Description: Templatized C++ Command Line Parser ++Version: @PROJECT_VERSION@ ++Cflags: -I${includedir} +-- +2.17.1 + diff --git a/meta-oe/recipes-devtools/tclap/tclap/Makefile.am-disable-docs.patch b/meta-oe/recipes-devtools/tclap/tclap/Makefile.am-disable-docs.patch deleted file mode 100644 index 358cbefdde..0000000000 --- a/meta-oe/recipes-devtools/tclap/tclap/Makefile.am-disable-docs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c209ed0e7ffca32fe3714bad9cc54bdb00c286bb Mon Sep 17 00:00:00 2001 -From: Ting Liu <b28495@freescale.com> -Date: Mon, 15 Apr 2013 16:28:37 +0800 -Subject: [PATCH] Makefile.am: disable docs - -Upstream-Status: Inappropriate [OE specific] - -docs need some generating tool (for example, doxygen) from host which may -be not available. Disable it to avoid build issue. - -Signed-off-by: Ting Liu <b28495@freescale.com> ---- - Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 0a6ebc9..6b42f41 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,7 +1,7 @@ - - ACLOCAL_AMFLAGS = -I config - --SUBDIRS = include examples docs tests msc config -+SUBDIRS = include examples tests msc config - - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = $(PACKAGE).pc --- -1.7.5 - diff --git a/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb b/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb deleted file mode 100644 index 46a9408031..0000000000 --- a/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Templatized C++ Command Line Parser" -HOMEPAGE = "http://tclap.sourceforge.net/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=0ca8b9c5c5445cfa7af7e78fd27e60ed" - -SRCREV = "75f440bcac1276c847f5351e14216f6e91def44d" -SRC_URI = "git://git.code.sf.net/p/tclap/code \ - file://Makefile.am-disable-docs.patch \ -" - -S = "${WORKDIR}/git" -inherit autotools - -ALLOW_EMPTY_${PN} = "1" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/tclap/tclap_1.4.0.bb b/meta-oe/recipes-devtools/tclap/tclap_1.4.0.bb new file mode 100644 index 0000000000..6d55c58526 --- /dev/null +++ b/meta-oe/recipes-devtools/tclap/tclap_1.4.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Templatized C++ Command Line Parser" +HOMEPAGE = "http://tclap.sourceforge.net/" +DESCRIPTION = "TCLAP is a small, flexible library that provides a simple interface \ +for defining and accessing command line arguments. It was intially inspired by the \ +user friendly CLAP libary. The difference is that this library is templatized, so \ +the argument class is type independent. Type independence avoids identical-except-for-type \ +objects, such as IntArg, FloatArg, and StringArg. While the library is not strictly \ +compliant with the GNU or POSIX standards, it is close. \ +" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=5c64b2e8cc50917b2744a90950faa7cd" + +SRCREV = "799a8b1f99818e39fee19d0601030770af1221e1" +SRC_URI = "git://git.code.sf.net/p/tclap/code;branch=1.4 \ + file://0001-tclap-add-pkg-config-file.patch \ +" + +S = "${WORKDIR}/git" +inherit cmake + +ALLOW_EMPTY:${PN} = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/tcltk/tk/configure.use.fontconfig.with.xft.patch b/meta-oe/recipes-devtools/tcltk/tk/configure.use.fontconfig.with.xft.patch deleted file mode 100644 index a0c157f5ad..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/configure.use.fontconfig.with.xft.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/configure.in.orig 2014-05-10 14:35:39.859147385 +0000 -+++ b/configure.in 2014-05-10 14:36:20.282925184 +0000 -@@ -554,8 +554,8 @@ - dnl make sure package configurator (xft-config or pkg-config - dnl says that xft is present. - found_xft=yes -- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no" -- XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no" -+ XFT_CFLAGS=`pkg-config --cflags xft fontconfig 2>/dev/null` || found_xft="no" -+ XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no" - AC_MSG_RESULT([$found_xft]) - dnl make sure that compiling against Xft header file doesn't bomb - if test "$found_xft" = "yes" ; then diff --git a/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff b/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff index 8cc07bcfac..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(+) @@ -16,31 +18,31 @@ Index: a/unix/configure =================================================================== --- a/unix/configure.orig +++ b/unix/configure -@@ -1432,6 +1432,7 @@ echo "$as_me: error: ${with_tclconfig} d +@@ -1431,6 +1431,7 @@ echo "$as_me: error: ${with_tclconfig} d `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ + `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tcl8.6 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \ Index: a/unix/tcl.m4 =================================================================== --- a/unix/tcl.m4.orig +++ b/unix/tcl.m4 -@@ -94,6 +94,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ +@@ -93,6 +93,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ + `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tcl8.6 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \ -@@ -227,6 +228,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ +@@ -226,6 +227,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ -+ `ls -d /usr/share/tcltk/tk8.6 2>/dev/null` \ ++ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tk8.6 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tk8.6 2>/dev/null` \ diff --git a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff b/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff index d1bb7105c6..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 @@ @@ -8,8 +10,8 @@ - XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" - if test "$found_xft" = "no" ; then found_xft=yes - XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no" - XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no" + XFT_CFLAGS=`pkg-config --cflags xft fontconfig 2>/dev/null` || found_xft="no" + XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no" - fi AC_MSG_RESULT([$found_xft]) dnl make sure that compiling against Xft header file doesn't bomb diff --git a/meta-oe/recipes-devtools/tcltk/tk/non-linux.diff b/meta-oe/recipes-devtools/tcltk/tk/non-linux.diff deleted file mode 100644 index 7d31f9fdca..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/non-linux.diff +++ /dev/null @@ -1,27 +0,0 @@ -Patch by Sergei Golovan (originally by Mike Markley and Chris Waters) fixes -building on non-linux Debian architectures. - ---- tk8.5-8.5.8.orig/unix/configure -+++ tk8.5-8.5.8/unix/configure -@@ -4447,6 +4447,9 @@ - if test "`uname -s`" = "AIX" ; then - tcl_cv_sys_version=AIX-`uname -v`.`uname -r` - fi -+ if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then -+ tcl_cv_sys_version=NetBSD-Debian -+ fi - fi - fi - ---- tk8.5-8.5.8.orig/unix/tcl.m4 -+++ tk8.5-8.5.8/unix/tcl.m4 -@@ -962,6 +962,9 @@ - if test "`uname -s`" = "AIX" ; then - tcl_cv_sys_version=AIX-`uname -v`.`uname -r` - fi -+ if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then -+ tcl_cv_sys_version=NetBSD-Debian -+ fi - fi - fi - ]) diff --git a/meta-oe/recipes-devtools/tcltk/tk/tklibrary.diff b/meta-oe/recipes-devtools/tcltk/tk/tklibrary.diff deleted file mode 100644 index ee38c2a1a5..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/tklibrary.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- tk8.5-8.5.8.orig/unix/configure -+++ tk8.5-8.5.8/unix/configure -@@ -11070,7 +11070,7 @@ - TCL_STUB_FLAGS="-DUSE_TCL_STUBS" - fi - --TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' -+test -z "$TK_LIBRARY" && TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' - PRIVATE_INCLUDE_DIR='$(includedir)' - HTML_DIR='$(DISTDIR)/html' - TK_PKG_DIR='tk$(VERSION)' ---- tk8.5-8.5.8.orig/unix/configure.in -+++ tk8.5-8.5.8/unix/configure.in -@@ -607,7 +607,7 @@ - TCL_STUB_FLAGS="-DUSE_TCL_STUBS" - fi - --TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' -+test -z "$TK_LIBRARY" && TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' - PRIVATE_INCLUDE_DIR='$(includedir)' - HTML_DIR='$(DISTDIR)/html' - TK_PKG_DIR='tk$(VERSION)' 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.9.bb b/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb index 459ae8253b..237c4e7389 100644 --- a/meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb +++ b/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://tcl.sourceforge.net" SECTION = "devel/tcltk" # http://www.tcl.tk/software/tcltk/license.html -LICENSE = "tcl" +LICENSE = "TCL" LIC_FILES_CHKSUM = "file://${S}/../license.terms;md5=c88f99decec11afa967ad33d314f87fe \ file://${S}/../compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ file://${S}/../doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ @@ -20,22 +20,23 @@ DEPENDS = "tcl virtual/libx11 libxt" SRC_URI = "\ ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ file://confsearch.diff;striplevel=2 \ - file://non-linux.diff;striplevel=2 \ - file://tklibrary.diff;striplevel=2 \ file://tkprivate.diff;striplevel=2 \ file://fix-xft.diff \ - file://configure.use.fontconfig.with.xft.patch \ " -SRC_URI[md5sum] = "e3cf6290999ee30651d75864eccfec63" -SRC_URI[sha256sum] = "d3f9161e8ba0f107fe8d4df1f6d3a14c30cc3512dfc12a795daa367a27660dac" +SRC_URI[md5sum] = "602a47ad9ecac7bf655ada729d140a94" +SRC_URI[sha256sum] = "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" 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 distro_features_check +inherit autotools features_check pkgconfig # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" @@ -46,7 +47,7 @@ EXTRA_OECONF = "\ --libdir=${libdir} \ " export TK_LIBRARY='${libdir}/tk${VER}' -do_install_append() { +do_install:append() { ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0 oe_libinstall -so libtk${VER} ${D}${libdir} ln -sf wish${VER} ${D}${bindir}/wish @@ -63,12 +64,12 @@ PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext" PACKAGES =+ "${PN}-lib" -FILES_${PN}-lib = "${libdir}/libtk${VER}.so*" -FILES_${PN} += "${libdir}/tk*" +FILES:${PN}-lib = "${libdir}/libtk${VER}.so*" +FILES:${PN} += "${libdir}/tk*" # isn't getting picked up by shlibs code -RDEPENDS_${PN} += "tk-lib" -RDEPENDS_${PN}_class-native = "" +RDEPENDS:${PN} += "tk-lib" +RDEPENDS:${PN}:class-native = "" BBCLASSEXTEND = "native nativesdk" 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.9.3.bb b/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb index dba607c15d..320b5a88a6 100644 --- a/meta-oe/recipes-devtools/uftrace/uftrace_0.9.3.bb +++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb @@ -1,22 +1,21 @@ -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" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "elfutils" -DEPENDS_append_libc-musl = " argp-standalone" +DEPENDS:append:libc-musl = " argp-standalone" inherit autotools -# v0.9.3 -SRCREV = "e77780e7524c0a97f25313b205837191bbe9712a" -SRC_URI = "git://github.com/namhyung/${BPN} \ - " +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" +LDFLAGS:append:libc-musl = " -largp" def set_target_arch(d): import re @@ -36,10 +35,10 @@ do_configure() { } FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/*.so" +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' -COMPATIBLE_HOST_armv5 = 'null' +COMPATIBLE_HOST:armv4 = 'null' +COMPATIBLE_HOST:armv5 = 'null' diff --git a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch new file mode 100644 index 0000000000..ec70dd6570 --- /dev/null +++ b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch @@ -0,0 +1,28 @@ +From 8fd80ead718ffc53d7182b9df6f49974113ff8fc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 May 2022 11:23:58 -0700 +Subject: [PATCH] setup.py: Disable autodection of modules + +This helps to fix build with latest setuptools + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index 932bf01..fd5a092 100755 +--- a/setup.py ++++ b/setup.py +@@ -12,6 +12,7 @@ if __name__ == "__main__": + name='unattended-upgrades', + version='0.1', + scripts=['unattended-upgrade'], ++ py_modules=[], + data_files=[ + ('../etc/logrotate.d/', + ["data/logrotate.d/unattended-upgrades"]), +-- +2.36.1 + diff --git a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch new file mode 100644 index 0000000000..d39427e9fd --- /dev/null +++ b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch @@ -0,0 +1,78 @@ +From a52d763559d1017ca73d2a2933aba1c78ad354c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal@rzerosystems.com> +Date: Thu, 27 Jan 2022 16:32:25 -0600 +Subject: [PATCH] unattended-upgrade: Remove distro_info usage to check devel + releases +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The distro-info python3 package is used to check if the release is a +devel release and choice if continue with unattended-upgrade for now +remove it because needs support into python3-distro-info [1]. + +[1] https://salsa.debian.org/debian/distro-info + +Signed-off-by: Aníbal Limón <anibal@rzerosystems.com> + +Upstream-Status: Inappropriate +--- + unattended-upgrade | 38 -------------------------------------- + 1 file changed, 38 deletions(-) + +diff --git a/unattended-upgrade b/unattended-upgrade +index 802d4d5..3b4e83e 100755 +--- a/unattended-upgrade ++++ b/unattended-upgrade +@@ -83,9 +83,6 @@ import apt + import apt_inst + import apt_pkg + +-import distro_info +- +- + # the reboot required flag file used by packages + REBOOT_REQUIRED_FILE = "/var/run/reboot-required" + KEPT_PACKAGES_FILE = "var/lib/unattended-upgrades/kept-back" +@@ -2061,41 +2058,6 @@ def run(options, # type: Options + if should_stop(): + return UnattendedUpgradesResult(False) + +- # check to see if want to auto-upgrade the devel release +- if apt_pkg.config.find("Unattended-Upgrade::DevRelease") == "auto": +- try: +- if DISTRO_ID.lower() == 'ubuntu': +- devel = (distro_info.UbuntuDistroInfo() . +- devel(result="object")) +- elif DISTRO_ID.lower() == 'debian': +- devel = (distro_info.DebianDistroInfo() . +- devel(result="object")) +- else: +- devel = (distro_info.DistroInfo(DISTRO_ID) . +- devel(result="object")) +- except Exception as e: +- logging.warning("Could not figure out development release: %s" % e) +- else: +- if ((devel.series == DISTRO_CODENAME +- and devel.release is not None +- and devel.release - date.today() > DEVEL_UNTIL_RELEASE)): +- syslog.syslog((_("Not running on this development " +- "release before %s") % +- (devel.release - DEVEL_UNTIL_RELEASE +- - datetime.timedelta(days=1)))) +- logging.warning(_("Not running on this development " +- "release before %s") % +- (devel.release - DEVEL_UNTIL_RELEASE +- - datetime.timedelta(days=1))) +- return UnattendedUpgradesResult(True) +- +- logging.debug("Running on the development release") +- elif "(development branch)" in DISTRO_DESC and not\ +- apt_pkg.config.find_b("Unattended-Upgrade::DevRelease", True): +- syslog.syslog(_("Not running on the development release.")) +- logging.info(_("Not running on the development release.")) +- return UnattendedUpgradesResult(True) +- + logging.info(_("Starting unattended upgrades script")) + + # check and get lock diff --git a/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb b/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb new file mode 100644 index 0000000000..e37dbcd02f --- /dev/null +++ b/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "This script upgrades packages automatically and unattended." +DESCRIPTION = "The purpose of unattended-upgrades is to keep the computer current with the latest security (and other) updates automatically." +HOMEPAGE = "https://wiki.debian.org/UnattendedUpgrades" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://debian/copyright;md5=62b5f2ac0ede901fb245eefbe54c181f" + +SRC_URI = "git://github.com/mvo5/unattended-upgrades.git;protocol=https;branch=master \ + file://0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch \ + file://0001-setup.py-Disable-autodection-of-modules.patch \ + " + +SRCREV = "5aff8fa2b5b60b7c11bbfb39c884477e72d11d02" + +S = "${WORKDIR}/git" + +inherit setuptools3_legacy + +DEPENDS += "apt intltool-native python3-distutils-extra-native" +RDEPENDS:${PN} += "apt lsb-release python3-apt python3-core python3-datetime python3-email python3-fcntl python3-io python3-logging python3-stringold python3-syslog" + +do_configure:prepend () { + install -Dm 0644 ${S}/data/50unattended-upgrades.Debian ${S}/data/50unattended-upgrades +} + +do_install:append () { + # fix bad installation path's + mv -v ${D}/usr/usr/share/* ${D}/usr/share/ + rm -r ${D}/usr/usr +} + +FILES:${PN} = "${bindir} ${exec_prefix}/etc ${libdir} ${datadir} ${nonarch_libdir}" 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-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 0000f05ae4..17faa3aa6e 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,11 @@ 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 \ " SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369" @@ -18,10 +23,12 @@ SRC_URI[sha256sum] = "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520 S = "${WORKDIR}/imap-${PV}" +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" @@ -37,9 +44,11 @@ do_install() { install c-client/c-client.a ${D}${libdir}/libc-client.a } -RPROVIDES_${PN} = "libc-client" -RREPLACES_${PN} = "libc-client" -RCONFLICTS_${PN} = "libc-client" +RPROVIDES:${PN} = "libc-client" +RREPLACES:${PN} = "libc-client" +RCONFLICTS:${PN} = "libc-client" + +ALLOW_EMPTY:${PN} = "1" -ALLOW_EMPTY_${PN} = "1" +PARALLEL_MAKE = "" diff --git a/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb b/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb new file mode 100644 index 0000000000..f531218aeb --- /dev/null +++ b/meta-oe/recipes-devtools/valijson/valijson_1.0.2.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 = "0b4771e273a065d437814baf426bcfcafec0f434" + +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/valijson/valijson_git.bb b/meta-oe/recipes-devtools/valijson/valijson_git.bb deleted file mode 100644 index c3254d16e7..0000000000 --- a/meta-oe/recipes-devtools/valijson/valijson_git.bb +++ /dev/null @@ -1,21 +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" -PV = "0.1+git${SRCPV}" - -SRCREV = "c2f22fddf599d04dc33fcd7ed257c698a05345d9" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE = "-DINSTALL_HEADERS=1 -DBUILD_TESTS=0" - -# 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_3.1.4.bb b/meta-oe/recipes-devtools/xerces-c/xerces-c_3.2.5.bb index 0951307c15..1643af2546 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 @@ -10,8 +10,7 @@ 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[sha256sum] = "1db4028c9b7f1f778efbf4a9462d65e13f9938f2c22f9e9994e12c49ba97e252" inherit autotools @@ -19,8 +18,8 @@ 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 +do_install:prepend () { + sed -i s:-L${STAGING_LIBDIR}::g ${B}/xerces-c.pc } PACKAGES = "libxerces-c \ @@ -30,15 +29,15 @@ PACKAGES = "libxerces-c \ ${PN}-dbg \ " -RPROVIDES_${PN}-dbg += "libxerces-c-dbg xerces-c-samples-dbg" +RPROVIDES:${PN}-dbg += "libxerces-c-dbg xerces-c-samples-dbg" -FILES_libxerces-c = "${libdir}/libxerces-c-3.1.so" -FILES_libxerces-c-dev = "${libdir}/lib*.la \ +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 \ ${includedir}/xercesc \ " -FILES_xerces-c-samples = "${bindir}/*" -FILES_libxerces-c-staticdev = "${libdir}/lib*.a" +FILES:xerces-c-samples = "${bindir}/*" +FILES:libxerces-c-staticdev = "${libdir}/lib*.a" BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.59.01.bb index 6c31b69817..5d5152b834 100644 --- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb +++ b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.59.01.bb @@ -2,20 +2,18 @@ DESCRIPTION = "XML-RPC for C/C++ is programming libraries and related tools to h write an XML-RPC server or client in C or C++." HOMEPAGE = "http://xmlrpc-c.sourceforge.net/" -LICENSE = "BSD & MIT" +LICENSE = "BSD-3-Clause & MIT" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=aefbf81ba0750f02176b6f86752ea951" -SRC_URI = "git://github.com/mirror/xmlrpc-c.git \ +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 \ " -#Release 1.51.03 -SRCREV = "343a3b98e54999d67edb644bcd395aa9784fb16e" +#Release 1.59.01 +SRCREV = "352aeaa9ae49e90e55187cbda839f2113df06278" S = "${WORKDIR}/git/stable" -DEPENDS = "libxml2" - inherit autotools-brokensep binconfig pkgconfig TARGET_CFLAGS += "-Wno-narrowing" @@ -30,19 +28,22 @@ EXTRA_OECONF += "--disable-libwww-client --disable-wininet-client" PACKAGECONFIG ??= "curl cplusplus" -PACKAGECONFIG[abyss] = "--enable-abyss-server --enable-abyss-threads --enable-abyss-openssl,--disable-abyss-server --disable-abyss-threads --disable-abyss-openssl,openssl," -PACKAGECONFIG[cplusplus] = "--enable-cplusplus,--disable-cplusplus,," -PACKAGECONFIG[curl] = "--enable-curl-client,--disable-curl-client,curl,curl" +PACKAGECONFIG[abyss] = "--enable-abyss-server --enable-abyss-threads --enable-abyss-openssl,--disable-abyss-server --disable-abyss-threads --disable-abyss-openssl,openssl" +PACKAGECONFIG[cplusplus] = "--enable-cplusplus,--disable-cplusplus" +PACKAGECONFIG[curl] = "--enable-curl-client,--disable-curl-client,curl" do_configure() { - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + gnu-configize --verbose --force ${S} autoconf oe_runconf # license is incompatible with lib/util/getoptx.* 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_1.0.12.bb b/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb index e112a5e30f..186f2c8ed0 100644 --- a/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb +++ b/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=da2e9aa80962d54e7c726f232a2bd1e8" # Use 1.0.12 tag SRCREV = "17b1790fb9c8abbb3c0f7e083864a6a014191d56" -SRC_URI = "git://github.com/lloyd/yajl;nobranch=1" +SRC_URI = "git://github.com/lloyd/yajl;nobranch=1;protocol=https" inherit cmake lib_package 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 d9a5821cbb..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" +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-Do-not-use-AC_HEADER_STDC.patch b/meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch new file mode 100644 index 0000000000..bda90edb20 --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch @@ -0,0 +1,39 @@ +From 6b1cbe8b4dcc45103d69bc7337e5eb33d1fd21f3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 3 Feb 2021 14:22:51 -0800 +Subject: [PATCH] Do not use AC_HEADER_STDC + +This macro is removed in autotools 2.70+ and it can be expected that C90 +headers are always available [1] + +Upstream-Status: Pending + +[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html#index-AC_005fHEADER_005fSTDC + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 01b61097..2823ecd7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,14 +101,8 @@ AM_WITH_DMALLOC + # + # Checks for header files. + # +-AC_HEADER_STDC + AC_CHECK_HEADERS([strings.h libgen.h unistd.h direct.h sys/stat.h]) + +-# REQUIRE standard C headers +-if test "$ac_cv_header_stdc" != yes; then +- AC_MSG_ERROR([Standard (ANSI/ISO C89) header files are required.]) +-fi +- + # + # Checks for typedefs, structures, and compiler characteristics. + # +-- +2.30.0 + 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 b20d4c05ca..216b777667 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb @@ -1,22 +1,35 @@ SUMMARY = "x86 (SSE) assembler supporting NASM and GAS-syntaxes" -LICENSE = "BSD" +LICENSE = "MIT" 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" +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" -inherit autotools gettext pythonnative +inherit autotools gettext python3native CACHED_CONFIGUREVARS = "CCLD_FOR_BUILD='${CC_FOR_BUILD}'" BBCLASSEXTEND = "native" PARALLEL_MAKE = "" + +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 +} + |