fix: rockchip family_tweaks fails on forky — addgroup → groupadd#9753
fix: rockchip family_tweaks fails on forky — addgroup → groupadd#9753igorpecovnik merged 1 commit intomainfrom
Conversation
`addgroup` lives in `adduser`, which Debian forky no longer pulls into a minimal rootfs by default. `family_tweaks` then dies with `bash: line 1: addgroup: command not found` (exit 127) on every forky-armhf rockchip build. `groupadd` is in `passwd` (Essential, every Linux), and works identically for our use here. The only behavioural difference — `groupadd` returns 9 if the group already exists where `addgroup` returns 0 — is gated by the existing `getent group … ||` guard in rockchip.conf, and added to rockchip-rv1106.conf to keep re-runnability. Repro: armbian/os tinkerboard-current forky-armhf, log https://paste.armbian.com/iyasuwenum
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo Rockchip family configuration files are updated to make system group creation ( ChangesSystem Group Creation Idempotency
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Symptom
forky armhf rockchip build (e.g.
tinkerboard-current) fails infamily_tweaks:Log: https://paste.armbian.com/iyasuwenum
Cause
addgroupships inadduser. Debian forky no longer pullsadduserinto a minimal rootfs (it's been deprioritised in favour ofpasswd'sgroupadd/useradd, which stay Essential).family_tweakscallsaddgroupdirectly viachroot_sdcard, so it 127s the moment the rootfs lacksadduser.Fix
Switch the four call sites in
config/sources/families/rockchip.confandconfig/sources/families/rockchip-rv1106.conffromaddgroup --system --quiettogroupadd --system.groupaddis inpasswdand is present in every Debian/Ubuntu rootfs.addgroup vs groupadd — relevant differences
addgroup --system --quiet --gid N namegroupadd --system --gid N nameadduser(deprecated as essential in forky+)passwd(Essential, all Linux)--system/ GID--quiet09The exit-9-on-existing difference is gated by a
getent group … ||guard.rockchip.confalready had that guard; added the same guard torockchip-rv1106.conf(its addgroup calls were unguarded), so re-runningfamily_tweaksstays idempotent.Test plan
tinkerboard-currenton forky armhf) —family_tweaksshould pass and the build progress past the post-cache rootfs stage.orangepi5,nanopct6) to confirm rockchip.conf path still works on bookworm/trixie/noble whereadduseris present.luckfox-pico-pro) twice in a row to confirm the newgetentguard keepsgroupaddfrom erroring with exit 9 on the second run.Summary by CodeRabbit
Release Notes