From 448e7440c2d6e682d55032d15076b840521ab120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 27 Oct 2020 18:32:27 +0100 Subject: [PATCH] headers: add spdx tags to imported files with a known license I added the header in the cases where the license text is present and it is easy to find the appropriate SPDX header. For "public domain" stuff: SDPX treats each "public domain" license as unique [1], but luckily the one in siphash24.c is one of the identified variants. There are some other cases which specify "public domain" but there doesn't seem to be a SPDX identifier. [1] https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files gunicode.[ch] are imported from glib, which is licensed as LGPL2.1+, see https://gitlab.gnome.org/GNOME/glib/-/blob/master/glib/gunicode.h. --- src/basic/gunicode.c | 1 + src/basic/gunicode.h | 4 ++-- src/basic/siphash24.c | 4 +++- src/basic/siphash24.h | 2 ++ src/boot/efi/sha256.c | 2 ++ src/shared/initreq.h | 1 + src/shared/linux/nl80211.h | 2 ++ 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/basic/gunicode.c b/src/basic/gunicode.c index c51b1a7a18..02637d74e9 100644 --- a/src/basic/gunicode.c +++ b/src/basic/gunicode.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ /* gunicode.c - Unicode manipulation functions * * Copyright (C) 1999, 2000 Tom Tromey diff --git a/src/basic/gunicode.h b/src/basic/gunicode.h index a16b7b6ff1..765077db83 100644 --- a/src/basic/gunicode.h +++ b/src/basic/gunicode.h @@ -1,10 +1,10 @@ -#pragma once - +/* SPDX-License-Identifier: LGPL-2.1+ */ /* gunicode.h - Unicode manipulation functions * * Copyright (C) 1999, 2000 Tom Tromey * Copyright © 2000, 2005 Red Hat, Inc. */ +#pragma once #include #include diff --git a/src/basic/siphash24.c b/src/basic/siphash24.c index 61180819b1..7c61eb145d 100644 --- a/src/basic/siphash24.c +++ b/src/basic/siphash24.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: CC0-1.0 */ + /* SipHash reference C implementation @@ -10,7 +12,7 @@ worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . + this software. If not, see . (Minimal changes made by Lennart Poettering, to make clean for inclusion in systemd) (Refactored by Tom Gundersen to split up in several functions and follow systemd diff --git a/src/basic/siphash24.h b/src/basic/siphash24.h index fe43256882..90a6de00e4 100644 --- a/src/basic/siphash24.h +++ b/src/basic/siphash24.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: CC0-1.0 */ + #pragma once #include diff --git a/src/boot/efi/sha256.c b/src/boot/efi/sha256.c index 40da636dc7..005e1902d4 100644 --- a/src/boot/efi/sha256.c +++ b/src/boot/efi/sha256.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ + /* Stolen from glibc and converted to UEFI style. In glibc it comes with the following copyright blurb: */ /* Functions to compute SHA256 message digest of files or memory blocks. diff --git a/src/shared/initreq.h b/src/shared/initreq.h index 1d7ff81df1..1bf5b8edd7 100644 --- a/src/shared/initreq.h +++ b/src/shared/initreq.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2+ */ /* * initreq.h Interface to talk to init through /dev/initctl. * diff --git a/src/shared/linux/nl80211.h b/src/shared/linux/nl80211.h index b065c1fe4d..65edfff1ca 100644 --- a/src/shared/linux/nl80211.h +++ b/src/shared/linux/nl80211.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: MIT */ + #ifndef __LINUX_NL80211_H #define __LINUX_NL80211_H /*