Hello community,

here is the log from the commit of package cloud-init for openSUSE:Factory 
checked in at 2017-12-14 11:03:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cloud-init (Old)
 and      /work/SRC/openSUSE:Factory/.cloud-init.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cloud-init"

Thu Dec 14 11:03:05 2017 rev:43 rq:556684 version:17.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/cloud-init/cloud-init.changes    2017-11-29 
10:53:59.305758392 +0100
+++ /work/SRC/openSUSE:Factory/.cloud-init.new/cloud-init.changes       
2017-12-14 11:03:18.854725552 +0100
@@ -1,0 +2,6 @@
+Wed Dec  6 13:08:04 UTC 2017 - [email protected]
+
+- Add cloud-init-reproduce-build.patch (boo#1069635)
+  + Make builds reproducible
+
+-------------------------------------------------------------------

New:
----
  cloud-init-reproduce-build.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cloud-init.spec ++++++
--- /var/tmp/diff_new_pack.cy5PM9/_old  2017-12-14 11:03:20.758633642 +0100
+++ /var/tmp/diff_new_pack.cy5PM9/_new  2017-12-14 11:03:20.758633642 +0100
@@ -48,7 +48,11 @@
 Patch29:        datasourceLocalDisk.patch
 Patch34:        cloud-init-tests-set-exec.patch
 Patch35:        cloud-init-final-no-apt.patch
+# FIXME cloud-init-resize-ro-btrfs.patch
+# proposed for upstream merge (lp#1734787)
 Patch36:        cloud-init-resize-ro-btrfs.patch
+# FIXME cloud-init-reproduce-build.patch, expecting upstream merge
+Patch37:        cloud-init-reproduce-build.patch
 BuildRequires:  fdupes
 BuildRequires:  filesystem
 # pkg-config is needed to find correct systemd unit dir
@@ -213,7 +217,7 @@
 %patch34
 %patch35 -p1
 %patch36
-
+%patch37
 
 %build
 %if 0%{?suse_version} && 0%{?suse_version} <= 1315

++++++ cloud-init-reproduce-build.patch ++++++
--- setup.py.orig
+++ setup.py
@@ -18,11 +18,13 @@ import tempfile
 
 import setuptools
 from setuptools.command.install import install
+from setuptools.command.egg_info import egg_info
 
 from distutils.errors import DistutilsArgError
 
 import subprocess
 
+RENDERED_TMPD_PREFIX = "RENDERED_TEMPD"
 
 def is_f(p):
     return os.path.isfile(p)
@@ -107,7 +109,7 @@ def render_tmpl(template):
         return template
 
     topdir = os.path.dirname(sys.argv[0])
-    tmpd = tempfile.mkdtemp(dir=topdir)
+    tmpd = tempfile.mkdtemp(dir=topdir, prefix=RENDERED_TMPD_PREFIX)
     atexit.register(shutil.rmtree, tmpd)
     bname = os.path.basename(template).rstrip(tmpl_ext)
     fpath = os.path.join(tmpd, bname)
@@ -155,6 +157,24 @@ if os.uname()[0] == 'FreeBSD':
 elif os.path.isfile('/etc/redhat-release'):
     USR_LIB_EXEC = "usr/libexec"
 
+class MyEggInfo(egg_info):
+    """This makes sure to not include the rendered files in SOURCES.txt."""
+
+    def find_sources(self):
+        ret = egg_info.find_sources(self)
+        # update the self.filelist.
+        self.filelist.exclude_pattern(RENDERED_TMPD_PREFIX + ".*",
+                                      is_regex=True)
+        # but since mfname is already written we have to update it also.
+        mfname = os.path.join(self.egg_info, "SOURCES.txt")
+        if os.path.exists(mfname):
+            with open(mfname) as fp:
+                files = [f for f in fp
+                         if not f.startswith(GENERATED_FILE_PREFIX)]
+            with open(mfname, "w") as fp:
+                fp.write(''.join(files))
+        return ret
+
 
 # TODO: Is there a better way to do this??
 class InitsysInstallData(install):

Reply via email to