glusterfs.spec: fix issues with libtcmalloc
Backport: e894527ecf531d1b31bdcc9b23a10627c1b4d355 1) tcmalloc can't be dlopen()ed successfully on non-x86_64 arches, or at least not on aarch64, s390x, and armv7hl; causing issues with qemu and/or libvirt on those platforms. 2) invoking rpmbuild with --without-tcmalloc creates the %global %_without_tcmalloc (=true), and AFAIK does not creat the %global %_with_tcmalloc (=false). The later tests for %_with_tcmalloc: do not work correctly, they need to test for '!%_without_tcmalloc'. 3) a %global %_without_libtcmalloc is created but never used. The %configure step uses %_without_tcmalloc. Signed-off-by: imxcc <xingchaochao@huawei.com> Signed-off-by: kalebskeithley <kaleb@redhat.com> Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Signed-off-by: Wenchao Hao <haowenchao@huawei.com> (cherry picked from commit 402675e26a2234a8c8c3646d3282519a3bdcf1d4)
This commit is contained in:
parent
e633819dd6
commit
91c8e83424
@ -71,7 +71,11 @@
|
||||
# libtcmalloc
|
||||
# if you wish to compile an rpm without tcmalloc (i.e. use gluster mempool)
|
||||
# rpmbuild -ta glusterfs-10.0.tar.gz --without tcmalloc
|
||||
%{?_without_tcmalloc:%global _without_libtcmalloc --without-tcmalloc}
|
||||
%{?_without_tcmalloc:%global _without_tcmalloc --without-tcmalloc}
|
||||
|
||||
%ifnarch x86_64
|
||||
%global _without_tcmalloc --without-tcmalloc
|
||||
%endif
|
||||
|
||||
# Do not use libtirpc on EL6, it does not have xdr_uint64_t() and xdr_uint32_t
|
||||
# Do not use libtirpc on EL7, it does not have xdr_sizeof()
|
||||
@ -220,7 +224,7 @@
|
||||
Summary: Distributed File System
|
||||
Name: glusterfs
|
||||
Version: 10.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
License: GPLv2 or LGPLv3+
|
||||
URL: http://docs.gluster.org/
|
||||
%if ( 0%{_for_fedora_koji_builds} )
|
||||
@ -241,7 +245,7 @@ Requires(pre): shadow-utils
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
|
||||
%if ( 0%{?_with_tcmalloc:1} )
|
||||
%if ( 0%{!?_without_tcmalloc:1} )
|
||||
Requires: gperftools-libs%{?_isa}
|
||||
%endif
|
||||
|
||||
@ -263,7 +267,7 @@ BuildRequires: ncurses-devel readline-devel
|
||||
BuildRequires: libxml2-devel openssl-devel
|
||||
BuildRequires: libaio-devel libacl-devel
|
||||
BuildRequires: python%{_pythonver}-devel
|
||||
%if ( 0%{?_with_tcmalloc:1} )
|
||||
%if ( 0%{!?_without_tcmalloc:1} )
|
||||
BuildRequires: gperftools-devel
|
||||
%endif
|
||||
%if ( 0%{?rhel} && 0%{?rhel} < 8 )
|
||||
@ -1512,6 +1516,9 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 28 2022 imxcc <xingchaochao@huawei.com> - 10.0-4
|
||||
- tcmalloc issues
|
||||
|
||||
* Wed Jan 26 2022 Wenchao Hao <haowenchao@huawei.com> - 10.0-3
|
||||
- Change gluster-server "Requires" from pyxattr to python3-pyxattr
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user