RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm-5_0: rpm/ CHANGES rpm/lib/ rpmchecksig.c rpmcli.h rpmts...

From: Per Øyvind Karlsen <pkarlsen@rpm5.org>
Date: Thu 17 Jan 2008 - 12:53:54 CET
Message-Id: <20080117115354.90B9E348460@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarlsen@rpm5.org
  Module: rpm                              Date:   17-Jan-2008 12:53:54
  Branch: rpm-5_0                          Handle: 2008011711535300

  Modified files:           (Branch: rpm-5_0)
    rpm                     CHANGES
    rpm/lib                 rpmchecksig.c rpmcli.h rpmts.c rpmts.h

  Log:
    Rename rpmcliImportPubkey() -> rpmtsImportPubkey() (from and for a
    hint of rpm.org compatibility;)

  Summary:
    Revision    Changes     Path
    1.2054.2.10 +1  -0      rpm/CHANGES
    1.208.2.1   +1  -231    rpm/lib/rpmchecksig.c
    2.77.2.1    +0  -15     rpm/lib/rpmcli.h
    2.133.2.1   +233 -0     rpm/lib/rpmts.c
    2.92.2.1    +15 -0      rpm/lib/rpmts.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2054.2.9 -r1.2054.2.10 CHANGES
  --- rpm/CHANGES	16 Jan 2008 18:19:18 -0000	1.2054.2.9
  +++ rpm/CHANGES	17 Jan 2008 11:53:53 -0000	1.2054.2.10
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.0.1:
  +    - proyvind: Rename rpmcliImportPubkey() -> rpmtsImportPubkey() (from and for a hint of rpm.org API compatibility;)
       - proyvind: expose more functions in rpmps API (as rpm.org, initially based on us ;p)
       - jbj: fix: plug memory leak with digest algos array.
       - jbj: fix: --relocate no longer needs to copy dirIndexes data.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.208 -r1.208.2.1 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	16 Dec 2007 17:39:20 -0000	1.208
  +++ rpm/lib/rpmchecksig.c	17 Jan 2008 11:53:53 -0000	1.208.2.1
  @@ -461,236 +461,6 @@
       return res;
   }
   
  -rpmRC rpmcliImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktlen)
  -{
  -    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  -    static unsigned char zeros[] =
  -	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  -    const char * afmt = "%{pubkeys:armor}";
  -    const char * group = "Public Keys";
  -    const char * license = "pubkey";
  -    const char * buildhost = "localhost";
  -    uint32_t pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL);
  -    uint32_t zero = 0;
  -    pgpDig dig = NULL;
  -    pgpDigParams pubp = NULL;
  -    const char * d = NULL;
  -    const char * enc = NULL;
  -    const char * n = NULL;
  -    const char * u = NULL;
  -    const char * v = NULL;
  -    const char * r = NULL;
  -    const char * evr = NULL;
  -    Header h = NULL;
  -    rpmRC rc = RPMRC_FAIL;		/* assume failure */
  -    char * t;
  -    int xx;
  -
  -    if (pkt == NULL || pktlen <= 0)
  -	return RPMRC_FAIL;
  -    if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT)))
  -	return RPMRC_FAIL;
  -
  -/*@-moduncon@*/
  -    if ((enc = b64encode(pkt, pktlen)) == NULL)
  -	goto exit;
  -/*@=moduncon@*/
  -
  -    dig = pgpDigNew(0);
  -
  -    /* Build header elements. */
  -    (void) pgpPrtPkts(pkt, pktlen, dig, 0);
  -    pubp = pgpGetPubkey(dig);
  -
  -    if (!memcmp(pubp->signid, zeros, sizeof(pubp->signid))
  -     || !memcmp(pubp->time, zeros, sizeof(pubp->time))
  -     || pubp->userid == NULL)
  -	goto exit;
  -
  -    v = t = xmalloc(16+1);
  -    t = stpcpy(t, pgpHexStr(pubp->signid, sizeof(pubp->signid)));
  -
  -    r = t = xmalloc(8+1);
  -    t = stpcpy(t, pgpHexStr(pubp->time, sizeof(pubp->time)));
  -
  -    n = t = xmalloc(sizeof("gpg()")+8);
  -    t = stpcpy( stpcpy( stpcpy(t, "gpg("), v+8), ")");
  -
  -    /*@-nullpass@*/ /* FIX: pubp->userid may be NULL */
  -    u = t = xmalloc(sizeof("gpg()")+strlen(pubp->userid));
  -    t = stpcpy( stpcpy( stpcpy(t, "gpg("), pubp->userid), ")");
  -    /*@=nullpass@*/
  -
  -    evr = t = xmalloc(sizeof("4X:-")+strlen(v)+strlen(r));
  -    t = stpcpy(t, (pubp->version == 4 ? "4:" : "3:"));
  -    t = stpcpy( stpcpy( stpcpy(t, v), "-"), r);
  -
  -    /* Check for pre-existing header. */
  -
  -    /* Build pubkey header. */
  -    h = headerNew();
  -
  -    he->append = 1;
  -
  -    he->tag = RPMTAG_PUBKEYS;
  -    he->t = RPM_STRING_ARRAY_TYPE;
  -    he->p.argv = &enc;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -
  -    he->append = 0;
  -
  -    d = headerSprintf(h, afmt, NULL, rpmHeaderFormats, NULL);
  -    if (d == NULL)
  -	goto exit;
  -
  -    he->t = RPM_STRING_TYPE;
  -    he->c = 1;
  -    he->tag = RPMTAG_NAME;
  -    he->p.str = "gpg-pubkey";
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_VERSION;
  -    he->p.str = v+8;
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_RELEASE;
  -    he->p.str = r;
  -    xx = headerPut(h, he, 0);
  -
  -    /* Add Summary/Description/Group. */
  -    he->tag = RPMTAG_DESCRIPTION;
  -    he->p.str = d;
  -#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  -    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  -#else
  -    xx = headerPut(h, he, 0);
  -#endif
  -    he->tag = RPMTAG_GROUP;
  -    he->p.str = group;
  -#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  -    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  -#else
  -    xx = headerPut(h, he, 0);
  -#endif
  -    he->tag = RPMTAG_SUMMARY;
  -    he->p.str = u;
  -#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  -    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  -#else
  -    xx = headerPut(h, he, 0);
  -#endif
  -
  -#ifdef	NOTYET	/* XXX can't erase pubkeys with "pubkey" arch. */
  -    /* Add a "pubkey" arch/os to avoid missing value NULL ptrs. */
  -    he->tag = RPMTAG_ARCH;
  -    he->p.str = "pubkey";
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_OS;
  -    he->p.str = "pubkey";
  -    xx = headerPut(h, he, 0);
  -#endif
  -
  -    he->tag = RPMTAG_LICENSE;
  -    he->p.str = license;
  -    xx = headerPut(h, he, 0);
  -
  -    he->tag = RPMTAG_SIZE;
  -    he->t = RPM_UINT32_TYPE;
  -    he->p.ui32p = &zero;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -
  -    he->append = 1;
  -
  -    he->tag = RPMTAG_PROVIDENAME;
  -    he->t = RPM_STRING_ARRAY_TYPE;
  -    he->p.argv = &u;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_PROVIDEVERSION;
  -    he->t = RPM_STRING_ARRAY_TYPE;
  -    he->p.argv = &evr;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_PROVIDEFLAGS;
  -    he->t = RPM_UINT32_TYPE;
  -    he->p.ui32p = &pflags;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -
  -    he->tag = RPMTAG_PROVIDENAME;
  -    he->t = RPM_STRING_ARRAY_TYPE;
  -    he->p.argv = &n;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_PROVIDEVERSION;
  -    he->t = RPM_STRING_ARRAY_TYPE;
  -    he->p.argv = &evr;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -    he->tag = RPMTAG_PROVIDEFLAGS;
  -    he->t = RPM_UINT32_TYPE;
  -    he->p.ui32p = &pflags;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -
  -    he->append = 0;
  -
  -    he->tag = RPMTAG_RPMVERSION;
  -    he->t = RPM_STRING_TYPE;
  -    he->p.str = RPMVERSION;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -
  -    /* XXX W2DO: tag value inheirited from parent? */
  -    he->tag = RPMTAG_BUILDHOST;
  -    he->t = RPM_STRING_TYPE;
  -    he->p.str = buildhost;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -    {   uint32_t tid = rpmtsGetTid(ts);
  -	he->tag = RPMTAG_INSTALLTIME;
  -	he->t = RPM_UINT32_TYPE;
  -	he->p.ui32p = &tid;
  -	he->c = 1;
  -	xx = headerPut(h, he, 0);
  -	/* XXX W2DO: tag value inheirited from parent? */
  -	he->tag = RPMTAG_BUILDTIME;
  -	he->t = RPM_UINT32_TYPE;
  -	he->p.ui32p = &tid;
  -	he->c = 1;
  -	xx = headerPut(h, he, 0);
  -    }
  -
  -#ifdef	NOTYET
  -    /* XXX W2DO: tag value inheirited from parent? */
  -    he->tag = RPMTAG_SOURCERPM;
  -    he->t = RPM_STRING_TYPE;
  -    he->p.str = fn;
  -    he->c = 1;
  -    xx = headerPut(h, he, 0);
  -#endif
  -
  -    /* Add header to database. */
  -    xx = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), h, NULL);
  -    if (xx != 0)
  -	goto exit;
  -    rc = RPMRC_OK;
  -
  -exit:
  -    /* Clean up. */
  -    h = headerFree(h);
  -    dig = pgpDigFree(dig);
  -    n = _free(n);
  -    u = _free(u);
  -    v = _free(v);
  -    r = _free(r);
  -    evr = _free(evr);
  -    enc = _free(enc);
  -    d = _free(d);
  -    
  -    return rc;
  -}
  -
   /** \ingroup rpmcli
    * Import public key(s).
    * @todo Implicit --update policy for gpg-pubkey headers.
  @@ -749,7 +519,7 @@
   	}
   
   	/* Import pubkey packet(s). */
  -	if ((rpmrc = rpmcliImportPubkey(ts, pkt, pktlen)) != RPMRC_OK) {
  +	if ((rpmrc = rpmtsImportPubkey(ts, pkt, pktlen)) != RPMRC_OK) {
   	    rpmlog(RPMLOG_ERR, _("%s: import failed.\n"), fn);
   	    res++;
   	    continue;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmcli.h
  ============================================================================
  $ cvs diff -u -r2.77 -r2.77.2.1 rpmcli.h
  --- rpm/lib/rpmcli.h	4 Dec 2007 23:49:25 -0000	2.77
  +++ rpm/lib/rpmcli.h	17 Jan 2008 11:53:53 -0000	2.77.2.1
  @@ -709,21 +709,6 @@
   /*@{*/
   
   /** \ingroup rpmcli
  - * Import public key packet(s).
  - * @todo Implicit --update policy for gpg-pubkey headers.
  - * @param ts		transaction set
  - * @param pkt		pgp pubkey packet(s)
  - * @param pktlen	pgp pubkey length
  - * @return		RPMRC_OK/RPMRC_FAIL
  - */
  -rpmRC rpmcliImportPubkey(const rpmts ts,
  -		const unsigned char * pkt, ssize_t pktlen)
  -	/*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
  -		fileSystem, internalState @*/
  -	/*@modifies ts, rpmGlobalMacroContext,
  -		fileSystem, internalState @*/;
  -
  -/** \ingroup rpmcli
    * Bit(s) to control rpmReSign() operation.
    */
   /*@-typeuse@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.133 -r2.133.2.1 rpmts.c
  --- rpm/lib/rpmts.c	29 Dec 2007 02:49:32 -0000	2.133
  +++ rpm/lib/rpmts.c	17 Jan 2008 11:53:53 -0000	2.133.2.1
  @@ -14,6 +14,9 @@
   #define	_RPMDB_INTERNAL		/* XXX almost opaque sigh */
   #include "rpmdb.h"		/* XXX stealing db->db_mode. */
   
  +#define	_RPMEVR_INTERNAL	/* XXX RPMSENSE_KEYRING */
  +#include "rpmevr.h"
  +
   #include "rpmal.h"
   #include "rpmds.h"
   #include "rpmfi.h"
  @@ -250,6 +253,236 @@
   }
   /*@=compdef@*/
   
  +rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktlen)
  +{
  +    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  +    static unsigned char zeros[] =
  +	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  +    const char * afmt = "%{pubkeys:armor}";
  +    const char * group = "Public Keys";
  +    const char * license = "pubkey";
  +    const char * buildhost = "localhost";
  +    uint32_t pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL);
  +    uint32_t zero = 0;
  +    pgpDig dig = NULL;
  +    pgpDigParams pubp = NULL;
  +    const char * d = NULL;
  +    const char * enc = NULL;
  +    const char * n = NULL;
  +    const char * u = NULL;
  +    const char * v = NULL;
  +    const char * r = NULL;
  +    const char * evr = NULL;
  +    Header h = NULL;
  +    rpmRC rc = RPMRC_FAIL;		/* assume failure */
  +    char * t;
  +    int xx;
  +
  +    if (pkt == NULL || pktlen <= 0)
  +	return RPMRC_FAIL;
  +    if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT)))
  +	return RPMRC_FAIL;
  +
  +/*@-moduncon@*/
  +    if ((enc = b64encode(pkt, pktlen)) == NULL)
  +	goto exit;
  +/*@=moduncon@*/
  +
  +    dig = pgpDigNew(0);
  +
  +    /* Build header elements. */
  +    (void) pgpPrtPkts(pkt, pktlen, dig, 0);
  +    pubp = pgpGetPubkey(dig);
  +
  +    if (!memcmp(pubp->signid, zeros, sizeof(pubp->signid))
  +     || !memcmp(pubp->time, zeros, sizeof(pubp->time))
  +     || pubp->userid == NULL)
  +	goto exit;
  +
  +    v = t = xmalloc(16+1);
  +    t = stpcpy(t, pgpHexStr(pubp->signid, sizeof(pubp->signid)));
  +
  +    r = t = xmalloc(8+1);
  +    t = stpcpy(t, pgpHexStr(pubp->time, sizeof(pubp->time)));
  +
  +    n = t = xmalloc(sizeof("gpg()")+8);
  +    t = stpcpy( stpcpy( stpcpy(t, "gpg("), v+8), ")");
  +
  +    /*@-nullpass@*/ /* FIX: pubp->userid may be NULL */
  +    u = t = xmalloc(sizeof("gpg()")+strlen(pubp->userid));
  +    t = stpcpy( stpcpy( stpcpy(t, "gpg("), pubp->userid), ")");
  +    /*@=nullpass@*/
  +
  +    evr = t = xmalloc(sizeof("4X:-")+strlen(v)+strlen(r));
  +    t = stpcpy(t, (pubp->version == 4 ? "4:" : "3:"));
  +    t = stpcpy( stpcpy( stpcpy(t, v), "-"), r);
  +
  +    /* Check for pre-existing header. */
  +
  +    /* Build pubkey header. */
  +    h = headerNew();
  +
  +    he->append = 1;
  +
  +    he->tag = RPMTAG_PUBKEYS;
  +    he->t = RPM_STRING_ARRAY_TYPE;
  +    he->p.argv = &enc;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +
  +    he->append = 0;
  +
  +    d = headerSprintf(h, afmt, NULL, rpmHeaderFormats, NULL);
  +    if (d == NULL)
  +	goto exit;
  +
  +    he->t = RPM_STRING_TYPE;
  +    he->c = 1;
  +    he->tag = RPMTAG_NAME;
  +    he->p.str = "gpg-pubkey";
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_VERSION;
  +    he->p.str = v+8;
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_RELEASE;
  +    he->p.str = r;
  +    xx = headerPut(h, he, 0);
  +
  +    /* Add Summary/Description/Group. */
  +    he->tag = RPMTAG_DESCRIPTION;
  +    he->p.str = d;
  +#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  +    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  +#else
  +    xx = headerPut(h, he, 0);
  +#endif
  +    he->tag = RPMTAG_GROUP;
  +    he->p.str = group;
  +#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  +    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  +#else
  +    xx = headerPut(h, he, 0);
  +#endif
  +    he->tag = RPMTAG_SUMMARY;
  +    he->p.str = u;
  +#if defined(SUPPORT_IMPLICIT_TAG_DATA_TYPES)
  +    xx = headerAddI18NString(h, he->tag, he->p.ptr, "C");
  +#else
  +    xx = headerPut(h, he, 0);
  +#endif
  +
  +#ifdef	NOTYET	/* XXX can't erase pubkeys with "pubkey" arch. */
  +    /* Add a "pubkey" arch/os to avoid missing value NULL ptrs. */
  +    he->tag = RPMTAG_ARCH;
  +    he->p.str = "pubkey";
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_OS;
  +    he->p.str = "pubkey";
  +    xx = headerPut(h, he, 0);
  +#endif
  +
  +    he->tag = RPMTAG_LICENSE;
  +    he->p.str = license;
  +    xx = headerPut(h, he, 0);
  +
  +    he->tag = RPMTAG_SIZE;
  +    he->t = RPM_UINT32_TYPE;
  +    he->p.ui32p = &zero;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +
  +    he->append = 1;
  +
  +    he->tag = RPMTAG_PROVIDENAME;
  +    he->t = RPM_STRING_ARRAY_TYPE;
  +    he->p.argv = &u;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_PROVIDEVERSION;
  +    he->t = RPM_STRING_ARRAY_TYPE;
  +    he->p.argv = &evr;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_PROVIDEFLAGS;
  +    he->t = RPM_UINT32_TYPE;
  +    he->p.ui32p = &pflags;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +
  +    he->tag = RPMTAG_PROVIDENAME;
  +    he->t = RPM_STRING_ARRAY_TYPE;
  +    he->p.argv = &n;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_PROVIDEVERSION;
  +    he->t = RPM_STRING_ARRAY_TYPE;
  +    he->p.argv = &evr;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +    he->tag = RPMTAG_PROVIDEFLAGS;
  +    he->t = RPM_UINT32_TYPE;
  +    he->p.ui32p = &pflags;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +
  +    he->append = 0;
  +
  +    he->tag = RPMTAG_RPMVERSION;
  +    he->t = RPM_STRING_TYPE;
  +    he->p.str = RPMVERSION;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +
  +    /* XXX W2DO: tag value inheirited from parent? */
  +    he->tag = RPMTAG_BUILDHOST;
  +    he->t = RPM_STRING_TYPE;
  +    he->p.str = buildhost;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +    {   uint32_t tid = rpmtsGetTid(ts);
  +	he->tag = RPMTAG_INSTALLTIME;
  +	he->t = RPM_UINT32_TYPE;
  +	he->p.ui32p = &tid;
  +	he->c = 1;
  +	xx = headerPut(h, he, 0);
  +	/* XXX W2DO: tag value inheirited from parent? */
  +	he->tag = RPMTAG_BUILDTIME;
  +	he->t = RPM_UINT32_TYPE;
  +	he->p.ui32p = &tid;
  +	he->c = 1;
  +	xx = headerPut(h, he, 0);
  +    }
  +
  +#ifdef	NOTYET
  +    /* XXX W2DO: tag value inheirited from parent? */
  +    he->tag = RPMTAG_SOURCERPM;
  +    he->t = RPM_STRING_TYPE;
  +    he->p.str = fn;
  +    he->c = 1;
  +    xx = headerPut(h, he, 0);
  +#endif
  +
  +    /* Add header to database. */
  +    xx = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), h, NULL);
  +    if (xx != 0)
  +	goto exit;
  +    rc = RPMRC_OK;
  +
  +exit:
  +    /* Clean up. */
  +    h = headerFree(h);
  +    dig = pgpDigFree(dig);
  +    n = _free(n);
  +    u = _free(u);
  +    v = _free(v);
  +    r = _free(r);
  +    evr = _free(evr);
  +    enc = _free(enc);
  +    d = _free(d);
  +    
  +    return rc;
  +}
  +
   int rpmtsCloseSDB(rpmts ts)
   {
       int rc = 0;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.h
  ============================================================================
  $ cvs diff -u -r2.92 -r2.92.2.1 rpmts.h
  --- rpm/lib/rpmts.h	4 Dec 2007 23:49:25 -0000	2.92
  +++ rpm/lib/rpmts.h	17 Jan 2008 11:53:53 -0000	2.92.2.1
  @@ -500,6 +500,21 @@
   	/*@modifies ts, _dig, rpmGlobalMacroContext, fileSystem, internalState */;
   /*@=exportlocal@*/
   
  +/** \ingroup rpmcli
  + * Import public key packet(s).
  + * @todo Implicit --update policy for gpg-pubkey headers.
  + * @param ts		transaction set
  + * @param pkt		pgp pubkey packet(s)
  + * @param pktlen	pgp pubkey length
  + * @return		RPMRC_OK/RPMRC_FAIL
  + */
  +rpmRC rpmtsImportPubkey(const rpmts ts,
  +		const unsigned char * pkt, ssize_t pktlen)
  +	/*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/
  +	/*@modifies ts, rpmGlobalMacroContext,
  +		fileSystem, internalState @*/;
  +
   /** \ingroup rpmts
    * Close the database used by the transaction to solve dependencies.
    * @param ts		transaction set
  @@ .
Received on Thu Jan 17 12:53:54 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.