Skip to content

Proposal: Ubuntu/Debian .deb packaging for the standalone CLI #517

Open

Description

@feuyeux

Proposal

Add Ubuntu/Debian distribution support and a native dpkg-deb packager for the
standalone CLI. The change is complete and verified on a fork branch; the
repository's pull_request_creation_policy is collaborators_only, so this
issue is the submission path recommended by CONTRIBUTING.md.

Branch: feat/linux-deb-package in feuyeux/minimax-code
Compare: https://github.com/MiniMax-AI/minimax-code/compare/main...feuyeux:feat/linux-deb-package?expand=1
Commit: feuyeux@60b628e

What it adds

  • a self-contained .deb built from the same compiled dist, dependency
    manifest, licenses and release.json receipt as the npm archive
  • installs under /usr/lib/minimax-code, provides /usr/bin/mcode, and
    depends on a compatible system Node.js runtime instead of bundling one
  • Depends is pinned to the Node.js ABI used at build time, because
    better-sqlite3 ships a native V8 addon (Node 24 build:
    nodejs (>= 24.2), nodejs (<< 25))
  • exact runtime dependency versions are installed into the package, including
    native SQLite, so installation needs no network apart from Node.js
  • Debian copyright, changelog.Debian.gz, md5sums; no maintainer scripts
  • native dpkg-deb only; no new build dependency

Tooling:

  • scripts/package-deb.mjs and scripts/verify-deb.mjs
  • shared CLI staging between the npm archive and .deb packagers
  • a deb verification profile (test:deb-tools, build, verify:deb)
  • a Debian package CI workflow that builds, verifies and unpacks the package
    into a temporary dpkg root
  • installation, removal and local build documentation

Validation on the fork branch

  • pnpm verify (full): 15 gates passed, Linux, Node 24.19.0
  • pnpm verify --profile deb: 3 gates passed on a clean tree
  • produced minimax-code_0.6.5-1_amd64.deb and verified its control metadata,
    layout, symlinks, checksum, mcode --version/--help, SQLite query and
    ripgrep from the extracted package
  • dpkg --root=<temp> --force-not-root --force-depends -i unpacked and
    configured the package; /usr/bin/mcode --version reported 0.6.5

Not run: arm64 packaging, a real privileged apt install, live MiniMax
services.

Question

Would maintainers prefer this as a PR from a collaborator, or should the
approach be adjusted first (for example, packaging into the existing release
workflow instead of a separate workflow)? I can also split the change further
if the CI/doc surface is broader than you want for a first contribution.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions