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-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..a828653 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +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 + +- 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 + +- Patch the full package version into the cloud-init version file + +------------------------------------------------------------------- +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 @@ -16,6 +41,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 diff --git a/cloud-init.spec b/cloud-init.spec index a0acecd..7adb157 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 @@ -83,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 @@ -134,6 +137,12 @@ 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" ] || + { 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