From: Vitaly Kuznetsov <vkuznets(a)redhat.com>
redhat: Add dist-check-licenses target
Introduce a dedicated make target to check source code licenses without
the need to run all other selftests which may be failing for some other
reason.
Signed-off-by: Vitaly Kuznetsov <vkuznets(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -877,6 +877,13 @@ dist-self-test:
dist-self-test-data:
./self-test/data/create-data.sh
+dist-check-licenses:
+ @if test -x /usr/bin/bats; then \
+ bats $(REDHAT)/self-test/1007-spdx-licenses.bats ; \
+ else \
+ echo "dist-check-licenses: The bats package is not installed" ; \
+ fi
+
dist-help:
@echo 'Cleaning targets:'
@echo ' dist-clean - Clean redhat/configs/ and redhat/rpm/
directories.'
@@ -1000,6 +1007,9 @@ dist-full-help:
@echo ' dist-os-version - Displays the current Red Hat Enterprise Linux
versioni'
@echo ' target used by the current branch/tree.'
@echo ' dist-self-test - Runs self-tests from the redhat/self-test
directory'
+ @echo ' dist-check-licenses - Runs license selftest checking
SPDX-License-Identifier:'
+ @echo ' tags in all source files against `License:` field in
the'
+ @echo ' specfile template.'
@echo ''
export
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2648