[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#920676: debian-installer: Ensure build is reproducible regardless of the underlying filesystem ordering



Package: debian-installer
Severity: wishlist
Version: 20190118
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: toolchain fileordering
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Hi,

Attached is the following:

  commit 41ac10943458fea63a4e0c0e9ba21ff8f3163a55
  Author: Chris Lamb <lamby@debian.org>
  Date:   Mon Jan 28 09:46:26 2019 +0100
  
      Ensure build is reproducible regardless of the underlying filesystem ordering.
      
      Add strategic sorts to ensure that files are not added to the image using
      mcopy(1) in a non-determinstic order.
  
   build/config/ia64.cfg    | 2 +-
   build/config/x86.cfg     | 2 +-
   build/util/syslinux-cfgs | 2 +-
   3 files changed, 3 insertions(+), 3 deletions(-)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
>From 41ac10943458fea63a4e0c0e9ba21ff8f3163a55 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Mon, 28 Jan 2019 09:46:26 +0100
Subject: [PATCH] Ensure build is reproducible regardless of the underlying
 filesystem ordering.

Add strategic sorts to ensure that files are not added to the image using
mcopy(1) in a non-determinstic order.
---
 build/config/ia64.cfg    | 2 +-
 build/config/x86.cfg     | 2 +-
 build/util/syslinux-cfgs | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/build/config/ia64.cfg b/build/config/ia64.cfg
index 9cd8ef026..454a662ba 100644
--- a/build/config/ia64.cfg
+++ b/build/config/ia64.cfg
@@ -51,7 +51,7 @@ arch_boot:
 	mcopy -i$(TEMP_BOOT) $(TEMP)/elilo-cd.conf ::/elilo.conf
 	mcopy -i$(TEMP_BOOT) $(TEMP)/elilo-cd.conf ::/efi/boot/elilo.conf
 	
-	$(foreach file,$(wildcard $(TEMP_BOOT_SCREENS)/*.msg), \
+	$(foreach file,$(sort $(wildcard $(TEMP_BOOT_SCREENS)/*.msg)), \
 		mcopy -i$(TEMP_BOOT) $(file) ::/efi/boot/`basename $(file)`; \
 	)
 	echo "elilo linux" | mcopy -i$(TEMP_BOOT) - ::/install.nsh
diff --git a/build/config/x86.cfg b/build/config/x86.cfg
index 4c4344186..257d65dfb 100644
--- a/build/config/x86.cfg
+++ b/build/config/x86.cfg
@@ -100,7 +100,7 @@ endif
 	# syslinux help screens
 	if [ -z "$(OMIT_BOOT_HELP)" ]; then \
 		set -e; \
-		$(foreach file,$(wildcard $(TEMP_BOOT_SCREENS)/*.txt), \
+		$(foreach file,$(sort $(wildcard $(TEMP_BOOT_SCREENS)/*.txt)), \
 			if [ -e $(file).withgtk ] && [ -n "$(INITRD_GTK)" ]; then \
 				mcopy -i$(TEMP_BOOT) $(file).withgtk ::`basename $(file)`; \
 			else \
diff --git a/build/util/syslinux-cfgs b/build/util/syslinux-cfgs
index 1041b2aa6..51b90e004 100755
--- a/build/util/syslinux-cfgs
+++ b/build/util/syslinux-cfgs
@@ -27,7 +27,7 @@ if [ -z "$DST" ]; then
 	else
 		FILTER="! -name spk.cfg ! -name adspk.cfg ! -name rqspk.cfg"
 	fi
-	find . -type f $FILTER | sed "s:\./::"
+	find . -type f $FILTER | LC_ALL=C sort | sed "s:\./::"
 	exit 0
 elif [ ! -d "$DST" ]; then
 	exit 1
-- 
2.20.1


Reply to: