Skip to content

fix: disable RPM post-install scripts for cross-compilation#23

Merged
utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
utkarsh232005:fix/rpm-cross-compilation-strip-error
Jun 1, 2026
Merged

fix: disable RPM post-install scripts for cross-compilation#23
utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
utkarsh232005:fix/rpm-cross-compilation-strip-error

Conversation

@utkarsh232005
Copy link
Copy Markdown
Member

Problem

The Generate Packages job in the release workflow fails when building the aarch64 RPM package on an x86_64 Ubuntu runner:

/usr/bin/strip: Unable to recognise the format of the input file
`/home/runner/.../kdc`
error: Bad exit status from /var/tmp/rpm-tmp.KriFDN (%install)

This happens because rpmbuild automatically runs brp-strip (binary stripping) as part of the %install phase. When cross-compiling, the native x86_64 strip tool cannot process aarch64 binaries.

Fix

Add %global __os_install_post %{nil} to the RPM spec template to disable all automatic post-install processing scripts, including:

  • brp-strip (binary stripping)
  • brp-compress (man page compression)
  • brp-elfperms (ELF permission fixes)

This is safe because:

  • Rust already produces optimized release binaries (cargo build --release)
  • The binary doesn't need additional stripping or post-processing
  • We're packaging a single static binary with no man pages or additional files

Result

Both x86_64 and aarch64 RPM packages build successfully on the x86_64 GitHub Actions runner.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • scripts/package.sh is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9151a237-b78f-44d5-bfc1-be166d752e47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@utkarsh232005 utkarsh232005 merged commit d15fa59 into KDM-cli:main Jun 1, 2026
3 checks passed
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our agent can fix these. Install it.

No application code in the PR — skipped Code Health checks.

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant