Skip to content

feat(packaging): build .deb and .rpm packages#2466

Draft
gantoine wants to merge 1 commit into
mainfrom
georges/linux-publish-deb-rpm
Draft

feat(packaging): build .deb and .rpm packages#2466
gantoine wants to merge 1 commit into
mainfrom
georges/linux-publish-deb-rpm

Conversation

@gantoine
Copy link
Copy Markdown
Member

@gantoine gantoine commented Jun 2, 2026

What

Adds .deb and .rpm Linux packages to the release, alongside the existing AppImage and zip.

  • forge.config.ts: add MakerDeb and MakerRpm. Both declare mimeType: ["x-scheme-handler/posthog-code"], so installing registers the posthog-code:// deep-link handler system-wide via the generated .desktop file + the package manager's update-desktop-database trigger (the same mechanism VS Code's deb/rpm use). Package name/bin yield /usr/bin/posthog-code, consistent with the AUR package.
  • package.json / lockfile: add @electron-forge/maker-deb and @electron-forge/maker-rpm.
  • code-release.yml: the publish-linux job (x64 + arm64) now installs fakeroot (maker-deb) and rpm (maker-rpm), so both arches build and upload automatically.
  • scripts/build-linux-docker.sh: install fakeroot + rpm so local pnpm --filter code make:linux doesn't break on the new makers, and add optional --target/--targets (aliases: deb, rpm, zip, appimage, or a full maker package name) to build a subset.

Why

Native Arch/Debian/Fedora-style installs that also register the URL scheme handler at install time, so the browser can launch the app after login without runtime registration.

Testing / validation

  • forge.config.ts typechecks against the real maker types (no errors from the new blocks).
  • Confirmed the makers' default dependency lists are Electron-version-gated, so the stale libgconf/GConf2 dep is excluded for our Electron — packages should be installable with default deps on modern Ubuntu/Debian/Fedora.
  • build-linux-docker.sh target parser validated under bash across flag/=/comma/env forms (case-insensitive, rejects unknowns).
  • Not yet built end-to-end here (needs a full Linux app build); the first CI run produces real artifacts. Smoke-test with apt-get install ./*.deb / dnf install ./*.rpm and xdg-mime query default x-scheme-handler/posthog-code.

Notes

  • AUR packaging is a separate branch/PR (georges/linux-publish-aur).
  • AppImage scheme registration (no install step) remains an open question — VS Code doesn't register from its portable build either.

🤖 Generated with Claude Code

Add MakerDeb and MakerRpm to the Electron Forge config so Linux releases
also produce .deb and .rpm packages alongside the AppImage and zip. Both
declare mimeType x-scheme-handler/posthog-code, so installing registers the
posthog-code:// deep-link handler system-wide via the generated .desktop
file and the package manager's update-desktop-database trigger. The package
name/bin yield /usr/bin/posthog-code, consistent with the AUR package.

The publish-linux CI job (x64 + arm64) now installs fakeroot (maker-deb)
and rpm (maker-rpm), so both arches are built and uploaded automatically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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