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
Stage-2 cleanup #24645
Stage-2 cleanup #24645
Conversation
this way `set -x` is set early
@Mic92, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @fpletz and @rickynils to be potential reviewers. |
@@ -71,22 +71,17 @@ fi | |||
|
|||
|
|||
# Provide a /etc/mtab. | |||
mkdir -m 0755 -p /etc | |||
test -e /etc/fstab || touch /etc/fstab # to shut up mount | |||
test -e /etc/fstab || install -D /dev/null /etc/fstab # to shut up mount |
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.
this is bad IMO. Better be explicit in creating /etc
, it isn't used only for /etc/fstab
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.
reverted.
mkdir -m 0755 -p /etc/nixos | ||
mkdir -m 0755 -p /var{,log,lib,db} /nix/var /etc/nixos/ \ | ||
/run/lock /home /bin # for the /bin/sh symlink | ||
install -m 0700 -d /root |
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.
any reason of using install
over chmod
here?
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.
because it will both create a directory or chown existing an one.
mkdir -m 0755 -p /etc/nixos | ||
mkdir -m 0755 -p /var{,log,lib,db} /nix/var /etc/nixos/ \ | ||
/run/lock /home /bin # for the /bin/sh symlink | ||
install -m 0700 -d /root |
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.
Why install
instead of mkdir
?
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.
Because it will both create a directory or chown existing an one.
I would merge this soon, if there are no more concerns. |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
./result/bin/
)