Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[registries.forgejo]
index = "sparse+https://repo.indexarr.net/api/packages/indexarr/cargo/"
credential-provider = "cargo:token"

[registry]
default = "forgejo"
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,9 @@ jobs:
rust:
runs-on: [self-hosted, node-b, linux, x64]
env:
FORGEJO_CARGO_TOKEN: ${{ secrets.FORGEJO_CARGO_TOKEN }}
CARGO_BUILD_JOBS: 1
steps:
- uses: actions/checkout@v7
- name: Configure Cargo credentials
shell: bash
run: |
export CARGO_HOME="$RUNNER_TEMP/cargo-home"
mkdir -p "$CARGO_HOME"
printf '[registries.forgejo]\ntoken = "Bearer %s"\n' "$FORGEJO_CARGO_TOKEN" > "$CARGO_HOME/credentials.toml"
chmod 600 "$CARGO_HOME/credentials.toml"
test -n "$FORGEJO_CARGO_TOKEN"
echo "CARGO_HOME=$CARGO_HOME" >> "$GITHUB_ENV"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.97
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ jobs:
tags: ${{ steps.tags.outputs.tags }}
cache-from: ''
cache-to: ''
secrets: |
git_auth_token=${{ secrets.FORGEJO_CARGO_TOKEN }}
- name: Verify anonymous destination manifest
shell: bash
run: |
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ indexarr-xmpp XMPP/MUC peer discovery (XEP-0045 join, XEP-0077 register),

## Production deployments

All managed via Komodo (`indexarr/ops`). Image is `ghcr.io/ausagentsmith-org/indexarr-rs:<sha>`; Komodo pulls via the `AusAgentSmith` GHCR registry account.
All managed via Komodo (`indexarr/ops`). Image is `ghcr.io/thedancingdeveloper-org/indexarr-rs:<sha>`; the historical Forgejo image remains only as a rollback artifact during migration soak.

| Stack | Periphery | URL | Workers | Purpose |
|-------|-----------|-----|---------|---------|
Expand Down Expand Up @@ -94,17 +94,17 @@ All prefixed with `INDEXARR_`. See `crates/indexarr-core/src/config.rs` for the

## CI / release

Woodpecker (`ci.indexarr.net`)pipeline at `.woodpecker.yml`.
GitHub Actionsworkflows under `.github/workflows/`.

| Trigger | Steps that fire |
|---------|-----------------|
| `push: main` | fmt, check, test, clippy, build-and-push (GHCR `latest` + `<sha>`), komodo-deploy → Node B |
| `tag` | the above PLUS build-ui, build-linux, build-windows, NSIS installer, github-release, discord-release (changelog webhook) |
| `pull_request` | fmt, check, test, clippy |
| `push: main` | Rust/UI CI, migration policy, and immutable GHCR container publication |
| `tag` | Rust/UI CI, migration policy, multi-arch GHCR publication, and GitHub release workflow |
| `pull_request` | Rust/UI CI and migration policy |

Linux/Windows binary builds are tag-only — saves ~10 min per main push.

`gh_release_token` org secret has `read:packages` so Komodo pulls private GHCR images.
The canonical GHCR package is public and Komodo pins immutable SHA tags.

## Tests

Expand Down
26 changes: 9 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ windows-service = "0.8"
version = "0.3.2"
edition = "2024"
license = "AGPL-3.0-only"
repository = "https://github.com/AusAgentSmith-org/indexarr-rs"
repository = "https://github.com/TheDancingDeveloper-org/indexarr-rs"

