mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
Three things the 12,445-photo library showed that the tests did not. A Pixel raw capture is two files named after the role each plays — `PXL_….RAW-01.COVER.jpg` and `PXL_….RAW-02.ORIGINAL.dng` — so their stems differ and the pairing rule never saw one shot. The marker is now cut off before names are compared, narrowly: digits, then one role word, so an ordinary name that happens to contain `.raw-` keeps its stem. Fed the real library's first 40 rows through the grouping, they collapse to 21 tiles. A raw that has a JPEG beside it is now painted with that JPEG's thumbnail, which the server usually already holds. The Raw tab costs no raw download and no raw decode for those tiles. Raws are found in one batched read, so an ordinary page pays nothing for the lookup. Photos could not be moved to Trash at all: they live on the photo volume, which the mount never holds, so no `nodes` row exists, every authority answered `Unknown`, and the write check refused the whole library with "trash access: not allowed". Membership of our own timeline is the authority that does exist for a photo, and it now answers. An album photo on someone else's volume still fails closed. Refreshing the gallery then reported `io: Resource temporarily unavailable (os error 11)` (B92). The daemon held the control reply until the whole timeline had been re-read — 63 batches of 200 nodes for this library, minutes of work against a 120 s read bound. The daemon now answers as soon as the refresh is running, `PhotosRefreshStatus` reports when it is done, and both front ends follow it: the gallery reloads the page when it clears, and `pdfs refresh photos` blocks so the command still means what it says. Each refresh logs its photo count, batch count and duration. Released as 1.11.0.
78 lines
2.9 KiB
Bash
78 lines
2.9 KiB
Bash
# Maintainer: Nils Pukropp <contact@narl.io>
|
|
#
|
|
# Local-build PKGBUILD. Builds the proton-drive-linux workspace from the
|
|
# checkout this file lives in: this is NOT a source-fetch package, it compiles
|
|
# the working tree in place. The Proton SDK is unpublished and comes from its
|
|
# GitHub repo (pinned by Cargo.lock), so the build needs network access — no
|
|
# sibling checkout required any more.
|
|
#
|
|
# Build + install: cd packaging && makepkg -fi
|
|
|
|
pkgname=proton-drive-linux
|
|
pkgver=1.11.0
|
|
pkgrel=1
|
|
pkgdesc="Unofficial Proton Drive client for Linux: files-on-demand FUSE mount, CLI, GTK4 app + tray"
|
|
arch=('x86_64')
|
|
url="https://github.com/narrrl/proton-drive-linux"
|
|
license=('MIT')
|
|
depends=('fuse3' 'gtk4' 'libadwaita' 'webkitgtk-6.0' 'perl-image-exiftool')
|
|
makedepends=('cargo' 'git')
|
|
provides=('pdfs')
|
|
# Files-on-demand mount + keyring need these at runtime.
|
|
optdepends=('gnome-keyring: credential storage via Secret Service'
|
|
'xdg-utils: "Open folder" action from the tray'
|
|
'fzf: live search-as-you-type launcher (pdfs-prompt --fzf)'
|
|
'foot: terminal for pdfs-prompt --fzf started from a keybinding')
|
|
options=('!lto' '!debug')
|
|
|
|
# Built in place from the checkout; nothing to fetch or checksum.
|
|
source=()
|
|
sha256sums=()
|
|
|
|
# Absolute path to the workspace root (packaging/ lives directly under it).
|
|
_workspace="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
pkgver() {
|
|
cd "$_workspace"
|
|
local v
|
|
v=$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2)
|
|
printf '%s' "${v:-0.1.0}"
|
|
}
|
|
|
|
build() {
|
|
cd "$_workspace"
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
export CARGO_TARGET_DIR="$_workspace/target"
|
|
# `--locked` not `--frozen`: the lock is authoritative, but cargo must still be
|
|
# allowed to fetch the git-sourced SDK.
|
|
cargo build --release --locked \
|
|
--bin pdfs \
|
|
--bin pdfs-tray \
|
|
--bin pdfs-app \
|
|
--bin pdfs-prompt
|
|
}
|
|
|
|
package() {
|
|
cd "$_workspace"
|
|
local rel="target/release"
|
|
|
|
install -Dm755 "$rel/pdfs" "$pkgdir/usr/bin/pdfs"
|
|
install -Dm755 "$rel/pdfs-tray" "$pkgdir/usr/bin/pdfs-tray"
|
|
install -Dm755 "$rel/pdfs-app" "$pkgdir/usr/bin/pdfs-app"
|
|
install -Dm755 "$rel/pdfs-prompt" "$pkgdir/usr/bin/pdfs-prompt"
|
|
|
|
install -Dm644 "packaging/io.narl.proton-drive-linux.desktop" \
|
|
"$pkgdir/usr/share/applications/io.narl.proton-drive-linux.desktop"
|
|
install -Dm644 "packaging/io.narl.proton-drive-linux-tray.desktop" \
|
|
"$pkgdir/etc/xdg/autostart/io.narl.proton-drive-linux-tray.desktop"
|
|
install -Dm644 "packaging/io.narl.proton-drive-linux.svg" \
|
|
"$pkgdir/usr/share/icons/hicolor/scalable/apps/io.narl.proton-drive-linux.svg"
|
|
|
|
# systemd user service that runs the auto-mount daemon. Enabled per-user by
|
|
# the GUI on login (`systemctl --user enable --now proton-drive.service`).
|
|
install -Dm644 "packaging/proton-drive.service" \
|
|
"$pkgdir/usr/lib/systemd/user/proton-drive.service"
|
|
|
|
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|