Repository navigation
hadolint, at upstream commit 1d901b9, for linux amd64 and arm64: a static GPL-3 binary with its source offer - #82
Merged
Conversation
closer-claudio
force-pushed
the
claudio/20261115-hadolint
branch
from
November 16, 2026 03:28
eac1150 to
2121b97
Compare
closer-claudio
force-pushed
the
claudio/20261115-hadolint
branch
2 times, most recently
from
November 16, 2026 06:01
11bd0d8 to
fe3a887
Compare
Contributor
Author
|
Reviewed at fe3a887 |
closer-claudio
marked this pull request as ready for review
November 16, 2026 06:23
closer-claudio
enabled auto-merge
November 16, 2026 06:24
A consumer's differential needs hadolint as an oracle at one exact commit of upstream's master (1d901b9), which no release carries: the last one, 2.15.1, is 51 commits behind and differs in the JSON formatter and eight rules. So it is built here, for linux alone, the way upstream builds its own static release: in an alpine container, GHC 9.10.2 and cabal, `--enable-executable-static`. Its inputs, and how each is held. The image by digest (hadolint/versions.env). The source, GHC and cabal-install in pins.yaml, GHC's tarballs through the release manager's PGP signature; cabal-install signs its SHA256SUMS with a detached signature, which no verify method reads, so it is `download`. The alpine packages are installed into the image at whatever alpine serves, the linker and the assembler as much as the libraries, so every package the container then holds (76, the same on both architectures) is compared with hadolint/apk.lock and the build stops when one moved. Alpine keeps one version of a package: a build at an old tag stops then, and says which. The Haskell dependencies by a freeze file and an index-state of our own, since upstream commits neither and resolves on the day of the build; the build freezes again and stops if the plan differs. Which alpine packages are in the binary is measured, not listed: the link writes its map, every archive and object the map names is asked of apk, and the set has to be hadolint/apk-linked's: musl-dev, gmp-static, gcc (its start files) and libgcc-static. zlib and libstdc++ are installed and the linker takes nothing from them; ncurses neither. GHC compiles for the machine it runs on. The build groups gain a second kind, native_groups: a group of it is built on a runner of each linux architecture, for that runner's platform alone, and `just build-matrix` gives the workflows objects (tools, runner, name) where it gave strings. `just hadolint` passes over every platform that is not the host's linux one. The binary is GPL-3 and statically linked, so the archive is a GPL work and carries what that asks: - LICENSE (GPL-3) and COPYING.LESSER (LGPL-3): GMP is linked in through GHC's integers, and the LGPL's section 4 is met by its 4(d)(0), the library's source and the application's "object code and/or source code ... needed for reproducing the Combined Work"; - NOTICES, from the build's own plan: the libraries the executable depends on, to the end, each with the licence files at the top of its source archive (Hackage) or of GHC's release. Of a package cabal builds whole, the libraries' dependencies alone are followed: its Setup's are not linked (xml-conduit's asks for Cabal and cabal-doctest). And the texts kept in hadolint/licenses by version for what those files do not carry: musl, gcc's runtime exception, the libffi GHC links into its runtime, and xxHash, which GHC's runtime and hashable each compile into themselves from a header that carries its terms. A package with no licence file, or a version with no text, stops the build. A licence carried only inside a source file is found by reading, as that one was, not by the build; - SOURCE, the offer of the corresponding source, in the archive so that one passed on without its release page still carries it: hadolint at the commit, GHC's source archive (its libraries and its libffi are in it: read from the archive's listing), each Hackage package, each alpine package with the commit of aports that built it (from apk's own database), and this recipe. hadolint/smoke.sh runs the binary on a fixed Dockerfile, requires the JSON report of DL3006, the three files beside it, the xxHash part, and that neither file names cabal-doctest. It runs where the binary is built, in the recipe, and on the published archive in the release's smoke legs; `just test` does not pay for a compiler's build. The sentences of the workflows and of the README that said every tool is cross-compiled by one host, with no container, say the exception. Measured in CI: on both architectures the archive is the same bytes built twice in one job (`just rebuild`), and the same bytes in a second, separate run of the same commit, the same day. At another time it is the same bytes for as long as alpine serves the locked packages, and the build stops when it does not. A leg takes about fifteen minutes for its two builds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
closer-claudio
force-pushed
the
claudio/20261115-hadolint
branch
from
November 16, 2026 06:54
fe3a887 to
2d7d421
Compare
Contributor
Author
|
Reviewed at 2d7d421 |
1 similar comment
Contributor
Author
|
Reviewed at 2d7d421 |
apostasie
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Why
A consumer's differential needs hadolint as an oracle at one exact commit of upstream's master,
1d901b9. No release carries it: the last one, 2.15.1, is 51 commits behind and differs in the JSON formatter and eight rules, so a differential against it would report upstream's own history as the consumer's defects.🛠️ What
hadolint/): the way upstream builds its own static release, in an alpine container with GHC 9.10.2 and cabal,--enable-executable-static.build.shstarts the container,in-container.shruns in it,smoke.shruns the result.hadolint/versions.env);pins.yaml, GHC's tarballs through the release manager's PGP signature;hadolint/apk.lock: the build stops when alpine has moved one;cabal.project.freezeand an index-state of our own (upstream commits neither); the build freezes again and stops if the plan differs.apk, and the set has to behadolint/apk-linked's:musl-dev,gmp-static,gcc(its start files) andlibgcc-static. zlib, libstdc++ and ncurses are installed and the linker takes nothing from them..justfile,ci.yaml,release.yaml): GHC compiles for the machine it runs on, sonative_groupsare built on a runner of each linux architecture, for that runner's platform alone.just build-matrixgives the workflows objects (tools, runner, name) where it gave strings.LICENSE(GPL-3) andCOPYING.LESSER(LGPL-3, for GMP, linked in through GHC's integers);NOTICES, from the build's own plan: the libraries the executable depends on, to the end (of a package cabal builds whole, the libraries' dependencies alone: a Setup's are not linked), each with the licence files at the top of its source archive or of GHC's release; and the texts kept inhadolint/licensesby version for what those do not carry: musl, gcc's runtime exception, the libffi GHC links into its runtime, the xxHash thathashablecompiles into itself;SOURCE, the offer of the corresponding source: hadolint at the commit, GHC's source archive, each Hackage package, each alpine package with the commit of aports that built it, and this recipe.README.md,hadolint/README.md, the release notes' source section, and the sentences of the workflows and the README that said every tool is cross-compiled by one host with no container.🧪 How
just rebuild, in the build legs), and the same sha256 in two attempts of this run: amd64b09dd7dd…, arm6415491a25….apk-linkednaming zlib-static and not libgcc-static, both legs stopped on the difference (run 43806200271, an earlier cut of this change); the list is now what was measured.Haskell Dockerfile Linter 2.15.1, the JSON report of DL3006, the three files beside the binary, the xxHash part, and neitherNOTICESnorSOURCEnamingcabal-doctest, which only xml-conduit's Setup uses.nmof the unstripped binary hasffi_call, and GHC 9.10.2 carries libffi 3.4.6 (libffi-tarballs/libffi-3.4.6.tar.gzin its source archive, read from the archive's listing, as are the twenty libraries and the runtime the offer attributes to it).just do lint defaultgreen here; CI's lint job, with theconvergelane my sandbox cannot run, green.📝 Notes
hashable) is found by reading, not by the build; the README says so.SHA256SUMSwith a detached signature and no tarball, which noverify:method reads, so its two pins aredownload.just test: the verify legs would each pay for a compiler's build. The recipe runs the smoke test on what it built.