Skip to content

Package cernbox 2.0: reva's CLI built by gaia with the CERNBox plugins - #2

Draft
gmgigi96 wants to merge 6 commits into
mainfrom
cernbox-packaging
Draft

gmgigi96 wants to merge 6 commits into
mainfrom
cernbox-packaging

Conversation

@gmgigi96

@gmgigi96 gmgigi96 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

cernbox 2.0 is reva's CLI, built by gaia with the CERNBox plugins and brand. This repo now packages that build with goreleaser. The 1.x code stays until the integration suite is ported.

Needs cs3org/gaia#6, cs3org/reva#5959 to #5963 and cernbox/reva-plugins#88. Until those are released, packaging/versions.env has placeholders and the release job can't pass.

What's in it:

  • packaging/prepare.sh prepares the gaia workspace, from released versions or from local checkouts (REVA_DIR, REVA_PLUGINS_DIR).
  • goreleaser builds linux, macOS and Windows on amd64 and arm64. It keeps the archives and the rpm/deb packages, now with /etc/cernbox/config.toml and the shell completions.
  • CI prepares the workspace once and uses it for the build, the tests and the release.
  • Makefile targets: prepare, build, install, snapshot, completions.
  • Docs. docs/release-notes-2.0.md lists what changes for users. docs/packaging.md explains the pipeline and the plan to retire the 1.x code.

Tested: cross builds for linux, macOS and Windows, cernbox version --plugins, and install.sh from a local archive. The integration suite isn't run yet: it still uses the 1.x flags and needs porting.

cernbox is now reva's CLI, rebranded at build time: gaia builds it with
the CERNBox CLI plugins of reva-plugins and the CERNBox brand
(cli/cernbox.toml there), the same way as revad. This repository packages
that build instead of its own client.

packaging/prepare.sh runs gaia's prepare stage into ws/, with the versions
of packaging/versions.env, or with local checkouts of reva and
reva-plugins for development. gaia checks the brand against the plugins of
the build there, so a bad brand fails before anything is compiled. The
brand comes from the module cache at the version of reva-plugins that the
build uses, so the two cannot drift apart.

goreleaser cross-compiles ws/ for the same platforms as before, with the
version flags that gaia writes to ws/bflags. They reach goreleaser through
BFLAGS, because goreleaser reads its environment before any hook runs. The
archives, the packages and their install paths keep their names. The site
configuration becomes /etc/cernbox/config.toml, which the new CLI reads,
and holds no values, because the brand has them all.

The completions are generated from the built binary with an empty home,
because the CLI copies a config.yaml it finds into config.toml.

The three versions are master for now: none of gaia, reva and
reva-plugins has a release with what this needs yet.

Assisted-by: Claude:claude-opus-5-5
One job prepares ws/ on Linux and uploads it. The builds on Linux, macOS
and Windows, the integration tests and the release all compile that same
workspace, so what is tested is what is released, and gaia's call to
api.github.com, which it makes without a token and panics on, happens once
per run, with one retry.

The smoke test now also checks that the version flags and the brand made
it into the binary. The integration tests run against the merged binary,
so they fail until the suite is ported to its JSON and its exit codes.

Assisted-by: Claude:claude-opus-5-5
The binary that ships is built by gaia from reva, not from this
repository. Without CERNBOX_BINARY the suite still builds cmd/cernbox, so
that 1.x can be compared until its code is retired.

Assisted-by: Claude:claude-opus-5-5
docs/packaging.md says how a release is built now (prepare, version
flags, cross-compilation, packages), how to build locally against
checkouts of reva and reva-plugins, how to release, what the CERNBox
hosts need, and in which order the Go code of 1.x goes: port the
integration suite, close the gaps of the merged CLI, release 2.0, then
delete cmd/, internal/ and pkg/ in one commit.

Assisted-by: Claude:claude-opus-5-5
2.0 is reva's CLI under the old name, and it breaks scripts: the JSON is
the CS3 JSON, the exit codes are 0, 1 and 2, some flags and commands
moved, the configuration is TOML, and the token cache moved. The notes
map each 1.x field, flag, command and variable to its 2.0 form, list the
command names that reva and cernbox now share, and list what the build
tested does not have yet.

The README warns before anything else, builds from source with gaia, and
shows the scripting example and exit codes of 2.0. The archives ship the
release notes instead of the design of 1.x.

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-sonnet-5-5
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