diff --git a/0001-Add-support-for-Loonnix-server-Euler-and-Anolis-syst.patch b/0001-Add-support-for-Loonnix-server-Euler-and-Anolis-syst.patch new file mode 100644 index 0000000000000000000000000000000000000000..37748768e34f03c347d593c6199361bdd921effc --- /dev/null +++ b/0001-Add-support-for-Loonnix-server-Euler-and-Anolis-syst.patch @@ -0,0 +1,38 @@ +From 9b8b0b0110d53c36e8e2c359ea75a3e87d2f74a5 Mon Sep 17 00:00:00 2001 +From: doupengda +Date: Thu, 8 Jun 2023 15:02:10 +0800 +Subject: [PATCH] Add support for Loonnix server, Euler, and Anolis systems + +--- + cloudinit/util.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/cloudinit/util.py b/cloudinit/util.py +index 68c12f9..73ace38 100644 +--- a/cloudinit/util.py ++++ b/cloudinit/util.py +@@ -488,7 +488,7 @@ def get_linux_distro(): + os_release_rhel = True + os_release = _parse_redhat_release() + if os_release: +- distro_name = os_release.get('ID', '') ++ distro_name = os_release.get('ID', '').lower() + distro_version = os_release.get('VERSION_ID', '') + if 'sles' in distro_name or 'suse' in distro_name: + # RELEASE_BLOCKER: We will drop this sles divergent behavior in +@@ -510,6 +510,12 @@ def get_linux_distro(): + flavor = match.groupdict()['codename'] + if distro_name == 'rhel': + distro_name = 'redhat' ++ elif distro_name == 'loongnix-server': ++ distro_name = 'redhat' ++ elif distro_name == 'openeuler' or distro_name == 'euler': ++ distro_name = 'redhat' ++ elif distro_name == 'anolis' or distro_name == 'openanolis': ++ distro_name = 'redhat' + elif is_BSD(): + distro_name = platform.system().lower() + distro_version = platform.release() +-- +2.33.0 + diff --git a/cloud-init.spec b/cloud-init.spec index aae68ef6eb525e6c5d9946ec133c148ba3f2ce4c..b7dafdea219ed870c74d2f3b301d1985207867a6 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 21.4 -Release: 13 +Release: 14 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -28,6 +28,7 @@ Patch16: backport-Cleanup-ephemeral-IP-routes-on-exception-2100.patch #Patch17: backport-CVE-2023-1786.patch Patch9000: Fix-the-error-level-logs-displayed-for-the-cloud-init-local-service.patch +Patch9001: 0001-Add-support-for-Loonnix-server-Euler-and-Anolis-syst.patch BuildRequires: pkgconfig(systemd) python3-devel python3-setuptools systemd BuildRequires: iproute python3-configobj python3-httpretty >= 0.8.14-2 @@ -137,6 +138,9 @@ fi %exclude /usr/share/doc/* %changelog +* Thu Jun 8 2023 doupengda - 21.4-14 +- Add support for Loongnix server, Euler, and Anolis systems + * Wed May 24 2023 shixuantong - 21.4-13 - fix CVE-2023-1786