Accepting request 241204 from Virtualization

Fix ExclusiveArch statement

OBS-URL: https://build.opensuse.org/request/show/241204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/docker?expand=0&rev=1
This commit is contained in:
Stephan Kulow 2014-07-17 15:31:28 +00:00 committed by Git OBS Bridge
commit 539c9691f1
12 changed files with 1452 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,32 @@
From 86a768c5a830220024a56495f18e88bfc21f3aac Mon Sep 17 00:00:00 2001
From: Flavio Castelli <fcastelli@suse.com>
Date: Wed, 26 Mar 2014 17:50:19 +0100
Subject: [PATCH 2/2] Stripped dockerinit binary
The sha1sum of `dockerinit` is hardcoded into `docker` binary and is
checked at runtime. OBS strips the debugging symbols from all the
binaries (and hence also from `dockerinit`). That causes the sha1sum of
the installed file to be different from the value computed inside of the
buildroot.
This commit strips the debugging symbols from `dockerinit` _before_ the
`docker` binary is built. Avoiding all the runtime errors.
---
hack/make/dynbinary | 1 +
1 file changed, 1 insertion(+)
diff --git a/hack/make/dynbinary b/hack/make/dynbinary
index 75cffe3..0143a9c 100644
--- a/hack/make/dynbinary
+++ b/hack/make/dynbinary
@@ -15,6 +15,7 @@ if [ -z "$DOCKER_CLIENTONLY" ]; then
./dockerinit
echo "Created binary: $DEST/dockerinit-$VERSION"
ln -sf "dockerinit-$VERSION" "$DEST/dockerinit"
+ /usr/bin/strip -g $DEST/dockerinit
hash_files "$DEST/dockerinit-$VERSION"
--
1.8.4.5

5
80-docker.rules Normal file
View File

@ -0,0 +1,5 @@
# hide docker's loopback devices from udisks, and thus from user desktops
SUBSYSTEM=="block", ENV{DM_NAME}=="docker-*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1"
SUBSYSTEM=="block", DEVPATH=="/devices/virtual/block/loop*", ATTR{loop/backing_file}=="/var/lib/docker/*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1"

3
docker-1.1.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31517dc1f2d4a75827a1f5011bd4a00aff6b8132618f7cf8a34c2ec395550983
size 6436187

6
docker-rpmlintrc Normal file
View File

@ -0,0 +1,6 @@
addFilter ("^docker.x86_64: W: statically-linked-binary /usr/lib64/docker/dockerinit")
addFilter ("^docker-bash-completion.noarch: W: sourced-script-with-shebang /etc/bash_completion.d/docker bash")
addFilter ("^docker.x86_64: W: statically-linked-binary /usr/lib/docker/dockerinit")
addFilter ("^docker.x86_64: W: unstripped-binary-or-object /usr/lib/docker/dockerinit")
addFilter ("^docker.x86_64: W: no-manual-page-for-binary docker")
addFilter ("^docker.x86_64: W: no-manual-page-for-binary nsinit")

1180
docker.changes Normal file

File diff suppressed because it is too large Load Diff

14
docker.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=Docker
Requires=network.target
After=multi-user.target
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/docker
ExecStart=/usr/bin/docker -d $DOCKER_OPTS
ExecStartPre=/usr/sbin/sysctl -p /etc/sysctl.d/200-docker.conf
[Install]
WantedBy=multi-user.target

11
docker.socket Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target

167
docker.spec Normal file
View File

