Skip to content

ci: build and attach native Linux packages (.deb / .rpm / Arch) to releases#11323

Open
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:ci/release-linux-native-packages
Open

ci: build and attach native Linux packages (.deb / .rpm / Arch) to releases#11323
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:ci/release-linux-native-packages

Conversation

@BenJule

@BenJule BenJule commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #11321. Publishes native Linux packages alongside the AppImage on every release, so Debian/Ubuntu, Fedora/RHEL and Arch users can install with their own package manager and get desktop/MIME integration.

This builds proper distro-native packages, not an AppImage wrapper: BambuStudio is compiled from source inside each distribution's own container, so the GTK/GLib/X11/etc. libraries are declared as package dependencies and used from the system rather than bundled.

When a release is published (or on manual dispatch against a tag) it produces and attaches:

  • bambustudio_<ver>_amd64.deb (Debian/Ubuntu)
  • bambustudio-<ver>-1.x86_64.rpm (Fedora/RHEL/openSUSE)
  • bambu-studio-bin-<ver>-1-x86_64.pkg.tar.zst (Arch)

How it works

Each distro builds in its own container (debian:trixie, fedora:42, archlinux:latest) and reuses the existing build entry point:

  1. ./BuildLinux.sh -u — install build dependencies
  2. ./BuildLinux.sh -d — build the bundled dependencies (cached between runs)
  3. ./BuildLinux.sh -s — build the slicer
  4. BuildLinuxImage.sh -i — assemble build/package/ (binary + libs + resources)
  5. one packaging script per format turns that tree into the native package

The three packaging scripts (scripts/build_deb.sh, build_rpm.sh, build_pkg_arch.sh) install the compiled binary under /usr/lib/bambustudio, ship a /usr/bin wrapper, a .desktop entry and icons, and deliberately exclude GTK/GLib/X11/Wayland/DBus/fontconfig/etc. from the bundled libs so the system copies are used (declared via Depends/Requires/depends). These are the same scripts I've been using on my fork, where the packages have been live and installable for a while.

Test plan / notes

  • It's a heavy job (full deps + slicer compile per distro), so it's gated to release publish + manual dispatch, with deps/build/destdir cached per distro to keep subsequent runs reasonable.
  • I can't run this repo's Actions myself, so a maintainer workflow_dispatch against the latest tag is the way to validate end to end. The packaging scripts are proven on my fork's custom build images; the main thing to confirm here is that BuildLinux.sh -u provisions cleanly on the stock debian:trixie / fedora:42 / archlinux:latest base images. Happy to switch to prebuilt dep images or adjust anything to match your conventions.
  • External repo hosting (signed APT repo / PPA / COPR / AUR / Homebrew) is a separate follow-up since that needs per-org secrets and hosting decisions.
Compiles BambuStudio from source in each distribution's own container and
packages the result natively, then uploads the .deb / .rpm / .pkg.tar.zst to
the release (issue bambulab#11321).

Unlike an AppImage wrapper, the GTK/GLib/X11/etc. libraries are declared as
package dependencies and used from the system instead of being bundled, so
these are proper distro-native packages. The build reuses the existing
BuildLinux.sh (-u/-d/-s) plus three packaging scripts (scripts/build_deb.sh,
build_rpm.sh, build_pkg_arch.sh) that turn the compiled build/package/ tree
into each format. Runs on release publish or manual dispatch, with the
dependency build cached per distro.
@BenJule BenJule force-pushed the ci/release-linux-native-packages branch from a7f3b26 to 2c7fc5e Compare June 27, 2026 16:42
@BenJule BenJule changed the title ci: attach native Linux packages (.deb / .rpm / Arch) to releases Jun 27, 2026
@BenJule

BenJule commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Updated: switched this from the lightweight fpm/AppImage-wrapper approach to a proper native build. It now compiles BambuStudio inside each distro's container and packages the compiled tree, so the GTK/GLib/X11/etc. libraries are real system dependencies instead of being bundled inside an AppImage. Heavier in CI, but the resulting .deb/.rpm/.pkg are genuine native packages.

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

Labels

None yet

1 participant