Skip to content

Phase 1: Add Linux distribution packages (.deb and .rpm) - #193

Merged
httpdss merged 1 commit into
mainfrom
cursor/distro-packages-471a
Aug 23, 2026
Merged

Phase 1: Add Linux distribution packages (.deb and .rpm)#193
httpdss merged 1 commit into
mainfrom
cursor/distro-packages-471a

Conversation

@httpdss

@httpdss httpdss commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Issue

Phase 1 of Linux distribution packaging as requested.

Description

This PR introduces comprehensive Linux distribution packaging for structkit, enabling easy installation via native package managers on Debian/Ubuntu (.deb) and Fedora/RHEL (.rpm) systems.

Key Changes

Package Structure:

  • Created packaging/debian/ and packaging/rpm/ directories with nfpm configurations
  • Implemented vendored virtual environment approach at /usr/lib/structkit/venv/
  • Added CLI shim script at /usr/bin/structkit that invokes the vendored environment
  • Packaged all Python dependencies to avoid conflicts with system packages

Build System:

  • New GitHub Actions workflow .github/workflows/build-linux-packages.yaml
  • Triggers on release events and manual workflow dispatch
  • Builds both amd64 and arm64 packages for each format (4 total artifacts per run)
  • Integrates with existing PyPI publish workflow without interference

Documentation:

  • Comprehensive packaging/README.md with:
    • Local build instructions
    • Installation instructions for both package formats
    • CI/CD workflow documentation
    • Troubleshooting guidance

Technical Implementation

The packages use a vendored Python environment to handle dependencies that aren't available in distribution repositories:

/usr/lib/structkit/venv/     # Complete Python environment with all dependencies
/usr/bin/structkit           # Wrapper script that invokes vendored structkit
/usr/share/doc/structkit/    # Documentation (README, LICENSE)

This approach ensures:

  • No conflicts with system Python packages
  • Consistent dependency versions across distributions
  • Simple installation without requiring pip or manual venv management

Build Results

Successfully tested local builds:

  • structkit_3.2.1_amd64.deb (46 MB)
  • structkit-3.2.1-1.x86_64.rpm (48 MB)
  • ✅ Verified package installation and CLI functionality

Installation

Debian/Ubuntu:

sudo dpkg -i structkit_VERSION_amd64.deb

Fedora/RHEL:

sudo dnf install ./structkit-VERSION-1.x86_64.rpm

Out of Scope (Future Phases)

As specified in requirements, this PR does NOT include:

  • Submission to Debian mentors or Fedora review processes
  • PPA/COPR repository setup
  • Official distribution repository inclusion
  • Package signing/verification
  • Marketplace/catalog integration

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have added documentation for the new features
  • I have tested the build and installation process locally
  • The workflow does not interfere with existing PyPI publish workflow

Additional Comments

Workflow Usage:

  • Reviewers can test the workflow manually via Actions → build-linux-packages → Run workflow
  • Or trigger automatically by creating a release
  • Artifacts will be uploaded with 90-day retention for testing

Architecture Support:

  • Primary target is amd64 (tested and working)
  • arm64 builds included in workflow but may require testing on ARM hardware

Package Size:

  • Packages are ~46-48 MB due to vendored Python dependencies
  • This is expected and necessary to ensure compatibility across distributions
Open in Web Open in Cursor 

- Add packaging structure under packaging/debian/ and packaging/rpm/
- Create nfpm configurations for both Debian/Ubuntu and Fedora/RHEL
- Implement vendored venv approach at /usr/lib/structkit with shim at /usr/bin/structkit
- Add GitHub Actions workflow for building packages (amd64 and arm64)
- Support both release and workflow_dispatch triggers
- Add comprehensive documentation in packaging/README.md
- Packages include all Python dependencies in vendored environment

Co-authored-by: Kenneth Belitzky <kenny@belitzky.com>
@httpdss
httpdss marked this pull request as ready for review August 23, 2026 21:05
@httpdss
httpdss merged commit 4e6c207 into main Aug 23, 2026
3 checks passed
@httpdss
httpdss deleted the cursor/distro-packages-471a branch August 23, 2026 21:06
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.

2 participants