What changed, and why it matters
This commit is a routine build-system housekeeping change. It makes the reproducible build script more flexible by allowing custom output directory suffixes, formatting fingerprint display in chunks, removing unused default directories, and letting users pass extra build options. There is no indication of a security fix or vulnerability.
No security action needed; treat as normal build tooling improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies build-docker.sh and core/Makefile. It adds DIRSUFFIX_OVERRIDE support with a guard against using it with both normal and bitcoin-only builds, chunkifies printed SHA fingerprints for readability, removes creation of four unused build/ subdirectories, and changes XTASK_BUILD_OPTS from assignment to append so extra options can be injected. No cryptographic, memory-safety, or authentication changes are present.
Changed components
build-docker.shcore/MakefileInspect captured patch +13 / −5
diff --git a/build-docker.sh b/build-docker.sh
index 4cf824ef..739b4d7b 100755
--- a/build-docker.sh
+++ b/build-docker.sh
@@ -129,6 +129,12 @@ fi
VARIANTS=("${variants[@]}")
+# A single override suffix cannot safely represent both variants at once.
+if [ -n "${DIRSUFFIX_OVERRIDE:-}" ] && [ "$OPT_BUILD_NORMAL" -eq 1 ] && [ "$OPT_BUILD_BITCOINONLY" -eq 1 ]; then
+ echo "DIRSUFFIX_OVERRIDE requires selecting exactly one variant (--skip-normal or --skip-bitcoinonly)."
+ exit 1
+fi
+
TAG="$1"
COMMIT_HASH="$(git rev-parse "$TAG")"
PRODUCTION=${PRODUCTION:-1}
@@ -151,8 +157,7 @@ fi
tag_clean="${TAG//[^a-zA-Z0-9]/_}"
SNAPSHOT_NAME="${CONTAINER_NAME}__${tag_clean}"
-mkdir -p build/core build/legacy
-mkdir -p build/core-bitcoinonly build/legacy-bitcoinonly
+mkdir -p build
# if not initializing, does the image exist?
if [ $INIT -eq 0 ] && ! $DOCKER image inspect $SNAPSHOT_NAME > /dev/null; then
@@ -260,6 +265,7 @@ for TREZOR_MODEL in ${MODELS[@]}; do
DIRSUFFIX=${BITCOIN_ONLY/1/-bitcoinonly}
DIRSUFFIX=${DIRSUFFIX/0/}
+ DIRSUFFIX=${DIRSUFFIX_OVERRIDE:-$DIRSUFFIX}
DIRSUFFIX="-${TREZOR_MODEL}${DIRSUFFIX}"
MAKE_TARGETS=""
@@ -484,13 +490,14 @@ echo "Fingerprints:"
# Display core and legacy fingerprints (if built)
for VARIANT in core legacy; do
for MODEL in ${MODELS[@]}; do
- for DIRSUFFIX in "" "-bitcoinonly"; do
+ for DIRSUFFIX in "" "-bitcoinonly" $DIRSUFFIX_OVERRIDE; do
BUILD_DIR=build/${VARIANT}-${MODEL}${DIRSUFFIX}
for file in $BUILD_DIR/*/*.fingerprint; do
if [ -f "$file" ]; then
origfile="${file%.fingerprint}"
fingerprint=$(tr -d '\n' < $file)
- echo "$fingerprint $origfile"
+ chunkified_fingerprint=$(echo "$fingerprint" | sed 's/.\{4\}/& /g')
+ echo -e "\033[1m$chunkified_fingerprint\033[0m $origfile"
fi
done
done
diff --git a/core/Makefile b/core/Makefile
index a4c7d6b5..281e20d6 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -6,6 +6,7 @@ BUILD_DIR = build-xtask/artifacts/latest
TREZOR_MODEL ?= T3W1
PYTEST_TIMEOUT ?= 500
TEST_LANG ?= "en"
+XTASK_BUILD_OPTS ?=
ifeq ($(PRODUCTION),1)
ifeq ($(BOOTLOADER_DEVEL),1)
@@ -29,7 +30,7 @@ MULTICORE ?= "auto"
RANDOM=$(shell python -c 'import random; print(random.randint(0, 1000000))')
# Please only add options used by CI, otherwise just run xtask directly.
-XTASK_BUILD_OPTS = --model $(TREZOR_MODEL)
+XTASK_BUILD_OPTS += --model $(TREZOR_MODEL)
ifeq ($(ADDRESS_SANITIZER),1)
XTASK_BUILD_OPTS += --asan
endif
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.