Accepting request 987335 from home:ojkastl_buildservice:docker_compose_etc
new package 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. OBS-URL: https://build.opensuse.org/request/show/987335 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker-compose-switch?expand=0&rev=1
This commit is contained in:
commit
d01abf1038
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
21
_service
Normal file
21
_service
Normal file
@ -0,0 +1,21 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="url">https://github.com/docker/compose-switch</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="revision">v1.0.5</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled">
|
||||
<param name="basename">compose-switch</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="go_modules" mode="disabled">
|
||||
<param name="archive">compose-switch-1.0.5.tar.gz</param>
|
||||
</service>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/docker/compose-switch</param>
|
||||
<param name="changesrevision">c108cab13aa8ace270da9133f127f83f491121f0</param></service></servicedata>
|
BIN
compose-switch-1.0.5.tar.gz
(Stored with Git LFS)
Normal file
BIN
compose-switch-1.0.5.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
9
docker-compose-switch-rpmlintrc
Normal file
9
docker-compose-switch-rpmlintrc
Normal file
@ -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")
|
9
docker-compose-switch.changes
Normal file
9
docker-compose-switch.changes
Normal file
@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 6 18:02:54 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- add docker-compose-switch-rpmlintrc to ignore obsolete-not-provided error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 11:06:29 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- 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
|
80
docker-compose-switch.spec
Normal file
80
docker-compose-switch.spec
Normal file
@ -0,0 +1,80 @@
|
||||
#
|
||||
# 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
|
||||
BuildRequires: go >= 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 -n compose-switch-%{version}
|
||||
%setup -q -T -D -a 1 -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
|
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user