Skip to content
Open
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
96be2ef
Replace unwrap with error handling
BenediktBurger Aug 8, 2025
30e0182
Add detectors for linux
BenediktBurger Aug 8, 2025
f3e1790
Good changes
BenediktBurger Aug 8, 2025
8846dba
Changes which might not be necessary
BenediktBurger Aug 8, 2025
cc9174b
Small installation notes
BenediktBurger Aug 8, 2025
ebef137
feat: Add Linux support documentation
PythonTilk Nov 10, 2025
0ba0e95
📝 Add docstrings to `linux-development`
coderabbitai[bot] Nov 10, 2025
44f163e
Merge pull request #2 from PythonTilk/coderabbitai/docstrings/ebef137
PythonTilk Nov 10, 2025
0242737
refactor(audio): deduplicate mic config validation; fix lib.rs signat…
PythonTilk Nov 10, 2025
ed54dea
audio+listener+whisper-local: fix doctests/imports, remove duplicate …
PythonTilk Nov 10, 2025
8c793a1
fix(audio+detect): comprehensive error handling and robustness improv…
PythonTilk Nov 11, 2025
4f34a22
fix(connector): remove heavy ML features from default feature set
PythonTilk Nov 11, 2025
f4e86be
docs(linux): update Linux documentation with recent improvements
PythonTilk Nov 11, 2025
89166dd
feat(audio): implement PulseAudio speaker audio capture for Linux
PythonTilk Nov 11, 2025
3004678
docs(linux): update documentation to reflect speaker audio capture im…
PythonTilk Nov 11, 2025
4d7c3c6
feat(notification): implement Linux notification system with D-Bus in…
PythonTilk Nov 11, 2025
7dabd2d
fix(desktop): enable local-llm and local-stt features on connector pl…
PythonTilk Nov 11, 2025
71354d9
docs(linux): consolidate Linux documentation into linuxtodo.md
PythonTilk Nov 11, 2025
26aa753
fix(linux): resolve critical audio and window display issues on Wayland
PythonTilk Nov 11, 2025
4ee268d
fix(linux): add speaker device handling and code formatting
PythonTilk Nov 11, 2025
691ae5a
fix(linux): enable PulseAudio feature for Linux builds
PythonTilk Nov 11, 2025
dbff045
chore: apply code formatting with dprint
PythonTilk Nov 11, 2025
7b28775
feat(audio): add configurable microphone sensitivity with persistent …
PythonTilk Nov 11, 2025
6396a41
feat(calendar): add CalDAV support for Linux iCloud calendar sync
PythonTilk Nov 12, 2025
1f73547
feat(audio): add microphone testing and automatic calibration system
PythonTilk Nov 12, 2025
6673ef2
fix(audio): remove pulseaudio from default features for cross-platfor…
PythonTilk Nov 12, 2025
939a9f7
feat(contacts): add CardDAV contact sync support for Apple platforms
PythonTilk Nov 12, 2025
19ab2fa
feat(ui): add contact sync UI controls and fix database error handling
PythonTilk Nov 12, 2025
561b25e
feat(linux): enable autostart configuration with UI toggle in Settings
PythonTilk Nov 12, 2025
c63d31b
feat(audio): implement ALSA speaker capture with loopback device support
PythonTilk Nov 12, 2025
9e9cfa0
feat(ci): add Linux packaging workflows for .deb and .AppImage
PythonTilk Nov 12, 2025
1a1c793
feat(ci): add ARM64 support for Linux .deb and AppImage packages
PythonTilk Nov 12, 2025
3f8a9ad
feat(ci): add RPM and Arch Linux package workflows
PythonTilk Nov 12, 2025
4a3183b
docs(ci): update Linux packaging documentation with ARM64 and new for…
PythonTilk Nov 12, 2025
35aed95
Delete AGENTS.md
PythonTilk Nov 12, 2025
45f1c12
feat(calendar): add iCloud CalDAV integration for Linux with credenti…
PythonTilk Nov 12, 2025
84bb4e5
fix(i18n): sync translation catalogs with latest source strings
PythonTilk Nov 12, 2025
a79b48c
style(workflows): format Linux packaging workflows and add workflow name
PythonTilk Nov 12, 2025
d2cc66c
fix(ci): add missing dependencies for Linux packaging workflows
PythonTilk Nov 12, 2025
f927dda
fix(ci): use python-poetry package in Arch workflow instead of pip
PythonTilk Nov 12, 2025
b3c7774
fix(ci): add ARM64 libc headers for cross-compilation in Linux workflows
PythonTilk Nov 13, 2025
47525d2
fix(ci): fix Arch PKGBUILD generation and makepkg environment
PythonTilk Nov 13, 2025
6ce4dd4
fix(ci): remove invalid --bundles flag from Arch workflow
PythonTilk Nov 13, 2025
63dcbf4
fix(ci): unset x86-64 CFLAGS for ARM64 cross-compilation in Arch
PythonTilk Nov 13, 2025
25d6ec5
Fix RPM workflow: quote file paths with spaces
PythonTilk Nov 13, 2025
694121d
fix(ci): add clang and LIBCLANG_PATH for bindgen in Arch workflow
PythonTilk Nov 13, 2025
55cf4ea
test(ci): add push trigger to Arch workflow for testing
PythonTilk Nov 13, 2025
cd7fadf
fix(ci): correct env variable syntax in Arch workflow
PythonTilk Nov 13, 2025
246177b
fix(ci): correct YAML indentation in Arch workflow
PythonTilk Nov 13, 2025
4eee9df
fix(ci): comprehensive fix for Arch Linux ARM64 cross-compilation
PythonTilk Nov 13, 2025
1029eca
fix(ci): correct YAML indentation in makepkg.conf heredoc
PythonTilk Nov 13, 2025
4b69c59
refactor(ci): use Docker with QEMU for native ARM64 builds instead of…
PythonTilk Nov 13, 2025
654f732
fix(ci): disable ARM64 builds temporarily - archlinux image doesn't s…
PythonTilk Nov 13, 2025
91eafa1
fix(ci): fix PKGBUILD variable substitution in Arch Linux workflow
PythonTilk Nov 13, 2025
3d7c114
fix(ci): disable package signing in Arch Linux workflow
PythonTilk Nov 13, 2025
230fbb1
docs: update WORKFLOW_REVIEW with fixes applied
PythonTilk Nov 13, 2025
5e1116c
fix(ci): apply CodeRabbit improvements to Arch Linux workflow
PythonTilk Nov 13, 2025
b68a9f0
docs: update WORKFLOW_REVIEW with CodeRabbit fixes applied to Arch wo…
PythonTilk Nov 13, 2025
b566fed
fix(ci): apply robustness improvements to DEB and RPM workflows
PythonTilk Nov 13, 2025
8e2c4f3
docs: update WORKFLOW_REVIEW with all fixes applied to all workflows
PythonTilk Nov 13, 2025
db2b112
fix(ci): address minor CodeRabbit findings in workflows
PythonTilk Nov 13, 2025
ad69eb6
Remove development push trigger from Arch workflow
PythonTilk Nov 13, 2025
bf171ce
fix(ci): correct ARM64 architecture naming in Arch workflow
PythonTilk Nov 13, 2025
0f21351
fix(ci): install jq before using it in validation steps
PythonTilk Nov 13, 2025
c2ce803
fix(ci): install jq in Arch workflow before validation
PythonTilk Nov 13, 2025
979e524
fix(ci): use dnf instead of apt-get in RPM workflow
PythonTilk Nov 13, 2025
662a7c9
fix(ci): correct TAURI_CONF_PATH to include apps/desktop/
PythonTilk Nov 13, 2025
c5b53f0
fix(ci): correct Tauri config paths for pnpm -F desktop context
PythonTilk Nov 13, 2025
e6ec36e
fix(ci): add xdg-utils for AppImage bundling in Arch and Debian workf…
PythonTilk Nov 13, 2025
f7e2a87
fix(ci): ignore AppImage bundling failures in Arch workflow
PythonTilk Nov 13, 2025
67f3661
fix: resolve test script failures and disable ARM64 builds
PythonTilk Nov 13, 2025
8bf8d8c
fix(ci): properly handle AppImage bundling failures in Arch workflow
PythonTilk Nov 13, 2025
c0d0e35
fix(ci): disable AppImage bundling in Arch workflow
PythonTilk Nov 13, 2025
41b960f
fix(ci): use cargo build directly in Arch workflow
PythonTilk Nov 13, 2025
0ec7d06
fix(ci): quote deb package path in Debian workflow
PythonTilk Nov 13, 2025
10c678e
fix(ci): add verbose logging and error handling to Arch cargo build
PythonTilk Nov 13, 2025
a0720c7
fix(ci): set BLAS_INCLUDE_DIRS for whisper-rs-sys in Arch workflow
PythonTilk Nov 14, 2025
0f2cc15
fix(ci): install cblas package and auto-detect cblas.h location in Ar…
PythonTilk Nov 14, 2025
1e06672
fix(arch): add shaderc package for Vulkan shader compiler (glslc)
PythonTilk Nov 14, 2025
5c7791c
fix: use correct binary name 'desktop' in Arch workflow
PythonTilk Nov 14, 2025
ad4735e
fix: use ubuntu-22.04 for AppImage builds to improve runner availability
PythonTilk Nov 14, 2025
da37532
fix: add libsoup-3.0-dev dependency for AppImage builds
PythonTilk Nov 14, 2025
a5461d1
Add libjavascriptcoregtk-4.1-dev dependency for AppImage build
PythonTilk Nov 14, 2025
033b919
Change AppImage build to Ubuntu 24.04 for webkit2gtk-4.1 support
PythonTilk Nov 14, 2025
19dbda8
fix: address CodeRabbit review findings for code quality and document…
PythonTilk Nov 14, 2025
ad51002
Merge pull request #3 from PythonTilk/coderabbit-review-linux
PythonTilk Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
379 changes: 379 additions & 0 deletions .github/workflows/README_linux_packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,379 @@
# Linux Package Workflows

