Skip to content

B1-5: Add repository setup scripts and universal install.sh #138

Closed

Description

@scttfrdmn

Context

Even when packages exist, users must manually find and add the package repository before dnf install objectfs or apt install objectfs works. There is no curl-installable one-liner, no repo setup script, and no universal entry point. This is the last mile of the install experience.

What to implement

scripts/setup-repo-rhel.sh — adds objectfs repo to /etc/yum.repos.d/objectfs.repo:

[objectfs]
name=ObjectFS
baseurl=https://packages.objectfs.io/rpm/$releasever/$basearch/
gpgcheck=1
gpgkey=https://packages.objectfs.io/gpg.key
enabled=1

Idempotent: check if file exists before writing.

scripts/setup-repo-debian.sh — adds signed apt source to /etc/apt/sources.list.d/objectfs.list. Downloads and installs GPG key to /usr/share/keyrings/objectfs-archive-keyring.gpg.

scripts/install.sh — universal entry point:

#!/usr/bin/env bash
detect_package_manager() { ... }  # returns apt|dnf|yum|zypper

Detects package manager, calls appropriate setup script, then installs objectfs package and enables the service. Idempotent throughout.

All three scripts must pass shellcheck. All three must be idempotent (running twice doesn't duplicate repo entries or reinstall unnecessarily).

Add CI job that runs scripts/install.sh inside Docker against:

  • ubuntu:24.04
  • rockylinux:9
  • opensuse/leap:15.6

(Use LocalStack or mock S3 endpoint to avoid real AWS dependency in CI.)

Acceptance criteria

  • curl -fsSL https://objectfs.io/install.sh | bash is the documented one-liner (scripts are ready for hosting even if not yet hosted)
  • All three scripts pass shellcheck
  • CI job passes on all three distributions
  • Running each script twice produces the same state

Sequencing

Independent — can land any time in v0.11.0.

Activity

  1. added
    type: enhancement
    priority: high
    area: ci-cd
    on Apr 7, 2026
  2. added
    effort: large
    on Aug 3, 2026
  3. scttfrdmn commented on Aug 9, 2026

    @scttfrdmn
    OwnerAuthor

    Scoping note: this issue specifies LocalStack, which this project rules out.

    CLAUDE.md:130 ("Integration tests hit real AWS S3 (no LocalStack)") and CONTRIBUTING.md:189 ("Do not use LocalStack, and prefer not to write a mock") are both explicit, and #240 deleted an entire tests/integration/ suite for targeting it. The issue text predates that decision.

    The replacement is internal/testaws — the real S3 backend against an in-process substrate endpoint over real HTTP: no network, no credentials, no AWS account. For anything an emulator cannot answer, real AWS behind -tags=integration with AWS_PROFILE=aws AWS_REGION=us-west-2. A hand-written mock is the last resort, because a mock sits on the far side of a seam and agrees with its caller by construction — which is how 32,680 lines of tests missed roughly 45 defects.

    Whoever picks this up should substitute accordingly rather than following the issue body literally.

  4. scttfrdmn commented on Aug 9, 2026

    @scttfrdmn
    OwnerAuthor

    Checked this against the tree and the network before starting, and two of its premises do not hold. Recording them here so the scope decision is visible rather than made silently in a PR.

    1. packages.objectfs.io does not exist, and neither does objectfs.io as a web host.

    Both resolve to Porkbun parking IPs and neither completes a TLS handshake:

    $ dig +short packages.objectfs.io      → pixie.porkbun.com. 207.207.210.107 …
    $ curl -L https://packages.objectfs.io/
    curl: (35) LibreSSL/3.3.6: error:1404B410:SSL routines:ST_CONNECT:sslv3 alert handshake failure
    

    mkdocs.yml already records this for the apex domain, which is why site_url points at the repository. So the baseurl, the gpgkey URL, and the curl -fsSL https://objectfs.io/install.sh | bash one-liner in the acceptance criteria all name addresses nothing serves.

    2. No release has ever published a .deb or an .rpm.

    make package-linux and nfpm.yaml work and CI's packaging job builds and installs both, but release.yml contains no reference to package-linux, nfpm, .deb or .rpm — it publishes five tar.gz binaries and their checksums, and nothing else. Confirmed against the published releases:

    $ gh release view v0.13.0 --json assets --jq '[.assets[].name]'
    ["objectfs-darwin-amd64.tar.gz", …, "objectfs-linux-armv7.tar.gz.sha256"]   # 10 assets, no packages
    

    So even with a repository host, there would be no package to serve from it. nfpm.yaml says this explicitly and deliberately: "No bugs.url, no repository URL, and deliberately no reference to a package repository. There is no published apt or yum repository for ObjectFS; naming one here would put an address into every installed package's metadata that nothing serves."

    What that means for this issue. The acceptance criterion "scripts are ready for hosting even if not yet hosted" is the one part that can be honoured, but a repo-setup script whose baseurl is a parked domain is not a script that is ready — it is a script that fails at dnf install with a name-resolution error rather than a clear one, which is the same class of defect as the fabrications #148 and #152 turned up. And the CI job it asks for cannot pass: there is nothing at the baseurl to install from, so install.sh inside ubuntu:24.04 has no package to fetch.

    Recommendation — split it, and do the deliverable half first. Two prerequisites are real work with real value and neither needs a domain:

    1. Attach the .deb and .rpm to releases. release.yml gains a package-linux step and uploads to dist/. Small, entirely verifiable, and it means dpkg -i objectfs_0.14.0_amd64.deb from the releases page works — which is most of the install experience the issue is after, without a repository at all. Worth doing regardless of what happens to the rest.
    2. scripts/install.sh detecting the platform and installing a release artifact, from the GitHub releases API rather than a package repository. Checksum-verified, idempotent, shellcheck-clean, and testable in the three containers the issue names because it depends on nothing unhosted.

    The repo-setup scripts and the curl | bash one-liner then become a separate issue blocked on a hosting decision — which is a question for @scttfrdmn, not something to answer in code: whether to stand up packages.objectfs.io, or to use an existing host (Cloudsmith, Fury, a GitHub Pages apt/yum repo, COPR/OBS), or to stay with release artifacts and skip repositories entirely. Each of those makes the setup scripts look different, so writing them now means guessing.

    Not proceeding with any of it until the scope question is answered, since (1) and (2) are a different issue from the one filed.

  5. scttfrdmn commented on Aug 9, 2026

    @scttfrdmn
    OwnerAuthor

    Parts (a) and (b) are done. Part (c) is the one that needs a decision from you rather than code.

    (a) — packages attached to releases. #420, merged. A package-linux job builds the .deb and .rpm for amd64 and arm64, publish waits on it, and the job reads the version back out of a built package with dpkg-deb --field — closing the gap nfpm.yaml's own comment names. Every release before this was ten assets, five tarballs and five checksums, with no packages: gh release view v0.13.0 --json assets --jq '[.assets[].name] | length' → 10, same for v0.12.0 and v0.11.0.

    (b) — scripts/install.sh. #421, open. Not the script specified here, because the spec's packages.objectfs.io does not resolve to anything that serves TLS. Instead it downloads the release tarball for the running platform, verifies its SHA-256, and installs under ~/.local/bin. Plus the CI job across ubuntu:24.04, rockylinux:9, opensuse/leap:15.6, and a gate coupling the script's uname mapping to release.yml's asset names.

    Worth recording from (b), since it bears on how (c) should be built: shellcheck was clean and the local run worked, and the script still failed on two of the three images this issue names — ubuntu:24.04 has neither curl nor wget, opensuse/leap:15.6 has neither tar nor gzip, and in both cases the error blamed the wrong thing (an unreachable GitHub API, a corrupt archive). Any repo-setup script written for (c) will hit the same class of problem, so it needs the same container matrix rather than shellcheck alone.

    (c) — the repository setup scripts and the curl | bash one-liner. Blocked, and the blocker is not technical:

    objectfs.io           → 207.207.210.229/107 (Porkbun parking), no TLS handshake
    packages.objectfs.io  → same, pixie.porkbun.com., no TLS handshake
    

    curl: (35) LibreSSL/3.3.6: error:1404B410 … sslv3 alert handshake failure on both. So setup-repo-rhel.sh and setup-repo-debian.sh cannot be written against the baseurl and gpgkey this issue specifies — there is nothing there to point at, and nothing to test against.

    There is also a GPG question underneath the hosting one, which the spec assumes away with gpgcheck=1 and a gpg.key URL. A package repository needs a signing key, and that means deciding where the private key lives (an Actions secret, a hardware token, a KMS), who can use it, and what the rotation story is. Note that the release tarballs are unsigned today too — install.sh says so explicitly rather than implying its checksum proves authenticity. A repo with gpgcheck=1 and a key managed casually is weaker than it looks.

    Options, cheapest first:

    1. Skip repositories. Document apt install ./objectfs_*.deb and dnf install ./objectfs-*.rpm against a downloaded release file, which now works. Zero infrastructure, no signing key, no domain. Costs the dnf install objectfs experience.
    2. Cloudsmith or Gemfury. Hosted apt+yum, they manage the signing key, free tier for open source. No domain needed, and the setup scripts become real and testable immediately. Adds a third-party dependency in the install path.
    3. GitHub Pages as the repo. apt and yum both need only static files over HTTPS, and scttfrdmn.github.io already serves TLS. Free, no new domain, but the signing key is ours to manage and reprepro/createrepo_c metadata has to be generated in the release workflow.
    4. COPR and/or OBS. Free, built for this, and gives Fedora/RHEL and openSUSE users the native path. Two more build systems to keep green, and COPR covers RPM only.
    5. Stand up packages.objectfs.io. Point the existing domain somewhere real. Most control, most work, and it still needs one of 2–4 behind it.

    My recommendation is (1) now and (3) or (2) when there is demand — the package files exist and are installable as of (a), which is most of the value, and (c) as specified buys the last mile at the cost of a signing key and a host. If you want a repository, (2) is the least work and (3) the least dependency.

    Which way do you want to go? I will leave this issue open with (c) outstanding until then.

  6. scttfrdmn commented on Aug 14, 2026

    @scttfrdmn
    OwnerAuthor

    Part (c) decision is made and the first half is merged. Recording where this stands, plus one sequencing fact found while measuring rather than assumed.

    Decided: GitHub Pages as the repository, signing key in an Actions secret

    Per your answer: private signing subkey in an Actions secret, master key offline and never in CI, ~2-year subkey expiry, rotation documented. That is the least-dependency option that still gives gpgcheck=1 a real key behind it — noting the honest cost, which is that anyone with write access to workflows can exfiltrate a secret the workflow can read, so a compromise means rotate-and-re-sign rather than nothing.

    Merged: the one-liner in the acceptance criteria is now real

    curl -fsSL https://objectfs.io/install.sh | bash answers. #440 serves it, #441 points the docs at it.

    Verified against the deployed site rather than assumed — HTTP 200, content-type: application/x-sh, byte-identical to scripts/install.sh, and the piped command resolving v0.13.0 for the running platform end to end. The docs were changed only after that measurement, because a documented URL that 404s is precisely the defect this issue's original spec contained.

    Served by copying scripts/install.sh at build time, not by committing a second copy under web/. Every gate in internal/config reads scripts/install.sh, so a served copy that differed would be the file users run and the file nothing tests; the workflow cmps the two and a check refuses a committed duplicate.

    Worth recording: the first version of that gate named README.md and web/index.html, passed, and missed three more surfaces documenting the same one-liner — docs/index.md, docs-platform/index.md, docs-platform/guide/getting-started.md. It now walks the tree with a floor on the match count. An enumerated list can only check the surfaces whoever wrote it already knew about, which is the same blindness that let four non-existent install channels survive in getting-started.md for a year.

    Sequencing: there is nothing to index yet, and that is not a defect

    The repository metadata has to be generated from packages that exist, and no release has a .deb or .rpm yet — including v0.13.0:

    $ gh api repos/scttfrdmn/objectfs/releases --jq '[.[] | {tag: .tag_name, pkgs: [.assets[] | select(.name|test("\\.(deb|rpm)$"))] | length}] | .[0:3]'
    [{"pkgs":0,"tag":"v0.13.0"},{"pkgs":0,"tag":"v0.12.0"},{"pkgs":0,"tag":"v0.11.0"}]
    

    The reason is benign and checkable: #420 added the package-linux job at cbb73d0, merged 2026-08-09T21:16Z, and v0.13.0 was tagged at b92220a, 2026-08-09 04:07 local — about eleven hours earlier. git show v0.13.0:.github/workflows/release.yml | grep -c package-linux → 0. So the job exists on main and has simply never run for a tag. v0.14.0 will be the first release with packages attached, and therefore the first with anything for a repository to index.

    That is worth stating because it changes what "done" can mean here: the metadata generation can be built and unit-gated now, but the first end-to-end proof that dnf install objectfs works has to come from the v0.14.0 release, not from a PR.

    Two things the original spec gets wrong, and what replaces them

    1. The metadata cannot be committed. Packages are release assets, not files in the tree, so reprepro/createrepo_c have to run at Pages-build time against downloaded assets. And only one workflow can deploy Pages — pages.yml owns the github-pages environment — so release.yml has to trigger that deploy rather than publish its own site. A second deploy-pages job would race the first and the loser silently wins whichever ran last.

    2. baseurl needs a retention bound, and the spec has none. Measured: the four v0.13.0-equivalent packages are ~35 MB per release, and GitHub Pages has a 1 GB site limit with a soft 10-minute build timeout. Nineteen releases at that rate is ~670 MB and growing, so an unbounded repo hits the ceiling in roughly a year and the failure mode is a deploy that starts failing for reasons unrelated to whatever change triggered it. The repo will index the latest N releases with N stated in the workflow, and it will log what it dropped — a silent truncation reads as "we index everything" when it does not.

    Building this next. It can only be verified in CI: Docker is unavailable in my local environment and createrepo_c has no Homebrew formula, so the container matrix (ubuntu:24.04, rockylinux:9, opensuse/leap:15.6) is the only place the setup scripts can actually be run — which is the right place anyway, since #421's experience was that shellcheck-clean scripts still failed on two of those three images with errors that blamed the wrong thing.

  7. scttfrdmn commented on Aug 14, 2026

    @scttfrdmn
    OwnerAuthor

    Part (c) is merged in #442. Where this issue now stands, measured against its acceptance criteria rather than described:

    Done and verified live. All three scripts are served and byte-identical to the repository copies, checked just now against the deployed site:

    address status matches scripts/
    objectfs.io/install.sh 200 yes
    objectfs.io/setup-repo-debian.sh 200 yes
    objectfs.io/setup-repo-rhel.sh 200 yes

    curl -fsSL https://objectfs.io/install.sh | bash is the documented one-liner across all five surfaces that document an install, and a walk of the tree gates it so a sixth surface cannot quietly name a dead address. All three scripts pass shellcheck and are idempotent, asserted in CI rather than by hand.

    The CI job this issue asks for exists as repo-install, and it goes further than "runs the scripts": it builds real signed apt and yum repositories using pages.yml's own extracted steps — so the two copies cannot drift — and installs from them on all three distributions with verification on. Latest run, every assertion reporting rather than merely exiting 0:

    • ubuntu:24.04 — refused without a downloader (naming it), accepted the signed index, installed and ran objectfs version 0.13.0, idempotent, refused an index signed by another key, package unreachable with the wrong key
    • rockylinux:9 and opensuse/leap:15.6 — installed and ran 0.13.0, the installed rpm is signed, idempotent, tampered metadata refused

    No LocalStack or mock S3, as the issue suggested: none is needed, since nothing here touches S3.

    Two deviations from the spec, both deliberate. The addresses are objectfs.io/apt and objectfs.io/yum, not packages.objectfs.io — that subdomain resolves (Porkbun answers a wildcard for the whole domain) and serves nothing, which is the failure mode that cannot be told from success without loading it. And Signed-By: scopes the apt key to this repository only; rpm --import has no equivalent, and setup-repo-rhel.sh says so in its header rather than leaving the asymmetry implicit.

    What is left, and it is not code. The repositories are built, signed and verified in CI, but the deploy publishes them only when secrets.GPG_SIGNING_KEY exists. Today's deploy of f7d4dd6 reported exactly that and published the docs and scripts without them:

    GPG_SIGNING_KEY is not set, so no package repository is published. The docs and the installer still deploy. Both setup scripts require a signature, so an unsigned repository would fail at the user's apt update rather than here.

    So objectfs.io/apt and objectfs.io/yum are 404 right now, on purpose. This is the correctness-capability rule from the project thesis: an unsigned repository is not a degraded version of a signed one, it is the thing both setup scripts are written to refuse, so the feature fails closed with an operator-facing reason instead of shipping something that installs fine until the day it matters.

    release.yml fails closed for the same reason and in a harder way — it exits 1 without the secret, because an unsigned rpm installs fine from a downloaded file and fails at dnf install for everyone who added the repository, which is the failure most likely to ship unnoticed. That makes the secret a blocker for the next release, not just for this issue.

    Leaving this open until the key exists, since closing it would claim two addresses serve something they do not.

  8. scttfrdmn commented on Sep 15, 2026

    @scttfrdmn
    OwnerAuthor

    Decision: the repositories are built and will not be published

    Closing out the last open part of this issue with a decision rather than more work. #491 implements it.

    What this issue asked for, and where each part landed:

    part state
    (a) curl -fsSL https://objectfs.io/install.sh | bash done — served, byte-compared to scripts/install.sh at deploy time, verified as a 200 of the exact bytes
    (b) setup-repo-debian.sh / setup-repo-rhel.sh done — written, served, and installed from in ubuntu:24.04, rockylinux:9 and opensuse/leap:15.6 on every PR
    (c) signed apt and yum repositories at objectfs.io/apt and objectfs.io/yum built, tested, deliberately not published

    Why (c) stops here. The code is written and verified end to end; the obstacle was never hosting or
    the build. It is the signing key. apt update refuses an unsigned repository and accepts one only when
    it is marked [trusted=yes], which turns authenticity off; gpgcheck is dnf's default. So an unsigned
    repository is not a lesser version of a signed one — it is a repository nothing can install from.
    Publishing means holding a key, keeping it out of reach, and rotating it for as long as anyone has the
    repository configured. A key that goes stale is worse for those machines than no repository was, because
    it leaves a trusted signer behind. That is an indefinite commitment, and it is not worth taking on for
    this project's audience right now.

    Worth noting for the record, since it came up: no release tool removes this. goreleaser does not
    create or generate GPG keys
    — it signs with one you supply, and its defaults are archives plus
    checksums.txt with no signs: block at all, which needs no key. It also generates no apt or yum
    repository metadata in the OSS version; its hosted-repository answer is furies:/Gemfury, which is
    Pro-only and moves the key to a paid third party rather than eliminating it.

    What ships instead. A .deb and an .rpm for both architectures are attached to every release from
    v0.14.0 onward, unsigned, with a published SHA-256 per asset. install.sh verifies the tarball's and has
    no flag to skip it; apt install ./file.deb and dnf install ./file.rpm check the package's own
    digests. apt upgrade will not reach ObjectFS, and all five documentation surfaces now say so plainly
    rather than advertising a one-liner that runs, fetches a signing key that 404s, and fails there.

    Nothing was removed. pages.yml still builds and signs both repositories whenever a key is present,
    both setup scripts stay, nfpm.yaml keeps its signature block, and ci.yml's repo-install job keeps
    constructing both repositories against a throwaway key and installing from them in all three containers
    on every PR — including asserting that a tampered index is refused. Turning this on is one repository
    secret and nothing else, and that stays true only while the path stays tested.

    Two gates hold the decision in place: TestTheDormantRepositoriesAreNotDocumented walks every .md and
    .html in the tree and fails on any page naming a repository address, and
    TestTheRPMSigningPathStaysIntact requires the absent-key branch to warn and skip rather than either
    failing the release or going quiet. The first is a one-way gate on purpose — a test cannot read whether a
    secret exists — and its doc comment says to delete it first when a repository is published again.

    Recommend closing once #491 merges: (a) and (b) are delivered and (c) is a decision, not unfinished work.

  9. scttfrdmn commented on Sep 15, 2026

    @scttfrdmn
    OwnerAuthor

    Closed: the work landed in #491.

    scripts/setup-repo-debian.sh, scripts/setup-repo-rhel.sh and the universal scripts/install.sh
    all exist and are exercised by CI. The repo-install job builds both repositories against a
    throwaway key and installs from them in ubuntu:24.04, rockylinux:9 and opensuse/leap:15.6,
    including refusing a tampered index; the three install-script rows cover install.sh on the same
    three images.

    What #491 changed is the publish decision, not the code. The repositories are built and tested but
    deliberately not published, so nothing points apt or dnf at an address that would 404. Releases carry
    .deb and .rpm files as attached assets instead, which is the stated requirement. Publishing later
    is one repository secret away, and internal/config/served_repositories_test.go pins the dormant
    state so it cannot drift back silently.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdeffort: largepriority: hightype: enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions