mongo/buildscripts/mongo_gpg_builds
Steve McClure 32e8f260de SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231)
GitOrigin-RevId: 3305c1e2ee3a6a2c3a5b2b7883b0f491a59ed646
2026-04-21 19:20:11 +00:00
..
build_gpg_manylinux.sh
README.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00

mongo gpg builds

This directory contains a script to produce portable gpg binaries for all our supported linux platforms:

  • Linux (manylinux2014 glibc 2.17 baseline): x86_64, aarch64, s390x, ppc64le

In particular, it builds gnupg-2.5.16 from source.

This script is used to generate the binaries that we use bring into bazel as a dependency to sign test extensions. All artifacts are placed in the dist/ directory.


📁 Contents

Script Platform Output
build_gpg_manylinux.sh Linux (x86_64, aarch64, s390x, ppc64le) dist/gpg-manylinux-<arch>

🚀 Quick Start

🐧 Linux (manylinux2014 glibc 2.17)

Requirements: Docker.
To cross-build using QEMU (for aarch64/s390x/ppc64le), enable binfmt once:

docker run --privileged --rm tonistiigi/binfmt --install all

Build native architecture

./build_gpg_manylinux.sh

Cross-build via QEMU

ARCH=x86_64 PLATFORM=linux/amd64   ./build_gpg_manylinux.sh
ARCH=aarch64 PLATFORM=linux/arm64   ./build_gpg_manylinux.sh
ARCH=s390x   PLATFORM=linux/s390x   ./build_gpg_manylinux.sh
ARCH=ppc64le PLATFORM=linux/ppc64le ./build_gpg_manylinux.sh

⚙️ Build Behavior (All Platforms)


🧩 Environment Variables

Variable Purpose Default
OUT_DIR Output directory ./dist
ARCH Linux target arch uname -m
PLATFORM Docker platform auto

📜 License & Attribution

These scripts build gpg and its required dependencies from sources originally obtained from: 👉 https://www.gnupg.org/ftp/gcrypt/gnupg/ and https://gnupg.org/download/index.html

The exact sources can be obtained at the following URLs: