From 4af6738654b508f33825c2b33886225cad45cea2 Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 10:39:54 +1000 Subject: [PATCH 1/8] ci: authenticate Forgejo git dependencies after transfer --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67d7e53..cc541d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,11 @@ jobs: prefix-key: v1-librtbit - name: Configure git for private deps - run: git config --global --replace-all url."https://x-access-token:${{ secrets.GHCR_TOKEN }}@github.com/".insteadOf "https://github.com/" + env: + GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} + run: | + git config --global --replace-all url."https://x-access-token:${GHCR_TOKEN}@github.com/".insteadOf "https://github.com/" + git config --global --replace-all url."http://git:${GHCR_TOKEN}@100.92.54.45:3002/".insteadOf "http://100.92.54.45:3002/" - name: Format check run: cargo fmt --all -- --check From f1329272099bde4df7750fdffad0556c4d9f1d1c Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 11:02:48 +1000 Subject: [PATCH 2/8] fix: unify migrated Forgejo Cargo sources --- Cargo.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ab45487..17f6002 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -135,3 +135,33 @@ all = { level = "warn", priority = -1 } [lints.rust] unused = "warn" + +# The v0.1.0 dependency tags still reference their historical GitHub URLs. +# Map those source identities to the equivalent Forgejo tags so Cargo does not +# load duplicate copies of the same internal crates during the migration soak. +[patch."https://github.com/AusAgentSmith-org/librtbit-bencode.git"] +librtbit-bencode = { git = "http://100.92.54.45:3002/indexarr/librtbit-bencode.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-buffers.git"] +librtbit-buffers = { git = "http://100.92.54.45:3002/indexarr/librtbit-buffers.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-clone-to-owned.git"] +librtbit-clone-to-owned = { git = "http://100.92.54.45:3002/indexarr/librtbit-clone-to-owned.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-core.git"] +librtbit-core = { git = "http://100.92.54.45:3002/indexarr/librtbit-core.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-sha1-wrapper.git"] +librtbit-sha1-wrapper = { git = "http://100.92.54.45:3002/indexarr/librtbit-sha1-wrapper.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-upnp.git"] +librtbit-upnp = { git = "http://100.92.54.45:3002/indexarr/librtbit-upnp.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-dht.git"] +librtbit-dht = { git = "http://100.92.54.45:3002/indexarr/librtbit-dht.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-lsd.git"] +librtbit-lsd = { git = "http://100.92.54.45:3002/indexarr/librtbit-lsd.git", tag = "v0.1.0" } + +[patch."https://github.com/AusAgentSmith-org/librtbit-peer-protocol.git"] +librtbit-peer-protocol = { git = "http://100.92.54.45:3002/indexarr/librtbit-peer-protocol.git", tag = "v0.1.0" } From 7b2bb9f04464d4961cd4b95ffcaae9e4e1c941de Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 11:03:46 +1000 Subject: [PATCH 3/8] fix: unify migrated Forgejo Cargo sources --- Cargo.lock | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a2c10b..d43e466 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1222,6 +1222,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1245,6 +1248,15 @@ dependencies = [ "foldhash 0.2.0", ] +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "hashlink" version = "0.10.0" @@ -1886,7 +1898,7 @@ dependencies = [ [[package]] name = "librtbit-bencode" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-bencode.git?tag=v0.1.0#86a794304eeb44f008650914700f70f59d0a5b7e" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-bencode.git?tag=v0.1.0#106ebdb7abf7d34a14971135b78a45dd6f5ff35b" dependencies = [ "anyhow", "arrayvec", @@ -1902,7 +1914,7 @@ dependencies = [ [[package]] name = "librtbit-buffers" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-buffers.git?tag=v0.1.0#3385f67c4dad792020603542eeb11853a5a60fc7" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-buffers.git?tag=v0.1.0#9ccc901158813a4d83b1a4effa7be2e25fdd66e3" dependencies = [ "bytes", "librtbit-clone-to-owned", @@ -1913,7 +1925,7 @@ dependencies = [ [[package]] name = "librtbit-clone-to-owned" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-clone-to-owned.git?tag=v0.1.0#205d2c1b13a18bd4c50856a0e2fece02e61716b4" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-clone-to-owned.git?tag=v0.1.0#bbb6b5888b1904f8b8e384a867a78fea6536aeb2" dependencies = [ "bytes", ] @@ -1921,7 +1933,7 @@ dependencies = [ [[package]] name = "librtbit-core" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-core.git?tag=v0.1.0#1611b846d41302fcce365e3356d425f188269115" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-core.git?tag=v0.1.0#f15cc24ba7ec350acc242eb4a9f31fdc4a139995" dependencies = [ "anyhow", "bytes", @@ -1950,7 +1962,7 @@ dependencies = [ [[package]] name = "librtbit-dht" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-dht.git?tag=v0.1.0#f725050c5df0aff1dfa3d5b0ae43574b8df8c40f" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-dht.git?tag=v0.1.0#65c721807b30f57a63e2c19269b66994c44d8543" dependencies = [ "anyhow", "aws-lc-rs", @@ -1982,7 +1994,7 @@ dependencies = [ [[package]] name = "librtbit-lsd" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-lsd.git?tag=v0.1.0#50243e3ddd9d2dd618c6188ff02b01e8e228e05c" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-lsd.git?tag=v0.1.0#8f10cdd71312c603cffeb4ddc1dbb08179f86f64" dependencies = [ "anyhow", "atoi", @@ -2002,7 +2014,7 @@ dependencies = [ [[package]] name = "librtbit-peer-protocol" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-peer-protocol.git?tag=v0.1.0#fed2f98c3e58e6ab9bf2fc5daf5123fe326b7ad0" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-peer-protocol.git?tag=v0.1.0#2dbd0758fbaa81b2e1a5b0e2b25dc7e80547d923" dependencies = [ "anyhow", "bitvec", @@ -2022,7 +2034,7 @@ dependencies = [ [[package]] name = "librtbit-sha1-wrapper" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-sha1-wrapper.git?tag=v0.1.0#15403f2292d878d159c1b52747a52667845133db" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-sha1-wrapper.git?tag=v0.1.0#f030485b97160eb2db76534d024ab6dcd89d1f6b" dependencies = [ "assert_cfg", "aws-lc-rs", @@ -2032,7 +2044,7 @@ dependencies = [ [[package]] name = "librtbit-tracker-comms" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-tracker-comms.git?tag=v0.1.0#8b51a1c0dd097ac7113789e02a6a8a9e176d7200" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-tracker-comms.git?tag=v0.1.0#ec8e7ad3a911525e092bd8505345ab07a123bc2d" dependencies = [ "anyhow", "async-stream", @@ -2060,7 +2072,7 @@ dependencies = [ [[package]] name = "librtbit-upnp" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-upnp.git?tag=v0.1.0#2d4b42ec198c3cfeef30c11cf53e72a1d0fec10f" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-upnp.git?tag=v0.1.0#ccf29291608e8ea60d892ebff0b7dbf89669e27a" dependencies = [ "anyhow", "bstr", @@ -2081,7 +2093,7 @@ dependencies = [ [[package]] name = "librtbit-upnp-serve" version = "0.1.0" -source = "git+https://github.com/AusAgentSmith-org/librtbit-upnp-serve.git?tag=v0.1.0#f64ee88b8e4eb7288ade3eb814415cdcf528db98" +source = "git+http://100.92.54.45:3002/indexarr/librtbit-upnp-serve.git?tag=v0.1.0#8c8eb015b1fb1186504afc3673a0708fd72b3bed" dependencies = [ "anyhow", "axum", @@ -2110,9 +2122,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.32.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb8270bb4060bd76c6e96f20c52d80620f1d82a3470885694e41e0f81ef6fe7" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -3069,14 +3081,14 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.34.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e34486da88d8e051c7c0e23c3f15fd806ea8546260aa2fec247e97242ec143" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ "bitflags 2.11.0", "fallible-iterator", "fallible-streaming-iterator", - "hashlink", + "hashlink 0.9.1", "libsqlite3-sys", "smallvec", ] @@ -3512,7 +3524,7 @@ dependencies = [ "futures-io", "futures-util", "hashbrown 0.15.5", - "hashlink", + "hashlink 0.10.0", "indexmap 2.13.1", "log", "memchr", From a0494d5416e099e2d621f107a233cad39955d6d4 Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 01:08:54 +0000 Subject: [PATCH 4/8] Fix clippy warnings on transfer compatibility branch --- src/http_api_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/http_api_client.rs b/src/http_api_client.rs index 982d6d3..4b3a71e 100644 --- a/src/http_api_client.rs +++ b/src/http_api_client.rs @@ -69,7 +69,7 @@ impl HttpApiClient { } pub fn base_url(&self) -> &reqwest::Url { - &self.base_url + self.base_url } #[inline(never)] @@ -80,7 +80,7 @@ impl HttpApiClient { if root.server == "rtbit" { return Ok(()); } - anyhow::bail!("not an rtbit server at {}", &self.base_url) + anyhow::bail!("not an rtbit server at {}", self.base_url) } .boxed() } @@ -103,7 +103,7 @@ impl HttpApiClient { ..Default::default() }; let qs = serde_urlencoded::to_string(¶ms).unwrap(); - let url = format!("{}torrents?{}", &self.base_url, qs); + let url = format!("{}torrents?{}", self.base_url, qs); let response = check_response( self.client .post(&url) From 348a0ff0d926d1badb938dbfab987092104da2b4 Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 01:09:01 +0000 Subject: [PATCH 5/8] Fix clippy warnings on transfer compatibility branch --- src/storage/filesystem/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/filesystem/fs.rs b/src/storage/filesystem/fs.rs index a4f9e0d..3031cec 100644 --- a/src/storage/filesystem/fs.rs +++ b/src/storage/filesystem/fs.rs @@ -158,7 +158,7 @@ impl TorrentStorage for FilesystemStorage { .with_context(|| { format!( "error creating a new file (because allow_overwrite = false) {:?}", - &full_path + full_path ) })?; OpenOptions::new().read(true).write(true).open(&full_path)? From 31402c42e1b8863b46ce937fc48f06ee27fab216 Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 01:09:10 +0000 Subject: [PATCH 6/8] Fix clippy warnings on transfer compatibility branch --- src/torrent_state/live/peer_handler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/torrent_state/live/peer_handler.rs b/src/torrent_state/live/peer_handler.rs index 423f3f8..9f3b325 100644 --- a/src/torrent_state/live/peer_handler.rs +++ b/src/torrent_state/live/peer_handler.rs @@ -538,7 +538,7 @@ impl PeerHandler { { anyhow::bail!( "got request for a chunk that is not ready to upload. chunk {:?}", - &chunk_info + chunk_info ); } @@ -831,8 +831,8 @@ impl PeerHandler { if !h.inflight_requests.remove(&chunk_info) { anyhow::bail!( "peer sent us a piece we did not ask. Requested pieces: {:?}. Got: {:?}", - &h.inflight_requests, - &piece, + h.inflight_requests, + piece, ); } Ok(()) From 3045ad775b027b6664d26184dd892c79682bc21e Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 01:15:52 +0000 Subject: [PATCH 7/8] Restore base URL borrow after clippy cleanup --- src/http_api_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_api_client.rs b/src/http_api_client.rs index 4b3a71e..a40fe20 100644 --- a/src/http_api_client.rs +++ b/src/http_api_client.rs @@ -69,7 +69,7 @@ impl HttpApiClient { } pub fn base_url(&self) -> &reqwest::Url { - self.base_url + &self.base_url } #[inline(never)] From 7daf9049429c2615901f59455fc24637a63a2dba Mon Sep 17 00:00:00 2001 From: thedancingdeveloper Date: Wed, 22 Jul 2026 01:18:11 +0000 Subject: [PATCH 8/8] Fix remaining clippy redundant borrow --- src/torrent_state/live/peer_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torrent_state/live/peer_handler.rs b/src/torrent_state/live/peer_handler.rs index 9f3b325..e410f9c 100644 --- a/src/torrent_state/live/peer_handler.rs +++ b/src/torrent_state/live/peer_handler.rs @@ -813,7 +813,7 @@ impl PeerHandler { ) { Some(i) => i, None => { - anyhow::bail!("peer sent us an invalid piece {:?}", &piece,); + anyhow::bail!("peer sent us an invalid piece {:?}", piece,); } };