summaryrefslogtreecommitdiffstats
path: root/RPM4/src
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4/src')
-rw-r--r--RPM4/src/Makefile.PL5
-rw-r--r--RPM4/src/RPM4.xs2
2 files changed, 6 insertions, 1 deletions
diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL
index 58457da..78a2c59 100644
--- a/RPM4/src/Makefile.PL
+++ b/RPM4/src/Makefile.PL
@@ -50,6 +50,11 @@ foreach (qw(
print $FH "#define RPM$v\n";
$rpmv =~ /^\Q$_/ and last;
}
+# Special case for patched rpm-4.12 in Mageia 5 & Fedora, 4.11 & 4.12 in Debian:
+sub cat_ { my @l = map { my $F; open($F, '<', $_) ? <$F> : () } @_; wantarray() ? @l : join '', @l }
+if (grep { /int rpmPkgSign.*rpmSignArgs/ } cat_("$rpmheaderlocation/rpmsign.h")) {
+ print $FH "#define PATCHED_rpmPkgSign\n";
+}
print $FH "\n#endif\n";
close($FH);
exit 0 if $rebh;
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index bef3981..5e16773 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -471,7 +471,7 @@ int _headername_vs_dep(Header h, rpmds dep, int nopromote) {
/* Hight level function */
int rpmsign(char *passphrase, const char *rpm) {
-#ifdef RPM4_12_90
+#if defined(RPM4_12_90) | defined(PATCHED_rpmPkgSign)
return rpmPkgSign(rpm, NULL);
#else
return rpmPkgSign(rpm, NULL, passphrase);