-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
singularity-tools: miscellaneous fixes #332437
singularity-tools: miscellaneous fixes #332437
Conversation
Name the directory inside SIF (the SquashFS image) ".singularity.d" instead of ".${projectName}.d" for compatibility across Apptainer and Singularity.
2699a2e
to
8416f54
Compare
Deprecate singularity-tools.mkLayer and singularity-tools.shellScript, for they are no longer related to image building. Use writers.writeBash instead of singularity-tools.shellScript.
8416f54
to
a131891
Compare
@@ -105,14 +122,14 @@ rec { | |||
|
|||
# Create runScript and link shell | |||
if [ ! -e bin/sh ]; then | |||
ln -s ${runtimeShell} bin/sh | |||
ln -s ${lib.getExe bashInteractive} bin/sh |
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 is runtimeShell
wrong and bashInteractive
right? I mean, seems to make sense, but I fail to spell it out
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.
runtimeShell
is provided by runtimeShellPackage
(i.e., bash
). Current implementation links runtimeShell
to container's /bin/sh
, which is then executed by runscript
.
When calling apptainer run
or singularity run
, it executes runscript
and starts a (supposedly) interactive session. Due to the lack of line-editing functionality of the non-interacive bash
, control characters, including arrow keys, are not handled correctly.
This change solves this problem by linking to /bin/sh
bashInteractive
instead, the way NixOS does by default.
You can see the difference by running
apptainer run "$(nix-build -A apptainer.tests.image-hello-cowsay)"
Before and after this change.
Description of changes
This pull request introduces fixes targeting the
singularity-tools
build helper set.Two backward-incompatible changes include:
storeDir
argument from theoverride
interface ofsingularity-tools
.storeDir
is used interchangeably withbuiltins.storeDir
. Besides,storeDir
will be naturally reflected bybuiltins.storeDir
. We could only configure the store path inside the container, which is not covered by the current implementation.shellScript
andmkLayer
.Split from #268199
Cc: @SomeoneSerge
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
apptainer.tests.image-hello-cowsay
andsingularity.tests.image-hello-cowsay
)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
) (tested the execution of the produced images.)Add a 👍 reaction to pull requests you find important.