From 2f7ad5503227881795bebde60ff166f741947235 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mar 05 2012 22:07:04 +0000 Subject: Rebase against upstream rev 532 --- diff --git a/.gitignore b/.gitignore index 25a48a5..7b9c35c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /cloud-init-0.6.2-bzr450.tar.gz /cloud-init-0.6.2-bzr457.tar.gz +/cloud-init-0.6.3-bzr532.tar.gz diff --git a/cloud-init-0.6.2-fedora.patch b/cloud-init-0.6.2-fedora.patch deleted file mode 100644 index 91be028..0000000 --- a/cloud-init-0.6.2-fedora.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_keys_to_console.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_keys_to_console.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_keys_to_console.py -@@ -21,7 +21,7 @@ import subprocess - frequency = per_instance - - def handle(name,cfg,cloud,log,args): -- write_ssh_prog='/usr/lib/cloud-init/write-ssh-key-fingerprints' -+ write_ssh_prog='/usr/libexec/cloud-init/write-ssh-key-fingerprints' - try: - confp = open('/dev/console',"wb") - subprocess.call(write_ssh_prog,stdout=confp) -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_ssh.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -@@ -85,7 +85,7 @@ def handle(name,cfg,cloud,log,args): - send_ssh_keys_to_console() - - def send_ssh_keys_to_console(): -- subprocess.call(('/usr/lib/cloud-init/write-ssh-key-fingerprints',)) -+ subprocess.call(('/usr/libexec/cloud-init/write-ssh-key-fingerprints',)) - - def apply_credentials(keys, user, disable_root, disable_root_opts=DISABLE_ROOT_OPTS, log=global_log): - keys = set(keys) -Index: cloud-init-fedora/setup.py -=================================================================== ---- cloud-init-fedora.orig/setup.py -+++ cloud-init-fedora/setup.py -@@ -40,9 +40,8 @@ setup(name='cloud-init', - data_files=[('/etc/cloud', glob('config/*.cfg')), - ('/etc/cloud/cloud.cfg.d', glob('config/cloud.cfg.d/*')), - ('/etc/cloud/templates', glob('templates/*')), -- ('/etc/init', glob('upstart/*.conf')), - ('/usr/share/cloud-init', []), -- ('/usr/lib/cloud-init', -+ ('/usr/libexec/cloud-init', - ['tools/uncloud-init', 'tools/write-ssh-key-fingerprints']), - ('/usr/share/doc/cloud-init', filter(is_f,glob('doc/*'))), - ('/usr/share/doc/cloud-init/examples', filter(is_f,glob('doc/examples/*'))), diff --git a/cloud-init-0.6.2-filecontext.patch b/cloud-init-0.6.2-filecontext.patch deleted file mode 100644 index fcfed4d..0000000 --- a/cloud-init-0.6.2-filecontext.patch +++ /dev/null @@ -1,82 +0,0 @@ -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_puppet.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_puppet.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_puppet.py -@@ -22,6 +22,7 @@ import subprocess - import StringIO - import ConfigParser - import cloudinit.CloudConfig as cc -+import cloudinit.util as util - - def handle(name,cfg,cloud,log,args): - # If there isn't a puppet key in the configuration don't do anything -@@ -58,6 +59,7 @@ def handle(name,cfg,cloud,log,args): - ca_fh.close() - os.chown('/var/lib/puppet/ssl/certs/ca.pem', - pwd.getpwnam('puppet').pw_uid, 0) -+ util.restorecon_if_possible('/var/lib/puppet', recursive=True) - else: - #puppet_conf_fh.write("\n[%s]\n" % (cfg_name)) - # If puppet.conf already has this section we don't want to write it again -@@ -81,6 +83,7 @@ def handle(name,cfg,cloud,log,args): - os.rename('/etc/puppet/puppet.conf','/etc/puppet/puppet.conf.old') - with open('/etc/puppet/puppet.conf', 'wb') as configfile: - puppet_config.write(configfile) -+ util.restorecon_if_possible('/etc/puppet/puppet.conf') - # Set puppet default file to automatically start - subprocess.check_call(['sed', '-i', - '-e', 's/^START=.*/START=yes/', -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_ssh.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -@@ -66,6 +66,8 @@ def handle(name,cfg,cloud,log,args): - genkeys+='ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -t ecdsa -N ""; ' - subprocess.call(('sh', '-c', "{ %s } . - import cloudinit.util as util -+import os.path - import subprocess - import traceback - --def apply_locale(locale): -- subprocess.Popen(['locale-gen', locale]).communicate() -- subprocess.Popen(['update-locale', locale]).communicate() -+def apply_locale(locale, cfgfile): -+ if os.path.exists('/usr/sbin/locale-gen'): -+ subprocess.Popen(['locale-gen', locale]).communicate() -+ if os.path.exists('/usr/sbin/update-locale'): -+ subprocess.Popen(['update-locale', locale]).communicate() - -- util.render_to_file('default-locale', '/etc/default/locale', \ -- { 'locale' : locale }) -+ util.render_to_file('default-locale', cfgfile, { 'locale' : locale }) - - def handle(name,cfg,cloud,log,args): - if len(args) != 0: -@@ -32,12 +34,15 @@ def handle(name,cfg,cloud,log,args): - else: - locale = util.get_cfg_option_str(cfg,"locale",cloud.get_locale()) - -+ locale_cfgfile = util.get_cfg_option_str(cfg, "locale_configfile", -+ "/etc/default/locale") -+ - if not locale: return - - log.debug("setting locale to %s" % locale) - - try: -- apply_locale(locale) -+ apply_locale(locale, locale_cfgfile) - except Exception as e: - log.debug(traceback.format_exc(e)) - raise Exception("failed to apply locale %s" % locale) diff --git a/cloud-init-0.6.2-puppetenable.patch b/cloud-init-0.6.2-puppetenable.patch deleted file mode 100644 index c437442..0000000 --- a/cloud-init-0.6.2-puppetenable.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_puppet.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_puppet.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_puppet.py -@@ -16,6 +16,7 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see . - import os -+import os.path - import pwd - import socket - import subprocess -@@ -84,10 +85,15 @@ def handle(name,cfg,cloud,log,args): - with open('/etc/puppet/puppet.conf', 'wb') as configfile: - puppet_config.write(configfile) - util.restorecon_if_possible('/etc/puppet/puppet.conf') -- # Set puppet default file to automatically start -- subprocess.check_call(['sed', '-i', -- '-e', 's/^START=.*/START=yes/', -- '/etc/default/puppet']) -+ # Set puppet to automatically start -+ if os.path.exists('/etc/default/puppet'): -+ subprocess.check_call(['sed', '-i', -+ '-e', 's/^START=.*/START=yes/', -+ '/etc/default/puppet']) -+ elif os.path.exists('/bin/systemctl'): -+ subprocess.check_call(['/bin/systemctl', 'enable', 'puppet.service']) -+ elif os.path.exists('/sbin/chkconfig'): -+ subprocess.check_call(['/sbin/chkconfig', 'puppet', 'on']) - # Start puppetd - subprocess.check_call(['service', 'puppet', 'start']) - diff --git a/cloud-init-0.6.2-runparts-emptydir.patch b/cloud-init-0.6.2-runparts-emptydir.patch deleted file mode 100644 index 9e04046..0000000 --- a/cloud-init-0.6.2-runparts-emptydir.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: cloud-init-fedora/cloudinit/util.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/util.py -+++ cloud-init-fedora/cloudinit/util.py -@@ -145,7 +145,8 @@ def getkeybyid(keyid,keyserver): - - def runparts(dirp, skip_no_exist=True): - if skip_no_exist and not os.path.isdir(dirp): return -- -+ if os.path.isdir(dirp) and os.listdir(dirp) == []: return -+ - cmd = [ 'run-parts', '--regex', '.*', dirp ] - sp = subprocess.Popen(cmd) - sp.communicate() diff --git a/cloud-init-0.6.2-sshkeytypes.patch b/cloud-init-0.6.2-sshkeytypes.patch deleted file mode 100644 index 929e4d4..0000000 --- a/cloud-init-0.6.2-sshkeytypes.patch +++ /dev/null @@ -1,66 +0,0 @@ -Index: cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -=================================================================== ---- cloud-init-fedora.orig/cloudinit/CloudConfig/cc_ssh.py -+++ cloud-init-fedora/cloudinit/CloudConfig/cc_ssh.py -@@ -31,7 +31,7 @@ def handle(name,cfg,cloud,log,args): - global_log = log - - # remove the static keys from the pristine image -- for f in glob.glob("/etc/ssh/ssh_host_*_key*"): -+ for f in glob.glob("/etc/ssh/ssh_host_*key*"): - try: os.unlink(f) - except: pass - -@@ -61,10 +61,10 @@ def handle(name,cfg,cloud,log,args): - log.debug("generated %s from %s" % pair) - else: - # if not, generate them -- genkeys ='ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ""; ' -- genkeys+='ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ""; ' -- genkeys+='ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -t ecdsa -N ""; ' -- subprocess.call(('sh', '-c', "{ %s } - 0.6.3-0.1.bzr532 +- Rebased against upstream rev 532 + * Thu Jan 12 2012 Fedora Release Engineering - 0.6.2-0.8.bzr457 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index ed82092..5cb1fec 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ b8c9145213f6642e23270543fba24fb9 cloud-init-0.6.2-bzr457.tar.gz +c5f118f17683c7aacd8e127e756eb070 cloud-init-0.6.3-bzr532.tar.gz