Skip to content

The linux archives carry musl's COPYRIGHT, and the windows ones the MinGW-w64 runtime's notice - #143

Merged
closer-claudio merged 2 commits into
mainfrom
claudio/20261115-musl
Nov 16, 2026
Merged

closer-claudio merged 2 commits into
mainfrom
claudio/20261115-musl

Conversation

@closer-claudio

@closer-claudio closer-claudio commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Why

The C runtime a static curl is linked against is in the binary, and the archives said nothing of it (#140). curl-for-win's package carries no licence for either, and its manifest names them on toolchain lines, which licences.sh passes over.

  • linux: the curl is static on musl (.musl 1.2.5-3.1~deb13u1 in the manifest).
  • windows: curl.exe is statically linked against the MinGW-w64 runtime, whose own notice opens: "This program or library was built using MinGW-w64 and statically linked against the MinGW-w64 runtime. Some parts of the runtime are under licenses which require that the copyright and license notices are included when distributing the code in binary form."

🛠️ What

Two commits.

  • licences.sh puts musl's own COPYRIGHT under licenses/musl/ wherever the manifest names musl. The text is upstream's file at the tag, notices/musl-1.2.5-COPYRIGHT, kept by version: the manifest's version, ahead of the distribution's revision, names the file, so a package built against another musl stops the build until that version's text is added.
  • The same for COPYING.MinGW-w64-runtime.txt under licenses/mingw-w64/, wherever the manifest names llvm-mingw. The runtime is the one that llvm-mingw release builds, at the mingw-w64 commit its build-mingw-w64.sh names (ee9bd87 for 20261104; mingw-w64 has no tag for the 15.0.0 the manifest prints), so the text is kept by llvm-mingw release.
  • test-binary.sh holds a linux archive to the first and a windows archive to the second.
  • README.md: the two files, and why the compiler's own runtime has none.

🧪 How

  • V: on an unpacked linux package with the manifest at musl 1.2.5 the file is carried, byte for byte; at 1.2.6, the package links musl 1.2.6, and this repository has no musl-1.2.6-COPYRIGHT, exit 1.
  • V: the windows import here carries the notice in both archives; with the manifest at another llvm-mingw, licences.sh stops, naming the file it lacks.
  • V: just lint green.
  • V: the linux legs' smoke test, and the windows legs on their own runners, in this pull request's CI.

📝 Notes

  • winpthreads, a library of mingw-w64 with a notice of its own, is not linked into curl.exe, on either architecture: of the fourteen static libraries in curl-for-win's package (lib/*.a, the ones curl.exe is made of), none refers to a winpthreads function. The only symbols with pthread in their name are zstd's and LibreSSL's own wrappers over the Win32 API (ZSTD_pthread_create, ZSTD_pthread_join, _pthread_once_win32_cb), and curl.exe imports no libwinpthread DLL. So no notice is owed for it.
  • compiler-rt's builtins are in the binaries too (the linux link names libclang_rt.builtins.a) and get a README sentence, not a file: LLVM's licence at 22.1.8 excepts "portions of this Software ... embedded into an Object form" by compiling from sections 4(a), 4(b) and 4(d) of Apache 2.0, and LLVM's developer policy offers the older contributions to compiler_rt under MIT so that runtime libraries do "not subject those applications to the binary redistribution clause".
  • A curl-for-win bump that moves musl or llvm-mingw stops those legs until the text for the new one is added: one more line of the bump's audit.
  • The MinGW-w64 text is named LICENSE-… because .gitattributes keeps files of that name byte for byte, trailing spaces included.

closer-claudio and others added 2 commits November 15, 2026 20:10
The linux curl is statically linked against musl, so musl's code is in
the binary, and the archive said nothing of it
(#140): curl-for-win's package
carries no licence for musl, and its manifest names it on a toolchain
line (`.musl 1.2.5-3.1~deb13u1`), which licences.sh passes over.

licences.sh now puts musl's own COPYRIGHT under licenses/musl/ wherever
the manifest names musl. The text is upstream's file at the tag,
notices/musl-1.2.5-COPYRIGHT (git.musl-libc.org, v1.2.5), not the
distribution's restatement, and it is kept by version: the manifest's
version, ahead of the distribution's revision, names the file, so a
package built against another musl stops the build until that
version's text has been read and added.

test-binary.sh holds an archive whose manifest names musl to the file,
and a linux archive to a manifest that names musl.

Here, on an unpacked linux package: with the manifest at 1.2.5 the file
is carried, byte for byte; at 1.2.6, "the package links musl 1.2.6, and
this repository has no musl-1.2.6-COPYRIGHT", exit 1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
The windows curl.exe is statically linked against the MinGW-w64
runtime, and that runtime's own notice opens by saying what follows
from it: "This program or library was built using MinGW-w64 and
statically linked against the MinGW-w64 runtime. Some parts of the
runtime are under licenses which require that the copyright and license
notices are included when distributing the code in binary form."
curl-for-win's package carries no such file, and its manifest names the
toolchain on dot lines, which licences.sh passed over.

licences.sh puts COPYING.MinGW-w64-runtime.txt under licenses/mingw-w64/
wherever the manifest names llvm-mingw. The runtime is the one that
llvm-mingw release builds, at the mingw-w64 commit its
build-mingw-w64.sh names (ee9bd87 for 20261104; mingw-w64 has no tag
for the 15.0.0 the manifest prints), so the text is kept by llvm-mingw
release, notices/LICENSE-mingw-w64-runtime-llvm-mingw-20261104 (the
name .gitattributes keeps byte for byte, trailing spaces included), and a package
built with another release stops the build until its text is added.

test-binary.sh holds a windows archive to the file.

The compiler's own runtime is in the binaries too, compiler-rt's
builtins (the linux link names libclang_rt.builtins.a), and gets a
sentence in the README where the other two get a file: LLVM's licence
at 22.1.8 excepts "portions of this Software ... embedded into an
Object form" by compiling from sections 4(a), 4(b) and 4(d) of Apache
2.0, the ones that ask for the licence and notices, and LLVM's
developer policy offers the older contributions to compiler_rt under
MIT so that runtime libraries do "not subject those applications to
the binary redistribution clause".

Here: the windows import carries the file in both archives; with the
manifest at another llvm-mingw, licences.sh stops, naming the file it
lacks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
@closer-claudio
closer-claudio marked this pull request as ready for review November 16, 2026 04:43
@closer-claudio

Copy link
Copy Markdown
Contributor Author

Reviewed at 2bafc85

1 similar comment
@closer-claudio

Copy link
Copy Markdown
Contributor Author

Reviewed at 2bafc85

@closer-claudio
closer-claudio merged commit bab1caa into main Nov 16, 2026
12 checks passed
@closer-claudio
closer-claudio deleted the claudio/20261115-musl branch November 16, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants