[glusterfs] rpm: automatically load the fuse module on EL5
Niels de Vos
devos at fedoraproject.org
Wed May 29 08:49:11 UTC 2013
commit 991ab8f6a03e000f58a5a2d2fd274dc6561683e8
Author: Niels de Vos <devos at fedoraproject.org>
Date: Wed May 22 16:20:36 2013 +0200
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
glusterfs.spec | 18 ++++++++++++++----
rhel5-load-fuse-modules | 7 +++++++
2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/glusterfs.spec b/glusterfs.spec
index 725fb32..94e0c72 100644
--- a/glusterfs.spec
+++ b/glusterfs.spec
@@ -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 at fedoraproject.org>
+* Wed May 29 2013 Niels de Vos <devos at 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 at 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
diff --git a/rhel5-load-fuse-modules b/rhel5-load-fuse-modules
new file mode 100755
index 0000000..ee194db
--- /dev/null
+++ b/rhel5-load-fuse-modules
@@ -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
More information about the scm-commits
mailing list