From bf6acff3460ef8b55cb61802cc7647df80a70c12 Mon Sep 17 00:00:00 2001 From: xing_xing1992 Date: Sat, 7 Jan 2023 10:41:31 +0800 Subject: [PATCH] Fix valgrind usage --- 0001-configure-Fix-valgrind-usage.patch | 45 +++++++++++++++++++++++++ librelp.spec | 6 +++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-configure-Fix-valgrind-usage.patch diff --git a/0001-configure-Fix-valgrind-usage.patch b/0001-configure-Fix-valgrind-usage.patch new file mode 100644 index 0000000..448c8eb --- /dev/null +++ b/0001-configure-Fix-valgrind-usage.patch @@ -0,0 +1,45 @@ +From 94d9b9f7e449535ebe3647bd74f177fe6cbbdd68 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann +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 + diff --git a/librelp.spec b/librelp.spec index e0f1737..057f981 100644 --- a/librelp.spec +++ b/librelp.spec @@ -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 - 1.2.16-5 +- Fix valgrind usage + * Tue Jan 12 2021 xu_ping - 1.2.16-4 - remove AM_INIT_AUTOMAKE to fix AM_INIT_AUTOMAKE expanded multiple times -- Gitee