From f77dccf061800dd4d11fab97e69ba1b40022777d Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 03:30:47 +0000 Subject: [PATCH 01/17] Fix APT repository build and add debugging - Fix shell variable scope issue in download script - Add debugging output to understand repository structure - Update installation instructions with correct package names - Add support for unsigned repositories for testing --- .github/scripts/download_packages.sh | 23 ++++++++++-- .github/workflows/nextjs.yml | 53 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 79af6a3..9ab6cf3 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -40,12 +40,17 @@ then mkdir -p out/packages # Process each asset + # First, create a temporary file to store asset information + ASSETS_FILE=$(mktemp) echo "$release" | python3 -c " import sys, json data = json.load(sys.stdin) for asset in data.get('assets', []): print(f\"{asset['name']}|{asset['browser_download_url']}\") -" | while IFS='|' read -r filename download_url +" > "$ASSETS_FILE" + + # Process each asset + while IFS='|' read -r filename download_url do if [ -z "$filename" ]; then continue @@ -73,7 +78,10 @@ for asset in data.get('assets', []): echo " Downloading to packages directory" wget -q -P out/packages "$download_url" fi - done + done < "$ASSETS_FILE" + + # Clean up temporary file + rm -f "$ASSETS_FILE" # Save release metadata echo "$release" | python3 -c " @@ -95,12 +103,23 @@ print(json.dumps(output, indent=2)) " > out/packages/release-info.json echo "Successfully processed packages from $REPO" + echo "GOT_DEB=$GOT_DEB, GOT_RPM=$GOT_RPM" + echo "Checking DEB_POOL directory: $DEB_POOL" + ls -la "$DEB_POOL" 2>/dev/null || echo "DEB_POOL directory does not exist" else echo "Error: Could not fetch release information for $REPO" exit 1 fi # Build DEB repository if we have DEB packages +echo "Checking if DEB repository should be built..." +echo "DEB_POOL exists: $([ -d "$DEB_POOL" ] && echo 'yes' || echo 'no')" +if [ -d "$DEB_POOL" ]; then + echo "DEB_POOL contents:" + ls -la "$DEB_POOL" +fi +echo "DEB files in pool: $(ls -1 $DEB_POOL/*.deb 2>/dev/null | wc -l)" + if [ -d "$DEB_POOL" ] && [ "$(ls -A $DEB_POOL/*.deb 2>/dev/null)" ]; then echo "Building APT repository..." pushd out/deb >/dev/null diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index fa2e64a..86be0e5 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -92,6 +92,59 @@ jobs: run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Download DocumentDB packages from latest release run: .github/scripts/download_packages.sh + - name: Create installation instructions + run: | + mkdir -p out/install + cat > out/install/apt-install.md << 'EOF' + # Installing DocumentDB from APT Repository + + ## Available Packages + The repository contains DocumentDB packages for different PostgreSQL versions: + - `postgresql-15-documentdb` - DocumentDB extension for PostgreSQL 15 + - `postgresql-16-documentdb` - DocumentDB extension for PostgreSQL 16 + - `postgresql-17-documentdb` - DocumentDB extension for PostgreSQL 17 + + ## Option 1: Install with trusted repository (if GPG signed) + ```bash + # Add the repository + echo "deb [arch=amd64] https://documentdb.github.io/deb stable main" | \ + sudo tee /etc/apt/sources.list.d/documentdb.list + + # Update package lists and install (choose your PostgreSQL version) + sudo apt-get update + sudo apt-get install postgresql-16-documentdb # or postgresql-15-documentdb, postgresql-17-documentdb + ``` + + ## Option 2: Install from unsigned repository (for testing) + ```bash + # Add the repository with trusted flag + echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | \ + sudo tee /etc/apt/sources.list.d/documentdb.list + + # Update package lists and install (choose your PostgreSQL version) + sudo apt-get update + sudo apt-get install postgresql-16-documentdb # or postgresql-15-documentdb, postgresql-17-documentdb + ``` + + ## Option 3: List all available packages + ```bash + # After adding the repository, list all DocumentDB packages + apt-cache search documentdb + ``` + + ## Option 4: Direct package download + Download packages directly from: https://documentdb.github.io/packages/ + EOF + - name: Debug output structure + run: | + echo "Contents of out directory:" + find out -type f | head -20 + echo "" + echo "APT repository structure:" + ls -la out/deb/ 2>/dev/null || echo "No deb directory found" + echo "" + echo "Checking if DEB packages were downloaded:" + ls -la out/deb/pool/main/*.deb 2>/dev/null || echo "No DEB packages found" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: From 681bbf9cafdaf60dfcf2a61f2e1127314f42d384 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 06:43:52 +0000 Subject: [PATCH 02/17] support multi-version --- .github/scripts/download_packages.sh | 330 ++++++++++++++++++++++----- .github/workflows/nextjs.yml | 19 +- app/packages/page.tsx | 62 ++++- 3 files changed, 345 insertions(+), 66 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 9ab6cf3..d251d82 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -4,17 +4,43 @@ set -e # Repository to download packages from REPO="documentdb/documentdb" +# Output directory +OUT_DIR="out" + +# Version Configuration +# Set to specific version (e.g., "v0.107-0") or "latest" for most recent release +DOCUMENTDB_VERSION="${DOCUMENTDB_VERSION:-latest}" +# Multi-version support: set to "true" to keep multiple versions in repository +MULTI_VERSION="${MULTI_VERSION:-true}" + # Repository configuration SUITE="${SUITE:-stable}" COMPONENTS="${COMPONENTS:-main}" ORIGIN="${ORIGIN:-DocumentDB}" + + + + DESCRIPTION="${DESCRIPTION:-DocumentDB APT and YUM Repository}" GOT_DEB=0 GOT_RPM=0 DEB_POOL="out/deb/pool/${COMPONENTS}" +# Debian/Ubuntu pools +DEB_POOL_DEB11="out/deb/pool/deb11" +DEB_POOL_DEB12="out/deb/pool/deb12" +DEB_POOL_UBUNTU22="out/deb/pool/ubuntu22" +DEB_POOL_UBUNTU24="out/deb/pool/ubuntu24" +# RPM pools +RPM_POOL_RHEL8="out/rpm/rhel8" +RPM_POOL_RHEL9="out/rpm/rhel9" + DEB_DISTS="dists/${SUITE}" DEB_DISTS_COMPONENTS="${DEB_DISTS}/${COMPONENTS}/binary-amd64" +DEB_DISTS_DEB11="${DEB_DISTS}/deb11/binary-amd64" +DEB_DISTS_DEB12="${DEB_DISTS}/deb12/binary-amd64" +DEB_DISTS_UBUNTU22="${DEB_DISTS}/ubuntu22/binary-amd64" +DEB_DISTS_UBUNTU24="${DEB_DISTS}/ubuntu24/binary-amd64" GPG_TTY="" export GPG_TTY @@ -22,19 +48,44 @@ generate_hashes() { HASH_TYPE="$1" HASH_COMMAND="$2" echo "${HASH_TYPE}:" - find "${COMPONENTS}" -type f | while read -r file - do - echo " $(${HASH_COMMAND} "$file" | cut -d" " -f1) $(wc -c "$file" | awk '{print $1}')" + # Find all component directories and generate hashes for all files + for component in ${COMPONENTS} deb11 deb12 ubuntu22 ubuntu24; do + if [ -d "$component" ]; then + find "$component" -type f | while read -r file + do + echo " $(${HASH_COMMAND} "$file" | cut -d" " -f1) $(wc -c "$file" | awk '{print $1}') $file" + done + fi done } echo "Downloading packages from $REPO releases" -# Get the latest release info (including pre-releases) -if release=$(curl -fqs "https://api.github.com/repos/${REPO}/releases" | python3 -c "import sys, json; releases = json.load(sys.stdin); print(json.dumps(releases[0])) if releases else sys.exit(1)") -then - tag="$(echo "$release" | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])")" - echo "Found latest release: $tag" +# Get release info based on DOCUMENTDB_VERSION setting +if [ "$DOCUMENTDB_VERSION" = "latest" ]; then + echo "Fetching latest release..." + if release=$(curl -fqs "https://api.github.com/repos/${REPO}/releases" | python3 -c "import sys, json; releases = json.load(sys.stdin); print(json.dumps(releases[0])) if releases else sys.exit(1)") + then + tag="$(echo "$release" | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])")" + echo "Found latest release: $tag" + else + echo "Error: Could not fetch latest release information" + exit 1 + fi +else + echo "Using specified version: $DOCUMENTDB_VERSION" + tag="$DOCUMENTDB_VERSION" + # Verify the specified version exists + if ! release=$(curl -fqs "https://api.github.com/repos/${REPO}/releases/tags/$tag") + then + echo "Error: Version $tag not found in releases" + exit 1 + fi + echo "Found specified release: $tag" +fi + +# Show version information now that we have the tag + # Create packages directory for direct downloads mkdir -p out/packages @@ -60,19 +111,97 @@ for asset in data.get('assets', []): # Determine file type and handle accordingly if [[ "$filename" == *.deb ]]; then - GOT_DEB=1 - mkdir -p "$DEB_POOL" - echo " Downloading DEB package to pool" - wget -q -P "$DEB_POOL" "$download_url" - # Also copy to packages for direct download - cp "$DEB_POOL/$filename" out/packages/ + # Always download all deb packages for direct access + mkdir -p out/packages + echo " Downloading DEB package for direct download" + wget -q -P out/packages "$download_url" + + # For APT repository, organize packages by distribution + if [[ "$filename" =~ ^deb11-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then + GOT_DEB=1 + mkdir -p "$DEB_POOL_DEB11" + clean_name=$(echo "$filename" | sed 's/^deb11-//') + echo " Adding Debian 11 package to APT repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + # Multi-version mode: overwrite same version, preserve different versions + cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" + if [ -f "$DEB_POOL_DEB11/$clean_name" ]; then + echo " Updated existing package: $clean_name" + else + echo " Added new package: $clean_name" + fi + else + # Single version mode: overwrite everything + cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" + fi + elif [[ "$filename" =~ ^deb12-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then + GOT_DEB=1 + mkdir -p "$DEB_POOL_DEB12" + clean_name=$(echo "$filename" | sed 's/^deb12-//') + echo " Adding Debian 12 package to APT repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" + echo " Updated package: $clean_name" + else + cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" + fi + elif [[ "$filename" =~ ^ubuntu22\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then + GOT_DEB=1 + mkdir -p "$DEB_POOL_UBUNTU22" + clean_name=$(echo "$filename" | sed 's/^ubuntu22\.04-//') + echo " Adding Ubuntu 22.04 package to APT repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" + echo " Updated package: $clean_name" + else + cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" + fi + elif [[ "$filename" =~ ^ubuntu24\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then + GOT_DEB=1 + mkdir -p "$DEB_POOL_UBUNTU24" + clean_name=$(echo "$filename" | sed 's/^ubuntu24\.04-//') + echo " Adding Ubuntu 24.04 package to APT repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" + echo " Updated package: $clean_name" + else + cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" + fi + else + echo " Skipping $filename for APT repository (unsupported distribution or architecture)" + fi elif [[ "$filename" == *.rpm ]]; then - GOT_RPM=1 - mkdir -p out/rpm - echo " Downloading RPM package" - wget -q -P out/rpm "$download_url" - # Also copy to packages for direct download - cp "out/rpm/$filename" out/packages/ + # Always download all RPM packages for direct access + mkdir -p out/packages + echo " Downloading RPM package for direct download" + wget -q -P out/packages "$download_url" + + # For YUM repository, organize packages by distribution + if [[ "$filename" =~ ^rhel8-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then + GOT_RPM=1 + mkdir -p "$RPM_POOL_RHEL8" + clean_name=$(echo "$filename" | sed 's/^rhel8-//') + echo " Adding RHEL 8 package to YUM repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" + echo " Updated package: $clean_name" + else + cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" + fi + elif [[ "$filename" =~ ^rhel9-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then + GOT_RPM=1 + mkdir -p "$RPM_POOL_RHEL9" + clean_name=$(echo "$filename" | sed 's/^rhel9-//') + echo " Adding RHEL 9 package to YUM repository: $filename -> $clean_name" + if [ "$MULTI_VERSION" = "true" ]; then + cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" + echo " Updated package: $clean_name" + else + cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" + fi + else + echo " Skipping $filename for YUM repository (unsupported distribution or architecture)" + fi else # Other files go directly to packages echo " Downloading to packages directory" @@ -106,10 +235,6 @@ print(json.dumps(output, indent=2)) echo "GOT_DEB=$GOT_DEB, GOT_RPM=$GOT_RPM" echo "Checking DEB_POOL directory: $DEB_POOL" ls -la "$DEB_POOL" 2>/dev/null || echo "DEB_POOL directory does not exist" -else - echo "Error: Could not fetch release information for $REPO" - exit 1 -fi # Build DEB repository if we have DEB packages echo "Checking if DEB repository should be built..." @@ -120,19 +245,62 @@ if [ -d "$DEB_POOL" ]; then fi echo "DEB files in pool: $(ls -1 $DEB_POOL/*.deb 2>/dev/null | wc -l)" -if [ -d "$DEB_POOL" ] && [ "$(ls -A $DEB_POOL/*.deb 2>/dev/null)" ]; then - echo "Building APT repository..." +if [ "$GOT_DEB" = "1" ]; then + echo "Building APT repository with multiple distribution components..." pushd out/deb >/dev/null - mkdir -p "${DEB_DISTS_COMPONENTS}" + # Create main component with Ubuntu 22.04 packages (for backward compatibility) + if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_COMPONENTS}" + echo "Scanning Ubuntu 22.04 packages for main component" + dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS}/Packages" + gzip -k -f "${DEB_DISTS_COMPONENTS}/Packages" + fi + + # Create deb11 component (Debian 11 Bullseye) + if [ -d "pool/deb11" ] && [ "$(ls -A pool/deb11/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_DEB11}" + echo "Scanning Debian 11 packages for deb11 component" + dpkg-scanpackages --arch amd64 pool/deb11/ > "${DEB_DISTS_DEB11}/Packages" + gzip -k -f "${DEB_DISTS_DEB11}/Packages" + fi + + # Create deb12 component (Debian 12 Bookworm) + if [ -d "pool/deb12" ] && [ "$(ls -A pool/deb12/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_DEB12}" + echo "Scanning Debian 12 packages for deb12 component" + dpkg-scanpackages --arch amd64 pool/deb12/ > "${DEB_DISTS_DEB12}/Packages" + gzip -k -f "${DEB_DISTS_DEB12}/Packages" + fi - echo "Scanning DEB packages and creating Packages file" - dpkg-scanpackages --arch amd64 pool/ > "${DEB_DISTS_COMPONENTS}/Packages" - gzip -k -f "${DEB_DISTS_COMPONENTS}/Packages" + # Create ubuntu22 component (Ubuntu 22.04 Jammy) + if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_UBUNTU22}" + echo "Scanning Ubuntu 22.04 packages for ubuntu22 component" + dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU22}/Packages" + fi + + # Create ubuntu24 component (Ubuntu 24.04 Noble) + if [ -d "pool/ubuntu24" ] && [ "$(ls -A pool/ubuntu24/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_UBUNTU24}" + echo "Scanning Ubuntu 24.04 packages for ubuntu24 component" + dpkg-scanpackages --arch amd64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU24}/Packages" + fi pushd "${DEB_DISTS}" >/dev/null echo "Creating Release file" + # Determine which components we actually have + AVAILABLE_COMPONENTS="" + [ -d "${COMPONENTS}/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} ${COMPONENTS}" + [ -d "deb11/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} deb11" + [ -d "deb12/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} deb12" + [ -d "ubuntu22/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} ubuntu22" + [ -d "ubuntu24/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} ubuntu24" + AVAILABLE_COMPONENTS=$(echo $AVAILABLE_COMPONENTS | sed 's/^ *//') + { echo "Origin: ${ORIGIN}" echo "Label: DocumentDB" @@ -140,8 +308,8 @@ if [ -d "$DEB_POOL" ] && [ "$(ls -A $DEB_POOL/*.deb 2>/dev/null)" ]; then echo "Codename: ${SUITE}" echo "Version: 1.0" echo "Architectures: amd64" - echo "Components: ${COMPONENTS}" - echo "Description: ${DESCRIPTION}" + echo "Components: ${AVAILABLE_COMPONENTS}" + echo "Description: ${DESCRIPTION} - Multiple distributions supported" echo "Date: $(date -Ru)" generate_hashes MD5Sum md5sum generate_hashes SHA1 sha1sum @@ -158,34 +326,91 @@ if [ -d "$DEB_POOL" ] && [ "$(ls -A $DEB_POOL/*.deb 2>/dev/null)" ]; then fi popd >/dev/null - popd >/dev/null - echo "APT repository built successfully" + + + echo "APT repository built successfully with multiple distribution support" fi -# Build RPM repository if we have RPM packages -if [ -d "out/rpm" ] && [ "$(ls -A out/rpm/*.rpm 2>/dev/null)" ]; then - echo "Building YUM repository..." - pushd out/rpm >/dev/null +# Build RPM repositories if we have RPM packages +if [ "$GOT_RPM" = "1" ]; then + echo "Building YUM repositories for different RHEL versions..." - # Sign RPMs if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then - echo "Signing RPM packages" - for rpm_file in *.rpm; do - rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" - done + # Build RHEL 8 repository + if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then + echo "Building RHEL 8 YUM repository..." + pushd "$RPM_POOL_RHEL8" >/dev/null + + # Sign RPMs if GPG is available + if [ -n "$GPG_FINGERPRINT" ]; then + echo "Signing RHEL 8 RPM packages" + for rpm_file in *.rpm; do + rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" + done + fi + + echo "Creating RHEL 8 YUM repository metadata" + if command -v createrepo_c >/dev/null 2>&1; then + createrepo_c . + else + echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + fi + + # Sign repository metadata if GPG is available + if [ -n "$GPG_FINGERPRINT" ]; then + echo "Signing RHEL 8 repository metadata" + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + fi + + popd >/dev/null fi - echo "Creating YUM repository metadata" - createrepo_c . + # Build RHEL 9 repository + if [ -d "$RPM_POOL_RHEL9" ] && [ "$(ls -A $RPM_POOL_RHEL9/*.rpm 2>/dev/null)" ]; then + echo "Building RHEL 9 YUM repository..." + pushd "$RPM_POOL_RHEL9" >/dev/null + + # Sign RPMs if GPG is available + if [ -n "$GPG_FINGERPRINT" ]; then + echo "Signing RHEL 9 RPM packages" + for rpm_file in *.rpm; do + rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" + done + fi + + echo "Creating RHEL 9 YUM repository metadata" + if command -v createrepo_c >/dev/null 2>&1; then + createrepo_c . + else + echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + fi + + # Sign repository metadata if GPG is available + if [ -n "$GPG_FINGERPRINT" ]; then + echo "Signing RHEL 9 repository metadata" + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + fi + + popd >/dev/null + fi - # Sign repository metadata if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then - echo "Signing repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + # Also create a main RPM repository with RHEL 8 packages for backward compatibility + if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then + mkdir -p out/rpm/main + cp "$RPM_POOL_RHEL8"/* out/rpm/main/ + pushd out/rpm/main >/dev/null + echo "Creating main YUM repository (RHEL 8 packages)" + if command -v createrepo_c >/dev/null 2>&1; then + createrepo_c . + else + echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + fi + if [ -n "$GPG_FINGERPRINT" ]; then + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + fi + popd >/dev/null fi - popd >/dev/null - echo "YUM repository built successfully" + echo "YUM repositories built successfully" fi @@ -194,7 +419,6 @@ echo "" echo "Repository structure:" ls -lh out/ -# Create an index file for the packages echo "Package download complete!" ls -lh out/packages/ diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 86be0e5..6d17ae8 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -38,14 +38,19 @@ jobs: with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} continue-on-error: true - - name: Set GPG fingerprint + - name: Set GPG fingerprint and version config run: | + # Configure GPG signing if [ -n "${{ steps.import_gpg.outputs.fingerprint }}" ]; then echo "GPG_FINGERPRINT=${{ steps.import_gpg.outputs.fingerprint }}" >> $GITHUB_ENV echo "✓ GPG key loaded: ${{ steps.import_gpg.outputs.fingerprint }}" else echo "⚠ No GPG key configured - packages will not be signed" fi + + # Configure DocumentDB version (can be overridden by repository variables) + echo "DOCUMENTDB_VERSION=${{ vars.DOCUMENTDB_VERSION || 'latest' }}" >> $GITHUB_ENV + echo "MULTI_VERSION=${{ vars.MULTI_VERSION || 'true' }}" >> $GITHUB_ENV - name: Detect package manager id: detect-package-manager run: | @@ -138,13 +143,19 @@ jobs: - name: Debug output structure run: | echo "Contents of out directory:" - find out -type f | head -20 + find out -type f | head -30 echo "" echo "APT repository structure:" ls -la out/deb/ 2>/dev/null || echo "No deb directory found" echo "" - echo "Checking if DEB packages were downloaded:" - ls -la out/deb/pool/main/*.deb 2>/dev/null || echo "No DEB packages found" + echo "APT repository pools:" + ls -la out/deb/pool/ 2>/dev/null || echo "No pool directory found" + echo "" + echo "YUM repository structure:" + ls -la out/rpm/ 2>/dev/null || echo "No rpm directory found" + echo "" + echo "Direct download packages:" + ls -la out/packages/*.{deb,rpm} 2>/dev/null || echo "No packages found" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/app/packages/page.tsx b/app/packages/page.tsx index 45287d9..d129497 100644 --- a/app/packages/page.tsx +++ b/app/packages/page.tsx @@ -30,14 +30,16 @@ export default function PackagesPage() { # Add repository
- echo "deb [trusted=yes] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list + echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list
sudo apt-get update

