Commit Graph

180 Commits

Author SHA1 Message Date
Thomas Orozco 2eeac4cd60 Don't attempt to sign without GPG_PASSPHRASE
This ensures PRs can build even though GPG_PASSPHRASE is missing.
2016-08-10 08:49:56 +02:00
Thomas Orozco 24969266fc Merge pull request #40 from krallin/new-alpine-instructions
[ci skip] Update Alpine instructions
2016-06-03 19:35:40 +02:00
Thomas Orozco a61a036c6e [ci skip] Update Alpine instructions 2016-06-03 19:34:45 +02:00
Thomas Orozco 90a9494622 Merge pull request #39 from rprieto/patch-1
Update README to point to Alpine CDN repository
2016-04-19 22:42:43 +02:00
Romain 55e927779a Update README to point to Alpine CDN repository
I ran into trouble installing `tini` from http://dl-1.alpinelinux.org/alpine/edge/community/

```bash
WARNING: Ignoring APKINDEX.83d1b7a5.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  tini (missing):
    required by: world[tini]
The command '/bin/sh -c apk add --repository http://dl-1.alpinelinux.org/alpine/edge/community/ tini' returned a non-zero code: 1
```

Updating to http://dl-1.alpinelinux.org/alpine/edge/community/ seems to fix it. Not sure if that's the right way but it worked me me.
2016-04-19 14:00:43 +10:00
Thomas Orozco 553307341d Merge pull request #34 from danilobuerger/master
Moved alpine package to community repository
2016-02-09 18:46:03 +01:00
Danilo Bürger d5d6e0ee94 Moved alpine package to community repository 2016-02-05 21:59:40 +01:00
Thomas Orozco 9451d6cf50 Merge pull request #33 from krallin/signed-binaries
Sign `tini` and `tini-static` binaries
2016-01-26 22:08:24 -05:00
Thomas Orozco 2c2bb517b0 Bump version to 0.9.0 2016-01-26 22:05:00 -05:00
Thomas Orozco 551d271823 Document signed binaries 2016-01-26 21:56:43 -05:00
Thomas Orozco 44b5675f0e Sign `tini` and `tini-static` binaries
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).
2016-01-26 21:56:43 -05:00
Thomas Orozco 428d960140 Merge pull request #26 from krallin/readme-updates
Readme updates
2015-11-20 22:35:05 +01:00
Thomas Orozco a4af09f931 Do a better job at acknowledging contributors
Thanks to @tianon, @dpw, @danilobuerger, @datakurre!
2015-11-20 22:31:08 +01:00
Thomas Orozco b62b57caeb There appears to be a Nix package now!
https://github.com/NixOS/nixpkgs/pull/10945
2015-11-20 22:30:00 +01:00
Thomas Orozco dc261b386e Merge pull request #25 from krallin/specific-git-dir
Build: ensure the correct git directory is used
2015-11-20 22:24:13 +01:00
Thomas Orozco eb094de175 Release 0.8.4 2015-11-20 21:48:02 +01:00
Thomas Orozco ce73bd258f Build: ensure the correct git directory is used
If Tini is built without its own .git directory, but within another
git directory (i.e. the tarball was extracted in a directory
that happens to be a git tree), then we end up with the wrong
git version in `tini -h`.

