This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new 7191fa3  release: skip redundant ASF-product NOTICEs in the binary 
NOTICE
7191fa3 is described below

commit 7191fa348db9457f47c008dd2c806735abedd6e1
Author: Wu Sheng <[email protected]>
AuthorDate: Thu May 21 10:18:01 2026 +0800

    release: skip redundant ASF-product NOTICEs in the binary NOTICE
    
    Apache ECharts (and any ASF dep) ships only the generic ASF attribution in
    its NOTICE — the same legal entity our own root NOTICE already credits — so
    reproducing it per-dep is redundant. Skip the NOTICE pass-through for deps 
in
    ASF_PRODUCTS, but only when the NOTICE still matches the generic ASF
    boilerplate; if such a dep ever adds a specific attribution it stops 
matching
    and is included again, so no required notice is silently dropped. The dep's
    LICENSE text is still reproduced under licenses/ (license reproduction is
    unaffected).
---
 dist-material/release-docs/NOTICE |  7 +------
 scripts/collect-dist-licenses.mjs | 41 +++++++++++++++++++++++++++++++--------
 2 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/dist-material/release-docs/NOTICE 
b/dist-material/release-docs/NOTICE
index 5fe353b..2c7c16d 100644
--- a/dist-material/release-docs/NOTICE
+++ b/dist-material/release-docs/NOTICE
@@ -9,10 +9,5 @@ This binary distribution bundles third-party software, whose 
own NOTICE
 files (where present) are reproduced below verbatim.
 ========================================================================
 
------- [email protected] ------
-Apache ECharts
-Copyright 2017-2025 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (https://www.apache.org/).
+(No third-party NOTICE files present in bundled dependencies.)
 
diff --git a/scripts/collect-dist-licenses.mjs 
b/scripts/collect-dist-licenses.mjs
index d9c3f53..944a362 100644
--- a/scripts/collect-dist-licenses.mjs
+++ b/scripts/collect-dist-licenses.mjs
@@ -214,6 +214,26 @@ function noticeYear() {
   return String(new Date().getUTCFullYear());
 }
 
+// Apache-produced dependencies whose NOTICE is just the generic ASF
+// attribution. That attribution is already carried by our own root NOTICE
+// (same legal entity), so reproducing it per-dep is redundant noise. The
+// skip is GUARDED by isGenericAsfNotice() below — if a listed dep's NOTICE
+// ever gains a specific attribution it stops matching and is included
+// again, so we never silently drop a required notice.
+const ASF_PRODUCTS = new Set(['echarts']);
+
+// Matches the boilerplate every ASF project ships and nothing more:
+//   Apache <Product>
+//   Copyright <year[-year]> The Apache Software Foundation
+//   This product includes software developed at
+//   The Apache Software Foundation (https://www.apache.org/).
+const GENERIC_ASF_NOTICE =
+  /^Apache .+\s+Copyright\s+\d{4}(?:-\d{4})?\s+The Apache Software 
Foundation\s+This product includes software developed at\s+The Apache Software 
Foundation\s+\(https?:\/\/www\.apache\.org\/?\)\.?\s*$/;
+
+function isRedundantAsfNotice(name, noticeText) {
+  return ASF_PRODUCTS.has(name) && GENERIC_ASF_NOTICE.test(noticeText.trim());
+}
+
 const packages = collectPackages();
 
 mkdirSync(distDir, { recursive: true });
@@ -251,14 +271,19 @@ for (const pkg of packages) {
   }
   const noticeFile = pickFile(pkg.path, NOTICE_FILE_PATTERNS);
   if (noticeFile) {
-    if (!existsSync(outDir)) mkdirSync(outDir, { recursive: true });
-    const dest = join(outDir, relative(pkg.path, noticeFile));
-    mkdirSync(dirname(dest), { recursive: true });
-    cpSync(noticeFile, dest);
-    entry.noticeFile = relative(distDir, dest);
-    noticePieces.push(
-      `------ ${pkg.name}@${pkg.version} ------\n${readFileSync(noticeFile, 
'utf8').trim()}\n`,
-    );
+    const noticeText = readFileSync(noticeFile, 'utf8');
+    // ASF-product NOTICEs that carry only the generic ASF attribution are
+    // already covered by our root NOTICE — don't reproduce them.
+    if (!isRedundantAsfNotice(pkg.name, noticeText)) {
+      if (!existsSync(outDir)) mkdirSync(outDir, { recursive: true });
+      const dest = join(outDir, relative(pkg.path, noticeFile));
+      mkdirSync(dirname(dest), { recursive: true });
+      cpSync(noticeFile, dest);
+      entry.noticeFile = relative(distDir, dest);
+      noticePieces.push(
+        `------ ${pkg.name}@${pkg.version} ------\n${noticeText.trim()}\n`,
+      );
+    }
   }
 
   report.push(entry);

Reply via email to