Also adding a test in run_build.sh to ensure that the pre-processed
license is always up to date with the actual license file.
To recreate: `xxd -i LICENSE > src/license.h`
This changes the execve exit status for the child process to be inline
with standard exit status codes for common execve failures.
I don't think this breaks any backwards compat with existing tini users
because it is still returning a non zero exit status but with correct
codes providing more information why it failed.
- Don't mention options that don't exist in Usage.
- Don't include a log prefix when NO_ARGS is set.
- Turn up the default verbosity to FATAL when NO_ARGS is set.
- Expose verbosity via an ENV var for debugging.
The reaping test assumes that all the `sleep` processes on the system
are created by us, which is an incorrect assumption, and creates
problems now that we run in a more "complete" system in CI (i.e. not in
a minimal container).
This solves the issue by not assuming that random sleep processes are
related to us: instead, we look at whether these processes are in our
process group.
This also includes a little clean up of the reaping stage 1.
Right now, the packages are hard-coded to report the amd64 architecture.
I'm not sure they'll be used or needed, so for now let's ignore and skip
them.
This adds 1k of weight to the resulting binary, which is reasonable
(it's less than 5% for the smaller non-static binary), but alleviates
legitimate user concern that the license requires being included when
Tini is redistributed.
The GPG signing subkey and passphrase are respectively provided through
a Travis encrypted file and a Travis encrypted environment variable.
Signing is only done if there is a signing key present when the build is
complete (so as to not fail when e.g. building a PR that doesn't have
encrypted files available).