-#
-# TODO:
-# - review patches
-#
-# Condtional build:
-%bcond_without dist_kernel # without distribution kernel
-%bcond_without kernel # don't build kernel modules
-%bcond_without smp # without smp packages
-%bcond_without userspace # don't build userspace tools
-%bcond_with verbose # verbose build (V=1)
-#
-Name: kernel-misc-fuse
Summary: Filesystem in Userspace
-Summary(pl): System plików w przestrzeni u¿ytkownika
-Version: 2.2
-%define _rel 0.4
-Release: %{_rel}@%{_kernel_ver_str}
-Epoch: 0
-License: GPL v2
-Group: Base/Kernel
-Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
-# Source0-md5: 6f7fe60795324111fea18143e81512ec
-# Source0-size: 126361
-Patch0: %{name}-configure.in.patch
-Patch1: %{name}-perm.patch
-URL: http://fuse.sourceforge.net/
-BuildRequires: autoconf
+Summary(pl.UTF-8): System plików w przestrzeni użytkownika
+Name: libfuse
+Version: 2.9.7
+Release: 3
+License: LGPL v2 (library), GPL v2 (tools)
+Group: Applications/System
+#Source0Download: https://github.com/libfuse/libfuse/releases
+Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz
+# Source0-md5: 9bd4ce8184745fd3d000ca2692adacdb
+Patch0: kernel-misc-fuse-Makefile.am.patch
+URL: https://github.com/libfuse/libfuse
+BuildRequires: autoconf >= 2.60
BuildRequires: automake
-%if %{with kernel}
-%{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
-%endif
BuildRequires: libtool
-%{?with_dist_kernel:%requires_releq_kernel_up}
-Requires(post,postun): /sbin/depmod
-%{?with_dist_kernel:Requires(postun): kernel}
-Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: sed >= 4.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
FUSE (Filesystem in Userspace) is a simple interface for userspace
aims to provide a secure method for non privileged users to create and
mount their own filesystem implementations.
-%description -l pl
-FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
-u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
-FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
-montowania w³asnych implementacji systemów plików przez zwyk³ych
-(nieuprzywilejowanych) u¿ytkowników.
-
-%package -n kernel-smp-misc-fuse
-Summary: Filesystem in Userspace
-Summary(pl): System plików w przestrzeni u¿ytkownika
-Release: %{_rel}@%{_kernel_ver_str}
-License: GPL v2
-Group: Base/Kernel
-Provides: kernel-misc-fuse
-%{?with_dist_kernel:%requires_releq_kernel_smp}
-Requires(post,postun): /sbin/depmod
-%{?with_dist_kernel:Requires(postun): kernel-smp}
+This package contains a shared library.
-%description -n kernel-smp-misc-fuse
-FUSE (Filesystem in Userspace) is a simple interface for userspace
-programs to export a virtual filesystem to the Linux kernel. FUSE also
-aims to provide a secure method for non privileged users to create and
-mount their own filesystem implementations.
+%description -l pl.UTF-8
+FUSE stanowi prosty interfejs dla programów działających w przestrzeni
+użytkownika eksportujący wirtualny system plików do jądra Linuksa.
+FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
+montowania własnych implementacji systemów plików przez zwykłych
+(nieuprzywilejowanych) użytkowników.
-%description -n kernel-smp-misc-fuse -l pl
-FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
-u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
-FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
-montowania w³asnych implementacji systemów plików przez zwyk³ych
-(nieuprzywilejowanych) u¿ytkowników.
+Ten pakiet zawiera bibliotekę współdzieloną.
-%package -n libfuse
-Summary: Shared library for Filesytem in Userspace
-Summary(pl): Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
-Group: Applications/System
-Release: %{_rel}
+%package devel
+Summary: Filesystem in Userspace - development header files
+Summary(pl.UTF-8): System plików w przestrzeni użytkownika - pliki nagłówkowe
+License: LGPL v2
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
-%description -n libfuse
-Shared library for Filesytem in Userspace
+%description devel
+FUSE libraries header files.
-%description -n libfuse -l pl
-Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek FUSE.
-%package -n libfuse-devel
-Summary: Filesytem in Userspace - Development header fiels and libraries
-Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
+%package static
+Summary: Filesystem in Userspace - static libraries
+Summary(pl.UTF-8): System plików w przestrzeni użytkownika - biblioteki statyczne
+License: LGPL v2
Group: Development/Libraries
-Release: %{_rel}
-Requires: libfuse = %{epoch}:%{version}-%{_rel}
+Requires: %{name}-devel = %{version}-%{release}
-%description -n libfuse-devel
-Libfuse library header files.
+%description static
+Static FUSE libraries.
-%description -n libfuse-devel -l pl
-Libfuse biblioteki nag³ówkowe dla programistów.
+%description static -l pl.UTF-8
+Statyczne biblioteki FUSE.
-%package -n libfuse-static
-Summary: Filesytem in Userspace - static libraries
-Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
-Group: Development/Libraries
-Release: %{_rel}
-Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
+%package apidocs
+Summary: API documentation for FUSE library
+Summary(pl.UTF-8): Dokumentacja API bibliotek FUSE
+Group: Documentation
-%description -n libfuse-static
-Static libfuse libraries.
+%description apidocs
+API documentation for FUSE library.
-%description -n libfuse-static -l pl
-Statyczne biblioteki libfuse
+%description apidocs -l pl.UTF-8
+Dokumentacja API bibliotek FUSE.
-%package -n fusermount
-Summary: Filesytem in Userspace utilities
-Summary(pl): Narzêdzia obs³uguj±ce systemu plików w przestrzeni u¿ytkownika
+%package tools
+Summary: Tools to mount FUSE based filesystems
+Summary(pl.UTF-8): Narzędzia do montowania systemów plików opartych na FUSE
+License: GPL v2
Group: Applications/System
-Release: %{_rel}
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires: %{name} = %{version}-%{release}
+Requires: libfuse-common >= %{version}
+Requires: mount >= 2.18
+Provides: group(fuse)
+Obsoletes: fusermount
-%description -n fusermount
-Filesytem in Userspace utilities. It provide a secure method for non
-privileged users to create and mount their own filesystem
-implementations.
+%description tools
+Tools to mount FUSE based filesystems.
-%description -n fusermount -l pl
-Narzêdzia obs³uguj±ce systemu plików w przestrzeni u¿ytkownika.
-Dostarcza bezpieczn± metodê tworzenia i montowania w³asnych systemów
-plików dla nie uprzywilejowanych userów.
+%description tools -l pl.UTF-8
+Narzędzia do montowania systemów plików opartych na FUSE.
%prep
%setup -q -n fuse-%{version}
-%patch0 -p0
-#patch1 -p1
+%patch0 -p1
+
+sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
+
+# gold is missing base versioning
+install -d ld-dir
+[ ! -x /usr/bin/ld.bfd ] || ln -sf /usr/bin/ld.bfd ld-dir/ld
%build
+PATH=$(pwd)/ld-dir:$PATH
%{__libtoolize}
%{__aclocal}
-%{__autoheader}
%{__autoconf}
+%{__autoheader}
%{__automake}
%configure \
- --enable-lib \
- --enable-util \
- --with-kernel=%{_kernelsrcdir}
-
-%if %{with kernel}
-cd kernel
-
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
- if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
- exit 1
- fi
- rm -rf include
- install -d include/{linux,config}
- ln -sf %{_kernelsrcdir}/config-$cfg .config
- ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
- ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
- touch include/config/MARKER
- %{__make} -C %{_kernelsrcdir} clean \
- RCS_FIND_IGNORE="-name '*.ko' -o" \
- M=$PWD O=$PWD \
- %{?with_verbose:V=1}
- %{__make} -C %{_kernelsrcdir} modules \
- EXTRA_CFLAGS='-I../include -DFUSE_VERSION=\"2.2\"' \
- RCS_FIND_IGNORE="-name '*.ko' -o" \
- CC="%{__cc}" CPP="%{__cpp}" \
- M=$PWD O=$PWD \
- %{?with_verbose:V=1}
-
- mv fuse.ko fuse-$cfg.ko
-done
-cd -
-%endif
-
-%if %{with userspace}
-cp kernel/fuse_kernel.h include/
-for DIR in include lib util; do
-%{__make} -C $DIR
-done
-%endif
+ INIT_D_PATH=/etc/rc.d/init.d \
+ --disable-silent-rules \
+ --enable-lib \
+ --enable-util
+
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/%{_lib},%{_pkgconfigdir},%{_sysconfdir}}
-install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
-
-%if %{with userspace}
-for DIR in include lib util; do
-%{__make} -C $DIR install \
+%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-done
-install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
-%endif
-
-%if %{with kernel}
-cd kernel
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
-install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
-%if %{with smp} && %{with dist_kernel}
-install fuse-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
-%endif
-%endif
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libfuse.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfuse.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libfuse.so.*.*) \
+ $RPM_BUILD_ROOT%{_libdir}/libfuse.so
-%clean
-rm -rf $RPM_BUILD_ROOT
+install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
-%post
-%depmod %{_kernel_ver}
+# part of default udev rules nowdays
+%{__rm} $RPM_BUILD_ROOT/etc/udev/rules.d/99-fuse.rules
-%postun
-%depmod %{_kernel_ver}
+# not needed
+%{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/fuse
-%post -n kernel-smp-misc-fuse
-%depmod %{_kernel_ver}smp
+%clean
+rm -rf $RPM_BUILD_ROOT
-%postun -n kernel-smp-misc-fuse
-%depmod %{_kernel_ver}smp
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
-%post -n libfuse -p /sbin/ldconfig
-%postun -n libfuse -p /sbin/ldconfig
+%pre tools
+%groupadd -g 84 fuse
-%if %{with kernel}
%files
%defattr(644,root,root,755)
-%doc README NEWS ChangeLog AUTHORS doc/*
-/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
-
-%if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-misc-fuse
-%defattr(644,root,root,755)
-%doc README NEWS ChangeLog AUTHORS doc/*
-/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
-%endif
-%endif
+%doc README.md NEWS ChangeLog AUTHORS doc/{how-fuse-works,kernel.txt}
+%attr(755,root,root) /%{_lib}/libfuse.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libfuse.so.2
+%attr(755,root,root) %{_libdir}/libulockmgr.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libulockmgr.so.1
-%if %{with userspace}
-%files -n fusermount
+%files devel
%defattr(644,root,root,755)
-# suid needed? NO!
-%attr(755,root,root) %{_bindir}/fusermount
-# do it ! failed
-# %%attr(755,root,root) %{_sbindir}/mount.fuse
+%attr(755,root,root) %{_libdir}/libfuse.so
+%attr(755,root,root) %{_libdir}/libulockmgr.so
+%{_libdir}/libfuse.la
+%{_libdir}/libulockmgr.la
+%{_includedir}/fuse
+%{_includedir}/fuse.h
+%{_includedir}/ulockmgr.h
+%{_pkgconfigdir}/fuse.pc
-%files -n libfuse
+%files static
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
+%{_libdir}/libfuse.a
+%{_libdir}/libulockmgr.a
-%files -n libfuse-devel
+%files apidocs
%defattr(644,root,root,755)
-%{_includedir}/fuse*
-%{_libdir}/libfuse.la
-%attr(755,root,root) %{_libdir}/libfuse.so
-%{_pkgconfigdir}/fuse.pc
+%doc doc/html/*
-%files -n libfuse-static
+%files tools
%defattr(644,root,root,755)
-%{_libdir}/libfuse.a
-%endif
+%attr(4755,root,root) %{_bindir}/fusermount
+%attr(755,root,root) %{_bindir}/ulockmgr_server
+%attr(755,root,root) /sbin/mount.fuse
+%{_mandir}/man1/fusermount.1*
+%{_mandir}/man1/ulockmgr_server.1*
+%{_mandir}/man8/mount.fuse.8*