File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,14 @@ if [[ -n "$KBUILD_BUILD_TIMESTAMP" ]]; then
125125 cmd+=" -e KBUILD_BUILD_TIMESTAMP=$KBUILD_BUILD_TIMESTAMP "
126126fi
127127
128+ if [[ -n " $REPRODUCIBLE " ]]; then
129+ cmd+=" -e KBUILD_BUILD_TIMESTAMP=1997-08-29T02:14-0400 "
130+ cmd+=" -e KBUILD_BUILD_USER=user "
131+ cmd+=" -e KBUILD_BUILD_HOST=host "
132+ cmd+=" -e KBUILD_BUILD_VERSION=1 "
133+ cmd+=" -e REPRODUCIBLE=1 "
134+ fi
135+
128136if [[ " $task " == " kernel" ]]; then
129137 if [[ -z " $DEFCONFIG " ]]; then
130138 DEFCONFIG=" ${subarch} _defconfig"
Original file line number Diff line number Diff line change @@ -82,6 +82,18 @@ if [[ "$1" == "kernel" ]]; then
8282 (set -x; make $verbose $quiet " $cc " mod2yesconfig)
8383 fi
8484
85+ if [[ -n " $REPRODUCIBLE " ]]; then
86+ # Check for options that defeat reproducible builds
87+ grep \
88+ -e CONFIG_IKCONFIG=y \
89+ -e CONFIG_LOCALVERSION_AUTO=y \
90+ -e CONFIG_IKHEADERS=y \
91+ /output/.config
92+ if [[ $? -eq 0 ]]; then
93+ echo " !! Reproducible build specified, but the above options may prevent reproducibility."
94+ fi
95+ fi
96+
8597 if [[ $rc -eq 0 ]]; then
8698 if [[ -n " $SPARSE " ]]; then
8799 rm -f /output/sparse.log
You can’t perform that action at this time.
0 commit comments