summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-05-17 15:26:03 +0200
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-06-11 07:29:03 -0700
commit0bb51f8a620cb059ed94bcba10d5f3d285f04371 (patch)
tree01bbed226e04b88b59884786d6a2c406a6204ba6 /glusterfs.spec.in
parent013994da53831d2ee3d36714256ae9b3b109ffee (diff)
build: fix compiling on older distributions
data-tiering is disabled on RHEL-5 because it depends on a too new SQLite version. This change also prevents installing some of files that are used by geo-replication, which is also not available on RHEL-5. geo-replication depends on a too recent version of Python. Due to an older version of OpenSSL, some of the newer functions can not be used. A fallback to previous functions is done. Unfortunately RHEL-5 does not seem to have TLSv1.2 support, so only older versions can be used. Cherry picked from commit 0209b18fd65f9df5ebd0a8764ebf864d0d392998: > Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913 > BUG: 1222317 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/10803 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Also including the changes from http://review.gluster.org/11140: > build: improve detection of new OpenSSL features > > Building on Mac OS X revealed that the current check for > CRYPTO_THREADID_set_callback() availability in OpenSSL is not correct. > > There also does not seem to be a guarantee that TLSv1_2_method() is > available when TLS1_2_VERSION is #define'd. > > Change-Id: I21508065fc181a1c74bee4fd6d23bb5bdf7cea7a > BUG: 1222317 > Reviewed-on: http://review.gluster.org/11140 > Original-author: Kaleb KEITHLEY <kkeithle@redhat.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913 BUG: 1228510 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11096 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in41
1 files changed, 34 insertions, 7 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 7fbfaecf1e3..ddf1eccbcdc 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -72,6 +72,11 @@
%define _without_qemu_block --disable-qemu-block
%endif
+# Disable data-tiering on EL5, sqlite is too old
+%if ( 0%{?rhel} && 0%{?rhel} < 6 )
+%global _without_tiering --disable-tiering
+%endif
+
##-----------------------------------------------------------------------------
## All %global definitions should be placed here and keep them sorted
##
@@ -196,11 +201,17 @@ BuildRequires: libaio-devel libacl-devel
BuildRequires: python-devel
BuildRequires: python-ctypes
BuildRequires: userspace-rcu-devel >= 0.7
+%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
+BuildRequires: e2fsprogs-devel
+%else
BuildRequires: libuuid-devel
+%endif
%if ( 0%{?_with_cmocka:1} )
BuildRequires: libcmocka-devel >= 1.0.1
%endif
+%if ( 0%{!?_without_tiering:1} )
BuildRequires: sqlite-devel
+%endif
%if ( 0%{!?_without_systemtap:1} )
BuildRequires: systemtap-sdt-devel
%endif
@@ -575,17 +586,19 @@ This package provides the translators needed on any GlusterFS client.
# there is no need to run ./autogen or have a BuildRequires for automake.
[ -e 'install-sh' -o -e 'install.sh' ] || ./autogen.sh
%configure \
+./autogen.sh && %configure \
+ %{?_with_cmocka} \
%{?_with_tmpfilesdir} \
- %{?_without_rdma} \
+ %{?_without_bd} \
%{?_without_epoll} \
%{?_without_fusermount} \
%{?_without_georeplication} \
%{?_without_ocf} \
- %{?_without_syslog} \
- %{?_without_bd} \
%{?_without_qemu_block} \
+ %{?_without_rdma} \
+ %{?_without_syslog} \
%{?_without_systemtap} \
- %{?_with_cmocka}
+ %{?_without_tiering}
# fix hardening and remove rpath in shlibs
%if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
@@ -949,7 +962,10 @@ fi
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/debug/error-gen.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/debug/io-stats.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/debug/trace.so
+%if ( ! ( 0%{?rhel} && 0%{?rhel} < 6 ) )
+# RHEL-5 based distributions have a too old openssl
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/encryption/crypt.so
+%endif
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/access-control.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/barrier.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/cdc.so
@@ -999,13 +1015,17 @@ fi
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/glupy/helloworld.*
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/glupy/negative.*
%{_libdir}/pkgconfig/libgfchangelog.pc
+%if ( 0%{!?_without_tiering:1} )
%{_libdir}/pkgconfig/libgfdb.pc
+%endif
%files client-xlators
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/*.so
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/pump.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/ganesha.so
+%if ( 0%{!?_without_qemu_block:1} )
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/qemu-block.so
+%endif
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/client.so
%files extra-xlators
@@ -1067,17 +1087,17 @@ fi
%{_datadir}/glusterfs/scripts/generate-gfid-file.sh
%{_datadir}/glusterfs/scripts/gsync-sync-gfid
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
+%endif
%{_libexecdir}/glusterfs/gfind_missing_files
%{_sbindir}/gfind_missing_files
-%exclude %{_libexecdir}/glusterfs/gfind_missing_files/gfid_to_path.pyo
-%exclude %{_libexecdir}/glusterfs/gfind_missing_files/gfid_to_path.pyc
-%endif
%files libs
%{_libdir}/*.so.*
%exclude %{_libdir}/libgfapi.*
+%if ( 0%{!?_without_tiering:1} )
# libgfdb is only needed server-side
%exclude %{_libdir}/libgfdb.*
+%endif
%files -n python-gluster
# introducing glusterfs module in site packages.
@@ -1140,7 +1160,9 @@ fi
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/arbiter.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bit-rot.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bitrot-stub.so
+%if ( 0%{!?_without_tiering:1} )
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/changetimerecorder.so
+%endif
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/index.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/locks.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/posix*
@@ -1153,7 +1175,9 @@ fi
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs*
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/server*
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/storage*
+%if ( 0%{!?_without_tiering:1} )
%{_libdir}/libgfdb.so.*
+%endif
#snap_scheduler
%{_sbindir}/snap_scheduler.py
@@ -1207,6 +1231,9 @@ fi
%changelog
+* Fri Jun 5 2015 Niels de Vos <ndevos@redhat.com>
+- Fix building on RHEL-5 based distributions (#1228510)
+
* Wed Jun 3 2015 Kaleb S. KEITHLEY <kkeithle@redhat.com>
- move libgf{db,changelog}.pc from -api-devel to -devel (#1223390)