From e0a3626f42698271d979a65d990d2408c1740ccfda2f682b7f46e4ad094093ed Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 10 Nov 2020 11:41:01 +0000 Subject: [PATCH 1/5] - Update cloud-init-write-routes.patch (bsc#1177526) + Fix missing default route when dual stack network setup is used. Once a default route was configured for Ipv6 or IPv4 the default route configuration for the othre protocol was skipped. OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=175 --- cloud-init-write-routes.patch | 11 +++++++++-- cloud-init.changes | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cloud-init-write-routes.patch b/cloud-init-write-routes.patch index 2e99247..ddae779 100644 --- a/cloud-init-write-routes.patch +++ b/cloud-init-write-routes.patch @@ -10,7 +10,7 @@ Index: cloudinit/distros/opensuse.py from cloudinit import helpers from cloudinit import log as logging -@@ -174,7 +175,140 @@ class Distro(distros.Distro): +@@ -174,7 +175,147 @@ class Distro(distros.Distro): util.write_file(out_fn, str(conf), 0o644) def _write_network_config(self, netconfig): @@ -34,6 +34,7 @@ Index: cloudinit/distros/opensuse.py + subnets = config.get('subnets', []) + config_routes = '' + has_default_route = False ++ seen_default_gateway = None + for subnet in subnets: + # Render the default gateway if it is present + gateway = subnet.get('gateway') @@ -42,6 +43,8 @@ Index: cloudinit/distros/opensuse.py + ['default', gateway, '-', '-\n'] + ) + has_default_route = True ++ if not seen_default_gateway: ++ seen_default_gateway = gateway + # Render subnet routes + routes = subnet.get('routes', []) + for route in routes: @@ -58,7 +61,11 @@ Index: cloudinit/distros/opensuse.py + 'Skipping route; has no prefix "%s"', dest + ) + continue -+ if dest == 'default' and has_default_route: ++ if ( ++ dest == 'default' and ++ has_default_route and ++ gateway == seen_default_gateway ++ ): + dest_info = dest + if gateway: + dest_info = ' '.join([dest, gateway, '-', '-']) diff --git a/cloud-init.changes b/cloud-init.changes index 074c3ea..1475b0d 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Nov 10 11:39:09 UTC 2020 - Robert Schweikert + +- Update cloud-init-write-routes.patch (bsc#1177526) + + Fix missing default route when dual stack network setup is used. Once + a default route was configured for Ipv6 or IPv4 the default route + configuration for the othre protocol was skipped. + ------------------------------------------------------------------- Sat Oct 17 10:25:30 UTC 2020 - Robert Schweikert From 1bec23819bcc038236bbc1fac51f434d9c1e199b2ea8d8984f5177df63216637 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Fri, 13 Nov 2020 19:44:44 +0000 Subject: [PATCH 2/5] - Patch the full package version into the cloud-init version file OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=176 --- cloud-init.changes | 5 +++++ cloud-init.spec | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cloud-init.changes b/cloud-init.changes index 1475b0d..1fd569c 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 13 19:44:11 UTC 2020 - Robert Schweikert + +- Patch the full package version into the cloud-init version file + ------------------------------------------------------------------- Tue Nov 10 11:39:09 UTC 2020 - Robert Schweikert diff --git a/cloud-init.spec b/cloud-init.spec index a0acecd..e04afe9 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -134,6 +134,11 @@ Documentation and examples for cloud-init tools %patch57 %patch58 -p1 %patch59 +# patch in the full version to version.py +version_pys=$(find . -name version.py -type f) +[ -n "$version_pys" ] || + { echo "failed to find 'version.py' to patch with version." 1>&2; exit 1; } +sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," $version_pys %build python3 setup.py build From 869be1f2bffd15f12c7ae9dd0c0d19771e3aaef79c7db2a32d01489635dad218 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 24 Nov 2020 12:48:54 +0000 Subject: [PATCH 3/5] - Add cloud-init-azure-def-usr-pass.patch (bsc#1179150, bsc#1179151) + Properly set the password for the default user in all circumstances OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=177 --- cloud-init-azure-def-usr-pass.patch | 11 +++++++++++ cloud-init.changes | 6 ++++++ cloud-init.spec | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 cloud-init-azure-def-usr-pass.patch diff --git a/cloud-init-azure-def-usr-pass.patch b/cloud-init-azure-def-usr-pass.patch new file mode 100644 index 0000000..fee54f8 --- /dev/null +++ b/cloud-init-azure-def-usr-pass.patch @@ -0,0 +1,11 @@ +--- cloudinit/sources/DataSourceAzure.py.orig ++++ cloudinit/sources/DataSourceAzure.py +@@ -1206,7 +1206,7 @@ def read_azure_ovf(contents): + if password: + defuser['lock_passwd'] = False + if DEF_PASSWD_REDACTION != password: +- defuser['passwd'] = encrypt_pass(password) ++ defuser['passwd'] = cfg['password'] = encrypt_pass(password) + + if defuser: + cfg['system_info'] = {'default_user': defuser} diff --git a/cloud-init.changes b/cloud-init.changes index 1fd569c..ca8ce69 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 24 12:40:00 UTC 2020 - Robert Schweikert + +- Add cloud-init-azure-def-usr-pass.patch (bsc#1179150, bsc#1179151) + + Properly set the password for the default user in all circumstances + ------------------------------------------------------------------- Fri Nov 13 19:44:11 UTC 2020 - Robert Schweikert diff --git a/cloud-init.spec b/cloud-init.spec index e04afe9..05e1507 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -38,6 +38,8 @@ Patch56: cloud-init-sysconf-path.patch Patch57: cloud-init-no-tempnet-oci.patch Patch58: cloud-init-after-kvp.diff Patch59: cloud-init-recognize-hpc.patch +# FIXME https://github.com/canonical/cloud-init/commit/eea754492f074e00b601cf77aa278e3623857c5a +Patch60: cloud-init-azure-def-usr-pass.patch BuildRequires: fdupes BuildRequires: filesystem # pkg-config is needed to find correct systemd unit dir @@ -134,6 +136,7 @@ Documentation and examples for cloud-init tools %patch57 %patch58 -p1 %patch59 +%patch60 # patch in the full version to version.py version_pys=$(find . -name version.py -type f) [ -n "$version_pys" ] || From f8ea6795acfa98df174c96c6c1211fd3a776ad4f31849cb11e5b8453d7f7a27c Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 24 Nov 2020 20:05:45 +0000 Subject: [PATCH 4/5] (jsc#PM-2335) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=178 --- cloud-init.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud-init.changes b/cloud-init.changes index ca8ce69..8ad1329 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -35,6 +35,7 @@ Fri Jul 24 19:55:40 UTC 2020 - Robert Schweikert - cloud-init-long-pass.patch - cloud-init-mix-static-dhcp.patch + Remove patches build switched to Python 3 for all distributions + (jsc#PM-2335) - cloud-init-python2-sigpipe.patch - cloud-init-template-py2.patch + Add From 49186f26814121f91607c1e3b91f8db57321d14abe37882e6eaef8ad9f0aa150 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 24 Nov 2020 21:16:17 +0000 Subject: [PATCH 5/5] - Add wget as a requirement (bsc#1178029) + wget is used in the CloudStack data source OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=179 --- cloud-init.changes | 6 ++++++ cloud-init.spec | 1 + 2 files changed, 7 insertions(+) diff --git a/cloud-init.changes b/cloud-init.changes index 8ad1329..a828653 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 24 21:14:56 UTC 2020 - Robert Schweikert + +- Add wget as a requirement (bsc#1178029) + + wget is used in the CloudStack data source + ------------------------------------------------------------------- Tue Nov 24 12:40:00 UTC 2020 - Robert Schweikert diff --git a/cloud-init.spec b/cloud-init.spec index 05e1507..7adb157 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -85,6 +85,7 @@ Requires: python3-six Requires: python3-xml Requires: sudo Requires: util-linux +Requires: wget Requires: wicked-service Requires: cloud-init-config = %configver BuildRoot: %{_tmppath}/%{name}-%{version}-build