[cloud-init/f18: 9/10] Rebase against version 0.7.0

gholms gholms at fedoraproject.org
Wed Oct 10 01:50:12 UTC 2012


commit 4e9b7b0b0b83d129a271f7302e5cba84e7fef7a6
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Tue Oct 9 18:41:26 2012 -0700

    Rebase against version 0.7.0

 cloud-init-0.7.0-fedora-hostname.patch   |   56 ++++++++
 cloud-init-0.7.0-hostname-refactor.patch |  223 ------------------------------
 cloud-init-0.7.0-ssh-key-users.patch     |   79 -----------
 cloud-init-0.7.0-sudoers-perms.patch     |   13 --
 cloud-init.spec                          |   23 +--
 sources                                  |    2 +-
 6 files changed, 65 insertions(+), 331 deletions(-)
---
diff --git a/cloud-init-0.7.0-fedora-hostname.patch b/cloud-init-0.7.0-fedora-hostname.patch
new file mode 100644
index 0000000..77fe860
--- /dev/null
+++ b/cloud-init-0.7.0-fedora-hostname.patch
@@ -0,0 +1,56 @@
+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 cacc71c..a87bcfd 100644
--- a/cloud-init.spec
+++ b/cloud-init.spec
@@ -2,26 +2,18 @@
 
 Name:           cloud-init
 Version:        0.7.0
-Release:        0.3.bzr659%{?dist}
+Release:        1%{?dist}
 Summary:        Cloud instance init scripts
 
 Group:          System Environment/Base
 License:        GPLv3
 URL:            http://launchpad.net/cloud-init
-# bzr export -r 659 cloud-init-0.7.0-bzr659.tar.gz lp:cloud-init
-Source0:        %{name}-%{version}-bzr659.tar.gz
+Source0:        https://launchpad.net/cloud-init/trunk/0.7.0/+download/cloud-init-0.7.0.tar.gz
 Source1:        cloud-init-fedora.cfg
 Source2:        cloud-init-README.fedora
 Patch0:         cloud-init-0.7.0-fedora.patch
-# Make Fedora use the same hostname-updating code as Debian (/etc/hostname)
-# https://code.launchpad.net/~gholms/cloud-init/hostname-refactor/+merge/125869
-Patch1:         cloud-init-0.7.0-hostname-refactor.patch
-# Fix fingerprint printing caused by recent user code refactoring
-# https://code.launchpad.net/~harlowja/cloud-init/patch-ssh-key-users/+merge/125606
-Patch2:         cloud-init-0.7.0-ssh-key-users.patch
-# Give sudoers 0440 permissions, not 0644
-# https://code.launchpad.net/~gholms/cloud-init/sudoers-perms/+merge/125873
-Patch3:         cloud-init-0.7.0-sudoers-perms.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)
@@ -56,11 +48,9 @@ ssh keys and to let the user run various scripts.
 
 
 %prep
-%setup -q -n %{name}-%{version}-bzr659
+%setup -q -n %{name}-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
 cp -p %{SOURCE2} README.fedora
 
@@ -138,6 +128,9 @@ fi
 
 
 %changelog
+* Tue Oct  9 2012 Garrett Holmstrom <gholms at fedoraproject.org> - 0.7.0-1
+- Rebased against version 0.7.0
+
 * Sat Sep 22 2012 Garrett Holmstrom <gholms at fedoraproject.org> - 0.7.0-0.3.bzr659
 - Added dmidecode dependency for DataSourceAltCloud
 
diff --git a/sources b/sources
index 0cef7d2..dfd4b81 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-77321bda6dd15f21aab00d1c0cf28d67  cloud-init-0.7.0-bzr659.tar.gz
+1b18e8dfd8789473d9f66cd87cc64a50  cloud-init-0.7.0.tar.gz


More information about the scm-commits mailing list