Name: uncloud Version: 0.1.0 Release: 0.alpha.38%{?dist} Summary: Self-hosted personal cloud storage desktop client License: AGPL-3.0-or-later URL: https://github.com/decaychain/uncloud Source0: %{name}-%{version}.tar.gz # COPR mock chroots get network access enabled in the project settings. # Without it cargo and npm cannot fetch dependencies inside the build. BuildRequires: rust BuildRequires: cargo # Fedora's pre-packaged wasm target. Without it, `dx build` tries to # invoke `rustup target add wasm32-unknown-unknown` (since the project # is a WASM frontend), and rustup isn't installed in the COPR chroot — # Fedora's Rust comes as system packages, not via rustup. BuildRequires: rust-std-static-wasm32-unknown-unknown # Link the native binary with LLD (matches what GitHub Actions uses # via Tauri's bundle pipeline). The default Fedora linker (BFD) was # producing a binary with a different DT_NEEDED ordering — libgio-2.0 # loaded earlier, which on NVIDIA + Wayland triggered an init-order # race inside libnvidia-eglcore's libdbus usage. LLD's `--as-needed` # default also trims spurious deps to match GitHub's binary. BuildRequires: lld BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(webkit2gtk-4.1) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libsoup-3.0) BuildRequires: pkgconfig(ayatana-appindicator3-0.1) BuildRequires: patchelf BuildRequires: rsvg-pixbuf-loader BuildRequires: nodejs BuildRequires: npm Requires: webkit2gtk4.1 Requires: gtk3 Requires: libappindicator-gtk3 %description Uncloud is a self-hosted personal cloud storage system with file sync, sharing, and in-browser playback for music and photos. This package installs the desktop sync client (a Tauri-based GUI that syncs a chosen local folder against an Uncloud server). %prep %setup -q %build # dioxus-cli is not packaged for Fedora, so we cargo-install it into a # build-local prefix. Network access is required (and enabled on the # COPR project). Pinned to 0.7.5: dx 0.7.7 (current latest on # crates.io) refuses to build a project pinned to dioxus 0.7.5. cargo install dioxus-cli --version 0.7.5 --root %{_builddir}/%{name}-%{version}/cargo-tools export PATH="%{_builddir}/%{name}-%{version}/cargo-tools/bin:$PATH" # Build the web frontend bundle that the desktop binary serves locally. # # Fedora's RPM build environment poisons RUSTFLAGS with # `-Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes`, which is # fine for the native GCC linker but lld (used for wasm32) chokes on # it: `lld: error: unknown argument: -specs=`. A subshell `unset` # strips those flags only for the wasm build — the subsequent native # `cargo build` of uncloud-desktop still gets them. pushd crates/uncloud-web npm ci --no-audit --no-fund ( unset RUSTFLAGS CARGO_BUILD_RUSTFLAGS CARGO_ENCODED_RUSTFLAGS dx build --release ) popd # Copy the bundle into the location the desktop binary embeds. rm -rf crates/uncloud-desktop/src-frontend/assets/ cp -r target/dx/uncloud-web/release/web/public/* \ crates/uncloud-desktop/src-frontend/ # Build the desktop binary itself. We deliberately invoke `cargo build` # directly rather than `cargo tauri build`: Tauri's bundler exists to # produce native packages, which is exactly what this RPM already is. # # Append `-fuse-ld=lld` to RUSTFLAGS so the native binary is linked with # LLD instead of Fedora's default BFD. Matches the GitHub-Actions build, # whose binary works on NVIDIA + Wayland where the BFD-linked one # crashes due to a DT_NEEDED ordering difference (libgio-2.0 loaded # earlier under BFD, racing libnvidia-eglcore's libdbus init). export RUSTFLAGS="${RUSTFLAGS:-} -Clink-arg=-fuse-ld=lld" cargo build --release --bin uncloud-desktop %install install -Dm755 target/release/uncloud-desktop \ %{buildroot}%{_bindir}/%{name} install -Dm644 packaging/fedora/uncloud.desktop \ %{buildroot}%{_datadir}/applications/de.lunarstream.uncloud.desktop install -Dm644 crates/uncloud-desktop/icons/icon.png \ %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/%{name}.png %files %license LICENSE %{_bindir}/%{name} %{_datadir}/applications/de.lunarstream.uncloud.desktop %{_datadir}/icons/hicolor/512x512/apps/%{name}.png %changelog * Sat May 02 2026 Decay Chain - 0.1.0-0.alpha.38 - Automated COPR build