This document describes the automated Linux packaging workflows for Hyprnote.

## Workflows Overview

Hyprnote provides automated packaging for multiple Linux distributions:

- **`linux_packages.yaml`**: .deb (Debian/Ubuntu) and .AppImage (universal)
- **`linux_packages_rpm.yaml`**: .rpm (Fedora/RHEL/openSUSE)
- **`linux_packages_arch.yaml`**: .pkg.tar.zst (Arch Linux)

All workflows support both **x86_64** and **aarch64** (ARM64) architectures.

## Workflow Details

### `linux_packages.yaml` - Debian & AppImage

Builds and publishes .deb packages and AppImage for Debian-based distributions.

#### Trigger Conditions

- **Manual dispatch**: Via GitHub Actions UI (workflow_dispatch)
- Choose channel: `stable` or `nightly` (default)
- **Automatic**: On release publish (when tag starts with `desktop_`)

#### Jobs

##### 1. `build-linux-packages` - Debian Package

**Runner**: `ubuntu-24.04`

**Builds**: `.deb` package for Debian/Ubuntu-based distributions

**Architectures**:
- `x86_64-unknown-linux-gnu` (amd64)
- `aarch64-unknown-linux-gnu` (arm64) - with cross-compilation

**Features**:
- ML Backend: OpenBLAS (STT) + Vulkan (LLM)
- Version validation against release tag
- Full dependency installation (WebKit, GTK, PulseAudio, ALSA, etc.)
- ARM64 cross-compilation using gcc-aarch64-linux-gnu
- **Installation testing** (x86_64 only): Installs the .deb package and verifies:
- Package installation succeeds
- Binary is present and executable
- Shared library dependencies are satisfied
- .desktop file exists and is valid
- **Package verification** (ARM64): Validates package structure and binary architecture
- Uploads artifact to GitHub Actions
- Publishes to GitHub Releases (on release events)