This actually happens in the Alpine builds (e.g. Tini 0.8.3 in
Alpine has git hash d89e144, which is a Aports commit hash, not
a Tini commit hash:

https://github.com/alpinelinux/aports/commit/d89e144

This patch forces git to use the current git directory, or to not
use one at all (which is fine, since in that case Tini is
presumably being built from a release tarball).
2015-11-20 21:48:02 +01:00
Thomas Orozco 54236e3815 Merge pull request #24 from krallin/test-fortify-source
Add tests for hardening in CI script
2015-11-05 11:25:25 +01:00
Thomas Orozco 2b5b0ecb6e Add tests for hardening in CI script
This ensures that _FORTIFY_SOURCE is actually used!
2015-11-05 11:19:36 +01:00
Thomas Orozco 50476d0cde Merge pull request #23 from krallin/fix-22
Fix 22
2015-11-04 14:01:54 +01:00
Thomas Orozco 9d12e39c9d Release 0.8.3 2015-11-04 13:59:26 +01:00
Thomas Orozco ad11e868f0 Only define _FORTIFY_SOURCE if not built-in
Some platforms (Alpine Linux being one) define _FORTIFY_SOURCE
as a built-in. Redefining it causes a compilation error since we
treat warnings as errors.

Fixes: #22
2015-11-03 16:29:00 +01:00
Thomas Orozco 955d4a0a94 Merge pull request #21 from krallin/fix-19-pass-tty
Pass tty to child process group and release 0.8.2
2015-10-31 15:40:31 +01:00
Thomas Orozco 9bfb4a505f Release 0.8.2
Oops; Travis doesn't like seeing a release commit being rebased.
2015-10-31 15:37:56 +01:00
Thomas Orozco 486f79fe8a Release 0.8.1 2015-10-31 15:31:58 +01:00
Thomas Orozco cd23c4ce65 CFLAGS: throw errors on all warnings 2015-10-31 15:31:58 +01:00
Thomas Orozco 1a8dc6e21c Cleanup internal tests a little bit
No functional changes here.
2015-10-31 15:31:57 +01:00
Thomas Orozco a0b3006d48 Local tests: add `-it` to make them interruptible 2015-10-31 15:31:57 +01:00
Thomas Orozco a0bf435d2f Test that Tini restores signal configuration
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!
2015-10-31 15:31:57 +01:00
Thomas Orozco e3ae587f92 Add a tty test for signal handling 2015-10-31 15:31:57 +01:00
Thomas Orozco 1ee5e650a3 Clarify that log messages are coming from Tini
Since we're ignoring SIGTTOU (for good reason), our log messages
could show in another program's output. To make the life of users
easier, let's clarify that the messages are owned by Tini.
2015-10-31 15:31:57 +01:00
Thomas Orozco 88342efc3c Ensure Tini doesn't lock up on of tty ownership
In the rare scenario where Tini is not running as PID 1 and its
child (or something else) sets TOSTOP on the tty, then Tini would
hang when if it tries to write debug messages. This commit fixes
this problem by ignoring SIGTTOU.

In the also rare scenario where two Tini instances are running, the
tty-passing could end up being done improperly (if the parent Tini
instance passes the tty to the child before the grandparent Tini
instance passes it to the parent Tini instance), and result in the
parent Tini instance running in the foreground. This commit fixes
this problem by passing the tty in the child (which we can do
because we are ignoring SIGTTOU).
2015-10-31 15:31:57 +01:00
Thomas Orozco 82acbc5ccc Make child process group foreground on active tty
When a tty is available, make the child process group foreground on
(and graciously fallback if no tty is available).

Fix #19
2015-10-31 15:31:57 +01:00
Thomas Orozco 40d313000c Add tests for passing tty to child process group 2015-10-31 15:31:57 +01:00
Thomas Orozco 364e4b9f02 Merge pull request #20 from krallin/alpine-package
Include install instructions for Alpine Linux
2015-10-28 20:24:05 +01:00
Thomas Orozco 158def8e93 Include install instructions for Alpine Linux
Fix: #18
2015-10-28 20:20:07 +01:00
Thomas Orozco cc6b2f9ca4 Merge pull request #17 from krallin/release-v0.8.0
Release v0.8.0
2015-10-27 20:08:45 +01:00
Thomas Orozco 197a39d9f2 Release 0.8.0 2015-10-27 20:05:50 +01:00
Thomas Orozco d4832f47ed Use unsigned ints for configuration
Let's avoid signed integer overflow if someone ends up passing
the same CLI argument thousands and thousands of times.
2015-10-27 19:54:15 +01:00
Thomas Orozco cf1cb5c4f6 Merge pull request #16 from krallin/dpw-kill-process-group
Support for kill process group, thanks @dpw!
2015-10-27 19:51:23 +01:00
Thomas Orozco e7bae983c6 Add tests for process group support 2015-10-26 21:52:06 +01:00
David Wragg 109019f917 Support for killing the whole child process group
tini only kills the immediate child process.  This means that if you
do, for example,

    docker run krallin/ubuntu-tini sh -c 'sleep 10'

and ctrl-C it, nothing happens: SIGINT is sent to the 'sh' process,
but that shell won't react to it while it is waiting for the 'sleep'
to finish.

This change adds a -g option to put the child process of tini into a
new process group, and sends signals to that group, so that every
process in the group gets a signal.  This corresponds more closely to
what happens when you do ctrl-C etc. in a terminal: The signal is sent
to the foreground process group.

So if you try the example above with a container image that passes -g
to tini, the SIGINT will be received by the 'sleep', and the container
promptly exits.
2015-10-26 21:52:06 +01:00
Thomas Orozco 1bfde9c126 Merge pull request #14 from krallin/release-0.7.0
Bump version to 0.7.0
2015-10-16 15:42:41 -07:00
Thomas Orozco e4b6654130 Bump version to 0.7.0 2015-10-16 15:39:14 -07:00
Thomas Orozco f2e8ed2487 Merge pull request #13 from krallin/better-git-checks
Better git checks
2015-10-16 15:38:28 -07:00
Thomas Orozco 7a6105e44d Add a default for FORCE_SUBREAPER in ddist.sh
Usually, we want to have FORCE_SUBREAPER=1.
2015-10-16 15:24:22 -07:00
Thomas Orozco 405eea7941 More robust git version checking
- Check the exit code from git log to check if we have a version.
- Add a "-dirty" suffix if the repo is dirty when the build is made.
2015-10-16 15:23:10 -07:00
Thomas Orozco 9b8a8a5764 Bump version to 0.6.0 2015-09-06 15:52:25 +02:00
Thomas Orozco 672c86cd36 Add smoke test in ci build 2015-09-06 15:50:24 +02:00
Thomas Orozco a285acc616 Merge pull request #7 from krallin/child-subreaper
Add child subreaper support
2015-09-06 15:49:05 +02:00