diff --git a/add-variable-to-forbid-tmp-dir.patch b/add-variable-to-forbid-tmp-dir.patch deleted file mode 100644 index 5990566e47a078f98da3bf89cc2d7e312bc9e5f1..0000000000000000000000000000000000000000 --- a/add-variable-to-forbid-tmp-dir.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 224da46b2331b582577b86c3eb707f67d57800fb Mon Sep 17 00:00:00 2001 -From: chengquan -Date: Thu, 8 Aug 2019 16:15:31 +0800 -Subject: [PATCH] cloud-init: add variable to forbid tmp dir - -reason: add variable to forbid temporary directory - -Signed-off-by: chengquan ---- - cloud-init-17.1/setup.py | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff -Nur cloud-init-17.1/setup.py cloud-init-17.1_bak/setup.py ---- cloud-init-17.1/setup.py 2019-04-12 19:00:20.782000000 +0800 -+++ cloud-init-17.1_bak/setup.py 2019-04-12 19:48:04.246000000 +0800 -@@ -86,6 +86,8 @@ - (deps, _e) = tiny_p(cmd) - return str(deps).splitlines() - -+# add variable to forbid tmp dir -+num = 0 - - def render_tmpl(template): - """render template into a tmpdir under same dir as setup.py -@@ -107,7 +109,10 @@ - return template - - topdir = os.path.dirname(sys.argv[0]) -- tmpd = tempfile.mkdtemp(dir=topdir) -+ global num -+ os.mkdir(topdir + str(num)) -+ tmpd = os.path.abspath(topdir + str(num)) -+ num = num + 1 - atexit.register(shutil.rmtree, tmpd) - bname = os.path.basename(template).rstrip(tmpl_ext) - fpath = os.path.join(tmpd, bname) -@@ -115,6 +120,9 @@ - # return path relative to setup.py - return os.path.join(os.path.basename(tmpd), bname) - -+def sort_files(file_list): -+ file_list.sort() -+ return file_list - - INITSYS_FILES = { - 'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)], -@@ -123,9 +131,9 @@ - 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)], - 'sysvinit_suse': [f for f in glob('sysvinit/suse/*') if is_f(f)], - 'systemd': [render_tmpl(f) -- for f in (glob('systemd/*.tmpl') + -+ for f in sort_files((glob('systemd/*.tmpl') + - glob('systemd/*.service') + -- glob('systemd/*.target')) if is_f(f)], -+ glob('systemd/*.target'))) if is_f(f)], - 'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)], - 'upstart': [f for f in glob('upstart/*') if is_f(f)], - } diff --git a/cloud-init.spec b/cloud-init.spec index f615e91e0415b4728500aa515b6d931262b8bcc3..50c3d35ad5b7f6b50d5dcdd0e02d58461316de00 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,7 +1,7 @@ Name: cloud-init Version: 17.1 Release: 8 -Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. +Summary: the defacto multi-distribution package that handles early initialization of a cloud instance1. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init Source0: https://launchpad.net/cloud-init/trunk/17.1/+download/cloud-init-17.1.tar.gz