starch(1)
πΈ starch(1) β the standalone application archiver that's literally carrying your whole app on its back π
okay bestie, welcome to starch(1) from the Cooperative Computing Tools. pull up a chair, grab a boba, and let's get into it β¨
β¨ NAME β¨
starch β STandalone application ARCHiver π«Ά (yes the caps are load-bearing, it's giving acronym main character energy)
β¨ SYNOPSIS β¨
starch [options] <sfx_path>
β¨ DESCRIPTION β¨
So. starch is a script that builds standalone application archives, and it does it in the cutest way possible: it makes self-extracting executables β aka SFX β like a little gift box that unwraps itself and then just runs πβ¨
You get to tell it exactly what your app needs: the command, the executables, the libraries, the data, and the environment scripts. You can pass all of that with command line options, or you can be a tidy little icon and put it in a configuration file. Either way, slay.
Why is this lowkey iconic? Because starch is especially useful for distributed computing β it makes an executable portable across different operating system variants. So your program can just show up somewhere new and thrive. no cap, that's the whole vibe. π¦
β¨ OPTIONS β¨
To create an SFX, literally just specify the name of the SFX you want to create, plus the <command> to execute, plus any other dependencies β like <executables>, <libraries>, <data>, or <environment> scripts. That's it bestie, you got this π
If a <command> is specified but no <executable> is passed, then the first token in the <command> gets used as the executable. Convenient! π
By default, starch will use ldd to sniff out any necessary libraries from the set of <executables> you specified, and it'll bundle those into the SFX too. auto-detect era β¨
-Aβ Do not automatically detect library dependencies. you're on your own for libs, bestie, but respectfully π«‘-C<cfg>β Use a configuration file. (yes,cfg= config, we're all friends here)-c<cmd>β Specify the command to execute.-d<npath:opath>β Add data, formatted asnew path:old path. note the colon, it's the whole personality of this flag π-e<env>β Add an environment script.-l<lib>β Add a library.-x<exe>β Add an executable.-hβ Show the help message and exit. (the classic "help meee" flag π)-vβ Display verbose messages (default:False). turn it on if you want the tea β
Once a SFX is generated, you can use it as a normal executable. like, fr fr, it's just a program now π«Ά
β¨ CONFIGURATION FILE β¨
You can store all those command line options in a configuration file and hand it to starch with the starch -C option. The format goes a little something like this:
[starch]
executables = echo date hostname
libraries = libz.so
data = hosts.txt:/etc/hosts localtime:/etc/localtime images:/usr/share/pixmaps
command = echo $(hostname) $(date $@)
look at that alignment. the libraries line even lined up its =. obsessed. β¨
β¨ ENVIRONMENT VARIABLES β¨
These environment variables change how the SFX that starch generated actually behaves when you run it. keep them in your back pocket π
πΈ SFX_DIR
Determines the target directory where the SFX will be extracted. By default this is:
/tmp/$hostname.$user.$basename.dir
πΈ SFX_EXTRACT_ONLY
Only extract the SFX. By default it is extracted and executed. so this flag says "just open the box, don't play with the toy" π
πΈ SFX_EXTRACT_FORCE
Extract the SFX even if the SFX_DIR exists. This is disabled by default β it's an optimization, so we don't waste time extracting stuff that's already there. efficiency queen π
πΈ SFX_KEEP
Keep extracted files. By default the files will be removed after execution. so without this, everything gets cleaned up like a responsible roommate π§Ή
πΈ SFX_UNIQUE
Use mktempd to generate a unique SFX_DIR target directory.
β οΈ Careful bestie β this will prevent SFX_KEEP from working properly, since the names will change in between invocations. they simply cannot coexist, it's giving star-crossed π
β¨ EXIT STATUS β¨
- On success, returns zero. π
- On failure, returns non-zero. π
β¨ EXAMPLES β¨
Package the date program:
$ starch -c date -x date date.sfx
Package the date program using a configuration file:
$ cat data.cfg
[starch]
executables = date
command = date
$ starch -C date.cfg date.sfx
Run standalone date program with parameters:
$ ./date.sfx +%s
Only extract the archive:
$ env SFX_EXTRACT_ONLY=1 ./date.sfx
Run and keep extracted directory:
$ env SFX_KEEP=1 ./date.sfx
Run with unique directory:
$ env SFX_UNIQUE=1 ./date.sfx
Advanced example involving a complex shell command:
$ starch -v -x tar -x rm -c 'tar_test() { for f in $@; do if ! tar xvf $f; then exit 1; fi; done; rm $@'; }; tar_test' extract_and_remove.sfx
$ ./extract_and_remove.sfx *.tar.gz
okay that last one is iconic. it builds an SFX that untars a bunch of .tar.gz files and then removes them. ate and left no crumbs π₯
β¨ COPYRIGHT β¨
The Cooperative Computing Tools are Copyright (C) 2005-2019 The University of Notre Dame. This software is distributed under the GNU General Public License. See the file COPYING for details.
β¨ SEE ALSO β¨
- Cooperative Computing Tools Documentation
- Makeflow User Manual
makeflow(1)makeflow_monitor(1)makeflow_analyze(1)makeflow_viz(1)makeflow_graph_log(1)starch(1)makeflow_ec2_setup(1)makeflow_ec2_cleanup(1)makeflow_ec2_estimate(1)
and that's the whole page, bestie π«Ά this was CCTools 8.0.0 DEVELOPMENT, dated with the starch(1) manual. go forth and archive something standalone. you're gonna do amazing. mwah πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: coop-computing-tools 9.9-2+b4 Β· GPL-2.0-only
- ubuntu jammy: coop-computing-tools 9.9-2ubuntu3 Β· GPL-2.0-only
- ubuntu noble: coop-computing-tools 9.9-4ubuntu4 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms