-
Notifications
You must be signed in to change notification settings - Fork 206
Convenience Binaries
This page describes how to build RPM and DEB convenience binaries for:
- Apache Cloudberry (Main Repository)
- cloudberry-backup
- cloudberry-pxf
The overall workflow follows two major steps:
- Build installation artifacts
- Package them into RPM or DEB
For a faster and reproducible build environment (supported from Cloudberry 2.1+), please refer to: https://cloudberry.apache.org/docs/deployment/build-based-on-docker.
Before packaging, you must build Cloudberry from source.
You may either:
- Build manually from source, or
- Use the official Docker-based build script (recommended for 2.1+)
The build output should produce a complete installation directory, typically:
/usr/local/cloudberry-db-<version>/
sudo dnf install rpm-build
./devops/build/packaging/rpm/build-rpm.sh -v <version> -r <release>
Example:
./devops/build/packaging/rpm/build-rpm.sh -v 2.1.0 -r 1
Output Location:
ls ~/rpmbuild/RPMS/aarch64/apache-cloudberry-db-incubating-2.1.0-1.el9.aarch64.rpm
sudo apt install dpkg-dev
./devops/build/packaging/deb/build-deb.sh -v 2.1.0
The resulting .deb package will be generated in the parent directory of the cloudberry source directory (i.e., one level above the current cloudberry directory where the build command is executed), not inside the cloudberry directory itself.
# For RPM
sudo dnf install -y apache-cloudberry-db-incubating-2.1.0-1.el9.aarch64.rpm
# For DEB
sudo apt update
sudo apt --fix-broken install -y ./apache-cloudberry-db-incubating-2.1.0-1-ubuntu22.04-adm64.deb
After installation:
- A
gpadminuser should be configured - Default installation path:
/usr/local/cloudberry-db
Switch to gpadmin:
su - gpadmin
source /usr/local/cloudberry-db/cloudberry-env.sh
Create a clean demo directory:
mkdir -p ~/cloudberry-demo
cd ~/cloudberry-demo
Initialize demo cluster:
gpdemo
source ./gpdemo-env.sh
Verify connection:
psql postgres
⚠️ cloudberry-backup is built with CGO enabled (CGO_ENABLED=1). Therefore, the resulting binary links against the system glibc.To maximize compatibility across Linux distributions, it is recommended to build on Rocky Linux 8 (glibc 2.28), which provides a lower glibc baseline.
Building on newer systems (e.g., Ubuntu 22.04 or Rocky 9) may produce binaries requiring newer glibc versions, which could fail on older environments.
cd ~/cloudberry-backup
make packageThe generated tarball will be located in:
build/
Example filename:
apache-cloudberry-backup-incubating-2.1.0-linux-arm64.tar.gz
Extract the package:
tar xvf apache-cloudberry-backup-incubating-2.1.0-linux-arm64.tar.gz
cd apache-cloudberry-backup-incubating-2.1.0-linux-arm64Run the installation script:
sudo ./install.shThis script copies the following binaries into the Cloudberry installation bin/ directory:
gpbackupgprestoregpbackup_helpergpbackup_s3_plugin
Packaging for cloudberry-pxf is also simplified via Makefile targets.
make debbuild/
make rpmbuild/rpmbuild/RPMS/
- cloudberry-backup produces portable tarball binaries.
- cloudberry-pxf provides native DEB and RPM packages.
- Always verify installation compatibility with your target Cloudberry version.
- For Apache releases, these are considered convenience binaries and must be reproducible from source.