diff options
author | sy1124.kim <sy1124.kim@samsung.com> | 2017-08-25 14:43:16 +0900 |
---|---|---|
committer | sy1124.kim <sy1124.kim@samsung.com> | 2017-08-25 14:43:16 +0900 |
commit | ef90fda9f2bf89ae5e317b6fc3169401829dd0dd (patch) | |
tree | 0940705e1d2a643fc1956f284d4e5b3cd6ce3c6c | |
parent | 670d0a290c97aa4b0cb7564660c3e3f904d5f216 (diff) | |
download | docker-engine-ef90fda9f2bf89ae5e317b6fc3169401829dd0dd.tar.gz docker-engine-ef90fda9f2bf89ae5e317b6fc3169401829dd0dd.tar.bz2 docker-engine-ef90fda9f2bf89ae5e317b6fc3169401829dd0dd.zip |
Add packaging folder
m--------- | ext/containerd | 0 | ||||
-rw-r--r-- | packaging/containerd.tar.bz2 | bin | 0 -> 2469411 bytes | |||
-rw-r--r-- | packaging/docker-ce.tar.bz2 | bin | 0 -> 7554669 bytes | |||
-rwxr-xr-x | packaging/docker-engine.manifest | 5 | ||||
-rwxr-xr-x | packaging/docker-engine.spec | 128 | ||||
-rw-r--r-- | packaging/gitmodules.sh | 23 | ||||
-rw-r--r-- | packaging/go1.8.3.linux-amd64.tar.gz | bin | 0 -> 62441961 bytes | |||
-rw-r--r-- | packaging/go1.8.3.linux-armv7.tar.gz | bin | 0 -> 62254683 bytes | |||
-rw-r--r-- | packaging/runc.tar.bz2 | bin | 0 -> 743699 bytes |
9 files changed, 156 insertions, 0 deletions
diff --git a/ext/containerd b/ext/containerd -Subproject 26183b3a69a36f426785cdefe1bc9e8e233596d +Subproject 6e23458c129b551d5c9871e5174f6b1b7f6d117 diff --git a/packaging/containerd.tar.bz2 b/packaging/containerd.tar.bz2 Binary files differnew file mode 100644 index 0000000..723c7c7 --- /dev/null +++ b/packaging/containerd.tar.bz2 diff --git a/packaging/docker-ce.tar.bz2 b/packaging/docker-ce.tar.bz2 Binary files differnew file mode 100644 index 0000000..26ddbd4 --- /dev/null +++ b/packaging/docker-ce.tar.bz2 diff --git a/packaging/docker-engine.manifest b/packaging/docker-engine.manifest new file mode 100755 index 0000000..97e8c31 --- /dev/null +++ b/packaging/docker-engine.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/docker-engine.spec b/packaging/docker-engine.spec new file mode 100755 index 0000000..ccdd2c8 --- /dev/null +++ b/packaging/docker-engine.spec @@ -0,0 +1,128 @@ +%define project_path /src/github.com/docker +%define runc_path /src/github.com/opencontainers +%define container_path /src/github.com/containerd +%define go_version 1.8.3 +%define orig_version %{version}-ce + +Name: docker-engine +Version: 17.06.1 +Release: 0 +Summary: The open-source application container engine +Group: Tools/Docker + +License: ASL 2.0 +Source0: %{name}.tar.gz +Source1: %{name}.manifest +Source11: go1.8.3.linux-amd64.tar.gz +Source12: go1.8.3.linux-armv7.tar.gz +Source13: docker-ce.tar.bz2 +Source14: containerd.tar.bz2 +Source15: runc.tar.bz2 + +BuildRequires: git +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +Requires: docker-containerd +Requires: docker-runc + + +%description +Docker is an open source project to build, ship and run any application as a +lightweight container. + +Docker containers are both hardware-agnostic and platform-agnostic. This means +they can run anywhere, from your laptop to the largest EC2 compute instance and +everything in between - and they don't require you to use a particular +language, framework or packaging system. That makes them great building blocks +for deploying and scaling web apps, databases, and backend services without +depending on a particular stack or provider. + + + +%prep +%setup -q + +%ifarch armv7l +cp %{SOURCE12} . +tar -zxf %{SOURCE12} +rm -f %{_builddir}/%{name}-%{version}/go%{go_version}.linux-armv7.tar.gz +%endif +%ifarch x86_64 +cp %{SOURCE11} . +tar -zxf %{SOURCE11} +rm -f %{_builddir}/%{name}-%{version}/go%{go_version}.linux-amd64.tar.gz +%endif +chmod g-w %_sourcedir/* +cp %{SOURCE1} ./%{name}.manifest +cp %{SOURCE13} . +tar -xvf %{SOURCE13} +cp %{SOURCE14} . +tar -xvf %{SOURCE14} +cp %{SOURCE15} . +tar -xvf %{SOURCE15} + +mkdir -p .%project_path/ +mkdir -p .%runc_path/ +mkdir -p .%project_path/engine +mkdir -p .%project_path/cli +mkdir -p .%runc_path/runc +mkdir -p .%container_path/containerd + +cd ext/docker-ce/components/engine +mv `ls . | grep -v packaging | grep -v src` ../../../..%project_path/engine +cd ../cli/ +mv `ls . | grep -v packaging | grep -v src` ../../../..%project_path/cli +cd ../../../containerd/ +mv `ls . | grep -v packaging | grep -v src` ../..%container_path/containerd +cd ../runc/ +mv `ls . | grep -v packaging | grep -v src` ../..%runc_path/runc +cd ../../ + + +%build +cd .%project_path/engine +export GOROOT=%{_builddir}/%{name}-%{version}/go +export PATH=$PATH:%{_builddir}/%{name}-%{version}/go/bin +export GOPATH=%{_builddir}/%{name}-%{version} +export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper' + +go env +echo 'docker daemon' +export CGO_ENABLED=1 +AUTO_GOPATH=1 ./hack/make.sh dynbinary + +echo 'docker cli' +cd ../cli +make binary + +export BUILDTAGS=no_btrfs +echo 'containerd build' +cd ../../containerd/containerd +make + +echo 'runc build' +cd ../../opencontainers/runc +make all BUILDTAGS="" + + +%install +rm -rf %{buildroot} +# install binary +install -d $RPM_BUILD_ROOT/%{_bindir} +install -p -m 755 .%project_path/cli/build/docker-linux-arm $RPM_BUILD_ROOT/%{_bindir}/docker +install -p -m 755 .%project_path/engine/bundles/%{orig_version}/dynbinary-daemon/dockerd-%{orig_version} $RPM_BUILD_ROOT/%{_bindir}/dockerd +install -p -m 755 .%runc_path/runc/runc $RPM_BUILD_ROOT/%{_bindir}/docker-runc +install -p -m 755 .%container_path/containerd/bin/containerd $RPM_BUILD_ROOT/%{_bindir}/docker-containerd +install -p -m 755 .%container_path/containerd/bin/containerd-shim $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-shim +install -p -m 755 .%container_path/containerd/bin/ctr $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-ctr + +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) +/%{_bindir}/docker +/%{_bindir}/dockerd +/%{_bindir}/docker-containerd +/%{_bindir}/docker-containerd-shim +/%{_bindir}/docker-containerd-ctr +/%{_bindir}/docker-runc + diff --git a/packaging/gitmodules.sh b/packaging/gitmodules.sh new file mode 100644 index 0000000..a0b00e5 --- /dev/null +++ b/packaging/gitmodules.sh @@ -0,0 +1,23 @@ +#! /bin/sh +# @author: Philippe Coval <mailto:philippe.coval@eurogiciel.fr> +# @description: manage git submodules with git-build-package-rpm + +set -x +set -e + +cat .gitmodules || return 1 + +git submodule status | awk '{ print $2 }' | while read dir ; do + name=$(basename "$dir" ) + echo "name=" + echo "dir=$dir" + git submodule init + git submodule update + + tar cjvf "./packaging/${name}.tar.bz2" "${dir}" + +cat<<EOF +# Please add "SourceN: $name.tar.bz2" and "%setup -q -a N" to "packaging/*.spec" +EOF + +done diff --git a/packaging/go1.8.3.linux-amd64.tar.gz b/packaging/go1.8.3.linux-amd64.tar.gz Binary files differnew file mode 100644 index 0000000..435aa8f --- /dev/null +++ b/packaging/go1.8.3.linux-amd64.tar.gz diff --git a/packaging/go1.8.3.linux-armv7.tar.gz b/packaging/go1.8.3.linux-armv7.tar.gz Binary files differnew file mode 100644 index 0000000..26e9b10 --- /dev/null +++ b/packaging/go1.8.3.linux-armv7.tar.gz diff --git a/packaging/runc.tar.bz2 b/packaging/runc.tar.bz2 Binary files differnew file mode 100644 index 0000000..d564bfa --- /dev/null +++ b/packaging/runc.tar.bz2 |