Skip to content

fix: Align xrpld RPM packaging with DEB package#7529

Open
legleux wants to merge 13 commits into
developfrom
legleux/rpm-compression
Open

fix: Align xrpld RPM packaging with DEB package#7529
legleux wants to merge 13 commits into
developfrom
legleux/rpm-compression

Conversation

@legleux

@legleux legleux commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

The DEB package already skips the dwz debug optimization step because it takes a long time. This change brings RPM package validation into the same rough size/time class as Debian package generation.

Changes:

  • Disable RPM dwz debuginfo optimization.
  • Write generated RPM payloads uncompressed, intentionally trading larger RPM artifacts for much faster package build/validation time.
  • Clarify package version/release naming so the raw xrpld software version (XRPLD_VERSION) stays distinct from the normalized package metadata version (pkg_version).
  • Align RPM upgrade behavior with DEB by avoiding an automatic xrpld service restart on package upgrade; operators pick up the new binary on the next service restart.

For context from CI validation:

  • old RPM: ~370 MB, ~12 min
  • Debian: ~566 MB, <3 min
  • new RPM: ~607 MB, <2 min

The old RPM artifact was smaller, but it spent about 10 extra minutes optimizing/compressing debug-package payloads for a short-lived CI artifact. Debian is already the practical comparison point here: DWZ optimization is not viable there for xrpld today (Too many DIEs, not optimizing), and the Debian debug package still builds quickly.

Operationally, debug-symbol packages are mostly useful when analyzing coredumps. The download data supports optimizing this path for CI latency rather than RPM debug artifact size. For 3.1.3, the stats were:

package type release downloads debug-symbol downloads
deb 2,610 61
rpm 383 2

Some of the Debian debug downloads were us too.

@legleux legleux added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Jun 10, 2026
@legleux legleux force-pushed the legleux/rpm-compression branch from cfc80fb to 497fb2a Compare June 10, 2026 21:42
@github-actions

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@legleux legleux force-pushed the legleux/rpm-compression branch from 497fb2a to a61534e Compare June 11, 2026 17:30
@github-actions

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@legleux legleux changed the title ci: speed up disposable package checks ci: speed up rpm debuginfo package generation Jun 11, 2026
@legleux legleux changed the title ci: speed up rpm debuginfo package generation ci: Speed up rpm debuginfo package generation Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.9%. Comparing base (7e0ff53) to head (034e465).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7529     +/-   ##
=========================================
- Coverage     82.0%   81.9%   -0.0%     
=========================================
  Files         1007    1007             
  Lines        76876   76854     -22     
  Branches      8982    8984      +2     
=========================================
- Hits         63003   62979     -24     
- Misses       13864   13866      +2     
  Partials         9       9             

