Name: oxicloud Version: 0.5.6 Release: 3%{?dist} Summary: Ultra-fast, secure and lightweight self-hosted cloud storage License: MIT URL: https://github.com/AtalayaLabs/OxiCloud Source0: https://github.com/AtalayaLabs/OxiCloud/archive/refs/tags/v%{version}.tar.gz BuildRequires: curl BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: openssl-devel BuildRequires: postgresql-devel BuildRequires: ngtcp2-crypto-ossl BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(openssl) BuildRequires: make # Only build on supported architectures for Rust ExcludeArch: i686 s390 %{power64} %global debug_package %{nil} Requires: glibc Requires(pre): shadow-utils %{?systemd_requires} %description OxiCloud is an ultra-fast, secure and lightweight self-hosted cloud storage solution built in Rust. It provides file storage with a web interface, WebDAV, CalDAV, and CardDAV protocol support, OIDC/SSO authentication, file sharing, and WOPI-based office document editing (Collabora/OnlyOffice). Designed as a modern, low-footprint alternative to Nextcloud and ownCloud, OxiCloud uses PostgreSQL for metadata storage and supports S3, Azure Blob, and local filesystem backends. %prep %autosetup -n OxiCloud-%{version} %build curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" export CARGO_TARGET_DIR=%{_builddir}/OxiCloud-%{version}/target export RUSTFLAGS="-C target-cpu=generic" # SQLx verifies queries against a live database at compile time. # Set DATABASE_URL to a running PostgreSQL instance, or use offline mode: # export SQLX_OFFLINE=true (requires .sqlx/ cache dir in the source tree) export DATABASE_URL="${DATABASE_URL:-postgres://postgres:postgres@localhost/oxicloud}" [ -f Cargo.lock ] || cargo generate-lockfile # Release build also runs build.rs which processes static/ → static-dist/ cargo build --release --verbose --locked %install install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir}/%{name}/static install -d %{buildroot}%{_datadir}/%{name}/migrations install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_sharedstatedir}/%{name}/storage install -m 755 %{_builddir}/OxiCloud-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name} cp -a %{_builddir}/OxiCloud-%{version}/static-dist/. %{buildroot}%{_datadir}/%{name}/static/ cp -a %{_builddir}/OxiCloud-%{version}/migrations/. %{buildroot}%{_datadir}/%{name}/migrations/ install -m 640 %{_builddir}/OxiCloud-%{version}/example.env %{buildroot}%{_sysconfdir}/%{name}/oxicloud.env sed -i 's|^OXICLOUD_STATIC_PATH=.*|OXICLOUD_STATIC_PATH=%{_datadir}/%{name}/static|' %{buildroot}%{_sysconfdir}/%{name}/oxicloud.env cat > %{buildroot}%{_unitdir}/%{name}.service << 'EOF' [Unit] Description=OxiCloud - Self-hosted cloud storage Documentation=https://github.com/AtalayaLabs/OxiCloud After=network.target After=postgresql.service [Service] Type=simple User=oxicloud Group=oxicloud EnvironmentFile=-%{_sysconfdir}/%{name}/oxicloud.env WorkingDirectory=%{_sharedstatedir}/%{name} ExecStart=%{_bindir}/%{name} Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target EOF %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin -c "OxiCloud service account" %{name} exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md example.env %{_bindir}/%{name} %{_datadir}/%{name}/static/ %{_datadir}/%{name}/migrations/ %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name}/oxicloud.env %dir %attr(750,%{name},%{name}) %{_sharedstatedir}/%{name} %dir %attr(750,%{name},%{name}) %{_sharedstatedir}/%{name}/storage %changelog * Thu May 28 2026 Ante de Baas - 0.5.6-1 - Initial package for AtalayaLabs/OxiCloud self-hosted cloud storage - Corrected metadata, URL, summary, and description - Added systemd service unit, migrations directory, and static files - Added dedicated oxicloud system user and /var/lib/oxicloud storage directory