From 19bfe138ed9a46302727997cfccfbd8fc0acbac9 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Wed, 15 Sep 2021 12:29:08 +0000 Subject: [PATCH] AlmaLinux changes --- ...ALinuxAgent-2.2.46-almalinux_support.patch | 52 +++++++++++++++++++ SPECS/WALinuxAgent.spec | 9 +++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 SOURCES/WALinuxAgent-2.2.46-almalinux_support.patch diff --git a/SOURCES/WALinuxAgent-2.2.46-almalinux_support.patch b/SOURCES/WALinuxAgent-2.2.46-almalinux_support.patch new file mode 100644 index 0000000..188cde6 --- /dev/null +++ b/SOURCES/WALinuxAgent-2.2.46-almalinux_support.patch @@ -0,0 +1,52 @@ +From 65cec1e4875a010b6d202d623cc2b15e94d1c205 Mon Sep 17 00:00:00 2001 +From: Andrei Lukoshko +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 + diff --git a/SPECS/WALinuxAgent.spec b/SPECS/WALinuxAgent.spec index 8c665e9..5a60619 100644 --- a/SPECS/WALinuxAgent.spec +++ b/SPECS/WALinuxAgent.spec @@ -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 - 2.2.49.2-3.el8.alma +- Add AlmaLinux support + * Tue Jan 12 2021 Miroslav Rezanina - 2.2.49.2-3.el8 - wla-Provide-udev-rules-as-a-separate-subpackage.patch [bz#1913074] - Resolves: bz#1913074