This upgrades Tini to 0.13.1 in order to fix a compatibility issue with
https://github.com/joyent/sdc-docker (see:
https://github.com/joyent/sdc-docker/issues/91). The fix itself was
provided by @geek of Joyent.
I've also made the Tini architecture more explicit (since Tini now also
supports ARM), so in case you decide to support additional architectures
in the future, the fix should be more obvious.
There isn't much functional difference between 0.9.0 (which you were
using) and 0.13.1, but here are a few notable changes you might care
about to some extent:
- Tini now supports a `-l` flag to show its license. This was useful
from a compliance perspective for some users (so considering you're
shipping Tini that might indirectly be useful to you!).
- Tini now supports a `--version` argument to show its version. This is
here mostly because it's a little more intuitive than what was there
before (you'd have to use `-h` to see the version).
- Tini now supports a `TINI_VERBOSITY` environment variable (should be
an int), which can be convenient for debugging when Tini is used as an
`ENTRYPOINT` (avoids the need to alter the entrypoint to configure
it).
- Tini now uses more specific exit codes when it fails to fork (e.g.
because the binary you're looking for doesn't exist, etc.).
Thanks for using Tini in this image!
The new install-plugins.sh script removed the possibility to pass a file
containing a list of plugins that was given with the 'old' plugins.sh
script, although this functionality can be provided with only a few
lines more.
Now, when the install-plugins.sh script is called with only a single
argument that matches an existing file on the file system, it is assumed
that this file contains the list of plugins that should be installed,
newlines are replaced by spaces and this manipulated content is used as
the plugins list for further processing.
grep -P supports the \d character class but grep -E does not. grep -E
only supports [[:digit:]]. I used [0-9] because it's shorter. I also
switched to using egrep, keeping in line with other scripts in the repo.
- Use modern `$()` syntax vs backticks [see [SC2006](https://github.com/koalaman/shellcheck/wiki/SC2006)]
- Always check for, and bail on, failures of `cd`. [see [SC2164](https://github.com/koalaman/shellcheck/wiki/SC2164)]
- Avoid `for foo in $(...)`, per [DontReadLinesWithFor](http://mywiki.wooledge.org/DontReadLinesWithFor)
- Avoid parsing `ls` to find subdirectories when `for d in "$dir"/*/` does the job; see also [ParsingLs](http://mywiki.wooledge.org/ParsingLs)
- `\s` is not specified in POSIX ERE (thus, not guaranteed to be available in bash-native regexes unless local platform's C library's regex implementation extends standard); use `[[:space:]]` instead.
- Avoid unnecessary deviations from POSIX sh specification:
- `echo -e` violates (not just extends) POSIX, doesn't work as expected in bash compiled with `--enable-xpg-echo-default`; [POSIX specification](http://pubs.opengroup.org/onlinepubs/009604599/utilities/echo.html) suggests `printf` as replacement (see APPLICATION USAGE section).
- `function` keyword not specified in POSIX, provides no benefit over standard-compliant syntax
The intent of using eval when processing JAVA_OPTS or JENKINS_OPTS is to allow arguments with spaces to be passed through and parsed without the bugs given in [BashFAQ #50](http://mywiki.wooledge.org/BashFAQ/050). By using `eval`, however, the issues discussed in [BashFAQ #48](http://mywiki.wooledge.org/BashFAQ/048) are introduced.
Strings containing whitespace can be safely processed with `xargs`, which -- when not used with the non-POSIX extensions `-0` or `-d` -- follows shell quoting conventions in splitting its input stream into arguments.
Not much since 2.7.3, cf https://jenkins.io/changelog-stable/#v2.7.4
- Prevent File descriptor leaks when reading plugin manifests. It causes
failures during the upgrade of detached plugins on Windows.