Repository navigation
fix(build): build the Copr RPM with --dir so older tags still build - #718
Merged
Merged
Conversation
Copr pairs the spec from main with the source of the tag it rebuilds. Rebuilding v0.0.123 ran `npm run build:linux -- dir` against that tag's build:linux script, which still puts --publish never after --linux, so the target reached electron-builder as a stray positional argument and every chroot failed with "Unknown argument: dir". The --dir flag builds the same unpacked application whatever the argument order of build:linux. electron-builder ignores it when the script lists its own targets, so the spec now fails if dist contains anything besides the unpacked application. Signed-off-by: Marc Nuri <marc@marcnuri.com>
|
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.



Problem
Rebuilding v0.0.123 after #717 (Copr build 10982034) failed on all 24 targets with
Unknown argument: dir.A manual Copr run uses the spec from
mainwith the source of the tag it builds. The spec runsnpm run build:linux -- dir, which relies on #717's new script order (--linuxlast). v0.0.123'spackage.jsonstill haselectron-builder --linux --publish never, so npm ranelectron-builder --linux --publish never dir, and electron-builder rejecteddiras an unknown argument.The fixes from #717 did work.
rhel-9-x86_64installed Node.js 22.23.2 from the module stream, and both it andfedora-44-aarch64got throughnpm install, including the nodehun build. Every target reached the build step and failed only on that argument. Failed builds don't replace earlier packages, so Fedora 43/44/45 and EL10 still serve v0.0.123 from build 10981824.Change
npm run build:linux -- --dir. electron-builder's--dirflag builds the same unpacked application as thedirtarget, whatever the argument order ofbuild:linux. That keeps the spec onmainworking with older tags. Nothing needs reverting for v0.0.124, whose tag push uses its own spec and source.%buildnow fails loudly if--diris ignored. electron-builder ignores--dirwhenbuild:linuxlists its own targets. After the build, the spec fails unlessdist/contains only the unpacked application and electron-builder'sbuilder-effective-config.yamlandbuilder-debug.yml, instead of silently building (and racing) packages the RPM doesn't use.Verification
Ran the spec's actual
%buildlines, copied straight from the spec, in cleannode:22containers:electron-builder --linux --publish never --dirdist/linux-unpacked, with 16 bundle files inapp.asarelectron-builder --publish never --linux --dirdist/linux-unpacked, with 16 bundle files inapp.asartar.gzadded tobuild:linuxelectron-builder --publish never --linux tar.gz --direrror: expected dist to contain only dist/linux-unpacked, build:linux must not list targetsrpmspec -P --target x86_64and--target aarch64in a Fedora 44 container expand the check todist/linux-unpackedanddist/linux-arm64-unpackedrespectively.Not verified: no Copr build has run with this spec yet, and aarch64 has only been checked up to
npm install.After merging
Rebuild v0.0.123: