Read the license files of the SQLite driver's modules

The license notices stopped on two files of the modules that
modernc.org/sqlite brings, which the daemon will link:

- modernc.org/sqlite ships LICENSE-SQLITE, SQLite's dedication to the
  public domain, whose wording the generator did not know. It now reads
  as "public domain", the term modernc's own notices use.
- modernc.org/memory ships LICENSE-LOGO, which holds only the address
  of the image its logo.png comes from. No package links that image, so
  LICENSE-LOGO no longer counts as a license file.

Nothing links these modules yet, so the notices do not change here.

Part of stage 1d of docs/plans/job-store.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-12-01 16:39:48 -06:00
1 parent 4eb620dde0
commit 341353f702
3 files changed
+9 -1

No files matched your search

+5 -1
View File
@@ -167,9 +167,13 @@ func licenseFiles(dir string) ([]string, error) {
// isLicenseFile reports whether a file name, in any letter case, is that of
// a license: LICENSE, LICENCE, COPYING or UNLICENSE, perhaps with a suffix
// such as -MIT, and with no extension or that of a text file.
// such as -MIT, and with no extension or that of a text file. LICENSE-LOGO
// is not one: it covers a project's logo image, which no package links.
func isLicenseFile(name string) bool {
stem := textStem(name)
if stem == "license-logo" || stem == "licence-logo" {
return false
}
for _, base := range []string{"license", "licence", "copying", "unlicense"} {
if stem == base || strings.HasPrefix(stem, base+"-") {
return true
+1
View File
@@ -91,6 +91,7 @@ var licenseMarkers = []struct{ id, phrase string }{
{"MPL-2.0", "mozilla public license version 2.0"},
{"MPL-2.0", "mozilla public license, version 2.0"},
{"Unlicense", "this is free and unencumbered software released into the public domain"},
{"public domain", "all of the code and documentation in sqlite has been dedicated to the public domain"},
}
// bsdThirdClause is in BSD-3-Clause and not in BSD-2-Clause.
+3
View File
@@ -48,6 +48,7 @@ func TestClassify(t *testing.T) {
{"ISC", "Permission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted", []string{"ISC"}},
{"MPL-2.0", "Mozilla Public License Version 2.0\n==================================", []string{"MPL-2.0"}},
{"Unlicense", "This is free and unencumbered software released into the public domain.", []string{"Unlicense"}},
{"SQLite's dedication", "SQLite Is Public Domain\n\nAll of the code and documentation in SQLite has been dedicated to the public\ndomain by the authors.", []string{"public domain"}},
{"in the order given", mitText + "\n\n" + apacheText, []string{"MIT", "Apache-2.0"}},
{"each named once", mitText + "\n\n" + bsd3Text + "\n\n" + mitText, []string{"MIT", "BSD-3-Clause"}},
{"BSD clauses read up to the next license", bsd2Text + "\n\n" + apacheText + "\n\n" + bsd3Text, []string{"BSD-2-Clause", "Apache-2.0", "BSD-3-Clause"}},
@@ -80,6 +81,8 @@ func TestFileNames(t *testing.T) {
{"licenses_test.go", false, false},
{"README.md", false, false},
{"PATENTS", false, false},
{"LICENSE-LOGO", false, false},
{"license-logo.txt", false, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {