diff -Nru cloud-init-0.6.3/debian/changelog cloud-init-0.6.3/debian/changelog --- cloud-init-0.6.3/debian/changelog 2014-10-10 12:03:34.000000000 +0000 +++ cloud-init-0.6.3/debian/changelog 2015-02-19 16:46:09.000000000 +0000 @@ -1,3 +1,15 @@ +cloud-init (0.6.3-0ubuntu1.16) precise-proposed; urgency=medium + + [ Ben Howard ] + * debian/patches/lp-1383794-gce-short_name.patch: Use short hostname for GCE + (LP: #1383794). + + [ Wayne Witzel III ] + * debian/patches/lp-1404311-gce-data_encoding.patch: Enable user-data + encoding support for GCE (LP: #1404311). + + -- Ben Howard Tue, 21 Oct 2014 14:56:23 -0600 + cloud-init (0.6.3-0ubuntu1.15) precise-proposed; urgency=medium * debian/patches/lp-1378441-backport-gce-data-source.patch: backported diff -Nru cloud-init-0.6.3/debian/patches/lp-1383794-gce-short_name.patch cloud-init-0.6.3/debian/patches/lp-1383794-gce-short_name.patch --- cloud-init-0.6.3/debian/patches/lp-1383794-gce-short_name.patch 1970-01-01 00:00:00.000000000 +0000 +++ cloud-init-0.6.3/debian/patches/lp-1383794-gce-short_name.patch 2015-02-19 16:16:40.000000000 +0000 @@ -0,0 +1,14 @@ +Description: Use the shortname for GCE +Author: Ben Howard +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1383794 +--- a/cloudinit/DataSourceGCE.py ++++ b/cloudinit/DataSourceGCE.py +@@ -135,7 +135,7 @@ + return self.metadata['public-keys'] + + def get_hostname(self, fqdn=False, _resolve_ip=False): +- return self.metadata['local-hostname'] ++ return self.metadata['local-hostname'].split('.')[0] + + @property + def userdata_raw(self): diff -Nru cloud-init-0.6.3/debian/patches/lp-1404311-gce-data_encoding.patch cloud-init-0.6.3/debian/patches/lp-1404311-gce-data_encoding.patch --- cloud-init-0.6.3/debian/patches/lp-1404311-gce-data_encoding.patch 1970-01-01 00:00:00.000000000 +0000 +++ cloud-init-0.6.3/debian/patches/lp-1404311-gce-data_encoding.patch 2015-02-19 16:44:27.000000000 +0000 @@ -0,0 +1,39 @@ +Author: Ben Howard +Bug: https://launchpad.net/bugs/1404311 +Applied-Upstream: yes +Description: Allow for user-defined encoding on user-data to address + GCE's mangling of meta-data. +--- a/cloudinit/DataSourceGCE.py ++++ b/cloudinit/DataSourceGCE.py +@@ -17,6 +17,7 @@ + import logging + import urllib2 + ++from base64 import b64decode + from cloudinit import util + from cloudinit import DataSource as sources + +@@ -78,6 +79,8 @@ + ('local-hostname', 'instance/hostname', True), + ('public-keys', 'project/attributes/sshKeys', False), + ('user-data', 'instance/attributes/user-data', False), ++ ('user-data-encoding', 'instance/attributes/user-data-encoding', ++ False), + ] + + # if we cannot resolve the metadata server, then no point in trying +@@ -121,6 +124,14 @@ + lines = self.metadata['public-keys'].splitlines() + self.metadata['public-keys'] = [self._trim_key(k) for k in lines] + ++ encoding = self.metadata.get('user-data-encoding') ++ if encoding: ++ if encoding == 'base64': ++ self.metadata['user-data'] = b64decode( ++ self.metadata['user-data']) ++ else: ++ LOG.warn('unknown user-data-encoding: %s, ignoring', encoding) ++ + return found + + @property diff -Nru cloud-init-0.6.3/debian/patches/series cloud-init-0.6.3/debian/patches/series --- cloud-init-0.6.3/debian/patches/series 2014-10-10 11:59:36.000000000 +0000 +++ cloud-init-0.6.3/debian/patches/series 2015-02-19 16:30:38.000000000 +0000 @@ -25,3 +25,5 @@ lp-1363260-add-cloudsigma_ds.patch lp-1336855-grub_xvda.patch lp-1378441-backport-gce-data-source.patch +lp-1383794-gce-short_name.patch +lp-1404311-gce-data_encoding.patch