forked from cooperative-computing-lab/cctools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starch small fixes (cooperative-computing-lab#2780)
* print help and quit when executable option is missing * adds starch configuration file example * Adds SFX_EXEC to change what command to execute in the package. The use case is for when several executables are added to the package. E.g.: starch -x date -x uname -c date example.sfx ./example.sfx Mon Jan 10 11:12:02 EST 2022 SFX_EXEC=uname ./example.sfx Linux This also useful to run a shell with all the PATH and LD_LIBRARY_PATH variables set correctly to run a set of commands: SFX_EXEC=/bin/sh ./example.sfx sh$ which date /home/myuser/example.sfx.27441.dir/bin/date * Adds --sfx-help to show help message for sfx packages. E.g: starch -x date -c date example.sfx ./example.sfx --sfx-help Executing the sfx file by itself executes the command date environment variables to set packages options: SFX_EXEC=CMD Execute CMD instead of the default. SFX_EXTRACT_ONLY=1 Extract package, but do not run a command. SFX_KEEP=1 Do not remove extracted package when command finishes. SFX_DIR=DIR Extract to DIR, instead of a temporary directory. Implies SFX_KEEP=1 * Correctly quote SFX_EXEC * cleanup TR_starch_extract_and_remove.sh test * make SFX_DIR available for commands
- Loading branch information
Showing
4 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Example of a starch command configuration. | ||
# Create a self-contained package to run the command `date` using the timezone | ||
# specified in starch-example.env with: | ||
# | ||
# starch -C starch-example.config date.sfx | ||
# ./date.sfx | ||
# | ||
|
||
[starch] | ||
# command to execute when executing the resulting starch package | ||
command = date | ||
|
||
# comma-separated list of executables to include in the package. If not an | ||
# absolute path, then they musth be found in PATH | ||
executables = /bin/date | ||
|
||
# comma-separated list of dynamically linked libraries (e.g. *.so files) to | ||
# include in the package | ||
libraries = | ||
|
||
# comma-separated list of sh files to be sourced before the command's | ||
# execution. Useful to export necessary environment variables. | ||
environments = starch-example.env | ||
|
||
# comma-separated list of mappings of PACKAGE_PATH:HOST_PATH of files to include | ||
# in the package. | ||
data = my_data/motd:/etc/motd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export TZ=Australia/Melbourne |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters