Blame SPECS/awscli.spec

ca55f7
%if 0%{?rhel} <= 7
ca55f7
%bcond_with python3
ca55f7
%else
ca55f7
%bcond_without python3
ca55f7
%endif
ca55f7
ca55f7
%global botocore_version 1.9.1
ca55f7
ca55f7
# python-colorama
ca55f7
%global colorama_version   0.3.7
ca55f7
%global bundled_lib_dir    bundled
ca55f7
%global colorama_dir       %{bundled_lib_dir}/colorama
ca55f7
ca55f7
Name:           awscli
7240c5
Version:        1.23.2
7240c5
Release:        1%{?dist}
ca55f7
Summary:        Universal Command Line Environment for AWS
ca55f7
ca55f7
License:        ASL 2.0 and MIT
ca55f7
URL:            http://aws.amazon.com/cli
ca55f7
Source0:        https://pypi.io/packages/source/a/%{name}/%{name}-%{version}.tar.gz
ca55f7
Source1:        colorama-%{colorama_version}.tar.gz
ca55f7
Patch0:         python-rsa-to-cryptography.patch
7240c5
Patch1:         bundled-python-botocore.patch
ca55f7
BuildArch:      noarch
ca55f7
%if %{with python3}
ca55f7
BuildRequires:  python3-devel
ca55f7
BuildRequires:  python3-setuptools
ca55f7
Requires:       python3-botocore = %{botocore_version}
7240c5
Requires:       fence-agents-aws
ca55f7
# python-colorama bundle
ca55f7
#Requires:       python3-colorama >= 0.2.5
ca55f7
Provides:	bundled(python3-colorama) = %{colorama_version}
ca55f7
Requires:       python3-docutils >= 0.10
ca55f7
Requires:       python3-cryptography >= 2.0.3
ca55f7
Requires:       python3-s3transfer >= 0.1.9
ca55f7
Requires:       python3-PyYAML >= 3.10
ca55f7
%else
ca55f7
BuildRequires:  python2-devel
ca55f7
BuildRequires:  python-setuptools
ca55f7
Requires:       python2-botocore = %{botocore_version}
ca55f7
# python-colorama bundle
ca55f7
#Requires:       python-colorama >= 0.2.5
ca55f7
Requires:       python-docutils >= 0.10
ca55f7
Requires:       python2-rsa >= 3.1.2
ca55f7
Requires:       python2-s3transfer >= 0.1.9
ca55f7
Requires:       PyYAML >= 3.10
ca55f7
%endif # with python3
ca55f7
%if 0%{?fedora}
ca55f7
Recommends: bash-completion
ca55f7
Recommends: zsh
ca55f7
%endif # Fedora
ca55f7
ca55f7
%if %{with python3}
ca55f7
%{?python_provide:%python_provide python3-%{name}}
ca55f7
%else
ca55f7
%{?python_provide:%python_provide python2-%{name}}
ca55f7
%endif # with python3
ca55f7
ca55f7
%description
ca55f7
This package provides a unified
ca55f7
command line interface to Amazon Web Services.
ca55f7
ca55f7
%prep
ca55f7
%setup -q -n %{name}-%{version}
ca55f7
%patch0 -p1
7240c5
%patch1 -p1
ca55f7
ca55f7
rm -rf %{name}.egg-info
ca55f7
ca55f7
# python-colorama bundle
ca55f7
mkdir -p %{bundled_lib_dir}
ca55f7
tar -xzf %SOURCE1 -C %{bundled_lib_dir}
ca55f7
mv %{bundled_lib_dir}/colorama-%{colorama_version} %{colorama_dir}
ca55f7
cp %{colorama_dir}/LICENSE.txt colorama_LICENSE.txt
ca55f7
cp %{colorama_dir}/README.rst colorama_README.rst
ca55f7
ca55f7
pushd %{colorama_dir}
ca55f7
# remove bundled egg-info
ca55f7
rm -rf *.egg-info
ca55f7
popd
ca55f7
# python-colorama: append bundled-directory to search path
ca55f7
sed -i "/^import colorama/isys.path.insert(0, '/usr/lib/%{name}/bundled')" awscli/customizations/history/show.py awscli/table.py
ca55f7
# python-jmespath: append bundled-directory to search path
7240c5
sed -i "/^import jmespath/iimport sys\nsys.path.insert(0, '/usr/lib/fence-agents/bundled/aws')" awscli/customizations/arguments.py
ca55f7
ca55f7
%build
ca55f7
%if %{with python3}
ca55f7
%py3_build
ca55f7
%else
ca55f7
%py2_build
ca55f7
%endif # with python3
ca55f7
ca55f7
# python-colorama bundle
ca55f7
pushd %{colorama_dir}
ca55f7
%{__python3} setup.py build
ca55f7
popd
ca55f7
ca55f7
%install
ca55f7
%if %{with python3}
ca55f7
%py3_install
ca55f7
%else
ca55f7
%py2_install
ca55f7
%endif # with python3
ca55f7
# Fix path and permissions for bash completition
ca55f7
%global bash_completion_dir /etc/bash_completion.d
ca55f7
mkdir -p %{buildroot}%{bash_completion_dir}
ca55f7
mv %{buildroot}%{_bindir}/aws_bash_completer %{buildroot}%{bash_completion_dir}
ca55f7
chmod 644 %{buildroot}%{bash_completion_dir}/aws_bash_completer
ca55f7
# Fix path and permissions for zsh completition
ca55f7
%global zsh_completion_dir /usr/share/zsh/site-functions
ca55f7
mkdir -p %{buildroot}%{zsh_completion_dir}
ca55f7
mv %{buildroot}%{_bindir}/aws_zsh_completer.sh %{buildroot}%{zsh_completion_dir}
ca55f7
chmod 644 %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh
ca55f7
ls -alh %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh
ca55f7
# We don't need the Windows CMD script
ca55f7
rm %{buildroot}%{_bindir}/aws.cmd
ca55f7
# python-botocore bundle
ca55f7
pushd %{colorama_dir}
ca55f7
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --install-lib /usr/lib/%{name}/bundled
ca55f7
popd
ca55f7
ca55f7
%files
ca55f7
%{!?_licensedir:%global license %doc}
ca55f7
%doc README.rst colorama_README.rst
ca55f7
%license LICENSE.txt colorama_LICENSE.txt
ca55f7
%{_bindir}/aws
ca55f7
%{_bindir}/aws_completer
ca55f7
%dir %{bash_completion_dir}
ca55f7
%{bash_completion_dir}/aws_bash_completer
ca55f7
%dir %{zsh_completion_dir}
ca55f7
%{zsh_completion_dir}/aws_zsh_completer.sh
ca55f7
%if %{with python3}
ca55f7
%{python3_sitelib}/awscli
ca55f7
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
ca55f7
%else
ca55f7
%{python2_sitelib}/awscli
ca55f7
%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info
ca55f7
%endif # with python3
ca55f7
# python-colorama bundle
ca55f7
%dir /usr/lib/%{name}
ca55f7
/usr/lib/%{name}/bundled
ca55f7
ca55f7
%changelog
7240c5
* Wed May 18 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.23.2-1
7240c5
- Rebase to 1.23.2 to support IMDSv2
7240c5
7240c5
  Resolves: rhbz#2079941
