From 6eb2120369a9de19a23fcb8ff11e208b16fd5af2 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Thu, 14 Jun 2018 22:37:09 +0100 Subject: [PATCH] rebuild-stage1: use pkg order from reproducible build test https://github.com/sabotage-linux/sabotage/issues/573#issuecomment-373968117 --- utils/rebuild-stage1.sh | 42 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/utils/rebuild-stage1.sh b/utils/rebuild-stage1.sh index 475294289..5a97e0d61 100755 --- a/utils/rebuild-stage1.sh +++ b/utils/rebuild-stage1.sh @@ -2,6 +2,42 @@ # use: rebuild-stage1.sh [no args] # Rebuilds the stage0/1 binaries with the stage 1 compiler. -butch rebuild jobflow sabotage-core patch busybox binutils make \ - kbd m4 gmp mpfr mpc libz libelf gcc640 musl 9base pkgconf \ - libblkid e2fsprogs man join libressl ca-certificates +# The resulting binaries/package directories should be +# identical to binaries produced on different systems +# (can be verified with `butch checksum`) + +base_pkg=' +libz +gmp +mpfr +mpc +libelf +gcc640 +musl +jobflow +patch +busybox +binutils +make +sabotage-core +join +' + +ext_pkg=' +kbd +m4 +9base +pkgconf +libblkid +e2fsprogs +man +libressl +ca-certificates +' + +pkg="$base_pkg" +test "$1" = --base || pkg="$base_pkg$ext_pkg" + +pkg=$(printf "%s\n" "$pkg" | sed '/^$/d' | tr '\n' ' ') + +butch rebuild $pkg