From fdaed2056491f5835cfbe06620333c3694eb6833 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Wed, 9 Dec 2020 17:28:43 +0100 Subject: [PATCH 01/55] Update to 2.2.52 (#1849923) Fixes for Python3.9 Signed-off-by: Vitaly Kuznetsov --- .gitignore | 2 + ...tring-and-json.loads-without-encodin.patch | 72 +++++++++++++++ 0002-handle-py3.9-check-in-future.py.patch | 90 +++++++++++++++++++ 0003-fix-pylint.patch | 33 +++++++ WALinuxAgent.spec | 16 +++- sources | 2 +- 6 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 0001-update-array.tostring-and-json.loads-without-encodin.patch create mode 100644 0002-handle-py3.9-check-in-future.py.patch create mode 100644 0003-fix-pylint.patch diff --git a/.gitignore b/.gitignore index 6489f14..fca6ec1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ /WALinuxAgent-2.2.40.tar.gz /WALinuxAgent-2.2.46.tar.gz /v2.2.48.1.tar.gz +/WALinuxAgent-2.2.52.tar.gz +/v2.2.52.tar.gz diff --git a/0001-update-array.tostring-and-json.loads-without-encodin.patch b/0001-update-array.tostring-and-json.loads-without-encodin.patch new file mode 100644 index 0000000..d88c41c --- /dev/null +++ b/0001-update-array.tostring-and-json.loads-without-encodin.patch @@ -0,0 +1,72 @@ +From cc9b7996e542640bb19365822344298a04b18e44 Mon Sep 17 00:00:00 2001 +From: Paula Gombar +Date: Wed, 18 Nov 2020 12:24:33 -0800 +Subject: [PATCH 1/3] update array.tostring() and json.loads without encoding + for py3.9 + +--- + azurelinuxagent/common/osutil/bigip.py | 7 ++++++- + azurelinuxagent/common/osutil/default.py | 6 +++++- + tests/protocol/test_imds.py | 4 ++-- + 3 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/bigip.py b/azurelinuxagent/common/osutil/bigip.py +index 61d3c695f911..ceadf8ca2066 100644 +--- a/azurelinuxagent/common/osutil/bigip.py ++++ b/azurelinuxagent/common/osutil/bigip.py +@@ -280,7 +280,12 @@ class BigIpOSUtil(DefaultOSUtil): + if retsize == (expected * struct_size): + logger.warn(('SIOCGIFCONF returned more than {0} up ' + 'network interfaces.'), expected) +- sock = buff.tostring() ++ try: ++ # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias ++ sock = buff.tostring() ++ except AttributeError: ++ sock = buff.tobytes() ++ + for i in range(0, struct_size * expected, struct_size): + iface = self._format_single_interface_name(sock, i) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index 521776818e64..6179061756e3 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -758,7 +758,11 @@ class DefaultOSUtil(object): + logger.warn(('SIOCGIFCONF returned more than {0} up ' + 'network interfaces.'), expected) + +- ifconf_buff = buff.tostring() ++ try: ++ # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias ++ ifconf_buff = buff.tostring() ++ except AttributeError: ++ ifconf_buff = buff.tobytes() + + ifaces = {} + for i in range(0, array_size, struct_size): +diff --git a/tests/protocol/test_imds.py b/tests/protocol/test_imds.py +index a730ded03525..47462fd25ac3 100644 +--- a/tests/protocol/test_imds.py ++++ b/tests/protocol/test_imds.py +@@ -109,7 +109,7 @@ class TestImds(AgentTestCase): + "zone": "In" + }''' + +- data = json.loads(s, encoding='utf-8') ++ data = json.loads(s) + + compute_info = imds.ComputeInfo() + set_properties("compute", compute_info, data) +@@ -258,7 +258,7 @@ class TestImds(AgentTestCase): + "version": "{3}" + }}'''.format(publisher, offer, sku, version) + +- data = json.loads(s, encoding='utf-8') ++ data = json.loads(s) + compute_info = imds.ComputeInfo() + set_properties("compute", compute_info, data) + +-- +2.26.2 + diff --git a/0002-handle-py3.9-check-in-future.py.patch b/0002-handle-py3.9-check-in-future.py.patch new file mode 100644 index 0000000..d7c563a --- /dev/null +++ b/0002-handle-py3.9-check-in-future.py.patch @@ -0,0 +1,90 @@ +From 66f600ed3d9f22c2aa6790002507d0c821a7fd0c Mon Sep 17 00:00:00 2001 +From: Paula Gombar +Date: Tue, 8 Dec 2020 18:38:33 -0800 +Subject: [PATCH 2/3] handle py3.9 check in future.py + +--- + azurelinuxagent/common/future.py | 13 ++++++++++++- + azurelinuxagent/common/osutil/bigip.py | 8 +++----- + azurelinuxagent/common/osutil/default.py | 9 ++------- + 3 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/azurelinuxagent/common/future.py b/azurelinuxagent/common/future.py +index 577fb12e186e..0f76aceba786 100644 +--- a/azurelinuxagent/common/future.py ++++ b/azurelinuxagent/common/future.py +@@ -103,4 +103,15 @@ def get_openwrt_platform(): + elif product_matches: + if product_matches.group(1) == "OpenWrt": + result[0] = "openwrt" +- return result +\ No newline at end of file ++ return result ++ ++ ++def array_to_string_or_bytes(buffer): ++ # Python 3.9 removed the tostring() method on arrays, the new alias is tobytes() ++ if sys.version_info[0] == 2: ++ return buffer.tostring() ++ ++ if sys.version_info[0] == 3 and sys.version_info[1] <= 8: ++ return buffer.tostring() ++ ++ return buffer.tobytes() +diff --git a/azurelinuxagent/common/osutil/bigip.py b/azurelinuxagent/common/osutil/bigip.py +index ceadf8ca2066..cc1b64143c12 100644 +--- a/azurelinuxagent/common/osutil/bigip.py ++++ b/azurelinuxagent/common/osutil/bigip.py +@@ -24,6 +24,8 @@ import socket + import struct + import time + ++from azurelinuxagent.common.future import array_to_string_or_bytes ++ + try: + # WAAgent > 2.1.3 + import azurelinuxagent.common.logger as logger +@@ -280,12 +282,8 @@ class BigIpOSUtil(DefaultOSUtil): + if retsize == (expected * struct_size): + logger.warn(('SIOCGIFCONF returned more than {0} up ' + 'network interfaces.'), expected) +- try: +- # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias +- sock = buff.tostring() +- except AttributeError: +- sock = buff.tobytes() + ++ sock = array_to_string_or_bytes(buff) + for i in range(0, struct_size * expected, struct_size): + iface = self._format_single_interface_name(sock, i) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index 6179061756e3..c1ca15cf64ef 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -41,7 +41,7 @@ import azurelinuxagent.common.utils.fileutil as fileutil + import azurelinuxagent.common.utils.shellutil as shellutil + import azurelinuxagent.common.utils.textutil as textutil + from azurelinuxagent.common.exception import OSUtilError +-from azurelinuxagent.common.future import ustr ++from azurelinuxagent.common.future import ustr, array_to_string_or_bytes + from azurelinuxagent.common.utils.cryptutil import CryptUtil + from azurelinuxagent.common.utils.flexible_version import FlexibleVersion + from azurelinuxagent.common.utils.networkutil import RouteEntry, NetworkInterfaceCard +@@ -758,12 +758,7 @@ class DefaultOSUtil(object): + logger.warn(('SIOCGIFCONF returned more than {0} up ' + 'network interfaces.'), expected) + +- try: +- # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias +- ifconf_buff = buff.tostring() +- except AttributeError: +- ifconf_buff = buff.tobytes() +- ++ ifconf_buff = array_to_string_or_bytes(buff) + ifaces = {} + for i in range(0, array_size, struct_size): + iface = ifconf_buff[i:i+IFNAMSIZ].split(b'\0', 1)[0] +-- +2.26.2 + diff --git a/0003-fix-pylint.patch b/0003-fix-pylint.patch new file mode 100644 index 0000000..03b887c --- /dev/null +++ b/0003-fix-pylint.patch @@ -0,0 +1,33 @@ +From 90f1a4862cf63df4a96ad912effcfb54192ad4d7 Mon Sep 17 00:00:00 2001 +From: Paula Gombar +Date: Tue, 8 Dec 2020 18:53:57 -0800 +Subject: [PATCH 3/3] fix pylint + +--- + azurelinuxagent/common/future.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/azurelinuxagent/common/future.py b/azurelinuxagent/common/future.py +index 0f76aceba786..a6796f19fec2 100644 +--- a/azurelinuxagent/common/future.py ++++ b/azurelinuxagent/common/future.py +@@ -106,12 +106,12 @@ def get_openwrt_platform(): + return result + + +-def array_to_string_or_bytes(buffer): ++def array_to_string_or_bytes(buff): + # Python 3.9 removed the tostring() method on arrays, the new alias is tobytes() + if sys.version_info[0] == 2: +- return buffer.tostring() ++ return buff.tostring() + + if sys.version_info[0] == 3 and sys.version_info[1] <= 8: +- return buffer.tostring() ++ return buff.tostring() + +- return buffer.tobytes() ++ return buff.tobytes() +-- +2.26.2 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 27f7e30..618a0c6 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,14 +1,19 @@ %global with_legacy 0 Name: WALinuxAgent -Version: 2.2.48.1 -Release: 2%{?dist} +Version: 2.2.52 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz +# Python3.9 fixes +Patch0: 0001-update-array.tostring-and-json.loads-without-encodin.patch +Patch1: 0002-handle-py3.9-check-in-future.py.patch +Patch2: 0003-fix-pylint.patch + BuildArch: noarch BuildRequires: python3-devel @@ -51,6 +56,9 @@ Udev rules specific to Microsoft Azure Virtual Machines. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %py3_build @@ -110,6 +118,10 @@ mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent-extn.logrotate %{buildroot}%{_ %endif %changelog +* Wed Dec 09 2020 Vitaly Kuznetsov - 2.2.52-1 +- Update to 2.2.52 (#1849923) +- Add not yet upstream patches supporting Python3.9 changes + * Mon Jul 27 2020 Fedora Release Engineering - 2.2.48.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 74fc3c0..b56b229 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.2.48.1.tar.gz) = 139c0b8d8696efdc570f44a63ee828d35ec162ee6a279ceba1a2b7d6ca4d6f99b7c428a4726286ca12b641c5957c3f1050b25a9d233e7a5bb559c8cef97bce0d +SHA512 (v2.2.52.tar.gz) = b8d71cb4873b7e9cf92c755884bb104e5e37f171fbdae3d702b2b005a461b8f5447c9dcc80037ff0bfe9950ffbcb901e023e0bda918f481f5336c8ecbaecbbcc From 521b67bc8575f53a30b4b2c4e63292e67483a4e1 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 15 Jan 2021 14:27:07 +0100 Subject: [PATCH 02/55] Add udev rules to initramfs (#1909287) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 10 +++++++++- sources | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fca6ec1..4336e5e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /v2.2.48.1.tar.gz /WALinuxAgent-2.2.52.tar.gz /v2.2.52.tar.gz +/module-setup.sh diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 618a0c6..833f78d 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,13 +1,15 @@ %global with_legacy 0 +%global dracut_modname 97walinuxagent Name: WALinuxAgent Version: 2.2.52 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz +Source1: module-setup.sh # Python3.9 fixes Patch0: 0001-update-array.tostring-and-json.loads-without-encodin.patch @@ -88,6 +90,8 @@ sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.s mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent-extn.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-extn +install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1} + %post %systemd_post waagent.service @@ -111,6 +115,7 @@ mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent-extn.logrotate %{buildroot}%{_ %files udev %{_udevrulesdir}/*.rules +%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/*.sh %if 0%{?with_legacy} %files legacy @@ -118,6 +123,9 @@ mv %{buildroot}%{_sysconfdir}/logrotate.d/waagent-extn.logrotate %{buildroot}%{_ %endif %changelog +* Fri Jan 15 2021 italy Kuznetsov - 2.2.52-2 +- Add udev rules to initramfs (#1909287) + * Wed Dec 09 2020 Vitaly Kuznetsov - 2.2.52-1 - Update to 2.2.52 (#1849923) - Add not yet upstream patches supporting Python3.9 changes diff --git a/sources b/sources index b56b229..0a8ac9b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (v2.2.52.tar.gz) = b8d71cb4873b7e9cf92c755884bb104e5e37f171fbdae3d702b2b005a461b8f5447c9dcc80037ff0bfe9950ffbcb901e023e0bda918f481f5336c8ecbaecbbcc +SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From bed6404fedcf1d510ec9ce53fa969197f4fde4fd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 25 Jan 2021 23:40:10 +0000 Subject: [PATCH 03/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 833f78d..f706c8d 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.2.52 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Jan 25 2021 Fedora Release Engineering - 2.2.52-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Jan 15 2021 italy Kuznetsov - 2.2.52-2 - Add udev rules to initramfs (#1909287) From d1df06d88f74b391090f4771a4df84fae589809b Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 26 Jan 2021 16:09:39 +0100 Subject: [PATCH 04/55] Fix distro resolution for RedHat Signed-off-by: Vitaly Kuznetsov --- ...ix-distro-resolution-for-RedHat-2083.patch | 64 +++++++++++++++++++ WALinuxAgent.spec | 9 ++- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 0004-Fix-distro-resolution-for-RedHat-2083.patch diff --git a/0004-Fix-distro-resolution-for-RedHat-2083.patch b/0004-Fix-distro-resolution-for-RedHat-2083.patch new file mode 100644 index 0000000..e0ce7b2 --- /dev/null +++ b/0004-Fix-distro-resolution-for-RedHat-2083.patch @@ -0,0 +1,64 @@ +From 3420fef144cf9a5be62cfae16f64c298ca397a17 Mon Sep 17 00:00:00 2001 +From: Paula Gombar +Date: Wed, 2 Dec 2020 21:36:41 -0800 +Subject: [PATCH] Fix distro resolution for RedHat (#2083) + +vkuznets: cherry-picking the primary change of the commit (adding 'rhel') +only, pylint changes require additional commits. + +Signed-off-by: Vitaly Kuznetsov +--- + azurelinuxagent/common/osutil/factory.py | 4 +--- + tests/common/osutil/test_factory.py | 14 ++++++++++++++ + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py +index 69f8430052d5..caecaa0887e2 100644 +--- a/azurelinuxagent/common/osutil/factory.py ++++ b/azurelinuxagent/common/osutil/factory.py +@@ -97,9 +97,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) + else: + return DebianOSBaseUtil() + +- if distro_name == "redhat" \ +- or distro_name == "centos" \ +- or distro_name == "oracle": ++ if distro_name in ("redhat", "rhel", "centos", "oracle"): + if Version(distro_version) < Version("7"): + return Redhat6xOSUtil() + else: +diff --git a/tests/common/osutil/test_factory.py b/tests/common/osutil/test_factory.py +index aa7daebcf25f..2ac0849f75c9 100644 +--- a/tests/common/osutil/test_factory.py ++++ b/tests/common/osutil/test_factory.py +@@ -188,6 +188,13 @@ class TestOsUtilFactory(AgentTestCase): + self.assertTrue(type(ret) == Redhat6xOSUtil) + self.assertEquals(ret.get_service_name(), "waagent") + ++ ret = _get_osutil(distro_name="rhel", ++ distro_code_name="", ++ distro_full_name="", ++ distro_version="6") ++ self.assertTrue(type(ret) == Redhat6xOSUtil) ++ self.assertEquals(ret.get_service_name(), "waagent") ++ + ret = _get_osutil(distro_name="centos", + distro_code_name="", + distro_full_name="", +@@ -209,6 +216,13 @@ class TestOsUtilFactory(AgentTestCase): + self.assertTrue(type(ret) == RedhatOSUtil) + self.assertEquals(ret.get_service_name(), "waagent") + ++ ret = _get_osutil(distro_name="rhel", ++ distro_code_name="", ++ distro_full_name="", ++ distro_version="7") ++ self.assertTrue(type(ret) == RedhatOSUtil) ++ self.assertEquals(ret.get_service_name(), "waagent") ++ + ret = _get_osutil(distro_name="centos", + distro_code_name="", + distro_full_name="", +-- +2.29.2 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index f706c8d..3461261 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.2.52 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -15,6 +15,7 @@ Source1: module-setup.sh Patch0: 0001-update-array.tostring-and-json.loads-without-encodin.patch Patch1: 0002-handle-py3.9-check-in-future.py.patch Patch2: 0003-fix-pylint.patch +Patch3: 0004-Fix-distro-resolution-for-RedHat-2083.patch BuildArch: noarch @@ -61,6 +62,7 @@ Udev rules specific to Microsoft Azure Virtual Machines. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build %py3_build @@ -123,10 +125,13 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue Jan 26 2021 Vitaly Kuznetsov - 2.2.52-4 +- Fix distro resolution for RedHat + * Mon Jan 25 2021 Fedora Release Engineering - 2.2.52-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild -* Fri Jan 15 2021 italy Kuznetsov - 2.2.52-2 +* Fri Jan 15 2021 Vitaly Kuznetsov - 2.2.52-2 - Add udev rules to initramfs (#1909287) * Wed Dec 09 2020 Vitaly Kuznetsov - 2.2.52-1 From 9c8d095ec6d0d6255fb5aa55a4eccdffb8be65fc Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 19 Feb 2021 11:01:30 +0100 Subject: [PATCH 05/55] Require ntfsprogs on Fedora only Signed-off-by: Vitaly Kuznetsov --- WALinuxAgent.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 3461261..bbe617f 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.2.52 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -23,7 +23,9 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-distro Requires: %name-udev = %version-%release +%if 0%{?fedora} Requires: ntfsprogs +%endif Requires: openssh Requires: openssh-server Requires: openssl @@ -125,6 +127,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Feb 19 2021 Vitaly Kuznetsov - 2.2.52-5 +- Require ntfsprogs on Fedora only + * Tue Jan 26 2021 Vitaly Kuznetsov - 2.2.52-4 - Fix distro resolution for RedHat From 4d89b7a51e158463a5ca13a132336702ebe24b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:02 +0100 Subject: [PATCH 06/55] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- WALinuxAgent.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index bbe617f..7ec541a 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.2.52 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -127,6 +127,10 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.2.52-6 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Fri Feb 19 2021 Vitaly Kuznetsov - 2.2.52-5 - Require ntfsprogs on Fedora only From 4afd599036dab95519173c2744bcf00c5594657f Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 21 May 2021 14:14:14 +0200 Subject: [PATCH 07/55] Update to 2.2.54.2 (#1916966) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + ...-Install-systemd-unit-for-default-OS.patch | 42 +++++++++ ...tring-and-json.loads-without-encodin.patch | 72 --------------- 0002-handle-py3.9-check-in-future.py.patch | 90 ------------------- 0003-fix-pylint.patch | 33 ------- ...ix-distro-resolution-for-RedHat-2083.patch | 64 ------------- WALinuxAgent.spec | 20 ++--- sources | 2 +- 8 files changed, 51 insertions(+), 273 deletions(-) create mode 100644 0001-Install-systemd-unit-for-default-OS.patch delete mode 100644 0001-update-array.tostring-and-json.loads-without-encodin.patch delete mode 100644 0002-handle-py3.9-check-in-future.py.patch delete mode 100644 0003-fix-pylint.patch delete mode 100644 0004-Fix-distro-resolution-for-RedHat-2083.patch diff --git a/.gitignore b/.gitignore index 4336e5e..65029c1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /WALinuxAgent-2.2.52.tar.gz /v2.2.52.tar.gz /module-setup.sh +/v2.2.54.2.tar.gz diff --git a/0001-Install-systemd-unit-for-default-OS.patch b/0001-Install-systemd-unit-for-default-OS.patch new file mode 100644 index 0000000..3561c77 --- /dev/null +++ b/0001-Install-systemd-unit-for-default-OS.patch @@ -0,0 +1,42 @@ +From 53a8080be30553ecbd9262d721c9d3374b8e48e5 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Thu, 3 Jun 2021 12:48:02 +0200 +Subject: [PATCH] Install systemd unit for 'default' OS + +Fedora is not in the list but uses systemd and not sysv. + +Signed-off-by: Vitaly Kuznetsov +--- + azurelinuxagent/common/osutil/default.py | 2 +- + setup.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index 066e143136d7..fcb7d9b857dd 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -146,7 +146,7 @@ class DefaultOSUtil(object): + + @staticmethod + def get_systemd_unit_file_install_path(): +- return "/lib/systemd/system" ++ return "/usr/lib/systemd/system" + + @staticmethod + def get_agent_bin_path(): +diff --git a/setup.py b/setup.py +index c258e4b878cc..b2ed8f4cde36 100755 +--- a/setup.py ++++ b/setup.py +@@ -194,7 +194,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 + set_conf_files(data_files) + set_logrotate_files(data_files) + set_udev_files(data_files) +- set_sysv_files(data_files) ++ set_systemd_files(data_files, dest=systemd_dir_path) + return data_files + + +-- +2.31.1 + diff --git a/0001-update-array.tostring-and-json.loads-without-encodin.patch b/0001-update-array.tostring-and-json.loads-without-encodin.patch deleted file mode 100644 index d88c41c..0000000 --- a/0001-update-array.tostring-and-json.loads-without-encodin.patch +++ /dev/null @@ -1,72 +0,0 @@ -From cc9b7996e542640bb19365822344298a04b18e44 Mon Sep 17 00:00:00 2001 -From: Paula Gombar -Date: Wed, 18 Nov 2020 12:24:33 -0800 -Subject: [PATCH 1/3] update array.tostring() and json.loads without encoding - for py3.9 - ---- - azurelinuxagent/common/osutil/bigip.py | 7 ++++++- - azurelinuxagent/common/osutil/default.py | 6 +++++- - tests/protocol/test_imds.py | 4 ++-- - 3 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/azurelinuxagent/common/osutil/bigip.py b/azurelinuxagent/common/osutil/bigip.py -index 61d3c695f911..ceadf8ca2066 100644 ---- a/azurelinuxagent/common/osutil/bigip.py -+++ b/azurelinuxagent/common/osutil/bigip.py -@@ -280,7 +280,12 @@ class BigIpOSUtil(DefaultOSUtil): - if retsize == (expected * struct_size): - logger.warn(('SIOCGIFCONF returned more than {0} up ' - 'network interfaces.'), expected) -- sock = buff.tostring() -+ try: -+ # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias -+ sock = buff.tostring() -+ except AttributeError: -+ sock = buff.tobytes() -+ - for i in range(0, struct_size * expected, struct_size): - iface = self._format_single_interface_name(sock, i) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 521776818e64..6179061756e3 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -758,7 +758,11 @@ class DefaultOSUtil(object): - logger.warn(('SIOCGIFCONF returned more than {0} up ' - 'network interfaces.'), expected) - -- ifconf_buff = buff.tostring() -+ try: -+ # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias -+ ifconf_buff = buff.tostring() -+ except AttributeError: -+ ifconf_buff = buff.tobytes() - - ifaces = {} - for i in range(0, array_size, struct_size): -diff --git a/tests/protocol/test_imds.py b/tests/protocol/test_imds.py -index a730ded03525..47462fd25ac3 100644 ---- a/tests/protocol/test_imds.py -+++ b/tests/protocol/test_imds.py -@@ -109,7 +109,7 @@ class TestImds(AgentTestCase): - "zone": "In" - }''' - -- data = json.loads(s, encoding='utf-8') -+ data = json.loads(s) - - compute_info = imds.ComputeInfo() - set_properties("compute", compute_info, data) -@@ -258,7 +258,7 @@ class TestImds(AgentTestCase): - "version": "{3}" - }}'''.format(publisher, offer, sku, version) - -- data = json.loads(s, encoding='utf-8') -+ data = json.loads(s) - compute_info = imds.ComputeInfo() - set_properties("compute", compute_info, data) - --- -2.26.2 - diff --git a/0002-handle-py3.9-check-in-future.py.patch b/0002-handle-py3.9-check-in-future.py.patch deleted file mode 100644 index d7c563a..0000000 --- a/0002-handle-py3.9-check-in-future.py.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 66f600ed3d9f22c2aa6790002507d0c821a7fd0c Mon Sep 17 00:00:00 2001 -From: Paula Gombar -Date: Tue, 8 Dec 2020 18:38:33 -0800 -Subject: [PATCH 2/3] handle py3.9 check in future.py - ---- - azurelinuxagent/common/future.py | 13 ++++++++++++- - azurelinuxagent/common/osutil/bigip.py | 8 +++----- - azurelinuxagent/common/osutil/default.py | 9 ++------- - 3 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/azurelinuxagent/common/future.py b/azurelinuxagent/common/future.py -index 577fb12e186e..0f76aceba786 100644 ---- a/azurelinuxagent/common/future.py -+++ b/azurelinuxagent/common/future.py -@@ -103,4 +103,15 @@ def get_openwrt_platform(): - elif product_matches: - if product_matches.group(1) == "OpenWrt": - result[0] = "openwrt" -- return result -\ No newline at end of file -+ return result -+ -+ -+def array_to_string_or_bytes(buffer): -+ # Python 3.9 removed the tostring() method on arrays, the new alias is tobytes() -+ if sys.version_info[0] == 2: -+ return buffer.tostring() -+ -+ if sys.version_info[0] == 3 and sys.version_info[1] <= 8: -+ return buffer.tostring() -+ -+ return buffer.tobytes() -diff --git a/azurelinuxagent/common/osutil/bigip.py b/azurelinuxagent/common/osutil/bigip.py -index ceadf8ca2066..cc1b64143c12 100644 ---- a/azurelinuxagent/common/osutil/bigip.py -+++ b/azurelinuxagent/common/osutil/bigip.py -@@ -24,6 +24,8 @@ import socket - import struct - import time - -+from azurelinuxagent.common.future import array_to_string_or_bytes -+ - try: - # WAAgent > 2.1.3 - import azurelinuxagent.common.logger as logger -@@ -280,12 +282,8 @@ class BigIpOSUtil(DefaultOSUtil): - if retsize == (expected * struct_size): - logger.warn(('SIOCGIFCONF returned more than {0} up ' - 'network interfaces.'), expected) -- try: -- # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias -- sock = buff.tostring() -- except AttributeError: -- sock = buff.tobytes() - -+ sock = array_to_string_or_bytes(buff) - for i in range(0, struct_size * expected, struct_size): - iface = self._format_single_interface_name(sock, i) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 6179061756e3..c1ca15cf64ef 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -41,7 +41,7 @@ import azurelinuxagent.common.utils.fileutil as fileutil - import azurelinuxagent.common.utils.shellutil as shellutil - import azurelinuxagent.common.utils.textutil as textutil - from azurelinuxagent.common.exception import OSUtilError --from azurelinuxagent.common.future import ustr -+from azurelinuxagent.common.future import ustr, array_to_string_or_bytes - from azurelinuxagent.common.utils.cryptutil import CryptUtil - from azurelinuxagent.common.utils.flexible_version import FlexibleVersion - from azurelinuxagent.common.utils.networkutil import RouteEntry, NetworkInterfaceCard -@@ -758,12 +758,7 @@ class DefaultOSUtil(object): - logger.warn(('SIOCGIFCONF returned more than {0} up ' - 'network interfaces.'), expected) - -- try: -- # Python 3.9 removed the tostring() method on arrays, tobytes() is the new alias -- ifconf_buff = buff.tostring() -- except AttributeError: -- ifconf_buff = buff.tobytes() -- -+ ifconf_buff = array_to_string_or_bytes(buff) - ifaces = {} - for i in range(0, array_size, struct_size): - iface = ifconf_buff[i:i+IFNAMSIZ].split(b'\0', 1)[0] --- -2.26.2 - diff --git a/0003-fix-pylint.patch b/0003-fix-pylint.patch deleted file mode 100644 index 03b887c..0000000 --- a/0003-fix-pylint.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 90f1a4862cf63df4a96ad912effcfb54192ad4d7 Mon Sep 17 00:00:00 2001 -From: Paula Gombar -Date: Tue, 8 Dec 2020 18:53:57 -0800 -Subject: [PATCH 3/3] fix pylint - ---- - azurelinuxagent/common/future.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/azurelinuxagent/common/future.py b/azurelinuxagent/common/future.py -index 0f76aceba786..a6796f19fec2 100644 ---- a/azurelinuxagent/common/future.py -+++ b/azurelinuxagent/common/future.py -@@ -106,12 +106,12 @@ def get_openwrt_platform(): - return result - - --def array_to_string_or_bytes(buffer): -+def array_to_string_or_bytes(buff): - # Python 3.9 removed the tostring() method on arrays, the new alias is tobytes() - if sys.version_info[0] == 2: -- return buffer.tostring() -+ return buff.tostring() - - if sys.version_info[0] == 3 and sys.version_info[1] <= 8: -- return buffer.tostring() -+ return buff.tostring() - -- return buffer.tobytes() -+ return buff.tobytes() --- -2.26.2 - diff --git a/0004-Fix-distro-resolution-for-RedHat-2083.patch b/0004-Fix-distro-resolution-for-RedHat-2083.patch deleted file mode 100644 index e0ce7b2..0000000 --- a/0004-Fix-distro-resolution-for-RedHat-2083.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 3420fef144cf9a5be62cfae16f64c298ca397a17 Mon Sep 17 00:00:00 2001 -From: Paula Gombar -Date: Wed, 2 Dec 2020 21:36:41 -0800 -Subject: [PATCH] Fix distro resolution for RedHat (#2083) - -vkuznets: cherry-picking the primary change of the commit (adding 'rhel') -only, pylint changes require additional commits. - -Signed-off-by: Vitaly Kuznetsov ---- - azurelinuxagent/common/osutil/factory.py | 4 +--- - tests/common/osutil/test_factory.py | 14 ++++++++++++++ - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py -index 69f8430052d5..caecaa0887e2 100644 ---- a/azurelinuxagent/common/osutil/factory.py -+++ b/azurelinuxagent/common/osutil/factory.py -@@ -97,9 +97,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) - else: - return DebianOSBaseUtil() - -- if distro_name == "redhat" \ -- or distro_name == "centos" \ -- or distro_name == "oracle": -+ if distro_name in ("redhat", "rhel", "centos", "oracle"): - if Version(distro_version) < Version("7"): - return Redhat6xOSUtil() - else: -diff --git a/tests/common/osutil/test_factory.py b/tests/common/osutil/test_factory.py -index aa7daebcf25f..2ac0849f75c9 100644 ---- a/tests/common/osutil/test_factory.py -+++ b/tests/common/osutil/test_factory.py -@@ -188,6 +188,13 @@ class TestOsUtilFactory(AgentTestCase): - self.assertTrue(type(ret) == Redhat6xOSUtil) - self.assertEquals(ret.get_service_name(), "waagent") - -+ ret = _get_osutil(distro_name="rhel", -+ distro_code_name="", -+ distro_full_name="", -+ distro_version="6") -+ self.assertTrue(type(ret) == Redhat6xOSUtil) -+ self.assertEquals(ret.get_service_name(), "waagent") -+ - ret = _get_osutil(distro_name="centos", - distro_code_name="", - distro_full_name="", -@@ -209,6 +216,13 @@ class TestOsUtilFactory(AgentTestCase): - self.assertTrue(type(ret) == RedhatOSUtil) - self.assertEquals(ret.get_service_name(), "waagent") - -+ ret = _get_osutil(distro_name="rhel", -+ distro_code_name="", -+ distro_full_name="", -+ distro_version="7") -+ self.assertTrue(type(ret) == RedhatOSUtil) -+ self.assertEquals(ret.get_service_name(), "waagent") -+ - ret = _get_osutil(distro_name="centos", - distro_code_name="", - distro_full_name="", --- -2.29.2 - diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 7ec541a..95cccd7 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.2.52 -Release: 6%{?dist} +Version: 2.2.54.2 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -11,11 +11,7 @@ URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh -# Python3.9 fixes -Patch0: 0001-update-array.tostring-and-json.loads-without-encodin.patch -Patch1: 0002-handle-py3.9-check-in-future.py.patch -Patch2: 0003-fix-pylint.patch -Patch3: 0004-Fix-distro-resolution-for-RedHat-2083.patch +Patch0: 0001-Install-systemd-unit-for-default-OS.patch BuildArch: noarch @@ -62,9 +58,6 @@ Udev rules specific to Microsoft Azure Virtual Machines. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build %py3_build @@ -92,7 +85,6 @@ rm -f %{buildroot}%{_sbindir}/waagent2.0 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-extn.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-extn install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1} @@ -106,11 +98,10 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %systemd_postun_with_restart waagent.service %files -%doc Changelog LICENSE.txt NOTICE README.md +%doc LICENSE.txt NOTICE README.md %ghost %{_localstatedir}/log/waagent.log %dir %attr(0700, root, root) %{_sharedstatedir}/waagent %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-extn %{_sbindir}/waagent %config(noreplace) %{_sysconfdir}/waagent.conf %{_unitdir}/waagent.service @@ -127,6 +118,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri May 21 2021 Vitaly Kuznetsov - 2.2.54.2-1 +- Update to 2.2.54.2 (#1916966) + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.2.52-6 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. diff --git a/sources b/sources index 0a8ac9b..26b568d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.2.52.tar.gz) = b8d71cb4873b7e9cf92c755884bb104e5e37f171fbdae3d702b2b005a461b8f5447c9dcc80037ff0bfe9950ffbcb901e023e0bda918f481f5336c8ecbaecbbcc +SHA512 (v2.2.54.2.tar.gz) = a8b0d65b9179db9b83a0cbc53221fe31f220056cb62b522d8d22178948ff09beea8dd59b1ff0c289e36961f9b1ceebb7aa20a7057afbe6b7deea58376701a41a SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 75e9b7669427610a972ef42316d64548d83ac422 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 21:19:47 +0200 Subject: [PATCH 08/55] Rebuilt for Python 3.10 --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 95cccd7..d837194 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.2.54.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -118,6 +118,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Jun 04 2021 Python Maint - 2.2.54.2-2 +- Rebuilt for Python 3.10 + * Fri May 21 2021 Vitaly Kuznetsov - 2.2.54.2-1 - Update to 2.2.54.2 (#1916966) From 9a30a01b6b38fac901793d24392526c10386be3f Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 15 Jun 2021 09:19:05 +0200 Subject: [PATCH 09/55] Update to 2.3.0.2 (#1971116) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 65029c1..b27c150 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /v2.2.52.tar.gz /module-setup.sh /v2.2.54.2.tar.gz +/v2.3.0.2.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index d837194..3777bbf 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.2.54.2 -Release: 2%{?dist} +Version: 2.3.0.2 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -118,6 +118,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue Jun 15 2021 Vitaly Kuznetsov - 2.3.0.2-1 +- Update to 2.3.0.2 (#1971116) + * Fri Jun 04 2021 Python Maint - 2.2.54.2-2 - Rebuilt for Python 3.10 diff --git a/sources b/sources index 26b568d..4f6e127 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.2.54.2.tar.gz) = a8b0d65b9179db9b83a0cbc53221fe31f220056cb62b522d8d22178948ff09beea8dd59b1ff0c289e36961f9b1ceebb7aa20a7057afbe6b7deea58376701a41a +SHA512 (v2.3.0.2.tar.gz) = 7aa3c0d5a0987774625cacb4e5be105779db8e6531fba2d5d2fd58931616e8b79d00f253b972d1e531c652f6d782e607748e135fa522258f8a5fb137002e0e25 SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 7952d3e4048bb0b28dd8788cf79bf3378ff41e2f Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 19 Jul 2021 13:31:41 +0200 Subject: [PATCH 10/55] Update to 2.3.1.1 (#1982512) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b27c150..a526c1d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /module-setup.sh /v2.2.54.2.tar.gz /v2.3.0.2.tar.gz +/v2.3.1.1.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 3777bbf..c5ce145 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,7 +2,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.3.0.2 +Version: 2.3.1.1 Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent @@ -118,6 +118,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Jul 19 2021 Vitaly Kuznetsov - 2.3.1.1-1 +- Update to 2.3.1.1 (#1982512) + * Tue Jun 15 2021 Vitaly Kuznetsov - 2.3.0.2-1 - Update to 2.3.0.2 (#1971116) diff --git a/sources b/sources index 4f6e127..564548e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.3.0.2.tar.gz) = 7aa3c0d5a0987774625cacb4e5be105779db8e6531fba2d5d2fd58931616e8b79d00f253b972d1e531c652f6d782e607748e135fa522258f8a5fb137002e0e25 +SHA512 (v2.3.1.1.tar.gz) = d68a622f0280d442e02b34ddac668f466252a7ed4581af63eb88df544ddb0808db04a3f35e24c1202c974ad6b7aa1e30ed1d4a3c14a3ba0a12de02fa3a5c4406 SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 5a1c912dd3d8579775d628e0c2e4c4f324226dd2 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 19 Jul 2021 13:33:15 +0200 Subject: [PATCH 11/55] Require iptables for setting up persistent firewall rules Signed-off-by: Vitaly Kuznetsov --- WALinuxAgent.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index c5ce145..6ae3d55 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -27,6 +27,7 @@ Requires: openssh-server Requires: openssl Requires: parted Requires: python3-pyasn1 +Requires: iptables BuildRequires: systemd Requires(post): systemd @@ -120,6 +121,7 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %changelog * Mon Jul 19 2021 Vitaly Kuznetsov - 2.3.1.1-1 - Update to 2.3.1.1 (#1982512) +- Require iptables for setting up persistent firewall rules * Tue Jun 15 2021 Vitaly Kuznetsov - 2.3.0.2-1 - Update to 2.3.0.2 (#1971116) From 445863d8080d5d6127aa3727ac380ad66e3012de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 12:11:55 +0000 Subject: [PATCH 12/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From c520cab2392182bb11579f5f58706cce1adfe563 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 17:07:02 +0000 Subject: [PATCH 13/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 6ae3d55..de501e9 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.3.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -119,6 +119,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 2.3.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Jul 19 2021 Vitaly Kuznetsov - 2.3.1.1-1 - Update to 2.3.1.1 (#1982512) - Require iptables for setting up persistent firewall rules From a0bd5c50178e09a0d1cf62e9d3520f13f1cb59c8 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 3 Jan 2022 15:47:56 +0100 Subject: [PATCH 14/55] Update to 2.5.0.2 (#2008699) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a526c1d..082e2c9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /v2.2.54.2.tar.gz /v2.3.0.2.tar.gz /v2.3.1.1.tar.gz +/v2.5.0.2.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index de501e9..40ad3c2 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.3.1.1 -Release: 2%{?dist} +Version: 2.5.0.2 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -119,6 +119,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Jan 02 2022 Vitaly Kuznetsov - 2.5.0.2-1 +- Update to 2.5.0.2 (#2008699) + * Wed Jul 21 2021 Fedora Release Engineering - 2.3.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 564548e..177047c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.3.1.1.tar.gz) = d68a622f0280d442e02b34ddac668f466252a7ed4581af63eb88df544ddb0808db04a3f35e24c1202c974ad6b7aa1e30ed1d4a3c14a3ba0a12de02fa3a5c4406 +SHA512 (v2.5.0.2.tar.gz) = e3b81ad767e42cfc0884c5adfb08912da725dcd14f9ee2f0003c101ed0a370c47f37141e504cbe6d2860e52581e714565b7815685d8b6e6792af7dae7d3cc29e SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 3d83b3fc71109adb70846edb4d587892bb0a9a68 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 20:46:54 +0000 Subject: [PATCH 15/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 40ad3c2..49289c7 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.5.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -119,6 +119,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 2.5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Jan 02 2022 Vitaly Kuznetsov - 2.5.0.2-1 - Update to 2.5.0.2 (#2008699) From 21786db889f96772e368980a46a3de0d4b0f0368 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 22 Apr 2022 16:30:12 +0200 Subject: [PATCH 16/55] Fix bogus date in changelog Signed-off-by: Vitaly Kuznetsov --- WALinuxAgent.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 49289c7..b13ca9d 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -122,7 +122,7 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam * Wed Jan 19 2022 Fedora Release Engineering - 2.5.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Mon Jan 02 2022 Vitaly Kuznetsov - 2.5.0.2-1 +* Mon Jan 03 2022 Vitaly Kuznetsov - 2.5.0.2-1 - Update to 2.5.0.2 (#2008699) * Wed Jul 21 2021 Fedora Release Engineering - 2.3.1.1-2 From 3512a95d3dafd573ce8f8e9921bfded1472a3ea9 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 22 Apr 2022 08:51:13 +0200 Subject: [PATCH 17/55] Update to 2.7.0.6 (#2040980) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + ...-Install-systemd-unit-for-default-OS.patch | 42 ------ ...Rudimentary-Fedora-OS-implementation.patch | 136 ++++++++++++++++++ WALinuxAgent.spec | 11 +- sources | 2 +- 5 files changed, 146 insertions(+), 46 deletions(-) delete mode 100644 0001-Install-systemd-unit-for-default-OS.patch create mode 100644 0001-Rudimentary-Fedora-OS-implementation.patch diff --git a/.gitignore b/.gitignore index 082e2c9..a9bfadd 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /v2.3.0.2.tar.gz /v2.3.1.1.tar.gz /v2.5.0.2.tar.gz +/v2.7.0.6.tar.gz diff --git a/0001-Install-systemd-unit-for-default-OS.patch b/0001-Install-systemd-unit-for-default-OS.patch deleted file mode 100644 index 3561c77..0000000 --- a/0001-Install-systemd-unit-for-default-OS.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 53a8080be30553ecbd9262d721c9d3374b8e48e5 Mon Sep 17 00:00:00 2001 -From: Vitaly Kuznetsov -Date: Thu, 3 Jun 2021 12:48:02 +0200 -Subject: [PATCH] Install systemd unit for 'default' OS - -Fedora is not in the list but uses systemd and not sysv. - -Signed-off-by: Vitaly Kuznetsov ---- - azurelinuxagent/common/osutil/default.py | 2 +- - setup.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 066e143136d7..fcb7d9b857dd 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -146,7 +146,7 @@ class DefaultOSUtil(object): - - @staticmethod - def get_systemd_unit_file_install_path(): -- return "/lib/systemd/system" -+ return "/usr/lib/systemd/system" - - @staticmethod - def get_agent_bin_path(): -diff --git a/setup.py b/setup.py -index c258e4b878cc..b2ed8f4cde36 100755 ---- a/setup.py -+++ b/setup.py -@@ -194,7 +194,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 - set_conf_files(data_files) - set_logrotate_files(data_files) - set_udev_files(data_files) -- set_sysv_files(data_files) -+ set_systemd_files(data_files, dest=systemd_dir_path) - return data_files - - --- -2.31.1 - diff --git a/0001-Rudimentary-Fedora-OS-implementation.patch b/0001-Rudimentary-Fedora-OS-implementation.patch new file mode 100644 index 0000000..3c44755 --- /dev/null +++ b/0001-Rudimentary-Fedora-OS-implementation.patch @@ -0,0 +1,136 @@ +From e236dc20fbda54d040960615a93565be9c4bdae7 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Fri, 22 Apr 2022 16:16:19 +0200 +Subject: [PATCH] Rudimentary Fedora OS implementation +Content-Type: text/plain + +Signed-off-by: Vitaly Kuznetsov +--- + azurelinuxagent/common/osutil/factory.py | 4 ++ + azurelinuxagent/common/osutil/fedora.py | 75 ++++++++++++++++++++++++ + setup.py | 6 ++ + 3 files changed, 85 insertions(+) + create mode 100644 azurelinuxagent/common/osutil/fedora.py + +diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py +index b8f4291b3ea4..625978569880 100644 +--- a/azurelinuxagent/common/osutil/factory.py ++++ b/azurelinuxagent/common/osutil/factory.py +@@ -39,6 +39,7 @@ from .suse import SUSEOSUtil, SUSE11OSUtil + from .photonos import PhotonOSUtil + from .ubuntu import UbuntuOSUtil, Ubuntu12OSUtil, Ubuntu14OSUtil, \ + UbuntuSnappyOSUtil, Ubuntu16OSUtil, Ubuntu18OSUtil ++from .fedora import FedoraOSUtil + + + def get_osutil(distro_name=DISTRO_NAME, +@@ -138,5 +139,8 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) + if distro_name == "openwrt": + return OpenWRTOSUtil() + ++ if distro_name == "fedora": ++ return FedoraOSUtil() ++ + logger.warn("Unable to load distro implementation for {0}. Using default distro implementation instead.", distro_name) + return DefaultOSUtil() +diff --git a/azurelinuxagent/common/osutil/fedora.py b/azurelinuxagent/common/osutil/fedora.py +new file mode 100644 +index 000000000000..480f139a87ed +--- /dev/null ++++ b/azurelinuxagent/common/osutil/fedora.py +@@ -0,0 +1,75 @@ ++# ++# Copyright 2022 Red Hat Inc. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# Requires Python 2.6+ and Openssl 1.0+ ++# ++ ++import azurelinuxagent.common.utils.shellutil as shellutil ++from azurelinuxagent.common.osutil.default import DefaultOSUtil ++ ++ ++class FedoraOSUtil(DefaultOSUtil): ++ ++ def __init__(self): ++ super(FedoraOSUtil, self).__init__() ++ self.agent_conf_file_path = '/etc/waagent.conf' ++ ++ @staticmethod ++ def get_systemd_unit_file_install_path(): ++ return '/usr/lib/systemd/system' ++ ++ @staticmethod ++ def get_agent_bin_path(): ++ return '/usr/sbin' ++ ++ def is_dhcp_enabled(self): ++ return True ++ ++ def start_network(self): ++ pass ++ ++ def restart_if(self, ifname=None, retries=None, wait=None): ++ retry_limit = retries+1 ++ for attempt in range(1, retry_limit): ++ return_code = shellutil.run("ip link set {0} down && ip link set {0} up".format(ifname)) ++ if return_code == 0: ++ return ++ logger.warn("failed to restart {0}: return code {1}".format(ifname, return_code)) ++ if attempt < retry_limit: ++ logger.info("retrying in {0} seconds".format(wait)) ++ time.sleep(wait) ++ else: ++ logger.warn("exceeded restart retries") ++ ++ def restart_ssh_service(self): ++ shellutil.run('systemctl restart sshd') ++ ++ def stop_dhcp_service(self): ++ pass ++ ++ def start_dhcp_service(self): ++ pass ++ ++ def start_agent_service(self): ++ return shellutil.run('systemctl start waagent', chk_err=False) ++ ++ def stop_agent_service(self): ++ return shellutil.run('systemctl stop waagent', chk_err=False) ++ ++ def get_dhcp_pid(self): ++ return self._get_dhcp_pid(["pidof", "dhclient"]) ++ ++ def conf_sshd(self, disable_password): ++ pass +diff --git a/setup.py b/setup.py +index 12c9e1d61979..b0acead305b5 100755 +--- a/setup.py ++++ b/setup.py +@@ -238,6 +238,12 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 + set_conf_files(data_files, src=["config/photonos/waagent.conf"]) + set_systemd_files(data_files, dest=systemd_dir_path, + src=["init/photonos/waagent.service"]) ++ elif name == 'fedora': ++ set_bin_files(data_files, dest=agent_bin_path) ++ set_conf_files(data_files) ++ set_logrotate_files(data_files) ++ set_udev_files(data_files) ++ set_systemd_files(data_files, dest=systemd_dir_path) + else: + # Use default setting + set_bin_files(data_files, dest=agent_bin_path) +-- +2.35.1 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index b13ca9d..990cd83 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.5.0.2 -Release: 2%{?dist} +Version: 2.7.0.6 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -11,7 +11,7 @@ URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh -Patch0: 0001-Install-systemd-unit-for-default-OS.patch +Patch0: 0001-Rudimentary-Fedora-OS-implementation.patch BuildArch: noarch @@ -106,6 +106,8 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %{_sbindir}/waagent %config(noreplace) %{_sysconfdir}/waagent.conf %{_unitdir}/waagent.service +%{_unitdir}/azure.slice +%{_unitdir}/azure-vmextensions.slice %{python3_sitelib}/azurelinuxagent %{python3_sitelib}/*.egg-info @@ -119,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Apr 22 2022 Vitaly Kuznetsov - 2.7.0.6-1 +- Update to 2.7.0.6 (#2040980) + * Wed Jan 19 2022 Fedora Release Engineering - 2.5.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 177047c..ce5cd47 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.5.0.2.tar.gz) = e3b81ad767e42cfc0884c5adfb08912da725dcd14f9ee2f0003c101ed0a370c47f37141e504cbe6d2860e52581e714565b7815685d8b6e6792af7dae7d3cc29e +SHA512 (v2.7.0.6.tar.gz) = b23c9c31014d5f5e31952bb97babfcf45058fa2826d3ca167ee87d432a9459b99ce1b823e7c7e83933f8389368ee47d76398dd514ce0a3b27bfb47ba4e44a17b SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From e59356e4e7b40eb81f144f58b943426613dd019d Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 22:00:15 +0200 Subject: [PATCH 18/55] Rebuilt for Python 3.11 --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 990cd83..85124e0 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.7.0.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Jun 13 2022 Python Maint - 2.7.0.6-2 +- Rebuilt for Python 3.11 + * Fri Apr 22 2022 Vitaly Kuznetsov - 2.7.0.6-1 - Update to 2.7.0.6 (#2040980) From 81375d9d229c6747e2be253c5bc525ab174a6d66 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 1 Jul 2022 10:27:14 +0200 Subject: [PATCH 19/55] Update to 2.7.1.0 (#2097244) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a9bfadd..8dccc07 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /v2.3.1.1.tar.gz /v2.5.0.2.tar.gz /v2.7.0.6.tar.gz +/v2.7.1.0.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 85124e0..f2cfced 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.7.0.6 -Release: 2%{?dist} +Version: 2.7.1.0 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Thu Jun 30 2022 Vitaly Kuznetsov - 2.7.1.0-1 +- Update to 2.7.1.0 (#2097244) + * Mon Jun 13 2022 Python Maint - 2.7.0.6-2 - Rebuilt for Python 3.11 diff --git a/sources b/sources index ce5cd47..d9e3814 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.7.0.6.tar.gz) = b23c9c31014d5f5e31952bb97babfcf45058fa2826d3ca167ee87d432a9459b99ce1b823e7c7e83933f8389368ee47d76398dd514ce0a3b27bfb47ba4e44a17b +SHA512 (v2.7.1.0.tar.gz) = 4546f6fbf8e572ce450185888317b4499d2e3ecb3d8501d7b2473a53fc8911b10dac6a288d033833b8b9dde4bccb58367dac965f3bd4ad0dd58e5e0fe4c15751 SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From b340e65762060ee50f26815653d00febd8be4032 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 20:17:24 +0000 Subject: [PATCH 20/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index f2cfced..8957c68 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.7.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 2.7.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jun 30 2022 Vitaly Kuznetsov - 2.7.1.0-1 - Update to 2.7.1.0 (#2097244) From b0001c96bb39a1bb4a6830e7adf63f2735207982 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Wed, 3 Aug 2022 10:30:01 +0200 Subject: [PATCH 21/55] Update to 2.7.3.0 (#2110155) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8dccc07..8e844c1 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /v2.5.0.2.tar.gz /v2.7.0.6.tar.gz /v2.7.1.0.tar.gz +/v2.7.3.0.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 8957c68..3d932ef 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.7.1.0 -Release: 2%{?dist} +Version: 2.7.3.0 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Aug 03 2022 Vitaly Kuznetsov - 2.7.3.0-1 +- Update to 2.7.3.0 (#2110155) + * Wed Jul 20 2022 Fedora Release Engineering - 2.7.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index d9e3814..32bcf1a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.7.1.0.tar.gz) = 4546f6fbf8e572ce450185888317b4499d2e3ecb3d8501d7b2473a53fc8911b10dac6a288d033833b8b9dde4bccb58367dac965f3bd4ad0dd58e5e0fe4c15751 +SHA512 (v2.7.3.0.tar.gz) = c4cd310d591844ae9dd29f95e846532fb9771a0e1f546942160fe9dfe448e387090540f018688087ed10c8587a0bffbe73d33120732e35b01e0349e69e260eb6 SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 688db73b5ad95a4d1cddeea41dcd7b787f5d0a1b Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Thu, 13 Oct 2022 10:49:28 -0400 Subject: [PATCH 22/55] spec: address lint complaints (spaces v. tabs) Signed-off-by: Chris Patterson --- WALinuxAgent.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 3d932ef..557d218 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -11,7 +11,7 @@ URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh -Patch0: 0001-Rudimentary-Fedora-OS-implementation.patch +Patch0: 0001-Rudimentary-Fedora-OS-implementation.patch BuildArch: noarch @@ -42,9 +42,9 @@ images that are built to run in the Microsoft Azure environment. %if 0%{?with_legacy} %package legacy Summary: The Microsoft Azure Linux Agent (legacy) -Requires: %name = %version-%release -Requires: python2 -Requires: net-tools +Requires: %name = %version-%release +Requires: python2 +Requires: net-tools %description legacy The Microsoft Azure Linux Agent supporting old version of extensions. From 4248fde1ffb3a8ffec97958ae42d02763c7a529d Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Thu, 13 Oct 2022 10:52:21 -0400 Subject: [PATCH 23/55] Add ConditionVirtualization=|microsoft patch As Fedora will be enabling waagent.service by preset, set a conditional trigger to start only under Microsoft hypervisors. Currently, init/redhat/py2/waagent.service is the packaged systemd service unit, but patch other potentially applicable ones as well. This will be cleaned up in the near future when Fedora support is upstreamed to WALinuxAgent. Signed-off-by: Chris Patterson --- ...set-ConditionVirtualization-microsof.patch | 69 +++++++++++++++++++ WALinuxAgent.spec | 7 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 0001-waagent.service-set-ConditionVirtualization-microsof.patch diff --git a/0001-waagent.service-set-ConditionVirtualization-microsof.patch b/0001-waagent.service-set-ConditionVirtualization-microsof.patch new file mode 100644 index 0000000..c6a312e --- /dev/null +++ b/0001-waagent.service-set-ConditionVirtualization-microsof.patch @@ -0,0 +1,69 @@ +From dac5101c56b59dbb14d96d4344d6cb2ac047b392 Mon Sep 17 00:00:00 2001 +From: Chris Patterson +Date: Thu, 1 Sep 2022 10:45:47 -0400 +Subject: [PATCH] waagent.service: set ConditionVirtualization=|microsoft + +Only start waagent service when running under Microsoft virtualization. + +Set it as a triggering condition to make it easier for downstreams or +test setups to add another condition (i.e. run outside of hyperv). + +Signed-off-by: Chris Patterson +--- + bin/waagent2.0 | 1 + + init/redhat/py2/waagent.service | 1 + + init/redhat/waagent.service | 1 + + init/waagent.service | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/bin/waagent2.0 b/bin/waagent2.0 +index 34732677..c84c8c40 100644 +--- a/bin/waagent2.0 ++++ b/bin/waagent2.0 +@@ -1569,6 +1569,7 @@ After=network.target + After=sshd.service + ConditionFileIsExecutable=/usr/sbin/waagent + ConditionPathExists=/etc/waagent.conf ++ConditionVirtualization=|microsoft + + [Service] + Type=simple +diff --git a/init/redhat/py2/waagent.service b/init/redhat/py2/waagent.service +index c6d15420..132e7027 100644 +--- a/init/redhat/py2/waagent.service ++++ b/init/redhat/py2/waagent.service +@@ -5,6 +5,7 @@ After=network-online.target + + ConditionFileIsExecutable=/usr/sbin/waagent + ConditionPathExists=/etc/waagent.conf ++ConditionVirtualization=|microsoft + + [Service] + Type=simple +diff --git a/init/redhat/waagent.service b/init/redhat/waagent.service +index dc11fbb1..7c93b101 100644 +--- a/init/redhat/waagent.service ++++ b/init/redhat/waagent.service +@@ -5,6 +5,7 @@ After=network-online.target + + ConditionFileIsExecutable=/usr/sbin/waagent + ConditionPathExists=/etc/waagent.conf ++ConditionVirtualization=|microsoft + + [Service] + Type=simple +diff --git a/init/waagent.service b/init/waagent.service +index e91f1433..aa1f3203 100644 +--- a/init/waagent.service ++++ b/init/waagent.service +@@ -5,6 +5,7 @@ After=network-online.target + + ConditionFileIsExecutable=/usr/sbin/waagent + ConditionPathExists=/etc/waagent.conf ++ConditionVirtualization=|microsoft + + [Service] + Type=simple +-- +2.37.3 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 557d218..3af99ce 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.7.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -12,6 +12,7 @@ Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh Patch0: 0001-Rudimentary-Fedora-OS-implementation.patch +Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch BuildArch: noarch @@ -59,6 +60,7 @@ Udev rules specific to Microsoft Azure Virtual Machines. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %py3_build @@ -121,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue Oct 18 2022 Chris Patterson - 2.7.3.0-2 +- Add ConditionVirtualization=|microsoft triggering condition + * Wed Aug 03 2022 Vitaly Kuznetsov - 2.7.3.0-1 - Update to 2.7.3.0 (#2110155) From 0cf654ab1fda992cc8d9a0e544d0491097a7098b Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 31 Oct 2022 17:17:35 +0100 Subject: [PATCH 24/55] Update to 2.8.0.11 (#2128547) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8e844c1..c896f43 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /v2.7.0.6.tar.gz /v2.7.1.0.tar.gz /v2.7.3.0.tar.gz +/v2.8.0.11.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 3af99ce..c77e108 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.7.3.0 -Release: 2%{?dist} +Version: 2.8.0.11 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Oct 31 2022 Vitaly Kuznetsov - 2.8.0.11-1 +- Update to 2.8.0.11 (#2128547) + * Tue Oct 18 2022 Chris Patterson - 2.7.3.0-2 - Add ConditionVirtualization=|microsoft triggering condition diff --git a/sources b/sources index 32bcf1a..ff93e5e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.7.3.0.tar.gz) = c4cd310d591844ae9dd29f95e846532fb9771a0e1f546942160fe9dfe448e387090540f018688087ed10c8587a0bffbe73d33120732e35b01e0349e69e260eb6 +SHA512 (v2.8.0.11.tar.gz) = cc5f723851c55fc5b79e07bc07f2e7ff3d9a8463c4d7b7c7970e676df5acfb0a63fade66a5e1f016c7a8739946465a204c9db178136226389358e8d1bcbd2850 SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From 264b28780a8e88755481a92b5582b37c76f31912 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:15:03 +0000 Subject: [PATCH 25/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index c77e108..40de6b7 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.8.0.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 2.8.0.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Oct 31 2022 Vitaly Kuznetsov - 2.8.0.11-1 - Update to 2.8.0.11 (#2128547) From dd2fc13b80afd70c44ca473d20f8dfade00a7abe Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Mon, 16 Jan 2023 21:47:13 -0500 Subject: [PATCH 26/55] Move module-setup.sh into git It's not necessary to use the lookaside cache for this. It would be better to store it in source control so the content of the file is tracked and reviews can happen. --- WALinuxAgent.spec | 5 ++++- module-setup.sh | 16 ++++++++++++++++ sources | 1 - 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 module-setup.sh diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 40de6b7..b9e527f 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.8.0.11 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Jan 20 2023 Dusty Mabe - 2.8.0.11-3 +- Move module-setup.sh into git + * Wed Jan 18 2023 Fedora Release Engineering - 2.8.0.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/module-setup.sh b/module-setup.sh new file mode 100644 index 0000000..00d0eb7 --- /dev/null +++ b/module-setup.sh @@ -0,0 +1,16 @@ +#!/usr/bin/bash + +# called by dracut +check() { + return 0 +} + +# called by dracut +depends() { + return 0 +} + +# called by dracut +install() { + inst_rules 66-azure-storage.rules 99-azure-product-uuid.rules +} diff --git a/sources b/sources index ff93e5e..803d241 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ SHA512 (v2.8.0.11.tar.gz) = cc5f723851c55fc5b79e07bc07f2e7ff3d9a8463c4d7b7c7970e676df5acfb0a63fade66a5e1f016c7a8739946465a204c9db178136226389358e8d1bcbd2850 -SHA512 (module-setup.sh) = c05ed7395006c78bae1a7727b64c4b00a14e2c37e0d8a6ae7c05905a86d4ba638a2b98e4642ecd9a98db38298ff99f4877f900965a97f933b9aa034488835394 From b21e8d433b4b5b9d677e5924c287ac18d163025a Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 13 Mar 2023 09:32:31 +0100 Subject: [PATCH 27/55] Update to 2.9.0.4 (#2177333) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c896f43..201a8cf 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /v2.7.1.0.tar.gz /v2.7.3.0.tar.gz /v2.8.0.11.tar.gz +/v2.9.0.4.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index b9e527f..aba33aa 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.8.0.11 -Release: 3%{?dist} +Version: 2.9.0.4 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Mar 13 2023 Vitaly Kuznetsov - 2.9.0.4-1 +- Update to 2.9.0.4 (#2177333) + * Fri Jan 20 2023 Dusty Mabe - 2.8.0.11-3 - Move module-setup.sh into git diff --git a/sources b/sources index 803d241..27258ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.8.0.11.tar.gz) = cc5f723851c55fc5b79e07bc07f2e7ff3d9a8463c4d7b7c7970e676df5acfb0a63fade66a5e1f016c7a8739946465a204c9db178136226389358e8d1bcbd2850 +SHA512 (v2.9.0.4.tar.gz) = 3cc7c7d8ad349bbe4059887f9212121931410bd56828e966223638441a81344b77eba38d84f1e99b04421bf2efc80844f2e2ae08ad5703a0b545ced57fdc324d From 58194638624c509e5655d75e69ed12e2907e739a Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 30 May 2023 13:06:22 +0200 Subject: [PATCH 28/55] Switch to SPDX identifiers for the license field Signed-off-by: Vitaly Kuznetsov --- WALinuxAgent.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index aba33aa..6406e1e 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,10 +3,10 @@ Name: WALinuxAgent Version: 2.9.0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent -License: ASL 2.0 +License: Apache-2.0 URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue May 30 2023 Vitaly Kuznetsov - 2.9.0.4-2 +- Switch to SPDX identifiers for the license field + * Mon Mar 13 2023 Vitaly Kuznetsov - 2.9.0.4-1 - Update to 2.9.0.4 (#2177333) From aac4370cb245cd615a18484e68377a85a93c6255 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 00:42:40 +0200 Subject: [PATCH 29/55] Rebuilt for Python 3.12 --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 6406e1e..16a8c83 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.9.0.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Tue Jun 13 2023 Python Maint - 2.9.0.4-3 +- Rebuilt for Python 3.12 + * Tue May 30 2023 Vitaly Kuznetsov - 2.9.0.4-2 - Switch to SPDX identifiers for the license field From 7401651155da0820f6ff5d2399251e719d853471 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 12:44:42 +0000 Subject: [PATCH 30/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 16a8c83..47c1c63 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.9.0.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -123,6 +123,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 2.9.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 2.9.0.4-3 - Rebuilt for Python 3.12 From 053021fe928d450ed0c2643b99d7d2a6ffa9a5c1 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Wed, 18 Oct 2023 14:33:13 +0200 Subject: [PATCH 31/55] Update to 2.9.1.1 (#2232763) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + ...Rudimentary-Fedora-OS-implementation.patch | 136 ------------------ WALinuxAgent.spec | 11 +- sources | 2 +- 4 files changed, 8 insertions(+), 142 deletions(-) delete mode 100644 0001-Rudimentary-Fedora-OS-implementation.patch diff --git a/.gitignore b/.gitignore index 201a8cf..155c25f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /v2.7.3.0.tar.gz /v2.8.0.11.tar.gz /v2.9.0.4.tar.gz +/v2.9.1.1.tar.gz diff --git a/0001-Rudimentary-Fedora-OS-implementation.patch b/0001-Rudimentary-Fedora-OS-implementation.patch deleted file mode 100644 index 3c44755..0000000 --- a/0001-Rudimentary-Fedora-OS-implementation.patch +++ /dev/null @@ -1,136 +0,0 @@ -From e236dc20fbda54d040960615a93565be9c4bdae7 Mon Sep 17 00:00:00 2001 -From: Vitaly Kuznetsov -Date: Fri, 22 Apr 2022 16:16:19 +0200 -Subject: [PATCH] Rudimentary Fedora OS implementation -Content-Type: text/plain - -Signed-off-by: Vitaly Kuznetsov ---- - azurelinuxagent/common/osutil/factory.py | 4 ++ - azurelinuxagent/common/osutil/fedora.py | 75 ++++++++++++++++++++++++ - setup.py | 6 ++ - 3 files changed, 85 insertions(+) - create mode 100644 azurelinuxagent/common/osutil/fedora.py - -diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py -index b8f4291b3ea4..625978569880 100644 ---- a/azurelinuxagent/common/osutil/factory.py -+++ b/azurelinuxagent/common/osutil/factory.py -@@ -39,6 +39,7 @@ from .suse import SUSEOSUtil, SUSE11OSUtil - from .photonos import PhotonOSUtil - from .ubuntu import UbuntuOSUtil, Ubuntu12OSUtil, Ubuntu14OSUtil, \ - UbuntuSnappyOSUtil, Ubuntu16OSUtil, Ubuntu18OSUtil -+from .fedora import FedoraOSUtil - - - def get_osutil(distro_name=DISTRO_NAME, -@@ -138,5 +139,8 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) - if distro_name == "openwrt": - return OpenWRTOSUtil() - -+ if distro_name == "fedora": -+ return FedoraOSUtil() -+ - logger.warn("Unable to load distro implementation for {0}. Using default distro implementation instead.", distro_name) - return DefaultOSUtil() -diff --git a/azurelinuxagent/common/osutil/fedora.py b/azurelinuxagent/common/osutil/fedora.py -new file mode 100644 -index 000000000000..480f139a87ed ---- /dev/null -+++ b/azurelinuxagent/common/osutil/fedora.py -@@ -0,0 +1,75 @@ -+# -+# Copyright 2022 Red Hat Inc. -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+# Requires Python 2.6+ and Openssl 1.0+ -+# -+ -+import azurelinuxagent.common.utils.shellutil as shellutil -+from azurelinuxagent.common.osutil.default import DefaultOSUtil -+ -+ -+class FedoraOSUtil(DefaultOSUtil): -+ -+ def __init__(self): -+ super(FedoraOSUtil, self).__init__() -+ self.agent_conf_file_path = '/etc/waagent.conf' -+ -+ @staticmethod -+ def get_systemd_unit_file_install_path(): -+ return '/usr/lib/systemd/system' -+ -+ @staticmethod -+ def get_agent_bin_path(): -+ return '/usr/sbin' -+ -+ def is_dhcp_enabled(self): -+ return True -+ -+ def start_network(self): -+ pass -+ -+ def restart_if(self, ifname=None, retries=None, wait=None): -+ retry_limit = retries+1 -+ for attempt in range(1, retry_limit): -+ return_code = shellutil.run("ip link set {0} down && ip link set {0} up".format(ifname)) -+ if return_code == 0: -+ return -+ logger.warn("failed to restart {0}: return code {1}".format(ifname, return_code)) -+ if attempt < retry_limit: -+ logger.info("retrying in {0} seconds".format(wait)) -+ time.sleep(wait) -+ else: -+ logger.warn("exceeded restart retries") -+ -+ def restart_ssh_service(self): -+ shellutil.run('systemctl restart sshd') -+ -+ def stop_dhcp_service(self): -+ pass -+ -+ def start_dhcp_service(self): -+ pass -+ -+ def start_agent_service(self): -+ return shellutil.run('systemctl start waagent', chk_err=False) -+ -+ def stop_agent_service(self): -+ return shellutil.run('systemctl stop waagent', chk_err=False) -+ -+ def get_dhcp_pid(self): -+ return self._get_dhcp_pid(["pidof", "dhclient"]) -+ -+ def conf_sshd(self, disable_password): -+ pass -diff --git a/setup.py b/setup.py -index 12c9e1d61979..b0acead305b5 100755 ---- a/setup.py -+++ b/setup.py -@@ -238,6 +238,12 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 - set_conf_files(data_files, src=["config/photonos/waagent.conf"]) - set_systemd_files(data_files, dest=systemd_dir_path, - src=["init/photonos/waagent.service"]) -+ elif name == 'fedora': -+ set_bin_files(data_files, dest=agent_bin_path) -+ set_conf_files(data_files) -+ set_logrotate_files(data_files) -+ set_udev_files(data_files) -+ set_systemd_files(data_files, dest=systemd_dir_path) - else: - # Use default setting - set_bin_files(data_files, dest=agent_bin_path) --- -2.35.1 - diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 47c1c63..9d9878a 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.9.0.4 -Release: 4%{?dist} +Version: 2.9.1.1 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -11,7 +11,6 @@ URL: https://github.com/Azure/%{name} Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh -Patch0: 0001-Rudimentary-Fedora-OS-implementation.patch Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch BuildArch: noarch @@ -59,8 +58,7 @@ Udev rules specific to Microsoft Azure Virtual Machines. %prep %setup -q -%patch0 -p1 -%patch1 -p1 +%patch 1 -p1 %build %py3_build @@ -123,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Oct 18 2023 Vitaly Kuznetsov - 2.9.1.1-1 +- Update to 2.9.1.1 (#2232763) + * Wed Jul 19 2023 Fedora Release Engineering - 2.9.0.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 27258ac..5cd38e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.9.0.4.tar.gz) = 3cc7c7d8ad349bbe4059887f9212121931410bd56828e966223638441a81344b77eba38d84f1e99b04421bf2efc80844f2e2ae08ad5703a0b545ced57fdc324d +SHA512 (v2.9.1.1.tar.gz) = 3f44aecc16ac545db4b550586f168dbbdef34289aad6775973517bf645e5a1d486864c01e974f03a71b3e946c14e1ca140673a75c1cd602aac28725eaa68e83d From 52fa71421e63aeda441edb30da280a9b6dcecfe5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 11:54:08 +0000 Subject: [PATCH 32/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 9d9878a..144b8b7 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.9.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 2.9.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Oct 18 2023 Vitaly Kuznetsov - 2.9.1.1-1 - Update to 2.9.1.1 (#2232763) From 34e2e3bc6f34a15a2d017de6bc6aac7fc78a46ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:30:15 +0000 Subject: [PATCH 33/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 144b8b7..9109f65 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.9.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 2.9.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 2.9.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b0181d89c7a5f6e3d70ae2c3d58f32cfbbb78218 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Thu, 4 Apr 2024 15:06:23 +0200 Subject: [PATCH 34/55] Update to 2.10.0.8 (#2271975) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 155c25f..0eb4fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /v2.8.0.11.tar.gz /v2.9.0.4.tar.gz /v2.9.1.1.tar.gz +/v2.10.0.8.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 9109f65..453f973 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.9.1.1 -Release: 3%{?dist} +Version: 2.10.0.8 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Thu Apr 04 2024 Vitaly Kuznetsov - 2.10.0.8-1 +- Update to 2.10.0.8 (#2271975) + * Mon Jan 22 2024 Fedora Release Engineering - 2.9.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 5cd38e5..dbfefa5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.9.1.1.tar.gz) = 3f44aecc16ac545db4b550586f168dbbdef34289aad6775973517bf645e5a1d486864c01e974f03a71b3e946c14e1ca140673a75c1cd602aac28725eaa68e83d +SHA512 (v2.10.0.8.tar.gz) = aa2f8d0eb2e69eb5f29bebaf78190ffbb723727da5018c5a7acc31cd2c926eb29d4ef6641024e9fd965d6eae2ed88472cfca7ec4cf0583c2f2d6a542adaea6bc From 9df946ad946209ba4c0d0b5c271a69efc23e3bec Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Wed, 8 May 2024 12:30:37 -0400 Subject: [PATCH 35/55] Add the udev dependencies to the dracut module This fixes the symlinks created by the Azure storage rules, which depend on readlink and cut being present. Before this change the Fedora Cloud image would produce a symlink at /dev/disk/azure -> /dev/sda instead of /dev/disk/azure being a directory of symlinks to the device and any partitions it contains. --- WALinuxAgent.spec | 5 ++++- module-setup.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 453f973..486f128 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.10.0.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed May 08 2024 Jeremy Cline - 2.10.0.8-2 +- Add the udev dependencies to the dracut module + * Thu Apr 04 2024 Vitaly Kuznetsov - 2.10.0.8-1 - Update to 2.10.0.8 (#2271975) diff --git a/module-setup.sh b/module-setup.sh index 00d0eb7..9d29893 100644 --- a/module-setup.sh +++ b/module-setup.sh @@ -12,5 +12,6 @@ depends() { # called by dracut install() { + inst_multiple chmod cut readlink inst_rules 66-azure-storage.rules 99-azure-product-uuid.rules } From 14a71aa725032fe861791cce142a1518ad2be894 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 11:10:43 +0200 Subject: [PATCH 36/55] Rebuilt for Python 3.13 --- WALinuxAgent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 486f128..d9fb026 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.10.0.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -121,6 +121,9 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Fri Jun 07 2024 Python Maint - 2.10.0.8-3 +- Rebuilt for Python 3.13 + * Wed May 08 2024 Jeremy Cline - 2.10.0.8-2 - Add the udev dependencies to the dracut module From db5f38ee469a29f4e097c12caacab14e5e5e693a Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Wed, 12 Jun 2024 17:48:13 -0400 Subject: [PATCH 37/55] Update to v2.11.1.4 and fix Python 3.13 build --- .gitignore | 1 + ...instead-of-crypt-on-Python-3.13-3070.patch | 258 ++++++++++++++++++ ...acycrypt-for-crypt-r-for-Python-3.13.patch | 73 +++++ WALinuxAgent.spec | 18 +- sources | 2 +- 5 files changed, 349 insertions(+), 3 deletions(-) create mode 100644 0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch create mode 100644 0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch diff --git a/.gitignore b/.gitignore index 0eb4fb7..8efa138 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /v2.9.0.4.tar.gz /v2.9.1.1.tar.gz /v2.10.0.8.tar.gz +/v2.11.1.4.tar.gz diff --git a/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch b/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch new file mode 100644 index 0000000..435a881 --- /dev/null +++ b/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch @@ -0,0 +1,258 @@ +From 12adcb0b1181054f58e4fe172f7bfb795881cdb4 Mon Sep 17 00:00:00 2001 +From: Norberto Arrieta +Date: Tue, 27 Feb 2024 14:58:44 -0800 +Subject: [PATCH 1/2] Use legacycrypt instead of crypt on Python >= 3.13 + (#3070) + +* Use legacycrypt instead of crypt on Python >= 3.13 + +* remove ModuleNotFound + +--------- + +Co-authored-by: narrieta +Signed-off-by: Jeremy Cline +--- + azurelinuxagent/common/osutil/default.py | 27 ++++++++++++++++--- + azurelinuxagent/common/osutil/freebsd.py | 2 +- + azurelinuxagent/common/osutil/gaia.py | 3 +-- + azurelinuxagent/common/utils/textutil.py | 13 --------- + requirements.txt | 3 ++- + setup.py | 17 +++++++----- + tests/common/osutil/test_default.py | 9 +++++++ + .../{utils => osutil}/test_passwords.txt | 0 + tests/common/utils/test_text_util.py | 10 ------- + 9 files changed, 47 insertions(+), 37 deletions(-) + rename tests/common/{utils => osutil}/test_passwords.txt (100%) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index f763d5f5..1486167c 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -16,6 +16,7 @@ + # Requires Python 2.6+ and Openssl 1.0+ + # + ++import array + import base64 + import datetime + import errno +@@ -26,15 +27,26 @@ import multiprocessing + import os + import platform + import pwd ++import random + import re + import shutil + import socket ++import string + import struct + import sys + import time + from pwd import getpwall + +-import array ++from azurelinuxagent.common.exception import OSUtilError ++# 'crypt' was removed in Python 3.13; use legacycrypt instead ++if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: ++ try: ++ from legacycrypt import crypt ++ except ImportError: ++ def crypt(password, salt): ++ raise OSUtilError("Please install the legacycrypt Python module to use this feature.") ++else: ++ from crypt import crypt # pylint: disable=deprecated-module + + from azurelinuxagent.common import conf + from azurelinuxagent.common import logger +@@ -42,7 +54,6 @@ from azurelinuxagent.common.utils import fileutil + from azurelinuxagent.common.utils import shellutil + from azurelinuxagent.common.utils import textutil + +-from azurelinuxagent.common.exception import OSUtilError + from azurelinuxagent.common.future import ustr, array_to_bytes + from azurelinuxagent.common.utils.cryptutil import CryptUtil + from azurelinuxagent.common.utils.flexible_version import FlexibleVersion +@@ -433,11 +444,21 @@ class DefaultOSUtil(object): + if self.is_sys_user(username): + raise OSUtilError(("User {0} is a system user, " + "will not set password.").format(username)) +- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) ++ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) + + self._run_command_raising_OSUtilError(["usermod", "-p", passwd_hash, username], + err_msg="Failed to set password for {0}".format(username)) + ++ @staticmethod ++ def gen_password_hash(password, crypt_id, salt_len): ++ collection = string.ascii_letters + string.digits ++ salt = ''.join(random.choice(collection) for _ in range(salt_len)) ++ salt = "${0}${1}".format(crypt_id, salt) ++ if sys.version_info[0] == 2: ++ # if python 2.*, encode to type 'str' to prevent Unicode Encode Error from crypt.crypt ++ password = password.encode('utf-8') ++ return crypt(password, salt) ++ + def get_users(self): + return getpwall() + +diff --git a/azurelinuxagent/common/osutil/freebsd.py b/azurelinuxagent/common/osutil/freebsd.py +index f8ee6db8..cff46709 100644 +--- a/azurelinuxagent/common/osutil/freebsd.py ++++ b/azurelinuxagent/common/osutil/freebsd.py +@@ -77,7 +77,7 @@ class FreeBSDOSUtil(DefaultOSUtil): + if self.is_sys_user(username): + raise OSUtilError(("User {0} is a system user, " + "will not set password.").format(username)) +- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) ++ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) + self._run_command_raising_OSUtilError(['pw', 'usermod', username, '-H', '0'], cmd_input=passwd_hash, + err_msg="Failed to set password for {0}".format(username)) + +diff --git a/azurelinuxagent/common/osutil/gaia.py b/azurelinuxagent/common/osutil/gaia.py +index 849d5d1f..3f9f746b 100644 +--- a/azurelinuxagent/common/osutil/gaia.py ++++ b/azurelinuxagent/common/osutil/gaia.py +@@ -29,7 +29,6 @@ from azurelinuxagent.common.osutil.default import DefaultOSUtil + from azurelinuxagent.common.utils.cryptutil import CryptUtil + import azurelinuxagent.common.utils.fileutil as fileutil + import azurelinuxagent.common.utils.shellutil as shellutil +-import azurelinuxagent.common.utils.textutil as textutil + + + class GaiaOSUtil(DefaultOSUtil): +@@ -64,7 +63,7 @@ class GaiaOSUtil(DefaultOSUtil): + + def chpasswd(self, username, password, crypt_id=6, salt_len=10): + logger.info('chpasswd') +- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) ++ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) + ret, out = self._run_clish( + 'set user admin password-hash ' + passwd_hash) + if ret != 0: +diff --git a/azurelinuxagent/common/utils/textutil.py b/azurelinuxagent/common/utils/textutil.py +index 1ff7a7e9..4a0f9a75 100644 +--- a/azurelinuxagent/common/utils/textutil.py ++++ b/azurelinuxagent/common/utils/textutil.py +@@ -17,11 +17,8 @@ + # Requires Python 2.6+ and Openssl 1.0+ + + import base64 +-import crypt + import hashlib +-import random + import re +-import string + import struct + import sys + import traceback +@@ -287,16 +284,6 @@ def remove_bom(c): + return c + + +-def gen_password_hash(password, crypt_id, salt_len): +- collection = string.ascii_letters + string.digits +- salt = ''.join(random.choice(collection) for _ in range(salt_len)) +- salt = "${0}${1}".format(crypt_id, salt) +- if sys.version_info[0] == 2: +- # if python 2.*, encode to type 'str' to prevent Unicode Encode Error from crypt.crypt +- password = password.encode('utf-8') +- return crypt.crypt(password, salt) +- +- + def get_bytes_from_pem(pem_str): + base64_bytes = "" + for line in pem_str.split('\n'): +diff --git a/requirements.txt b/requirements.txt +index b0b7c874..ab6958a7 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,2 +1,3 @@ + distro; python_version >= '3.8' +-pyasn1 +\ No newline at end of file ++pyasn1 ++legacycrypt; python_version >= '3.13' +diff --git a/setup.py b/setup.py +index 6b54d09e..2d51fae8 100755 +--- a/setup.py ++++ b/setup.py +@@ -314,13 +314,16 @@ class install(_install): # pylint: disable=C0103 + + + # Note to packagers and users from source. +-# In version 3.5 of Python distribution information handling in the platform +-# module was deprecated. Depending on the Linux distribution the +-# implementation may be broken prior to Python 3.7 wher the functionality +-# will be removed from Python 3 +-requires = [] # pylint: disable=invalid-name +-if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: +- requires = ['distro'] # pylint: disable=invalid-name ++# * In version 3.5 of Python distribution information handling in the platform ++# module was deprecated. Depending on the Linux distribution the ++# implementation may be broken prior to Python 3.8 where the functionality ++# will be removed from Python 3. ++# * In version 3.13 of Python, the crypt module was removed and legacycrypt is ++# required instead. ++requires = [ ++ "distro;python_version>='3.8'", ++ "legacycrypt;python_version>='3.13'", ++] + + modules = [] # pylint: disable=invalid-name + +diff --git a/tests/common/osutil/test_default.py b/tests/common/osutil/test_default.py +index afe27ae5..8325bbd0 100644 +--- a/tests/common/osutil/test_default.py ++++ b/tests/common/osutil/test_default.py +@@ -1111,6 +1111,15 @@ class TestGetPublishedHostname(AgentTestCase): + self.assertEqual(expected, actual, "get_hostname_record returned an incorrect hostname") + self.assertEqual(expected, self.__get_published_hostname_contents(), "get_hostname_record returned an incorrect hostname") + ++ def test_get_password_hash(self): ++ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_passwords.txt'), 'rb') as in_file: ++ for data in in_file: ++ # Remove bom on bytes data before it is converted into string. ++ data = textutil.remove_bom(data) ++ data = ustr(data, encoding='utf-8') ++ password_hash = osutil.DefaultOSUtil.gen_password_hash(data, 6, 10) ++ self.assertNotEqual(None, password_hash) ++ + + if __name__ == '__main__': + unittest.main() +diff --git a/tests/common/utils/test_passwords.txt b/tests/common/osutil/test_passwords.txt +similarity index 100% +rename from tests/common/utils/test_passwords.txt +rename to tests/common/osutil/test_passwords.txt +diff --git a/tests/common/utils/test_text_util.py b/tests/common/utils/test_text_util.py +index 5029cfb9..b382aa28 100644 +--- a/tests/common/utils/test_text_util.py ++++ b/tests/common/utils/test_text_util.py +@@ -16,7 +16,6 @@ + # + + import hashlib +-import os + import unittest + from distutils.version import LooseVersion as Version # pylint: disable=no-name-in-module,import-error + +@@ -26,15 +25,6 @@ from tests.lib.tools import AgentTestCase + + + class TestTextUtil(AgentTestCase): +- def test_get_password_hash(self): +- with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_passwords.txt'), 'rb') as in_file: +- for data in in_file: +- # Remove bom on bytes data before it is converted into string. +- data = textutil.remove_bom(data) +- data = ustr(data, encoding='utf-8') +- password_hash = textutil.gen_password_hash(data, 6, 10) +- self.assertNotEqual(None, password_hash) +- + def test_replace_non_ascii(self): + data = ustr(b'\xef\xbb\xbfhehe', encoding='utf-8') + self.assertEqual('hehe', textutil.replace_non_ascii(data)) +-- +2.45.2 + diff --git a/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch b/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch new file mode 100644 index 0000000..dcc5c58 --- /dev/null +++ b/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch @@ -0,0 +1,73 @@ +From faacd2d59fd34007fa4d678a2a89645d16fdaa7d Mon Sep 17 00:00:00 2001 +From: Jeremy Cline +Date: Wed, 12 Jun 2024 15:01:49 -0400 +Subject: [PATCH 2/2] Swap out legacycrypt for crypt-r for Python 3.13+ + +PR #3070 pulled in legacycrypt to replace the removed crypt module. +legacycrypt hasn't been updated since it was initially pulled out of +Python's stdlib in 2019 (Python 3.7). crypt-r pulls in the module as it +was in Python 3.12. While there's been no major developments since 3.7, +it's more likely to be kept updated for any breakages in future Python +releases. + +It's also already packaged for Fedora and means one less package for me +to maintain so that would be nice. + +Signed-off-by: Jeremy Cline +--- + azurelinuxagent/common/osutil/default.py | 6 +++--- + requirements.txt | 2 +- + setup.py | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index 1486167c..2f339800 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -38,13 +38,13 @@ import time + from pwd import getpwall + + from azurelinuxagent.common.exception import OSUtilError +-# 'crypt' was removed in Python 3.13; use legacycrypt instead ++# 'crypt' was removed in Python 3.13; use crypt-r instead + if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: + try: +- from legacycrypt import crypt ++ from crypt_r import crypt + except ImportError: + def crypt(password, salt): +- raise OSUtilError("Please install the legacycrypt Python module to use this feature.") ++ raise OSUtilError("Please install the crypt-r Python module to use this feature.") + else: + from crypt import crypt # pylint: disable=deprecated-module + +diff --git a/requirements.txt b/requirements.txt +index ab6958a7..fcb64396 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,3 +1,3 @@ + distro; python_version >= '3.8' + pyasn1 +-legacycrypt; python_version >= '3.13' ++crypt-r; python_version >= '3.13' +diff --git a/setup.py b/setup.py +index 2d51fae8..26610ca8 100755 +--- a/setup.py ++++ b/setup.py +@@ -318,11 +318,11 @@ class install(_install): # pylint: disable=C0103 + # module was deprecated. Depending on the Linux distribution the + # implementation may be broken prior to Python 3.8 where the functionality + # will be removed from Python 3. +-# * In version 3.13 of Python, the crypt module was removed and legacycrypt is ++# * In version 3.13 of Python, the crypt module was removed and crypt-r is + # required instead. + requires = [ + "distro;python_version>='3.8'", +- "legacycrypt;python_version>='3.13'", ++ "crypt-r;python_version>='3.13'", + ] + + modules = [] # pylint: disable=invalid-name +-- +2.45.2 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index d9fb026..277ae36 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -2,8 +2,8 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.10.0.8 -Release: 3%{?dist} +Version: 2.11.1.4 +Release: 1%{?dist} Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -12,12 +12,19 @@ Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch +# These two patches are from PR 3070 (merged) and PR 3141 (proposed) and +# are needed to build with Python 3.13 since it removed the crypt module. +# If PR 3141 is not merged it should be dropped in the future for whatever +# upstream decides to go with. +Patch2: 0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch +Patch3: 0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-distro +BuildRequires: python3-crypt-r Requires: %name-udev = %version-%release %if 0%{?fedora} Requires: ntfsprogs @@ -27,6 +34,7 @@ Requires: openssh-server Requires: openssl Requires: parted Requires: python3-pyasn1 +Requires: python3-crypt-r Requires: iptables BuildRequires: systemd @@ -59,6 +67,8 @@ Udev rules specific to Microsoft Azure Virtual Machines. %prep %setup -q %patch 1 -p1 +%patch 2 -p1 +%patch 3 -p1 %build %py3_build @@ -121,6 +131,10 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog +* Wed Jun 12 2024 Jeremy Cline - 2.11.1.4-1 +- Bump to upstream release v2.11.1.4 +- Fix build for Python 3.13 + * Fri Jun 07 2024 Python Maint - 2.10.0.8-3 - Rebuilt for Python 3.13 diff --git a/sources b/sources index dbfefa5..11fe930 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.10.0.8.tar.gz) = aa2f8d0eb2e69eb5f29bebaf78190ffbb723727da5018c5a7acc31cd2c926eb29d4ef6641024e9fd965d6eae2ed88472cfca7ec4cf0583c2f2d6a542adaea6bc +SHA512 (v2.11.1.4.tar.gz) = e67ecd801541bd869bc01a023ee3b06a6ee879b5780b34c5fa320d080276ebe8400c66a8550b58d0ca4a1116bd923b00ce2da60d09c574f30c50f446b5a6ac2f From 9aa999030f7122f2ffad20ebbc7934a0ff749efc Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 14 Jun 2024 11:21:53 -0400 Subject: [PATCH 38/55] Switch to autorelease and autochangelog [skip changelog] --- WALinuxAgent.spec | 205 +--------------------------------------------- changelog | 202 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+), 203 deletions(-) create mode 100644 changelog diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 277ae36..481c949 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -3,7 +3,7 @@ Name: WALinuxAgent Version: 2.11.1.4 -Release: 1%{?dist} +Release: %autorelease Summary: The Microsoft Azure Linux Agent License: Apache-2.0 @@ -131,205 +131,4 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %endif %changelog -* Wed Jun 12 2024 Jeremy Cline - 2.11.1.4-1 -- Bump to upstream release v2.11.1.4 -- Fix build for Python 3.13 - -* Fri Jun 07 2024 Python Maint - 2.10.0.8-3 -- Rebuilt for Python 3.13 - -* Wed May 08 2024 Jeremy Cline - 2.10.0.8-2 -- Add the udev dependencies to the dracut module - -* Thu Apr 04 2024 Vitaly Kuznetsov - 2.10.0.8-1 -- Update to 2.10.0.8 (#2271975) - -* Mon Jan 22 2024 Fedora Release Engineering - 2.9.1.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 2.9.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Oct 18 2023 Vitaly Kuznetsov - 2.9.1.1-1 -- Update to 2.9.1.1 (#2232763) - -* Wed Jul 19 2023 Fedora Release Engineering - 2.9.0.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 2.9.0.4-3 -- Rebuilt for Python 3.12 - -* Tue May 30 2023 Vitaly Kuznetsov - 2.9.0.4-2 -- Switch to SPDX identifiers for the license field - -* Mon Mar 13 2023 Vitaly Kuznetsov - 2.9.0.4-1 -- Update to 2.9.0.4 (#2177333) - -* Fri Jan 20 2023 Dusty Mabe - 2.8.0.11-3 -- Move module-setup.sh into git - -* Wed Jan 18 2023 Fedora Release Engineering - 2.8.0.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Oct 31 2022 Vitaly Kuznetsov - 2.8.0.11-1 -- Update to 2.8.0.11 (#2128547) - -* Tue Oct 18 2022 Chris Patterson - 2.7.3.0-2 -- Add ConditionVirtualization=|microsoft triggering condition - -* Wed Aug 03 2022 Vitaly Kuznetsov - 2.7.3.0-1 -- Update to 2.7.3.0 (#2110155) - -* Wed Jul 20 2022 Fedora Release Engineering - 2.7.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jun 30 2022 Vitaly Kuznetsov - 2.7.1.0-1 -- Update to 2.7.1.0 (#2097244) - -* Mon Jun 13 2022 Python Maint - 2.7.0.6-2 -- Rebuilt for Python 3.11 - -* Fri Apr 22 2022 Vitaly Kuznetsov - 2.7.0.6-1 -- Update to 2.7.0.6 (#2040980) - -* Wed Jan 19 2022 Fedora Release Engineering - 2.5.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Jan 03 2022 Vitaly Kuznetsov - 2.5.0.2-1 -- Update to 2.5.0.2 (#2008699) - -* Wed Jul 21 2021 Fedora Release Engineering - 2.3.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jul 19 2021 Vitaly Kuznetsov - 2.3.1.1-1 -- Update to 2.3.1.1 (#1982512) -- Require iptables for setting up persistent firewall rules - -* Tue Jun 15 2021 Vitaly Kuznetsov - 2.3.0.2-1 -- Update to 2.3.0.2 (#1971116) - -* Fri Jun 04 2021 Python Maint - 2.2.54.2-2 -- Rebuilt for Python 3.10 - -* Fri May 21 2021 Vitaly Kuznetsov - 2.2.54.2-1 -- Update to 2.2.54.2 (#1916966) - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.2.52-6 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Fri Feb 19 2021 Vitaly Kuznetsov - 2.2.52-5 -- Require ntfsprogs on Fedora only - -* Tue Jan 26 2021 Vitaly Kuznetsov - 2.2.52-4 -- Fix distro resolution for RedHat - -* Mon Jan 25 2021 Fedora Release Engineering - 2.2.52-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 15 2021 Vitaly Kuznetsov - 2.2.52-2 -- Add udev rules to initramfs (#1909287) - -* Wed Dec 09 2020 Vitaly Kuznetsov - 2.2.52-1 -- Update to 2.2.52 (#1849923) -- Add not yet upstream patches supporting Python3.9 changes - -* Mon Jul 27 2020 Fedora Release Engineering - 2.2.48.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jun 09 2020 Vitaly Kuznetsov - 2.2.48.1-1 -- Update to 2.2.48.1 (#1641605) -- Split udev rules to a separate subpackage (#1748432) - -* Tue May 26 2020 Miro Hrončok - 2.2.46-2 -- Rebuilt for Python 3.9 - -* Wed Apr 15 2020 Vitaly Kuznetsov - 2.2.46-1 -- Update to 2.2.46 - -* Tue Jan 28 2020 Fedora Release Engineering - 2.2.40-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Oct 03 2019 Miro Hrončok - 2.2.40-6 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Wed Aug 21 2019 Miro Hrončok - 2.2.40-5 -- Rebuilt for Python 3.8 - -* Wed Aug 21 2019 Vitaly Kuznetsov - 2.2.40-4 -- Disable Python2 dependent 'legacy' subpackage (#1741029) - -* Mon Aug 19 2019 Miro Hrončok - 2.2.40-3 -- Rebuilt for Python 3.8 - -* Wed Jul 24 2019 Fedora Release Engineering - 2.2.40-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon Jun 03 2019 Vitaly Kuznetsov - 2.2.40-1 -- Update to 2.2.40 -- Fix FTBFS in the preparation for Python3.8 (#1705219) - -* Thu Mar 14 2019 Vitaly Kuznetsov - 2.2.38-1 -- Update to 2.2.38 (CVE-2019-0804) - -* Thu Mar 14 2019 Vitaly Kuznetsov - 2.2.37-1 -- Update to 2.2.37 - -* Thu Jan 31 2019 Fedora Release Engineering - 2.2.32-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Sep 20 2018 Vitaly Kuznetsov - 2.2.32-1 -- Update to 2.2.32.2 - -* Thu Jul 12 2018 Fedora Release Engineering - 2.2.25-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 2.2.25-3 -- Rebuilt for Python 3.7 - -* Wed Apr 25 2018 Vitaly Kuznetsov - 2.2.25-2 -- Move net-tools dependency to WALinuxAgent-legacy (#1106781) - -* Mon Apr 16 2018 Vitaly Kuznetsov - 2.2.25-1 -- Update to 2.2.25 -- Switch to Python3 -- Legacy subpackage with waagent2.0 supporting old extensions - -* Wed Feb 28 2018 Iryna Shcherbina - 2.0.18-5 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Wed Feb 07 2018 Fedora Release Engineering - 2.0.18-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 2.0.18-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 2.0.18-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Apr 02 2016 Scott K Logan - 2.0.18-1 -- Update to 2.0.18 - -* Wed Feb 03 2016 Fedora Release Engineering - 2.0.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Jul 02 2015 Scott K Logan - 2.0.14-1 -- Update to 2.0.14 - -* Tue Jun 16 2015 Fedora Release Engineering - 2.0.13-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Jun 01 2015 Scott K Logan - 2.0.13-1 -- Update to 2.0.13 - -* Thu Apr 02 2015 Scott K Logan - 2.0.12-1 -- Update to 2.0.12-Oracle - -* Sat Jan 10 2015 Scott K Logan - 2.0.11-2 -- Use systemd for rhel7 -- Own logrotate.d -- Fix python2-devel dep - -* Sat Dec 20 2014 Scott K Logan - 2.0.11-1 -- Initial package +%autochangelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..dd33a5c --- /dev/null +++ b/changelog @@ -0,0 +1,202 @@ +* Wed Jun 12 2024 Jeremy Cline - 2.11.1.4-1 +- Bump to upstream release v2.11.1.4 +- Fix build for Python 3.13 + +* Fri Jun 07 2024 Python Maint - 2.10.0.8-3 +- Rebuilt for Python 3.13 + +* Wed May 08 2024 Jeremy Cline - 2.10.0.8-2 +- Add the udev dependencies to the dracut module + +* Thu Apr 04 2024 Vitaly Kuznetsov - 2.10.0.8-1 +- Update to 2.10.0.8 (#2271975) + +* Mon Jan 22 2024 Fedora Release Engineering - 2.9.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2.9.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Oct 18 2023 Vitaly Kuznetsov - 2.9.1.1-1 +- Update to 2.9.1.1 (#2232763) + +* Wed Jul 19 2023 Fedora Release Engineering - 2.9.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 2.9.0.4-3 +- Rebuilt for Python 3.12 + +* Tue May 30 2023 Vitaly Kuznetsov - 2.9.0.4-2 +- Switch to SPDX identifiers for the license field + +* Mon Mar 13 2023 Vitaly Kuznetsov - 2.9.0.4-1 +- Update to 2.9.0.4 (#2177333) + +* Fri Jan 20 2023 Dusty Mabe - 2.8.0.11-3 +- Move module-setup.sh into git + +* Wed Jan 18 2023 Fedora Release Engineering - 2.8.0.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Oct 31 2022 Vitaly Kuznetsov - 2.8.0.11-1 +- Update to 2.8.0.11 (#2128547) + +* Tue Oct 18 2022 Chris Patterson - 2.7.3.0-2 +- Add ConditionVirtualization=|microsoft triggering condition + +* Wed Aug 03 2022 Vitaly Kuznetsov - 2.7.3.0-1 +- Update to 2.7.3.0 (#2110155) + +* Wed Jul 20 2022 Fedora Release Engineering - 2.7.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jun 30 2022 Vitaly Kuznetsov - 2.7.1.0-1 +- Update to 2.7.1.0 (#2097244) + +* Mon Jun 13 2022 Python Maint - 2.7.0.6-2 +- Rebuilt for Python 3.11 + +* Fri Apr 22 2022 Vitaly Kuznetsov - 2.7.0.6-1 +- Update to 2.7.0.6 (#2040980) + +* Wed Jan 19 2022 Fedora Release Engineering - 2.5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Jan 03 2022 Vitaly Kuznetsov - 2.5.0.2-1 +- Update to 2.5.0.2 (#2008699) + +* Wed Jul 21 2021 Fedora Release Engineering - 2.3.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jul 19 2021 Vitaly Kuznetsov - 2.3.1.1-1 +- Update to 2.3.1.1 (#1982512) +- Require iptables for setting up persistent firewall rules + +* Tue Jun 15 2021 Vitaly Kuznetsov - 2.3.0.2-1 +- Update to 2.3.0.2 (#1971116) + +* Fri Jun 04 2021 Python Maint - 2.2.54.2-2 +- Rebuilt for Python 3.10 + +* Fri May 21 2021 Vitaly Kuznetsov - 2.2.54.2-1 +- Update to 2.2.54.2 (#1916966) + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.2.52-6 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Fri Feb 19 2021 Vitaly Kuznetsov - 2.2.52-5 +- Require ntfsprogs on Fedora only + +* Tue Jan 26 2021 Vitaly Kuznetsov - 2.2.52-4 +- Fix distro resolution for RedHat + +* Mon Jan 25 2021 Fedora Release Engineering - 2.2.52-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 15 2021 Vitaly Kuznetsov - 2.2.52-2 +- Add udev rules to initramfs (#1909287) + +* Wed Dec 09 2020 Vitaly Kuznetsov - 2.2.52-1 +- Update to 2.2.52 (#1849923) +- Add not yet upstream patches supporting Python3.9 changes + +* Mon Jul 27 2020 Fedora Release Engineering - 2.2.48.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 09 2020 Vitaly Kuznetsov - 2.2.48.1-1 +- Update to 2.2.48.1 (#1641605) +- Split udev rules to a separate subpackage (#1748432) + +* Tue May 26 2020 Miro Hrončok - 2.2.46-2 +- Rebuilt for Python 3.9 + +* Wed Apr 15 2020 Vitaly Kuznetsov - 2.2.46-1 +- Update to 2.2.46 + +* Tue Jan 28 2020 Fedora Release Engineering - 2.2.40-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 2.2.40-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Wed Aug 21 2019 Miro Hrončok - 2.2.40-5 +- Rebuilt for Python 3.8 + +* Wed Aug 21 2019 Vitaly Kuznetsov - 2.2.40-4 +- Disable Python2 dependent 'legacy' subpackage (#1741029) + +* Mon Aug 19 2019 Miro Hrončok - 2.2.40-3 +- Rebuilt for Python 3.8 + +* Wed Jul 24 2019 Fedora Release Engineering - 2.2.40-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jun 03 2019 Vitaly Kuznetsov - 2.2.40-1 +- Update to 2.2.40 +- Fix FTBFS in the preparation for Python3.8 (#1705219) + +* Thu Mar 14 2019 Vitaly Kuznetsov - 2.2.38-1 +- Update to 2.2.38 (CVE-2019-0804) + +* Thu Mar 14 2019 Vitaly Kuznetsov - 2.2.37-1 +- Update to 2.2.37 + +* Thu Jan 31 2019 Fedora Release Engineering - 2.2.32-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Sep 20 2018 Vitaly Kuznetsov - 2.2.32-1 +- Update to 2.2.32.2 + +* Thu Jul 12 2018 Fedora Release Engineering - 2.2.25-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 2.2.25-3 +- Rebuilt for Python 3.7 + +* Wed Apr 25 2018 Vitaly Kuznetsov - 2.2.25-2 +- Move net-tools dependency to WALinuxAgent-legacy (#1106781) + +* Mon Apr 16 2018 Vitaly Kuznetsov - 2.2.25-1 +- Update to 2.2.25 +- Switch to Python3 +- Legacy subpackage with waagent2.0 supporting old extensions + +* Wed Feb 28 2018 Iryna Shcherbina - 2.0.18-5 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Wed Feb 07 2018 Fedora Release Engineering - 2.0.18-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Apr 02 2016 Scott K Logan - 2.0.18-1 +- Update to 2.0.18 + +* Wed Feb 03 2016 Fedora Release Engineering - 2.0.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jul 02 2015 Scott K Logan - 2.0.14-1 +- Update to 2.0.14 + +* Tue Jun 16 2015 Fedora Release Engineering - 2.0.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Jun 01 2015 Scott K Logan - 2.0.13-1 +- Update to 2.0.13 + +* Thu Apr 02 2015 Scott K Logan - 2.0.12-1 +- Update to 2.0.12-Oracle + +* Sat Jan 10 2015 Scott K Logan - 2.0.11-2 +- Use systemd for rhel7 +- Own logrotate.d +- Fix python2-devel dep + +* Sat Dec 20 2014 Scott K Logan - 2.0.11-1 +- Initial package From 1302d6c7f443caa1c14032dc4bc02c861e9d3fe4 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 13 Jun 2024 15:02:50 -0400 Subject: [PATCH 39/55] Drop both legacycrypt-related patches In the short-term we can manually require crypt-r which exposes a "crypt" module, making both backported patches unnecessary. If upstream decides to stick with legacycrypt we'll have to do some additional packaging, but we can cross that bridge when we come to it (probably next release). --- ...instead-of-crypt-on-Python-3.13-3070.patch | 258 ------------------ ...acycrypt-for-crypt-r-for-Python-3.13.patch | 73 ----- WALinuxAgent.spec | 6 - 3 files changed, 337 deletions(-) delete mode 100644 0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch delete mode 100644 0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch diff --git a/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch b/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch deleted file mode 100644 index 435a881..0000000 --- a/0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch +++ /dev/null @@ -1,258 +0,0 @@ -From 12adcb0b1181054f58e4fe172f7bfb795881cdb4 Mon Sep 17 00:00:00 2001 -From: Norberto Arrieta -Date: Tue, 27 Feb 2024 14:58:44 -0800 -Subject: [PATCH 1/2] Use legacycrypt instead of crypt on Python >= 3.13 - (#3070) - -* Use legacycrypt instead of crypt on Python >= 3.13 - -* remove ModuleNotFound - ---------- - -Co-authored-by: narrieta -Signed-off-by: Jeremy Cline ---- - azurelinuxagent/common/osutil/default.py | 27 ++++++++++++++++--- - azurelinuxagent/common/osutil/freebsd.py | 2 +- - azurelinuxagent/common/osutil/gaia.py | 3 +-- - azurelinuxagent/common/utils/textutil.py | 13 --------- - requirements.txt | 3 ++- - setup.py | 17 +++++++----- - tests/common/osutil/test_default.py | 9 +++++++ - .../{utils => osutil}/test_passwords.txt | 0 - tests/common/utils/test_text_util.py | 10 ------- - 9 files changed, 47 insertions(+), 37 deletions(-) - rename tests/common/{utils => osutil}/test_passwords.txt (100%) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index f763d5f5..1486167c 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -16,6 +16,7 @@ - # Requires Python 2.6+ and Openssl 1.0+ - # - -+import array - import base64 - import datetime - import errno -@@ -26,15 +27,26 @@ import multiprocessing - import os - import platform - import pwd -+import random - import re - import shutil - import socket -+import string - import struct - import sys - import time - from pwd import getpwall - --import array -+from azurelinuxagent.common.exception import OSUtilError -+# 'crypt' was removed in Python 3.13; use legacycrypt instead -+if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: -+ try: -+ from legacycrypt import crypt -+ except ImportError: -+ def crypt(password, salt): -+ raise OSUtilError("Please install the legacycrypt Python module to use this feature.") -+else: -+ from crypt import crypt # pylint: disable=deprecated-module - - from azurelinuxagent.common import conf - from azurelinuxagent.common import logger -@@ -42,7 +54,6 @@ from azurelinuxagent.common.utils import fileutil - from azurelinuxagent.common.utils import shellutil - from azurelinuxagent.common.utils import textutil - --from azurelinuxagent.common.exception import OSUtilError - from azurelinuxagent.common.future import ustr, array_to_bytes - from azurelinuxagent.common.utils.cryptutil import CryptUtil - from azurelinuxagent.common.utils.flexible_version import FlexibleVersion -@@ -433,11 +444,21 @@ class DefaultOSUtil(object): - if self.is_sys_user(username): - raise OSUtilError(("User {0} is a system user, " - "will not set password.").format(username)) -- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) -+ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) - - self._run_command_raising_OSUtilError(["usermod", "-p", passwd_hash, username], - err_msg="Failed to set password for {0}".format(username)) - -+ @staticmethod -+ def gen_password_hash(password, crypt_id, salt_len): -+ collection = string.ascii_letters + string.digits -+ salt = ''.join(random.choice(collection) for _ in range(salt_len)) -+ salt = "${0}${1}".format(crypt_id, salt) -+ if sys.version_info[0] == 2: -+ # if python 2.*, encode to type 'str' to prevent Unicode Encode Error from crypt.crypt -+ password = password.encode('utf-8') -+ return crypt(password, salt) -+ - def get_users(self): - return getpwall() - -diff --git a/azurelinuxagent/common/osutil/freebsd.py b/azurelinuxagent/common/osutil/freebsd.py -index f8ee6db8..cff46709 100644 ---- a/azurelinuxagent/common/osutil/freebsd.py -+++ b/azurelinuxagent/common/osutil/freebsd.py -@@ -77,7 +77,7 @@ class FreeBSDOSUtil(DefaultOSUtil): - if self.is_sys_user(username): - raise OSUtilError(("User {0} is a system user, " - "will not set password.").format(username)) -- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) -+ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) - self._run_command_raising_OSUtilError(['pw', 'usermod', username, '-H', '0'], cmd_input=passwd_hash, - err_msg="Failed to set password for {0}".format(username)) - -diff --git a/azurelinuxagent/common/osutil/gaia.py b/azurelinuxagent/common/osutil/gaia.py -index 849d5d1f..3f9f746b 100644 ---- a/azurelinuxagent/common/osutil/gaia.py -+++ b/azurelinuxagent/common/osutil/gaia.py -@@ -29,7 +29,6 @@ from azurelinuxagent.common.osutil.default import DefaultOSUtil - from azurelinuxagent.common.utils.cryptutil import CryptUtil - import azurelinuxagent.common.utils.fileutil as fileutil - import azurelinuxagent.common.utils.shellutil as shellutil --import azurelinuxagent.common.utils.textutil as textutil - - - class GaiaOSUtil(DefaultOSUtil): -@@ -64,7 +63,7 @@ class GaiaOSUtil(DefaultOSUtil): - - def chpasswd(self, username, password, crypt_id=6, salt_len=10): - logger.info('chpasswd') -- passwd_hash = textutil.gen_password_hash(password, crypt_id, salt_len) -+ passwd_hash = DefaultOSUtil.gen_password_hash(password, crypt_id, salt_len) - ret, out = self._run_clish( - 'set user admin password-hash ' + passwd_hash) - if ret != 0: -diff --git a/azurelinuxagent/common/utils/textutil.py b/azurelinuxagent/common/utils/textutil.py -index 1ff7a7e9..4a0f9a75 100644 ---- a/azurelinuxagent/common/utils/textutil.py -+++ b/azurelinuxagent/common/utils/textutil.py -@@ -17,11 +17,8 @@ - # Requires Python 2.6+ and Openssl 1.0+ - - import base64 --import crypt - import hashlib --import random - import re --import string - import struct - import sys - import traceback -@@ -287,16 +284,6 @@ def remove_bom(c): - return c - - --def gen_password_hash(password, crypt_id, salt_len): -- collection = string.ascii_letters + string.digits -- salt = ''.join(random.choice(collection) for _ in range(salt_len)) -- salt = "${0}${1}".format(crypt_id, salt) -- if sys.version_info[0] == 2: -- # if python 2.*, encode to type 'str' to prevent Unicode Encode Error from crypt.crypt -- password = password.encode('utf-8') -- return crypt.crypt(password, salt) -- -- - def get_bytes_from_pem(pem_str): - base64_bytes = "" - for line in pem_str.split('\n'): -diff --git a/requirements.txt b/requirements.txt -index b0b7c874..ab6958a7 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,2 +1,3 @@ - distro; python_version >= '3.8' --pyasn1 -\ No newline at end of file -+pyasn1 -+legacycrypt; python_version >= '3.13' -diff --git a/setup.py b/setup.py -index 6b54d09e..2d51fae8 100755 ---- a/setup.py -+++ b/setup.py -@@ -314,13 +314,16 @@ class install(_install): # pylint: disable=C0103 - - - # Note to packagers and users from source. --# In version 3.5 of Python distribution information handling in the platform --# module was deprecated. Depending on the Linux distribution the --# implementation may be broken prior to Python 3.7 wher the functionality --# will be removed from Python 3 --requires = [] # pylint: disable=invalid-name --if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: -- requires = ['distro'] # pylint: disable=invalid-name -+# * In version 3.5 of Python distribution information handling in the platform -+# module was deprecated. Depending on the Linux distribution the -+# implementation may be broken prior to Python 3.8 where the functionality -+# will be removed from Python 3. -+# * In version 3.13 of Python, the crypt module was removed and legacycrypt is -+# required instead. -+requires = [ -+ "distro;python_version>='3.8'", -+ "legacycrypt;python_version>='3.13'", -+] - - modules = [] # pylint: disable=invalid-name - -diff --git a/tests/common/osutil/test_default.py b/tests/common/osutil/test_default.py -index afe27ae5..8325bbd0 100644 ---- a/tests/common/osutil/test_default.py -+++ b/tests/common/osutil/test_default.py -@@ -1111,6 +1111,15 @@ class TestGetPublishedHostname(AgentTestCase): - self.assertEqual(expected, actual, "get_hostname_record returned an incorrect hostname") - self.assertEqual(expected, self.__get_published_hostname_contents(), "get_hostname_record returned an incorrect hostname") - -+ def test_get_password_hash(self): -+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_passwords.txt'), 'rb') as in_file: -+ for data in in_file: -+ # Remove bom on bytes data before it is converted into string. -+ data = textutil.remove_bom(data) -+ data = ustr(data, encoding='utf-8') -+ password_hash = osutil.DefaultOSUtil.gen_password_hash(data, 6, 10) -+ self.assertNotEqual(None, password_hash) -+ - - if __name__ == '__main__': - unittest.main() -diff --git a/tests/common/utils/test_passwords.txt b/tests/common/osutil/test_passwords.txt -similarity index 100% -rename from tests/common/utils/test_passwords.txt -rename to tests/common/osutil/test_passwords.txt -diff --git a/tests/common/utils/test_text_util.py b/tests/common/utils/test_text_util.py -index 5029cfb9..b382aa28 100644 ---- a/tests/common/utils/test_text_util.py -+++ b/tests/common/utils/test_text_util.py -@@ -16,7 +16,6 @@ - # - - import hashlib --import os - import unittest - from distutils.version import LooseVersion as Version # pylint: disable=no-name-in-module,import-error - -@@ -26,15 +25,6 @@ from tests.lib.tools import AgentTestCase - - - class TestTextUtil(AgentTestCase): -- def test_get_password_hash(self): -- with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_passwords.txt'), 'rb') as in_file: -- for data in in_file: -- # Remove bom on bytes data before it is converted into string. -- data = textutil.remove_bom(data) -- data = ustr(data, encoding='utf-8') -- password_hash = textutil.gen_password_hash(data, 6, 10) -- self.assertNotEqual(None, password_hash) -- - def test_replace_non_ascii(self): - data = ustr(b'\xef\xbb\xbfhehe', encoding='utf-8') - self.assertEqual('hehe', textutil.replace_non_ascii(data)) --- -2.45.2 - diff --git a/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch b/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch deleted file mode 100644 index dcc5c58..0000000 --- a/0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch +++ /dev/null @@ -1,73 +0,0 @@ -From faacd2d59fd34007fa4d678a2a89645d16fdaa7d Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Wed, 12 Jun 2024 15:01:49 -0400 -Subject: [PATCH 2/2] Swap out legacycrypt for crypt-r for Python 3.13+ - -PR #3070 pulled in legacycrypt to replace the removed crypt module. -legacycrypt hasn't been updated since it was initially pulled out of -Python's stdlib in 2019 (Python 3.7). crypt-r pulls in the module as it -was in Python 3.12. While there's been no major developments since 3.7, -it's more likely to be kept updated for any breakages in future Python -releases. - -It's also already packaged for Fedora and means one less package for me -to maintain so that would be nice. - -Signed-off-by: Jeremy Cline ---- - azurelinuxagent/common/osutil/default.py | 6 +++--- - requirements.txt | 2 +- - setup.py | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 1486167c..2f339800 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -38,13 +38,13 @@ import time - from pwd import getpwall - - from azurelinuxagent.common.exception import OSUtilError --# 'crypt' was removed in Python 3.13; use legacycrypt instead -+# 'crypt' was removed in Python 3.13; use crypt-r instead - if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: - try: -- from legacycrypt import crypt -+ from crypt_r import crypt - except ImportError: - def crypt(password, salt): -- raise OSUtilError("Please install the legacycrypt Python module to use this feature.") -+ raise OSUtilError("Please install the crypt-r Python module to use this feature.") - else: - from crypt import crypt # pylint: disable=deprecated-module - -diff --git a/requirements.txt b/requirements.txt -index ab6958a7..fcb64396 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,3 +1,3 @@ - distro; python_version >= '3.8' - pyasn1 --legacycrypt; python_version >= '3.13' -+crypt-r; python_version >= '3.13' -diff --git a/setup.py b/setup.py -index 2d51fae8..26610ca8 100755 ---- a/setup.py -+++ b/setup.py -@@ -318,11 +318,11 @@ class install(_install): # pylint: disable=C0103 - # module was deprecated. Depending on the Linux distribution the - # implementation may be broken prior to Python 3.8 where the functionality - # will be removed from Python 3. --# * In version 3.13 of Python, the crypt module was removed and legacycrypt is -+# * In version 3.13 of Python, the crypt module was removed and crypt-r is - # required instead. - requires = [ - "distro;python_version>='3.8'", -- "legacycrypt;python_version>='3.13'", -+ "crypt-r;python_version>='3.13'", - ] - - modules = [] # pylint: disable=invalid-name --- -2.45.2 - diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 481c949..ec3b4c1 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -12,12 +12,6 @@ Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch -# These two patches are from PR 3070 (merged) and PR 3141 (proposed) and -# are needed to build with Python 3.13 since it removed the crypt module. -# If PR 3141 is not merged it should be dropped in the future for whatever -# upstream decides to go with. -Patch2: 0001-Use-legacycrypt-instead-of-crypt-on-Python-3.13-3070.patch -Patch3: 0002-Swap-out-legacycrypt-for-crypt-r-for-Python-3.13.patch BuildArch: noarch From b059b62abe167b5fa2f2adef4a993b9927d3ac39 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 13 Jun 2024 15:27:47 -0400 Subject: [PATCH 40/55] Switch to autosetup This handles automatically applying patches. [skip changelog] --- WALinuxAgent.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index ec3b4c1..f0f34dc 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -59,10 +59,9 @@ Summary: Udev rules for Microsoft Azure Udev rules specific to Microsoft Azure Virtual Machines. %prep -%setup -q -%patch 1 -p1 -%patch 2 -p1 -%patch 3 -p1 +%autosetup -n %{name}-%{version} -p1 + + %build %py3_build From 8ec7e0352b9ebc48b60ce4f935b77b03f2a0f686 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 13 Jun 2024 16:38:30 -0400 Subject: [PATCH 41/55] Switch to pyproject-rpm-macros This also stops depending on upstream's complicated setup.py to install service and configuration files. Instead, this is done explicitly. This isn't really more complicated, however, since previously we had to move all the installed files around to the correct directory. [skip changelog] --- WALinuxAgent.spec | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index f0f34dc..8f62ed3 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -15,10 +15,12 @@ Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch BuildArch: noarch -BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + BuildRequires: python3-setuptools BuildRequires: python3-distro BuildRequires: python3-crypt-r + Requires: %name-udev = %version-%release %if 0%{?fedora} Requires: ntfsprogs @@ -27,7 +29,8 @@ Requires: openssh Requires: openssh-server Requires: openssl Requires: parted -Requires: python3-pyasn1 +# We need to manually require this for now since upstream +# still uses crypt (removed in Python 3.13) Requires: python3-crypt-r Requires: iptables @@ -62,23 +65,42 @@ Udev rules specific to Microsoft Azure Virtual Machines. %autosetup -n %{name}-%{version} -p1 +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel + %install -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --lnx-distro redhat +%pyproject_install +%pyproject_save_files azurelinuxagent + +# Prune files the setup.py installs, but that we don't want. +# +# While the setup.py does try to install configuration files, +# it doesn't place them where we need them so we install them +# explicitly later. +rm -rf %{buildroot}/%{python3_sitelib}/{usr,etc} +rm -rf %{buildroot}/%{python3_sitelib}/tests +rm -rf %{buildroot}/%{python3_sitelib}/__main__.py +rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py* mkdir -p -m 0700 %{buildroot}%{_sharedstatedir}/waagent mkdir -p %{buildroot}%{_localstatedir}/log touch %{buildroot}%{_localstatedir}/log/waagent.log -mkdir -p %{buildroot}%{_udevrulesdir} -mv %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules %{buildroot}%{_udevrulesdir}/ +# Install configuration and systemd files for the agent +install -m0644 -D --target-directory=%{buildroot}%{_sysconfdir}/ config/waagent.conf +install -m0644 -D --target-directory=%{buildroot}%{_unitdir}/ init/*.slice +install -m0755 -D bin/waagent %{buildroot}%{_sbindir}/waagent +install -m0644 -D init/redhat/waagent.service %{buildroot}%{_unitdir}/ +install -m0644 -D config/waagent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} -rm -rf %{buildroot}/%{python3_sitelib}/tests -rm -rf %{buildroot}/%{python3_sitelib}/__main__.py -rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py* +# Install -udev related files +install -m0644 -D --target-directory=%{buildroot}%{_udevrulesdir}/ config/*.rules +install -m0755 -D --target-directory=%{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1} sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent %if 0%{?with_legacy} @@ -88,9 +110,6 @@ rm -f %{buildroot}%{_sbindir}/waagent2.0 %endif 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} - -install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1} %post %systemd_post waagent.service @@ -101,7 +120,7 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %postun %systemd_postun_with_restart waagent.service -%files +%files -f %{pyproject_files} %doc LICENSE.txt NOTICE README.md %ghost %{_localstatedir}/log/waagent.log %dir %attr(0700, root, root) %{_sharedstatedir}/waagent @@ -111,8 +130,6 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam %{_unitdir}/waagent.service %{_unitdir}/azure.slice %{_unitdir}/azure-vmextensions.slice -%{python3_sitelib}/azurelinuxagent -%{python3_sitelib}/*.egg-info %files udev %{_udevrulesdir}/*.rules From 35ee2516efe5a9887960e30d4a7cc12d5a751514 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 13 Jun 2024 16:50:17 -0400 Subject: [PATCH 42/55] Drop the legacy package definition While Python 2 is still in use for RHEL7, I think we can safely drop it from the Rawhide specfile. [skip changelog] --- WALinuxAgent.spec | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 8f62ed3..6417da5 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,4 +1,3 @@ -%global with_legacy 0 %global dracut_modname 97walinuxagent Name: WALinuxAgent @@ -16,7 +15,6 @@ Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch BuildArch: noarch BuildRequires: pyproject-rpm-macros - BuildRequires: python3-setuptools BuildRequires: python3-distro BuildRequires: python3-crypt-r @@ -44,17 +42,6 @@ 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 images that are built to run in the Microsoft Azure environment. -%if 0%{?with_legacy} -%package legacy -Summary: The Microsoft Azure Linux Agent (legacy) -Requires: %name = %version-%release -Requires: python2 -Requires: net-tools - -%description legacy -The Microsoft Azure Linux Agent supporting old version of extensions. -%endif - %package udev Summary: Udev rules for Microsoft Azure @@ -86,6 +73,7 @@ rm -rf %{buildroot}/%{python3_sitelib}/{usr,etc} rm -rf %{buildroot}/%{python3_sitelib}/tests rm -rf %{buildroot}/%{python3_sitelib}/__main__.py rm -rf %{buildroot}/%{python3_sitelib}/__pycache__/__main__*.py* +rm -f %{buildroot}%{_sbindir}/waagent2.0 mkdir -p -m 0700 %{buildroot}%{_sharedstatedir}/waagent mkdir -p %{buildroot}%{_localstatedir}/log @@ -103,11 +91,6 @@ install -m0644 -D --target-directory=%{buildroot}%{_udevrulesdir}/ config/*.rule install -m0755 -D --target-directory=%{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modname}/ %{SOURCE1} 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 -%else -rm -f %{buildroot}%{_sbindir}/waagent2.0 -%endif sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service @@ -125,8 +108,8 @@ sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.s %ghost %{_localstatedir}/log/waagent.log %dir %attr(0700, root, root) %{_sharedstatedir}/waagent %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%{_sbindir}/waagent %config(noreplace) %{_sysconfdir}/waagent.conf +%{_sbindir}/waagent %{_unitdir}/waagent.service %{_unitdir}/azure.slice %{_unitdir}/azure-vmextensions.slice @@ -135,10 +118,6 @@ sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.s %{_udevrulesdir}/*.rules %{_prefix}/lib/dracut/modules.d/%{dracut_modname}/*.sh -%if 0%{?with_legacy} -%files legacy -%{_sbindir}/waagent2.0 -%endif %changelog %autochangelog From 660db33db56f4d1e8ebc7489d2c750fd7c22bcce Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 14 Jun 2024 11:17:56 -0400 Subject: [PATCH 43/55] Add missing logrotate dependency The agent logs to /var/log/ and installs a logrotate config, but doesn't depend on the package. --- WALinuxAgent.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 6417da5..a6e8aca 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -31,6 +31,7 @@ Requires: parted # still uses crypt (removed in Python 3.13) Requires: python3-crypt-r Requires: iptables +Requires: logrotate BuildRequires: systemd Requires(post): systemd From c553f93c3a43b0d5f039e75d6ad28b38afd9754a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:26:20 +0000 Subject: [PATCH 44/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 86fd51f6375bff377884f3b2a41607b9fc2a0884 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 21 Oct 2024 17:36:28 +0200 Subject: [PATCH 45/55] Update to v2.11.1.12 Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8efa138..fc2e64e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /v2.9.1.1.tar.gz /v2.10.0.8.tar.gz /v2.11.1.4.tar.gz +/v2.11.1.12.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index a6e8aca..b144983 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,7 +1,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.11.1.4 +Version: 2.11.1.12 Release: %autorelease Summary: The Microsoft Azure Linux Agent diff --git a/sources b/sources index 11fe930..572b6d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.11.1.4.tar.gz) = e67ecd801541bd869bc01a023ee3b06a6ee879b5780b34c5fa320d080276ebe8400c66a8550b58d0ca4a1116bd923b00ce2da60d09c574f30c50f446b5a6ac2f +SHA512 (v2.11.1.12.tar.gz) = 5979b1553b2cba1e8b7673ad2f29ccf91fb24ecc74034304caf78de735eb38b2955b9aaf092bdbedae611f6f19fdfc07ceabb0df7832b5be1570a58d1fe8d3cd From 8f18b5595d8233262d0d0b5b7f1aef936d2d2d2d Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 26 Nov 2024 15:23:09 +0100 Subject: [PATCH 46/55] Update to v2.12.0.4 Note: legacycrypt is not in Fedora, add a patch to keep working with 'crypt_r' instead. Signed-off-by: Vitaly Kuznetsov --- .gitignore | 2 + 0001-Fedora-do-not-require-legacycrypt.patch | 67 ++++++++++++++++++++ WALinuxAgent.spec | 3 +- sources | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 0001-Fedora-do-not-require-legacycrypt.patch diff --git a/.gitignore b/.gitignore index fc2e64e..266efa3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ /v2.10.0.8.tar.gz /v2.11.1.4.tar.gz /v2.11.1.12.tar.gz +/v2.12.0.2.tar.gz +/v2.12.0.4.tar.gz diff --git a/0001-Fedora-do-not-require-legacycrypt.patch b/0001-Fedora-do-not-require-legacycrypt.patch new file mode 100644 index 0000000..41caab1 --- /dev/null +++ b/0001-Fedora-do-not-require-legacycrypt.patch @@ -0,0 +1,67 @@ +From 376c6651f3f7c863c1aa5ac5e9536e974e6ab17c Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Wed, 27 Nov 2024 14:53:15 +0100 +Subject: [PATCH] Fedora: do not require legacycrypt +Content-Type: text/plain + +'legacycrypt' is not yet present in Fedora, however, there's 'crypt_r' +stub emulating 'crypt'. + +Signed-off-by: Vitaly Kuznetsov +--- + azurelinuxagent/common/osutil/default.py | 10 +--------- + requirements.txt | 1 - + setup.py | 5 ++--- + 3 files changed, 3 insertions(+), 13 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py +index 0a0fd0e1cdd7..3a1c647a8363 100644 +--- a/azurelinuxagent/common/osutil/default.py ++++ b/azurelinuxagent/common/osutil/default.py +@@ -38,15 +38,7 @@ import time + from pwd import getpwall + + from azurelinuxagent.common.exception import OSUtilError +-# 'crypt' was removed in Python 3.13; use legacycrypt instead +-if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: +- try: +- from legacycrypt import crypt +- except ImportError: +- def crypt(password, salt): +- raise OSUtilError("Please install the legacycrypt Python module to use this feature.") +-else: +- from crypt import crypt # pylint: disable=deprecated-module ++from crypt import crypt # pylint: disable=deprecated-module + + from azurelinuxagent.common import conf + from azurelinuxagent.common import logger +diff --git a/requirements.txt b/requirements.txt +index ab6958a732ce..ee3b024d8fdc 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,3 +1,2 @@ + distro; python_version >= '3.8' + pyasn1 +-legacycrypt; python_version >= '3.13' +diff --git a/setup.py b/setup.py +index e83f598934c6..ea4c488b2897 100755 +--- a/setup.py ++++ b/setup.py +@@ -319,12 +319,11 @@ class install(_install): # pylint: disable=C0103 + # implementation may be broken prior to Python 3.8 where the functionality + # will be removed from Python 3. + # * In version 3.13 of Python, the crypt module was removed and legacycrypt is +-# required instead. ++# required instead. Fedora doesn't provide legacycrypt but has 'crypt_r' stub ++# instead. + requires = [] + if sys.version_info[0] >= 3 and sys.version_info[1] >= 8: + requires.append('distro') +-if sys.version_info[0] >= 3 and sys.version_info[1] >= 13: +- requires.append('legacycrypt') + + modules = [] # pylint: disable=invalid-name + +-- +2.47.0 + diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index b144983..b3c602f 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,7 +1,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.11.1.12 +Version: 2.12.0.4 Release: %autorelease Summary: The Microsoft Azure Linux Agent @@ -11,6 +11,7 @@ Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch +Patch2: 0001-Fedora-do-not-require-legacycrypt.patch BuildArch: noarch diff --git a/sources b/sources index 572b6d4..b420d66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.11.1.12.tar.gz) = 5979b1553b2cba1e8b7673ad2f29ccf91fb24ecc74034304caf78de735eb38b2955b9aaf092bdbedae611f6f19fdfc07ceabb0df7832b5be1570a58d1fe8d3cd +SHA512 (v2.12.0.4.tar.gz) = 483c187afd30c8d356b54af7a01544297ea6c8f196234332a9ecac23c9192d0432fcc31f5a3ff31b763d36faabec4f77262d44d5d729f8f2256695f208319571 From 6e0394d06e6acfecc65992858bf6d02162362644 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:23:35 +0000 Subject: [PATCH 47/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 705517316832cc4e6cda63ab306b821261c3ea93 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 5 May 2025 16:13:48 +0200 Subject: [PATCH 48/55] Update to v2.13.1.1 (#2363841) Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 266efa3..f36f11d 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /v2.11.1.12.tar.gz /v2.12.0.2.tar.gz /v2.12.0.4.tar.gz +/v2.13.1.1.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index b3c602f..3f562fd 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,7 +1,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.12.0.4 +Version: 2.13.1.1 Release: %autorelease Summary: The Microsoft Azure Linux Agent diff --git a/sources b/sources index b420d66..7194baa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.12.0.4.tar.gz) = 483c187afd30c8d356b54af7a01544297ea6c8f196234332a9ecac23c9192d0432fcc31f5a3ff31b763d36faabec4f77262d44d5d729f8f2256695f208319571 +SHA512 (v2.13.1.1.tar.gz) = 3cb65495955c746bf112e794cbeb11f47ace72e4272c3cd16eb8d478c0b3b0323890b52c592b68775efafb8c6f267b3614e66f09d6a6dee066b603297676cd38 From 6664e733d843479d0a0c7dcc8a31e139bf3fe9b9 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 23:21:05 +0200 Subject: [PATCH 49/55] Rebuilt for Python 3.14 From a3c68d79b431fc4a1ead34793545cc1d185c0997 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 21 Jul 2025 12:04:17 -0400 Subject: [PATCH 50/55] Turn off ResourceDisk.Format in the default config WALinuxAgent can optionally format resource disks. However, other tools can also handle this. Fedora Cloud ships with cloud-init, and enables the disk_setup[0] module, which handles formatting the disks. For any cases where users don't want this done via cloud-init, the azure-vm-utils package will provide a small shell script and systemd unit to handle it[1]. [0] https://docs.cloud-init.io/en/latest/reference/yaml_examples/disk_setup.html [1] https://github.com/Azure/azure-vm-utils/pull/84 Signed-off-by: Jeremy Cline --- WALinuxAgent.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 3f562fd..63f7946 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -94,6 +94,9 @@ install -m0755 -D --target-directory=%{buildroot}%{_prefix}/lib/dracut/modules.d sed -i 's,#!/usr/bin/env python,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/waagent sed -i 's,/usr/bin/python ,/usr/bin/python3 ,' %{buildroot}%{_unitdir}/waagent.service +# Other commonly-used tools can handle formatting resource disks (cloud-init, azure-vm-utils) so +# by default, let's have WALinuxAgent not do that. +sed -i 's,ResourceDisk.Format=y,ResourceDisk.Format=n,' %{buildroot}%{_sysconfdir}/waagent.conf %post From 2d46c9102420b1ca59f443aa4d02372502d9195f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:39:58 +0000 Subject: [PATCH 51/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 4314e3d0b327bd92018eaa6ae4e9bfa1553728c2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:22:43 +0200 Subject: [PATCH 52/55] Rebuilt for Python 3.14.0rc2 bytecode From 1104f83c4642b1b25faf4290de98502a6c9f3021 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 15:03:06 +0200 Subject: [PATCH 53/55] Rebuilt for Python 3.14.0rc3 bytecode From 1c8843aa5e7a2763a113c772e542db1a1cdddd5a Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Mon, 22 Sep 2025 11:08:47 +0200 Subject: [PATCH 54/55] Update to v2.14.0.1 Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + 0001-Fedora-do-not-require-legacycrypt.patch | 67 -------------------- WALinuxAgent.spec | 3 +- sources | 2 +- 4 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 0001-Fedora-do-not-require-legacycrypt.patch diff --git a/.gitignore b/.gitignore index f36f11d..16e49a8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /v2.12.0.2.tar.gz /v2.12.0.4.tar.gz /v2.13.1.1.tar.gz +/v2.14.0.1.tar.gz diff --git a/0001-Fedora-do-not-require-legacycrypt.patch b/0001-Fedora-do-not-require-legacycrypt.patch deleted file mode 100644 index 41caab1..0000000 --- a/0001-Fedora-do-not-require-legacycrypt.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 376c6651f3f7c863c1aa5ac5e9536e974e6ab17c Mon Sep 17 00:00:00 2001 -From: Vitaly Kuznetsov -Date: Wed, 27 Nov 2024 14:53:15 +0100 -Subject: [PATCH] Fedora: do not require legacycrypt -Content-Type: text/plain - -'legacycrypt' is not yet present in Fedora, however, there's 'crypt_r' -stub emulating 'crypt'. - -Signed-off-by: Vitaly Kuznetsov ---- - azurelinuxagent/common/osutil/default.py | 10 +--------- - requirements.txt | 1 - - setup.py | 5 ++--- - 3 files changed, 3 insertions(+), 13 deletions(-) - -diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 0a0fd0e1cdd7..3a1c647a8363 100644 ---- a/azurelinuxagent/common/osutil/default.py -+++ b/azurelinuxagent/common/osutil/default.py -@@ -38,15 +38,7 @@ import time - from pwd import getpwall - - from azurelinuxagent.common.exception import OSUtilError --# 'crypt' was removed in Python 3.13; use legacycrypt instead --if sys.version_info[0] == 3 and sys.version_info[1] >= 13 or sys.version_info[0] > 3: -- try: -- from legacycrypt import crypt -- except ImportError: -- def crypt(password, salt): -- raise OSUtilError("Please install the legacycrypt Python module to use this feature.") --else: -- from crypt import crypt # pylint: disable=deprecated-module -+from crypt import crypt # pylint: disable=deprecated-module - - from azurelinuxagent.common import conf - from azurelinuxagent.common import logger -diff --git a/requirements.txt b/requirements.txt -index ab6958a732ce..ee3b024d8fdc 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,3 +1,2 @@ - distro; python_version >= '3.8' - pyasn1 --legacycrypt; python_version >= '3.13' -diff --git a/setup.py b/setup.py -index e83f598934c6..ea4c488b2897 100755 ---- a/setup.py -+++ b/setup.py -@@ -319,12 +319,11 @@ class install(_install): # pylint: disable=C0103 - # implementation may be broken prior to Python 3.8 where the functionality - # will be removed from Python 3. - # * In version 3.13 of Python, the crypt module was removed and legacycrypt is --# required instead. -+# required instead. Fedora doesn't provide legacycrypt but has 'crypt_r' stub -+# instead. - requires = [] - if sys.version_info[0] >= 3 and sys.version_info[1] >= 8: - requires.append('distro') --if sys.version_info[0] >= 3 and sys.version_info[1] >= 13: -- requires.append('legacycrypt') - - modules = [] # pylint: disable=invalid-name - --- -2.47.0 - diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 63f7946..eda48cf 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,7 +1,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.13.1.1 +Version: 2.14.0.1 Release: %autorelease Summary: The Microsoft Azure Linux Agent @@ -11,7 +11,6 @@ Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz Source1: module-setup.sh Patch1: 0001-waagent.service-set-ConditionVirtualization-microsof.patch -Patch2: 0001-Fedora-do-not-require-legacycrypt.patch BuildArch: noarch diff --git a/sources b/sources index 7194baa..662611f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.13.1.1.tar.gz) = 3cb65495955c746bf112e794cbeb11f47ace72e4272c3cd16eb8d478c0b3b0323890b52c592b68775efafb8c6f267b3614e66f09d6a6dee066b603297676cd38 +SHA512 (v2.14.0.1.tar.gz) = b09c0dc7145f7f6b347c603ddcd5a5b26522b2cd1d37303dcdcb44c41ee710a61e2aab3df0bb5854304de8ed5c7d934c7a6924c9e5c7005e081f66e7d1658db8 From 2116361af6a18ba636d8cc3dee54fe4d9a37fe3f Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Wed, 26 Nov 2025 10:21:13 +0100 Subject: [PATCH 55/55] Update to v2.15.0.1 Signed-off-by: Vitaly Kuznetsov --- .gitignore | 1 + WALinuxAgent.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 16e49a8..30509ac 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /v2.12.0.4.tar.gz /v2.13.1.1.tar.gz /v2.14.0.1.tar.gz +/v2.15.0.1.tar.gz diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index eda48cf..5eea00e 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -1,7 +1,7 @@ %global dracut_modname 97walinuxagent Name: WALinuxAgent -Version: 2.14.0.1 +Version: 2.15.0.1 Release: %autorelease Summary: The Microsoft Azure Linux Agent diff --git a/sources b/sources index 662611f..35a2aed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.14.0.1.tar.gz) = b09c0dc7145f7f6b347c603ddcd5a5b26522b2cd1d37303dcdcb44c41ee710a61e2aab3df0bb5854304de8ed5c7d934c7a6924c9e5c7005e081f66e7d1658db8 +SHA512 (v2.15.0.1.tar.gz) = dc9398bd5a100f43f7921e0503ef288d632f0e494f2cc9a149e181634ef68da96bb743dda8378b93bbc538f82d43bf59571b7049918dbe2770495001ae80ab79