Signing the app image's Mach-O files with "xargs -P 8" passed locally but
failed on a runner: codesign reported "replacing existing signature" and then
"No such file or directory" for that same path. The two libjli.dylib copies are
separate inodes, so this is not hard links being signed twice -- concurrent
codesign runs over one bundle are simply not reliable. Serially costs about a
minute, since each call waits on Apple's timestamp server.
Also stop the matrix from cancelling the other architecture on a failure; that
throws away half the diagnostic information from a failed run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WYcmHra3YndA1ahkHeNdJ2
jpackage cannot produce a distributable macOS bundle on its own. It ad-hoc
signs the embedded runtime and then re-runs codesign on the same files without
--force, which codesign rejects; and "--type dmg --app-image" re-signs the app
it is handed, replacing a Developer ID signature with an ad-hoc one. So the
build now creates an unsigned app-image, signs it from the inside out, and
wraps it with hdiutil.
Apple's notary service also unpacks JARs and checks the native libraries
inside them, which sqlite-jdbc ships for both architectures. Those are signed
before the bundle is sealed, since rewriting a JAR afterwards would invalidate
the seal. A preflight check verifies Apple's two criteria locally, so a missed
binary costs seconds rather than a round trip to the notary service.
Two long-standing defects surfaced while testing and are fixed here: the
bundle identifier defaulted to the main class's package name (kst4contest.view
instead of de.x08.KST4Contest), and every release reported version 1.0 in
Finder because --app-version was never passed. Neither affects existing users:
the app keeps its settings in ~/.praktiKST, independent of the bundle ID.
Both workflows call the same script the local Mac uses, so the two cannot
drift apart. Signing needs a keychain that can answer a UI prompt, which a
runner cannot, so ci-import-cert.sh creates a throwaway keychain whose
password is generated per job and discarded with it. Notarization goes through
an App Store Connect API key and needs no keychain at all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WYcmHra3YndA1ahkHeNdJ2
The jdk.net incident was caused by duplication rather than by a single
oversight: the module list existed in module-info.java, in the jpackage Maven
plugin and in fourteen hardcoded --add-modules arguments across the workflows
and AUR PKGBUILDs. Only the path that CI does not use was kept up to date, so
every packaged build shipped a runtime image without jdk.net.
Add packaging/AddModules.java, a single file source program that reads the
requires clauses and prints the platform modules. It runs identically on the
Linux, macOS and Windows runners without a build step, and skips third party
requires such as jlayer, which is an automatic module and cannot be linked
into a runtime image at all, as well as test only requires and requires
static. All sixteen packaging call sites now resolve the list through it, so
they can no longer drift from the descriptor.
The jpackage Maven plugin takes its modules as individual XML elements and
cannot consume a generated value, so it remains a second copy. To keep it
honest the helper has a pom verification mode, bound to the validate phase
via exec-maven-plugin. Binding it to the build rather than to a workflow
trigger means it also fires on direct pushes to main, on tagged releases, in
both AUR PKGBUILDs and on local builds, none of which run the pull request
check.
The released AUR PKGBUILD builds from a tag tarball that may predate the
helper, and aur-publish.yml rewrites pkgver to the latest release, so it
falls back to the list carried in that tarball's own pom.xml.
Verified that the generated list produces a byte identical runtime image to
the previous hardcoded one, that removing a requires fails the build with a
precise diff, and that the pull request check and the push triggered nightly
AppImage job both succeed under act.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Generated-By: Claude Code (Claude Opus 5)
The ON4KST connection manager introduced in f8c04e7 uses
jdk.net.ExtendedSocketOptions to configure kernel side TCP keepalives. The
new dependency was added to module-info.java and to the jpackage Maven
plugin, but the CI and AUR builds do not use that plugin: they call jpackage
directly with a hardcoded --add-modules list that still lacked jdk.net.
Because jdk.net is not pulled in transitively, every packaged runtime image
shipped without the class while development runs against the full JDK and
kept working.
The resulting NoClassDefFoundError is an Error, so neither the catch in
configureSocket nor the surrounding catch (Exception) in openConnection
handled it. Running on a ScheduledExecutorService, the throwable was stored
in the task future and never surfaced, leaving the state machine stuck in
CONNECTING with no reconnect attempt and no user visible failure.
Add jdk.net to all 16 module lists, covering nightly artifacts, tagged
releases and both AUR PKGBUILDs, so releases are affected as well as
nightlies. Additionally catch LinkageError in configureSocket so a runtime
image without jdk.net degrades to application level heartbeats, and catch
Throwable in openConnection so an Error can no longer be swallowed by the
scheduler.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>