From d961d0fc3072608d64632b1feb1f37bcfc93a317 Mon Sep 17 00:00:00 2001 From: Torsten Wierschin Date: Fri, 9 Oct 2026 14:43:33 +0000 Subject: [PATCH] Exclude bundled GeographicLib from release scope to use system package - Removed 'include' from release_items list - Added include_exclude list with GeographicLib - Added filtering logic to exclude include/GeographicLib during copy - This ensures CMake finds system libgeographiclib-dev instead of bundled version - Fixes linker errors for GeographicLib symbols in DEB build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- make_rpm_ubuntu26.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/make_rpm_ubuntu26.py b/make_rpm_ubuntu26.py index 955caf7..6ed7b98 100755 --- a/make_rpm_ubuntu26.py +++ b/make_rpm_ubuntu26.py @@ -114,7 +114,6 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea 'tests', 'new_docker_build.sh', 'specs', - 'include', 'translations', 'CTestCustom.ctest', '.gitignore', @@ -125,6 +124,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea 'lts-cc.conf' ] + # Directories to exclude from include folder (bundled libraries not needed for release) + include_exclude = ['GeographicLib'] + if with_subdirs: for root, dirs, files in os.walk(srcdir): # Filter directories for release scope @@ -148,6 +150,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea elif rel_root.startswith('TetraIF'): # Keep all subdirectories under TetraIF pass + elif rel_root == 'include': + # In include directory, exclude bundled libraries + dirs[:] = [d for d in dirs if d not in include_exclude] else: # Skip other directories dirs[:] = [] @@ -164,6 +169,7 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea if release_scope and rel_root == '.': if file not in release_items and not any(file == item.split('/')[0] for item in release_items if '/' in item): continue + # Include 'include' directory but GeographicLib will be filtered during walk src_path = os.path.join(root, file) # Skip broken symlinks if os.path.islink(src_path) and not os.path.exists(src_path):