[Midnightbsd-cvs] [MidnightBSD/mports] e8bae3: devel/electron40: fix fetch on clean builders (#671)
Lucas Holt
noreply at github.com
Sat Aug 1 16:14:40 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: e8bae317e7a41a8d19cb36a22b764d29cb5ac83e
https://github.com/MidnightBSD/mports/commit/e8bae317e7a41a8d19cb36a22b764d29cb5ac83e
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-08-01 (Sat, 01 Aug 2026)
Changed paths:
M devel/electron40/Makefile
M devel/electron40/distinfo
Log Message:
-----------
devel/electron40: fix fetch on clean builders (#671)
`devel/electron40` has never fetched successfully on a machine without a
pre-populated `Distfiles` directory. Magus reports fetch failures on
both 4.0/amd64 and 4.1/amd64, and the failure reproduces locally.
## Three separate defects
**1. `pre-fetch` ordering.** `electron-fetch-node-modules` untars the
Electron source tarball to read `package.json`/`yarn.lock`, but
`pre-fetch` runs *before* `do-fetch`, so the tarball does not exist yet.
It only appeared to work where the distfile happened to already be
cached. Magus log:
```
===> Prefetching node modules (offline cache)
tar: Error opening archive: Failed to open '/magus/distfiles/electron/electron-electron-v40.9.2_GH0.tar.gz'
```
Fixed with a new `electron-fetch-source` target that fetches the tarball
explicitly, mirroring what `electron-fetch-node-package-manager` already
does for yarn.
**2. The generated node-modules offline cache was not reproducible.** It
was archived with a plain `tar -cJf` — no entry ordering, no timestamp
normalisation — so its checksum could never match `distinfo` on another
machine. The recorded entry (59792711 bytes) did not match a regenerated
tarball at all (32363708 bytes, different hash). Entries are now sorted
with timestamps/uid/gid zeroed, the same approach `ai/llama-cpp` uses
for its WebUI cache. Two independent cold runs now produce
byte-identical output. `distinfo` regenerated.
**3. `node` was only a `BUILD_DEPENDS`** but `pre-fetch` runs `corepack`
to drive yarn, so it must be a `FETCH_DEPENDS` too.
Also syncs `ESBUILD_VER` to 0.28.1 (see #670, which must land first) and
drops a stale note claiming `devel/esbuild` does not exist in mports.
## Validation
With the node-modules distfile deleted, `bmake checksum` fetches and
regenerates everything and every checksum passes, including the
regenerated tarball.
**Not validated:** the full build was not run — it is unchanged by this
commit, and this PR is scoped to the fetch phase. portlint's
pre-existing FATALs are all over-100-character patch filenames inherited
from FreeBSD; no `files/` were touched.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary by Sourcery
Ensure electron40 fetch phase works reliably on clean builders by fixing
source tarball prefetching, making the node-modules offline cache
reproducible, and updating related dependencies and metadata.
Bug Fixes:
- Fetch the Electron source tarball explicitly during pre-fetch so node
module caching works on clean machines.
- Make the node-modules offline cache tarball reproducible by
normalizing timestamps, ownership, and entry ordering.
- Treat node as a fetch-time dependency so pre-fetch can run
corepack/yarn correctly.
Enhancements:
- Synchronize ESBUILD_VER with the newer esbuild 0.28.1 release.
Signed-off-by: Lucas Holt <luke at foolishgames.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list