-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Do not use sudo for running OS's scripts/enter.sh #2747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Do not suggest to use `sudo` when running OS build - the container is started as privileged one and all the operations on host which needs sudo right are invoked with explicit `sudo`. If executed with sudo, configure now refuses to run because of a sanity check: configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) Also update output samples to mimic current Docker's output. Refs home-assistant/operating-system#4214
[...] | ||
builder@c6dfb4cd4036:/build$ | ||
builder@d3d7577663c9:/build$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this quite a pointless change as it's always random, I just blindly copied and cropped the output. But does no harm.
📝 WalkthroughWalkthroughThe documentation for getting started with the operating system was revised to remove the explicit use of Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
docs/operating-system/getting-started.md (5)
50-60
: Add a language identifier for consistent code-block stylingMost other command snippets in this document use
shell or
bash for syntax highlighting.
Adding the same identifier here keeps the formatting consistent and aids readability.-``` +```shell
52-53
: Consider adding a short note clarifying the sudo password promptThe example correctly shows that
scripts/enter.sh
is invoked withoutsudo
, yet the next line still displays
[sudo] password for whoever:
. Readers who skim may wonder why a sudo prompt appears immediately after a non-sudo command.A parenthetical like “(the script invokes privileged commands internally, therefore sudo may still prompt for a password)” right after the prompt line would avoid confusion.
No technical change required—just an explanatory sentence.
82-84
: Align language tag with earlier examplesFor symmetry with earlier snippets, prepend a language identifier:
-```shell +```shell scripts/enter.sh make O=output_rpi4_64 rpi4_64
90-96
: Minor: remove redundant$
prompt marker or wrap in code block headerIn the interactive example we already open the block with ```bash and include the
$
prompt inside.
If you prefer to keep the prompt symbol, consider using `console` as the language tag to distinguish command from output.
Otherwise, stripping the leading `$` keeps copy-paste usability high.Purely cosmetic—feel free to ignore if the team’s docs convention is to keep the
$
.
116-118
: Nit: add language identifier to the OVA build snippetSame consistency point as above:
-```bash +```shell $ scripts/enter.sh make O=output_ova ova
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
docs/operating-system/getting-started.md
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
Proposed change
Do not suggest to use
sudo
when running OS build - the container is started as privileged one and all the operations on host which needs sudo right are invoked with explicitsudo
. If executed with sudo, configure now refuses to run because of a sanity check:configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
Also update output samples to mimic current Docker's output.
Type of change
Checklist
Additional information
Summary by CodeRabbit
sudo
when running build scripts, providing clearer and more direct command examples for users. Output examples and prompts were adjusted to match the revised instructions.