Add a global to disable legacy client build.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
This commit is contained in:
parent
052fe264fe
commit
56ee8783f3
@ -1,3 +1,5 @@
|
|||||||
|
%global with_legacy 1
|
||||||
|
|
||||||
Name: WALinuxAgent
|
Name: WALinuxAgent
|
||||||
Version: 2.2.32
|
Version: 2.2.32
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
@ -29,6 +31,7 @@ The Microsoft Azure Linux Agent supports the provisioning and running of Linux
|
|||||||
VMs in the Microsoft Azure cloud. This package should be installed on Linux disk
|
VMs in the Microsoft Azure cloud. This package should be installed on Linux disk
|
||||||
images that are built to run in the Microsoft Azure environment.
|
images that are built to run in the Microsoft Azure environment.
|
||||||
|
|
||||||
|
%if 0%{?with_legacy}
|
||||||
%package legacy
|
%package legacy
|
||||||
Summary: The Microsoft Azure Linux Agent (legacy)
|
Summary: The Microsoft Azure Linux Agent (legacy)
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -38,6 +41,7 @@ Requires: net-tools
|
|||||||
|
|
||||||
%description legacy
|
%description legacy
|
||||||
The Microsoft Azure Linux Agent supporting old version of extensions.
|
The Microsoft Azure Linux Agent supporting old version of extensions.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -60,7 +64,11 @@ rm -rf %{buildroot}/%{python3_sitelib}/__main__.py
|
|||||||
rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py*
|
rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py*
|
||||||
|
|
||||||
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent
|
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent
|
||||||
|
%if 0%{?with_legacy}
|
||||||
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python2,' %{buildroot}%{_sbindir}/waagent2.0
|
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python2,' %{buildroot}%{_sbindir}/waagent2.0
|
||||||
|
%else
|
||||||
|
rm -f %{buildroot}%{_sbindir}/waagent2.0
|
||||||
|
%endif
|
||||||
sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service
|
sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service
|
||||||
|
|
||||||
mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
@ -87,8 +95,10 @@ mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysco
|
|||||||
%{python3_sitelib}/azurelinuxagent
|
%{python3_sitelib}/azurelinuxagent
|
||||||
%{python3_sitelib}/*.egg-info
|
%{python3_sitelib}/*.egg-info
|
||||||
|
|
||||||
|
%if 0%{?with_legacy}
|
||||||
%files legacy
|
%files legacy
|
||||||
%{_sbindir}/waagent2.0
|
%{_sbindir}/waagent2.0
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Sep 20 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.32-1
|
* Thu Sep 20 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.32-1
|
||||||
|
Loading…
Reference in New Issue
Block a user