**Package naming**: `hyprnote-{VERSION}-{amd64|arm64}.deb`

##### 2. `build-appimage` - AppImage Package

**Runner**: `ubuntu-20.04` (older for better compatibility)

**Builds**: `.AppImage` portable package

**Architectures**:
- `x86_64-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu` (ARM64) - with cross-compilation

**Features**:
- ML Backend: OpenBLAS (STT) + Vulkan (LLM)
- Self-contained portable format (no installation required)
- ARM64 cross-compilation support
- **AppImage testing** (x86_64 only): Validates the package by:
- Verifying file format
- Extracting and inspecting contents
- Checking for .desktop file and icons
- Validating binary and dependencies
- Testing execution (basic smoke test)
- **Package verification** (ARM64): Validates file format and binary architecture
- Uploads artifact to GitHub Actions
- Publishes to GitHub Releases (on release events)

**Package naming**: `hyprnote-{VERSION}-{x86_64|aarch64}.AppImage`

##### 3. `build-flatpak` - Flathub Publishing (DISABLED)

**Status**: Commented out - awaiting Flathub permissions

**When to enable**:
1. Create Flatpak manifest at `https://github.com/flathub/com.hyprnote.Hyprnote`
2. Get approval from Flathub reviewers
3. Set up `FLATHUB_TOKEN` secret in GitHub
4. Uncomment the job in the workflow

