[OS-BUILD PATCHv4 3/3] redhat: Add dist-check-licenses target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>

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@xxxxxxxxxx>

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
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux