]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
nfs-ganesha/rpm: Fix tcmalloc allocator setup 2070/head
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 14 Sep 2022 15:55:08 +0000 (11:55 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Wed, 14 Sep 2022 15:57:25 +0000 (11:57 -0400)
The previous commit installed the gperftools-devel package and set the
cmake ALLOCATION variable to tcmalloc but this isn't used at all during
the RPM package build via mock.
We also need those changes in the RPM spec file.
This is a temporary solution until the upstream nfs-ganesha RPM spec file
will support such change.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
nfs-ganesha/build/build_rpm

index 162e7cc23bb74ce38f91049907543f336fdbcc2c..3ac0b9c12287fbadbe390130c851d8b63eec7990 100644 (file)
@@ -124,6 +124,8 @@ fi
 sed -i 's/libcephfs1-devel/libcephfs-devel/' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec
 sed -i 's/librgw2-devel/librgw-devel/' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec
 sed -i 's/CMAKE_BUILD_TYPE=Debug/CMAKE_BUILD_TYPE=RelWithDebInfo/' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec
+sed -i '/^BuildRequires:.*cmake$/a\BuildRequires:  gperftools-devel\' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec
+sed -i '/-DSANITIZE_ADDRESS/a\        -DALLOCATOR=tcmalloc\' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec
 
 ## Create the source rpm
 echo "Building SRPM"