bit7z: upgrade 4.0.9 -> 4.0.11
A message that is not in the archive (sent off-list or not yet received): [email protected]
ping
________________________________
发件人: [email protected] <[email protected]> 代表 Yiding Liu (Fujitsu) via lists.openembedded.org <[email protected]> 发送时间: 2026年2月26日 17:19
收件人: [email protected] <[email protected]>
主题: [oe][meta-oe][PATCH v2] bit7z: upgrade 4.0.9 -> 4.0.11
1. Changelog:
https://github.com/rikyoz/bit7z/releases/tag/v4.0.11
2. Drop following patches as they were merged upstream. 0001-Fix-reinterpret-cast-compiler-errors.patch 0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch 0001-Allow-running-tests-on-target-when-cross-compiling.patch 0001-Allow-specifying-path-to-7z-library-in-tests.patch 0001-Fix-tests-with-musl.patch
3. Adjust Ptest SRCREV to adopt to latest bit7z
SRCREV_filesystem refer to bit7z-4.0.11/cmake/Dependencies.cmake SRCREV_catch2 refer to bit7z-4.0.11/tests/CMakeLists.txt SRCHASH_CPM and TAG_CPM refer to bit7z-4.0.11/cmake/Dependencies.cmake
4.cmake/Dependencies.cmake has redefined to check and download CPM_${CPM_DOWNLOAD_VERSION}.cmake file to CPM_SOURCE_CACHE, so it will show error in do_configure as ./build/cpm_cache/cpm/CPM_0.42.0.cmake is empty
| -- Downloading CPM.cmake to ...bit7z/4.0.11/build/cpm_cache/cpm/CPM_0.42.0.cmake | CMake Error at cmake/Dependencies.cmake:15 (file): | file DOWNLOAD cannot compute hash on failed download | | from url: "https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.42.0/CPM.cmake" | status: [6;"Could not resolve hostname"]
So change ${B}/cmake to ${B}/cpm_cache/cpm/ to fix this issue.
./build/cpm_cache/cpm/CPM_0.42.0.cmake5. Add 0001-cmake-disable-filesystem-gitclone.patch to fix filesystem git clone error
Fix error log as following:
| fatal: unable to access 'https://github.com/rikyoz/filesystem.git/': Could not resolve host: github.com | Had to git clone more than once: 3 times. | CMake Error at bit7z/4.0.11/build/_deps/ghc_filesystem-subbuild/ghc_filesystem-populate-prefix/tmp/ghc_filesystem-populate-gitclone.cmake:50 (message): | Failed to clone repository: 'https://github.com/rikyoz/filesystem.git'
---
...tests-on-target-when-cross-compiling.patch | 45 ----------------
...ecifying-path-to-7z-library-in-tests.patch | 48 -----------------
...ge-in-BitPropVariant-on-Arm-architec.patch | 41 ---------------
...Fix-reinterpret-cast-compiler-errors.patch | 52 -------------------
.../7zip/bit7z/0001-Fix-tests-with-musl.patch | 51 ------------------
...01-cmake-disable-filesystem-gitclone.patch | 37 +++++++++++++
.../7zip/{bit7z_4.0.9.bb => bit7z_4.0.11.bb} | 30 +++++------
7 files changed, 49 insertions(+), 255 deletions(-)
delete mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch
delete mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch
delete mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch
delete mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch
delete mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch
create mode 100644 meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch
rename meta-oe/recipes-extended/7zip/{bit7z_4.0.9.bb => bit7z_4.0.11.bb} (76%)meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch deleted +0 -45
@@ -1,45 +0,0 @@ -From 9f0eed91d32ec2f310bd5c23af187f888394fcb4 Mon Sep 17 00:00:00 2001 -From: Peter Marko <[email protected]> -Date: Wed, 2 Apr 2025 09:33:03 +0200 -Subject: [PATCH] Allow running tests on target when cross-compiling - -When bit7z is Cross-compiled, target device does not contain -source/build directory anymore and thus path to test data is different. -Make it possible to pass the new path to cmake. - -Upstream-Status: Submitted [https://github.com/rikyoz/bit7z/pull/289] -Signed-off-by: Peter Marko <[email protected]> ---- - tests/CMakeLists.txt | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 60da280..dbdff1f 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -49,6 +49,11 @@ add_executable( ${TESTS_TARGET_PUBLIC} ${SOURCE_FILES} ${PUBLIC_API_SOURCE_FILES - - if( BIT7Z_TESTS_FILESYSTEM ) - set( BIT7Z_TESTS_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/data ) -+ if( NOT BIT7Z_TESTS_DATA_DIR_TARGET ) -+ set( BIT7Z_TESTS_DATA_DIR_TARGET ${BIT7Z_TESTS_DATA_DIR} ) -+ else() -+ message( STATUS "Custom test data dir on target: ${BIT7Z_TESTS_DATA_DIR_TARGET}" ) -+ endif() - - include( FetchContent ) - FetchContent_Declare( bit7z-test-data -@@ -61,11 +66,11 @@ if( BIT7Z_TESTS_FILESYSTEM ) - message( STATUS "Tests data directory: ${BIT7Z_TESTS_DATA_DIR}" ) - target_compile_definitions( ${TESTS_TARGET} PRIVATE - BIT7Z_TESTS_FILESYSTEM -- BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR}" ) -+ BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR_TARGET}" ) - target_compile_definitions( ${TESTS_TARGET_PUBLIC} PRIVATE - BIT7Z_TESTS_PUBLIC_API_ONLY - BIT7Z_TESTS_FILESYSTEM -- BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR}" ) -+ BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR_TARGET}" ) - if( NOT EXISTS ${BIT7Z_TESTS_DATA_DIR}/test_filesystem/empty ) - file( MAKE_DIRECTORY ${BIT7Z_TESTS_DATA_DIR}/test_filesystem/empty ) - endif()
meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch deleted +0 -48
48 lines not on this page · raw message
meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch deleted +0 -41
41 lines not on this page · raw message
meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch deleted +0 -52
52 lines not on this page · raw message
meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch deleted +0 -51
51 lines not on this page · raw message
meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch new file +37 -0
@@ -0,0 +1,37 @@ +Subject: [PATCH] cmake: disable filesystem gitclone + +In Yocto we don't download filesystem, it is satisfied from source dir. +This Dependencies.cmake file would try to download filesystem even if it is satisfied. + +Fix error log as following: +| fatal: unable to access 'https://github.com/rikyoz/filesystem.git/': Could not resolve host: github.com +| Had to git clone more than once: 3 times. +| CMake Error at bit7z/4.0.11/build/_deps/ghc_filesystem-subbuild/ghc_filesystem-populate-prefix/tmp/ghc_filesystem-populate-gitclone.cmake:50 (message): +| Failed to clone repository: 'https://github.com/rikyoz/filesystem.git' + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Liu Yiding <[email protected]> +--- + cmake/Dependencies.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 110d9c2b..dc1dead8 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -39,10 +39,9 @@ if( NOT USE_STANDARD_FILESYSTEM OR NOT STANDARD_FILESYSTEM_COMPILES OR BIT7Z_BUI + CPMAddPackage( NAME ghc_filesystem + GITHUB_REPOSITORY rikyoz/filesystem + GIT_TAG b99c2aebd5ddd6fb2f190731ba80b949fc3842b5 +- DOWNLOAD_ONLY YES ) ++ SOURCE_DIR "${CPM_SOURCE_CACHE}/ghc_filesystem" ) + if( ghc_filesystem_ADDED ) + message( STATUS "ghc::filesystem source code available at ${ghc_filesystem_SOURCE_DIR}" ) +- add_library( ghc_filesystem INTERFACE IMPORTED ) + target_include_directories( ghc_filesystem SYSTEM INTERFACE ${ghc_filesystem_SOURCE_DIR}/include ) + endif() + endif() +-- +2.43.0 +
meta-oe/recipes-extended/7zip/bit7z_4.0.11.bb renamed from meta-oe/recipes-extended/7zip/bit7z_4.0.9.bb +12 -18
@@ -4,32 +4,27 @@ LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=48a3fe23ed1353e0995dadfda05ffdb6" SRC_URI = " \ - git://github.com/rikyoz/bit7z.git;protocol=https;branch=master \ + git://github.com/rikyoz/bit7z.git;protocol=https;branch=master;tag=v${PV} \ ${@bb.utils.contains('PTEST_ENABLED', '1', d.getVar('SRC_URI_PTEST'), 'file://0001-cmake-disable-dependency-inclusion.patch', d)} \ - file://0001-Fix-reinterpret-cast-compiler-errors.patch \ - file://0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch \ - file://0001-Allow-running-tests-on-target-when-cross-compiling.patch \ - file://0001-Allow-specifying-path-to-7z-library-in-tests.patch \ - file://0001-Fix-tests-with-musl.patch \ " -SRCREV = "386e00ad3286e7a10e5bb6d05a5b41b523fce623" +SRCREV = "82f359371fda5c16c037ac0659b969334816a9c4" # ptest dependencies and their revisions SRC_URI_PTEST = " \ git://github.com/rikyoz/filesystem.git;protocol=https;branch=glibcxx_wchar_streams_workaround;name=filesystem;destsuffix=filesystem \ git://github.com/rikyoz/bit7z-test-data.git;protocol=https;branch=main;name=testdata;destsuffix=testdata \ - git://github.com/catchorg/Catch2.git;protocol=https;branch=v2.x;name=catch2;destsuffix=catch2;tag=${TAG_catch2} \ + git://github.com/rikyoz/Catch2.git;protocol=https;branch=single-header-v2.x;name=catch2;destsuffix=catch2 \ https://github.com/cpm-cmake/CPM.cmake/releases/download/v${TAG_CPM}/CPM.cmake;downloadfilename=CPM_${TAG_CPM}.cmake \ file://run-ptest \ + file://0001-cmake-disable-filesystem-gitclone.patch \ " SRCREV_FORMAT = "${@bb.utils.contains('PTEST_ENABLED', '1', 'default_filesystem_testdata_catch2', 'default', d)}" -SRCREV_filesystem = "983650f374699e3979f9cdefe13ddff60bd4ac68" +SRCREV_filesystem = "b99c2aebd5ddd6fb2f190731ba80b949fc3842b5" SRCREV_testdata = "077e407b1c07b7443626b5902eeb4819388bf656" -SRCREV_catch2 = "182c910b4b63ff587a3440e08f84f70497e49a81" -TAG_catch2 = "v2.13.10" -SRCHASH_CPM = "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d" -TAG_CPM = "0.40.2" +SRCREV_catch2 = "27d8db1770dd5cd3688656095f242474431584a1" +SRCHASH_CPM = "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a" +TAG_CPM = "0.42.0" SRC_URI[sha256sum] = "${SRCHASH_CPM}"
@@ -51,15 +46,14 @@ do_configure:prepend() { # verify that all dependencies have correct version grep -q ${SRCREV_filesystem} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_filesystem'!" grep -q ${SRCREV_testdata} ${S}/tests/CMakeLists.txt || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_testdata'!" - grep -q ${TAG_catch2} ${S}/tests/cmake/Catch2.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_catch2'!" + grep -q ${SRCREV_catch2} ${S}/tests/CMakeLists.txt || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_catch2'!" grep -q ${SRCHASH_CPM} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCHASH_CPM'!" if ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then # use cache instead of download for CPM (CMake's missing package manager) - mkdir -p ${B}/cmake - cp ${UNPACKDIR}/CPM_${TAG_CPM}.cmake ${B}/cmake - mkdir -p ${B}/cpm_cache/ghc_filesystem - cp -r ${UNPACKDIR}/filesystem ${B}/cpm_cache/ghc_filesystem/fbcc9a9e94e6365273cf51294173f21ff5efdb4f + mkdir -p ${B}/cpm_cache/cpm/ + cp ${UNPACKDIR}/CPM_${TAG_CPM}.cmake ${B}/cpm_cache/cpm/ + cp -r ${UNPACKDIR}/filesystem ${B}/cpm_cache/ghc_filesystem # avoid buildpaths issue as unpackdir is not in prefix maps cp -r ${UNPACKDIR}/catch2 ${B} fi
--
2.43.0