docs(specs): specify RPM hosted (S38)

Summary

  • Problem: Artifact Registry has no RPM format. Teams that ship .rpm packages stay on JFrog, Nexus or the monolith.
  • Impact: RHEL, Fedora and SUSE engineers cannot publish or install packages through Artifact Registry. Platform engineers cannot bring RPM under the same access model and audit trail.
  • Change: this adds spec S38 for RPM hosted repositories and its index row. It also adds the RPM rows to S01 (routes), S08 (Basic auth), S09 (route permissions), S17 (format, settings, create rules, errors, statistics) and S23 (usage events).
    • curl publishes one package per PUT.
    • A background job rebuilds repodata/ and signs repomd.xml with the RPM key the repository selects from its namespace (ADR-030). It never signs a package.
    • The registry serves a new package from repomd.xml within 60 seconds at the 99th percentile, in a repository with up to 1 GB of metadata before compression. A client sees it when its cached metadata expires, and the .repo file sets that interval.
  • Downsides:
    • One repodata/ per repository, so a customer makes one repository per distribution release.
    • No comps, updateinfo or module metadata.
    • dnf5 (Fedora) hosts of a private repository import the key by hand, and again at each rotation.
    • At a key switch, a host that runs dnf without a terminal fails until it confirms the new key once.
    • A rebuild reads entry rows only for new versions, but it still decompresses and compresses every metadata file, so a repository past 1 GB of metadata publishes later than 60 seconds.

Checklist

  • Gaps: remote and virtual RPM get their own specs. Group, updateinfo and module metadata wait for a Product answer (Open question 3). zypper and yum 3 are not tested. Audit events wait for S21, and anonymous reads wait for public visibility. The .repo file holds a token that expires within 12 hours, and the spec leaves the refresh job to the client (Open question 4). None of these blocks the hosted acceptance criteria in the work item.
  • Least sure: how a private repository serves its key (Open question 1).
    • S38 keeps the key behind the read grant. The dnf of RHEL 8, 9 and 10 sends the repository credentials to gpgkey=; the lab in #1690 measured that on Rocky 8, 9 and 10.
    • dnf5 never sends credentials there. If Product wants Fedora hosts to rotate on their own, the other choice is an anonymous key path, which shows that a private repository exists.
    • Next is the 1 GB target (Open question 2). On a laptop core, Go compresses Fedora 45's filelists (841 MB) in 2.1 s and decompresses it in 0.7 s; a server core and the storage transfers are not measured yet.
  • Compatibility: nothing breaks. RPM is a new format. Monolith users move through a new repository URL and add its key, as Product decided for ADR-030 (P3).
  • Agreement:
    • ADR-030 (!3768 (merged)) merges before this MR. S38's ADR-030 links point at docs/adr/030_repository_signing_keys.md on main by full URL, so they resolve once !3768 (merged) merges. S38 answers its two RPM hand-offs: the key delivery is above, and the rotation overlap lasts as long as the customer wants, because the customer runs each step. Where the key management routes and permissions are written down is still ADR-030's call (Open question 5).
    • The two review threads on handbook!21615 are resolved and S38 carries the answers. The headless prompt: each host confirms the new key once. The bulk import into the rpm database: the snippet sets gpgcheck=0, and a publisher that signs packages imports its own key first.
    • The shared ADRs now hold rules only, so S38 states its own RPM limits, tables and routes and needs no amendment.
    • Format value: S38 names no number. rpm takes the next unused value when its code lands, as S39 (!3743) says for pypi. S36 (!3447 (merged)) still says 5, which Go already uses.
    • The monolith UI and the Snowplow context schema need an rpm value before launch.
    • AppSec: the gpgcheck=0 default in the snippet, Open question 1 (key delivery) and Open question 4 (the credential in the .repo file, which AppSec raised on the client API review).
  • Simplicity: I rejected several repodata/ directories per repository, a staged multi-file upload, two signatures during a rotation (dnf5 and RHEL 10's dnf reject them), an anonymous key path, a protocol DELETE, and a filelists written less often than primary (it saves only the render, and a query by file would see an older repository). One repodata/ and one PUT per package keep the API small.

Merge order and overlaps

S38 does not depend on the Debian spec, so this MR targets main with no stack. ADR-030 (!3768 (merged)) merges first: S38 keeps RPM keys in rpm_signing_keys, as that ADR now says. S37 (!3484 (merged)) is merged and in this branch's base.

  • !3447 (merged) (S36 Debian) edits the same tables and format lists in README.md, S01, S08, S09 and S23. !3743 (S39 PyPI) edits README.md, S01, S08, S09 and S23. !3440 (merged), now merged, added a row to README.md, in the monolith table. Whichever merges later rebases.
  • If this MR merges before !3447 (merged), S36 should then say that RPM repositories select keys too. That covers its key repositories_count, its key-delete check and its S09 signing-key rows.
  • main dropped the ADR-007 bookkeeping from S17 after this branch's base, so the branch rebases once more before merge.

This MR replaces !3489 (closed), which was stacked on !3447 (merged) for no real need.

Checked locally

  • markdownlint-cli2, Vale, lychee and the document word limit pass on every changed file. S17 is already over its limit, and this branch's edits leave it four words below its merge base, so lint:doc-size passes.
  • The rpm version rule in Package identity, on Rocky 8, 9 and 10 (rpm 4.14, 4.16, 4.19): 1.0 = 1_0 = 1..0, 1.0 = 1.00, 1a = 1.a, and 1.0 > 1.

Related to AC P0: RPM format support (gitlab-org/gitlab#605699)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading
Loading