Blame SPECS/awscli.spec

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