diff --git a/cloud-init-0.7.0-fedora-hostname.patch b/cloud-init-0.7.0-fedora-hostname.patch deleted file mode 100644 index 77fe860..0000000 --- a/cloud-init-0.7.0-fedora-hostname.patch +++ /dev/null @@ -1,56 +0,0 @@ -Index: trunk/cloudinit/distros/fedora.py -=================================================================== ---- trunk.orig/cloudinit/distros/fedora.py -+++ trunk/cloudinit/distros/fedora.py -@@ -23,9 +23,23 @@ - from cloudinit.distros import rhel - - from cloudinit import log as logging -+from cloudinit import util - - LOG = logging.getLogger(__name__) - - - class Distro(rhel.Distro): - default_user = 'ec2-user' -+ -+ def set_hostname(self, hostname): -+ # sysconfig-based (inherited from rhel.Distro) -+ sysconfig_fname = self._paths.join(False, '/etc/sysconfig/network') -+ self._write_hostname(hostname, '/etc/sysconfig/network') -+ # systemd-based -+ etc_fname = self._paths.join(False, '/etc/hostname') -+ util.write_file(etc_fname, str(hostname) + '\n', 0644) -+ -+ if sysconfig_fname == '/etc/sysconfig/network': -+ # Only do this if we are running in non-adjusted root mode -+ LOG.debug('Setting hostname to %s', hostname) -+ util.subp(['hostname', hostname]) -Index: trunk/templates/hosts.fedora.tmpl -=================================================================== ---- /dev/null -+++ trunk/templates/hosts.fedora.tmpl -@@ -0,0 +1,23 @@ -+#* -+ This file /etc/cloud/templates/hosts.fedora.tmpl is only utilized -+ if enabled in cloud-config. Specifically, in order to enable it -+ you need to add the following to config: -+ manage_etc_hosts: True -+*# -+# Your system has configured 'manage_etc_hosts' as True. -+# As a result, if you wish for changes to this file to persist -+# then you will need to either -+# a.) make changes to the master file in /etc/cloud/templates/hosts.fedora.tmpl -+# b.) change or remove the value of 'manage_etc_hosts' in -+# /etc/cloud/cloud.cfg or cloud-config from user-data -+# -+# The following lines are desirable for IPv4 capable hosts -+127.0.0.1 ${fqdn} ${hostname} -+127.0.0.1 localhost.localdomain localhost -+127.0.0.1 localhost4.localdomain4 localhost4 -+ -+# The following lines are desirable for IPv6 capable hosts -+::1 ${fqdn} ${hostname} -+::1 localhost.localdomain localhost -+::1 localhost6.localdomain6 localhost6 -+ diff --git a/cloud-init.spec b/cloud-init.spec index 85455fd..79f2dd2 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,19 +1,17 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: cloud-init -Version: 0.7.0 +Version: 0.7.1 Release: 1%{?dist} Summary: Cloud instance init scripts Group: System Environment/Base License: GPLv3 URL: http://launchpad.net/cloud-init -Source0: https://launchpad.net/cloud-init/trunk/0.7.0/+download/cloud-init-0.7.0.tar.gz +Source0: https://launchpad.net/cloud-init/trunk/0.7.1/+download/cloud-init-0.7.1.tar.gz Source1: cloud-init-fedora.cfg Source2: cloud-init-README.fedora Patch0: cloud-init-0.7.0-fedora.patch -# Make Fedora update both /etc/hostname and /etc/sysconfig/network -Patch1: cloud-init-0.7.0-fedora-hostname.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -50,7 +48,6 @@ ssh keys and to let the user run various scripts. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -%patch1 -p1 cp -p %{SOURCE2} README.fedora @@ -128,6 +125,9 @@ fi %changelog +* Wed Nov 21 2012 Garrett Holmstrom - 0.7.1-1 +- Rebased against version 0.7.1 + * Tue Oct 9 2012 Garrett Holmstrom - 0.7.0-1 - Rebased against version 0.7.0 - Fixed / filesystem resizing diff --git a/sources b/sources index dfd4b81..4d3f21f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b18e8dfd8789473d9f66cd87cc64a50 cloud-init-0.7.0.tar.gz +40d5c5279389ba74563ee5168c05c139 cloud-init-0.7.1.tar.gz