commit 4267d85146cd245ba3ffd5bdea38d2e45dc39731 Author: Sergey Cherevko Date: Wed Jul 24 14:03:36 2024 +0300 Import docker-buildx-plugin-0.15.1-1.el9 diff --git a/.docker-buildx-plugin.metadata b/.docker-buildx-plugin.metadata new file mode 100644 index 0000000..05822aa --- /dev/null +++ b/.docker-buildx-plugin.metadata @@ -0,0 +1 @@ +ed854defd438b2d6cb681cf7a4483cc4a09ffbe6 SOURCES/buildx.tgz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..264763e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/buildx.tgz diff --git a/SPECS/docker-buildx-plugin.spec b/SPECS/docker-buildx-plugin.spec new file mode 100644 index 0000000..1abb4f9 --- /dev/null +++ b/SPECS/docker-buildx-plugin.spec @@ -0,0 +1,53 @@ +%global debug_package %{nil} + +Name: docker-buildx-plugin +Version: %{_buildx_rpm_version} +Release: %{_release}%{?dist} +Epoch: 0 +Source0: buildx.tgz +Summary: Docker Buildx plugin for the Docker CLI +Group: Tools/Docker +License: ASL 2.0 +URL: https://github.com/docker/buildx +Vendor: Docker +Packager: Docker + +BuildRequires: bash + +%description +Docker Buildx plugin for the Docker CLI. + +%prep +%setup -q -c -n src -a 0 + +%build +pushd ${RPM_BUILD_DIR}/src/buildx + GO111MODULE=on \ + CGO_ENABLED=0 \ + go build \ + -mod=vendor \ + -trimpath \ + -ldflags="-X github.com/docker/buildx/version.Version=%{_buildx_version} -X github.com/docker/buildx/version.Revision=%{_buildx_gitcommit} -X github.com/docker/buildx/version.Package=github.com/docker/buildx" \ + -o "bin/docker-buildx" \ + ./cmd/buildx +popd + +%check +ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-buildx docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \ + test "$ver" = "%{_buildx_version}" && echo "PASS: docker-buildx version OK" || (echo "FAIL: docker-buildx version ($ver) did not match" && exit 1) + +%install +pushd ${RPM_BUILD_DIR}/src/buildx +install -D -p -m 0755 bin/docker-buildx ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-buildx +popd + +%files +%{_libexecdir}/docker/cli-plugins/docker-buildx + +%post + +%preun + +%postun + +%changelog