0.19.0 adds two restart_waiter tests that run `sh -c 'while kill -0 "$1"; do sleep; done'` with the pid u32::MAX. Arch's sh is bash 5.3, whose kill builtin in POSIX mode prints "not a pid or valid job spec" for that number but exits 0, so the loop never ends; every droplet build of 0.19.0 sat there until the 180-minute job timeout. Upstream CI runs on Ubuntu, where sh is dash and rejects the number. It also adds ownership_probe_errors_disable_in_place_updates, which points the pacman path at a directory and expects Command::output() to fail. aarch64 builds run under QEMU user-mode emulation, where glibc's posix_spawn cannot observe the child's failed execve; the spawn succeeds with exit 127 and the assertion fails. Skipped on aarch64 only; it passes natively. Both skips carry comments; the sync bot rewrites only version fields, so they survive future syncs.
122 lines
4.2 KiB
Bash
122 lines
4.2 KiB
Bash
pkgname=strata
|
|
pkgver=0.19.0
|
|
pkgrel=1
|
|
pkgdesc='Fast, keyboard-first file manager for modern Linux desktops'
|
|
arch=('x86_64' 'aarch64')
|
|
url='https://github.com/lgse/strata'
|
|
license=('MIT')
|
|
|
|
depends=(
|
|
'bash'
|
|
'bubblewrap'
|
|
'cairo'
|
|
'ffmpeg'
|
|
'ffmpegthumbnailer'
|
|
'fontconfig'
|
|
'gcc-libs'
|
|
'gdk-pixbuf2'
|
|
'glib2'
|
|
'glibc'
|
|
'graphene'
|
|
'gst-libav'
|
|
'gst-plugins-good'
|
|
'gvfs'
|
|
'gtk4'
|
|
'gtksourceview5'
|
|
'hicolor-icon-theme'
|
|
'pango'
|
|
'poppler-glib'
|
|
'util-linux'
|
|
'xdg-terminal-exec'
|
|
)
|
|
makedepends=('cargo' 'git' 'glib2-devel' 'pkgconf')
|
|
optdepends=(
|
|
'gvfs-smb: browse SMB network shares'
|
|
'imagemagick: additional camera RAW preview support'
|
|
'libraw: additional camera RAW preview support'
|
|
)
|
|
conflicts=('strata-git')
|
|
options=('!debug' '!lto')
|
|
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
|
sha256sums=('51701930728625ce1d6394949a4b6b2705f0999fd08be87f1a26d900209d62e0')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
local commit
|
|
if ! commit=$(git get-tar-commit-id < <(gzip -dc "$srcdir/$pkgname-$pkgver.tar.gz")) ||
|
|
[[ ! $commit =~ ^[0-9a-f]{40}$ ]]; then
|
|
printf 'Could not recover the release commit from the source archive\n' >&2
|
|
return 1
|
|
fi
|
|
printf '%s\n' "$commit" >.build-commit
|
|
|
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
export CARGO_TARGET_DIR=target
|
|
export STRATA_BUILD_COMMIT
|
|
STRATA_BUILD_COMMIT=$(<.build-commit)
|
|
export STRATA_RELEASE_TAG="v$pkgver"
|
|
export STRATA_BUILD_KIND=stable
|
|
cargo build --frozen --release
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
export CARGO_TARGET_DIR=target
|
|
export STRATA_BUILD_COMMIT
|
|
STRATA_BUILD_COMMIT=$(<.build-commit)
|
|
export STRATA_RELEASE_TAG="v$pkgver"
|
|
export STRATA_BUILD_KIND=stable
|
|
# Search fixtures depend on directory enumeration order and fail on overlayfs.
|
|
# Run them on tmpfs; other suites execute fixtures, so cannot use noexec /dev/shm.
|
|
local search_tmp
|
|
search_tmp=$(mktemp -d /dev/shm/strata-tests.XXXXXXXX) || return 1
|
|
local test_status=0
|
|
TMPDIR="$search_tmp" cargo test --frozen --release --all-targets --all-features \
|
|
services::search::tests:: -- --test-threads=1 || test_status=$?
|
|
rm -rf -- "$search_tmp"
|
|
(( test_status == 0 )) || return "$test_status"
|
|
|
|
# restart_waiter_* run `sh -c 'while kill -0 "$1"; do sleep; done'` with
|
|
# the pid u32::MAX. Arch's sh is bash, and bash's kill builtin in POSIX
|
|
# mode prints "not a pid or valid job spec" for that number but exits 0,
|
|
# so the loop never ends and the job hits its 180-minute timeout.
|
|
# Upstream CI runs on Ubuntu, where sh is dash and rejects the number.
|
|
# Skip until upstream waits on a real pid.
|
|
local skip=(--skip services::search::tests:: --skip ui::settings::tests::restart_waiter_)
|
|
# ownership_probe_errors_disable_in_place_updates points the pacman path
|
|
# at a directory and expects Command::output() to fail. aarch64 builds
|
|
# run under QEMU user-mode emulation, where glibc's posix_spawn cannot
|
|
# observe the child's failed execve (natively it returns EACCES); the
|
|
# spawn "succeeds" with exit 127, the probe reads that as "not owned",
|
|
# and the assertion fails. Passes natively.
|
|
[[ $CARCH == aarch64 ]] && skip+=(--skip services::update_install::tests::ownership_probe_errors_disable_in_place_updates)
|
|
cargo test --frozen --release --all-targets --all-features \
|
|
-- --test-threads=1 "${skip[@]}"
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
install -Dm755 target/release/strata "$pkgdir/usr/bin/strata"
|
|
install -Dm644 data/io.github.lgse.Strata.desktop \
|
|
"$pkgdir/usr/share/applications/io.github.lgse.Strata.desktop"
|
|
install -Dm644 data/icons/scalable/apps/io.github.lgse.Strata.svg \
|
|
"$pkgdir/usr/share/icons/hicolor/scalable/apps/io.github.lgse.Strata.svg"
|
|
# Payload for the app's per-user FileManager1 opt-in; upstream's own
|
|
# packaging stages it here, not in /usr/share/dbus-1.
|
|
install -Dm644 data/io.github.lgse.Strata.FileManager1.service \
|
|
"$pkgdir/usr/share/strata/io.github.lgse.Strata.FileManager1.service"
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 THIRD_PARTY_LICENSES.md \
|
|
"$pkgdir/usr/share/licenses/$pkgname/THIRD_PARTY_LICENSES.md"
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
}
|