[PKG-Openstack-devel] Bug#859194: neutron: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Mar 31 11:07:21 UTC 2017


Source: neutron
Version: 2:9.1.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: cpu
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that neutron could not be built reproducibly as it includes the
number of CPUs in the metadata_agent.ini config file.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/neutron/common/utils.py b/neutron/common/utils.py
index 2ce52ca..80ec1c2 100644
--- a/neutron/common/utils.py
+++ b/neutron/common/utils.py
@@ -211,6 +211,8 @@ def get_dhcp_agent_device_id(network_id, host):
 
 
 def cpu_count():
+    if 'SOURCE_DATE_EPOCH' in os.environ:
+        return 1
     try:
         return multiprocessing.cpu_count()
     except NotImplementedError:


More information about the Openstack-devel mailing list