AlmaLinux changes
This commit is contained in:
commit
774d95d319
@ -1 +1 @@
|
|||||||
3c11701ed7b3d9dc76f521eb9519c3f1ce8a24b8 SOURCES/WALinuxAgent-2.2.49.2.tar.gz
|
de1d5307a1fc937038536b27d1e32f7ee851d0dd SOURCES/WALinuxAgent-2.3.0.2.tar.gz
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/WALinuxAgent-2.2.49.2.tar.gz
|
SOURCES/WALinuxAgent-2.3.0.2.tar.gz
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 18257d0baf1acde7522c1bf7d10e0a588d974431 Mon Sep 17 00:00:00 2001
|
From 3aa5fe71fd77f07c5b35ef40e774840f12ee4ee8 Mon Sep 17 00:00:00 2001
|
||||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||||
Date: Thu, 6 Oct 2016 12:25:35 +0200
|
Date: Thu, 6 Oct 2016 12:25:35 +0200
|
||||||
Subject: Add inital redhat build support
|
Subject: Add inital redhat build support
|
||||||
@ -31,10 +31,12 @@ Merged patches (2.2.32):
|
|||||||
|
|
||||||
Merged patches (2.2.49):
|
Merged patches (2.2.49):
|
||||||
- 3a23336 Mark logrotate configs with %config(noreplace)
|
- 3a23336 Mark logrotate configs with %config(noreplace)
|
||||||
|
|
||||||
|
Merged patches (2.3.0.2):
|
||||||
|
- 30bb06f9 Provide udev rules as a separate subpackage.
|
||||||
---
|
---
|
||||||
.gitignore | 1 +
|
.gitignore | 1 +
|
||||||
.gitpublish | 8 +
|
.gitpublish | 8 +
|
||||||
azurelinuxagent/ga/update.py | 12 +-
|
|
||||||
bin/waagent | 2 +-
|
bin/waagent | 2 +-
|
||||||
bin/waagent2.0 | 2 +-
|
bin/waagent2.0 | 2 +-
|
||||||
init/arch/waagent.service | 2 +-
|
init/arch/waagent.service | 2 +-
|
||||||
@ -43,22 +45,22 @@ Merged patches (2.2.49):
|
|||||||
init/waagent.service | 2 +-
|
init/waagent.service | 2 +-
|
||||||
makepkg.py | 2 +-
|
makepkg.py | 2 +-
|
||||||
redhat/.gitignore | 1 +
|
redhat/.gitignore | 1 +
|
||||||
redhat/Makefile | 72 +++++++
|
redhat/Makefile | 72 +++++
|
||||||
redhat/Makefile.common | 37 ++++
|
redhat/Makefile.common | 37 +++
|
||||||
redhat/WALinuxAgent.spec.template | 206 +++++++++++++++++++
|
redhat/WALinuxAgent.spec.template | 234 ++++++++++++++++
|
||||||
redhat/rpmbuild/BUILD/.gitignore | 2 +
|
redhat/rpmbuild/BUILD/.gitignore | 2 +
|
||||||
redhat/rpmbuild/RPMS/.gitignore | 2 +
|
redhat/rpmbuild/RPMS/.gitignore | 2 +
|
||||||
redhat/rpmbuild/SOURCES/.gitignore | 2 +
|
redhat/rpmbuild/SOURCES/.gitignore | 2 +
|
||||||
redhat/rpmbuild/SPECS/.gitignore | 2 +
|
redhat/rpmbuild/SPECS/.gitignore | 2 +
|
||||||
redhat/rpmbuild/SRPMS/.gitignore | 2 +
|
redhat/rpmbuild/SRPMS/.gitignore | 2 +
|
||||||
redhat/scripts/frh.py | 27 +++
|
redhat/scripts/frh.py | 27 ++
|
||||||
redhat/scripts/git-backport-diff | 327 ++++++++++++++++++++++++++++++
|
redhat/scripts/git-backport-diff | 327 ++++++++++++++++++++++
|
||||||
redhat/scripts/git-compile-check | 215 ++++++++++++++++++++
|
redhat/scripts/git-compile-check | 215 ++++++++++++++
|
||||||
redhat/scripts/process-patches.sh | 79 ++++++++
|
redhat/scripts/process-patches.sh | 93 ++++++
|
||||||
redhat/scripts/tarball_checksum.sh | 3 +
|
redhat/scripts/tarball_checksum.sh | 3 +
|
||||||
setup.py | 2 +-
|
setup.py | 2 +-
|
||||||
tests/data/ext/sample_ext-1.3.0/sample.py | 2 +-
|
tests/data/ext/sample_ext-1.3.0/sample.py | 2 +-
|
||||||
26 files changed, 1002 insertions(+), 14 deletions(-)
|
25 files changed, 1037 insertions(+), 9 deletions(-)
|
||||||
create mode 100644 .gitpublish
|
create mode 100644 .gitpublish
|
||||||
create mode 100644 redhat/.gitignore
|
create mode 100644 redhat/.gitignore
|
||||||
create mode 100644 redhat/Makefile
|
create mode 100644 redhat/Makefile
|
||||||
@ -75,38 +77,8 @@ Merged patches (2.2.49):
|
|||||||
create mode 100755 redhat/scripts/process-patches.sh
|
create mode 100755 redhat/scripts/process-patches.sh
|
||||||
create mode 100755 redhat/scripts/tarball_checksum.sh
|
create mode 100755 redhat/scripts/tarball_checksum.sh
|
||||||
|
|
||||||
diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py
|
|
||||||
index 6fec60e..d2a80ab 100644
|
|
||||||
--- a/azurelinuxagent/ga/update.py
|
|
||||||
+++ b/azurelinuxagent/ga/update.py
|
|
||||||
@@ -87,8 +87,11 @@ def get_update_handler():
|
|
||||||
|
|
||||||
|
|
||||||
def get_python_cmd():
|
|
||||||
- major_version = platform.python_version_tuple()[0]
|
|
||||||
- return "python" if int(major_version) <= 2 else "python{0}".format(major_version)
|
|
||||||
+ if sys.executable:
|
|
||||||
+ return sys.executable
|
|
||||||
+ else:
|
|
||||||
+ major_version = platform.python_version_tuple()[0]
|
|
||||||
+ return "python" if int(major_version) <= 2 else "python{0}".format(major_version)
|
|
||||||
|
|
||||||
|
|
||||||
class UpdateHandler(object):
|
|
||||||
@@ -152,9 +155,8 @@ class UpdateHandler(object):
|
|
||||||
|
|
||||||
# Launch the correct Python version for python-based agents
|
|
||||||
cmds = textutil.safe_shlex_split(agent_cmd)
|
|
||||||
- if cmds[0].lower() == "python":
|
|
||||||
- cmds[0] = get_python_cmd()
|
|
||||||
- agent_cmd = " ".join(cmds)
|
|
||||||
+ cmds[0] = get_python_cmd()
|
|
||||||
+ agent_cmd = " ".join(cmds)
|
|
||||||
|
|
||||||
self._evaluate_agent_health(latest_agent)
|
|
||||||
|
|
||||||
diff --git a/bin/waagent b/bin/waagent
|
diff --git a/bin/waagent b/bin/waagent
|
||||||
index 60cdf56..0443ecb 100755
|
index 60cdf56c..0443ecb4 100755
|
||||||
--- a/bin/waagent
|
--- a/bin/waagent
|
||||||
+++ b/bin/waagent
|
+++ b/bin/waagent
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -116,7 +88,7 @@ index 60cdf56..0443ecb 100755
|
|||||||
# Azure Linux Agent
|
# Azure Linux Agent
|
||||||
#
|
#
|
||||||
diff --git a/bin/waagent2.0 b/bin/waagent2.0
|
diff --git a/bin/waagent2.0 b/bin/waagent2.0
|
||||||
index 3473267..762d211 100644
|
index 34732677..762d211f 100644
|
||||||
--- a/bin/waagent2.0
|
--- a/bin/waagent2.0
|
||||||
+++ b/bin/waagent2.0
|
+++ b/bin/waagent2.0
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -126,7 +98,7 @@ index 3473267..762d211 100644
|
|||||||
# Azure Linux Agent
|
# Azure Linux Agent
|
||||||
#
|
#
|
||||||
diff --git a/init/arch/waagent.service b/init/arch/waagent.service
|
diff --git a/init/arch/waagent.service b/init/arch/waagent.service
|
||||||
index d426eb2..ff1ebab 100644
|
index d426eb21..ff1ebab1 100644
|
||||||
--- a/init/arch/waagent.service
|
--- a/init/arch/waagent.service
|
||||||
+++ b/init/arch/waagent.service
|
+++ b/init/arch/waagent.service
|
||||||
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
||||||
@ -139,7 +111,7 @@ index d426eb2..ff1ebab 100644
|
|||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
diff --git a/init/clearlinux/waagent.service b/init/clearlinux/waagent.service
|
diff --git a/init/clearlinux/waagent.service b/init/clearlinux/waagent.service
|
||||||
index 9afee45..c29fc1b 100644
|
index 9afee454..c29fc1b2 100644
|
||||||
--- a/init/clearlinux/waagent.service
|
--- a/init/clearlinux/waagent.service
|
||||||
+++ b/init/clearlinux/waagent.service
|
+++ b/init/clearlinux/waagent.service
|
||||||
@@ -8,7 +8,7 @@ ConditionPathExists=/usr/share/defaults/waagent/waagent.conf
|
@@ -8,7 +8,7 @@ ConditionPathExists=/usr/share/defaults/waagent/waagent.conf
|
||||||
@ -152,7 +124,7 @@ index 9afee45..c29fc1b 100644
|
|||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
diff --git a/init/suse/waagent b/init/suse/waagent
|
diff --git a/init/suse/waagent b/init/suse/waagent
|
||||||
index b77b0fa..317e89e 100755
|
index b77b0fa4..317e89ec 100755
|
||||||
--- a/init/suse/waagent
|
--- a/init/suse/waagent
|
||||||
+++ b/init/suse/waagent
|
+++ b/init/suse/waagent
|
||||||
@@ -34,7 +34,7 @@
|
@@ -34,7 +34,7 @@
|
||||||
@ -165,7 +137,7 @@ index b77b0fa..317e89e 100755
|
|||||||
WAZD_CONF=/etc/waagent.conf
|
WAZD_CONF=/etc/waagent.conf
|
||||||
WAZD_PIDFILE=/var/run/waagent.pid
|
WAZD_PIDFILE=/var/run/waagent.pid
|
||||||
diff --git a/init/waagent.service b/init/waagent.service
|
diff --git a/init/waagent.service b/init/waagent.service
|
||||||
index e91f143..99f3183 100644
|
index e91f1433..99f31830 100644
|
||||||
--- a/init/waagent.service
|
--- a/init/waagent.service
|
||||||
+++ b/init/waagent.service
|
+++ b/init/waagent.service
|
||||||
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
||||||
@ -178,7 +150,7 @@ index e91f143..99f3183 100644
|
|||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
diff --git a/makepkg.py b/makepkg.py
|
diff --git a/makepkg.py b/makepkg.py
|
||||||
index 52e0eae..51c263c 100755
|
index 11e90b95..1b6b4351 100755
|
||||||
--- a/makepkg.py
|
--- a/makepkg.py
|
||||||
+++ b/makepkg.py
|
+++ b/makepkg.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -188,7 +160,7 @@ index 52e0eae..51c263c 100755
|
|||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
diff --git a/setup.py b/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
index 372807f..f0798ff 100755
|
index c258e4b8..ba6783c6 100755
|
||||||
--- a/setup.py
|
--- a/setup.py
|
||||||
+++ b/setup.py
|
+++ b/setup.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -198,15 +170,15 @@ index 372807f..f0798ff 100755
|
|||||||
# Microsoft Azure Linux Agent setup.py
|
# Microsoft Azure Linux Agent setup.py
|
||||||
#
|
#
|
||||||
diff --git a/tests/data/ext/sample_ext-1.3.0/sample.py b/tests/data/ext/sample_ext-1.3.0/sample.py
|
diff --git a/tests/data/ext/sample_ext-1.3.0/sample.py b/tests/data/ext/sample_ext-1.3.0/sample.py
|
||||||
index 74bd839..bf6ed99 100755
|
index 47f86af8..92585ed3 100755
|
||||||
--- a/tests/data/ext/sample_ext-1.3.0/sample.py
|
--- a/tests/data/ext/sample_ext-1.3.0/sample.py
|
||||||
+++ b/tests/data/ext/sample_ext-1.3.0/sample.py
|
+++ b/tests/data/ext/sample_ext-1.3.0/sample.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/bin/env python
|
-#!/usr/bin/env python
|
||||||
+#!/usr/bin/env python3
|
+#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
--
|
--
|
||||||
1.8.3.1
|
2.27.0
|
||||||
|
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
From a5af5690f0df9cb12fc46f8f14e4beba7c3aeae8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Date: Thu, 13 Aug 2020 08:43:58 +0200
|
|
||||||
Subject: Fix handling of gen2 disks with udev rules (#1954)
|
|
||||||
|
|
||||||
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Message-id: <20200810082500.479999-1-vkuznets@redhat.com>
|
|
||||||
Patchwork-id: 98129
|
|
||||||
O-Subject: [RHEL8.3 WALinuxAgent PATCH] Fix handling of gen2 disks with udev rules (#1954)
|
|
||||||
Bugzilla: 1859037
|
|
||||||
RH-Acked-by: Cathy Avery <cavery@redhat.com>
|
|
||||||
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
|
|
||||||
|
|
||||||
commit d33f1f810728dbe4e2891149936195d1ec7aaa27
|
|
||||||
Author: Thomas Stringer <thstring@microsoft.com>
|
|
||||||
Date: Mon Jul 20 14:24:22 2020 -0400
|
|
||||||
|
|
||||||
Fix handling of gen2 disks with udev rules (#1954)
|
|
||||||
|
|
||||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
||||||
---
|
|
||||||
config/66-azure-storage.rules | 40 +++++++++++++++++++++++-----------------
|
|
||||||
1 file changed, 23 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/config/66-azure-storage.rules b/config/66-azure-storage.rules
|
|
||||||
index 5fb3693..cf94807 100644
|
|
||||||
--- a/config/66-azure-storage.rules
|
|
||||||
+++ b/config/66-azure-storage.rules
|
|
||||||
@@ -1,28 +1,34 @@
|
|
||||||
-ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_VENDOR}=="Msft", ENV{ID_MODEL}=="Virtual_Disk", GOTO="azure_disk"
|
|
||||||
-GOTO="azure_end"
|
|
||||||
+# Azure specific rules.
|
|
||||||
+ACTION!="add|change", GOTO="walinuxagent_end"
|
|
||||||
+SUBSYSTEM!="block", GOTO="walinuxagent_end"
|
|
||||||
+ATTRS{ID_VENDOR}!="Msft", GOTO="walinuxagent_end"
|
|
||||||
+ATTRS{ID_MODEL}!="Virtual_Disk", GOTO="walinuxagent_end"
|
|
||||||
|
|
||||||
-LABEL="azure_disk"
|
|
||||||
-# Root has a GUID of 0000 as the second value
|
|
||||||
-# The resource/resource has GUID of 0001 as the second value
|
|
||||||
-ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="root", GOTO="azure_names"
|
|
||||||
-ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="resource", GOTO="azure_names"
|
|
||||||
-ATTRS{device_id}=="?00000001-0001-*", ENV{fabric_name}="BEK", GOTO="azure_names"
|
|
||||||
-# Wellknown SCSI controllers
|
|
||||||
+# Match the known ID parts for root and resource disks.
|
|
||||||
+ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="root", GOTO="wa_azure_names"
|
|
||||||
+ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="resource", GOTO="wa_azure_names"
|
|
||||||
+
|
|
||||||
+# Gen2 disk.
|
|
||||||
ATTRS{device_id}=="{f8b3781a-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi0", GOTO="azure_datadisk"
|
|
||||||
+# Create symlinks for data disks attached.
|
|
||||||
ATTRS{device_id}=="{f8b3781b-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi1", GOTO="azure_datadisk"
|
|
||||||
ATTRS{device_id}=="{f8b3781c-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi2", GOTO="azure_datadisk"
|
|
||||||
ATTRS{device_id}=="{f8b3781d-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi3", GOTO="azure_datadisk"
|
|
||||||
-GOTO="azure_end"
|
|
||||||
+GOTO="walinuxagent_end"
|
|
||||||
|
|
||||||
-# Retrieve LUN number for datadisks
|
|
||||||
+# Parse out the fabric n ame based off of scsi indicators.
|
|
||||||
LABEL="azure_datadisk"
|
|
||||||
-ENV{DEVTYPE}=="partition", PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/../device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result", GOTO="azure_names"
|
|
||||||
-PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result", GOTO="azure_names"
|
|
||||||
-GOTO="azure_end"
|
|
||||||
+ENV{DEVTYPE}=="partition", PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/../device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result"
|
|
||||||
+ENV{DEVTYPE}=="disk", PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result"
|
|
||||||
+
|
|
||||||
+ENV{fabric_name}=="scsi0/lun0", ENV{fabric_name}="root"
|
|
||||||
+ENV{fabric_name}=="scsi0/lun1", ENV{fabric_name}="resource"
|
|
||||||
+# Don't create a symlink for the cd-rom.
|
|
||||||
+ENV{fabric_name}=="scsi0/lun2", GOTO="walinuxagent_end"
|
|
||||||
|
|
||||||
-# Create the symlinks
|
|
||||||
-LABEL="azure_names"
|
|
||||||
+# Create the symlinks.
|
|
||||||
+LABEL="wa_azure_names"
|
|
||||||
ENV{DEVTYPE}=="disk", SYMLINK+="disk/azure/$env{fabric_name}"
|
|
||||||
ENV{DEVTYPE}=="partition", SYMLINK+="disk/azure/$env{fabric_name}-part%n"
|
|
||||||
|
|
||||||
-LABEL="azure_end"
|
|
||||||
+LABEL="walinuxagent_end"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
101
SOURCES/WALinuxAgent-2.3-almalinux_support.patch
Normal file
101
SOURCES/WALinuxAgent-2.3-almalinux_support.patch
Normal 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':
|
@ -1,63 +0,0 @@
|
|||||||
From 51ff3dc6705217f52e4b4810fa9b6eac406ca84e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Date: Thu, 17 Dec 2020 06:50:11 +0100
|
|
||||||
Subject: [PATCH] Fixed faulty check for run_command (#2093)
|
|
||||||
|
|
||||||
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Message-id: <20201209101549.2667108-1-vkuznets@redhat.com>
|
|
||||||
Patchwork-id: 100366
|
|
||||||
O-Subject: [RHEL8 WALinuxAgent PATCH] Fixed faulty check for run_command (#2093)
|
|
||||||
Bugzilla: 1903074
|
|
||||||
RH-Acked-by: Cathy Avery <cavery@redhat.com>
|
|
||||||
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
|
|
||||||
|
|
||||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1903074
|
|
||||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33563215
|
|
||||||
Tested: by QE
|
|
||||||
Branch: rhel840/master-2.2.49
|
|
||||||
|
|
||||||
commit b1799aef33f1213ef8828d5ba1838582026d5030
|
|
||||||
Author: Laveesh Rohra <larohra@microsoft.com>
|
|
||||||
Date: Tue Dec 1 16:13:03 2020 -0800
|
|
||||||
|
|
||||||
Fixed faulty check for run_command (#2093)
|
|
||||||
|
|
||||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
||||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
||||||
---
|
|
||||||
azurelinuxagent/common/osutil/redhat.py | 5 ++++-
|
|
||||||
azurelinuxagent/common/osutil/suse.py | 2 +-
|
|
||||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/azurelinuxagent/common/osutil/redhat.py b/azurelinuxagent/common/osutil/redhat.py
|
|
||||||
index 8974ecc..1b3ae0e 100644
|
|
||||||
--- a/azurelinuxagent/common/osutil/redhat.py
|
|
||||||
+++ b/azurelinuxagent/common/osutil/redhat.py
|
|
||||||
@@ -106,7 +106,10 @@ class RedhatOSUtil(Redhat6xOSUtil):
|
|
||||||
to hostname.
|
|
||||||
"""
|
|
||||||
hostnamectl_cmd = ['hostnamectl', 'set-hostname', hostname, '--static']
|
|
||||||
- if self._run_command_without_raising(hostnamectl_cmd, log_error=False) != 0:
|
|
||||||
+
|
|
||||||
+ try:
|
|
||||||
+ shellutil.run_command(hostnamectl_cmd, log_error=False)
|
|
||||||
+ except shellutil.CommandError:
|
|
||||||
logger.warn("[{0}] failed, attempting fallback".format(' '.join(hostnamectl_cmd)))
|
|
||||||
DefaultOSUtil.set_hostname(self, hostname)
|
|
||||||
|
|
||||||
diff --git a/azurelinuxagent/common/osutil/suse.py b/azurelinuxagent/common/osutil/suse.py
|
|
||||||
index 2192c67..0b5fc8d 100644
|
|
||||||
--- a/azurelinuxagent/common/osutil/suse.py
|
|
||||||
+++ b/azurelinuxagent/common/osutil/suse.py
|
|
||||||
@@ -80,7 +80,7 @@ class SUSEOSUtil(SUSE11OSUtil):
|
|
||||||
self._run_command_without_raising(["systemctl", "start", "{}.service".format(self.dhclient_name)],
|
|
||||||
log_error=False)
|
|
||||||
|
|
||||||
- def start_network(self) :
|
|
||||||
+ def start_network(self):
|
|
||||||
self._run_command_without_raising(["systemctl", "start", "network.service"], log_error=False)
|
|
||||||
|
|
||||||
def restart_ssh_service(self):
|
|
||||||
--
|
|
||||||
2.18.4
|
|
||||||
|
|
@ -1,21 +1,18 @@
|
|||||||
Summary: Microsoft Azure Linux Agent
|
Summary: Microsoft Azure Linux Agent
|
||||||
Name: WALinuxAgent
|
Name: WALinuxAgent
|
||||||
Version: 2.2.49.2
|
Version: 2.3.0.2
|
||||||
Release: 3%{?dist}.alma
|
Release: 2%{?dist}.alma
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Url: https://github.com/Azure/WALinuxAgent
|
Url: https://github.com/Azure/WALinuxAgent
|
||||||
Source0: WALinuxAgent-2.2.49.2.tar.gz
|
Source0: WALinuxAgent-2.3.0.2.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Patch0001: 0001-Add-inital-redhat-build-support.patch
|
Patch0001: 0001-Add-inital-redhat-build-support.patch
|
||||||
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
|
# AlmaLinux
|
||||||
Patch5: WALinuxAgent-2.2.46-almalinux_support.patch
|
Patch1000: WALinuxAgent-2.3-almalinux_support.patch
|
||||||
|
|
||||||
# rhel requirements
|
# rhel requirements
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -27,6 +24,7 @@ Requires: openssl
|
|||||||
Requires: parted
|
Requires: parted
|
||||||
Requires: python3-pyasn1
|
Requires: python3-pyasn1
|
||||||
Requires: python36
|
Requires: python36
|
||||||
|
Requires: iptables
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
@ -48,9 +46,7 @@ Udev rules specific to Microsoft Azure Virtual Machines.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch1000 -p1
|
||||||
%patch3 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -79,7 +75,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%config(noreplace) %{_sysconfdir}/waagent.conf
|
%config(noreplace) %{_sysconfdir}/waagent.conf
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/waagent.logrotate
|
%config(noreplace) %{_sysconfdir}/logrotate.d/waagent.logrotate
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/waagent-extn.logrotate
|
|
||||||
%{_sbindir}/waagent
|
%{_sbindir}/waagent
|
||||||
%{_unitdir}/waagent.service
|
%{_unitdir}/waagent.service
|
||||||
|
|
||||||
@ -87,9 +82,19 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_udevrulesdir}/*.rules
|
%{_udevrulesdir}/*.rules
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 19 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 2.2.49.2-3.el8.alma
|
* Fri Oct 08 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 2.3.0.2-2.alma
|
||||||
- Add AlmaLinux support
|
- Add AlmaLinux support
|
||||||
|
|
||||||
|
* Mon Aug 09 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0.2-2
|
||||||
|
- wla-Require-iptables-for-setting-up-persistent-firewall-.patch [bz#1985198]
|
||||||
|
- Resolves: bz#1985198
|
||||||
|
([Azure][WALA][RHEL-8] WALA needs iptables package)
|
||||||
|
|
||||||
|
* Fri Jun 25 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0.2-1
|
||||||
|
- Rebase to 2.3.0.2 [bz#1972102]
|
||||||
|
- Resolves: bz#1972102
|
||||||
|
([Azure][RHEL-8]Rebase WALinuxAgent to 2.3.0.2)
|
||||||
|
|
||||||
* Tue Jan 12 2021 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.49.2-3.el8
|
* 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]
|
- wla-Provide-udev-rules-as-a-separate-subpackage.patch [bz#1913074]
|
||||||
- Resolves: bz#1913074
|
- Resolves: bz#1913074
|
||||||
@ -102,7 +107,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
* Wed Nov 18 2020 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.49.2-1.el8
|
* Wed Nov 18 2020 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.49.2-1.el8
|
||||||
- Rebase to 2.2.49.2 [bz#1896907]
|
- Rebase to 2.2.49.2 [bz#1896907]
|
||||||
- Resolves: bz#1896907
|
|
||||||
([Azure] Rebase WALinuxAgent to 2.2.49)
|
([Azure] Rebase WALinuxAgent to 2.2.49)
|
||||||
|
|
||||||
* Thu Aug 13 2020 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.46-8.el8
|
* Thu Aug 13 2020 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.46-8.el8
|
||||||
|
Loading…
Reference in New Issue
Block a user