diff options
author | James Falcon <james.falcon@canonical.com> | 2023-03-27 10:16:58 -0500 |
---|---|---|
committer | James Falcon <james.falcon@canonical.com> | 2023-03-27 10:20:11 -0500 |
commit | d6e0c0bda748daa16d9cd036e4234da6cc3214ee (patch) | |
tree | b8f2d8e47c2295a8d7c27bcfab117588e8277dc7 | |
parent | 9fed3b4fbf1da6640a8112838892b25fb5600293 (diff) | |
download | cloud-init-git-d6e0c0bda748daa16d9cd036e4234da6cc3214ee.tar.gz |
Refresh patches against main:
- d/p/ec2-dont-apply-full-imds-network-config.patch
- d/p/expire-on-hashed-users.patch
- d/p/openstack-no-network-patch.patch
- d/p/netplan99-cannot-use-default.patch
- d/p/retain-netplan-world-readable.patch
5 files changed, 25 insertions, 31 deletions
diff --git a/debian/patches/ec2-dont-apply-full-imds-network-config.patch b/debian/patches/ec2-dont-apply-full-imds-network-config.patch index 14886322..5eb230e5 100644 --- a/debian/patches/ec2-dont-apply-full-imds-network-config.patch +++ b/debian/patches/ec2-dont-apply-full-imds-network-config.patch @@ -9,7 +9,7 @@ Forwarded: not-needed Last-Update: 2020-06-01 --- a/cloudinit/sources/DataSourceEc2.py +++ b/cloudinit/sources/DataSourceEc2.py -@@ -506,12 +506,12 @@ class DataSourceEc2(sources.DataSource): +@@ -505,12 +505,12 @@ class DataSourceEc2(sources.DataSource): if isinstance(net_md, dict): # SRU_BLOCKER: xenial, bionic and eoan should default # apply_full_imds_network_config to False to retain original diff --git a/debian/patches/expire-on-hashed-users.patch b/debian/patches/expire-on-hashed-users.patch index 6c414c63..c54eb7e1 100644 --- a/debian/patches/expire-on-hashed-users.patch +++ b/debian/patches/expire-on-hashed-users.patch @@ -18,7 +18,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ in cc_set_passwords, hashed passwords will be expired. Previous to 22.3, --- a/tests/unittests/config/test_cc_set_passwords.py +++ b/tests/unittests/config/test_cc_set_passwords.py -@@ -192,61 +192,6 @@ class TestSetPasswordsHandle: +@@ -191,61 +191,6 @@ class TestSetPasswordsHandle: @pytest.mark.parametrize( "user_cfg", [ @@ -58,7 +58,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ - with mock.patch.object( - cloud.distro, "uses_systemd", return_value=False - ): -- setpass.handle("IGNORED", cfg=cfg, cloud=cloud, log=LOG, args=[]) +- setpass.handle("IGNORED", cfg=cfg, cloud=cloud, args=[]) - assert [ - mock.call( - ["pw", "usermod", "ubuntu", "-h", "0"], @@ -80,7 +80,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ {"expire": "false", "list": ["root:R", "ubuntu:RANDOM"]}, { "expire": "false", -@@ -506,6 +451,7 @@ expire_cases = [ +@@ -505,6 +450,7 @@ expire_cases = [ class TestExpire: @pytest.mark.parametrize("cfg", expire_cases) def test_expire(self, cfg, mocker, caplog): diff --git a/debian/patches/netplan99-cannot-use-default.patch b/debian/patches/netplan99-cannot-use-default.patch index c164cccf..5d3bf9b1 100644 --- a/debian/patches/netplan99-cannot-use-default.patch +++ b/debian/patches/netplan99-cannot-use-default.patch @@ -8,10 +8,8 @@ Forwarded: not-needed Last-Update: 2023-02-27 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: b/cloudinit/net/netplan.py -=================================================================== ---- a/cloudinit/net/netplan.py 2023-02-27 20:40:42.534650863 +0100 -+++ b/cloudinit/net/netplan.py 2023-02-27 20:40:42.514650609 +0100 +--- a/cloudinit/net/netplan.py ++++ b/cloudinit/net/netplan.py @@ -119,7 +119,7 @@ def _extract_addresses(config: dict, ent if subnet.get("gateway"): new_route = { @@ -21,10 +19,8 @@ Index: b/cloudinit/net/netplan.py } try: subnet_gateway = ipaddress.ip_address(subnet["gateway"]) -Index: b/tests/unittests/test_net.py -=================================================================== ---- a/tests/unittests/test_net.py 2023-02-27 20:40:42.534650863 +0100 -+++ b/tests/unittests/test_net.py 2023-02-27 20:40:42.522650711 +0100 +--- a/tests/unittests/test_net.py ++++ b/tests/unittests/test_net.py @@ -403,7 +403,7 @@ network: transmit-hash-policy: layer3+4 up-delay: 0 @@ -52,7 +48,7 @@ Index: b/tests/unittests/test_net.py via: 192.168.0.1 - to: 10.1.3.0/24 via: 192.168.0.3 -@@ -6047,9 +6047,9 @@ class TestNetplanNetRendering: +@@ -6048,9 +6048,9 @@ class TestNetplanNetRendering: macaddress: 00:11:22:33:44:55 set-name: interface0 routes: @@ -64,7 +60,7 @@ Index: b/tests/unittests/test_net.py via: 11.0.0.1 """, id="physical_gateway46", -@@ -6086,9 +6086,9 @@ class TestNetplanNetRendering: +@@ -6087,9 +6087,9 @@ class TestNetplanNetRendering: - eth0 - eth1 routes: @@ -76,7 +72,7 @@ Index: b/tests/unittests/test_net.py via: 11.0.0.1 eth0: {} eth1: {} -@@ -6125,9 +6125,9 @@ class TestNetplanNetRendering: +@@ -6126,9 +6126,9 @@ class TestNetplanNetRendering: interfaces: - eth0 routes: @@ -88,7 +84,7 @@ Index: b/tests/unittests/test_net.py via: 11.0.0.1 """, id="bridge_gateway46", -@@ -6161,9 +6161,9 @@ class TestNetplanNetRendering: +@@ -6162,9 +6162,9 @@ class TestNetplanNetRendering: id: 101 link: eth0 routes: @@ -100,7 +96,7 @@ Index: b/tests/unittests/test_net.py via: 11.0.0.1 """, id="vlan_gateway46", -@@ -6212,7 +6212,7 @@ class TestNetplanNetRendering: +@@ -6213,7 +6213,7 @@ class TestNetplanNetRendering: - exemplary set-name: interface0 routes: @@ -109,7 +105,7 @@ Index: b/tests/unittests/test_net.py via: 192.168.23.1 """, id="nameserver_gateway4", -@@ -6247,7 +6247,7 @@ class TestNetplanNetRendering: +@@ -6248,7 +6248,7 @@ class TestNetplanNetRendering: match: macaddress: 00:11:22:33:44:55 routes: @@ -118,7 +114,7 @@ Index: b/tests/unittests/test_net.py via: 192.168.23.1 - to: 10.176.0.0/24 via: 10.184.225.121 -@@ -6282,7 +6282,7 @@ class TestNetplanNetRendering: +@@ -6283,7 +6283,7 @@ class TestNetplanNetRendering: match: macaddress: 00:11:22:33:44:55 routes: @@ -127,7 +123,7 @@ Index: b/tests/unittests/test_net.py via: 192.168.23.1 - to: 192.167.225.122/24 via: 192.168.23.1 -@@ -6318,10 +6318,10 @@ class TestNetplanNetRendering: +@@ -6319,10 +6319,10 @@ class TestNetplanNetRendering: match: macaddress: 00:11:22:33:44:55 routes: @@ -140,10 +136,8 @@ Index: b/tests/unittests/test_net.py via: 2001:ffff::1 on-link: true set-name: interface0 -Index: b/tests/unittests/distros/test_netconfig.py -=================================================================== ---- a/tests/unittests/distros/test_netconfig.py 2023-02-27 20:40:42.534650863 +0100 -+++ b/tests/unittests/distros/test_netconfig.py 2023-02-27 20:40:42.522650711 +0100 +--- a/tests/unittests/distros/test_netconfig.py ++++ b/tests/unittests/distros/test_netconfig.py @@ -199,7 +199,7 @@ network: addresses: - 192.168.1.5/24 @@ -162,7 +156,7 @@ Index: b/tests/unittests/distros/test_netconfig.py via: 2607:f0d0:1002:0011::1 eth1: dhcp4: true -@@ -1057,7 +1057,7 @@ class TestNetCfgDistroArch(TestNetCfgDis +@@ -1073,7 +1073,7 @@ class TestNetCfgDistroArch(TestNetCfgDis addresses: - 192.168.1.5/24 routes: diff --git a/debian/patches/openstack-no-network-config.patch b/debian/patches/openstack-no-network-config.patch index 52cd1d87..fa29c9b0 100644 --- a/debian/patches/openstack-no-network-config.patch +++ b/debian/patches/openstack-no-network-config.patch @@ -15,7 +15,7 @@ Author: Chad Smith <chad.smith@canonical.com> --- a/cloudinit/sources/DataSourceOpenStack.py +++ b/cloudinit/sources/DataSourceOpenStack.py -@@ -131,10 +131,11 @@ class DataSourceOpenStack(openstack.Sour +@@ -124,10 +124,11 @@ class DataSourceOpenStack(openstack.Sour if self._network_config != sources.UNSET: return self._network_config @@ -31,7 +31,7 @@ Author: Chad Smith <chad.smith@canonical.com> if self.network_json == sources.UNSET: --- a/tests/unittests/sources/test_openstack.py +++ b/tests/unittests/sources/test_openstack.py -@@ -423,7 +423,6 @@ class TestOpenStackDataSource(test_helpe +@@ -424,7 +424,6 @@ class TestOpenStackDataSource(test_helpe ds_os = ds.DataSourceOpenStack( settings.CFG_BUILTIN, None, helpers.Paths({"run_dir": self.tmp}) ) @@ -39,7 +39,7 @@ Author: Chad Smith <chad.smith@canonical.com> sample_json = { "links": [{"ethernet_mac_address": "mymac"}], "networks": [], -@@ -447,6 +446,7 @@ class TestOpenStackDataSource(test_helpe +@@ -448,6 +447,7 @@ class TestOpenStackDataSource(test_helpe "services": [], } ds_os.network_json = sample_json diff --git a/debian/patches/retain-netplan-world-readable.patch b/debian/patches/retain-netplan-world-readable.patch index 5195ccbf..0d9f6336 100644 --- a/debian/patches/retain-netplan-world-readable.patch +++ b/debian/patches/retain-netplan-world-readable.patch @@ -20,7 +20,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ be written as a single root readon-only file /etc/netplan/50-cloud-init.yaml. --- a/tests/unittests/distros/test_netconfig.py +++ b/tests/unittests/distros/test_netconfig.py -@@ -592,32 +592,41 @@ class TestNetCfgDistroUbuntuNetplan(Test +@@ -608,32 +608,41 @@ class TestNetCfgDistroUbuntuNetplan(Test (self.netplan_path(), V1_TO_V2_NET_CFG_OUTPUT, 0o600), ) @@ -77,7 +77,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ def test_apply_network_config_v2_passthrough_retain_orig_perms(self): """Custom permissions on existing netplan is kept when more strict.""" -@@ -657,11 +666,14 @@ class TestNetCfgDistroUbuntuNetplan(Test +@@ -673,11 +682,14 @@ class TestNetCfgDistroUbuntuNetplan(Test expected_cfgs = ( (self.netplan_path(), V2_PASSTHROUGH_NET_CFG_OUTPUT, 0o600), ) @@ -97,7 +97,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ self.assertIn("Passthrough netplan v2 config", self.logs.getvalue()) self.assertIn( "Selected renderer 'netplan' from priority list: ['netplan']", -@@ -1056,12 +1068,16 @@ class TestNetCfgDistroArch(TestNetCfgDis +@@ -1072,12 +1084,16 @@ class TestNetCfgDistroArch(TestNetCfgDis with mock.patch( "cloudinit.net.netplan.get_devicelist", return_value=[] ): |