**Required files** (to be created when enabling):
- `com.hyprnote.Hyprnote.yml` - Flatpak manifest
- `com.hyprnote.Hyprnote.metainfo.xml` - AppStream metadata

---

### `linux_packages_rpm.yaml` - RPM Packages

Builds and publishes .rpm packages for Fedora, RHEL, and openSUSE-based distributions.

#### Trigger Conditions

- **Manual dispatch**: Via GitHub Actions UI (workflow_dispatch)
- **Automatic**: On release publish (when tag starts with `desktop_`)

#### Job: `build-rpm`

**Container**: `fedora:40`

**Builds**: `.rpm` package

**Architectures**:
- `x86_64-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu` (ARM64) - with cross-compilation

**Features**:
- ML Backend: OpenBLAS (STT) + Vulkan (LLM)
- Native Fedora build environment
- ARM64 cross-compilation using gcc-aarch64-linux-gnu
- **Installation testing** (x86_64 only): Installs via dnf and verifies binary, dependencies, and .desktop file
- **Package verification** (ARM64): Uses rpm2cpio to extract and validate binary architecture
- Uploads artifact to GitHub Actions
- Publishes to GitHub Releases (on release events)

**Package naming**: `hyprnote-{VERSION}-{x86_64|aarch64}.rpm`

---

### `linux_packages_arch.yaml` - Arch Linux Packages

Builds and publishes Arch Linux packages using PKGBUILD.

#### Trigger Conditions

- **Manual dispatch**: Via GitHub Actions UI (workflow_dispatch)
- **Automatic**: On release publish (when tag starts with `desktop_`)

#### Job: `build-arch-package`

**Container**: `archlinux:latest`

**Builds**: `.pkg.tar.zst` package

**Architectures**:
- `x86_64-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu` (ARM64) - with cross-compilation

**Features**:
- ML Backend: OpenBLAS (STT) + Vulkan (LLM)
- Native Arch Linux build environment
- PKGBUILD generated dynamically during build
- Built using makepkg (non-root builder user)
- ARM64 cross-compilation support
- **Installation testing** (x86_64 only): Installs via pacman and verifies binary
- **Package verification** (ARM64): Extracts tarball and validates binary architecture
- Uploads artifact to GitHub Actions
- Publishes to GitHub Releases (on release events)

