diff --git a/0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch b/0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch new file mode 100644 index 0000000..bedaf75 --- /dev/null +++ b/0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch @@ -0,0 +1,93 @@ +From d752cdd14eefd0dd0c81bb5b4d7787394335a49e Mon Sep 17 00:00:00 2001 +From: William Cohen +Date: Wed, 27 Apr 2022 14:14:17 -0400 +Subject: [PATCH] PR29094: Include rpm/rpmcrypto.h when required + +rpm-4.18.0 moved the prototypes for rpmFreeCrypto() into a new header, +/usr/include/rpm/rpmcrypto.h. Have the configure check for it +and include it when required. +--- + config.in | 3 +++ + configure | 19 +++++++++++++++++++ + configure.ac | 6 ++++++ + rpm_finder.cxx | 3 +++ + 4 files changed, 31 insertions(+) + +diff --git a/config.in b/config.in +index 64740c9..12cd394 100644 +--- a/config.in ++++ b/config.in +@@ -88,6 +88,9 @@ + /* have librpm */ + #undef HAVE_LIBRPM + ++/* have rpmcrypto.h */ ++#undef HAVE_RPMCRYPTO_H ++ + /* have librpmio */ + #undef HAVE_LIBRPMIO + +diff --git a/configure b/configure +index abc4e7f..3694dbb 100755 +--- a/configure ++++ b/configure +@@ -11524,6 +11524,25 @@ $as_echo "$as_me: WARNING: cannot find librpmio" >&2;} + fi + fi + ++for ac_header in rpm/rpmcrypto.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "rpm/rpmcrypto.h" "ac_cv_header_rpm_rpmcrypto_h" "$ac_includes_default" ++if test "x$ac_cv_header_rpm_rpmcrypto_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_RPM_RPMCRYPTO_H 1 ++_ACEOF ++ ++ ++$as_echo "#define HAVE_RPMCRYPTO_H 1" >>confdefs.h ++ ++ have_rpmcrypto_h=yes ++ { $as_echo "$as_me:${as_lineno-$LINENO}: separate rpm/rpmcrypto.h" >&5 ++$as_echo "$as_me: separate rpm/rpmcrypto.h" >&6;} ++fi ++ ++done ++ ++ + LIBS_no_readline=$LIBS + + have_libreadline="no" +diff --git a/configure.ac b/configure.ac +index 4ef80b7..ccb4fe0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -490,6 +490,12 @@ if test "$with_rpm" != "no"; then + fi + fi + ++dnl Look for rpmcrypto.h ++AC_CHECK_HEADERS([rpm/rpmcrypto.h], [ ++ AC_DEFINE([HAVE_RPMCRYPTO_H],[1],[have rpmcrypto_h]) ++ have_rpmcrypto_h=yes ++ AC_MSG_NOTICE([separate rpm/rpmcrypto.h])]) ++ + dnl Look for readline. + dnl + dnl First save the orignal value of LIBS. +diff --git a/rpm_finder.cxx b/rpm_finder.cxx +index 206669b..052058a 100644 +--- a/rpm_finder.cxx ++++ b/rpm_finder.cxx +@@ -26,6 +26,9 @@ extern "C" { + #include + #include + #include ++#ifdef HAVE_RPMCRYPTO_H ++#include ++#endif + #include + + #ifndef xfree +-- +1.8.3.1 + diff --git a/systemtap.spec b/systemtap.spec index 836f466..90a9b74 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -22,13 +22,14 @@ Name: systemtap Version: 4.5 -Release: 4 +Release: 5 Summary: Linux trace and probe tool License: GPLv2+ and Public Domain URL: http://sourceware.org/systemtap Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz Patch1: 0001-Add-init-type-cast-to-resolve-gcc-issue.patch +Patch2: 0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch BuildRequires: gcc-c++ emacs systemd python3-setuptools BuildRequires: gettext-devel rpm-devel readline-devel @@ -456,6 +457,12 @@ exit 0 %{_mandir}/man[1378]/* %changelog +* Mon Feb 6 2023 langfei - 4.5-5 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Solve systemtap build problem in openEuler:MultiLanguage + * Mon Dec 5 2022 langfei - 4.5-4 - Type:bugfix - CVE:NA