[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ ARG TARGETARCH

WORKDIR /build

RUN printf '[registries.forgejo]\nindex = "sparse+https://repo.indexarr.net/api/packages/indexarr/cargo/"\ncredential-provider = "cargo:token"\n\n[registry]\ndefault = "forgejo"\n' > $CARGO_HOME/config.toml

# Install the aarch64 cross-compilation toolchain when targeting arm64
RUN if [ "$TARGETARCH" = "arm64" ]; then \
apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -34,10 +32,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
# Cache dependencies by building a dummy project first
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
RUN --mount=type=secret,id=git_auth_token \
printf '[registries.forgejo]\ntoken = "Bearer %s"\n' "$(cat /run/secrets/git_auth_token)" > $CARGO_HOME/credentials.toml && \
trap 'rm -f "$CARGO_HOME/credentials.toml"' EXIT && \
mkdir -p src && echo 'fn main() {}' > src/main.rs && \
RUN mkdir -p src && echo 'fn main() {}' > src/main.rs && \
if [ "$TARGETARCH" = "arm64" ]; then \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
cargo build --release --target aarch64-unknown-linux-gnu --features vendored-ssl 2>/dev/null || true; \
Expand All @@ -47,10 +42,7 @@ RUN --mount=type=secret,id=git_auth_token \

# Build the real binary
COPY src/ src/
RUN --mount=type=secret,id=git_auth_token \
printf '[registries.forgejo]\ntoken = "Bearer %s"\n' "$(cat /run/secrets/git_auth_token)" > $CARGO_HOME/credentials.toml && \
trap 'rm -f "$CARGO_HOME/credentials.toml"' EXIT && \
touch src/main.rs && \
RUN touch src/main.rs && \
if [ "$TARGETARCH" = "arm64" ]; then \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
cargo build --release --target aarch64-unknown-linux-gnu --features vendored-ssl && \
Expand Down
4 changes: 2 additions & 2 deletions crates/indexarr-announcer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ url.workspace = true

# UDP tracker scrape (BEP 15) — same lib the resolver uses for peer discovery,
# pulled here so we can announce-with-counts against UDP-only trackers.
tracker_comms = { version = "0.1.6", package = "librtbit-tracker-comms", registry = "forgejo" }
librtbit-core = { version = "0.1.5", default-features = false, registry = "forgejo" }
tracker_comms = { git = "https://github.com/TheDancingDeveloper-org/librtbit-tracker-comms.git", package = "librtbit-tracker-comms" }
librtbit-core = { git = "https://github.com/TheDancingDeveloper-org/librtbit-core.git", default-features = false }
anyhow.workspace = true
2 changes: 1 addition & 1 deletion crates/indexarr-bep28/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true
[dependencies]
# Aliased to `bencode` to match the librtbit family's import style; eases
# upstreaming this code into librtbit-peer-protocol later.
bencode = { version = "0.1.5", package = "librtbit-bencode", registry = "forgejo" }
bencode = { git = "https://github.com/TheDancingDeveloper-org/librtbit-bencode.git", package = "librtbit-bencode" }

serde = { workspace = true }
thiserror = { workspace = true }
Expand Down
16 changes: 8 additions & 8 deletions crates/indexarr-bep51/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ description = "BEP 51 (DHT Infohash Indexing) message types and codec, staging g
workspace = true

[dependencies]
# Pulled from the Forgejo cargo registry and sourced uniformly across the
# indexarr-rs workspace — the workspace consumes
# librtbit-peer-protocol from Forgejo and cargo treats the same crate from two
# sources as two distinct crates, so all librtbit-* deps must agree on source).
# Aliased to `bencode` to match the rest of the librtbit family's import style;
# eases upstreaming this code into librtbit-dht later.
bencode = { version = "0.1.5", package = "librtbit-bencode", registry = "forgejo" }
librtbit-core = { version = "0.1.5", default-features = false, registry = "forgejo" }
# Pulled from GitHub and sourced uniformly across the indexarr-rs workspace —
# the workspace consumes librtbit-peer-protocol from GitHub and cargo treats
# the same crate from two sources as two distinct crates, so all librtbit-*
# deps must agree on source. Aliased to `bencode` to match the rest of the
# librtbit family's import style; eases upstreaming this code into
# librtbit-dht later.
bencode = { git = "https://github.com/TheDancingDeveloper-org/librtbit-bencode.git", package = "librtbit-bencode" }
librtbit-core = { git = "https://github.com/TheDancingDeveloper-org/librtbit-core.git", default-features = false }

serde = { workspace = true }
thiserror = { workspace = true }
Expand Down
16 changes: 8 additions & 8 deletions crates/indexarr-dht/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ indexarr-bep51 = { path = "../indexarr-bep51" }
indexarr-parser = { path = "../indexarr-parser" }
indexarr-classifier = { path = "../indexarr-classifier" }

# DHT library (re-exports Id20 from librtbit-core). Sourced from the Forgejo
# cargo registry to keep all librtbit-* deps unified across the workspace
# (resolver-v2 needs librtbit-peer-protocol which is Forgejo-only; the same
# crate from a second registry would be treated as distinct by cargo).
dht = { version = "0.1.4", package = "librtbit-dht", registry = "forgejo" }
librtbit-core = { version = "0.1.5", default-features = false, registry = "forgejo" }
bencode = { version = "0.1.5", package = "librtbit-bencode", registry = "forgejo" }
tracker_comms = { version = "0.1.6", package = "librtbit-tracker-comms", registry = "forgejo" }
# DHT library (re-exports Id20 from librtbit-core). Sourced from GitHub to
# keep all librtbit-* deps unified across the workspace (resolver-v2 needs
# librtbit-peer-protocol which is GitHub-only; the same crate from a second
# source would be treated as distinct by cargo).
dht = { git = "https://github.com/TheDancingDeveloper-org/librtbit-dht.git", package = "librtbit-dht" }
librtbit-core = { git = "https://github.com/TheDancingDeveloper-org/librtbit-core.git", default-features = false }
bencode = { git = "https://github.com/TheDancingDeveloper-org/librtbit-bencode.git", package = "librtbit-bencode" }
tracker_comms = { git = "https://github.com/TheDancingDeveloper-org/librtbit-tracker-comms.git", package = "librtbit-tracker-comms" }

# BEP 9 metadata fetcher (workspace-internal).
indexarr-resolver-v2 = { path = "../indexarr-resolver-v2" }
Expand Down
13 changes: 7 additions & 6 deletions crates/indexarr-resolver-v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ description = "BEP 9 metadata-fetch orchestrator for indexarr-rs, layered on lib
workspace = true

[dependencies]
# All librtbit-* deps must be unified on the Forgejo registry — see .cargo/config.toml
# All librtbit-* deps must be unified on the same source — see .cargo/config.toml
# and bep-uplift.md Phase A inventory. cargo treats the same crate@version sourced
# from crates.io vs Forgejo as two distinct crates, which breaks trait coherence.
peer_protocol = { version = "0.1.4", package = "librtbit-peer-protocol", registry = "forgejo" }
# from two different places (e.g. crates.io vs git) as two distinct crates, which
# breaks trait coherence.
peer_protocol = { git = "https://github.com/TheDancingDeveloper-org/librtbit-peer-protocol.git", package = "librtbit-peer-protocol" }

# BEP 28 lt_tex codec (workspace-internal, staging for upstreaming).
indexarr-bep28 = { path = "../indexarr-bep28" }
librtbit-core = { version = "0.1.5", default-features = false, registry = "forgejo" }
buffers = { version = "0.1.2", package = "librtbit-buffers", registry = "forgejo" }
bencode = { version = "0.1.5", package = "librtbit-bencode", registry = "forgejo" }
librtbit-core = { git = "https://github.com/TheDancingDeveloper-org/librtbit-core.git", default-features = false }
buffers = { git = "https://github.com/TheDancingDeveloper-org/librtbit-buffers.git", package = "librtbit-buffers" }
bencode = { git = "https://github.com/TheDancingDeveloper-org/librtbit-bencode.git", package = "librtbit-bencode" }

tokio = { workspace = true }
thiserror = { workspace = true }
Expand Down
Loading