- fix: duplicate headerFree() on installBinaryPackage() error return.
- fix: segfault on exit of "rpm -qp --qf '%{#fsnames}' pkg" (#20595).
- hpux w/o -D_OPEN_SOURCE has not h_errno.
+ - syntax to specify source of Requires: (PreReq: now legacy).
+ - md5 sums are little endian (no swap) so big endian needs the swap.
3.0.6 -> 4.0
- use DIRNAMES/BASENAMES/DIRINDICES not FILENAMES in packages and db.
/**
* Setup payload map and install payload archive.
+ *
+ * @todo Add endian tag so that srpm MD5 sums can ber verified when installed.
+ *
* @param fd file handle of package (positioned at payload)
* @param files files to install (NULL means "all files")
* @param fileCount no. files to install
#else
urltype = urlPath(files[i].relativePath, &map[mappedFiles].fsPath);
#endif
- map[mappedFiles].md5sum = files[i].md5sum;
+ /* XXX Can't do src rpm MD5 sum verification yet. */
+ map[mappedFiles].md5sum =
+ specFile == NULL ? files[i].md5sum : NULL;
+ /* XXX Can't do src rpm MD5 sum verification (yet). */
+ /* XXX binary rpms always have RPMTAG_SOURCERPM, source rpms do not */
+ map[mappedFiles].md5sum = headerIsEntry(h, RPMTAG_SOURCERPM)
+ ? files[i].md5sum : NULL;
map[mappedFiles].finalMode = files[i].mode;
map[mappedFiles].finalUid = files[i].uid;
map[mappedFiles].finalGid = files[i].gid;
ctx->digest[ 4 ] = 0xc3d2e1f0;
}
- ctx->doByteReverse = (IS_BIG_ENDIAN()) ? 0 : 1;
+ /* md5 sums are little endian (no swap) so big endian needs the swap. */
+ ctx->doByteReverse = (IS_BIG_ENDIAN()) ? 1 : 0;
if (flags & RPMDIGEST_NATIVE)
ctx->doByteReverse = 0;