RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES configure.ac devtool.conf rpm/misc/ librpmmisc...

From: Jeff Johnson <jbj@rpm5.org>
Date: Tue 13 Nov 2007 - 00:58:27 CET
Message-Id: <20071112235827.788F6348470@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:   13-Nov-2007 00:58:27
  Branch: HEAD                             Handle: 2007111223582601

  Modified files:
    rpm                     CHANGES configure.ac devtool.conf
    rpm/misc                librpmmisc.vers
    rpm/rpmdb               db3.c rpmwf.c

  Log:
    - jbj: add (tenative) patch to handle cached chroot paths.
    - jbj: change %system to --with-xar=internal, adding xar_* to loader map.

  Summary:
    Revision    Changes     Path
    1.1815      +2  -0      rpm/CHANGES
    2.251       +1  -1      rpm/configure.ac
    2.128       +1  -0      rpm/devtool.conf
    1.7         +6  -5      rpm/misc/librpmmisc.vers
    1.79        +12 -1      rpm/rpmdb/db3.c
    1.5         +17 -17     rpm/rpmdb/rpmwf.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1814 -r1.1815 CHANGES
  --- rpm/CHANGES	12 Nov 2007 18:29:20 -0000	1.1814
  +++ rpm/CHANGES	12 Nov 2007 23:58:26 -0000	1.1815
  @@ -1,4 +1,6 @@
   5.0a1 -> 5.0a2:
  +    - 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.
       - jbj: eliminate headerGetEntryMinMemory(), use headerGet{Entry,Extension}.
       - jbj: invent pubkey/pubkey arch/os convention to avoid missing value pain.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.250 -r2.251 configure.ac
  --- rpm/configure.ac	12 Nov 2007 14:33:57 -0000	2.250
  +++ rpm/configure.ac	12 Nov 2007 23:58:26 -0000	2.251
  @@ -1002,7 +1002,7 @@
       [ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
             AC_DEFINE(HAVE_XAR_H, 1, [Have <xar.h> header])
         fi
  -      AC_MSG_WARN([XAR support is highly experimental])
  +      AC_MSG_WARN([XAR support is under development])
       ], [])
   
   dnl # DMalloc
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/devtool.conf
  ============================================================================
  $ cvs diff -u -r2.127 -r2.128 devtool.conf
  --- rpm/devtool.conf	12 Nov 2007 14:42:35 -0000	2.127
  +++ rpm/devtool.conf	12 Nov 2007 23:58:26 -0000	2.128
  @@ -75,6 +75,7 @@
           --with-sqlite=external \
           --with-beecrypt=external \
           --with-neon=external \
  +        --with-xar=internal \
           --with-bzip2=external \
           --with-popt=external \
           --with-keyutils=external \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/misc/librpmmisc.vers
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 librpmmisc.vers
  --- rpm/misc/librpmmisc.vers	24 Sep 2007 02:38:57 -0000	1.6
  +++ rpm/misc/librpmmisc.vers	12 Nov 2007 23:58:27 -0000	1.7
  @@ -1,17 +1,18 @@
   LIBRPMMISC_0
   {
     global:
  -    fnmatch;
  -    glob;
  -    globfree;
  -    rpmz_*;
  -    lua*;
       db_env_create_rpmdb;
       db_env_set_func_open_rpmdb;
       db_env_set_func_fsync_rpmdb;
       db_strerror_rpmdb;
       db_create_rpmdb;
  +    fnmatch;
  +    glob;
  +    globfree;
  +    lua*;
       magic_*;
  +    rpmz_*;
  +    xar_*;
     local:
       file_*;
       db_*;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/db3.c
  ============================================================================
  $ cvs diff -u -r1.78 -r1.79 db3.c
  --- rpm/rpmdb/db3.c	12 Nov 2007 10:58:33 -0000	1.78
  +++ rpm/rpmdb/db3.c	12 Nov 2007 23:58:27 -0000	1.79
  @@ -1339,6 +1339,11 @@
   	} else {
   assert(rpmdb && rpmdb->db_dbenv);
   	    dbenv = rpmdb->db_dbenv;
  +#define	PLD_CHROOT
  +#ifdef	PLD_CHROOT
  +	    if (rpmdb->db_chrootDone)
  +		dbenv->set_data_dir(dbenv, dbhome);
  +#endif
   	    rpmdb->db_opens++;
   	}
   	/*@=mods@*/
  @@ -1507,9 +1512,15 @@
   		dbpath = (!dbi->dbi_use_dbenv && !dbi->dbi_temporary)
   			? dbfullpath : dbfile;
   #else
  +#ifdef	PLD_CHROOT
  +		/* XXX Make dbpath relative. */
  +		dbpath = (!dbi->dbi_use_dbenv)
  +			? dbfullpath : dbfile;
  +#else
   		dbpath = (!dbi->dbi_temporary)
   			? dbfullpath : dbfile;
  -#endif
  +#endif	/* PLD_CHROOT */
  +#endif	/* HACK */
   
   #if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
   		rc = (db->open)(db, txnid, dbpath, dbsubfile,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmwf.c
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 rpmwf.c
  --- rpm/rpmdb/rpmwf.c	12 Nov 2007 13:34:04 -0000	1.4
  +++ rpm/rpmdb/rpmwf.c	12 Nov 2007 23:58:27 -0000	1.5
  @@ -16,9 +16,9 @@
   
   rpmRC rpmwfFiniXAR(rpmwf wf)
   {
  -#ifdef WITH_XAR
   if (_rpmwf_debug)
   fprintf(stderr, "*** rpmwfFiniXAR(%p)\n", wf);
  +#ifdef WITH_XAR
       if (wf->i) {
   	xar_iter_free(wf->i);
   	wf->i = NULL;
  @@ -27,14 +27,17 @@
   	xar_close(wf->x);
   	wf->x = NULL;
       }
  -#endif
       return RPMRC_OK;
  +#else
  +    return RPMRC_FAIL;
  +#endif
   }
   
   rpmRC rpmwfInitXAR(rpmwf wf, const char * fn, const char * fmode)
   {
   #ifdef WITH_XAR
       int flags = ((fmode && *fmode == 'w') ? WRITE : READ);
  +#endif
   
   if (_rpmwf_debug)
   fprintf(stderr, "*** rpmwfInitXAR(%p, %s, %s)\n", wf, fn, fmode);
  @@ -42,35 +45,37 @@
   	fn = wf->fn;
   assert(fn);
       
  +#ifdef WITH_XAR
       wf->x = xar_open(fn, flags);
       if (flags == READ) {
   	wf->i = xar_iter_new();
   	wf->first = 1;
       }
  -#endif
       return RPMRC_OK;
  +#else
  +    return RPMRC_FAIL;
  +#endif
   }
   
   rpmRC rpmwfNextXAR(rpmwf wf)
   {
  -#ifdef WITH_XAR
   if (_rpmwf_debug)
   fprintf(stderr, "*** rpmwfNextXAR(%p) first %d\n", wf, wf->first);
  +#ifdef WITH_XAR
       if (wf->first) {
   	wf->f = xar_file_first(wf->x, wf->i);
   	wf->first = 0;
       } else
   	wf->f = xar_file_next(wf->i);
  +#endif
   
       if (wf->f == NULL)
   	return RPMRC_NOTFOUND;
  -#endif
       return RPMRC_OK;
   }
   
   rpmRC rpmwfPushXAR(rpmwf wf, const char * fn)
   {
  -#ifdef WITH_XAR
       char * b = NULL;
       size_t nb = 0;
   
  @@ -92,11 +97,12 @@
       }
   
       if (wf->x && b && nb > 0) {
  +#ifdef WITH_XAR
   	wf->f = xar_add_frombuffer(wf->x, NULL, fn, b, nb);
   	if (wf->f == NULL)
  +#endif
   	    return RPMRC_FAIL;
       }
  -#endif
       return RPMRC_OK;
   }
   
  @@ -105,9 +111,10 @@
       rpmRC rc = RPMRC_OK;
   #ifdef WITH_XAR
       const char * path = xar_get_path(wf->f);
  +#endif
       char * b = NULL;
       size_t nb = 0;
  -    int xx;
  +    int xx = 1;		/* assume failure */
   
   #ifdef	NOTYET
       const char * name = NULL;
  @@ -131,7 +138,9 @@
       else
   	assert(!strcmp(fn, path));
   
  +#ifdef WITH_XAR
       xx = xar_extract_tobuffersz(wf->x, wf->f, &b, &nb);
  +#endif
   if (_rpmwf_debug)
   fprintf(stderr, "*** xx %d %p[%lu]\n", xx, b, (unsigned long)nb);
       if (xx || b == NULL || nb == 0) {
  @@ -160,7 +169,6 @@
   	rc = RPMRC_NOTFOUND;
   
       path = _free(path);
  -#endif
       return rc;
   }
   
  @@ -318,7 +326,6 @@
   
   rpmwf rdXAR(const char * xarfn)
   {
  -#ifdef WITH_XAR
       rpmwf wf;
       rpmRC rc;
   
  @@ -338,14 +345,10 @@
   
       (void) rpmwfFiniXAR(wf);
       return wf;
  -#else
  -    return NULL;
  -#endif
   }
   
   rpmRC wrXAR(const char * xarfn, rpmwf wf)
   {
  -#ifdef WITH_XAR
       rpmRC rc;
   
       if ((rc = rpmwfInitXAR(wf, xarfn, "w")) != RPMRC_OK)
  @@ -366,9 +369,6 @@
       (void) rpmwfFiniXAR(wf);
   
       return rc;
  -#else
  -    return RPMRC_OK;
  -#endif
   }
   
   rpmRC wrRPM(const char * rpmfn, rpmwf wf)
  @@ .
Received on Tue Nov 13 00:58:27 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.