Files
meta-openembedded/meta-oe/recipes-extended/7zip/bit7z/0001-cmake-disable-filesystem-gitclone.patch
Liu Yiding 5dd79230ea 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>
2026-03-17 13:25:22 -07:00

38 lines
1.6 KiB
Diff

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 <liuyd.fnst@fujitsu.com>
---
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