OK, here's the flaw.
rpmchk/archive.c does this call:
(gdb)
253 fileindex=findfileindex(filename);
which returns
(gdb) p fileindex
$3 = -1
(Note: there is no check that the array index is, indeed, out-of-
bounds.)
Now findfileindex() is confused because its being passed "./opt/lsb/
bin/bison"
but the wrong branch of
if(hasPayloadFilesHavePrefix) {
fmt=".%s";
} else {
fmt="%s";
}
is being taken.
Hmmm, I begin to suspect what is going on ... yes, tracking
dependencies are being used to set the boolean (from dependencies.c):
if (strcmp(name, "rpmlib(PayloadFilesHavePrefix)") == 0)
hasPayloadFilesHavePrefix = 1;
if (strcmp(name, "rpmlib(CompressedFileNames)") == 0)
hasCompressedFileNames = 1;
So much for packages having _ONLY_
Requires: lsb = 3.1
other Requires: need to be present in rpm headers for lsbpkgchk to
function
correctly. Icky unspecified ad hoc hackery, just like rpm code.
I shall re-add (conditioned on --lsb)
Requires: rpmlib(PayloadFilesHavePrefix)
so that lsbpkgchk as distributed by LSB spews less.
FWIW, the reason for removing the tracking dependency
is that It Really Doesn't Matter. There's a simpler test on
file paths from cpio headers that has been known to "just work" for
rpm since
the year 2000. Here is what rpm itself has been doing when presented
with
paths that might (or might not) start with "./":
/* Match rpm-4.0 payloads with ./ prefixes. */
if (afn[0] == '.' && afn[1] == '/') afn += 2;
i.e. skip leading "./" if present.
And the rationale for making the change to add "./"
prefix to cpio paths between rpm-3.0.x and the last
major release of rpm was to permit including / as
something other than the highly non-standard ""
null string in cpio payloads.
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
LSB Communication List rpm-lsb@rpm5.org