!12 Fix valgrind usage

From: @xing_xing1992 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-07 11:11:38 +00:00 committed by Gitee
commit 7daf605068
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 94d9b9f7e449535ebe3647bd74f177fe6cbbdd68 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@whissi.de>
Date: Thu, 17 May 2018 16:52:35 +0200
Subject: [PATCH] configure: Fix valgrind usage
Valgrind will now only used when explicitly requested via
"--enable-valgrind" configure switch. Therefore, if requested but
valgrind isn't available, configure will fail with an error.
Fixes: 88600be7bb55 ("testbench: valgrind can be disabled in configure")
Fixes: https://github.com/rsyslog/librelp/issues/100
---
configure.ac | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ede924d..79106af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,16 +176,20 @@ fi
# valgrind
AC_ARG_ENABLE(valgrind,
- [AS_HELP_STRING([--enable-valgrind],[Enable valgrind tests@<:@default=yes@:>@])],
+ [AS_HELP_STRING([--enable-valgrind],[Enable valgrind tests@<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_valgrind="yes" ;;
no) enable_valgrind="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
esac],
- [enable_valgrind="yes"]
+ [enable_valgrind="no"]
)
if test "$enable_valgrind" = "yes"; then
AC_CHECK_PROG(VALGRIND, [valgrind], [valgrind], [no])
+
+ if test "x$VALGRIND" = "xno"; then
+ AC_MSG_ERROR([valgrind is missing but forced with --enable-valgrind. Either install valgrind or remove the option!])
+ fi
fi
AM_CONDITIONAL([HAVE_VALGRIND], test "$enable_valgrind" == "yes")
--
2.39.0.windows.2

View File

@ -1,12 +1,13 @@
Name: librelp
Version: 1.2.16
Release: 4
Release: 5
Summary: An Easy To Use Library For The RELP Protocol
License: GPLv3+
URL: http://www.rsyslog.com/
Source0: http://download.rsyslog.com/librelp/%{name}-%{version}.tar.gz
Patch0001: librelp-1.2.13-crypto-compliance.patch
Patch0002: remove-AM_INIT_AUTOMAKE.patch
Patch0003: 0001-configure-Fix-valgrind-usage.patch
Requires(post): glibc
Requires(postun): glibc
BuildRequires: gnutls-devel >= 1.4.0
@ -52,6 +53,9 @@ autoreconf -ivf
%{_libdir}/pkgconfig/relp.pc
%changelog
* Sat Jan 07 2023 xingxing<xingxing@xfusion.com> - 1.2.16-5
- Fix valgrind usage
* Tue Jan 12 2021 xu_ping<xuping33@huawei.com> - 1.2.16-4
- remove AM_INIT_AUTOMAKE to fix AM_INIT_AUTOMAKE expanded multiple times