Update to 23.2 rhbz#2196523

* Remove patches that now exist upstream
* Switch to rpmautospec
* Fix Python 3.12 build issues
* Remove NM/dhcpd hooks gone from upstream

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2023-06-22 09:53:17 -05:00
parent ade0931784
commit 1ddecd3a8b
No known key found for this signature in database
5 changed files with 5 additions and 738 deletions

View File

@ -1,162 +0,0 @@
From 9ab893043254e7c8fdc219579fbc958366d32ca8 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Tue, 14 Mar 2023 15:51:15 +0530
Subject: [PATCH 1/5] cc_ca_certs.py: store distro_cfg['ca_cert_config'] in a
variable
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
cloudinit/config/cc_ca_certs.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
index b1c4a2bf01..77375285b2 100644
--- a/cloudinit/config/cc_ca_certs.py
+++ b/cloudinit/config/cc_ca_certs.py
@@ -177,14 +177,20 @@ def disable_system_ca_certs(distro_cfg):
@param distro_cfg: A hash providing _distro_ca_certs_configs function.
"""
- if distro_cfg["ca_cert_config"] is None:
+
+ ca_cert_cfg_fn = distro_cfg["ca_cert_config"]
+
+ if ca_cert_cfg_fn is None:
return
+
header_comment = (
"# Modified by cloud-init to deselect certs due to user-data"
)
+
added_header = False
- if os.stat(distro_cfg["ca_cert_config"]).st_size != 0:
- orig = util.load_file(distro_cfg["ca_cert_config"])
+
+ if os.stat(ca_cert_cfg_fn).st_size != 0:
+ orig = util.load_file(ca_cert_cfg_fn)
out_lines = []
for line in orig.splitlines():
if line == header_comment:
@@ -198,7 +204,7 @@ def disable_system_ca_certs(distro_cfg):
added_header = True
out_lines.append("!" + line)
util.write_file(
- distro_cfg["ca_cert_config"], "\n".join(out_lines) + "\n", omode="wb"
+ ca_cert_cfg_fn, "\n".join(out_lines) + "\n", omode="wb"
)
From 4f999f14b112b2b57a4596acf4de080967bca73b Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Tue, 14 Mar 2023 15:52:40 +0530
Subject: [PATCH 2/5] cc_ca_certs.py: check for cert file existence before stat
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
cloudinit/config/cc_ca_certs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
index 77375285b2..bff27f4b45 100644
--- a/cloudinit/config/cc_ca_certs.py
+++ b/cloudinit/config/cc_ca_certs.py
@@ -180,7 +180,7 @@ def disable_system_ca_certs(distro_cfg):
ca_cert_cfg_fn = distro_cfg["ca_cert_config"]
- if ca_cert_cfg_fn is None:
+ if not ca_cert_cfg_fn or not os.path.exists(ca_cert_cfg_fn):
return
header_comment = (
From ea4b0042ea9bde41473e664b351d530e467c0a71 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Tue, 14 Mar 2023 15:55:50 +0530
Subject: [PATCH 3/5] cc_ca_certs.py: remove redundant check for zero
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
cloudinit/config/cc_ca_certs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
index bff27f4b45..2c0b1f335c 100644
--- a/cloudinit/config/cc_ca_certs.py
+++ b/cloudinit/config/cc_ca_certs.py
@@ -189,7 +189,7 @@ def disable_system_ca_certs(distro_cfg):
added_header = False
- if os.stat(ca_cert_cfg_fn).st_size != 0:
+ if os.stat(ca_cert_cfg_fn).st_size:
orig = util.load_file(ca_cert_cfg_fn)
out_lines = []
for line in orig.splitlines():
From 562222dc8c40b9d0a5d1e2c33dc5619f0f2e8c22 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Tue, 14 Mar 2023 15:56:38 +0530
Subject: [PATCH 4/5] cc_ca_certs.py: move util.write_file with if block
if cert file size if zero, out_lines won't get initialized
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
cloudinit/config/cc_ca_certs.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
index 2c0b1f335c..54153638e3 100644
--- a/cloudinit/config/cc_ca_certs.py
+++ b/cloudinit/config/cc_ca_certs.py
@@ -203,9 +203,10 @@ def disable_system_ca_certs(distro_cfg):
out_lines.append(header_comment)
added_header = True
out_lines.append("!" + line)
- util.write_file(
- ca_cert_cfg_fn, "\n".join(out_lines) + "\n", omode="wb"
- )
+
+ util.write_file(
+ ca_cert_cfg_fn, "\n".join(out_lines) + "\n", omode="wb"
+ )
def remove_default_ca_certs(distro_cfg):
From d31144ededa0dd829405f0a21e372d254b082050 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Tue, 14 Mar 2023 17:52:30 +0530
Subject: [PATCH 5/5] test_cc_ca_certs.py: add tests for non existent ca-cert
config
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
tests/unittests/config/test_cc_ca_certs.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/unittests/config/test_cc_ca_certs.py b/tests/unittests/config/test_cc_ca_certs.py
index adc3609a8e..07a2939523 100644
--- a/tests/unittests/config/test_cc_ca_certs.py
+++ b/tests/unittests/config/test_cc_ca_certs.py
@@ -367,6 +367,18 @@ def test_commands(self):
else:
assert mock_subp.call_count == 0
+ def test_non_existent_cert_cfg(self):
+ self.m_stat.return_value.st_size = 0
+
+ for distro_name in cc_ca_certs.distros:
+ conf = cc_ca_certs._distro_ca_certs_configs(distro_name)
+ with ExitStack() as mocks:
+ mocks.enter_context(
+ mock.patch.object(util, "delete_dir_contents")
+ )
+ mocks.enter_context(mock.patch.object(subp, "subp"))
+ cc_ca_certs.disable_default_ca_certs(distro_name, conf)
+
class TestCACertsSchema:
"""Directly test schema rather than through handle."""

View File

@ -1,63 +0,0 @@
From 7ea5446f0e46d0e7a8a6226cf1f5949b44f83d72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Wed, 22 Mar 2023 11:51:52 +0100
Subject: [PATCH] Fedora: Enable CA handling
Fedora wasn't previously supported for CA handling. Enabling this
allows the testsuite to pass when ran on a Fedora system. The conf
override is the same as for rhel.
---
cloudinit/config/cc_ca_certs.py | 9 ++++++++-
tests/unittests/config/test_cc_ca_certs.py | 2 ++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
index 169b0e18..599145c8 100644
--- a/cloudinit/config/cc_ca_certs.py
+++ b/cloudinit/config/cc_ca_certs.py
@@ -25,6 +25,13 @@ DEFAULT_CONFIG = {
"ca_cert_update_cmd": ["update-ca-certificates"],
}
DISTRO_OVERRIDES = {
+ "fedora": {
+ "ca_cert_path": "/etc/pki/ca-trust/",
+ "ca_cert_local_path": "/usr/share/pki/ca-trust-source/",
+ "ca_cert_filename": "anchors/cloud-init-ca-cert-{cert_index}.crt",
+ "ca_cert_config": None,
+ "ca_cert_update_cmd": ["update-ca-trust"],
+ },
"rhel": {
"ca_cert_path": "/etc/pki/ca-trust/",
"ca_cert_local_path": "/usr/share/pki/ca-trust-source/",
@@ -48,7 +55,7 @@ configuration option ``remove_defaults``.
Alpine Linux requires the ca-certificates package to be installed in
order to provide the ``update-ca-certificates`` command.
"""
-distros = ["alpine", "debian", "rhel", "ubuntu"]
+distros = ["alpine", "debian", "fedora", "rhel", "ubuntu"]
meta: MetaSchema = {
"id": "cc_ca_certs",
diff --git a/tests/unittests/config/test_cc_ca_certs.py b/tests/unittests/config/test_cc_ca_certs.py
index 19e5d422..6db17485 100644
--- a/tests/unittests/config/test_cc_ca_certs.py
+++ b/tests/unittests/config/test_cc_ca_certs.py
@@ -311,6 +311,7 @@ class TestRemoveDefaultCaCerts(TestCase):
"cloud_dir": tmpdir,
}
)
+ self.add_patch("cloudinit.config.cc_ca_certs.os.stat", "m_stat")
def test_commands(self):
ca_certs_content = "# line1\nline2\nline3\n"
@@ -318,6 +319,7 @@ class TestRemoveDefaultCaCerts(TestCase):
"# line1\n# Modified by cloud-init to deselect certs due to"
" user-data\n!line2\n!line3\n"
)
+ self.m_stat.return_value.st_size = 1
for distro_name in cc_ca_certs.distros:
conf = cc_ca_certs._distro_ca_certs_configs(distro_name)
--
2.39.2

