RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   13-Nov-2007 01:34:11
  Branch: HEAD                             Handle: 2007111300341100

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmchecksig.c
    rpm/rpmdb               header.h pkgio.c rpmwf.c tagname.c

  Log:
    - eliminate all but 1 of the memory leaks with -Kvv *.xar.
    - add he->signature tagTypeValidate disabler, sigtags no workie.

  Summary:
    Revision    Changes     Path
    1.1816      +2  -0      rpm/CHANGES
    1.173       +8  -1      rpm/lib/rpmchecksig.c
    1.63        +1  -0      rpm/rpmdb/header.h
    1.31        +2  -0      rpm/rpmdb/pkgio.c
    1.6         +3  -1      rpm/rpmdb/rpmwf.c
    1.10        +1  -0      rpm/rpmdb/tagname.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1815 -r1.1816 CHANGES
  --- rpm/CHANGES       12 Nov 2007 23:58:26 -0000      1.1815
  +++ rpm/CHANGES       13 Nov 2007 00:34:11 -0000      1.1816
  @@ -1,4 +1,6 @@
   5.0a1 -> 5.0a2:
  +    - jbj: eliminate all but 1 of the memory leaks with -Kvv *.xar.
  +    - jbj: add he->signature tagTypeValidate disabler, sigtags no workie.
       - jbj: add (tenative) patch to handle cached chroot paths.
       - jbj: change %system to --with-xar=internal, adding xar_* to loader map.
       - jbj: hmmm, markReplacedFiles() breaks here, todo++. noone will notice.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.172 -r1.173 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c     12 Nov 2007 18:29:21 -0000      1.172
  +++ rpm/lib/rpmchecksig.c     13 Nov 2007 00:34:11 -0000      1.173
  @@ -966,7 +966,9 @@
   #endif
        ) {
            he->tag = she->tag;
  +         he->signature = 1;
            xx = hge(sigh, he, 0);
  +         he->signature = 0;
            xx = pgpPrtPkts(he->p.ptr, he->c, dig, 0);
            he->p.ptr = _free(he->p.ptr);
   #if defined(SUPPORT_RPMV3_VERIFY_RSA)
  @@ -1003,6 +1005,7 @@
        sprintf(b, "%s:%c", fn, (rpmIsVerbose() ? '\n' : ' ') );
        b += strlen(b);
   
  +     she->signature = 1;
        if (sigh != NULL)
        for (hi = headerInitExtension(sigh);
            headerNextExtension(hi, she, 0) != 0;
  @@ -1211,6 +1214,7 @@
        }
        if (hi != NULL)
            hi = headerFreeIterator(hi);
  +     she->signature = 0;
   
        res += res2;
   
  @@ -1301,7 +1305,10 @@
            res++;
        }
   
  -     if (fd != NULL) xx = Fclose(fd);
  +     if (fd != NULL) {
  +         rpmpkgClean(fd);
  +         xx = Fclose(fd);
  +     }
       }
   
       gi = rpmgiFree(gi);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.h
  ============================================================================
  $ cvs diff -u -r1.62 -r1.63 header.h
  --- rpm/rpmdb/header.h        12 Nov 2007 18:29:21 -0000      1.62
  +++ rpm/rpmdb/header.h        13 Nov 2007 00:34:11 -0000      1.63
  @@ -186,6 +186,7 @@
       unsigned int freeData    : 1;
       unsigned int avail               : 1;
       unsigned int append              : 1;
  +    unsigned int signature   : 1;
   };
   typedef struct _HE_s HE_s;
   #endif
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.30 -r1.31 pkgio.c
  --- rpm/rpmdb/pkgio.c 12 Nov 2007 13:07:56 -0000      1.30
  +++ rpm/rpmdb/pkgio.c 13 Nov 2007 00:34:11 -0000      1.31
  @@ -738,7 +738,9 @@
        /* Print package component sizes. */
   
        he->tag = RPMSIGTAG_SIZE;
  +     he->signature = 1;
        xx = hge(sigh, he, 0);
  +     he->signature = 0;
        if (xx) {
            size_t datasize = he->p.ui32p[0];
            rc = printSize(fd, sigSize, pad, datasize);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmwf.c
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 rpmwf.c
  --- rpm/rpmdb/rpmwf.c 12 Nov 2007 23:58:27 -0000      1.5
  +++ rpm/rpmdb/rpmwf.c 13 Nov 2007 00:34:11 -0000      1.6
  @@ -111,6 +111,8 @@
       rpmRC rc = RPMRC_OK;
   #ifdef WITH_XAR
       const char * path = xar_get_path(wf->f);
  +#else
  +    const char * path = "*** WITHOUT_XAR ***";
   #endif
       char * b = NULL;
       size_t nb = 0;
  @@ -149,7 +151,7 @@
       }
   
   if (_rpmwf_debug)
  -fprintf(stderr, "*** %s %p[%lu]\n", xar_get_path(wf->f), b, (unsigned 
long)nb);
  +fprintf(stderr, "*** %s %p[%lu]\n", path, b, (unsigned long)nb);
       if (!strcmp(fn, "Lead")) {
        wf->l = b;
        wf->nl = nb;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/tagname.c
  ============================================================================
  $ cvs diff -u -r1.9 -r1.10 tagname.c
  --- rpm/rpmdb/tagname.c       11 Nov 2007 23:59:20 -0000      1.9
  +++ rpm/rpmdb/tagname.c       13 Nov 2007 00:34:11 -0000      1.10
  @@ -279,6 +279,7 @@
   void tagTypeValidate(HE_t he)
   {
   /* XXX hack around known borkage for now. */
  +if (!he->signature)
   if (!(he->tag == 261 || he->tag == 269))
   if ((tagType(he->tag) & 0xffff) != he->t)
   fprintf(stderr, "==> warning: tag %u type(0x%x) != implicit type(0x%x)\n", 
he->tag, he->t, tagType(he->tag));
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to