- `ARCH_SUFFIX` should not be passed at runtime: it's already passed as
a build argument, and it's consumed during the build (so it's too late
to change it at runtime).
- For consistency, pass `ARCH_NATIVE` and `CC` similarly at build time
as well: passing `CC` and `ARCH_SUFFIX` at different times is
particularly error-prone.
- Accept all parameters to `ddist.sh` via environment variables. It
doesn't make sense to accept exclusively `ARCH_SUFFIX` as a positional
argument when `ARCH_SUFFIX` alone doesn't accomplish anything (i.e.
you also need `CC`).
TODO: `CC` should be derived from `ARCH_SUFFIX` in the first place.
This required updating to Ubuntu Xenial for some of the cross compilers, but Travis doesn't support Xenial builders, so this instead converts Travis to use the already-existing "ddist.sh" script for building via Docker.
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).
Tini ignores certain signals, and blocks others, but in both cases
we restore them before executing the child process.
Add tests to ensure that we actually do that!
Using the child subreaper mechanism, we can actually run
tests inside the CI environment without depending on Docker.
While this does not replace the existing tests, it allows
at least some functional coverage within CI.
Travis uses Ubuntu Precise, which has CMake 3.8. That version does not
have support for excluding /usr and /usr/bin from the %files% list
(which results in a package that conflicts with the filesystem package
and fails to install).
This commit:
+ Builds on Precise instead of Trusty
+ Adds install tests