From 4f397306dcbac9739472a3e7bb1f9f009728c256 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 19 Oct 2024 13:57:38 -0700 Subject: [PATCH] Makefile: error out of 'install' if COPYOPTS is set Since https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/319 and https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/331 , doing `make COPYOPTS="blahblah" install` does not fail, but does not do what it did before. This is a surprising and possibly undesired result (in Fedora, it led to our firmware suddenly taking up 500MB more space on disk, and that led to a bunch of live image builds failing). To make the change more apparent, let's just fail out with an explanatory message if invoked with COPYOPTS set. Signed-off-by: Adam Williamson Co-authored by: Emil Velikov --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 033e3fb6..3f51b4ef 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,11 @@ dedup: ./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR) install: + @if [ -n "${COPYOPTS}" ]; then \ + echo "COPYOPTS is not used since linux-firmware-20241017!"; \ + echo "You may want to use install{-xz,-zst} and dedup targets instead"; \ + false; \ + fi install -d $(DESTDIR)$(FIRMWAREDIR) ./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR) @echo "Now run \"make dedup\" to de-duplicate any firmware files"