diff --git a/SOURCES/0001-Add-inital-redhat-build-support.patch b/SOURCES/0001-Add-inital-redhat-build-support.patch deleted file mode 100644 index a2aa39e..0000000 --- a/SOURCES/0001-Add-inital-redhat-build-support.patch +++ /dev/null @@ -1,131 +0,0 @@ -From ee6172c4d57103ac857bbd69c46f247cee5394c3 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Thu, 6 Oct 2016 12:25:35 +0200 -Subject: Add inital redhat build support - -Rebase notes (2.2.32): -- Fix license text - -Rebase notes (2.2.26): -- update to RHEL 8 build -- Do not use INSTALED_FILES for %files - -Rebase notes (2.2.10): -- switched to sha256 -- added .gitpublish profile - -Rebase notes (2.2.46): -- added waagent-extn.logrotate - -Rebase notes (2.7.0.6): -- new files - azure.slice and azure-vmextensions.slice -- removed changes in not shipped scripts - -Merged patches (2.2.45): -- df29beb Switch from platform-python to python36 -- 6749108 Stop packaging legacy waagent2.0 - -Merged patches (2.2.32): -- ce36fd9 Use Python3 -- 952c830 Remove FIPS setting from the default config -- cc9df73 Switch hardcoded python3 shebangs into the %%{__python3} macro -- 66b6f8c Use correct macro for waagent.service -- 1b15ada Switch to platform-python in systemd unit file -- 59f682b Use sys.executable to find system python - -Merged patches (2.2.49): -- 3a23336 Mark logrotate configs with %config(noreplace) - -Merged patches (2.3.0.2): -- 30bb06f9 Provide udev rules as a separate subpackage. - -Merged patches (2.7.0.6): -- a790fb5c Require iptables for setting up persistent firewall rules ---- - .gitignore | 1 + - .gitpublish | 8 + - makepkg.py | 2 +- - redhat/.gitignore | 1 + - redhat/Makefile | 72 +++++ - redhat/Makefile.common | 37 +++ - redhat/WALinuxAgent.spec.template | 243 ++++++++++++++++ - redhat/rpmbuild/BUILD/.gitignore | 2 + - redhat/rpmbuild/RPMS/.gitignore | 2 + - redhat/rpmbuild/SOURCES/.gitignore | 2 + - redhat/rpmbuild/SPECS/.gitignore | 2 + - redhat/rpmbuild/SRPMS/.gitignore | 2 + - redhat/scripts/frh.py | 27 ++ - redhat/scripts/git-backport-diff | 327 ++++++++++++++++++++++ - redhat/scripts/git-compile-check | 215 ++++++++++++++ - redhat/scripts/process-patches.sh | 93 ++++++ - redhat/scripts/tarball_checksum.sh | 3 + - setup.py | 6 +- - tests/data/ext/sample_ext-1.3.0/sample.py | 2 +- - 19 files changed, 1042 insertions(+), 5 deletions(-) - create mode 100644 .gitpublish - create mode 100644 redhat/.gitignore - create mode 100644 redhat/Makefile - create mode 100644 redhat/Makefile.common - create mode 100644 redhat/WALinuxAgent.spec.template - create mode 100644 redhat/rpmbuild/BUILD/.gitignore - create mode 100644 redhat/rpmbuild/RPMS/.gitignore - create mode 100644 redhat/rpmbuild/SOURCES/.gitignore - create mode 100644 redhat/rpmbuild/SPECS/.gitignore - create mode 100644 redhat/rpmbuild/SRPMS/.gitignore - create mode 100755 redhat/scripts/frh.py - create mode 100755 redhat/scripts/git-backport-diff - create mode 100755 redhat/scripts/git-compile-check - create mode 100755 redhat/scripts/process-patches.sh - create mode 100755 redhat/scripts/tarball_checksum.sh - -diff --git a/makepkg.py b/makepkg.py -index 11e90b95..1b6b4351 100755 ---- a/makepkg.py -+++ b/makepkg.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - import glob - import os -diff --git a/setup.py b/setup.py -index 12c9e1d6..586bb5ca 100755 ---- a/setup.py -+++ b/setup.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - # Microsoft Azure Linux Agent setup.py - # -@@ -97,7 +97,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 - agent_bin_path = osutil.get_agent_bin_path() - - if name in ('redhat', 'centos', 'almalinux', 'cloudlinux'): # pylint: disable=R1714 -- if version.startswith("8.2"): -+ if version.startswith("8"): - # redhat8+ default to py3 - set_bin_files(data_files, dest=agent_bin_path, - src=["bin/py3/waagent", "bin/waagent2.0"]) -@@ -106,7 +106,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 - set_conf_files(data_files) - set_logrotate_files(data_files) - set_udev_files(data_files) -- if version.startswith("8.2"): -+ if version.startswith("8"): - # redhat 8+ uses systemd and python3 - set_systemd_files(data_files, dest=systemd_dir_path, - src=["init/redhat/waagent.service", -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 47f86af8..92585ed3 100755 ---- a/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 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - import json - import os - import re --- -2.31.1 - diff --git a/SOURCES/0001-Initial-msvsphere-build-configuration.patch b/SOURCES/0001-Initial-msvsphere-build-configuration.patch new file mode 100644 index 0000000..347ddcb --- /dev/null +++ b/SOURCES/0001-Initial-msvsphere-build-configuration.patch @@ -0,0 +1,62 @@ +From 1c6e194757ad5d0c645e4f129e2b504858cef9d3 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Mon, 18 Dec 2023 20:11:19 +0300 +Subject: [PATCH] Initial msvsphere build configuration + +--- + makepkg.py | 2 +- + setup.py | 6 +++--- + tests/data/ext/sample_ext-1.3.0/sample.py | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/makepkg.py b/makepkg.py +index 11e90b9..1b6b435 100755 +--- a/makepkg.py ++++ b/makepkg.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import glob + import os +diff --git a/setup.py b/setup.py +index 12c9e1d..586bb5c 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Microsoft Azure Linux Agent setup.py + # +@@ -97,7 +97,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 + agent_bin_path = osutil.get_agent_bin_path() + + if name in ('redhat', 'centos', 'almalinux', 'cloudlinux'): # pylint: disable=R1714 +- if version.startswith("8.2"): ++ if version.startswith("8"): + # redhat8+ default to py3 + set_bin_files(data_files, dest=agent_bin_path, + src=["bin/py3/waagent", "bin/waagent2.0"]) +@@ -106,7 +106,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 + set_conf_files(data_files) + set_logrotate_files(data_files) + set_udev_files(data_files) +- if version.startswith("8.2"): ++ if version.startswith("8"): + # redhat 8+ uses systemd and python3 + set_systemd_files(data_files, dest=systemd_dir_path, + src=["init/redhat/waagent.service", +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 47f86af..92585ed 100755 +--- a/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 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import json + import os + import re +-- +2.43.0 + diff --git a/SOURCES/Add-MSVSphere-support.patch b/SOURCES/Add-MSVSphere-support.patch new file mode 100644 index 0000000..8c9a0ad --- /dev/null +++ b/SOURCES/Add-MSVSphere-support.patch @@ -0,0 +1,58 @@ +From 2099a56b545769dd6d65a074e1c7d36dbd678822 Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Fri, 31 Mar 2023 11:26:17 +0300 +Subject: [PATCH] Add MSVSphere support + +--- + azurelinuxagent/common/osutil/factory.py | 2 +- + azurelinuxagent/pa/rdma/factory.py | 2 +- + tests/common/osutil/test_factory.py | 7 +++++++ + 3 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py +index b8f4291..8b71d29 100644 +--- a/azurelinuxagent/common/osutil/factory.py ++++ b/azurelinuxagent/common/osutil/factory.py +@@ -102,7 +102,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) + + return DebianOSBaseUtil() + +- if distro_name in ("redhat", "rhel", "centos", "oracle", "almalinux", "cloudlinux"): ++ if distro_name in ("redhat", "rhel", "centos", "oracle", "almalinux", "cloudlinux", "msvsphere"): + if Version(distro_version) < Version("7"): + return Redhat6xOSUtil() + +diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py +index 8fb5066..7990c49 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 in ('CentOS Linux', 'CentOS', 'Red Hat Enterprise Linux Server', 'AlmaLinux', 'CloudLinux'): ++ if distro_full_name in ('CentOS Linux', 'CentOS', 'Red Hat Enterprise Linux Server', 'AlmaLinux', 'CloudLinux', 'MSVSphere'): + return CentOSRDMAHandler(distro_version) + + if distro_full_name == 'Ubuntu': +diff --git a/tests/common/osutil/test_factory.py b/tests/common/osutil/test_factory.py +index 9a76eb8..aee20a1 100644 +--- a/tests/common/osutil/test_factory.py ++++ b/tests/common/osutil/test_factory.py +@@ -258,6 +258,13 @@ class TestOsUtilFactory(AgentTestCase): + self.assertTrue(isinstance(ret, RedhatOSUtil)) + self.assertEqual(ret.get_service_name(), "waagent") + ++ ret = _get_osutil(distro_name="msvsphere", ++ 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="", +-- +2.39.2 + diff --git a/SPECS/WALinuxAgent.spec b/SPECS/WALinuxAgent.spec index 7adec0c..c17e713 100644 --- a/SPECS/WALinuxAgent.spec +++ b/SPECS/WALinuxAgent.spec @@ -1,7 +1,7 @@ Summary: Microsoft Azure Linux Agent Name: WALinuxAgent Version: 2.7.0.6 -Release: 8%{?dist} +Release: 8%{?dist}.inferit License: ASL 2.0 Group: Development/Libraries @@ -9,7 +9,7 @@ Url: https://github.com/Azure/WALinuxAgent Source0: v2.7.0.6.tar.gz BuildArch: noarch -Patch0001: 0001-Add-inital-redhat-build-support.patch +Patch0001: 0001-Initial-msvsphere-build-configuration.patch Patch0002: 0002-Implement-restart_if-for-RedHat-OS.patch # For bz#2080826 - [Azure][WALA][RHEL-8] [8.7] walinuxagent kills network during boot Patch0003: wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch @@ -20,6 +20,8 @@ Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch # For bz#2170104 - [Azure][WALA][RHEL-8] systemd service should not use python3 Patch6: wla-Use-platform-python-in-waagent.service.patch +Patch100: Add-MSVSphere-support.patch + # rhel requirements BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -57,6 +59,7 @@ Udev rules specific to Microsoft Azure Virtual Machines. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch100 -p1 %build %py3_build @@ -96,6 +99,10 @@ rm -rf %{_unitdir}/waagent.service.d/ %{_udevrulesdir}/*.rules %changelog +* Mon Dec 18 2023 Arkady L. Shane - 2.7.0.6-8.inferit +- Add MSVSphere support +- Debrand and rebuild for MSVSphere 8.9 + * Tue Jul 25 2023 MSVSphere Packaging Team - 2.7.0.6-8 - Rebuilt for MSVSphere 8.8