AlmaLinux changes

This commit is contained in:
Andrew Lukoshko 2021-09-15 12:29:08 +00:00
parent 631cf90677
commit 19bfe138ed
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From 65cec1e4875a010b6d202d623cc2b15e94d1c205 Mon Sep 17 00:00:00 2001
From: Andrei Lukoshko <alukoshko@cloudlinux.com>
Date: Mon, 5 Apr 2021 00:04:02 +0300
Subject: [PATCH] Add AlmaLinux support
---
azurelinuxagent/common/osutil/factory.py | 1 +
azurelinuxagent/pa/rdma/factory.py | 2 +-
setup.py | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py
index 56515ed..cc18a1d 100644
--- a/azurelinuxagent/common/osutil/factory.py
+++ b/azurelinuxagent/common/osutil/factory.py
@@ -97,6 +97,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
if distro_name == "redhat" \
or distro_name == "centos" \
+ or distro_name == "almalinux" \
or distro_name == "oracle":
if Version(distro_version) < Version("7"):
return Redhat6xOSUtil()
diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py
index 2de176f..968a136 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 f0798ff..04864a0 100755
--- a/setup.py
+++ b/setup.py
@@ -83,7 +83,7 @@ def get_data_files(name, version, fullname):
"""
data_files = []
- if name == 'redhat' or name == 'centos':
+ if name == 'redhat' or name == 'centos' or name == 'almalinux':
set_bin_files(data_files)
set_conf_files(data_files)
set_logrotate_files(data_files)
--
2.27.0

View File

@ -1,7 +1,7 @@
Summary: Microsoft Azure Linux Agent
Name: WALinuxAgent
Version: 2.2.49.2
Release: 3%{?dist}
Release: 3%{?dist}.alma
License: ASL 2.0
Group: Development/Libraries
@ -14,6 +14,9 @@ Patch0002: 0002-Fix-handling-of-gen2-disks-with-udev-rules-1954.patch
# For bz#1903074 - [Azure][WALA] Miss report "hostnamectl set-hostname --static] failed, attempting fallback"
Patch3: wla-Fixed-faulty-check-for-run_command-2093.patch
# AlmaLinux
Patch5: WALinuxAgent-2.2.46-almalinux_support.patch
# rhel requirements
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -47,6 +50,7 @@ Udev rules specific to Microsoft Azure Virtual Machines.
%patch0001 -p1
%patch0002 -p1
%patch3 -p1
%patch5 -p1
%build
%py3_build
@ -83,6 +87,9 @@ rm -rf $RPM_BUILD_ROOT
%{_udevrulesdir}/*.rules
%changelog
* Mon Apr 19 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 2.2.49.2-3.el8.alma
- Add AlmaLinux support
* Tue Jan 12 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.49.2-3.el8
- wla-Provide-udev-rules-as-a-separate-subpackage.patch [bz#1913074]
- Resolves: bz#1913074