Skip to content
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

Move sourcing environment to chroot during build #1065

Closed
wants to merge 2 commits into from
Closed

Move sourcing environment to chroot during build #1065

wants to merge 2 commits into from

Conversation

GodloveD
Copy link
Collaborator

Description of the Pull Request (PR):

Some time ago we began sourcing /.singularity.d/env/90-environment.sh during build before entering the %post section. This works fine for simple variable declaration, but since we do this outside of the chroot environment other things can break. For instance, if /.singularity.d/env/90-environment.sh is sourcing another script (/etc/profile for example) it will source the script on the host system instead of the one inside the container.

Here I'm moving the sourcing of the environment into the chrooted %post section. I'm doing so by prepending the sourcing commands to the recipe file on behalf of the user at build time. I'm also adding the complete loop so that all *.sh files in /.singularity.d/env/ are properly sourced.

This fixes or addresses the following GitHub issues:

Checkoff for all PRs:

✅ I have read the Guidelines for Contributing, and this PR conforms to the stated requirements.

  • I have tested this PR locally with a make test

✅ This PR is NOT against the project's master branch
✅ I have added myself as a contributor to the contributors's file
✅ This PR is ready for review and/or merge

Attn: @singularityware-admin

@GodloveD
Copy link
Collaborator Author

This PR is superseded by #1071. Closing.

@GodloveD GodloveD closed this Oct 17, 2017
@GodloveD GodloveD deleted the source-in-chroot branch January 23, 2018 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant