Skip to content

Convenience Binaries

Dianjin Wang edited this page Apr 3, 2026 · 8 revisions

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:

  1. Build installation artifacts
  2. 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.

1. Apache Cloudberry (Main Repository)

1.1 Build Installation Artifacts

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>/

Build RPM Package

Step 1: Install rpmbuild

sudo dnf install rpm-build

Step 2: Run RPM build script

./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

Build DEB Package (Ubuntu 22.04)

Step 1: Install Required Tools

sudo apt install dpkg-dev

Step 2: Build DEB

./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.

Install and Verify RPM/DEB

# 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 gpadmin user should be configured
  • Default installation path: /usr/local/cloudberry-db

Start Single-Node Demo Cluster

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

2. cloudberry-backup

⚠️ 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.

2.1 Build Portable Binary Package

cd ~/cloudberry-backup
make package

Output Location

The generated tarball will be located in:

build/

Example filename:

apache-cloudberry-backup-incubating-2.1.0-linux-arm64.tar.gz

2.2 Install cloudberry-backup

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-arm64

Run the installation script:

sudo ./install.sh

This script copies the following binaries into the Cloudberry installation bin/ directory:

  • gpbackup
  • gprestore
  • gpbackup_helper
  • gpbackup_s3_plugin

3. cloudberry-pxf

Packaging for cloudberry-pxf is also simplified via Makefile targets.

3.1 Build DEB Package

make deb

Output Location

build/

3.2 Build RPM Package

make rpm

Output Location

build/rpmbuild/RPMS/

Notes

  • 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.

Clone this wiki locally