rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood39c5172901411fb2859beeff89b61cb315ee8105
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "c21654de722a541bc926ec8a9a477f896525771f",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"title": "Fix build on FreeBSD/HardenedBSD",
"state": {
"status": "merged",
"conflicts": []
},
"before": "6ab3bfcba0577fabdcb84498441c6605391290f4",
"after": "39c5172901411fb2859beeff89b61cb315ee8105",
"commits": [
"39c5172901411fb2859beeff89b61cb315ee8105",
"cff26ff44fad987d34044c0294da0ff4b0fa69bc",
"36c10fac855f5a25627f8f9b68e86bfb4800e3a4",
"8bff6c9405eb8dee1699feb437ea29c4dfeed18d"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "c21654de722a541bc926ec8a9a477f896525771f",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"description": "I'm not entirely sure that the inode changes will work on Linux. But\nthis commit fixes the Radicle build for these applications:\n\n1. radicle-cli\n2. radicle-httpd\n3. radicle-node\n4. radicle-remote-helper\n5. radicle-tools\n\nSigned-off-by:\tShawn Webb <shawn.webb@hardenedbsd.org>",
"base": "6ab3bfcba0577fabdcb84498441c6605391290f4",
"oid": "492b50387620b17f9fc696aebaa55fdcd2fe2daa",
"timestamp": 1715131651
},
{
"id": "fc3a56f2bb4dda6332099eab5143fcb01b6c3bb4",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"description": "Changes:\n\n- Split changes into two commits\n- Guard the `cmd_name = echo` line behind cfg to silence clippy\n- Rework `set_file_limit` into two `unix` and `windows` functions, where the\n former handles conversions to u64 and the latter i64.",
"base": "6ab3bfcba0577fabdcb84498441c6605391290f4",
"oid": "36c10fac855f5a25627f8f9b68e86bfb4800e3a4",
"timestamp": 1715170065
},
{
"id": "c344457e461a4b5d3dc1b890a22daf18e8b53ffd",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"description": "Fix build on FreeBSD",
"base": "6ab3bfcba0577fabdcb84498441c6605391290f4",
"oid": "cff26ff44fad987d34044c0294da0ff4b0fa69bc",
"timestamp": 1715191369
},
{
"id": "b18a4e1ee8158e1311c810e94164aeb59794ad5b",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"description": "Simplify FreeBSD/HardenedBSD support-related changes\n\nWe can simply abstract the type of integer required by the runtime.\n\nSigned-off-by:\tShawn Webb <shawn.webb@hardenedbsd.org>\nSigned-off-by:\tcloudhead <cloudhead@radicle.xyz>",
"base": "6ab3bfcba0577fabdcb84498441c6605391290f4",
"oid": "39c5172901411fb2859beeff89b61cb315ee8105",
"timestamp": 1715967475
},
{
"id": "f90dbd5443eb6dd7542cfbe8b1d78c29de842352",
"author": {
"id": "did:key:z6MkpJ857fbgh2sRyu13owW9gVtXA3G18VeU1Yfojy4QyzCZ",
"alias": "shawn.webb"
},
"description": "Rebase, squash.",
"base": "860f1dc8674bae9d92fe7311e204fe02e7bd0d88",
"oid": "d46b0b6d113ec86c8d1443c1d354ac7ce216f684",
"timestamp": 1716292152
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "60f948ad-13c4-4033-ba18-a8842048bd21"
},
"info_url": "https://cci.rad.levitte.org//60f948ad-13c4-4033-ba18-a8842048bd21.html"
}
Started at: 2025-10-21 19:34:28.188945+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/60f948ad-13c4-4033-ba18-a8842048bd21/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout c21654de722a541bc926ec8a9a477f896525771f
✓ Switched to branch patch/c21654d at revision b18a4e1
✓ Branch patch/c21654d setup to track rad/patches/c21654de722a541bc926ec8a9a477f896525771f
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 39c5172901411fb2859beeff89b61cb315ee8105
HEAD is now at 39c51729 Simplify FreeBSD/HardenedBSD support-related changes
Exit code: 0
$ git show 39c5172901411fb2859beeff89b61cb315ee8105
commit 39c5172901411fb2859beeff89b61cb315ee8105
Author: cloudhead <cloudhead@radicle.xyz>
Date: Fri May 17 17:36:43 2024 +0000
Simplify FreeBSD/HardenedBSD support-related changes
We can simply abstract the type of integer required by the runtime.
Signed-off-by: Shawn Webb <shawn.webb@hardenedbsd.org>
Signed-off-by: cloudhead <cloudhead@radicle.xyz>
diff --git a/radicle/src/io.rs b/radicle/src/io.rs
index db7f8e00..8af88728 100644
--- a/radicle/src/io.rs
+++ b/radicle/src/io.rs
@@ -4,53 +4,20 @@ use std::io;
use libc::{getrlimit, rlimit, setrlimit, RLIMIT_NOFILE};
#[cfg(not(target_os = "freebsd"))]
-/// Sets the open file limit to the given value, or the maximum allowed value.
-pub fn set_file_limit<N>(n: N) -> io::Result<u64>
-where
- N: Copy + fmt::Display,
- u64: TryFrom<N>,
-{
- let Ok(n) = u64::try_from(n) else {
- return Err(io::Error::new(
- io::ErrorKind::InvalidInput,
- format!("expected value that fits into u64, found: {n}"),
- ));
- };
- let mut rlim = rlimit {
- rlim_cur: 0, // Initial soft limit value
- rlim_max: 0, // Initial hard limit value
- };
- // Get the current limits.
- unsafe {
- if getrlimit(RLIMIT_NOFILE, &mut rlim) != 0 {
- return Err(io::Error::last_os_error());
- }
- }
- if rlim.rlim_cur >= n {
- return Ok(rlim.rlim_cur);
- }
- // Set the soft limit to the given value, up to the hard limit.
- rlim.rlim_cur = n.min(rlim.rlim_max);
- unsafe {
- if setrlimit(RLIMIT_NOFILE, &rlim as *const rlimit) != 0 {
- return Err(io::Error::last_os_error());
- }
- }
- Ok(rlim.rlim_cur)
-}
-
-// FreeBSD uses i64 instead of u64
+type Int = u64;
#[cfg(target_os = "freebsd")]
+type Int = i64;
+
/// Sets the open file limit to the given value, or the maximum allowed value.
-pub fn set_file_limit<N>(n: N) -> io::Result<i64>
+pub fn set_file_limit<N>(n: N) -> io::Result<Int>
where
N: Copy + fmt::Display,
- i64: TryFrom<N>,
+ Int: TryFrom<N>,
{
- let Ok(n) = i64::try_from(n) else {
+ let Ok(n) = Int::try_from(n) else {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
- format!("expected value that fits into i64, found: {n}"),
+ format!("invalid file limit '{n}'"),
));
};
let mut rlim = rlimit {
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny clippy::all cargo build --all-targets --workspace cargo doc --workspace cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 60f948ad-13c4-4033-ba18-a8842048bd21 -v /opt/radcis/ci.rad.levitte.org/cci/state/60f948ad-13c4-4033-ba18-a8842048bd21/s:/60f948ad-13c4-4033-ba18-a8842048bd21/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/60f948ad-13c4-4033-ba18-a8842048bd21/w:/60f948ad-13c4-4033-ba18-a8842048bd21/w -w /60f948ad-13c4-4033-ba18-a8842048bd21/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /60f948ad-13c4-4033-ba18-a8842048bd21/s/script.sh
+ cargo --version
info: syncing channel updates for '1.77-x86_64-unknown-linux-gnu'
info: latest update on 2024-04-09, rust version 1.77.2 (25ef9e3d8 2024-04-09)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
info: installing component 'rustc'
cargo 1.77.2 (e52e36006 2024-03-26)
+ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
+ cargo fmt --check
error: 'cargo-fmt' is not installed for the toolchain '1.77-x86_64-unknown-linux-gnu'.
To install, run `rustup component add --toolchain 1.77-x86_64-unknown-linux-gnu rustfmt`
Exit code: 1
{
"response": "finished",
"result": "failure"
}