Update systemtap to use modern (rpm >= 4.6) API

This commit is contained in:
Panu Matilainen 2017-08-10 22:18:54 +03:00 committed by Igor Gnatenko
parent 0025ab533d
commit 8d24c048f8
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,33 @@
diff -up systemtap-3.2/rpm_finder.cxx.newrpm systemtap-3.2/rpm_finder.cxx
--- systemtap-3.2/rpm_finder.cxx.newrpm 2017-08-10 22:13:10.283393224 +0300
+++ systemtap-3.2/rpm_finder.cxx 2017-08-10 22:13:28.320385642 +0300
@@ -22,7 +22,6 @@ using namespace std;
extern "C" {
-#define _RPM_4_4_COMPAT
#include <string.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmts.h>
@@ -100,8 +99,7 @@ missing_rpm_enlist (systemtap_session& s
break;
/* Verify the kernel file is not already installed. */
- rpminfo = headerSprintf(h, header,
- rpmTagTable, rpmHeaderFormats, &err);
+ rpminfo = headerFormat(h, header, &err);
if (!rpminfo)
{
@@ -154,9 +152,8 @@ missing_rpm_enlist (systemtap_session& s
/* The allocated memory gets utilized below for MISSING_RPM_HASH. */
if(strcmp(rpm_type,"-debuginfo")==0){
xfree(rpminfo);
- rpminfo = headerSprintf(h,
- "%{name}-%{version}-%{release}.%{arch}",
- rpmTagTable, rpmHeaderFormats, &err);
+ rpminfo = headerFormat(h,
+ "%{name}-%{version}-%{release}.%{arch}", &err);
}
if (!rpminfo)
{

View File

@ -153,6 +153,7 @@ BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm) tex(graphicx.sty)
%endif
Patch2: systemtap-3.2-modern-rpm-api.patch
# For the html.sty mentioned in the .tex files, even though latex2html is
# not run during the build, only during manual scripts/update-docs runs:
BuildRequires: latex2html
@ -477,6 +478,7 @@ sleep 1
find . \( -name configure -o -name config.h.in \) -print | xargs touch
cd ..
%endif
%patch2 -p1
%build