**Package naming**: `hyprnote-{VERSION}-{x86_64|aarch64}.pkg.tar.zst`

---

## Configuration

### Environment Variables

- `RELEASE_CHANNEL`: `stable` or `nightly`
- `TAURI_CONF_PATH`: Points to appropriate Tauri config file
- Stable: `./src-tauri/tauri.conf.stable.json`
- Nightly: `./src-tauri/tauri.conf.nightly.json`

### Required Secrets

The workflow uses these GitHub secrets:

- `GITHUB_TOKEN` (automatic)
- `POSTHOG_API_KEY` - Analytics
- `SENTRY_DSN` - Error tracking
- `KEYGEN_ACCOUNT_ID` - License management
- `KEYGEN_VERIFY_KEY` - License verification
- `TAURI_SIGNING_PRIVATE_KEY` - Code signing
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` - Key password
- `FLATHUB_TOKEN` (future) - Flathub publishing

## Usage

### Manual Release

**For .deb and AppImage:**
1. Go to **Actions** → **Linux Packages** in GitHub
2. Click **Run workflow**
3. Select branch (e.g., `linux-development`)
4. Choose channel: `stable` or `nightly`
5. Click **Run workflow**

**For RPM packages:**
1. Go to **Actions** → **Linux RPM Packages** in GitHub
2. Follow steps 2-5 above

**For Arch packages:**
1. Go to **Actions** → **Arch Linux Packages** in GitHub
2. Follow steps 2-5 above

### Automatic Release

1. Create a git tag: `desktop_v{VERSION}`
2. Push the tag: `git push origin desktop_v{VERSION}`
3. Create a GitHub release from the tag
4. All workflows trigger automatically
5. Packages are uploaded to the release

**Expected artifacts per release:**
- `hyprnote-{VERSION}-amd64.deb`
- `hyprnote-{VERSION}-arm64.deb`
- `hyprnote-{VERSION}-x86_64.AppImage`
- `hyprnote-{VERSION}-aarch64.AppImage`
- `hyprnote-{VERSION}-x86_64.rpm`
- `hyprnote-{VERSION}-aarch64.rpm`
- `hyprnote-{VERSION}-x86_64.pkg.tar.zst`
- `hyprnote-{VERSION}-aarch64.pkg.tar.zst`

**Total: 8 packages per release**

## Testing

### Installation Testing

Both workflows include comprehensive testing:

#### .deb Package Testing
- Installs via `dpkg -i`
- Fixes dependencies with `apt-get install -f`
- Verifies package is listed
- Checks binary existence and executability
- Validates shared library dependencies (`ldd`)
- Verifies .desktop file
- Cleans up after testing

#### AppImage Testing
- Validates file format
- Extracts contents (`--appimage-extract`)
- Inspects directory structure
- Verifies .desktop file and icons
- Checks binary and dependencies
- Attempts execution (smoke test)

### Manual Testing

After download, test the packages:

```bash
# .deb package (Debian/Ubuntu)
sudo dpkg -i hyprnote-*-amd64.deb # or arm64.deb
sudo apt-get install -f # Fix dependencies if needed
hyprnote # Or launch from application menu

# .rpm package (Fedora/RHEL)
sudo dnf install hyprnote-*-x86_64.rpm # or aarch64.rpm
# Or on RHEL/CentOS:
sudo yum install hyprnote-*-x86_64.rpm
hyprnote

# Arch package
sudo pacman -U hyprnote-*-x86_64.pkg.tar.zst # or aarch64.pkg.tar.zst
hyprnote