@ -0,0 +1,167 @@
# spec file for package docker
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define git_version dc62f3c
Name: docker
Version: 1.1.1
Release: 0
Summary: The Linux container runtime
License: Apache-2.0
Group: System/Management
Url: http://www.docker.io
Source: %{name}-%{version}.tar.bz2
Source1: docker.service
Source2: sysctl-docker.conf
Source3: 80-docker.rules
Source4: sysconfig.docker
Source5: docker.socket
Source6: docker-rpmlintrc
Patch0: 0002-Stripped-dockerinit-binary.patch
BuildRequires: bash-completion
BuildRequires: device-mapper-devel >= 1.2.68
BuildRequires: glibc-devel-static
BuildRequires: go >= 1.2
BuildRequires: libbtrfs-devel >= 3.8
BuildRequires: procps
BuildRequires: sqlite3-devel
BuildRequires: systemd-devel
BuildRequires: zsh
Requires: bridge-utils
Requires: ca-certificates-mozilla
Requires: git-core >= 1.7
Requires: iproute2 >= 3.5
Requires: iptables >= 1.4
Requires: kernel >= 3.8.0
Requires: lvm2 >= 2.2.89
Requires: procps
Requires: tar >= 1.26
Requires: xz >= 4.9
Conflicts: lxc >= 1.0
PreReq: %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: x86_64
%description
Docker complements LXC 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.
%package bash-completion
Summary: Bash Completion for %{name}
Group: System/Management
Requires: %{name} = %{version}
Requires: bash-completion
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Management
Requires: %{name} = %{version}
Requires: zsh
BuildArch: noarch
%description zsh-completion
Zsh command line completion support for %{name}.
%prep
%setup -q -n docker
%patch0 -p1
%build
%{go_disable_brp_strip_static_archive}
export GOPATH=`pwd`/vendor
mkdir vendor/src/github.com/dotcloud
ln -s `pwd` vendor/src/github.com/dotcloud/
export DOCKER_BUILDTAGS="exclude_graphdriver_aufs"
export DOCKER_GITCOMMIT=%{git_version}
./hack/make.sh dynbinary
%install
install -d %{buildroot}%{go_contribdir}
install -d %{buildroot}%{_bindir}
install -D -m755 bundles/%{version}/dynbinary/%{name}-%{version} %{buildroot}/%{_bindir}/%{name}
install -d %{buildroot}/%{_prefix}/lib/docker
install -D -m755 bundles/%{version}/dynbinary/dockerinit-%{version} %{buildroot}/%{_prefix}/lib/docker/dockerinit
install -Dd -m 0755 \
%{buildroot}%{_sysconfdir}/init.d \
%{buildroot}%{_sbindir}
install -D -m0644 contrib/completion/bash/docker "%{buildroot}/etc/bash_completion.d/%{name}"
install -D -m0644 contrib/completion/zsh/_docker "%{buildroot}/etc/zsh_completion.d/%{name}"
#
# systemd service
#
install -D -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 %SOURCE5 %{buildroot}%{_unitdir}/%{name}.socket
install -D -m 0644 %SOURCE2 %{buildroot}%{_sysconfdir}/sysctl.d/200-%{name}.conf
#
# udev rules that prevents dolphin to show all docker devices and slows down
# upstream report https://bugs.kde.org/show_bug.cgi?id=329930
#
install -D -m 0644 %SOURCE3 %{buildroot}%{_prefix}/lib/udev/rules.d/80-%{name}.rules
# sysconfig file
install -D -m 644 %SOURCE4 %{buildroot}/var/adm/fillup-templates/sysconfig.docker
%pre
echo "creating group docker..."
groupadd -r docker 2>/dev/null || :
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%{fillup_only -n docker}
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root)
%doc README.md LICENSE
%{_bindir}/docker
%config %{_sysconfdir}/sysctl.d/200-docker.conf
%{_prefix}/lib/docker/
%{_prefix}/lib/docker/dockerinit
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%{_prefix}/lib/udev/rules.d/80-%{name}.rules
/var/adm/fillup-templates/sysconfig.docker
%files bash-completion
%defattr(-,root,root)
%config %{_sysconfdir}/bash_completion.d/%{name}
%files zsh-completion
%defattr(-,root,root)
%config %{_sysconfdir}/zsh_completion.d/%{name}
%changelog

8
sysconfig.docker Normal file
View File

@ -0,0 +1,8 @@
## Path : System/Management
## Description : Extra cli switches for docker daemon
## Type : string
## Default : ""
## ServiceRestart : docker
#
DOCKER_OPTS=""

2
sysctl-docker.conf Normal file
View File

@ -0,0 +1,2 @@
# Enable IPv4 forward, required to have working network within the containers
net.ipv4.ip_forward = 1