diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-11-02 08:26:51 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-11-06 11:21:52 +0100 |
commit | b27d602eae17f889f5dbe15030ec46312938c070 (patch) | |
tree | 693959136d960b4ec024fabca89602a47723271f | |
parent | 81786dc63072c4f0b77d255bca164cdaea365d63 (diff) | |
download | perl-RPM4-b27d602eae17f889f5dbe15030ec46312938c070.tar perl-RPM4-b27d602eae17f889f5dbe15030ec46312938c070.tar.gz perl-RPM4-b27d602eae17f889f5dbe15030ec46312938c070.tar.bz2 perl-RPM4-b27d602eae17f889f5dbe15030ec46312938c070.tar.xz perl-RPM4-b27d602eae17f889f5dbe15030ec46312938c070.zip |
add special case for patched rpm-4.12 in Mageia 5, various Debian & FC
-rw-r--r-- | RPM4/NEWS | 1 | ||||
-rw-r--r-- | RPM4/src/Makefile.PL | 5 | ||||
-rw-r--r-- | RPM4/src/RPM4.xs | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,6 @@ - cpan testers: o detect rpm-4.1[0-2] which had another rpmPkgSign API + o detect patched rpm-4.12 in Mageia 5, various Debian & FC o list dependancies o skip a test with rpm-4.1[12] due to a segfault o use PkgConfig in order to find rpm 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); |