Bug#899162: vitrage: please make the build reproducible

Chris Lamb lamby at debian.org
Sun May 20 08:02:23 BST 2018


Source: vitrage
Version: 2.2.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that vitrage could not be built reproducibly due to it using a
set data structure to generate the sample configuration.

Patch attached.

The alternative would be to patch oslo-config-generator but that would
require something like:

  choices = ...
  # Only sort sets
  if isinstance(choices, set):
      choices = list(sorted(choices))
  for x in choices:
      # ...

… as we can't sort in all cases as that would *re*-order lists and
other deterministic data structures.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch	2018-05-20 08:43:23.196592399 +0200
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-05-20
+
+--- vitrage-2.2.0.orig/vitrage/api/__init__.py
++++ vitrage-2.2.0/vitrage/api/__init__.py
+@@ -25,8 +25,8 @@ OPTS = [
+                help='Configuration file for WSGI definition of API.'),
+     cfg.IntOpt('workers', default=1, min=1,
+                help='Number of workers for vitrage API server.'),
+-    cfg.StrOpt('auth_mode', default='keystone', choices={'keystone',
++    cfg.StrOpt('auth_mode', default='keystone', choices=('keystone',
+                                                          'noauth',
+-                                                         'keycloak'},
++                                                         'keycloak'),
+                help='Authentication mode to use.'),
+ ]
--- a/debian/patches/series	2018-05-20 08:34:05.228134066 +0200
--- b/debian/patches/series	2018-05-20 08:43:22.084526876 +0200
@@ -1,2 +1,3 @@
 package-all-files.patch
 fix-oslo-config-generator.patch
+reproducible-build.patch


More information about the Reproducible-bugs mailing list