OXYGENHUB

README.md

Oxygenhub

A forge for Oxygen repositories: hosting, browsing, review, issues and releases, in one Rust binary with one data directory. It works like GitHub where GitHub is right and differs where Oxygen's commutative model makes something better possible. The specification is docs/spec.md; deployment notes are in docs/deploy.md.

Status

Milestone 0.1 (browse): repositories are created by an administrator and filled by oxy push; the pages show trees, files, blame, history with the dependency graph, changes with diffs, comparisons, bookmarks, tags, conflicts, the trust policy and the push log. Accounts, proposals, issues and the rest follow the milestones in the specification.

Install oh

Builds for Linux, macOS and Windows are on the releases page. These are early releases: the macOS and Windows builds are not signed and have had little testing.

  • Debian, Ubuntu and other Linux with apt (x86_64 or arm64): download oh_VERSION_amd64.deb (or _arm64.deb) and run sudo apt install ./oh_VERSION_amd64.deb. It needs glibc 2.28 or later (Debian 10, Ubuntu 20.04 and newer).
  • Other Linux: unpack oh-VERSION-linux-x86_64.tar.gz (or -linux-arm64) and put oh on your PATH.
  • macOS (Apple Silicon or Intel): unpack oh-VERSION-macos-arm64.tar.gz (or -macos-x86_64), then xattr -d com.apple.quarantine oh, since the build is not notarised, and put it on your PATH.
  • Windows: unzip oh-VERSION-windows-x86_64.zip and put the folder on your PATH. SmartScreen may warn on first run, since the build is not signed.

Sign in with oh auth login --with-hub https://oxygenhub.io; the commands are in docs/oh.md. oh works alongside oxy, from Oxygen's releases.

Check a download against the release's SHA256SUMS with sha256sum -c SHA256SUMS --ignore-missing.

Running

cargo build --release
target/release/oxygenhub --data /srv/oxygenhub init --base-url https://hub.example:7343 --self-signed
target/release/oxygenhub --data /srv/oxygenhub admin repo create andy/oxygen --description "The VCS"
target/release/oxygenhub --data /srv/oxygenhub serve

Then from any checkout: oxy remote add hub https://hub.example:7343/andy/oxygen and oxy push hub. With a self-signed certificate, hand clients the CA with OXY_CA=<path> or oxy config remote.hub.ca <path>.

Configuration lives in <data>/hub.toml (spec §17.1) and every key can be overridden with OXYHUB_<SECTION>_<KEY>.

Layout

crates/hub        the binary: config, db (sqlx + migrations), repos (registry, locks, views),
                  protocol (embedded oxy-server), web (pages), api (JSON), render (markdown,
                  highlighting, diffs, graph)
crates/hub-api    the JSON API's types, shared with clients
templates/        askama templates and the stylesheet
assets/           vendored fonts, icons, the small progressive-enhancement script
migrations/       under crates/hub; applied at start

Developing

make check runs formatting, clippy with warnings as errors, and the tests. The tests use a real oxy-core client against a hub on a loopback port and never touch your own Oxygen configuration.