Skip to content

Copr packaging - #487

Closed
xgerman wants to merge 10 commits into
documentdb:mainfrom
xgerman:copr-packaging
Closed

xgerman wants to merge 10 commits into
documentdb:mainfrom
xgerman:copr-packaging

Conversation

@xgerman

@xgerman xgerman commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Fedora Copr integration to distribute DocumentDB as RPM packages, and updates branding from "Azure Cosmos DB for MongoDB" to
"Azure DocumentDB".

Packages produced

A single SRPM builds three binary RPMs:

Package Contents
postgresql18-documentdb PostgreSQL extensions: documentdb_core, documentdb, documentdb_extended_rum
documentdb-gateway MongoDB wire protocol gateway binary
documentdb-server Meta-package that installs everything

New files

  • packaging/rpm/spec/documentdb-copr.spec — Copr-compatible spec file. Builds vendored libbson and Intel Decimal Math Library
    in-tree; uses system pcre2-devel. Targets PG 18 on Fedora via PGDG external repo.
  • .copr/Makefile — srpm target for Copr SCM integration. Downloads vendored sources, creates cargo vendor tarball, and produces
    the SRPM.
  • packaging/README.md — Documents Copr project setup, external repo config, and user installation.

Branding update

Replaces "vCore-based Azure Cosmos DB for MongoDB" with "Azure DocumentDB" across packaging and documentation files.

German and others added 2 commits March 9, 2026 21:24
Add three new files for Copr-based RPM distribution targeting Fedora + PG 18:

- packaging/rpm/spec/documentdb-copr.spec: Copr-compatible spec producing
  three binary RPMs (postgresql18-documentdb, documentdb-gateway,
  documentdb-server meta-package). Builds vendored libbson and Intel
  Decimal Math Library in-tree; uses system pcre2-devel.

- .copr/Makefile: SRPM builder for Copr SCM integration. Downloads
  vendored sources, creates cargo vendor tarball, and produces the SRPM.

- packaging/README.md: Documents Copr project setup, SCM integration,
  external PGDG repo configuration, and user installation instructions.

Co-authored-by: Copilot <[email protected]>
Update all packaging and documentation references from the old
'vCore-based Azure Cosmos DB for MongoDB' branding to 'Azure DocumentDB'.

Co-authored-by: Copilot <[email protected]>
@xgerman
xgerman requested review from a team, lichoil and shuaitian-git as code owners March 9, 2026 21:53
German and others added 5 commits March 9, 2026 22:05
The last changelog entry was missing email, version, and description,
causing 'no description in %changelog' error during SRPM build.

Co-authored-by: Copilot <[email protected]>
The Copr SRPM mock chroot does not include git. It is needed to
clone the Intel Decimal Math Library from Launchpad.

Co-authored-by: Copilot <[email protected]>
Add packaging/test_copr_srpm.sh that runs the .copr/Makefile srpm target
inside a Fedora container, replicating the Copr mock chroot environment.
Also add make_srpm to the SCM settings table and a testing section in README.

Co-authored-by: Copilot <[email protected]>
Use fedora-42 (pinned) instead of $releasever (rawhide expands to 45
which PGDG doesn't publish). Use $basearch instead of hardcoded x86_64
to support aarch64 builds.

Co-authored-by: Copilot <[email protected]>
The PGDG extensions install to /usr/pgsql-18/lib which triggers
Fedora's check-rpaths (error 0x0002: standard library path).
Set QA_RPATHS=0x0002 to allow this expected RPATH.

Also add EPEL-9 chroots (x86_64 + aarch64) to README docs since
PGDG publishes aarch64 packages for EL-9 but not for Fedora.

Co-authored-by: Copilot <[email protected]>
German and others added 3 commits March 9, 2026 16:48
Replace pcre2-static BuildRequires with a vendored pcre2 source build.
RHEL 9 / EL9 does not ship pcre2-static in base repos (it requires CRB),
which caused the COPR epel-9 build to fail. Building pcre2 from source
as a static library avoids this dependency issue.

Changes:
- Add pcre2 source tarball as Source4
- Build pcre2 static lib in %build and install to _vendored prefix
- Remove pcre2-static from BuildRequires (pcre2-devel still needed for headers)
- Add Provides: bundled(pcre2) for rpmlint compliance

Co-authored-by: Copilot <[email protected]>
- Add fedora-42-aarch64 chroot to setup instructions
- Document RHEL 9 PGDG repo needed for Fedora aarch64 builds
- Add vendored build dependencies table (libbson, intelmathlib, pcre2)
- Update spec file description to cover both Fedora and EPEL

Co-authored-by: Copilot <[email protected]>
The PGDG RPM creates /var/lib/pgsql owned by the postgres user.
Use that user directly instead of creating a separate documentdb user.

Co-authored-by: Copilot <[email protected]>
@xgerman xgerman closed this Mar 9, 2026
@xgerman

xgerman commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

will re-open when I have it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant