Skip to content

Conversation

@jasonwitty
Copy link
Owner

Summary

This PR adds Debian packaging support for socktop-agent using cargo-deb, enabling easy distribution and installation on Debian-based systems (Debian, Ubuntu, Raspberry Pi OS, etc.).

Changes

Debian Packaging

  • Added cargo-deb configuration to socktop_agent/Cargo.toml
  • Created systemd service file (socktop-agent.service)
  • Created maintainer scripts (postinst, postrm)
  • Added helpful post-install message to guide users

TLS/SSL Fixes (cherry-picked from master)

  • Fixed rustls crypto provider panic when using --enableSSL
  • Added aws-lc-rs feature to rustls dependency
  • Installed crypto provider at startup in main.rs
  • Fixed deprecated cargo_bin usage in tests

Package Details

  • Package name: socktop-agent
  • Binary: /usr/bin/socktop_agent
  • Systemd service: socktop-agent.service (installed but not auto-enabled)
  • User/Group: Creates socktop system user/group
  • Directories:
    • /var/lib/socktop - state directory
    • /etc/socktop - configuration directory

Building the Package

cargo install cargo-deb
cargo deb -p socktop_agent

Output: target/debian/socktop-agent_<version>_<arch>.deb

Installing the Package

sudo dpkg -i target/debian/socktop-agent_1.50.2-1_amd64.deb

The service is not automatically enabled. Users can enable it with:

sudo systemctl enable --now socktop-agent

Testing Plan

  • Test installation on Debian
  • Test installation on Ubuntu
  • Test installation on Raspberry Pi OS
  • Verify systemd service starts correctly
  • Verify TLS/SSL functionality works without panic
  • Test package upgrade scenario
  • Test package removal

Next Steps

After testing, we can discuss:

  • Setting up an APT repository
  • Automating builds in CI/CD
  • Supporting multiple architectures (amd64, arm64, armhf)
  • Creating packages for socktop TUI client as well

- Add cargo-deb metadata to socktop and socktop_agent Cargo.toml
- Create systemd service file for socktop_agent
- Add postinst/postrm maintainer scripts for user/group management
- Create GitHub Actions workflow to build .deb packages for AMD64 and ARM64
- Add comprehensive documentation in docs/DEBIAN_PACKAGING.md
- Packages will be available as artifacts on every push
- Automatic GitHub releases for version tags
…irst launch after upgrade of axum server version.
- Add 'gpu' feature flag (enabled by default)
- Make gfxinfo dependency optional
- Provide no-op GPU metrics when gpu feature disabled
- Disable GPU support for RISC-V builds in CI (libdrm unavailable)
- All other architectures (amd64, arm64, armhf) still get GPU support
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