Skip to content

[BUILD] Restore Debian/RPM packaging lost in history rewrite; add openEuler 24.03 RPM support#794

Merged
zhzhcookie merged 1 commit into
flagos-ai:mainfrom
shiptux:pr/packaging-openeuler
Jul 15, 2026
Merged

[BUILD] Restore Debian/RPM packaging lost in history rewrite; add openEuler 24.03 RPM support#794
zhzhcookie merged 1 commit into
flagos-ai:mainfrom
shiptux:pr/packaging-openeuler

Conversation

@shiptux

@shiptux shiptux commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores the Debian/RPM packaging merged in #607 — the merge commit
(e56773e1) is no longer an ancestor of main after the branch
history was rewritten, so all packaging files vanished from the tree
— and extends it with openEuler 24.03 LTS RPM support (part of
the FlagOS-on-openEuler effort; same pattern as
flagos-ai/FlagSparse#29 and flagos-ai/FlagAttention#35, both green).

What changed

Recovered from the #607 merge commit (unchanged):
packaging/{debian,rpm,INSTALL.md,README.md,spike},
.github/workflows/build-{deb,rpm}.yml, .dockerignore.

Re-ported to the post-rewrite tree:

  • setup.py / pyproject.toml / MANIFEST.in moved to the repo
    root — wheel-builder COPY lists and build WORKDIR updated in both
    Dockerfiles. The narrow COPY is kept on purpose: packaging-only
    edits must not invalidate the ~50 min wheel layer.
  • The new tileir default backend requires GCC >= 13 and the
    cuda-tile submodule; distro toolchains can't satisfy that
    (openEuler 24.03 ships GCC 12.3). Added a
    FLAGTREE_DEFAULT_BACKENDS env knob in
    python/setup_tools/utils/tools.py (one field change, default
    unchanged: nvidia,amd,tileir); packaging builds pin
    FLAGTREE_DEFAULT_BACKENDS=nvidia,amd — the same contents the
    historical wheel/packages shipped.

openEuler 24.03 additions:

  • build-flagtree-rpm.sh: RPM_BASE_IMAGE env passthrough
    (default fedora:43 unchanged).
  • build-rpm.yml: fedora43 + openeuler2403 matrix
    (fail-fast: false); the Fedora artifact keeps its exact name
    (flagtree-nvidia-rpm-packages), openEuler uploads as
    flagtree-nvidia-oe2403-rpm-packages.
  • Dockerfile.rpm: reconstructs the empty %dist on openEuler
    images (.oe2403).
  • flagtree.spec: %%-escaped macros in preamble comments —
    openEuler's rpm expands macros inside comments, and the bare
    %install in the usage note terminated the preamble
    ("Version field must be present" errors).

Tested

Both matrix targets built locally end-to-end:

Target Artifact Python ABI Result
fedora43 python3-flagtree-nvidia-0.5.0-1.fc43.x86_64.rpm cp314 wheel + rpm build pass
openeuler2403 python3-flagtree-nvidia-0.5.0-1.oe2403.x86_64.rpm cp311 installs on openeuler/openeuler:24.03-lts; import triton OK (3.6.0)

The openEuler cp311 package is the missing piece that unblocks
dnf install python3-flagtree-nvidia on openEuler 24.03 (the
previously published cp310 build is Python-ABI-locked).

Limitations

…Euler 24.03 support

Packaging from flagos-ai#607 (merged 2026-06-03, commit e56773e) is no longer
on main after the branch history was rewritten; this restores it and
brings it up to date with the current tree:

- Recovered as-is: packaging/{debian,rpm,INSTALL.md,README.md,spike},
  .github/workflows/build-{deb,rpm}.yml, .dockerignore.
- Re-ported to the post-rewrite layout: setup.py / pyproject.toml /
  MANIFEST.in moved to the repo root — wheel-builder COPY lists and
  build WORKDIR updated in both Dockerfiles (narrow COPY kept so
  packaging-only edits don't invalidate the ~50 min wheel layer).
- New FLAGTREE_DEFAULT_BACKENDS env knob (setup_tools/utils/tools.py):
  packaging builds pin nvidia,amd — the historical package contents.
  The new tileir default backend requires GCC >= 13 and the cuda-tile
  submodule, which distro toolchains (openEuler 24.03: GCC 12.3)
  cannot satisfy.
- openEuler 24.03 support: RPM_BASE_IMAGE passthrough in the build
  script, fedora43 + openeuler2403 CI matrix (Fedora artifact name
  unchanged), %dist reconstruction on openEuler images, and %% escaping
  in spec preamble comments (openEuler's rpm expands macros inside
  comments; a bare %install there terminates the preamble).

Verified locally:
- fedora43: python3-flagtree-nvidia-0.5.0-1.fc43.x86_64.rpm (cp314)
- openeuler2403: python3-flagtree-nvidia-0.5.0-1.oe2403.x86_64.rpm
  (cp311); installs on openeuler/openeuler:24.03-lts and
  'import triton' succeeds (3.6.0).

@zhzhcookie zhzhcookie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants