Skip to contentSkip to conversation

multipath-tools: add SPDX-License-Identifier tag to libmpathutil/util.c

PATCH In review Xose Vazquez Perez 2 participants 3 messages Mar 13 – Mar 16 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 multipath-tools: add SPDX-License-Identifier tag to libmpathutil/util.c

This file combines "LGPL-2.1-or-later" and "GPLv2 or later" code, so the resulting code is GPL-2.0-or-later via the LGPL conversion clause.

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>
---
 libmpathutil/util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libmpathutil/util.c +2 -2
index 23a9797c..2220f4ab 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #include <assert.h>
 #include <ctype.h>
 #include <limits.h>
@@ -34,7 +35,6 @@ strchop(char *str)
 
 /*
  * glibc's non-destructive version of basename()
- * License: LGPL-2.1-or-later
  */
 const char *libmp_basename(const char *filename)
 {
@@ -219,7 +219,7 @@ static pthread_once_t _lvc_initialized = PTHREAD_ONCE_INIT;
  *     if (get_linux_version_code() > KERNEL_VERSION(2,2,11)) { <stuff> }
  *
  * Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
- * Code copied from busybox (GPLv2 or later)
+ * Code copied from busybox
  */
 static void
 _set_linux_version_code(void)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 2/2 multipath-tools: move SPDX-License-Identifier to the top of create-config.mk and rules.mk

It is not mandatory, but highly recommended for better consistency and automated license scanning.

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>
---
 create-config.mk | 2 +-
 rules.mk         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
create-config.mk +1 -1
index 712cef05..3f6a2636 100644
@@ -1,5 +1,5 @@
-# Copyright (c) SUSE LLC
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) SUSE LLC
 
 TOPDIR := .
 CREATE_CONFIG := 1
rules.mk +1 -1
index c3a8e7ac..844f0bff 100644
@@ -1,5 +1,5 @@
-# Copyright (c) SUSE LLC
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) SUSE LLC
 
 $(DEVLIB): $(LIBS)
 	$(Q)$(LN) $(LIBS) $@
Signature · 1 line
2.53.0
#2 lore raw
In reply to Xose Vazquez Perez
Quoted 9 lines · Xose Vazquez Perez

This file combines "LGPL-2.1-or-later" and "GPLv2 or later" code, so the resulting code is GPL-2.0-or-later via the LGPL conversion clause.

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>

This would relicense the entire file, except the basename() implementation, which is already under GPL-2.0-or-later. That is quite probably not in line with the intention of every copyright holder.

We can move libmp_basename() to a separate file to clarify the license of this code snippet.

Regards
Martin