feat(packaging): an installable release tarball for immutable distributions (#99)

The release .tar.gz held the four binaries and their translations only,
and the service unit pointed at /usr/bin/pdfs, so it was no install on
its own. It now carries a /usr-like tree (bin, share, the user unit, the
tray's autostart entry) and install.sh, which installs it into ~/.local
without root:

- checks the libraries with ldd and names the packages to install per
  distribution, and that fusermount3 is there and setuid;
- refuses to install next to a package of the client;
- rewrites Exec= and ExecStart= to absolute paths, since ~/.local/bin is
  often not on a session's PATH;
- keeps a manifest, removes what an older version left, restarts a
  running service on update, and --uninstall leaves settings alone.

packaging/tarball/build.sh lays the tarball out and test.sh installs,
updates and uninstalls it in a throwaway home; the release job runs
both, CI runs shellcheck on them. The app looks for its translations in
share/locale beside its own bin directory and starts the tray from there,
so nothing needs PDFS_LOCALEDIR or the PATH. The -bin AUR package takes
every file from the new tarball instead of raw.githubusercontent.com.

INSTALL.md documents the tarball and layering the COPR package on Fedora
Atomic.
This commit is contained in:
nvrl committed 2026-11-15 23:57:01 +01:00
1 parent 7e0d7d020e
commit a7baf2313c
12 files changed
+462 -75

No files matched your search

+3
View File
@@ -44,6 +44,9 @@ jobs:
- name: Formatting
run: cargo fmt --all -- --check
- name: Shell scripts of the release tarball
run: shellcheck packaging/tarball/*.sh
- name: Lints
run: cargo clippy --workspace --all-targets --locked -- -D warnings
+5 -10
View File
@@ -119,17 +119,12 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Building version: $VERSION"
- name: Package raw binaries (.tar.gz)
# Binaries plus everything around them, with install.sh for a home
# directory install (immutable distributions, anything without a package).
- name: Package the installable tarball (.tar.gz)
run: |
mkdir -p dist/binaries
cp target/release/pdfs dist/binaries/
cp target/release/pdfs-tray dist/binaries/
cp target/release/pdfs-app dist/binaries/
cp target/release/pdfs-prompt dist/binaries/
po/build.sh dist/binaries/locale
# Create tarball
tar -czf proton-drive-linux-${{ env.VERSION }}-x86_64.tar.gz -C dist/binaries .
tarball=$(packaging/tarball/build.sh target/release "${{ env.VERSION }}" .)
packaging/tarball/test.sh "$tarball"
# Every crate the build needs, so COPR can build the spec without network.
- name: Package vendored crates (.tar.xz)