Skip to content

[CICD] Add Debian + RPM packaging#1205

Open
shiptux wants to merge 14 commits into
flagos-ai:mainfrom
shiptux:pr/packaging
Open

[CICD] Add Debian + RPM packaging#1205
shiptux wants to merge 14 commits into
flagos-ai:mainfrom
shiptux:pr/packaging

Conversation

@shiptux
Copy link
Copy Markdown

@shiptux shiptux commented May 21, 2026

PR Category

CICD

PR Types

New Features

PR Description

Adds Debian (.deb) and RPM packaging configuration under
packaging/debian/ and packaging/rpm/ so FlagScale can be
distributed as a noarch package alongside the rest of the FlagOS
stack via standard apt install / dnf install flows.

Produced binaries (built locally on Ubuntu 22.04 / Fedora 43):

  • python3-flagscale_1.0.0-1_all.deb (≈587 KB, noarch)
  • python3-flagscale-1.0.0-1.fc43.noarch.rpm (≈2.0 MB)

Ships the flagscale CLI under /usr/bin/flagscale. Heavy ML deps
(PyTorch, Megatron, vLLM) are intentionally NOT declared as hard
Depends — they're sized / sourced by the user (e.g. pip install "flagscale[cuda-train]" or via NVIDIA's NGC container).

What changed (all under packaging/, no source code changes):

  • debian/{control,rules,changelog,copyright,source/format} — Debian
    source-format-3.0-native packaging using dh-python +
    pyproject-rpm-macros.
  • rpm/specs/flagscale.spec — RPM spec mirroring the DEB layout,
    using %pyproject_wheel / %pyproject_install /
    %pyproject_save_files for modern Fedora compatibility.
  • {debian,rpm}/build-helpers/ — single-command containerized
    build: bash packaging/debian/build-helpers/build-flagscale.sh
    produces the .deb without host build-deps; same shape for RPM.

How it was tested:

  • Local container build produces both artifacts above.
  • Clean ubuntu:24.04 + debian:trixie containers apt install python3-flagscale succeed; importlib.util.find_spec('flagscale')
    resolves under /usr/lib/python3/dist-packages/flagscale/.
  • Public end-to-end install from
    https://shiptux.github.io/flagos-packaging/apt validated on
    2026-05-20 (see flagos-packaging docs).

Distribution:

This artifact is consumed by a central FlagOS publish repo
(sandbox at https://github.com/shiptux/flagos-packaging; the
production endpoint remains the FlagOS Nexus mirror at
resource.flagos.net).

Known limitations:

  • Pure-Python noarch package; no per-Python-ABI build needed.
  • Heavy ML deps left as user-supplied. Documented in
    flagos-packaging's docs/compatibility-status.md.

shiptux added 3 commits April 26, 2026 18:18
Adds packaging/debian/ and packaging/rpm/ to produce:
  - python3-flagscale_1.0.0-1_all.deb (587 KB, noarch)
  - python3-flagscale-1.0.0-1.fc43.noarch.rpm (2.0 MB)

Build pattern mirrors FlagCX:
  - debian/ uses dh-python with the pyproject buildsystem; minimal
    Build-Depends, Architecture: all because FlagScale is pure Python
  - rpm spec uses %pyproject_wheel / %pyproject_install / %pyproject_save_files
    (compatible with Fedora 44+; replaces the deprecated %py3_build pair)
  - build-helpers/Dockerfile.deb is Ubuntu 22.04 + dh-python +
    pybuild-plugin-pyproject + setuptools>=77 via pip (Ubuntu 22.04's
    apt setuptools predates PEP 639 license-file support)

Heavy runtime deps (transformers, torch, etc.) are intentionally NOT
declared as Depends to keep the package installable on systems without
GPU drivers; users install those via pip extras as needed.
@shiptux shiptux marked this pull request as draft May 21, 2026 12:39
shiptux added 5 commits May 21, 2026 21:43
Triggered on push tag v*, PR touching packaging/, or manual dispatch.
Runs the existing local build helper in a container and uploads the
produced .deb / .rpm as actions artifacts named 'flagscale-amd64-packages' /
'flagscale-amd64-rpm-packages', matching the central flagos-packaging publish
pipeline's components/flagscale.yml artifact_pattern.
…ession); add Vcs fields; UTC timestamp; preserve build stderr
@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 added 6 commits May 22, 2026 01:49
…c features used; ubuntu:24.04 build now passes)
…ra-core Depends; filter hydra-core from RPM Requires (not in distro, install via pip)
…2); apt --no-install-recommends (flagos-ai#10); CI trigger on src paths (flagos-ai#8); .dockerignore (flagos-ai#11)
- spec: re-add explicit %{_bindir}/flagscale (verified: %pyproject_save_files does NOT pick it up despite [project.scripts]), tighten __requires_exclude regex, escape %%pyproject_save_files in comment
- Dockerfile.deb: add build-essential
- INSTALL.md: user-side hydra-core install
@shiptux shiptux marked this pull request as ready for review May 22, 2026 13:48
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