diff --git a/docker-compose-plugin.spec b/docker-compose-plugin.spec new file mode 100644 index 0000000000000000000000000000000000000000..c5edafba42ab0bb47bfb975969fbdda6d0920a59 --- /dev/null +++ b/docker-compose-plugin.spec @@ -0,0 +1,74 @@ +%define anolis_release 1 +%global debug_package %{nil} + +Name: docker-compose-plugin +Version: 2.26.1 +Release: %{anolis_release}%{dist} +Summary: Define and run multi-container applications with Docker +License: Apache-2.0 +URL: https://github.com/docker/compose +Source: https://github.com/docker/compose/archive/refs/tags/v%{version}.tar.gz +Source1: vendor.tar.gz +BuildRequires: golang >= 1.21 +Requires: docker + + +%description +Docker Compose is a tool for running multi-container applications on Docker defined using the Compose file format. A Compose file is used to define how the one or more containers that make up your application are configured. Once you have a Compose file, you can create and start your application with a single command: docker compose up. +About update and backward compatibility + +Docker Compose V2 is a major version bump release of Docker Compose. It has been completely rewritten from scratch in Golang (V1 was in Python). The installation instructions for Compose V2 differ from V1. V2 is not a standalone binary anymore, and installation scripts will have to be adjusted. Some commands are different. + +For a smooth transition from legacy docker-compose 1.xx, please consider installing compose-switch to translate docker-compose ... commands into Compose V2's docker compose .... . Also check V2's --compatibility flag. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%setup -q -a 1 -n compose-%{version} + +%build +export CGO_CFLAGS="-I%{_includedir}/openssl3 ${CFLAGS}" +export CGO_CXXFLAGS="-I%{_includedir}/openssl3 ${CXXFLAGS}" + +go build \ + -mod=vendor \ + -buildmode=pie \ + -trimpath \ + -ldflags="-s -w -X github.com/docker/compose/v2/internal.Version=%{version}" \ + -o bin/docker-compose ./cmd/ + +%install +install -d -m 0755 "%{buildroot}/usr/lib/docker/cli-plugins/" +install -D -m 0755 bin/docker-compose "%{buildroot}/usr/lib/docker/cli-plugins/docker-compose" +install -d -m 0755 %{buildroot}%{_bindir} +touch %{buildroot}%{_bindir}/docker-compose + +%post +%{_sbindir}/update-alternatives --install %{_bindir}/docker-compose docker-compose /usr/lib/docker/cli-plugins/docker-compose 2 + +%postun +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove docker-compose /usr/lib/docker/cli-plugins/docker-compose +fi + + + +%files doc +%doc README.md + +%files +%license LICENSE +%dir /usr/lib/docker/ +%dir /usr/lib/docker/cli-plugins/ +/usr/lib/docker/cli-plugins/docker-compose +%ghost %{_bindir}/docker-compose + +%changelog +* Fri Mar 27 2026 Yuki Zhu - 2.26.1-1 +- Init package from upstream diff --git a/v2.26.1.tar.gz b/v2.26.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..83670a8186b435c90ae55c6204c33a3482f5105a Binary files /dev/null and b/v2.26.1.tar.gz differ diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..58a18fc1b3efdb308d5e85250789aa0e83d90fe5 Binary files /dev/null and b/vendor.tar.gz differ