RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ pack.c rpm/lib/ librpm.vers poptALL...

From: Jeff Johnson <jbj@rpm5.org>
Date: Mon 30 Jul 2007 - 20:38:29 CEST
Message-Id: <20070730183829.382E4348447@rpm5.org>
  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:   30-Jul-2007 20:38:29
  Branch: HEAD                             Handle: 2007073019382801

  Modified files:
    rpm                     CHANGES
    rpm/build               pack.c
    rpm/lib                 librpm.vers poptALL.c

  Log:
    - nobrainer --nolead & --nosigh disablers.

  Summary:
    Revision    Changes     Path
    1.1532      +1  -0      rpm/CHANGES
    2.217       +10 -37     rpm/build/pack.c
    1.5         +2  -0      rpm/lib/librpm.vers
    2.39        +8  -0      rpm/lib/poptALL.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1531 -r1.1532 CHANGES
  --- rpm/CHANGES	30 Jul 2007 18:04:33 -0000	1.1531
  +++ rpm/CHANGES	30 Jul 2007 18:38:28 -0000	1.1532
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: nobrainer --nolead & --nosigh disablers.
       - jbj: get rid of convertdb1.
       - jbj: HEADER_MAGIC_YES always: remove the enum and arguments everywhere.
       - jbj: HEADER_MAGIC_YES always: eliminate HEADER_MAGIC_NO usages.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/pack.c
  ============================================================================
  $ cvs diff -u -r2.216 -r2.217 pack.c
  --- rpm/build/pack.c	30 Jul 2007 17:34:36 -0000	2.216
  +++ rpm/build/pack.c	30 Jul 2007 18:38:28 -0000	2.217
  @@ -32,6 +32,9 @@
   /*@access StringBuf @*/	/* compared with NULL */
   /*@access CSA_t @*/
   
  +extern int _nolead;	/* disable writing lead. */
  +extern int _nosigh;	/* disable writing signature header. */
  +
   /**
    */
   static inline int genSourceRpmName(Spec spec)
  @@ -632,40 +635,6 @@
       if (rc)
   	goto exit;
   
  -#ifdef	DYING
  -    /*
  -     * Set the actual archive size, and rewrite the header.
  -     * This used to be done using headerModifyEntry(), but now that headers
  -     * have regions, the value is scribbled directly into the header data
  -     * area. Some new scheme for adding the final archive size will have
  -     * to be devised if headerGetEntryMinMemory() ever changes to return
  -     * a pointer to memory not in the region, probably by appending
  -     * the archive size to the header region rather than including the
  -     * archive size within the header region.
  -     */
  -    if (Fileno(csa->cpioFdIn) < 0) {
  -	HGE_t hge = (HGE_t)headerGetEntryMinMemory;
  -	int_32 * archiveSize;
  -	if (hge(h, RPMTAG_ARCHIVESIZE, NULL, (void *)&archiveSize, NULL))
  -	    *archiveSize = csa->cpioArchiveSize;
  -    }
  -
  -    (void) Fflush(fd);
  -    if (Fseek(fd, 0, SEEK_SET) == -1) {
  -	rc = RPMERR_FSEEK;
  -	rpmError(RPMERR_FSEEK, _("%s: Fseek failed: %s\n"),
  -			sigtarget, Fstrerror(fd));
  -    }
  -
  -    fdInitDigest(fd, PGPHASHALGO_SHA1, 0);
  -    if (headerWrite(fd, h)) {
  -	rc = RPMERR_NOSPACE;
  -	rpmError(RPMERR_NOSPACE, _("Unable to write final header\n"));
  -    }
  -    (void) Fflush(fd);
  -    fdFiniDigest(fd, PGPHASHALGO_SHA1, (void **)&SHA1, NULL, 1);
  -#endif
  -
       (void) Fclose(fd);
       fd = NULL;
       (void) Unlink(fileName);
  @@ -712,6 +681,7 @@
       }
   
       /* Write the lead section into the package. */
  +if (!_nolead)
       {	int archnum = -1;
   	int osnum = -1;
   	struct rpmlead lead;
  @@ -748,9 +718,12 @@
       }
   
       /* Write the signature section into the package. */
  -    rc = rpmWriteSignature(fd, sig);
  -    if (rc)
  -	goto exit;
  +if (!_nosigh)
  +    {
  +	rc = rpmWriteSignature(fd, sig);
  +	if (rc)
  +	    goto exit;
  +    }
   
       /* Append the header and archive */
       ifd = Fopen(sigtarget, "r.fdio");
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/librpm.vers
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 librpm.vers
  --- rpm/lib/librpm.vers	6 Jul 2007 19:35:58 -0000	1.4
  +++ rpm/lib/librpm.vers	30 Jul 2007 18:38:29 -0000	1.5
  @@ -47,6 +47,8 @@
       makeTempFile;
       newFSM;
       newStringBuf;
  +    _nolead;
  +    _nosigh;
       nplatpat;
       platpat;
       _print_pkts;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.38 -r2.39 poptALL.c
  --- rpm/lib/poptALL.c	24 Jul 2007 14:36:47 -0000	2.38
  +++ rpm/lib/poptALL.c	30 Jul 2007 18:38:29 -0000	2.39
  @@ -26,6 +26,9 @@
   /*@access headerTagIndices @*/		/* XXX rpmcliFini */
   /*@access headerTagTableEntry @*/	/* XXX rpmcliFini */
   
  +int _nolead = 0;
  +int _nosigh = 0;
  +
   /*@unchecked@*/
   static int _debug = 0;
   
  @@ -464,6 +467,11 @@
    { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
   	N_("debug URL cache handling"), NULL},
   
  + { "nolead", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_nolead, -1,
  +	N_("disable rpm lead"), NULL},
  + { "nosigh", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_nosigh, -1,
  +	N_("disable rpm signature header"), NULL},
  +
      POPT_TABLEEND
   };
   /*@=bitwisesigned =compmempass @*/
  @@ .
Received on Mon Jul 30 20:38:29 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.