Skip to content

Packaging: Enable RPM package relocation via --prefix#1758

Draft
tuhaihe wants to merge 2 commits into
apache:mainfrom
tuhaihe:update-rpm-relocate
Draft

Packaging: Enable RPM package relocation via --prefix#1758
tuhaihe wants to merge 2 commits into
apache:mainfrom
tuhaihe:update-rpm-relocate

Conversation

@tuhaihe
Copy link
Copy Markdown
Member

@tuhaihe tuhaihe commented May 20, 2026

Refactor the RPM spec to properly support rpm --prefix for custom install locations.

  • Split hardcoded install path into base_dir and name components
  • Set Prefix to the base directory (/usr/local) so RPM's relocate engine can substitute it correctly
  • Change symlink from absolute to relative so it remains valid after relocation
  • Update %post/%postun scriptlets to use RPM macro expansion for the actual relocated path instead of hardcoded paths

Assisted-by: Claude Code

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


Refactor the RPM spec to properly support rpm --prefix for custom
install locations.

- Split hardcoded install path into base_dir and name components
- Set Prefix to the base directory (/usr/local) so RPM's relocate
  engine can substitute it correctly
- Change symlink from absolute to relative so it remains valid
  after relocation
- Update %post/%postun scriptlets to use RPM macro expansion for
  the actual relocated path instead of hardcoded paths

Assisted-by: Claude Code
@tuhaihe
Copy link
Copy Markdown
Member Author

tuhaihe commented May 20, 2026

No rush to review. I will test it by packaging a new RPM.

@tuhaihe tuhaihe marked this pull request as draft May 20, 2026 06:09
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