Drop obsolete patches
This commit is contained in:
parent
c4c2955541
commit
e8db4ad80d
@ -1,40 +0,0 @@
|
||||
Index: cloud-init-0.7.1/cloudinit/config/cc_resizefs.py
|
||||
===================================================================
|
||||
--- cloud-init-0.7.1.orig/cloudinit/config/cc_resizefs.py
|
||||
+++ cloud-init-0.7.1/cloudinit/config/cc_resizefs.py
|
||||
@@ -32,6 +32,8 @@ RESIZE_FS_PREFIXES_CMDS = [
|
||||
('xfs', 'xfs_growfs'),
|
||||
]
|
||||
|
||||
+NOBLOCK = "noblock"
|
||||
+
|
||||
|
||||
def nodeify_path(devpth, where, log):
|
||||
try:
|
||||
@@ -68,7 +70,7 @@ def handle(name, cfg, _cloud, log, args)
|
||||
else:
|
||||
resize_root = util.get_cfg_option_str(cfg, "resize_rootfs", True)
|
||||
|
||||
- if not util.translate_bool(resize_root):
|
||||
+ if not util.translate_bool(resize_root, addons=[NOBLOCK]):
|
||||
log.debug("Skipping module named %s, resizing disabled", name)
|
||||
return
|
||||
|
||||
@@ -110,7 +112,7 @@ def handle(name, cfg, _cloud, log, args)
|
||||
log.debug("Resizing %s (%s) using %s", resize_what, fs_type, resizer)
|
||||
resize_cmd = [resizer, devpth]
|
||||
|
||||
- if resize_root == "noblock":
|
||||
+ if resize_root == NOBLOCK:
|
||||
# Fork to a child that will run
|
||||
# the resize command
|
||||
util.fork_cb(do_resize, resize_cmd, log)
|
||||
@@ -120,7 +122,7 @@ def handle(name, cfg, _cloud, log, args)
|
||||
do_resize(resize_cmd, log)
|
||||
|
||||
action = 'Resized'
|
||||
- if resize_root == "noblock":
|
||||
+ if resize_root == NOBLOCK:
|
||||
action = 'Resizing (via forking)'
|
||||
log.debug("%s root filesystem (type=%s, maj=%i, min=%i, val=%s)",
|
||||
action, fs_type, os.major(st_dev), os.minor(st_dev), resize_root)
|
@ -1,29 +0,0 @@
|
||||
Index: cloud-init-0.7.1/cloudinit/distros/__init__.py
|
||||
===================================================================
|
||||
--- cloud-init-0.7.1.orig/cloudinit/distros/__init__.py
|
||||
+++ cloud-init-0.7.1/cloudinit/distros/__init__.py
|
||||
@@ -24,7 +24,6 @@
|
||||
from StringIO import StringIO
|
||||
|
||||
import abc
|
||||
-import collections
|
||||
import itertools
|
||||
import os
|
||||
import re
|
||||
@@ -421,11 +420,14 @@ class Distro(object):
|
||||
'',
|
||||
"# User rules for %s" % user,
|
||||
]
|
||||
- if isinstance(rules, collections.Iterable):
|
||||
+ if isinstance(rules, (list, tuple)):
|
||||
for rule in rules:
|
||||
lines.append("%s %s" % (user, rule))
|
||||
- else:
|
||||
+ elif isinstance(rules, (basestring, str)):
|
||||
lines.append("%s %s" % (user, rules))
|
||||
+ else:
|
||||
+ msg = "Can not create sudoers rule addition with type %r"
|
||||
+ raise TypeError(msg % (util.obj_name(rules)))
|
||||
content = "\n".join(lines)
|
||||
|
||||
self.ensure_sudo_dir(os.path.dirname(sudo_file))
|
Loading…
Reference in New Issue
Block a user