-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
dockerTools.buildImageWithNixDb fails when also using runAsRoot #34779
Comments
samueldr
added a commit
to samueldr/nixpkgs
that referenced
this issue
May 24, 2018
The extraCommands was, previously, simply put in the body of the script using nix expansion `${extraCommands}` (which looks exactly like bash expansion!). This causes issues like in NixOS#34779 where scripts will eventually create invalid bash. The solution is to use a script like `run-as-root`. * * * Fixes NixOS#34779
samueldr
added a commit
to samueldr/nixpkgs
that referenced
this issue
May 24, 2018
globin
pushed a commit
to mayflower/nixpkgs
that referenced
this issue
May 26, 2018
The extraCommands was, previously, simply put in the body of the script using nix expansion `${extraCommands}` (which looks exactly like bash expansion!). This causes issues like in NixOS#34779 where scripts will eventually create invalid bash. The solution is to use a script like `run-as-root`. * * * Fixes NixOS#34779 (cherry picked from commit 60737bd)
globin
pushed a commit
to mayflower/nixpkgs
that referenced
this issue
May 26, 2018
(cherry picked from commit 902b059)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
When using
runAsRoot
withbuildImageWithNixDb
using a recent-enough nixpkgs checkout, it is failing with:The exact line changes depending on the script built by
dockerTools
, which depends on what is added torunAsRoot
.Steps to reproduce
Use cb6fc52 (or later up to today) and try producing an image using both
runAsRoot
andbuildImageWithNixDb
.repro.nix
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste theresults.
Here they are, but should be irrelevant AFAIK since it's using a pinned nixpkgs checkout.
The issue, while being present from that commit onward, is possibly not caused by that commit. As far as I understand it from a shallow inspection, it seems to come from the way the scripts are ran with dockerTools, it is an
eval
of variables. Something spooky is possibly happening when the script is????
into the qemu vm for use withrunAsRoot
. The failure, in some tests I did, comes also(?) from this line of comments:It would be the parenthesis present in that line which is causing an issue.
The text was updated successfully, but these errors were encountered: