Skip to contentSkip to conversation

erofs-utils: lib: switch to GPL-2.0+ OR MIT dual license

PATCH In review Gao Xiang 5 participants 10 messages Apr 2

Subsystems (6)
lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/2 erofs-utils: lib: switch to GPL-2.0+ OR MIT dual license

Apache 2.0 is still too strict for some 3rd-party integration.

Let's switch to GPL-2.0+ OR MIT dual license since we're absolutely not working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---
 COPYING                        |   6 +-
 LICENSES/Apache-2.0            | 186 ---------------------------------
 include/erofs/atomic.h         |   2 +-
 include/erofs/bitops.h         |   2 +-
 include/erofs/blobchunk.h      |   2 +-
 include/erofs/block_list.h     |   2 +-
 include/erofs/compress_hints.h |   2 +-
 include/erofs/config.h         |   2 +-
 include/erofs/decompress.h     |   2 +-
 include/erofs/dedupe.h         |   2 +-
 include/erofs/defs.h           |   2 +-
 include/erofs/dir.h            |   2 +-
 include/erofs/diskbuf.h        |   2 +-
 include/erofs/err.h            |   2 +-
 include/erofs/exclude.h        |   2 +-
 include/erofs/importer.h       |   2 +-
 include/erofs/inode.h          |   2 +-
 include/erofs/internal.h       |   2 +-
 include/erofs/io.h             |   2 +-
 include/erofs/list.h           |   2 +-
 include/erofs/lock.h           |   2 +-
 include/erofs/print.h          |   2 +-
 include/erofs/tar.h            |   2 +-
 include/erofs/trace.h          |   2 +-
 include/erofs/workqueue.h      |   2 +-
 include/erofs/xattr.h          |   2 +-
 lib/Makefile.am                |   2 +-
 lib/backends/fanotify.c        |   2 +-
 lib/backends/nbd.c             |   2 +-
 lib/base64.c                   |   2 +-
 lib/bitops.c                   |   2 +-
 lib/blobchunk.c                |   2 +-
 lib/block_list.c               |   2 +-
 lib/cache.c                    |   2 +-
 lib/compress.c                 |   2 +-
 lib/compress_hints.c           |   2 +-
 lib/compressor.c               |   2 +-
 lib/compressor.h               |   2 +-
 lib/compressor_deflate.c       |   2 +-
 lib/compressor_libdeflate.c    |   2 +-
 lib/compressor_liblzma.c       |   2 +-
 lib/compressor_libzstd.c       |   2 +-
 lib/compressor_lz4.c           |   2 +-
 lib/compressor_lz4hc.c         |   2 +-
 lib/config.c                   |   2 +-
 lib/data.c                     |   2 +-
 lib/decompress.c               |   2 +-
 lib/dedupe.c                   |   2 +-
 lib/dedupe_ext.c               |   2 +-
 lib/dir.c                      |   2 +-
 lib/diskbuf.c                  |   2 +-
 lib/exclude.c                  |   2 +-
 lib/fragments.c                |   2 +-
 lib/global.c                   |   2 +-
 lib/gzran.c                    |   2 +-
 lib/importer.c                 |   2 +-
 lib/inode.c                    |   2 +-
 lib/io.c                       |   2 +-
 lib/kite_deflate.c             |   2 +-
 lib/liberofs_cache.h           |   2 +-
 lib/liberofs_compress.h        |   2 +-
 lib/liberofs_dockerconfig.h    |   2 +-
 lib/liberofs_fanotify.h        |   2 +-
 lib/liberofs_fragments.h       |   2 +-
 lib/liberofs_gzran.h           |   2 +-
 lib/liberofs_metabox.h         |   2 +-
 lib/liberofs_nbd.h             |   2 +-
 lib/liberofs_oci.h             |   2 +-
 lib/liberofs_private.h         |   2 +-
 lib/liberofs_rebuild.h         |   2 +-
 lib/liberofs_s3.h              |   2 +-
 lib/liberofs_uuid.h            |   2 +-
 lib/metabox.c                  |   2 +-
 lib/namei.c                    |   2 +-
 lib/rebuild.c                  |   2 +-
 lib/remotes/docker_config.c    |   2 +-
 lib/remotes/oci.c              |   2 +-
 lib/remotes/s3.c               |   2 +-
 lib/rolling_hash.h             |   2 +-
 lib/sha256.h                   |   2 +-
 lib/super.c                    |   2 +-
 lib/tar.c                      |   2 +-
 lib/uuid.c                     |   2 +-
 lib/uuid_unparse.c             |   2 +-
 lib/vmdk.c                     |   2 +-
 lib/workqueue.c                |   2 +-
 lib/xattr.c                    |   2 +-
 lib/zmap.c                     |   2 +-
 88 files changed, 89 insertions(+), 275 deletions(-)
 delete mode 100644 LICENSES/Apache-2.0
COPYING +3 -3
index 8767cae10b22..e781cc21ff15 100644
@@ -1,7 +1,7 @@
 erofs-utils uses two different license patterns:
 
  - most liberofs files in `lib` and `include` directories
-   use GPL-2.0+ OR Apache-2.0 dual license;
+   use GPL-2.0+ OR MIT dual license;
 
  - all other files use GPL-2.0+ license, unless
    explicitly stated otherwise.
@@ -9,7 +9,7 @@ erofs-utils uses two different license patterns:
 Relevant licenses can be found in the LICENSES directory.
 
 This model is selected to emphasize that
-files in `lib` and `include` directory are designed to be included into
-3rd-party applications, while all other files, are intended to be used
+files in `lib` and `include` directories are designed to be included in
+3rd-party applications, while all other files are intended to be used
 "as is", as part of their intended scenarios, with no intention to
 support 3rd-party integration use cases.
LICENSES/Apache-2.0 deleted +0 -186

186 lines not on this page · raw message

include/erofs/atomic.h +1 -1
index 142590bd6c79..3aa19f6ae369 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2024 Alibaba Cloud
  */
include/erofs/bitops.h +1 -1
index 058642f5b190..f407cc95292e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_BITOPS_H
 #define __EROFS_BITOPS_H
 
include/erofs/blobchunk.h +1 -1
index 48fca63c6c15..1761fdd82432 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * erofs-utils/lib/blobchunk.h
  *
include/erofs/block_list.h +1 -1
index 9d06c9c47d2e..156a5a433ded 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C), 2021, Coolpad Group Limited.
  * Created by Yue Hu <[email protected]>
include/erofs/compress_hints.h +1 -1
index 6ccc03d213ea..3ab7bb4b67f1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
  * Created by Huang Jianan <[email protected]>
include/erofs/config.h +1 -1
index bb303c48a0db..95d7e9f16065 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/decompress.h +1 -1
index 0d5548327b02..edc017c2b8e4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
  * Created by Huang Jianan <[email protected]>
include/erofs/dedupe.h +1 -1
index f9caa6113d15..267d9b9f12c8 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2022 Alibaba Cloud
  */
include/erofs/defs.h +1 -1
index 71ca11b54ef8..ff87df9d3d51 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/dir.h +1 -1
index 5460ac48512f..4e0614dfbbce 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_DIR_H
 #define __EROFS_DIR_H
 
include/erofs/diskbuf.h +1 -1
index 29d9fe2cf52e..122890b2f919 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_DISKBUF_H
 #define __EROFS_DISKBUF_H
 
include/erofs/err.h +1 -1
index 59c8c9cc9ae3..7dacc917a4c1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/exclude.h +1 -1
index 3f17032b48db..0af39a0a5b05 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Created by Li Guifu <[email protected]>
  */
include/erofs/importer.h +1 -1
index 920488453c34..07e40b47954d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
include/erofs/inode.h +1 -1
index ba62ece9a7cc..bf089e83590b 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/internal.h +1 -1
index 671880f2db3c..c780228c7bfe 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2019 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/io.h +1 -1
index 9533efc2d20a..96309fde9646 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/list.h +1 -1
index a7e30ccc4258..e9208887ee80 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/lock.h +1 -1
index c6e30937aac4..884f23ea739e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LOCK_H
 #define __EROFS_LOCK_H
 
include/erofs/print.h +1 -1
index a896d75117de..fa979a3a2d46 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
include/erofs/tar.h +1 -1
index cdaef315442d..a8166336d220 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_TAR_H
 #define __EROFS_TAR_H
 
include/erofs/trace.h +1 -1
index 398e3318355d..fe6734073580 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2020 Gao Xiang <[email protected]>
  */
include/erofs/workqueue.h +1 -1
index 36037c381c4a..064246c2bfe4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_WORKQUEUE_H
 #define __EROFS_WORKQUEUE_H
 
include/erofs/xattr.h +1 -1
index 96546364f316..235688649592 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_XATTR_H
 #define __EROFS_XATTR_H
 
lib/Makefile.am +1 -1
index 5f8812f48c93..27bf71094bad 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+# SPDX-License-Identifier: GPL-2.0+ OR MIT
 
 noinst_LTLIBRARIES = liberofs.la
 noinst_HEADERS = $(top_srcdir)/include/erofs_fs.h \
lib/backends/fanotify.c +1 -1
index bbe131ac11c2..cf8b61667705 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #define _GNU_SOURCE
 #include <errno.h>
 #include <fcntl.h>
lib/backends/nbd.c +1 -1
index da2733477f8e..c488053d99d3 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/base64.c +1 -1
index a45f7b6f2a1a..623d83cb9f2f 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "liberofs_base64.h"
 #include <string.h>
 
lib/bitops.c +1 -1
index bb0c9eeb917a..da012b233ac2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * erofs-utils/lib/bitops.c
  *
lib/blobchunk.c +1 -1
index 96c161b27091..e39bf6800059 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * erofs-utils/lib/blobchunk.c
  *
lib/block_list.c +1 -1
index f8dc9138bd92..e6b28424ad36 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C), 2021, Coolpad Group Limited.
  * Created by Yue Hu <[email protected]>
lib/cache.c +1 -1
index 4c7c3863275b..f964e4737767 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/compress.c +1 -1
index 4a0d890ae87d..62d2672cb665 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/compress_hints.c +1 -1
index 322ec97f474a..a4ff0038ebb5 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
  * Created by Huang Jianan <[email protected]>
lib/compressor.c +1 -1
index cf55abcf5359..7593b336ffc8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/compressor.h +1 -1
index 86b45a759874..7b7ef37f8218 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/compressor_deflate.c +1 -1
index f567d2c731af..9521aec6914d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2023, Alibaba Cloud
  * Copyright (C) 2023, Gao Xiang <[email protected]>
lib/compressor_libdeflate.c +1 -1
index 18f5f7b4048c..da39e354974c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 #include "erofs/print.h"
 #include "erofs/config.h"
lib/compressor_liblzma.c +1 -1
index 49a90a23525a..ac5d02ea00a2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2021 Gao Xiang <[email protected]>
  */
lib/compressor_libzstd.c +1 -1
index 6330f445ffa6..06f16c272e80 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 #include "erofs/print.h"
 #include "erofs/config.h"
lib/compressor_lz4.c +1 -1
index f3d88b09fa4a..5f3530a7e6f0 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/compressor_lz4hc.c +1 -1
index 9955c0d717ac..073e33073a3d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/config.c +1 -1
index ab7eb01e1914..b7dbced071f7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/data.c +1 -1
index 6fd1389cc09f..1bb9269cb836 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2020 Gao Xiang <[email protected]>
  * Compression support by Huang Jianan <[email protected]>
lib/decompress.c +1 -1
index e66693c5883e..d23135e0cd43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
  * Created by Huang Jianan <[email protected]>
lib/dedupe.c +1 -1
index bdd890cc2e82..91ea31cc3ec4 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2022 Alibaba Cloud
  */
lib/dedupe_ext.c +1 -1
index d7a9b737e428..ae00bbe5e03d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/dedupe.h"
 #include "liberofs_xxhash.h"
 #include <stdlib.h>
lib/dir.c +1 -1
index 98edb8e1695c..bf611d9b9678 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <stdlib.h>
 #include <sys/stat.h>
 #include "erofs/print.h"
lib/diskbuf.c +1 -1
index 0bf42da6a8af..b32a39adf67a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/diskbuf.h"
 #include "erofs/internal.h"
 #include "erofs/print.h"
lib/exclude.c +1 -1
index 5f6107b24a60..6beb46bc2def 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Created by Li Guifu <[email protected]>
  */
lib/fragments.c +1 -1
index 0f07e33b3679..13afce3be537 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C), 2022, Coolpad Group Limited.
  * Created by Yue Hu <[email protected]>
lib/global.c +1 -1
index c3d8aec875e9..938aa0a79422 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/gzran.c +1 -1
index b861c581e408..3973c1f37a75 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/importer.c +1 -1
index 26c86a0b0098..c404b0f7fadb 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/inode.c +1 -1
index 2cfc6c58bda8..c932981a47b7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/io.c +1 -1
index 0c5eb2c29989..3ba45ccf8cbd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2018 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/kite_deflate.c +1 -1
index 29e44b3b4a92..c1d3c6db7f48 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * erofs-utils/lib/kite_deflate.c
  *
lib/liberofs_cache.h +1 -1
index baac609fb49f..ddaca5497390 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2018 HUAWEI, Inc.
  *             http://www.huawei.com
lib/liberofs_compress.h +1 -1
index 4b9dd42f1318..da6eb1a00d9d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2019 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/liberofs_dockerconfig.h +1 -1
index 1580e1c329e5..6752926a8f58 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2026 Tencent, Inc.
  *             http://www.tencent.com/
lib/liberofs_fanotify.h +1 -1
index 965090ff2f22..6ecc0e26bcbc 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_FANOTIFY_H
 #define __EROFS_LIB_LIBEROFS_FANOTIFY_H
 
lib/liberofs_fragments.h +1 -1
index 11833ebc938d..cf549367bc5d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2022, Coolpad Group Limited.
  * Copyright (C) 2025 Alibaba Cloud
lib/liberofs_gzran.h +1 -1
index 443fe1558ac5..fa86cc3a7839 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/liberofs_metabox.h +1 -1
index bf4051cf18e2..f966c205d9a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_METABOX_H
 #define __EROFS_LIB_LIBEROFS_METABOX_H
 
lib/liberofs_nbd.h +1 -1
index 78c8af511bec..ec7adbf728d2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2025 Alibaba Cloud
  */
lib/liberofs_oci.h +1 -1
index 3b3d66dd449d..8eec3f720cd1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2025 Tencent, Inc.
  *             http://www.tencent.com/
lib/liberofs_private.h +1 -1
index ebd9e7034860..64bcae83d84c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 
 #ifdef HAVE_LIBSELINUX
 #include <selinux/selinux.h>
lib/liberofs_rebuild.h +1 -1
index 69802fb9542c..6459dbd42a64 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_REBUILD_H
 #define __EROFS_LIB_LIBEROFS_REBUILD_H
 
lib/liberofs_s3.h +1 -1
index f4886cd4ecf8..c81834785c5f 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2025 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/liberofs_uuid.h +1 -1
index 63b358a854d4..e8bb1be94fde 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_UUID_H
 #define __EROFS_LIB_UUID_H
 
lib/metabox.c +1 -1
index 12706aafdb36..d5ce9e3243b8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <stdlib.h>
 #include "erofs/inode.h"
 #include "erofs/importer.h"
lib/namei.c +1 -1
index 896e348bc3ee..f19e4b13d69a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Created by Li Guifu <[email protected]>
  */
lib/rebuild.c +1 -1
index f89a17c44193..7ab2b499923c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <stdlib.h>
lib/remotes/docker_config.c +1 -1
index 00db1bb6dc1d..8e236fca1e33 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2026 Tencent, Inc.
  *             http://www.tencent.com/
lib/remotes/oci.c +1 -1
index f96be13387a7..80a1e38b1531 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 Tencent, Inc.
  *             http://www.tencent.com/
lib/remotes/s3.c +1 -1
index 768232ad0b66..1385e16018cd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2025 HUAWEI, Inc.
  *             http://www.huawei.com/
lib/rolling_hash.h +1 -1
index 448db34edc1b..cfabfca87109 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
  * Copyright (C) 2022 Alibaba Cloud
  */
lib/sha256.h +1 -1
index 851b80c722d3..6bcf03c26805 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_SHA256_H
 #define __EROFS_LIB_SHA256_H
 
lib/super.c +1 -1
index 088c9a01fc2f..6ad27c054333 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Created by Li Guifu <[email protected]>
  */
lib/tar.c +1 -1
index 599e41342255..87a6a619dd76 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
lib/uuid.c +1 -1
index 1fae857f2c8d..3b1bd38e63a9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2023 Norbert Lange <[email protected]>
  */
lib/uuid_unparse.c +1 -1
index 3255c4bdd7a5..890acda8ce96 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2023 Norbert Lange <[email protected]>
  */
