rpm: automatically load the fuse module on EL5

The fuse module needs to be loaded before /dev/fuse can be used. On
RHEL6 and Fedora the module is loaded on demand. RHEL5 needs to load the
module manually.

This change add a script under /etc/sysconfig/modules/ that loads the
fuse module on boot and packages it in the EL5 version of
glusterfs-fuse.

One of the features of GlusterFS is to not depend on additional fuse
userspace. The conditional requires on /usr/bin/fusermount is not
needed, this command is never called in the current version (even though
is it referenced in the sources).

Upstream-BUG: 947830
This commit is contained in:
Niels de Vos 2013-05-22 16:20:36 +02:00
parent 4a3a71c13c
commit 991ab8f6a0
2 changed files with 21 additions and 4 deletions

View File

@ -78,6 +78,7 @@ Source3: umount.glusterfs
Source4: glusterfs-fuse.logrotate
Source5: glusterd.logrotate
Source6: glusterfsd.logrotate
Source7: rhel5-load-fuse-modules
Patch0: %{name}-3.2.5.configure.ac.patch
Patch1: %{name}-3.3.0.libglusterfs.Makefile.patch
Patch2: %{name}-3.3.1.rpc.rpcxprt.rdma.name.c.patch
@ -284,9 +285,6 @@ Group: Applications/File
BuildRequires: fuse-devel
Requires: %{name} = %{version}-%{release}
%if ( ! 0%{?_without_fusermount} )
Requires: /usr/bin/fusermount
%endif
Obsoletes: %{name}-client < %{version}-%{release}
Provides: %{name}-client = %{version}-%{release}
@ -678,6 +676,11 @@ cd ..
%{__rm} -f %{buildroot}%{_sysconfdir}/init.d/glusterd
%endif
%if 0%{?rhel} && 0%{?rhel} <= 5
%{__install} -D -p -m 0755 extras/init.d/rhel5-load-fuse.modules \
%{buildroot}%{_sysconfdir}/sysconfig/modules/glusterfs-fuse.modules
%endif
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfs
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfsd
@ -932,6 +935,9 @@ fi
%if ( 0%{?_without_fusermount:1} )
%{_bindir}/fusermount-glusterfs
%endif
%if 0%{?rhel} && 0%{?rhel} <= 5
%{_sysconfdir}/sysconfig/modules/glusterfs-fuse.modules
%endif
%files server
%defattr(-,root,root,-)
@ -1421,7 +1427,11 @@ fi
%endif
%changelog
* Mon May 27 2013 Niels de Vos <ndevos@fedoraproject.org>
* Wed May 29 2013 Niels de Vos <devos@fedoraproject.org>
- automatically load the fuse module on EL5
- there is no need to require the unused /usr/bin/fusermount
* Mon May 27 2013 Niels de Vos <devos@fedoraproject.org>
- include glusterfs-api.pc in the -devel subpackage
* Fri May 24 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.4.0-0.5.beta2

7
rhel5-load-fuse-modules Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
#
# fusermount-glusterfs requires the /dev/fuse character device. The fuse module
# provides this and is loaded on demand in newer Linux distributions.
#
[ -c /dev/fuse ] || /sbin/modprobe fuse