From dba0050fd32ac4b494f442810032b923f14e69d7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Sat, 3 Jan 2015 07:11:47 +0000 Subject: [PATCH] Import docker.io_1.3.3~dfsg1-2.debian.tar.xz [dgit import tarball docker.io 1.3.3~dfsg1-2 docker.io_1.3.3~dfsg1-2.debian.tar.xz] --- Dockerfile | 19 ++ README.Debian | 34 ++++ changelog | 218 +++++++++++++++++++++ compat | 1 + control | 79 ++++++++ copyright | 137 +++++++++++++ docker.io.bash-completion | 1 + docker.io.docker.default | 1 + docker.io.docker.init | 1 + docker.io.docker.upstart | 1 + docker.io.install | 6 + docker.io.lintian-overrides | 2 + docker.io.maintscript | 4 + docker.io.manpages | 1 + docker.io.postinst | 18 ++ docker.io.udev | 1 + docs | 1 + gbp.conf | 13 ++ helpers/download-libcontainer | 49 +++++ helpers/gitcommit.sh | 34 ++++ patches/9637-fix-nuke-bashism.patch | 21 ++ patches/change-system-unit-env-file.patch | 20 ++ patches/enable-non-amd64-arches.patch | 20 ++ patches/fatal-error-old-kernels.patch | 18 ++ patches/series | 17 ++ patches/upstream-patched-archive-tar.patch | 182 +++++++++++++++++ repack.sh | 42 ++++ repack/prune/docs | 2 + repack/prune/vendor | 1 + rules | 113 +++++++++++ source.lintian-overrides | 6 + source/format | 1 + upstream-version-gitcommits | 40 ++++ vim-syntax-docker.install | 4 + vim-syntax-docker.yaml | 6 + watch | 6 + 36 files changed, 1120 insertions(+) create mode 100644 Dockerfile create mode 100644 README.Debian create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 docker.io.bash-completion create mode 120000 docker.io.docker.default create mode 120000 docker.io.docker.init create mode 120000 docker.io.docker.upstart create mode 100644 docker.io.install create mode 100644 docker.io.lintian-overrides create mode 100644 docker.io.maintscript create mode 100644 docker.io.manpages create mode 100644 docker.io.postinst create mode 120000 docker.io.udev create mode 100644 docs create mode 100644 gbp.conf create mode 100755 helpers/download-libcontainer create mode 100755 helpers/gitcommit.sh create mode 100644 patches/9637-fix-nuke-bashism.patch create mode 100644 patches/change-system-unit-env-file.patch create mode 100644 patches/enable-non-amd64-arches.patch create mode 100644 patches/fatal-error-old-kernels.patch create mode 100644 patches/series create mode 100644 patches/upstream-patched-archive-tar.patch create mode 100755 repack.sh create mode 100644 repack/prune/docs create mode 100644 repack/prune/vendor create mode 100755 rules create mode 100644 source.lintian-overrides create mode 100644 source/format create mode 100644 upstream-version-gitcommits create mode 100644 vim-syntax-docker.install create mode 100644 vim-syntax-docker.yaml create mode 100644 watch diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0510ed88 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM tianon/debian-devel + +# start by adding just "debian/control" so we can get mk-build-deps with maximum caching +COPY control /usr/src/docker.io/debian/ +WORKDIR /usr/src/docker.io + +# get all the build deps of _this_ package in a nice repeatable way +RUN apt-get update && mk-build-deps -irt'apt-get --no-install-recommends -yV' debian/control + +# need our debian/ directory to compile _this_ package +COPY . /usr/src/docker.io/debian + +# go download and unpack our upstream source +RUN uscan --force-download --verbose --download-current-version +RUN DOCKER_TARBALLS=.. ./debian/helpers/download-libcontainer +RUN /tianon/extract-origtargz.sh + +# tianon is _really_ lazy, and likes a preseeded bash history +RUN echo '/tianon/extract-origtargz.sh && dpkg-buildpackage -us -uc && lintian -EvIL+pedantic' >> /root/.bash_history diff --git a/README.Debian b/README.Debian new file mode 100644 index 00000000..2f41e350 --- /dev/null +++ b/README.Debian @@ -0,0 +1,34 @@ +Docker on Debian +================ + +To enable docker memory limitation, the kernel needs to be loaded with +boot parameters: cgroup_enable=memory swapaccount=1. + +This is because enabling memory cgroup support has some run-time overhead, +and kernel maintainers don't want to slow down systems unnecessarily. + +http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg764104.html +https://github.com/docker/docker/issues/396 + +To instruct the kernel to enable memory cgroup support, edit +/etc/default/grub and extend GRUB_CMDLINE_LINUX_DEFAULT like: + +GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1" + +Then run update-grub, and reboot. + + +As noted in the upstream documentation (https://docs.docker.io), Docker will +allow non-root users in the "docker" group to access "docker.sock" and thus +communicate with the daemon. To add yourself to the "docker" group, use +something like: + +adduser YOURUSER docker + +As also noted in the upstream documentation, the "docker" group (and any other +means of accessing the Docker API) is root-equivalent. If you don't trust a +user with root on your box, you shouldn't trust them with Docker either. If you +are interested in further information about the security aspects of Docker, +please be sure to read the "Docker Security" +(http://docs.docker.io/en/latest/articles/security/) article in the +upstream documentation. diff --git a/changelog b/changelog new file mode 100644 index 00000000..c1dba59a --- /dev/null +++ b/changelog @@ -0,0 +1,218 @@ +docker.io (1.3.3~dfsg1-2) unstable; urgency=medium + + * Add fatal-error-old-kernels.patch to make Docker refuse to start on old, + unsupported kernels (Closes: #774376) + * Fix dh_auto_clean to clean up after the build properly, especially to avoid + FTBFS when built twice (Closes: #774482) + + -- Tianon Gravi Sat, 03 Jan 2015 00:11:47 -0700 + +docker.io (1.3.3~dfsg1-1) unstable; urgency=medium + + [ Tianon Gravi ] + * Update to 1.3.3 upstream release (Closes: #772909) + - Fix for CVE-2014-9356 (Path traversal during processing of absolute + symlinks) + - Fix for CVE-2014-9357 (Escalation of privileges during decompression of + LZMA (.xz) archives) + - Fix for CVE-2014-9358 (Path traversal and spoofing opportunities presented + through image identifiers) + * Fix bashism in nuke-graph-directory.sh (Closes: #772261) + + [ Didier Roche ] + * Support starting systemd service without /etc/default/docker + (Closes: #770293) + + -- Tianon Gravi Thu, 18 Dec 2014 21:54:12 -0700 + +docker.io (1.3.2~dfsg1-1) unstable; urgency=high + + * Severity is set to high due to the sensitive nature of the CVEs this + upload fixes. + * Update to 1.3.2 upstream release + - Fix for CVE-2014-6407 (Archive extraction host privilege escalation) + - Fix for CVE-2014-6408 (Security options applied to image could lead + to container escalation) + * Remove Daniel Mizyrycki from Uploaders. Thanks for all your work! + + -- Paul Tagliamonte Mon, 24 Nov 2014 19:14:28 -0500 + +docker.io (1.3.1~dfsg1-2) unstable; urgency=medium + + * Remove deprecated /usr/bin/docker.io symlink + - added as a temporary shim in 1.0.0~dfsg1-1 (13 Jun 2014) + - unused by package-installed files in 1.2.0~dfsg1-1 (13 Sep 2014) + + -- Tianon Gravi Fri, 07 Nov 2014 13:11:34 -0700 + +docker.io (1.3.1~dfsg1-1) unstable; urgency=high + + * Update to 1.3.1 upstream release + - fix for CVE-2014-5277 + - https://groups.google.com/d/topic/docker-user/oYm0i3xShJU/discussion + + -- Tianon Gravi Mon, 03 Nov 2014 08:26:29 -0700 + +docker.io (1.3.0~dfsg1-1) unstable; urgency=medium + + * Updated to 1.3.0 upstream release. + * Enable systemd socket activation (Closes: #752555). + + -- Tianon Gravi Fri, 17 Oct 2014 00:56:07 -0600 + +docker.io (1.2.0~dfsg1-2) unstable; urgency=medium + + * Added "golang-docker-dev" package for the reusable bits of Docker's source. + + -- Tianon Gravi Thu, 09 Oct 2014 00:08:11 +0000 + +docker.io (1.2.0~dfsg1-1) unstable; urgency=medium + + * Updated to 1.2.0 upstream release (Closes: #757183, #757023, #757024). + * Added upstream man pages. + * Updated bash and zsh completions to be installed as "docker" and "_docker". + * Updated init scripts to also be installed as "docker". + * Fixed "equivalent" typo in README.Debian (Closes: #756395). Thanks Reuben! + * Removed "docker.io" mention in README.Debian (Closes: #756290). Thanks + Olivier! + + -- Tianon Gravi Sat, 13 Sep 2014 11:43:17 -0600 + +docker.io (1.0.0~dfsg1-1) unstable; urgency=medium + + * Updated to 1.0.0 upstream release. Huzzah! + * I've removed what is commonly called a `button' of patches against + the docker package. Exact patches: + - bash-completion-docker.io.patch + - systemd-docker.io.patch + - sysvinit-provides-docker.io.patch + - zsh-completion-docker.io.patch + - mkimage-docker.io.patch + * I know y'all are guessing why; and the answer's pretty simple -- we're + no longer docker.io(1). Since the src:docker package now ships wmdocker(1), + we can safely declare a breaks/replaces on the pre-wmdocker version of the + package, allowing existing users to safely update, both src:docker and + src:docker.io side. This brings us into line with other distros, which + now ship wmdocker(1) and docker(1). + * As a stop-gap, I'm still shipping a docker.io(1) symlink to allow + migration away. + + -- Paul Tagliamonte Fri, 13 Jun 2014 21:04:53 -0400 + +docker.io (0.11.1~dfsg1-1) unstable; urgency=medium + + [ Paul Tagliamonte ] + * Use EnvironmentFile with the systemd unit file. (Closes: #746774) + * Patch out version checking code. (Closes: #747140) + * Remove all host checking for non-amd64 host arches. Let docker build + and run on all platforms now. (Closes: #747139, #739914) + + [ Tianon Gravi ] + * Updated to 0.11.1 upstream release. + * Added backported upstream patch for removing RemoteAddr assumptions + that cause events to not be delivered to more than one unix socket + listener. + + -- Tianon Gravi Fri, 09 May 2014 17:30:45 -0400 + +docker.io (0.9.1~dfsg1-2) unstable; urgency=medium + + * Added upstream apparmor patch to fix newer apparmor versions (such as the + version appearing in Ubuntu 14.04). + * Added mkimage-* docker.io binary name patches (Closes: #740855). + + -- Tianon Gravi Tue, 08 Apr 2014 23:19:08 -0400 + +docker.io (0.9.1~dfsg1-1) unstable; urgency=medium + + * Updated to 0.9.1 upstream release (Closes: #743424). + * Added cgroupfs-mount dependency (Closes: #742641). + * Added Suggests entries for optional features, chiefly lxc (Closes: #742081). + * Added notes about "root-equivalence" to README.Debian (Closes: #742387). + + -- Tianon Gravi Thu, 03 Apr 2014 21:38:30 -0400 + +docker.io (0.9.0+dfsg1-1) unstable; urgency=medium + + * Updated README.Debian to not be quite so outdated (Closes: #740850). + * Updated to 0.9.0 upstream release. + + -- Tianon Gravi Tue, 11 Mar 2014 22:24:31 -0400 + +docker.io (0.8.1+dfsg1-1) unstable; urgency=medium + + * Updated to 0.8.1 upstream release. + + -- Tianon Gravi Tue, 25 Feb 2014 20:56:31 -0500 + +docker.io (0.8.0+dfsg1-2) unstable; urgency=medium + + [ Tianon Gravi ] + * Added more license notes to debian/copyright (Closes: #738627). + + -- Tianon Gravi Sat, 15 Feb 2014 17:51:58 -0500 + +docker.io (0.8.0+dfsg1-1) unstable; urgency=medium + + [ Prach Pongpanich ] + * Added zsh completion. + + [ Tianon Gravi ] + * Updated to 0.8.0 upstream release. + * Added vim syntax files in new vim-syntax-docker package. + * Added note about minimum recommended kernel version to Description. + * Added contrib/*-integration files in /usr/share/docker.io/contrib. + + -- Tianon Gravi Mon, 10 Feb 2014 20:41:10 -0500 + +docker.io (0.7.6+dfsg1-1) unstable; urgency=medium + + [ Johan Euphrosine ] + * Updated to 0.7.6. + * Added dependency to gocapability. + * Clean patches. + + [ Tianon Gravi ] + * Added contrib/mk* scripts from upstream into /usr/share/docker.io/contrib + (Closes: #736068). + * Added upstream udev rules file to stop device-mapper devices and mounts from + appearing in desktop environments through udisks. + + -- Johan Euphrosine Wed, 22 Jan 2014 22:50:47 -0500 + +docker.io (0.7.1+dfsg1-1) unstable; urgency=medium + + [ Prach Pongpanich ] + * Fixed "docker: command not found" errors while using bash tab completion + (Closes: #735372). + + [ Tianon Gravi ] + * Updated to 0.7.1 upstream release (while we wait for gocapability to be + packaged). + * Added xz-utils recommend which is required for decompressing certain images + from the index. + + -- Tianon Gravi Wed, 15 Jan 2014 20:22:34 -0500 + +docker.io (0.6.7+dfsg1-3) unstable; urgency=medium + + * Fixed FTBFS on non-amd64 platforms by setting the correct GOPATH. + * Fixed issues with Docker finding a valid dockerinit (Closes: #734758). + * Added aufs-tools dependency. + + -- Tianon Gravi Thu, 09 Jan 2014 20:10:20 -0500 + +docker.io (0.6.7+dfsg1-2) unstable; urgency=medium + + * Added iptables dependency required for Docker to start. + * Added ca-certificates recommend required for pulling from the index. + + -- Tianon Gravi Wed, 08 Jan 2014 19:14:02 -0500 + +docker.io (0.6.7+dfsg1-1) unstable; urgency=medium + + * Initial release (Closes: #706060, #730569) + * Document missing licenses in the source tree. Bad, paultag. Thanks + alteholz. + + -- Paul Tagliamonte Tue, 07 Jan 2014 21:06:10 -0500 diff --git a/compat b/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +9 diff --git a/control b/control new file mode 100644 index 00000000..5540a58b --- /dev/null +++ b/control @@ -0,0 +1,79 @@ +Source: docker.io +Section: admin +Priority: optional +Maintainer: Paul Tagliamonte +Uploaders: Docker Packaging Team , + Tianon Gravi , + Johan Euphrosine +Build-Depends: bash-completion, + btrfs-tools, + debhelper (>=9), + dh-golang (>= 1.1), + dh-systemd, + go-md2man, + golang (>= 2:1.2-3~), + golang (>= 2:1.2.1-2~) | golang (<< 2:1.2.1~), + golang (>= 2:1.3-4~) | golang (= 2:1.3-1) | golang (<< 2:1.3~), + golang-context-dev (>= 0.0~git20140604~), + golang-dbus-dev (>= 1~), + golang-go-patricia-dev (>= 1.0.1~), + golang-go-systemd-dev (>= 2~), + golang-go.net-dev (>= 0.0~hg20130530~), + golang-gocapability-dev (>= 0.0~git20140516~), + golang-gosqlite-dev (>= 0.0~hg20130530~), + golang-mux-dev (>= 0.0~git20140505~), + golang-pty-dev (>= 0.0~git20140315.1.67e2db2-1~), + libapparmor-dev, + libdevmapper-dev +Standards-Version: 3.9.6 +Homepage: https://github.com/docker/docker +Vcs-Git: git://anonscm.debian.org/docker/docker.io.git +Vcs-Browser: http://anonscm.debian.org/cgit/docker/docker.io.git + +Package: docker.io +Architecture: linux-any +Depends: adduser, iptables, ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends} +Recommends: aufs-tools, + ca-certificates, + cgroupfs-mount | cgroup-lite, + git, + xz-utils, + ${apparmor:Recommends} +Replaces: docker (<< 1.5~) +Breaks: docker (<< 1.5~) +Suggests: btrfs-tools, debootstrap, lxc, rinse +Built-Using: ${misc:Built-Using} +Description: Linux container runtime + Docker complements kernel namespacing with a high-level API which operates at + the process level. It runs unix processes with strong guarantees of isolation + and repeatability across servers. + . + Docker is a great building block for automating distributed systems: + large-scale web deployments, database clusters, continuous deployment systems, + private PaaS, service-oriented architectures, etc. + . + This package contains the daemon and client. Using docker.io on non-amd64 hosts + is not supported at this time. Please be careful when using it on anything + besides amd64. + . + Also, note that kernel version 3.8 or above is required for proper operation of + the daemon process, and that any lower versions may have subtle and/or glaring + issues. + +Package: vim-syntax-docker +Architecture: all +Depends: vim, ${misc:Depends} +Recommends: vim-addon-manager +Suggests: docker.io +Description: Docker container engine - Vim highlighting syntax files + This package provides syntax files for the Vim editor for editing Dockerfiles + from the Docker container engine. + +Package: golang-docker-dev +Architecture: all +Depends: ${misc:Depends} +Built-Using: ${misc:Built-Using} +Description: Externally reusable Go packages included with Docker + These packages are intentionally developed by upstream in such a way that they + are reusable to projects outside Docker and only rely on each other or other + external dependencies to be built. diff --git a/copyright b/copyright new file mode 100644 index 00000000..d9eefd31 --- /dev/null +++ b/copyright @@ -0,0 +1,137 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Docker +Upstream-Contact: Docker, Inc. +Source: https://github.com/docker/docker + +Files: * +Copyright: 2012-2014 Docker, Inc. +License: Apache-2.0 + +Files: debian/* +Copyright: 2013-2014 Daniel Mizyrycki + 2013-2014 Paul Tagliamonte + 2012-2014 Michael Stapelberg + 2013-2014 Tianon Gravi + 2013-2014 Johan Euphrosine + 2014 Prach Pongpanich +License: Apache-2.0 + +Files: contrib/init/openrc/docker.initd +Copyright: 1999-2013 Gentoo Foundation +License: GPL-2 + +Files: contrib/syntax/vim/* +Copyright: 2013 Honza Pokorny +License: BSD-2-clause + +Files: pkg/mflag/* +Copyright: 2014 The Docker & Go Authors +License: BSD-3-clause-Google + +Files: contrib/completion/zsh/* +Copyright: 2013-2014 Felix Riedel +License: BSD-3-clause-Generic + +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". + +License: GPL-2 + This file is part of Buildbot. Buildbot 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, version 2. + . + 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. + . + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/GPL-2". + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-3-clause-Google + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-3-clause-Generic + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/docker.io.bash-completion b/docker.io.bash-completion new file mode 100644 index 00000000..6ea11193 --- /dev/null +++ b/docker.io.bash-completion @@ -0,0 +1 @@ +contrib/completion/bash/docker diff --git a/docker.io.docker.default b/docker.io.docker.default new file mode 120000 index 00000000..4312e355 --- /dev/null +++ b/docker.io.docker.default @@ -0,0 +1 @@ +../contrib/init/sysvinit-debian/docker.default \ No newline at end of file diff --git a/docker.io.docker.init b/docker.io.docker.init new file mode 120000 index 00000000..e27f0495 --- /dev/null +++ b/docker.io.docker.init @@ -0,0 +1 @@ +../contrib/init/sysvinit-debian/docker \ No newline at end of file diff --git a/docker.io.docker.upstart b/docker.io.docker.upstart new file mode 120000 index 00000000..4df3220e --- /dev/null +++ b/docker.io.docker.upstart @@ -0,0 +1 @@ +../contrib/init/upstart/docker.conf \ No newline at end of file diff --git a/docker.io.install b/docker.io.install new file mode 100644 index 00000000..c1b79287 --- /dev/null +++ b/docker.io.install @@ -0,0 +1,6 @@ +contrib/*-integration usr/share/docker.io/contrib/ +contrib/completion/zsh/_docker usr/share/zsh/vendor-completions/ +contrib/init/systemd/docker.service lib/systemd/system/ +contrib/init/systemd/docker.socket lib/systemd/system/ +contrib/mk* usr/share/docker.io/contrib/ +contrib/nuke-graph-directory.sh usr/share/docker.io/contrib/ diff --git a/docker.io.lintian-overrides b/docker.io.lintian-overrides new file mode 100644 index 00000000..37dde6ad --- /dev/null +++ b/docker.io.lintian-overrides @@ -0,0 +1,2 @@ +docker.io binary: statically-linked-binary usr/lib/docker.io/dockerinit +# Yes, I assure you this is normal. Damnit, go. diff --git a/docker.io.maintscript b/docker.io.maintscript new file mode 100644 index 00000000..adf69fc1 --- /dev/null +++ b/docker.io.maintscript @@ -0,0 +1,4 @@ +mv_conffile /etc/bash_completion.d/docker.io /etc/bash_completion.d/docker 1.2.0~ +mv_conffile /etc/default/docker.io /etc/default/docker 1.2.0~ +mv_conffile /etc/init.d/docker.io /etc/init.d/docker 1.2.0~ +mv_conffile /etc/init/docker.io.conf /etc/init/docker.conf 1.2.0~ diff --git a/docker.io.manpages b/docker.io.manpages new file mode 100644 index 00000000..d5cff8a4 --- /dev/null +++ b/docker.io.manpages @@ -0,0 +1 @@ +docs/man/man*/* diff --git a/docker.io.postinst b/docker.io.postinst new file mode 100644 index 00000000..5fd88472 --- /dev/null +++ b/docker.io.postinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +case "$1" in + configure) + if [ -z "$2" ]; then + addgroup --system docker + fi + ;; + abort-*) + # How'd we get here?? + exit 1 + ;; + *) + ;; +esac + +#DEBHELPER# diff --git a/docker.io.udev b/docker.io.udev new file mode 120000 index 00000000..d7fd2eb6 --- /dev/null +++ b/docker.io.udev @@ -0,0 +1 @@ +../contrib/udev/80-docker.rules \ No newline at end of file diff --git a/docs b/docs new file mode 100644 index 00000000..b43bf86b --- /dev/null +++ b/docs @@ -0,0 +1 @@ +README.md diff --git a/gbp.conf b/gbp.conf new file mode 100644 index 00000000..09ea3f17 --- /dev/null +++ b/gbp.conf @@ -0,0 +1,13 @@ +[DEFAULT] +cleaner = fakeroot debian/rules clean +pristine-tar = False + +[git-buildpackage] +export-dir = ../build-area/ +tarball-dir = ../tarballs/ + +[git-dch] +id-length = 7 +meta = True +auto = True +full = True diff --git a/helpers/download-libcontainer b/helpers/download-libcontainer new file mode 100755 index 00000000..15d9c0c5 --- /dev/null +++ b/helpers/download-libcontainer @@ -0,0 +1,49 @@ +#!/bin/bash +set -e + +mkdir -p "${DOCKER_TARBALLS:=../tarballs}" + +pkg="$(dpkg-parsechangelog -SSource)" +ver="$(dpkg-parsechangelog -SVersion)" +origVer="${ver%-*}" # strip everything from the last dash +origVer="$(echo "$origVer" | sed -r 's/^[0-9]+://')" # strip epoch +upstreamVer="${origVer%%[+~]*}" +origTarballPrefix="${DOCKER_TARBALLS}/${pkg}_${origVer}.orig" +unprunedTarballPrefix="${DOCKER_TARBALLS}/${pkg}_${upstreamVer}.orig" + +if command -v curl &> /dev/null; then + curl='curl -sSL' +elif command -v wget &> /dev/null; then + curl='wget -qO-' +else + echo >&2 'error: missing "curl" or "wget" - install one or the other' + exit 1 +fi + +get_hack_vendor() { + if [ -e "${origTarballPrefix}.tar.gz" ]; then + # if we have the main orig tarball handy, let's prefer that + tar -xzOf "${origTarballPrefix}.tar.gz" --wildcards '*/hack/vendor.sh' + else + # but fall back to grabbing it raw from github otherwise + $curl "https://raw.githubusercontent.com/docker/docker/v${upstreamVer}/hack/vendor.sh" + fi +} + +if libcontainerCommit="$(get_hack_vendor | grep -m1 '^clone git github.com/docker/libcontainer ' | cut -d' ' -f4)" && [ "$libcontainerCommit" ]; then + $curl "https://github.com/docker/libcontainer/archive/${libcontainerCommit}.tar.gz" > "${unprunedTarballPrefix}-libcontainer.tar.gz" + + echo "successfully fetched ${unprunedTarballPrefix}-libcontainer.tar.gz" + echo " (from libcontainer commit $libcontainerCommit)" + + "$(dirname "$(readlink -f "$BASH_SOURCE")")/../repack.sh" --upstream-version "$upstreamVer" "${unprunedTarballPrefix}-libcontainer.tar.gz" +fi + +if libtrustCommit="$(get_hack_vendor | grep -m1 '^clone git github.com/docker/libtrust ' | cut -d' ' -f4)" && [ "$libtrustCommit" ]; then + $curl "https://github.com/docker/libtrust/archive/${libtrustCommit}.tar.gz" > "${unprunedTarballPrefix}-libtrust.tar.gz" + + echo "successfully fetched ${unprunedTarballPrefix}-libtrust.tar.gz" + echo " (from libtrust commit $libtrustCommit)" + + "$(dirname "$(readlink -f "$BASH_SOURCE")")/../repack.sh" --upstream-version "$upstreamVer" "${unprunedTarballPrefix}-libtrust.tar.gz" +fi diff --git a/helpers/gitcommit.sh b/helpers/gitcommit.sh new file mode 100755 index 00000000..c312e8b3 --- /dev/null +++ b/helpers/gitcommit.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -e + +uVersion="$1" +dVersion="$2" + +if [ -z "$uVersion" ]; then + uVersion="$(cat VERSION)" +fi +if [ -z "$dVersion" ]; then + dVersion="$(dpkg-parsechangelog --show-field Version)" +fi + +if [ "${uVersion%-dev}" = "$uVersion" ]; then + # this is a straight-up release! easy-peasy + exec awk '/^'"$uVersion"':/ { print $2 }' debian/upstream-version-gitcommits +fi + +# must be a nightly, so let's look for clues about what the git commit is + +if git rev-parse &> /dev/null; then + # well, this will be easy ;) + exec git rev-parse --short HEAD +fi + +if [ "${dVersion#*+*+}" != "$dVersion" ]; then + # must be something like "1.1.2+10013+8c38a3d-1~utopic1" (nightly!) + commit="${dVersion#*+*+}" + commit="${commit%%-*}" + exec echo "$commit" +fi + +# unknown... +echo >&2 'warning: unable to determine DOCKER_GITCOMMIT' diff --git a/patches/9637-fix-nuke-bashism.patch b/patches/9637-fix-nuke-bashism.patch new file mode 100644 index 00000000..aa6d3088 --- /dev/null +++ b/patches/9637-fix-nuke-bashism.patch @@ -0,0 +1,21 @@ +From: Tianon Gravi +Subject: Fix a bashism and some minor bugs in nuke-graph-directory.sh +Applied-Upstream: https://github.com/docker/docker/pull/9637 (estimated to be in Docker 1.5.0) + +diff --git a/contrib/nuke-graph-directory.sh b/contrib/nuke-graph-directory.sh +index f44c45a..8d12a9d 100755 +--- a/contrib/nuke-graph-directory.sh ++++ b/contrib/nuke-graph-directory.sh +@@ -50,9 +50,10 @@ for mount in $(awk '{ print $5 }' /proc/self/mountinfo); do + done + + # now, let's go destroy individual btrfs subvolumes, if any exist +-if command -v btrfs &> /dev/null; then ++if command -v btrfs > /dev/null 2>&1; then + root="$(df "$dir" | awk 'NR>1 { print $NF }')" +- for subvol in $(btrfs subvolume list -o "$root" 2>/dev/null | awk -F' path ' '{ print $2 }'); do ++ root="${root#/}" # if root is "/", we want it to become "" ++ for subvol in $(btrfs subvolume list -o "$root/" 2>/dev/null | awk -F' path ' '{ print $2 }' | sort -r); do + subvolDir="$root/$subvol" + if dir_in_dir "$subvolDir" "$dir"; then + ( set -x; btrfs subvolume delete "$subvolDir" ) diff --git a/patches/change-system-unit-env-file.patch b/patches/change-system-unit-env-file.patch new file mode 100644 index 00000000..c8caac42 --- /dev/null +++ b/patches/change-system-unit-env-file.patch @@ -0,0 +1,20 @@ +Author: Paul R. Tagliamonte +Last-Update: 2014-05-07 +Description: Use EnvironmentFile with the systemd unit file. +Bug-Debian: http://bugs.debian.org/746774 +Forwarded: no + +diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service +index 0cb31e3..240961c 100644 +--- a/contrib/init/systemd/docker.service ++++ b/contrib/init/systemd/docker.service +@@ -5,7 +5,8 @@ After=network.target docker.socket + Requires=docker.socket + + [Service] +-ExecStart=/usr/bin/docker -d -H fd:// ++EnvironmentFile=-/etc/default/docker ++ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS + LimitNOFILE=1048576 + LimitNPROC=1048576 + diff --git a/patches/enable-non-amd64-arches.patch b/patches/enable-non-amd64-arches.patch new file mode 100644 index 00000000..09640c40 --- /dev/null +++ b/patches/enable-non-amd64-arches.patch @@ -0,0 +1,20 @@ +Author: Paul R. Tagliamonte +Last-Update: 2014-05-07 +Description: Let this build on all platforms. +Applied-Upstream: haha-lololol +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747139 +Forwarded: not-needed + +diff --git a/daemon/daemon.go b/daemon/daemon.go +index 0d27549..0bd9ff6 100644 +--- a/daemon/daemon.go ++++ b/daemon/daemon.go +@@ -1073,7 +1073,7 @@ func (daemon *Daemon) ImageGetCached(imgID string, config *runconfig.Config) (*i + func checkKernelAndArch() error { + // Check for unsupported architectures + if runtime.GOARCH != "amd64" { +- return fmt.Errorf("The Docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) ++ fmt.Fprintf(os.Stderr, "WARNING: The Docker runtime currently only officially supports amd64 (not %s). THIS BUILD IS NOT OFFICIAL AND WILL NOT BE SUPPORTED BY DOCKER UPSTREAM.", runtime.GOARCH) + } + // Check for unsupported kernel versions + // FIXME: it would be cleaner to not test for specific versions, but rather diff --git a/patches/fatal-error-old-kernels.patch b/patches/fatal-error-old-kernels.patch new file mode 100644 index 00000000..dd7f8227 --- /dev/null +++ b/patches/fatal-error-old-kernels.patch @@ -0,0 +1,18 @@ +Description: Docker is unsupported on kernels < 3.8, so this turns the warning into a fatal error (hard failure) +Forwarded: not-needed +Author: Tianon Gravi +Reviewed-by: Paul Tagliamonte + +diff --git a/daemon/daemon.go b/daemon/daemon.go +index 632b9ab..5df7a54 100644 +--- a/daemon/daemon.go ++++ b/daemon/daemon.go +@@ -1129,7 +1129,7 @@ func checkKernelAndArch() error { + } else { + if kernel.CompareKernelVersion(k, &kernel.KernelVersionInfo{Kernel: 3, Major: 8, Minor: 0}) < 0 { + if os.Getenv("DOCKER_NOWARN_KERNEL_VERSION") == "" { +- log.Infof("WARNING: You are running linux kernel version %s, which might be unstable running docker. Please upgrade your kernel to 3.8.0.", k.String()) ++ log.Fatalf("ERROR: You are running Linux kernel version %s, which is unsupported for running Docker. Please upgrade your kernel to 3.8+.", k.String()) + } + } + } diff --git a/patches/series b/patches/series new file mode 100644 index 00000000..dfa5eee1 --- /dev/null +++ b/patches/series @@ -0,0 +1,17 @@ +# Once upstream kills the archive/tar vendoring, remove this patch +upstream-patched-archive-tar.patch + +# Remove this in Docker 1.5.0 +9637-fix-nuke-bashism.patch + +# If upstream ever resolves https://github.com/docker/docker/issues/8969 in a +# reasonable way, remove this patch. +fatal-error-old-kernels.patch + +# Once upstream adds EnvFile, remove this patch. +change-system-unit-env-file.patch +# See also https://github.com/docker/docker/pull/7220#issuecomment-50076589 + +# Upstream deltas: +# -> Let there be light on non-amd64 +enable-non-amd64-arches.patch diff --git a/patches/upstream-patched-archive-tar.patch b/patches/upstream-patched-archive-tar.patch new file mode 100644 index 00000000..232631e1 --- /dev/null +++ b/patches/upstream-patched-archive-tar.patch @@ -0,0 +1,182 @@ +Author: Tianon Gravi +Description: "archive/tar" patch for upstreamed xattrs patch +Applied-Upstream: when golang-1.4 is broadly packaged (scheduled to be released 2014-12-01) + +diff --git a/graph/tags_unit_test.go b/graph/tags_unit_test.go +index da51254..de232cb 100644 +--- a/graph/tags_unit_test.go ++++ b/graph/tags_unit_test.go +@@ -7,11 +7,11 @@ import ( + "path" + "testing" + ++ "archive/tar" + "github.com/docker/docker/daemon/graphdriver" + _ "github.com/docker/docker/daemon/graphdriver/vfs" // import the vfs driver so it is used in the tests + "github.com/docker/docker/image" + "github.com/docker/docker/utils" +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" + ) + + const ( +diff --git a/integration-cli/utils.go b/integration-cli/utils.go +index f3f128e..abea8a3 100644 +--- a/integration-cli/utils.go ++++ b/integration-cli/utils.go +@@ -16,7 +16,7 @@ import ( + "testing" + "time" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + func getExitCode(err error) (int, error) { +diff --git a/integration/api_test.go b/integration/api_test.go +index 8fa295e..9c1ecb2 100644 +--- a/integration/api_test.go ++++ b/integration/api_test.go +@@ -14,11 +14,11 @@ import ( + "testing" + "time" + ++ "archive/tar" + "github.com/docker/docker/api" + "github.com/docker/docker/api/server" + "github.com/docker/docker/engine" + "github.com/docker/docker/runconfig" +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" + ) + + func TestGetContainersJSON(t *testing.T) { +diff --git a/integration/utils_test.go b/integration/utils_test.go +index e1abfa7..c5bc3af 100644 +--- a/integration/utils_test.go ++++ b/integration/utils_test.go +@@ -13,7 +13,7 @@ import ( + "testing" + "time" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + + "github.com/docker/docker/builtins" + "github.com/docker/docker/daemon" +diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go +index 155145f..0c41f1b 100644 +--- a/pkg/archive/archive.go ++++ b/pkg/archive/archive.go +@@ -16,7 +16,7 @@ import ( + "strings" + "syscall" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + + "github.com/docker/docker/pkg/fileutils" + "github.com/docker/docker/pkg/log" +diff --git a/pkg/archive/archive_test.go b/pkg/archive/archive_test.go +index 7c9db44..39c8caf 100644 +--- a/pkg/archive/archive_test.go ++++ b/pkg/archive/archive_test.go +@@ -12,7 +12,7 @@ import ( + "testing" + "time" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + func TestCmdStreamLargeStderr(t *testing.T) { +diff --git a/pkg/archive/changes.go b/pkg/archive/changes.go +index 5fbdcc9..fa96bb8 100644 +--- a/pkg/archive/changes.go ++++ b/pkg/archive/changes.go +@@ -10,7 +10,7 @@ import ( + "syscall" + "time" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + + "github.com/docker/docker/pkg/log" + "github.com/docker/docker/pkg/pools" +diff --git a/pkg/archive/diff.go b/pkg/archive/diff.go +index 5ed1a1d..f20fcb8 100644 +--- a/pkg/archive/diff.go ++++ b/pkg/archive/diff.go +@@ -9,7 +9,7 @@ import ( + "strings" + "syscall" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + + "github.com/docker/docker/pkg/pools" + ) +diff --git a/pkg/archive/diff_test.go b/pkg/archive/diff_test.go +index 758c411..1af10fe 100644 +--- a/pkg/archive/diff_test.go ++++ b/pkg/archive/diff_test.go +@@ -3,7 +3,7 @@ package archive + import ( + "testing" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + func TestApplyLayerInvalidFilenames(t *testing.T) { +diff --git a/pkg/archive/utils_test.go b/pkg/archive/utils_test.go +index 3624fe5..8e26a11 100644 +--- a/pkg/archive/utils_test.go ++++ b/pkg/archive/utils_test.go +@@ -9,7 +9,7 @@ import ( + "path/filepath" + "time" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + var testUntarFns = map[string]func(string, io.Reader) error{ +diff --git a/pkg/archive/wrap.go b/pkg/archive/wrap.go +index b8b6019..dfb335c 100644 +--- a/pkg/archive/wrap.go ++++ b/pkg/archive/wrap.go +@@ -1,8 +1,8 @@ + package archive + + import ( ++ "archive/tar" + "bytes" +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" + "io/ioutil" + ) + +diff --git a/pkg/tarsum/tarsum.go b/pkg/tarsum/tarsum.go +index 6581f3f..ed36494 100644 +--- a/pkg/tarsum/tarsum.go ++++ b/pkg/tarsum/tarsum.go +@@ -11,7 +11,7 @@ import ( + "strconv" + "strings" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + + "github.com/docker/docker/pkg/log" + ) +diff --git a/pkg/tarsum/tarsum_test.go b/pkg/tarsum/tarsum_test.go +index 1e06cda..ef910c3 100644 +--- a/pkg/tarsum/tarsum_test.go ++++ b/pkg/tarsum/tarsum_test.go +@@ -15,7 +15,7 @@ import ( + "os" + "testing" + +- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + type testLayer struct { diff --git a/repack.sh b/repack.sh new file mode 100755 index 00000000..5f1191a4 --- /dev/null +++ b/repack.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Taken from the X Strike Force Build System + +set -e + +if ! [ -d debian/repack/prune ]; then + exit 0 +fi + +if [ "x$1" != x--upstream-version ]; then + exit 1 +fi + +version="$2" +filename="$3" + +if [ -z "$version" ] || ! [ -f "$filename" ]; then + exit 1 +fi + +dir="$(pwd)" +tempdir="$(mktemp -d)" + +cd "$tempdir" +tar xf "$dir/$filename" +cat "$dir"/debian/repack/prune/* | while read file; do + if [ -e */"$file" ]; then + echo "Pruning $file" + rm -rf */"$file" + fi +done + +dfsgfilename="$filename" +if [[ "$dfsgfilename" != *dfsg* ]]; then + dfsgfilename="${dfsgfilename/.orig/~dfsg1.orig}" +fi +tar -czf ${dir}/${dfsgfilename} * +cd "$dir" +rm -rf "$tempdir" +echo "Done pruning upstream tarball into $dfsgfilename" + +exit 0 diff --git a/repack/prune/docs b/repack/prune/docs new file mode 100644 index 00000000..d409ee71 --- /dev/null +++ b/repack/prune/docs @@ -0,0 +1,2 @@ +./docs/sources +./docs/theme diff --git a/repack/prune/vendor b/repack/prune/vendor new file mode 100644 index 00000000..8f3aadbf --- /dev/null +++ b/repack/prune/vendor @@ -0,0 +1 @@ +./vendor diff --git a/rules b/rules new file mode 100755 index 00000000..56103a04 --- /dev/null +++ b/rules @@ -0,0 +1,113 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Tell dh-golang where this package lives upstream +export DH_GOPKG := github.com/docker/docker +# Tell dh-golang that we DO need subpackages +export DH_GOLANG_INSTALL_ALL := 1 + +LIBCONTAINER_GOPKG = github.com/docker/libcontainer +LIBTRUST_GOPKG = github.com/docker/libtrust + +# temporary build path (see http://golang.org/doc/code.html#GOPATH) +export GOPATH := $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE) + +# a few helpful variables for deduplication +INITDIR = /usr/lib/docker.io +INITPATH = ${INITDIR}/dockerinit +DOCKER_VERSION = $(shell cat VERSION) + +export DOCKER_GITCOMMIT := $(shell ./debian/helpers/gitcommit.sh $(DOCKER_VERSION)) +export DOCKER_INITPATH := ${INITPATH} + +# good old Ubuntu needs AppArmor +export DOCKER_BUILDTAGS := apparmor + + +APPARMOR_RECOMMENDS = $(shell dpkg-vendor --is Ubuntu && echo apparmor) +override_dh_gencontrol: + echo 'apparmor:Recommends=$(APPARMOR_RECOMMENDS)' >> debian/docker.io.substvars + dh_gencontrol + + +override_dh_auto_build: + @bash -c '{ [ "$$DOCKER_GITCOMMIT" ]; } || { echo; echo "error: missing DOCKER_GITCOMMIT - see debian/upstream-version-gitcommits"; echo; exit 2; } >&2' + + @# this is especially for easier build-testing of nightlies + @[ -d libcontainer ] || { [ -d vendor/src/$(LIBCONTAINER_GOPKG) ] && ln -sf vendor/src/$(LIBCONTAINER_GOPKG) libcontainer; } + @[ -d libtrust ] || { [ -d vendor/src/$(LIBTRUST_GOPKG) ] && ln -sf vendor/src/$(LIBTRUST_GOPKG) libtrust; } + + @# we need to make sure our multitarball deps are in our GOPATH + @mkdir -p "$$GOPATH/src/$(dir $(LIBCONTAINER_GOPKG))" "$$GOPATH/src/$(dir $(LIBTRUST_GOPKG))" + ln -sf "$$(readlink -f libcontainer)" "$(GOPATH)/src/$(dir $(LIBCONTAINER_GOPKG))" + ln -sf "$$(readlink -f libtrust)" "$(GOPATH)/src/$(dir $(LIBTRUST_GOPKG))" + + ./hack/make.sh dynbinary + + # compile man pages + ./docs/man/md2man-all.sh + + +override_dh_auto_install: + dh_auto_install + + # install docker binary + mkdir -p debian/docker.io/usr/bin + mv bundles/${DOCKER_VERSION}/dynbinary/docker-${DOCKER_VERSION} debian/docker.io/usr/bin/docker + + # install dockerinit binary + mkdir -p debian/docker.io/${INITDIR} + mv bundles/${DOCKER_VERSION}/dynbinary/dockerinit-${DOCKER_VERSION} debian/docker.io/${INITPATH} + + # Most of the source of docker does not make a library, + # so only ship the reusable parts (and in a separate package). + mkdir -p debian/golang-docker-dev/usr/share/gocode/src/${DH_GOPKG} + mv -v \ + debian/tmp/usr/share/gocode/src/${DH_GOPKG}/pkg \ + debian/golang-docker-dev/usr/share/gocode/src/${DH_GOPKG}/ + mkdir -p debian/golang-docker-dev/usr/share/gocode/src/$(dir $(LIBCONTAINER_GOPKG)) + @# this is especially for easier build-testing of nightlies + @[ -d debian/tmp/usr/share/gocode/src/${DH_GOPKG}/libcontainer ] || { [ -d debian/tmp/usr/share/gocode/src/${DH_GOPKG}/vendor/src/$(LIBCONTAINER_GOPKG) ] && mv debian/tmp/usr/share/gocode/src/${DH_GOPKG}/vendor/src/$(LIBCONTAINER_GOPKG) debian/tmp/usr/share/gocode/src/${DH_GOPKG}/libcontainer; } + mv -v \ + debian/tmp/usr/share/gocode/src/${DH_GOPKG}/libcontainer \ + debian/golang-docker-dev/usr/share/gocode/src/$(dir $(LIBCONTAINER_GOPKG)) + rm -rf debian/tmp/usr/share/gocode + + +# the SHA1 of dockerinit is important: don't strip it +# also, Go has lots of problems with stripping, so just don't +override_dh_strip: + + +override_dh_auto_test: + + +override_dh_installinit: + dh_installinit --name=docker + +override_dh_systemd_enable: + dh_systemd_enable -pdocker.io --no-enable docker.service + dh_systemd_enable -pdocker.io docker.socket + +override_dh_systemd_start: + dh_systemd_start -pdocker.io --no-start docker.service + dh_systemd_start -pdocker.io docker.socket + + +override_dh_installchangelogs: + dh_installchangelogs CHANGELOG.md + + +override_dh_installudev: + # use priority z80 to match the upstream priority of 80 + dh_installudev --priority=z80 + + +override_dh_auto_clean: + # bundles is created by hack/make.sh + # docs/man/man*/ is created by docs/man/md2man-all.sh + rm -rf bundles docs/man/man*/ + + +%: + dh $@ --buildsystem=golang --with=golang,systemd,bash-completion diff --git a/source.lintian-overrides b/source.lintian-overrides new file mode 100644 index 00000000..8b17d44d --- /dev/null +++ b/source.lintian-overrides @@ -0,0 +1,6 @@ +docker.io source: source-contains-unsafe-symlink utils/testdata/fs/g +docker.io source: source-contains-unsafe-symlink utils/testdata/fs/a/d +# Hilariously, these are used to test unsafe symlinks. +# much testing +# wow +# very unsafe diff --git a/source/format b/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/upstream-version-gitcommits b/upstream-version-gitcommits new file mode 100644 index 00000000..18c4e8b5 --- /dev/null +++ b/upstream-version-gitcommits @@ -0,0 +1,40 @@ +# To determine the proper value for this, download +# https://get.docker.io/builds/Linux/x86_64/docker-VERSION, chmod +x, and then +# run ./docker-VERSION -v, which will list the exact build hash needed. + +0.5.3: 17c92b8 +0.6.0: f4a4f1c +0.6.1: 5105263 +0.6.2: 081543c +0.6.3: b0a49a3 +0.6.4: 2f74b1c +0.6.5: 3ff8459 +0.6.6: 6d42040 +0.6.7: cb48ecc +0.7.0: 0d078b6 +0.7.1: 88df052 +0.7.2: 28b162e +0.7.3: 8502ad4 +0.7.4: 010d74e +0.7.5: c348c04 +0.7.6: bc3b2ec +0.8.0: cc3a8c8 +0.8.1: a1598d1 +0.9.0: 2b3fdf2 +0.9.1: 3600720 +0.10.0: dc9c28f +0.11.0: 15209c3 +0.11.1: fb99f99 +0.12.0: 14680bf +1.0.0: 63fe64c +1.0.1: 990021a +1.1.0: 79812e3 +1.1.1: bd609d2 +1.1.2: d84a070 +1.2.0: fa7b24f +1.3.0: c78088f +1.3.1: 4e9bbfa +1.3.2: 39fa2fa +1.3.3: d344625 +1.4.0: 4595d4f +1.4.1: 5bc2ff8 diff --git a/vim-syntax-docker.install b/vim-syntax-docker.install new file mode 100644 index 00000000..bcc58c5d --- /dev/null +++ b/vim-syntax-docker.install @@ -0,0 +1,4 @@ +contrib/syntax/vim/doc/* /usr/share/vim/addons/doc/ +contrib/syntax/vim/ftdetect/* /usr/share/vim/addons/ftdetect/ +contrib/syntax/vim/syntax/* /usr/share/vim/addons/syntax/ +debian/vim-syntax-docker.yaml /usr/share/vim/registry/ diff --git a/vim-syntax-docker.yaml b/vim-syntax-docker.yaml new file mode 100644 index 00000000..517b5914 --- /dev/null +++ b/vim-syntax-docker.yaml @@ -0,0 +1,6 @@ +addon: dockerfile +description: "Addon to highlight Docker's Dockerfiles" +files: + - doc/dockerfile.txt + - ftdetect/dockerfile.vim + - syntax/dockerfile.vim diff --git a/watch b/watch new file mode 100644 index 00000000..05c1f00e --- /dev/null +++ b/watch @@ -0,0 +1,6 @@ +version=3 +opts=\ +dversionmangle=s/[+~](debian|dfsg|ds|deb)\d*$//,\ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,\ +filenamemangle=s/.+\/v(\d\S*)\.tar\.gz/docker.io_$1.orig.tar.gz/ \ + https://github.com/docker/docker/tags .*/v(\d\S*)\.tar\.gz debian ./debian/repack.sh -- 2.30.2