diff --git a/add-variable-to-forbid-tmp-dir.patch b/add-variable-to-forbid-tmp-dir.patch index 6a7d5f0d37258dd63643886e6048bb21a9d01d20..690fea7bbb8683547a35dc7647f455b93824a7d3 100644 --- a/add-variable-to-forbid-tmp-dir.patch +++ b/add-variable-to-forbid-tmp-dir.patch @@ -7,24 +7,25 @@ reason: add variable to forbid temporary directory Signed-off-by: chengquan --- - cloud-init-19.4/setup.py | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff -Nur a/setup.py b/setup.py ---- a/setup.py 2019-04-12 19:00:20.782000000 +0800 -+++ b/setup.py 2019-04-12 19:48:04.246000000 +0800 -@@ -91,6 +91,8 @@ - (deps, _e) = tiny_p(cmd) - return str(deps).splitlines() + setup.py | 15 ++++- + 1 files changed, 12 insertions(+), 3 deletions(-) +diff --git a/setup.py b/setup.py +index bd02fac..a22737c 100755 +--- a/setup.py ++++ b/setup.py +@@ -75,6 +75,8 @@ def read_requires(): + deps = subprocess.check_output(cmd) + return deps.decode('utf-8').splitlines() + +# add variable to forbid tmp dir +num = 0 - + def render_tmpl(template, mode=None): """render template into a tmpdir under same dir as setup.py -@@ -112,7 +114,10 @@ +@@ -96,7 +98,10 @@ def render_tmpl(template, mode=None): return template - + topdir = os.path.dirname(sys.argv[0]) - tmpd = tempfile.mkdtemp(dir=topdir, prefix=RENDERED_TMPD_PREFIX) + global num @@ -34,10 +35,10 @@ diff -Nur a/setup.py b/setup.py atexit.register(shutil.rmtree, tmpd) bname = os.path.basename(template).rstrip(tmpl_ext) fpath = os.path.join(tmpd, bname) -@@ -126,6 +131,10 @@ +@@ -111,6 +116,10 @@ def render_tmpl(template, mode=None): # return path relative to setup.py return os.path.join(os.path.basename(tmpd), bname) - + +def sort_files(file_list): + file_list.sort() + return file_list @@ -45,7 +46,7 @@ diff -Nur a/setup.py b/setup.py # User can set the variant for template rendering if '--distro' in sys.argv: idx = sys.argv.index('--distro') -@@ -140,9 +149,9 @@ +@@ -126,9 +135,9 @@ INITSYS_FILES = { 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)], 'sysvinit_suse': [f for f in glob('sysvinit/suse/*') if is_f(f)], 'systemd': [render_tmpl(f) diff --git a/bugfix-cloud-init-add-openEuler-os.patch b/bugfix-cloud-init-add-openEuler-os.patch index 41a953b6bd9fe6c4d8fcb26572d278a1f645cfe5..7404035306ddb11557158c28cada67e0d4f7b7fd 100644 --- a/bugfix-cloud-init-add-openEuler-os.patch +++ b/bugfix-cloud-init-add-openEuler-os.patch @@ -8,52 +8,52 @@ reason: add openEuler into distros Signed-off-by: chengquan --- .../0001-cloud-init-Update-patch-information.patch | 68 ++++++++++++++++++++++ - cloud-init-19.4/cloudinit/config/cc_ntp.py | 2 +- - cloud-init-19.4/cloudinit/config/cc_resolv_conf.py | 2 +- - cloud-init-19.4/cloudinit/config/cc_rh_subscription.py | 2 +- - cloud-init-19.4/cloudinit/config/cc_spacewalk.py | 2 +- + cloud-init-20.3/cloudinit/config/cc_ntp.py | 2 +- + cloud-init-20.3/cloudinit/config/cc_resolv_conf.py | 2 +- + cloud-init-20.3/cloudinit/config/cc_rh_subscription.py | 2 +- + cloud-init-20.3/cloudinit/config/cc_spacewalk.py | 2 +- .../cloudinit/config/cc_yum_add_repo.py | 2 +- - cloud-init-19.4/cloudinit/distros/__init__.py | 2 +- - cloud-init-19.4/cloudinit/distros/openEuler.py | 12 ++++ - cloud-init-19.4/cloudinit/util.py | 2 +- - cloud-init-19.4/config/cloud.cfg.tmpl | 8 +-- - cloud-init-19.4/systemd/cloud-init.service.tmpl | 2 +- - cloud-init-19.4/tests/cloud_tests/util.py | 2 +- - cloud-init-19.4/tools/render-cloudcfg | 2 +- + cloud-init-20.3/cloudinit/distros/__init__.py | 2 +- + cloud-init-20.3/cloudinit/distros/openEuler.py | 12 ++++ + cloud-init-20.3/cloudinit/util.py | 2 +- + cloud-init-20.3/config/cloud.cfg.tmpl | 8 +-- + cloud-init-20.3/systemd/cloud-init.service.tmpl | 2 +- + cloud-init-20.3/tests/cloud_tests/util.py | 2 +- + cloud-init-20.3/tools/render-cloudcfg | 2 +- 14 files changed, 95 insertions(+), 15 deletions(-) create mode 100644 cloud-init-19.4/cloudinit/distros/openEuler.py diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py -index d43d060..4f14c10 100644 +index 3d7279d..ae6f06b 100644 --- a/cloudinit/config/cc_ntp.py +++ b/cloudinit/config/cc_ntp.py -@@ -23,7 +23,7 @@ LOG = logging.getLogger(_name_) - frequency = PER_INSTANCE +@@ -25,7 +25,7 @@ frequency = PER_INSTANCE NTP_CONF = '/etc/ntp.conf' NR_POOL_SERVERS = 4 --distros = ['centos', 'debian', 'fedora', 'opensuse', 'rhel', 'sles', 'ubuntu'] -+distros = ['centos', 'debian', 'fedora', 'opensuse', 'rhel', 'sles', 'ubuntu', 'openEuler'] - + distros = ['alpine', 'centos', 'debian', 'fedora', 'opensuse', 'rhel', +- 'sles', 'ubuntu'] ++ 'sles', 'ubuntu', 'openEuler'] + NTP_CLIENT_CONFIG = { 'chrony': { diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py -index 9812562..973fe2e 100644 +index 519e66e..dc093fb 100644 --- a/cloudinit/config/cc_resolv_conf.py +++ b/cloudinit/config/cc_resolv_conf.py @@ -55,7 +55,7 @@ LOG = logging.getLogger(__name__) - + frequency = PER_INSTANCE - --distros = ['fedora', 'opensuse', 'rhel', 'sles'] -+distros = ['fedora', 'opensuse', 'rhel', 'sles', 'openEuler'] - - + +-distros = ['alpine', 'fedora', 'opensuse', 'rhel', 'sles'] ++distros = ['alpine', 'fedora', 'opensuse', 'rhel', 'sles', 'openEuler'] + + def generate_resolv_conf(template_fn, params, target_fname="/etc/resolv.conf"): diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py -index 7f36cf8..23f3a5a 100644 +index 28d62e9..9a25767 100644 --- a/cloudinit/config/cc_rh_subscription.py +++ b/cloudinit/config/cc_rh_subscription.py -@@ -43,7 +43,7 @@ from cloudinit import util +@@ -44,7 +44,7 @@ from cloudinit import util LOG = logging.getLogger(__name__) @@ -63,71 +63,89 @@ index 7f36cf8..23f3a5a 100644 def handle(name, cfg, _cloud, log, _args): diff --git a/cloudinit/config/cc_spacewalk.py b/cloudinit/config/cc_spacewalk.py -index 1020e94..63e9d3b 100644 +index 9508360..0cee8a7 100644 --- a/cloudinit/config/cc_spacewalk.py +++ b/cloudinit/config/cc_spacewalk.py @@ -30,7 +30,7 @@ For more information about spacewalk see: https://fedorahosted.org/spacewalk/ - from cloudinit import util - - + from cloudinit import subp + + -distros = ['redhat', 'fedora'] +distros = ['redhat', 'fedora', 'openEuler'] required_packages = ['rhn-setup'] def_ca_cert_path = "/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT" - + diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py -index 6a42f49..9b2d1bd 100644 +index 01fe683..1b7c783 100644 --- a/cloudinit/config/cc_yum_add_repo.py +++ b/cloudinit/config/cc_yum_add_repo.py -@@ -40,7 +40,7 @@ import six - +@@ -36,7 +36,7 @@ from configparser import ConfigParser + from cloudinit import util - --distros = ['fedora', 'rhel'] -+distros = ['fedora', 'rhel', 'openEuler'] - - + +-distros = ['centos', 'fedora', 'rhel'] ++distros = ['centos', 'fedora', 'rhel', 'openEuler'] + + def _canonicalize_id(repo_id): diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py -index d5becd1..f6eb899 100755 +index 2537608..2492962 100755 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py -@@ -36,7 +36,7 @@ ALL_DISTROS = 'all' - - OSFAMILIES = { +@@ -45,7 +45,7 @@ OSFAMILIES = { 'debian': ['debian', 'ubuntu'], + 'freebsd': ['freebsd'], + 'gentoo': ['gentoo'], - 'redhat': ['amazon', 'centos', 'fedora', 'rhel'], + 'redhat': ['amazon', 'centos', 'fedora', 'rhel', 'openEuler'], - 'gentoo': ['gentoo'], - 'freebsd': ['freebsd'], 'suse': ['opensuse', 'sles'], + } + +diff --git a/cloudinit/distros/openEuler.py b/cloudinit/distros/openEuler.py +new file mode 100644 +index 0000000..7505ca4 +--- /dev/null ++++ b/cloudinit/distros/openEuler.py +@@ -0,0 +1,12 @@ ++# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. ++# This file is part of cloud-init. See LICENSE file for license information. ++ ++from cloudinit.distros import rhel ++from cloudinit import log as logging ++ ++LOG = logging.getLogger(__name__) ++ ++class Distro(rhel.Distro): ++ pass ++ ++# vi: ts=4 expandtab diff --git a/cloudinit/util.py b/cloudinit/util.py -index e1290aa..d85daf0 100644 +index cf9e349..39a6c50 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py -@@ -593,7 +593,7 @@ def system_info(): - if system == "linux": +@@ -549,7 +549,7 @@ def system_info(): linux_dist = info['dist'][0].lower() if linux_dist in ( -- 'arch', 'centos', 'debian', 'fedora', 'rhel', 'suse'): -+ 'arch', 'centos', 'debian', 'fedora', 'rhel', 'suse', 'openEuler'): + 'alpine', 'arch', 'centos', 'debian', 'fedora', 'rhel', +- 'suse'): ++ 'suse', 'openEuler'): var = linux_dist elif linux_dist in ('ubuntu', 'linuxmint', 'mint'): var = 'ubuntu' diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index 50e3bd8..e3816f2 100644 +index 2beb9b0..2318741 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl -@@ -21,7 +21,7 @@ +@@ -21,7 +21,7 @@ disable_root: false disable_root: true {% endif %} - --{% if variant in ["centos", "fedora", "rhel"] %} -+{% if variant in ["centos", "fedora", "rhel", "openEuler"] %} + +-{% if variant in ["alpine", "amazon", "centos", "fedora", "rhel"] %} ++{% if variant in ["alpine", "amazon", "centos", "fedora", "rhel", "openEuler"] %} mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] - resize_rootfs_tmp: /dev - ssh_pwauth: 0 -@@ -76,7 +76,7 @@ + {% if variant == "amazon" %} + resize_rootfs: noblock +@@ -92,7 +92,7 @@ cloud_config_modules: - ssh-import-id - locale - set-passwords @@ -136,43 +154,43 @@ index 50e3bd8..e3816f2 100644 - spacewalk - yum-add-repo {% endif %} -@@ -137,7 +137,7 @@ - # (not accessible to handlers/transforms) - system_info: +@@ -153,7 +153,7 @@ system_info: # This will affect which distro class gets used --{% if variant in ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %} -+{% if variant in ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu", "openEuler"] %} + {% if variant in ["alpine", "amazon", "arch", "centos", "debian", + "fedora", "freebsd", "netbsd", "openbsd", "rhel", +- "suse", "ubuntu"] %} ++ "suse", "ubuntu", "openEuler"] %} distro: {{ variant }} {% else %} # Unknown/fallback distro. -@@ -185,7 +185,7 @@ - primary: http://ports.ubuntu.com/ubuntu-ports +@@ -205,7 +205,7 @@ system_info: security: http://ports.ubuntu.com/ubuntu-ports ssh_svcname: ssh --{% elif variant in ["arch", "centos", "fedora", "rhel", "suse"] %} -+{% elif variant in ["arch", "centos", "fedora", "rhel", "suse", "openEuler"] %} + {% elif variant in ["alpine", "amazon", "arch", "centos", "fedora", +- "rhel", "suse"] %} ++ "rhel", "suse", "openEuler"] %} # Default user name + that default users groups (if added/used) default_user: - name: {{ variant }} + {% if variant == "amazon" %} diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl -index b92e8ab..f59d4fd 100644 +index af6d9a8..fd1babf 100644 --- a/systemd/cloud-init.service.tmpl +++ b/systemd/cloud-init.service.tmpl @@ -10,7 +10,7 @@ After=systemd-networkd-wait-online.service {% if variant in ["ubuntu", "unknown", "debian"] %} After=networking.service {% endif %} --{% if variant in ["centos", "fedora", "redhat"] %} -+{% if variant in ["centos", "fedora", "redhat", "openEuler"] %} +-{% if variant in ["centos", "fedora", "rhel"] %} ++{% if variant in ["centos", "fedora", "rhel", "openEuler"] %} After=network.service After=NetworkManager.service {% endif %} diff --git a/tests/cloud_tests/util.py b/tests/cloud_tests/util.py -index 4357fbb..7d3034d 100644 +index 7dcccbd..87f0e3f 100644 --- a/tests/cloud_tests/util.py +++ b/tests/cloud_tests/util.py -@@ -18,7 +18,7 @@ from tests.cloud_tests import LOG - +@@ -23,7 +23,7 @@ from tests.cloud_tests import LOG + OS_FAMILY_MAPPING = { 'debian': ['debian', 'ubuntu'], - 'redhat': ['centos', 'rhel', 'fedora'], @@ -181,33 +199,15 @@ index 4357fbb..7d3034d 100644 'freebsd': ['freebsd'], 'suse': ['sles'], diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg -index 91d074b..7a8a2c4 100755 +index ed45484..6d1fa6e 100755 --- a/tools/render-cloudcfg +++ b/tools/render-cloudcfg -@@ -5,7 +5,7 @@ import argparse - import sys - - VARIANTS = ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", -- "ubuntu", "unknown"] -+ "ubuntu", "unknown", "openEuler"] - +@@ -6,7 +6,7 @@ import sys + + VARIANTS = ["alpine", "amazon", "arch", "centos", "debian", "fedora", + "freebsd", "netbsd", "openbsd", "rhel", "suse", "ubuntu", +- "unknown"] ++ "unknown", "openEuler"] + + if "avoid-pep8-E402-import-not-top-of-file": - _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -diff --git a/cloudinit/distros/openEuler.py b/cloudinit/distros/openEuler.py -new file mode 100644 -index 0000000..5ac4700 ---- /dev/null -+++ b/cloudinit/distros/openEuler.py -@@ -0,0 +1,12 @@ -+# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. -+# This file is part of cloud-init. See LICENSE file for license information. -+ -+from cloudinit.distros import rhel -+from cloudinit import log as logging -+ -+LOG = logging.getLogger(__name__) -+ -+class Distro(rhel.Distro): -+ pass -+ -+# vi: ts=4 expandtab diff --git a/bugfix-sort-requirements.patch b/bugfix-sort-requirements.patch index 8873cdf882734b0a99ec7000e82379a92bccf4fb..438fc768553e2532e74151b421857a57bfb3bdfd 100644 --- a/bugfix-sort-requirements.patch +++ b/bugfix-sort-requirements.patch @@ -7,7 +7,7 @@ reason: sort requirements in setup Signed-off-by: chengquan --- - cloud-init-19.4/setup.py | 1 + + cloud-init-20.3/setup.py | 1 + 1 file changed, 1 insertion(+) diff -Nur a/setup.py b/setup.py diff --git a/cloud-init-19.4-disable-lxd-tests.patch b/cloud-init-19.4-disable-lxd-tests.patch index 1fe51eeaac873605f0ebb9ef72220d0083d55cf5..65ee2bac31eff026c64e0199adde74259c07b22c 100644 --- a/cloud-init-19.4-disable-lxd-tests.patch +++ b/cloud-init-19.4-disable-lxd-tests.patch @@ -9,17 +9,18 @@ Signed-off-by: Eduardo Otubo 1 file changed, 2 deletions(-) diff --git a/tests/cloud_tests/platforms/__init__.py b/tests/cloud_tests/platforms/__init__.py -index 6a410b84..2076d1c7 100644 +index e506baa..e7efcba 100644 --- a/tests/cloud_tests/platforms/__init__.py +++ b/tests/cloud_tests/platforms/__init__.py -@@ -3,14 +3,12 @@ +@@ -3,7 +3,6 @@ """Main init.""" from .ec2 import platform as ec2 -from .lxd import platform as lxd from .nocloudkvm import platform as nocloudkvm from .azurecloud import platform as azurecloud - + from ..util import emit_dots_on_travis +@@ -11,7 +10,6 @@ from ..util import emit_dots_on_travis PLATFORMS = { 'ec2': ec2.EC2Platform, 'nocloud-kvm': nocloudkvm.NoCloudKVMPlatform, diff --git a/cloud-init-19.4-nm-controlled.patch b/cloud-init-19.4-nm-controlled.patch index 1f7b26dbc376d6d6b7cf616085426d9c6294f13f..641e32f56e466956976cd2a2ec437588f116ad71 100644 --- a/cloud-init-19.4-nm-controlled.patch +++ b/cloud-init-19.4-nm-controlled.patch @@ -12,529 +12,426 @@ Signed-off-by: Eduardo Otubo 3 files changed, 64 deletions(-) diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py -index 310cdf01..8bd7e887 100644 +index 0a5d481..23e467d 100644 --- a/cloudinit/net/sysconfig.py +++ b/cloudinit/net/sysconfig.py -@@ -272,7 +272,6 @@ class Renderer(renderer.Renderer): - iface_defaults = tuple([ - ('ONBOOT', True), - ('USERCTL', False), -- ('NM_CONTROLLED', False), - ('BOOTPROTO', 'none'), - ('STARTMODE', 'auto'), - ]) +@@ -277,7 +277,7 @@ class Renderer(renderer.Renderer): + # details about this) + + iface_defaults = { +- 'rhel': {'ONBOOT': True, 'USERCTL': False, 'NM_CONTROLLED': False, ++ 'rhel': {'ONBOOT': True, 'USERCTL': False, + 'BOOTPROTO': 'none'}, + 'suse': {'BOOTPROTO': 'static', 'STARTMODE': 'auto'}, + } diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py -index 67209955..1df3bfb5 100644 +index 8d7b09c..46a256a 100644 --- a/tests/unittests/test_distros/test_netconfig.py +++ b/tests/unittests/test_distros/test_netconfig.py -@@ -466,7 +466,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): +@@ -484,7 +484,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): GATEWAY=192.168.1.254 IPADDR=192.168.1.5 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -475,7 +474,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): + USERCTL=no +@@ -492,7 +491,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): self.ifcfg_path('eth1'): dedent("""\ BOOTPROTO=dhcp DEVICE=eth1 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -500,7 +498,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): + USERCTL=no +@@ -515,7 +513,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): IPV6ADDR=2607:f0d0:1002:0011::2/64 IPV6INIT=yes IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -509,7 +506,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): + USERCTL=no +@@ -523,7 +520,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): self.ifcfg_path('eth1'): dedent("""\ BOOTPROTO=dhcp DEVICE=eth1 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -562,7 +558,6 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): - GATEWAY=192.168.1.254 - IPADDR=192.168.1.5 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -571,7 +566,6 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): - self.ifcfg_path('eth1'): dedent("""\ - BOOTPROTO=dhcp - DEVICE=eth1 -- NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -593,7 +587,6 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): - IPV6ADDR=2607:f0d0:1002:0011::2/64 - IPV6INIT=yes - IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 -- NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -602,7 +595,6 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): - self.ifcfg_path('eth1'): dedent("""\ - BOOTPROTO=dhcp - DEVICE=eth1 -- NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto TYPE=Ethernet + USERCTL=no diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py -index 01119e0a..40427461 100644 +index 54cc846..65986c2 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py -@@ -496,7 +496,6 @@ GATEWAY=172.19.3.254 +@@ -535,7 +535,6 @@ GATEWAY=172.19.3.254 HWADDR=fa:16:3e:ed:9a:59 IPADDR=172.19.1.34 NETMASK=255.255.252.0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -530,7 +529,6 @@ GATEWAY=172.19.3.254 - HWADDR=fa:16:3e:ed:9a:59 - IPADDR=172.19.1.34 - NETMASK=255.255.252.0 --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -600,7 +598,6 @@ IPADDR=172.19.1.34 - IPADDR1=10.0.0.10 - NETMASK=255.255.252.0 - NETMASK1=255.255.255.0 --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -636,7 +633,6 @@ IPADDR=172.19.1.34 + USERCTL=no +@@ -633,7 +632,6 @@ IPADDR=172.19.1.34 IPADDR1=10.0.0.10 NETMASK=255.255.252.0 NETMASK1=255.255.255.0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -731,7 +727,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64" + USERCTL=no +@@ -754,7 +752,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64" IPV6INIT=yes IPV6_DEFAULTGW=2001:DB8::1 NETMASK=255.255.252.0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -772,7 +767,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64" - IPV6INIT=yes - IPV6_DEFAULTGW=2001:DB8::1 - NETMASK=255.255.252.0 --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -889,7 +883,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -882,7 +879,6 @@ NETWORK_CONFIGS = { BOOTPROTO=none DEVICE=eth1 HWADDR=cf:d6:af:48:e8:80 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -907,7 +900,6 @@ NETWORK_CONFIGS = { + USERCTL=no"""), +@@ -899,7 +895,6 @@ NETWORK_CONFIGS = { IPADDR=192.168.21.3 NETMASK=255.255.255.0 METRIC=10000 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1022,7 +1014,6 @@ NETWORK_CONFIGS = { + USERCTL=no"""), +@@ -1028,7 +1023,6 @@ NETWORK_CONFIGS = { IPV6ADDR=2001:1::1/64 IPV6INIT=yes NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1062,7 +1053,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1091,7 +1085,6 @@ NETWORK_CONFIGS = { DHCPV6C=yes IPV6INIT=yes DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1111,7 +1101,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1146,7 +1139,6 @@ NETWORK_CONFIGS = { IPV6INIT=yes IPV6_FORCE_ACCEPT_RA=yes DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1160,7 +1149,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1201,7 +1193,6 @@ NETWORK_CONFIGS = { IPV6INIT=yes IPV6_FORCE_ACCEPT_RA=no DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1199,7 +1187,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1246,7 +1237,6 @@ NETWORK_CONFIGS = { IPV6_AUTOCONF=yes IPV6INIT=yes DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1240,7 +1227,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1293,7 +1283,6 @@ NETWORK_CONFIGS = { IPV6_AUTOCONF=yes IPV6INIT=yes DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1281,7 +1267,6 @@ NETWORK_CONFIGS = { + USERCTL=no +@@ -1340,7 +1329,6 @@ NETWORK_CONFIGS = { IPV6INIT=yes IPV6_FORCE_ACCEPT_RA=yes DEVICE=iface0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1491,7 +1476,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no +@@ -1622,7 +1610,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true DHCPV6C=yes IPV6INIT=yes MACADDR=aa:bb:cc:dd:ee:ff - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Bond -@@ -1500,7 +1484,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no"""), +@@ -1630,7 +1617,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true BOOTPROTO=dhcp DEVICE=bond0.200 DHCLIENT_SET_DEFAULT_ROUTE=no - NM_CONTROLLED=no ONBOOT=yes PHYSDEV=bond0 - STARTMODE=auto -@@ -1519,7 +1502,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + TYPE=Ethernet +@@ -1647,7 +1633,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true IPV6_DEFAULTGW=2001:4800:78ff:1b::1 MACADDR=bb:bb:bb:bb:bb:aa NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes PRIO=22 - STARTMODE=auto -@@ -1530,7 +1512,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + STP=no +@@ -1657,7 +1642,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true BOOTPROTO=none DEVICE=eth0 HWADDR=c0:d6:9f:2c:e8:80 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1548,7 +1529,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no"""), +@@ -1674,7 +1658,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true MTU=1500 NETMASK=255.255.255.0 NETMASK1=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes PHYSDEV=eth0 - STARTMODE=auto -@@ -1560,7 +1540,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + TYPE=Ethernet +@@ -1685,7 +1668,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true DEVICE=eth1 HWADDR=aa:d6:9f:2c:e8:80 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto SLAVE=yes -@@ -1571,7 +1550,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + TYPE=Ethernet +@@ -1695,7 +1677,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true DEVICE=eth2 HWADDR=c0:bb:9f:2c:e8:80 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto SLAVE=yes -@@ -1582,7 +1560,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + TYPE=Ethernet +@@ -1705,7 +1686,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true BRIDGE=br0 DEVICE=eth3 HWADDR=66:bb:9f:2c:e8:80 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1592,7 +1569,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no"""), +@@ -1714,7 +1694,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true BRIDGE=br0 DEVICE=eth4 HWADDR=98:bb:9f:2c:e8:80 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -1602,7 +1578,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no"""), +@@ -1723,7 +1702,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true DEVICE=eth5 DHCLIENT_SET_DEFAULT_ROUTE=no HWADDR=98:bb:9f:2c:e8:8a - NM_CONTROLLED=no ONBOOT=no - STARTMODE=manual TYPE=Ethernet -@@ -1614,7 +1589,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true + USERCTL=no"""), +@@ -1734,7 +1712,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true IPADDR=192.168.200.7 MTU=9000 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=InfiniBand -@@ -2027,7 +2001,6 @@ iface bond0 inet6 static - MTU=9000 - NETMASK=255.255.255.0 - NETMASK1=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Bond -@@ -2038,7 +2011,6 @@ iface bond0 inet6 static - DEVICE=bond0s0 - HWADDR=aa:bb:cc:dd:e8:00 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - STARTMODE=auto -@@ -2055,7 +2027,6 @@ iface bond0 inet6 static - DEVICE=bond0s1 - HWADDR=aa:bb:cc:dd:e8:01 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - STARTMODE=auto -@@ -2088,7 +2059,6 @@ iface bond0 inet6 static + USERCTL=no"""), +@@ -2177,7 +2154,6 @@ iface bond0 inet6 static MTU=9000 NETMASK=255.255.255.0 NETMASK1=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Bond -@@ -2099,7 +2069,6 @@ iface bond0 inet6 static + USERCTL=no +@@ -2187,7 +2163,6 @@ iface bond0 inet6 static DEVICE=bond0s0 HWADDR=aa:bb:cc:dd:e8:00 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes SLAVE=yes - STARTMODE=auto -@@ -2122,7 +2091,6 @@ iface bond0 inet6 static + TYPE=Ethernet +@@ -2209,7 +2184,6 @@ iface bond0 inet6 static DEVICE=bond0s1 HWADDR=aa:bb:cc:dd:e8:01 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes SLAVE=yes - STARTMODE=auto -@@ -2161,7 +2129,6 @@ iface bond0 inet6 static + TYPE=Ethernet +@@ -2266,7 +2240,6 @@ iface bond0 inet6 static BOOTPROTO=none DEVICE=en0 HWADDR=aa:bb:cc:dd:e8:00 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2180,7 +2147,6 @@ iface bond0 inet6 static + USERCTL=no"""), +@@ -2283,7 +2256,6 @@ iface bond0 inet6 static MTU=2222 NETMASK=255.255.255.0 NETMASK1=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes PHYSDEV=en0 - STARTMODE=auto -@@ -2222,7 +2188,6 @@ iface bond0 inet6 static + TYPE=Ethernet +@@ -2349,7 +2321,6 @@ iface bond0 inet6 static DEVICE=br0 IPADDR=192.168.2.2 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes PRIO=22 - STARTMODE=auto -@@ -2238,7 +2203,6 @@ iface bond0 inet6 static - IPADDR6=2001:1::100/96 + STP=no +@@ -2363,7 +2334,6 @@ iface bond0 inet6 static + HWADDR=52:54:00:12:34:00 IPV6ADDR=2001:1::100/96 IPV6INIT=yes - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2252,7 +2216,6 @@ iface bond0 inet6 static - IPADDR6=2001:1::101/96 + USERCTL=no +@@ -2375,7 +2345,6 @@ iface bond0 inet6 static + HWADDR=52:54:00:12:34:01 IPV6ADDR=2001:1::101/96 IPV6INIT=yes - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2327,7 +2290,6 @@ iface bond0 inet6 static + USERCTL=no +@@ -2469,7 +2438,6 @@ iface bond0 inet6 static HWADDR=52:54:00:12:34:00 IPADDR=192.168.1.2 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=no - STARTMODE=manual TYPE=Ethernet -@@ -2338,7 +2300,6 @@ iface bond0 inet6 static + USERCTL=no +@@ -2479,7 +2447,6 @@ iface bond0 inet6 static DEVICE=eth1 HWADDR=52:54:00:12:34:aa MTU=1480 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2348,7 +2309,6 @@ iface bond0 inet6 static + USERCTL=no +@@ -2488,7 +2455,6 @@ iface bond0 inet6 static BOOTPROTO=none DEVICE=eth2 HWADDR=52:54:00:12:34:ff - NM_CONTROLLED=no ONBOOT=no - STARTMODE=manual TYPE=Ethernet -@@ -2766,7 +2726,6 @@ class TestRhelSysConfigRendering(CiTestCase): + USERCTL=no +@@ -2905,7 +2871,6 @@ class TestRhelSysConfigRendering(CiTestCase): BOOTPROTO=dhcp DEVICE=eth1000 HWADDR=07-1c-c6-75-a4-be -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2888,7 +2847,6 @@ GATEWAY=10.0.2.2 + USERCTL=no +@@ -3026,7 +2991,6 @@ GATEWAY=10.0.2.2 HWADDR=52:54:00:12:34:00 IPADDR=10.0.2.15 NETMASK=255.255.255.0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2920,7 +2878,6 @@ HWADDR=fa:16:3e:25:b4:59 + USERCTL=no +@@ -3057,7 +3021,6 @@ HWADDR=fa:16:3e:25:b4:59 IPADDR=51.68.89.122 MTU=1500 NETMASK=255.255.240.0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2935,7 +2892,6 @@ DEVICE=eth1 + USERCTL=no +@@ -3071,7 +3034,6 @@ DEVICE=eth1 DHCLIENT_SET_DEFAULT_ROUTE=no HWADDR=fa:16:3e:b1:ca:29 MTU=9000 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -2961,7 +2917,6 @@ USERCTL=no + USERCTL=no +@@ -3096,7 +3058,6 @@ USERCTL=no # BOOTPROTO=dhcp DEVICE=eth0 -NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -3168,7 +3123,6 @@ USERCTL=no + USERCTL=no +@@ -3300,7 +3261,6 @@ USERCTL=no IPV6INIT=yes IPV6_DEFAULTGW=2001:db8::1 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -3194,7 +3148,6 @@ USERCTL=no + USERCTL=no +@@ -3325,7 +3285,6 @@ USERCTL=no 'ifcfg-eno1': textwrap.dedent("""\ BOOTPROTO=none DEVICE=eno1 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -3206,7 +3159,6 @@ USERCTL=no + USERCTL=no +@@ -3336,7 +3295,6 @@ USERCTL=no IPADDR=192.6.1.9 MTU=1495 NETMASK=255.255.255.0 - NM_CONTROLLED=no ONBOOT=yes PHYSDEV=eno1 - STARTMODE=auto -@@ -3238,7 +3190,6 @@ USERCTL=no + TYPE=Ethernet +@@ -3367,7 +3325,6 @@ USERCTL=no IPADDR=10.101.8.65 MTU=1334 NETMASK=255.255.255.192 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Bond -@@ -3249,7 +3200,6 @@ USERCTL=no + USERCTL=no +@@ -3377,7 +3334,6 @@ USERCTL=no BOOTPROTO=none DEVICE=enp0s0 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes SLAVE=yes - STARTMODE=auto -@@ -3261,7 +3211,6 @@ USERCTL=no + TYPE=Bond +@@ -3388,7 +3344,6 @@ USERCTL=no BOOTPROTO=none DEVICE=enp0s1 MASTER=bond0 - NM_CONTROLLED=no ONBOOT=yes SLAVE=yes - STARTMODE=auto -@@ -3286,7 +3235,6 @@ USERCTL=no + TYPE=Bond +@@ -3412,7 +3367,6 @@ USERCTL=no DEVICE=eno1 HWADDR=07-1c-c6-75-a4-be METRIC=100 - NM_CONTROLLED=no ONBOOT=yes - STARTMODE=auto TYPE=Ethernet -@@ -3386,7 +3334,6 @@ class TestOpenSuseSysConfigRendering(CiTestCase): - BOOTPROTO=dhcp - DEVICE=eth1000 - HWADDR=07-1c-c6-75-a4-be --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -3508,7 +3455,6 @@ GATEWAY=10.0.2.2 - HWADDR=52:54:00:12:34:00 - IPADDR=10.0.2.15 - NETMASK=255.255.255.0 --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet -@@ -3538,7 +3484,6 @@ USERCTL=no - # - BOOTPROTO=dhcp - DEVICE=eth0 --NM_CONTROLLED=no - ONBOOT=yes - STARTMODE=auto - TYPE=Ethernet + USERCTL=no -- 2.17.2 diff --git a/cloud-init-19.4.tar.gz b/cloud-init-19.4.tar.gz deleted file mode 100644 index 22d52ad6f2b2c9e93786af36d68ef55d4d5cb28d..0000000000000000000000000000000000000000 Binary files a/cloud-init-19.4.tar.gz and /dev/null differ diff --git a/cloud-init-20.3.tar.gz b/cloud-init-20.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0a4bc8414935129c4f853f0a491ee82182864761 Binary files /dev/null and b/cloud-init-20.3.tar.gz differ diff --git a/cloud-init.spec b/cloud-init.spec index 86c5944f7f487e6bf1c2468f48b85a2da33732aa..271cee947979e607ae8bc468664dbbcd65e7ba8c 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,5 +1,5 @@ Name: cloud-init -Version: 19.4 +Version: 20.3 Release: 1 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 @@ -120,6 +120,12 @@ fi %exclude /usr/share/doc/* %changelog +* Wed Nov 4 2020 yangzhuangzhuang - 20.3-1 +- Type:update +- ID:NA +- SUG:NA +- DESC:update to 20.3 + * Fri Jul 31 2020 Liquor - 19.4-1 - Type:update - ID:NA diff --git a/util-add-get_linux_distro-function-to-replace-platfo.patch b/util-add-get_linux_distro-function-to-replace-platfo.patch deleted file mode 100644 index 98d83cbba53459521c69e7aa3e2887d00ad6ae8c..0000000000000000000000000000000000000000 --- a/util-add-get_linux_distro-function-to-replace-platfo.patch +++ /dev/null @@ -1,79 +0,0 @@ -From c4b342ded57aa1ad0ff01b8df8ae6bc900f0c213 Mon Sep 17 00:00:00 2001 -From: openEuler BUildteam -Date: Tue, 23 Jun 2020 16:45:57 +0800 -Subject: [PATCH] util: add get_linux_distro function to replace platfom.dist - ---- - cloudinit/util.py | 39 ++++++++++++++++++++++++++++++++++++--- - 1 file changed, 36 insertions(+), 3 deletions(-) - -diff --git a/cloudinit/util.py b/cloudinit/util.py -index ac9ae81..ff28b61 100644 ---- a/cloudinit/util.py -+++ b/cloudinit/util.py -@@ -579,6 +579,39 @@ def get_cfg_option_int(yobj, key, default=0): - return int(get_cfg_option_str(yobj, key, default=default)) - - -+def get_linux_distro(): -+ distro_name = '' -+ distro_version = '' -+ if os.path.exists('/etc/os-release'): -+ os_release = load_file('/etc/os-release') -+ for line in os_release.splitlines(): -+ if line.strip().startswith('ID='): -+ distro_name = line.split('=')[-1] -+ distro_name = distro_name.replace('"', '') -+ if line.strip().startswith('VERSION_ID='): -+ # Lets hope for the best that distros stay consistent ;) -+ distro_version = line.split('=')[-1] -+ distro_version = distro_version.replace('"', '') -+ else: -+ dist = ('', '', '') -+ try: -+ # Will be removed in 3.7 -+ dist = platform.dist() # pylint: disable=W1505 -+ except Exception: -+ pass -+ finally: -+ found = None -+ for entry in dist: -+ if entry: -+ found = 1 -+ if not found: -+ LOG.warning('Unable to determine distribution, template ' -+ 'expansion may have unexpected results') -+ return dist -+ -+ return (distro_name, distro_version, platform.machine()) -+ -+ - def system_info(): - info = { - 'platform': platform.platform(), -@@ -586,19 +619,19 @@ def system_info(): - 'release': platform.release(), - 'python': platform.python_version(), - 'uname': platform.uname(), -- 'dist': platform.dist(), # pylint: disable=W1505 -+ 'dist': get_linux_distro() - } - system = info['system'].lower() - var = 'unknown' - if system == "linux": - linux_dist = info['dist'][0].lower() -- if linux_dist in ('centos', 'fedora', 'debian', 'openEuler'): -+ if linux_dist in ('centos', 'debian', 'fedora', 'rhel', 'suse', 'openEuler'): - var = linux_dist - elif linux_dist in ('ubuntu', 'linuxmint', 'mint'): - var = 'ubuntu' - elif linux_dist == 'redhat': - var = 'rhel' -- elif linux_dist == 'suse': -+ elif linux_dist in ('opensuse', 'sles'): - var = 'suse' - else: - var = 'linux' --- -1.8.3.1 -