Compare commits

...

5 Commits

Author SHA1 Message Date
eabdullin
e25cc69288 Merge branch 'c8' into a8 2022-11-08 15:30:24 +00:00
eabdullin
0b978c9aef Merge branch 'c8' into a8 2022-10-25 09:23:15 +00:00
9ad54fb774 Merge branch 'c8' into a8 2022-08-04 12:34:37 +00:00
eabdullin
774d95d319 AlmaLinux changes 2021-11-17 13:22:09 +03:00
19bfe138ed AlmaLinux changes 2021-09-15 12:29:08 +00:00
2 changed files with 110 additions and 1 deletions

View File

@ -0,0 +1,101 @@
From 958d73ebc8c196dd30e9768d3e9cf1bdb6d32e25 Mon Sep 17 00:00:00 2001
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
Date: Thu, 1 Apr 2021 17:19:08 +0300
Subject: [PATCH 1/3] added AlmaLinux
---
azurelinuxagent/common/osutil/factory.py | 2 +-
azurelinuxagent/pa/rdma/factory.py | 2 +-
setup.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py
index b212c38253..4a09544c4d 100644
--- a/azurelinuxagent/common/osutil/factory.py
+++ b/azurelinuxagent/common/osutil/factory.py
@@ -98,7 +98,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
return DebianOSBaseUtil()
- if distro_name in ("redhat", "rhel", "centos", "oracle"):
+ if distro_name in ("redhat", "rhel", "centos", "oracle", "almalinux"):
if Version(distro_version) < Version("7"):
return Redhat6xOSUtil()
diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py
index d86d8b8f49..e19f2fe918 100644
--- a/azurelinuxagent/pa/rdma/factory.py
+++ b/azurelinuxagent/pa/rdma/factory.py
@@ -38,7 +38,7 @@ def get_rdma_handler(
):
return SUSERDMAHandler()
- if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server':
+ if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server' or distro_full_name == 'AlmaLinux':
return CentOSRDMAHandler(distro_version)
if distro_full_name == 'Ubuntu':
diff --git a/setup.py b/setup.py
index c258e4b878..8ebdde5e50 100755
--- a/setup.py
+++ b/setup.py
@@ -97,7 +97,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
agent_bin_path = osutil.get_agent_bin_path()
set_bin_files(data_files, dest=agent_bin_path)
- if name == 'redhat' or name == 'centos': # pylint: disable=R1714
+ if name == 'redhat' or name == 'centos' or name == 'almalinux': # pylint: disable=R1714
set_conf_files(data_files)
set_logrotate_files(data_files)
set_udev_files(data_files)
From 74e3b01b6be8014c4da92c30d8ac7464cb2d381e Mon Sep 17 00:00:00 2001
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
Date: Fri, 2 Apr 2021 16:06:56 +0300
Subject: [PATCH 2/3] added test for AlmaLinux
---
tests/common/osutil/test_factory.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/common/osutil/test_factory.py b/tests/common/osutil/test_factory.py
index f7d46b21a4..4ab234131b 100644
--- a/tests/common/osutil/test_factory.py
+++ b/tests/common/osutil/test_factory.py
@@ -237,6 +237,13 @@ def test_get_osutil_it_should_return_redhat(self):
self.assertTrue(isinstance(ret, RedhatOSUtil))
self.assertEqual(ret.get_service_name(), "waagent")
+ ret = _get_osutil(distro_name="almalinux",
+ distro_code_name="",
+ distro_full_name="",
+ distro_version="8")
+ self.assertTrue(isinstance(ret, RedhatOSUtil))
+ self.assertEqual(ret.get_service_name(), "waagent")
+
def test_get_osutil_it_should_return_euleros(self):
ret = _get_osutil(distro_name="euleros",
distro_code_name="",
From c9eb420d4a6ce69d2c668deef273a446e73fe2d0 Mon Sep 17 00:00:00 2001
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
Date: Thu, 20 May 2021 13:48:17 +0300
Subject: [PATCH 3/3] improved
---
azurelinuxagent/pa/rdma/factory.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py
index e19f2fe918..c6d808117b 100644
--- a/azurelinuxagent/pa/rdma/factory.py
+++ b/azurelinuxagent/pa/rdma/factory.py
@@ -38,7 +38,7 @@ def get_rdma_handler(
):
return SUSERDMAHandler()
- if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server' or distro_full_name == 'AlmaLinux':
+ if distro_full_name in ('CentOS Linux', 'CentOS', 'Red Hat Enterprise Linux Server', 'AlmaLinux'):
return CentOSRDMAHandler(distro_version)
if distro_full_name == 'Ubuntu':

View File

@ -1,7 +1,7 @@
Summary: Microsoft Azure Linux Agent
Name: WALinuxAgent
Version: 2.7.0.6
Release: 6%{?dist}
Release: 6%{?dist}.alma
License: ASL 2.0
Group: Development/Libraries
@ -18,6 +18,9 @@ Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch
# For bz#2114824 - [Azure][WALA][RHEL-8.7] The description of "Logs.Collect" is incorrect
Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch
# AlmaLinux
Patch1000: WALinuxAgent-2.3-almalinux_support.patch
# rhel requirements
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -55,6 +58,8 @@ Udev rules specific to Microsoft Azure Virtual Machines.
%patch4 -p1
%patch5 -p1
%patch1000 -p1
%build
%py3_build
@ -93,6 +98,9 @@ rm -rf %{_unitdir}/waagent.service.d/
%{_udevrulesdir}/*.rules
%changelog
* Tue Nov 08 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 2.7.0.6-6.alma
- Add AlmaLinux support
* Mon Aug 29 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-6
- wla-redhat-Remove-files-inside-WALA-services-directory.patch [bz#2114742]
- Resolves: bz#2114742