RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 11-Nov-2007 05:04:26
Branch: HEAD Handle: 2007111104042600
Modified files:
rpm CHANGES
rpm/lib poptALL.c rpmchecksig.c
Log:
- functional header-only signature verify of *.xar.
- add --rpmwfdebug.
Summary:
Revision Changes Path
1.1802 +2 -0 rpm/CHANGES
2.53 +5 -0 rpm/lib/poptALL.c
1.171 +10 -5 rpm/lib/rpmchecksig.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1801 -r1.1802 CHANGES
--- rpm/CHANGES 11 Nov 2007 02:23:44 -0000 1.1801
+++ rpm/CHANGES 11 Nov 2007 04:04:26 -0000 1.1802
@@ -1,4 +1,6 @@
4.5 -> 5.0:
+ - jbj: functional header-only signature verify of *.xar.
+ - jbj: add --rpmwfdebug.
- jbj: clean up rpmpkg memory leaks.
- jbj: functional queries of *.xar packages, on to payload.
- jbj: lash up rpmwf implicit iteration for Lead/Signature/Header reads.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/poptALL.c
============================================================================
$ cvs diff -u -r2.52 -r2.53 poptALL.c
--- rpm/lib/poptALL.c 10 Nov 2007 23:41:11 -0000 2.52
+++ rpm/lib/poptALL.c 11 Nov 2007 04:04:26 -0000 2.53
@@ -122,6 +122,9 @@
extern int _rpmts_debug;
/*@unchecked@*/
+extern int _rpmwf_debug;
+
+/*@unchecked@*/
extern int _rpmts_macros;
/*@unchecked@*/
@@ -485,6 +488,8 @@
NULL, NULL},
{ "rpmtsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmts_debug, -1,
NULL, NULL},
+ { "rpmwfdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmwf_debug, -1,
+ NULL, NULL},
{ "tardebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_tar_debug, -1,
N_("debug tar payloads"), NULL},
{ "stats", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmts_stats, -1,
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmchecksig.c
============================================================================
$ cvs diff -u -r1.170 -r1.171 rpmchecksig.c
--- rpm/lib/rpmchecksig.c 10 Nov 2007 18:06:42 -0000 1.170
+++ rpm/lib/rpmchecksig.c 11 Nov 2007 04:04:26 -0000 1.171
@@ -752,7 +752,7 @@
/**
* @todo If the GPG key was known available, the md5 digest could be skipped.
*/
-static int readFile(FD_t fd, const char * fn, pgpDig dig)
+static int readFile(rpmts ts, FD_t fd, const char * fn, pgpDig dig)
/*@globals fileSystem, internalState @*/
/*@modifies fd, *dig, fileSystem, internalState @*/
{
@@ -767,11 +767,16 @@
dig->nbytes = 0;
/* Read the header from the package. */
- { Header h = headerRead(fd);
- if (h == NULL) {
- rpmlog(RPMLOG_ERR, _("%s: headerRead failed\n"), fn);
+ { Header h = NULL;
+ const char item[] = "Header";
+ const char * msg = NULL;
+ rpmRC rc = rpmReadHeader(ts, fd, &h, &msg);
+ if (rc != RPMRC_OK) {
+ rpmlog(RPMLOG_ERR, "%s: %s: %s\n", fn, item, msg);
+ msg = _free(msg);
goto exit;
}
+ msg = _free(msg);
dig->nbytes += headerSizeof(h);
@@ -963,7 +968,7 @@
#endif
/* Read the file, generating digest(s) on the fly. */
- if (dig == NULL || sigp == NULL || readFile(fd, fn, dig)) {
+ if (dig == NULL || sigp == NULL || readFile(ts, fd, fn, dig)) {
res++;
goto exit;
}
@@ .
Received on Sun Nov 11 05:04:27 2007