From e25c8dd396156607e38c892e2a7ba6c07ee41633 Mon Sep 17 00:00:00 2001 From: xulei Date: Mon, 4 Sep 2023 09:28:00 +0000 Subject: [PATCH 1/2] Fix the conflict libnetwork installation Signed-off-by: xulei --- moby.spec | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/moby.spec b/moby.spec index ea316d9..026288d 100644 --- a/moby.spec +++ b/moby.spec @@ -3,11 +3,10 @@ %global _source_engine moby-%{version} %global _source_client cli-%{version} %global _source_docker_init tini-0.19.0 -%global _source_docker_proxy libnetwork-dcdf8f17 Name: moby Version: 20.10.24 -Release: 3 +Release: 4 Summary: The open-source application container engine License: ASL 2.0 URL: https://www.docker.com @@ -18,13 +17,12 @@ Source1: moby-%{version}.tar.gz # https://github.com/krallin/tini/archive/refs/tags/v0.19.0.tar.gz Source2: tini-0.19.0.tar.gz # https://github.com/moby/libnetwork @dcdf8f176d1e13ad719e913e796fb698d846de98 -Source3: libnetwork-dcdf8f17.tar.gz -Source4: docker.service -Source5: docker.socket -Source6: docker.sysconfig -Source7: apply-patches -Source8: series.conf -Source9: patch.tar.gz +Source3: docker.service +Source4: docker.socket +Source5: docker.sysconfig +Source6: apply-patches +Source7: series.conf +Source8: patch.tar.gz Requires: %{name}-engine = %{version}-%{release} @@ -74,6 +72,7 @@ BuildRequires: systemd-devel BuildRequires: tar BuildRequires: which BuildRequires: golang >= 1.18.0 +BuildRequires: docker-proxy %description engine Docker daemon binary and related utilities @@ -91,12 +90,11 @@ Docker client binary and related utilities %setup -q -n %{_source_client} %setup -q -T -n %{_source_engine} -b 1 %setup -q -T -n %{_source_docker_init} -b 2 -%setup -q -T -n %{_source_docker_proxy} -b 3 cd %{_builddir} +cp %{SOURCE6} . cp %{SOURCE7} . cp %{SOURCE8} . -cp %{SOURCE9} . sh ./apply-patches @@ -116,17 +114,6 @@ cmake . make tini-static popd -# build docker-proxy -pushd %{_builddir}/%{_source_docker_proxy} -mkdir -p .gopath/src/github.com/docker/libnetwork -export GOPATH=`pwd`/.gopath -rm -rf .gopath/src/github.com/docker/libnetwork -ln -s %{_builddir}/%{_source_docker_proxy} .gopath/src/github.com/docker/libnetwork -pushd .gopath/src/github.com/docker/libnetwork -go build -buildmode=pie -ldflags=-linkmode=external -o docker-proxy github.com/docker/libnetwork/cmd/proxy -popd -popd - # build cli pushd %{_builddir}/%{_source_client} mkdir -p .gopath/src/github.com/docker/cli @@ -152,17 +139,17 @@ ver="$(%{_builddir}/%{_source_client}/build/docker --version)"; \ install -D -p -m 0755 $(readlink -f %{_builddir}/%{_source_engine}/bundles/dynbinary-daemon/dockerd) %{buildroot}%{_bindir}/dockerd # install proxy -install -D -p -m 0755 %{_builddir}/%{_source_docker_proxy}/docker-proxy %{buildroot}%{_bindir}/docker-proxy +install -D -p -m 0755 /usr/bin/docker-proxy %{buildroot}%{_bindir}/docker-proxy # install tini install -D -p -m 755 %{_builddir}/%{_source_docker_init}/tini-static %{buildroot}%{_bindir}/docker-init # install systemd scripts -install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/docker.service -install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/docker.socket +install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/docker.service +install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/docker.socket # for additional args -install -Dpm 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/docker +install -Dpm 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/docker # install docker client install -p -m 0755 $(readlink -f %{_builddir}/%{_source_client}/build/docker) %{buildroot}%{_bindir}/docker @@ -210,6 +197,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Mon Sep 4 2023 xulei - 20.10.24-4 +- Fix the conflict libnetwork installation + * Fri Aug 18 2023 jiangxinyu - 20.10.24-3 - Fix build error -- Gitee From 28c6cd0309444036925d6000f9a710cdcd58776c Mon Sep 17 00:00:00 2001 From: xulei Date: Mon, 4 Sep 2023 09:48:59 +0000 Subject: [PATCH 2/2] update moby.spec. Signed-off-by: xulei --- moby.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moby.spec b/moby.spec index 026288d..dca5d17 100644 --- a/moby.spec +++ b/moby.spec @@ -16,7 +16,6 @@ Source0: cli-%{version}.tar.gz Source1: moby-%{version}.tar.gz # https://github.com/krallin/tini/archive/refs/tags/v0.19.0.tar.gz Source2: tini-0.19.0.tar.gz -# https://github.com/moby/libnetwork @dcdf8f176d1e13ad719e913e796fb698d846de98 Source3: docker.service Source4: docker.socket Source5: docker.sysconfig @@ -51,6 +50,7 @@ Requires: libcgroup Requires: containerd Requires: tar Requires: xz +Requires: libnetwork BuildRequires: bash BuildRequires: ca-certificates @@ -72,7 +72,6 @@ BuildRequires: systemd-devel BuildRequires: tar BuildRequires: which BuildRequires: golang >= 1.18.0 -BuildRequires: docker-proxy %description engine Docker daemon binary and related utilities -- Gitee