!39 Solve systemtap build problem in openEuler:MultiLanguage
From: @langfei295455 Reviewed-by: @liqingqing_1229 Signed-off-by: @liqingqing_1229
This commit is contained in:
commit
54586b5245
93
0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch
Normal file
93
0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch
Normal file
@ -0,0 +1,93 @@
|
||||
From d752cdd14eefd0dd0c81bb5b4d7787394335a49e Mon Sep 17 00:00:00 2001
|
||||
From: William Cohen <wcohen@redhat.com>
|
||||
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 <rpm/rpmlib.h>
|
||||
#include <rpm/rpmts.h>
|
||||
#include <rpm/rpmdb.h>
|
||||
+#ifdef HAVE_RPMCRYPTO_H
|
||||
+#include <rpm/rpmcrypto.h>
|
||||
+#endif
|
||||
#include <rpm/header.h>
|
||||
|
||||
#ifndef xfree
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -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<langfei@huawei.com> - 4.5-5
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Solve systemtap build problem in openEuler:MultiLanguage
|
||||
|
||||
* Mon Dec 5 2022 langfei<langfei@huawei.com> - 4.5-4
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user