feat(mtools): add mtools package#207
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR introduces the mtools package (version 4.0.49) to the minimal packages collection. The change includes a Nickel build specification that defines dependencies, output artifacts, and test cases, plus a shell build script that configures and compiles mtools with reproducible build flags for multiple architectures. Changesmtools Package Addition
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/mtools/build.sh (1)
22-23: 💤 Low valueConsider quoting
$OUTPUT_DIRfor defensive coding.While unlikely to cause issues in the controlled build environment, quoting
$OUTPUT_DIRon line 23 would prevent potential word-splitting if the path unexpectedly contains spaces.🛡️ Proposed defensive fix
-make DESTDIR=$OUTPUT_DIR install +make DESTDIR="$OUTPUT_DIR" install🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/mtools/build.sh` around lines 22 - 23, The make invocation uses an unquoted variable in the DESTDIR assignment (make DESTDIR=$OUTPUT_DIR install); update it to quote the variable (make DESTDIR="$OUTPUT_DIR" install) to avoid word-splitting if OUTPUT_DIR contains spaces—edit the build.sh invocation that calls make with DESTDIR to wrap $OUTPUT_DIR in double quotes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/mtools/build.sh`:
- Around line 22-23: The make invocation uses an unquoted variable in the
DESTDIR assignment (make DESTDIR=$OUTPUT_DIR install); update it to quote the
variable (make DESTDIR="$OUTPUT_DIR" install) to avoid word-splitting if
OUTPUT_DIR contains spaces—edit the build.sh invocation that calls make with
DESTDIR to wrap $OUTPUT_DIR in double quotes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 26d64394-21e6-43ce-a83a-f9408c397fc3
📒 Files selected for processing (3)
packages/mtools/NOTES.mdpackages/mtools/build.nclpackages/mtools/build.sh
The "minimal build" CI was failing for two reasons: 1. ftp.gnu.org returns HTTP 403 to the build fetcher, so the source download failed. Switch to the kernel.org GNU mirror (same byte-for-byte tarball; sha256 unchanged: 10cd1111...). 2. mtools installs several /bin/sh helper scripts (mcomp, uz/lz, mxtar, tgz, mcheck, amuFormat.sh). The post-build "missing runtime_deps" checker flagged that no runtime dep provides /bin/sh. Add bash (provides usr/bin/sh) to runtime_deps. Build and `min check --packages mtools` now both pass cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the mtools package, providing
mmd/mcopy/mformat. Needed to populate the FAT EFI System Partition image without loop-mounting (works in an unprivileged sandbox) for the upcomingminimal-vm-imageassembly package.Source: mtools 4.0.49 from GNU FTP, sha256
10cd1111da87bf2400a380c1639a6cba8bfb937a24f9c51f5f88d393ae5f6f76(downloaded + hashed locally).Build: autotools.
./configure --prefix=/usr --disable-floppyd --without-x,make,make DESTDIR=$OUTPUT_DIR install.--disable-floppyd --without-xkeeps the dep set to glibc only. Deps: base-bootstrap, make, toolchain (build) + glibc (runtime).Outputs:
usr/bin/*(mtools + command symlinks).Validation: builds from source in the Linux sandbox —
minimal package mtoolscompletes successfully andminimal check --packages mtoolspasses (incl. the FAT roundtrip standalone test); theminimal buildCI check (external Linux build) is green. (mformat/mmd/mcopy roundtrip +mtools --versionwere also verified on a macOS dev host.)Summary by CodeRabbit