View File

@ -5,8 +5,8 @@
%endif
Name: cloud-init
Version: 23.1.2
Release: 7%{?dist}
Version: 23.2
Release: %autorelease
Summary: Cloud instance init scripts
License: Apache-2.0 or GPL-3.0-only
URL: https://github.com/canonical/cloud-init
@ -14,20 +14,9 @@ URL: https://github.com/canonical/cloud-init
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: cloud-init-tmpfiles.conf
# https://github.com/canonical/cloud-init/pull/2073
Patch1: 2073.patch
# Cherry pick of https://github.com/canonical/cloud-init/pull/2086
# and part of https://github.com/canonical/cloud-init/pull/2036
Patch2: Fedora-Enable-CA-handling.patch
# Allow > 3 nameservers to be written to /etc/resolv.conf.
# https://github.com/canonical/cloud-init/pull/2152
# https://bugzilla.redhat.com/show_bug.cgi?id=2068529
Patch3: multiple-nameservers.patch
# Enabling dhcp6 on EC2 causes a broken IPv6 configuration.
# See RHBZ 2092459.
Patch4: Do-not-enable-dhcp6-on-EC2.patch
Patch0: Do-not-enable-dhcp6-on-EC2.patch
BuildArch: noarch
@ -155,8 +144,6 @@ python3 -m pytest tests/unittests
%config(noreplace) %{_sysconfdir}/cloud/templates/*
%dir %{_sysconfdir}/rsyslog.d
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
%{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager
%{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient
%{_udevrulesdir}/66-azure-ephemeral.rules
%{_unitdir}/cloud-config.service
%{_unitdir}/cloud-final.service
@ -179,422 +166,4 @@ python3 -m pytest tests/unittests
%changelog
* Tue May 16 2023 Major Hayden <major@redhat.com> - 23.1.2-7
- Migrate to pyproject-rpm-macros for build requirements
* Tue May 16 2023 Major Hayden <major@redhat.com> - 23.1.2-6
- Add patch to disable DHCPv6 on EC2 to fix BZ 2092459.
* Tue May 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 23.1.2-5
- Disable tests by default in RHEL builds
* Thu May 11 2023 Major Hayden <major@redhat.com> - 23.1.2-4
- Add patch to allow > 3 nameservers to be applied
* Sun Apr 30 2023 Neal Gompa <ngompa@fedoraproject.org> - 23.1.2-3
- Use the correct SourceURL format for the upstream sources
- Switch to SPDX identifiers for the license field
* Fri Apr 28 2023 Major Hayden <major@redhat.com> - 23.1.2-2
- Switch to GitHub source since upstream uses that officially now.
* Thu Apr 27 2023 Major Hayden <major@redhat.com> - 23.1.2-1
- Update to 23.1.2
- Includes fix for CVE-2023-1786
* Wed Mar 22 2023 Frantisek Zatloukal <fzatlouk@redhat.com> - 23.1.1-1
- Rebase to 23.1.1
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 22.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 22.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 22.2-3
- Rebuilt for Python 3.11
* Thu Jun 16 2022 Neal Gompa <ngompa@fedoraproject.org> - 22.2-2
- Add dhcp-client dependency for Azure and OCI network bootstrap
* Thu May 19 2022 Neal Gompa <ngompa@fedoraproject.org> - 22.2-1
- Rebase to 22.2
* Thu Mar 10 2022 Dusty Mabe <dusty@dustymabe.com> - 22.1-3
- Drop requirement on NetworkManager-config-server
* Tue Feb 22 2022 Neal Gompa <ngompa@fedoraproject.org> - 22.1-2
- Drop extra tests search in prep
* Tue Feb 22 2022 Neal Gompa <ngompa@fedoraproject.org> - 22.1-1
- Rebase to 22.1
- Backport cloud-init PR to add proper NetworkManager support [bz#2014701]
- Add patch to prefer NetworkManager [bz#2014701]
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 15 2021 Neal Gompa <ngompa@fedoraproject.org> - 21.3-4
- Add gdisk and openssl deps to fix UEFI / Azure initialization [bz#1974262]
* Wed Dec 15 2021 Neal Gompa <ngompa@fedoraproject.org> - 21.3-3
- Backport fix for tests running with new pyyaml
* Wed Sep 08 2021 Eduardo Otubo <otubo@redhat.com> - 21.3-2
- Adding man pages [bz#1952568]
* Thu Sep 02 2021 Eduardo Otubo <otubo@redhat.com> - 21.3-1
- Updated to 20.4 [bz#2000540]
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 16 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 20.4-6
- Fix collections import to work with Python 3.10
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 20.4-5
- Rebuilt for Python 3.10
* Mon Feb 08 2021 Eduardo Otubo <otubo@redhat.com> - 20.4-4
- Reverting commit b0e7381 [bz#1924588]
* Wed Feb 03 2021 Eduardo Otubo <otubo@redhat.com> - 20.4-3
- Adding requirement hostname to specfile [bz#1925118]
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Dec 03 2020 Eduardo Otubo <otubo@redhat.com> - 20.4-2
- Updated to 20.4 [bz#1902250]
* Mon Sep 07 2020 Eduardo Otubo <otubo@redhat.com> - 19.4-7
- Fix execution fail with backtrace
* Mon Sep 07 2020 Eduardo Otubo <otubo@redhat.com> - 19.4-6
- Adding missing patches to spec file
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 19.4-4
- Rebuilt for Python 3.9
* Tue Apr 14 2020 Eduardo Otubo <otubo@redhat.com> - 19.4-3
- Fix BZ#1798729 - CVE-2020-8632 cloud-init: Too short random password length
in cc_set_password in config/cc_set_passwords.py
- Fix BZ#1798732 - CVE-2020-8631 cloud-init: Use of random.choice when
generating random password
* Sun Feb 23 2020 Dusty Mabe <dusty@dustymabe.com> - 19.4-2
- Fix sed substitutions for unittest2 and assertItemsEqual
- Fix failing unittests by including `BuildRequires: passwd`
- The unittests started failing because of upstream commit
7c07af2 where cloud-init can now support using `usermod` to
lock an account if `passwd` isn't installed. Since `passwd`
wasn't installed in our mock buildroot it was choosing to
use `usermod` and the unittests were failing. See:
https://github.com/canonical/cloud-init/commit/7c07af2
- Add missing files to package
- /usr/bin/cloud-id
- /usr/share/bash-completion/completions/cloud-init
* Fri Feb 14 2020 Eduardo Otubo <otubo@redhat.com> - 19.4-1
- Updated to 19.4
- Rebasing the Fedora specific patches but removing patches that don't apply anymore
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Nov 08 2019 Miro Hrončok <mhroncok@redhat.com> - 17.1-14
- Drop unneeded build dependency on python3-unittest2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 17.1-13
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 17.1-12
- Rebuilt for Python 3.8
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Apr 23 2019 Björn Esser <besser82@fedoraproject.org> - 17.1-10
- Add patch to replace platform.dist() [RH:1695953]
- Add (Build)Requires: python3-distro
* Tue Apr 23 2019 Björn Esser <besser82@fedoraproject.org> - 17.1-9
- Fix %%systemd_postun macro [RH:1695953]
- Add patch to fix failing test for EPOCHREALTIME bash env [RH:1695953]
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 17.1-6
- Rebuilt for Python 3.7
* Sat Apr 21 2018 Lars Kellogg-Stedman <lars@redhat.com> - 17.1-5
- Enable dhcp on EC2 interfaces with only local ipv4 addresses [RH:1569321]
(cherry pick upstream commit eb292c1)
* Mon Mar 26 2018 Patrick Uiterwijk <puiterwijk@redhat.com> - 17.1-4
- Make sure the patch does not add infinitely many entries
* Mon Mar 26 2018 Patrick Uiterwijk <puiterwijk@redhat.com> - 17.1-3
- Add patch to retain old values of /etc/sysconfig/network
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Oct 4 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 17.1-1
- Updated to 17.1
* Fri Sep 15 2017 Dusty Mabe <dusty@dustymabe.com> - 0.7.9-9
- Fix issues with growing xfs filesystems [RH:1490505]
- Add in hook-dhclient to help enable azure [RH:1477333]
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jun 27 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-7
- Fixed broken sysconfig file writing on DigitalOcean [RH:1465440]
* Wed Jun 21 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-6
- Fixed NameError in package module [RH:1447708]
- Resolved a conflict between cloud-init and NetworkManager writing resolv.conf [RH:1454491 RH:1461959 LP:1693251]
- Fixed broken fs_setup cmd option [LP:1687712]
* Fri Apr 14 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-5
- Made DigitalOcean DNS server handling consistent with OpenStack [RH:1442463, LP:1675571]
- Improved handling of multiple NICs on DigitalOcean [RH:1442463]
- Assign link-local IPV4 addresses in DigitalOcean based on interface indexes [RH:1442463]
* Tue Mar 14 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-4
- Fixed systemd dependency cycle with cloud-final and os-collect-config [RH:1420946, RH:1428492]
- Fixed systemd dependency cycle with cloud-init and multi-user.target [RH:1428492, RH:1430511]
- Fixed errors in network sysconfig handling [RH:1389530, LP:1665441]
- Made > 3 name servers a warning, not a fatal error, unbreaking IPv6 setups [LP:1670052]
- Fixed IPv6 gateways in network sysconfig [LP:1669504]
- Ordered cloud-init.service after network.service and NetworkManager.service [RH:1400249]
* Tue Mar 14 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-6
- Ordered cloud-init.service after network.service and NetworkManager.service [RH:1400249]
- Stopped caching IAM instance profile credentials on disk [LP:1638312]
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 27 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-2
- Fixed hostnamectl running before dbus is up [RH:1417025]
* Fri Jan 27 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-5
- Re-applied rsyslog configuration fixes
- Disabled GCE tests broken by python-httpretty-0.8.14-1.20161011git70af1f8
- Fixed systemd dependency loop for cloud-init.target [RH:1393094]
* Fri Jan 20 2017 Colin Walters <walters@verbum.org> - 0.7.9-1
- New upstream version [RH:1393094]
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.7.8-4
- Rebuild for Python 3.6
* Tue Oct 25 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-3
- Enabled the DigitalOcean metadata provider by default [RH:1388568]
* Fri Oct 14 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-2
- Stopped writing NM_CONTROLLED=no to interface config files [RH:1385172]
* Thu Sep 29 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-1
- Updated to 0.7.8
- Dropped run-parts dependency [RH:1355917]
- Ordered cloud-init-local before NetworkManager
- Backported DigitalOcean network configuration support [RH:1380489]
- Added xfsprogs dependency for Fedora Server's default filesystem
* Tue Aug 30 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.7-1
- Updated to 0.7.7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-10.20160622bzr1245
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Jul 6 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-20160622bzr1245
- Updated to bzr snapshot 1245
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-8.20150813bzr1137
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-7.20150813bzr1137
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Aug 13 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-6.20150813bzr1137
- Updated to bzr snapshot 1137
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-5.20140218bzr1060
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Feb 21 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-4.20140218bzr1060
- Updated to bzr snapshot 1060 for python 3 support
- Switched to python 3 [RH:1024357]
- Added %%check
- Dropped dmidecode dependency, switched back to noarch
* Thu Feb 19 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-3
- Stopped depending on git to build
- Stopped implicitly listing doc files twice
- Added recognition of 3 ecdsa-sha2-nistp* ssh key types [RH:1151824]
- Fixed handling of user group lists that contain spaces [RH:1126365 LP:1354694]
- Changed network.target systemd deps to network-online.target [RH:1110731 RH:1112817 RH:1147613]
- Fixed race condition between cloud-init.service and the login prompt
- Stopped enabling services in %%post (now done by kickstart) [RH:850058]
- Switched to dnf instead of yum when available [RH:1194451]
* Fri Nov 14 2014 Colin Walters <walters@redhat.com> - 0.7.6-2
- New upstream version [RH:974327]
- Drop python-cheetah dependency (same as above bug)
* Fri Nov 7 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-8
- Dropped python-boto dependency [RH:1161257]
- Dropped rsyslog dependency [RH:986511]
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jun 12 2014 Dennis Gilmore <dennis@ausil.us> - 0.7.5-6
- fix typo in settings.py preventing metadata being fecthed in ec2
* Mon Jun 9 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-5
- Stopped calling ``udevadm settle'' with --quiet since systemd 213 removed it
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Jun 2 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-3
- Make dmidecode dependency arch-dependent [RH:1025071 RH:1067089]
* Mon Jun 2 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-9
- Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250]
- Add tmpfiles.d configuration for /run/cloud-init [RH:1103761]
- Use the license rpm macro
- BuildRequire python-setuptools, not python-setuptools-devel
* Fri May 30 2014 Matthew Miller <mattdm@fedoraproject.org> - 0.7.5-2
- add missing python-jsonpatch dependency [RH:1103281]
* Tue Apr 29 2014 Sam Kottler <skottler@fedoraproject.org> - 0.7.5-1
- Update to 0.7.5 and remove patches which landed in the release
* Sat Jan 25 2014 Sam Kottler <skottler@fedoraproject.org> - 0.7.2-8
- Remove patch to the Puppet service unit nane [RH:1057860]
* Tue Sep 24 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-7
- Dropped xfsprogs dependency [RH:974329]
* Tue Sep 24 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-6
- Added yum-add-repo module
* Fri Sep 20 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-5
- Fixed puppet agent service name [RH:1008250]
- Let systemd handle console output [RH:977952 LP:1228434]
- Fixed restorecon failure when selinux is disabled [RH:967002 LP:1228441]
- Fixed rsyslog log filtering
- Added missing modules [RH:966888]
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Jun 15 2013 Matthew Miller <mattdm@fedoraproject.org> - 0.7.2-3
- switch ec2-user to "fedora" -- see bugzilla #971439. To use another
name, use #cloud-config option "users:" in userdata in cloud metadata
service
- add that user to systemd-journal group
* Fri May 17 2013 Steven Hardy <shardy@redhat.com> - 0.7.2
- Update to the 0.7.2 release
* Thu May 02 2013 Steven Hardy <shardy@redhat.com> - 0.7.2-0.1.bzr809
- Rebased against upstream rev 809, fixes several F18 related issues
- Added dependency on python-requests
* Sat Apr 6 2013 Orion Poplawski <orion@cora.nwra.com> - 0.7.1-4
- Don't ship tests
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Dec 13 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.1-2
- Added default_user to cloud.cfg (this is required for ssh keys to work)
* Wed Nov 21 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.1-1
- Rebased against version 0.7.1
- Fixed broken sudoers file generation
- Fixed "resize_root: noblock" [LP:1080985]
* Tue Oct 9 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-1
- Rebased against version 0.7.0
- Fixed / filesystem resizing
* Sat Sep 22 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.3.bzr659
- Added dmidecode dependency for DataSourceAltCloud
* Sat Sep 22 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.2.bzr659
- Rebased against upstream rev 659
- Fixed hostname persistence
- Fixed ssh key printing
- Fixed sudoers file permissions
* Mon Sep 17 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.1.bzr650
- Rebased against upstream rev 650
- Added support for useradd --selinux-user
* Thu Sep 13 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.3-0.5.bzr532
- Use a FQDN (instance-data.) for instance data URL fallback [RH:850916 LP:1040200]
- Shut off systemd timeouts [RH:836269]
- Send output to the console [RH:854654]
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-0.4.bzr532
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Jun 27 2012 Pádraig Brady <P@draigBrady.com> - 0.6.3-0.3.bzr532
- Add support for installing yum packages
* Sat Mar 31 2012 Andy Grimm <agrimm@gmail.com> - 0.6.3-0.2.bzr532
- Fixed incorrect interpretation of relative path for
AuthorizedKeysFile (BZ #735521)
* Mon Mar 5 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.3-0.1.bzr532
- Rebased against upstream rev 532
- Fixed runparts() incompatibility with Fedora
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-0.8.bzr457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Oct 5 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.7.bzr457
- Disabled SSH key-deleting on startup
* Wed Sep 28 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.6.bzr457
- Consolidated selinux file context patches
- Fixed cloud-init.service dependencies
- Updated sshkeytypes patch
- Dealt with differences from Ubuntu's sshd
* Sat Sep 24 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.5.bzr457
- Rebased against upstream rev 457
- Added missing dependencies
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.4.bzr450
- Added more macros to the spec file
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.3.bzr450
- Fixed logfile permission checking
- Fixed SSH key generation
- Fixed a bad method call in FQDN-guessing [LP:857891]
- Updated localefile patch
- Disabled the grub_dpkg module
- Fixed failures due to empty script dirs [LP:857926]
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.2.bzr450
- Updated tzsysconfig patch
* Wed Sep 21 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.1.bzr450
- Initial packaging
%autochangelog

View File

@ -1,77 +0,0 @@
From 0dfe06ba4642fbf64c04b6a4e11400a94eb27a9f Mon Sep 17 00:00:00 2001
From: Major Hayden <major@mhtx.net>
Date: Tue, 9 May 2023 16:27:36 -0500
Subject: [PATCH] resolv_conf: Allow > 3 nameservers (#2152)
Systems running systemd-resolved or dnsmasq can utlize more than three
namervers. Older systems will just use the first three and ignore the
rest.
Signed-off-by: Major Hayden <major@redhat.com>
---
cloudinit/distros/parsers/resolv_conf.py | 8 --------
tests/unittests/distros/test_resolv.py | 12 +++++++++---
tools/.github-cla-signers | 1 +
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/cloudinit/distros/parsers/resolv_conf.py b/cloudinit/distros/parsers/resolv_conf.py
index d31ffeb114..0d8dc83f5f 100644
--- a/cloudinit/distros/parsers/resolv_conf.py
+++ b/cloudinit/distros/parsers/resolv_conf.py
@@ -87,14 +87,6 @@ def add_nameserver(self, ns):
new_ns = util.uniq_list(new_ns)
if len(new_ns) == len(current_ns):
return current_ns
- if len(current_ns) >= 3:
- LOG.warning(
- "ignoring nameserver %r: adding would "
- "exceed the maximum of "
- "'3' name servers (see resolv.conf(5))",
- ns,
- )
- return current_ns[:3]
self._remove_option("nameserver")
for n in new_ns:
self._contents.append(("option", ["nameserver", n, ""]))
diff --git a/tests/unittests/distros/test_resolv.py b/tests/unittests/distros/test_resolv.py
index 65e7810116..363fd31db3 100644
--- a/tests/unittests/distros/test_resolv.py
+++ b/tests/unittests/distros/test_resolv.py
@@ -30,16 +30,22 @@ def test_local_domain(self):
def test_nameservers(self):
rp = resolv_conf.ResolvConf(BASE_RESOLVE)
+
+ # Start with two nameservers that already appear in the configuration.
self.assertIn("10.15.44.14", rp.nameservers)
self.assertIn("10.15.30.92", rp.nameservers)
+
+ # Add a third nameserver and verify it appears in the resolv.conf.
rp.add_nameserver("10.2")
self.assertIn("10.2", rp.nameservers)
self.assertIn("nameserver 10.2", str(rp))
- self.assertNotIn("10.3", rp.nameservers)
self.assertEqual(len(rp.nameservers), 3)
- rp.add_nameserver("10.2")
+
+ # Add a fourth nameserver and verify it appears in the resolv.conf.
rp.add_nameserver("10.3")
- self.assertNotIn("10.3", rp.nameservers)
+ self.assertIn("10.3", rp.nameservers)
+ self.assertIn("nameserver 10.3", str(rp))
+ self.assertEqual(len(rp.nameservers), 4)
def test_search_domains(self):
rp = resolv_conf.ResolvConf(BASE_RESOLVE)
diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers
index 7615f0fbf4..a3d692b634 100644
--- a/tools/.github-cla-signers
+++ b/tools/.github-cla-signers
@@ -82,6 +82,7 @@ lucasmoura
lucendio
lungj
magnetikonline
+major
mal
mamercad
ManassehZhou

View File

@ -1 +1 @@
SHA512 (cloud-init-23.1.2.tar.gz) = d4a37a2b7d47101cc8c71a9148385dfe7c4e4a2666980548138a58f5fe6cfe3689a1616ec2d3a5ca198a96d8925be04e5e195799b47bb5d21852d3c188a747b8
SHA512 (cloud-init-23.2.tar.gz) = 8b46cbbfcc80d5f7731941f4382826b41b1cc4961e6e7044b0dd8668fba232a0be6d3b402ec010154318801f6466b0fc268dd74e02e4bc1dc54a92203d1f4793