7240c5
ca55f7
* Tue Nov 20 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.14.50-5
ca55f7
- bundled python-colorama
ca55f7
ca55f7
  Resolves: rhbz#1633654
ca55f7
ca55f7
* Sun Jul 08 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.14.50-3
ca55f7
- Change to Python 3
ca55f7
ca55f7
* Sat Mar 03 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.50-2
ca55f7
- Update for new python-botocore.
ca55f7
ca55f7
* Sat Mar 03 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.50-1
ca55f7
- Update to 1.14.50. Fixes bug #1550746
ca55f7
ca55f7
* Thu Mar 01 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.49-1
ca55f7
- Update to 1.14.49. Fixes bug #1549549
ca55f7
ca55f7
* Sat Feb 24 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.46-1
ca55f7
- Update to 1.14.46. Fixes bug #1546901
ca55f7
ca55f7
* Sat Feb 17 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.41-1
ca55f7
- Update to 1.14.41. Fixes bug #1546437
ca55f7
ca55f7
* Fri Feb 16 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.40-1
ca55f7
- Update to 1.14.40. Fixes bug #1544045
ca55f7
ca55f7
* Thu Feb 08 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.34-1
ca55f7
- Update to 1.14.34. Fixes bug #1543659
ca55f7
ca55f7
* Wed Feb 07 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.33-1
ca55f7
- Update to 1.14.33. Fixes bug #1542468
ca55f7
ca55f7
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.32-3
ca55f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ca55f7
ca55f7
* Wed Jan 31 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.32-2
ca55f7
- Fix python-botocore version requirement.
ca55f7
ca55f7
* Wed Jan 31 2018 Kevin Fenzi <kevin@scrye.com> - 1.14.32-1
ca55f7
- Update to 1.14.32. Fixes bug #1481464
ca55f7
ca55f7
* Sun Aug 13 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.133-1
ca55f7
- Update to 1.11.133
ca55f7
ca55f7
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.109-3
ca55f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ca55f7
ca55f7
* Wed Jun 21 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.109-2
ca55f7
- Forgot to update
ca55f7
ca55f7
* Wed Jun 21 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.109-1
ca55f7
- Update to 1.11.109
ca55f7
ca55f7
* Tue May 23 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.90-1
ca55f7
- Update to 1.11.90
ca55f7
ca55f7
* Wed Mar 15 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.63-1
ca55f7
- Update to 1.11.63
ca55f7
ca55f7
* Sat Feb 25 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.55-1
ca55f7
- Update to 1.11.55
ca55f7
ca55f7
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.40-2
ca55f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ca55f7
ca55f7
* Fri Jan 20 2017 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.40-1
ca55f7
- Update to 1.11.40
ca55f7
ca55f7
* Wed Dec 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.34-2
ca55f7
- Update to 1.11.34
ca55f7
ca55f7
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.11.28-3
ca55f7
- Rebuild for Python 3.6
ca55f7
ca55f7
* Tue Dec 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.28-2
ca55f7
- Add PyYAML dependency
ca55f7
ca55f7
* Sun Dec 11 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.28-1
ca55f7
- Update to 1.11.28
ca55f7
ca55f7
* Sat Dec 03 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.24-1
ca55f7
- Update to 1.11.24
ca55f7
ca55f7
* Thu Nov 24 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.21-1
ca55f7
- Update to 1.11.21
ca55f7
ca55f7
* Mon Oct 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.12-1
ca55f7
- Update to 1.11.12
ca55f7
ca55f7
* Sun Oct 02 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.11.0-1
ca55f7
- Update to 1.11.0
ca55f7
ca55f7
* Wed Sep 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.67-1
ca55f7
- Update to 1.10.67
ca55f7
ca55f7
* Wed Sep 07 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.62-1
ca55f7
- Update to 1.10.62
ca55f7
ca55f7
* Wed Aug 24 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.59-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Fri Aug 05 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.53-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.45-2
ca55f7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ca55f7
ca55f7
* Wed Jul 06 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.45-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Wed Jun 08 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.36-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Sat May 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.34-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Wed Feb 24 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.7-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Tue Feb 23 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.6-2
ca55f7
- Fix broken dependency
ca55f7
ca55f7
* Fri Feb 19 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.6-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Wed Feb 17 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.5-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Fri Feb 12 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.4-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Wed Feb 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.3-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Tue Feb 09 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.2-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Tue Feb 02 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.1-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Fri Jan 22 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.10.0-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Wed Jan 20 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.21-1
ca55f7
- Update to current upstream version
ca55f7
- Don't fix documentation permissions any more (pull request merged)
ca55f7
ca55f7
* Fri Jan 15 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.920-1
ca55f7
- Update to current upstream version
ca55f7
ca55f7
* Fri Jan 15 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.19-1
ca55f7
- Update to current upstream version
ca55f7
- Don't substitue the text of bin/aws_bash_completer anymore (pull request merged)
ca55f7
- Don't remove the shabang from awscli/paramfile.py anymore (pull request merged)
ca55f7
ca55f7
* Wed Jan 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.18-1
ca55f7
- Update to current upstream version
ca55f7
- Fix completion for bash
ca55f7
- Remove bcdoc dependency that is not used anymore
ca55f7
ca55f7
* Sun Jan 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.17-1
ca55f7
- Update to current upstream version
ca55f7
- Lock the botocore dependency version
ca55f7
ca55f7
* Sat Jan 09 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.16-1
ca55f7
- Update to current upstream version
ca55f7
- Add dir /usr/share/zsh
ca55f7
- Add dir /usr/share/zsh/site-functions
ca55f7
- Add MIT license (topictags.py is MIT licensed)
ca55f7
- Move dependency from python-devel to python2-devel
ca55f7
- Add Recommends lines for zsh and bsah-completion for Fedora
ca55f7
- Remove BuildReuires: bash-completion
ca55f7
- Remove the macros py2_build and py2_install to prefer the extended form
ca55f7
- Force non-executable bit for documentation
ca55f7
- Remove shabang from awscli/paramfile.py
ca55f7
- Fix bash completion
ca55f7
- Fix zsh completion
ca55f7
- Remove aws.cmd
ca55f7
ca55f7
* Tue Dec 29 2015 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.9.15-1
ca55f7
- Initial package.