Merge pull request #64 from chriskuehl/improve-debian-based-on-upstream

Improve Debian packaging based on downstream package
This commit is contained in:
Chris Kuehl 2016-04-04 17:15:49 -07:00
commit 95c1e8473a
8 changed files with 77 additions and 26 deletions

2
debian/.gitignore vendored
View file

@ -3,4 +3,4 @@
files
substvars
dumb-init/
dumb-init.man
dumb-init.1

2
debian/clean vendored Normal file
View file

@ -0,0 +1,2 @@
tests/*.pyc
tests/*/*.pyc

2
debian/compat vendored
View file

@ -1 +1 @@
7
9

40
debian/control vendored
View file

@ -3,26 +3,32 @@ Section: utils
Priority: extra
Maintainer: Chris Kuehl <ckuehl@yelp.com>
Uploaders: Kent Wills <rkwills@yelp.com>
Build-Depends: debhelper (>= 7), gcc, fakeroot, python, python-pytest,
python-mock, help2man
Standards-Version: 3.9.6
Build-Depends:
debhelper (>= 9),
help2man,
## Tests:
python,
python-pytest,
python-mock,
Standards-Version: 3.9.7
Homepage: https://github.com/Yelp/dumb-init
Vcs-Browser: https://github.com/Yelp/dumb-init
Vcs-Git: https://github.com/Yelp/dumb-init.git
Package: dumb-init
Architecture: any
Depends: ${misc:Depends}
Description: Simple wrapper script which proxies signals to a child
Docker runs your processes as PID1. The kernel doesn't apply default signal
handling to PID1 processes, so if your process doesn't register a custom
signal handler, signals like TERM will just bounce off your process.
Description: wrapper script which proxies signals to a child
dumb-init is a simple process supervisor and init system designed to run
as PID 1 inside minimal container environments (such as Docker).
.
This can result in cases where sending signals to a `docker run` process
results in the run process exiting, but the container continuing in the
background.
Lightweight containers have popularized the idea of running a single
process or service without normal init systems like systemd or sysvinit.
However, omitting an init system often leads to incorrect handling of
processes and signals, and can result in problems such as containers
which can't be gracefully stopped, or leaking containers which should
have been destroyed.
.
A workaround is to wrap your script in this proxy, which runs as PID1. Your
process then runs as some other PID, and the kernel won't treat the signals
that are proxied to them specially.
.
The proxy dies when your process dies, so it must not double-fork or do other
weird things (this is basically a requirement for doing things sanely in
Docker anyway).
dumb-init acts as PID 1 and immediately spawns your command as a child
process, taking care to properly handle and forward signals as they are
received.

33
debian/copyright vendored Normal file
View file

@ -0,0 +1,33 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dumb-init
Source: https://github.com/Yelp/dumb-init/
Files: *
Copyright:
2015, 2016 Yelp, Inc.
License: Expat
Files: debian/*
Copyright:
2015, 2016 Yelp, Inc.
2016 Dmitry Smirnov <onlyjob@debian.org>
License: Expat
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

1
debian/docs vendored Normal file
View file

@ -0,0 +1 @@
README*

2
debian/manpages vendored
View file

@ -1 +1 @@
debian/dumb-init.man
debian/dumb-init.1

21
debian/rules vendored
View file

@ -1,16 +1,28 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
override_dh_auto_build:
dh_auto_build $@
MAN=debian/dumb-init.1
override_dh_clean:
$(RM) -rv .cache
dh_clean $(MAN)
$(MAN):
help2man --name 'a minimal init system for Linux containers' \
--no-discard-stderr \
--include debian/help2man \
--no-info \
./dumb-init > debian/dumb-init.man
./dumb-init > $@
override_dh_installman: $(MAN)
dh_installman
override_dh_builddeb:
# Use gzip instead of xz to support older Debian/Ubuntu releases which
# might install our debs.
dh_builddeb -- -Zgzip
override_dh_auto_test:
@ -18,6 +30,3 @@ override_dh_auto_test:
find . -name '__pycache__' -delete
PATH=.:$$PATH py.test tests/
ps aux
# we don't want it to wipe out our dist directory
override_dh_auto_clean: