diff options
80 files changed, 1681 insertions, 1708 deletions
diff --git a/meta-ibs/meta-cp2-5422/conf/local.conf.sample b/meta-ibs/meta-cp2-5422/conf/local.conf.sample index d47b98d416..1ce5304159 100644 --- a/meta-ibs/meta-cp2-5422/conf/local.conf.sample +++ b/meta-ibs/meta-cp2-5422/conf/local.conf.sample @@ -41,6 +41,7 @@ EXTENDED_VERSION = "0" #DL_DIR ?= "/home/vlysak/var/openbmc/downloads" #DL_DIR ?= "/home/kx/prog/IBS/var/openbmc/downloads" +#DL_DIR ?= "/home/kx/var/BMC/sila/downloads" # # Where to place shared-state files diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.11/oe-npm-cache index f596207648..f596207648 100755 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.11/oe-npm-cache diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.11.bb index a61dd5018f..a61dd5018f 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.11.bb diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch index d6e439ba22..12f6cd8b96 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch @@ -3,20 +3,44 @@ From: Zuzana Svetlikova <zsvetlik@redhat.com> Date: Thu, 27 Apr 2017 14:25:42 +0200 Subject: [PATCH] Disable running gyp on shared deps +Upstream-Status: Inappropriate [embedded specific] + +Probably imported from: +https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53 +which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in: +https://github.com/alpinelinux/aports/commit/6662eb3199902e8451fb20dce82554ad96f796bb + +We also explicitly prune some dependencies from source in the bitbake recipe: + +python prune_sources() { + import shutil + + shutil.rmtree(d.getVar('S') + '/deps/openssl') + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares') + if 'brotli' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/brotli') + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv') + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib') +} +do_unpack[postfuncs] += "prune_sources" + --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile b/Makefile -index 93d63110..79caaec2 100644 --- a/Makefile +++ b/Makefile -@@ -138,7 +138,7 @@ with-code-cache test-code-cache: +@@ -169,7 +169,7 @@ with-code-cache test-code-cache: $(warning '$@' target is a noop) out/Makefile: config.gypi common.gypi node.gyp \ - deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ + deps/llhttp/llhttp.gyp \ + deps/simdutf/simdutf.gyp deps/ada/ada.gyp \ tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \ tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp - $(PYTHON) tools/gyp_node.py -f make diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch index 8db1f1dd54..0178cec777 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch @@ -3,29 +3,50 @@ From: Guillaume Burel <guillaume.burel@stormshield.eu> Date: Fri, 3 Jan 2020 11:25:54 +0100 Subject: [PATCH] Using native binaries +Upstream-Status: Inappropriate [embedded specific] + +Originally added in: +https://git.openembedded.org/meta-openembedded/commit/?id=1c8e4a679ae382f953b2e5c7a4966a4646314f3e +later extended and renamed in: +https://git.openembedded.org/meta-openembedded/commit/?id=feeb172d1a8bf010490d22b8df9448b20d9d2aed + +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> --- - node.gyp | 4 ++-- - tools/v8_gypfiles/v8.gyp | 11 ++++------- - 2 files changed, 6 insertions(+), 9 deletions(-) + node.gyp | 3 + + tools/v8_gypfiles/v8.gyp | 5 +++++ + 2 files changed, 6 insertions(+) +diff --git a/node.gyp b/node.gyp +index e8e1d9f9..e60ccc10 100644 --- a/node.gyp +++ b/node.gyp -@@ -294,6 +294,7 @@ - 'action_name': 'run_mkcodecache', - 'process_outputs_as_sources': 1, - 'inputs': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', - '<(mkcodecache_exec)', - ], - 'outputs': [ -@@ -319,6 +320,7 @@ - 'action_name': 'node_mksnapshot', - 'process_outputs_as_sources': 1, - 'inputs': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', - '<(node_mksnapshot_exec)', - ], - 'outputs': [ +@@ -320,6 +320,7 @@ + 'action_name': 'node_mksnapshot', + 'process_outputs_as_sources': 1, + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_mksnapshot_exec)', + '<(node_snapshot_main)', + ], +@@ -935,6 +935,7 @@ + 'action_name': 'node_js2c', + 'process_outputs_as_sources': 1, + 'inputs': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_js2c_exec)', + '<@(library_files)', + '<@(deps_files)', +@@ -944,6 +945,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', + ], + 'action': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(node_js2c_exec)', + '<@(_outputs)', + 'lib', + +diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp +index 42e26cd9..bc721991 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -68,6 +68,7 @@ @@ -40,11 +61,11 @@ Subject: [PATCH] Using native binaries '<@(torque_outputs_inc)', ], 'action': [ -+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', '-v8-root', '<(V8_ROOT)', -@@ -225,6 +227,7 @@ +@@ -211,6 +213,7 @@ { 'action_name': 'generate_bytecode_builtins_list_action', 'inputs': [ @@ -52,7 +73,7 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', ], 'outputs': [ -@@ -415,6 +418,7 @@ +@@ -400,6 +403,7 @@ ], }, 'inputs': [ @@ -60,7 +81,7 @@ Subject: [PATCH] Using native binaries '<(mksnapshot_exec)', ], 'outputs': [ -@@ -1548,6 +1552,7 @@ +@@ -1539,6 +1543,7 @@ { 'action_name': 'run_gen-regexp-special-case_action', 'inputs': [ @@ -68,3 +89,6 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)', ], 'outputs': [ +-- +2.34.1 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch b/meta-openembedded/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-openembedded/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-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch b/meta-openembedded/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-openembedded/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-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch index d7005ae972..5af87d866e 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch @@ -1,6 +1,6 @@ From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 20 Oct 2021 12:49:58 -0700 +Date: Mon, 3 Jul 2023 12:33:16 +0000 Subject: [PATCH] [liftoff] Correct function signatures Fixes builds on mips where clang reports an error @@ -9,14 +9,19 @@ Fixes builds on mips where clang reports an error ^~~~ Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674] -Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> --- - src/wasm/baseline/liftoff-assembler.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++--- + deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +- + deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) +diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h +index aef63c64..f2a11b01 100644 --- a/deps/v8/src/wasm/baseline/liftoff-assembler.h +++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h -@@ -613,7 +613,7 @@ class LiftoffAssembler : public TurboAss +@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler { void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); // Move {src} into {dst}. {src} and {dst} must be different. @@ -25,7 +30,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> // Parallel register move: For a list of tuples <dst, src, kind>, move the // {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore -@@ -759,8 +759,8 @@ class LiftoffAssembler : public TurboAss +@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler { inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, ValueKind); @@ -36,20 +41,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> inline void Spill(int offset, LiftoffRegister, ValueKind); inline void Spill(int offset, WasmValue); ---- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h -+++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h -@@ -658,7 +658,7 @@ void LiftoffAssembler::Store(Register ds - pinned = pinned | LiftoffRegList::ForRegs(dst_op.rm(), src); - LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); - // Save original value. -- Move(tmp, src, type.value_type()); -+ Move(tmp, src, type.value_type().kind()); - - src = tmp; - pinned.set(tmp); +diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +index 96cba24c..53e1842d 100644 --- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h -@@ -596,7 +596,7 @@ void LiftoffAssembler::Store(Register ds +@@ -592,7 +592,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, pinned.set(dst_op.rm()); LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); // Save original value. @@ -58,9 +54,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src = tmp; pinned.set(tmp); ---- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h -+++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h -@@ -580,7 +580,7 @@ void LiftoffAssembler::Store(Register ds +diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h +index 1d6ae09e..397e82b2 100644 +--- a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h ++++ b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h +@@ -286,7 +286,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, pinned.set(dst_op.rm()); LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); // Save original value. @@ -69,3 +67,5 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src = tmp; pinned.set(tmp); +-- +2.40.0 diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch deleted file mode 100644 index a0242d8e18..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e65dde8db17da5acddeef7eb9316199c4e5e0811 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 19 Apr 2022 12:40:25 -0700 -Subject: [PATCH] mips: Use 32bit cast for operand on mips32 - -Fixes -deps/v8/src/compiler/backend/mips/code-generator-mips.cc: In member function 'void v8::internal::compiler::CodeGenerator::AssembleReturn(v8::internal::compiler::InstructionOperand*)': -../deps/v8/src/compiler/backend/mips/code-generator-mips.cc:4233:48: error: call of overloaded 'Operand(int64_t)' is ambiguous - 4233 | Operand(static_cast<int64_t>(0))); - | ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - deps/v8/src/compiler/backend/mips/code-generator-mips.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -index 2b8197e..b226140 100644 ---- a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -+++ b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc -@@ -4230,7 +4230,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { - } else if (FLAG_debug_code) { - __ Assert(eq, AbortReason::kUnexpectedAdditionalPopValue, - g.ToRegister(additional_pop_count), -- Operand(static_cast<int64_t>(0))); -+ Operand(static_cast<int32_t>(0))); - } - } - // Functions with JS linkage have at least one parameter (the receiver). --- -2.36.0 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch index 4773f05109..dd9c9015e2 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch @@ -7,6 +7,8 @@ clang does not support this option Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch deleted file mode 100644 index 5cb2e97015..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 62ddf8499747fb1e366477d666c0634ad50039a9 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade <quantum.analyst@gmail.com> -Date: Tue, 19 Mar 2019 23:22:40 -0400 -Subject: [PATCH 2/2] Install both binaries and use libdir. - -This allows us to build with a shared library for other users while -still providing the normal executable. - -Taken from - https://src.fedoraproject.org/rpms/nodejs/raw/rawhide/f/0002-Install-both-binaries-and-use-libdir.patch - -Upstream-Status: Pending - -Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.py | 7 +++++++ - tools/install.py | 21 +++++++++------------ - 2 files changed, 16 insertions(+), 12 deletions(-) - -diff --git a/configure.py b/configure.py -index 6efb98c2316f089f3167e486282593245373af3f..a6d2ec939e4480dfae703f3978067537abf9f0f0 100755 ---- a/configure.py -+++ b/configure.py -@@ -721,10 +721,16 @@ parser.add_argument('--shared', - dest='shared', - default=None, - help='compile shared library for embedding node in another project. ' + - '(This mode is not officially supported for regular applications)') - -+parser.add_argument('--libdir', -+ action='store', -+ dest='libdir', -+ default='lib', -+ help='a directory to install the shared library into') -+ - parser.add_argument('--without-v8-platform', - action='store_true', - dest='without_v8_platform', - default=False, - help='do not initialize v8 platform during node.js startup. ' + -@@ -1305,10 +1311,11 @@ def configure_node(o): - o['variables']['debug_nghttp2'] = 'false' - - o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) - - o['variables']['node_shared'] = b(options.shared) -+ o['variables']['libdir'] = options.libdir - node_module_version = getmoduleversion.get_version() - - if options.dest_os == 'android': - shlib_suffix = 'so' - elif sys.platform == 'darwin': -diff --git a/tools/install.py b/tools/install.py -index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..11208f9e7166ab60da46d5ace2257c239a7e9263 100755 ---- a/tools/install.py -+++ b/tools/install.py -@@ -128,26 +128,23 @@ def subdir_files(path, dest, action): - for subdir, files_in_path in ret.items(): - action(files_in_path, subdir + '/') - - def files(action): - is_windows = sys.platform == 'win32' -- output_file = 'node' - output_prefix = 'out/Release/' -+ output_libprefix = output_prefix - -- if 'false' == variables.get('node_shared'): -- if is_windows: -- output_file += '.exe' -+ if is_windows: -+ output_bin = 'node.exe' -+ output_lib = 'node.dll' - else: -- if is_windows: -- output_file += '.dll' -- else: -- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix') -+ output_bin = 'node' -+ output_lib = 'libnode.' + variables.get('shlib_suffix') - -- if 'false' == variables.get('node_shared'): -- action([output_prefix + output_file], 'bin/' + output_file) -- else: -- action([output_prefix + output_file], 'lib/' + output_file) -+ action([output_prefix + output_bin], 'bin/' + output_bin) -+ if 'true' == variables.get('node_shared'): -+ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib) - - if 'true' == variables.get('node_use_dtrace'): - action(['out/Release/node.d'], 'lib/dtrace/node.d') - - # behave similarly for systemtap --- -2.33.0 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch deleted file mode 100644 index 4d238c03f4..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 86d1c0cc6a5dcf57e413a1cc1c29203e87cf9a14 Mon Sep 17 00:00:00 2001 -From: Daniel Bevenius <daniel.bevenius@gmail.com> -Date: Sat, 16 Oct 2021 08:50:16 +0200 -Subject: [PATCH] src: add --openssl-legacy-provider option - -This commit adds an option to Node.js named --openssl-legacy-provider -and if specified will load OpenSSL 3.0 Legacy provider. - -$ ./node --help -... ---openssl-legacy-provider enable OpenSSL 3.0 legacy provider - -Example usage: - -$ ./node --openssl-legacy-provider -p 'crypto.createHash("md4")' -Hash { - _options: undefined, - [Symbol(kHandle)]: Hash {}, - [Symbol(kState)]: { [Symbol(kFinalized)]: false } -} - -Co-authored-by: Richard Lau <rlau@redhat.com> -Signed-off-by: Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Upstream-Status: Backport [https://github.com/nodejs/node/issues/40455] ---- - doc/api/cli.md | 10 ++++++++++ - src/crypto/crypto_util.cc | 10 ++++++++++ - src/node_options.cc | 10 ++++++++++ - src/node_options.h | 7 +++++++ - .../test-process-env-allowed-flags-are-documented.js | 5 +++++ - 5 files changed, 42 insertions(+) - -diff --git a/doc/api/cli.md b/doc/api/cli.md -index 74057706bf8d..608b9cdeddf1 100644 ---- a/doc/api/cli.md -+++ b/doc/api/cli.md -@@ -687,6 +687,14 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be - used to enable FIPS-compliant crypto if Node.js is built - against FIPS-enabled OpenSSL. - -+### `--openssl-legacy-provider` -+<!-- YAML -+added: REPLACEME -+--> -+ -+Enable OpenSSL 3.0 legacy provider. For more information please see -+[providers readme][]. -+ - ### `--pending-deprecation` - - <!-- YAML -@@ -1544,6 +1552,7 @@ Node.js options that are allowed are: - * `--no-warnings` - * `--node-memory-debug` - * `--openssl-config` -+* `--openssl-legacy-provider` - * `--pending-deprecation` - * `--policy-integrity` - * `--preserve-symlinks-main` -@@ -1933,6 +1942,7 @@ $ node --max-old-space-size=1536 index.js - [emit_warning]: process.md#processemitwarningwarning-options - [jitless]: https://v8.dev/blog/jitless - [libuv threadpool documentation]: https://docs.libuv.org/en/latest/threadpool.html -+[providers readme]: https://github.com/openssl/openssl/blob/openssl-3.0.0/README-PROVIDERS.md - [remote code execution]: https://www.owasp.org/index.php/Code_Injection - [security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure - [timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones -diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index 7e0c8ba3eb60..796ea3025e41 100644 ---- a/src/crypto/crypto_util.cc -+++ b/src/crypto/crypto_util.cc -@@ -148,6 +148,16 @@ void InitCryptoOnce() { - } - #endif - -+#if OPENSSL_VERSION_MAJOR >= 3 -+ // --openssl-legacy-provider -+ if (per_process::cli_options->openssl_legacy_provider) { -+ OSSL_PROVIDER* legacy_provider = OSSL_PROVIDER_load(nullptr, "legacy"); -+ if (legacy_provider == nullptr) { -+ fprintf(stderr, "Unable to load legacy provider.\n"); -+ } -+ } -+#endif -+ - OPENSSL_init_ssl(0, settings); - OPENSSL_INIT_free(settings); - settings = nullptr; -diff --git a/src/node_options.cc b/src/node_options.cc -index 00bdc6688a4c..3363860919a9 100644 ---- a/src/node_options.cc -+++ b/src/node_options.cc -@@ -4,6 +4,9 @@ - #include "env-inl.h" - #include "node_binding.h" - #include "node_internals.h" -+#if HAVE_OPENSSL -+#include "openssl/opensslv.h" -+#endif - - #include <errno.h> - #include <sstream> -diff --git a/src/node_options.h b/src/node_options.h -index fd772478d04d..1c0e018ab16f 100644 ---- a/src/node_options.h -+++ b/src/node_options.h -@@ -11,6 +11,10 @@ - #include "node_mutex.h" - #include "util.h" - -+#if HAVE_OPENSSL -+#include "openssl/opensslv.h" -+#endif -+ - namespace node { - - class HostPort { -@@ -251,6 +255,9 @@ class PerProcessOptions : public Options { - bool enable_fips_crypto = false; - bool force_fips_crypto = false; - #endif -+#if OPENSSL_VERSION_MAJOR >= 3 -+ bool openssl_legacy_provider = false; -+#endif - - // Per-process because reports can be triggered outside a known V8 context. - bool report_on_fatalerror = false; -diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js -index 64626b71f019..8a4e35997907 100644 ---- a/test/parallel/test-process-env-allowed-flags-are-documented.js -+++ b/test/parallel/test-process-env-allowed-flags-are-documented.js -@@ -43,6 +43,10 @@ for (const line of [...nodeOptionsLines, ...v8OptionsLines]) { - } - } - -+if (!common.hasOpenSSL3) { -+ documented.delete('--openssl-legacy-provider'); -+} -+ - // Filter out options that are conditionally present. - const conditionalOpts = [ - { -@@ -50,6 +54,7 @@ const conditionalOpts = [ - filter: (opt) => { - return [ - '--openssl-config', -+ common.hasOpenSSL3 ? '--openssl-legacy-provider' : '', - '--tls-cipher-list', - '--use-bundled-ca', - '--use-openssl-ca', - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch deleted file mode 100644 index 529381842f..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch +++ /dev/null @@ -1,18 +0,0 @@ - -https://github.com/v8/v8/commit/878ccb33bd3cf0e6dc018ff8d15843f585ac07be - -did some automated cleanups but it missed big-endian code. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/deps/v8/src/runtime/runtime-utils.h -+++ b/deps/v8/src/runtime/runtime-utils.h -@@ -126,7 +126,7 @@ static inline ObjectPair MakePair(Object - #if defined(V8_TARGET_LITTLE_ENDIAN) - return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32); - #elif defined(V8_TARGET_BIG_ENDIAN) -- return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32); -+ return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32); - #else - #error Unknown endianness - #endif diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch deleted file mode 100644 index 56e93c50cf..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch +++ /dev/null @@ -1,32 +0,0 @@ -Description: mksnapshot uses too much memory on 32-bit mipsel -Author: Jérémy Lal <kapouer@melix.org> -Last-Update: 2020-06-03 -Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586 - -This ensures that we reserve 500M instead of 2G range for codegen -ensures that qemu-mips can allocate such large ranges - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/deps/v8/src/common/globals.h -+++ b/deps/v8/src/common/globals.h -@@ -224,7 +224,7 @@ constexpr size_t kMinimumCodeRangeSize = - constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux - #elif V8_TARGET_ARCH_MIPS - constexpr bool kPlatformRequiresCodeRange = false; --constexpr size_t kMaximalCodeRangeSize = 2048LL * MB; -+constexpr size_t kMaximalCodeRangeSize = 512 * MB; - constexpr size_t kMinimumCodeRangeSize = 0 * MB; - constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page. - #else ---- a/deps/v8/src/codegen/mips/constants-mips.h -+++ b/deps/v8/src/codegen/mips/constants-mips.h -@@ -140,7 +140,7 @@ const uint32_t kLeastSignificantByteInIn - namespace v8 { - namespace internal { - --constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096; -+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024; - - // ----------------------------------------------------------------------------- - // Registers and FPURegisters. diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest new file mode 100755 index 0000000000..e82f373626 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb index 62188f94a7..9a61cfcf71 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb @@ -1,13 +1,15 @@ DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6ba5b21ac7a505195ca69344d3d7a94a" +LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=78ad16dab3c1d15d4878c81770be0be7" -DEPENDS = "openssl" +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 +inherit pkgconfig python3native qemu ptest COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" @@ -19,17 +21,14 @@ COMPATIBLE_HOST:powerpc = "null" SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0002-Install-both-binaries-and-use-libdir.patch \ file://0004-v8-don-t-override-ARM-CFLAGS.patch \ - file://0005-add-openssl-legacy-provider-option.patch \ - file://big-endian.patch \ - file://mips-less-memory.patch \ file://system-c-ares.patch \ file://0001-liftoff-Correct-function-signatures.patch \ - file://0001-mips-Use-32bit-cast-for-operand-on-mips32.patch \ + file://run-ptest \ " + SRC_URI:append:class-target = " \ - file://0002-Using-native-binaries.patch \ + file://0001-Using-native-binaries.patch \ " SRC_URI:append:toolchain-clang:x86 = " \ file://libatomic.patch \ @@ -37,10 +36,12 @@ SRC_URI:append:toolchain-clang:x86 = " \ SRC_URI:append:toolchain-clang:powerpc64le = " \ file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ " -SRC_URI[sha256sum] = "e922e215cc68eb5f94d33e8a0b61e2c863b7731cc8600ab955d3822da90ff8d1" +SRC_URI[sha256sum] = "77813edbf3f7f16d2d35d3353443dee4e61d5ee84d9e3138c7538a3c0ca5209e" S = "${WORKDIR}/node-v${PV}" +CVE_PRODUCT += "node.js" + # v8 errors out if you have set CCACHE CCACHE = "" @@ -77,9 +78,9 @@ PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" # and we need to use the right flags during host compile, # too. EXTRA_OEMAKE = "\ - CC.host='${CC}' \ + CC.host='${CC} -pie -fPIE' \ CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ - CXX.host='${CXX}' \ + CXX.host='${CXX} -pie -fPIE' \ CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ LDFLAGS.host='${LDFLAGS}' \ AR.host='${AR}' \ @@ -87,22 +88,24 @@ EXTRA_OEMAKE = "\ builddir_name=./ \ " -python do_unpack() { +EXTRANATIVEPATH += "file-native" + +python prune_sources() { import shutil - bb.build.exec_func('base_do_unpack', d) - shutil.rmtree(d.getVar('S') + '/deps/openssl', True) + shutil.rmtree(d.getVar('S') + '/deps/openssl') if 'ares' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/cares', True) + shutil.rmtree(d.getVar('S') + '/deps/cares') if 'brotli' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/brotli', True) + shutil.rmtree(d.getVar('S') + '/deps/brotli') if 'libuv' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/uv', True) + shutil.rmtree(d.getVar('S') + '/deps/uv') if 'nghttp2' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True) + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') if 'zlib' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/zlib', True) + shutil.rmtree(d.getVar('S') + '/deps/zlib') } +do_unpack[postfuncs] += "prune_sources" # V8's JIT infrastructure requires binaries such as mksnapshot and # mkpeephole to be run in the host during the build. However, these @@ -115,7 +118,7 @@ python do_create_v8_qemu_wrapper () { on the host.""" qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), d.expand('${STAGING_DIR_HOST}${base_libdir}')] - qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST', True), + qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), qemu_libdirs) wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') with open(wrapper_path, 'w') as wrapper_file: @@ -135,24 +138,25 @@ 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 () { - export LD="${CXX}" GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES # $TARGET_ARCH settings don't match --dest-cpu settings - python3 configure.py --prefix=${prefix} --cross-compiling \ + python3 configure.py --verbose --prefix=${prefix} \ --shared-openssl \ - --without-dtrace \ - --without-etw \ --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ --dest-os=linux \ - --libdir=${D}${libdir} \ + --libdir=${baselib} \ + ${CROSS_FLAGS} \ ${ARCHFLAGS} \ ${PACKAGECONFIG_CONFARGS} } do_compile () { - export LD="${CXX}" + install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh oe_runmake BUILDTYPE=Release } @@ -161,22 +165,14 @@ do_install () { oe_runmake install DESTDIR=${D} } -BINARIES = " \ - bytecode_builtins_list_generator \ - ${@bb.utils.contains('PACKAGECONFIG', 'icu', 'gen-regexp-special-case', '', d)} \ - mkcodecache \ - node_mksnapshot \ - torque \ -" - -do_install:append:class-native() { - # Install the native binaries to provide it within sysroot for the target compilation - install -d ${D}${bindir} - (cd ${S}/out/Release && install ${BINARIES} ${D}${bindir}) +do_install_ptest () { + cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ + cp -r ${B}/test ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH} } PACKAGES =+ "${PN}-npm" -FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx" +FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ python3-misc python3-multiprocessing" diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.28.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb index ec9f9f4fa3..d5546ce9ba 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.28.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb @@ -13,6 +13,6 @@ API = "--enable-obsolete-api" do_install:append () { rm -rf ${D}${includedir} rm -rf ${D}${libdir}/pkgconfig + rm -rf ${D}${libdir}/libcrypt.so rm -rf ${D}${datadir} } - diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc index 39ba2636ff..ba93d91aef 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc @@ -10,19 +10,13 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=c0a30e2b1502c55a7f37e412cd6c6a4b \ inherit autotools pkgconfig SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https" -SRCREV = "50cf2b6dd4fdf04309445f2eec8de7051d953abf" -SRCBRANCH ?= "develop" +SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf" +SRCBRANCH ?= "master" SRC_URI += "file://fix_cflags_handling.patch" PROVIDES = "virtual/crypt" -FILES:${PN} = "${libdir}/libcrypt*.so.* \ - ${libdir}/libcrypt-*.so \ - ${libdir}/libowcrypt*.so.* \ - ${libdir}/libowcrypt-*.so \ -" - S = "${WORKDIR}/git" BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.28.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.36.bb index 79dba2f6dc..79dba2f6dc 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.28.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.36.bb diff --git a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.bb b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.39.3.bb index 5d759aed94..ec04c1d384 100644 --- a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.bb +++ b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.39.3.bb @@ -6,7 +6,10 @@ require util-linux.inc inherit autotools gettext pkgconfig S = "${WORKDIR}/util-linux-${PV}" + +EXTRA_AUTORECONF += "--exclude=gtkdocize" EXTRA_OECONF += "--disable-all-programs --enable-libuuid" + LICENSE = "BSD-3-Clause" do_install:append() { diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc index c9bddfb7a6..d506783f9a 100644 --- a/poky/meta/recipes-core/util-linux/util-linux.inc +++ b/poky/meta/recipes-core/util-linux/util-linux.inc @@ -6,13 +6,15 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base" -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause & BSD-4-Clause" +LICENSE = "GPL-1.0-or-later & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause & MIT" +LICENSE:${PN}-fcntl-lock = "MIT" +LICENSE:${PN}-fdisk = "GPL-1.0-or-later" LICENSE:${PN}-libblkid = "LGPL-2.1-or-later" LICENSE:${PN}-libfdisk = "LGPL-2.1-or-later" LICENSE:${PN}-libmount = "LGPL-2.1-or-later" LICENSE:${PN}-libsmartcols = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ +LIC_FILES_CHKSUM = "file://README.licensing;md5=cc80239f106687ab39ef0271ff5cf4ba \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ @@ -23,11 +25,12 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ -" + " FILESEXTRAPATHS:prepend := "${THISDIR}/util-linux:" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ + file://mit-license.patch \ file://configure-sbindir.patch \ file://runuser.pamd \ file://runuser-l.pamd \ @@ -35,6 +38,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ + file://0001-login-utils-include-libgen.h-for-basename-API.patch \ + file://fcntl-lock.c \ " -SRC_URI[sha256sum] = "6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64" +SRC_URI[sha256sum] = "7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f" diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch b/poky/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch new file mode 100644 index 0000000000..6258710e1e --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch @@ -0,0 +1,60 @@ +From d44e3ad1f6f8b5c1b3098bb7d537943a4c21d22f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 3 Dec 2023 19:59:46 -0800 +Subject: [PATCH] login-utils: include libgen.h for basename API + +musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler + +include libgen.h for using the posix declaration of the funciton. + +Fixes + +../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + 847 | shell_basename = basename(shell); + | ^ + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2615] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + login-utils/su-common.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index b674920..3297c78 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -26,6 +26,7 @@ + #include <sys/types.h> + #include <pwd.h> + #include <grp.h> ++#include <libgen.h> + #include <security/pam_appl.h> + #ifdef HAVE_SECURITY_PAM_MISC_H + # include <security/pam_misc.h> +@@ -840,17 +841,20 @@ static void run_shell( + su->simulate_login ? " login" : "", + su->fast_startup ? " fast-start" : "")); + ++ char* tmp = xstrdup(shell); + if (su->simulate_login) { + char *arg0; + char *shell_basename; + +- shell_basename = basename(shell); ++ shell_basename = basename(tmp); + arg0 = xmalloc(strlen(shell_basename) + 2); + arg0[0] = '-'; + strcpy(arg0 + 1, shell_basename); + args[0] = arg0; +- } else +- args[0] = basename(shell); ++ } else { ++ args[0] = basename(tmp); ++ } ++ free(tmp); + + if (su->fast_startup) + args[argno++] = "-f"; diff --git a/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch index f1cbdb3beb..85ad7a5575 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch @@ -1,4 +1,4 @@ -From ee3c7812e1efa6719af68b994804f0e6caceabd8 Mon Sep 17 00:00:00 2001 +From 0b05e4695a0616badef71dfa459a00ef6ff1b521 Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Mon, 14 Jun 2021 14:00:31 +0200 Subject: [PATCH] util-linux: Add ptest @@ -15,7 +15,7 @@ Upstream-Status: Inappropriate 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 5664f9f..075ef27 100644 +index 890212f..870e817 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) diff --git a/poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch index e475289f65..75adeca188 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch @@ -1,3 +1,8 @@ +From c79222a9a5e3425c55e150edc0b7ac59c573aa2f Mon Sep 17 00:00:00 2001 +From: Phil Blundell <pb@pbcl.net> +Date: Mon, 24 Sep 2012 07:24:51 +0100 +Subject: [PATCH] util-linux: Ensure that ${sbindir} is respected + util-linux: take ${sbindir} from the environment if it is set there fix the test, the [ ] syntax was getting eaten by autoconf @@ -5,11 +10,15 @@ Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Saul Wold <sgw@linux.intel.com Upstream-Status: Inappropriate [configuration] -Index: util-linux-2.31/configure.ac -=================================================================== ---- util-linux-2.31.orig/configure.ac -+++ util-linux-2.31/configure.ac -@@ -89,7 +89,10 @@ AC_SUBST([runstatedir]) +--- + configure.ac | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 36c24b4..890212f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -102,7 +102,10 @@ AC_SUBST([runstatedir]) usrbin_execdir='${exec_prefix}/bin' AC_SUBST([usrbin_execdir]) diff --git a/poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch index 417ca1d98f..815ae9c915 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch @@ -1,4 +1,7 @@ -Display testname for subtest +From fc5de1de898fd1a372a2fd2fa493dc57323a029d Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Thu, 3 Dec 2015 04:08:00 +0100 +Subject: [PATCH] Display testname for subtest Signed-off-by: Tudor Florea <tudor.florea@enea.com> Upstream-Status: Pending @@ -8,10 +11,10 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functions.sh b/tests/functions.sh -index 5246605..b24dc15 100644 +index 5a562a3..098145e 100644 --- a/tests/functions.sh +++ b/tests/functions.sh -@@ -320,7 +320,7 @@ function ts_init_subtest { +@@ -437,7 +437,7 @@ function ts_init_subtest { if [ "$TS_PARSABLE" != "yes" ]; then [ $TS_NSUBTESTS -eq 1 ] && echo @@ -20,6 +23,3 @@ index 5246605..b24dc15 100644 fi } --- -2.8.3 - diff --git a/poky/meta/recipes-core/util-linux/util-linux/fcntl-lock.c b/poky/meta/recipes-core/util-linux/util-linux/fcntl-lock.c new file mode 100644 index 0000000000..966d8c5ecb --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/fcntl-lock.c @@ -0,0 +1,332 @@ +// From https://github.com/magnumripper/fcntl-lock +// SPDX-License-Identifier: MIT +/* ----------------------------------------------------------------------- * + * + * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved + * Copyright 2015 magnum (fcntl version) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> +#include <unistd.h> +#include <getopt.h> +#include <signal.h> +#include <ctype.h> +#include <string.h> +#include <paths.h> +#include <sysexits.h> +#include <sys/types.h> +#include <sys/file.h> +#include <sys/time.h> +#include <sys/wait.h> + +#define PACKAGE_STRING "magnum" +#define _(x) (x) + +static const struct option long_options[] = { + { "shared", 0, NULL, 's' }, + { "exclusive", 0, NULL, 'x' }, + { "unlock", 0, NULL, 'u' }, + { "nonblocking", 0, NULL, 'n' }, + { "nb", 0, NULL, 'n' }, + { "timeout", 1, NULL, 'w' }, + { "wait", 1, NULL, 'w' }, + { "close", 0, NULL, 'o' }, + { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, + { 0, 0, 0, 0 } +}; + +const char *program; + +static void usage(int ex) +{ + fputs("fcntl-lock (" PACKAGE_STRING ")\n", stderr); + fprintf(stderr, + _("Usage: %1$s [-sxun][-w #] fd#\n" + " %1$s [-sxon][-w #] file [-c] command...\n" + " %1$s [-sxon][-w #] directory [-c] command...\n" + " -s --shared Get a shared lock\n" + " -x --exclusive Get an exclusive lock\n" + " -u --unlock Remove a lock\n" + " -n --nonblock Fail rather than wait\n" + " -w --timeout Wait for a limited amount of time\n" + " -o --close Close file descriptor before running command\n" + " -c --command Run a single command string through the shell\n" + " -h --help Display this text\n" + " -V --version Display version\n"), + program); + exit(ex); +} + + +static sig_atomic_t timeout_expired = 0; + +static void timeout_handler(int sig) +{ + (void)sig; + + timeout_expired = 1; +} + + +static char * strtotimeval(const char *str, struct timeval *tv) +{ + char *s; + long fs; /* Fractional seconds */ + int i; + + tv->tv_sec = strtol(str, &s, 10); + fs = 0; + + if ( *s == '.' ) { + s++; + + for ( i = 0 ; i < 6 ; i++ ) { + if ( !isdigit(*s) ) + break; + + fs *= 10; + fs += *s++ - '0'; + } + + for ( ; i < 6; i++ ) + fs *= 10; + + while ( isdigit(*s) ) + s++; + } + + tv->tv_usec = fs; + return s; +} + +int main(int argc, char *argv[]) +{ + struct itimerval timeout, old_timer; + int have_timeout = 0; + int type = F_WRLCK; + int block = F_SETLKW; + int fd = -1; + int opt, ix; + int do_close = 0; + int err; + int status; + char *eon; + char **cmd_argv = NULL, *sh_c_argv[4]; + struct flock lock; + const char *filename = NULL; + struct sigaction sa, old_sa; + + program = argv[0]; + + if ( argc < 2 ) + usage(EX_USAGE); + + memset(&timeout, 0, sizeof timeout); + + optopt = 0; + while ( (opt = getopt_long(argc, argv, "+sexnouw:hV?", long_options, &ix)) != EOF ) { + switch(opt) { + case 's': + type = F_RDLCK; + break; + case 'e': + case 'x': + type = F_WRLCK; + break; + case 'u': + type = F_UNLCK; + break; + case 'o': + do_close = 1; + break; + case 'n': + block = F_SETLK; + break; + case 'w': + have_timeout = 1; + eon = strtotimeval(optarg, &timeout.it_value); + if ( *eon ) + usage(EX_USAGE); + break; + case 'V': + printf("fcntl-lock (%s)\n", PACKAGE_STRING); + exit(0); + default: + /* optopt will be set if this was an unrecognized option, i.e. *not* 'h' or '?' */ + usage(optopt ? EX_USAGE : 0); + break; + } + } + + if ( argc > optind+1 ) { + /* Run command */ + + if ( !strcmp(argv[optind+1], "-c") || + !strcmp(argv[optind+1], "--command") ) { + + if ( argc != optind+3 ) { + fprintf(stderr, _("%s: %s requires exactly one command argument\n"), + program, argv[optind+1]); + exit(EX_USAGE); + } + + cmd_argv = sh_c_argv; + + cmd_argv[0] = getenv("SHELL"); + if ( !cmd_argv[0] || !*cmd_argv[0] ) + cmd_argv[0] = _PATH_BSHELL; + + cmd_argv[1] = "-c"; + cmd_argv[2] = argv[optind+2]; + cmd_argv[3] = 0; + } else { + cmd_argv = &argv[optind+1]; + } + + filename = argv[optind]; + fd = open(filename, O_RDWR|O_NOCTTY|O_CREAT, 0666); + /* Linux doesn't like O_CREAT on a directory, even though it should be a + no-op */ + if (fd < 0 && errno == EISDIR) + fd = open(filename, O_RDONLY|O_NOCTTY); + + if ( fd < 0 ) { + err = errno; + fprintf(stderr, _("%s: cannot open lock file %s: %s\n"), + program, argv[optind], strerror(err)); + exit((err == ENOMEM||err == EMFILE||err == ENFILE) ? EX_OSERR : + (err == EROFS||err == ENOSPC) ? EX_CANTCREAT : + EX_NOINPUT); + } + + } else if (optind < argc) { + /* Use provided file descriptor */ + + fd = (int)strtol(argv[optind], &eon, 10); + if ( *eon || !argv[optind] ) { + fprintf(stderr, _("%s: bad number: %s\n"), program, argv[optind]); + exit(EX_USAGE); + } + + } else { + /* Bad options */ + + fprintf(stderr, _("%s: requires file descriptor, file or directory\n"), + program); + exit(EX_USAGE); + } + + + if ( have_timeout ) { + if ( timeout.it_value.tv_sec == 0 && + timeout.it_value.tv_usec == 0 ) { + /* -w 0 is equivalent to -n; this has to be special-cased + because setting an itimer to zero means disabled! */ + + have_timeout = 0; + block = F_SETLK; + } else { + memset(&sa, 0, sizeof sa); + + sa.sa_handler = timeout_handler; + sa.sa_flags = SA_RESETHAND; + sigaction(SIGALRM, &sa, &old_sa); + + setitimer(ITIMER_REAL, &timeout, &old_timer); + } + } + + memset(&lock, 0, sizeof(lock)); + lock.l_type = type; + while ( fcntl(fd, block, &lock) ) { + switch( (err = errno) ) { + case EAGAIN: /* -n option set and failed to lock */ + case EACCES: /* -n option set and failed to lock */ + exit(1); + case EINTR: /* Signal received */ + if ( timeout_expired ) + exit(1); /* -w option set and failed to lock */ + continue; /* otherwise try again */ + default: /* Other errors */ + if ( filename ) + fprintf(stderr, "%s: %s: %s\n", program, filename, strerror(err)); + else + fprintf(stderr, "%s: %d: %s\n", program, fd, strerror(err)); + exit((err == ENOLCK||err == ENOMEM) ? EX_OSERR : EX_DATAERR); + } + } + + if ( have_timeout ) { + setitimer(ITIMER_REAL, &old_timer, NULL); /* Cancel itimer */ + sigaction(SIGALRM, &old_sa, NULL); /* Cancel signal handler */ + } + + status = 0; + + if ( cmd_argv ) { + pid_t w, f; + + /* Clear any inherited settings */ + signal(SIGCHLD, SIG_DFL); + f = fork(); + + if ( f < 0 ) { + err = errno; + fprintf(stderr, _("%s: fork failed: %s\n"), program, strerror(err)); + exit(EX_OSERR); + } else if ( f == 0 ) { + if ( do_close ) + close(fd); + err = errno; + execvp(cmd_argv[0], cmd_argv); + /* execvp() failed */ + fprintf(stderr, "%s: %s: %s\n", program, cmd_argv[0], strerror(err)); + _exit((err == ENOMEM) ? EX_OSERR: EX_UNAVAILABLE); + } else { + do { + w = waitpid(f, &status, 0); + if (w == -1 && errno != EINTR) + break; + } while ( w != f ); + + if (w == -1) { + err = errno; + status = EXIT_FAILURE; + fprintf(stderr, "%s: waitpid failed: %s\n", program, strerror(err)); + } else if ( WIFEXITED(status) ) + status = WEXITSTATUS(status); + else if ( WIFSIGNALED(status) ) + status = WTERMSIG(status) + 128; + else + status = EX_OSERR; /* WTF? */ + } + } + + return status; +} diff --git a/poky/meta/recipes-core/util-linux/util-linux/mit-license.patch b/poky/meta/recipes-core/util-linux/util-linux/mit-license.patch new file mode 100644 index 0000000000..afbec98f18 --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/mit-license.patch @@ -0,0 +1,45 @@ +From 5b8fab1584017d9d9be008c23b90128bba41a7b5 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Thu, 28 Mar 2024 12:16:57 +0000 +Subject: [PATCH] README.licensing/flock: Add MIT license mention + +Looking at the license text, flock.c is under the MIT license (see +https://spdx.org/licenses/MIT). + +Add an SPDX license identifier header and add to the list of licenses the +source so everything is correctly listed/identified. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2870] + +--- + README.licensing | 2 ++ + sys-utils/flock.c | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/README.licensing b/README.licensing +index 4454f8392a..535ad34813 100644 +--- a/README.licensing ++++ b/README.licensing +@@ -12,6 +12,8 @@ There is code under: + + * LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version + ++ * MIT - MIT License ++ + * BSD-2-Clause - Simplified BSD License + + * BSD-3-Clause - BSD 3-Clause "New" or "Revised" License +diff --git a/sys-utils/flock.c b/sys-utils/flock.c +index fed29d7270..7d878ff810 100644 +--- a/sys-utils/flock.c ++++ b/sys-utils/flock.c +@@ -1,4 +1,6 @@ +-/* Copyright 2003-2005 H. Peter Anvin - All Rights Reserved ++/* SPDX-License-Identifier: MIT ++ * ++ * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation diff --git a/poky/meta/recipes-core/util-linux/util-linux/ptest.patch b/poky/meta/recipes-core/util-linux/util-linux/ptest.patch index ba2bd3f6ac..6221de7182 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/ptest.patch +++ b/poky/meta/recipes-core/util-linux/util-linux/ptest.patch @@ -1,4 +1,4 @@ -From af073c13ef184ca75811df688e0a0a25827b36c3 Mon Sep 17 00:00:00 2001 +From d0a69ce80c579cbb7627a2f20e8b92e006a8d8ad Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Thu, 3 Dec 2015 04:08:00 +0100 Subject: [PATCH] Define TESTS variable @@ -11,7 +11,7 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am -index 886598d..1cf4346 100644 +index effbb02..7d2bd1e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,6 +57,7 @@ systemdsystemunit_DATA = diff --git a/poky/meta/recipes-core/util-linux/util-linux/run-ptest b/poky/meta/recipes-core/util-linux/util-linux/run-ptest index 097107cd09..7b6b1d1dc2 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/run-ptest +++ b/poky/meta/recipes-core/util-linux/util-linux/run-ptest @@ -16,7 +16,15 @@ export PATH=$bindir/bin:$PATH # losetup tests will be skipped and/or fail otherwise modprobe loop -./tests/run.sh --use-system-commands --parsable --show-diff | sed -u '{ +# required for mount/fallback test to pass +# systemd does this by default, but ptest images do not use it +# see https://man7.org/linux/man-pages/man7/mount_namespaces.7.html +# for a long description of mount namespaces in Linux +mount --make-shared / + +# lsfd/option-inet has races in the test script: +# https://github.com/util-linux/util-linux/issues/2399 +./tests/run.sh --use-system-commands --parsable --show-diff --exclude=lsfd/option-inet | sed -u '{ s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.38.bb b/poky/meta/recipes-core/util-linux/util-linux_2.39.3.bb index 8a7b47a0c6..83b3f4e05b 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.38.bb +++ b/poky/meta/recipes-core/util-linux/util-linux_2.39.3.bb @@ -1,7 +1,6 @@ require util-linux.inc -#gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest gtk-doc DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff" @@ -62,14 +61,13 @@ PACKAGESPLITFUNCS =+ "util_linux_libpackages" PACKAGES_DYNAMIC = "^${PN}-.*" -CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" UTIL_LINUX_LIBDIR = "${libdir}" UTIL_LINUX_LIBDIR:class-target = "${base_libdir}" EXTRA_OECONF = "\ --enable-libuuid --enable-libblkid \ \ --enable-fsck --enable-kill --enable-last --enable-mesg \ - --enable-mount --enable-partx --enable-raw --enable-rfkill \ + --enable-mount --enable-partx --enable-rfkill \ --enable-unshare --enable-write \ \ --disable-bfs --disable-login \ @@ -107,6 +105,7 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[pcre2] = ",,libpcre2" PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" @@ -137,7 +136,7 @@ RDEPENDS:${PN}-dev += " util-linux-libuuid-dev" RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" RDEPENDS:${PN}-bash-completion += "${PN}-lsblk" -RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod mdadm procps sed socat which xz" +RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz" RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash" RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" ALLOW_EMPTY:${PN}-swaponoff = "1" @@ -148,6 +147,11 @@ SYSTEMD_AUTO_ENABLE:${PN}-uuidd = "disable" SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" +do_compile:append () { + cp ${WORKDIR}/fcntl-lock.c ${S}/fcntl-lock.c + ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock +} + do_install () { # with ccache the timestamps on compiled files may # end up earlier than on their inputs, this allows @@ -183,6 +187,8 @@ do_install () { echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall rm -f ${D}${bindir}/chkdupexe + + install -m 0755 ${B}/fcntl-lock ${D}${bindir} } do_install:append:class-target () { @@ -233,6 +239,8 @@ ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" +ALTERNATIVE_LINK_NAME[ipcrm] = "${bindir}/ipcrm" +ALTERNATIVE_LINK_NAME[ipcs] = "${bindir}/ipcs" ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" ALTERNATIVE:${PN}-last = "last lastb" ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" @@ -254,6 +262,7 @@ ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" +ALTERNATIVE_LINK_NAME[scriptreplay] = "${bindir}/scriptreplay" ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" @@ -318,4 +327,19 @@ do_install_ptest() { if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fi + # remove raid tests, known failures and avoid dependency on mdadm therefore + # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d + rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid0-whole + rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-part + rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-whole + rm -rf ${D}${PTEST_PATH}/tests/ts/fdisk/align-512-4K-md +} + +# Delete tests not working on musl +do_install_ptest:append:libc-musl() { + for t in tests/ts/col/multibyte \ + tests/ts/lib/timeutils \ + tests/ts/dmesg/limit; do + rm -rf ${D}${PTEST_PATH}/$t + done } diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch index 8c8f3b717c..4e9153ebf1 100644 --- a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch +++ b/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch @@ -1,4 +1,4 @@ -From 24a3e0c48f9ebe473b5f1078663e275c27d0537f Mon Sep 17 00:00:00 2001 +From 3eb33dce6e3c93e1b3efcc9649f871100adada30 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Fri, 2 Jul 2021 09:08:21 +0000 Subject: [PATCH] Makefile: check the file if patched or not @@ -9,23 +9,21 @@ one time. Upstream-Status: Inappropriate (OE-specific) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index f4a26f5..7bc748e 100644 +index c6d6042..d137976 100644 --- a/Makefile +++ b/Makefile -@@ -61,7 +61,7 @@ miniperlmain$O: $(CROSSPATCHED) +@@ -67,7 +67,7 @@ miniperlmain$O: $(CROSSPATCHED) # Original versions are not saved anymore; patch generally takes care of this, # and if that fails, reaching for the source tarball is the safest option. $(CROSSPATCHED): %.applied: %.patch -- patch -p1 -i $< && touch $@ -+ test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist" +- $(cpatch) -p1 -i $< && touch $@ ++ test ! -f $@ && ($(cpatch) -p1 -i $< && touch $@) || echo "$@ exist" # ---[ common ]----------------------------------------------------------------- --- -2.29.2 - diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch deleted file mode 100644 index 80388fa9b0..0000000000 --- a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 7b8d819e012c24df228a313beb86e1942611c904 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex@linutronix.de> -Date: Sat, 4 Jun 2022 13:00:12 +0200 -Subject: [PATCH] Makefile: correctly list modules when cleaning them - -Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/133] -Signed-off-by: Alexander Kanavin <alex@linutronix.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 6b35fb0..9ef9324 100644 ---- a/Makefile -+++ b/Makefile -@@ -462,7 +462,7 @@ clean-subdirs: - - # assuming modules w/o Makefiles were never built and need no cleaning - clean-modules: config.h -- @for i in $(modules disabled); do \ -+ @for i in $(modules) $(disabled); do \ - test -f $$i/Makefile && \ - touch $$i/Makefile && \ - $(MAKE) -C $$i clean \ diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch deleted file mode 100644 index cbb935c71b..0000000000 --- a/poky/meta/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ade4a70308d3b9d79cc3db841c0f60385780fe1a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex@linutronix.de> -Date: Sat, 4 Jun 2022 13:45:20 +0200 -Subject: [PATCH] Makefile: do not clean config.h/xconfig.h - -These are generated by ./configure and not by make. - -Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/134] -Signed-off-by: Alexander Kanavin <alex@linutronix.de> ---- - Makefile | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 9ef9324..3de2c2e 100644 ---- a/Makefile -+++ b/Makefile -@@ -473,7 +473,6 @@ clean-generated-files: - -rm -f uudmap.h opmini.c generate_uudmap$X bitcount.h $(CONFIGPM) - -rm -f git_version.h lib/re.pm lib/Config_git.pl - -rm -f perlmini.c perlmain.c -- -rm -f config.h xconfig.h - -rm -f pod/perlmodlib.pod - -rm -f ext.libs static.list - -rm -f $(patsubst %,%/ppport.h,$(mkppport_lst)) --- -2.30.2 - diff --git a/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.bb b/poky/meta/recipes-devtools/perl-cross/perlcross_1.5.2.bb index 2704976e17..5686153968 100644 --- a/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.bb +++ b/poky/meta/recipes-devtools/perl-cross/perlcross_1.5.2.bb @@ -10,17 +10,15 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/README.md;md5=252fcce2026b765fee1ad74d2fb0 inherit allarch -SRC_URI = "https://github.com/arsv/perl-cross/releases/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-cross \ +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-cross \ file://README.md \ file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \ file://determinism.patch \ file://0001-Makefile-check-the-file-if-patched-or-not.patch \ - file://0001-Makefile-correctly-list-modules-when-cleaning-them.patch \ - file://0001-Makefile-do-not-clean-config.h-xconfig.h.patch \ " -UPSTREAM_CHECK_URI = "https://github.com/arsv/perl-cross/releases/" +GITHUB_BASE_URI = "https://github.com/arsv/perl-cross/releases/" -SRC_URI[perl-cross.sha256sum] = "be9d9f9f7148edff7a2f9695ba3cb7e3975eff6b25a9a81dd311725fd757aa91" +SRC_URI[perl-cross.sha256sum] = "584dc54c48dca25e032b676a15bef377c1fed9de318b4fc140292a5dbf326e90" S = "${WORKDIR}/perl-cross-${PV}" diff --git a/poky/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch b/poky/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch deleted file mode 100644 index c5bbe7888e..0000000000 --- a/poky/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch +++ /dev/null @@ -1,24 +0,0 @@ -From a033c9ece12b6eead48eed63f106ccdec6159b0c Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 20 Dec 2019 16:26:55 +0100 -Subject: [PATCH] CheckLib.pm: do not attempt to run a cross executable - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - inc/Devel/CheckLib.pm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/inc/Devel/CheckLib.pm b/inc/Devel/CheckLib.pm -index 36a451a..b04acc1 100644 ---- a/inc/Devel/CheckLib.pm -+++ b/inc/Devel/CheckLib.pm -@@ -330,7 +330,7 @@ sub assert_lib { - push @missing, $lib if $rv != 0 || !-x $exefile; - my $absexefile = File::Spec->rel2abs($exefile); - $absexefile = '"' . $absexefile . '"' if $absexefile =~ m/\s/; -- push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0; -+ push @wrongresult, $lib if $rv == 0 && -x $exefile && 0 != 0; - unlink $ofile if -e $ofile; - _cleanup_exe($exefile); - } diff --git a/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch b/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch deleted file mode 100644 index 1d98e1389b..0000000000 --- a/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch +++ /dev/null @@ -1,143 +0,0 @@ -From ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 2 Jun 2022 13:01:37 +0800 -Subject: [PATCH] proto.h: Fix build with gcc-12 - -Fixes: - In function 'dynprep', - inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20, - inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5: - pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining - 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b) - -Upstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - proto.h | 42 ++++++++++++++---------------------------- - 1 file changed, 14 insertions(+), 28 deletions(-) - -diff --git a/proto.h b/proto.h -index faca6d1..3a76c04 100644 ---- a/proto.h -+++ b/proto.h -@@ -5606,50 +5606,43 @@ STATIC SSize_t S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c - #endif - #if defined(PERL_IN_PP_SORT_C) - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_AMAGIC_CMP \ - assert(str1); assert(str2) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC \ - assert(str1); assert(str2) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_AMAGIC_NCMP \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_CMP_DESC \ - assert(str1); assert(str2) - #endif -@@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_SV_I_NCMP \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_SV_NCMP \ - assert(a); assert(b) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b); - #define PERL_ARGS_ASSERT_SV_NCMP_DESC \ - assert(a); assert(b) - #endif - - # if defined(USE_LOCALE_COLLATE) - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE \ - assert(str1); assert(str2) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC \ - assert(str1); assert(str2) - #endif - - #ifndef PERL_NO_INLINE_FUNCTIONS --PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2) -- __attribute__always_inline__; -+PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2); - #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC \ - assert(str1); assert(str2) - #endif --- -2.25.1 - diff --git a/poky/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch b/poky/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch new file mode 100644 index 0000000000..86fd42cd3d --- /dev/null +++ b/poky/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch @@ -0,0 +1,77 @@ +From 75d974a58c461b3b5d35280e497810e46abae4ca Mon Sep 17 00:00:00 2001 +From: William Lyu <William.Lyu@windriver.com> +Date: Wed, 4 Oct 2023 08:58:41 -0400 +Subject: [PATCH] Fix intermittent failure of test t/op/sigsystem.t + +[Perl issue #21546] -- https://github.com/Perl/perl5/issues/21546 + +This fix addresses the intermittent failure of the test +t/op/sigsystem.t by improving its robustness. Before the fix, this +test waits a hard-coded amount of time in the parent process for the +child process to exit, and the child process may not be able to exit +soon enough. With this fix, the parent process in this test polls for +whether the SIGCHLD handler reaped the child process for at most 25 +seconds. + +Upstream-Status: Backport [commit ID: 75d974a] + +Signed-off-by: William Lyu <William.Lyu@windriver.com> +Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> +Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com> + +Committer: William Lyu is now a Perl author. +--- + AUTHORS | 1 + + t/op/sigsystem.t | 17 ++++++++++++++--- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 21948bfdc7..527dd992fd 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -1443,6 +1443,7 @@ Wayne Scott <wscott@ichips.intel.com> + Wayne Thompson <Wayne.Thompson@Ebay.sun.com> + Wilfredo Sánchez <wsanchez@mit.edu> + William J. Middleton <William.Middleton@oslo.mobil.telenor.no> ++William Lyu <William.Lyu@windriver.com> + William Mann <wmann@avici.com> + William Middleton <wmiddlet@adobe.com> + William R Ward <hermit@BayView.COM> +diff --git a/t/op/sigsystem.t b/t/op/sigsystem.t +index 25da854902..831feefb0f 100644 +--- a/t/op/sigsystem.t ++++ b/t/op/sigsystem.t +@@ -37,7 +37,15 @@ SKIP: { + test_system('with reaper'); + + note("Waiting briefly for SIGCHLD..."); +- Time::HiRes::sleep(0.500); ++ ++ # Wait at most 50 * 0.500 = 25.0 seconds for the child process to be ++ # reaped. If the child process exits and gets reaped early, this polling ++ # loop will exit early. ++ ++ for (1..50) { ++ last if @pids; ++ Time::HiRes::sleep(0.500); ++ } + + ok(@pids == 1, 'Reaped only one process'); + ok($pids[0] == $pid, "Reaped the right process.") or diag(Dumper(\@pids)); +@@ -50,8 +58,11 @@ sub test_system { + my $got_zeroes = 0; + + # This test is looking for a race between system()'s waitpid() and a +- # signal handler. Looping a few times increases the chances of +- # catching the error. ++ # signal handler. The system() call is expected to not interfere with the ++ # SIGCHLD signal handler. In particular, the wait() called within system() ++ # is expected to reap the child process forked by system() before the ++ # SIGCHLD signal handler is called. ++ # Looping a few times increases the chances of catching the error. + + for (1..$expected_zeroes) { + $got_zeroes++ unless system(TRUE); +-- +2.25.1 + diff --git a/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch index f80de88974..0be1d5a93c 100644 --- a/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch +++ b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch @@ -1,4 +1,4 @@ -From 055d4c31f41611b7d7fb6b0e38b3818a053de38d Mon Sep 17 00:00:00 2001 +From c25d460a2f00e9af25087d40447fe1a81c89710c Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Sun, 27 May 2007 21:04:11 +0000 Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE) @@ -20,38 +20,38 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configpm b/configpm -index 94a4778..99b20c9 100755 +index 07219d8..01a23fa 100755 --- a/configpm +++ b/configpm -@@ -687,7 +687,7 @@ sub FETCH { - my($self, $key) = @_; - - # check for cached value (which may be undef so we use exists not defined) -- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); -+ return $self->fetch_string($key); - } - +@@ -718,7 +718,7 @@ $config_txt .= uncomment <<'ENDOFEND'; + # my($self, $key) = @_; + # + # # check for cached value (which may be undef so we use exists not defined) +-# return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); ++# return $self->fetch_string($key); + # } + # ENDOFEND -@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config; - sub DESTROY { } - - sub AUTOLOAD { -- require 'Config_heavy.pl'; -+ my $cfgfile = 'Config_heavy.pl'; -+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes") -+ { -+ $cfgfile = 'Config_heavy-target.pl'; -+ } -+ if (defined $ENV{PERL_ARCHLIB}) -+ { -+ push @INC, $ENV{PERL_ARCHLIB}; -+ require $cfgfile; -+ pop @INC; -+ } -+ else -+ { -+ require $cfgfile; -+ } - goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; - die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; - } +@@ -876,7 +876,21 @@ $config_txt .= sprintf uncomment <<'ENDOFTIE', $fast_config; + # sub DESTROY { } + # + # sub AUTOLOAD { +-# require 'Config_heavy.pl'; ++# my $cfgfile = 'Config_heavy.pl'; ++# if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes") ++# { ++# $cfgfile = 'Config_heavy-target.pl'; ++# } ++# if (defined $ENV{PERL_ARCHLIB}) ++# { ++# push @INC, $ENV{PERL_ARCHLIB}; ++# require $cfgfile; ++# pop @INC; ++# } ++# else ++# { ++# require $cfgfile; ++# } + # goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; + # die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; + # } diff --git a/poky/meta/recipes-devtools/perl/files/run-ptest b/poky/meta/recipes-devtools/perl/files/run-ptest index dad4d42916..0547f818b2 100644 --- a/poky/meta/recipes-devtools/perl/files/run-ptest +++ b/poky/meta/recipes-devtools/perl/files/run-ptest @@ -1,2 +1,2 @@ #!/bin/sh -cd t && PERL_BUILD_PACKAGING=1 ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|' +{ cd t && PERL_BUILD_PACKAGING=1 ./TEST || echo "FAIL: perl" ; } | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|' diff --git a/poky/meta/recipes-devtools/perl/liberror-perl_0.17029.bb b/poky/meta/recipes-devtools/perl/liberror-perl_0.17029.bb deleted file mode 100644 index 67e5811f3c..0000000000 --- a/poky/meta/recipes-devtools/perl/liberror-perl_0.17029.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Error - Error/exception handling in an OO-ish way" -DESCRIPTION = "The Error package provides two interfaces. Firstly \ -Error provides a procedural interface to exception handling. \ -Secondly Error is a base class for errors/exceptions that can \ -either be thrown, for subsequent catch, or can simply be recorded." -HOMEPAGE = "https://github.com/shlomif/perl-error.pm" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100" - -# remove at next version upgrade or when output changes -PR = "r1" -HASHEQUIV_HASH_VERSION .= ".1" - -DEPENDS += "perl" - -RDEPENDS:${PN} += " \ - perl-module-carp \ - perl-module-exporter \ - perl-module-scalar-util \ - perl-module-overload \ - perl-module-strict \ - perl-module-vars \ - perl-module-warnings \ -" - -RDEPENDS:${PN}-ptest += " \ - perl-module-base \ - perl-module-file-spec \ - perl-module-io-handle \ - perl-module-ipc-open3 \ - perl-module-lib \ - perl-module-test-more \ -" - -SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz" - -SRC_URI[md5sum] = "6732b1c6207e4a9a3e2987c88368039a" -SRC_URI[sha256sum] = "1a23f7913032aed6d4b68321373a3899ca66590f4727391a091ec19c95bf7adc" - -S = "${WORKDIR}/Error-${PV}" - -inherit cpan ptest-perl - -do_install:prepend() { - # test requires "-T" (taint) command line option - rm -rf ${B}/t/pod-coverage.t -} - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb b/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4234.bb index 881d5e672e..b57618724d 100644 --- a/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb +++ b/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4234.bb @@ -11,13 +11,12 @@ SECTION = "libs" HOMEPAGE = "https://metacpan.org/release/Module-Build" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://README;beginline=949;endline=954;md5=624c06db56a2af4d70cf9edc29fcae1b" +LIC_FILES_CHKSUM = "file://README;beginline=881;endline=886;md5=3027f56c664545e54678c26b7f1ac19c" SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \ file://run-ptest \ " -SRC_URI[md5sum] = "066b193e461d7dfe1eca17a139353001" -SRC_URI[sha256sum] = "7e0f4c692c1740c1ac84ea14d7ea3d8bc798b2fb26c09877229e04f430b2b717" +SRC_URI[sha256sum] = "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" S = "${WORKDIR}/Module-Build-${PV}" @@ -35,6 +34,12 @@ do_patch[postfuncs] += "do_patch_module_build" EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0" +do_install:prepend () { + # We do not have a recipe for libpod-parser-perl which is for + # documentation (and is deprecated in favor of Pod::Simple) + rm -rf ${B}/t/pod_parser.t +} + do_install:append () { rm -rf ${D}${docdir}/perl/html sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data @@ -92,12 +97,21 @@ RDEPENDS:${PN}-ptest += " \ packagegroup-core-buildessential \ perl-dev \ perl-module-blib \ + perl-module-encode-encoding \ + perl-module-extutils-cbuilder-base \ perl-module-extutils-command-mm \ + perl-module-extutils-mm-unix \ perl-module-file-temp \ perl-module-lib \ + perl-module-parse-cpan-meta \ perl-module-perlio \ perl-module-perlio-encoding \ + perl-module-pod-simple-transcodesmart \ perl-module-pod-text \ + perl-module-tap-base \ + perl-module-tap-formatter-base \ + perl-module-tap-formatter-file \ + perl-module-tap-formatter-session \ perl-module-tap-harness-env \ perl-module-tap-parser \ perl-module-tap-parser-scheduler \ diff --git a/poky/meta/recipes-devtools/perl/libtest-fatal-perl_0.017.bb b/poky/meta/recipes-devtools/perl/libtest-fatal-perl_0.017.bb new file mode 100644 index 0000000000..1c3a7e5136 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/libtest-fatal-perl_0.017.bb @@ -0,0 +1,36 @@ +SUMMARY = "Incredibly simple helpers for testing code with exceptions" +DESCRIPTION = "Test::Fatal is an alternative to the popular Test::Exception.\ +It does much less, but should allow greater flexibility in testing \ +exception-throwing code with about the same amount of typing." +HOMEPAGE = "https://github.com/rjbs/Test-Fatal" +BUGTRACKER = "https://github.com/rjbs/Test-Fatal/issues" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b5c851290cab1dda12fcfb0e9ec43639" + +SRC_URI = "${CPAN_MIRROR}/authors/id/R/RJ/RJBS/Test-Fatal-${PV}.tar.gz" + +SRC_URI[sha256sum] = "37dfffdafb84b762efe96b02fb2aa41f37026c73e6b83590db76229697f3c4a6" + +S = "${WORKDIR}/Test-Fatal-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + libtry-tiny-perl \ + perl-module-carp \ + perl-module-exporter \ + perl-module-test-builder \ +" + +RDEPENDS:${PN}-ptest += "\ + perl-module-extutils-makemaker \ + perl-module-extutils-mm-unix \ + perl-module-file-spec \ + perl-module-overload \ + perl-module-test-builder-tester \ + perl-module-test-more \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002009.bb b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002010.bb index 43a9a6b7d3..79a06170e0 100644 --- a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002009.bb +++ b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002010.bb @@ -17,8 +17,7 @@ DEPENDS += "perl" SRC_URI = "https://cpan.metacpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "5643cd323afb77d20363acbaf9b12bcc" -SRC_URI[sha256sum] = "571c21193ad16195df58b06b268798796a391b398c443271721d2cc0fb7c4ac3" +SRC_URI[sha256sum] = "923ffdc78fcba96609753e4bae26b0ba0186893de4a63cd5236e012c7c90e208" S = "${WORKDIR}/${CPAN_NAME}-${PV}" diff --git a/poky/meta/recipes-devtools/perl/libtest-warnings-perl_0.033.bb b/poky/meta/recipes-devtools/perl/libtest-warnings-perl_0.033.bb new file mode 100644 index 0000000000..17b4cc3c9e --- /dev/null +++ b/poky/meta/recipes-devtools/perl/libtest-warnings-perl_0.033.bb @@ -0,0 +1,36 @@ +SUMMARY = "Test::Warnings - Test for warnings and the lack of them" +DESCRIPTION = "If you've ever tried to use Test::NoWarnings to confirm there are no \ +warnings generated by your tests, combined with the convenience of \ +\\"done_testing\\" to not have to declare a test count, you'll have discovered \ +that these two features do not play well together, as the test count will \ +be calculated *before* the warnings test is run, resulting in a TAP error. \ +(See "examples/test_nowarnings.pl" in this distribution for a \ +demonstration.)" +HOMEPAGE = "https://github.com/karenetheridge/Test-Warnings" +BUGTRACKER = "https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Warnings" +SECTION = "libs" +LICENSE = "Artistic-1.0-Perl | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://LICENCE;md5=f98106ac3cc05d9cbebcdb8fbf7b7815" + +SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETHER/Test-Warnings-${PV}.tar.gz" + +SRC_URI[sha256sum] = "b9c375719f2c61c5f97aa5ee6cf4c901a972347c415969379b0b51f67c48bbcb" + +S = "${WORKDIR}/Test-Warnings-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-test-builder \ +" + +# Many hidden dependencies and mysterious failures occur without full perl-modules +RDEPENDS:${PN}-ptest += "perl-modules" + +do_install_ptest_perl:append () { + cp -r ${B}/t/lib ${D}${PTEST_PATH}/t/ + chown -R root:root ${D}${PTEST_PATH}/t/lib +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/perl/libtry-tiny-perl_0.31.bb b/poky/meta/recipes-devtools/perl/libtry-tiny-perl_0.31.bb new file mode 100644 index 0000000000..a3728d8435 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/libtry-tiny-perl_0.31.bb @@ -0,0 +1,36 @@ +SUMMARY = "Try::Tiny - Minimal try/catch with proper preservation of $@" +DESCRIPTION = "This module provides bare bones try/catch/finally statements \ +that are designed to minimize common mistakes with eval blocks, and NOTHING \ +else." +HOMEPAGE = "https://github.com/p5sagit/Try-Tiny" +BUGTRACKER = "https://rt.cpan.org/Public/Dist/Display.html?Name=Try-Tiny" +SECTION = "libs" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENCE;md5=5dc332c2d4aade55f5db244681000091" + +SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETHER/Try-Tiny-${PV}.tar.gz" + +SRC_URI[sha256sum] = "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + +S = "${WORKDIR}/Try-Tiny-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-carp \ + perl-module-constant \ + perl-module-exporter \ +" +RRECOMMENDS:${PN} += "\ + perl-module-sub-util \ +" +RDEPENDS:${PN}-ptest += "\ + perl-module-extutils-makemaker \ + perl-module-extutils-mm-unix \ + perl-module-file-spec \ + perl-module-if \ + perl-module-test-more \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/perl/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch b/poky/meta/recipes-devtools/perl/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch new file mode 100644 index 0000000000..ed1f25125f --- /dev/null +++ b/poky/meta/recipes-devtools/perl/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch @@ -0,0 +1,110 @@ +From 5a4271456104bdf027644c81c3a208cde5cf522e Mon Sep 17 00:00:00 2001 +From: Tim Orling <tim.orling@konsulko.com> +Date: Thu, 17 Nov 2022 16:33:20 -0800 +Subject: [PATCH] Skip TODO test cases that fail + +TODO cases report as "not ok" with ptest-runner + +Upstream-Status: Inappropriate [ptest-runner specific] + +Signed-off-by: Tim Orling <tim.orling@konsulko.com> + +--- + t/escape-char.t | 20 ++++++++++---------- + t/iri.t | 18 +++++++++--------- + t/mailto.t | 12 ++++++------ + 3 files changed, 25 insertions(+), 25 deletions(-) + +diff --git a/t/escape-char.t b/t/escape-char.t +index c6ce79c..5e62ad5 100644 +--- a/t/escape-char.t ++++ b/t/escape-char.t +@@ -6,16 +6,16 @@ use warnings; + use Test::More; + use URI (); + +-TODO: { +- my $str = "http://foo/\xE9"; +- utf8::upgrade($str); +- my $uri = URI->new($str); +- +- local $TODO = 'URI::Escape::escape_char misunderstands utf8'; +- +- # http://foo/%C3%A9 +- is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string'); +-} ++#TODO: { ++# my $str = "http://foo/\xE9"; ++# utf8::upgrade($str); ++# my $uri = URI->new($str); ++# ++# local $TODO = 'URI::Escape::escape_char misunderstands utf8'; ++# ++# # http://foo/%C3%A9 ++# is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string'); ++#} + + { + my $str = "http://foo/\xE9"; +diff --git a/t/iri.t b/t/iri.t +index cf983d6..884b36e 100644 +--- a/t/iri.t ++++ b/t/iri.t +@@ -6,7 +6,7 @@ use Test::More; + use Config qw( %Config ); + + if (defined $Config{useperlio}) { +- plan tests=>30; ++ plan tests=>28; + } else { + plan skip_all=>"this perl doesn't support PerlIO layers"; + } +@@ -67,17 +67,17 @@ is $u->as_iri, "http://➡.ws/"; + # draft-duerst-iri-bis.txt examples (section 3.7.1): + is(URI->new("http://www.example.org/D%C3%BCrst")->as_iri, "http://www.example.org/D\xFCrst"); + is(URI->new("http://www.example.org/D%FCrst")->as_iri, "http://www.example.org/D%FCrst"); +-TODO: { +- local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped"; +-is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae"); +-} ++#TODO: { ++# local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped"; ++#is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae"); ++#} + + # try some URLs that can't be IDNA encoded (fallback to encoded UTF8 bytes) + $u = URI->new("http://" . ("ü" x 128)); + is $u, "http://" . ("%C3%BC" x 128); + is $u->host, ("\xC3\xBC" x 128); +-TODO: { +- local $TODO = "should ihost decode UTF8 bytes?"; +- is $u->ihost, ("ü" x 128); +-} ++#TODO: { ++# local $TODO = "should ihost decode UTF8 bytes?"; ++# is $u->ihost, ("ü" x 128); ++#} + is $u->as_iri, "http://" . ("ü" x 128); +diff --git a/t/mailto.t b/t/mailto.t +index 79e9a13..c68cfb2 100644 +--- a/t/mailto.t ++++ b/t/mailto.t +@@ -48,12 +48,12 @@ $u = URI->new('mailto:user+detail@example.com'); + is $u->to, 'user+detail@example.com', 'subaddress with `+` parsed correctly'; + is $u, 'mailto:user+detail@example.com', '... and stringification works'; + +-TODO: { +- local $TODO = "We can't handle quoted local parts without properly parsing the email addresses"; +- $u = URI->new('mailto:"foo bar+baz"@example.com'); +- is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly'; +- is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works'; +-} ++#TODO: { ++# local $TODO = "We can't handle quoted local parts without properly parsing the email addresses"; ++# $u = URI->new('mailto:"foo bar+baz"@example.com'); ++# is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly'; ++# is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works'; ++#} + + # RFC 5321 (4.1.3) - Address Literals + diff --git a/poky/meta/recipes-devtools/perl/liburi-perl_5.08.bb b/poky/meta/recipes-devtools/perl/liburi-perl_5.28.bb index 5428c9ddf9..1fc0efd3e5 100644 --- a/poky/meta/recipes-devtools/perl/liburi-perl_5.08.bb +++ b/poky/meta/recipes-devtools/perl/liburi-perl_5.28.bb @@ -2,19 +2,17 @@ SUMMARY = "Perl module to manipulate and access URI strings" DESCRIPTION = "This package contains the URI.pm module with friends. \ The module implements the URI class. URI objects can be used to access \ and manipulate the various components that make up these strings." - -HOMEPAGE = "http://search.cpan.org/dist/URI/" +HOMEPAGE = "https://metacpan.org/dist/URI" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f" - -DEPENDS += "perl" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9944b87af51186f848ae558344aded9f" -SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz" +SRC_URI = "${CPAN_MIRROR}/authors/id/O/OA/OALDERS/URI-${PV}.tar.gz \ + file://0001-Skip-TODO-test-cases-that-fail.patch \ + " -SRC_URI[md5sum] = "cdbbf8f8ccdec5c162c8505077a35c2c" -SRC_URI[sha256sum] = "7e2c6fe3b1d5947da334fa558a96e748aaa619213b85bcdce5b5347d4d26c46e" +SRC_URI[sha256sum] = "e7985da359b15efd00917fa720292b711c396f2f9f9a7349e4e7dec74aa79765" S = "${WORKDIR}/URI-${PV}" @@ -33,18 +31,26 @@ do_install:prepend() { rm -rf ${B}/t/file.t } -RDEPENDS:${PN} += "perl-module-integer perl-module-mime-base64" +RDEPENDS:${PN} += "\ + perl-module-integer \ + perl-module-mime-base64 \ +" + RDEPENDS:${PN}-ptest += " \ + libtest-fatal-perl \ libtest-needs-perl \ - perl-module-test-more \ - perl-module-test \ - perl-module-utf8 \ - perl-module-extutils-makemaker \ - perl-module-net-domain \ + libtest-warnings-perl \ perl-module-encode \ + perl-module-encode-encoding \ + perl-module-extutils-makemaker \ perl-module-extutils-mm-unix \ perl-module-file-spec-functions \ + perl-module-net-domain \ perl-module-perlio \ + perl-module-perlio-encoding \ + perl-module-test \ + perl-module-test-more \ + perl-module-utf8 \ " BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/perl/libxml-parser-perl/0001-Makefile.PL-make-check_lib-cross-friendly.patch b/poky/meta/recipes-devtools/perl/libxml-parser-perl/0001-Makefile.PL-make-check_lib-cross-friendly.patch new file mode 100644 index 0000000000..457fb77384 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/libxml-parser-perl/0001-Makefile.PL-make-check_lib-cross-friendly.patch @@ -0,0 +1,28 @@ +From bd9b0e10843da72276982bd1394ade734fea0289 Mon Sep 17 00:00:00 2001 +From: Tim Orling <tim.orling@konsulko.com> +Date: Fri, 2 Feb 2024 21:15:34 -0800 +Subject: [PATCH] Makefile.PL: make check_lib cross friendly + +lib => qw(expat) does not seem to respect EXPATLIBPATH and +EXPATINCPATH when we are cross-compiling. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Tim Orling <tim.orling@konsulko.com> +--- + Makefile.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 505d1df..19f428b 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -30,7 +30,7 @@ foreach (@ARGV) { + + unless ( + check_lib( # fill in what you prompted the user for here +- lib => [qw(expat)], ++ #lib => [qw(expat)], + header => ['expat.h'], + incpath => $expat_incpath, + ( $expat_libpath ? ( libpath => $expat_libpath ) : () ), diff --git a/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.46.bb b/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.46.bb deleted file mode 100644 index 6cd40bd292..0000000000 --- a/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.46.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "XML::Parser - A perl module for parsing XML documents" -HOMEPAGE = "https://libexpat.github.io/" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://Parser.pm;beginline=1;endline=7;md5=d12cc778c80fc4c518f0e5dee29fd5fb" - -DEPENDS += "expat" - -SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz \ - file://ptest-perl/run-ptest \ - file://0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch \ - " -SRC_URI[md5sum] = "80bb18a8e6240fcf7ec2f7b57601c170" -SRC_URI[sha256sum] = "d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d" - -S = "${WORKDIR}/XML-Parser-${PV}" - -EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'" - -inherit cpan ptest-perl - -# fix up sub MakeMaker project as arguments don't get propagated though -# see https://rt.cpan.org/Public/Bug/Display.html?id=28632 -do_configure:append:class-target() { - sed -E \ - -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \ - -i Makefile Expat/Makefile -} - -do_configure:append() { - sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \ - -i Makefile Expat/Makefile - sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile - # make sure these two do not build in parallel - sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile -} - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - -do_compile:class-native() { - cpan_do_compile -} - -do_install_ptest() { - sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats - sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter - sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments - sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical - cp -r ${B}/samples ${D}${PTEST_PATH} - chown -R root:root ${D}${PTEST_PATH}/samples -} - -RDEPENDS:${PN} += "perl-module-carp perl-module-file-spec" -RDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more" - -BBCLASSEXTEND="native nativesdk" diff --git a/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.47.bb b/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.47.bb new file mode 100644 index 0000000000..cffc133a45 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.47.bb @@ -0,0 +1,42 @@ +SUMMARY = "XML::Parser - A perl module for parsing XML documents" +HOMEPAGE = "https://libexpat.github.io/" +SECTION = "libs" +LICENSE = "Artistic-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4342f85bf14a1fdd6a751573f1e61c03" + +DEPENDS += "expat" + +SRC_URI = "${CPAN_MIRROR}/modules/by-module/XML/XML-Parser-${PV}.tar.gz \ + file://0001-Makefile.PL-make-check_lib-cross-friendly.patch \ + " + +SRC_URI[sha256sum] = "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8" + +S = "${WORKDIR}/XML-Parser-${PV}" + +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'" + +inherit cpan pkgconfig ptest-perl + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +do_compile:class-native() { + cpan_do_compile +} + +do_install_ptest() { + sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats + sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter + sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments + sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical + cp -r ${B}/samples ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH}/samples +} + +RDEPENDS:${PN} += "perl-module-carp perl-module-file-spec" +RDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more" + +BBCLASSEXTEND="native nativesdk" diff --git a/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb index 323853cc2f..89acb64ef5 100644 --- a/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb +++ b/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb @@ -6,7 +6,6 @@ HOMEPAGE = "http://search.cpan.org/dist/libxml-perl/" SUMMARY = "Collection of Perl modules for working with XML" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -PR = "r3" LIC_FILES_CHKSUM = "file://README;beginline=33;endline=35;md5=1705549eef7577a3d6ba71123a1f0ce8" @@ -27,4 +26,4 @@ do_compile() { } RDEPENDS:${PN} += "perl-module-carp perl-module-overload perl-module-universal perl-module-io-handle" -RDEPENDS:${PN}-ptest += "libxml-parser-perl perl-module-file-glob" +RDEPENDS:${PN}-ptest += "libxml-parser-perl perl-module-file-glob perl-module-cwd perl-module-constant" diff --git a/poky/meta/recipes-devtools/perl/perl-ptest.inc b/poky/meta/recipes-devtools/perl/perl-ptest.inc index c233fab545..e07355d3f5 100644 --- a/poky/meta/recipes-devtools/perl/perl-ptest.inc +++ b/poky/meta/recipes-devtools/perl/perl-ptest.inc @@ -56,7 +56,7 @@ python populate_packages:prepend() { '${PN}-ptest%s', '%s', recursive=True, match_path=True) } -RDEPENDS:${PN}-ptest += "${PN}-modules ${PN}-doc sed" +RDEPENDS:${PN}-ptest += "${PN}-modules ${PN}-doc sed procps-ps" # The perl-ptest package contains Perl internal modules and generating file # dependencies for it causes problems. diff --git a/poky/meta/recipes-devtools/perl/perl_5.36.0.bb b/poky/meta/recipes-devtools/perl/perl_5.38.2.bb index 4456cdbcfb..b6c9cda7ae 100644 --- a/poky/meta/recipes-devtools/perl/perl_5.36.0.bb +++ b/poky/meta/recipes-devtools/perl/perl_5.38.2.bb @@ -17,7 +17,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \ file://0002-Constant-Fix-up-shebang.patch \ file://determinism.patch \ file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \ - file://0001-Fix-build-with-gcc-12.patch \ + file://0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch \ " SRC_URI:append:class-native = " \ file://perl-configpm-switch.patch \ @@ -26,9 +26,9 @@ SRC_URI:append:class-target = " \ file://encodefix.patch \ " -SRC_URI[perl.sha256sum] = "e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a" +SRC_URI[perl.sha256sum] = "a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e" -S = "${WORKDIR}/perl-${PV}" +B = "${WORKDIR}/perl-${PV}-build" inherit upstream-version-is-even update-alternatives @@ -39,19 +39,27 @@ DEPENDS += "make-native" PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0" PACKAGECONFIG ??= "gdbm" +PACKAGECONFIG:append:libc-musl = " anylocale" PACKAGECONFIG[bdb] = ",-Ui_db,db" PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm" +PACKAGECONFIG[anylocale] = "-Dd_setlocale_accepts_any_locale_name=define,," # Don't generate comments in enc2xs output files. They are not reproducible export ENC2XS_NO_COMMENTS = "1" +CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + do_configure:prepend() { - cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${S} + rm -rf ${B} + cp -rfp ${S} ${B} + cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${B} + cd ${B} } do_configure:class-target() { ./configure --prefix=${prefix} --libdir=${libdir} \ --target=${TARGET_SYS} \ + -Duse64bitint \ -Duseshrplib \ -Dusethreads \ -Dsoname=libperl.so.5 \ @@ -104,6 +112,10 @@ do_configure:class-native() { -Ui_xlocale \ -Alddlflags=' ${LDFLAGS}' \ ${PACKAGECONFIG_CONFARGS} + + # This prevents leakage of build paths into perl-native binaries, which + # causes non-deterministic troubles when those paths no longer exist or aren't accessible. + sed -i -e "s,${STAGING_LIBDIR},/completelyboguspath,g" config.h } do_configure:append() { @@ -114,7 +126,6 @@ print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b % ")" echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h fi - oe_runmake clean } do_compile() { @@ -148,9 +159,10 @@ do_install:append:class-target() { # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl - # This contains host-specific information used for building miniperl (a helper executable built with host compiler) - # and therefore isn't reproducible. I believe the file isn't actually needed on target. - rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h + # xconfig.h contains references to build host architecture, and yet is included from various other places. + # To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture. + # It is believed that the original header is the product of building miniperl (a helper executable built with host compiler). + cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h } do_install:append:class-nativesdk() { @@ -195,6 +207,7 @@ perl_package_preprocess () { ${PKGD}${bindir}/pod2usage.perl \ ${PKGD}${bindir}/podchecker.perl \ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \ + ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h \ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \ ${PKGD}${libdir}/perl5/${PV}/Config.pm \ @@ -260,7 +273,7 @@ FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/ ${libdir}/perl5/${PV}/ExtUtils/typemap \ " RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \ - perl-module-warnings-register" + perl-module-warnings-register perl-module-config-git" FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a" @@ -293,12 +306,12 @@ ALTERNATIVE_PRIORITY = "40" ALTERNATIVE:${PN}-doc = "Thread.3" ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3" -# Create a perl-modules package recommending all the other perl -# packages (actually the non modules packages and not created too) +# Create a perl-modules package that represents the collection of all the +# other perl packages (actually the non modules packages and not created too). ALLOW_EMPTY:${PN}-modules = "1" PACKAGES += "${PN}-modules " -PACKAGESPLITFUNCS:prepend = "split_perl_packages " +PACKAGESPLITFUNCS =+ "split_perl_packages" python split_perl_packages () { libdir = d.expand('${libdir}/perl5/${PV}') @@ -309,11 +322,13 @@ python split_perl_packages () { do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) - # perl-modules should recommend every perl module, and only the + # perl-modules should runtime-depend on every perl module, and only the # modules. Don't attempt to use the result of do_split_packages() as some - # modules are manually split (eg. perl-module-unicore). - packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split()) - d.setVar(d.expand("RRECOMMENDS:${PN}-modules"), ' '.join(packages)) + # modules are manually split (eg. perl-module-unicore). Also, the split + # packages should not include packages defined in RPROVIDES:${PN}. + perl_sub_pkgs = d.getVar(d.expand("RPROVIDES:${PN}")).split() + packages = filter(lambda p: 'perl-module-' in p and p not in perl_sub_pkgs, d.getVar('PACKAGES').split()) + d.setVar(d.expand("RDEPENDS:${PN}-modules"), ' '.join(packages)) # Read the pre-generated dependency file, and use it to set module dependecies for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines(): @@ -339,7 +354,8 @@ python() { d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*") } -RDEPENDS:${PN}-misc += "perl perl-modules" +RDEPENDS:${PN}-misc += "perl" +RRECOMMENDS:${PN}-misc += "perl-modules" RDEPENDS:${PN}-pod += "perl" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch index 331ea849e6..25aa69d7da 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch @@ -1,21 +1,20 @@ -From 5492ac3c716020a27a25253bbffe810db43202bf Mon Sep 17 00:00:00 2001 +From f4cf90b5a298d6a3199e8b4c07f520aaf593ce2b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 9 Mar 2017 18:54:02 +0200 Subject: [PATCH] Add a color setting for mips64_n32 binaries Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- build/rpmfc.c | 4 ++++ rpmrc.in | 2 ++ 2 files changed, 6 insertions(+) diff --git a/build/rpmfc.c b/build/rpmfc.c -index 10c380ee9..b7655aa93 100644 +index 4b67a9bae..ed7e4e623 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c -@@ -639,6 +639,7 @@ exit: +@@ -660,6 +660,7 @@ exit: static const struct rpmfcTokens_s rpmfcTokens[] = { { "directory", RPMFC_INCLUDE }, @@ -23,21 +22,21 @@ index 10c380ee9..b7655aa93 100644 { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, -@@ -1149,6 +1150,9 @@ static uint32_t getElfColor(const char *fn) +@@ -1158,6 +1159,9 @@ static uint32_t getElfColor(const char *fn) color = RPMFC_ELF32; break; } + if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE) + if (ehdr.e_flags & EF_MIPS_ABI2) + color = RPMFC_ELFMIPSN32; - elf_end(elf); } - close(fd); + if (elf) + elf_end(elf); diff --git a/rpmrc.in b/rpmrc.in -index 5bd9ba3e5..f15bb8dad 100644 +index 8646a966b..7349fdfd3 100644 --- a/rpmrc.in +++ b/rpmrc.in -@@ -137,6 +137,8 @@ archcolor: mipsr6el 1 +@@ -142,6 +142,8 @@ archcolor: mipsr6el 1 archcolor: mips64r6 2 archcolor: mips64r6el 2 diff --git a/poky/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch b/poky/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch new file mode 100644 index 0000000000..e4edc884b1 --- /dev/null +++ b/poky/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch @@ -0,0 +1,27 @@ +From c39a074ff3c4d21c100d387661c7d725b5eae7b0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Wed, 29 Nov 2023 14:06:15 +0100 +Subject: [PATCH] CMakeLists.txt: look for lua with pkg-config rather than + cmake modules + +Otherwise cmake will try to find libm, badly, and fail. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a383ceba..ed847c09a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,7 @@ set(REQFUNCS + ) + + find_package(PkgConfig REQUIRED) +-find_package(Lua 5.2 REQUIRED) ++pkg_check_modules(LUA REQUIRED IMPORTED_TARGET lua>=5.2) + find_package(ZLIB REQUIRED) + find_package(BZip2) + find_package(Iconv) diff --git a/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch deleted file mode 100644 index 044b4dd2a0..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 9a6871126f472feea057d5f803505ec8cc78f083 Mon Sep 17 00:00:00 2001 -From: Panu Matilainen <pmatilai@redhat.com> -Date: Thu, 30 Sep 2021 09:56:20 +0300 -Subject: [PATCH 1/3] Refactor pgpDigParams construction to helper function - -No functional changes, just to reduce code duplication and needed by -the following commits. - -CVE: CVE-2021-3521 -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/9f03f42e2] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - rpmio/rpmpgp.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c -index d0688ebe9a..e472b5320f 100644 ---- a/rpmio/rpmpgp.c -+++ b/rpmio/rpmpgp.c -@@ -1041,6 +1041,13 @@ unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype) - return algo; - } - -+static pgpDigParams pgpDigParamsNew(uint8_t tag) -+{ -+ pgpDigParams digp = xcalloc(1, sizeof(*digp)); -+ digp->tag = tag; -+ return digp; -+} -+ - int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, - pgpDigParams * ret) - { -@@ -1058,8 +1065,7 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, - if (pkttype && pkt.tag != pkttype) { - break; - } else { -- digp = xcalloc(1, sizeof(*digp)); -- digp->tag = pkt.tag; -+ digp = pgpDigParamsNew(pkt.tag); - } - } - -@@ -1105,8 +1111,7 @@ int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen, - digps = xrealloc(digps, alloced * sizeof(*digps)); - } - -- digps[count] = xcalloc(1, sizeof(**digps)); -- digps[count]->tag = PGPTAG_PUBLIC_SUBKEY; -+ digps[count] = pgpDigParamsNew(PGPTAG_PUBLIC_SUBKEY); - /* Copy UID from main key to subkey */ - digps[count]->userid = xstrdup(mainkey->userid); - --- -2.17.1 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch index 4029233fb7..d0ed711086 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch @@ -1,4 +1,4 @@ -From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 +From 86e585cc0dd06dfa20f584af8b59d52a59accb45 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in @@ -9,16 +9,15 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index e6cec1816..810cd7351 100644 +index f7dac6d9a..f382c7da0 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch +@@ -711,10 +711,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); } diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch index 6d236ac400..b571a0ae8c 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch @@ -1,4 +1,4 @@ -From 8d013fe154a162305f76141151baf767dd04b598 Mon Sep 17 00:00:00 2001 +From 73d6841d9ef2a8ac7bd63f9645a3efe8038dfdd4 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for @@ -6,31 +6,29 @@ Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- - configure.ac | 2 +- - macros.in | 2 +- - rpm.am | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) + CMakeLists.txt | 2 +- + macros.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/configure.ac b/configure.ac -index eb7d6941b..10a889b5d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -871,7 +871,7 @@ else - usrprefix=$prefix - fi +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7808115c1..4a383ceba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,7 @@ option(WITH_IMAEVM "Build with IMA support" OFF) + option(WITH_FAPOLICYD "Build with fapolicyd support" ON) + option(WITH_READLINE "Build with readline support" ON) --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" -+RPMCONFIGDIR="`echo ${libdir}/rpm`" - AC_SUBST(RPMCONFIGDIR) +-set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home") ++set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE PATH "rpm home") + set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string") - AC_SUBST(OBJDUMP) + # Emulate libtool versioning. Before a public release: diff --git a/macros.in b/macros.in -index a1f795e5f..689e784ef 100644 +index b49ffaad4..3acbe78f6 100644 --- a/macros.in +++ b/macros.in -@@ -933,7 +933,7 @@ package or when debugging this package.\ +@@ -969,7 +969,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ %_sharedstatedir %{_prefix}/com %_localstatedir %{_prefix}/var %_lib lib @@ -39,20 +37,3 @@ index a1f795e5f..689e784ef 100644 %_includedir %{_prefix}/include %_infodir %{_datadir}/info %_mandir %{_datadir}/man -diff --git a/rpm.am b/rpm.am -index 7b57f433b..9bbb9ee96 100644 ---- a/rpm.am -+++ b/rpm.am -@@ -1,10 +1,10 @@ - # Internal binaries - ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm --rpmlibexecdir = $(prefix)/lib/rpm -+rpmlibexecdir = $(libdir)/rpm - - # Host independent config files - ## HACK: it probably should be $(datadir)/rpm --rpmconfigdir = $(prefix)/lib/rpm -+rpmconfigdir = $(libdir)/rpm - - # Libtool version (current-revision-age) for all our libraries - rpm_version_info = 11:0:2 diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch index 96eb418952..796088df53 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch @@ -1,4 +1,4 @@ -From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001 +From e210458d125793915abce30420d866a30305c37a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 10 Jan 2017 14:11:30 +0200 Subject: [PATCH] Do not read config files from $HOME @@ -10,29 +10,26 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 4ed991321..19fe80f98 100644 +index 9437a0ff1..483585ae4 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -458,8 +458,7 @@ static void setDefaults(void) +@@ -459,8 +459,7 @@ static void setDefaults(void) if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", - confdir, "/" RPMCANONVENDOR "/rpmrc", ":", + confdir, "/" RPM_VENDOR "/rpmrc", ":", - SYSCONFDIR "/rpmrc", ":", - "~/.rpmrc", NULL); -+ SYSCONFDIR "/rpmrc", ":"); ++ SYSCONFDIR "/rpmrc", NULL); } #ifndef MACROFILES -@@ -471,8 +470,7 @@ static void setDefaults(void) - confdir, "/" RPMCANONVENDOR "/macros", ":", +@@ -472,8 +471,7 @@ static void setDefaults(void) + confdir, "/" RPM_VENDOR "/macros", ":", SYSCONFDIR "/rpm/macros.*", ":", SYSCONFDIR "/rpm/macros", ":", - SYSCONFDIR "/rpm/%{_target}/macros", ":", - "~/.rpmmacros", NULL); -+ SYSCONFDIR "/rpm/%{_target}/macros", ":"); ++ SYSCONFDIR "/rpm/%{_target}/macros", NULL); } #else macrofiles = MACROFILES; --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch index 41cdf6ed77..328fbf86ac 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch @@ -1,4 +1,4 @@ -From a674b9cc7af448d7c6748bc163bf37dc14a57f09 Mon Sep 17 00:00:00 2001 +From a8fe7a7a2e41c9f127ed26407d57076babcb89e8 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 20 Jan 2017 13:32:06 +0200 Subject: [PATCH] Do not reset the PATH environment variable before running @@ -8,16 +8,15 @@ We add lots of native stuff into it and scriptlets rely on that. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- lib/rpmscript.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 6a31e0d..2b0e438 100644 +index 57689bb68..7b7e26606 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -184,7 +184,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, +@@ -252,7 +252,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, if (ipath && ipath[5] != '%') path = ipath; diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch b/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch deleted file mode 100644 index 734e38bb39..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 2d53d1e308a5bd15a16cc289fa7e1f264ea706be Mon Sep 17 00:00:00 2001 -From: Panu Matilainen <pmatilai@redhat.com> -Date: Tue, 26 Jun 2018 10:46:14 +0300 -Subject: [PATCH] Rip out partial support for unused MD2 and RIPEMD160 digests - -Inspired by #453, adding configure-checks for unused digests algorithms -seems nonsensical, at no point in rpm history have these algorithms been -used for anything in rpm so there's not even backward compatibility to -care about. So the question becomes why do we appear to have (some) -support for those unused algorithms? So lets don't, problem solved... - -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/ff4b9111aeba01dd025dd133ce617fb80f7398a0] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - rpmio/digest_beecrypt.c | 7 ------- - rpmio/digest_nss.c | 2 -- - rpmio/digest_openssl.c | 6 ------ - 3 files changed, 15 deletions(-) - -diff --git a/rpmio/digest_beecrypt.c b/rpmio/digest_beecrypt.c -index 597027e25..653a39491 100644 ---- a/rpmio/digest_beecrypt.c -+++ b/rpmio/digest_beecrypt.c -@@ -132,10 +132,6 @@ DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags) - ctx->Digest = (void *) sha512Digest; - break; - #endif -- case PGPHASHALGO_RIPEMD160: -- case PGPHASHALGO_MD2: -- case PGPHASHALGO_TIGER192: -- case PGPHASHALGO_HAVAL_5_160: - default: - free(ctx); - return NULL; -@@ -292,9 +288,6 @@ static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, si - case PGPHASHALGO_SHA1: - prefix = "3021300906052b0e03021a05000414"; - break; -- case PGPHASHALGO_MD2: -- prefix = "3020300c06082a864886f70d020205000410"; -- break; - case PGPHASHALGO_SHA256: - prefix = "3031300d060960864801650304020105000420"; - break; -diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c -index e11920e3e..b3d2b5595 100644 ---- a/rpmio/digest_nss.c -+++ b/rpmio/digest_nss.c -@@ -117,7 +117,6 @@ static HASH_HashType getHashType(int hashalgo) - { - switch (hashalgo) { - case PGPHASHALGO_MD5: return HASH_AlgMD5; -- case PGPHASHALGO_MD2: return HASH_AlgMD2; - case PGPHASHALGO_SHA1: return HASH_AlgSHA1; - #ifdef SHA224_LENGTH - case PGPHASHALGO_SHA224: return HASH_AlgSHA224; -@@ -217,7 +216,6 @@ static SECOidTag getHashAlg(unsigned int hashalgo) - { - switch (hashalgo) { - case PGPHASHALGO_MD5: return SEC_OID_MD5; -- case PGPHASHALGO_MD2: return SEC_OID_MD2; - case PGPHASHALGO_SHA1: return SEC_OID_SHA1; - #ifdef SHA224_LENGTH - case PGPHASHALGO_SHA224: return SEC_OID_SHA224; -diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c -index 18e52a724..0ae48dd1d 100644 ---- a/rpmio/digest_openssl.c -+++ b/rpmio/digest_openssl.c -@@ -172,12 +172,6 @@ static const EVP_MD *getEVPMD(int hashalgo) - case PGPHASHALGO_SHA1: - return EVP_sha1(); - -- case PGPHASHALGO_RIPEMD160: -- return EVP_ripemd160(); -- -- case PGPHASHALGO_MD2: -- return EVP_md2(); -- - case PGPHASHALGO_SHA256: - return EVP_sha256(); - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch index 4020a31092..e4251a1a73 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch @@ -1,4 +1,4 @@ -From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001 +From 34c0d3263f3e0b366a2320e0823f46673f7ba928 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 17 Jan 2017 14:07:17 +0200 Subject: [PATCH] When cross-installing, execute package scriptlets without @@ -29,10 +29,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index cc98c4885..f8bd3df04 100644 +index 3f6313278..57689bb68 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -394,8 +394,7 @@ exit: +@@ -448,8 +448,7 @@ exit: Fclose(out); /* XXX dup'd STDOUT_FILENO */ if (fn) { @@ -42,21 +42,18 @@ index cc98c4885..f8bd3df04 100644 free(fn); } free(mline); -@@ -428,7 +427,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, +@@ -483,7 +482,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, if (rc != RPMRC_FAIL) { if (script_type & RPMSCRIPTLET_EXEC) { -- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); +- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { + rpmChrootOut(); -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); ++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + rpmChrootIn(); + } else { -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); ++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + } } else { - rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); + rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); } --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch b/poky/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch index 79b168257e..2f6397aa8a 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch @@ -1,4 +1,4 @@ -From 2d351c666f09cc1b9e368422653fb42ac8b86249 Mon Sep 17 00:00:00 2001 +From ae4fdd8e8d052835973e6ff4b7550f93bde30a98 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Tue, 31 Aug 2021 10:37:05 +0200 Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pack.c b/build/pack.c -index 932cb213e..b45d0726f 100644 +index f382c7da0..0889dd993 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -328,7 +328,7 @@ static char *getIOFlags(Package pkg) +@@ -330,7 +330,7 @@ static char *getIOFlags(Package pkg) headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr); buf = xstrdup(rpmio_flags); buf[s - rpmio_flags] = '\0'; diff --git a/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch b/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch deleted file mode 100644 index ced52d1007..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9bf1693092385eba9841614613313010221ca01f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 29 Jun 2021 20:11:26 +0200 -Subject: [PATCH] docs: do not build manpages (requires pandoc) - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - docs/Makefile.am | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/docs/Makefile.am b/docs/Makefile.am -index 5a6bd203a..6257767fd 100644 ---- a/docs/Makefile.am -+++ b/docs/Makefile.am -@@ -1,7 +1,5 @@ - ## Process this file with automake to produce Makefile.in - --SUBDIRS = man -- - EXTRA_DIST = - - EXTRA_DIST += \ --- -2.32.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch b/poky/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch index 6678c105cd..98e52da3a8 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch @@ -1,4 +1,4 @@ -From 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 Mon Sep 17 00:00:00 2001 +From b04ecb793a3c859985eead5e261785b27a4c4a20 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Thu, 7 May 2020 17:40:58 +0800 Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 @@ -32,10 +32,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/transaction.c b/lib/transaction.c -index 67b9db5..82386b8 100644 +index 70d2587ac..b89b30060 100644 --- a/lib/transaction.c +++ b/lib/transaction.c -@@ -391,7 +391,18 @@ static int handleColorConflict(rpmts ts, +@@ -400,7 +400,18 @@ static int handleColorConflict(rpmts ts, rpmfsSetAction(ofs, ofx, FA_CREATE); rpmfsSetAction(fs, fx, FA_SKIPCOLOR); rConflicts = 0; @@ -55,6 +55,3 @@ index 67b9db5..82386b8 100644 } } --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch b/poky/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch index a6c58699d3..55108e7f1c 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch @@ -1,4 +1,7 @@ -perl: disable auto requires +From 58bf006646a063837c46b695f7e7ebb69bee7238 Mon Sep 17 00:00:00 2001 +From: Mark Hatle <mark.hatle@windriver.com> +Date: Tue, 15 Aug 2017 16:41:57 -0500 +Subject: [PATCH] perl: disable auto requires When generating automatic requirements, it's possible for perl scripts to declare 'optional' dependencies. These seem to often be incorrect and will @@ -9,20 +12,24 @@ generation. This matches the behavior from the previous RPM5 implementation. Upstream-Status: Inappropriate [OE specific configuration] Signed-off-by: Mark Hatle <mark.hatle@windriver.com> +--- + fileattrs/perl.attr | 2 +- + fileattrs/perllib.attr | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -Index: git/fileattrs/perl.attr -=================================================================== ---- git.orig/fileattrs/perl.attr -+++ git/fileattrs/perl.attr +diff --git a/fileattrs/perl.attr b/fileattrs/perl.attr +index 0daef58d5..81ddf5305 100644 +--- a/fileattrs/perl.attr ++++ b/fileattrs/perl.attr @@ -1,3 +1,3 @@ -%__perl_requires %{_rpmconfigdir}/perl.req +#__perl_requires %{_rpmconfigdir}/perl.req %__perl_magic ^.*[Pp]erl .*$ %__perl_flags exeonly -Index: git/fileattrs/perllib.attr -=================================================================== ---- git.orig/fileattrs/perllib.attr -+++ git/fileattrs/perllib.attr +diff --git a/fileattrs/perllib.attr b/fileattrs/perllib.attr +index fcad48099..495a28927 100644 +--- a/fileattrs/perllib.attr ++++ b/fileattrs/perllib.attr @@ -1,5 +1,5 @@ %__perllib_provides %{_rpmconfigdir}/perl.prov -%__perllib_requires %{_rpmconfigdir}/perl.req diff --git a/poky/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch b/poky/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch deleted file mode 100644 index 9783396639..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 9b9d717f484ec913cdd3804e43489b3dc18bd77c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 31 Oct 2020 22:14:05 -0700 -Subject: [PATCH] tools: Add error.h for non-glibc case - -error is glibc specific API, so this patch will mostly not accepted -upstream given that elfutils has been closely tied to glibc - -Upstream-Status: Inappropriate [workaround for musl] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - tools/elfdeps.c | 6 +++++- - tools/error.h | 27 +++++++++++++++++++++++++++ - 2 files changed, 32 insertions(+), 1 deletion(-) - create mode 100644 tools/error.h - -diff --git a/tools/elfdeps.c b/tools/elfdeps.c -index d205935bb..3a8945b33 100644 ---- a/tools/elfdeps.c -+++ b/tools/elfdeps.c -@@ -5,10 +5,14 @@ - #include <unistd.h> - #include <stdlib.h> - #include <fcntl.h> --#include <error.h> - #include <errno.h> - #include <popt.h> - #include <gelf.h> -+#ifdef __GLIBC__ -+#include <error.h> -+#else -+#include "error.h" -+#endif - - #include <rpm/rpmstring.h> - #include <rpm/argv.h> -diff --git a/tools/error.h b/tools/error.h -new file mode 100644 -index 000000000..ef06827a0 ---- /dev/null -+++ b/tools/error.h -@@ -0,0 +1,27 @@ -+#ifndef _ERROR_H_ -+#define _ERROR_H_ -+ -+#include <stdarg.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+ -+static unsigned int error_message_count = 0; -+ -+static inline void error(int status, int errnum, const char* format, ...) -+{ -+ va_list ap; -+ fprintf(stderr, "%s: ", program_invocation_name); -+ va_start(ap, format); -+ vfprintf(stderr, format, ap); -+ va_end(ap); -+ if (errnum) -+ fprintf(stderr, ": %s", strerror(errnum)); -+ fprintf(stderr, "\n"); -+ error_message_count++; -+ if (status) -+ exit(status); -+} -+ -+#endif /* _ERROR_H_ */ diff --git a/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch index b3dbc319b6..c5caa7dc5e 100644 --- a/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch +++ b/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch @@ -1,7 +1,7 @@ -From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001 +From d7143dc4e75c8bcc5cc4c852a4b972942b7e4d07 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 20 Jan 2017 13:33:05 +0200 -Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR +Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR environment variable This is needed so that rpm can pick up target-specific configuration @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 19fe80f98..6b27b3941 100644 +index 483585ae4..ea858c290 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name, +@@ -456,10 +456,14 @@ const char * lookupInDefaultTable(const char * name, static void setDefaults(void) { const char *confdir = rpmConfigDir(); @@ -27,26 +27,26 @@ index 19fe80f98..6b27b3941 100644 + if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", - confdir, "/" RPMCANONVENDOR "/rpmrc", ":", -- SYSCONFDIR "/rpmrc", ":"); -+ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL); + confdir, "/" RPM_VENDOR "/rpmrc", ":", +- SYSCONFDIR "/rpmrc", NULL); ++ etcconfdir, SYSCONFDIR "/rpmrc", NULL); } #ifndef MACROFILES -@@ -468,9 +472,9 @@ static void setDefaults(void) +@@ -469,9 +473,9 @@ static void setDefaults(void) confdir, "/platform/%{_target}/macros", ":", confdir, "/fileattrs/*.attr", ":", - confdir, "/" RPMCANONVENDOR "/macros", ":", + confdir, "/" RPM_VENDOR "/macros", ":", - SYSCONFDIR "/rpm/macros.*", ":", - SYSCONFDIR "/rpm/macros", ":", -- SYSCONFDIR "/rpm/%{_target}/macros", ":"); +- SYSCONFDIR "/rpm/%{_target}/macros", NULL); + etcconfdir, SYSCONFDIR "/rpm/macros.*", ":", + etcconfdir, SYSCONFDIR "/rpm/macros", ":", -+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL); ++ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL); } #else macrofiles = MACROFILES; -@@ -989,7 +993,11 @@ static void read_auxv(void) +@@ -1115,7 +1119,11 @@ static void read_auxv(void) */ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) { @@ -59,7 +59,7 @@ index 19fe80f98..6b27b3941 100644 static struct utsname un; char * chptr; canonEntry canon; -@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) +@@ -1435,6 +1443,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) if (arch) *arch = un.machine; if (os) *os = un.sysname; @@ -67,6 +67,3 @@ index 19fe80f98..6b27b3941 100644 } static --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch deleted file mode 100644 index 683b57d455..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c4b1bee51bbdd732b94b431a951481af99117703 Mon Sep 17 00:00:00 2001 -From: Panu Matilainen <pmatilai@redhat.com> -Date: Thu, 30 Sep 2021 09:51:10 +0300 -Subject: [PATCH 2/3] Process MPI's from all kinds of signatures - -No immediate effect but needed by the following commits. - -CVE: CVE-2021-3521 -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b5e8bc74b] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> - ---- - rpmio/rpmpgp.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - -diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c -index 25f67048fd..509e777e6d 100644 ---- a/rpmio/rpmpgp.c -+++ b/rpmio/rpmpgp.c -@@ -543,7 +543,7 @@ pgpDigAlg pgpDigAlgFree(pgpDigAlg alg) - return NULL; - } - --static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, -+static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, - const uint8_t *p, const uint8_t *h, size_t hlen, - pgpDigParams sigp) - { -@@ -556,10 +556,8 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, - int mpil = pgpMpiLen(p); - if (pend - p < mpil) - break; -- if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) { -- if (sigalg->setmpi(sigalg, i, p)) -- break; -- } -+ if (sigalg->setmpi(sigalg, i, p)) -+ break; - p += mpil; - } - -@@ -619,7 +617,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, - } - - p = ((uint8_t *)v) + sizeof(*v); -- rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); -+ rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); - } break; - case 4: - { pgpPktSigV4 v = (pgpPktSigV4)h; -@@ -677,8 +675,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, - p += 2; - if (p > hend) - return 1; -- -- rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); -+ rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); - } break; - default: - rpmlog(RPMLOG_WARNING, _("Unsupported version of signature: V%d\n"), version); --- -2.17.1 - diff --git a/poky/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch b/poky/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch new file mode 100644 index 0000000000..23dce30086 --- /dev/null +++ b/poky/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch @@ -0,0 +1,34 @@ +From 29c2a0c18b0c773128bf62c611b4c53fe4471105 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Tue, 16 Jan 2024 09:59:26 +0100 +Subject: [PATCH] rpmio/rpmglob.c: avoid using GLOB_BRACE if undefined by C + library + +This addresses musl failures; if there is code out there relying on +those braces, it needs to be fixed when used on musl. + +This is unlikely to be trivially fixable upstream. + +Upstream-Status: Inappropriate [reported at https://github.com/rpm-software-management/rpm/issues/2844] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + rpmio/rpmglob.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c +index 243568766..43c27074a 100644 +--- a/rpmio/rpmglob.c ++++ b/rpmio/rpmglob.c +@@ -33,6 +33,12 @@ + + #include "debug.h" + ++/* Don't fail if the standard C library +++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + /* Return 1 if pattern contains a magic char, see glob(7) for a list */ + static int ismagic(const char *pattern) + { diff --git a/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch deleted file mode 100644 index a5ec802501..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch +++ /dev/null @@ -1,329 +0,0 @@ -From 07676ca03ad8afcf1ca95a2353c83fbb1d970b9b Mon Sep 17 00:00:00 2001 -From: Panu Matilainen <pmatilai@redhat.com> -Date: Thu, 30 Sep 2021 09:59:30 +0300 -Subject: [PATCH 3/3] Validate and require subkey binding signatures on PGP - public keys - -All subkeys must be followed by a binding signature by the primary key -as per the OpenPGP RFC, enforce the presence and validity in the parser. - -The implementation is as kludgey as they come to work around our -simple-minded parser structure without touching API, to maximise -backportability. Store all the raw packets internally as we decode them -to be able to access previous elements at will, needed to validate ordering -and access the actual data. Add testcases for manipulated keys whose -import previously would succeed. - -Depends on the two previous commits: -7b399fcb8f52566e6f3b4327197a85facd08db91 and -236b802a4aa48711823a191d1b7f753c82a89ec5 - -Fixes CVE-2021-3521. - -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/bd36c5dc9] -CVE:CVE-2021-3521 - -Signed-off-by: Changqing Li <changqing.li@windriver.com> - ---- - rpmio/rpmpgp.c | 99 +++++++++++++++++-- - tests/Makefile.am | 3 + - tests/data/keys/CVE-2021-3521-badbind.asc | 25 +++++ - .../data/keys/CVE-2021-3521-nosubsig-last.asc | 25 +++++ - tests/data/keys/CVE-2021-3521-nosubsig.asc | 37 +++++++ - tests/rpmsigdig.at | 28 ++++++ - 6 files changed, 209 insertions(+), 8 deletions(-) - create mode 100644 tests/data/keys/CVE-2021-3521-badbind.asc - create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig-last.asc - create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig.asc - -diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c -index 509e777e6d..371ad4d9b6 100644 ---- a/rpmio/rpmpgp.c -+++ b/rpmio/rpmpgp.c -@@ -1061,33 +1061,116 @@ static pgpDigParams pgpDigParamsNew(uint8_t tag) - return digp; - } - -+static int hashKey(DIGEST_CTX hash, const struct pgpPkt *pkt, int exptag) -+{ -+ int rc = -1; -+ if (pkt->tag == exptag) { -+ uint8_t head[] = { -+ 0x99, -+ (pkt->blen >> 8), -+ (pkt->blen ), -+ }; -+ -+ rpmDigestUpdate(hash, head, 3); -+ rpmDigestUpdate(hash, pkt->body, pkt->blen); -+ rc = 0; -+ } -+ return rc; -+} -+ -+static int pgpVerifySelf(pgpDigParams key, pgpDigParams selfsig, -+ const struct pgpPkt *all, int i) -+{ -+ int rc = -1; -+ DIGEST_CTX hash = NULL; -+ -+ switch (selfsig->sigtype) { -+ case PGPSIGTYPE_SUBKEY_BINDING: -+ hash = rpmDigestInit(selfsig->hash_algo, 0); -+ if (hash) { -+ rc = hashKey(hash, &all[0], PGPTAG_PUBLIC_KEY); -+ if (!rc) -+ rc = hashKey(hash, &all[i-1], PGPTAG_PUBLIC_SUBKEY); -+ } -+ break; -+ default: -+ /* ignore types we can't handle */ -+ rc = 0; -+ break; -+ } -+ -+ if (hash && rc == 0) -+ rc = pgpVerifySignature(key, selfsig, hash); -+ -+ rpmDigestFinal(hash, NULL, NULL, 0); -+ -+ return rc; -+} -+ - int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, - pgpDigParams * ret) - { - const uint8_t *p = pkts; - const uint8_t *pend = pkts + pktlen; - pgpDigParams digp = NULL; -- struct pgpPkt pkt; -+ pgpDigParams selfsig = NULL; -+ int i = 0; -+ int alloced = 16; /* plenty for normal cases */ -+ struct pgpPkt *all = xmalloc(alloced * sizeof(*all)); - int rc = -1; /* assume failure */ -+ int expect = 0; -+ int prevtag = 0; - - while (p < pend) { -- if (decodePkt(p, (pend - p), &pkt)) -+ struct pgpPkt *pkt = &all[i]; -+ if (decodePkt(p, (pend - p), pkt)) - break; - - if (digp == NULL) { -- if (pkttype && pkt.tag != pkttype) { -+ if (pkttype && pkt->tag != pkttype) { - break; - } else { -- digp = pgpDigParamsNew(pkt.tag); -+ digp = pgpDigParamsNew(pkt->tag); - } - } - -- if (pgpPrtPkt(&pkt, digp)) -+ if (expect) { -+ if (pkt->tag != expect) -+ break; -+ selfsig = pgpDigParamsNew(pkt->tag); -+ } -+ if (pgpPrtPkt(pkt, selfsig ? selfsig : digp)) - break; - -- p += (pkt.body - pkt.head) + pkt.blen; -- if (pkttype == PGPTAG_SIGNATURE) -- break; -+ if (selfsig) { -+ /* subkeys must be followed by binding signature */ -+ if (prevtag == PGPTAG_PUBLIC_SUBKEY) { -+ if (selfsig->sigtype != PGPSIGTYPE_SUBKEY_BINDING) -+ break; -+ } -+ -+ int xx = pgpVerifySelf(digp, selfsig, all, i); -+ -+ selfsig = pgpDigParamsFree(selfsig); -+ if (xx) -+ break; -+ expect = 0; -+ } -+ -+ if (pkt->tag == PGPTAG_PUBLIC_SUBKEY) -+ expect = PGPTAG_SIGNATURE; -+ prevtag = pkt->tag; -+ -+ i++; -+ p += (pkt->body - pkt->head) + pkt->blen; -+ if (pkttype == PGPTAG_SIGNATURE) -+ break; -+ -+ if (alloced <= i) { -+ alloced *= 2; -+ all = xrealloc(all, alloced * sizeof(*all)); -+ } -+ - } - - rc = (digp && (p == pend)) ? 0 : -1; -diff --git a/tests/Makefile.am b/tests/Makefile.am -index a41ce10de8..7bb23247f1 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -107,6 +107,9 @@ EXTRA_DIST += data/SPECS/hello-config-buildid.spec - EXTRA_DIST += data/SPECS/hello-cd.spec - EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.pub - EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.secret -+EXTRA_DIST += data/keys/CVE-2021-3521-badbind.asc -+EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig.asc -+EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig-last.asc - EXTRA_DIST += data/macros.testfile - EXTRA_DIST += data/macros.debug - EXTRA_DIST += data/SOURCES/foo.c -diff --git a/tests/data/keys/CVE-2021-3521-badbind.asc b/tests/data/keys/CVE-2021-3521-badbind.asc -new file mode 100644 -index 0000000000..aea00f9d7a ---- /dev/null -+++ b/tests/data/keys/CVE-2021-3521-badbind.asc -@@ -0,0 +1,25 @@ -+-----BEGIN PGP PUBLIC KEY BLOCK----- -+Version: rpm-4.17.90 (NSS-3) -+ -+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g -+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY -+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 -+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas -+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ -+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl -+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK -+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf -+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB -+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr -+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX -+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq -++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN -+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY -+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz -+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 -+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c -+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m -+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE= -+=WCfs -+-----END PGP PUBLIC KEY BLOCK----- -+ -diff --git a/tests/data/keys/CVE-2021-3521-nosubsig-last.asc b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc -new file mode 100644 -index 0000000000..aea00f9d7a ---- /dev/null -+++ b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc -@@ -0,0 +1,25 @@ -+-----BEGIN PGP PUBLIC KEY BLOCK----- -+Version: rpm-4.17.90 (NSS-3) -+ -+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g -+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY -+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 -+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas -+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ -+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl -+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK -+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf -+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB -+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr -+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX -+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq -++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN -+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY -+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz -+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 -+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c -+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m -+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE= -+=WCfs -+-----END PGP PUBLIC KEY BLOCK----- -+ -diff --git a/tests/data/keys/CVE-2021-3521-nosubsig.asc b/tests/data/keys/CVE-2021-3521-nosubsig.asc -new file mode 100644 -index 0000000000..3a2e7417f8 ---- /dev/null -+++ b/tests/data/keys/CVE-2021-3521-nosubsig.asc -@@ -0,0 +1,37 @@ -+-----BEGIN PGP PUBLIC KEY BLOCK----- -+Version: rpm-4.17.90 (NSS-3) -+ -+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g -+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY -+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 -+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas -+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ -+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl -+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK -+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf -+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB -+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr -+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX -+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq -++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN -+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY -+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz -+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 -+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c -+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m -+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAG5AQ0EWOY5GAEIAKT68NmshdC4 -+VcRhOhlXBvZq23NtskkKoPvW+ZlMuxbRDG48pGBtxhjOngriVUGceEWsXww5Q7En -+uRBYglkxkW34ENym0Ji6tsPYfhbbG+dZWKIL4vMIzPOIwlPrXrm558vgkdMM/ELZ -+8WIz3KtzvYubKUk2Qz+96lPXbwnlC/SBFRpBseJC5LoOb/5ZGdR/HeLz1JXiacHF -+v9Nr3cZWqg5yJbDNZKfASdZgC85v3kkvhTtzknl//5wqdAMexbuwiIh2xyxbO+B/ -+qqzZFrVmu3sV2Tj5lLZ/9p1qAuEM7ULbixd/ld8yTmYvQ4bBlKv2bmzXtVfF+ymB -+Tm6BzyQEl/MAEQEAAYkBHwQYAQgACQUCWOY5GAIbDAAKCRBDRFkeGWTF/PANB/9j -+mifmj6z/EPe0PJFhrpISt9PjiUQCt0IPtiL5zKAkWjHePIzyi+0kCTBF6DDLFxos -+3vN4bWnVKT1kBhZAQlPqpJTg+m74JUYeDGCdNx9SK7oRllATqyu+5rncgxjWVPnQ -+zu/HRPlWJwcVFYEVXYL8xzfantwQTqefjmcRmBRdA2XJITK+hGWwAmrqAWx+q5xX -+Pa8wkNMxVzNS2rUKO9SoVuJ/wlUvfoShkJ/VJ5HDp3qzUqncADfdGN35TDzscngQ -+gHvnMwVBfYfSCABV1hNByoZcc/kxkrWMmsd/EnIyLd1Q1baKqc3cEDuC6E6/o4yJ -+E4XX4jtDmdZPreZALsiB -+=rRop -+-----END PGP PUBLIC KEY BLOCK----- -+ -diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at -index 8e7c759b8f..e2d30a7f1b 100644 ---- a/tests/rpmsigdig.at -+++ b/tests/rpmsigdig.at -@@ -2,6 +2,34 @@ - - AT_BANNER([RPM signatures and digests]) - -+AT_SETUP([rpmkeys --import invalid keys]) -+AT_KEYWORDS([rpmkeys import]) -+RPMDB_INIT -+ -+AT_CHECK([ -+runroot rpmkeys --import /data/keys/CVE-2021-3521-badbind.asc -+], -+[1], -+[], -+[error: /data/keys/CVE-2021-3521-badbind.asc: key 1 import failed.] -+) -+AT_CHECK([ -+runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig.asc -+], -+[1], -+[], -+[error: /data/keys/CVE-2021-3521-nosubsig.asc: key 1 import failed.] -+) -+ -+AT_CHECK([ -+runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig-last.asc -+], -+[1], -+[], -+[error: /data/keys/CVE-2021-3521-nosubsig-last.asc: key 1 import failed.] -+) -+AT_CLEANUP -+ - # ------------------------------ - # Test pre-built package verification - AT_SETUP([rpmkeys -Kv <unsigned> 1]) --- -2.17.1 - diff --git a/poky/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch b/poky/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch index 43e9859ef3..732202c46f 100644 --- a/poky/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch +++ b/poky/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch @@ -1,4 +1,4 @@ -From 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001 +From f01d9c24bb86bc47ad2453483518dbb25953cac7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 10 Jan 2019 18:14:18 +0100 Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 2b0e43862..e319673f1 100644 +index 7b7e26606..1dcd23be5 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script) +@@ -291,7 +291,7 @@ static char * writeScript(const char *cmd, const char *script) if (Ferror(fd)) goto exit; @@ -26,7 +26,7 @@ index 2b0e43862..e319673f1 100644 static const char set_x[] = "set -x\n"; /* Assume failures will be caught by the write below */ Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); -@@ -258,7 +258,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -323,7 +323,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, char *mline = NULL; rpmRC rc = RPMRC_FAIL; @@ -35,7 +35,7 @@ index 2b0e43862..e319673f1 100644 if (script) { fn = writeScript(*argvp[0], script); -@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -375,7 +375,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, sname, strerror(errno)); goto exit; } else if (pid == 0) {/* Child */ @@ -44,7 +44,7 @@ index 2b0e43862..e319673f1 100644 sname, *argvp[0], (unsigned)getpid()); fclose(in); -@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -418,7 +418,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, reaped = waitpid(pid, &status, 0); } while (reaped == -1 && errno == EINTR); diff --git a/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh b/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh deleted file mode 100644 index 9b669a18d1..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh +++ /dev/null @@ -1 +0,0 @@ -export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT/usr/lib/rpm" diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb b/poky/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb index c392ac0db4..0802f26295 100644 --- a/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb +++ b/poky/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb @@ -24,8 +24,7 @@ HOMEPAGE = "http://www.rpm.org" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x;protocol=https \ - file://environment.d-rpm.sh \ +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;protocol=https \ file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ file://0001-Do-not-read-config-files-from-HOME.patch \ file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ @@ -36,57 +35,50 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x;protoc file://0001-perl-disable-auto-reqs.patch \ file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ - file://0001-tools-Add-error.h-for-non-glibc-case.patch \ - file://0001-docs-do-not-build-manpages-requires-pandoc.patch \ file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ - file://0001-CVE-2021-3521.patch \ - file://0002-CVE-2021-3521.patch \ - file://0003-CVE-2021-3521.patch \ + file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \ + file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \ " PE = "1" -SRCREV = "3e74e8ba2dd5e76a5353d238dc7fc38651ce27b3" +SRCREV = "13b4521341781293c41ac898aa9c2d2f6bc1f21d" S = "${WORKDIR}/git" -DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3" +DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd" DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" -inherit autotools gettext pkgconfig python3native -export PYTHON_ABI - -AUTOTOOLS_AUXDIR = "${S}/build-aux" - -# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe -EXTRA_AUTORECONF:append = " --exclude=gnu-configize" - -# Vendor is detected differently on x86 and aarch64 hosts and can feed into target packages -EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt --with-vendor=pc" -EXTRA_OECONF:append:libc-musl = " --disable-nls --disable-openmp" +EXTRA_OECMAKE:append = " -D__CURL:FILEPATH=curl" +EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF" # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs # --localstatedir prevents rpm from writing its database to native sysroot when building images -# Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset -# plugins both behave badly inside builds. -EXTRA_OECONF:append:class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" -EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins" +EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var" +EXTRA_OECMAKE:append:class-nativesdk = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc" + +inherit cmake gettext pkgconfig python3targetconfig +OECMAKE_GENERATOR = "Unix Makefiles" BBCLASSEXTEND = "native nativesdk" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd" -# The inhibit plugin serves no purpose outside of the target -PACKAGECONFIG:remove:class-native = "inhibit" -PACKAGECONFIG:remove:class-nativesdk = "inhibit" +PACKAGECONFIG ??= "internal-openpgp" + +PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" +PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF" -PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" -PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus" -PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive" -PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3" -PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb" -PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro" -PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd" +# Deprecated! https://fedoraproject.org/wiki/Changes/RpmSequoia +PACKAGECONFIG[internal-openpgp] = "-DWITH_INTERNAL_OPENPGP=ON,-DWITH_INTERNAL_OPENPGP=OFF" -ASNEEDED = "" +PACKAGECONFIG[cap] = "-DWITH_CAP=ON,-DWITH_CAP=OFF" +PACKAGECONFIG[acl] = "-DWITH_ACL=ON,-DWITH_ACL=OFF" +PACKAGECONFIG[archive] = "-DWITH_ARCHIVE=ON,-DWITH_ARCHIVE=OFF,libarchive" +PACKAGECONFIG[selinux] = "-DWITH_SELINUX=ON,-DWITH_SELINUX=OFF,libselinux" +PACKAGECONFIG[dbus] = "-DWITH_DBUS=ON,-DWITH_DBUS=OFF" +PACKAGECONFIG[audit] = "-DWITH_AUDIT=ON,-DWITH_AUDIT=OFF,audit" +PACKAGECONFIG[fsverity] = "-DWITH_FSVERITY=ON,-DWITH_FSVERITY=OFF" +PACKAGECONFIG[imaevm] = "-DWITH_IMAEVM=ON,-DWITH_IMAEVM=OFF,ima-evm-utils" +PACKAGECONFIG[fapolicyd] = "-DWITH_FAPOLICYD=ON,-DWITH_FAPOLICYD=OFF" +PACKAGECONFIG[readline] = "-DWITH_READLINE=ON,-DWITH_READLINE=OFF,readline" # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in # libmagic also has sysroot path contamination, so override it @@ -104,10 +96,6 @@ WRAPPER_TOOLS = " \ ${libdir}/rpm/rpmdeps \ " -do_configure:prepend() { - mkdir -p ${S}/build-aux -} - do_install:append:class-native() { for tool in ${WRAPPER_TOOLS}; do test -x ${D}$tool && create_wrapper ${D}$tool \ @@ -119,18 +107,14 @@ do_install:append:class-native() { } do_install:append:class-nativesdk() { - for tool in ${WRAPPER_TOOLS}; do - test -x ${D}$tool && create_wrapper ${D}$tool \ - RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ - RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ - MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 - done - rm -rf ${D}/var - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh + export RPM_CONFIGDIR="${libdir}/rpm" + export RPM_ETCCONFIGDIR="${SDKPATHNATIVE}" + export RPM_NO_CHROOT_FOR_SCRIPTS=1 + EOF } # Rpm's make install creates var/tmp which clashes with base-files packaging @@ -139,11 +123,17 @@ do_install:append:class-target() { } do_install:append:class-nativesdk() { rm -rf ${D}${SDKPATHNATIVE}/var + # Ensure find-debuginfo is located correctly inside SDK + mkdir -p ${D}${libdir}/rpm + echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${libdir}/rpm/macros } do_install:append () { sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${STAGING_DIR_NATIVE}/::g' \ ${D}/${libdir}/rpm/macros + sed -i -e 's:${RECIPE_SYSROOT}/::g' \ + ${D}/${libdir}/cmake/rpm/rpm-targets.cmake } @@ -164,10 +154,9 @@ FILES:${PN}-build = "\ ${libdir}/librpmbuild.so.* \ ${libdir}/rpm/brp-* \ ${libdir}/rpm/check-* \ - ${libdir}/rpm/debugedit \ ${libdir}/rpm/sepdebugcrcfix \ - ${libdir}/rpm/find-debuginfo.sh \ ${libdir}/rpm/find-lang.sh \ + ${libdir}/rpm/sysusers.sh \ ${libdir}/rpm/*provides* \ ${libdir}/rpm/*requires* \ ${libdir}/rpm/*deps* \ @@ -190,9 +179,9 @@ FILES:${PN}-archive = "\ PACKAGES += "python3-rpm" PROVIDES += "python3-rpm" -FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" +FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info" -RDEPENDS:${PN}-build = "bash perl python3-core" +RDEPENDS:${PN}-build = "bash perl python3-core debugedit" PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" diff --git a/poky/meta/recipes-devtools/xmlto/xmlto-0.0.28/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch b/poky/meta/recipes-devtools/xmlto/xmlto-0.0.28/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch deleted file mode 100644 index 6d547a6c99..0000000000 --- a/poky/meta/recipes-devtools/xmlto/xmlto-0.0.28/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch +++ /dev/null @@ -1,30 +0,0 @@ -configure.in: drop the test of xmllint and xsltproc - -The test is unnecessary, the xmllint and xsltproc were explicitly -added to RDEPENDS. - -Upstream-Status: Inappropriate -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - configure.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -42,10 +42,10 @@ AC_ARG_VAR([LOCALE], [Name and path of the `locale' program.]) - AC_PATH_PROG([LOCALE], [locale], [locale]) - - AC_ARG_VAR([XMLLINT], [Name and path of the `xmllint' program.]) --AC_PATH_PROG([XMLLINT], [xmllint], [xmllint]) -+dnl AC_PATH_PROG([XMLLINT], [xmllint], [xmllint]) - - AC_ARG_VAR([XSLTPROC], [Name and path of the `xsltproc' program.]) --AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc]) -+dnl AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc]) - - dnl - dnl toolchains --- -1.8.1.2 - diff --git a/poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb index 5cb9a4c57b..d5a0e69849 100644 --- a/poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb +++ b/poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb @@ -6,17 +6,18 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -SRC_URI = "https://releases.pagure.org/xmlto/xmlto-${PV}.tar.gz \ - file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \ -" -SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6" -SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3" +SRCREV = "6fa6a0e07644f20abf2596f78a60112713e11cbe" +UPSTREAM_CHECK_COMMITS = "1" +SRC_URI = "git://pagure.io/xmlto.git;protocol=https;branch=master" +S = "${WORKDIR}/git" + +PV .= "+0.0.29+git" inherit autotools CLEANBROKEN = "1" -DEPENDS = "libxml2-native" +DEPENDS = "libxml2-native libxslt-native flex-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" RDEPENDS:${PN} = "docbook-xml-dtd4 \ docbook-xsl-stylesheets \ @@ -30,11 +31,15 @@ RDEPENDS:${PN}:append:class-target = " \ libxslt-bin \ coreutils \ " -CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=tail ac_cv_path_GREP=grep" +CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=tail ac_cv_path_GREP=grep ac_cv_path_XMLLINT=xmllint ac_cv_path_XSLTPROC=xsltproc" BBCLASSEXTEND = "native" -EXTRA_OECONF:append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc" +EXTRA_OECONF:append = " BASH=/bin/bash GCP=/bin/cp" + +do_configure:prepend() { + (cd ${S} && flex -o xmlif/xmlif.c xmlif/xmlif.l) +} do_install:append:class-native() { create_wrapper ${D}${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog diff --git a/poky/meta/recipes-extended/cracklib/cracklib_2.9.7.bb b/poky/meta/recipes-extended/cracklib/cracklib_2.9.7.bb index 629069e844..7b5f76c36f 100644 --- a/poky/meta/recipes-extended/cracklib/cracklib_2.9.7.bb +++ b/poky/meta/recipes-extended/cracklib/cracklib_2.9.7.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" DEPENDS = "cracklib-native zlib" EXTRA_OECONF = "--without-python --libdir=${base_libdir}" +EXTRA_OEMAKE = "CFLAGS='-Wno-incompatible-pointer-types'" SRC_URI = "git://github.com/cracklib/cracklib;protocol=https;branch=master \ file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ diff --git a/poky/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch b/poky/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch new file mode 100644 index 0000000000..f7e0854cd9 --- /dev/null +++ b/poky/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch @@ -0,0 +1,112 @@ +From 5ac5885d35257888d0e4a9dda903405314f9fc84 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 10 Aug 2022 17:53:13 -0700 +Subject: [PATCH] configure: Add correct system headers and prototypes to tests + +Newer compilers e.g. clang-15+ have turned stricter towards these +warnings and turned them into errors which results in subtle failures +during build, therefore make the testcases use the needed headers and +modern C + +Upstream-Status: Inactive-Upstream + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + unix/configure | 51 +++++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 40 insertions(+), 11 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 49579f3..8fd82dd 100755 +--- a/unix/configure ++++ b/unix/configure +@@ -379,14 +379,37 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + + # Check for missing functions + # add NO_'function_name' to flags if missing +-for func in fchmod fchown lchown nl_langinfo +-do +- echo Check for $func +- echo "int main(){ $func(); return 0; }" > conftest.c +- $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null +- [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" +-done ++echo Check for fchmod ++cat > conftest.c << _EOF_ ++#include <sys/stat.h> ++int main(){ fchmod(0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_FCHMOD" + ++echo Check for fchown ++cat > conftest.c << _EOF_ ++#include <unistd.h> ++int main(){ fchown(0,0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_FCHOWN" ++ ++echo Check for lchown ++cat > conftest.c << _EOF_ ++#include <unistd.h> ++int main(){ lchown(NULL,0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_LCHOWN" ++ ++echo Check for nl_langinfo ++cat > conftest.c << _EOF_ ++#include <langinfo.h> ++int main(){ nl_langinfo(0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_NL_LANGINFO" + # Check (seriously) for a working lchmod. + echo 'Check for lchmod' + temp_file="/tmp/unzip_test_$$" +@@ -401,14 +424,17 @@ ln -s "${temp_link}" "${temp_file}" && \ + rm -f "${temp_file}" + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++cat > conftest.c << _EOF_ ++#include <string.h> ++int main(){ char k; memset(&k,0,0); return 0; } ++_EOF_ + $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DZMEM" + + echo Check for errno declaration + cat > conftest.c << _EOF_ + #include <errno.h> +-main() ++int main() + { + errno = 0; + return 0; +@@ -419,6 +445,8 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + + echo Check for directory libraries + cat > conftest.c << _EOF_ ++#include <sys/types.h> ++#include <dirent.h> + int main() { return closedir(opendir(".")); } + _EOF_ + +@@ -523,10 +551,11 @@ fi + # needed for AIX (and others ?) when mmap is used + echo Check for valloc + cat > conftest.c << _EOF_ +-main() ++#include <stdlib.h> ++int main() + { + #ifdef MMAP +- valloc(); ++ valloc(0); + #endif + } + _EOF_ +-- +2.37.1 + diff --git a/poky/meta/recipes-extended/unzip/unzip/0001-unix-configure-fix-detection-for-cross-compilation.patch b/poky/meta/recipes-extended/unzip/unzip/0001-unix-configure-fix-detection-for-cross-compilation.patch new file mode 100644 index 0000000000..2fa7f481b7 --- /dev/null +++ b/poky/meta/recipes-extended/unzip/unzip/0001-unix-configure-fix-detection-for-cross-compilation.patch @@ -0,0 +1,103 @@ +From 5cbf901b5c3b6a7d1d0ed91b6df4194bb6d25a40 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Thu, 15 Jun 2023 07:14:17 -0700 +Subject: [PATCH] unix/configure: fix detection for cross compilation + +We're doing cross compilation, running a cross-compiled problem +on host to detemine feature is not correct. So we change runtime +check into compile-time check to detect the features. + +Upstream-Status: Inactive-Upstream + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + unix/configure | 44 +++++++++++++++----------------------------- + 1 file changed, 15 insertions(+), 29 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 8fd82dd..68dee98 100755 +--- a/unix/configure ++++ b/unix/configure +@@ -259,6 +259,10 @@ cat > conftest.c << _EOF_ + #include <sys/stat.h> + #include <unistd.h> + #include <stdio.h> ++ ++_Static_assert(sizeof(off_t) < 8, "sizeof off_t < 8 failed"); ++_Static_assert(sizeof((struct stat){0}.st_size) < 8, "sizeof st_size < 8 failed"); ++ + int main() + { + off_t offset; +@@ -278,21 +282,10 @@ _EOF_ + # compile it + $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then +- echo -- no Large File Support ++ echo -- yes we have Large File Support! ++ CFLAGSR="${CFLAGSR} -DLARGE_FILE_SUPPORT" + else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- no Large File Support - no 64-bit off_t +- elif [ $r -eq 2 ]; then +- echo -- no Large File Support - no 64-bit stat +- elif [ $r -eq 3 ]; then +- echo -- yes we have Large File Support! +- CFLAGSR="${CFLAGSR} -DLARGE_FILE_SUPPORT" +- else +- echo -- no Large File Support - conftest returned $r +- fi ++ echo -- no Large File Support + fi + + # Added 11/24/2005 EG +@@ -302,6 +295,11 @@ cat > conftest.c << _EOF_ + #include <stdlib.h> + #include <stdio.h> + #include <wchar.h> ++ ++#ifndef __STDC_ISO_10646__ ++#error "__STDC_ISO_10646__ not defined ++#endif ++ + int main() + { + size_t wsize; +@@ -327,19 +325,8 @@ if [ $? -ne 0 ]; then + echo "-- no Unicode (wchar_t) support" + else + # have wide char support +-# run it +- ./conftest +- r=$? +- if [ $r -eq 0 ]; then +- echo -- no Unicode wchar_t support - wchar_t allocation error +- elif [ $r -eq 1 ]; then +- echo -- no Unicode support - wchar_t encoding unspecified +- elif [ $r -eq 2 ]; then +- echo -- have wchar_t with known UCS encoding - enabling Unicode support! +- CFLAGSR="${CFLAGSR} -DUNICODE_SUPPORT -DUNICODE_WCHAR" +- else +- echo "-- no Unicode (wchar_t) support - conftest returned $r" +- fi ++ echo -- have wchar_t with known UCS encoding - enabling Unicode support! ++ CFLAGSR="${CFLAGSR} -DUNICODE_SUPPORT -DUNICODE_WCHAR" + fi + + echo "Check for setlocale support (needed for UNICODE Native check)" +@@ -418,8 +405,7 @@ temp_link="link_$$" + echo "int main() { lchmod(\"${temp_file}\", 0666); }" \ + ) > conftest.c + ln -s "${temp_link}" "${temp_file}" && \ +- $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null && \ +- ./conftest ++ $CC -Werror=implicit-function-declaration $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null + [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_LCHMOD" + rm -f "${temp_file}" + +-- +2.34.1 + diff --git a/poky/meta/recipes-extended/unzip/unzip_6.0.bb b/poky/meta/recipes-extended/unzip/unzip_6.0.bb index f35856cf61..27076d5d9b 100644 --- a/poky/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/poky/meta/recipes-extended/unzip/unzip_6.0.bb @@ -5,7 +5,6 @@ SECTION = "console/utils" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" PE = "1" -PR = "r5" SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \ file://avoid-strip.patch \ @@ -31,14 +30,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/ file://CVE-2021-4217.patch \ file://CVE-2022-0529.patch \ file://CVE-2022-0530.patch \ + file://0001-configure-Add-correct-system-headers-and-prototypes-.patch \ + file://0001-unix-configure-fix-detection-for-cross-compilation.patch \ " UPSTREAM_VERSION_UNKNOWN = "1" SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" -# Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source -CVE_CHECK_IGNORE += "CVE-2008-0888" +CVE_STATUS[CVE-2008-0888] = "fixed-version: Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source" # exclude version 5.5.2 which triggers a false positive UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz" |