diff options
| author | Nikolay Govorov <me@govorov.online> | 2026-08-30 02:50:45 +0100 |
|---|---|---|
| committer | Nikolay Govorov <me@govorov.online> | 2026-08-30 02:50:45 +0100 |
| commit | aa6a953917222549f58f0d48278fe3f14e2c0eaf (patch) | |
| tree | 157054386f07164c0ba1ac4d9204cd78cab0e49e | |
| parent | 9b6230016bf5ad159ba5af69bad6bdbdec8412c3 (diff) | |
| download | tar tar.gz tar.bz2 tar.lz tar.xz tar.zst zip | |
Named Tesor (HEAD) (main)
Diffstat
| -rw-r--r-- | .dockerignore | 2 | +1 −1 |
| -rw-r--r-- | .github/workflows/build.yml | 20 | +10 −10 |
| -rw-r--r-- | .gitignore | 2 | +1 −1 |
| -rw-r--r-- | CLA.md | 4 | +2 −2 |
| -rw-r--r-- | Cargo.lock | 90 | +45 −45 |
| -rw-r--r-- | Cargo.toml | 2 | +1 −1 |
| -rw-r--r-- | Dockerfile | 18 | +9 −9 |
| -rw-r--r-- | README.md | 38 | +19 −19 |
| -rw-r--r-- | REUSE.toml | 16 | +8 −8 |
| -rw-r--r-- | charts/tesor/Chart.yaml (renamed from charts/recluse/Chart.yaml) | 4 | +2 −2 |
| -rw-r--r-- | charts/tesor/templates/_helpers.tpl (renamed from charts/recluse/templates/_helpers.tpl) | 16 | +8 −8 |
| -rw-r--r-- | charts/tesor/templates/configmap.yaml (renamed from charts/recluse/templates/configmap.yaml) | 8 | +4 −4 |
| -rw-r--r-- | charts/tesor/templates/deployment.yaml (renamed from charts/recluse/templates/deployment.yaml) | 24 | +12 −12 |
| -rw-r--r-- | charts/tesor/templates/httproute.yaml (renamed from charts/recluse/templates/httproute.yaml) | 6 | +3 −3 |
| -rw-r--r-- | charts/tesor/templates/pvc.yaml (renamed from charts/recluse/templates/pvc.yaml) | 4 | +2 −2 |
| -rw-r--r-- | charts/tesor/templates/service.yaml (renamed from charts/recluse/templates/service.yaml) | 6 | +3 −3 |
| -rw-r--r-- | charts/tesor/values.yaml (renamed from charts/recluse/values.yaml) | 4 | +2 −2 |
| -rw-r--r-- | crates/repos/src/go.rs | 4 | +2 −2 |
| -rw-r--r-- | crates/tesor/Cargo.toml (renamed from crates/recluse/Cargo.toml) | 4 | +2 −2 |
| -rw-r--r-- | crates/tesor/build.rs (renamed from crates/recluse/build.rs) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/assets/apple-touch-icon.png (renamed from crates/recluse/src/assets/apple-touch-icon.png) | bin | 715 -> 715 bytes |
| -rw-r--r-- | crates/tesor/src/assets/base.css (renamed from crates/recluse/src/assets/base.css) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/assets/favicon-192.png (renamed from crates/recluse/src/assets/favicon-192.png) | bin | 715 -> 715 bytes |
| -rw-r--r-- | crates/tesor/src/assets/favicon-512.png (renamed from crates/recluse/src/assets/favicon-512.png) | bin | 2329 -> 2329 bytes |
| -rw-r--r-- | crates/tesor/src/assets/favicon.ico (renamed from crates/recluse/src/assets/favicon.ico) | bin | 32038 -> 32038 bytes |
| -rw-r--r-- | crates/tesor/src/assets/favicon.svg (renamed from crates/recluse/src/assets/favicon.svg) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2 (renamed from crates/recluse/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2) | bin | 122452 -> 122452 bytes |
| -rw-r--r-- | crates/tesor/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2 (renamed from crates/recluse/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2) | bin | 113700 -> 113700 bytes |
| -rw-r--r-- | crates/tesor/src/assets/manifest.webmanifest (renamed from crates/recluse/src/assets/manifest.webmanifest) | 2 | +1 −1 |
| -rw-r--r-- | crates/tesor/src/assets/robots.txt (renamed from crates/recluse/src/assets/robots.txt) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/config.rs (renamed from crates/recluse/src/config.rs) | 8 | +4 −4 |
| -rw-r--r-- | crates/tesor/src/controller_backend.rs (renamed from crates/recluse/src/controller_backend.rs) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/controller_web.rs (renamed from crates/recluse/src/controller_web.rs) | 16 | +8 −8 |
| -rw-r--r-- | crates/tesor/src/main.rs (renamed from crates/recluse/src/main.rs) | 8 | +4 −4 |
| -rw-r--r-- | crates/tesor/src/proxy.rs (renamed from crates/recluse/src/proxy.rs) | 2 | +1 −1 |
| -rw-r--r-- | crates/tesor/src/storage.rs (renamed from crates/recluse/src/storage.rs) | 0 | +0 −0 |
| -rw-r--r-- | crates/tesor/src/telemetry.rs (renamed from crates/recluse/src/telemetry.rs) | 4 | +2 −2 |
| -rw-r--r-- | deny.toml | 2 | +1 −1 |
| -rw-r--r-- | mise.toml | 2 | +1 −1 |
| -rw-r--r-- | nfpm.yaml | 24 | +12 −12 |
| -rw-r--r-- | pkg/scripts/postinstall.sh | 4 | +2 −2 |
| -rw-r--r-- | pkg/scripts/preinstall.sh | 12 | +6 −6 |
| -rw-r--r-- | pkg/scripts/preremove.sh | 6 | +3 −3 |
| -rw-r--r-- | pkg/tesor.service (renamed from pkg/recluse.service) | 10 | +5 −5 |
| -rw-r--r-- | pkg/tesor.toml (renamed from pkg/recluse.toml) | 20 | +10 −10 |
| -rwxr-xr-x | tests/smoke/run-local.sh | 24 | +12 −12 |
| -rw-r--r-- | tests/smoke/src/main.rs | 36 | +18 −18 |
47 files changed, 226 insertions, 226 deletions
diff --git a/.dockerignore b/.dockerignore index 90a5968..373529b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,7 +3,7 @@ .git .github -.recluse-state +.tesor-state dist target *.lcov diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07dadb3..4078821 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ permissions: contents: read concurrency: - group: recluse-build-${{ github.ref }} + group: tesor-build-${{ github.ref }} cancel-in-progress: true env: @@ -72,11 +72,11 @@ jobs: - run: cargo clippy --workspace --locked --all-targets --all-features --release -- -D warnings - run: cargo test --all-features --release --locked - - run: cargo build --package recluse --bin recluse --release --locked + - run: cargo build --package tesor --bin tesor --release --locked - name: Build packages run: | - PKG_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "recluse") | .version') + PKG_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "tesor") | .version') if [[ "$GITHUB_REF" == refs/tags/v* ]]; then VERSION="${GITHUB_REF_NAME#v}" if [[ "$VERSION" != "$PKG_VERSION" ]]; then @@ -114,7 +114,7 @@ jobs: - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: binary-${{ matrix.arch }} - path: target/release/recluse + path: target/release/tesor smoke: name: Smoke tests @@ -138,7 +138,7 @@ jobs: - name: Run smoke tests against local instance run: | - chmod +x target/release/recluse + chmod +x target/release/tesor ./tests/smoke/run-local.sh publish: @@ -146,7 +146,7 @@ jobs: runs-on: ubuntu-latest needs: [build, smoke] concurrency: - group: package-publish-recluse-nightly + group: package-publish-tesor-nightly cancel-in-progress: false if: github.ref == 'refs/heads/main' permissions: @@ -199,7 +199,7 @@ jobs: - name: Publish package repositories run: | mise run publish -- \ - --service recluse \ + --service tesor \ --channel nightly \ --input dist \ deb rpm @@ -275,7 +275,7 @@ jobs: shell: bash run: | version="${{ steps.artifact.outputs.version }}" - image="ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/recluse" + image="ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/tesor" tags=( --tag "$image:sha-$GITHUB_SHA" --tag "$image:$version" @@ -302,11 +302,11 @@ jobs: --context . \ --file Dockerfile \ --platform linux/amd64,linux/arm64 \ - --cache-scope recluse \ + --cache-scope tesor \ "${tags[@]}" "${labels[@]}" "${image_output[@]}" mise run chart -- \ - --chart charts/recluse \ + --chart charts/tesor \ --version "$version" \ --app-version "$version" \ "${chart_output[@]}" diff --git a/.gitignore b/.gitignore index ef36af8..2c7fb07 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ mise.local.toml mise.*.local.toml /.container -/.recluse-state +/.tesor-state diff --git a/CLA.md b/CLA.md index f8240f7..c0418c8 100644 --- a/CLA.md +++ b/CLA.md @@ -1,4 +1,4 @@ -# Recluse Individual Contributor License Agreement +# Tesor Individual Contributor License Agreement Version 1.0 @@ -6,7 +6,7 @@ Version 1.0 > Agreement Version 1.0 licensed under a > [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/). -Thank you for your interest in contributing to Recluse (the "Project"). In this +Thank you for your interest in contributing to Tesor (the "Project"). In this Agreement, "We" and "Us" mean Nikolay Govorov. This contributor agreement ("Agreement") documents the rights granted by diff --git a/Cargo.lock b/Cargo.lock index 94f3647..d2e2df0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1913,51 +1913,6 @@ dependencies = [ ] [[package]] -name = "recluse" -version = "0.1.0" -dependencies = [ - "async-trait", - "axum", - "axum-server", - "base", - "bytes", - "bytesize", - "chrono", - "crc32fast", - "hex", - "http-body-util", - "hyper", - "hyper-tls", - "hyper-util", - "maud", - "opentelemetry", - "opentelemetry-appender-tracing", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", - "repos", - "rustls", - "sd-notify", - "serde", - "serde_json", - "sqlx", - "tempfile", - "thiserror 2.0.18", - "tokio", - "tokio-util", - "toml", - "tonic", - "tower", - "tower-http", - "tower_governor", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", - "url", - "uuid", -] - -[[package]] name = "redox_syscall" version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2736,6 +2691,51 @@ dependencies = [ ] [[package]] +name = "tesor" +version = "0.1.0" +dependencies = [ + "async-trait", + "axum", + "axum-server", + "base", + "bytes", + "bytesize", + "chrono", + "crc32fast", + "hex", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "maud", + "opentelemetry", + "opentelemetry-appender-tracing", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", + "repos", + "rustls", + "sd-notify", + "serde", + "serde_json", + "sqlx", + "tempfile", + "thiserror 2.0.18", + "tokio", + "tokio-util", + "toml", + "tonic", + "tower", + "tower-http", + "tower_governor", + "tracing", + "tracing-opentelemetry", + "tracing-subscriber", + "url", + "uuid", +] + +[[package]] name = "thiserror" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/Cargo.toml b/Cargo.toml index 06e3c86..19cca99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ version = "0.1.0" license = "AGPL-3.0-or-later" authors = ["Nikolay Govorov <me@govorov.online>"] homepage = "https://pkg.earth" -repository = "https://github.com/dimidiumlabs/recluse" +repository = "https://git.dimidiumlabs.io/tesor" [workspace.dependencies] # local dependencies diff --git a/Dockerfile b/Dockerfile index e4f4141..d82aa9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,23 +7,23 @@ ARG ALPINE_DIGEST=sha256:fd791d74b68913cbb027c6546007b3f0d3bc45125f797758156952b ARG DISTROLESS_DIGEST=sha256:a77defd6fedbb3392b175ba8ea3d1c22be963c1597c248c3ba987ddd80bfb512 FROM --platform=$BUILDPLATFORM docker.io/library/alpine:${ALPINE_VERSION}@${ALPINE_DIGEST} AS rootfs -RUN install -d -m 0750 /rootfs/var/lib/recluse +RUN install -d -m 0750 /rootfs/var/lib/tesor FROM gcr.io/distroless/cc-debian13:nonroot@${DISTROLESS_DIGEST} ARG TARGETARCH -LABEL org.opencontainers.image.source="https://github.com/dimidiumlabs/recluse" \ +LABEL org.opencontainers.image.source="https://git.dimidiumlabs.io/tesor" \ org.opencontainers.image.licenses="AGPL-3.0-or-later" -COPY --chown=root:root --chmod=0755 .container/binary-${TARGETARCH}/recluse /usr/local/bin/recluse -COPY --from=rootfs --chown=10000:10000 /rootfs/var/lib/recluse /var/lib/recluse -COPY --chown=root:root pkg/recluse.toml /etc/recluse.toml -COPY --chown=root:root LICENSE README.md /usr/share/doc/recluse/ +COPY --chown=root:root --chmod=0755 .container/binary-${TARGETARCH}/tesor /usr/local/bin/tesor +COPY --from=rootfs --chown=10000:10000 /rootfs/var/lib/tesor /var/lib/tesor +COPY --chown=root:root pkg/tesor.toml /etc/tesor.toml +COPY --chown=root:root LICENSE README.md /usr/share/doc/tesor/ USER 10000:10000 EXPOSE 2000 -VOLUME ["/var/lib/recluse"] +VOLUME ["/var/lib/tesor"] -ENTRYPOINT ["/usr/local/bin/recluse"] -CMD ["--config=/etc/recluse.toml"] +ENTRYPOINT ["/usr/local/bin/tesor"] +CMD ["--config=/etc/tesor.toml"] diff --git a/README.md b/README.md index fa4cfee..2c51ae4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Recluse — tiny packages caching proxy +# Tesor — tiny packages caching proxy Soon humanity will go to Mars and in order for the colonists to be able to program, we will need a local mirror of packages. @@ -14,52 +14,52 @@ is **not** intended for production use. sudo apt install curl gnupg curl -fsSL https://pkg.dimidiumlabs.io/packages.gpg | sudo gpg --dearmor -o /usr/share/keyrings/dimidiumlabs.gpg -echo "deb [signed-by=/usr/share/keyrings/dimidiumlabs.gpg] https://pkg.dimidiumlabs.io/recluse/apt/ nightly main" | sudo tee /etc/apt/sources.list.d/recluse.list -sudo apt update && sudo apt install recluse +echo "deb [signed-by=/usr/share/keyrings/dimidiumlabs.gpg] https://pkg.dimidiumlabs.io/tesor/apt/ nightly main" | sudo tee /etc/apt/sources.list.d/tesor.list +sudo apt update && sudo apt install tesor -sudo systemctl enable --now recluse +sudo systemctl enable --now tesor ``` **Fedora/RHEL:** ```bash # DNF5 (Fedora 41+, RHEL 10+) -sudo dnf config-manager addrepo --from-repofile=https://pkg.dimidiumlabs.io/recluse/rpm/nightly/recluse-nightly.repo +sudo dnf config-manager addrepo --from-repofile=https://pkg.dimidiumlabs.io/tesor/rpm/nightly/tesor-nightly.repo # DNF4 (Fedora 40 and older, RHEL 8/9) -sudo curl -o /etc/yum.repos.d/recluse-nightly.repo https://pkg.dimidiumlabs.io/recluse/rpm/nightly/recluse-nightly.repo +sudo curl -o /etc/yum.repos.d/tesor-nightly.repo https://pkg.dimidiumlabs.io/tesor/rpm/nightly/tesor-nightly.repo -sudo dnf install recluse -sudo systemctl enable --now recluse +sudo dnf install tesor +sudo systemctl enable --now tesor ``` **openSUSE:** ```bash sudo rpm --import https://pkg.dimidiumlabs.io/packages.gpg -sudo zypper addrepo https://pkg.dimidiumlabs.io/recluse/rpm/nightly/ recluse-nightly +sudo zypper addrepo https://pkg.dimidiumlabs.io/tesor/rpm/nightly/ tesor-nightly sudo zypper refresh -sudo zypper install recluse +sudo zypper install tesor -sudo systemctl enable --now recluse +sudo systemctl enable --now tesor ``` ## Build from source -1. Clone repo: `git clone https://github.com/dimidiumlabs/recluse.git && cd recluse` +1. Clone repo: `git clone https://git.dimidiumlabs.io/tesor.git && cd tesor` 1. Provision the toolchain and system build dependencies: `mise bootstrap` 1. Build from source: `mise exec -- cargo build --release` 1. Install manually ```bash - sudo groupadd --system recluse - sudo useradd --system --gid recluse --no-create-home --shell /usr/sbin/nologin recluse - sudo install -m 700 -o recluse ./pkg/recluse.toml /etc/ - sudo install -m 755 -o root ./pkg/recluse.service /usr/lib/systemd/system - sudo install -m 755 -o root target/release/recluse /usr/local/bin/ + sudo groupadd --system tesor + sudo useradd --system --gid tesor --no-create-home --shell /usr/sbin/nologin tesor + sudo install -m 700 -o tesor ./pkg/tesor.toml /etc/ + sudo install -m 755 -o root ./pkg/tesor.service /usr/lib/systemd/system + sudo install -m 755 -o root target/release/tesor /usr/local/bin/ ``` -1. start systemd service: `sudo systemctl enable --now recluse` +1. start systemd service: `sudo systemctl enable --now tesor` ## Contributing @@ -95,7 +95,7 @@ Remember, AI agents should make software better, not worse. ## Licensing -Recluse source code is licensed under AGPL-3.0-or-later. Documentation is +Tesor source code is licensed under AGPL-3.0-or-later. Documentation is licensed under CC-BY-4.0. The bundled JetBrains Mono font files are licensed under OFL-1.1. diff --git a/REUSE.toml b/REUSE.toml index 717f144..ca825f7 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -10,13 +10,13 @@ path = [ "mise.lock", "pkg/*.svg", - "charts/recluse/templates/*", + "charts/tesor/templates/*", - "crates/recluse/src/assets/*.svg", - "crates/recluse/src/assets/*.ico", - "crates/recluse/src/assets/*.png", - "crates/recluse/src/assets/robots.txt", - "crates/recluse/src/assets/manifest.webmanifest", + "crates/tesor/src/assets/*.svg", + "crates/tesor/src/assets/*.ico", + "crates/tesor/src/assets/*.png", + "crates/tesor/src/assets/robots.txt", + "crates/tesor/src/assets/manifest.webmanifest", ] SPDX-FileCopyrightText = "2026 Nikolay Govorov" SPDX-License-Identifier = "AGPL-3.0-or-later" @@ -37,8 +37,8 @@ SPDX-License-Identifier = "CC-BY-3.0" [[annotations]] path = [ - "crates/recluse/src/assets/jetbrainsmono/OFL.txt", - "crates/recluse/src/assets/jetbrainsmono/*.woff2", + "crates/tesor/src/assets/jetbrainsmono/OFL.txt", + "crates/tesor/src/assets/jetbrainsmono/*.woff2", ] SPDX-FileCopyrightText = "Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)" SPDX-License-Identifier = "OFL-1.1" diff --git a/charts/recluse/Chart.yaml b/charts/tesor/Chart.yaml index ff40446..9a70371 100644 --- a/charts/recluse/Chart.yaml +++ b/charts/tesor/Chart.yaml @@ -5,6 +5,6 @@ apiVersion: v2 type: application version: 0.1.0 -name: recluse -home: https://github.com/dimidiumlabs/recluse +name: tesor +home: https://git.dimidiumlabs.io/tesor description: Tiny package caching proxy diff --git a/charts/recluse/templates/_helpers.tpl b/charts/tesor/templates/_helpers.tpl index 4da058b..41b478a 100644 --- a/charts/recluse/templates/_helpers.tpl +++ b/charts/tesor/templates/_helpers.tpl @@ -1,32 +1,32 @@ # SPDX-FileCopyrightText: 2026 Nikolay Govorov # SPDX-License-Identifier: AGPL-3.0-or-later -{{- define "recluse.name" -}} +{{- define "tesor.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "recluse.fullname" -}} +{{- define "tesor.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s-%s" .Release.Name (include "recluse.name" .) | trunc 63 | trimSuffix "-" -}} +{{- printf "%s-%s" .Release.Name (include "tesor.name" .) | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- end -}} -{{- define "recluse.labels" -}} +{{- define "tesor.labels" -}} helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" }} -app.kubernetes.io/name: {{ include "recluse.name" . }} +app.kubernetes.io/name: {{ include "tesor.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} -{{- define "recluse.selectorLabels" -}} -app.kubernetes.io/name: {{ include "recluse.name" . }} +{{- define "tesor.selectorLabels" -}} +app.kubernetes.io/name: {{ include "tesor.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} -{{- define "recluse.image" -}} +{{- define "tesor.image" -}} {{- if .Values.image.digest -}} {{- printf "%s@%s" .Values.image.repository .Values.image.digest -}} {{- else -}} diff --git a/charts/recluse/templates/configmap.yaml b/charts/tesor/templates/configmap.yaml index d5dbf18..5dd823c 100644 --- a/charts/recluse/templates/configmap.yaml +++ b/charts/tesor/templates/configmap.yaml @@ -5,13 +5,13 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "recluse.fullname" . }} + name: {{ include "tesor.fullname" . }} labels: - {{- include "recluse.labels" . | nindent 4 }} + {{- include "tesor.labels" . | nindent 4 }} data: - recluse.toml: | + tesor.toml: | appname = {{ .Values.config.appname | quote }} - dirname = "/var/lib/recluse" + dirname = "/var/lib/tesor" [server] max_body_size = {{ .Values.config.server.maxBodySize | quote }} diff --git a/charts/recluse/templates/deployment.yaml b/charts/tesor/templates/deployment.yaml index f82648c..952927e 100644 --- a/charts/recluse/templates/deployment.yaml +++ b/charts/tesor/templates/deployment.yaml @@ -4,16 +4,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "recluse.fullname" . }} + name: {{ include "tesor.fullname" . }} labels: - {{- include "recluse.labels" . | nindent 4 }} + {{- include "tesor.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate selector: matchLabels: - {{- include "recluse.selectorLabels" . | nindent 6 }} + {{- include "tesor.selectorLabels" . | nindent 6 }} template: metadata: annotations: @@ -24,7 +24,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "recluse.selectorLabels" . | nindent 8 }} + {{- include "tesor.selectorLabels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -38,12 +38,12 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} containers: - - name: recluse - image: {{ include "recluse.image" . | quote }} + - name: tesor + image: {{ include "tesor.image" . | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - args: ["--config=/etc/recluse/recluse.toml"] + args: ["--config=/etc/tesor/tesor.toml"] ports: - name: http containerPort: 2000 @@ -65,19 +65,19 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: config - mountPath: /etc/recluse/recluse.toml - subPath: recluse.toml + mountPath: /etc/tesor/tesor.toml + subPath: tesor.toml readOnly: true - name: state - mountPath: /var/lib/recluse + mountPath: /var/lib/tesor volumes: - name: config configMap: - name: {{ default (include "recluse.fullname" .) .Values.config.existingConfigMap }} + name: {{ default (include "tesor.fullname" .) .Values.config.existingConfigMap }} - name: state {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ default (include "recluse.fullname" .) .Values.persistence.existingClaim }} + claimName: {{ default (include "tesor.fullname" .) .Values.persistence.existingClaim }} {{- else }} emptyDir: {} {{- end }} diff --git a/charts/recluse/templates/httproute.yaml b/charts/tesor/templates/httproute.yaml index 5b7d341..63e0159 100644 --- a/charts/recluse/templates/httproute.yaml +++ b/charts/tesor/templates/httproute.yaml @@ -5,9 +5,9 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: {{ include "recluse.fullname" . }} + name: {{ include "tesor.fullname" . }} labels: - {{- include "recluse.labels" . | nindent 4 }} + {{- include "tesor.labels" . | nindent 4 }} spec: {{- with .Values.route.parentRefs }} parentRefs: @@ -19,7 +19,7 @@ spec: {{- end }} rules: - backendRefs: - - name: {{ include "recluse.fullname" . }} + - name: {{ include "tesor.fullname" . }} port: {{ .Values.service.port }} {{- end }} diff --git a/charts/recluse/templates/pvc.yaml b/charts/tesor/templates/pvc.yaml index 2c563d1..32a4d7d 100644 --- a/charts/recluse/templates/pvc.yaml +++ b/charts/tesor/templates/pvc.yaml @@ -5,9 +5,9 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "recluse.fullname" . }} + name: {{ include "tesor.fullname" . }} labels: - {{- include "recluse.labels" . | nindent 4 }} + {{- include "tesor.labels" . | nindent 4 }} spec: accessModes: {{- toYaml .Values.persistence.accessModes | nindent 4 }} diff --git a/charts/recluse/templates/service.yaml b/charts/tesor/templates/service.yaml index 0367f03..1c173a0 100644 --- a/charts/recluse/templates/service.yaml +++ b/charts/tesor/templates/service.yaml @@ -4,12 +4,12 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "recluse.fullname" . }} + name: {{ include "tesor.fullname" . }} labels: - {{- include "recluse.labels" . | nindent 4 }} + {{- include "tesor.labels" . | nindent 4 }} spec: selector: - {{- include "recluse.selectorLabels" . | nindent 4 }} + {{- include "tesor.selectorLabels" . | nindent 4 }} ports: - name: http port: {{ .Values.service.port }} diff --git a/charts/recluse/values.yaml b/charts/tesor/values.yaml index d6762d8..a88ae89 100644 --- a/charts/recluse/values.yaml +++ b/charts/tesor/values.yaml @@ -4,7 +4,7 @@ replicaCount: 1 image: - repository: ghcr.io/dimidiumlabs/recluse + repository: ghcr.io/dimidiumlabs/tesor tag: "" digest: "" pullPolicy: IfNotPresent @@ -36,7 +36,7 @@ service: config: existingConfigMap: "" - appname: recluse + appname: tesor hostnames: [] server: shutdownTimeout: 60 diff --git a/crates/repos/src/go.rs b/crates/repos/src/go.rs index eb1a928..8b08f78 100644 --- a/crates/repos/src/go.rs +++ b/crates/repos/src/go.rs @@ -487,10 +487,10 @@ mod tests_go_filename { upstream: Url::parse("https://dl.google.com/go/").unwrap(), ..Default::default() }; - let url = t.upstream_url(&config, "recluse:test").unwrap(); + let url = t.upstream_url(&config, "tesor:test").unwrap(); assert_eq!( url.as_str(), - "https://dl.google.com/go/go1.25.6.linux-amd64.tar.gz?source=recluse%3Atest" + "https://dl.google.com/go/go1.25.6.linux-amd64.tar.gz?source=tesor%3Atest" ); } diff --git a/crates/recluse/Cargo.toml b/crates/tesor/Cargo.toml index c8e90db..908295d 100644 --- a/crates/recluse/Cargo.toml +++ b/crates/tesor/Cargo.toml @@ -2,8 +2,8 @@ # SPDX-License-Identifier: AGPL-3.0-or-later [package] -name = "recluse" -description = "recluse web-server and daemon" +name = "tesor" +description = "tesor web-server and daemon" version.workspace = true authors.workspace = true diff --git a/crates/recluse/build.rs b/crates/tesor/build.rs index 0f4e2d3..0f4e2d3 100644 --- a/crates/recluse/build.rs +++ b/crates/tesor/build.rs diff --git a/crates/recluse/src/assets/apple-touch-icon.png b/crates/tesor/src/assets/apple-touch-icon.png index 0f6bb61..0f6bb61 100644 --- a/crates/recluse/src/assets/apple-touch-icon.png +++ b/crates/tesor/src/assets/apple-touch-icon.png Binary files differ diff --git a/crates/recluse/src/assets/base.css b/crates/tesor/src/assets/base.css index 66503e7..66503e7 100644 --- a/crates/recluse/src/assets/base.css +++ b/crates/tesor/src/assets/base.css diff --git a/crates/recluse/src/assets/favicon-192.png b/crates/tesor/src/assets/favicon-192.png index 0f6bb61..0f6bb61 100644 --- a/crates/recluse/src/assets/favicon-192.png +++ b/crates/tesor/src/assets/favicon-192.png Binary files differ diff --git a/crates/recluse/src/assets/favicon-512.png b/crates/tesor/src/assets/favicon-512.png index 49cd3cd..49cd3cd 100644 --- a/crates/recluse/src/assets/favicon-512.png +++ b/crates/tesor/src/assets/favicon-512.png Binary files differ diff --git a/crates/recluse/src/assets/favicon.ico b/crates/tesor/src/assets/favicon.ico index 093e50b..093e50b 100644 --- a/crates/recluse/src/assets/favicon.ico +++ b/crates/tesor/src/assets/favicon.ico Binary files differ diff --git a/crates/recluse/src/assets/favicon.svg b/crates/tesor/src/assets/favicon.svg index ed7cc17..ed7cc17 100644 --- a/crates/recluse/src/assets/favicon.svg +++ b/crates/tesor/src/assets/favicon.svg diff --git a/crates/recluse/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2 b/crates/tesor/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2 index 98adc80..98adc80 100644 --- a/crates/recluse/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2 +++ b/crates/tesor/src/assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2 Binary files differ diff --git a/crates/recluse/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2 b/crates/tesor/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2 index 4cd1413..4cd1413 100644 --- a/crates/recluse/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2 +++ b/crates/tesor/src/assets/jetbrainsmono/JetBrainsMono[wght].woff2 Binary files differ diff --git a/crates/recluse/src/assets/manifest.webmanifest b/crates/tesor/src/assets/manifest.webmanifest index 2277253..6d7fa0a 100644 --- a/crates/recluse/src/assets/manifest.webmanifest +++ b/crates/tesor/src/assets/manifest.webmanifest @@ -1,5 +1,5 @@ { - "name": "recluse", + "name": "tesor", "icons": [ { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" }, { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }, diff --git a/crates/recluse/src/assets/robots.txt b/crates/tesor/src/assets/robots.txt index 2fe8da2..2fe8da2 100644 --- a/crates/recluse/src/assets/robots.txt +++ b/crates/tesor/src/assets/robots.txt diff --git a/crates/recluse/src/config.rs b/crates/tesor/src/config.rs index b729729..e9e148a 100644 --- a/crates/recluse/src/config.rs +++ b/crates/tesor/src/config.rs @@ -240,8 +240,8 @@ pub struct ConfigService { impl Default for ConfigService { fn default() -> Self { Self { - appname: "recluse".to_string(), - dirname: PathBuf::from("./.recluse-state"), + appname: "tesor".to_string(), + dirname: PathBuf::from("./.tesor-state"), listen: vec![ListenerConfig::default()], server: ServerConfig::default(), telemetry: TelemetryConfig::default(), @@ -410,13 +410,13 @@ mod tests { #[test] fn test_load_none_defaults() { let temp = TempDir::new().unwrap(); - let state = temp.path().join(".recluse-state"); + let state = temp.path().join(".tesor-state"); std::fs::create_dir_all(&state).unwrap(); let cwd = std::env::current_dir().unwrap(); std::env::set_current_dir(temp.path()).unwrap(); let cfg = ConfigService::load(None).unwrap(); - assert_eq!(cfg.appname(), "recluse"); + assert_eq!(cfg.appname(), "tesor"); std::env::set_current_dir(cwd).unwrap(); } diff --git a/crates/recluse/src/controller_backend.rs b/crates/tesor/src/controller_backend.rs index f97caa1..f97caa1 100644 --- a/crates/recluse/src/controller_backend.rs +++ b/crates/tesor/src/controller_backend.rs diff --git a/crates/recluse/src/controller_web.rs b/crates/tesor/src/controller_web.rs index fef09ee..125295e 100644 --- a/crates/recluse/src/controller_web.rs +++ b/crates/tesor/src/controller_web.rs @@ -167,9 +167,9 @@ impl WebController { }; WebController::layout( - "Recluse — tiny & opinionated packages mirror", + "Tesor — tiny & opinionated packages mirror", html! { - h1 { "Recluse — tiny & opinionated packages mirror." } + h1 { "Tesor — tiny & opinionated packages mirror." } p { r#"This site provides a caching proxy for downloading Zig and Go installation files. @@ -177,8 +177,8 @@ impl WebController { } p { - "Recluse is open source software licensed under " a href="https://www.gnu.org/licenses/agpl-3.0.html" { "AGPL-3.0" } ". " - "Source code is available on " a href="https://github.com/dimidiumlabs/recluse" { "GitHub" } ". " + "Tesor is open source software licensed under " a href="https://www.gnu.org/licenses/agpl-3.0.html" { "AGPL-3.0" } ". " + "Source code is available on " a href="https://git.dimidiumlabs.io/tesor" { "Dimidium Labs Git" } ". " "A list of dependency licenses " a href="/about/licenses" { "is available" } "." } @@ -323,19 +323,19 @@ impl WebController { html! { h1 { "Licenses" } - h2 { "Recluse" } + h2 { "Tesor" } p { - "Recluse is licensed under the " b { "GNU Affero General Public License v3.0 (AGPL-3.0)" } ". " + "Tesor is licensed under the " b { "GNU Affero General Public License v3.0 (AGPL-3.0)" } ". " "This means you are free to use, modify, and distribute the software. " - "If you run a modified version of Recluse as a network service, " + "If you run a modified version of Tesor as a network service, " "you must make the source code of your modifications available to its users. " "The software is provided as-is, without warranty of any kind." } p { "Source code is available on " - a href="https://github.com/dimidiumlabs/recluse" { "GitHub" } + a href="https://git.dimidiumlabs.io/tesor" { "Dimidium Labs Git" } ". The full license text is included below." } diff --git a/crates/recluse/src/main.rs b/crates/tesor/src/main.rs index a42eaee..1029eca 100644 --- a/crates/recluse/src/main.rs +++ b/crates/tesor/src/main.rs @@ -82,7 +82,7 @@ async fn run_index_refresh<S: BackendSpec>( const VERSION: &str = env!("CARGO_PKG_VERSION"); const HELP: &str = "\ -Usage: recluse [--config=<path>] +Usage: tesor [--config=<path>] Options: --config=<path> Path to config file (optional) @@ -134,7 +134,7 @@ async fn main() { return; } if arg == "--version" || arg == "-V" { - println!("recluse {VERSION}"); + println!("tesor {VERSION}"); return; } if let Some(path) = arg.strip_prefix("--config=") { @@ -155,7 +155,7 @@ async fn main() { let storage = Arc::new(storage::StorageService::new(config.clone()).await.unwrap()); let network = Arc::new(proxy::ProxyService::new()); - let source = format!("recluse:{}", config.appname()); + let source = format!("tesor:{}", config.appname()); let backends = config.backends(); const REQUEST_ID_HEADER: http::HeaderName = http::HeaderName::from_static("x-request-id"); @@ -331,7 +331,7 @@ async fn main() { )) .layer(tower_http::set_header::SetResponseHeaderLayer::overriding( http::header::SERVER, - http::HeaderValue::from_static(concat!("recluse/", env!("CARGO_PKG_VERSION"))), + http::HeaderValue::from_static(concat!("tesor/", env!("CARGO_PKG_VERSION"))), )); let mut tasks = tokio::task::JoinSet::new(); diff --git a/crates/recluse/src/proxy.rs b/crates/tesor/src/proxy.rs index 16a322b..5e98d23 100644 --- a/crates/recluse/src/proxy.rs +++ b/crates/tesor/src/proxy.rs @@ -40,7 +40,7 @@ impl ProxyService { let request = Request::builder() .method(http::Method::GET) .uri(request.url.as_str()) - .header(http::header::USER_AGENT, "recluse/0.1") + .header(http::header::USER_AGENT, "tesor/0.1") .body(Empty::<Bytes>::new()) .unwrap(); diff --git a/crates/recluse/src/storage.rs b/crates/tesor/src/storage.rs index bc751a7..bc751a7 100644 --- a/crates/recluse/src/storage.rs +++ b/crates/tesor/src/storage.rs diff --git a/crates/recluse/src/telemetry.rs b/crates/tesor/src/telemetry.rs index df39fa0..9036924 100644 --- a/crates/recluse/src/telemetry.rs +++ b/crates/tesor/src/telemetry.rs @@ -102,9 +102,9 @@ impl Drop for TelemetryService { } impl TelemetryService { pub fn init(config: &TelemetryConfig, service_name: &str, service_version: &str) -> Self { - let env_filter = match std::env::var_os("RECLUSE_LOG") { + let env_filter = match std::env::var_os("TESOR_LOG") { Some(val) => tracing_subscriber::EnvFilter::try_new(val.to_string_lossy()) - .expect("Invalid RECLUSE_LOG"), + .expect("Invalid TESOR_LOG"), None => tracing_subscriber::EnvFilter::new(Self::log_level_to_filter( config.stdout.log_level, )), diff --git a/deny.toml b/deny.toml index b0b87c8..3cd37da 100644 --- a/deny.toml +++ b/deny.toml @@ -25,7 +25,7 @@ exceptions = [ { crate = "base", allow = ["AGPL-3.0-or-later"] }, { crate = "repos", allow = ["AGPL-3.0-or-later"] }, { crate = "smoke", allow = ["AGPL-3.0-or-later"] }, - { crate = "recluse", allow = ["AGPL-3.0-or-later"] }, + { crate = "tesor", allow = ["AGPL-3.0-or-later"] }, ] unused-allowed-license = "allow" diff --git a/mise.toml b/mise.toml index 20e8d95..142594c 100644 --- a/mise.toml +++ b/mise.toml @@ -36,7 +36,7 @@ shellcheck = "0.11.0" [task_config] dir = "{{cwd}}" includes = [ - "git::https://github.com/dimidiumlabs/platform.git//tasks?ref=159ce265b95d655342c378d9aaa7dc14dbf1dfa4", + "git::https://git.dimidiumlabs.io/platform.git//tasks?ref=159ce265b95d655342c378d9aaa7dc14dbf1dfa4", ] [tasks.fmt] diff --git a/nfpm.yaml b/nfpm.yaml index c53abb5..5704fcb 100644 --- a/nfpm.yaml +++ b/nfpm.yaml @@ -4,7 +4,7 @@ # yaml-language-server: $schema=https://nfpm.goreleaser.com/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj -name: recluse +name: tesor arch: ${ARCH} version: ${VERSION} license: AGPL-3.0-or-later @@ -14,34 +14,34 @@ description: Tiny packages caching proxy contents: - src: ./LICENSE - dst: /usr/share/doc/recluse/LICENSE + dst: /usr/share/doc/tesor/LICENSE - src: ./README.md - dst: /usr/share/doc/recluse/README.md + dst: /usr/share/doc/tesor/README.md - - src: target/release/recluse - dst: /usr/local/bin/recluse + - src: target/release/tesor + dst: /usr/local/bin/tesor file_info: mode: 0755 - - src: pkg/recluse.toml - dst: /etc/recluse.toml + - src: pkg/tesor.toml + dst: /etc/tesor.toml type: config|noreplace file_info: mode: 0640 owner: root - group: recluse + group: tesor - - src: pkg/recluse.service - dst: /usr/lib/systemd/system/recluse.service + - src: pkg/tesor.service + dst: /usr/lib/systemd/system/tesor.service file_info: mode: 0644 - - dst: /var/lib/recluse + - dst: /var/lib/tesor type: dir file_info: mode: 0755 owner: root - group: recluse + group: tesor scripts: diff --git a/pkg/scripts/postinstall.sh b/pkg/scripts/postinstall.sh index 204f44a..6e391fc 100644 --- a/pkg/scripts/postinstall.sh +++ b/pkg/scripts/postinstall.sh @@ -4,7 +4,7 @@ set -e -if [ -x "/bin/systemctl" ] && [ -d /run/systemd/system ] && [ -f /usr/lib/systemd/system/recluse.service ]; then +if [ -x "/bin/systemctl" ] && [ -d /run/systemd/system ] && [ -f /usr/lib/systemd/system/tesor.service ]; then /bin/systemctl daemon-reload - /bin/systemctl enable recluse + /bin/systemctl enable tesor fi diff --git a/pkg/scripts/preinstall.sh b/pkg/scripts/preinstall.sh index 3330200..175eaf1 100644 --- a/pkg/scripts/preinstall.sh +++ b/pkg/scripts/preinstall.sh @@ -4,13 +4,13 @@ set -e -RECLUSE_USER=${RECLUSE_USER:-recluse} -RECLUSE_GROUP=${RECLUSE_GROUP:-${RECLUSE_USER}} +TESOR_USER=${TESOR_USER:-tesor} +TESOR_GROUP=${TESOR_GROUP:-${TESOR_USER}} -if ! getent group "$RECLUSE_GROUP" >/dev/null; then - groupadd --system "$RECLUSE_GROUP" +if ! getent group "$TESOR_GROUP" >/dev/null; then + groupadd --system "$TESOR_GROUP" fi -if ! getent passwd "$RECLUSE_USER" >/dev/null; then - useradd --system --gid "$RECLUSE_GROUP" --no-create-home --shell /usr/sbin/nologin "$RECLUSE_USER" +if ! getent passwd "$TESOR_USER" >/dev/null; then + useradd --system --gid "$TESOR_GROUP" --no-create-home --shell /usr/sbin/nologin "$TESOR_USER" fi diff --git a/pkg/scripts/preremove.sh b/pkg/scripts/preremove.sh index 3c16f62..9cd6599 100644 --- a/pkg/scripts/preremove.sh +++ b/pkg/scripts/preremove.sh @@ -4,7 +4,7 @@ set -e -if [ -x "/bin/systemctl" ] && [ -d /run/systemd/system ] && [ -f /usr/lib/systemd/system/recluse.service ]; then - /bin/systemctl stop recluse.service || true - /bin/systemctl disable recluse.service || true +if [ -x "/bin/systemctl" ] && [ -d /run/systemd/system ] && [ -f /usr/lib/systemd/system/tesor.service ]; then + /bin/systemctl stop tesor.service || true + /bin/systemctl disable tesor.service || true fi diff --git a/pkg/recluse.service b/pkg/tesor.service index f3ab476..c2d463d 100644 --- a/pkg/recluse.service +++ b/pkg/tesor.service @@ -2,21 +2,21 @@ # SPDX-License-Identifier: AGPL-3.0-or-later [Unit] -Description=recluse server (tiny packages caching proxy) +Description=tesor server (tiny packages caching proxy) Requires=network-online.target After=time-sync.target network-online.target remote-fs.target nss-lookup.target Wants=time-sync.target [Service] Type=notify -User=recluse -Group=recluse +User=tesor +Group=tesor Restart=always RestartSec=30 WatchdogSec=30 NotifyAccess=main -ExecPaths=/usr/local/bin/recluse /usr/lib -ExecStart=/usr/local/bin/recluse --config=/etc/recluse.toml +ExecPaths=/usr/local/bin/tesor /usr/lib +ExecStart=/usr/local/bin/tesor --config=/etc/tesor.toml LimitCORE=infinity LimitNOFILE=500000 AmbientCapabilities=CAP_NET_BIND_SERVICE diff --git a/pkg/recluse.toml b/pkg/tesor.toml index 751672b..7296086 100644 --- a/pkg/recluse.toml +++ b/pkg/tesor.toml @@ -1,13 +1,13 @@ # SPDX-FileCopyrightText: 2026 Nikolay Govorov # SPDX-License-Identifier: AGPL-3.0-or-later -# recluse will dutifully indicate its user agent and protocols (for example, source for zig). +# tesor will dutifully indicate its user agent and protocols (for example, source for zig). # Specify your name if you want your instance to be identified. -appname="recluse" +appname="tesor" # Path to the directory for storing state (indexes, caches, statistics). # Must be a writable directory. -dirname="/var/lib/recluse" +dirname="/var/lib/tesor" # Common server settings [server] @@ -25,8 +25,8 @@ addr = "0.0.0.0:2025" hostnames = ["localhost", "127.0.0.1", "::1"] # For HTTPS, set tls_cert and tls_key to PEM file paths. -# tls_crt = "/etc/recluse/cert.pem" -# tls_key = "/etc/recluse/key.pem" +# tls_crt = "/etc/tesor/cert.pem" +# tls_key = "/etc/tesor/key.pem" # Telemetry configuration # Logs to stdout (pretty or json format) @@ -47,13 +47,13 @@ log_format = "pretty" # pretty, json # log_level = "info" # # # For gRPC with TLS, specify certificates: -# # tls_ca = "/etc/recluse/otel-ca.crt" -# # tls_crt = "/etc/recluse/otel-client.crt" # for mTLS -# # tls_key = "/etc/recluse/otel-client.key" # for mTLS +# # tls_ca = "/etc/tesor/otel-ca.crt" +# # tls_crt = "/etc/tesor/otel-client.crt" # for mTLS +# # tls_key = "/etc/tesor/otel-client.key" # for mTLS # # # HTTP headers for authentication: # # [telemetry.otelcol.headers] # # Authorization = "Bearer <token>" -# Environment variable RECLUSE_LOG overrides log_level settings. -# Example: RECLUSE_LOG=debug,sqlx=warn +# Environment variable TESOR_LOG overrides log_level settings. +# Example: TESOR_LOG=debug,sqlx=warn diff --git a/tests/smoke/run-local.sh b/tests/smoke/run-local.sh index 22b5a72..4b72441 100755 --- a/tests/smoke/run-local.sh +++ b/tests/smoke/run-local.sh @@ -2,25 +2,25 @@ # SPDX-FileCopyrightText: 2026 Nikolay Govorov # SPDX-License-Identifier: AGPL-3.0-or-later -# Starts recluse in a temporary directory, runs smoke tests, cleans up. -# Expects a prebuilt binary at target/release/recluse (run `cargo build --release` first). +# Starts tesor in a temporary directory, runs smoke tests, cleans up. +# Expects a prebuilt binary at target/release/tesor (run `cargo build --release` first). # # Usage: # ./tests/smoke/run-local.sh # default port 2025 -# RECLUSE_PORT=9999 ./tests/smoke/run-local.sh +# TESOR_PORT=9999 ./tests/smoke/run-local.sh set -euo pipefail -BIN="target/release/recluse" -PORT="${RECLUSE_PORT:-2025}" +BIN="target/release/tesor" +PORT="${TESOR_PORT:-2025}" BASE_URL="http://127.0.0.1:${PORT}" TMPDIR="$(mktemp -d)" -LOGFILE="$TMPDIR/recluse.log" +LOGFILE="$TMPDIR/tesor.log" trap 'kill "$PID" 2>/dev/null; wait "$PID" 2>/dev/null; rm -rf "$TMPDIR"' EXIT # Write minimal config -cat > "$TMPDIR/recluse.toml" <<EOF +cat > "$TMPDIR/tesor.toml" <<EOF appname = "smoke" dirname = "$TMPDIR/state" @@ -44,10 +44,10 @@ EOF mkdir -p "$TMPDIR/state" -# Start recluse -echo "Starting recluse on ${BASE_URL}..." +# Start tesor +echo "Starting tesor on ${BASE_URL}..." echo "Server log: ${LOGFILE}" -"$BIN" --config="$TMPDIR/recluse.toml" >"$LOGFILE" 2>&1 & +"$BIN" --config="$TMPDIR/tesor.toml" >"$LOGFILE" 2>&1 & PID=$! # Wait for index to load (log shows "index refreshed" for each backend) @@ -58,7 +58,7 @@ for i in $(seq 1 120); do break fi if ! kill -0 "$PID" 2>/dev/null; then - echo "recluse exited unexpectedly. Server log:" + echo "tesor exited unexpectedly. Server log:" cat "$LOGFILE" exit 1 fi @@ -72,4 +72,4 @@ if ! grep -q "index refreshed" "$LOGFILE" 2>/dev/null; then fi # Run smoke tests -RECLUSE_URL="${BASE_URL}" cargo run -p smoke +TESOR_URL="${BASE_URL}" cargo run -p smoke diff --git a/tests/smoke/src/main.rs b/tests/smoke/src/main.rs index f23a233..ca109f9 100644 --- a/tests/smoke/src/main.rs +++ b/tests/smoke/src/main.rs @@ -1,13 +1,13 @@ // SPDX-FileCopyrightText: 2026 Nikolay Govorov // SPDX-License-Identifier: AGPL-3.0-or-later -// Black-box smoke tests for Recluse. +// Black-box smoke tests for Tesor. // -// Downloads archives from Recluse and upstream, compares sha256 hashes, +// Downloads archives from Tesor and upstream, compares sha256 hashes, // verifies that minisig signatures (Zig) and sha256 checksums (Go) match upstream. // // Usage: -// RECLUSE_URL=https://pkg.earth cargo run -p smoke +// TESOR_URL=https://pkg.earth cargo run -p smoke use sha2::{Digest, Sha256}; @@ -198,8 +198,8 @@ fn test_web(r: &mut Runner, base_url: &str) { r.fail(name, &format!("status {status}, expected 200")); } else if !ct.contains("text/html") { r.fail(name, &format!("content-type: {ct}")); - } else if !body.contains("Recluse") { - r.fail(name, "body missing \"Recluse\""); + } else if !body.contains("Tesor") { + r.fail(name, "body missing \"Tesor\""); } else { r.ok(name); } @@ -274,11 +274,11 @@ fn test_go(r: &mut Runner, base_url: &str) { r.fetch_bytes(&format!("{base_url}/go/{file}")), r.fetch_bytes(&format!("https://go.dev/dl/{file}")), ) { - (Ok(recluse), Ok(upstream)) => { - let zh = sha256hex(&recluse); + (Ok(tesor), Ok(upstream)) => { + let zh = sha256hex(&tesor); let uh = sha256hex(&upstream); if zh != uh { - r.fail(&name, &format!("recluse={zh} upstream={uh}")); + r.fail(&name, &format!("tesor={zh} upstream={uh}")); } else { r.ok(&name); } @@ -332,11 +332,11 @@ fn test_zig(r: &mut Runner, base_url: &str) { r.fetch_bytes(&format!("{base_url}/zig/{}", entry.file)), r.fetch_bytes(&zig_upstream_url(entry.file, entry.version)), ) { - (Ok(recluse), Ok(upstream)) => { - let zh = sha256hex(&recluse); + (Ok(tesor), Ok(upstream)) => { + let zh = sha256hex(&tesor); let uh = sha256hex(&upstream); if zh != uh { - r.fail(&name, &format!("recluse={zh} upstream={uh}")); + r.fail(&name, &format!("tesor={zh} upstream={uh}")); } else { r.ok(&name); } @@ -348,11 +348,11 @@ fn test_zig(r: &mut Runner, base_url: &str) { // Signature: compare .minisig with upstream { let name = format!("zig: {}.minisig matches upstream", entry.file); - let recluse_url = format!("{base_url}/zig/{}.minisig", entry.file); + let tesor_url = format!("{base_url}/zig/{}.minisig", entry.file); let upstream_url = format!("{}.minisig", zig_upstream_url(entry.file, entry.version)); - match (r.fetch_bytes(&recluse_url), r.fetch_bytes(&upstream_url)) { - (Ok(recluse), Ok(upstream)) => { - if recluse != upstream { + match (r.fetch_bytes(&tesor_url), r.fetch_bytes(&upstream_url)) { + (Ok(tesor), Ok(upstream)) => { + if tesor != upstream { r.fail(&name, "minisig content differs from upstream"); } else { r.ok(&name); @@ -374,11 +374,11 @@ fn test_zig(r: &mut Runner, base_url: &str) { } fn main() { - let base_url = match std::env::var("RECLUSE_URL") { + let base_url = match std::env::var("TESOR_URL") { Ok(url) => url, Err(_) => { - eprintln!("Error: RECLUSE_URL environment variable is not set."); - eprintln!("Usage: RECLUSE_URL=https://pkg.earth cargo run -p smoke"); + eprintln!("Error: TESOR_URL environment variable is not set."); + eprintln!("Usage: TESOR_URL=https://pkg.earth cargo run -p smoke"); std::process::exit(1); } }; |
