Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xz: switch from public domain to BSD Zero Clause License (0BSD)

Remove the public domain notices and add SPDX license identifiers.

Change MODULE_LICENSE from "GPL" to "Dual BSD/GPL" because 0BSD should
count as a BSD license variant here.

The switch to 0BSD was done in the upstream XZ Embedded project because
public domain has (real or perceived) legal issues in some jurisdictions.

Link: https://lkml.kernel.org/r/20240721133633.47721-4-lasse.collin@tukaani.org
Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Reviewed-by: Sam James <sam@gentoo.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jubin Zhong <zhongjubin@huawei.com>
Cc: Jules Maselbas <jmaselbas@zdiv.net>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rui Li <me@lirui.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lasse Collin and committed by
Andrew Morton
836d13a6 c1ccbbaa

+27 -52
+2 -3
include/linux/decompress/unxz.h
··· 1 + /* SPDX-License-Identifier: 0BSD */ 2 + 1 3 /* 2 4 * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #ifndef DECOMPRESS_UNXZ_H
+2 -3
include/linux/xz.h
··· 1 + /* SPDX-License-Identifier: 0BSD */ 2 + 1 3 /* 2 4 * XZ decompressor 3 5 * 4 6 * Authors: Lasse Collin <lasse.collin@tukaani.org> 5 7 * Igor Pavlov <https://7-zip.org/> 6 - * 7 - * This file has been put into the public domain. 8 - * You can do whatever you want with this file. 9 8 */ 10 9 11 10 #ifndef XZ_H
+2 -3
lib/decompress_unxz.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 /*
+2 -3
lib/xz/xz_crc32.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * CRC32 using the polynomial from IEEE-802.3 3 5 * 4 6 * Authors: Lasse Collin <lasse.collin@tukaani.org> 5 7 * Igor Pavlov <https://7-zip.org/> 6 - * 7 - * This file has been put into the public domain. 8 - * You can do whatever you want with this file. 9 8 */ 10 9 11 10 /*
+2 -3
lib/xz/xz_dec_bcj.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * Branch/Call/Jump (BCJ) filter decoders 3 5 * 4 6 * Authors: Lasse Collin <lasse.collin@tukaani.org> 5 7 * Igor Pavlov <https://7-zip.org/> 6 - * 7 - * This file has been put into the public domain. 8 - * You can do whatever you want with this file. 9 8 */ 10 9 11 10 #include "xz_private.h"
+2 -3
lib/xz/xz_dec_lzma2.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * LZMA2 decoder 3 5 * 4 6 * Authors: Lasse Collin <lasse.collin@tukaani.org> 5 7 * Igor Pavlov <https://7-zip.org/> 6 - * 7 - * This file has been put into the public domain. 8 - * You can do whatever you want with this file. 9 8 */ 10 9 11 10 #include "xz_private.h"
+2 -3
lib/xz/xz_dec_stream.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * .xz Stream decoder 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #include "xz_private.h"
+3 -9
lib/xz/xz_dec_syms.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * XZ decoder module information 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #include <linux/module.h> ··· 24 25 MODULE_DESCRIPTION("XZ decompressor"); 25 26 MODULE_VERSION("1.1"); 26 27 MODULE_AUTHOR("Lasse Collin <lasse.collin@tukaani.org> and Igor Pavlov"); 27 - 28 - /* 29 - * This code is in the public domain, but in Linux it's simplest to just 30 - * say it's GPL and consider the authors as the copyright holders. 31 - */ 32 - MODULE_LICENSE("GPL"); 28 + MODULE_LICENSE("Dual BSD/GPL");
+3 -9
lib/xz/xz_dec_test.c
··· 1 + // SPDX-License-Identifier: 0BSD 2 + 1 3 /* 2 4 * XZ decoder tester 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #include <linux/kernel.h> ··· 211 212 MODULE_DESCRIPTION("XZ decompressor tester"); 212 213 MODULE_VERSION("1.0"); 213 214 MODULE_AUTHOR("Lasse Collin <lasse.collin@tukaani.org>"); 214 - 215 - /* 216 - * This code is in the public domain, but in Linux it's simplest to just 217 - * say it's GPL and consider the authors as the copyright holders. 218 - */ 219 - MODULE_LICENSE("GPL"); 215 + MODULE_LICENSE("Dual BSD/GPL");
+2 -3
lib/xz/xz_lzma2.h
··· 1 + /* SPDX-License-Identifier: 0BSD */ 2 + 1 3 /* 2 4 * LZMA2 definitions 3 5 * 4 6 * Authors: Lasse Collin <lasse.collin@tukaani.org> 5 7 * Igor Pavlov <https://7-zip.org/> 6 - * 7 - * This file has been put into the public domain. 8 - * You can do whatever you want with this file. 9 8 */ 10 9 11 10 #ifndef XZ_LZMA2_H
+2 -3
lib/xz/xz_private.h
··· 1 + /* SPDX-License-Identifier: 0BSD */ 2 + 1 3 /* 2 4 * Private includes and definitions 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #ifndef XZ_PRIVATE_H
+2 -3
lib/xz/xz_stream.h
··· 1 + /* SPDX-License-Identifier: 0BSD */ 2 + 1 3 /* 2 4 * Definitions for handling the .xz file format 3 5 * 4 6 * Author: Lasse Collin <lasse.collin@tukaani.org> 5 - * 6 - * This file has been put into the public domain. 7 - * You can do whatever you want with this file. 8 7 */ 9 8 10 9 #ifndef XZ_STREAM_H
+1 -4
scripts/xz_wrap.sh
··· 1 1 #!/bin/sh 2 + # SPDX-License-Identifier: 0BSD 2 3 # 3 4 # This is a wrapper for xz to compress the kernel image using appropriate 4 5 # compression options depending on the architecture. 5 6 # 6 7 # Author: Lasse Collin <lasse.collin@tukaani.org> 7 - # 8 - # This file has been put into the public domain. 9 - # You can do whatever you want with this file. 10 - # 11 8 12 9 BCJ= 13 10 LZMA2OPTS=