[Midnightbsd-cvs] [MidnightBSD/mports] 7ca03b: devel/electron41: restore the stock vendored packa...
Lucas Holt
noreply at github.com
Thu Sep 3 18:53:21 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: 7ca03b3a570215cb2e444a398dd24bbeb36e0fc6
https://github.com/MidnightBSD/mports/commit/7ca03b3a570215cb2e444a398dd24bbeb36e0fc6
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-09-03 (Thu, 03 Sep 2026)
Changed paths:
M devel/electron41/Makefile
M devel/electron41/distinfo
R devel/electron41/files/packagejsons/.yarn/install-state.gz
M devel/electron41/files/packagejsons/package.json
M devel/electron41/files/packagejsons/yarn.lock
Log Message:
-----------
devel/electron41: restore the stock vendored packagejsons (#818)
## Summary
Restores `files/packagejsons/{package.json,yarn.lock}` to the vendor
files and drops the dependabot-generated `.yarn/install-state.gz`.
**This repairs a currently broken port.**
## The bug
`files/packagejsons/{package.json,yarn.lock}` must mirror the Electron
source tarball's own files. The prefetch resolves the yarn offline cache
from the vendored copies, but `pre-configure` runs `yarn install` inside
`${WRKSRC}/electron`, whose `package.json` and `yarn.lock` come from the
**source tarball**. Nothing in this port copies the vendored files over
the source ones — FreeBSD's `Mk/Uses/npm.mk` does exactly that at
extract time (lines 481-495, backing the originals up as `.bak`), and
the corepack replacement used here never replicated it.
The lock bumps merged in #673, #674, #801 and #806 edited the vendored
lock, so the cache stopped containing the versions the source lock asks
for. Reproduced by extracting the Electron 41.10.2 source tarball,
unpacking the current node-modules distfile into it and running the
`pre-configure` install with `enableNetwork false`:
```
YN0056: @xmldom/xmldom at npm:0.8.11: Cache entry required but missing
YN0056: fast-uri at npm:3.0.1: Cache entry required but missing
YN0056: linkify-it at npm:5.0.0: Cache entry required but missing
Failed with errors
```
Two consequences worth being explicit about:
- **The port cannot configure** on a clean builder. It last built in
`df86947519`, before any of those bumps landed, which is why this went
unnoticed.
- **Those bumps never affected the built product.** The build resolves
the source lock regardless, so the fast-uri and xmldom updates only
changed which files landed in the cache — they were never actually
applied to Electron.
## The fix
Restore the vendored files to stock (identical to FreeBSD's
`devel/electron41` at 41.10.2, which is itself byte-identical to the
source tarball's `yarn.lock`), drop `.yarn/install-state.gz` — a
regenerable yarn artifact FreeBSD does not ship and the source of
repeated binary conflicts — and regenerate the cache.
The regenerated distfile reproduces `b3fafa08…` / 35836628 **byte for
byte**: exactly the checksum recorded when this port was imported in
`e4ef6ee1b5`. `PORTREVISION` 3 → 4.
## Validation
- extracted the Electron 41.10.2 source tarball, unpacked the
regenerated cache into it, ran the `pre-configure` install offline
(`--immutable --mode=skip-build --immutable-cache`, `enableNetwork
false`): **completes cleanly**, resolution + fetch + link all pass
- regenerated distfile matches the original import checksum bit-for-bit
- `portlint -AC`: no new findings (same inherited `PULSEMV`/`PULSEV`
fatals as electron42/43)
## Follow-up
Dependabot will keep proposing bumps against these vendored trees, and
every one of them re-breaks the port in this way while changing nothing
about the built product. The open ones are being closed; a
`dependabot.yml` ignore rule for `devel/electron*/files/packagejsons/`
would stop them recurring on every Electron import.
If we ever do want to control Electron's JS dependencies from the port,
the supported way is to replicate `npm.mk`'s extract-time copy of the
vendored files into `${WRKSRC}/electron` — then the vendored lock
genuinely governs the build. That is a deliberate change, not something
to arrive at by merging bumps.
AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>
## Summary by Sourcery
Restore Electron 41's stock vendored dependency metadata and cache so
clean offline builds configure reliably.
Bug Fixes:
- Restore the stock vendored package manifests and lockfile so Electron
41 can configure successfully with the offline dependency cache.
Enhancements:
- Remove the regenerable Yarn install-state artifact and align the
vendored dependency metadata with the Electron 41.10.2 source tarball.
Tests:
- Regenerate and validate the dependency cache against the source
tarball, including a successful offline install and matching distfile
checksum.
Chores:
- Bump PORTREVISION to 4 and update the dependency cache distinfo.
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