1ab7e8
%global with_legacy 0
56ee87
73c307
Name:           WALinuxAgent
05d0a6
Version:        2.2.40
4edaeb
Release:        7%{?dist}
196a46
Summary:        The Microsoft Azure Linux Agent
73c307
73c307
License:        ASL 2.0
73c307
URL:            https://github.com/Azure/%{name}
065b7e
Source0:        https://github.com/Azure/%{name}/archive/%{name}-%{version}.tar.gz
73c307
73c307
BuildArch:      noarch
73c307
2e0f70
BuildRequires:  python3-devel
2e0f70
BuildRequires:  python3-setuptools
526591
BuildRequires:  python3-distro
73c307
Requires:       ntfsprogs
73c307
Requires:       openssh
73c307
Requires:       openssh-server
73c307
Requires:       openssl
73c307
Requires:       parted
2e0f70
Requires:       python3-pyasn1
73c307
73c307
BuildRequires:   systemd
73c307
Requires(post):  systemd
73c307
Requires(preun): systemd
73c307
Requires(postun): systemd
73c307
73c307
%description
196a46
The Microsoft Azure Linux Agent supports the provisioning and running of Linux
196a46
VMs in the Microsoft Azure cloud. This package should be installed on Linux disk
196a46
images that are built to run in the Microsoft Azure environment.
73c307
56ee87
%if 0%{?with_legacy}
065b7e
%package legacy
065b7e
Summary:        The Microsoft Azure Linux Agent (legacy)
065b7e
Requires:	%name = %version-%release
065b7e
Requires:	python2
4ad065
Requires:	net-tools
065b7e
065b7e
%description legacy
065b7e
The Microsoft Azure Linux Agent supporting old version of extensions.
56ee87
%endif
065b7e
73c307
%prep
065b7e
%setup -q
73c307
73c307
%build
065b7e
%py3_build
73c307
73c307
%install
065b7e
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --lnx-distro redhat
73c307
73c307
mkdir -p -m 0700 %{buildroot}%{_sharedstatedir}/waagent
73c307
mkdir -p %{buildroot}%{_localstatedir}/log
73c307
touch %{buildroot}%{_localstatedir}/log/waagent.log
73c307
5f84b1
mkdir -p %{buildroot}%{_udevrulesdir}
065b7e
mv %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules %{buildroot}%{_udevrulesdir}/
5f84b1
065b7e
rm -rf %{buildroot}/%{python3_sitelib}/tests
065b7e
rm -rf %{buildroot}/%{python3_sitelib}/__main__.py
065b7e
rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py*
065b7e
065b7e
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent
56ee87
%if 0%{?with_legacy}
065b7e
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python2,' %{buildroot}%{_sbindir}/waagent2.0
56ee87
%else
56ee87
rm -f %{buildroot}%{_sbindir}/waagent2.0
56ee87
%endif
065b7e
sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service
065b7e
065b7e
mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
35ed18
73c307
%post
73c307
%systemd_post waagent.service
73c307
73c307
%preun
73c307
%systemd_preun waagent.service
73c307
73c307
%postun
73c307
%systemd_postun_with_restart waagent.service
73c307
73c307
%files
065b7e
%doc Changelog LICENSE.txt NOTICE README.md
73c307
%ghost %{_localstatedir}/log/waagent.log
73c307
%dir %attr(0700, root, root) %{_sharedstatedir}/waagent
35ed18
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
73c307
%{_sbindir}/waagent
73c307
%config(noreplace) %{_sysconfdir}/waagent.conf
065b7e
%{_udevrulesdir}/66-azure-storage.rules
5f84b1
%{_udevrulesdir}/99-azure-product-uuid.rules
73c307
%{_unitdir}/waagent.service
065b7e
%{python3_sitelib}/azurelinuxagent
052fe2
%{python3_sitelib}/*.egg-info
065b7e
56ee87
%if 0%{?with_legacy}
065b7e
%files legacy
065b7e
%{_sbindir}/waagent2.0
56ee87
%endif
73c307
73c307
%changelog
4edaeb
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.40-7
4edaeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4edaeb
53ef13
* Thu Oct 03 2019 Miro Hron훾ok <mhroncok@redhat.com> - 2.2.40-6
53ef13
- Rebuilt for Python 3.8.0rc1 (#1748018)
53ef13
3fd891
* Wed Aug 21 2019 Miro Hron훾ok <mhroncok@redhat.com> - 2.2.40-5
3fd891
- Rebuilt for Python 3.8
3fd891
1ab7e8
* Wed Aug 21 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.40-4
1ab7e8
- Disable Python2 dependent 'legacy' subpackage (#1741029)
1ab7e8
a65f6b
* Mon Aug 19 2019 Miro Hron훾ok <mhroncok@redhat.com> - 2.2.40-3
a65f6b
- Rebuilt for Python 3.8
a65f6b
fc0a0f
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.40-2
fc0a0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
fc0a0f
05d0a6
* Mon Jun 03 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.40-1
05d0a6
- Update to 2.2.40
526591
- Fix FTBFS in the preparation for Python3.8 (#1705219)
05d0a6
0bad62
* Thu Mar 14 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.38-1
0bad62
- Update to 2.2.38 (CVE-2019-0804)
0bad62
a1ae65
* Thu Mar 14 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.37-1
a1ae65
- Update to 2.2.37
a1ae65
933708
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.32-2
933708
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
933708
052fe2
* Thu Sep 20 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.32-1
052fe2
- Update to 2.2.32.2
052fe2
cf2beb
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.25-4
cf2beb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
cf2beb
fdffbb
* Tue Jun 19 2018 Miro Hron훾ok <mhroncok@redhat.com> - 2.2.25-3
fdffbb
- Rebuilt for Python 3.7
fdffbb
4ad065
* Wed Apr 25 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.25-2
4ad065
- Move net-tools dependency to WALinuxAgent-legacy (#1106781)
4ad065
065b7e
* Mon Apr 16 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.25-1
065b7e
- Update to 2.2.25
065b7e
- Switch to Python3
065b7e
- Legacy subpackage with waagent2.0 supporting old extensions
065b7e
49ee79
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.18-5
49ee79
- Update Python 2 dependency declarations to new packaging standards
49ee79
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
49ee79
d9f492
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-4
d9f492
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d9f492
9b3c30
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-3
9b3c30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9b3c30
c8fde6
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-2
c8fde6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c8fde6
7790ba
* Sat Apr 02 2016 Scott K Logan <logans@cottsay.net> - 2.0.18-1
7790ba
- Update to 2.0.18
7790ba
025af9
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-2
025af9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
025af9
688951
* Thu Jul 02 2015 Scott K Logan <logans@cottsay.net> - 2.0.14-1
688951
- Update to 2.0.14
688951
441eed
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.13-2
441eed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
441eed
5f84b1
* Mon Jun 01 2015 Scott K Logan <logans@cottsay.net> - 2.0.13-1
5f84b1
- Update to 2.0.13
5f84b1
d3958f
* Thu Apr 02 2015 Scott K Logan <logans@cottsay.net> - 2.0.12-1
d3958f
- Update to 2.0.12-Oracle
d3958f
73c307
* Sat Jan 10 2015 Scott K Logan <logans@cottsay.net> - 2.0.11-2
73c307
- Use systemd for rhel7
73c307
- Own logrotate.d
73c307
- Fix python2-devel dep
73c307
73c307
* Sat Dec 20 2014 Scott K Logan <logans@cottsay.net> - 2.0.11-1
73c307
- Initial package