39b52fa
Name:           libeatmydata
39b52fa
Version:        130
833a533
Release:        4%{?dist}
39b52fa
Group:          Development/Tools
39b52fa
License:        GPLv3
833a533
Summary:        Library and utilities designed to disable fsync and friends
39b52fa
BuildRequires:  gcc, make, libtool, strace, gnupg
39b52fa
Source0:        https://www.flamingspork.com/projects/libeatmydata/%{name}-%{version}.tar.gz
39b52fa
Source1:        https://www.flamingspork.com/projects/libeatmydata/%{name}-%{version}.tar.gz.asc
39b52fa
Source2:        https://flamingspork.com/stewart.gpg
39b52fa
# Man page to be included upstream soon...
39b52fa
Source3:        https://salsa.debian.org/debian/libeatmydata/-/raw/048c4ea3/debian/eatmydata.1
39b52fa
URL:            https://www.flamingspork.com/projects/libeatmydata/
39b52fa
%if !(0%{?rhel} && 0%{?rhel} < 8)
39b52fa
Recommends: eatmydata
39b52fa
%endif
39b52fa
39b52fa
%description
39b52fa
This package contains a small LD_PRELOAD library (libeatmydata) and a couple 
39b52fa
of helper utilities (eatmydata) designed to transparently disable fsync and
39b52fa
friends (like open(O_SYNC)). This has two side-effects: making software that
39b52fa
writes data safely to disk a lot quicker and making this software no longer 
39b52fa
crash safe.
39b52fa
39b52fa
%package -n eatmydata
39b52fa
Summary: Utility to disable fsync() and friends for the command specified 
39b52fa
# Explict requires as the main package is a shell script that does an LD_PRELOAD
39b52fa
# and thus we don't get automatic dependencies!
39b52fa
Requires: %{name}
0a9f4ba
39b52fa
%description -n eatmydata
39b52fa
The eatmydata script does the heavy lifting of LD_PRELOAD for the command
39b52fa
specified. You can also symlink a command to the eatmydata wrapper and the
39b52fa
wrapper will find the command in PATH and then execute it after setting up
39b52fa
the libeatmydata LD_PRELOAD
39b52fa
39b52fa
%prep
39b52fa
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
39b52fa
%autosetup
39b52fa
39b52fa
%build
39b52fa
%configure --enable-static=no
39b52fa
%make_build
39b52fa
39b52fa
%install
39b52fa
39b52fa
%make_install
39b52fa
mkdir -p %{buildroot}%{_mandir}/man1/
39b52fa
install -m444 -p %{SOURCE3} %{buildroot}%{_mandir}/man1/
39b52fa
39b52fa
%if !0%{?fedora} || 0%{?fedora} < 36
39b52fa
find %{buildroot} -name "*.la" -type f -delete
39b52fa
%endif
39b52fa
39b52fa
%check
39b52fa
%{__make} check
39b52fa
39b52fa
%files -n eatmydata
39b52fa
%{_bindir}/eatmydata
39b52fa
%{_libexecdir}/eatmydata.sh
39b52fa
%{_mandir}/man1/eatmydata.1*
39b52fa
%doc README.md AUTHORS
39b52fa
%license COPYING
39b52fa
39b52fa
%files
39b52fa
%{_libdir}/*.so
39b52fa
39b52fa
%changelog
833a533
* Sat Jun 11 2022 Stewart Smith <stewart@flamingspork.com> - 130-4
833a533
- Fix Summary
0a9f4ba
- Build eatmydata per-arch as script contains arch specific dirs
0a9f4ba
  See https://bugzilla.redhat.com/show_bug.cgi?id=2099313
39b52fa
* Tue May 31 2022 Stewart Smith <stewart@flamingspork.com> - 130-3
39b52fa
- Fixes for submitting packaging to Fedora
39b52fa
* Fri May 27 2022 Stewart Smith <stewart@flamingspork.com> - 130-2
39b52fa
- Package for Fedora
39b52fa
* Sun Oct 10 2021 Stewart Smith <stewart@flamingspork.com> - 130-1
39b52fa
- version 130, add syncfs() wrapper
39b52fa
* Sat Apr 10 2021 Stewart Smith <stewart@flamingspork.com> - 129-1
39b52fa
- Version 129, as always, bug fix release
39b52fa
* Fri Jul 26 2013 Jaroslav Kortus <jkortus@redhat.com> - 82-1
39b52fa
- Version 82, bug fix release
39b52fa
- spec file changed to meet fedora packaging guidelines
39b52fa
* Fri May 18 2013 Stewart Smith <stewart@flamingspork.com> - 79
39b52fa
- Version 79, bug fix release
39b52fa
* Fri Mar 08 2013 Alexey Bychko <alexey.bychko@percona.com> - 0.1
39b52fa
- Version 0.1, initial package for RPM-based systems
39b52fa
39b52fa