Improve rpm packaging error reporting#1864
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let path_value = env::var_os("PATH").unwrap_or_default(); | ||
| let mut candidates = vec![OsString::from(program)]; | ||
| let exe_suffix = env::consts::EXE_SUFFIX; | ||
| if !exe_suffix.is_empty() && !program.ends_with(exe_suffix) { | ||
| candidates.push(OsString::from(format!("{program}{exe_suffix}"))); | ||
| } |
There was a problem hiding this comment.
Respect PATHEXT when checking command availability on Windows
The new ensure_command_available only looks for the bare program name and an appended .exe. On Windows, commands are resolved using every extension in PATHEXT (e.g. .cmd, .bat, .com). Tools such as rpmbuild are often batch wrappers (rpmbuild.cmd), so this helper will report them as missing even though Command::new("rpmbuild") would succeed. Invoking the packaging workflow or running the new tests on Windows will therefore fail with a false “rpmbuild is unavailable” error. Consider iterating over PATHEXT or spawning the command to detect NotFound.
Useful? React with 👍 / 👎.
Adds scripts/benchmark_flist_memory.sh which compares peak RSS of oc-rsync against upstream rsync 3.4.1 at 100K and 1M directory scales under three flist modes: - Mode A: full flist (--no-inc-recursive) - Mode B: default (receiver INC_RECURSE) - Mode C: sender INC_RECURSE (skipped, pending #1862 opt-in flag) Measures wall-clock time and peak RSS via /usr/bin/time -v, runs each mode 3 times and takes the median, writes TSV to target/benchmarks/ and emits an optional markdown summary. Fixtures live under /tmp/oc-rsync-bench (not bind-mounted) with a path guard that refuses to rm anywhere outside that prefix. Documents 2026-05-01 baseline numbers in docs/benchmarks/flist-memory-baseline-2026-05-01.md - upstream peak RSS drops from 76.8 MB (Mode A) to 7.5 MB (Mode B) at 1M files, while oc-rsync stays at ~218 MB across both modes (sender-side INC_RECURSE not yet active). Refs #966/#971 for the RSS gap context.
Adds scripts/benchmark_flist_memory.sh which compares peak RSS of oc-rsync against upstream rsync 3.4.1 at 100K and 1M directory scales under three flist modes: - Mode A: full flist (--no-inc-recursive) - Mode B: default (receiver INC_RECURSE) - Mode C: sender INC_RECURSE (skipped, pending #1862 opt-in flag) Measures wall-clock time and peak RSS via /usr/bin/time -v, runs each mode 3 times and takes the median, writes TSV to target/benchmarks/ and emits an optional markdown summary. Fixtures live under /tmp/oc-rsync-bench (not bind-mounted) with a path guard that refuses to rm anywhere outside that prefix. Documents 2026-05-01 baseline numbers in docs/benchmarks/flist-memory-baseline-2026-05-01.md - upstream peak RSS drops from 76.8 MB (Mode A) to 7.5 MB (Mode B) at 1M files, while oc-rsync stays at ~218 MB across both modes (sender-side INC_RECURSE not yet active). Refs #966/#971 for the RSS gap context.
Plan re-baselines peak RSS for full vs incremental flist on 100K and 1M directory pushes after #1862 landed sender INC_RECURSE. Captures the state machine in crates/transfer/src/generator/file_list/inc_recurse.rs plus the receiver-side path in receiver/file_list.rs, and ties the bench gate to the v0.6.1 push regression revert (#3744) so default-flip needs both wall-clock and RSS evidence. Refs #1864, #1862, #966, #971, #972, #2088.
…#1864) (#4163) Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion to the existing local-push flist memory bench. Spawns a temporary oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under both --no-inc-recursive (full flist) and the default receiver INC_RECURSE mode, and reports peak client RSS plus bytes-per-file overhead in a markdown table. df -i is consulted up front so fixtures are skipped when the inode budget would not fit; the daemon is torn down by an EXIT trap. Operator script, not a CI gate.
Plan re-baselines peak RSS for full vs incremental flist on 100K and 1M directory pushes after #1862 landed sender INC_RECURSE. Captures the state machine in crates/transfer/src/generator/file_list/inc_recurse.rs plus the receiver-side path in receiver/file_list.rs, and ties the bench gate to the v0.6.1 push regression revert (#3744) so default-flip needs both wall-clock and RSS evidence. Refs #1864, #1862, #966, #971, #972, #2088.
…#1864) (#4163) Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion to the existing local-push flist memory bench. Spawns a temporary oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under both --no-inc-recursive (full flist) and the default receiver INC_RECURSE mode, and reports peak client RSS plus bytes-per-file overhead in a markdown table. df -i is consulted up front so fixtures are skipped when the inode budget would not fit; the daemon is torn down by an EXIT trap. Operator script, not a CI gate.
…#1864) (#4163) Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion to the existing local-push flist memory bench. Spawns a temporary oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under both --no-inc-recursive (full flist) and the default receiver INC_RECURSE mode, and reports peak client RSS plus bytes-per-file overhead in a markdown table. df -i is consulted up front so fixtures are skipped when the inode budget would not fit; the daemon is torn down by an EXIT trap. Operator script, not a CI gate.
Summary
rpmbuildbefore invokingcargo rpm buildand surface a helpful hint when missingensure_command_availableutility used by the packaging workflowTesting
https://chatgpt.com/codex/tasks/task_e_69058380b5c8832393a3eead73e0fd04