2025-07-04 17:08:15 +02:00
|
|
|
#
|
|
|
|
|
# spec file for package aws-cli-cmd
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2024 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/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version} >= 1600
|
2025-09-30 15:08:55 +02:00
|
|
|
%define pythons python313
|
2025-07-04 17:08:15 +02:00
|
|
|
%else
|
|
|
|
|
%define pythons python311
|
|
|
|
|
%endif
|
|
|
|
|
%global _sitelibdir %{%{pythons}_sitelib}
|
|
|
|
|
|
|
|
|
|
Name: aws-cli-cmd
|
|
|
|
|
# We want the version to match the aws-cli version we ship
|
2025-11-19 12:29:12 -05:00
|
|
|
Version: 1.36.2
|
2025-07-04 17:08:15 +02:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Amazon Web Services Command Line Interface
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
Group: System/Management
|
|
|
|
|
URL: some-github-project
|
|
|
|
|
Provides: awscli = %{version}
|
|
|
|
|
Provides: aws-cli = %{version}
|
|
|
|
|
Obsoletes: aws-cli < %{version}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Package requirements on the system
|
|
|
|
|
Requires: flake-pilot
|
|
|
|
|
Requires: flake-pilot-podman
|
|
|
|
|
# Package requirements from runtime container
|
|
|
|
|
Requires: (%{pythons}-PyYAML >= 3.10 with %{pythons}-PyYAML <= 6.1)
|
|
|
|
|
Requires: (%{pythons}-colorama >= 0.2.5 with %{pythons}-colorama <= 0.5.0)
|
|
|
|
|
Requires: (%{pythons}-docutils >= 0.10 with %{pythons}-docutils < 0.30)
|
|
|
|
|
Requires: (%{pythons}-rsa >= 3.1.2 with %{pythons}-rsa < 5.0.0)
|
|
|
|
|
Requires: %{pythons}-six
|
|
|
|
|
Requires: %{pythons}-jmespath
|
|
|
|
|
Requires: %{pythons}-python-dateutil
|
|
|
|
|
Requires: %{pythons}-requests
|
2025-07-15 10:10:34 +02:00
|
|
|
Requires: groff
|
2025-07-04 17:08:15 +02:00
|
|
|
|
|
|
|
|
# Dependent containers
|
|
|
|
|
Requires: aws-sdk-image
|
|
|
|
|
# The command container
|
|
|
|
|
Requires: aws-cli-image
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The AWS Command Line Interface (CLI) is a unified tool to manage AWS
|
|
|
|
|
services. With this tool, multiple AWS services can be controlled
|
|
|
|
|
from the command line and automated through scripts.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
2025-09-22 18:16:42 +02:00
|
|
|
%post
|
2025-11-06 09:29:54 -05:00
|
|
|
# The flake-ctl command comlains if the script to be created already exists.
|
|
|
|
|
# Remove the script from previous installations
|
2025-11-19 12:29:12 -05:00
|
|
|
if [ -L /usr/bin/aws ] ; then
|
2025-11-06 09:29:54 -05:00
|
|
|
rm /usr/bin/aws
|
|
|
|
|
fi
|
|
|
|
|
|
2025-09-22 18:16:42 +02:00
|
|
|
if [ "$YAST_IS_RUNNING" != "instsys" ] ; then
|
|
|
|
|
flake-ctl podman register \
|
|
|
|
|
--app /usr/bin/aws \
|
|
|
|
|
--container localhost/aws-cli \
|
|
|
|
|
--base localhost/aws-sdk \
|
|
|
|
|
--check-host-dependencies \
|
|
|
|
|
--opt "\--interactive" \
|
2025-11-06 09:28:21 -05:00
|
|
|
--opt "\--security-opt label=disable" \
|
2025-09-22 18:16:42 +02:00
|
|
|
--opt "\--volume %HOME:/root" \
|
|
|
|
|
--opt "\--volume /var/lib/ca-certificates:/var/lib/ca-certificates" \
|
|
|
|
|
--opt "\-e HOME=/root"
|
2025-11-19 12:29:12 -05:00
|
|
|
# bsc#1253743 older packages did not differentiate between upgrade
|
|
|
|
|
# and package removal as such on upgrade the command disappeared.
|
|
|
|
|
# Save the newly registered flake and restore it posttrans if it was
|
|
|
|
|
# deleted by the postun in th eold package.
|
|
|
|
|
# Remove this hack on or after 2026-11-30
|
|
|
|
|
if [ "$1" -ge 2 ]; then
|
|
|
|
|
cp -P /usr/bin/aws /usr/bin/aws.bck
|
|
|
|
|
cp /usr/share/flakes/aws.yaml /usr/share/flakes/aws.yaml.bck
|
|
|
|
|
fi
|
2025-09-22 18:16:42 +02:00
|
|
|
fi
|
2025-07-04 17:08:15 +02:00
|
|
|
|
2025-09-22 18:16:42 +02:00
|
|
|
%postun
|
|
|
|
|
if [ "$YAST_IS_RUNNING" != "instsys" ] ; then
|
2025-11-19 12:29:12 -05:00
|
|
|
if [ "$1" -eq 0 ]; then
|
|
|
|
|
flake-ctl podman remove --app /usr/bin/aws
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
|
# bsc#1253743 older packages did not differentiate between upgrade
|
|
|
|
|
# and package removal as such on upgrade the command disappeared.
|
|
|
|
|
# Restore the command set up in post of this package if it got wiped
|
|
|
|
|
# out by the postun of the old package.
|
|
|
|
|
# The posttrans can be removed on or after 2026-11-30
|
|
|
|
|
if [ ! -f /usr/bin/aws ] && [ -f /usr/bin/aws.bck ]; then
|
|
|
|
|
echo "Restoring aws command"
|
|
|
|
|
cp -P /usr/bin/aws.bck /usr/bin/aws
|
|
|
|
|
mv /usr/share/flakes/aws.yaml.bck /usr/share/flakes/aws.yaml
|
|
|
|
|
rm /usr/bin/aws.bck
|
2025-09-22 18:16:42 +02:00
|
|
|
fi
|
2025-07-04 17:08:15 +02:00
|
|
|
|
|
|
|
|
%files
|
2025-11-19 12:29:12 -05:00
|
|
|
%ghost %{_bindir}/aws
|