Blame SPECS/WALinuxAgent.spec

b3d952
%global with_legacy 0
b3d952
%global dracut_modname 97walinuxagent
b3d952
b3d952
Name:           WALinuxAgent
b3d952
Version:        2.3.0.2
b3d952
Release:        3%{?dist}
b3d952
Summary:        The Microsoft Azure Linux Agent
b3d952
b3d952
License:        ASL 2.0
b3d952
URL:            https://github.com/Azure/%{name}
b3d952
Source0:        https://github.com/Azure/%{name}/archive/v%{version}.tar.gz
b3d952
Source1:        module-setup.sh
b3d952
b3d952
# Python3.9 fixes
b3d952
Patch0002: 0002-Fix-distro-resolution-for-RedHat-2083.patch
b3d952
# Source-git patches
b3d952
b3d952
BuildArch:      noarch
b3d952
b3d952
BuildRequires:  python3-devel
b3d952
BuildRequires:  python3-setuptools
b3d952
BuildRequires:  python3-distro
b3d952
Requires:       %name-udev = %version-%release
b3d952
%if 0%{?fedora}
b3d952
Requires:       ntfsprogs
b3d952
%endif
b3d952
Requires:       openssh
b3d952
Requires:       openssh-server
b3d952
Requires:       openssl
b3d952
Requires:       parted
b3d952
Requires:       python3-pyasn1
b3d952
Requires:       iptables
b3d952
b3d952
BuildRequires:   systemd
b3d952
Requires(post):  systemd
b3d952
Requires(preun): systemd
b3d952
Requires(postun): systemd
b3d952
b3d952
%description
b3d952
The Microsoft Azure Linux Agent supports the provisioning and running of Linux
b3d952
VMs in the Microsoft Azure cloud. This package should be installed on Linux disk
b3d952
images that are built to run in the Microsoft Azure environment.
b3d952
b3d952
%if 0%{?with_legacy}
b3d952
%package legacy
b3d952
Summary:        The Microsoft Azure Linux Agent (legacy)
b3d952
Requires:	%name = %version-%release
b3d952
Requires:	python2
b3d952
Requires:	net-tools
b3d952
b3d952
%description legacy
b3d952
The Microsoft Azure Linux Agent supporting old version of extensions.
b3d952
%endif
b3d952
b3d952
%package udev
b3d952
Summary:        Udev rules for Microsoft Azure
b3d952
b3d952
%description udev
b3d952
Udev rules specific to Microsoft Azure Virtual Machines.
b3d952
b3d952
%prep
b3d952
%setup -q
b3d952
%patch0002 -p1
b3d952
# Apply source-git patches
b3d952
b3d952
%build
b3d952
%py3_build
b3d952
b3d952
%install
b3d952
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --lnx-distro redhat
b3d952
b3d952
mkdir -p -m 0700 %{buildroot}%{_sharedstatedir}/waagent
b3d952
mkdir -p %{buildroot}%{_localstatedir}/log
b3d952
touch %{buildroot}%{_localstatedir}/log/waagent.log
b3d952
b3d952
mkdir -p %{buildroot}%{_udevrulesdir}
b3d952
mv %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules %{buildroot}%{_udevrulesdir}/
b3d952
b3d952
rm -rf %{buildroot}/%{python3_sitelib}/tests
b3d952
rm -rf %{buildroot}/%{python3_sitelib}/__main__.py
b3d952
rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py*
b3d952
b3d952
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent
b3d952
%if 0%{?with_legacy}
b3d952
sed -i 's,#!/usr/bin/env python,#!/usr/bin/python2,' %{buildroot}%{_sbindir}/waagent2.0
b3d952
%else
b3d952
rm -f %{buildroot}%{_sbindir}/waagent2.0
b3d952
%endif
b3d952
sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service
b3d952
b3d952
mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
b3d952
b3d952
install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1}
b3d952
b3d952
%post
b3d952
%systemd_post waagent.service
b3d952
b3d952
%preun
b3d952
%systemd_preun waagent.service
b3d952
b3d952
%postun
b3d952
%systemd_postun_with_restart waagent.service
b3d952
b3d952
%files
b3d952
%doc LICENSE.txt NOTICE README.md
b3d952
%ghost %{_localstatedir}/log/waagent.log
b3d952
%dir %attr(0700, root, root) %{_sharedstatedir}/waagent
b3d952
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
b3d952
%{_sbindir}/waagent
b3d952
%config(noreplace) %{_sysconfdir}/waagent.conf
b3d952
%{_unitdir}/waagent.service
b3d952
%{python3_sitelib}/azurelinuxagent
b3d952
%{python3_sitelib}/*.egg-info
b3d952
b3d952
%files udev
b3d952
%{_udevrulesdir}/*.rules
b3d952
%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/*.sh
b3d952
b3d952
%if 0%{?with_legacy}
b3d952
%files legacy
b3d952
%{_sbindir}/waagent2.0
b3d952
%endif
b3d952
b3d952
%changelog
b3d952
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.0.2-3
b3d952
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
b3d952
  Related: rhbz#1991688
b3d952
b3d952
* Sun Jul 25 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0.2-2
b3d952
- wala-Require-iptables-package.patch [bz#1978572]
b3d952
- Resolves: bz#1978572
b3d952
  ([Azure][WALA][RHEL-9] WALA needs iptables package)
b3d952
b3d952
* Thu Jun 24 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0.2-1
b3d952
- Rebase to 2.3.0.2 [bz#1972101]
b3d952
- Resolves: bz#1972101
b3d952
  ([Azure][RHEL-9]Rebase WALinuxAgent to 2.3.0.2)
b3d952
b3d952
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.2.52-6
b3d952
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
b3d952
b3d952
* Fri Feb 19 2021 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-5
b3d952
- Require ntfsprogs on Fedora only
b3d952
b3d952
* Tue Jan 26 2021 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-4
b3d952
- Fix distro resolution for RedHat
b3d952
b3d952
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.52-3
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b3d952
b3d952
* Fri Jan 15 2021 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-2
b3d952
- Add udev rules to initramfs (#1909287)
b3d952
b3d952
* Wed Dec 09 2020 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-1
b3d952
- Update to 2.2.52 (#1849923)
b3d952
- Add not yet upstream patches supporting Python3.9 changes
b3d952
b3d952
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.48.1-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b3d952
b3d952
* Tue Jun 09 2020 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.48.1-1
b3d952
- Update to 2.2.48.1 (#1641605)
b3d952
- Split udev rules to a separate subpackage (#1748432)
b3d952
b3d952
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.2.46-2
b3d952
- Rebuilt for Python 3.9
b3d952
b3d952
* Wed Apr 15 2020 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.46-1
b3d952
- Update to 2.2.46
b3d952
b3d952
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.40-7
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b3d952
b3d952
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.40-6
b3d952
- Rebuilt for Python 3.8.0rc1 (#1748018)
b3d952
b3d952
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.40-5
b3d952
- Rebuilt for Python 3.8
b3d952
b3d952
* Wed Aug 21 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.40-4
b3d952
- Disable Python2 dependent 'legacy' subpackage (#1741029)
b3d952
b3d952
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.40-3
b3d952
- Rebuilt for Python 3.8
b3d952
b3d952
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.40-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b3d952
b3d952
* Mon Jun 03 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.40-1
b3d952
- Update to 2.2.40
b3d952
- Fix FTBFS in the preparation for Python3.8 (#1705219)
b3d952
b3d952
* Thu Mar 14 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.38-1
b3d952
- Update to 2.2.38 (CVE-2019-0804)
b3d952
b3d952
* Thu Mar 14 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.37-1
b3d952
- Update to 2.2.37
b3d952
b3d952
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.32-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b3d952
b3d952
* Thu Sep 20 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.32-1
b3d952
- Update to 2.2.32.2
b3d952
b3d952
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.25-4
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b3d952
b3d952
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.25-3
b3d952
- Rebuilt for Python 3.7
b3d952
b3d952
* Wed Apr 25 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.25-2
b3d952
- Move net-tools dependency to WALinuxAgent-legacy (#1106781)
b3d952
b3d952
* Mon Apr 16 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.25-1
b3d952
- Update to 2.2.25
b3d952
- Switch to Python3
b3d952
- Legacy subpackage with waagent2.0 supporting old extensions
b3d952
b3d952
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.18-5
b3d952
- Update Python 2 dependency declarations to new packaging standards
b3d952
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
b3d952
b3d952
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-4
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b3d952
b3d952
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-3
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b3d952
b3d952
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.18-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b3d952
b3d952
* Sat Apr 02 2016 Scott K Logan <logans@cottsay.net> - 2.0.18-1
b3d952
- Update to 2.0.18
b3d952
b3d952
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b3d952
b3d952
* Thu Jul 02 2015 Scott K Logan <logans@cottsay.net> - 2.0.14-1
b3d952
- Update to 2.0.14
b3d952
b3d952
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.13-2
b3d952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b3d952
b3d952
* Mon Jun 01 2015 Scott K Logan <logans@cottsay.net> - 2.0.13-1
b3d952
- Update to 2.0.13
b3d952
b3d952
* Thu Apr 02 2015 Scott K Logan <logans@cottsay.net> - 2.0.12-1
b3d952
- Update to 2.0.12-Oracle
b3d952
b3d952
* Sat Jan 10 2015 Scott K Logan <logans@cottsay.net> - 2.0.11-2
b3d952
- Use systemd for rhel7
b3d952
- Own logrotate.d
b3d952
- Fix python2-devel dep
b3d952
b3d952
* Sat Dec 20 2014 Scott K Logan <logans@cottsay.net> - 2.0.11-1
b3d952
- Initial package