DEB: build the Release 2 scope instead of the impossible full tree

A full-tree build (ninja all) is not possible on the Release 2 tree:
out-of-scope modules reference modules excluded from the scope
(e.g. TopicEditorBase -> LtsScriptTimeline; 100+ CMakeLists references),
and cmake --install hard-fails on targets that were never built. Align
the DEB pipeline with its own description (binaries and libraries from
release scope S):

- make_rpm_ubuntu26_release2.py: new --build_targets option
  (space-separated CMake/Ninja targets; empty = legacy full tree).
  Step 1 builds only those targets; the runtime DEB is staged from the
  scoped build artifacts (bin/ + lib/) and packaged with build_deb
  nobuild, replacing the full-tree debuild/cmake-buildsystem path.
- new_docker_build_release2.sh: pass the Release 2 group targets via
  --build_targets; exclude the driver build4* dirs from the staging tar
  (the DEB step builds its own tree; nothing consumes the driver build
  output). Fix two comments inside the single-quoted docker bash -c
  string that contained apostrophes, which broke word construction and
  failed bash -n.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
berrux-devandClaude Code committed 2026-11-13 18:27:40 +01:00
1 parent 1646c5c71c
commit 646b1fc8ba
2 files changed
+58 -19

No files matched your search

@@ -586,9 +586,16 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
log_info "Staging workspace to ${STAGE_DIR}"
rm -rf "${STAGE_DIR}"
mkdir -p "${STAGE_DIR}"
# Exclude build4* (the driver build dirs, e.g. build4_<timestamp>): the DEB
# pipeline builds its own tree in <staging>/build; nothing in the DEB step
# consumes the driver build output (the ctest DEB looks for a plain build4
# dir, which the driver never creates; it uses build4_<timestamp> instead).
# NOTE: no apostrophes allowed in comments here - this block lives inside
# the single-quoted docker bash -c string (see lines 477/653).
tar --exclude='./rpms' --exclude='./.git' --exclude='./build' \
--exclude='./deb_build_tmp' --exclude='./deb_stage' --exclude='./packages-out' \
--exclude='./legatus-qt6_1.0.tar.gz' \
--exclude=./build4\* \
-cf - -C "${WORKSPACE_DIR}" . | tar -xf - -C "${STAGE_DIR}"
if [[ ! -f "${STAGED_SOURCE_DIR}/CMakeLists.txt" || ! -f "${STAGED_SOURCE_DIR}/rpmbuild/make_rpm_ubuntu26_release2.py" ]]; then
@@ -607,8 +614,8 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
# DEB cmake flags: -DBUILD_RTI=ON is required - the full-tree DEB build
# compiles RTI codegen consumers (e.g. svcPdmCommon -> pdm_enums.hpp)
# whose BUILD_RTI=OFF stubs were removed as "forbidden OFF variants".
# (A '#' line inside a backslash-continued command breaks the continuation
# and drops the remaining arguments - keep comments outside it.)
# (A lone hash line inside a backslash-continued command breaks the
# continuation and drops the remaining arguments - keep comments outside it.)
cd "${STAGED_SOURCE_DIR}/rpmbuild"
if python3 make_rpm_ubuntu26_release2.py -c LTS \
--project_name "${PROJECT}" \
@@ -616,6 +623,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
--output_dir "${DOCKER_MOUNT_ROOT}/rpms/${PROJECT}/${OS_VERSION}/" \
--source_dir "${STAGED_SOURCE_DIR}" \
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/ -DBUILD_RTI=ON -DRELEASE_BUILD=ON" \
--build_targets "${GROUP1_TARGETS[*]} ${GROUP3_TARGETS[*]} ${GROUP5_TARGETS[*]} ${GROUP6_TARGETS[*]}" \
--build_number "${BUILD_NUMBER}" \
--release_scope; then
log_info "Package build completed successfully"