Blame SPECS/WALinuxAgent.spec

b3d952
%global with_legacy 0
356ebc
%global dracut_modname_udev 97walinuxagent
356ebc
%global dracut_modname_cvm 97walinuxagentcvm
b3d952
b3d952
Name:           WALinuxAgent
57549a
Version:        2.7.0.6
356ebc
Release:        9%{?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
356ebc
Source1:        module-setup-udev.sh
356ebc
Source2:        module-setup-cvm.sh
356ebc
Source3:        90-tpm2-import.rules
356ebc
Source4:        tpm2-luks-import.sh
b3d952
b3d952
# Python3.9 fixes
57549a
Patch0001: 0001-Initial-redhat-build-configuation.patch
57549a
Patch0002: 0002-Implement-restart_if-for-RedHat-OS.patch
57549a
# For bz#2098233 - [Azure][WALA][RHEL-9] [9.1] walinuxagent kills network during boot
57549a
Patch3: wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch
57549a
# For bz#2114830 - [Azure][WALA][RHEL-9.1] Provisioning failed if no ifcfg-eth0
57549a
Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch
57549a
# For bz#2093965 - [Azure][WALA][RHEL-9] The description of "Logs.Collect" is incorrect
57549a
Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch
57549a
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
356ebc
%package cvm
356ebc
Summary:        Microsoft Azure CVM specific tools
356ebc
Requires: tpm2-tools
356ebc
Requires: cryptsetup
356ebc
356ebc
%description cvm
356ebc
Scripts and udev rules specific to Microsoft Azure Confidential Virtual Machines.
356ebc
b3d952
%prep
b3d952
%setup -q
57549a
%autopatch -p1
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
%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
b3d952
mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
b3d952
356ebc
mkdir -p %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev}
356ebc
cp %{SOURCE1} %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev}/module-setup.sh
356ebc
chmod 0755 %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev}/module-setup.sh
356ebc
356ebc
mkdir -p %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_cvm}
356ebc
cp %{SOURCE2} %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_cvm}/module-setup.sh
356ebc
chmod 0755 %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname_cvm}/module-setup.sh
356ebc
install -m0644 -D -t %{buildroot}%{_udevrulesdir}/ %{SOURCE3}
356ebc
install -m0755 -D -t %{buildroot}%{_sbindir} %{SOURCE4}
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
356ebc
rm -rf %{_unitdir}/waagent.service.d/
b3d952
b3d952
%files
b3d952
%doc LICENSE.txt NOTICE README.md
b3d952
%ghost %{_localstatedir}/log/waagent.log
57549a
%ghost %{_unitdir}/waagent-network-setup.service
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
57549a
%{_unitdir}/azure.slice
57549a
%{_unitdir}/azure-vmextensions.slice
b3d952
%{python3_sitelib}/azurelinuxagent
b3d952
%{python3_sitelib}/*.egg-info
b3d952
b3d952
%files udev
356ebc
%{_udevrulesdir}/66-azure-storage.rules
356ebc
%{_udevrulesdir}/99-azure-product-uuid.rules
356ebc
%dir %{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev}
356ebc
%{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev}/*.sh
356ebc
356ebc
%files cvm
356ebc
%{_sbindir}/tpm2-luks-import.sh
356ebc
%{_udevrulesdir}/90-tpm2-import.rules
356ebc
%dir %{_prefix}/lib/dracut/modules.d/%{dracut_modname_cvm}
356ebc
%{_prefix}/lib/dracut/modules.d/%{dracut_modname_cvm}/*.sh
b3d952
b3d952
%if 0%{?with_legacy}
b3d952
%files legacy
b3d952
%{_sbindir}/waagent2.0
b3d952
%endif
b3d952
b3d952
%changelog
356ebc
* Wed Feb 08 2023 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-9
356ebc
- wla-redhat-Adjust-tpm2_createprimary-key-attributes-to-m.patch [bz#2167322]
356ebc
- Resolves: bz#2167322
356ebc
  (Adjust TPM primary key creation parameters to match Azure)
356ebc
356ebc
* Mon Feb 06 2023 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-8
356ebc
- wla-redhat-Explicitly-list-udev-rule-requirements-in-the.patch [bz#2165042]
356ebc
- Resolves: bz#2165042
356ebc
  ([9.0.z] /dev/disk/azure/ is created as symlink to sr0 or sda and not as a directory[Azure])
356ebc
356ebc
* Mon Jan 23 2023 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-7
356ebc
- wla-redhat-Azure-CVM-specific-udev-rules.patch [bz#2162668]
356ebc
- Resolves: bz#2162668
356ebc
  (Add support for importing remotely sealed TPM2 objects)
356ebc
356ebc
* Mon Aug 29 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-6
356ebc
- wla-redhat-Remove-files-inside-WALA-services-directory.patch [bz#2114768]
356ebc
- Resolves: bz#2114768
356ebc
  ([Azure][WALA][RHEL-9] When remove package some files left)
356ebc
57549a
* Tue Aug 23 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-5
57549a
- wla-redhat-Mark-directories-properly-in-the-files-list.patch [bz#2114768]
57549a
- Resolves: bz#2114768
57549a
  ([Azure][WALA][RHEL-9] When remove package some files left)
57549a
57549a
* Wed Aug 17 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-4
57549a
- wla-redhat-Remove-all-waagent-unit-files-when-uninstalli.patch [bz#2114768]
57549a
- Resolves: bz#2114768
57549a
  ([Azure][WALA][RHEL-9] When remove package some files left)
57549a
57549a
* Mon Aug 08 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-3
57549a
- wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch [bz#2114830]
57549a
- wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch [bz#2093965]
57549a
- Resolves: bz#2114830
57549a
  ([Azure][WALA][RHEL-9.1] Provisioning failed if no ifcfg-eth0)
57549a
- Resolves: bz#2093965
57549a
  ([Azure][WALA][RHEL-9] The description of "Logs.Collect" is incorrect)
57549a
57549a
* Fri Jul 15 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-2
57549a
- wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch [bz#2098233]
57549a
- Resolves: bz#2098233
57549a
  ([Azure][WALA][RHEL-9] [9.1] walinuxagent kills network during boot)
57549a
57549a
* Wed May 25 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-1
57549a
- Rebase to 2.7.0.6-1 [bz#2083464]
57549a
- Adding restart_if implementation for RHEL [bz#2081944]
57549a
- Resolves: bz#2083464
57549a
  ([Azure][RHEL-9]Rebase WALinuxAgent to v2.7.0.6)
57549a
- Resolves: bz#2081944
57549a
  ([Azure][WALA][9.0] WALA provisions VM failed because of no "ifdown")
57549a
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