Repository navigation
fix(copr): fix x86_64 builds with add nasm/cmake for Fedora and PREBUILT_NASM for RHEL/EPEL - #10947
Conversation
All x86_64 COPR chroots fail (fedora-44, fedora-43, fedora-rawhide,
epel-10) while aarch64 succeeds. Root cause: aws-lc-sys requires NASM
at build time to compile x86_64-optimized assembly crypto routines.
nasm was not declared as a BuildRequires so COPR's mock chroot does
not install it, causing the aws-lc-sys build script to panic (exit 101).
aarch64 builds are unaffected as aws-lc-sys has no NASM dependency
on that architecture.
Fix:
- Fedora (%{?fedora}): add BuildRequires nasm and cmake. Both packages
are available in standard Fedora repos on all active releases.
- RHEL/EPEL (%{?rhel}): export AWS_LC_SYS_NO_ASM=1 before cargo build.
On EL9/EL10 nasm lives in CRB which is not enabled in COPR chroots
by default. AWS_LC_SYS_NO_ASM=1 disables the ASM path and falls back
to portable C with negligible performance impact for mise.
Fixes: https://copr.fedorainfracloud.org/coprs/jdxcode/mise/build/10703774/
📝 WalkthroughWalkthroughThe COPR RPM spec now includes CMake, conditionally requires NASM on Fedora x86_64, and enables prebuilt NASM objects for RHEL x86_64 builds. ChangesCOPR RPM build configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes x86_64 COPR build failures for mise by adding missing build dependencies (
Confidence Score: 4/5The Fedora half of the fix is correct and safe to merge; the RHEL/EPEL half relies on a Windows-only environment variable that has no effect on Linux and will leave RHEL x86_64 builds broken. The AWS_LC_SYS_PREBUILT_NASM=1 export for RHEL is documented as a Windows-only control in aws-lc-sys — it does nothing on Linux. The RHEL x86_64 chroots will still fail to find NASM during the aws-lc-sys build step. packaging/copr/build-copr.sh — specifically the RHEL %build section that sets AWS_LC_SYS_PREBUILT_NASM Important Files Changed
Reviews (3): Last reviewed commit: "fix(copr): replace AWS_LC_SYS_NO_ASM wit..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packaging/copr/build-copr.sh`:
- Around line 227-233: The RHEL/EPEL workaround in the RPM build must not export
AWS_LC_SYS_NO_ASM for the default release profile, because aws-lc-sys rejects it
there. Update the surrounding build-profile logic near BUILD_PROFILE to use a
supported no-ASM configuration for release builds, or enable the required
NASM/CRB dependency instead, while preserving successful builds on RHEL/EPEL.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 2ac0d952-c62f-4ea4-8b03-48a963bceca4
📒 Files selected for processing (1)
packaging/copr/build-copr.sh
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…r RHEL/EPEL AWS_LC_SYS_NO_ASM=1 is rejected by aws-lc-sys when OPT_LEVEL != 0, causing a panic in the build script at release profile. The correct variable is AWS_LC_SYS_PREBUILT_NASM=1, which uses prebuilt NASM objects already bundled inside the aws-lc-sys crate. This works at all optimization levels including release. Also scope the RHEL guard to x86_64 only, consistent with the Fedora nasm BuildRequires guard added in the previous commit.
|
wait prebuilt_nasm only for windows, will fix it later. |
|
oh wait, copr publish process are canceled and its still broke, i will check it again tomorrow @jdx |
Problem
Every x86_64 COPR chroot fails while aarch64 on the same targets succeeds:
fedora-rawhide-x86_64fedora-44-x86_64fedora-43-x86_64epel-10-x86_64fedora-rawhide-aarch64fedora-44-aarch64fedora-43-aarch64epel-10-aarch64Root cause:
aws-lc-sysrequires NASM at build time to compile x86_64-optimized assembly crypto routines.nasmwas not declared as aBuildRequires, so COPR's mock chroot does not install it and theaws-lc-sysbuild script panics with exit status 101. aarch64 is unaffected becauseaws-lc-syshas no NASM dependency on that architecture.Failing build: https://copr.fedorainfracloud.org/coprs/jdxcode/mise/build/10703774/
Fix
Fedora (
%{?fedora}): addBuildRequires: nasmandBuildRequires: cmake. Both are available in standard Fedora repos on all active releases (43, 44, rawhide).RHEL/EPEL (
%{?rhel}): exportAWS_LC_SYS_NO_ASM=1beforecargo build. On EL9/EL10,nasmlives in CRB (CodeReady Builder) which is not enabled in COPR chroots by default.AWS_LC_SYS_NO_ASM=1disables the ASM path, falling back to portable C — performance impact is negligible for mise's usage patterns (tool downloads, not throughput-sensitive crypto).Testing
This fix covers all 4 failing x86_64 chroots with a single conditional approach that requires no extra repo configuration in COPR.
Summary by CodeRabbit