diff --git a/.files b/.files new file mode 100644 index 0000000..584a884 Binary files /dev/null and b/.files differ diff --git a/.meta b/.meta new file mode 100644 index 0000000..0516506 --- /dev/null +++ b/.meta @@ -0,0 +1,6 @@ + + docker-compose-switch + Compose Switch is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then run the latter. + + https://github.com/docker/compose-switch + diff --git a/.rev b/.rev new file mode 100644 index 0000000..64c6ca5 --- /dev/null +++ b/.rev @@ -0,0 +1,10 @@ + + + 585f5b91ba20a09c555bbe50b3538f11 + 1.0.5 + + dimstar_suse + + 992465 + + diff --git a/.servicemark b/.servicemark new file mode 100644 index 0000000..21c5f01 --- /dev/null +++ b/.servicemark @@ -0,0 +1 @@ +17be0f1a3e33010eb12a41a42b07905d diff --git a/_service b/_service new file mode 100644 index 0000000..e477cfa --- /dev/null +++ b/_service @@ -0,0 +1,21 @@ + + + https://github.com/docker/compose-switch + git + .git + v1.0.5 + @PARENT_TAG@ + enable + v(.*) + + + compose-switch + + + *.tar + gz + + + compose-switch-1.0.5.tar.gz + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..d4bd07f --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/docker/compose-switch + c108cab13aa8ace270da9133f127f83f491121f0 \ No newline at end of file diff --git a/compose-switch-1.0.5.tar.gz b/compose-switch-1.0.5.tar.gz new file mode 120000 index 0000000..2be1043 --- /dev/null +++ b/compose-switch-1.0.5.tar.gz @@ -0,0 +1 @@ +/ipfs/bafkreicaad3cecj6m53xwtawae3347b43jckyiqql2tswmhxietnhgxk7a \ No newline at end of file diff --git a/docker-compose-switch-rpmlintrc b/docker-compose-switch-rpmlintrc new file mode 100644 index 0000000..a0ad891 --- /dev/null +++ b/docker-compose-switch-rpmlintrc @@ -0,0 +1,9 @@ +# As this package is written in golang, it does not provide +# python*-docker-compose. But as it obsoletes the v1 package +# written in python, we get a warning. +# In addition docker-compose > 2.0.0 is provided by the +# docker-compose package, that this package requires. So it +# cannot provide what it obsoletes. +# +# The warning can therefore be ignored. +addFilter("obsolete-not-provided") diff --git a/docker-compose-switch.changes b/docker-compose-switch.changes new file mode 100644 index 0000000..b7e6bf3 --- /dev/null +++ b/docker-compose-switch.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Tue Aug 2 09:27:00 UTC 2022 - Dirk Müller + +- add explicit golang API dependency +- cleanup + +------------------------------------------------------------------- +Wed Jul 6 18:02:54 UTC 2022 - Johannes Kastl + +- add docker-compose-switch-rpmlintrc to ignore obsolete-not-provided error + +------------------------------------------------------------------- +Thu Jun 30 11:06:29 UTC 2022 - Johannes Kastl + +- new package docker-compose-switch to ease the transition from docker-compose v1 (Python) to docker-compose v2 (golang), where the latter does no longer have /usr/bin/docker-compose diff --git a/docker-compose-switch.spec b/docker-compose-switch.spec new file mode 100644 index 0000000..032681c --- /dev/null +++ b/docker-compose-switch.spec @@ -0,0 +1,79 @@ +# +# spec file for package docker-compose-switch +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define __arch_install_post export NO_BRP_STRIP_DEBUG=true +Name: docker-compose-switch +Version: 1.0.5 +Release: 0 +Summary: Replacement for the docker-compose (python) executable +License: Apache-2.0 +URL: https://github.com/docker/compose-switch +Source: compose-switch-%{version}.tar.gz +Source1: vendor.tar.gz +Source99: docker-compose-switch-rpmlintrc +BuildRequires: golang(API) = 1.18 +Requires: docker +Requires: docker-compose >= 2.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives +# 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). +Obsoletes: python2-docker-compose < 2.0.0 +Obsoletes: python3-docker-compose < 2.0.0 +Obsoletes: python36-docker-compose < 2.0.0 +Obsoletes: python37-docker-compose < 2.0.0 +Obsoletes: python38-docker-compose < 2.0.0 +Obsoletes: python39-docker-compose < 2.0.0 +Obsoletes: python310-docker-compose < 2.0.0 + +%description +Compose Switch is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then run the latter. + +%prep +%setup -q -a1 -n compose-switch-%{version} + +%build +go build \ + -mod=vendor \ + -buildmode=pie \ + -trimpath \ + -ldflags="-s -w -X github.com/docker/compose-switch/v2/internal.Version=%{version}" \ + -o bin/docker-compose-switch . + +%install +install -D -m 0755 bin/%{name} "%{buildroot}%{_bindir}/%{name}" +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -s -f %{_sysconfdir}/alternatives/docker-compose %{buildroot}%{_bindir}/docker-compose + +%post +update-alternatives --install \ + %{_bindir}/docker-compose docker-compose %{_bindir}/%{name} 2000 + +%postun +if [ ! -f %{_bindir}/%{name} ] ; then + update-alternatives --remove docker-compose %{_bindir}/%{name} +fi + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{_bindir}/docker-compose +%ghost %{_sysconfdir}/alternatives/docker-compose + +%changelog diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 120000 index 0000000..621180b --- /dev/null +++ b/vendor.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeihysb3m5bmnkpyzqo7f2vnjc7t6z4hbokjoalam3rpefsoyboceja \ No newline at end of file