diff --git a/backport-Fix-the-distro.osfamily-output-problem.patch b/backport-Fix-the-distro.osfamily-output-problem.patch new file mode 100644 index 0000000000000000000000000000000000000000..611fa4a19dbc811e3fc5f284865c0f4a7f70348b --- /dev/null +++ b/backport-Fix-the-distro.osfamily-output-problem.patch @@ -0,0 +1,44 @@ +From a6fd6ef3af0361c860de62d804dd584052f8a563 Mon Sep 17 00:00:00 2001 +From: sxt1001 +Date: Mon, 12 Dec 2022 23:43:59 +0800 +Subject: [PATCH] Fix the distro.osfamily output problem in the openEuler + system. (#1895) + +LP: #1999042 +--- + cloudinit/distros/__init__.py | 3 ++- + cloudinit/distros/openEuler.py | 4 +++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py +index d91aab2..4ab7ae3 100755 +--- a/cloudinit/distros/__init__.py ++++ b/cloudinit/distros/__init__.py +@@ -50,8 +50,9 @@ OSFAMILIES = { + 'freebsd': ['freebsd'], + 'gentoo': ['gentoo'], + 'redhat': ['almalinux', 'amazon', 'centos', 'cloudlinux', 'eurolinux', +- 'fedora', 'openeuler', 'photon', 'rhel', 'rocky', 'virtuozzo'], ++ 'fedora', 'photon', 'rhel', 'rocky', 'virtuozzo'], + 'suse': ['opensuse', 'sles'], ++ "openEuler": ["openEuler"], + } + + LOG = logging.getLogger(__name__) +diff --git a/cloudinit/distros/openEuler.py b/cloudinit/distros/openEuler.py +index edb3165..a4e8757 100644 +--- a/cloudinit/distros/openEuler.py ++++ b/cloudinit/distros/openEuler.py +@@ -4,6 +4,8 @@ from cloudinit.distros import rhel + + + class Distro(rhel.Distro): +- pass ++ def __init__(self, name, cfg, paths): ++ super(Distro, self).__init__(name, cfg, paths) ++ self.osfamily = "openEuler" + + # vi: ts=4 expandtab +-- +2.33.0 + diff --git a/cloud-init.spec b/cloud-init.spec index 9e43251c0f563009baf0ccb631004dc6759a8dbb..4fb4f2aeadf475ace617c9dd4db5af76e2810f9e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 21.4 -Release: 6 +Release: 7 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 @@ -17,6 +17,7 @@ Patch5: backport-add-Requires-cloud-init-hotplugd.socket-in-cloud-init-hotplugd. Patch6: backport-testing-add-additional-mocks-to-test_net-tests-1356.patch Patch7: backport-net-netplan-config-root-read-only-as-wifi-config-can.patch Patch8: backport-netplan-define-features.NETPLAN_CONFIG_ROOT_READ_ONL.patch +Patch9: backport-Fix-the-distro.osfamily-output-problem.patch Patch9000: Fix-the-error-level-logs-displayed-for-the-cloud-init-local-service.patch @@ -128,6 +129,9 @@ fi %exclude /usr/share/doc/* %changelog +* Fri Jan 06 2023 shixuantong - 21.4-7 +- Fix the distro.osfamily output problem + * Thu Jan 05 2023 shixuantong - 21.4-6 - Limit permissions for /etc/network/50-cloud-init.yaml as read-only for root (600)