diff options
| author | Liu Yiding <liuyd.fnst@fujitsu.com> | 2026-02-26 17:19:28 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-03-17 13:25:22 -0700 |
| commit | 5dd79230ea712294808b67c575d8f855e4ea32a0 (patch) | |
| tree | c627f80e5dd3e0651463a54b24a4c626ef688ae2 | |
| parent | c0a3c429f17e369fc80f15f4742557b3f437be3b (diff) | |
| download | meta-openembedded-5dd79230ea712294808b67c575d8f855e4ea32a0.tar.gz | |
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.cmake
5. 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'
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch | 45 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch | 48 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch | 41 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch | 52 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch | 51 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch | 37 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/7zip/bit7z_4.0.11.bb (renamed from meta-oe/recipes-extended/7zip/bit7z_4.0.9.bb) | 30 |
7 files changed, 49 insertions, 255 deletions
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch deleted file mode 100644 index b6e24a9519..0000000000 --- a/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-running-tests-on-target-when-cross-compiling.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From 9f0eed91d32ec2f310bd5c23af187f888394fcb4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Marko <peter.marko@siemens.com> | ||
| 3 | Date: Wed, 2 Apr 2025 09:33:03 +0200 | ||
| 4 | Subject: [PATCH] Allow running tests on target when cross-compiling | ||
| 5 | |||
| 6 | When bit7z is Cross-compiled, target device does not contain | ||
| 7 | source/build directory anymore and thus path to test data is different. | ||
| 8 | Make it possible to pass the new path to cmake. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/rikyoz/bit7z/pull/289] | ||
| 11 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 12 | --- | ||
| 13 | tests/CMakeLists.txt | 9 +++++++-- | ||
| 14 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt | ||
| 17 | index 60da280..dbdff1f 100644 | ||
| 18 | --- a/tests/CMakeLists.txt | ||
| 19 | +++ b/tests/CMakeLists.txt | ||
| 20 | @@ -49,6 +49,11 @@ add_executable( ${TESTS_TARGET_PUBLIC} ${SOURCE_FILES} ${PUBLIC_API_SOURCE_FILES | ||
| 21 | |||
| 22 | if( BIT7Z_TESTS_FILESYSTEM ) | ||
| 23 | set( BIT7Z_TESTS_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/data ) | ||
| 24 | + if( NOT BIT7Z_TESTS_DATA_DIR_TARGET ) | ||
| 25 | + set( BIT7Z_TESTS_DATA_DIR_TARGET ${BIT7Z_TESTS_DATA_DIR} ) | ||
| 26 | + else() | ||
| 27 | + message( STATUS "Custom test data dir on target: ${BIT7Z_TESTS_DATA_DIR_TARGET}" ) | ||
| 28 | + endif() | ||
| 29 | |||
| 30 | include( FetchContent ) | ||
| 31 | FetchContent_Declare( bit7z-test-data | ||
| 32 | @@ -61,11 +66,11 @@ if( BIT7Z_TESTS_FILESYSTEM ) | ||
| 33 | message( STATUS "Tests data directory: ${BIT7Z_TESTS_DATA_DIR}" ) | ||
| 34 | target_compile_definitions( ${TESTS_TARGET} PRIVATE | ||
| 35 | BIT7Z_TESTS_FILESYSTEM | ||
| 36 | - BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR}" ) | ||
| 37 | + BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR_TARGET}" ) | ||
| 38 | target_compile_definitions( ${TESTS_TARGET_PUBLIC} PRIVATE | ||
| 39 | BIT7Z_TESTS_PUBLIC_API_ONLY | ||
| 40 | BIT7Z_TESTS_FILESYSTEM | ||
| 41 | - BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR}" ) | ||
| 42 | + BIT7Z_TESTS_DATA_DIR="${BIT7Z_TESTS_DATA_DIR_TARGET}" ) | ||
| 43 | if( NOT EXISTS ${BIT7Z_TESTS_DATA_DIR}/test_filesystem/empty ) | ||
| 44 | file( MAKE_DIRECTORY ${BIT7Z_TESTS_DATA_DIR}/test_filesystem/empty ) | ||
| 45 | endif() | ||
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch deleted file mode 100644 index adc0d67d97..0000000000 --- a/meta-oe/recipes-extended/7zip/bit7z/0001-Allow-specifying-path-to-7z-library-in-tests.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | From 60137ec132951f941f2fb98cd6353717b322cbf1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Marko <peter.marko@siemens.com> | ||
| 3 | Date: Wed, 2 Apr 2025 10:17:38 +0200 | ||
| 4 | Subject: [PATCH] Allow specifying path to 7z library in tests | ||
| 5 | |||
| 6 | For instance to override path to library on Linux when using real 7-zip | ||
| 7 | instead of pzip: /usr/lib/lib7z.so | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/rikyoz/bit7z/pull/288] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | tests/CMakeLists.txt | 7 +++++++ | ||
| 13 | tests/src/utils/shared_lib.hpp | 4 +++- | ||
| 14 | 2 files changed, 10 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt | ||
| 17 | index 60da280d..1307366a 100644 | ||
| 18 | --- a/tests/CMakeLists.txt | ||
| 19 | +++ b/tests/CMakeLists.txt | ||
| 20 | @@ -103,6 +103,13 @@ message( STATUS "Use system 7-zip for tests: ${BIT7Z_TESTS_USE_SYSTEM_7ZIP}" ) | ||
| 21 | if( BIT7Z_TESTS_USE_SYSTEM_7ZIP ) | ||
| 22 | target_compile_definitions( ${TESTS_TARGET} PRIVATE BIT7Z_TESTS_USE_SYSTEM_7ZIP ) | ||
| 23 | target_compile_definitions( ${TESTS_TARGET_PUBLIC} PRIVATE BIT7Z_TESTS_USE_SYSTEM_7ZIP ) | ||
| 24 | +else() | ||
| 25 | + set( BIT7Z_TESTS_7Z_LIBRARY_PATH "" CACHE STRING "The path of the 7-Zip library to be used for running the tests" ) | ||
| 26 | + if( NOT BIT7Z_TESTS_7Z_LIBRARY_PATH STREQUAL "" ) | ||
| 27 | + message( STATUS "Use custom 7-zip library for tests: ${BIT7Z_TESTS_7Z_LIBRARY_PATH}" ) | ||
| 28 | + target_compile_definitions( ${TESTS_TARGET} PRIVATE BIT7Z_TESTS_7Z_LIBRARY_PATH="${BIT7Z_TESTS_7Z_LIBRARY_PATH}" ) | ||
| 29 | + target_compile_definitions( ${TESTS_TARGET_PUBLIC} PRIVATE BIT7Z_TESTS_7Z_LIBRARY_PATH="${BIT7Z_TESTS_7Z_LIBRARY_PATH}" ) | ||
| 30 | + endif() | ||
| 31 | endif() | ||
| 32 | |||
| 33 | # Avoiding linking unnecessary libraries. | ||
| 34 | diff --git a/tests/src/utils/shared_lib.hpp b/tests/src/utils/shared_lib.hpp | ||
| 35 | index 41435a9b..8bc02939 100644 | ||
| 36 | --- a/tests/src/utils/shared_lib.hpp | ||
| 37 | +++ b/tests/src/utils/shared_lib.hpp | ||
| 38 | @@ -20,7 +20,9 @@ namespace bit7z { | ||
| 39 | namespace test { | ||
| 40 | |||
| 41 | inline auto sevenzip_lib_path() -> tstring { | ||
| 42 | -#ifdef BIT7Z_TESTS_USE_SYSTEM_7ZIP | ||
| 43 | +#ifdef BIT7Z_TESTS_7Z_LIBRARY_PATH | ||
| 44 | + static const tstring lib_path = BIT7Z_STRING( BIT7Z_TESTS_7Z_LIBRARY_PATH ); | ||
| 45 | +#elif defined( BIT7Z_TESTS_USE_SYSTEM_7ZIP ) | ||
| 46 | #ifdef _WIN64 | ||
| 47 | static const tstring lib_path = BIT7Z_STRING( "C:\\Program Files\\7-Zip\\7z.dll" ); | ||
| 48 | #elif defined( _WIN32 ) | ||
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch deleted file mode 100644 index b1bf6923f2..0000000000 --- a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | From d504abaf2b0a514193f52df42098bc16de4718b2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Oz <rik20@live.it> | ||
| 3 | Date: Fri, 17 Jan 2025 21:23:59 +0100 | ||
| 4 | Subject: [PATCH] Fix int8_t storage in BitPropVariant on Arm architectures | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/rikyoz/bit7z/commit/d504abaf2b0a514193f52df42098bc16de4718b2] | ||
| 7 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 8 | --- | ||
| 9 | include/bit7z/bitwindows.hpp | 4 ++++ | ||
| 10 | src/bitpropvariant.cpp | 2 +- | ||
| 11 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/include/bit7z/bitwindows.hpp b/include/bit7z/bitwindows.hpp | ||
| 14 | index 5849b956..2f29a989 100644 | ||
| 15 | --- a/include/bit7z/bitwindows.hpp | ||
| 16 | +++ b/include/bit7z/bitwindows.hpp | ||
| 17 | @@ -126,7 +126,11 @@ struct PROPVARIANT { | ||
| 18 | WORD wReserved2; | ||
| 19 | WORD wReserved3; | ||
| 20 | union { | ||
| 21 | +#if defined( __arm__ ) || defined( __aarch64__ ) | ||
| 22 | + signed char cVal; | ||
| 23 | +#else | ||
| 24 | char cVal; | ||
| 25 | +#endif | ||
| 26 | unsigned char bVal; | ||
| 27 | short iVal; | ||
| 28 | unsigned short uiVal; | ||
| 29 | diff --git a/src/bitpropvariant.cpp b/src/bitpropvariant.cpp | ||
| 30 | index 1e7f094f..642e1268 100644 | ||
| 31 | --- a/src/bitpropvariant.cpp | ||
| 32 | +++ b/src/bitpropvariant.cpp | ||
| 33 | @@ -157,7 +157,7 @@ BitPropVariant::BitPropVariant( uint64_t value ) noexcept: PROPVARIANT() { | ||
| 34 | BitPropVariant::BitPropVariant( int8_t value ) noexcept: PROPVARIANT() { | ||
| 35 | vt = VT_I1; | ||
| 36 | wReserved1 = 0; | ||
| 37 | - cVal = static_cast< char >( value ); | ||
| 38 | + cVal = static_cast< decltype(cVal) >( value ); | ||
| 39 | } | ||
| 40 | |||
| 41 | BitPropVariant::BitPropVariant( int16_t value ) noexcept: PROPVARIANT() { | ||
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch deleted file mode 100644 index 08b64f4999..0000000000 --- a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-reinterpret-cast-compiler-errors.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | From bedeec4d57d29be7de91697277ace00ba87d3e75 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Marko <peter.marko@siemens.com> | ||
| 3 | Date: Tue, 1 Apr 2025 15:23:51 +0200 | ||
| 4 | Subject: [PATCH] Fix reinterpret-cast compiler errors | ||
| 5 | |||
| 6 | Building on 32-bit arm, following warning/error occurs: | ||
| 7 | |||
| 8 | src/internal/windows.cpp: In function 'bit7z::OLECHAR* AllocStringBuffer(LPCSTR, uint32_t)': | ||
| 9 | src/internal/windows.cpp:79:6: error: cast from 'unsigned char*' to 'bstr_prefix_t*' {aka 'unsigned int*'} increases required alignment of target type [-Werror=cast-align] | ||
| 10 | 79 | *reinterpret_cast< bstr_prefix_t* >( bstrBuffer ) = byteLength; | ||
| 11 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 12 | git/src/internal/windows.cpp:83:19: error: cast from 'unsigned char*' to 'bit7z::BSTR' {aka 'wchar_t*'} increases required alignment of target type [-Werror=cast-align] | ||
| 13 | 83 | BSTR result = reinterpret_cast< BSTR >( bstrBuffer + sizeof( bstr_prefix_t ) ); | ||
| 14 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 15 | cc1plus: all warnings being treated as errors | ||
| 16 | |||
| 17 | Fix it by using the desired variable size right away and thus avoid | ||
| 18 | casting to an array with different alignment. | ||
| 19 | |||
| 20 | Upstream-Status: Backport [https://github.com/rikyoz/bit7z/commit/b2789ea9b0fbb2a74dbf6764ddb72d60659a3bce] | ||
| 21 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 22 | --- | ||
| 23 | src/internal/windows.cpp | 7 +++---- | ||
| 24 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/src/internal/windows.cpp b/src/internal/windows.cpp | ||
| 27 | index 9304aed7..7bee5959 100644 | ||
| 28 | --- a/src/internal/windows.cpp | ||
| 29 | +++ b/src/internal/windows.cpp | ||
| 30 | @@ -68,19 +68,18 @@ auto AllocStringBuffer( LPCSTR str, uint32_t byteLength ) -> BSTR { | ||
| 31 | |||
| 32 | // Allocating memory for storing the BSTR as a byte array. | ||
| 33 | // NOLINTNEXTLINE(cppcoreguidelines-no-malloc, cppcoreguidelines-owning-memory) | ||
| 34 | - auto* bstrBuffer = static_cast< byte_t* >( std::calloc( bufferSize, sizeof( byte_t ) ) ); | ||
| 35 | + auto* bstrBuffer = static_cast< bstr_prefix_t* >( std::calloc( bufferSize, sizeof( byte_t ) ) ); | ||
| 36 | |||
| 37 | if ( bstrBuffer == nullptr ) { // Failed to allocate memory for the BSTR buffer. | ||
| 38 | return nullptr; | ||
| 39 | } | ||
| 40 | |||
| 41 | // Storing the number of bytes of the BSTR as a prefix of it. | ||
| 42 | - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) | ||
| 43 | - *reinterpret_cast< bstr_prefix_t* >( bstrBuffer ) = byteLength; | ||
| 44 | + *bstrBuffer = byteLength; | ||
| 45 | |||
| 46 | // The actual BSTR must point after the byteLength prefix. | ||
| 47 | // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-reinterpret-cast) | ||
| 48 | - BSTR result = reinterpret_cast< BSTR >( bstrBuffer + sizeof( bstr_prefix_t ) ); | ||
| 49 | + BSTR result = reinterpret_cast< BSTR >( bstrBuffer + 1 ); | ||
| 50 | if ( str != nullptr ) { | ||
| 51 | // Copying byte-by-byte the input string to the BSTR. | ||
| 52 | // Note: flawfinder warns about not checking for buffer overflows; this is a false alarm, | ||
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch deleted file mode 100644 index b1f3d0f2ec..0000000000 --- a/meta-oe/recipes-extended/7zip/bit7z/0001-Fix-tests-with-musl.patch +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | From bc5f2e5af90854c8f84b5829493dd01facf9af84 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Marko <peter.marko@siemens.com> | ||
| 3 | Date: Mon, 7 Apr 2025 16:29:32 +0200 | ||
| 4 | Subject: [PATCH] Fix tests with musl | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://github.com/rikyoz/bit7z/pull/292] | ||
| 7 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 8 | --- | ||
| 9 | tests/src/test_bitexception.cpp | 8 ++++++++ | ||
| 10 | 1 file changed, 8 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/tests/src/test_bitexception.cpp b/tests/src/test_bitexception.cpp | ||
| 13 | index 7161fcc5..d85d430d 100644 | ||
| 14 | --- a/tests/src/test_bitexception.cpp | ||
| 15 | +++ b/tests/src/test_bitexception.cpp | ||
| 16 | @@ -49,6 +49,8 @@ constexpr PortableErrorTest hresult_tests[] = { // NOLINT(*-avoid-c-arrays) | ||
| 17 | { HRESULT_WIN32_TEST( ERROR_OPEN_FAILED ), | ||
| 18 | #ifdef _WIN32 | ||
| 19 | "The system cannot open the device or file specified.", | ||
| 20 | +#elif defined( __linux__ ) && !defined ( __GLIBC__ ) | ||
| 21 | + "I/O error", | ||
| 22 | #else | ||
| 23 | "Input/output error", | ||
| 24 | #endif | ||
| 25 | @@ -67,6 +69,8 @@ constexpr PortableErrorTest hresult_tests[] = { // NOLINT(*-avoid-c-arrays) | ||
| 26 | { HRESULT_WIN32_TEST( ERROR_SEEK ), | ||
| 27 | #ifdef _WIN32 | ||
| 28 | "The drive cannot locate a specific area or track on the disk.", | ||
| 29 | +#elif defined( __linux__ ) && !defined ( __GLIBC__ ) | ||
| 30 | + "I/O error", | ||
| 31 | #else | ||
| 32 | "Input/output error", | ||
| 33 | #endif | ||
| 34 | @@ -74,6 +78,8 @@ constexpr PortableErrorTest hresult_tests[] = { // NOLINT(*-avoid-c-arrays) | ||
| 35 | { HRESULT_WIN32_TEST( ERROR_READ_FAULT ), | ||
| 36 | #ifdef _WIN32 | ||
| 37 | "The system cannot read from the specified device.", | ||
| 38 | +#elif defined( __linux__ ) && !defined ( __GLIBC__ ) | ||
| 39 | + "I/O error", | ||
| 40 | #else | ||
| 41 | "Input/output error", | ||
| 42 | #endif | ||
| 43 | @@ -81,6 +87,8 @@ constexpr PortableErrorTest hresult_tests[] = { // NOLINT(*-avoid-c-arrays) | ||
| 44 | { HRESULT_WIN32_TEST( ERROR_WRITE_FAULT ), | ||
| 45 | #ifdef _WIN32 | ||
| 46 | "The system cannot write to the specified device.", | ||
| 47 | +#elif defined( __linux__ ) && !defined ( __GLIBC__ ) | ||
| 48 | + "I/O error", | ||
| 49 | #else | ||
| 50 | "Input/output error", | ||
| 51 | #endif | ||
diff --git a/meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch b/meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch new file mode 100644 index 0000000000..917b70f58e --- /dev/null +++ b/meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | Subject: [PATCH] cmake: disable filesystem gitclone | ||
| 2 | |||
| 3 | In Yocto we don't download filesystem, it is satisfied from source dir. | ||
| 4 | This Dependencies.cmake file would try to download filesystem even if it is satisfied. | ||
| 5 | |||
| 6 | Fix error log as following: | ||
| 7 | | fatal: unable to access 'https://github.com/rikyoz/filesystem.git/': Could not resolve host: github.com | ||
| 8 | | Had to git clone more than once: 3 times. | ||
| 9 | | CMake Error at bit7z/4.0.11/build/_deps/ghc_filesystem-subbuild/ghc_filesystem-populate-prefix/tmp/ghc_filesystem-populate-gitclone.cmake:50 (message): | ||
| 10 | | Failed to clone repository: 'https://github.com/rikyoz/filesystem.git' | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [OE-specific] | ||
| 13 | |||
| 14 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
| 15 | --- | ||
| 16 | cmake/Dependencies.cmake | 3 +-- | ||
| 17 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake | ||
| 20 | index 110d9c2b..dc1dead8 100644 | ||
| 21 | --- a/cmake/Dependencies.cmake | ||
| 22 | +++ b/cmake/Dependencies.cmake | ||
| 23 | @@ -39,10 +39,9 @@ if( NOT USE_STANDARD_FILESYSTEM OR NOT STANDARD_FILESYSTEM_COMPILES OR BIT7Z_BUI | ||
| 24 | CPMAddPackage( NAME ghc_filesystem | ||
| 25 | GITHUB_REPOSITORY rikyoz/filesystem | ||
| 26 | GIT_TAG b99c2aebd5ddd6fb2f190731ba80b949fc3842b5 | ||
| 27 | - DOWNLOAD_ONLY YES ) | ||
| 28 | + SOURCE_DIR "${CPM_SOURCE_CACHE}/ghc_filesystem" ) | ||
| 29 | if( ghc_filesystem_ADDED ) | ||
| 30 | message( STATUS "ghc::filesystem source code available at ${ghc_filesystem_SOURCE_DIR}" ) | ||
| 31 | - add_library( ghc_filesystem INTERFACE IMPORTED ) | ||
| 32 | target_include_directories( ghc_filesystem SYSTEM INTERFACE ${ghc_filesystem_SOURCE_DIR}/include ) | ||
| 33 | endif() | ||
| 34 | endif() | ||
| 35 | -- | ||
| 36 | 2.43.0 | ||
| 37 | |||
diff --git a/meta-oe/recipes-extended/7zip/bit7z_4.0.9.bb b/meta-oe/recipes-extended/7zip/bit7z_4.0.11.bb index 033461d614..fa4f910e05 100644 --- a/meta-oe/recipes-extended/7zip/bit7z_4.0.9.bb +++ b/meta-oe/recipes-extended/7zip/bit7z_4.0.11.bb | |||
| @@ -4,32 +4,27 @@ LICENSE = "MPL-2.0" | |||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=48a3fe23ed1353e0995dadfda05ffdb6" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=48a3fe23ed1353e0995dadfda05ffdb6" |
| 5 | 5 | ||
| 6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
| 7 | git://github.com/rikyoz/bit7z.git;protocol=https;branch=master \ | 7 | git://github.com/rikyoz/bit7z.git;protocol=https;branch=master;tag=v${PV} \ |
| 8 | ${@bb.utils.contains('PTEST_ENABLED', '1', d.getVar('SRC_URI_PTEST'), 'file://0001-cmake-disable-dependency-inclusion.patch', d)} \ | 8 | ${@bb.utils.contains('PTEST_ENABLED', '1', d.getVar('SRC_URI_PTEST'), 'file://0001-cmake-disable-dependency-inclusion.patch', d)} \ |
| 9 | file://0001-Fix-reinterpret-cast-compiler-errors.patch \ | ||
| 10 | file://0001-Fix-int8_t-storage-in-BitPropVariant-on-Arm-architec.patch \ | ||
| 11 | file://0001-Allow-running-tests-on-target-when-cross-compiling.patch \ | ||
| 12 | file://0001-Allow-specifying-path-to-7z-library-in-tests.patch \ | ||
| 13 | file://0001-Fix-tests-with-musl.patch \ | ||
| 14 | " | 9 | " |
| 15 | 10 | ||
| 16 | SRCREV = "386e00ad3286e7a10e5bb6d05a5b41b523fce623" | 11 | SRCREV = "82f359371fda5c16c037ac0659b969334816a9c4" |
| 17 | 12 | ||
| 18 | # ptest dependencies and their revisions | 13 | # ptest dependencies and their revisions |
| 19 | SRC_URI_PTEST = " \ | 14 | SRC_URI_PTEST = " \ |
| 20 | git://github.com/rikyoz/filesystem.git;protocol=https;branch=glibcxx_wchar_streams_workaround;name=filesystem;destsuffix=filesystem \ | 15 | git://github.com/rikyoz/filesystem.git;protocol=https;branch=glibcxx_wchar_streams_workaround;name=filesystem;destsuffix=filesystem \ |
| 21 | git://github.com/rikyoz/bit7z-test-data.git;protocol=https;branch=main;name=testdata;destsuffix=testdata \ | 16 | git://github.com/rikyoz/bit7z-test-data.git;protocol=https;branch=main;name=testdata;destsuffix=testdata \ |
| 22 | git://github.com/catchorg/Catch2.git;protocol=https;branch=v2.x;name=catch2;destsuffix=catch2;tag=${TAG_catch2} \ | 17 | git://github.com/rikyoz/Catch2.git;protocol=https;branch=single-header-v2.x;name=catch2;destsuffix=catch2 \ |
| 23 | https://github.com/cpm-cmake/CPM.cmake/releases/download/v${TAG_CPM}/CPM.cmake;downloadfilename=CPM_${TAG_CPM}.cmake \ | 18 | https://github.com/cpm-cmake/CPM.cmake/releases/download/v${TAG_CPM}/CPM.cmake;downloadfilename=CPM_${TAG_CPM}.cmake \ |
| 24 | file://run-ptest \ | 19 | file://run-ptest \ |
| 20 | file://0001-cmake-disable-filesystem-gitclone.patch \ | ||
| 25 | " | 21 | " |
| 26 | SRCREV_FORMAT = "${@bb.utils.contains('PTEST_ENABLED', '1', 'default_filesystem_testdata_catch2', 'default', d)}" | 22 | SRCREV_FORMAT = "${@bb.utils.contains('PTEST_ENABLED', '1', 'default_filesystem_testdata_catch2', 'default', d)}" |
| 27 | SRCREV_filesystem = "983650f374699e3979f9cdefe13ddff60bd4ac68" | 23 | SRCREV_filesystem = "b99c2aebd5ddd6fb2f190731ba80b949fc3842b5" |
| 28 | SRCREV_testdata = "077e407b1c07b7443626b5902eeb4819388bf656" | 24 | SRCREV_testdata = "077e407b1c07b7443626b5902eeb4819388bf656" |
| 29 | SRCREV_catch2 = "182c910b4b63ff587a3440e08f84f70497e49a81" | 25 | SRCREV_catch2 = "27d8db1770dd5cd3688656095f242474431584a1" |
| 30 | TAG_catch2 = "v2.13.10" | 26 | SRCHASH_CPM = "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a" |
| 31 | SRCHASH_CPM = "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d" | 27 | TAG_CPM = "0.42.0" |
| 32 | TAG_CPM = "0.40.2" | ||
| 33 | SRC_URI[sha256sum] = "${SRCHASH_CPM}" | 28 | SRC_URI[sha256sum] = "${SRCHASH_CPM}" |
| 34 | 29 | ||
| 35 | 30 | ||
| @@ -51,15 +46,14 @@ do_configure:prepend() { | |||
| 51 | # verify that all dependencies have correct version | 46 | # verify that all dependencies have correct version |
| 52 | grep -q ${SRCREV_filesystem} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_filesystem'!" | 47 | grep -q ${SRCREV_filesystem} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_filesystem'!" |
| 53 | grep -q ${SRCREV_testdata} ${S}/tests/CMakeLists.txt || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_testdata'!" | 48 | grep -q ${SRCREV_testdata} ${S}/tests/CMakeLists.txt || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_testdata'!" |
| 54 | grep -q ${TAG_catch2} ${S}/tests/cmake/Catch2.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_catch2'!" | 49 | grep -q ${SRCREV_catch2} ${S}/tests/CMakeLists.txt || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_catch2'!" |
| 55 | grep -q ${SRCHASH_CPM} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCHASH_CPM'!" | 50 | grep -q ${SRCHASH_CPM} ${S}/cmake/Dependencies.cmake || bbfatal "ERROR: dependency version mismatch, please update 'SRCHASH_CPM'!" |
| 56 | 51 | ||
| 57 | if ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then | 52 | if ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then |
| 58 | # use cache instead of download for CPM (CMake's missing package manager) | 53 | # use cache instead of download for CPM (CMake's missing package manager) |
| 59 | mkdir -p ${B}/cmake | 54 | mkdir -p ${B}/cpm_cache/cpm/ |
| 60 | cp ${UNPACKDIR}/CPM_${TAG_CPM}.cmake ${B}/cmake | 55 | cp ${UNPACKDIR}/CPM_${TAG_CPM}.cmake ${B}/cpm_cache/cpm/ |
| 61 | mkdir -p ${B}/cpm_cache/ghc_filesystem | 56 | cp -r ${UNPACKDIR}/filesystem ${B}/cpm_cache/ghc_filesystem |
| 62 | cp -r ${UNPACKDIR}/filesystem ${B}/cpm_cache/ghc_filesystem/fbcc9a9e94e6365273cf51294173f21ff5efdb4f | ||
| 63 | # avoid buildpaths issue as unpackdir is not in prefix maps | 57 | # avoid buildpaths issue as unpackdir is not in prefix maps |
| 64 | cp -r ${UNPACKDIR}/catch2 ${B} | 58 | cp -r ${UNPACKDIR}/catch2 ${B} |
| 65 | fi | 59 | fi |
