* [dpdk-dev] [RFC] devtools: add spdx license check tool
@ 2019-08-14 16:43 Stephen Hemminger
2019-11-08 17:23 ` [dpdk-dev] [PATCH] devtools: add SPDX license tag check script Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2019-08-14 16:43 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
This is a simple script to print files that have missing SPDX
license tag and list of files with redundant boilerplate.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/spdx-check.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100755 devtools/spdx-check.sh
diff --git a/devtools/spdx-check.sh b/devtools/spdx-check.sh
new file mode 100755
index 000000000000..c77454a8b320
--- /dev/null
+++ b/devtools/spdx-check.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2019 Microsoft Corporation
+#
+# Produce a list of files without SPDX license identifiers
+
+echo "Files without SPDX License"
+echo "--------------------------"
+
+git grep -L SPDX-License-Identifier | \
+ grep -v '^\.' |grep -v '^license/' |\
+ grep -v '\.map$' | grep -v '\.png$' | grep -v '\.svg$'
+
+echo
+echo "Files with redundant BSD boilerplate"
+echo "------------------------------------"
+
+git grep -l SPDX-License-Identifier | \
+ xargs grep -l 'Redistribution and use'
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
2019-08-14 16:43 [dpdk-dev] [RFC] devtools: add spdx license check tool Stephen Hemminger
@ 2019-11-08 17:23 ` Stephen Hemminger
2019-11-13 6:56 ` Hemant Agrawal
2019-11-13 6:59 ` Hemant Agrawal
0 siblings, 2 replies; 6+ messages in thread
From: Stephen Hemminger @ 2019-11-08 17:23 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Simple script to look for missing SPDX license tags
with exceptions for certain directories and file types.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/spdx-check.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100755 devtools/spdx-check.sh
diff --git a/devtools/spdx-check.sh b/devtools/spdx-check.sh
new file mode 100755
index 000000000000..4427398411f6
--- /dev/null
+++ b/devtools/spdx-check.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2019 Microsoft Corporation
+#
+# Produce a list of files without SPDX license identifiers
+
+echo "Files without SPDX License"
+echo "--------------------------"
+
+git grep -L SPDX-License-Identifier -- \
+ ':^.git*' ':^.ci/*' ':^.travis.yml' \
+ ':^README' ':^MAINTAINERS' ':^VERSION' \
+ ':^*/Kbuild' ':^*/README' \
+ ':^license/' ':^doc/' ':^config/' ':^buildtools/' \
+ ':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt'
+
+echo
+echo "Files with redundant BSD boilerplate"
+echo "------------------------------------"
+
+git grep -l SPDX-License-Identifier | \
+ xargs grep -l 'Redistribution'
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
2019-11-08 17:23 ` [dpdk-dev] [PATCH] devtools: add SPDX license tag check script Stephen Hemminger
@ 2019-11-13 6:56 ` Hemant Agrawal
2019-11-13 6:59 ` Hemant Agrawal
1 sibling, 0 replies; 6+ messages in thread
From: Hemant Agrawal @ 2019-11-13 6:56 UTC (permalink / raw)
To: Stephen Hemminger, dev
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
2019-11-08 17:23 ` [dpdk-dev] [PATCH] devtools: add SPDX license tag check script Stephen Hemminger
2019-11-13 6:56 ` Hemant Agrawal
@ 2019-11-13 6:59 ` Hemant Agrawal
2019-11-13 17:07 ` Stephen Hemminger
2019-12-16 21:58 ` Stephen Hemminger
1 sibling, 2 replies; 6+ messages in thread
From: Hemant Agrawal @ 2019-11-13 6:59 UTC (permalink / raw)
To: Stephen Hemminger, dev
HI Stephen,
Will you please enhance it to also provide number of files in each category?
We also need to think about how to handle the scripts "*.sh", as many of these are without SPDX.
- we can either leave them as it is.
Or , we can put the SPDX header without a copyright?
Regards,
Hemant
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Friday, November 8, 2019 10:54 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Subject: [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
>
> Simple script to look for missing SPDX license tags with exceptions for certain
> directories and file types.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> devtools/spdx-check.sh | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> create mode 100755 devtools/spdx-check.sh
>
> diff --git a/devtools/spdx-check.sh b/devtools/spdx-check.sh new file mode
> 100755 index 000000000000..4427398411f6
> --- /dev/null
> +++ b/devtools/spdx-check.sh
> @@ -0,0 +1,22 @@
> +#! /bin/sh
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Microsoft
> +Corporation # # Produce a list of files without SPDX license
> +identifiers
> +
> +echo "Files without SPDX License"
> +echo "--------------------------"
> +
> +git grep -L SPDX-License-Identifier -- \
> + ':^.git*' ':^.ci/*' ':^.travis.yml' \
> + ':^README' ':^MAINTAINERS' ':^VERSION' \
> + ':^*/Kbuild' ':^*/README' \
> + ':^license/' ':^doc/' ':^config/' ':^buildtools/' \
> + ':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt'
> +
> +echo
> +echo "Files with redundant BSD boilerplate"
> +echo "------------------------------------"
> +
> +git grep -l SPDX-License-Identifier | \
> + xargs grep -l 'Redistribution'
> --
> 2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
2019-11-13 6:59 ` Hemant Agrawal
@ 2019-11-13 17:07 ` Stephen Hemminger
2019-12-16 21:58 ` Stephen Hemminger
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2019-11-13 17:07 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dev
On Wed, 13 Nov 2019 06:59:48 +0000
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> HI Stephen,
> Will you please enhance it to also provide number of files in each category?
The number of files is shrinking to zero, so may not be necessary soon.
>
> We also need to think about how to handle the scripts "*.sh", as many of these are without SPDX.
> - we can either leave them as it is.
> Or , we can put the SPDX header without a copyright?
>
> Regards,
> Hemant
Patches are outstanding for all the .sh files.
There are precedents for files without Copyright that have SPDX tag.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add SPDX license tag check script
2019-11-13 6:59 ` Hemant Agrawal
2019-11-13 17:07 ` Stephen Hemminger
@ 2019-12-16 21:58 ` Stephen Hemminger
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2019-12-16 21:58 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dev
On Wed, 13 Nov 2019 06:59:48 +0000
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> HI Stephen,
> Will you please enhance it to also provide number of files in each category?
>
> We also need to think about how to handle the scripts "*.sh", as many of these are without SPDX.
> - we can either leave them as it is.
> Or , we can put the SPDX header without a copyright?
>
> Regards,
> Hemant
The shell files are covered and only a 3 files had missing headers.
Patches are in patchwork for these.
The copyright is better if present, but without it we can infer the copyright
from the original author in git.
The goal is to get this to 0, so that they output is nothing...
Then add it to CI.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-16 21:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 16:43 [dpdk-dev] [RFC] devtools: add spdx license check tool Stephen Hemminger
2019-11-08 17:23 ` [dpdk-dev] [PATCH] devtools: add SPDX license tag check script Stephen Hemminger
2019-11-13 6:56 ` Hemant Agrawal
2019-11-13 6:59 ` Hemant Agrawal
2019-11-13 17:07 ` Stephen Hemminger
2019-12-16 21:58 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).