diff options
Diffstat (limited to 'packaging/docker-engine.spec')
-rwxr-xr-x | packaging/docker-engine.spec | 118 |
1 files changed, 18 insertions, 100 deletions
diff --git a/packaging/docker-engine.spec b/packaging/docker-engine.spec index 355eb3d..047607a 100755 --- a/packaging/docker-engine.spec +++ b/packaging/docker-engine.spec @@ -1,11 +1,8 @@ -%define docker_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 +%define orig_version 17.06.0-dev Name: docker-engine -Version: 17.06.1 +Version: 0.7.0 Release: 0 Summary: The open-source application container engine Group: Tools/Docker @@ -16,11 +13,7 @@ Source0: %{name}.tar.gz Source1: %{name}.manifest Source2: %{name}.service Source3: %{name}.socket -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 +Source11: docker-engine.tar.bz2 Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -38,112 +31,37 @@ 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 -# docker-ce tar file -cp %{SOURCE13} . -tar -xvf %{SOURCE13} - -# containerd tar file -cp %{SOURCE14} . -tar -xvf %{SOURCE14} - -# runc tar file -cp %{SOURCE15} . -tar -xvf %{SOURCE15} - -## set docker build folder -mkdir -p .%docker_path/ -mkdir -p .%docker_path/engine -mkdir -p .%docker_path/cli -mkdir -p .%container_path/containerd -mkdir -p .%runc_path/ -mkdir -p .%runc_path/runc - -cd ext/docker-ce/components/engine -mv `ls . | grep -v packaging | grep -v src` ../../../..%docker_path/engine -cd ../cli/ -mv `ls . | grep -v packaging | grep -v src` ../../../..%docker_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 ../../ +# docker-engine tar file +cp %{SOURCE11} . +tar -xvf %{SOURCE11} ## service cp %{SOURCE2} ./%{name}.services cp %{SOURCE3} ./%{name}.socket -%build -cd .%docker_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 "skip docker daemon build" -echo "will be used from docker-ec build result" -###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 .%docker_path/cli/build/docker-linux-arm $RPM_BUILD_ROOT/%{_bindir}/docker -install -p -m 755 .%docker_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 -mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants -### mkdir -p %{buildroot}/usr/lib/systemd/system/sockets.target.wants -### install -m 0644 %SOURCE2 %{buildroot}/usr/lib/systemd/system/%{name}.service -### ln -s ../%{name}.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/ -### install -m 0644 %SOURCE3 %{buildroot}/usr/lib/systemd/system/%{name}.socket -### ln -s ../%{name}.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/ +install -p -m 755 ./docker-engine/docker $RPM_BUILD_ROOT/%{_bindir}/docker + +%post +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/docker-containerd +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-ctr +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-shim +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/docker-proxy +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/docker-runc +ln -sf docker $RPM_BUILD_ROOT/%{_bindir}/dockerd + %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 -### /usr/lib/systemd/system/%{name}.service -### /usr/lib/systemd/system/multi-user.target.wants/%{name}.service -### /usr/lib/systemd/system/%{name}.socket -### /usr/lib/systemd/system/sockets.target.wants/%{name}.socket -%license .%docker_path/engine/LICENSE +/%{_bindir}/docker* +%license ./LICENSE |