# AppImage (universal)
chmod +x hyprnote-*-x86_64.AppImage # or aarch64.AppImage
./hyprnote-*.AppImage
```

## Distribution Support

### .deb Package
- ✅ Ubuntu 24.04+ (amd64, arm64)
- ✅ Debian 12+ Bookworm (amd64, arm64)
- ✅ Linux Mint 21+ (amd64, arm64)
- ✅ Pop!_OS 22.04+ (amd64, arm64)
- ✅ Elementary OS 7+ (amd64, arm64)
- ✅ Raspberry Pi OS 64-bit (arm64)

### .rpm Package
- ✅ Fedora 40+ (x86_64, aarch64)
- ✅ RHEL 9+ (x86_64, aarch64)
- ✅ Rocky Linux 9+ (x86_64, aarch64)
- ✅ AlmaLinux 9+ (x86_64, aarch64)
- ✅ openSUSE Tumbleweed (x86_64, aarch64)

### Arch Linux Package
- ✅ Arch Linux (x86_64, aarch64)
- ✅ Manjaro (x86_64, aarch64)
- ✅ EndeavourOS (x86_64, aarch64)
- ✅ Garuda Linux (x86_64, aarch64)

### AppImage
- ✅ Universal (works on most distributions)
- ✅ No installation required
- ✅ Compatible with older systems (built on Ubuntu 20.04)
- ✅ Portable (can run from USB drive)
- ✅ x86_64 and aarch64 (ARM64) support

## Architecture Support

**Current**: ✅ `x86_64` (amd64) and `aarch64` (arm64)

All workflows now support both architectures:
- Native builds for x86_64
- Cross-compilation for ARM64 using gcc-aarch64-linux-gnu
- Installation testing on x86_64 runners
- Package verification for ARM64 (without requiring native execution)

## Dependencies

### Build Dependencies
- Rust toolchain
- Node.js + pnpm
- Python + Poetry
- protoc (Protocol Buffers)
- System libraries (WebKit, GTK, ALSA, PulseAudio, etc.)

### Runtime Dependencies (included in packages)
- WebKit2GTK 4.1
- GTK 3
- AppIndicator
- ALSA + PulseAudio (audio)
- Vulkan (GPU acceleration)
- OpenBLAS (ML inference)

## Troubleshooting

### Build Failures

**Issue**: Missing system dependencies
**Solution**: Check the "Install system dependencies" step in the workflow

**Issue**: Rust compilation errors
**Solution**: Verify feature flags match your target platform

**Issue**: Version mismatch
**Solution**: Ensure git tag matches version in `tauri.conf.json`

**Issue**: ARM64 cross-compilation fails
**Solution**:
- Check that gcc-aarch64-linux-gnu is installed
- Verify PKG_CONFIG environment variables are set
- Ensure ARM64 libraries are available

### Installation Issues

**Issue**: .deb dependency errors
**Solution**: Run `sudo apt-get install -f` to resolve

**Issue**: .rpm dependency errors
**Solution**: Run `sudo dnf install --best --allowerasing` or check for conflicting packages

**Issue**: Arch package conflicts
**Solution**: Check for file conflicts with `pacman -Qo <file>` and resolve manually

**Issue**: AppImage won't execute
**Solution**:
- Ensure it's marked executable: `chmod +x *.AppImage`
- Check if FUSE is installed (some systems need it)

**Issue**: Missing graphics drivers
**Solution**: Install Vulkan drivers for your GPU

**Issue**: ARM64 package won't run on x86_64
**Solution**: ARM64 packages are architecture-specific and require ARM64 hardware (Raspberry Pi, ARM servers, etc.)

## Future Work

- [x] ~~Enable ARM64 (aarch64) builds~~ ✅ **COMPLETED**
- [x] ~~Add RPM packages for Fedora/RHEL~~ ✅ **COMPLETED**
- [x] ~~Add Arch Linux PKGBUILD~~ ✅ **COMPLETED**
- [ ] Enable Flathub publishing
- [ ] Automated testing in containers (different distros)
- [ ] Performance benchmarking in CI
- [ ] Add RISC-V support (when Tauri supports it)
- [ ] Publish to distribution repositories (PPAs, AUR, COPR)
Loading