cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #03851
[Merge] ~rjschwei/cloud-init:reproducibleBuild into cloud-init:master
Robert Schweikert has proposed merging ~rjschwei/cloud-init:reproducibleBuild into cloud-init:master.
Requested reviews:
cloud-init commiters (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/334337
Make the package build for distributions reproducible, [1] [2]
[1] https://reproducible-builds.org/
[2] http://bugzilla.opensuse.org/show_bug.cgi?id=1069635
--
Your team cloud-init commiters is requested to review the proposed merge of ~rjschwei/cloud-init:reproducibleBuild into cloud-init:master.
diff --git a/setup.py b/setup.py
index bf697d7..d2d50a4 100755
--- a/setup.py
+++ b/setup.py
@@ -107,7 +107,11 @@ def render_tmpl(template):
return template
topdir = os.path.dirname(sys.argv[0])
- tmpd = tempfile.mkdtemp(dir=topdir)
+ tmpd = os.path.join(topdir + 'cloud-init-render.tmp')
+ try:
+ os.mkdir(tmpd)
+ except OSError:
+ tmpd = tempfile.mkdtemp(dir=topdir)
atexit.register(shutil.rmtree, tmpd)
bname = os.path.basename(template).rstrip(tmpl_ext)
fpath = os.path.join(tmpd, bname)
Follow ups