From 71ca25096f065a790cd0482d6be15dbc90970bc4 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 6 Jul 2023 14:40:50 -0400 Subject: [PATCH] src: implement REUSE with SPDX identifiers The SPDX identifiers [1] are a legally binding shorthand, which can be used instead of the full boiler plate text. This is the first step towards implementing the full REUSE spec [2] to help with copyright and licensing audits and compliance. This will reduce a lot a manual work required for the licensing audit required in Debian on each update. For files that lacked copyright and licensing information, I used the following guidelines. If a clear author could be determined from the git history use it, otherwise use 'EfficiOS Inc.'. For build system files, use 'MIT', for documentation 'CC-BY-4.0' and for data files 'CC0-1.0'. Freeform text files were converted to Markdown to allow licensing comments. [1] https://spdx.org/ids-how [2] https://reuse.software/tutorial/ Change-Id: I5bebf12931a64f29fa84ee3947b165d0624db13a Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- src/common/Makefile.am | 2 +- src/common/events.c | 3 +++ src/common/snprintf/README | 2 -- src/common/snprintf/README.md | 8 ++++++++ src/lib/lttng-ust-ctl.pc.in | 4 ++++ src/lib/lttng-ust-cyg-profile/run | 2 ++ src/lib/lttng-ust-cyg-profile/run-fast | 2 ++ .../java/lttng-ust-agent-all/Makefile.am | 4 +++- .../java/lttng-ust-agent-all/Manifest.txt.license | 2 ++ .../java/lttng-ust-agent-common/Makefile.am | 4 +++- .../java/lttng-ust-agent-common/Manifest.txt.license | 2 ++ .../java/lttng-ust-agent-jul/Makefile.am | 4 +++- .../java/lttng-ust-agent-jul/Manifest.txt.license | 2 ++ .../java/lttng-ust-agent-log4j/Makefile.am | 4 +++- .../java/lttng-ust-agent-log4j/Manifest.txt.license | 2 ++ .../java/lttng-ust-agent-log4j2/Makefile.am | 4 +++- .../java/lttng-ust-agent-log4j2/Manifest.txt.license | 2 ++ src/lib/lttng-ust-java/Makefile.am | 2 +- src/lib/lttng-ust-java/{README => README.md} | 9 ++++++++- src/lib/lttng-ust-libc-wrapper/run | 2 ++ src/lib/lttng-ust.pc.in | 4 ++++ 21 files changed, 60 insertions(+), 10 deletions(-) delete mode 100644 src/common/snprintf/README create mode 100644 src/common/snprintf/README.md create mode 100644 src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Manifest.txt.license create mode 100644 src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Manifest.txt.license create mode 100644 src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Manifest.txt.license create mode 100644 src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Manifest.txt.license create mode 100644 src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Manifest.txt.license rename src/lib/lttng-ust-java/{README => README.md} (78%) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 3561032b..05d08ade 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -185,4 +185,4 @@ libustcomm_la_SOURCES = \ ustcomm.c \ ustcomm.h -EXTRA_DIST = snprintf/README +EXTRA_DIST = snprintf/README.md diff --git a/src/common/events.c b/src/common/events.c index f70a1b4b..b8b4da05 100644 --- a/src/common/events.c +++ b/src/common/events.c @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2011 Mathieu Desnoyers +// +// SPDX-License-Identifier: LGPL-2.1-or-later #include diff --git a/src/common/snprintf/README b/src/common/snprintf/README deleted file mode 100644 index 73cb573e..00000000 --- a/src/common/snprintf/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a signal safe version of snprintf/vsnprintf. The code is -originally from the OpenBSD libc. diff --git a/src/common/snprintf/README.md b/src/common/snprintf/README.md new file mode 100644 index 00000000..c9d0498f --- /dev/null +++ b/src/common/snprintf/README.md @@ -0,0 +1,8 @@ + + +This is a signal safe version of snprintf/vsnprintf. The code is +originally from the OpenBSD libc. diff --git a/src/lib/lttng-ust-ctl.pc.in b/src/lib/lttng-ust-ctl.pc.in index a82a6689..74dede0a 100644 --- a/src/lib/lttng-ust-ctl.pc.in +++ b/src/lib/lttng-ust-ctl.pc.in @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 EfficiOS Inc. +# +# SPDX-License-Identifier: GPL-2.0-only + prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ diff --git a/src/lib/lttng-ust-cyg-profile/run b/src/lib/lttng-ust-cyg-profile/run index 8df97ff8..1e0bca88 100755 --- a/src/lib/lttng-ust-cyg-profile/run +++ b/src/lib/lttng-ust-cyg-profile/run @@ -1,4 +1,6 @@ #!/bin/sh + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc # # SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-cyg-profile/run-fast b/src/lib/lttng-ust-cyg-profile/run-fast index 3506bb8b..8f53315a 100755 --- a/src/lib/lttng-ust-cyg-profile/run-fast +++ b/src/lib/lttng-ust-cyg-profile/run-fast @@ -1,4 +1,6 @@ #!/bin/sh + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc # # SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Makefile.am b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Makefile.am index 296bf5a0..437052ab 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Makefile.am +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Makefile.am @@ -15,7 +15,9 @@ jarfile_compat_symlink = liblttng-ust-agent.jar jardir = $(datadir)/java -dist_noinst_DATA = $(jarfile_manifest) +dist_noinst_DATA = \ + $(jarfile_manifest) \ + $(jarfile_manifest).license jar_DATA = $(jarfile) diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Manifest.txt.license b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Manifest.txt.license new file mode 100644 index 00000000..aca70e96 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-all/Manifest.txt.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 EfficiOS, Inc +SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Makefile.am b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Makefile.am index ec6c0d64..081111e4 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Makefile.am +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Makefile.am @@ -40,7 +40,9 @@ dist_noinst_JAVA = $(pkgpath)/AbstractLttngAgent.java \ $(pkgpath)/utils/LttngUstAgentLogger.java -dist_noinst_DATA = $(jarfile_manifest) +dist_noinst_DATA = \ + $(jarfile_manifest) \ + $(jarfile_manifest).license jar_DATA = $(jarfile) diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Manifest.txt.license b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Manifest.txt.license new file mode 100644 index 00000000..aca70e96 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/Manifest.txt.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 EfficiOS, Inc +SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am index 5d09e3e3..8add8acd 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am @@ -20,7 +20,9 @@ dist_noinst_JAVA = $(pkgpath)/LttngJulAgent.java \ $(pkgpath)/LttngJulApi.java \ $(pkgpath)/LttngLogHandler.java -dist_noinst_DATA = $(jarfile_manifest) +dist_noinst_DATA = \ + $(jarfile_manifest) \ + $(jarfile_manifest).license jar_DATA = $(jarfile) diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Manifest.txt.license b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Manifest.txt.license new file mode 100644 index 00000000..aca70e96 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-jul/Manifest.txt.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 EfficiOS, Inc +SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am index 6bdbbba4..42722b6b 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am @@ -20,7 +20,9 @@ dist_noinst_JAVA = $(pkgpath)/LttngLog4jAgent.java \ $(pkgpath)/LttngLog4jApi.java \ $(pkgpath)/LttngLogAppender.java -dist_noinst_DATA = $(jarfile_manifest) +dist_noinst_DATA = \ + $(jarfile_manifest) \ + $(jarfile_manifest).license jar_DATA = $(jarfile) diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Manifest.txt.license b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Manifest.txt.license new file mode 100644 index 00000000..aca70e96 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j/Manifest.txt.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 EfficiOS, Inc +SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Makefile.am b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Makefile.am index 785a98fe..36c65bf2 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Makefile.am +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Makefile.am @@ -26,7 +26,9 @@ dist_noinst_JAVA = \ $(pkgpath)/LttngLog4j2Api.java \ $(pkgpath)/LttngLogAppender.java -dist_noinst_DATA = $(jarfile_manifest) +dist_noinst_DATA = \ + $(jarfile_manifest) \ + $(jarfile_manifest).license jar_DATA = $(jarfile) diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Manifest.txt.license b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Manifest.txt.license new file mode 100644 index 00000000..aca70e96 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/Manifest.txt.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 EfficiOS, Inc +SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust-java/Makefile.am b/src/lib/lttng-ust-java/Makefile.am index 661c30ba..14988db5 100644 --- a/src/lib/lttng-ust-java/Makefile.am +++ b/src/lib/lttng-ust-java/Makefile.am @@ -46,7 +46,7 @@ org_lttng_ust_LTTngUst.h: $(JAVAH) -classpath $(srcdir) $(JAVAHFLAGS) org.lttng.ust.LTTngUst endif -EXTRA_DIST = README +EXTRA_DIST = README.md CLEANFILES = $(jarfile) org_lttng_ust_LTTngUst.h diff --git a/src/lib/lttng-ust-java/README b/src/lib/lttng-ust-java/README.md similarity index 78% rename from src/lib/lttng-ust-java/README rename to src/lib/lttng-ust-java/README.md index d2ca4781..65725795 100644 --- a/src/lib/lttng-ust-java/README +++ b/src/lib/lttng-ust-java/README.md @@ -1,9 +1,16 @@ + + This directory contains a simple API for instrumenting java applications. Configuration examples to build this library: dependency: openjdk-7-jdk -./configure --enable-jni-interface + + ./configure --enable-jni-interface Note that the OpenJDK 7 is used for development and continuous integration thus we directly support that version for this library. However, it has been tested diff --git a/src/lib/lttng-ust-libc-wrapper/run b/src/lib/lttng-ust-libc-wrapper/run index b784f51a..5d5a82a7 100755 --- a/src/lib/lttng-ust-libc-wrapper/run +++ b/src/lib/lttng-ust-libc-wrapper/run @@ -1,4 +1,6 @@ #!/bin/sh + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc # # SPDX-License-Identifier: LGPL-2.1-only diff --git a/src/lib/lttng-ust.pc.in b/src/lib/lttng-ust.pc.in index bd3600cb..77f84a82 100644 --- a/src/lib/lttng-ust.pc.in +++ b/src/lib/lttng-ust.pc.in @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 EfficiOS Inc. +# +# SPDX-License-Identifier: LGPL-2.1-or-later + prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ -- 2.34.1