Skip to content

Commit 75f2b34

Browse files
committed
ci: update symlink paths in CI workflows for RHEL debuginfo packaging to support longer versions (xx.xx.xx)
1 parent 9f7e951 commit 75f2b34

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

.github/workflows/pack_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ jobs:
227227
arch: ${{ matrix.arch }}
228228
boost_url_key: boost_rhel_feb17
229229
cmake_command: |
230-
ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
231-
cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
230+
ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
231+
cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
232232
mkdir build
233233
cd build
234234
cmake -DPACK=1 ..

.github/workflows/pack_publish_galera.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
boost_url_key: boost_rhel_feb17
9494
PACK_GALERA: 1
9595
cmake_command: |
96-
ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
97-
cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
96+
ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
97+
cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
9898
mkdir build
9999
cd build
100100
cmake -DPACK=1 ..

cmake/builds/CommonRpm.cmake

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ if (only_set_paths)
2020
return ()
2121
endif ()
2222

23+
# Ensure source directory path is long enough for debuginfo packaging
24+
# When version numbers increase (e.g., 13.15.9 -> 13.15.10), the debuginfo path
25+
# can become longer than the source dir path, causing CPack RPM to fail.
26+
# Create a symlink to make the source path longer if needed.
27+
set ( LONG_SOURCE_PATH "/builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0" )
28+
if (NOT EXISTS "${LONG_SOURCE_PATH}")
29+
message ( STATUS "Creating symlink ${LONG_SOURCE_PATH} -> ${CMAKE_SOURCE_DIR} for RPM debuginfo packaging" )
30+
execute_process (
31+
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_SOURCE_DIR}" "${LONG_SOURCE_PATH}"
32+
RESULT_VARIABLE SYMLINK_RESULT
33+
ERROR_QUIET
34+
OUTPUT_QUIET
35+
)
36+
if (SYMLINK_RESULT EQUAL 0)
37+
message ( STATUS "Symlink created successfully" )
38+
else ()
39+
message ( WARNING "Failed to create symlink ${LONG_SOURCE_PATH}. You may need to create it manually with: ln -s $(pwd) ${LONG_SOURCE_PATH}" )
40+
endif ()
41+
else ()
42+
# Check if existing path is a symlink pointing to our source dir
43+
get_filename_component ( ACTUAL_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH )
44+
get_filename_component ( SYMLINK_TARGET "${LONG_SOURCE_PATH}" REALPATH )
45+
if (NOT ACTUAL_SOURCE_DIR STREQUAL SYMLINK_TARGET)
46+
message ( STATUS "Symlink ${LONG_SOURCE_PATH} exists but points elsewhere" )
47+
endif ()
48+
endif ()
49+
2350
# Common rpm-specific build variables
2451
set ( CPACK_GENERATOR RPM )
2552

dist/gitlab-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ variables:
5353
boost: boost_rhel_feb17
5454
before_script:
5555
- export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
56-
- ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
57-
- cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0
56+
- ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
57+
- cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
5858
artifacts:
5959
paths:
6060
- build/manticore*rpm

0 commit comments

Comments
 (0)