From 38dfe92e02f370d2c0b15bd1ff9a1f2fc433efd6 Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov Date: Tue, 3 Nov 2015 01:51:21 +1100 Subject: [PATCH] Initial commit --- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 44 ++++++++++++++++++++++++ debian/copyright | 49 +++++++++++++++++++++++++++ debian/docs | 1 + debian/examples | 1 + debian/gbp.conf | 11 ++++++ debian/patches/docker-opts-path.patch | 18 ++++++++++ debian/patches/series | 1 + debian/rules | 15 ++++++++ debian/source/format | 1 + debian/watch | 7 ++++ 12 files changed, 154 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/examples create mode 100644 debian/gbp.conf create mode 100644 debian/patches/docker-opts-path.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..4e79da0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +systemd-docker (0.2.1+dfsg-1) UNRELEASED; urgency=medium + + * Initial release (Closes: #764784). + + -- Dmitry Smirnov Tue, 03 Nov 2015 01:02:25 +1100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9e216f7 --- /dev/null +++ b/debian/control @@ -0,0 +1,44 @@ +Source: systemd-docker +Section: devel +Priority: extra +Maintainer: Debian Go Packaging Team +Uploaders: Dmitry Smirnov +Build-Depends: debhelper (>= 9), + dh-golang, + golang-go, +# golang-github-docker-docker-dev, + golang-github-fsouza-go-dockerclient-dev +Standards-Version: 3.9.6 +Homepage: https://github.com/ibuildthecloud/systemd-docker +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/systemd-docker.git +Vcs-Git: git://anonscm.debian.org/pkg-go/packages/systemd-docker.git +XS-Go-Import-Path: github.com/ibuildthecloud/systemd-docker + +Package: systemd-docker +Architecture: any +Built-Using: ${misc:Built-Using} +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: Wrapper for "docker run" to handle systemd quirks + systemd-docker This is a wrapper for docker run so that you can sanely + run Docker containers under systemd. The key thing that this wrapper + does is move the container process from the cgroups setup by Docker to + the service unit's cgroup. This handles a bunch of other quirks so + please read through documentation to get an understanding of all the + implications of running Docker under systemd. + . + Using this wrapper you can manage containers through systemctl or the + docker CLI and everything should just stay in sync. Additionally + you can leverage all the cgroup functionality of systemd and + systemd-notify. Why I wrote this? The full context is in Docker + Issue #6791 (https://github.com/docker/docker/issues/6791) + and this mailing list thread + (https://groups.google.com/d/topic/coreos-dev/wf7G6rA7Bf4/discussion). + The short of it is that systemd does not actually supervise the Docker + container but instead the Docker client. This makes systemd incapable + of reliably managing Docker containers without hitting a bunch of really + odd situations. Installation Copy systemd-docker to /opt/bin (really + anywhere you want). You can download/compile through the normal go + get github.com/ibuildthecloud/systemd-docker Quick Usage Basically, in + your unit file use systemd-docker run instead of docker run. Here's an + example unit file that runs nginx. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..69619b7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,49 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: systemd-docker +Source: https://github.com/ibuildthecloud/systemd-docker +Files-Excluded: + Godeps/_workspace/src/github.com/docker/docker + Godeps/_workspace/src/github.com/fsouza/go-dockerclient + +Files: * +Copyright: 2014-2015 Darren Shepherd +License: Apache-2.0 + +Files: debian/* +Copyright: 2015 Dmitry Smirnov +License: GPL-3+ + +Files: debian/patches/* +Copyright: 2015 Dmitry Smirnov +License: GPL-3+ or Apache-2.0 +Comment: patches can be licensed under the same terms as upstream. + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + ․ + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + ․ + The complete text of the GNU General Public License version 3 + can be found in "/usr/share/common-licenses/GPL-3". + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..ab1a32b --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README* diff --git a/debian/examples b/debian/examples new file mode 100644 index 0000000..0bbe99e --- /dev/null +++ b/debian/examples @@ -0,0 +1 @@ +example/* diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..227f1f8 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,11 @@ +[buildpackage] +force-create = True +overlay = True +export-dir = ../build-area/ + +[dch] +id-length = 0 + +[import-orig] +pristine-tar = True +merge = False diff --git a/debian/patches/docker-opts-path.patch b/debian/patches/docker-opts-path.patch new file mode 100644 index 0000000..cd46e84 --- /dev/null +++ b/debian/patches/docker-opts-path.patch @@ -0,0 +1,18 @@ +Last-Update: 2015-11-03 +Forwarded: not-needed +Author: Dmitry Smirnov +Description: use "golang-github-fsouza-go-dockerclient-dev" + +--- a/main.go ++++ b/main.go +@@ -14,9 +14,9 @@ + "strconv" + "strings" + "time" + +- "github.com/docker/docker/opts" ++ "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts" + flag "github.com/docker/docker/pkg/mflag" + + dockerClient "github.com/fsouza/go-dockerclient" + ) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..527d54b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +docker-opts-path.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3d3c6c0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --buildsystem=golang --with=golang + +override_dh_clean: + dh_clean + ## Remove Files-Excluded (when built from checkout or non-DFSG tarball): + $(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright` + +override_dh_auto_test: + -dh_auto_test diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..65afb99 --- /dev/null +++ b/debian/watch @@ -0,0 +1,7 @@ +version=3 + +opts=\ +repacksuffix=+dfsg,\ +dversionmangle=s{\+dfsg\d*}{},\ + https://github.com/ibuildthecloud/systemd-docker/releases \ + .*/archive/v?(\d[-\d\.]+)\.tar\.gz