lib/vmdk.c +1 -1
index 8080c515bf75..316a8ffc94b2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 
 static int erofs_vmdk_desc_add_extent(FILE *f, u64 sectors,
lib/workqueue.c +1 -1
index 1f3fa7ca34ed..8c78d7920fe9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <pthread.h>
 #include <stdlib.h>
 #include "erofs/print.h"
lib/xattr.c +1 -1
index 565070a698dc..b11cd3b681ae 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * Copyright (C) 2019 Li Guifu <[email protected]>
  *                    Gao Xiang <[email protected]>
lib/zmap.c +1 -1
index 4a6507726ba8..5b44b60ed586 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
  * (a large amount of code was adapted from Linux kernel. )
  *
Signature · 1 line
2.43.5
author
#1 lore raw

PATCH 2/2 erofs-utils: switch other source files into MIT license

Let's switch other source files to MIT license since we're absolutely NOT working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---
 COPYING                    | 14 +++++++-------
 Makefile.am                |  2 +-
 autogen.sh                 |  2 +-
 contrib/Makefile.am        |  2 +-
 contrib/stress.c           |  2 +-
 dump/Makefile.am           |  2 +-
 dump/main.c                |  2 +-
 fsck/Makefile.am           |  2 +-
 fsck/main.c                |  2 +-
 fuse/Makefile.am           |  2 +-
 fuse/macosx.h              |  2 +-
 fuse/main.c                |  2 +-
 man/Makefile.am            |  2 +-
 mkfs/Makefile.am           |  2 +-
 mkfs/main.c                |  2 +-
 mount/Makefile.am          |  2 +-
 mount/main.c               |  2 +-
 scripts/get-version-number |  2 +-
 18 files changed, 24 insertions(+), 24 deletions(-)
COPYING +7 -7
index e781cc21ff15..81aee791f173 100644
@@ -3,13 +3,13 @@ erofs-utils uses two different license patterns:
  - most liberofs files in `lib` and `include` directories
    use GPL-2.0+ OR MIT dual license;
 
- - all other files use GPL-2.0+ license, unless
-   explicitly stated otherwise.
+ - all other files use MIT license, unless explicitly stated
+   otherwise.
 
 Relevant licenses can be found in the LICENSES directory.
 
-This model is selected to emphasize that
-files in `lib` and `include` directories are designed to be included in
-3rd-party applications, while all other files are intended to be used
-"as is", as part of their intended scenarios, with no intention to
-support 3rd-party integration use cases.
+This model is selected to emphasize that erofs-utils can be integrated
+into various ecosystems as much as possible.
+
+However, liberofs should be GPL-2.0+ OR MIT dual license since some
+parts can be shared with the Linux kernel.
Makefile.am +1 -1
index 7cb93a697627..e79222e965a9 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 ACLOCAL_AMFLAGS = -I m4
 
autogen.sh +1 -1
index fd81db4d6fb3..89c510c35cab 100755
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 aclocal && \
 autoheader && \
contrib/Makefile.am +1 -1
index 4eb7abed8856..5bedb9441b2e 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 
 AUTOMAKE_OPTIONS	= foreign
contrib/stress.c +1 -1
index 0ef8c67c126b..65773bce9e27 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
  * stress test for EROFS filesystem
  *
dump/Makefile.am +1 -1
index c2e0c745a640..2611fd28c762 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 
 AUTOMAKE_OPTIONS = foreign
dump/main.c +1 -1
index 78c50d511587..6c7258a5db40 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2021-2022 HUAWEI, Inc.
  *             http://www.huawei.com/
fsck/Makefile.am +1 -1
index 488b401c8995..8eebadd7d1e5 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 
 AUTOMAKE_OPTIONS = foreign
fsck/main.c +1 -1
index 16a354f460a8..21ada195edab 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
  * Copyright 2021 Google LLC
  * Author: Daeho Jeong <[email protected]>
fuse/Makefile.am +1 -1
index 1e8f518bad1d..9fe560849336 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 AUTOMAKE_OPTIONS = foreign
 noinst_HEADERS = $(top_srcdir)/fuse/macosx.h
fuse/macosx.h +1 -1
index 81ac47f551d6..4bb4bb75d5a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: MIT */
 #ifdef __APPLE__
 #undef LIST_HEAD
 #endif
fuse/main.c +1 -1
index b6347828eacf..40f8684abe43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
  * Created by Li Guifu <[email protected]>
  * Lowlevel added by Li Yiyan <[email protected]>
man/Makefile.am +1 -1
index b9b598954725..88bf3a16d995 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 dist_man_MANS = mkfs.erofs.1 dump.erofs.1 fsck.erofs.1
 
mkfs/Makefile.am +1 -1
index aaefc11dadc3..386455aced67 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 AUTOMAKE_OPTIONS = foreign
 bin_PROGRAMS     = mkfs.erofs
mkfs/main.c +1 -1
index eb13abaec92b..5006f76fa73b 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2018-2019 HUAWEI, Inc.
  *             http://www.huawei.com/
mount/Makefile.am +1 -1
index 7f6efd8b7cf5..637029d4475a 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 
 AUTOMAKE_OPTIONS = foreign
mount/main.c +1 -1
index b6a2deca4d85..e09e58533ecc 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 #define _GNU_SOURCE
 #include <dirent.h>
 #include <fcntl.h>
scripts/get-version-number +1 -1
index d216b7a424e0..484baebf53c6 100755
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: MIT
 
 scm_version()
 {
Signature · 1 line
2.43.5
Reviewed-by Chengyu Zhu on v1 2/2
#2 lore raw

Re: [PATCH 2/2] erofs-utils: switch other source files into MIT license

Quoted 228 lines

2026年4月2日 14:09,Gao Xiang <[email protected]> 写道:

Let's switch other source files to MIT license since we're absolutely NOT working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---

COPYING                    | 14 +++++++-------
Makefile.am                |  2 +-
autogen.sh                 |  2 +-
contrib/Makefile.am        |  2 +-
contrib/stress.c           |  2 +-
dump/Makefile.am           |  2 +-
dump/main.c                |  2 +-
fsck/Makefile.am           |  2 +-
fsck/main.c                |  2 +-
fuse/Makefile.am           |  2 +-
fuse/macosx.h              |  2 +-
fuse/main.c                |  2 +-
man/Makefile.am            |  2 +-
mkfs/Makefile.am           |  2 +-
mkfs/main.c                |  2 +-
mount/Makefile.am          |  2 +-
mount/main.c               |  2 +-
scripts/get-version-number |  2 +-
18 files changed, 24 insertions(+), 24 deletions(-)
COPYING +2 -2
index e781cc21ff15..81aee791f173 100644
@@ -3,13 +3,13 @@ erofs-utils uses two different license patterns:
 - most liberofs files in `lib` and `include` directories
   use GPL-2.0+ OR MIT dual license;
 
- - all other files use GPL-2.0+ license, unless
-   explicitly stated otherwise.
+ - all other files use MIT license, unless explicitly stated
+   otherwise.
 

Relevant licenses can be found in the LICENSES directory.

COPYING +5 -5
-This model is selected to emphasize that
-files in `lib` and `include` directories are designed to be included in
-3rd-party applications, while all other files are intended to be used
-"as is", as part of their intended scenarios, with no intention to
-support 3rd-party integration use cases.
+This model is selected to emphasize that erofs-utils can be integrated
+into various ecosystems as much as possible.
+
+However, liberofs should be GPL-2.0+ OR MIT dual license since some
+parts can be shared with the Linux kernel.
Makefile.am +1 -1
index 7cb93a697627..e79222e965a9 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 

ACLOCAL_AMFLAGS = -I m4

autogen.sh +1 -1
index fd81db4d6fb3..89c510c35cab 100755
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
 aclocal && \
 autoheader && \
contrib/Makefile.am +1 -1
index 4eb7abed8856..5bedb9441b2e 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 

AUTOMAKE_OPTIONS = foreign

contrib/stress.c +1 -1
index 0ef8c67c126b..65773bce9e27 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
 * stress test for EROFS filesystem
 *
dump/Makefile.am +1 -1
index c2e0c745a640..2611fd28c762 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 

AUTOMAKE_OPTIONS = foreign

dump/main.c +1 -1
index 78c50d511587..6c7258a5db40 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
 * Copyright (C) 2021-2022 HUAWEI, Inc.
 *             http://www.huawei.com/
fsck/Makefile.am +1 -1
index 488b401c8995..8eebadd7d1e5 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 

AUTOMAKE_OPTIONS = foreign

fsck/main.c +1 -1
index 16a354f460a8..21ada195edab 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
 * Copyright 2021 Google LLC
 * Author: Daeho Jeong <[email protected]>
fuse/Makefile.am +1 -1
index 1e8f518bad1d..9fe560849336 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 

AUTOMAKE_OPTIONS = foreign
noinst_HEADERS = $(top_srcdir)/fuse/macosx.h

fuse/macosx.h +1 -1
index 81ac47f551d6..4bb4bb75d5a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: MIT */
 #ifdef __APPLE__
 #undef LIST_HEAD
 #endif
fuse/main.c +1 -1
index b6347828eacf..40f8684abe43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
 * Created by Li Guifu <[email protected]>
 * Lowlevel added by Li Yiyan <[email protected]>
man/Makefile.am +1 -1
index b9b598954725..88bf3a16d995 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 

dist_man_MANS = mkfs.erofs.1 dump.erofs.1 fsck.erofs.1

mkfs/Makefile.am +1 -1
index aaefc11dadc3..386455aced67 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 

AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = mkfs.erofs

mkfs/main.c +1 -1
index eb13abaec92b..5006f76fa73b 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
mount/Makefile.am +1 -1
index 7f6efd8b7cf5..637029d4475a 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 # Makefile.am
 

AUTOMAKE_OPTIONS = foreign

mount/main.c +1 -1
index b6a2deca4d85..e09e58533ecc 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
 #define _GNU_SOURCE
 #include <dirent.h>
 #include <fcntl.h>
scripts/get-version-number +1 -1
index d216b7a424e0..484baebf53c6 100755
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: MIT
 
 scm_version()
 {
Signature · 1 line
2.43.5
Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] erofs-utils: switch other source files into MIT license

In reply to Gao Xiang
Quoted 223 lines · Gao Xiang

Let's switch other source files to MIT license since we're absolutely NOT working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---
  COPYING                    | 14 +++++++-------
  Makefile.am                |  2 +-
  autogen.sh                 |  2 +-
  contrib/Makefile.am        |  2 +-
  contrib/stress.c           |  2 +-
  dump/Makefile.am           |  2 +-
  dump/main.c                |  2 +-
  fsck/Makefile.am           |  2 +-
  fsck/main.c                |  2 +-
  fuse/Makefile.am           |  2 +-
  fuse/macosx.h              |  2 +-
  fuse/main.c                |  2 +-
  man/Makefile.am            |  2 +-
  mkfs/Makefile.am           |  2 +-
  mkfs/main.c                |  2 +-
  mount/Makefile.am          |  2 +-
  mount/main.c               |  2 +-
  scripts/get-version-number |  2 +-
  18 files changed, 24 insertions(+), 24 deletions(-)
COPYING +7 -7
index e781cc21ff15..81aee791f173 100644
@@ -3,13 +3,13 @@ erofs-utils uses two different license patterns:
   - most liberofs files in `lib` and `include` directories
     use GPL-2.0+ OR MIT dual license;
 
- - all other files use GPL-2.0+ license, unless
-   explicitly stated otherwise.
+ - all other files use MIT license, unless explicitly stated
+   otherwise.
 
  Relevant licenses can be found in the LICENSES directory.
 
-This model is selected to emphasize that
-files in `lib` and `include` directories are designed to be included in
-3rd-party applications, while all other files are intended to be used
-"as is", as part of their intended scenarios, with no intention to
-support 3rd-party integration use cases.
+This model is selected to emphasize that erofs-utils can be integrated
+into various ecosystems as much as possible.
+
+However, liberofs should be GPL-2.0+ OR MIT dual license since some
+parts can be shared with the Linux kernel.
Makefile.am +1 -1
index 7cb93a697627..e79222e965a9 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  ACLOCAL_AMFLAGS = -I m4
 
autogen.sh +1 -1
index fd81db4d6fb3..89c510c35cab 100755
@@ -1,5 +1,5 @@
  #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  aclocal && \
  autoheader && \
contrib/Makefile.am +1 -1
index 4eb7abed8856..5bedb9441b2e 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS	= foreign
contrib/stress.c +1 -1
index 0ef8c67c126b..65773bce9e27 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * stress test for EROFS filesystem
   *
dump/Makefile.am +1 -1
index c2e0c745a640..2611fd28c762 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
dump/main.c +1 -1
index 78c50d511587..6c7258a5db40 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright (C) 2021-2022 HUAWEI, Inc.
   *             http://www.huawei.com/
fsck/Makefile.am +1 -1
index 488b401c8995..8eebadd7d1e5 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
fsck/main.c +1 -1
index 16a354f460a8..21ada195edab 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright 2021 Google LLC
   * Author: Daeho Jeong <[email protected]>
fuse/Makefile.am +1 -1
index 1e8f518bad1d..9fe560849336 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  AUTOMAKE_OPTIONS = foreign
  noinst_HEADERS = $(top_srcdir)/fuse/macosx.h
fuse/macosx.h +1 -1
index 81ac47f551d6..4bb4bb75d5a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: MIT */
  #ifdef __APPLE__
  #undef LIST_HEAD
  #endif
fuse/main.c +1 -1
index b6347828eacf..40f8684abe43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Created by Li Guifu <[email protected]>
   * Lowlevel added by Li Yiyan <[email protected]>
man/Makefile.am +1 -1
index b9b598954725..88bf3a16d995 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  dist_man_MANS = mkfs.erofs.1 dump.erofs.1 fsck.erofs.1
 
mkfs/Makefile.am +1 -1
index aaefc11dadc3..386455aced67 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  AUTOMAKE_OPTIONS = foreign
  bin_PROGRAMS     = mkfs.erofs
mkfs/main.c +1 -1
index eb13abaec92b..5006f76fa73b 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
mount/Makefile.am +1 -1
index 7f6efd8b7cf5..637029d4475a 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
mount/main.c +1 -1
index b6a2deca4d85..e09e58533ecc 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  #define _GNU_SOURCE
  #include <dirent.h>
  #include <fcntl.h>
scripts/get-version-number +1 -1
index d216b7a424e0..484baebf53c6 100755
@@ -1,5 +1,5 @@
  #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: MIT
 
  scm_version()
  {
Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] erofs-utils: switch other source files into MIT license

In reply to Gao Xiang
Quoted 5 lines · Gao Xiang

Let's switch other source files to MIT license since we're absolutely NOT working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

Thanks,
Hongbo

Quoted 218 lines
---
  COPYING                    | 14 +++++++-------
  Makefile.am                |  2 +-
  autogen.sh                 |  2 +-
  contrib/Makefile.am        |  2 +-
  contrib/stress.c           |  2 +-
  dump/Makefile.am           |  2 +-
  dump/main.c                |  2 +-
  fsck/Makefile.am           |  2 +-
  fsck/main.c                |  2 +-
  fuse/Makefile.am           |  2 +-
  fuse/macosx.h              |  2 +-
  fuse/main.c                |  2 +-
  man/Makefile.am            |  2 +-
  mkfs/Makefile.am           |  2 +-
  mkfs/main.c                |  2 +-
  mount/Makefile.am          |  2 +-
  mount/main.c               |  2 +-
  scripts/get-version-number |  2 +-
  18 files changed, 24 insertions(+), 24 deletions(-)
COPYING +7 -7
index e781cc21ff15..81aee791f173 100644
@@ -3,13 +3,13 @@ erofs-utils uses two different license patterns:
   - most liberofs files in `lib` and `include` directories
     use GPL-2.0+ OR MIT dual license;
 
- - all other files use GPL-2.0+ license, unless
-   explicitly stated otherwise.
+ - all other files use MIT license, unless explicitly stated
+   otherwise.
 
  Relevant licenses can be found in the LICENSES directory.
 
-This model is selected to emphasize that
-files in `lib` and `include` directories are designed to be included in
-3rd-party applications, while all other files are intended to be used
-"as is", as part of their intended scenarios, with no intention to
-support 3rd-party integration use cases.
+This model is selected to emphasize that erofs-utils can be integrated
+into various ecosystems as much as possible.
+
+However, liberofs should be GPL-2.0+ OR MIT dual license since some
+parts can be shared with the Linux kernel.
Makefile.am +1 -1
index 7cb93a697627..e79222e965a9 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  ACLOCAL_AMFLAGS = -I m4
 
autogen.sh +1 -1
index fd81db4d6fb3..89c510c35cab 100755
@@ -1,5 +1,5 @@
  #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  aclocal && \
  autoheader && \
contrib/Makefile.am +1 -1
index 4eb7abed8856..5bedb9441b2e 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS	= foreign
contrib/stress.c +1 -1
index 0ef8c67c126b..65773bce9e27 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * stress test for EROFS filesystem
   *
dump/Makefile.am +1 -1
index c2e0c745a640..2611fd28c762 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
dump/main.c +1 -1
index 78c50d511587..6c7258a5db40 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright (C) 2021-2022 HUAWEI, Inc.
   *             http://www.huawei.com/
fsck/Makefile.am +1 -1
index 488b401c8995..8eebadd7d1e5 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
fsck/main.c +1 -1
index 16a354f460a8..21ada195edab 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright 2021 Google LLC
   * Author: Daeho Jeong <[email protected]>
fuse/Makefile.am +1 -1
index 1e8f518bad1d..9fe560849336 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  AUTOMAKE_OPTIONS = foreign
  noinst_HEADERS = $(top_srcdir)/fuse/macosx.h
fuse/macosx.h +1 -1
index 81ac47f551d6..4bb4bb75d5a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: MIT */
  #ifdef __APPLE__
  #undef LIST_HEAD
  #endif
fuse/main.c +1 -1
index b6347828eacf..40f8684abe43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Created by Li Guifu <[email protected]>
   * Lowlevel added by Li Yiyan <[email protected]>
man/Makefile.am +1 -1
index b9b598954725..88bf3a16d995 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  dist_man_MANS = mkfs.erofs.1 dump.erofs.1 fsck.erofs.1
 
mkfs/Makefile.am +1 -1
index aaefc11dadc3..386455aced67 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
 
  AUTOMAKE_OPTIONS = foreign
  bin_PROGRAMS     = mkfs.erofs
mkfs/main.c +1 -1
index eb13abaec92b..5006f76fa73b 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
mount/Makefile.am +1 -1
index 7f6efd8b7cf5..637029d4475a 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: MIT
  # Makefile.am
 
  AUTOMAKE_OPTIONS = foreign
mount/main.c +1 -1
index b6a2deca4d85..e09e58533ecc 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: MIT
  #define _GNU_SOURCE
  #include <dirent.h>
  #include <fcntl.h>
scripts/get-version-number +1 -1
index d216b7a424e0..484baebf53c6 100755
@@ -1,5 +1,5 @@
  #!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: MIT
 
  scm_version()
  {
Reviewed-by Chengyu Zhu on v1 1/2
#6 lore raw
In reply to Gao Xiang
Quoted 1,179 lines

2026年4月2日 14:09,Gao Xiang <[email protected]> 写道:

Apache 2.0 is still too strict for some 3rd-party integration.

Let's switch to GPL-2.0+ OR MIT dual license since we're absolutely not working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---

COPYING                        |   6 +-
LICENSES/Apache-2.0            | 186 ---------------------------------
include/erofs/atomic.h         |   2 +-
include/erofs/bitops.h         |   2 +-
include/erofs/blobchunk.h      |   2 +-
include/erofs/block_list.h     |   2 +-
include/erofs/compress_hints.h |   2 +-
include/erofs/config.h         |   2 +-
include/erofs/decompress.h     |   2 +-
include/erofs/dedupe.h         |   2 +-
include/erofs/defs.h           |   2 +-
include/erofs/dir.h            |   2 +-
include/erofs/diskbuf.h        |   2 +-
include/erofs/err.h            |   2 +-
include/erofs/exclude.h        |   2 +-
include/erofs/importer.h       |   2 +-
include/erofs/inode.h          |   2 +-
include/erofs/internal.h       |   2 +-
include/erofs/io.h             |   2 +-
include/erofs/list.h           |   2 +-
include/erofs/lock.h           |   2 +-
include/erofs/print.h          |   2 +-
include/erofs/tar.h            |   2 +-
include/erofs/trace.h          |   2 +-
include/erofs/workqueue.h      |   2 +-
include/erofs/xattr.h          |   2 +-
lib/Makefile.am                |   2 +-
lib/backends/fanotify.c        |   2 +-
lib/backends/nbd.c             |   2 +-
lib/base64.c                   |   2 +-
lib/bitops.c                   |   2 +-
lib/blobchunk.c                |   2 +-
lib/block_list.c               |   2 +-
lib/cache.c                    |   2 +-
lib/compress.c                 |   2 +-
lib/compress_hints.c           |   2 +-
lib/compressor.c               |   2 +-
lib/compressor.h               |   2 +-
lib/compressor_deflate.c       |   2 +-
lib/compressor_libdeflate.c    |   2 +-
lib/compressor_liblzma.c       |   2 +-
lib/compressor_libzstd.c       |   2 +-
lib/compressor_lz4.c           |   2 +-
lib/compressor_lz4hc.c         |   2 +-
lib/config.c                   |   2 +-
lib/data.c                     |   2 +-
lib/decompress.c               |   2 +-
lib/dedupe.c                   |   2 +-
lib/dedupe_ext.c               |   2 +-
lib/dir.c                      |   2 +-
lib/diskbuf.c                  |   2 +-
lib/exclude.c                  |   2 +-
lib/fragments.c                |   2 +-
lib/global.c                   |   2 +-
lib/gzran.c                    |   2 +-
lib/importer.c                 |   2 +-
lib/inode.c                    |   2 +-
lib/io.c                       |   2 +-
lib/kite_deflate.c             |   2 +-
lib/liberofs_cache.h           |   2 +-
lib/liberofs_compress.h        |   2 +-
lib/liberofs_dockerconfig.h    |   2 +-
lib/liberofs_fanotify.h        |   2 +-
lib/liberofs_fragments.h       |   2 +-
lib/liberofs_gzran.h           |   2 +-
lib/liberofs_metabox.h         |   2 +-
lib/liberofs_nbd.h             |   2 +-
lib/liberofs_oci.h             |   2 +-
lib/liberofs_private.h         |   2 +-
lib/liberofs_rebuild.h         |   2 +-
lib/liberofs_s3.h              |   2 +-
lib/liberofs_uuid.h            |   2 +-
lib/metabox.c                  |   2 +-
lib/namei.c                    |   2 +-
lib/rebuild.c                  |   2 +-
lib/remotes/docker_config.c    |   2 +-
lib/remotes/oci.c              |   2 +-
lib/remotes/s3.c               |   2 +-
lib/rolling_hash.h             |   2 +-
lib/sha256.h                   |   2 +-
lib/super.c                    |   2 +-
lib/tar.c                      |   2 +-
lib/uuid.c                     |   2 +-
lib/uuid_unparse.c             |   2 +-
lib/vmdk.c                     |   2 +-
lib/workqueue.c                |   2 +-
lib/xattr.c                    |   2 +-
lib/zmap.c                     |   2 +-
88 files changed, 89 insertions(+), 275 deletions(-)

delete mode 100644 LICENSES/Apache-2.0

COPYING +0 -0
index 8767cae10b22..e781cc21ff15 100644
@@ -1,7 +1,7 @@

erofs-utils uses two different license patterns:

- most liberofs files in lib and include directories

COPYING +1 -1
-   use GPL-2.0+ OR Apache-2.0 dual license;
+   use GPL-2.0+ OR MIT dual license;
 
 - all other files use GPL-2.0+ license, unless
   explicitly stated otherwise.
@@ -9,7 +9,7 @@ erofs-utils uses two different license patterns:

Relevant licenses can be found in the LICENSES directory.

This model is selected to emphasize that

COPYING +2 -2
-files in `lib` and `include` directory are designed to be included into
-3rd-party applications, while all other files, are intended to be used
+files in `lib` and `include` directories are designed to be included in
+3rd-party applications, while all other files are intended to be used

"as is", as part of their intended scenarios, with no intention to support 3rd-party integration use cases.

LICENSES/Apache-2.0 deleted +0 -186
deleted file mode 100644
index f6c1877fae13..000000000000
@@ -1,186 +0,0 @@
-Valid-License-Identifier: Apache-2.0
-SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
-Usage-Guide:
-  The Apache-2.0 may only be used for dual-licensed files where the other
-  license is GPL2 compatible. If you end up using this it MUST be used
-  together with a GPL2 compatible license using "OR".
-  To use the Apache License version 2.0 put the following SPDX tag/value
-  pair into a comment according to the placement guidelines in the
-  licensing rules documentation:
-    SPDX-License-Identifier: Apache-2.0
-License-Text:
-
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control with
-that entity. For the purposes of this definition, "control" means (i) the
-power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty
-percent (50%) or more of the outstanding shares, or (iii) beneficial
-ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form,
-made available under the License, as indicated by a copyright notice that
-is included in or attached to the work (an example is provided in the
-Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent, as
-a whole, an original work of authorship. For the purposes of this License,
-Derivative Works shall not include works that remain separable from, or
-merely link (or bind by name) to the interfaces of, the Work and Derivative
-Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original
-version of the Work and any modifications or additions to that Work or
-Derivative Works thereof, that is intentionally submitted to Licensor for
-inclusion in the Work by the copyright owner or by an individual or Legal
-Entity authorized to submit on behalf of the copyright owner. For the
-purposes of this definition, "submitted" means any form of electronic,
-verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems that
-are managed by, or on behalf of, the Licensor for the purpose of discussing
-and improving the Work, but excluding communication that is conspicuously
-marked or otherwise designated in writing by the copyright owner as "Not a
-Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on
-behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable copyright license to
-   reproduce, prepare Derivative Works of, publicly display, publicly
-   perform, sublicense, and distribute the Work and such Derivative Works
-   in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
-   this section) patent license to make, have made, use, offer to sell,
-   sell, import, and otherwise transfer the Work, where such license
-   applies only to those patent claims licensable by such Contributor that
-   are necessarily infringed by their Contribution(s) alone or by
-   combination of their Contribution(s) with the Work to which such
-   Contribution(s) was submitted. If You institute patent litigation
-   against any entity (including a cross-claim or counterclaim in a
-   lawsuit) alleging that the Work or a Contribution incorporated within
-   the Work constitutes direct or contributory patent infringement, then
-   any patent licenses granted to You under this License for that Work
-   shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or
-   Derivative Works thereof in any medium, with or without modifications,
-   and in Source or Object form, provided that You meet the following
-   conditions:
-
-   a. You must give any other recipients of the Work or Derivative Works a
-      copy of this License; and
-
-   b. You must cause any modified files to carry prominent notices stating
-      that You changed the files; and
-
-   c. You must retain, in the Source form of any Derivative Works that You
-      distribute, all copyright, patent, trademark, and attribution notices
-      from the Source form of the Work, excluding those notices that do not
-      pertain to any part of the Derivative Works; and
-
-   d. If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained within
-      such NOTICE file, excluding those notices that do not pertain to any
-      part of the Derivative Works, in at least one of the following
-      places: within a NOTICE text file distributed as part of the
-      Derivative Works; within the Source form or documentation, if
-      provided along with the Derivative Works; or, within a display
-      generated by the Derivative Works, if and wherever such third-party
-      notices normally appear. The contents of the NOTICE file are for
-      informational purposes only and do not modify the License. You may
-      add Your own attribution notices within Derivative Works that You
-      distribute, alongside or as an addendum to the NOTICE text from the
-      Work, provided that such additional attribution notices cannot be
-      construed as modifying the License.
-
-    You may add Your own copyright statement to Your modifications and may
-    provide additional or different license terms and conditions for use,
-    reproduction, or distribution of Your modifications, or for any such
-    Derivative Works as a whole, provided Your use, reproduction, and
-    distribution of the Work otherwise complies with the conditions stated
-    in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any
-   Contribution intentionally submitted for inclusion in the Work by You to
-   the Licensor shall be under the terms and conditions of this License,
-   without any additional terms or conditions. Notwithstanding the above,
-   nothing herein shall supersede or modify the terms of any separate
-   license agreement you may have executed with Licensor regarding such
-   Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to
-   in writing, Licensor provides the Work (and each Contributor provides
-   its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-   OF ANY KIND, either express or implied, including, without limitation,
-   any warranties or conditions of TITLE, NON-INFRINGEMENT,
-   MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
-   responsible for determining the appropriateness of using or
-   redistributing the Work and assume any risks associated with Your
-   exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether
-   in tort (including negligence), contract, or otherwise, unless required
-   by applicable law (such as deliberate and grossly negligent acts) or
-   agreed to in writing, shall any Contributor be liable to You for
-   damages, including any direct, indirect, special, incidental, or
-   consequential damages of any character arising as a result of this
-   License or out of the use or inability to use the Work (including but
-   not limited to damages for loss of goodwill, work stoppage, computer
-   failure or malfunction, or any and all other commercial damages or
-   losses), even if such Contributor has been advised of the possibility of
-   such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the
-   Work or Derivative Works thereof, You may choose to offer, and charge a
-   fee for, acceptance of support, warranty, indemnity, or other liability
-   obligations and/or rights consistent with this License. However, in
-   accepting such obligations, You may act only on Your own behalf and on
-   Your sole responsibility, not on behalf of any other Contributor, and
-   only if You agree to indemnify, defend, and hold each Contributor
-   harmless for any liability incurred by, or claims asserted against, such
-   Contributor by reason of your accepting any such warranty or additional
-   liability.
-
-END OF TERMS AND CONDITIONS
include/erofs/atomic.h +1 -1
index 142590bd6c79..3aa19f6ae369 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2024 Alibaba Cloud
 */
include/erofs/bitops.h +1 -1
index 058642f5b190..f407cc95292e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_BITOPS_H
 #define __EROFS_BITOPS_H
 
include/erofs/blobchunk.h +1 -1
index 48fca63c6c15..1761fdd82432 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * erofs-utils/lib/blobchunk.h
 *
include/erofs/block_list.h +1 -1
index 9d06c9c47d2e..156a5a433ded 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C), 2021, Coolpad Group Limited.
 * Created by Yue Hu <[email protected]>
include/erofs/compress_hints.h +1 -1
index 6ccc03d213ea..3ab7bb4b67f1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <[email protected]>
include/erofs/config.h +1 -1
index bb303c48a0db..95d7e9f16065 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/decompress.h +1 -1
index 0d5548327b02..edc017c2b8e4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <[email protected]>
include/erofs/dedupe.h +1 -1
index f9caa6113d15..267d9b9f12c8 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2022 Alibaba Cloud
 */
include/erofs/defs.h +1 -1
index 71ca11b54ef8..ff87df9d3d51 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/dir.h +1 -1
index 5460ac48512f..4e0614dfbbce 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_DIR_H
 #define __EROFS_DIR_H
 
include/erofs/diskbuf.h +1 -1
index 29d9fe2cf52e..122890b2f919 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_DISKBUF_H
 #define __EROFS_DISKBUF_H
 
include/erofs/err.h +1 -1
index 59c8c9cc9ae3..7dacc917a4c1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/exclude.h +1 -1
index 3f17032b48db..0af39a0a5b05 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Created by Li Guifu <[email protected]>
 */
include/erofs/importer.h +1 -1
index 920488453c34..07e40b47954d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
include/erofs/inode.h +1 -1
index ba62ece9a7cc..bf089e83590b 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/internal.h +1 -1
index 671880f2db3c..c780228c7bfe 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2019 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/io.h +1 -1
index 9533efc2d20a..96309fde9646 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/list.h +1 -1
index a7e30ccc4258..e9208887ee80 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/lock.h +1 -1
index c6e30937aac4..884f23ea739e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LOCK_H
 #define __EROFS_LOCK_H
 
include/erofs/print.h +1 -1
index a896d75117de..fa979a3a2d46 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
include/erofs/tar.h +1 -1
index cdaef315442d..a8166336d220 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_TAR_H
 #define __EROFS_TAR_H
 
include/erofs/trace.h +1 -1
index 398e3318355d..fe6734073580 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2020 Gao Xiang <[email protected]>
 */
include/erofs/workqueue.h +1 -1
index 36037c381c4a..064246c2bfe4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_WORKQUEUE_H
 #define __EROFS_WORKQUEUE_H
 
include/erofs/xattr.h +1 -1
index 96546364f316..235688649592 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_XATTR_H
 #define __EROFS_XATTR_H
 
lib/Makefile.am +1 -1
index 5f8812f48c93..27bf71094bad 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+# SPDX-License-Identifier: GPL-2.0+ OR MIT
 

noinst_LTLIBRARIES = liberofs.la noinst_HEADERS = $(top_srcdir)/include/erofs_fs.h \

lib/backends/fanotify.c +1 -1
index bbe131ac11c2..cf8b61667705 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #define _GNU_SOURCE
 #include <errno.h>
 #include <fcntl.h>
lib/backends/nbd.c +1 -1
index da2733477f8e..c488053d99d3 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/base64.c +1 -1
index a45f7b6f2a1a..623d83cb9f2f 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "liberofs_base64.h"
 #include <string.h>
 
lib/bitops.c +1 -1
index bb0c9eeb917a..da012b233ac2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * erofs-utils/lib/bitops.c
 *
lib/blobchunk.c +1 -1
index 96c161b27091..e39bf6800059 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * erofs-utils/lib/blobchunk.c
 *
lib/block_list.c +1 -1
index f8dc9138bd92..e6b28424ad36 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C), 2021, Coolpad Group Limited.
 * Created by Yue Hu <[email protected]>
lib/cache.c +1 -1
index 4c7c3863275b..f964e4737767 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/compress.c +1 -1
index 4a0d890ae87d..62d2672cb665 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/compress_hints.c +1 -1
index 322ec97f474a..a4ff0038ebb5 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <[email protected]>
lib/compressor.c +1 -1
index cf55abcf5359..7593b336ffc8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/compressor.h +1 -1
index 86b45a759874..7b7ef37f8218 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/compressor_deflate.c +1 -1
index f567d2c731af..9521aec6914d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2023, Alibaba Cloud
 * Copyright (C) 2023, Gao Xiang <[email protected]>
lib/compressor_libdeflate.c +1 -1
index 18f5f7b4048c..da39e354974c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 #include "erofs/print.h"
 #include "erofs/config.h"
lib/compressor_liblzma.c +1 -1
index 49a90a23525a..ac5d02ea00a2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2021 Gao Xiang <[email protected]>
 */
lib/compressor_libzstd.c +1 -1
index 6330f445ffa6..06f16c272e80 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 #include "erofs/print.h"
 #include "erofs/config.h"
lib/compressor_lz4.c +1 -1
index f3d88b09fa4a..5f3530a7e6f0 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/compressor_lz4hc.c +1 -1
index 9955c0d717ac..073e33073a3d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/config.c +1 -1
index ab7eb01e1914..b7dbced071f7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/data.c +1 -1
index 6fd1389cc09f..1bb9269cb836 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2020 Gao Xiang <[email protected]>
 * Compression support by Huang Jianan <[email protected]>
lib/decompress.c +1 -1
index e66693c5883e..d23135e0cd43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <[email protected]>
lib/dedupe.c +1 -1
index bdd890cc2e82..91ea31cc3ec4 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2022 Alibaba Cloud
 */
lib/dedupe_ext.c +1 -1
index d7a9b737e428..ae00bbe5e03d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/dedupe.h"
 #include "liberofs_xxhash.h"
 #include <stdlib.h>
lib/dir.c +1 -1
index 98edb8e1695c..bf611d9b9678 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <stdlib.h>
 #include <sys/stat.h>
 #include "erofs/print.h"
lib/diskbuf.c +1 -1
index 0bf42da6a8af..b32a39adf67a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/diskbuf.h"
 #include "erofs/internal.h"
 #include "erofs/print.h"
lib/exclude.c +1 -1
index 5f6107b24a60..6beb46bc2def 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Created by Li Guifu <[email protected]>
 */
lib/fragments.c +1 -1
index 0f07e33b3679..13afce3be537 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C), 2022, Coolpad Group Limited.
 * Created by Yue Hu <[email protected]>
lib/global.c +1 -1
index c3d8aec875e9..938aa0a79422 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/gzran.c +1 -1
index b861c581e408..3973c1f37a75 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/importer.c +1 -1
index 26c86a0b0098..c404b0f7fadb 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/inode.c +1 -1
index 2cfc6c58bda8..c932981a47b7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018-2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/io.c +1 -1
index 0c5eb2c29989..3ba45ccf8cbd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2018 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/kite_deflate.c +1 -1
index 29e44b3b4a92..c1d3c6db7f48 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * erofs-utils/lib/kite_deflate.c
 *
lib/liberofs_cache.h +1 -1
index baac609fb49f..ddaca5497390 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2018 HUAWEI, Inc.
 *             http://www.huawei.com
lib/liberofs_compress.h +1 -1
index 4b9dd42f1318..da6eb1a00d9d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2019 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/liberofs_dockerconfig.h +1 -1
index 1580e1c329e5..6752926a8f58 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2026 Tencent, Inc.
 *             http://www.tencent.com/
lib/liberofs_fanotify.h +1 -1
index 965090ff2f22..6ecc0e26bcbc 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_FANOTIFY_H
 #define __EROFS_LIB_LIBEROFS_FANOTIFY_H
 
lib/liberofs_fragments.h +1 -1
index 11833ebc938d..cf549367bc5d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2022, Coolpad Group Limited.
 * Copyright (C) 2025 Alibaba Cloud
lib/liberofs_gzran.h +1 -1
index 443fe1558ac5..fa86cc3a7839 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/liberofs_metabox.h +1 -1
index bf4051cf18e2..f966c205d9a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_METABOX_H
 #define __EROFS_LIB_LIBEROFS_METABOX_H
 
lib/liberofs_nbd.h +1 -1
index 78c8af511bec..ec7adbf728d2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2025 Alibaba Cloud
 */
lib/liberofs_oci.h +1 -1
index 3b3d66dd449d..8eec3f720cd1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2025 Tencent, Inc.
 *             http://www.tencent.com/
lib/liberofs_private.h +1 -1
index ebd9e7034860..64bcae83d84c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 
 #ifdef HAVE_LIBSELINUX
 #include <selinux/selinux.h>
lib/liberofs_rebuild.h +1 -1
index 69802fb9542c..6459dbd42a64 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_LIBEROFS_REBUILD_H
 #define __EROFS_LIB_LIBEROFS_REBUILD_H
 
lib/liberofs_s3.h +1 -1
index f4886cd4ecf8..c81834785c5f 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2025 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/liberofs_uuid.h +1 -1
index 63b358a854d4..e8bb1be94fde 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_UUID_H
 #define __EROFS_LIB_UUID_H
 
lib/metabox.c +1 -1
index 12706aafdb36..d5ce9e3243b8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <stdlib.h>
 #include "erofs/inode.h"
 #include "erofs/importer.h"
lib/namei.c +1 -1
index 896e348bc3ee..f19e4b13d69a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Created by Li Guifu <[email protected]>
 */
lib/rebuild.c +1 -1
index f89a17c44193..7ab2b499923c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <stdlib.h>
lib/remotes/docker_config.c +1 -1
index 00db1bb6dc1d..8e236fca1e33 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2026 Tencent, Inc.
 *             http://www.tencent.com/
lib/remotes/oci.c +1 -1
index f96be13387a7..80a1e38b1531 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 Tencent, Inc.
 *             http://www.tencent.com/
lib/remotes/s3.c +1 -1
index 768232ad0b66..1385e16018cd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2025 HUAWEI, Inc.
 *             http://www.huawei.com/
lib/rolling_hash.h +1 -1
index 448db34edc1b..cfabfca87109 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 /*
 * Copyright (C) 2022 Alibaba Cloud
 */
lib/sha256.h +1 -1
index 851b80c722d3..6bcf03c26805 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 #ifndef __EROFS_LIB_SHA256_H
 #define __EROFS_LIB_SHA256_H
 
lib/super.c +1 -1
index 088c9a01fc2f..6ad27c054333 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Created by Li Guifu <[email protected]>
 */
lib/tar.c +1 -1
index 599e41342255..87a6a619dd76 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
lib/uuid.c +1 -1
index 1fae857f2c8d..3b1bd38e63a9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2023 Norbert Lange <[email protected]>
 */
lib/uuid_unparse.c +1 -1
index 3255c4bdd7a5..890acda8ce96 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2023 Norbert Lange <[email protected]>
 */
lib/vmdk.c +1 -1
index 8080c515bf75..316a8ffc94b2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include "erofs/internal.h"
 
 static int erofs_vmdk_desc_add_extent(FILE *f, u64 sectors,
lib/workqueue.c +1 -1
index 1f3fa7ca34ed..8c78d7920fe9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 #include <pthread.h>
 #include <stdlib.h>
 #include "erofs/print.h"
lib/xattr.c +1 -1
index 565070a698dc..b11cd3b681ae 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * Copyright (C) 2019 Li Guifu <[email protected]>
 *                    Gao Xiang <[email protected]>
lib/zmap.c +1 -1
index 4a6507726ba8..5b44b60ed586 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
 * (a large amount of code was adapted from Linux kernel. )
 *
Signature · 1 line
2.43.5
Reviewed-by on v1 1/2
#7 lore raw
In reply to Gao Xiang
Quoted 1,174 lines · Gao Xiang

Apache 2.0 is still too strict for some 3rd-party integration.

Let's switch to GPL-2.0+ OR MIT dual license since we're absolutely not working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

---
  COPYING                        |   6 +-
  LICENSES/Apache-2.0            | 186 ---------------------------------
  include/erofs/atomic.h         |   2 +-
  include/erofs/bitops.h         |   2 +-
  include/erofs/blobchunk.h      |   2 +-
  include/erofs/block_list.h     |   2 +-
  include/erofs/compress_hints.h |   2 +-
  include/erofs/config.h         |   2 +-
  include/erofs/decompress.h     |   2 +-
  include/erofs/dedupe.h         |   2 +-
  include/erofs/defs.h           |   2 +-
  include/erofs/dir.h            |   2 +-
  include/erofs/diskbuf.h        |   2 +-
  include/erofs/err.h            |   2 +-
  include/erofs/exclude.h        |   2 +-
  include/erofs/importer.h       |   2 +-
  include/erofs/inode.h          |   2 +-
  include/erofs/internal.h       |   2 +-
  include/erofs/io.h             |   2 +-
  include/erofs/list.h           |   2 +-
  include/erofs/lock.h           |   2 +-
  include/erofs/print.h          |   2 +-
  include/erofs/tar.h            |   2 +-
  include/erofs/trace.h          |   2 +-
  include/erofs/workqueue.h      |   2 +-
  include/erofs/xattr.h          |   2 +-
  lib/Makefile.am                |   2 +-
  lib/backends/fanotify.c        |   2 +-
  lib/backends/nbd.c             |   2 +-
  lib/base64.c                   |   2 +-
  lib/bitops.c                   |   2 +-
  lib/blobchunk.c                |   2 +-
  lib/block_list.c               |   2 +-
  lib/cache.c                    |   2 +-
  lib/compress.c                 |   2 +-
  lib/compress_hints.c           |   2 +-
  lib/compressor.c               |   2 +-
  lib/compressor.h               |   2 +-
  lib/compressor_deflate.c       |   2 +-
  lib/compressor_libdeflate.c    |   2 +-
  lib/compressor_liblzma.c       |   2 +-
  lib/compressor_libzstd.c       |   2 +-
  lib/compressor_lz4.c           |   2 +-
  lib/compressor_lz4hc.c         |   2 +-
  lib/config.c                   |   2 +-
  lib/data.c                     |   2 +-
  lib/decompress.c               |   2 +-
  lib/dedupe.c                   |   2 +-
  lib/dedupe_ext.c               |   2 +-
  lib/dir.c                      |   2 +-
  lib/diskbuf.c                  |   2 +-
  lib/exclude.c                  |   2 +-
  lib/fragments.c                |   2 +-
  lib/global.c                   |   2 +-
  lib/gzran.c                    |   2 +-
  lib/importer.c                 |   2 +-
  lib/inode.c                    |   2 +-
  lib/io.c                       |   2 +-
  lib/kite_deflate.c             |   2 +-
  lib/liberofs_cache.h           |   2 +-
  lib/liberofs_compress.h        |   2 +-
  lib/liberofs_dockerconfig.h    |   2 +-
  lib/liberofs_fanotify.h        |   2 +-
  lib/liberofs_fragments.h       |   2 +-
  lib/liberofs_gzran.h           |   2 +-
  lib/liberofs_metabox.h         |   2 +-
  lib/liberofs_nbd.h             |   2 +-
  lib/liberofs_oci.h             |   2 +-
  lib/liberofs_private.h         |   2 +-
  lib/liberofs_rebuild.h         |   2 +-
  lib/liberofs_s3.h              |   2 +-
  lib/liberofs_uuid.h            |   2 +-
  lib/metabox.c                  |   2 +-
  lib/namei.c                    |   2 +-
  lib/rebuild.c                  |   2 +-
  lib/remotes/docker_config.c    |   2 +-
  lib/remotes/oci.c              |   2 +-
  lib/remotes/s3.c               |   2 +-
  lib/rolling_hash.h             |   2 +-
  lib/sha256.h                   |   2 +-
  lib/super.c                    |   2 +-
  lib/tar.c                      |   2 +-
  lib/uuid.c                     |   2 +-
  lib/uuid_unparse.c             |   2 +-
  lib/vmdk.c                     |   2 +-
  lib/workqueue.c                |   2 +-
  lib/xattr.c                    |   2 +-
  lib/zmap.c                     |   2 +-
  88 files changed, 89 insertions(+), 275 deletions(-)

delete mode 100644 LICENSES/Apache-2.0

COPYING +3 -3
index 8767cae10b22..e781cc21ff15 100644
@@ -1,7 +1,7 @@
  erofs-utils uses two different license patterns:
 
   - most liberofs files in `lib` and `include` directories
-   use GPL-2.0+ OR Apache-2.0 dual license;
+   use GPL-2.0+ OR MIT dual license;
 
   - all other files use GPL-2.0+ license, unless
     explicitly stated otherwise.
@@ -9,7 +9,7 @@ erofs-utils uses two different license patterns:
  Relevant licenses can be found in the LICENSES directory.
 
  This model is selected to emphasize that
-files in `lib` and `include` directory are designed to be included into
-3rd-party applications, while all other files, are intended to be used
+files in `lib` and `include` directories are designed to be included in
+3rd-party applications, while all other files are intended to be used
  "as is", as part of their intended scenarios, with no intention to
  support 3rd-party integration use cases.
LICENSES/Apache-2.0 deleted +0 -186
deleted file mode 100644
index f6c1877fae13..000000000000
@@ -1,186 +0,0 @@
-Valid-License-Identifier: Apache-2.0
-SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
-Usage-Guide:
-  The Apache-2.0 may only be used for dual-licensed files where the other
-  license is GPL2 compatible. If you end up using this it MUST be used
-  together with a GPL2 compatible license using "OR".
-  To use the Apache License version 2.0 put the following SPDX tag/value
-  pair into a comment according to the placement guidelines in the
-  licensing rules documentation:
-    SPDX-License-Identifier: Apache-2.0
-License-Text:
-
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control with
-that entity. For the purposes of this definition, "control" means (i) the
-power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty
-percent (50%) or more of the outstanding shares, or (iii) beneficial
-ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form,
-made available under the License, as indicated by a copyright notice that
-is included in or attached to the work (an example is provided in the
-Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent, as
-a whole, an original work of authorship. For the purposes of this License,
-Derivative Works shall not include works that remain separable from, or
-merely link (or bind by name) to the interfaces of, the Work and Derivative
-Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original
-version of the Work and any modifications or additions to that Work or
-Derivative Works thereof, that is intentionally submitted to Licensor for
-inclusion in the Work by the copyright owner or by an individual or Legal
-Entity authorized to submit on behalf of the copyright owner. For the
-purposes of this definition, "submitted" means any form of electronic,
-verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems that
-are managed by, or on behalf of, the Licensor for the purpose of discussing
-and improving the Work, but excluding communication that is conspicuously
-marked or otherwise designated in writing by the copyright owner as "Not a
-Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on
-behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable copyright license to
-   reproduce, prepare Derivative Works of, publicly display, publicly
-   perform, sublicense, and distribute the Work and such Derivative Works
-   in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
-   this section) patent license to make, have made, use, offer to sell,
-   sell, import, and otherwise transfer the Work, where such license
-   applies only to those patent claims licensable by such Contributor that
-   are necessarily infringed by their Contribution(s) alone or by
-   combination of their Contribution(s) with the Work to which such
-   Contribution(s) was submitted. If You institute patent litigation
-   against any entity (including a cross-claim or counterclaim in a
-   lawsuit) alleging that the Work or a Contribution incorporated within
-   the Work constitutes direct or contributory patent infringement, then
-   any patent licenses granted to You under this License for that Work
-   shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or
-   Derivative Works thereof in any medium, with or without modifications,
-   and in Source or Object form, provided that You meet the following
-   conditions:
-
-   a. You must give any other recipients of the Work or Derivative Works a
-      copy of this License; and
-
-   b. You must cause any modified files to carry prominent notices stating
-      that You changed the files; and
-
-   c. You must retain, in the Source form of any Derivative Works that You
-      distribute, all copyright, patent, trademark, and attribution notices
-      from the Source form of the Work, excluding those notices that do not
-      pertain to any part of the Derivative Works; and
-
-   d. If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained within
-      such NOTICE file, excluding those notices that do not pertain to any
-      part of the Derivative Works, in at least one of the following
-      places: within a NOTICE text file distributed as part of the
-      Derivative Works; within the Source form or documentation, if
-      provided along with the Derivative Works; or, within a display
-      generated by the Derivative Works, if and wherever such third-party
-      notices normally appear. The contents of the NOTICE file are for
-      informational purposes only and do not modify the License. You may
-      add Your own attribution notices within Derivative Works that You
-      distribute, alongside or as an addendum to the NOTICE text from the
-      Work, provided that such additional attribution notices cannot be
-      construed as modifying the License.
-
-    You may add Your own copyright statement to Your modifications and may
-    provide additional or different license terms and conditions for use,
-    reproduction, or distribution of Your modifications, or for any such
-    Derivative Works as a whole, provided Your use, reproduction, and
-    distribution of the Work otherwise complies with the conditions stated
-    in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any
-   Contribution intentionally submitted for inclusion in the Work by You to
-   the Licensor shall be under the terms and conditions of this License,
-   without any additional terms or conditions. Notwithstanding the above,
-   nothing herein shall supersede or modify the terms of any separate
-   license agreement you may have executed with Licensor regarding such
-   Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to
-   in writing, Licensor provides the Work (and each Contributor provides
-   its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-   OF ANY KIND, either express or implied, including, without limitation,
-   any warranties or conditions of TITLE, NON-INFRINGEMENT,
-   MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
-   responsible for determining the appropriateness of using or
-   redistributing the Work and assume any risks associated with Your
-   exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether
-   in tort (including negligence), contract, or otherwise, unless required
-   by applicable law (such as deliberate and grossly negligent acts) or
-   agreed to in writing, shall any Contributor be liable to You for
-   damages, including any direct, indirect, special, incidental, or
-   consequential damages of any character arising as a result of this
-   License or out of the use or inability to use the Work (including but
-   not limited to damages for loss of goodwill, work stoppage, computer
-   failure or malfunction, or any and all other commercial damages or
-   losses), even if such Contributor has been advised of the possibility of
-   such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the
-   Work or Derivative Works thereof, You may choose to offer, and charge a
-   fee for, acceptance of support, warranty, indemnity, or other liability
-   obligations and/or rights consistent with this License. However, in
-   accepting such obligations, You may act only on Your own behalf and on
-   Your sole responsibility, not on behalf of any other Contributor, and
-   only if You agree to indemnify, defend, and hold each Contributor
-   harmless for any liability incurred by, or claims asserted against, such
-   Contributor by reason of your accepting any such warranty or additional
-   liability.
-
-END OF TERMS AND CONDITIONS
include/erofs/atomic.h +1 -1
index 142590bd6c79..3aa19f6ae369 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2024 Alibaba Cloud
   */
include/erofs/bitops.h +1 -1
index 058642f5b190..f407cc95292e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_BITOPS_H
  #define __EROFS_BITOPS_H
 
include/erofs/blobchunk.h +1 -1
index 48fca63c6c15..1761fdd82432 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * erofs-utils/lib/blobchunk.h
   *
include/erofs/block_list.h +1 -1
index 9d06c9c47d2e..156a5a433ded 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2021, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
include/erofs/compress_hints.h +1 -1
index 6ccc03d213ea..3ab7bb4b67f1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
include/erofs/config.h +1 -1
index bb303c48a0db..95d7e9f16065 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/decompress.h +1 -1
index 0d5548327b02..edc017c2b8e4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
include/erofs/dedupe.h +1 -1
index f9caa6113d15..267d9b9f12c8 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
include/erofs/defs.h +1 -1
index 71ca11b54ef8..ff87df9d3d51 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/dir.h +1 -1
index 5460ac48512f..4e0614dfbbce 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_DIR_H
  #define __EROFS_DIR_H
 
include/erofs/diskbuf.h +1 -1
index 29d9fe2cf52e..122890b2f919 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_DISKBUF_H
  #define __EROFS_DISKBUF_H
 
include/erofs/err.h +1 -1
index 59c8c9cc9ae3..7dacc917a4c1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/exclude.h +1 -1
index 3f17032b48db..0af39a0a5b05 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Created by Li Guifu <[email protected]>
   */
include/erofs/importer.h +1 -1
index 920488453c34..07e40b47954d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
include/erofs/inode.h +1 -1
index ba62ece9a7cc..bf089e83590b 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/internal.h +1 -1
index 671880f2db3c..c780228c7bfe 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/io.h +1 -1
index 9533efc2d20a..96309fde9646 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/list.h +1 -1
index a7e30ccc4258..e9208887ee80 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/lock.h +1 -1
index c6e30937aac4..884f23ea739e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LOCK_H
  #define __EROFS_LOCK_H
 
include/erofs/print.h +1 -1
index a896d75117de..fa979a3a2d46 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/tar.h +1 -1
index cdaef315442d..a8166336d220 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_TAR_H
  #define __EROFS_TAR_H
 
include/erofs/trace.h +1 -1
index 398e3318355d..fe6734073580 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2020 Gao Xiang <[email protected]>
   */
include/erofs/workqueue.h +1 -1
index 36037c381c4a..064246c2bfe4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_WORKQUEUE_H
  #define __EROFS_WORKQUEUE_H
 
include/erofs/xattr.h +1 -1
index 96546364f316..235688649592 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_XATTR_H
  #define __EROFS_XATTR_H
 
lib/Makefile.am +1 -1
index 5f8812f48c93..27bf71094bad 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+# SPDX-License-Identifier: GPL-2.0+ OR MIT
 
  noinst_LTLIBRARIES = liberofs.la
  noinst_HEADERS = $(top_srcdir)/include/erofs_fs.h \
lib/backends/fanotify.c +1 -1
index bbe131ac11c2..cf8b61667705 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #define _GNU_SOURCE
  #include <errno.h>
  #include <fcntl.h>
lib/backends/nbd.c +1 -1
index da2733477f8e..c488053d99d3 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/base64.c +1 -1
index a45f7b6f2a1a..623d83cb9f2f 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "liberofs_base64.h"
  #include <string.h>
 
lib/bitops.c +1 -1
index bb0c9eeb917a..da012b233ac2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/bitops.c
   *
lib/blobchunk.c +1 -1
index 96c161b27091..e39bf6800059 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/blobchunk.c
   *
lib/block_list.c +1 -1
index f8dc9138bd92..e6b28424ad36 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2021, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
lib/cache.c +1 -1
index 4c7c3863275b..f964e4737767 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compress.c +1 -1
index 4a0d890ae87d..62d2672cb665 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compress_hints.c +1 -1
index 322ec97f474a..a4ff0038ebb5 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
lib/compressor.c +1 -1
index cf55abcf5359..7593b336ffc8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor.h +1 -1
index 86b45a759874..7b7ef37f8218 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor_deflate.c +1 -1
index f567d2c731af..9521aec6914d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023, Alibaba Cloud
   * Copyright (C) 2023, Gao Xiang <[email protected]>
lib/compressor_libdeflate.c +1 -1
index 18f5f7b4048c..da39e354974c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
  #include "erofs/print.h"
  #include "erofs/config.h"
lib/compressor_liblzma.c +1 -1
index 49a90a23525a..ac5d02ea00a2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2021 Gao Xiang <[email protected]>
   */
lib/compressor_libzstd.c +1 -1
index 6330f445ffa6..06f16c272e80 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
  #include "erofs/print.h"
  #include "erofs/config.h"
lib/compressor_lz4.c +1 -1
index f3d88b09fa4a..5f3530a7e6f0 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor_lz4hc.c +1 -1
index 9955c0d717ac..073e33073a3d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/config.c +1 -1
index ab7eb01e1914..b7dbced071f7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/data.c +1 -1
index 6fd1389cc09f..1bb9269cb836 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2020 Gao Xiang <[email protected]>
   * Compression support by Huang Jianan <[email protected]>
lib/decompress.c +1 -1
index e66693c5883e..d23135e0cd43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
lib/dedupe.c +1 -1
index bdd890cc2e82..91ea31cc3ec4 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
lib/dedupe_ext.c +1 -1
index d7a9b737e428..ae00bbe5e03d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/dedupe.h"
  #include "liberofs_xxhash.h"
  #include <stdlib.h>
lib/dir.c +1 -1
index 98edb8e1695c..bf611d9b9678 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <stdlib.h>
  #include <sys/stat.h>
  #include "erofs/print.h"
lib/diskbuf.c +1 -1
index 0bf42da6a8af..b32a39adf67a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/diskbuf.h"
  #include "erofs/internal.h"
  #include "erofs/print.h"
lib/exclude.c +1 -1
index 5f6107b24a60..6beb46bc2def 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/fragments.c +1 -1
index 0f07e33b3679..13afce3be537 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2022, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
lib/global.c +1 -1
index c3d8aec875e9..938aa0a79422 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/gzran.c +1 -1
index b861c581e408..3973c1f37a75 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/importer.c +1 -1
index 26c86a0b0098..c404b0f7fadb 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/inode.c +1 -1
index 2cfc6c58bda8..c932981a47b7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/io.c +1 -1
index 0c5eb2c29989..3ba45ccf8cbd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/kite_deflate.c +1 -1
index 29e44b3b4a92..c1d3c6db7f48 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/kite_deflate.c
   *
lib/liberofs_cache.h +1 -1
index baac609fb49f..ddaca5497390 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com
lib/liberofs_compress.h +1 -1
index 4b9dd42f1318..da6eb1a00d9d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/liberofs_dockerconfig.h +1 -1
index 1580e1c329e5..6752926a8f58 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2026 Tencent, Inc.
   *             http://www.tencent.com/
lib/liberofs_fanotify.h +1 -1
index 965090ff2f22..6ecc0e26bcbc 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_FANOTIFY_H
  #define __EROFS_LIB_LIBEROFS_FANOTIFY_H
 
lib/liberofs_fragments.h +1 -1
index 11833ebc938d..cf549367bc5d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022, Coolpad Group Limited.
   * Copyright (C) 2025 Alibaba Cloud
lib/liberofs_gzran.h +1 -1
index 443fe1558ac5..fa86cc3a7839 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/liberofs_metabox.h +1 -1
index bf4051cf18e2..f966c205d9a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_METABOX_H
  #define __EROFS_LIB_LIBEROFS_METABOX_H
 
lib/liberofs_nbd.h +1 -1
index 78c8af511bec..ec7adbf728d2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/liberofs_oci.h +1 -1
index 3b3d66dd449d..8eec3f720cd1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Tencent, Inc.
   *             http://www.tencent.com/
lib/liberofs_private.h +1 -1
index ebd9e7034860..64bcae83d84c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 
  #ifdef HAVE_LIBSELINUX
  #include <selinux/selinux.h>
lib/liberofs_rebuild.h +1 -1
index 69802fb9542c..6459dbd42a64 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_REBUILD_H
  #define __EROFS_LIB_LIBEROFS_REBUILD_H
 
lib/liberofs_s3.h +1 -1
index f4886cd4ecf8..c81834785c5f 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/liberofs_uuid.h +1 -1
index 63b358a854d4..e8bb1be94fde 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_UUID_H
  #define __EROFS_LIB_UUID_H
 
lib/metabox.c +1 -1
index 12706aafdb36..d5ce9e3243b8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <stdlib.h>
  #include "erofs/inode.h"
  #include "erofs/importer.h"
lib/namei.c +1 -1
index 896e348bc3ee..f19e4b13d69a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/rebuild.c +1 -1
index f89a17c44193..7ab2b499923c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #define _GNU_SOURCE
  #include <unistd.h>
  #include <stdlib.h>
lib/remotes/docker_config.c +1 -1
index 00db1bb6dc1d..8e236fca1e33 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2026 Tencent, Inc.
   *             http://www.tencent.com/
lib/remotes/oci.c +1 -1
index f96be13387a7..80a1e38b1531 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Tencent, Inc.
   *             http://www.tencent.com/
lib/remotes/s3.c +1 -1
index 768232ad0b66..1385e16018cd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/rolling_hash.h +1 -1
index 448db34edc1b..cfabfca87109 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
lib/sha256.h +1 -1
index 851b80c722d3..6bcf03c26805 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_SHA256_H
  #define __EROFS_LIB_SHA256_H
 
lib/super.c +1 -1
index 088c9a01fc2f..6ad27c054333 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/tar.c +1 -1
index 599e41342255..87a6a619dd76 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <unistd.h>
  #include <stdlib.h>
  #include <string.h>
lib/uuid.c +1 -1
index 1fae857f2c8d..3b1bd38e63a9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023 Norbert Lange <[email protected]>
   */
lib/uuid_unparse.c +1 -1
index 3255c4bdd7a5..890acda8ce96 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023 Norbert Lange <[email protected]>
   */
lib/vmdk.c +1 -1
index 8080c515bf75..316a8ffc94b2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
 
  static int erofs_vmdk_desc_add_extent(FILE *f, u64 sectors,
lib/workqueue.c +1 -1
index 1f3fa7ca34ed..8c78d7920fe9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <pthread.h>
  #include <stdlib.h>
  #include "erofs/print.h"
lib/xattr.c +1 -1
index 565070a698dc..b11cd3b681ae 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2019 Li Guifu <[email protected]>
   *                    Gao Xiang <[email protected]>
lib/zmap.c +1 -1
index 4a6507726ba8..5b44b60ed586 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * (a large amount of code was adapted from Linux kernel. )
   *
Reviewed-by on v1 1/2
#8 lore raw
In reply to Gao Xiang
Quoted 7 lines · Gao Xiang

Apache 2.0 is still too strict for some 3rd-party integration.

Let's switch to GPL-2.0+ OR MIT dual license since we're absolutely not working on secret rocket science, so licenses should not be a bottleneck to innovation in the Cloud Native and AI era.

Thanks,
Hongbo

Quoted 1,167 lines
---
  COPYING                        |   6 +-
  LICENSES/Apache-2.0            | 186 ---------------------------------
  include/erofs/atomic.h         |   2 +-
  include/erofs/bitops.h         |   2 +-
  include/erofs/blobchunk.h      |   2 +-
  include/erofs/block_list.h     |   2 +-
  include/erofs/compress_hints.h |   2 +-
  include/erofs/config.h         |   2 +-
  include/erofs/decompress.h     |   2 +-
  include/erofs/dedupe.h         |   2 +-
  include/erofs/defs.h           |   2 +-
  include/erofs/dir.h            |   2 +-
  include/erofs/diskbuf.h        |   2 +-
  include/erofs/err.h            |   2 +-
  include/erofs/exclude.h        |   2 +-
  include/erofs/importer.h       |   2 +-
  include/erofs/inode.h          |   2 +-
  include/erofs/internal.h       |   2 +-
  include/erofs/io.h             |   2 +-
  include/erofs/list.h           |   2 +-
  include/erofs/lock.h           |   2 +-
  include/erofs/print.h          |   2 +-
  include/erofs/tar.h            |   2 +-
  include/erofs/trace.h          |   2 +-
  include/erofs/workqueue.h      |   2 +-
  include/erofs/xattr.h          |   2 +-
  lib/Makefile.am                |   2 +-
  lib/backends/fanotify.c        |   2 +-
  lib/backends/nbd.c             |   2 +-
  lib/base64.c                   |   2 +-
  lib/bitops.c                   |   2 +-
  lib/blobchunk.c                |   2 +-
  lib/block_list.c               |   2 +-
  lib/cache.c                    |   2 +-
  lib/compress.c                 |   2 +-
  lib/compress_hints.c           |   2 +-
  lib/compressor.c               |   2 +-
  lib/compressor.h               |   2 +-
  lib/compressor_deflate.c       |   2 +-
  lib/compressor_libdeflate.c    |   2 +-
  lib/compressor_liblzma.c       |   2 +-
  lib/compressor_libzstd.c       |   2 +-
  lib/compressor_lz4.c           |   2 +-
  lib/compressor_lz4hc.c         |   2 +-
  lib/config.c                   |   2 +-
  lib/data.c                     |   2 +-
  lib/decompress.c               |   2 +-
  lib/dedupe.c                   |   2 +-
  lib/dedupe_ext.c               |   2 +-
  lib/dir.c                      |   2 +-
  lib/diskbuf.c                  |   2 +-
  lib/exclude.c                  |   2 +-
  lib/fragments.c                |   2 +-
  lib/global.c                   |   2 +-
  lib/gzran.c                    |   2 +-
  lib/importer.c                 |   2 +-
  lib/inode.c                    |   2 +-
  lib/io.c                       |   2 +-
  lib/kite_deflate.c             |   2 +-
  lib/liberofs_cache.h           |   2 +-
  lib/liberofs_compress.h        |   2 +-
  lib/liberofs_dockerconfig.h    |   2 +-
  lib/liberofs_fanotify.h        |   2 +-
  lib/liberofs_fragments.h       |   2 +-
  lib/liberofs_gzran.h           |   2 +-
  lib/liberofs_metabox.h         |   2 +-
  lib/liberofs_nbd.h             |   2 +-
  lib/liberofs_oci.h             |   2 +-
  lib/liberofs_private.h         |   2 +-
  lib/liberofs_rebuild.h         |   2 +-
  lib/liberofs_s3.h              |   2 +-
  lib/liberofs_uuid.h            |   2 +-
  lib/metabox.c                  |   2 +-
  lib/namei.c                    |   2 +-
  lib/rebuild.c                  |   2 +-
  lib/remotes/docker_config.c    |   2 +-
  lib/remotes/oci.c              |   2 +-
  lib/remotes/s3.c               |   2 +-
  lib/rolling_hash.h             |   2 +-
  lib/sha256.h                   |   2 +-
  lib/super.c                    |   2 +-
  lib/tar.c                      |   2 +-
  lib/uuid.c                     |   2 +-
  lib/uuid_unparse.c             |   2 +-
  lib/vmdk.c                     |   2 +-
  lib/workqueue.c                |   2 +-
  lib/xattr.c                    |   2 +-
  lib/zmap.c                     |   2 +-
  88 files changed, 89 insertions(+), 275 deletions(-)

delete mode 100644 LICENSES/Apache-2.0

COPYING +3 -3
index 8767cae10b22..e781cc21ff15 100644
@@ -1,7 +1,7 @@
  erofs-utils uses two different license patterns:
 
   - most liberofs files in `lib` and `include` directories
-   use GPL-2.0+ OR Apache-2.0 dual license;
+   use GPL-2.0+ OR MIT dual license;
 
   - all other files use GPL-2.0+ license, unless
     explicitly stated otherwise.
@@ -9,7 +9,7 @@ erofs-utils uses two different license patterns:
  Relevant licenses can be found in the LICENSES directory.
 
  This model is selected to emphasize that
-files in `lib` and `include` directory are designed to be included into
-3rd-party applications, while all other files, are intended to be used
+files in `lib` and `include` directories are designed to be included in
+3rd-party applications, while all other files are intended to be used
  "as is", as part of their intended scenarios, with no intention to
  support 3rd-party integration use cases.
LICENSES/Apache-2.0 deleted +0 -186
deleted file mode 100644
index f6c1877fae13..000000000000
@@ -1,186 +0,0 @@
-Valid-License-Identifier: Apache-2.0
-SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
-Usage-Guide:
-  The Apache-2.0 may only be used for dual-licensed files where the other
-  license is GPL2 compatible. If you end up using this it MUST be used
-  together with a GPL2 compatible license using "OR".
-  To use the Apache License version 2.0 put the following SPDX tag/value
-  pair into a comment according to the placement guidelines in the
-  licensing rules documentation:
-    SPDX-License-Identifier: Apache-2.0
-License-Text:
-
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control with
-that entity. For the purposes of this definition, "control" means (i) the
-power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty
-percent (50%) or more of the outstanding shares, or (iii) beneficial
-ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form,
-made available under the License, as indicated by a copyright notice that
-is included in or attached to the work (an example is provided in the
-Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent, as
-a whole, an original work of authorship. For the purposes of this License,
-Derivative Works shall not include works that remain separable from, or
-merely link (or bind by name) to the interfaces of, the Work and Derivative
-Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original
-version of the Work and any modifications or additions to that Work or
-Derivative Works thereof, that is intentionally submitted to Licensor for
-inclusion in the Work by the copyright owner or by an individual or Legal
-Entity authorized to submit on behalf of the copyright owner. For the
-purposes of this definition, "submitted" means any form of electronic,
-verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems that
-are managed by, or on behalf of, the Licensor for the purpose of discussing
-and improving the Work, but excluding communication that is conspicuously
-marked or otherwise designated in writing by the copyright owner as "Not a
-Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on
-behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable copyright license to
-   reproduce, prepare Derivative Works of, publicly display, publicly
-   perform, sublicense, and distribute the Work and such Derivative Works
-   in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this
-   License, each Contributor hereby grants to You a perpetual, worldwide,
-   non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
-   this section) patent license to make, have made, use, offer to sell,
-   sell, import, and otherwise transfer the Work, where such license
-   applies only to those patent claims licensable by such Contributor that
-   are necessarily infringed by their Contribution(s) alone or by
-   combination of their Contribution(s) with the Work to which such
-   Contribution(s) was submitted. If You institute patent litigation
-   against any entity (including a cross-claim or counterclaim in a
-   lawsuit) alleging that the Work or a Contribution incorporated within
-   the Work constitutes direct or contributory patent infringement, then
-   any patent licenses granted to You under this License for that Work
-   shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or
-   Derivative Works thereof in any medium, with or without modifications,
-   and in Source or Object form, provided that You meet the following
-   conditions:
-
-   a. You must give any other recipients of the Work or Derivative Works a
-      copy of this License; and
-
-   b. You must cause any modified files to carry prominent notices stating
-      that You changed the files; and
-
-   c. You must retain, in the Source form of any Derivative Works that You
-      distribute, all copyright, patent, trademark, and attribution notices
-      from the Source form of the Work, excluding those notices that do not
-      pertain to any part of the Derivative Works; and
-
-   d. If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained within
-      such NOTICE file, excluding those notices that do not pertain to any
-      part of the Derivative Works, in at least one of the following
-      places: within a NOTICE text file distributed as part of the
-      Derivative Works; within the Source form or documentation, if
-      provided along with the Derivative Works; or, within a display
-      generated by the Derivative Works, if and wherever such third-party
-      notices normally appear. The contents of the NOTICE file are for
-      informational purposes only and do not modify the License. You may
-      add Your own attribution notices within Derivative Works that You
-      distribute, alongside or as an addendum to the NOTICE text from the
-      Work, provided that such additional attribution notices cannot be
-      construed as modifying the License.
-
-    You may add Your own copyright statement to Your modifications and may
-    provide additional or different license terms and conditions for use,
-    reproduction, or distribution of Your modifications, or for any such
-    Derivative Works as a whole, provided Your use, reproduction, and
-    distribution of the Work otherwise complies with the conditions stated
-    in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any
-   Contribution intentionally submitted for inclusion in the Work by You to
-   the Licensor shall be under the terms and conditions of this License,
-   without any additional terms or conditions. Notwithstanding the above,
-   nothing herein shall supersede or modify the terms of any separate
-   license agreement you may have executed with Licensor regarding such
-   Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to
-   in writing, Licensor provides the Work (and each Contributor provides
-   its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-   OF ANY KIND, either express or implied, including, without limitation,
-   any warranties or conditions of TITLE, NON-INFRINGEMENT,
-   MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
-   responsible for determining the appropriateness of using or
-   redistributing the Work and assume any risks associated with Your
-   exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether
-   in tort (including negligence), contract, or otherwise, unless required
-   by applicable law (such as deliberate and grossly negligent acts) or
-   agreed to in writing, shall any Contributor be liable to You for
-   damages, including any direct, indirect, special, incidental, or
-   consequential damages of any character arising as a result of this
-   License or out of the use or inability to use the Work (including but
-   not limited to damages for loss of goodwill, work stoppage, computer
-   failure or malfunction, or any and all other commercial damages or
-   losses), even if such Contributor has been advised of the possibility of
-   such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the
-   Work or Derivative Works thereof, You may choose to offer, and charge a
-   fee for, acceptance of support, warranty, indemnity, or other liability
-   obligations and/or rights consistent with this License. However, in
-   accepting such obligations, You may act only on Your own behalf and on
-   Your sole responsibility, not on behalf of any other Contributor, and
-   only if You agree to indemnify, defend, and hold each Contributor
-   harmless for any liability incurred by, or claims asserted against, such
-   Contributor by reason of your accepting any such warranty or additional
-   liability.
-
-END OF TERMS AND CONDITIONS
include/erofs/atomic.h +1 -1
index 142590bd6c79..3aa19f6ae369 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2024 Alibaba Cloud
   */
include/erofs/bitops.h +1 -1
index 058642f5b190..f407cc95292e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_BITOPS_H
  #define __EROFS_BITOPS_H
 
include/erofs/blobchunk.h +1 -1
index 48fca63c6c15..1761fdd82432 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * erofs-utils/lib/blobchunk.h
   *
include/erofs/block_list.h +1 -1
index 9d06c9c47d2e..156a5a433ded 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2021, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
include/erofs/compress_hints.h +1 -1
index 6ccc03d213ea..3ab7bb4b67f1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
include/erofs/config.h +1 -1
index bb303c48a0db..95d7e9f16065 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/decompress.h +1 -1
index 0d5548327b02..edc017c2b8e4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
include/erofs/dedupe.h +1 -1
index f9caa6113d15..267d9b9f12c8 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
include/erofs/defs.h +1 -1
index 71ca11b54ef8..ff87df9d3d51 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/dir.h +1 -1
index 5460ac48512f..4e0614dfbbce 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_DIR_H
  #define __EROFS_DIR_H
 
include/erofs/diskbuf.h +1 -1
index 29d9fe2cf52e..122890b2f919 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_DISKBUF_H
  #define __EROFS_DISKBUF_H
 
include/erofs/err.h +1 -1
index 59c8c9cc9ae3..7dacc917a4c1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/exclude.h +1 -1
index 3f17032b48db..0af39a0a5b05 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Created by Li Guifu <[email protected]>
   */
include/erofs/importer.h +1 -1
index 920488453c34..07e40b47954d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
include/erofs/inode.h +1 -1
index ba62ece9a7cc..bf089e83590b 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/internal.h +1 -1
index 671880f2db3c..c780228c7bfe 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/io.h +1 -1
index 9533efc2d20a..96309fde9646 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/list.h +1 -1
index a7e30ccc4258..e9208887ee80 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/lock.h +1 -1
index c6e30937aac4..884f23ea739e 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LOCK_H
  #define __EROFS_LOCK_H
 
include/erofs/print.h +1 -1
index a896d75117de..fa979a3a2d46 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
include/erofs/tar.h +1 -1
index cdaef315442d..a8166336d220 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_TAR_H
  #define __EROFS_TAR_H
 
include/erofs/trace.h +1 -1
index 398e3318355d..fe6734073580 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2020 Gao Xiang <[email protected]>
   */
include/erofs/workqueue.h +1 -1
index 36037c381c4a..064246c2bfe4 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_WORKQUEUE_H
  #define __EROFS_WORKQUEUE_H
 
include/erofs/xattr.h +1 -1
index 96546364f316..235688649592 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_XATTR_H
  #define __EROFS_XATTR_H
 
lib/Makefile.am +1 -1
index 5f8812f48c93..27bf71094bad 100644
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+# SPDX-License-Identifier: GPL-2.0+ OR MIT
 
  noinst_LTLIBRARIES = liberofs.la
  noinst_HEADERS = $(top_srcdir)/include/erofs_fs.h \
lib/backends/fanotify.c +1 -1
index bbe131ac11c2..cf8b61667705 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #define _GNU_SOURCE
  #include <errno.h>
  #include <fcntl.h>
lib/backends/nbd.c +1 -1
index da2733477f8e..c488053d99d3 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/base64.c +1 -1
index a45f7b6f2a1a..623d83cb9f2f 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "liberofs_base64.h"
  #include <string.h>
 
lib/bitops.c +1 -1
index bb0c9eeb917a..da012b233ac2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/bitops.c
   *
lib/blobchunk.c +1 -1
index 96c161b27091..e39bf6800059 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/blobchunk.c
   *
lib/block_list.c +1 -1
index f8dc9138bd92..e6b28424ad36 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2021, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
lib/cache.c +1 -1
index 4c7c3863275b..f964e4737767 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compress.c +1 -1
index 4a0d890ae87d..62d2672cb665 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compress_hints.c +1 -1
index 322ec97f474a..a4ff0038ebb5 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
lib/compressor.c +1 -1
index cf55abcf5359..7593b336ffc8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor.h +1 -1
index 86b45a759874..7b7ef37f8218 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor_deflate.c +1 -1
index f567d2c731af..9521aec6914d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023, Alibaba Cloud
   * Copyright (C) 2023, Gao Xiang <[email protected]>
lib/compressor_libdeflate.c +1 -1
index 18f5f7b4048c..da39e354974c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
  #include "erofs/print.h"
  #include "erofs/config.h"
lib/compressor_liblzma.c +1 -1
index 49a90a23525a..ac5d02ea00a2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2021 Gao Xiang <[email protected]>
   */
lib/compressor_libzstd.c +1 -1
index 6330f445ffa6..06f16c272e80 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
  #include "erofs/print.h"
  #include "erofs/config.h"
lib/compressor_lz4.c +1 -1
index f3d88b09fa4a..5f3530a7e6f0 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/compressor_lz4hc.c +1 -1
index 9955c0d717ac..073e33073a3d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/config.c +1 -1
index ab7eb01e1914..b7dbced071f7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/data.c +1 -1
index 6fd1389cc09f..1bb9269cb836 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2020 Gao Xiang <[email protected]>
   * Compression support by Huang Jianan <[email protected]>
lib/decompress.c +1 -1
index e66693c5883e..d23135e0cd43 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
   * Created by Huang Jianan <[email protected]>
lib/dedupe.c +1 -1
index bdd890cc2e82..91ea31cc3ec4 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
lib/dedupe_ext.c +1 -1
index d7a9b737e428..ae00bbe5e03d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/dedupe.h"
  #include "liberofs_xxhash.h"
  #include <stdlib.h>
lib/dir.c +1 -1
index 98edb8e1695c..bf611d9b9678 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <stdlib.h>
  #include <sys/stat.h>
  #include "erofs/print.h"
lib/diskbuf.c +1 -1
index 0bf42da6a8af..b32a39adf67a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/diskbuf.h"
  #include "erofs/internal.h"
  #include "erofs/print.h"
lib/exclude.c +1 -1
index 5f6107b24a60..6beb46bc2def 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/fragments.c +1 -1
index 0f07e33b3679..13afce3be537 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C), 2022, Coolpad Group Limited.
   * Created by Yue Hu <[email protected]>
lib/global.c +1 -1
index c3d8aec875e9..938aa0a79422 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/gzran.c +1 -1
index b861c581e408..3973c1f37a75 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/importer.c +1 -1
index 26c86a0b0098..c404b0f7fadb 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/inode.c +1 -1
index 2cfc6c58bda8..c932981a47b7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018-2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/io.c +1 -1
index 0c5eb2c29989..3ba45ccf8cbd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/kite_deflate.c +1 -1
index 29e44b3b4a92..c1d3c6db7f48 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * erofs-utils/lib/kite_deflate.c
   *
lib/liberofs_cache.h +1 -1
index baac609fb49f..ddaca5497390 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2018 HUAWEI, Inc.
   *             http://www.huawei.com
lib/liberofs_compress.h +1 -1
index 4b9dd42f1318..da6eb1a00d9d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2019 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/liberofs_dockerconfig.h +1 -1
index 1580e1c329e5..6752926a8f58 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2026 Tencent, Inc.
   *             http://www.tencent.com/
lib/liberofs_fanotify.h +1 -1
index 965090ff2f22..6ecc0e26bcbc 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_FANOTIFY_H
  #define __EROFS_LIB_LIBEROFS_FANOTIFY_H
 
lib/liberofs_fragments.h +1 -1
index 11833ebc938d..cf549367bc5d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022, Coolpad Group Limited.
   * Copyright (C) 2025 Alibaba Cloud
lib/liberofs_gzran.h +1 -1
index 443fe1558ac5..fa86cc3a7839 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/liberofs_metabox.h +1 -1
index bf4051cf18e2..f966c205d9a2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_METABOX_H
  #define __EROFS_LIB_LIBEROFS_METABOX_H
 
lib/liberofs_nbd.h +1 -1
index 78c8af511bec..ec7adbf728d2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Alibaba Cloud
   */
lib/liberofs_oci.h +1 -1
index 3b3d66dd449d..8eec3f720cd1 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 Tencent, Inc.
   *             http://www.tencent.com/
lib/liberofs_private.h +1 -1
index ebd9e7034860..64bcae83d84c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
 
  #ifdef HAVE_LIBSELINUX
  #include <selinux/selinux.h>
lib/liberofs_rebuild.h +1 -1
index 69802fb9542c..6459dbd42a64 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_LIBEROFS_REBUILD_H
  #define __EROFS_LIB_LIBEROFS_REBUILD_H
 
lib/liberofs_s3.h +1 -1
index f4886cd4ecf8..c81834785c5f 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2025 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/liberofs_uuid.h +1 -1
index 63b358a854d4..e8bb1be94fde 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_UUID_H
  #define __EROFS_LIB_UUID_H
 
lib/metabox.c +1 -1
index 12706aafdb36..d5ce9e3243b8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <stdlib.h>
  #include "erofs/inode.h"
  #include "erofs/importer.h"
lib/namei.c +1 -1
index 896e348bc3ee..f19e4b13d69a 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/rebuild.c +1 -1
index f89a17c44193..7ab2b499923c 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #define _GNU_SOURCE
  #include <unistd.h>
  #include <stdlib.h>
lib/remotes/docker_config.c +1 -1
index 00db1bb6dc1d..8e236fca1e33 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2026 Tencent, Inc.
   *             http://www.tencent.com/
lib/remotes/oci.c +1 -1
index f96be13387a7..80a1e38b1531 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 Tencent, Inc.
   *             http://www.tencent.com/
lib/remotes/s3.c +1 -1
index 768232ad0b66..1385e16018cd 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2025 HUAWEI, Inc.
   *             http://www.huawei.com/
lib/rolling_hash.h +1 -1
index 448db34edc1b..cfabfca87109 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  /*
   * Copyright (C) 2022 Alibaba Cloud
   */
lib/sha256.h +1 -1
index 851b80c722d3..6bcf03c26805 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
  #ifndef __EROFS_LIB_SHA256_H
  #define __EROFS_LIB_SHA256_H
 
lib/super.c +1 -1
index 088c9a01fc2f..6ad27c054333 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Created by Li Guifu <[email protected]>
   */
lib/tar.c +1 -1
index 599e41342255..87a6a619dd76 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <unistd.h>
  #include <stdlib.h>
  #include <string.h>
lib/uuid.c +1 -1
index 1fae857f2c8d..3b1bd38e63a9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023 Norbert Lange <[email protected]>
   */
lib/uuid_unparse.c +1 -1
index 3255c4bdd7a5..890acda8ce96 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2023 Norbert Lange <[email protected]>
   */
lib/vmdk.c +1 -1
index 8080c515bf75..316a8ffc94b2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include "erofs/internal.h"
 
  static int erofs_vmdk_desc_add_extent(FILE *f, u64 sectors,
lib/workqueue.c +1 -1
index 1f3fa7ca34ed..8c78d7920fe9 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  #include <pthread.h>
  #include <stdlib.h>
  #include "erofs/print.h"
lib/xattr.c +1 -1
index 565070a698dc..b11cd3b681ae 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * Copyright (C) 2019 Li Guifu <[email protected]>
   *                    Gao Xiang <[email protected]>
lib/zmap.c +1 -1
index 4a6507726ba8..5b44b60ed586 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
  /*
   * (a large amount of code was adapted from Linux kernel. )
   *