Skip to content

[CICD] Add RPM packaging support for RHEL/Rocky/OpenEuler#476

Open
shiptux wants to merge 17 commits into
flagos-ai:mainfrom
shiptux:pr/rpm-packaging-clean
Open

[CICD] Add RPM packaging support for RHEL/Rocky/OpenEuler#476
shiptux wants to merge 17 commits into
flagos-ai:mainfrom
shiptux:pr/rpm-packaging-clean

Conversation

@shiptux
Copy link
Copy Markdown
Contributor

@shiptux shiptux commented May 21, 2026

PR Category

CICD

PR Types

New Features

PR Description

Adds RPM packaging support for FlagCX targeting RHEL / Rocky / OpenEuler
distributions, mirroring the existing Debian packaging path. Pair to
existing PR #393 (Ascend DEB) — this is the RPM-only sibling, freshly
rebased onto current main so the diff is reviewable.

Background: original PR #394 has been open since 2026-02-26 with
no review and the branch has drifted 78 commits / 304 files behind
upstream main, making the diff unreadable. This PR is a clean replay
of the same packaging work (3 commits / 5 files) onto current main.
#394 can be closed in favor of this one, or the branch on #394 can be
force-pushed to match this clean state — at the reviewer's preference.

Produced binaries (built locally per backend):

For each of nvidia / metax / ascend:

  • libflagcx-<backend>-0.8.0-1.x86_64.rpm — runtime shared library
  • libflagcx-<backend>-devel-0.8.0-1.x86_64.rpm — headers + .so symlink

6 binary RPMs per release (3 backends × {runtime, -devel}), one
backend-specific docker image per build.

What changed (all under packaging/rpm/, no DEB or source changes):

  • rpm/specs/flagcx.spec — Parameterized spec using %{backend}
    macro to generate per-backend package names. Conditional sub-package
    declaration; SONAME + RPATH handling via patchelf for
    /usr/lib relocation.
  • rpm/dockerfiles/Dockerfile.rpm — Unified Dockerfile with
    BASE_IMAGE + BACKEND build args. Three backends share one
    Dockerfile, picking distinct vendor SDK base images:
    • nvidia: rockylinux:8 + CUDA RPM repo
    • metax: rockylinux:8 + MACA SDK yum repo
    • ascend: openeuler:24.03 + Huawei CANN
  • rpm/build-flagcx-rpm.sh — Parameterized entry point:
    ./packaging/rpm/build-flagcx-rpm.sh <backend>.
  • .github/workflows/build-rpm.yml — CI matrix building all three
    backends on push and PR. Mirrors build-deb.yml from [CICD] add Ascend NPU backend support for Debian packages #393.

How it was tested:

bash packaging/rpm/build-flagcx-rpm.sh nvidia produces
libflagcx-nvidia + libflagcx-nvidia-devel RPMs cleanly in a
rockylinux:8 container. Same flow for metax / ascend with their
respective base images.

Companion DEB packaging (PR #393) and central distribution pipeline
(https://github.com/shiptux/flagos-packaging) are unaffected by this
PR — they were validated separately and continue to work.

Known limitations

  • MetaX SDK repo (Dockerfile.rpm for BACKEND=metax): gpgcheck=0. The MetaX upstream APT/YUM repo currently ships unsigned packages and does not publish a GPG public key; enabling gpgcheck=1 would just fail. Documented inline as TODO; please flag in this review if a stable MetaX GPG key has appeared since.
  • libnccl lower bound: Requires: libnccl >= 2.10 (group-call API minimum). FlagCX's NCCL adaptor may rely on ncclConfig (2.14+) in some code paths but we have not confirmed; if you spot one, please ask us to bump.
  • Dockerfile.metax-apt (RPM) is not part of this PR; the apt-based MetaX wheel-builder path lives in the sibling flagcx-packaging repo and is tracked separately.

@shiptux shiptux marked this pull request as draft May 21, 2026 12:39
@shiptux shiptux marked this pull request as ready for review May 21, 2026 15:09
@shiptux shiptux marked this pull request as draft May 21, 2026 16:48
@shiptux shiptux marked this pull request as ready for review May 22, 2026 13:48
Comment thread packaging/debian/control
Comment thread packaging/rpm/dockerfiles/Dockerfile.rpm Outdated
@MC952-arch
Copy link
Copy Markdown
Collaborator

Please rebase your code to pass CI tests

Comment thread .github/workflows/build-rpm.yml
shiptux added 15 commits May 27, 2026 18:18
Add complete RPM packaging infrastructure:
- RPM spec file with conditional backend builds (nvidia, metax, ascend)
- Dockerfiles for NVIDIA (Rocky Linux 8) and Ascend (OpenEuler 24.03)
- Parameterized build script (build-flagcx-rpm.sh)
- GitHub Actions workflow for automated RPM builds
- Proper SONAME and RPATH handling via patchelf
- ASL 2.0 license identifier for RPM compliance
… backend

- Rewrite flagcx.spec to use %{backend} dynamic package names,
  reducing 222 lines to ~90 lines and eliminating empty sub-packages
- Merge three per-backend Dockerfiles into unified Dockerfile.rpm
  with BASE_IMAGE and BACKEND build args
- Add MetaX RPM support via Rocky Linux 8 + MACA SDK yum repo
- Extract version from spec via grep instead of hardcoding in Dockerfiles
- Add --network=host to docker build for DNS reliability
- Add PR-REVIEW-ISSUES.md for tracking remaining items
The Docker Buildx setup step was removed from the GitHub Actions workflow for building RPM packages. This suggests that the RPM build process no longer requires Docker Buildx capabilities, potentially simplifying the build environment or moving to a different build approach.
@shiptux shiptux force-pushed the pr/rpm-packaging-clean branch from a037781 to aa8cc37 Compare May 27, 2026 09:32
shiptux added 2 commits May 27, 2026 20:56
Upload built RPMs to flagos-yum-hosted from within the build-rpm job on
the same self-hosted runner, gated on v* tags. h20 reaches the internal
Nexus but not codeload/api.github.com reliably, so avoid the cross-workflow
artifact round-trip that the deb upload-nexus flow depends on.
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.

3 participants