# force single job compilation #%%define _smp_mflags -j1 #%%undefine _include_frame_pointers %global debug_package %{nil} %global gitdate 20250825 %global commit 7395f76bbad293e0c666a3da8caf8f8371b86ccb %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global version 2.1.0 %global release 1 # set this to "1" if building a git/beta/rc release %global beta_or_rc 0 #============================================================================= # general #----------------------------------------------------------------------------- Name: garage Version: %{version} %if %{beta_or_rc} Release: 0.%{release}.%{gitdate}.git%{shortcommit}%{?dist} %else Release: %{release}%{?dist} %endif Summary: S3-compatible object store for small self-hosted geo-distributed deployments License: AGPL-3.0-only URL: https://garagehq.deuxfleurs.fr/ %if %{beta_or_rc} Source0: https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/{commit}/%{name}-%{version}-git%{shortcommit}.tar.gz %else Source0: https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/v%{version}.tar.gz#/garage-v%{version}.tar.gz %endif Source1: garage.config.toml Source2: garage.tmpfiles Source3: garage.sysusers Source4: garage.systemd.service BuildRequires: cargo BuildRequires: cargo-rpm-macros BuildRequires: gcc BuildRequires: rust BuildRequires: pkgconfig(systemd) #%%{?systemd_ordering} #%%{?sysusers_requires} %description Garage is an S3-compatible distributed object storage service designed for self-hosting at a small-to-medium scale. Garage is designed for storage clusters composed of nodes running at different physical locations, in order to easily provide a storage service that replicates data at these different locations and stays available even when some servers are unreachable. Garage also focuses on being lightweight, easy to operate, and highly resilient to machine failures. %prep %if %{beta_or_rc} %autosetup -p1 -n %{name} %else %autosetup -p1 -n %{name} %endif # download dependencies cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" %build # add CARGO_BUILD_JOBS=1 to use only one CPU /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' cargo build --release --features k2v %install install -D -m 0755 target/release/garage %{buildroot}%{_sbindir}/garage install -D -m0640 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -D -m0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service #install -D -m0755 -d %{buildroot}/var/lib/%{name}/{meta,data,snapshots} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md %attr(0750,root,root) %{_sbindir}/%{name} %attr(0640,%{name},%{name}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml %{_tmpfilesdir}/%{name}.conf %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %changelog * Fri Oct 24 2025 Patrick Laimbock - 2.1.0-1 - initial release for Fedora 42 and 43