This is an automated email from the ASF dual-hosted git repository.

tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit f8dc6279a08fc64c4b9fe0a48e62622c25cee32c
Author: Dianjin Wang <[email protected]>
AuthorDate: Wed Jul 1 12:25:54 2026 +0800

    Fix Cloudberry build scripts for Rocky Linux 10
    
    Two el10 build breakages, neither PostgreSQL-version specific:
    
    - configure-cloudberry.sh printed version info via `ag`
      (the_silver_searcher), which is not packaged for el10. Use
      `grep -E`, which is always available.
    - build-rpm.sh failed in %install because check-rpaths on el10 treats
      the product's absolute RUNPATH (/usr/local/cloudberry-db/lib) as a
      fatal invalid rpath. Export QA_RPATHS to demote the standard,
      invalid and empty rpath findings to warnings.
    
    Assisted-by: Claude Code
---
 .../automation/cloudberry/scripts/configure-cloudberry.sh    |  2 +-
 devops/build/packaging/rpm/build-rpm.sh                      | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh 
b/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
index 6b3a8726ca2..eda9586c28f 100755
--- a/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+++ b/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
@@ -185,7 +185,7 @@ log_section_end "Configure"
 
 # Capture version information
 log_section "Version Information"
-execute_cmd ag "GP_VERSION | GP_VERSION_NUM | PG_VERSION | PG_VERSION_NUM | 
PG_VERSION_STR" src/include/pg_config.h
+execute_cmd grep -E 
"GP_VERSION|GP_VERSION_NUM|PG_VERSION|PG_VERSION_NUM|PG_VERSION_STR" 
src/include/pg_config.h || true
 log_section_end "Version Information"
 
 # Log completion
diff --git a/devops/build/packaging/rpm/build-rpm.sh 
b/devops/build/packaging/rpm/build-rpm.sh
index 2c490166f45..ef73a14d4bb 100755
--- a/devops/build/packaging/rpm/build-rpm.sh
+++ b/devops/build/packaging/rpm/build-rpm.sh
@@ -178,6 +178,18 @@ fi
 
 # Run rpmbuild with the provided options
 echo "Building RPM with Version: $VERSION, Release: $RELEASE$([ "$DEBUG_BUILD" 
= true ] && echo ", Debug: enabled")..."
+
+# Relax rpm's check-rpaths QA check.
+#
+# Cloudberry ships shared objects (e.g. PL/Python's _pg*.so) whose RUNPATH
+# points at the product's install prefix (/usr/local/cloudberry-db/lib).
+# This is intentional, but check-rpaths classifies such absolute,
+# non-standard rpaths as "invalid" (0x0002) and, on the el10 toolchain,
+# turns it into a fatal "%install" error. Setting QA_RPATHS downgrades the
+# standard (0x0001), invalid (0x0002) and empty (0x0010) rpath findings to
+# warnings so packaging succeeds. This is a no-op relaxation on el8/el9.
+export QA_RPATHS=$(( 0x0001 | 0x0002 | 0x0010 ))
+
 if ! eval "$RPMBUILD_CMD"; then
   echo "Error: rpmbuild failed."
   exit 1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to