Fix DEB packaging paths: use DOCKER_MOUNT_ROOT instead of hardcoded /workspace

- Replace all /workspace references with ${DOCKER_MOUNT_ROOT} in DEB packaging block
- Add WORKSPACE_DIR variable pointing to qt-migration-legatus subdirectory
- Use WORKSPACE_DIR as tar extraction source to correctly stage workspace files
- Fix output directory paths for RPM and packages-out locations

This fixes the staging error where tar couldn't find /workspace inside the container.
This commit is contained in:
torsten committed 2026-11-13 00:23:25 +00:00
1 parent 9fa2a4b014
commit 6275f4384e
1 file changed
+6 -5
@@ -794,8 +794,9 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
# Extract OS version for package naming
OS_VERSION=$(eval $(grep "^VERSION_ID=" /etc/os-release) && echo "$VERSION_ID")
STAGE_DIR=/workspace/deb_stage
STAGE_DIR="${DOCKER_MOUNT_ROOT}/deb_stage"
STAGED_SOURCE_DIR="${STAGE_DIR}"
WORKSPACE_DIR="${DOCKER_MOUNT_ROOT}/qt-migration-legatus/qt6-after/qt6-migrated-legatus"
log_info "Staging workspace to ${STAGE_DIR}"
rm -rf "${STAGE_DIR}"
@@ -803,7 +804,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
tar --exclude='./rpms' --exclude='./.git' --exclude='./build' \
--exclude='./deb_build_tmp' --exclude='./deb_stage' --exclude='./packages-out' \
--exclude='./legatus-qt6_1.0.tar.gz' \
-cf - -C /workspace . | tar -xf - -C "${STAGE_DIR}"
-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
log_error "Staged source incomplete under ${STAGED_SOURCE_DIR} (CMakeLists.txt or rpmbuild/make_rpm_ubuntu26_release2.py missing)"
@@ -822,7 +823,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
if python3 make_rpm_ubuntu26_release2.py -c LTS \
--project_name "${PROJECT}" \
--version "${LTS_VERSION}" \
--output_dir "/workspace/rpms/${PROJECT}/${OS_VERSION}/" \
--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/ -DRELEASE_BUILD=ON" \
--build_number "${BUILD_NUMBER}" \
@@ -834,10 +835,10 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
fi
# Copy produced DEB packages to the packages-out
DEST_DIR=/workspace/packages-out
DEST_DIR="${DOCKER_MOUNT_ROOT}/packages-out"
mkdir -p "${DEST_DIR}"
shopt -s nullglob
for deb in "/workspace/rpms/${PROJECT}/${OS_VERSION}/"*.deb; do
for deb in "${DOCKER_MOUNT_ROOT}/rpms/${PROJECT}/${OS_VERSION}/"*.deb; do
base="$(basename "${deb}")"
if [[ -e "${DEST_DIR}/${base}" ]] &&
[[ "$(stat -c '%d:%i' "${deb}")" == "$(stat -c '%d:%i' "${DEST_DIR}/${base}")" ]]; then