Build Protobuf from source in rocky9-system

Every other library still comes from the distribution packages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-11-10 11:25:58 +08:00
1 parent d57ea76fa4
commit 464bf717ed
4 files changed
+27 -14

No files matched your search

+9 -9
View File
@@ -4,16 +4,16 @@ set -eu
IMAGE_NAME="${IMAGE_NAME:-rocky9-system-stack}"
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
SOURCES_DIR="${SOURCES_DIR:-$SCRIPT_DIR/../sources}"
FETCH_SCRIPT="$SCRIPT_DIR/../fetch-sources.sh"
if command -v podman >/dev/null 2>&1; then
ENGINE=podman
elif command -v docker >/dev/null 2>&1; then
ENGINE=docker
else
echo "Error: Podman or Docker is required." >&2
if ! command -v podman >/dev/null 2>&1; then
echo "Error: Podman is required." >&2
exit 1
fi
ENGINE="${CONTAINER_ENGINE:-$ENGINE}"
echo "Building image $IMAGE_NAME with $ENGINE ..."
exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR"
SOURCES_DIR="$SOURCES_DIR" "$FETCH_SCRIPT"
echo "Building image $IMAGE_NAME with podman ..."
exec podman build --build-context sources="$SOURCES_DIR" \
--tag "$IMAGE_NAME" "$SCRIPT_DIR"