- # Install DocumentDB + # Install DocumentDB (choose your PostgreSQL version)
- sudo apt-get install documentdb + sudo apt-get install postgresql-16-documentdb +
+ # or postgresql-15-documentdb, postgresql-17-documentdb
@@ -71,9 +73,11 @@ export default function PackagesPage() { EOF

- # Install DocumentDB + # Install DocumentDB (choose your PostgreSQL version) +
+ sudo yum install postgresql16-documentdb
- sudo yum install documentdb + # or postgresql17-documentdb @@ -90,10 +94,17 @@ export default function PackagesPage() {
-                {`echo "deb [arch=amd64] https://documentdb.github.io/deb stable main" | \\
+                {`# Add repository with trusted flag (unsigned packages)
+echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | \\
   sudo tee /etc/apt/sources.list.d/documentdb.list
 sudo apt-get update
-sudo apt-get install documentdb`}
+
+# Install DocumentDB for your PostgreSQL version
+sudo apt-get install postgresql-16-documentdb
+# Available packages: postgresql-15-documentdb, postgresql-16-documentdb, postgresql-17-documentdb
+
+# List all available DocumentDB packages
+apt-cache search documentdb`}
               
@@ -105,7 +116,8 @@ sudo apt-get install documentdb`}
-                {`sudo tee /etc/yum.repos.d/documentdb.repo <{`# Add repository configuration
+sudo tee /etc/yum.repos.d/documentdb.repo <
+# Install DocumentDB for your PostgreSQL version
+sudo yum install postgresql16-documentdb
+# Available packages: postgresql16-documentdb, postgresql17-documentdb
+
+# List all available DocumentDB packages
+yum search documentdb`}
               
@@ -173,6 +190,33 @@ sudo yum install documentdb`} + {/* Package Information */} +
+

Available Packages

+
+
+

APT Packages (Debian/Ubuntu)

+
    +
  • postgresql-15-documentdb - DocumentDB extension for PostgreSQL 15
  • +
  • postgresql-16-documentdb - DocumentDB extension for PostgreSQL 16
  • +
  • postgresql-17-documentdb - DocumentDB extension for PostgreSQL 17
  • +
+
+
+

RPM Packages (RHEL/CentOS/Fedora)

+
    +
  • postgresql16-documentdb - DocumentDB extension for PostgreSQL 16
  • +
  • postgresql17-documentdb - DocumentDB extension for PostgreSQL 17
  • +
+
+
+

+ Note: These packages are currently unsigned. Use the trusted=yes flag for APT or gpgcheck=0 for YUM as shown in the examples above. +

+
+
+
+ ); From 1602f80257ab7d3afe6eff635ce813f469bffdca Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 07:42:08 +0000 Subject: [PATCH 03/17] sign packages and support both arch --- .github/scripts/download_packages.sh | 132 ++++++++++++++++----- .github/workflows/nextjs.yml | 53 ++------- PACKAGE-INSTALL.md | 167 +++++++++++++++++++++++++++ app/packages/page.tsx | 117 ++++++++++++++----- 4 files changed, 365 insertions(+), 104 deletions(-) create mode 100644 PACKAGE-INSTALL.md diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index d251d82..46e02b5 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -18,11 +18,22 @@ SUITE="${SUITE:-stable}" COMPONENTS="${COMPONENTS:-main}" ORIGIN="${ORIGIN:-DocumentDB}" - - - DESCRIPTION="${DESCRIPTION:-DocumentDB APT and YUM Repository}" +# Function to sign DEB packages +sign_deb_package() { + local package_file="$1" + if [ -n "$GPG_FINGERPRINT" ] && [ -f "$package_file" ]; then + echo " Signing DEB package: $(basename "$package_file")" + # DEB packages can be signed using dpkg-sig + if command -v dpkg-sig >/dev/null 2>&1; then + dpkg-sig --sign builder --gpg-options "--default-key $GPG_FINGERPRINT" "$package_file" || echo " Warning: Could not sign $(basename "$package_file")" + else + echo " Warning: dpkg-sig not available, skipping DEB package signing" + fi + fi +} + GOT_DEB=0 GOT_RPM=0 DEB_POOL="out/deb/pool/${COMPONENTS}" @@ -36,11 +47,18 @@ RPM_POOL_RHEL8="out/rpm/rhel8" RPM_POOL_RHEL9="out/rpm/rhel9" DEB_DISTS="dists/${SUITE}" -DEB_DISTS_COMPONENTS="${DEB_DISTS}/${COMPONENTS}/binary-amd64" -DEB_DISTS_DEB11="${DEB_DISTS}/deb11/binary-amd64" -DEB_DISTS_DEB12="${DEB_DISTS}/deb12/binary-amd64" -DEB_DISTS_UBUNTU22="${DEB_DISTS}/ubuntu22/binary-amd64" -DEB_DISTS_UBUNTU24="${DEB_DISTS}/ubuntu24/binary-amd64" +# AMD64 directories +DEB_DISTS_COMPONENTS_AMD64="${DEB_DISTS}/${COMPONENTS}/binary-amd64" +DEB_DISTS_DEB11_AMD64="${DEB_DISTS}/deb11/binary-amd64" +DEB_DISTS_DEB12_AMD64="${DEB_DISTS}/deb12/binary-amd64" +DEB_DISTS_UBUNTU22_AMD64="${DEB_DISTS}/ubuntu22/binary-amd64" +DEB_DISTS_UBUNTU24_AMD64="${DEB_DISTS}/ubuntu24/binary-amd64" +# ARM64 directories +DEB_DISTS_COMPONENTS_ARM64="${DEB_DISTS}/${COMPONENTS}/binary-arm64" +DEB_DISTS_DEB11_ARM64="${DEB_DISTS}/deb11/binary-arm64" +DEB_DISTS_DEB12_ARM64="${DEB_DISTS}/deb12/binary-arm64" +DEB_DISTS_UBUNTU22_ARM64="${DEB_DISTS}/ubuntu22/binary-arm64" +DEB_DISTS_UBUNTU24_ARM64="${DEB_DISTS}/ubuntu24/binary-arm64" GPG_TTY="" export GPG_TTY @@ -125,6 +143,7 @@ for asset in data.get('assets', []): if [ "$MULTI_VERSION" = "true" ]; then # Multi-version mode: overwrite same version, preserve different versions cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" + sign_deb_package "$DEB_POOL_DEB11/$clean_name" if [ -f "$DEB_POOL_DEB11/$clean_name" ]; then echo " Updated existing package: $clean_name" else @@ -133,6 +152,7 @@ for asset in data.get('assets', []): else # Single version mode: overwrite everything cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" + sign_deb_package "$DEB_POOL_DEB11/$clean_name" fi elif [[ "$filename" =~ ^deb12-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 @@ -141,9 +161,11 @@ for asset in data.get('assets', []): echo " Adding Debian 12 package to APT repository: $filename -> $clean_name" if [ "$MULTI_VERSION" = "true" ]; then cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" + sign_deb_package "$DEB_POOL_DEB12/$clean_name" echo " Updated package: $clean_name" else cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" + sign_deb_package "$DEB_POOL_DEB12/$clean_name" fi elif [[ "$filename" =~ ^ubuntu22\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 @@ -152,9 +174,11 @@ for asset in data.get('assets', []): echo " Adding Ubuntu 22.04 package to APT repository: $filename -> $clean_name" if [ "$MULTI_VERSION" = "true" ]; then cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU22/$clean_name" echo " Updated package: $clean_name" else cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU22/$clean_name" fi elif [[ "$filename" =~ ^ubuntu24\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 @@ -163,9 +187,11 @@ for asset in data.get('assets', []): echo " Adding Ubuntu 24.04 package to APT repository: $filename -> $clean_name" if [ "$MULTI_VERSION" = "true" ]; then cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" echo " Updated package: $clean_name" else cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" fi else echo " Skipping $filename for APT repository (unsupported distribution or architecture)" @@ -251,42 +277,77 @@ if [ "$GOT_DEB" = "1" ]; then # Create main component with Ubuntu 22.04 packages (for backward compatibility) if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then - mkdir -p "${DEB_DISTS_COMPONENTS}" - echo "Scanning Ubuntu 22.04 packages for main component" - dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS}/Packages" - gzip -k -f "${DEB_DISTS_COMPONENTS}/Packages" + # AMD64 packages + mkdir -p "${DEB_DISTS_COMPONENTS_AMD64}" + echo "Scanning Ubuntu 22.04 AMD64 packages for main component" + dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS_AMD64}/Packages" + gzip -k -f "${DEB_DISTS_COMPONENTS_AMD64}/Packages" + + # ARM64 packages + mkdir -p "${DEB_DISTS_COMPONENTS_ARM64}" + echo "Scanning Ubuntu 22.04 ARM64 packages for main component" + dpkg-scanpackages --arch arm64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_COMPONENTS_ARM64}/Packages" fi # Create deb11 component (Debian 11 Bullseye) if [ -d "pool/deb11" ] && [ "$(ls -A pool/deb11/*.deb 2>/dev/null)" ]; then - mkdir -p "${DEB_DISTS_DEB11}" - echo "Scanning Debian 11 packages for deb11 component" - dpkg-scanpackages --arch amd64 pool/deb11/ > "${DEB_DISTS_DEB11}/Packages" - gzip -k -f "${DEB_DISTS_DEB11}/Packages" + # AMD64 packages + mkdir -p "${DEB_DISTS_DEB11_AMD64}" + echo "Scanning Debian 11 AMD64 packages for deb11 component" + dpkg-scanpackages --arch amd64 pool/deb11/ > "${DEB_DISTS_DEB11_AMD64}/Packages" + gzip -k -f "${DEB_DISTS_DEB11_AMD64}/Packages" + + # ARM64 packages + mkdir -p "${DEB_DISTS_DEB11_ARM64}" + echo "Scanning Debian 11 ARM64 packages for deb11 component" + dpkg-scanpackages --arch arm64 pool/deb11/ > "${DEB_DISTS_DEB11_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_DEB11_ARM64}/Packages" fi # Create deb12 component (Debian 12 Bookworm) if [ -d "pool/deb12" ] && [ "$(ls -A pool/deb12/*.deb 2>/dev/null)" ]; then - mkdir -p "${DEB_DISTS_DEB12}" - echo "Scanning Debian 12 packages for deb12 component" - dpkg-scanpackages --arch amd64 pool/deb12/ > "${DEB_DISTS_DEB12}/Packages" - gzip -k -f "${DEB_DISTS_DEB12}/Packages" + # AMD64 packages + mkdir -p "${DEB_DISTS_DEB12_AMD64}" + echo "Scanning Debian 12 AMD64 packages for deb12 component" + dpkg-scanpackages --arch amd64 pool/deb12/ > "${DEB_DISTS_DEB12_AMD64}/Packages" + gzip -k -f "${DEB_DISTS_DEB12_AMD64}/Packages" + + # ARM64 packages + mkdir -p "${DEB_DISTS_DEB12_ARM64}" + echo "Scanning Debian 12 ARM64 packages for deb12 component" + dpkg-scanpackages --arch arm64 pool/deb12/ > "${DEB_DISTS_DEB12_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_DEB12_ARM64}/Packages" fi # Create ubuntu22 component (Ubuntu 22.04 Jammy) if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then - mkdir -p "${DEB_DISTS_UBUNTU22}" - echo "Scanning Ubuntu 22.04 packages for ubuntu22 component" - dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22}/Packages" - gzip -k -f "${DEB_DISTS_UBUNTU22}/Packages" + # AMD64 packages + mkdir -p "${DEB_DISTS_UBUNTU22_AMD64}" + echo "Scanning Ubuntu 22.04 AMD64 packages for ubuntu22 component" + dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22_AMD64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU22_AMD64}/Packages" + + # ARM64 packages + mkdir -p "${DEB_DISTS_UBUNTU22_ARM64}" + echo "Scanning Ubuntu 22.04 ARM64 packages for ubuntu22 component" + dpkg-scanpackages --arch arm64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU22_ARM64}/Packages" fi # Create ubuntu24 component (Ubuntu 24.04 Noble) if [ -d "pool/ubuntu24" ] && [ "$(ls -A pool/ubuntu24/*.deb 2>/dev/null)" ]; then - mkdir -p "${DEB_DISTS_UBUNTU24}" - echo "Scanning Ubuntu 24.04 packages for ubuntu24 component" - dpkg-scanpackages --arch amd64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24}/Packages" - gzip -k -f "${DEB_DISTS_UBUNTU24}/Packages" + # AMD64 packages + mkdir -p "${DEB_DISTS_UBUNTU24_AMD64}" + echo "Scanning Ubuntu 24.04 AMD64 packages for ubuntu24 component" + dpkg-scanpackages --arch amd64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24_AMD64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU24_AMD64}/Packages" + + # ARM64 packages + mkdir -p "${DEB_DISTS_UBUNTU24_ARM64}" + echo "Scanning Ubuntu 24.04 ARM64 packages for ubuntu24 component" + dpkg-scanpackages --arch arm64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU24_ARM64}/Packages" fi pushd "${DEB_DISTS}" >/dev/null @@ -301,13 +362,19 @@ if [ "$GOT_DEB" = "1" ]; then [ -d "ubuntu24/binary-amd64" ] && AVAILABLE_COMPONENTS="${AVAILABLE_COMPONENTS} ubuntu24" AVAILABLE_COMPONENTS=$(echo $AVAILABLE_COMPONENTS | sed 's/^ *//') + # Determine available architectures + AVAILABLE_ARCHITECTURES="" + [ -d "${COMPONENTS}/binary-amd64" ] || [ -d "deb11/binary-amd64" ] || [ -d "deb12/binary-amd64" ] || [ -d "ubuntu22/binary-amd64" ] || [ -d "ubuntu24/binary-amd64" ] && AVAILABLE_ARCHITECTURES="${AVAILABLE_ARCHITECTURES} amd64" + [ -d "${COMPONENTS}/binary-arm64" ] || [ -d "deb11/binary-arm64" ] || [ -d "deb12/binary-arm64" ] || [ -d "ubuntu22/binary-arm64" ] || [ -d "ubuntu24/binary-arm64" ] && AVAILABLE_ARCHITECTURES="${AVAILABLE_ARCHITECTURES} arm64" + AVAILABLE_ARCHITECTURES=$(echo $AVAILABLE_ARCHITECTURES | sed 's/^ *//') + { echo "Origin: ${ORIGIN}" echo "Label: DocumentDB" echo "Suite: ${SUITE}" echo "Codename: ${SUITE}" echo "Version: 1.0" - echo "Architectures: amd64" + echo "Architectures: ${AVAILABLE_ARCHITECTURES}" echo "Components: ${AVAILABLE_COMPONENTS}" echo "Description: ${DESCRIPTION} - Multiple distributions supported" echo "Date: $(date -Ru)" @@ -321,6 +388,13 @@ if [ "$GOT_DEB" = "1" ]; then echo "Signing Release file with GPG" gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor -o Release.gpg Release gpg --default-key "$GPG_FINGERPRINT" --clearsign -o InRelease Release + + # Export public key for users to import + echo "Exporting GPG public key" + gpg --armor --export "$GPG_FINGERPRINT" > documentdb-archive-keyring.gpg + + # Also create the key in the main directory for easy access + gpg --armor --export "$GPG_FINGERPRINT" > ../../../documentdb-archive-keyring.gpg else echo "Warning: GPG_FINGERPRINT not set, skipping package signing" fi diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 6d17ae8..52b033e 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -31,7 +31,7 @@ jobs: - name: Install required packages run: | until sudo apt-get update; do sleep 1; done - sudo apt-get install -y createrepo-c dpkg-dev gnupg2 python3 + sudo apt-get install -y createrepo-c dpkg-dev dpkg-sig gnupg2 python3 - name: Setup GPG id: import_gpg uses: crazy-max/ghaction-import-gpg@v6 @@ -43,9 +43,13 @@ jobs: # Configure GPG signing if [ -n "${{ steps.import_gpg.outputs.fingerprint }}" ]; then echo "GPG_FINGERPRINT=${{ steps.import_gpg.outputs.fingerprint }}" >> $GITHUB_ENV - echo "✓ GPG key loaded: ${{ steps.import_gpg.outputs.fingerprint }}" + echo "✅ GPG key loaded successfully" + echo " Fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" + echo " Key ID: ${{ steps.import_gpg.outputs.keyid }}" + echo " User ID: ${{ steps.import_gpg.outputs.name }} <${{ steps.import_gpg.outputs.email }}>" else - echo "⚠ No GPG key configured - packages will not be signed" + echo "⚠️ No GPG key configured - packages will not be signed" + echo " To enable signing, add GPG_PRIVATE_KEY to repository secrets" fi # Configure DocumentDB version (can be overridden by repository variables) @@ -97,49 +101,6 @@ jobs: run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Download DocumentDB packages from latest release run: .github/scripts/download_packages.sh - - name: Create installation instructions - run: | - mkdir -p out/install - cat > out/install/apt-install.md << 'EOF' - # Installing DocumentDB from APT Repository - - ## Available Packages - The repository contains DocumentDB packages for different PostgreSQL versions: - - `postgresql-15-documentdb` - DocumentDB extension for PostgreSQL 15 - - `postgresql-16-documentdb` - DocumentDB extension for PostgreSQL 16 - - `postgresql-17-documentdb` - DocumentDB extension for PostgreSQL 17 - - ## Option 1: Install with trusted repository (if GPG signed) - ```bash - # Add the repository - echo "deb [arch=amd64] https://documentdb.github.io/deb stable main" | \ - sudo tee /etc/apt/sources.list.d/documentdb.list - - # Update package lists and install (choose your PostgreSQL version) - sudo apt-get update - sudo apt-get install postgresql-16-documentdb # or postgresql-15-documentdb, postgresql-17-documentdb - ``` - - ## Option 2: Install from unsigned repository (for testing) - ```bash - # Add the repository with trusted flag - echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | \ - sudo tee /etc/apt/sources.list.d/documentdb.list - - # Update package lists and install (choose your PostgreSQL version) - sudo apt-get update - sudo apt-get install postgresql-16-documentdb # or postgresql-15-documentdb, postgresql-17-documentdb - ``` - - ## Option 3: List all available packages - ```bash - # After adding the repository, list all DocumentDB packages - apt-cache search documentdb - ``` - - ## Option 4: Direct package download - Download packages directly from: https://documentdb.github.io/packages/ - EOF - name: Debug output structure run: | echo "Contents of out directory:" diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md new file mode 100644 index 0000000..a97d48e --- /dev/null +++ b/PACKAGE-INSTALL.md @@ -0,0 +1,167 @@ +# DocumentDB Package Installation + +Fast and simple installation of DocumentDB. + +## Install Commands + +### Ubuntu & Debian (AMD64 & ARM64) +```bash +curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg +echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list +sudo apt update +sudo apt install postgresql-16-documentdb +``` + +### RHEL & CentOS (x86_64 & aarch64) +```bash +curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import - +cat < 📦 DocumentDB Package Repository -

+

Official APT and YUM repositories for DocumentDB packages

+
+ + 🔐 GPG Signed + + + 🐧 Multi-Distribution + + + 🔄 Auto-Updates + +
{/* Quick Install Cards */} @@ -28,20 +39,29 @@ export default function PackagesPage() {
- # Add repository + # Install GPG key (recommended)
- echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list + curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
- sudo apt-get update
+ # Add signed repository (AMD64 & ARM64)
- # Install DocumentDB (choose your PostgreSQL version) + echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list
- sudo apt-get install postgresql-16-documentdb
- # or postgresql-15-documentdb, postgresql-17-documentdb + # Update and install +
+ sudo apt-get update +
+ sudo apt-get install postgresql-16-documentdb
+

+ Multi-architecture: Supports both AMD64 and ARM64 (Apple Silicon, AWS Graviton, etc.) +

+

+ Quick install (no GPG verification): Add trusted=yes instead of GPG key +

{/* RHEL/CentOS/Fedora Card */} @@ -52,11 +72,16 @@ export default function PackagesPage() { -

RHEL/CentOS/Fedora

+

RHEL

- # Add repository + # Import GPG key (recommended) +
+ curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import - +
+
+ # Add signed repository
sudo tee /etc/yum.repos.d/documentdb.repo <<EOF
@@ -64,28 +89,53 @@ export default function PackagesPage() {
name=DocumentDB Repository
- baseurl=https://documentdb.github.io/rpm + baseurl=https://documentdb.github.io/rpm/rhel8
enabled=1
- gpgcheck=0 + gpgcheck=1 +
+ gpgkey=https://documentdb.github.io/documentdb-archive-keyring.gpg
EOF

- # Install DocumentDB (choose your PostgreSQL version) + # Install DocumentDB
sudo yum install postgresql16-documentdb -
- # or postgresql17-documentdb
+

+ Multi-architecture: Supports both x86_64 and aarch64 (AWS Graviton, etc.) +

+

+ Quick install (no GPG verification): Set gpgcheck=0 instead of importing GPG key +

+ + + + {/* Installation Guide Link */} +
+
+
+

📖 Complete Installation Guide

+

+ Detailed instructions for all distributions, GPG verification, troubleshooting, and automation scripts +

+
+ + View Guide +
{/* Manual Setup Section */}
-

Manual Setup

+

Distribution-Specific Setup

{/* APT Manual Setup */}
@@ -94,17 +144,19 @@ export default function PackagesPage() {
-                {`# Add repository with trusted flag (unsigned packages)
+                {`# Option 1: With GPG verification (recommended)
+curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | \\
+  sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
+echo "deb [arch=amd64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | \\
+  sudo tee /etc/apt/sources.list.d/documentdb.list
+
+# Option 2: Quick install (no GPG verification)  
 echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | \\
   sudo tee /etc/apt/sources.list.d/documentdb.list
-sudo apt-get update
 
-# Install DocumentDB for your PostgreSQL version
+sudo apt-get update
 sudo apt-get install postgresql-16-documentdb
-# Available packages: postgresql-15-documentdb, postgresql-16-documentdb, postgresql-17-documentdb
-
-# List all available DocumentDB packages
-apt-cache search documentdb`}
+# Available: postgresql-15-documentdb, postgresql-16-documentdb, postgresql-17-documentdb`}
               
@@ -116,21 +168,28 @@ apt-cache search documentdb`}
-                {`# Add repository configuration
+                {`# Option 1: With GPG verification (recommended)
+curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import -
 sudo tee /etc/yum.repos.d/documentdb.repo <
+# Available: postgresql16-documentdb, postgresql17-documentdb`}
               
From 21be72d10801b305ad9a01d81673511294592504 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 07:48:43 +0000 Subject: [PATCH 04/17] Fix workflow: Use Ubuntu 22.04 for dpkg-sig compatibility - Ubuntu 24.04 (ubuntu-latest) doesn't have dpkg-sig package - Ubuntu 22.04 has dpkg-sig in universe repository - Required for GPG signing of DEB packages --- .github/workflows/nextjs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 52b033e..34b3bcc 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -24,7 +24,7 @@ concurrency: jobs: # Build job build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v4 From c1174cb9ac7e6a5932860b518ac483a7d4b45c78 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 07:56:27 +0000 Subject: [PATCH 05/17] Fix final directory listing in repository build script --- .github/scripts/download_packages.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 46e02b5..fa528bb 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -491,8 +491,9 @@ fi echo "Package repository setup complete!" echo "" echo "Repository structure:" -ls -lh out/ - - -echo "Package download complete!" -ls -lh out/packages/ +echo "DEB repository:" +[ -d out/deb ] && ls -lh out/deb/ || echo "No DEB repository found" +echo "RPM repository:" +[ -d out/rpm ] && ls -lh out/rpm/ || echo "No RPM repository found" +echo "Direct download packages:" +[ -d out/packages ] && ls -lh out/packages/ || echo "No direct download packages found" From 24c5cb84d415b3fc8dcac9ea5d1fb0e817c5fbcf Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 08:01:15 +0000 Subject: [PATCH 06/17] Improve repository build status reporting with package counts --- .github/scripts/download_packages.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index fa528bb..b674282 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -490,10 +490,10 @@ fi echo "Package repository setup complete!" echo "" -echo "Repository structure:" -echo "DEB repository:" -[ -d out/deb ] && ls -lh out/deb/ || echo "No DEB repository found" -echo "RPM repository:" -[ -d out/rpm ] && ls -lh out/rpm/ || echo "No RPM repository found" -echo "Direct download packages:" -[ -d out/packages ] && ls -lh out/packages/ || echo "No direct download packages found" +echo "Repository setup complete!" +echo "" +echo "Multi-architecture GPG-signed repository structure created successfully." +echo "DEB repository: $([ -d out/deb ] && echo "✓ Created with $(find out/deb -name "*.deb" | wc -l) signed packages" || echo "✗ Not found")" +echo "RPM repository: $([ -d out/rpm ] && echo "✓ Created with $(find out/rpm -name "*.rpm" | wc -l) packages" || echo "✗ Not found")" +echo "Direct downloads: $([ -d out/packages ] && echo "✓ Available with $(ls out/packages/*.{deb,rpm} 2>/dev/null | wc -l) packages" || echo "✗ Not found")" +echo "GPG key: $([ -f out/documentdb-archive-keyring.gpg ] && echo "✓ Exported" || echo "✗ Not found")" From 3bb853719d95e9d6ea1d30c6636ce41747b7c778 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:03:02 +0000 Subject: [PATCH 07/17] Fix YUM repository creation and improve debugging - Add detailed logging to RPM repository creation process - Fix repository metadata generation with proper error handling - Improve final status reporting with specific metadata file checks - Remove maintenance notice from package page - Fix DEB pool validation to check distribution-specific directories --- .github/scripts/download_packages.sh | 125 ++++++++++--- app/packages/page.tsx | 263 +++++++++++---------------- 2 files changed, 201 insertions(+), 187 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index b674282..3752f71 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -259,17 +259,21 @@ print(json.dumps(output, indent=2)) echo "Successfully processed packages from $REPO" echo "GOT_DEB=$GOT_DEB, GOT_RPM=$GOT_RPM" - echo "Checking DEB_POOL directory: $DEB_POOL" - ls -la "$DEB_POOL" 2>/dev/null || echo "DEB_POOL directory does not exist" + +# Check distribution-specific DEB pools +echo "Checking distribution-specific DEB pools..." +for pool in "$DEB_POOL_DEB11" "$DEB_POOL_DEB12" "$DEB_POOL_UBUNTU22" "$DEB_POOL_UBUNTU24"; do + if [ -d "$pool" ]; then + echo "Found pool: $pool with $(ls -1 $pool/*.deb 2>/dev/null | wc -l) packages" + fi +done -# Build DEB repository if we have DEB packages -echo "Checking if DEB repository should be built..." -echo "DEB_POOL exists: $([ -d "$DEB_POOL" ] && echo 'yes' || echo 'no')" -if [ -d "$DEB_POOL" ]; then - echo "DEB_POOL contents:" - ls -la "$DEB_POOL" -fi -echo "DEB files in pool: $(ls -1 $DEB_POOL/*.deb 2>/dev/null | wc -l)" +echo "Checking RPM pools..." +for pool in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do + if [ -d "$pool" ]; then + echo "Found pool: $pool with $(ls -1 $pool/*.rpm 2>/dev/null | wc -l) packages" + fi +done if [ "$GOT_DEB" = "1" ]; then echo "Building APT repository with multiple distribution components..." @@ -412,88 +416,151 @@ if [ "$GOT_RPM" = "1" ]; then # Build RHEL 8 repository if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then echo "Building RHEL 8 YUM repository..." + echo "RHEL 8 packages found: $(ls -1 $RPM_POOL_RHEL8/*.rpm | wc -l)" pushd "$RPM_POOL_RHEL8" >/dev/null # Sign RPMs if GPG is available if [ -n "$GPG_FINGERPRINT" ]; then echo "Signing RHEL 8 RPM packages" for rpm_file in *.rpm; do + echo "Signing: $rpm_file" rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" done fi echo "Creating RHEL 8 YUM repository metadata" if command -v createrepo_c >/dev/null 2>&1; then - createrepo_c . + echo "Running: createrepo_c ." + createrepo_c . || echo "Error: createrepo_c failed for RHEL 8" + echo "Repository metadata created. Contents:" + ls -la repodata/ 2>/dev/null || echo "No repodata directory found" else - echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + echo "Error: createrepo_c not found, cannot create YUM repository metadata" fi # Sign repository metadata if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then + if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then echo "Signing RHEL 8 repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign repodata/repomd.xml" fi popd >/dev/null + else + echo "No RHEL 8 packages found in $RPM_POOL_RHEL8" fi # Build RHEL 9 repository if [ -d "$RPM_POOL_RHEL9" ] && [ "$(ls -A $RPM_POOL_RHEL9/*.rpm 2>/dev/null)" ]; then echo "Building RHEL 9 YUM repository..." + echo "RHEL 9 packages found: $(ls -1 $RPM_POOL_RHEL9/*.rpm | wc -l)" pushd "$RPM_POOL_RHEL9" >/dev/null # Sign RPMs if GPG is available if [ -n "$GPG_FINGERPRINT" ]; then echo "Signing RHEL 9 RPM packages" for rpm_file in *.rpm; do + echo "Signing: $rpm_file" rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" done fi echo "Creating RHEL 9 YUM repository metadata" if command -v createrepo_c >/dev/null 2>&1; then - createrepo_c . + echo "Running: createrepo_c ." + createrepo_c . || echo "Error: createrepo_c failed for RHEL 9" + echo "Repository metadata created. Contents:" + ls -la repodata/ 2>/dev/null || echo "No repodata directory found" else - echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + echo "Error: createrepo_c not found, cannot create YUM repository metadata" fi # Sign repository metadata if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then + if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then echo "Signing RHEL 9 repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign repodata/repomd.xml" fi popd >/dev/null + else + echo "No RHEL 9 packages found in $RPM_POOL_RHEL9" fi # Also create a main RPM repository with RHEL 8 packages for backward compatibility if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then + echo "Creating main YUM repository (RHEL 8 packages for backward compatibility)" mkdir -p out/rpm/main cp "$RPM_POOL_RHEL8"/* out/rpm/main/ + echo "Copied $(ls -1 out/rpm/main/*.rpm | wc -l) packages to main repository" pushd out/rpm/main >/dev/null - echo "Creating main YUM repository (RHEL 8 packages)" + if command -v createrepo_c >/dev/null 2>&1; then - createrepo_c . + echo "Running: createrepo_c . (for main repository)" + createrepo_c . || echo "Error: createrepo_c failed for main repository" + echo "Main repository metadata created. Contents:" + ls -la repodata/ 2>/dev/null || echo "No repodata directory found" else - echo "Warning: createrepo_c not found, skipping YUM repository metadata creation" + echo "Error: createrepo_c not found, cannot create main YUM repository metadata" fi - if [ -n "$GPG_FINGERPRINT" ]; then - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml + + if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then + echo "Signing main repository metadata" + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign main repodata/repomd.xml" fi popd >/dev/null + else + echo "No RHEL 8 packages found for main repository" fi echo "YUM repositories built successfully" fi +echo "" echo "Package repository setup complete!" echo "" -echo "Repository setup complete!" +echo "=== Repository Structure Summary ===" + +# DEB Repository Status +if [ -d out/deb ]; then + DEB_COUNT=$(find out/deb -name "*.deb" | wc -l) + DEB_RELEASE_FILE=$([ -f out/deb/dists/stable/Release ] && echo "✓" || echo "✗") + echo "DEB repository: ✓ Created with $DEB_COUNT signed packages, Release file: $DEB_RELEASE_FILE" +else + echo "DEB repository: ✗ Not found" +fi + +# RPM Repository Status +if [ -d out/rpm ]; then + RPM_COUNT=$(find out/rpm -name "*.rpm" | wc -l) + RHEL8_REPO=$([ -f out/rpm/rhel8/repodata/repomd.xml ] && echo "✓" || echo "✗") + RHEL9_REPO=$([ -f out/rpm/rhel9/repodata/repomd.xml ] && echo "✓" || echo "✗") + MAIN_REPO=$([ -f out/rpm/main/repodata/repomd.xml ] && echo "✓" || echo "✗") + echo "RPM repository: ✓ Created with $RPM_COUNT packages" + echo " - RHEL 8 metadata: $RHEL8_REPO" + echo " - RHEL 9 metadata: $RHEL9_REPO" + echo " - Main metadata: $MAIN_REPO" +else + echo "RPM repository: ✗ Not found" +fi + +# Direct Downloads Status +if [ -d out/packages ]; then + PKG_COUNT=$(ls out/packages/*.{deb,rpm} 2>/dev/null | wc -l) + PKG_INDEX=$([ -f out/packages/index.html ] && echo "✓" || echo "✗") + echo "Direct downloads: ✓ Available with $PKG_COUNT packages, Index: $PKG_INDEX" +else + echo "Direct downloads: ✗ Not found" +fi + +# GPG Key Status +if [ -f out/documentdb-archive-keyring.gpg ]; then + echo "GPG key: ✓ Exported" +else + echo "GPG key: ✗ Not found" +fi + echo "" -echo "Multi-architecture GPG-signed repository structure created successfully." -echo "DEB repository: $([ -d out/deb ] && echo "✓ Created with $(find out/deb -name "*.deb" | wc -l) signed packages" || echo "✗ Not found")" -echo "RPM repository: $([ -d out/rpm ] && echo "✓ Created with $(find out/rpm -name "*.rpm" | wc -l) packages" || echo "✗ Not found")" -echo "Direct downloads: $([ -d out/packages ] && echo "✓ Available with $(ls out/packages/*.{deb,rpm} 2>/dev/null | wc -l) packages" || echo "✗ Not found")" -echo "GPG key: $([ -f out/documentdb-archive-keyring.gpg ] && echo "✓ Exported" || echo "✗ Not found")" +echo "Repository URLs:" +echo " APT: https://documentdb.io/deb stable main" +echo " YUM: https://documentdb.io/rpm/rhel8 (or /rhel9, /main)" +echo " Browse: https://documentdb.io/packages/" diff --git a/app/packages/page.tsx b/app/packages/page.tsx index 0ffd235..1566035 100644 --- a/app/packages/page.tsx +++ b/app/packages/page.tsx @@ -39,29 +39,26 @@ export default function PackagesPage() {
- # Install GPG key (recommended) + # Add repository with GPG verification
- curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg + curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
+ echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list
- # Add signed repository (AMD64 & ARM64)
- echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list + # Install packages
-
- # Update and install -
- sudo apt-get update -
- sudo apt-get install postgresql-16-documentdb + sudo apt-get update && sudo apt-get install postgresql-16-documentdb
-

- Multi-architecture: Supports both AMD64 and ARM64 (Apple Silicon, AWS Graviton, etc.) -

-

- Quick install (no GPG verification): Add trusted=yes instead of GPG key -

+
+ + Supports: Debian 11/12, Ubuntu 22.04/24.04 + + + AMD64 + ARM64 + +
{/* RHEL/CentOS/Fedora Card */} @@ -72,45 +69,41 @@ export default function PackagesPage() { -

RHEL

+

RHEL/CentOS

+
- # Import GPG key (recommended) + # Add repository with GPG verification
- curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import - + curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo rpm --import -
-
- # Add signed repository -
- sudo tee /etc/yum.repos.d/documentdb.repo <<EOF -
- [documentdb] + echo '[documentdb]
name=DocumentDB Repository
- baseurl=https://documentdb.github.io/rpm/rhel8 + baseurl=https://documentdb.io/rpm/rhel8
enabled=1
gpgcheck=1
- gpgkey=https://documentdb.github.io/documentdb-archive-keyring.gpg + gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo
- EOF
-
- # Install DocumentDB + # Install packages
sudo yum install postgresql16-documentdb
-

- Multi-architecture: Supports both x86_64 and aarch64 (AWS Graviton, etc.) -

-

- Quick install (no GPG verification): Set gpgcheck=0 instead of importing GPG key -

+
+ + Supports: RHEL 8/9, CentOS, Fedora + + + x86_64 + aarch64 + +
@@ -124,7 +117,7 @@ export default function PackagesPage() {

@@ -133,145 +126,99 @@ export default function PackagesPage() { - {/* Manual Setup Section */} + {/* Alternative Installation Methods */}
-

Distribution-Specific Setup

+

Alternative Installation Methods

- {/* APT Manual Setup */} -
-

- APT Repository (Debian/Ubuntu) + {/* Direct Downloads */} +
+

+ Direct Package Downloads

-
-
-                {`# Option 1: With GPG verification (recommended)
-curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | \\
-  sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
-echo "deb [arch=amd64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | \\
-  sudo tee /etc/apt/sources.list.d/documentdb.list
-
-# Option 2: Quick install (no GPG verification)  
-echo "deb [arch=amd64 trusted=yes] https://documentdb.github.io/deb stable main" | \\
-  sudo tee /etc/apt/sources.list.d/documentdb.list
-
-sudo apt-get update
-sudo apt-get install postgresql-16-documentdb
-# Available: postgresql-15-documentdb, postgresql-16-documentdb, postgresql-17-documentdb`}
-              
-
+

+ Browse and download individual packages without setting up repositories. +

+ + + + + Browse All Packages +
- {/* YUM Manual Setup */} -
-

- YUM Repository (RHEL/CentOS/Fedora) -

-
-
-                {`# Option 1: With GPG verification (recommended)
-curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import -
-sudo tee /etc/yum.repos.d/documentdb.repo <
-              
+ {/* Manual Installation */} +
+

Manual Installation

+

+ For one-time installations, you can download and install packages manually: +

+
+ + # Example: Direct .deb installation
+ wget https://documentdb.io/packages/ubuntu22.04-postgresql-16-documentdb_0.107-0_amd64.deb
+ sudo dpkg -i ubuntu22.04-postgresql-16-documentdb_0.107-0_amd64.deb
+
+ # Example: Direct .rpm installation
+ wget https://documentdb.io/packages/rhel8-postgresql16-documentdb-0.107.0-1.el8.x86_64.rpm
+ sudo rpm -i rhel8-postgresql16-documentdb-0.107.0-1.el8.x86_64.rpm +
- {/* Direct Downloads */} -
-

Direct Downloads

-

- Browse and download packages directly without adding the repository. -

- - - - - Browse All Packages - -
- - {/* Repository Information */} -
-

Repository Information

-
    -
  • - -
    - APT Repository:{" "} - - https://documentdb.github.io/deb - -
    -
  • -
  • - -
    - YUM Repository:{" "} - - https://documentdb.github.io/rpm - -
    -
  • -
  • - - -
  • -
-
- {/* Package Information */}

Available Packages

-
+ +
-

APT Packages (Debian/Ubuntu)

-
    -
  • postgresql-15-documentdb - DocumentDB extension for PostgreSQL 15
  • -
  • postgresql-16-documentdb - DocumentDB extension for PostgreSQL 16
  • -
  • postgresql-17-documentdb - DocumentDB extension for PostgreSQL 17
  • +

    + + + + APT Packages +

    +
    + Debian 11/12, Ubuntu 22.04/24.04 +
    +
      +
    • • postgresql-15-documentdb
    • +
    • • postgresql-16-documentdb
    • +
    • • postgresql-17-documentdb
+
-

RPM Packages (RHEL/CentOS/Fedora)

-
    -
  • postgresql16-documentdb - DocumentDB extension for PostgreSQL 16
  • -
  • postgresql17-documentdb - DocumentDB extension for PostgreSQL 17
  • +

    + + + + RPM Packages +

    +
    + RHEL 8/9, CentOS, Fedora +
    +
      +
    • • postgresql16-documentdb
    • +
    • • postgresql17-documentdb
-
-

- Note: These packages are currently unsigned. Use the trusted=yes flag for APT or gpgcheck=0 for YUM as shown in the examples above. -

+
+ +
+
+ + + +
+

Multi-Architecture Support

+

+ All packages support both AMD64 and ARM64 architectures (including Apple Silicon, AWS Graviton, etc.) +

+
From f6f8874079a1cc0b64422e78ab4374dc964fce86 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:25:33 +0000 Subject: [PATCH 08/17] Clean up repository build script: remove verbose logging and unnecessary comments --- .github/scripts/download_packages.sh | 337 ++++++--------------------- 1 file changed, 71 insertions(+), 266 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 3752f71..c7b630e 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -1,31 +1,19 @@ #!/bin/bash set -e -# Repository to download packages from REPO="documentdb/documentdb" - -# Output directory OUT_DIR="out" - -# Version Configuration -# Set to specific version (e.g., "v0.107-0") or "latest" for most recent release DOCUMENTDB_VERSION="${DOCUMENTDB_VERSION:-latest}" -# Multi-version support: set to "true" to keep multiple versions in repository MULTI_VERSION="${MULTI_VERSION:-true}" - -# Repository configuration SUITE="${SUITE:-stable}" COMPONENTS="${COMPONENTS:-main}" ORIGIN="${ORIGIN:-DocumentDB}" - DESCRIPTION="${DESCRIPTION:-DocumentDB APT and YUM Repository}" -# Function to sign DEB packages sign_deb_package() { local package_file="$1" if [ -n "$GPG_FINGERPRINT" ] && [ -f "$package_file" ]; then echo " Signing DEB package: $(basename "$package_file")" - # DEB packages can be signed using dpkg-sig if command -v dpkg-sig >/dev/null 2>&1; then dpkg-sig --sign builder --gpg-options "--default-key $GPG_FINGERPRINT" "$package_file" || echo " Warning: Could not sign $(basename "$package_file")" else @@ -66,7 +54,6 @@ generate_hashes() { HASH_TYPE="$1" HASH_COMMAND="$2" echo "${HASH_TYPE}:" - # Find all component directories and generate hashes for all files for component in ${COMPONENTS} deb11 deb12 ubuntu22 ubuntu24; do if [ -d "$component" ]; then find "$component" -type f | while read -r file @@ -79,37 +66,26 @@ generate_hashes() { echo "Downloading packages from $REPO releases" -# Get release info based on DOCUMENTDB_VERSION setting if [ "$DOCUMENTDB_VERSION" = "latest" ]; then - echo "Fetching latest release..." if release=$(curl -fqs "https://api.github.com/repos/${REPO}/releases" | python3 -c "import sys, json; releases = json.load(sys.stdin); print(json.dumps(releases[0])) if releases else sys.exit(1)") then tag="$(echo "$release" | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])")" - echo "Found latest release: $tag" + echo "Using latest release: $tag" else echo "Error: Could not fetch latest release information" exit 1 fi else - echo "Using specified version: $DOCUMENTDB_VERSION" tag="$DOCUMENTDB_VERSION" - # Verify the specified version exists if ! release=$(curl -fqs "https://api.github.com/repos/${REPO}/releases/tags/$tag") then echo "Error: Version $tag not found in releases" exit 1 fi - echo "Found specified release: $tag" + echo "Using specified release: $tag" fi -# Show version information now that we have the tag - - - # Create packages directory for direct downloads - mkdir -p out/packages - - # Process each asset - # First, create a temporary file to store asset information +mkdir -p out/packages ASSETS_FILE=$(mktemp) echo "$release" | python3 -c " import sys, json @@ -125,121 +101,56 @@ for asset in data.get('assets', []): continue fi - echo "Processing: $filename" - - # Determine file type and handle accordingly if [[ "$filename" == *.deb ]]; then - # Always download all deb packages for direct access - mkdir -p out/packages - echo " Downloading DEB package for direct download" wget -q -P out/packages "$download_url" - # For APT repository, organize packages by distribution if [[ "$filename" =~ ^deb11-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 mkdir -p "$DEB_POOL_DEB11" clean_name=$(echo "$filename" | sed 's/^deb11-//') - echo " Adding Debian 11 package to APT repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - # Multi-version mode: overwrite same version, preserve different versions - cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" - sign_deb_package "$DEB_POOL_DEB11/$clean_name" - if [ -f "$DEB_POOL_DEB11/$clean_name" ]; then - echo " Updated existing package: $clean_name" - else - echo " Added new package: $clean_name" - fi - else - # Single version mode: overwrite everything - cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" - sign_deb_package "$DEB_POOL_DEB11/$clean_name" - fi + cp "out/packages/$filename" "$DEB_POOL_DEB11/$clean_name" + sign_deb_package "$DEB_POOL_DEB11/$clean_name" elif [[ "$filename" =~ ^deb12-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 mkdir -p "$DEB_POOL_DEB12" clean_name=$(echo "$filename" | sed 's/^deb12-//') - echo " Adding Debian 12 package to APT repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" - sign_deb_package "$DEB_POOL_DEB12/$clean_name" - echo " Updated package: $clean_name" - else - cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" - sign_deb_package "$DEB_POOL_DEB12/$clean_name" - fi + cp "out/packages/$filename" "$DEB_POOL_DEB12/$clean_name" + sign_deb_package "$DEB_POOL_DEB12/$clean_name" elif [[ "$filename" =~ ^ubuntu22\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 mkdir -p "$DEB_POOL_UBUNTU22" clean_name=$(echo "$filename" | sed 's/^ubuntu22\.04-//') - echo " Adding Ubuntu 22.04 package to APT repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" - sign_deb_package "$DEB_POOL_UBUNTU22/$clean_name" - echo " Updated package: $clean_name" - else - cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" - sign_deb_package "$DEB_POOL_UBUNTU22/$clean_name" - fi + cp "out/packages/$filename" "$DEB_POOL_UBUNTU22/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU22/$clean_name" elif [[ "$filename" =~ ^ubuntu24\.04-postgresql-[0-9]+-documentdb.*\.deb$ ]]; then GOT_DEB=1 mkdir -p "$DEB_POOL_UBUNTU24" clean_name=$(echo "$filename" | sed 's/^ubuntu24\.04-//') - echo " Adding Ubuntu 24.04 package to APT repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" - sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" - echo " Updated package: $clean_name" - else - cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" - sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" - fi - else - echo " Skipping $filename for APT repository (unsupported distribution or architecture)" + cp "out/packages/$filename" "$DEB_POOL_UBUNTU24/$clean_name" + sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" fi elif [[ "$filename" == *.rpm ]]; then - # Always download all RPM packages for direct access - mkdir -p out/packages - echo " Downloading RPM package for direct download" wget -q -P out/packages "$download_url" - # For YUM repository, organize packages by distribution if [[ "$filename" =~ ^rhel8-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then GOT_RPM=1 mkdir -p "$RPM_POOL_RHEL8" clean_name=$(echo "$filename" | sed 's/^rhel8-//') - echo " Adding RHEL 8 package to YUM repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" - echo " Updated package: $clean_name" - else - cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" - fi + cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" elif [[ "$filename" =~ ^rhel9-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then GOT_RPM=1 mkdir -p "$RPM_POOL_RHEL9" clean_name=$(echo "$filename" | sed 's/^rhel9-//') - echo " Adding RHEL 9 package to YUM repository: $filename -> $clean_name" - if [ "$MULTI_VERSION" = "true" ]; then - cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" - echo " Updated package: $clean_name" - else - cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" - fi - else - echo " Skipping $filename for YUM repository (unsupported distribution or architecture)" + cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" fi else - # Other files go directly to packages - echo " Downloading to packages directory" wget -q -P out/packages "$download_url" fi done < "$ASSETS_FILE" - # Clean up temporary file - rm -f "$ASSETS_FILE" - - # Save release metadata - echo "$release" | python3 -c " +rm -f "$ASSETS_FILE" + +echo "$release" | python3 -c " import sys, json data = json.load(sys.stdin) output = { @@ -256,42 +167,46 @@ output = { } print(json.dumps(output, indent=2)) " > out/packages/release-info.json - - echo "Successfully processed packages from $REPO" - echo "GOT_DEB=$GOT_DEB, GOT_RPM=$GOT_RPM" - -# Check distribution-specific DEB pools -echo "Checking distribution-specific DEB pools..." -for pool in "$DEB_POOL_DEB11" "$DEB_POOL_DEB12" "$DEB_POOL_UBUNTU22" "$DEB_POOL_UBUNTU24"; do - if [ -d "$pool" ]; then - echo "Found pool: $pool with $(ls -1 $pool/*.deb 2>/dev/null | wc -l) packages" - fi -done -echo "Checking RPM pools..." -for pool in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do - if [ -d "$pool" ]; then - echo "Found pool: $pool with $(ls -1 $pool/*.rpm 2>/dev/null | wc -l) packages" - fi -done +echo "Successfully processed packages from $REPO" if [ "$GOT_DEB" = "1" ]; then echo "Building APT repository with multiple distribution components..." pushd out/deb >/dev/null - # Create main component with Ubuntu 22.04 packages (for backward compatibility) - if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then - # AMD64 packages - mkdir -p "${DEB_DISTS_COMPONENTS_AMD64}" - echo "Scanning Ubuntu 22.04 AMD64 packages for main component" + if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_COMPONENTS_AMD64}" "${DEB_DISTS_COMPONENTS_ARM64}" dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS_AMD64}/Packages" - gzip -k -f "${DEB_DISTS_COMPONENTS_AMD64}/Packages" - - # ARM64 packages - mkdir -p "${DEB_DISTS_COMPONENTS_ARM64}" - echo "Scanning Ubuntu 22.04 ARM64 packages for main component" dpkg-scanpackages --arch arm64 pool/ubuntu22/ > "${DEB_DISTS_COMPONENTS_ARM64}/Packages" - gzip -k -f "${DEB_DISTS_COMPONENTS_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_COMPONENTS_AMD64}/Packages" "${DEB_DISTS_COMPONENTS_ARM64}/Packages" + fi + + if [ -d "pool/deb11" ] && [ "$(ls -A pool/deb11/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_DEB11_AMD64}" "${DEB_DISTS_DEB11_ARM64}" + dpkg-scanpackages --arch amd64 pool/deb11/ > "${DEB_DISTS_DEB11_AMD64}/Packages" + dpkg-scanpackages --arch arm64 pool/deb11/ > "${DEB_DISTS_DEB11_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_DEB11_AMD64}/Packages" "${DEB_DISTS_DEB11_ARM64}/Packages" + fi + + if [ -d "pool/deb12" ] && [ "$(ls -A pool/deb12/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_DEB12_AMD64}" "${DEB_DISTS_DEB12_ARM64}" + dpkg-scanpackages --arch amd64 pool/deb12/ > "${DEB_DISTS_DEB12_AMD64}/Packages" + dpkg-scanpackages --arch arm64 pool/deb12/ > "${DEB_DISTS_DEB12_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_DEB12_AMD64}/Packages" "${DEB_DISTS_DEB12_ARM64}/Packages" + fi + + if [ -d "pool/ubuntu22" ] && [ "$(ls -A pool/ubuntu22/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_UBUNTU22_AMD64}" "${DEB_DISTS_UBUNTU22_ARM64}" + dpkg-scanpackages --arch amd64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22_AMD64}/Packages" + dpkg-scanpackages --arch arm64 pool/ubuntu22/ > "${DEB_DISTS_UBUNTU22_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU22_AMD64}/Packages" "${DEB_DISTS_UBUNTU22_ARM64}/Packages" + fi + + if [ -d "pool/ubuntu24" ] && [ "$(ls -A pool/ubuntu24/*.deb 2>/dev/null)" ]; then + mkdir -p "${DEB_DISTS_UBUNTU24_AMD64}" "${DEB_DISTS_UBUNTU24_ARM64}" + dpkg-scanpackages --arch amd64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24_AMD64}/Packages" + dpkg-scanpackages --arch arm64 pool/ubuntu24/ > "${DEB_DISTS_UBUNTU24_ARM64}/Packages" + gzip -k -f "${DEB_DISTS_UBUNTU24_AMD64}/Packages" "${DEB_DISTS_UBUNTU24_ARM64}/Packages" fi # Create deb11 component (Debian 11 Bullseye) @@ -409,156 +324,46 @@ if [ "$GOT_DEB" = "1" ]; then echo "APT repository built successfully with multiple distribution support" fi -# Build RPM repositories if we have RPM packages if [ "$GOT_RPM" = "1" ]; then - echo "Building YUM repositories for different RHEL versions..." + echo "Building YUM repositories..." - # Build RHEL 8 repository - if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then - echo "Building RHEL 8 YUM repository..." - echo "RHEL 8 packages found: $(ls -1 $RPM_POOL_RHEL8/*.rpm | wc -l)" - pushd "$RPM_POOL_RHEL8" >/dev/null - - # Sign RPMs if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then - echo "Signing RHEL 8 RPM packages" - for rpm_file in *.rpm; do - echo "Signing: $rpm_file" - rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" - done - fi - - echo "Creating RHEL 8 YUM repository metadata" - if command -v createrepo_c >/dev/null 2>&1; then - echo "Running: createrepo_c ." - createrepo_c . || echo "Error: createrepo_c failed for RHEL 8" - echo "Repository metadata created. Contents:" - ls -la repodata/ 2>/dev/null || echo "No repodata directory found" - else - echo "Error: createrepo_c not found, cannot create YUM repository metadata" - fi - - # Sign repository metadata if GPG is available - if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then - echo "Signing RHEL 8 repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign repodata/repomd.xml" - fi - - popd >/dev/null - else - echo "No RHEL 8 packages found in $RPM_POOL_RHEL8" - fi - - # Build RHEL 9 repository - if [ -d "$RPM_POOL_RHEL9" ] && [ "$(ls -A $RPM_POOL_RHEL9/*.rpm 2>/dev/null)" ]; then - echo "Building RHEL 9 YUM repository..." - echo "RHEL 9 packages found: $(ls -1 $RPM_POOL_RHEL9/*.rpm | wc -l)" - pushd "$RPM_POOL_RHEL9" >/dev/null - - # Sign RPMs if GPG is available - if [ -n "$GPG_FINGERPRINT" ]; then - echo "Signing RHEL 9 RPM packages" - for rpm_file in *.rpm; do - echo "Signing: $rpm_file" - rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" || echo "Warning: Could not sign $rpm_file" - done - fi - - echo "Creating RHEL 9 YUM repository metadata" - if command -v createrepo_c >/dev/null 2>&1; then - echo "Running: createrepo_c ." - createrepo_c . || echo "Error: createrepo_c failed for RHEL 9" - echo "Repository metadata created. Contents:" - ls -la repodata/ 2>/dev/null || echo "No repodata directory found" - else - echo "Error: createrepo_c not found, cannot create YUM repository metadata" - fi - - # Sign repository metadata if GPG is available - if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then - echo "Signing RHEL 9 repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign repodata/repomd.xml" + for POOL in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do + if [ -d "$POOL" ] && [ "$(find "$POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then + pushd "$POOL" >/dev/null + + if [ -n "$GPG_FINGERPRINT" ]; then + for rpm_file in *.rpm; do + rpm --define "%_signature gpg" --define "%_gpg_name ${GPG_FINGERPRINT}" --addsign "$rpm_file" 2>/dev/null || true + done + fi + + createrepo_c . >/dev/null 2>&1 || echo "Warning: createrepo_c failed for $POOL" + + if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true + fi + + popd >/dev/null fi - - popd >/dev/null - else - echo "No RHEL 9 packages found in $RPM_POOL_RHEL9" - fi + done - # Also create a main RPM repository with RHEL 8 packages for backward compatibility - if [ -d "$RPM_POOL_RHEL8" ] && [ "$(ls -A $RPM_POOL_RHEL8/*.rpm 2>/dev/null)" ]; then - echo "Creating main YUM repository (RHEL 8 packages for backward compatibility)" + # Create main repository for backward compatibility + if [ -d "$RPM_POOL_RHEL8" ] && [ "$(find "$RPM_POOL_RHEL8" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then mkdir -p out/rpm/main cp "$RPM_POOL_RHEL8"/* out/rpm/main/ - echo "Copied $(ls -1 out/rpm/main/*.rpm | wc -l) packages to main repository" pushd out/rpm/main >/dev/null - - if command -v createrepo_c >/dev/null 2>&1; then - echo "Running: createrepo_c . (for main repository)" - createrepo_c . || echo "Error: createrepo_c failed for main repository" - echo "Main repository metadata created. Contents:" - ls -la repodata/ 2>/dev/null || echo "No repodata directory found" - else - echo "Error: createrepo_c not found, cannot create main YUM repository metadata" - fi - + createrepo_c . >/dev/null 2>&1 || true if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then - echo "Signing main repository metadata" - gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml || echo "Warning: Could not sign main repodata/repomd.xml" + gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true fi popd >/dev/null - else - echo "No RHEL 8 packages found for main repository" fi echo "YUM repositories built successfully" fi -echo "" echo "Package repository setup complete!" -echo "" -echo "=== Repository Structure Summary ===" - -# DEB Repository Status -if [ -d out/deb ]; then - DEB_COUNT=$(find out/deb -name "*.deb" | wc -l) - DEB_RELEASE_FILE=$([ -f out/deb/dists/stable/Release ] && echo "✓" || echo "✗") - echo "DEB repository: ✓ Created with $DEB_COUNT signed packages, Release file: $DEB_RELEASE_FILE" -else - echo "DEB repository: ✗ Not found" -fi - -# RPM Repository Status -if [ -d out/rpm ]; then - RPM_COUNT=$(find out/rpm -name "*.rpm" | wc -l) - RHEL8_REPO=$([ -f out/rpm/rhel8/repodata/repomd.xml ] && echo "✓" || echo "✗") - RHEL9_REPO=$([ -f out/rpm/rhel9/repodata/repomd.xml ] && echo "✓" || echo "✗") - MAIN_REPO=$([ -f out/rpm/main/repodata/repomd.xml ] && echo "✓" || echo "✗") - echo "RPM repository: ✓ Created with $RPM_COUNT packages" - echo " - RHEL 8 metadata: $RHEL8_REPO" - echo " - RHEL 9 metadata: $RHEL9_REPO" - echo " - Main metadata: $MAIN_REPO" -else - echo "RPM repository: ✗ Not found" -fi - -# Direct Downloads Status -if [ -d out/packages ]; then - PKG_COUNT=$(ls out/packages/*.{deb,rpm} 2>/dev/null | wc -l) - PKG_INDEX=$([ -f out/packages/index.html ] && echo "✓" || echo "✗") - echo "Direct downloads: ✓ Available with $PKG_COUNT packages, Index: $PKG_INDEX" -else - echo "Direct downloads: ✗ Not found" -fi - -# GPG Key Status -if [ -f out/documentdb-archive-keyring.gpg ]; then - echo "GPG key: ✓ Exported" -else - echo "GPG key: ✗ Not found" -fi - echo "" echo "Repository URLs:" echo " APT: https://documentdb.io/deb stable main" From ea88251c967f3c5e5ddf6a1d1f17f96b8a83b394 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:42:08 +0000 Subject: [PATCH 09/17] Add debugging for YUM repository creation - Show which YUM repositories are being processed - Display createrepo_c execution path and results - List repodata contents to verify metadata creation - Keep error messages visible for troubleshooting --- .github/scripts/download_packages.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index c7b630e..96d77c6 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -329,6 +329,7 @@ if [ "$GOT_RPM" = "1" ]; then for POOL in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do if [ -d "$POOL" ] && [ "$(find "$POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then + echo "Processing YUM repository: $POOL" pushd "$POOL" >/dev/null if [ -n "$GPG_FINGERPRINT" ]; then @@ -337,22 +338,37 @@ if [ "$GOT_RPM" = "1" ]; then done fi - createrepo_c . >/dev/null 2>&1 || echo "Warning: createrepo_c failed for $POOL" + echo "Running createrepo_c in $(pwd)" + if createrepo_c .; then + echo "Repository metadata created successfully" + ls -la repodata/ 2>/dev/null || echo "No repodata directory found" + else + echo "ERROR: createrepo_c failed for $POOL" + fi if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true fi popd >/dev/null + else + echo "Skipping $POOL: directory not found or no RPM files" fi done # Create main repository for backward compatibility if [ -d "$RPM_POOL_RHEL8" ] && [ "$(find "$RPM_POOL_RHEL8" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then + echo "Creating main YUM repository" mkdir -p out/rpm/main cp "$RPM_POOL_RHEL8"/* out/rpm/main/ pushd out/rpm/main >/dev/null - createrepo_c . >/dev/null 2>&1 || true + echo "Running createrepo_c for main repository in $(pwd)" + if createrepo_c .; then + echo "Main repository metadata created successfully" + ls -la repodata/ 2>/dev/null || echo "No repodata directory found" + else + echo "ERROR: createrepo_c failed for main repository" + fi if [ -n "$GPG_FINGERPRINT" ] && [ -f repodata/repomd.xml ]; then gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true fi From a905052b8a7e79630fdb0f033c2ddc354e636de3 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:47:37 +0000 Subject: [PATCH 10/17] Add RPM processing debugging - Show which RPM files are being processed - Display RHEL 8/9 repository assignments - Log final RPM repository structure - Identify which files don't match expected patterns --- .github/scripts/download_packages.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 96d77c6..b5e6fbf 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -130,18 +130,23 @@ for asset in data.get('assets', []): sign_deb_package "$DEB_POOL_UBUNTU24/$clean_name" fi elif [[ "$filename" == *.rpm ]]; then + echo "Processing RPM: $filename" wget -q -P out/packages "$download_url" if [[ "$filename" =~ ^rhel8-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then GOT_RPM=1 mkdir -p "$RPM_POOL_RHEL8" clean_name=$(echo "$filename" | sed 's/^rhel8-//') + echo " Adding to RHEL 8: $filename -> $clean_name" cp "out/packages/$filename" "$RPM_POOL_RHEL8/$clean_name" elif [[ "$filename" =~ ^rhel9-postgresql[0-9]+-documentdb.*\.rpm$ ]]; then GOT_RPM=1 mkdir -p "$RPM_POOL_RHEL9" clean_name=$(echo "$filename" | sed 's/^rhel9-//') + echo " Adding to RHEL 9: $filename -> $clean_name" cp "out/packages/$filename" "$RPM_POOL_RHEL9/$clean_name" + else + echo " Skipping RPM (does not match patterns): $filename" fi else wget -q -P out/packages "$download_url" @@ -169,6 +174,16 @@ print(json.dumps(output, indent=2)) " > out/packages/release-info.json echo "Successfully processed packages from $REPO" +echo "GOT_DEB=$GOT_DEB, GOT_RPM=$GOT_RPM" +echo "Checking final RPM repository structure:" +for pool in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do + if [ -d "$pool" ]; then + echo " $pool: $(ls -1 $pool/*.rpm 2>/dev/null | wc -l) RPM files" + ls -la "$pool"/ 2>/dev/null || echo " Cannot list contents" + else + echo " $pool: Directory does not exist" + fi +done if [ "$GOT_DEB" = "1" ]; then echo "Building APT repository with multiple distribution components..." From 1d7ce4f277e29b601b998c9ab1666c2be4ea7974 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:51:27 +0000 Subject: [PATCH 11/17] Debug YUM repository working directory issue - Show current working directory during YUM processing - Display actual RPM pool paths being checked - Add more detailed directory existence and file count logging --- .github/scripts/download_packages.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index b5e6fbf..86504a6 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -341,9 +341,16 @@ fi if [ "$GOT_RPM" = "1" ]; then echo "Building YUM repositories..." + echo "Current working directory: $(pwd)" + echo "RPM_POOL_RHEL8=$RPM_POOL_RHEL8" + echo "RPM_POOL_RHEL9=$RPM_POOL_RHEL9" for POOL in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do - if [ -d "$POOL" ] && [ "$(find "$POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then + echo "Checking pool: $POOL" + if [ -d "$POOL" ]; then + RPM_COUNT=$(find "$POOL" -name "*.rpm" -type f | wc -l) + echo " Directory exists with $RPM_COUNT RPM files" + if [ "$RPM_COUNT" -gt 0 ]; then echo "Processing YUM repository: $POOL" pushd "$POOL" >/dev/null @@ -365,9 +372,12 @@ if [ "$GOT_RPM" = "1" ]; then gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true fi - popd >/dev/null + popd >/dev/null + else + echo " No RPM files found in directory" + fi else - echo "Skipping $POOL: directory not found or no RPM files" + echo " Directory does not exist: $POOL" fi done From 46fe08064e753504c5c65476c5a63820ea188fda Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 09:55:41 +0000 Subject: [PATCH 12/17] Fix YUM repository path resolution issue - Detect if we're in wrong directory after APT processing - Adjust RPM pool paths when working directory is out/deb - Use relative paths that work from the current location - This fixes the issue where RPM directories couldn't be found --- .github/scripts/download_packages.sh | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index 86504a6..ed6b1a1 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -341,16 +341,20 @@ fi if [ "$GOT_RPM" = "1" ]; then echo "Building YUM repositories..." - echo "Current working directory: $(pwd)" - echo "RPM_POOL_RHEL8=$RPM_POOL_RHEL8" - echo "RPM_POOL_RHEL9=$RPM_POOL_RHEL9" - for POOL in "$RPM_POOL_RHEL8" "$RPM_POOL_RHEL9"; do - echo "Checking pool: $POOL" - if [ -d "$POOL" ]; then - RPM_COUNT=$(find "$POOL" -name "*.rpm" -type f | wc -l) - echo " Directory exists with $RPM_COUNT RPM files" - if [ "$RPM_COUNT" -gt 0 ]; then + # Adjust RPM pool paths if we're in the wrong directory after APT processing + if [[ "$PWD" == */out/deb ]]; then + RHEL8_POOL="../rpm/rhel8" + RHEL9_POOL="../rpm/rhel9" + MAIN_POOL="../rpm/main" + else + RHEL8_POOL="$RPM_POOL_RHEL8" + RHEL9_POOL="$RPM_POOL_RHEL9" + MAIN_POOL="out/rpm/main" + fi + + for POOL in "$RHEL8_POOL" "$RHEL9_POOL"; do + if [ -d "$POOL" ] && [ "$(find "$POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then echo "Processing YUM repository: $POOL" pushd "$POOL" >/dev/null @@ -382,11 +386,11 @@ if [ "$GOT_RPM" = "1" ]; then done # Create main repository for backward compatibility - if [ -d "$RPM_POOL_RHEL8" ] && [ "$(find "$RPM_POOL_RHEL8" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then + if [ -d "$RHEL8_POOL" ] && [ "$(find "$RHEL8_POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then echo "Creating main YUM repository" - mkdir -p out/rpm/main - cp "$RPM_POOL_RHEL8"/* out/rpm/main/ - pushd out/rpm/main >/dev/null + mkdir -p "$MAIN_POOL" + cp "$RHEL8_POOL"/* "$MAIN_POOL"/ + pushd "$MAIN_POOL" >/dev/null echo "Running createrepo_c for main repository in $(pwd)" if createrepo_c .; then echo "Main repository metadata created successfully" From 4023a47d59997cddabfa0913aa47c2d1904ade47 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 10:01:41 +0000 Subject: [PATCH 13/17] Fix bash syntax error in YUM repository conditional structure --- .github/scripts/download_packages.sh | 7 ++----- .github/workflows/nextjs.yml | 16 ---------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index ed6b1a1..ceb4366 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -376,12 +376,9 @@ if [ "$GOT_RPM" = "1" ]; then gpg --default-key "$GPG_FINGERPRINT" --detach-sign --armor repodata/repomd.xml 2>/dev/null || true fi - popd >/dev/null - else - echo " No RPM files found in directory" - fi + popd >/dev/null else - echo " Directory does not exist: $POOL" + echo "Skipping $POOL: directory not found or no RPM files" fi done diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 34b3bcc..8cb65da 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -101,22 +101,6 @@ jobs: run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Download DocumentDB packages from latest release run: .github/scripts/download_packages.sh - - name: Debug output structure - run: | - echo "Contents of out directory:" - find out -type f | head -30 - echo "" - echo "APT repository structure:" - ls -la out/deb/ 2>/dev/null || echo "No deb directory found" - echo "" - echo "APT repository pools:" - ls -la out/deb/pool/ 2>/dev/null || echo "No pool directory found" - echo "" - echo "YUM repository structure:" - ls -la out/rpm/ 2>/dev/null || echo "No rpm directory found" - echo "" - echo "Direct download packages:" - ls -la out/packages/*.{deb,rpm} 2>/dev/null || echo "No packages found" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: From 97c52e9044fba8fa29c588d56b59c5b42aaae860 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 10:04:34 +0000 Subject: [PATCH 14/17] Fix cp command to only copy RPM files, not directories --- .github/scripts/download_packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh index ceb4366..478bf47 100755 --- a/.github/scripts/download_packages.sh +++ b/.github/scripts/download_packages.sh @@ -386,7 +386,7 @@ if [ "$GOT_RPM" = "1" ]; then if [ -d "$RHEL8_POOL" ] && [ "$(find "$RHEL8_POOL" -name "*.rpm" -type f | wc -l)" -gt 0 ]; then echo "Creating main YUM repository" mkdir -p "$MAIN_POOL" - cp "$RHEL8_POOL"/* "$MAIN_POOL"/ + cp "$RHEL8_POOL"/*.rpm "$MAIN_POOL"/ 2>/dev/null || true pushd "$MAIN_POOL" >/dev/null echo "Running createrepo_c for main repository in $(pwd)" if createrepo_c .; then From 1c0550c54e7d6a6b3c40c7ae283bed87fda681ae Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Tue, 4 Nov 2025 10:49:28 +0000 Subject: [PATCH 15/17] Fix doc --- PACKAGE-INSTALL.md | 219 +++++++++++++++++++++++++++++++----------- app/packages/page.tsx | 11 +-- 2 files changed, 166 insertions(+), 64 deletions(-) diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md index a97d48e..eca180f 100644 --- a/PACKAGE-INSTALL.md +++ b/PACKAGE-INSTALL.md @@ -1,40 +1,74 @@ # DocumentDB Package Installation -Fast and simple installation of DocumentDB. +Fast and simple installation of DocumentDB extension for PostgreSQL. + +**Supported PostgreSQL Versions:** 15, 16, 17 ## Install Commands ### Ubuntu & Debian (AMD64 & ARM64) ```bash -curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg -echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.github.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list +curl -fsSL https://documentdb.io/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg +echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list sudo apt update + +# Install latest version for PostgreSQL 16 (recommended) sudo apt install postgresql-16-documentdb ``` -### RHEL & CentOS (x86_64 & aarch64) +### RHEL & CentOS (x86_64 only) ```bash -curl -fsSL https://documentdb.github.io/documentdb-archive-keyring.gpg | sudo rpm --import - +# Import GPG key +sudo rpm --import https://documentdb.io/KEY.gpg + +# Add repository (RHEL/Rocky 9) cat <

📖 Complete Installation Guide

- Detailed instructions for all distributions, GPG verification, troubleshooting, and automation scripts + Detailed instructions for all distributions, GPG verification, troubleshooting, etc

Browse and download individual packages without setting up repositories.

- - - - - Browse All Packages -
{/* Manual Installation */} From c39a400b64508d1462c556b3b4784a60551b6b4b Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Wed, 5 Nov 2025 05:01:46 +0000 Subject: [PATCH 16/17] fix doc --- PACKAGE-INSTALL.md | 36 ++++++++++++++++++++++++------------ app/packages/page.tsx | 25 ++++++++++++++++--------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md index eca180f..35ccce5 100644 --- a/PACKAGE-INSTALL.md +++ b/PACKAGE-INSTALL.md @@ -8,7 +8,7 @@ Fast and simple installation of DocumentDB extension for PostgreSQL. ### Ubuntu & Debian (AMD64 & ARM64) ```bash -curl -fsSL https://documentdb.io/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg +curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list sudo apt update @@ -18,8 +18,12 @@ sudo apt install postgresql-16-documentdb ### RHEL & CentOS (x86_64 only) ```bash +# Enable CRB repository (required for PostGIS dependencies) +sudo dnf install -y dnf-plugins-core +sudo dnf config-manager --set-enabled crb + # Import GPG key -sudo rpm --import https://documentdb.io/KEY.gpg +sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg # Add repository (RHEL/Rocky 9) cat < curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
- echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list + echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list

# Install packages
- sudo apt-get update && sudo apt-get install postgresql-16-documentdb + sudo apt update && sudo apt install postgresql-16-documentdb
@@ -74,34 +74,41 @@ export default function PackagesPage() {
+ # Enable CRB repo (for dependencies) +
+ sudo dnf install -y dnf-plugins-core +
+ sudo dnf config-manager --set-enabled crb +
+
# Add repository with GPG verification
- curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo rpm --import - + sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg
- echo '[documentdb] + echo '[documentdb]
name=DocumentDB Repository
- baseurl=https://documentdb.io/rpm/rhel8 + baseurl=https://documentdb.io/rpm/rhel9
enabled=1
gpgcheck=1
- gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo + gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo

# Install packages
- sudo yum install postgresql16-documentdb + sudo dnf install postgresql16-documentdb
- Supports: RHEL 8/9, CentOS, Fedora + Supports: RHEL 8/9, Rocky, AlmaLinux - x86_64 + aarch64 + x86_64 only
From 96d260d77dfcdefbe52d84b9825fc5b0873532c8 Mon Sep 17 00:00:00 2001 From: Shuai Tian Date: Wed, 5 Nov 2025 05:36:23 +0000 Subject: [PATCH 17/17] update layout --- PACKAGE-INSTALL.md | 18 ++++++++++-------- app/packages/page.tsx | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md index 35ccce5..6a5dc6b 100644 --- a/PACKAGE-INSTALL.md +++ b/PACKAGE-INSTALL.md @@ -16,7 +16,7 @@ sudo apt update sudo apt install postgresql-16-documentdb ``` -### RHEL & CentOS (x86_64 only) +### RHEL & CentOS (x86_64 & aarch64) ```bash # Enable CRB repository (required for PostGIS dependencies) sudo dnf install -y dnf-plugins-core @@ -40,7 +40,7 @@ sudo dnf install postgresql16-documentdb ``` -**Note:** PostgreSQL 15 RPM packages are not yet available. CRB (CodeReady Builder) repository is required for PostGIS/GDAL dependencies. +**Note:** CRB (CodeReady Builder) repository is required for PostGIS/GDAL dependencies. PostgreSQL 15 RPM packages may be available in future releases. ## Version Pinning @@ -80,7 +80,7 @@ dnf --showduplicates list postgresql16-documentdb **YUM Packages (RPM):** - ✅ x86_64 (Intel/AMD 64-bit processors) -- ✅ aarch64 (Not available yet) +- ✅ aarch64 (ARM64 processors - AWS Graviton, etc.) ### OS Distribution Support @@ -90,9 +90,11 @@ dnf --showduplicates list postgresql16-documentdb - Debian 11 (Bullseye) - Debian 12 (Bookworm) -**RHEL/CentOS (YUM):** -- RHEL/Rocky/AlmaLinux 8 -- RHEL/Rocky/AlmaLinux 9 +**RHEL-based distributions (YUM/DNF):** +- RHEL 8/9 +- Rocky Linux 8/9 +- AlmaLinux 8/9 +- CentOS Stream 8/9 ## Quick Install (Skip GPG Verification) @@ -147,7 +149,7 @@ echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-key sudo apt update && sudo apt install postgresql-16-documentdb ``` -### RHEL/Rocky/AlmaLinux 8 +### RHEL/Rocky/AlmaLinux/CentOS Stream 8 ```bash # Enable CRB repository (required for PostGIS dependencies) sudo dnf install -y dnf-plugins-core @@ -165,7 +167,7 @@ EOF sudo dnf install postgresql16-documentdb ``` -### RHEL/Rocky/AlmaLinux 9 +### RHEL/Rocky/AlmaLinux/CentOS Stream 9 ```bash # Enable CRB repository (required for PostGIS dependencies) sudo dnf install -y dnf-plugins-core diff --git a/app/packages/page.tsx b/app/packages/page.tsx index 0af9de1..92d04d7 100644 --- a/app/packages/page.tsx +++ b/app/packages/page.tsx @@ -26,7 +26,7 @@ export default function PackagesPage() {

{/* Quick Install Cards */} -
+
{/* Debian/Ubuntu Card */}
@@ -105,10 +105,10 @@ export default function PackagesPage() {
- Supports: RHEL 8/9, Rocky, AlmaLinux + Supports: RHEL 8/9, Rocky, AlmaLinux, CentOS Stream - x86_64 only + x86_64 + aarch64