[Midnightbsd-cvs] [MidnightBSD/mports] 4a4588: java/openjdk23: fix duplicated GH distfile in DIST...

Lucas Holt noreply at github.com
Fri Aug 21 23:46:44 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/mports
  Commit: 4a4588c4675d454e30b2a5eb8d96545f8b2f7358
      https://github.com/MidnightBSD/mports/commit/4a4588c4675d454e30b2a5eb8d96545f8b2f7358
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M java/openjdk23/Makefile
    M java/openjdk23/distinfo

  Log Message:
  -----------
  java/openjdk23: fix duplicated GH distfile in DISTFILES and distinfo (#759)

## Problem

`DISTFILES` hardcoded `battleblow-jdk23u-jdk-23.0.2+7-1_GH0.tar.gz`
alongside `${BOOTSTRAPJDKFILE}`:

```make
DISTFILES=	${BOOTSTRAPJDKFILE}:boot \
		battleblow-jdk23u-jdk-23.0.2+7-1_GH0.tar.gz
```

But `USE_GITHUB=yes` with `GH_ACCOUNT`/`GH_PROJECT`/`GH_TAGNAME`
**already appends exactly that filename**. The distfile was listed
twice, and `makesum` faithfully recorded it twice in `distinfo`.

## Why it breaks fetching

`DISTINFO_DATA` in `Mk/bsd.mport.mk:2335` prints *every* matching line:

```sh
CKSIZE=$(distinfo_data SIZE "${full_file}")   # -> "117326728 117326728"
```

`Mk/scripts/do-fetch.sh:144` interpolates that unquoted into `-S
${CKSIZE}`, so `fetch(1)` receives a stray extra argument and reports,
on every mirror:

```
fetch: 117326728: No such file or directory
```

The size check at `do-fetch.sh:152` breaks the same way — `[
"$actual_size" -eq "$CKSIZE" ]` with too many arguments — so even a
*completed* 111 MB download is rejected as a size mismatch. That's how
this surfaced in Magus run 647 as a fetch failure rather than a
malformed distinfo.

The same log contains its own control: the bootstrap JDK, which is *not*
duplicated, fetched cleanly (171 MB) in the same invocation.

## Fix

Drop the hardcoded line. This fixes the cause rather than the symptom —
editing `distinfo` alone would be undone by the next `makesum`. It also
removes a hand-maintained copy of the tag that would go stale on the
next update.

FreeBSD's `java/openjdk21` uses `DISTFILES= ${BOOTSTRAPJDKFILE}:boot`
for the same reason.

## Testing

- `bmake -V DISTFILES` now lists each file exactly once
- `distinfo` matches `DISTFILES` exactly — none missing, none extra
- `bmake fetch` succeeds (exit 0); the `fetch: 117326728: ...` errors
are gone
- `bmake checksum` passes for both distfiles

## Unrelated observation

The bootstrap JDK is declared `MASTER_SITES=LOCAL/openjdk:boot`, but no
MidnightBSD mirror actually serves it — all five `:boot` sites 404'd and
only `distcache.FreeBSD.org` had it. Fetching works, but the mirrors
look unseeded. Not addressed here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Summary by Sourcery

Bug Fixes:
- Remove the duplicated OpenJDK 23 GitHub distfile entry so fetching and
checksum validation no longer fail due to repeated size metadata.

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