All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] license.bbclass: improve reproducibility
@ 2017-04-05 21:51 Juro Bystricky
  0 siblings, 0 replies; only message in thread
From: Juro Bystricky @ 2017-04-05 21:51 UTC (permalink / raw)
  To: openembedded-core

Two identical builds can end up having deploy/licenses folders
that differ. This is observed in cases where there are several
different license files of the same name in different folders,
i.e. "COPYING". In those case we have to differentiate the files
somehow and we do it via file expensions such as COPYING.0, COPYING.1.
However, which file will get which extension is presently random.
This means, for example, that COPYING.0 in one build is the same
as COPYING.1 in the other (and vice versa).
Although there is mothing wrong with this, for the sake of binary
reproducibility it is preferable to have a deterministic outcome.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 meta/classes/license.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 81458e7..d4be478 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -505,7 +505,7 @@ def find_license_files(d):
         bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF')))
     # Add files from LIC_FILES_CHKSUM to list of license files
     lic_chksum_paths = defaultdict(OrderedDict)
-    for path, data in lic_chksums.items():
+    for path, data in sorted(lic_chksums.items()):
         lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2])
     for basename, files in lic_chksum_paths.items():
         if len(files) == 1:
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-05 21:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 21:51 [PATCH] license.bbclass: improve reproducibility Juro Bystricky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.