see 12 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@legleux legleux marked this pull request as ready for review June 11, 2026 19:47
@legleux legleux requested review from bthomee and mathbunnyru June 11, 2026 19:47

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved, if it will take less time in CI (please, check, when it's done)

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unfortunately, doesn't work:
PR / package / xrpld-rhel-gcc-release-amd64 (pull_request)Successful in 12m

@legleux legleux force-pushed the legleux/rpm-compression branch from a61534e to d1fd10e Compare June 11, 2026 22:07
@legleux legleux removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Jun 11, 2026
@legleux

legleux commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Unfortunately, doesn't work: PR / package / xrpld-rhel-gcc-release-amd64 (pull_request)Successful in 12m

I saw that. I removed the knobs but I removed the thing that made it work also. Re-running.

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

macOS/Windows CI coverage dropped — see inline.

Review by Claude Sonnet 4.6 · Prompt: V15

Comment thread .github/workflows/on-pr.yml Outdated
@legleux legleux force-pushed the legleux/rpm-compression branch from d1fd10e to 3961412 Compare June 11, 2026 22:33

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Took a pass through this

Unrelated scope creep flagged inline — macOS/Windows CI removal is bundled into an RPM debuginfo-only change.


Review by ReviewBot 🤖

Review by Claude Sonnet 4.6 · Prompt: V15

Comment thread .github/workflows/on-pr.yml Outdated
@legleux legleux force-pushed the legleux/rpm-compression branch from 3961412 to 7740ee6 Compare June 11, 2026 23:31

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Had a read through

Uncompressed payload flag applied unconditionally — affects shipped package size. See inline.


Review by ReviewBot 🤖

Review by Claude Sonnet 4.6 · Prompt: V15

Comment thread package/rpm/xrpld.spec
@legleux legleux added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Jun 12, 2026
@legleux

legleux commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

This brings RPM package validation into the same rough size/time class as Debian.

For context:

  • old RPM: ~370 MB, ~12 min
  • Debian: ~566 MB, <3 min
  • new RPM: ~607 MB, <2 min

The old RPM artifact was smaller, but it got there by spending about 10 extra minutes optimizing/compressing debug-package payloads for a disposable CI artifact. Debian is already the practical comparison point here: DWZ optimization is not viable there for xrpld today (Too many DIEs, not optimizing), and the Debian debug package still builds quickly at ~566 MB.

Operationally, the debug-symbol packages are mostly useful when we need to analyze coredumps. The download data supports optimizing this path for CI latency rather than RPM debug artifact size.
For 3.1.3, the stats were:

package type release downloads debug-symbol downloads
deb 2,610 61
rpm 383 2

Some of the debian debug downloads were us also.

So for PR validation, I think it is reasonable to optimize for fast proof that the package builds rather than spending another ~10 minutes minimizing a short-lived RPM debug artifact that is rarely consumed.

@legleux

legleux commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

Almost as fast as deb now

rpm 1m 54s
deb 1m 47s

@legleux legleux requested a review from mathbunnyru June 12, 2026 04:07
@bthomee bthomee requested review from Copilot and removed request for bthomee June 12, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread package/build_pkg.sh Outdated
Comment thread package/rpm/xrpld.spec
Comment on lines 1 to +3
Name: xrpld
Version: %{xrpld_version}
Release: %{xrpld_release}%{?dist}
Version: %{pkg_version}
Release: %{pkg_release}%{?dist}
Comment thread package/rpm/xrpld.spec
Comment thread package/rpm/xrpld.spec
Comment thread package/README.md Outdated
Comment thread package/README.md Outdated
Comment thread package/README.md Outdated
Comment thread package/README.md Outdated
Comment thread package/build_pkg.sh Outdated
Comment thread package/build_pkg.sh
Comment thread package/build_pkg.sh
Comment thread package/rpm/xrpld.spec

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@legleux legleux added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jun 18, 2026
Comment thread package/build_pkg.sh Outdated
Comment on lines +88 to +92
if [[ "${XRPLD_VERSION}" == -* || "${XRPLD_VERSION}" == *- ]]; then
echo "build_pkg.sh: invalid XRPLD_VERSION='${XRPLD_VERSION}'." >&2
echo "Version cannot start or end with '-'." >&2
exit 1
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we check these specific conditions?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. If we got here we've gotten past BuildInfo's constraints, shouldn't be possible by the time packaging sees it.

Comment thread package/build_pkg.sh Outdated
Comment on lines +184 to +185
# changelog's third field "distribution", but the suite/codename (noble,
# bookworm, ...) is assigned by the publishing infra at ingest; this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just in case - we don't and won't build for different codenames.
It's because we build with a custom century-old libc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, this was a wording issue. I removed the implication that packaging is selecting or supporting Debian/Ubuntu codenames. The changelog distribution value is just the XRPLF release channel we publish to (stable, develop, unstable), not the build host codename.

Comment thread package/build_pkg.sh Outdated
# changelog's third field "distribution", but the suite/codename (noble,
# bookworm, ...) is assigned by the publishing infra at ingest; this
# suite-agnostic build only sets the component. RPM has no equivalent.
# 3.2.0 -> stable, *-b0[+metadata] -> develop, other pre-release -> unstable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe let's mention RCs here as well?
They are far more important than betas

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added RCs explicitly. The docs/comment now call out that non-b0 prereleases, including beta and RC builds, go to unstable.

Comment thread package/README.md Outdated
xrpld.sysusers sysusers.d config (used by both RPM and DEB)
xrpld.tmpfiles tmpfiles.d config (used by both RPM and DEB)
xrpld.logrotate logrotate config (installed to /etc/logrotate.d/xrpld)
50-xrpld.preset systemd preset (RPM only; DEB enables the unit via dh_installsystemd)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be in rpm dir if it's only used in rpm

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Let's just remove it altogether since it's one line!

Comment thread package/README.md Outdated
| Package type | Image (`package_configs.<distro>[].image` in `linux.json`) | Tools required |
| ------------ | ---------------------------------------------------------- | ---------------------------------------------- |
| RPM | `ghcr.io/xrplf/xrpld/packaging-rhel:sha-<sha>` | `rpmbuild` |
| DEB | `ghcr.io/xrplf/xrpld/packaging-debian:sha-<sha>` | `dpkg-buildpackage`, `debhelper-compat (= 13)` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably anything >= 13 would work.

@legleux legleux Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changed the wording.
Probably this CMake could work right? 😸

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)

Comment thread package/README.md Outdated
Comment on lines +105 to +106
The version is not a CMake input on this path: `cmake/XrplVersion.cmake` reads
it from `src/libxrpl/protocol/BuildInfo.cpp` into `xrpld_version`, and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You have more than 1 way of determining xrpld version.
Can we leave just one, please?
I think ./xrpld --version with a bit of parsing should be fine - you have the binary in places where you need it.

@legleux legleux Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Love it.
Packaging derives the version from the binary, just fail early if ${BUILD_DIR}/xrpld is missing or not executable, before trying to parse version. That makes the "you must already have a binary" contract obvious.

@mathbunnyru mathbunnyru removed Trivial Simple change with minimal effect, or already tested. Only needs one approval. Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. labels Jun 18, 2026
@mathbunnyru

Copy link
Copy Markdown
Contributor

I think this stopped being trivial, to be honest, so requires 2 approvals, and it's not ready to merge yet

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread package/build_pkg.sh

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread package/build_pkg.sh
@legleux

legleux commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

I think this stopped being trivial, to be honest, so requires 2 approvals, and it's not ready to merge yet

I think so too. 🤕

@legleux legleux requested a review from mathbunnyru June 18, 2026 22:26
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.

4 participants