Files
s3-gateway/README.md
T
57_WolveandClaude Opus 5 095fc37d49 patches: add v1.10.0 series and register it as latest
Rebase the de-brand + dark-theme series onto upstream v1.10.0 and make it
the highest entry in the support matrix. v1.9.0 is skipped — nothing
needs it, and the matrix only lists versions we want builds of.

Both patches applied to v1.10.0 with no conflicts and no 3-way fallback.
The de-brand patch is in fact unchanged hunk-for-hunk from the v1.8.0
series — only the three blob hashes for the files upstream touched
(dashboard.html, explorer.html, iam-oidc.html) differ — because every
v1.9/v1.10 webui edit lands outside the regions it rewrites. No new
admin pages this time, so its scope is unchanged.

The dark theme needed two new rules, both for the upload-progress tray
v1.10.0 adds to the Explorer:

* .text-gray-800 — the tray titles its panel with text-gray-800, which
  is near-black and so effectively invisible on the dark panel. Lifted
  to the primary text shade, continuing the gray-600/700 progression.

* .hover\:text-red-700:hover — the tray's Cancel link is text-red-600
  hover:text-red-700. The existing rules lift the rest state to #f87171,
  but Tailwind's red-700 (#b91c1c) is darker than that, so hovering
  dimmed the link instead of lifting it. Lifted one shade brighter,
  matching how hover:text-accent-600 behaves.

Left as-is: the tray's failed-upload progress fill uses bg-red-400,
which is already #f87171 — the same red the theme lifts its text to —
and reads clearly as a solid fill on the dark track. Also unchanged are
the utilities that are uncovered but already used by shipped pages
(text-gray-400/500, text-*-800 status text); re-pointing those would
restyle existing releases, which is a theme change rather than a rebase.

Verified: ci/clone-source.sh + ci/apply-patches.sh apply the exported
series to a pristine v1.10.0 producing a tree byte-identical to the one
developed here (1019 files = the tag's 1017, plus favicon.svg and four
fonts, less three Versity PNGs); the series touches webui/ only;
./cmd/versitygw builds; and go test ./webui/... passes, including the
webserver_test.go added in v1.10.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-27 10:43:47 -05:00

