%global forgeurl https://github.com/trapexit/mergerfs Name: mergerfs Version: 2.40.2 Release: %autorelease Summary: A featureful union filesystem # Bundled fuse is licensed under GPL-2.0-only AND LGPL-2.1-only License: ISC AND GPL-2.0-only AND LGPL-2.1-only URL: https://trapexit.github.io/mergerfs/ Source: %{forgeurl}/archive/%{version}/%{name}-%{version}.tar.gz Patch: 0001-Build-mergerfs-fusermount-with-Fedora-LDFLAGS.patch BuildRequires: gcc-c++ BuildRequires: python3 Requires: fuse # mergerfs statically links to an in-tree fork of libfuse. # DEPENDENCIES lists this as a "heavily modified fork of v2.x," # hence no efforts were made to unbundle it. Provides: bundled(fuse) = 2.9.7-mergerfs_2.30.0 %description mergerfs is a FUSE based union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. %prep %autosetup -p1 cp -p libfuse/COPYING.LIB LICENSE.libfuse cp -p libfuse/AUTHORS AUTHORS.libfuse sed -i -e "/chown root/d" libfuse/Makefile %build # For EPEL builds %set_build_flags %make_build PREFIX=%{_prefix} SBINDIR=%{_sbindir} LIBDIR=%{_libdir} %install %set_build_flags # - Pass SBINDIR and LIBDIR explicitly, as these may differ with lib64 and the # sbin-bin merger %make_install PREFIX=%{_prefix} SBINDIR=%{_sbindir} LIBDIR=%{_libdir} chmod a+x %{buildroot}%{_libdir}/mergerfs/preload.so %files %doc README.md %license LICENSE LICENSE.libfuse AUTHORS.libfuse %{_bindir}/mergerfs # Make sure mergerfs's fusermount binary is setuid %attr(4755,root,root) %{_bindir}/mergerfs-fusermount %{_sbindir}/mount.mergerfs %{_mandir}/man1/mergerfs.1* # Contains the experimental preload feature to simulate passthrough IO by # catching open/creat/fopen calls on mergerfs filesystems. # https://trapexit.github.io/mergerfs/preview/tooling/#preloadso # OpenSUSE and Debian remove this from the package while the Arch package keeps it. # NOTE(gotmax23): I see no reason to remove it as its only enabled when user # explicitly sets LD_PRELOAD. %dir %{_libdir}/mergerfs/ %{_libdir}/mergerfs/preload.so %changelog %autochangelog