configure: Instead of for rpm 4.15+ version, test actual rpm/zstd support
If no 'rpm' is available, we currently get:
[...]
checking for rpm... no
../git/configure: line 13119: rpm: command not found
configure: detected rpm version:
configure: rpm support in abipkgdiff is disabled
[...]
Here is the configuration of the package:
[...]
Enable rpm support in abipkgdiff : no
Enable rpm 4.15 support in abipkgdiff tests : no
[...]
Notice intermixed error output: 'rpm: command not found'.
If Ubuntu focal 'rpm' 4.14.2.1+dfsg1-1build2 is available, we currently get:
[...]
checking for rpm... yes
configure: detected rpm version: 4.14.2.1
configure: rpm support in abipkgdiff is enabled
configure: rpm 4.15 support in abipkgdiff tests is enabled
[...]
Here is the configuration of the package:
[...]
Enable rpm support in abipkgdiff : yes
Enable rpm 4.15 support in abipkgdiff tests : yes
[...]
Notice wrong 4.15+ version detection (due to '[[ "$rpmversion" > "4.14.0" ]]'),
which is satisfied by '4.14.2.1'. (Comparing versions with shell '[['
generally is fragile; instead use 'autoconf-archive/ax_compare_version.m4'
or similar?)
Also, 'configure'ing with '--disable-rpm415' doesn't work; same output as
before. That's due to commit
26c41c060bf30750fe2cded87edaf1ae47027523
"Fix thinko in configure.ac", where either there was no thinko in fact (the
original idea, I suppose, was only if 'test x$ENABLE_RPM = xyes' to do the
4.15+ 'auto' checking?), and/or a typo: instead of 'test x$ENABLE_RPM = xyes',
the first conditional should 'test x$ENABLE_RPM415 = xyes'?
And, 'configure'ing with '--enable-rpm415' doesn't raise a hard error if 'rpm'
actually isn't 4.15+.
But all that said, we don't actually need to check for rpm 4.15+ version, but
instead may simply check for the rpm/zstd support that we need: 'rpm2cpio'.
* configure.ac: Instead of for rpm 4.15+ version, test actual
rpm/zstd support.
* tests/test-diff-pkg.cc: Adjust.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>