170 lines
7.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# s3-gateway
Downstream build pipeline that produces **de-branded
[versitygw](https://github.com/versity/versitygw) releases** — the
upstream Versity S3 Gateway with Versity trademarks and logos removed
from the admin web UI.
Same pattern as [`scoutfs-build`](../scoutfs-build): pull an upstream
release **tag**, apply our **patch series** scoped to that tag, build
with upstream's GoReleaser, and publish to **Gitea Releases**.
Artifact names are intentionally **unchanged** — the binary stays
`versitygw` and the deb/rpm packages stay `versitygw`, so builds are
drop-in compatible with existing configs, systemd units, and the
`versitygw` CLI. Only the embedded web UI is rebranded to "S3 Gateway".
```
upstream tag (vX.Y.Z) this repo
github.com/versity/versitygw patches/<tag>/*.patch
│ │
▼ ▼
ci/clone-source.sh ───► ci/apply-patches.sh ───► ci/build.sh ───► ci/publish-release.sh
(shallow clone tag) (git am --3way) (goreleaser) (Gitea release assets)
```
`ci/support-matrix.yaml` records which upstream versions have a curated
patch set and maps each to its patch directory.
## Layout
```
s3-gateway/
├── ci/
│ ├── support-matrix.yaml # upstream tag -> patch directory (registry)
│ ├── clone-source.sh # shallow-clone upstream versitygw at a tag
│ ├── apply-patches.sh # git am --3way patches/<tag>/*.patch
│ ├── build.sh # goreleaser release (binaries + deb/rpm)
│ ├── publish-release.sh # upload dist/* to a Gitea release
│ └── run.sh # local end-to-end: clone + patch + build one tag
├── patches/
│ ├── v1.6.0/
│ │ ├── 0001-webui-debrand.patch
│ │ └── 0002-webui-dark-theme.patch
│ └── v1.5.0/
│ └── 0001-webui-debrand.patch
├── .gitea/workflows/build.yml
└── docs/multi-version-pipeline.md
```
## Build locally
Prerequisites: `git`, `go`, and [`goreleaser`](https://goreleaser.com).
```bash
# Build one upstream tag end-to-end → artifacts in src/dist/
VGW_TAG=v1.5.0 bash ci/run.sh
# Fast offline build against a local upstream clone:
VGW_REPO_URL="/path/to/versitygw" VGW_TAG=v1.5.0 bash ci/run.sh
```
Or run the steps individually:
```bash
VGW_TAG=v1.5.0 bash ci/clone-source.sh # → src/
VGW_TAG=v1.5.0 bash ci/apply-patches.sh # git am the series onto src/
VGW_TAG=v1.5.0 bash ci/build.sh # goreleaser → src/dist/
```
`src/` and `src/dist/` are gitignored.
## Patches
Patch sets live in `patches/<dir>/` as `git format-patch` files and are
applied with `git am --3way`, in filename order. The directory for a
tag comes from the `patches:` field in `ci/support-matrix.yaml`
(defaults to the tag name).
Currently maintained:
| Upstream tag | Patch set | Contents |
|--------------|---------------|-----------------------------------------------------------|
| `v1.10.0` | `v1.10.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch` |
| `v1.8.0` | `v1.8.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch` |
| `v1.7.0` | `v1.7.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch` |
| `v1.6.0` | `v1.6.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch` |
| `v1.5.0` | `v1.5.0/` | `0001-webui-debrand.patch` |
### What the de-brand patch does
- Sidebar/login logos → a plain **"S3 Gateway"** wordmark.
- Page titles: "VersityGW Dashboard" → "Dashboard" (Buckets, Users,
Explorer and the v1.8.0 IAM pages too).
- Browser tab titles → "S3 Gateway – …".
- Removes the sidebar **Resources** section (external `github.com/versity` links).
- Replaces the Versity favicon with a neutral SVG; deletes the Versity logo PNGs.
- Removes the visible "© Versity Software Inc." footer from the login page.
Deliberately **kept** (license compliance): the per-file Apache-2.0
license headers — which carry the upstream copyright notice as an HTML
comment at the top of each file — and the `NOTICE` file. Upstream is
Apache-2.0; the de-brand strips the visible Versity *trademarks* (logos,
wordmarks, and the login footer) while preserving the *copyright* notice
in the source headers.
### What the dark-theme patch does
`0002-webui-dark-theme.patch` re-skins the admin UI to match the
**kanrisha** web app — a near-black palette with indigo/blue accents —
without touching the page markup. It works entirely through the two
shared asset files plus bundled fonts:
- `tailwind-config.js` — remaps the named color tokens (`surface`,
`charcoal`, `primary`, `accent`) onto the dark palette and switches
the sans/mono fonts to Inter / JetBrains Mono.
- `theme.css` — sets the dark body, restyles the bespoke components
(sidebar active state, dropdowns, toggles, checkboxes, file rows,
login) in indigo, and adds an override layer that flips the built-in
Tailwind white/gray/status utilities the markup uses.
- `fonts.css` + `assets/fonts/*.woff2` — self-hosts Inter and JetBrains
Mono (variable, latin + latin-ext) so the UI stays fully offline,
matching the existing self-hosted Roboto.
The only markup change is the login page's light background gradient,
which becomes a solid dark surface. Applied to every maintained patch
set except `v1.5.0`.
## Adding / refreshing a version
When upstream cuts a new release you want a build of, you rebase the
patch series onto it and add a patch directory. See
[docs/multi-version-pipeline.md](docs/multi-version-pipeline.md) for the
full recipe. In short:
```bash
# Rebase the series onto the new tag, re-export into patches/vX.Y.Z/
git clone https://github.com/versity/versitygw && cd versitygw
git -c core.autocrlf=false checkout -b debrand vX.Y.Z
git am --3way /path/to/s3-gateway/patches/<prev>/*.patch # resolve any conflicts
git format-patch --binary vX.Y.Z..HEAD -o /path/to/s3-gateway/patches/vX.Y.Z/
```
Then add the tag to `ci/support-matrix.yaml`, commit, and build it (see
below).
## CI
`.gitea/workflows/build.yml` builds **one version per run** and
publishes it to a Gitea release in this repo. It triggers two ways — no
scheduled/cron builds:
- **By new tag** — push a `vX.Y.Z` tag to this repo; CI builds upstream
versitygw `vX.Y.Z` with `patches/vX.Y.Z/`.
- **One-shot** — run the **build** workflow manually (workflow_dispatch)
and enter the upstream tag to build.
Configuration:
- **Runner**: any Linux runner (`runs-on: ubuntu-latest`). The Go
toolchain comes from the `golang` container, so the runner only needs
Docker.
- **Secret**: `TOKEN_GITEA` — a Gitea PAT with **write:repository**
(clones this repo + creates releases / uploads assets).
- **Variable (optional)**: `VGW_REPO_URL` to override the upstream URL.
## License
Apache-2.0, matching versitygw upstream. Upstream copyright and
`NOTICE` are retained in every build.