Build System
Multi-platform packaging pipeline for proton-drive-linux.
Overview
The build system produces native packages across 8 format families and 18+ distribution targets:
| Format | Targets |
|---|---|
| APK | Alpine 3.20, 3.22, 3.23 |
| AppImage | linux-baseline |
| DEB | Debian 12, 13; Ubuntu 24.04, 26.04 |
| RPM | EL10, Fedora 43, 44; openSUSE Tumbleweed |
| AUR | arch-native |
| Flatpak | GNOME 49, 50 |
| Snap | core24, core26 |
Build Pipeline
graph LR
WC_CLONE[Clone WebClients
ProtonMail/WebClients]
WC_PATCH[Apply Platform Patch
patches/*.patch]
WC_BUILD[Build WebClients
scripts/build-webclients.sh]
TAURI_BUILD[Compile Tauri
cargo build --release]
PKG[Package]
subgraph "WebClients Patchers"
STUBS[create_stubs.py
Stub private npm packages]
DEPS[fix_deps.py
Fix dependency issues]
DRAWER[patch_drive_linux_drawer.py
Sidebar rail injection]
BRIDGE[patch_drive_linux_sync_bridge.py
Sync bridge injection]
end
subgraph "Outputs"
APK_OUT[.apk.tar.gz]
APPIMAGE[.AppImage]
DEB_OUT[.deb]
RPM_OUT[.rpm]
AUR_OUT[.pkg.tar.zst]
end
WC_CLONE --> WC_PATCH
WC_PATCH --> WC_BUILD
WC_BUILD --> STUBS
WC_BUILD --> DEPS
WC_BUILD --> DRAWER
WC_BUILD --> BRIDGE
STUBS --> TAURI_BUILD
DEPS --> TAURI_BUILD
DRAWER --> TAURI_BUILD
BRIDGE --> TAURI_BUILD
TAURI_BUILD --> PKG
PKG --> APK_OUT
PKG --> APPIMAGE
PKG --> DEB_OUT
PKG --> RPM_OUT
PKG --> AUR_OUT
WebClients Integration
The WebClients frontend (Proton’s React monorepo) requires several patching steps before it works in the Tauri shell:
1. create_stubs.py
Proton WebClients uses private npm packages that aren’t published publicly. This script creates stub packages with empty index.js files so the build can resolve imports without the real packages.
2. fix_deps.py
Patches dependency issues in the WebClients build — resolves workspace configuration conflicts and fixes version mismatches between the monorepo and standalone build.
3. patch_drive_linux_drawer.py
Injects the Drive sidebar/rail component. Called when the add-drive-linux-drawer-rail.patch fails to apply automatically (due to upstream WebClients changes).
4. patch_drive_linux_sync_bridge.py
Injects ProtonDriveLinuxSyncBridge.tsx into the Drive app. This component bridges the WebClients frontend with the Tauri sync backend via IPC.
Build Scripts
| Script | Location | Purpose |
|---|---|---|
build-webclients.sh |
scripts/ |
Full WebClients build: clone, patch, install, build Drive/Account/Verify |
build-aur-package.sh |
scripts/ci/ |
AUR package build (PKGBUILD generation) |
build-alpine-320-apk.sh |
scripts/ci/ |
Alpine 3.20 APK |
build-alpine-322-apk.sh |
scripts/ci/ |
Alpine 3.22 APK |
build-alpine-323-apk.sh |
scripts/ci/ |
Alpine 3.23 APK |
build-opensuse-tumbleweed-rpm.sh |
scripts/ci/ |
openSUSE RPM |
check-login-routing-regressions.sh |
scripts/ci/ |
Login/2FA routing regression tests |
check-sync-regressions.sh |
scripts/ci/ |
Sync regression tests |
write-artifact-manifest.sh |
scripts/ci/ |
Artifact metadata generation |
Running Locally
# Build WebClients first
./scripts/build-webclients.sh
# Then build Tauri
cd src-tauri
cargo build --release