From d562057470a681a55ecef15fe83dbdfa2e2a3c06 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Fri, 4 Oct 2024 22:57:15 +0700 Subject: [PATCH] moby-addons: do not hard-depend on Docker (#2185) --- anda/docker/moby-buildx/moby-buildx.spec | 12 ++++++------ anda/docker/moby-compose/moby-compose.spec | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/anda/docker/moby-buildx/moby-buildx.spec b/anda/docker/moby-buildx/moby-buildx.spec index f925d5ee86..7ce35cf753 100644 --- a/anda/docker/moby-buildx/moby-buildx.spec +++ b/anda/docker/moby-buildx/moby-buildx.spec @@ -12,8 +12,11 @@ Source0: %{url}/archive/refs/tags/v%{version}.tar.gz BuildRequires: go-rpm-macros BuildRequires: git-core BuildRequires: gcc -Requires: docker +BuildRequires: anda-srpm-macros + Provides: docker-buildx = %{version}-%{release} +Provides: docker-buildx-cli = %{version}-%{release} + %description buildx is a Docker CLI plugin for extended build capabilities with BuildKit. @@ -21,18 +24,15 @@ buildx is a Docker CLI plugin for extended build capabilities with BuildKit. %prep %autosetup -n buildx-%{version} -go mod download %build export CGO_ENABLED=1 -go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w -extldflags '--static-pie'" \ - -buildmode=pie -tags 'osusergo,netgo,static_build' -v -x \ - -o docker-buildx ./cmd/buildx +%go_build_online ./cmd/buildx %install -install -D -m 0755 docker-buildx %{buildroot}%{_libexecdir}/docker/cli-plugins/docker-buildx +install -D -m 0755 build/bin/cmd/buildx %{buildroot}%{_libexecdir}/docker/cli-plugins/docker-buildx %files diff --git a/anda/docker/moby-compose/moby-compose.spec b/anda/docker/moby-compose/moby-compose.spec index b5a622131f..83d994e5da 100644 --- a/anda/docker/moby-compose/moby-compose.spec +++ b/anda/docker/moby-compose/moby-compose.spec @@ -1,8 +1,8 @@ %define debug_package %{nil} Name: moby-compose -Version: 2.29.7 -Release: 1%?dist +Version: 2.29.2 +Release: 2%?dist Summary: Define and run multi-container applications with Docker License: Apache-2.0 @@ -13,7 +13,6 @@ Source0: %{url}archive/refs/tags/v%{version}.tar.gz BuildRequires: go-rpm-macros BuildRequires: git-core BuildRequires: docker -Requires: docker Provides: docker-compose = %{version}-%{release} Provides: docker-compose-cli = %{version}-%{release}