Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/WALinuxAgent.git#d1df06d88f74b391090f4771a4df84fae589809b
This commit is contained in:
parent
de970ef882
commit
f5ab1b1cd8
64
0004-Fix-distro-resolution-for-RedHat-2083.patch
Normal file
64
0004-Fix-distro-resolution-for-RedHat-2083.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 3420fef144cf9a5be62cfae16f64c298ca397a17 Mon Sep 17 00:00:00 2001
|
||||
From: Paula Gombar <gombarica@gmail.com>
|
||||
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 <vkuznets@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: WALinuxAgent
|
||||
Version: 2.2.52
|
||||
Release: 2%{?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,7 +125,13 @@ install -m0755 -D -t %{buildroot}%{_prefix}/lib/dracut/modules.d/%{dracut_modnam
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 15 2021 italy Kuznetsov <vkuznets@redhat.com> - 2.2.52-2
|
||||
* Tue Jan 26 2021 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-4
|
||||
- Fix distro resolution for RedHat
|
||||
|
||||
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.52-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Jan 15 2021 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-2
|
||||
- Add udev rules to initramfs (#1909287)
|
||||
|
||||
* Wed Dec 09 2020 Vitaly Kuznetsov <vkuznets@redhat.com> - 2.2.52-1
|
||||
|
Loading…
Reference in New Issue
Block a user