[CVS] RPM: rpm-5_4: rpm/rpmdb/ lmdb.c

2017-07-23 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   23-Jul-2017 23:02:47
  Branch: rpm-5_4  Handle: 2017072321024700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   lmdb.c

  Log:
- lmdb: WIP.

  Summary:
RevisionChanges Path
1.1.2.6 +453 -176   rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 lmdb.c
  --- rpm/rpmdb/lmdb.c  23 Jul 2017 01:56:17 -  1.1.2.5
  +++ rpm/rpmdb/lmdb.c  23 Jul 2017 21:02:47 -  1.1.2.6
  @@ -181,6 +181,22 @@
   return dbi->dbi_flags;
   }
   
  +/*==*/
  +/* -- dbiset.c */
  +
  +dbiIndexSet dbiIndexSetNew(unsigned int sizehint)
  +{
  +dbiIndexSet set = xcalloc(1, sizeof(*set));
  +if (sizehint > 0)
  + dbiIndexSetGrow(set, sizehint);
  +return set;
  +}
  +
  +/* 
  + * Ensure sufficient memory for nrecs of new records in dbiIndexSet.
  + * Allocate in power of two sizes to avoid memory fragmentation, so
  + * realloc is not always needed.
  + */
   void dbiIndexSetGrow(dbiIndexSet set, unsigned int nrecs)
   {
   size_t need = (set->count + nrecs) * sizeof(*(set->recs));
  @@ -202,6 +218,43 @@
   return (*a - *b);
   }
   
  +void dbiIndexSetSort(dbiIndexSet set)
  +{
  +/*
  + * mergesort is much (~10x with lots of identical basenames) faster
  + * than pure quicksort, but glibc uses msort_with_tmp() on stack.
  + */
  +if (set && set->recs && set->count > 1) {
  +#if HAVE_MERGESORT_XXX
  + mergesort(set->recs, set->count, sizeof(*set->recs), hdrNumCmp);
  +#else
  + qsort(set->recs, set->count, sizeof(*set->recs), hdrNumCmp);
  +#endif
  +}
  +}
  +
  +void dbiIndexSetUniq(dbiIndexSet set, int sorted)
  +{
  +unsigned int from;
  +unsigned int to = 0;
  +unsigned int num = set->count;
  +
  +assert(set->count > 0);
  +
  +if (!sorted)
  + dbiIndexSetSort(set);
  +
  +for (from = 0; from < num; from++) {
  + if (from > 0 && set->recs[from - 1].hdrNum == set->recs[from].hdrNum) {
  + set->count--;
  + continue;
  + }
  + if (from != to)
  + set->recs[to] = set->recs[from]; /* structure assignment */
  + to++;
  +}
  +}
  +
   int dbiIndexSetAppendSet(dbiIndexSet dest, dbiIndexSet src, int sortset)
   {
   if (dest == NULL || src == NULL || src->count == 0)
  @@ -217,70 +270,88 @@
   return 0;
   }
   
  -dbiIndexSet dbiIndexSetFree(dbiIndexSet set)
  +int dbiIndexSetAppend(dbiIndexSet set, dbiIndexItem recs,
  +   unsigned int nrecs, int sortset)
   {
  -if (set) {
  - free(set->recs);
  - free(set);
  -}
  -return NULL;
  -}
  +if (set == NULL || recs == NULL || nrecs == 0)
  + return 1;
   
  -dbiIndexSet dbiIndexSetNew(unsigned int sizehint)
  -{
  -dbiIndexSet set = xcalloc(1, sizeof(*set));
  -if (sizehint > 0)
  - dbiIndexSetGrow(set, sizehint);
  -return set;
  -}
  +dbiIndexSetGrow(set, nrecs);
  +memcpy(set->recs + set->count, recs, nrecs * sizeof(*(set->recs)));
  +set->count += nrecs;
  +
  +if (sortset && set->count > 1)
  + qsort(set->recs, set->count, sizeof(*(set->recs)), hdrNumCmp);
   
  -#define  rpmChrootDone() (0)
  +return 0;
  +}
   
  -RPM_GNUC_PURE
  -const char *rpmdbHome(rpmdb db)
  +int dbiIndexSetPrune(dbiIndexSet set, dbiIndexItem recs,
  +  unsigned int nrecs, int sorted)
   {
  -const char *dbdir = NULL;
  -if (db) {
  -dbdir = rpmChrootDone() ? db->db_home : db->db_fullpath;
  +unsigned int from;
  +unsigned int to = 0;
  +unsigned int num = set->count;
  +unsigned int numCopied = 0;
  +size_t recsize = sizeof(*recs);
  +
  +assert(set->count > 0);
  +if (nrecs > 1 && !sorted)
  + qsort(recs, nrecs, recsize, hdrNumCmp);
  +
  +for (from = 0; from < num; from++) {
  + if (bsearch(>recs[from], recs, nrecs, recsize, hdrNumCmp)) {
  + set->count--;
  + continue;
  + }
  + if (from != to)
  + set->recs[to] = set->recs[from]; /* structure assignment */
  + to++;
  + numCopied++;
   }
  -return dbdir;
  +return (numCopied == num);
   }
   
  -/*==

[CVS] RPM: rpm-5_4: rpm/rpmdb/ lmdb.c

2017-07-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   23-Jul-2017 03:56:17
  Branch: rpm-5_4  Handle: 2017072301561700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   lmdb.c

  Log:
- lmdb: WIP.

  Summary:
RevisionChanges Path
1.1.2.5 +72 -55 rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 lmdb.c
  --- rpm/rpmdb/lmdb.c  22 Jul 2017 21:49:24 -  1.1.2.4
  +++ rpm/rpmdb/lmdb.c  23 Jul 2017 01:56:17 -  1.1.2.5
  @@ -298,6 +298,7 @@
   
   struct lmdbEnv_s {
   MDB_env * env;
  +MDB_txn * txn;
   int refs;
   };
   
  @@ -364,7 +365,7 @@
);
flags |= MDB_FIXEDMAP;
   
  - mode_t mode = 0644;
  + mdb_mode_t mode = 0644;
   
rpmlog(RPMLOG_DEBUG, "opening  db environment %s flags 0x%x mode 
0%o\n", path, flags, mode);
   
  @@ -385,6 +386,7 @@
   
rdb->db_dbenv = lmdbenv = xcalloc(1, sizeof(struct lmdbEnv_s));
lmdbenv->env = env;
  + lmdbenv->txn = NULL;
   SPEW("<-- %s(%p) lmdbenv %p env %p\n", __FUNCTION__, rdb, lmdbenv, 
lmdbenv->env);
   }
   lmdbenv->refs++;
  @@ -414,13 +416,13 @@
   dbiIndex dbi;
   int rc = 1;
   
  +SPEW("--> %s(%p,%p,0x%x)\n", __FUNCTION__, rdb, dbip, flags);
   if (dbip)
*dbip = NULL;
   
   if ((dbi = dbiNew(rdb, rpmtag)) == NULL)
goto exit;
   
  -struct lmdbDbi_s * lmdbdbi = (struct lmdbDbi_s *) xcalloc(1, 
sizeof(*lmdbdbi));
   struct lmdbEnv_s * lmdbenv = openEnv(rdb);
   MDB_env * env = lmdbenv->env;
   char * path;
  @@ -448,7 +450,7 @@
oflags |= MDB_DUPSORT;
   }
   
  -MDB_txn * parent = NULL;
  +MDB_txn * parent = lmdbenv->txn;
   int tflags = (
   #ifdef   REF
MDB_RDONLY |
  @@ -459,6 +461,7 @@
   );
   MDB_txn * txn = NULL;
   rc = mdb_txn_begin(env, parent, tflags, );
  +SPEW("\t rc(%d) mdb_txn_begin(%p,%p,0x%x,) MDB_txn %p\n", rc, env, 
parent, tflags, txn);
   switch (rc) {
   case MDB_SUCCESS:
rc = RPMRC_OK;
  @@ -474,7 +477,9 @@
   if (rc)
goto exit;
   
  -rc = mdb_dbi_open(txn, path, oflags, >dbi);
  +MDB_dbi lmdbdbi_dbi = 0;
  +rc = mdb_dbi_open(txn, path, oflags, _dbi);
  +SPEW("\t rc(%d) mdb_dbi_open(%p,%s,0x%x,) MDB_dbi %u\n", rc, txn, path, 
oflags, lmdbdbi_dbi);
   switch (rc) {
   case MDB_SUCCESS:
rc = RPMRC_OK;
  @@ -489,6 +494,7 @@
goto exit;
   
   rc = mdb_txn_commit(txn);
  +SPEW("\t rc(%d) mdb_txn_commit(%p)\n", rc, txn);
   txn = NULL;
   switch (rc) {
   case MDB_SUCCESS:
  @@ -501,6 +507,9 @@
goto exit;
break;
   }
  +struct lmdbDbi_s * lmdbdbi = (struct lmdbDbi_s *) xcalloc(1, 
sizeof(*lmdbdbi));
  +lmdbdbi->dbi = lmdbdbi_dbi;
  +dbi->dbi_db = lmdbdbi;
   
   dbi->dbi_flags = 0;
   #ifdef   NOTYET
  @@ -522,7 +531,7 @@
dbi = NULL;
   }
   
  -SPEW("<-- %s(%p,%p,0x%x) rc %d dbi %p\n", __FUNCTION__, rdb, dbip, flags, 
rc, dbi);
  +SPEW("<-- %s(%p,%p,0x%x) rc %d dbi %p lmdbdbi %p MDB_dbi %u\n", 
__FUNCTION__, rdb, dbip, flags, rc, dbi, (dbi ? dbi->dbi_db : NULL), (dbi && 
dbi->dbi_db ? ((struct lmdbDbi_s *)dbi->dbi_db)->dbi : 54321));
   return rc;
   }
   
  @@ -1031,10 +1040,10 @@
   {
   poptContext con = rpmioInit(argc, argv, lmdbOptionsTable);
   int ec = 0;
  -MDB_env *env;
  +
   MDB_dbi dbi;
  +
   MDB_val key, data;
  -MDB_txn *txn;
   MDB_stat mst;
   MDB_cursor *cursor, *cur2;
   MDB_cursor_op op;
  @@ -1053,11 +1062,15 @@
   for (i = 0; i < count; i++)
values[i] = rand() % 1024;
   
  -struct lmdbEnv_s * lmdbenv = openEnv(rdb);
  -env = lmdbenv->env;
  -
  -E(mdb_txn_begin(env, NULL, 0, ));
  -E(mdb_dbi_open(txn, NULL, 0, ));
  +dbiIndex __dbi = NULL;
  +rc = lmdb_Open(rdb, RPMDBI_PACKAGES, &__dbi, 0);
  +assert(!rc);
  +struct lmdbEnv_s * lmdbenv = (struct lmdbEnv_s *) rdb->db_dbenv;
  +E(mdb_txn_begin(lmdbenv->env, NULL, 0, >txn));
  +
  +struct lmdbDbi_s * lmdbdbi = (struct lmdbDbi_s *) __dbi->dbi_db;
  +dbi = lmdbdbi->dbi;
  +SPEW("*** %s: MDB_env %p MDB_dbi %u\n", __FUNCTION__, lmdbenv->env, dbi);
   
   key.mv_size = sizeof(int);
   key.mv_data = sval;
  @@ -1069,7 +1082,7 @@
/* Set  in

[CVS] RPM: rpm-5_4: rpm/rpmdb/ lmdb.c

2017-07-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jul-2017 23:49:24
  Branch: rpm-5_4  Handle: 2017072221492400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   lmdb.c

  Log:
- lmdb: WIP.

  Summary:
RevisionChanges Path
1.1.2.4 +128 -28rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 lmdb.c
  --- rpm/rpmdb/lmdb.c  22 Jul 2017 20:11:05 -  1.1.2.3
  +++ rpm/rpmdb/lmdb.c  22 Jul 2017 21:49:24 -  1.1.2.4
  @@ -10,6 +10,10 @@
   #include "debug.h"
   
   static int _debug = -1;
  +#define SPEW(_fmt, ...) \
  +if (_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +
   
   #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
   #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
  @@ -153,9 +157,15 @@
   dbi->dbi_rpmdb = rdb;
   #ifdef   NOTYET
   dbi->dbi_file = rpmTagGetName(rpmtag);
  +#else
  +dbi->dbi_file = "Packages";
   #endif
   dbi->dbi_type = (rpmtag == RPMDBI_PACKAGES) ? DBI_PRIMARY : 
DBI_SECONDARY;
  -dbi->dbi_byteswapped = -1;  /* -1 unknown, 0 native order, 1 alien order 
*/
  +#ifdef   NOTYET
  +dbi->dbi_byteswapped = -1;   /* -1 unknown, 0 native order, 1 alien 
order */
  +#else
  +dbi->dbi_byteswapped = 0;/* -1 unknown, 0 native order, 1 alien 
order */
  +#endif
   return dbi;
   }
   
  @@ -294,6 +304,8 @@
   static void closeEnv(rpmdb rdb)
   {
   struct lmdbEnv_s *lmdbenv = rdb->db_dbenv;
  +SPEW("--> %s(%p) lmdbenv %p env %p\n", __FUNCTION__, rdb, lmdbenv, 
lmdbenv->env);
  +
   if (--lmdbenv->refs <= 0) {
const char *dbhome = rpmdbHome(rdb);
MDB_env * env = (MDB_env *) lmdbenv->env;
  @@ -373,6 +385,7 @@
   
rdb->db_dbenv = lmdbenv = xcalloc(1, sizeof(struct lmdbEnv_s));
lmdbenv->env = env;
  +SPEW("<-- %s(%p) lmdbenv %p env %p\n", __FUNCTION__, rdb, lmdbenv, 
lmdbenv->env);
   }
   lmdbenv->refs++;
   return lmdbenv;
  @@ -380,6 +393,7 @@
   
   static int lmdb_Close(dbiIndex dbi, unsigned int flags)
   {
  +int rc = 0;
   rpmdb rdb = dbi->dbi_rpmdb;
   struct lmdbEnv_s * lmdbenv = rdb->db_dbenv;
   struct lmdbDbi_s * lmdbdbi = (struct lmdbDbi_s *) dbi->dbi_db;
  @@ -389,20 +403,22 @@
   if (rdb->db_dbenv)
closeEnv(rdb);
   dbi->dbi_db = NULL;
  -return 0;
  +SPEW("<-- %s(%p, 0x%x) rc %d\n", __FUNCTION__, dbi, flags, rc);
  +dbi = dbiFree(dbi);
  +return rc;
   }
   
   static int lmdb_Open(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int 
flags)
   {
   const char *dbhome = rpmdbHome(rdb);
   dbiIndex dbi;
  -int rc = -1;
  +int rc = 1;
   
   if (dbip)
*dbip = NULL;
   
   if ((dbi = dbiNew(rdb, rpmtag)) == NULL)
  - return 1;
  + goto exit;
   
   struct lmdbDbi_s * lmdbdbi = (struct lmdbDbi_s *) xcalloc(1, 
sizeof(*lmdbdbi));
   struct lmdbEnv_s * lmdbenv = openEnv(rdb);
  @@ -456,7 +472,7 @@
break;
   }
   if (rc)
  - return rc;
  + goto exit;
   
   rc = mdb_dbi_open(txn, path, oflags, >dbi);
   switch (rc) {
  @@ -470,28 +486,63 @@
break;
   }
   if (rc)
  - return rc;
  + goto exit;
   
  -if (dbip != NULL)
  +rc = mdb_txn_commit(txn);
  +txn = NULL;
  +switch (rc) {
  +case MDB_SUCCESS:
  + break;
  +case EINVAL:
  +case ENOSPC:
  +case EIO:
  +case ENOMEM:
  +default:
  + goto exit;
  + break;
  +}
  +
  +dbi->dbi_flags = 0;
  +#ifdef   NOTYET
  +if (oflags & DB_CREATE)
  + dbi->dbi_flags |= DBI_CREATED;
  +if (oflags & DB_RDONLY)
  + dbi->dbi_flags |= DBI_RDONLY;
  +#endif
  +
  +exit:
  +if (rc == 0 && dbip != NULL)
*dbip = dbi;
  -else
  - lmdb_Close(dbi, 0);
  +else {
  + if (txn)
  + mdb_txn_abort(txn);
  + txn = NULL;
  + if (dbi)
  + lmdb_Close(dbi, 0);
  + dbi = NULL;
  +}
   
  +SPEW("<-- %s(%p,%p,0x%x) rc %d dbi %p\n", __FUNCTION__, rdb, dbip, flags, 
rc, dbi);
   return rc;
   }
   
   static int lmdb_Verify(dbiIndex dbi, unsigned int flags)
   {
  -return 1;
  +int rc = 1;
  +SPEW("<-- %s(%p,0x%x) rc %d\n", __FUNCTION__, dbi, flags, rc);
  +return rc;
   }
   
   static

[CVS] RPM: rpm-5_4: rpm/rpmdb/ lmdb.c

2017-07-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jul-2017 22:11:05
  Branch: rpm-5_4  Handle: 2017072220110500

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   lmdb.c

  Log:
- lmdb: WIP.

  Summary:
RevisionChanges Path
1.1.2.3 +391 -365   rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 lmdb.c
  --- rpm/rpmdb/lmdb.c  22 Jul 2017 14:19:33 -  1.1.2.2
  +++ rpm/rpmdb/lmdb.c  22 Jul 2017 20:11:05 -  1.1.2.3
  @@ -55,9 +55,18 @@
   
   struct rpmdbOps_s;
   
  -/** \ingroup rpmdb
  - * Describes the collection of index databases used by rpm.
  - */
  +struct dbiIndex_s {
  +rpmdb dbi_rpmdb;/*!< the parent rpm database */
  +dbiIndexType dbi_type;  /*! Type of dbi (primary / index) */
  +const char * dbi_file;  /*!< file component of path */
  +int dbi_flags;
  +int dbi_byteswapped;
  +
  +struct dbiConfig_s cfg;
  +
  +void * dbi_db;  /*!< Backend private handle */
  +};
  +
   struct rpmdb_s {
   char * db_root;/*!< path prefix */
   char * db_home;/*!< directory path */
  @@ -176,6 +185,37 @@
   }
   }
   
  +/* XXX assumes hdrNum is first int in dbiIndexItem */
  +static int hdrNumCmp(const void * one, const void * two)
  +{
  +const unsigned int * a = one, * b = two;
  +return (*a - *b);
  +}
  +
  +int dbiIndexSetAppendSet(dbiIndexSet dest, dbiIndexSet src, int sortset)
  +{
  +if (dest == NULL || src == NULL || src->count == 0)
  + return 1;
  +
  +dbiIndexSetGrow(dest, src->count);
  +memcpy(dest->recs + dest->count,
  +src->recs, src->count * sizeof(*src->recs));
  +dest->count += src->count;
  +
  +if (sortset && dest->count > 1)
  + qsort(dest->recs, dest->count, sizeof(*(dest->recs)), hdrNumCmp);
  +return 0;
  +}
  +
  +dbiIndexSet dbiIndexSetFree(dbiIndexSet set)
  +{
  +if (set) {
  + free(set->recs);
  + free(set);
  +}
  +return NULL;
  +}
  +
   dbiIndexSet dbiIndexSetNew(unsigned int sizehint)
   {
   dbiIndexSet set = xcalloc(1, sizeof(*set));
  @@ -197,154 +237,7 @@
   }
   
   /*==*/
  -typedef struct rpmpkgdb_s * rpmpkgdb;
  -
  -RPM_GNUC_CONST
  -void rpmpkgClose(rpmpkgdb pkgdb)
  -{
  -}
  -
  -RPM_GNUC_CONST
  -int rpmpkgOpen(rpmpkgdb *pkgdbp, const char *filename, int flags, int mode)
  -{
  -return RPMRC_FAIL;
  -}
  -
  -static int rpmpkgGetLock(rpmpkgdb pkgdb, int type)
  -{
  -#ifdef   NOTYET
  -if (!pkgdb->fd)
  - return RPMRC_FAIL;
  -for (;;) {
  - if (flock(pkgdb->fd, type)) {
  - return RPMRC_FAIL;
  - }
  - if (!is_correct_db(pkgdb)) {
  - if (reopen_db(pkgdb)) {
  - return RPMRC_FAIL;
  - }
  - continue;
  - }
  - break;
  -}
  -#endif
  -return RPMRC_OK;
  -}
  -
  -RPM_GNUC_CONST
  -int rpmpkgLock(rpmpkgdb pkgdb, int excl)
  -{
  -#ifdef   NOTYET
  -unsigned int *lockcntp = excl ? >locked_excl : 
>locked_shared;
  -if (*lockcntp > 0 || (!excl && pkgdb->locked_excl)) {
  - (*lockcntp)++;
  - return RPMRC_OK;
  -}
  -pkgdb->header_ok = 0;
  -if (rpmpkgGetLock(pkgdb, excl ? LOCK_EX : LOCK_SH)) {
  - return RPMRC_FAIL;
  -}
  -(*lockcntp)++;
  -#endif
  -return RPMRC_OK;
  -}
  -
  -RPM_GNUC_CONST
  -int rpmpkgUnlock(rpmpkgdb pkgdb, int excl)
  -{
  -#ifdef   NOTYET
  -unsigned int *lockcntp = excl ? >locked_excl : 
>locked_shared;
  -if (*lockcntp == 0) {
  - return RPMRC_FAIL;
  -}
  -if (*lockcntp > 1 || (!excl && pkgdb->locked_excl)) {
  - (*lockcntp)--;
  - return RPMRC_OK;
  -}
  -if (excl && pkgdb->locked_shared) {
  - /* excl -> shared switch */
  - if (rpmpkgGetLock(pkgdb, LOCK_SH)) {
  - return RPMRC_FAIL;
  - }
  - (*lockcntp)--;
  - return RPMRC_OK;
  -}
  -flock(pkgdb->fd, LOCK_UN);
  -(*lockcntp)--;
  -pkgdb->header_ok = 0;
  -#endif
  -return RPMRC_OK;
  -}
  -
  -RPM_GNUC_CONST
  -int rpmpkgGet(rpmpkgdb pkgdb, unsigned int pkgidx, unsigned char **blobp, 
unsigned int *bloblp)
  -{
  -return RPMRC_FAIL;
  -}
  -
  -RPM_GNUC_CONST
  -int rpmpkgPut(rpmpkgdb pkgdb, unsigned int pkgidx, unsigned char *blob, 
unsigne

[CVS] RPM: rpm-5_4: rpm/rpmdb/ Makefile.am lmdb.c

2017-07-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jul-2017 16:19:33
  Branch: rpm-5_4  Handle: 2017072214193300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   Makefile.am lmdb.c

  Log:
- lmdb: stub-in the rpm.org lib/backend/ndb/glue.c layer.

  Summary:
RevisionChanges Path
1.134.2.38  +6  -0  rpm/rpmdb/Makefile.am
1.1.2.2 +905 -6 rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  
  $ cvs diff -u -r1.134.2.37 -r1.134.2.38 Makefile.am
  --- rpm/rpmdb/Makefile.am 21 Jul 2017 15:14:23 -  1.134.2.37
  +++ rpm/rpmdb/Makefile.am 22 Jul 2017 14:19:33 -  1.134.2.38
  @@ -329,9 +329,15 @@
   logio_SOURCES = logio.c logio.h
   logio_LDADD = $(mylibs)
   
  +lmdb_CFLAGS = -I/X/src/rpm/include -I/X/src/rpm
   lmdb_SOURCES = lmdb.c
   lmdb_LDADD = $(mylibs)
   
  +ltest: lmdb
  + rm -rf testdb && mkdir testdb
  + ./lmdb
  + ls -al testdb
  +
   #libsqldb_la_SOURCES = libsqldb.c # sqlite.c
   #libsqldb_la_LIBADD  = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 lmdb.c
  --- rpm/rpmdb/lmdb.c  21 Jul 2017 15:14:23 -  1.1.2.1
  +++ rpm/rpmdb/lmdb.c  22 Jul 2017 14:19:33 -  1.1.2.2
  @@ -1,16 +1,909 @@
  -#include 
  -#include 
  -#include 
  +#include "system.h"
  +
  +#include 
  +#include 
  +#include 
  +#include 
  +
   #include "lmdb.h"
   
  +#include "debug.h"
  +
  +static int _debug = -1;
  +
   #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
   #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
   #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
"%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
   
  +/*==*/
  +
  +#define H_RPMSW
  +
  +#define _RPMTYPES_H
  +typedef struct headerToken_s * Header;
  +typedef int32_t rpm_tag_t;
  +typedef uint32_trpm_tagtype_t;
  +typedef uint32_trpm_count_t;
  +typedef rpm_tag_t   rpmTagVal;
  +
  +typedef struct rpmts_s * rpmts;
  +typedef  void *  rpmDbiTag;
  +
  +typedef rpm_tag_t   rpmDbiTagVal;
  +
  +typedef struct dbiIndex_s * dbiIndex;
  +typedef struct dbiCursor_s * dbiCursor;
  +typedef struct dbiIndexSet_s * dbiIndexSet;
  +
  +typedef struct rpmdb_s * rpmdb;
  +
  +#ifdef   REFERENCE
  +struct dbConfig_s {
  +int  db_mmapsize;/*!< (10Mb) */
  +int  db_cachesize;   /*!< (128Kb) */
  +int  db_verbose;
  +int  db_no_fsync;/*!< no-op fsync for db */
  +int db_eflags;   /*!< obsolete */
  +};
  +
  +struct dbiConfig_s {
  +int  dbi_oflags; /*!< open flags */
  +int  dbi_no_dbsync;  /*!< don't call dbiSync */
  +int  dbi_lockdbfd;   /*!< do fcntl lock on db fd */
  +};
  +
  +struct rpmdbOps_s;
  +
  +/** \ingroup rpmdb
  + * Describes the collection of index databases used by rpm.
  + */
  +struct rpmdb_s {
  +char * db_root;/*!< path prefix */
  +char * db_home;/*!< directory path */
  +char * db_fullpath;  /*!< full db path including prefix */
  +int  db_flags;
  +int  db_mode;/*!< open mode */
  +int  db_perms;   /*!< open permissions */
  +char * db_descr; /*!< db backend description (for error msgs) */
  +struct dbChk_s * db_checked;/*!< headerCheck()'ed package instances */
  +rpmdbdb_next;
  +int  db_opens;
  +dbiIndex db_pkgs;/*!< Package db */
  +const rpmDbiTag * db_tags;
  +int  db_ndbi;/*!< No. of tag indices. */
  +dbiIndex * db_indexes;   /*!< Tag indices. */
  +int  db_buildindex;  /*!< Index rebuild indicator */
  +
  +struct rpmdbOps_s * db_ops;  /*!< backend ops */
  +
  +/* dbenv and related parameters */
  +void * db_dbenv; /*!< Backend private handle */
  +struct dbConfig_s cfg;
  +int db_remove_env;
  +
  +struct rpmop_s db_getops;
  +struct rpmop_s db_putops;
  +struct rpmop_s db_delops;
  +
  +int nrefs;   /*!< Reference count. */
  +};
  +#endif   /* R

[CVS] RPM: rpm-5_4: rpm/rpmdb/ .cvsignore Makefile.am lmdb.c

2017-07-21 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   21-Jul-2017 17:14:23
  Branch: rpm-5_4  Handle: 2017072115142300

  Added files:  (Branch: rpm-5_4)
rpm/rpmdb   lmdb.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   .cvsignore Makefile.am

  Log:
- lmdb: swipe mtest.c.

  Summary:
RevisionChanges Path
1.17.4.6+2  -0  rpm/rpmdb/.cvsignore
1.134.2.37  +4  -1  rpm/rpmdb/Makefile.am
1.1.2.1 +164 -0 rpm/rpmdb/lmdb.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/.cvsignore
  
  $ cvs diff -u -r1.17.4.5 -r1.17.4.6 .cvsignore
  --- rpm/rpmdb/.cvsignore  16 Jul 2017 18:59:15 -  1.17.4.5
  +++ rpm/rpmdb/.cvsignore  21 Jul 2017 15:14:23 -  1.17.4.6
  @@ -30,6 +30,8 @@
   tqf.[ch]
   HOME
   rpmdb
  +testdb
  +lmdb
   .libs
   *.gcda
   *.gcno
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  
  $ cvs diff -u -r1.134.2.36 -r1.134.2.37 Makefile.am
  --- rpm/rpmdb/Makefile.am 25 Jun 2016 08:32:58 -  1.134.2.36
  +++ rpm/rpmdb/Makefile.am 21 Jul 2017 15:14:23 -  1.134.2.37
  @@ -37,7 +37,7 @@
logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
_rpmhash.C _rpmhash.H
   
  -EXTRA_PROGRAMS = json qfcalc qfgraph logio tjfn tqf tprintf # tbdb
  +EXTRA_PROGRAMS = json qfcalc qfgraph logio tjfn tqf tprintf lmdb # tbdb
   noinst_PROGRAMS =
   
   RPMMISC_LDADD_COMMON = \
  @@ -329,6 +329,9 @@
   logio_SOURCES = logio.c logio.h
   logio_LDADD = $(mylibs)
   
  +lmdb_SOURCES = lmdb.c
  +lmdb_LDADD = $(mylibs)
  +
   #libsqldb_la_SOURCES = libsqldb.c # sqlite.c
   #libsqldb_la_LIBADD  = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/lmdb.c
  
  $ cvs diff -u -r0 -r1.1.2.1 lmdb.c
  --- /dev/null 2017-07-21 17:11:00.0 +0200
  +++ lmdb.c2017-07-21 17:14:23.819135311 +0200
  @@ -0,0 +1,164 @@
  +#include 
  +#include 
  +#include 
  +#include "lmdb.h"
  +
  +#define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
  +#define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
  +#define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
  + "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
  +
  +int main(int argc, char *argv[])
  +{
  +int i = 0, j = 0, rc;
  +MDB_env *env;
  +MDB_dbi dbi;
  +MDB_val key, data;
  +MDB_txn *txn;
  +MDB_stat mst;
  +MDB_cursor *cursor, *cur2;
  +MDB_cursor_op op;
  +int count;
  +int *values;
  +char sval[32] = "";
  +
  +srand(time(NULL));
  +
  +count = (rand() % 384) + 64;
  +values = (int *) malloc(count * sizeof(int));
  +
  +for (i = 0; i < count; i++)
  + values[i] = rand() % 1024;
  +
  +E(mdb_env_create());
  +E(mdb_env_set_maxreaders(env, 1));
  +E(mdb_env_set_mapsize(env, 10485760));
  +E(mdb_env_open(env, "./testdb", MDB_FIXEDMAP /*|MDB_NOSYNC */ , 0664));
  +
  +E(mdb_txn_begin(env, NULL, 0, ));
  +E(mdb_dbi_open(txn, NULL, 0, ));
  +
  +key.mv_size = sizeof(int);
  +key.mv_data = sval;
  +
  +printf("Adding %d values\n", count);
  +for (i = 0; i < count; i++) {
  + sprintf(sval, "%03x %d foo bar", values[i], values[i]);
  + /* Set  in each iteration, since MDB_NOOVERWRITE may modify it */
  + data.mv_size = sizeof(sval);
  + data.mv_data = sval;
  + if (RES(MDB_KEYEXIST, mdb_put(txn, dbi, , , MDB_NOOVERWRITE))) 
{
  + j++;
  + data.mv_size = sizeof(sval);
  + data.mv_data = sval;
  + }
  +}
  +if (j)
  + printf("%d duplicates skipped\n", j);
  +E(mdb_txn_commit(txn));
  +E(mdb_env_stat(env, ));
  +
  +E(mdb_txn_begin(env, NULL, MDB_RDONLY, ));
  +E(mdb_cursor_open(txn, dbi, ));
  +while ((rc = mdb_cursor_get(cursor, , , MDB_NEXT)) == 0) {
  + printf("key: %p %.*s, data: %p %.*s\n",
  +key.mv_data, (int) key.mv_size, (char *) key.mv_data,
  +data.mv_data, (int) data.mv_size, (char *) data.mv_data);
  +}
  +CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
  +mdb_cursor_close(cursor);
  +mdb_txn_abort(txn);
  +
  +j = 0;
  +key.mv_data = sval;
  +for (i = count - 1; i > -1; i -= (rand() % 5))

[CVS] RPM: rpm-5_4: rpm/ CHANGES autogen.sh configure.ac devtool.conf ...

2017-07-20 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   21-Jul-2017 05:09:44
  Branch: rpm-5_4  Handle: 2017072103094301

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES autogen.sh configure.ac devtool.conf
rpm/miscMakefile.am

  Log:
- lmdb: stub in AutoFU detection.

  Summary:
RevisionChanges Path
1.3501.2.587+1  -0  rpm/CHANGES
2.110.2.21  +7  -1  rpm/autogen.sh
2.472.2.182 +87 -0  rpm/configure.ac
2.365.2.116 +14 -1  rpm/devtool.conf
1.56.2.20   +2  -0  rpm/misc/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.586 -r1.3501.2.587 CHANGES
  --- rpm/CHANGES   20 Jul 2017 12:20:12 -  1.3501.2.586
  +++ rpm/CHANGES   21 Jul 2017 03:09:43 -  1.3501.2.587
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: lmdb: stub in AutoFU detection.
   - jbj: lzo: stub in AutoFU detection.
   - jbj: rpmjs: resurrect mozjs on CentOS7.
   - jbj: zstd: fix: handle read/decompress EOF correctly.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/autogen.sh
  
  $ cvs diff -u -r2.110.2.20 -r2.110.2.21 autogen.sh
  --- rpm/autogen.sh20 Jul 2017 12:20:13 -  2.110.2.20
  +++ rpm/autogen.sh21 Jul 2017 03:09:44 -  2.110.2.21
  @@ -1349,7 +1349,7 @@
   
   gnulib_tool=.gnulib/gnulib-tool
   
  -for dir in .gnulib bash beecrypt brotli file flatcc gpsee libtpm libgit2 lz4 
lzfse neon pcre popt rc snappy syck xar xz zstd; do
  +for dir in .gnulib bash beecrypt brotli file flatcc gpsee libtpm libgit2 
lmdb lz4 lzfse neon pcre popt rc snappy syck xar xz zstd; do
   
 [ -d $dir ] || continue
 echo "===> $dir"
  @@ -1381,6 +1381,12 @@
#ln -sf ../libflatccrt.a lib/.libs/libflatccrt.a
   )
   ;;
  +  lmdb)
  +( cd $dir/libraries/liblmdb &&
  + echo "check: test" >> Makefile &&
  + echo "distclean: clean" >> Makefile
  +)
  +;;
 zstd)
   ;;
 lz4)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.181 -r2.472.2.182 configure.ac
  --- rpm/configure.ac  20 Jul 2017 12:20:13 -  2.472.2.181
  +++ rpm/configure.ac  21 Jul 2017 03:09:44 -  2.472.2.182
  @@ -2596,6 +2596,10 @@
   [lzo2], [lzo_version], [lzoconf.h],
   [no,internal:external:none], [lzo],
   [
  +  if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
  +  AC_DEFINE(HAVE_LZOCONF_H, 1, [Have  header?])
  +  AC_DEFINE(HAVE_LIBLZO2, 1, [Have -llzo2 library?])
  +  else
AC_CHECK_FUNCS(lzo1_99_compress)
AC_CHECK_FUNCS(lzo1a_99_compress)
AC_CHECK_FUNCS(lzo1a_compress)
  @@ -2694,6 +2698,7 @@
AC_CHECK_FUNCS(lzo_version_date)
AC_CHECK_FUNCS(_lzo_version_string)
AC_CHECK_FUNCS(lzo_version_string)
  +  fi
 HAVE_RPM_COMPRESSION=yes 
   ], [])
   
  @@ -3869,6 +3874,88 @@
   dnl ])
   AC_SUBST(DBAPI)
   
  +dnl # LMDB
  +RPM_CHECK_LIB(
  +[LMDB], [lmdb],
  +[lmdb], [mdb_env_open], [lmdb.h],
  +[no,internal:external:none], [lmdb/libraries/liblmdb],
  +[
  +  if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
  +  AC_DEFINE(HAVE_LMDB_H, 1, [Have  header?])
  +  AC_DEFINE(HAVE_LIBLMDB, 1, [Have -llmdb library?])
  +  else
  +AC_CHECK_FUNCS(mdb_cmp)
  +AC_CHECK_FUNCS(mdb_cursor_close)
  +AC_CHECK_FUNCS(mdb_cursor_count)
  +AC_CHECK_FUNCS(mdb_cursor_dbi)
  +AC_CHECK_FUNCS(mdb_cursor_del)
  +AC_CHECK_FUNCS(mdb_cursor_get)
  +AC_CHECK_FUNCS(mdb_cursor_open)
  +AC_CHECK_FUNCS(mdb_cursor_put)
  +AC_CHECK_FUNCS(mdb_cursor_renew)
  +AC_CHECK_FUNCS(mdb_cursor_txn)
  +AC_CHECK_FUNCS(mdb_dbi_close)
  +AC_CHECK_FUNCS(mdb_dbi_flags)
  +AC_CHECK_FUNCS(mdb_dbi_open)
  +AC_CHECK_FUNCS(mdb_dcmp)
  +AC_CHECK_FUNCS(mdb_del)
  +AC_CHECK_FUNCS(mdb_drop)
  +AC_CHECK_FUNCS(mdb_env_close)
  +AC_CHECK_FUNCS(mdb_env_copy)
  +AC_CHECK_FUNCS(mdb_env_copy2)
  +AC_CHECK_FUNCS(mdb_env_copyfd)
  +AC_CHECK_FUNCS(mdb_env_copyfd2)
  +AC_CHECK_FUNCS(mdb_env_create)
  +AC_CHECK_FUNCS(mdb_env

[CVS] RPM: rpm-5_4: rpm/ CHANGES Makefile.am autogen.sh configure.ac d...

2017-07-20 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   20-Jul-2017 14:20:14
  Branch: rpm-5_4  Handle: 2017072012201202

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmjs45shim.cpp
  Modified files:   (Branch: rpm-5_4)
rpm CHANGES Makefile.am autogen.sh configure.ac
devtool.conf
rpm/js  rpmjs45shim.cpp
rpm/js/src  js-confdefs.h js45shim.cpp
rpm/miscMakefile.am
rpm/rpmio   Makefile.am macro.c

  Log:
- lzo: stub in AutoFU detection.
- rpmjs: resurrect mozjs on CentOS7.

  Summary:
RevisionChanges Path
1.3501.2.586+2  -0  rpm/CHANGES
2.263.2.49  +9  -1  rpm/Makefile.am
2.110.2.20  +2  -0  rpm/autogen.sh
2.472.2.181 +111 -1 rpm/configure.ac
2.365.2.115 +33 -10 rpm/devtool.conf
1.1.2.3 +3  -0  rpm/js/rpmjs45shim.cpp
1.1.2.2 +1  -0  rpm/js/src/js-confdefs.h
1.1.2.2 +3  -0  rpm/js/src/js45shim.cpp
1.56.2.19   +2  -0  rpm/misc/Makefile.am
1.293.2.107 +8  -7  rpm/rpmio/Makefile.am
2.249.2.50  +5  -2  rpm/rpmio/macro.c
1.1.2.1 +29 -0  rpm/rpmio/rpmjs45shim.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.585 -r1.3501.2.586 CHANGES
  --- rpm/CHANGES   16 Jul 2017 13:46:46 -  1.3501.2.585
  +++ rpm/CHANGES   20 Jul 2017 12:20:12 -  1.3501.2.586
  @@ -1,4 +1,6 @@
   5.4.17 -> 5.4.18:
  +- jbj: lzo: stub in AutoFU detection.
  +- jbj: rpmjs: resurrect mozjs on CentOS7.
   - jbj: zstd: fix: handle read/decompress EOF correctly.
   - jbj: bdb: upgrade to db-6.2.32.
   - jbj: i18n: update PO files (Translation Project).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  
  $ cvs diff -u -r2.263.2.48 -r2.263.2.49 Makefile.am
  --- rpm/Makefile.am   16 Jul 2017 18:15:41 -  2.263.2.48
  +++ rpm/Makefile.am   20 Jul 2017 12:20:13 -  2.263.2.49
  @@ -48,7 +48,7 @@
   --with-attr \
   --with-acl \
   --without-xar \
  ---with-popt=external \
  +--with-popt=internal \
   --with-keyutils \
   --with-pthreads \
   --with-libelf \
  @@ -106,7 +106,14 @@
$(srcdir)/js/rpmjsfile.msg \
$(srcdir)/js/v8.cc \
$(srcdir)/js/*.[ch] \
  + $(srcdir)/js/*.cpp \
  + $(srcdir)/js/*.sh \
$(srcdir)/js/tscripts/*.js \
  + $(srcdir)/js/src/Makefile.* \
  + $(srcdir)/js/src/*.[ch] \
  + $(srcdir)/js/src/*.cpp \
  + $(srcdir)/js/src/*.inp \
  + $(srcdir)/js/src/shell/*.cpp \
$(srcdir)/lua/COPYRIGHT \
$(srcdir)/lua/HISTORY \
$(srcdir)/lua/Makefile.* \
  @@ -188,6 +195,7 @@
@WITH_ZLIB_SUBDIR@ \
@WITH_ZSTD_SUBDIR@ \
@WITH_LZ4_SUBDIR@ \
  + @WITH_LZO_SUBDIR@ \
@WITH_SNAPPY_SUBDIR@ \
@WITH_BROTLI_SUBDIR@ \
@WITH_LZFSE_SUBDIR@ \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/autogen.sh
  
  $ cvs diff -u -r2.110.2.19 -r2.110.2.20 autogen.sh
  --- rpm/autogen.sh16 Jul 2017 18:15:41 -  2.110.2.19
  +++ rpm/autogen.sh20 Jul 2017 12:20:13 -  2.110.2.20
  @@ -1385,6 +1385,8 @@
   ;;
 lz4)
   ;;
  +  lzo)
  +;;
 snappy)
   ( cd $dir && sh ./autogen.sh )
   ;;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.180 -r2.472.2.181 configure.ac
  --- rpm/configure.ac  16 Jul 2017 19:07:02 -  2.472.2.180
  +++ rpm/configure.ac  20 Jul 2017 12:20:13 -  2.472.2.181
  @@ -2433,6 +2433,7 @@
   AC_CHECK_FUNCS(BrotliDecoderSetParameter)
   AC_CHECK_FUNCS(BrotliDecoderTakeOutput)
   AC_CHECK_FUNCS(BrotliDecoderVersion)
  +  HAVE_RPM_COMPRESSION=yes 
   ], [])
   
   dnl # Google Snappy
  @@ -2446,6 +2447,7 @@
   AC_CHECK_FUNCS(snappy_uncompress)
   AC_CHECK_FUNCS(snappy_uncompressed_length)
   AC_CHECK_FUNCS(snappy_validate_compressed_buffer)
  +  HAVE_RPM_COMPRESSION=yes 
   ], [])
   
   dnl # Apple Lzfse
  @@ -2473,6 +2475,7 @@
   AC_CHECK_FUNCS(lzvn_encode)
   AC_CHECK_FUNCS(lzvn_encode_buffer)
   AC_C

[CVS] RPM: rpm-5_4: rpm/ configure.ac

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 21:07:02
  Branch: rpm-5_4  Handle: 2017071619070200

  Modified files:   (Branch: rpm-5_4)
rpm configure.ac

  Log:
- autofu: update timestamp.

  Summary:
RevisionChanges Path
2.472.2.180 +1  -1  rpm/configure.ac
  

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.179 -r2.472.2.180 configure.ac
  --- rpm/configure.ac  16 Jul 2017 18:15:41 -  2.472.2.179
  +++ rpm/configure.ac  16 Jul 2017 19:07:02 -  2.472.2.180
  @@ -9,7 +9,7 @@
   AC_PREREQ([2.63])
   m4_define([PACKAGE_BUGREPORT_DEFAULT], [rpm-de...@rpm5.org])
   AC_INIT([rpm],[5.4.18],[PACKAGE_BUGREPORT_DEFAULT])
  -PACKAGE_TIMESTAMP="2016-05-12" dnl # [-MM[-DD[ HH[:MM
  +PACKAGE_TIMESTAMP="2017-07-16" dnl # [-MM[-DD[ HH[:MM
   AC_MSG_TITLE([RPM Package Manager (RPM)], [$PACKAGE_VERSION])
   
   AC_MSG_HEADER([INITIALIZATION])
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ .cvsignore Makefile.am manifest.c rpminst...

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 21:05:29
  Branch: rpm-5_4  Handle: 2017071619052800

  Modified files:   (Branch: rpm-5_4)
rpm/lib .cvsignore Makefile.am manifest.c rpminstall.c

  Log:
- sanity.

  Summary:
RevisionChanges Path
1.15.4.4+1  -1  rpm/lib/.cvsignore
2.203.2.20  +1  -1  rpm/lib/Makefile.am
2.26.6.4+3  -1  rpm/lib/manifest.c
1.229.2.10  +11 -2  rpm/lib/rpminstall.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/.cvsignore
  
  $ cvs diff -u -r1.15.4.3 -r1.15.4.4 .cvsignore
  --- rpm/lib/.cvsignore4 Mar 2017 19:32:39 -   1.15.4.3
  +++ rpm/lib/.cvsignore16 Jul 2017 19:05:28 -  1.15.4.4
  @@ -21,7 +21,7 @@
   *_json_printer.h
   *_reader.h
   *_verifier.h
  +rpmtag_builder.h.E
   popt-1.14-1.i386.rpm
   tmp
   thdr
  -
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/Makefile.am
  
  $ cvs diff -u -r2.203.2.19 -r2.203.2.20 Makefile.am
  --- rpm/lib/Makefile.am   4 Mar 2017 19:33:58 -   2.203.2.19
  +++ rpm/lib/Makefile.am   16 Jul 2017 19:05:28 -  2.203.2.20
  @@ -178,7 +178,7 @@
rpmtag_json_parser.h \
rpmtag.fbs.d \
rpmtag.bfbs
  -BUILT_SOURCES += $(FLATCC_RPMTAG_FILES)
  +#BUILT_SOURCES += $(FLATCC_RPMTAG_FILES)
   $(FLATCC_RPMTAG_FILES): $(top_srcdir)/rpmdb/rpmtag.fbs
$(FLATCC) $<
$(CPP) $@ > $@.E
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/manifest.c
  
  $ cvs diff -u -r2.26.6.3 -r2.26.6.4 manifest.c
  --- rpm/lib/manifest.c16 May 2017 18:29:10 -  2.26.6.3
  +++ rpm/lib/manifest.c16 Jul 2017 19:05:28 -  2.26.6.4
  @@ -169,7 +169,9 @@
nav = NULL;
for (i = 0; i < ac; i++) {
struct stat sb, *st = 
  - if (Stat(av[i], st) == 0 && S_ISREG(st->st_mode) && st->st_size > 
0) {
  + int xx = Stat(av[i], st);
  + /* XXX FIXME: st->st_size > 0, but st->st_size == -1 for URL's. */
  + if (xx == 0 && S_ISREG(st->st_mode) && st->st_size != 0) {
if (nav == NULL)
rpmlog(RPMLOG_DEBUG, "=== %s\n", fdGetOPath(xfd));
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  
  $ cvs diff -u -r1.229.2.9 -r1.229.2.10 rpminstall.c
  --- rpm/lib/rpminstall.c  9 Jun 2017 04:39:11 -   1.229.2.9
  +++ rpm/lib/rpminstall.c  16 Jul 2017 19:05:28 -  1.229.2.10
  @@ -6,6 +6,7 @@
   
   #include 
   #include 
  +#include 
   #include 
   
   #include 
  @@ -122,17 +123,18 @@
   void * rc = NULL;
   const char * filename = (const char *)key;
   static FD_t fd = NULL;
  +urltype ut;
   int xx;
   
   switch (what) {
   case RPMCALLBACK_INST_OPEN_FILE:
if (filename == NULL || filename[0] == '\0')
return NULL;
  + ut = urlPath(filename, NULL);
fd = Fopen(filename, "r%{?_rpmgio}");
   
/* XXX Retry once to handle http:// server timeout reopen's. */
if (Ferror(fd)) {
  - int ut = urlPath(filename, NULL);
if (ut == URL_IS_HTTP || ut == URL_IS_HTTPS) {
/* XXX HACK: Fclose(fd) no workie here. */
fd = Fopen(filename, "r%{?_rpmgio}");
  @@ -150,7 +152,14 @@
fd = fdLink(fd, "persist (showProgress)");
   
   #if defined(POSIX_FADV_WILLNEED)
  - (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);
  + switch (ut) {
  + default:
  + break;
  + case URL_IS_PATH:
  + case URL_IS_UNKNOWN:
  + (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);
  + break;
  + }
   #endif
   
return (void *)fd;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmmqtt.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 21:04:28
  Branch: rpm-5_4  Handle: 2017071619042800

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmmqtt.c

  Log:
- mqtt: cut-n-paste error.

  Summary:
RevisionChanges Path
1.1.2.30+10 -1  rpm/rpmio/rpmmqtt.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmmqtt.c
  
  $ cvs diff -u -r1.1.2.29 -r1.1.2.30 rpmmqtt.c
  --- rpm/rpmio/rpmmqtt.c   26 May 2017 20:49:23 -  1.1.2.29
  +++ rpm/rpmio/rpmmqtt.c   16 Jul 2017 19:04:28 -  1.1.2.30
  @@ -6,6 +6,7 @@
   
   #include 
   #include 
  +#include 
   #include 
   
   #define  _RPMIOB_INTERNAL/* for rpmiobSlurp */
  @@ -2748,10 +2749,18 @@
   _ENTRY(TIMER_FAILURE),
   _ENTRY(HEARTBEAT_TIMEOUT),
   _ENTRY(UNEXPECTED_STATE),
  +#if defined(AMQP_SOCKET_CLOSED)
   _ENTRY(SOCKET_CLOSED),
  +#endif
  +#if defined(AMQP_SOCKET_INUSE)
   _ENTRY(SOCKET_INUSE),
  +#endif
  +#if defined(AMQP_UNSUPPORTED_SASL_METHOD)
   _ENTRY(BROKER_UNSUPPORTED_SASL_METHOD),
  +#endif
  +#if defined(AMQP_UNSUPPORTED)
   _ENTRY(UNSUPPORTED),
  +#endif
   _ENTRY(TCP_ERROR),
   _ENTRY(TCP_SOCKETLIB_INIT_ERROR),
   _ENTRY(SSL_ERROR),
  @@ -3985,7 +3994,7 @@
if (ntopics <= 0)
rc = rpmmqttPub(mqtt, topic, s, ns);
else
  - for (int k = 0; j < ntopics; j++) {
  + for (int k = 0; k < ntopics; k++) {
topic = topics[k];
rc = rpmmqttPub(mqtt, topic, s, ns);
if (rc)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ .cvsignore rpm/m4/ .cvsignore rpm/rpmdb/ .cvs...

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 20:59:15
  Branch: rpm-5_4  Handle: 2017071618591500

  Modified files:   (Branch: rpm-5_4)
rpm .cvsignore
rpm/m4  .cvsignore
rpm/rpmdb   .cvsignore

  Log:
- ignore cruft.

  Summary:
RevisionChanges Path
1.40.2.11   +6  -0  rpm/.cvsignore
1.1.8.6 +104 -33rpm/m4/.cvsignore
1.17.4.5+5  -0  rpm/rpmdb/.cvsignore
  

  patch -p0 <<'@@ .'
  Index: rpm/.cvsignore
  
  $ cvs diff -u -r1.40.2.10 -r1.40.2.11 .cvsignore
  --- rpm/.cvsignore16 Jan 2017 18:58:06 -  1.40.2.10
  +++ rpm/.cvsignore16 Jul 2017 18:59:15 -  1.40.2.11
  @@ -16,6 +16,8 @@
   aclocal.m4
   autom4te*
   apidocs
  +brotli
  +build-aux
   compile
   config.cache
   config.guess
  @@ -44,6 +46,8 @@
   libtool
   ltconfig
   ltmain.sh
  +lz4
  +lzfse
   m4
   macros
   macros-*
  @@ -60,12 +64,14 @@
   rpmconvert
   rpmpopt*
   rpmrc
  +snappy
   stamp-h*
   rpm-scan.tgz
   rpm-*.tar.gz
   rpm-*.tar.gz.asc
   test-driver
   ylwrap
  +zstd
   .git
   .gitignore
   *.gcda
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/m4/.cvsignore
  
  $ cvs diff -u -r1.1.8.5 -r1.1.8.6 .cvsignore
  --- rpm/m4/.cvsignore 17 Apr 2017 18:21:53 -  1.1.8.5
  +++ rpm/m4/.cvsignore 16 Jul 2017 18:59:15 -  1.1.8.6
  @@ -7,69 +7,140 @@
   gnulib-tool.m4
   msvc-inval.m4
   msvc-nothrow.m4
  -libtool.m4
  -ltoptions.m4
  -ltsugar.m4
  -ltversion.m4
  -lt~obsolete.m4
  -relocatable-lib.m4
  -ld-output-def.m4
  -ld-version-script.m4
  -include_next.m4
  -off_t.m4
  -ssize_t.m4
  -sys_types_h.m4
  +alloca.m4
  +arpa_inet_h.m4
  +assert_h.m4
  +close.m4
  +codeset.m4
  +ctype.m4
  +dirent_h.m4
  +dup2.m4
  +dup.m4
  +eealloc.m4
  +environ.m4
  +errno_h.m4
   extensions.m4
   extern-inline.m4
  -inttypes-pri.m4
  -inttypes.m4
  -longlong.m4
  -multiarch.m4
  -stdalign.m4
  -stdbool.m4
  -stddef_h.m4
  -stdint.m4
  -stdlib_h.m4
  -unistd_h.m4
  -warn-on-use.m4
  -wchar_h.m4
  -wchar_t.m4
  -wint_t.m4
  -dup.m4
  +fcntl_h.m4
   fcntl.m4
  +fcntl-o.m4
  +fdopen.m4
   flock.m4
  +fstat.m4
   fsync.m4
   ftruncate.m4
  +getcwd.m4
  +getdtablesize.m4
   gethostname.m4
  +getopt.m4
  +gettext.m4
  +gettimeofday.m4
  +glibc21.m4
  +glibc2.m4
  +iconv.m4
  +include_next.m4
   inet_pton.m4
  +intdiv0.m4
  +intldir.m4
  +intl.m4
  +intlmacosx.m4
  +intmax.m4
  +inttypes_h.m4
  +inttypes.m4
  +inttypes-pri.m4
   ioctl.m4
   isatty.m4
  +isblank.m4
  +largefile.m4
  +lcmessage.m4
  +ld-output-def.m4
  +ld-version-script.m4
   lib-ld.m4
   lib-link.m4
   lib-prefix.m4
  +libtool.m4
  +limits-h.m4
  +locale_h.m4
  +localtime-buffer.m4
   lock.m4
  +longlong.m4
   lseek.m4
  +lstat.m4
  +lt~obsolete.m4
  +ltoptions.m4
  +ltsugar.m4
  +ltversion.m4
  +malloca.m4
  +malloc.m4
  +mode_t.m4
  +multiarch.m4
  +netdb_h.m4
  +netinet_in_h.m4
  +nls.m4
  +nocrash.m4
  +off_t.m4
  +open.m4
  +pathmax.m4
   perror.m4
   pipe.m4
  -poll.m4
   poll_h.m4
  +poll.m4
  +po.m4
  +printf-posix.m4
  +progtest.m4
  +pthread_rwlock_rdlock.m4
  +putenv.m4
   raise.m4
   read.m4
  +realloc.m4
  +relocatable-lib.m4
  +secure_getenv.m4
   select.m4
  +setenv.m4
   signalblocking.m4
  +signal_h.m4
  +size_max.m4
   sleep.m4
   socketlib.m4
   sockets.m4
  +socklen.m4
  +sockpfaf.m4
  +ssize_t.m4
  +stat.m4
  +stdalign.m4
  +stdbool.m4
  +stddef_h.m4
  +stdint_h.m4
  +stdint.m4
  +stdio_h.m4
  +stdlib_h.m4
  +stpcpy.m4
  +stpncpy.m4
   strerror.m4
   strerror_r.m4
  +string_h.m4
  +symlink.m4
   sys_file_h.m4
   sys_ioctl_h.m4
   sys_select_h.m4
  -thread.m4
  +sys_socket_h.m4
  +sys_stat_h.m4
  +sys_time_h.m4
  +sys_types_h.m4
  +sys_uio_h.m4
  +sys_utsname_h.m4
  +sys_wait_h.m4
   threadlib.m4
  +thread.m4
  +time_h.m4
  +uintmax_t.m4
  +unistd_h.m4
  +usleep.m4
  +visibility.m4
  +warn-on-use.m4
  +wchar_h.m4
  +wchar_t.m4
  +wint_t.m4
   write.m4
  +xsize.m4
   yield.m4
  -isblank.m4
  -limits-h.m4
  -pthread_rwlock_rdlock.m4
  -usleep.m4
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/.cvsignore
  
  $ cvs diff -u -r1.17.4.4 -r1.17.4.5 .cvsignore
  --- rpm/rpmdb/.cvsignore  25 May 2015 21:31:47 -  1.17.4.4
  +++ rpm/rpmdb/.cvsignore  16 Jul 2017 18:59:15 -  1.17.4.5
  @@ -9,9 +9,14 @@
   Tscanner.*
   bdb.c
   bdb.h
  +Jgrammar.output
   Jgrammar.[ch]
   Jscanner.[ch]

[CVS] RPM: rpm-5_4: rpm/lib/ rpmgi.c rpmgi.h

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 20:54:19
  Branch: rpm-5_4  Handle: 2017071618541900

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmgi.c rpmgi.h

  Log:
- rpmgi: use macro __VA_ARGS__.

  Summary:
RevisionChanges Path
2.75.2.18   +24 -20 rpm/lib/rpmgi.c
2.33.4.4+1  -0  rpm/lib/rpmgi.h
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmgi.c
  
  $ cvs diff -u -r2.75.2.17 -r2.75.2.18 rpmgi.c
  --- rpm/lib/rpmgi.c   26 May 2017 20:49:25 -  2.75.2.17
  +++ rpm/lib/rpmgi.c   16 Jul 2017 18:54:19 -  2.75.2.18
  @@ -7,6 +7,8 @@
   #include   /* XXX fnpyKey */
   #include 
   #include /* XXX rpmExpand */
  +#include 
  +
   #include 
   #include 
   #include 
  @@ -27,6 +29,9 @@
   /**
*/
   int _rpmgi_debug = 0;
  +#define SPEW(_fmt, ...) \
  +if (_rpmgi_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /**
*/
  @@ -87,13 +92,21 @@
if (fd != NULL) (void) Fclose(fd);
fd = NULL;
   }
  -fn = _free(fn);
   
   #if defined(POSIX_FADV_WILLNEED)
  -if(fd != NULL)
  +if (fd != NULL)
  +switch (urlPath(fn, NULL)) {
  +default:
  + break;
  +case URL_IS_PATH:
  +case URL_IS_UNKNOWN:
(void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);
  + break;
  +}
   #endif
   
  +fn = _free(fn);
  +
   return fd;
   }
   
  @@ -132,8 +145,7 @@
gi->rc = RPMRC_NOTFOUND;/* XXX other failures? */
   }
   
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "<-- %s(%p,%s) rc %d\n", __FUNCTION__, gi, path, rpmrc);
  +SPEW("<-- %s(%p,%s) rc %d\n", __FUNCTION__, gi, path, rpmrc);
   return rpmrc;
   }
   
  @@ -203,8 +215,7 @@
   rpmRC rpmrc = RPMRC_NOTFOUND;
   Header h = NULL;
   
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "--> %s(%p) fn[%d] %s\n", __FUNCTION__, gi, gi->i, 
gi->argv[gi->i]);
  +SPEW("--> %s(%p) fn[%d] %s\n", __FUNCTION__, gi, gi->i, gi->argv[gi->i]);
   if (gi->argv != NULL && gi->argv[gi->i] != NULL)
   do {
const char * fn;/* XXX gi->hdrPath? */
  @@ -255,8 +266,7 @@
   (void)headerFree(h);
   h = NULL;
   
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "<-- %s(%p) rc %d\n", __FUNCTION__, gi, rpmrc);
  +SPEW("<-- %s(%p) rc %d\n", __FUNCTION__, gi, rpmrc);
   return rpmrc;
   }
   
  @@ -425,8 +435,7 @@
   
   gi->mi = rpmtsInitIterator(gi->ts, gi->tag, gi->keyp, gi->keylen);
   
  -if (_rpmgi_debug < 0)
  -fprintf(stderr, "*** %s: gi %p key %p[%d]\tmi %p\n", __FUNCTION__, gi, 
gi->keyp, (int)gi->keylen, gi->mi);
  +SPEW("*** %s: gi %p key %p[%d]\tmi %p\n", __FUNCTION__, gi, gi->keyp, 
(int)gi->keylen, gi->mi);
   
   if (gi->argv != NULL)
   for (av = (const char **) gi->argv; *av != NULL; av++) {
  @@ -454,8 +463,7 @@
got++;
}
if (got) {
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "\tav %p[%d]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (int)(av 
- gi->argv), *av, tagName((rpmTag)tag), pat);
  +SPEW("\tav %p[%d]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (int)(av - 
gi->argv), *av, tagName((rpmTag)tag), pat);
got = rpmmiAddPattern(gi->mi, (rpmTag)tag, RPMMIRE_DEFAULT, 
pat);
}
a = _free(a);
  @@ -549,8 +557,7 @@
   if (gi == NULL)
return rpmrc;
   
  -if (_rpmgi_debug)
  -fprintf(stderr, "--> %s(%p) tag %s\n", __FUNCTION__, gi, tagName(gi->tag));
  +SPEW("--> %s(%p) tag %s\n", __FUNCTION__, gi, tagName(gi->tag));
   
   top:
   /* Free header from previous iteration. */
  @@ -696,12 +703,10 @@
break;
   case RPMDBI_ARGLIST:
/* XXX gi->active initialize? */
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "*** %s: gi %p\t%p[%d]: %s\n", __FUNCTION__, gi, gi->argv, 
gi->i, gi->argv[gi->i]);
  +SPEW("*** %s: gi %p\t%p[%d]: %s\n", __FUNCTION__, gi, gi->argv, gi->i, 
gi->argv[gi->i]);
/* Read next header, lazily expanding manifests as found. */
rpmrc = rpmgiLoadReadHeader(gi);
  -if (_rpmgi_debug  < 0)
  -fprintf(stderr, "*** %s: rc %d gi %p\t%p[%d]: h %p %s\n", __FUNCTION__, 
rpmrc, gi, gi->argv, gi-

[CVS] RPM: rpm-5_4: rpm/macros/ macros.in

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 20:33:12
  Branch: rpm-5_4  Handle: 2017071618331200

  Modified files:   (Branch: rpm-5_4)
rpm/macros  macros.in

  Log:
- add expansion for %db_convert (in db-6.2.32).

  Summary:
RevisionChanges Path
1.39.2.52   +2  -1  rpm/macros/macros.in
  

  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.in
  
  $ cvs diff -u -r1.39.2.51 -r1.39.2.52 macros.in
  --- rpm/macros/macros.in  30 May 2017 19:18:39 -  1.39.2.51
  +++ rpm/macros/macros.in  16 Jul 2017 18:33:12 -  1.39.2.52
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.39.2.51 2017/05/30 19:18:39 jbj Exp $
  +# $Id: macros.in,v 1.39.2.52 2017/07/16 18:33:12 jbj Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -70,6 +70,7 @@
   %__cvs   @__CVS@
   %__db_archive@__DB_ARCHIVE@
   %__db_checkpoint @__DB_CHECKPOINT@
  +%__db_convert@__DB_CONVERT@
   %__db_deadlock   @__DB_DEADLOCK@
   %__db_dump   @__DB_DUMP@
   %__db_hotbackup  @__DB_HOTBACKUP@
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ Makefile.am autogen.sh configure.ac devtool.c...

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 20:15:42
  Branch: rpm-5_4  Handle: 2017071618154100

  Modified files:   (Branch: rpm-5_4)
rpm Makefile.am autogen.sh configure.ac devtool.conf

  Log:
- configuration for --with-zstd=internal etc.

  Summary:
RevisionChanges Path
2.263.2.48  +9  -4  rpm/Makefile.am
2.110.2.19  +22 -7  rpm/autogen.sh
2.472.2.179 +47 -1  rpm/configure.ac
2.365.2.114 +31 -3  rpm/devtool.conf
  

  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  
  $ cvs diff -u -r2.263.2.47 -r2.263.2.48 Makefile.am
  --- rpm/Makefile.am   12 Jun 2017 06:46:18 -  2.263.2.47
  +++ rpm/Makefile.am   16 Jul 2017 18:15:41 -  2.263.2.48
  @@ -8,12 +8,17 @@
--prefix=/usr \
   --libdir=/usr/lib64 \
   --enable-shared \
  - --with-db \
  + --with-db=/usr/lib64:/usr/include/db62 \
--with-dbsql \
  - --without-db-tools-intergrated \
  + --without-db-tools-integrated \
--with-zlib \
--with-bzip2 \
--with-xz \
  + --with-zstd=no \
  + --with-snappy=no \
  + --with-lz4=no \
  + --with-brotli=no \
  + --with-lzfse=no \
   --with-file \
   --with-path-magic=/usr/share/file/magic \
   --with-lua \
  @@ -182,10 +187,10 @@
@WITH_DB_SUBDIR@ \
@WITH_ZLIB_SUBDIR@ \
@WITH_ZSTD_SUBDIR@ \
  - @WITH_BROTLI_SUBDIR@ \
  + @WITH_LZ4_SUBDIR@ \
@WITH_SNAPPY_SUBDIR@ \
  + @WITH_BROTLI_SUBDIR@ \
@WITH_LZFSE_SUBDIR@ \
  - @WITH_LZ4_SUBDIR@ \
@WITH_PCRE_SUBDIR@ \
@WITH_POPT_SUBDIR@ \
@WITH_LUA_SUBDIR@ \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/autogen.sh
  
  $ cvs diff -u -r2.110.2.18 -r2.110.2.19 autogen.sh
  --- rpm/autogen.sh12 Jun 2017 06:46:46 -  2.110.2.18
  +++ rpm/autogen.sh16 Jul 2017 18:15:41 -  2.110.2.19
  @@ -1376,20 +1376,35 @@
   ( cd $dir && cmake . && 
echo "check: test" >> Makefile &&
echo "distclean: clean" >> Makefile
  - cp *.la lib/
  - mkdir lib/.libs
  - ln -sf ../libflatccrt.a lib/.libs/libflatccrt.a
  + #cp *.la lib/
  + #mkdir -p lib/.libs
  + #ln -sf ../libflatccrt.a lib/.libs/libflatccrt.a
   )
   ;;
  -  brotli)
  -;;
  -  lzfse)
  +  zstd)
   ;;
 lz4)
   ;;
 snappy)
  +( cd $dir && sh ./autogen.sh )
   ;;
  -  zstd)
  +  brotli)
  +( cd $dir && ./configure-cmake --prefix=/usr --libdir=/usr/lib64 &&
  + echo "check: test" >> ../Makefile &&
  + echo "distclean: clean" >> ../Makefile
  +)
  +;;
  +  lzfse)
  +( cd $dir
  +cmake . \
  +-DLZFSE_BUNDLE_MODE:BOOL=OFF \
  +-DBUILD_SHARED_LIBS:BOOL=ON \
  +-DCMAKE_INSTALL_BINDIR:PATH=/usr/bin \
  +-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 \
  +-DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include
  + echo "check: test" >> Makefile
  + echo "distclean: clean"
  +)
   ;;
 libgit2)
   ( cd $dir && cmake . && 
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.178 -r2.472.2.179 configure.ac
  --- rpm/configure.ac  16 Jul 2017 04:20:02 -  2.472.2.178
  +++ rpm/configure.ac  16 Jul 2017 18:15:41 -  2.472.2.179
  @@ -2403,9 +2403,36 @@
   dnl # Google Brotli
   RPM_CHECK_LIB(
   [Google Brotli], [brotli],
  -[brotli], [XXX], [version.h],
  +[brotlienc], [BrotliGetDictionary], [brotli/types.h],
   [no,internal:external:none], [brotli:c/include],
   [
  +AC_CHECK_FUNCS(BrotliGetDictionary)
  +AC_CHECK_FUNCS(BrotliSetDictionaryData)
  +AC_CHECK_FUNCS(BrotliEncoderCompress)
  +AC_CHECK_FUNCS(BrotliEncoderCompressStream)
  +AC_CHECK_FUNCS(BrotliEncoderCreateInstance)
  +AC_CHECK_FUNCS(BrotliEncoderDestroyInstance)
  +AC_CHECK_FUNCS(BrotliEncoderHasMoreOutput)
  +AC_CHECK_FUNCS(BrotliEncoderIsFinished)
  +AC_CHECK_FUNCS(BrotliEncoderMaxCompressedSize)
  +AC_CHECK_FUNCS(BrotliEncoderSetCustomDictionary)
  +AC_CHECK_FUNCS(BrotliE

[CVS] RPM: rpm-5_4: rpm/tools/ rpm2cpio.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 16:24:54
  Branch: rpm-5_4  Handle: 2017071614245400

  Modified files:   (Branch: rpm-5_4)
rpm/tools   rpm2cpio.c

  Log:
- fix: avoid a stack buffer overflow.

  Summary:
RevisionChanges Path
2.11.2.5+1  -1  rpm/tools/rpm2cpio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/tools/rpm2cpio.c
  
  $ cvs diff -u -r2.11.2.4 -r2.11.2.5 rpm2cpio.c
  --- rpm/tools/rpm2cpio.c  16 Jul 2017 04:44:27 -  2.11.2.4
  +++ rpm/tools/rpm2cpio.c  16 Jul 2017 14:24:54 -  2.11.2.5
  @@ -119,7 +119,7 @@
xx = headerGet(h, he, 0);
payload_compressor = (xx ? he->p.str : "gzip");
   
  - rpmio_flags = t = alloca(sizeof("r.gzdio"));
  + rpmio_flags = t = alloca(sizeof("r.gzdio")+32);
*t++ = 'r';
if (!strcmp(payload_compressor, "gzip"))
t = stpcpy(t, ".gzdio");
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: syck/lib/ bytecode.c implicit.c token.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: syck Date:   16-Jul-2017 16:20:12
  Branch: rpm-5_4  Handle: 2017071614201200

  Modified files:   (Branch: rpm-5_4)
syck/libbytecode.c implicit.c token.c

  Log:
- sanity.

  Summary:
RevisionChanges Path
1.4.8.4 +1  -1  syck/lib/bytecode.c
1.3.8.3 +1  -1  syck/lib/implicit.c
1.7.6.4 +80 -75 syck/lib/token.c
  

  patch -p0 <<'@@ .'
  Index: syck/lib/bytecode.c
  
  $ cvs diff -u -r1.4.8.3 -r1.4.8.4 bytecode.c
  --- syck/lib/bytecode.c   19 Apr 2016 12:59:14 -  1.4.8.3
  +++ syck/lib/bytecode.c   16 Jul 2017 14:20:12 -  1.4.8.4
  @@ -1,4 +1,4 @@
  -/* Generated by re2c 0.13.5 on Sun Apr 17 12:42:26 2016 */
  +/* Generated by re2c 0.14.3 on Sat Aug  6 14:51:36 2016 */
   #line 1 "bytecode.re"
   /*
* bytecode.re
  @@ .
  patch -p0 <<'@@ .'
  Index: syck/lib/implicit.c
  
  $ cvs diff -u -r1.3.8.2 -r1.3.8.3 implicit.c
  --- syck/lib/implicit.c   13 Mar 2016 09:03:24 -  1.3.8.2
  +++ syck/lib/implicit.c   16 Jul 2017 14:20:12 -  1.3.8.3
  @@ -1,4 +1,4 @@
  -/* Generated by re2c 0.13.5 on Sun Mar 13 05:01:12 2016 */
  +/* Generated by re2c 0.14.3 on Sat Aug  6 14:51:36 2016 */
   #line 1 "implicit.re"
   /*
* implicit.re
  @@ .
  patch -p0 <<'@@ .'
  Index: syck/lib/token.c
  
  $ cvs diff -u -r1.7.6.3 -r1.7.6.4 token.c
  --- syck/lib/token.c  13 Mar 2016 09:03:24 -  1.7.6.3
  +++ syck/lib/token.c  16 Jul 2017 14:20:12 -  1.7.6.4
  @@ -1,4 +1,4 @@
  -/* Generated by re2c 0.13.5 on Sun Mar 13 05:01:10 2016 */
  +/* Generated by re2c 0.14.3 on Sat Aug  6 14:51:36 2016 */
   #line 1 "token.re"
   /*
* token.re
  @@ -432,9 +432,10 @@
}
   yy20:
YYCURSOR = YYMARKER;
  - switch (yyaccept) {
  - case 0: goto yy3;
  - case 1: goto yy10;
  + if (yyaccept == 0) {
  + goto yy3;
  + } else {
  + goto yy10;
}
   yy21:
yych = *++YYCURSOR;
  @@ -467,7 +468,7 @@
   }
   return 0; 
   }
  -#line 471 ""
  +#line 472 ""
   yy25:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
  @@ -513,7 +514,7 @@
   return 0; 
   }
   }
  -#line 517 ""
  +#line 518 ""
   yy32:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
  @@ -543,7 +544,7 @@
   YYTOKEN = YYCURSOR;
   
   
  -#line 547 ""
  +#line 548 ""
   {
YYCTYPE yych;
unsigned int yyaccept = 0;
  @@ -606,7 +607,7 @@
   }
   return YAML_INDENT;
   }
  -#line 610 ""
  +#line 611 ""
   yy39:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
  @@ -618,7 +619,7 @@
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
   goto Plain; 
   }
  -#line 622 ""
  +#line 623 ""
   yy41:
++YYCURSOR;
   #line 434 "token.re"
  @@ -627,7 +628,7 @@
   ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
   return YYTOKEN[0]; 
   }
  -#line 631 ""
  +#line 632 ""
   yy43:
++YYCURSOR;
   #line 440 "token.re"
  @@ -636,14 +637,14 @@
   ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
   return YYTOKEN[0]; 
   }
  -#line 640 ""
  +#line 641 ""
   yy45:
++YYCURSOR;
   #line 446 "token.re"
{   POP_LEVEL();
   return YYTOKEN[0]; 
   }
  -#line 647 ""
  +#line 648 ""
   yy47:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
  @@ -804,19 +805,19 @@
++YYCURSOR;
   #line 488 "token.re"
{   goto TransferMethod; }
  -#line 808 ""
  +#line 809 ""
   yy53:
++YYCURSOR;
   #line 490 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
   goto SingleQuote; }
  -#line 814 ""
  +#line 815 &qu

[CVS] RPM: rpm-5_4: rpm/rpmio/ msqio.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 16:18:29
  Branch: rpm-5_4  Handle: 2017071614182900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   msqio.c

  Log:
- handle WITH_MQ and WITH_MSQ separately.

  Summary:
RevisionChanges Path
1.1.2.26+13 -12 rpm/rpmio/msqio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/msqio.c
  
  $ cvs diff -u -r1.1.2.25 -r1.1.2.26 msqio.c
  --- rpm/rpmio/msqio.c 4 Jul 2017 03:13:28 -   1.1.2.25
  +++ rpm/rpmio/msqio.c 16 Jul 2017 14:18:29 -  1.1.2.26
  @@ -9,20 +9,11 @@
   # include 
   #endif
   
  -#if defined(WITH_MQ) || defined(WITH_MSQ)
  -#if defined(HAVE_SYS_MSG_H)
  -# include 
  -#endif
  +#if defined(WITH_MQ)
   #if defined(HAVE_MQUEUE_H)
   # include 
   #endif
  -
  -#else/* WITH_MQ || WITH_MSQ */
  -
  -/* XXX stub in enough to use struct mq_attr */
  -
  -typedef int mqd_t;
  -
  +#else/* WITH_MQ */
   struct mq_attr
   {
   long mq_flags;   /* Message queue flags.  */
  @@ -31,8 +22,17 @@
   long mq_curmsgs; /* Number of messages currently queued.  */
   long __pad[4];
   };
  +#endif   /* WITH_MQ */
   
  -#endif   /* WITH_MQ || WITH_MSQ */
  +#if defined(WITH_MSQ)
  +#if defined(HAVE_SYS_MSG_H)
  +# include 
  +#endif
  +
  +#else/* WITH_MSQ */
  +/* XXX stub in enough to use struct mq_attr */
  +typedef int mqd_t;
  +#endif   /* WITH_MSQ */
   
   #include "rpmio_internal.h"
   #include 
  @@ -574,6 +574,7 @@
msq->oattrs.mq_curmsgs = 0;
msq->qid = mq_open(msq->qname, msq->flags, msq->omode, >oattrs);
   
  + /* XXX FIXME: modern glibc supplies pthread_getattr_default_np() */
Z(pthread_getattr_default_np(>attr));
Z(pthread_attr_setdetachstate(>attr, PTHREAD_CREATE_DETACHED));
msq->sigev.sigev_notify = SIGEV_THREAD;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/macros/ macros.rpmbuild.in

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 16:17:08
  Branch: rpm-5_4  Handle: 2017071614170700

  Modified files:   (Branch: rpm-5_4)
rpm/macros  macros.rpmbuild.in

  Log:
- add zstdio usage comment.

  Summary:
RevisionChanges Path
1.4.4.22+3  -2  rpm/macros/macros.rpmbuild.in
  

  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.rpmbuild.in
  
  $ cvs diff -u -r1.4.4.21 -r1.4.4.22 macros.rpmbuild.in
  --- rpm/macros/macros.rpmbuild.in 1 Jul 2017 04:35:47 -   1.4.4.21
  +++ rpm/macros/macros.rpmbuild.in 16 Jul 2017 14:17:07 -  1.4.4.22
  @@ -1,7 +1,7 @@
   #/*! \page build_macros Default configuration: @USRLIBRPM@/macros.rpmbuild
   # \verbatim
   #
  -# $Id: macros.rpmbuild.in,v 1.4.4.21 2017/07/01 04:35:47 jbj Exp $
  +# $Id: macros.rpmbuild.in,v 1.4.4.22 2017/07/16 14:17:07 jbj Exp $
   #
   # This file contains rpmbuild configuration macros.
   #
  @@ -121,7 +121,8 @@
   #"w9.gzdio"  gzip level 9 (default).
   #"w9.bzdio"  bzip2 level 9.
   #"w6.lzdio"  lzma level 6 (legacy, stable).
  -#"w6.xzdio"  xz level 6 (obsoletes lzma, unstable).
  +#"w6.xzdio"  xz level 6 (obsoletes lzma, stable).
  +#"w9.zstdio" zstd level 9
   #
   #%_source_payloadw9.gzdio
   #%_binary_payloadw9.gzdio
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ psm.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 16:15:25
  Branch: rpm-5_4  Handle: 2017071614152500

  Modified files:   (Branch: rpm-5_4)
rpm/lib psm.c

  Log:
- fix: avoid an overflow.

  Summary:
RevisionChanges Path
2.399.2.30  +1  -1  rpm/lib/psm.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  
  $ cvs diff -u -r2.399.2.29 -r2.399.2.30 psm.c
  --- rpm/lib/psm.c 10 Jul 2017 09:44:00 -  2.399.2.29
  +++ rpm/lib/psm.c 16 Jul 2017 14:15:25 -  2.399.2.30
  @@ -2904,7 +2904,7 @@
if (payload_compressor == NULL)
payload_compressor = xstrdup("gzip");
   
  - psm->rpmio_flags = te = (char *) xmalloc(sizeof("w9.gzdio"));
  + psm->rpmio_flags = te = (char *) xmalloc(sizeof("w9.zstdio")+32);
*te = '\0';
te = stpcpy(te, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
if (!strcmp(payload_compressor, "gzip"))
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmio/ rpmzstd.h tzstd.c zstdio.c

2017-07-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 15:46:46
  Branch: rpm-5_4  Handle: 2017071613464600

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES
rpm/rpmio   rpmzstd.h tzstd.c zstdio.c

  Log:
- zstd: fix: handle read/decompress EOF correctly.

  Summary:
RevisionChanges Path
1.3501.2.585+1  -0  rpm/CHANGES
1.1.2.4 +4  -2  rpm/rpmio/rpmzstd.h
1.1.2.8 +50 -56 rpm/rpmio/tzstd.c
1.1.2.6 +10 -9  rpm/rpmio/zstdio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.584 -r1.3501.2.585 CHANGES
  --- rpm/CHANGES   16 Jul 2017 04:20:02 -  1.3501.2.584
  +++ rpm/CHANGES   16 Jul 2017 13:46:46 -  1.3501.2.585
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: zstd: fix: handle read/decompress EOF correctly.
   - jbj: bdb: upgrade to db-6.2.32.
   - jbj: i18n: update PO files (Translation Project).
   - jbj: rpmjs: upgrade js-1.8.5 with mozjs-45 (internal).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzstd.h
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 rpmzstd.h
  --- rpm/rpmio/rpmzstd.h   4 Jul 2017 03:14:56 -   1.1.2.3
  +++ rpm/rpmio/rpmzstd.h   16 Jul 2017 13:46:46 -  1.1.2.4
  @@ -47,10 +47,12 @@
   size_t nb;
   void * b;
   
  +#if defined(WITH_ZSTD)
   size_t nib;
  -void * zib;  /*!< ZSTD_inBuffer */
  +ZSTD_inBuffer zib;   /*!< ZSTD_inBuffer */
   size_t nob;
  -void * zob;  /*!< ZSTD_outBuffer */
  +ZSTD_outBuffer zob;  /*!< ZSTD_outBuffer */
  +#endif
   };
   
   #ifdef   NOTYET
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tzstd.c
  
  $ cvs diff -u -r1.1.2.7 -r1.1.2.8 tzstd.c
  --- rpm/rpmio/tzstd.c 10 Jun 2017 00:22:36 -  1.1.2.7
  +++ rpm/rpmio/tzstd.c 16 Jul 2017 13:46:46 -  1.1.2.8
  @@ -106,52 +106,58 @@
   return rc;
   }
   
  -static int readFile(const char *ifn, const char *fmode)
  +/*==*/
  +static int copyZFile(FD_t ifd, FD_t ofd)
   {
  -char b[16*BUFSIZ];
  +char b[BUFSIZ];
   size_t nb = sizeof(b);
  +size_t pos = 0;
   int rc = -2;
   
  -FD_t ifd = Fopen(ifn, fmode);
  -if (ifd) {
  - size_t pos = 0;
  - size_t nr;
  - char xxxbuf[16*BUFSIZ];
  - setvbuf(fdGetFp(ifd), xxxbuf,_IOFBF, sizeof(xxxbuf));
  - do {
  - nr = Fread(b, 1, nb, ifd);
  - if (nr > 0)
  - pos += nr;
  -rpmzstd zstd = NULL;
  -SPEW("*** %s: pos %12zd nr %zd\n", __FUNCTION__, pos, nr);
  - } while (nr > 0);
  - rc = Fclose(ifd);
  +if (ifd && ofd)
  +while (1) {
  + size_t nr = Fread(b, 1, nb, ifd);
  +fprintf(stderr, "= nr %zu\n", nr);
  + if (Ferror(ifd) || nr == 0) {
  + rc = 0;
  + break;
  + }
  + pos += nr;
  + size_t nw = Fwrite(b, 1, nr, ofd);
  +fprintf(stderr, "= nw %zu\n", nw);
  + if (nr != nw) {
  + rc = -2;
  + break;
  + }
  + (void) Fflush(ofd);
   }
  +
   return rc;
   }
   
  -static int writeFile(const char *ofn, const char *fmode)
  +static int readZFile(const char *ifn, const char *ofn)
   {
  -char b[BUFSIZ];
  -size_t nb = sizeof(b);
  -int rc = -2;
  -
  -strncpy(b, "abcdefghijklmnopqrstuvwxyz\n", nb);
  -size_t blen = strlen(b);
  +FD_t ifd = Fopen(ifn, "r?.zstdio");
  +FD_t ofd = Fopen(ofn, "wb");
  +int rc = copyZFile(ifd, ofd);
  +
  +if (ofd)
  + (void) Fclose(ofd);
  +if (ifd)
  + (void) Fclose(ifd);
  +return rc;
  +}
   
  -FD_t ofd = Fopen(ofn, fmode);
  -if (ofd) {
  - size_t nw;
  - nw = Fwrite(b, 1, blen, ofd);
  -assert(nw == blen);
  - (void) Fflush(ofd);
  - (void) zstdio->_flush(ofd);
  - nw = Fwrite(b, 1, blen, ofd);
  -assert(nw == blen);
  - (void) Fflush(ofd);
  - (void) zstdio->_flush(ofd);
  - rc = Fclose(ofd);
  -}
  +static int writeZFile(const char *ifn, const char *ofn)
  +{
  +FD_t ifd = Fopen(ifn, "rb");
  +FD_t ofd = Fopen(ofn, "w3b?.zstdio");
  +int rc = copyZFile(ifd, ofd)

[CVS] RPM: rpm-5_4: rpm/scripts/ rpm2cpio rpm/tools/ rpm2cpio.c

2017-07-15 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 06:44:27
  Branch: rpm-5_4  Handle: 2017071604442700

  Modified files:   (Branch: rpm-5_4)
rpm/scripts rpm2cpio
rpm/tools   rpm2cpio.c

  Log:
- zstd: add to rpm2cpio.

  Summary:
RevisionChanges Path
1.6.6.2 +2  -0  rpm/scripts/rpm2cpio
2.11.2.4+2  -0  rpm/tools/rpm2cpio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/scripts/rpm2cpio
  
  $ cvs diff -u -r1.6.6.1 -r1.6.6.2 rpm2cpio
  --- rpm/scripts/rpm2cpio  2 Apr 2015 12:57:42 -   1.6.6.1
  +++ rpm/scripts/rpm2cpio  16 Jul 2017 04:44:27 -  1.6.6.2
  @@ -31,6 +31,8 @@
DECOMPRESSOR=bunzip2
   elif echo $COMPRESSION |grep -q xz; then
DECOMPRESSOR=unxz
  +elif echo $COMPRESSION |grep -q zstd; then
  + DECOMPRESSOR=unxz
   elif echo $COMPRESSION |grep -q cpio; then
DECOMPRESSOR=cat
   else
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpm2cpio.c
  
  $ cvs diff -u -r2.11.2.3 -r2.11.2.4 rpm2cpio.c
  --- rpm/tools/rpm2cpio.c  16 May 2017 21:22:05 -  2.11.2.3
  +++ rpm/tools/rpm2cpio.c  16 Jul 2017 04:44:27 -  2.11.2.4
  @@ -129,6 +129,8 @@
t = stpcpy(t, ".lzdio");
if (!strcmp(payload_compressor, "xz"))
t = stpcpy(t, ".xzdio");
  + if (!strcmp(payload_compressor, "zstd"))
  + t = stpcpy(t, ".zstdio");
he->p.ptr = _free(he->p.ptr);
   }
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ CHANGES INSTALL acinclude.m4 configure.ac dev...

2017-07-15 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Jul-2017 06:20:02
  Branch: rpm-5_4  Handle: 2017071604200200

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES INSTALL acinclude.m4 configure.ac
devtool.conf

  Log:
- bdb: upgrade to db-6.2.32.

  Summary:
RevisionChanges Path
1.3501.2.584+1  -0  rpm/CHANGES
2.134.2.34  +20 -1  rpm/INSTALL
2.31.2.7+22 -18 rpm/acinclude.m4
2.472.2.178 +46 -24 rpm/configure.ac
2.365.2.113 +202 -10rpm/devtool.conf
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.583 -r1.3501.2.584 CHANGES
  --- rpm/CHANGES   10 Jul 2017 10:27:21 -  1.3501.2.583
  +++ rpm/CHANGES   16 Jul 2017 04:20:02 -  1.3501.2.584
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: bdb: upgrade to db-6.2.32.
   - jbj: i18n: update PO files (Translation Project).
   - jbj: rpmjs: upgrade js-1.8.5 with mozjs-45 (internal).
   - jbj: macros: update %efi 
(http://rpm5.org/community/rpm-devel/5699.html)/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/INSTALL
  
  $ cvs diff -u -r2.134.2.33 -r2.134.2.34 INSTALL
  --- rpm/INSTALL   1 Jun 2017 18:38:24 -   2.134.2.33
  +++ rpm/INSTALL   16 Jul 2017 04:20:02 -  2.134.2.34
  @@ -37,7 +37,7 @@
   Libtasn.1   mandatory -   4.8 
http://www.gnu.org/software/libtasn1/
   Neonmandatory 0.27.0  0.30.1  http://www.webdav.org/neon/
   PCREmandatory 7.0 8.39http://www.pcre.org/
  -Berkeley-DB [1] mandatory 6.1.23  6.2.23  
http://www.oracle.com/database/berkeley-db.html
  +Berkeley-DB [1] mandatory 6.1.23  6.2.32  
http://www.oracle.com/database/berkeley-db.html
   Mozilla NSS optional  3.113.27.0  
http://www.mozilla.org/projects/security/pki/nss/
   OpenSSL optional  0.9.8   1.1.0c  http://www.openssl.org/
   OpenSSL-FIPS[7] optional  2.0.5   2.0.9   http://www.openssl.org/
  @@ -99,6 +99,25 @@
   else
   return (0);
   ---
  +   and similar for db-6.2.32
  +---
  +diff -up db-6.2.32/src/env/env_failchk.c.jbj db-6.2.32/src/env/env_failchk.c
  +--- db-6.2.32/src/env/env_failchk.c.jbj  2017-07-15 23:47:11.427479717 
-0400
   db-6.2.32/src/env/env_failchk.c  2017-07-15 23:51:03.814121306 -0400
  +@@ -669,8 +669,12 @@ __env_set_state(env, ipp, state)
  + || state == THREAD_CTR_VERIFY));
  + if (ipp != NULL)
  + *ipp = ip;
  ++#ifdef  NOTYET
  + if (ip == NULL
  + || (ip->dbth_state == THREAD_OUT && state == THREAD_VERIFY))
  ++#else
  ++if (ip == NULL) /* The control block wasn't found */
  ++#endif
  + return (USR_ERR(env, EINVAL));
  + else
  + return (0);
  +---
  (but any version of Berkeley-DB since db-4.5.20 will "work").
   
   [2] lua:   Modified Lua copy bundled with RPM.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/acinclude.m4
  
  $ cvs diff -u -r2.31.2.6 -r2.31.2.7 acinclude.m4
  --- rpm/acinclude.m4  11 May 2016 18:50:08 -  2.31.2.6
  +++ rpm/acinclude.m4  16 Jul 2017 04:20:02 -  2.31.2.7
  @@ -467,13 +467,17 @@
   dnl # check for C header (in set of optionally multiple 
possibilities)
   AC_CHECK_HEADERS([$5], [], [ __rcl_found=no ])
   dnl # check for C library (in set of optionally multiple 
possibilities)
  +dnl # stop on first found library
   __rcl_found_lib=no
  -m4_foreach_w([__rcl_lib], [$3], [
  +while true; do
  +  m4_foreach_w([__rcl_lib], [$3], [
   AC_CHECK_LIB(m4_defn([__rcl_lib]), [$4])
   dnl # manually check for success (do not use third 
argument to AC_CHECK_LIB
   dnl # here as this would no longer set the LIBS variable 
(the default action)
  -test 
".${m4_translit(ac_cv_lib_[]m4_defn([__rcl_lib])_$4,[.-,],[___])}" = .yes && 
__rcl_found_lib=yes
  -])
  +test 
".${m4_translit(ac_cv_lib_[]m4_defn([__rc

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmsq.c

2017-07-14 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   14-Jul-2017 17:38:36
  Branch: rpm-5_4  Handle: 2017071415383600

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmsq.c

  Log:
- use macro __VA_ARGS__.

  Summary:
RevisionChanges Path
1.42.6.12   +13 -11 rpm/rpmio/rpmsq.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmsq.c
  
  $ cvs diff -u -r1.42.6.11 -r1.42.6.12 rpmsq.c
  --- rpm/rpmio/rpmsq.c 20 May 2017 13:42:49 -  1.42.6.11
  +++ rpm/rpmio/rpmsq.c 14 Jul 2017 15:38:36 -  1.42.6.12
  @@ -160,7 +160,9 @@
   #include "debug.h"
   
   int _rpmsq_debug;
  -#define  SPEW(_list) if (_rpmsq_debug) fprintf _list
  +#define SPEW(_fmt, ...) \
  +if (_rpmsq_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /* XXX __OpenBSD__ insque(3) needs rock->q_forw initialized. */
   static struct rpmsqElem rpmsqRock = { , NULL };
  @@ -173,7 +175,7 @@
   int ret = -1;
   
   if (sq != NULL) {
  -SPEW((stderr, "Insert(%p): %p\n", ME(), sq));
  +SPEW("Insert(%p): %p\n", ME(), sq);
ret = sighold(SIGCHLD);
if (ret == 0) {
sq->child = 0;
  @@ -199,7 +201,7 @@
   if (elem != NULL) {
   
   if (_rpmsq_debug)
  -SPEW((stderr, "Remove(%p): %p\n", ME(), sq));
  +SPEW("Remove(%p): %p\n", ME(), sq);
ret = sighold (SIGCHLD);
if (ret == 0) {
_rpm_remque(elem);
  @@ -362,7 +364,7 @@
   
   if (sq->reaper) {
xx = rpmsqInsert(sq, NULL);
  -SPEW((stderr, "Enable(%p): %p\n", ME(), sq));
  +SPEW("Enable(%p): %p\n", ME(), sq);
xx = rpmsqEnable(SIGCHLD, NULL);
   }
   
  @@ -387,13 +389,13 @@
xx = close(sq->pipes[0]);
sq->pipes[0] = sq->pipes[1] = -1;
   
  -SPEW((stderr, " Child(%p): %p child %d\n", ME(), sq, (int)getpid()));
  +SPEW(" Child(%p): %p child %d\n", ME(), sq, (int)getpid());
   
   } else { /* Parent. */
   
sq->child = pid;
   
  -SPEW((stderr, "Parent(%p): %p child %d\n", ME(), sq, (int)sq->child));
  +SPEW("Parent(%p): %p child %d\n", ME(), sq, (int)sq->child);
   
   }
   
  @@ -453,14 +455,14 @@
   
   xx = sigrelse(SIGCHLD);
   
  -SPEW((stderr, "  Wake(%p): %p child %d reaper %d ret %d\n", ME(), sq, 
(int)sq->child, sq->reaper, ret));
  +SPEW("  Wake(%p): %p child %d reaper %d ret %d\n", ME(), sq, 
(int)sq->child, sq->reaper, ret);
   
   /* Remove processed SIGCHLD item from queue. */
   xx = rpmsqRemove(sq);
   
   /* Disable SIGCHLD handler on refcount == 0. */
   xx = rpmsqEnable(-SIGCHLD, NULL);
  -SPEW((stderr, "   Disable(%p): %p\n", ME(), sq));
  +SPEW("   Disable(%p): %p\n", ME(), sq);
   
   return ret;
   }
  @@ -468,7 +470,7 @@
   pid_t rpmsqWait(rpmsq sq)
   {
   
  -SPEW((stderr, "  Wait(%p): %p child %d reaper %d\n", ME(), sq, 
(int)sq->child, sq->reaper));
  +SPEW("  Wait(%p): %p child %d reaper %d\n", ME(), sq, (int)sq->child, 
sq->reaper);
   
   if (sq->reaper) {
(void) rpmsqWaitUnregister(sq);
  @@ -480,10 +482,10 @@
} while (reaped >= 0 && reaped != sq->child);
sq->reaped = reaped;
sq->status = status;
  -SPEW((stderr, "   Waitpid(%p): %p child %d reaped %d\n", ME(), sq, 
(int)sq->child, (int)sq->reaped));
  +SPEW("   Waitpid(%p): %p child %d reaped %d\n", ME(), sq, (int)sq->child, 
(int)sq->reaped);
   }
   
  -SPEW((stderr, "  Fini(%p): %p child %d status 0x%x\n", ME(), sq, 
(int)sq->child, sq->status));
  +SPEW("  Fini(%p): %p child %d status 0x%x\n", ME(), sq, (int)sq->child, 
sq->status);
   
   return sq->reaped;
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmdb/ pkgio.c

2017-07-14 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   14-Jul-2017 13:40:16
  Branch: rpm-5_4  Handle: 2017071411401600

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   pkgio.c

  Log:
- use macro __VA_ARGS__

  Summary:
RevisionChanges Path
1.121.2.30  +30 -43 rpm/rpmdb/pkgio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  
  $ cvs diff -u -r1.121.2.29 -r1.121.2.30 pkgio.c
  --- rpm/rpmdb/pkgio.c 16 May 2017 20:11:41 -  1.121.2.29
  +++ rpm/rpmdb/pkgio.c 14 Jul 2017 11:40:16 -  1.121.2.30
  @@ -41,7 +41,15 @@
   GENfree(rpmuint32_t *)
   #endif   /* __cplusplus */
   
  -int _pkgio_debug = 0;
  +int _pkgio_debug;
  +#define SPEW(_fmt, ...) \
  +if (_pkgio_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +
  +extern int _rpmhkp_debug;
  +#define HKPSPEW(_fmt, ...) \
  +if (_rpmhkp_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /**
*/
  @@ -64,8 +72,7 @@
   size_t length;
   rpmRC rc = RPMRC_FAIL;   /* assume failure */
   
  -if (_pkgio_debug)
  -fprintf(stderr, "--> rpmWriteHeader(%p, %p, %p)\n", fd, h, msg);
  +SPEW("--> rpmWriteHeader(%p, %p, %p)\n", fd, h, msg);
   
   if (h == NULL) {
if (msg)
  @@ -159,8 +166,7 @@
   int validate = 0;
   int xx;
   
  -if (_rpmhkp_debug)
  -fprintf(stderr, "--> %s(%p,%p)\n", __FUNCTION__, ts, _dig);
  +SPEW("--> %s(%p,%p)\n", __FUNCTION__, ts, _dig);
   
   assert(dig != NULL);
   assert(sigp != NULL);
  @@ -172,8 +178,7 @@
   awol = rpmbfLink(hkp->awol);
   
   #if 0
  -if (_rpmhkp_debug)
  -fprintf(stderr, "==> find sig id %08x %08x ts pubkey id %08x %08x\n",
  +HKPSPEW("==> find sig id %08x %08x ts pubkey id %08x %08x\n",
   pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4),
   pgpGrab(hkp->signid, 4), pgpGrab(hkp->signid+4, 4));
   #endif
  @@ -181,8 +186,7 @@
   /* Lazy free of previous pubkey if pubkey does not match this signature. 
*/
   if (memcmp(sigp->signid, hkp->signid, sizeof(hkp->signid))) {
   #if 0
  -if (_rpmhkp_debug)
  -fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", hkp->pkt, hkp->pktlen, 
pgpGrab(hkp->signid, 4), pgpGrab(hkp->signid+4, 4));
  +HKPSPEW("*** free pkt %p[%d] id %08x %08x\n", hkp->pkt, hkp->pktlen, 
pgpGrab(hkp->signid, 4), pgpGrab(hkp->signid+4, 4));
   #endif
hkp->pkt = _free(hkp->pkt);
hkp->pktlen = 0;
  @@ -213,8 +217,7 @@
   validate = 0;
break;
}
  -if (_rpmhkp_debug)
  -fprintf(stderr, "\t%s: rpmku  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
  +HKPSPEW("\t%s: rpmku  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
   }
   
   /* Try rpmdb keyring lookup. */
  @@ -265,8 +268,7 @@
hkp->pkt = _free(hkp->pkt);
hkp->pktlen = 0;
}
  -if (_rpmhkp_debug)
  -fprintf(stderr, "\t%s: rpmdb  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
  +HKPSPEW("\t%s: rpmdb  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
   }
   
   /* Try autosign package pubkey (if present). */
  @@ -279,8 +281,7 @@
hkp->pktlen = dig->publen;  dig->publen = 0;
pubkeysource = xstrdup("package");
   validate = -1;   /* XXX rpmhkpValidate is prerequisite for rpmhkpFindKey 
*/
  -if (_rpmhkp_debug)
  -fprintf(stderr, "\t%s: auto   %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
  +HKPSPEW("\t%s: auto   %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
}
   }
   
  @@ -301,8 +302,7 @@
pubkeysource = xstrdup("keyserver");
   validate = 1;
}
  -if (_rpmhkp_debug)
  -fprintf(stderr, "\t%s: rpmhkp %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
  +HKPSPEW("\t%s: rpmhkp %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
   }
   
   #ifdef   NOTYET
  @@ -326,8 +326,7 @@
   /* Was a matching pubkey found? */
   if (hkp->pkt == NULL || hkp->pktlen == 0)
goto exit;
  -if (_rpmhkp_debug)
  -fprintf(stderr, "\t%s: match  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp->pktlen);
  +HKPSPEW("\t%s: match  %p[%u]\n", __FUNCTION__, hkp->pkt, (unsigned) 
hkp-

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmdav.c rpmdir.c rpmrpc.c

2017-07-14 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   14-Jul-2017 13:23:14
  Branch: rpm-5_4  Handle: 2017071411231300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmdav.c rpmdir.c rpmrpc.c

  Log:
- use macro __VA_ARGS__.

  Summary:
RevisionChanges Path
2.119.2.25  +60 -60 rpm/rpmio/rpmdav.c
2.12.2.15   +10 -14 rpm/rpmio/rpmdir.c
2.99.2.15   +51 -76 rpm/rpmio/rpmrpc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmdav.c
  
  $ cvs diff -u -r2.119.2.24 -r2.119.2.25 rpmdav.c
  --- rpm/rpmio/rpmdav.c26 May 2017 20:49:23 -  2.119.2.24
  +++ rpm/rpmio/rpmdav.c14 Jul 2017 11:23:13 -  2.119.2.25
  @@ -58,19 +58,19 @@
   
   #include "debug.h"
   
  -#define  DAVDEBUG(_f, _list) \
  +#define  DAVDEBUG(_f, _fmt, ...) \
   if (((_f) < 0 && _dav_debug < 0) || ((_f) > 0 && _dav_debug)) \
  - fprintf _list
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   int _dav_hook_debug;
  -#define  HOOKDEBUG(_f, _list) \
  +#define  HOOKDEBUG(_f, _fmt, ...) \
   if (((_f) < 0 && _dav_hook_debug < 0) || ((_f) > 0 && _dav_hook_debug)) \
  - fprintf _list
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   int _dav_cb_debug;
  -#define  CALLBACKDEBUG(_f, _list) \
  +#define  CALLBACKDEBUG(_f, _fmt, ...) \
   if (((_f) < 0 && _dav_cb_debug < 0) || ((_f) > 0 && _dav_cb_debug)) \
  - fprintf _list
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /* HACK: reasonable value needed (wget uses 900 as default). */
   #if 0
  @@ -113,7 +113,7 @@
   #endif
   URLSANE(u);
   
  -CALLBACKDEBUG(-1, (stderr, "*** fd %p %s: %s\n", ctrl, tag, value));
  +CALLBACKDEBUG(-1, "*** fd %p %s: %s\n", ctrl, tag, value);
   return ctrl;
   }
   
  @@ -133,7 +133,7 @@
   #endif
   URLSANE(u);
   
  -CALLBACKDEBUG(-1, (stderr, "***  u %p %s: %s\n", u, tag, value));
  +CALLBACKDEBUG(-1, "***  u %p %s: %s\n", u, tag, value);
   return u;
   }
   
  @@ -321,7 +321,7 @@
   {
   FD_t ctrl = ud2fd(userdata, value, __FUNCTION__);
   
  -DAVDEBUG(1, (stderr, "<- %s\n", value));
  +DAVDEBUG(1, "<- %s\n", value);
   }
   #endif
   
  @@ -392,7 +392,7 @@
   #endif
   #endif   /* NOTYET */
   }
  -DAVDEBUG(-1, (stderr, "<-- %s(%p) active %d\n", __FUNCTION__, u, rc));
  +DAVDEBUG(-1, "<-- %s(%p) active %d\n", __FUNCTION__, u, rc);
   rc = 0;  /* XXX return active state? */
   return rc;
   }
  @@ -413,7 +413,7 @@
   #endif   /* WITH_OPENSSL */
   }
   #endif   /* NE_FEATURE_SSL */
  -DAVDEBUG(-1, (stderr, "<-- %s()\n", __FUNCTION__));
  +DAVDEBUG(-1, "<-- %s()\n", __FUNCTION__);
   }
   
   static void davNotify(void * userdata,
  @@ -473,7 +473,7 @@
   
   /* HACK: davConnect() -> ne_options2() needs fd registered in req. */
   
  -HOOKDEBUG(-1, (stderr, "<-- %s(%p,%p,%s,%s) sess %p u %p fd %p\n", 
__FUNCTION__, req, userdata, method, uri, sess, u, fd));
  +HOOKDEBUG(-1, "<-- %s(%p,%p,%s,%s) sess %p u %p fd %p\n", __FUNCTION__, req, 
userdata, method, uri, sess, u, fd);
   }
   
   static void davPreSend(ne_request * req, void * userdata, ne_buffer * buf)
  @@ -484,8 +484,8 @@
   // cppcheck-suppress incorrectLogicOperator
   assert(fd == NULL || fd != NULL);/* Hack: fd == NULL for OPTIONS */
   
  -DAVDEBUG(1, (stderr, "-> %s\n", buf->data)); /* XXX for wget debugging */
  -HOOKDEBUG(-1, (stderr, "<-- %s(%p,%p,%p) sess %p fd %p\n", __FUNCTION__, 
req, userdata, buf, sess, fd));
  +DAVDEBUG(1, "-> %s\n", buf->data);   /* XXX for wget debugging */
  +HOOKDEBUG(-1, "<-- %s(%p,%p,%p) sess %p fd %p\n", __FUNCTION__, req, 
userdata, buf, sess, fd);
   
   }
   
  @@ -497,7 +497,7 @@
   // cppcheck-suppress incorrectLogicOperator
   assert(fd == NULL || fd != NULL);/* Hack: fd == NULL for OPTIONS */
   
  -HOOKDEBUG(-1, (stderr, "<-- %s(%p,%p,%p) sess %p fd %p %s\n", __FUNCTION__, 
req, userdata, status, sess, fd, ne_get_error(sess)));
  +HOOKDEBUG(-1, "<-- %s(%p,%p,%p) sess %p fd %p %s\n", __FUNCTION__, req, 
userdata, status, sess, fd, ne_get_error(sess));
   }
   
   static int davPostSend(ne_request * req, void * userdata, const ne_status * 
status)
  @@ -534,10 +534,10 @@
u->location = x

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-...

2017-07-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   13-Jul-2017 00:06:15
  Branch: rpm-5_4  Handle: 2017071222061401

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-js.c
rpmdb-js.c rpmdbc-js.c rpmdbe-js.c rpmdc-js.c
rpmdig-js.c rpmdir-js.c rpmds-js.c rpmfc-js.c
rpmfi-js.c rpmfts-js.c rpmgi-js.c rpmhdr-js.c
rpmio-js.c rpmiob-js.c rpmmc-js.c rpmmg-js.c
rpmmi-js.c rpmmpf-js.c rpmmpw-js.c rpmps-js.c
rpmseq-js.c rpmsm-js.c rpmsp-js.c rpmst-js.c
rpmsw-js.c rpmsx-js.c rpmsys-js.c rpmte-js.c
rpmts-js.c rpmtxn-js.c rpmxar-js.c syck-js.c
uuid-js.c

  Log:
- rpmjs: commeny out debugging for now.

  Summary:
RevisionChanges Path
1.11.4.13   +14 -14 rpm/js/rpmaug-js.c
1.4.4.8 +2  -2  rpm/js/rpmbc-js.c
1.10.4.12   +6  -6  rpm/js/rpmbf-js.c
1.6.4.12+4  -4  rpm/js/rpmcudf-js.c
1.31.4.11   +23 -23 rpm/js/rpmdb-js.c
1.14.4.11   +10 -10 rpm/js/rpmdbc-js.c
1.21.4.12   +54 -54 rpm/js/rpmdbe-js.c
1.9.4.12+7  -7  rpm/js/rpmdc-js.c
1.5.2.8 +2  -2  rpm/js/rpmdig-js.c
1.8.4.8 +4  -4  rpm/js/rpmdir-js.c
1.20.4.9+4  -4  rpm/js/rpmds-js.c
1.4.4.8 +2  -2  rpm/js/rpmfc-js.c
1.15.4.10   +2  -2  rpm/js/rpmfi-js.c
1.10.4.10   +9  -9  rpm/js/rpmfts-js.c
1.4.4.8 +2  -2  rpm/js/rpmgi-js.c
1.24.4.10   +9  -9  rpm/js/rpmhdr-js.c
1.9.4.13+21 -21 rpm/js/rpmio-js.c
1.4.4.8 +2  -2  rpm/js/rpmiob-js.c
1.12.4.11   +6  -6  rpm/js/rpmmc-js.c
1.4.4.9 +4  -4  rpm/js/rpmmg-js.c
1.28.4.10   +7  -7  rpm/js/rpmmi-js.c
1.7.4.11+7  -7  rpm/js/rpmmpf-js.c
1.21.4.12   +12 -12 rpm/js/rpmmpw-js.c
1.18.4.10   +4  -4  rpm/js/rpmps-js.c
1.7.4.11+8  -8  rpm/js/rpmseq-js.c
1.8.4.10+2  -2  rpm/js/rpmsm-js.c
1.4.4.9 +2  -2  rpm/js/rpmsp-js.c
1.10.4.8+4  -4  rpm/js/rpmst-js.c
1.4.4.8 +2  -2  rpm/js/rpmsw-js.c
1.8.4.10+2  -2  rpm/js/rpmsx-js.c
1.8.4.11+20 -20 rpm/js/rpmsys-js.c
1.19.4.11   +4  -4  rpm/js/rpmte-js.c
1.33.4.12   +10 -10 rpm/js/rpmts-js.c
1.11.4.11   +6  -6  rpm/js/rpmtxn-js.c
1.5.4.9 +2  -2  rpm/js/rpmxar-js.c
1.9.4.9 +1  -1  rpm/js/syck-js.c
1.18.4.9+4  -4  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.12 -r1.11.4.13 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 11:55:37 -  1.11.4.12
  +++ rpm/js/rpmaug-js.c12 Jul 2017 22:06:14 -  1.11.4.13
  @@ -39,7 +39,7 @@
   const char * _name = NULL;
   const char * _expr = NULL;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   /* XXX note optional EXPR. If EXPR is NULL, then NAME is deleted. */
   if (!(ok = JS_ConvertArguments(cx, args, "s/s", &_name, &_expr)))
  @@ -70,7 +70,7 @@
   const char * _path = NULL;
   const char * _value = NULL;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   if (!(ok = JS_ConvertArguments(cx, args, "s", &_path)))
   goto exit;
  @@ -104,7 +104,7 @@
   const char * _path = NULL;
   const char * _value = NULL;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   if (!(ok = JS_ConvertArguments(cx, args, "ss", &_path, &_value)))
   goto exit;
  @@ -135,7 +135,7 @@
   const char * _label = NULL;
   int _before;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   if (!(ok = JS_ConvertArguments(cx, args, "ssi", &_path, &_label, 
&_before)))
   goto exit;
  @@ -164,7 +164,7 @@
   bool ok = false;
   const char * _path = NULL;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   if (!(ok = JS_ConvertArguments(cx, args, "s", &_path)))
   goto exit;
  @@ -187,7 +187,7 @@
   const char * _src = NULL;
   const char * _dst = NULL;
   
  -_METHOD_DEBUG_ENTRY(_debug);
  +//_METHOD_DEBUG_ENTRY(_debug);
   
   if (!(ok = JS_ConvertArguments(cx, arg

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am rpmaug-js.h rpmbc-js.h rpmcudf...

2017-07-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   12-Jul-2017 22:00:59
  Branch: rpm-5_4  Handle: 2017071220005801

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am rpmaug-js.h rpmbc-js.h rpmcudf-js.h
rpmdb-js.h rpmdbc-js.h rpmdbe-js.h rpmdc-js.h
rpmdig-js.h rpmdir-js.h rpmds-js.h rpmfc-js.h
rpmfi-js.h rpmfts-js.h rpmgi-js.h rpmhdr-js.h
rpmio-js.c rpmio-js.h rpmiob-js.h rpmjs-debug.h
rpmmc-js.h rpmmg-js.h rpmmi-js.h rpmmpf-js.h
rpmmpw-js.h rpmps-js.h rpmseq-js.h rpmsm-js.h
rpmsp-js.h rpmst-js.h rpmsw-js.h rpmsx-js.h
rpmsys-js.h rpmte-js.h rpmts-js.h rpmtxn-js.h
rpmxar-js.h syck-js.h uuid-js.h

  Log:
- rpmjs: change class loader prototype.

  Summary:
RevisionChanges Path
1.44.2.19   +3  -1  rpm/js/Makefile.am
1.2.4.1 +1  -1  rpm/js/rpmaug-js.h
1.1.4.1 +1  -1  rpm/js/rpmbc-js.h
1.3.4.1 +1  -1  rpm/js/rpmcudf-js.h
1.4.4.1 +1  -1  rpm/js/rpmdb-js.h
1.3.4.1 +1  -1  rpm/js/rpmdbc-js.h
1.3.4.1 +1  -1  rpm/js/rpmdbe-js.h
1.1.4.1 +1  -1  rpm/js/rpmdc-js.h
1.1.4.1 +1  -1  rpm/js/rpmdig-js.h
1.1.4.1 +1  -1  rpm/js/rpmdir-js.h
1.3.4.1 +1  -1  rpm/js/rpmds-js.h
1.1.4.1 +1  -1  rpm/js/rpmfc-js.h
1.1.6.1 +1  -1  rpm/js/rpmfi-js.h
1.3.4.1 +1  -1  rpm/js/rpmfts-js.h
1.1.4.1 +1  -1  rpm/js/rpmgi-js.h
1.2.6.1 +1  -1  rpm/js/rpmhdr-js.h
1.9.4.12+1  -1  rpm/js/rpmio-js.c
1.1.4.1 +1  -1  rpm/js/rpmio-js.h
1.1.4.1 +1  -1  rpm/js/rpmiob-js.h
1.7.4.3 +6  -6  rpm/js/rpmjs-debug.h
1.2.4.1 +1  -1  rpm/js/rpmmc-js.h
1.1.4.1 +1  -1  rpm/js/rpmmg-js.h
1.3.4.1 +1  -1  rpm/js/rpmmi-js.h
1.1.4.1 +1  -1  rpm/js/rpmmpf-js.h
1.1.4.1 +1  -1  rpm/js/rpmmpw-js.h
1.2.4.1 +1  -1  rpm/js/rpmps-js.h
1.2.4.1 +1  -1  rpm/js/rpmseq-js.h
1.2.4.1 +1  -1  rpm/js/rpmsm-js.h
1.1.4.1 +1  -1  rpm/js/rpmsp-js.h
1.3.4.1 +1  -1  rpm/js/rpmst-js.h
1.1.4.1 +1  -1  rpm/js/rpmsw-js.h
1.1.4.1 +1  -1  rpm/js/rpmsx-js.h
1.1.4.1 +1  -1  rpm/js/rpmsys-js.h
1.2.6.1 +1  -1  rpm/js/rpmte-js.h
1.3.6.1 +1  -1  rpm/js/rpmts-js.h
1.3.4.1 +1  -1  rpm/js/rpmtxn-js.h
1.2.4.1 +1  -1  rpm/js/rpmxar-js.h
1.1.6.1 +1  -1  rpm/js/syck-js.h
1.2.6.1 +1  -1  rpm/js/uuid-js.h
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.18 -r1.44.2.19 Makefile.am
  --- rpm/js/Makefile.am10 Jul 2017 20:11:22 -  1.44.2.18
  +++ rpm/js/Makefile.am12 Jul 2017 20:00:58 -  1.44.2.19
  @@ -119,7 +119,9 @@
rpmjs45.cpp
   #${moz_builddir}/shell/Unified_cpp_js_src_shell0.cpp
   rpmjs45_CXXFLAGS = $(WITH_MOZJS_CXXFLAGS) -I../rpmio -fPIC -O3
  -rpmjs45_LDADD = $(WITH_MOZJS_LIBS)
  +rpmjs45_LDADD = \
  + $(WITH_MOZJS_LIBS) \
  + $(RPMIO_LDADD_COMMON)
   rpmjs45_LDFLAGS = $(WITH_MOZJS_LDFLAGS)
   
   foo: rpmjs45
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.h
  
  $ cvs diff -u -r1.2 -r1.2.4.1 rpmaug-js.h
  --- rpm/js/rpmaug-js.h19 Jun 2009 22:12:41 -  1.2
  +++ rpm/js/rpmaug-js.h12 Jul 2017 20:00:58 -  1.2.4.1
  @@ -14,7 +14,7 @@
   #endif
   
   extern JSObject *
  -rpmjs_InitAugClass(JSContext *cx, JSObject* obj);
  +rpmjs_InitAugClass(JSContext *cx, HandleObject obj);
   
   extern JSObject *
   rpmjs_NewAugObject(JSContext *cx, const char *_root,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmbc-js.h
  
  $ cvs diff -u -r1.1 -r1.1.4.1 rpmbc-js.h
  --- rpm/js/rpmbc-js.h 8 Jul 2009 16:11:24 -   1.1
  +++ rpm/js/rpmbc-js.h 12 Jul 2017 20:00:58 -  1.1.4.1
  @@ -14,7 +14,7 @@
   #endif
   
   extern JSObject *
  -rpmjs_InitBcClass(JSContext *cx, JSObject* obj);
  +rpmjs_InitBcClass(JSContext *cx, HandleObject obj);
   
   extern JSObject *
   rpmjs_NewBcObject(JSContext *cx);
  @@ .
  patch -p0 <<'@@ .'
  In

[CVS] RPM: rpm-5_4: rpm/js/ rpmbf-js.c rpmbf-js.h

2017-07-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   12-Jul-2017 21:48:42
  Branch: rpm-5_4  Handle: 2017071219484100

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmbf-js.c rpmbf-js.h

  Log:
 rpmbf-js: proof-of-concept rpmbfClass.

  Summary:
RevisionChanges Path
1.10.4.11   +230 -189   rpm/js/rpmbf-js.c
1.4.4.1 +1  -1  rpm/js/rpmbf-js.h
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmbf-js.c
  
  $ cvs diff -u -r1.10.4.10 -r1.10.4.11 rpmbf-js.c
  --- rpm/js/rpmbf-js.c 11 Jul 2017 11:50:41 -  1.10.4.10
  +++ rpm/js/rpmbf-js.c 12 Jul 2017 19:48:41 -  1.10.4.11
  @@ -13,140 +13,121 @@
   #include "debug.h"
   
   /*@unchecked@*/
  -static int _debug = 0;
  -
  -#define  rpmbf_addprop   JS_PropertyStub
  -#define  rpmbf_delprop   JS_PropertyStub
  -#define  rpmbf_convert   JS_ConvertStub
  -
  +static int _debug = -1;
  +#if !defined(SPEW)
  +# define SPEW(_fmt, ...) \
  +if (_debug || _rpmbf_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +#endif
  +  
   static bool
   rpmbf_add(JSContext *cx, unsigned argc, Value* vp)
   {
  +//SPEW("==> %s(%p,%u,%p)\n", __FUNCTION__, cx, argc, vp);
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmbf bf = (rpmbf) ptr;
  -bool ok = false;
  -const char * _s = NULL;
  +bool ok = true;
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -args.rval().setBoolean(false);
  -if (!(ok = JS_ConvertArguments(cx, args, "s", &_s)))
  -goto exit;
  +RootedString str(cx, ToString(cx, args[0]));
  +const char * _s = JS_EncodeStringToUTF8(cx, str);
   
   args.rval().setBoolean(rpmbfAdd(bf, _s, 0) == 0);
  -ok = true;
  -exit:
   return ok;
   }
   
   static bool
   rpmbf_chk(JSContext *cx, unsigned argc, Value* vp)
   {
  +//SPEW("==> %s(%p,%u,%p)\n", __FUNCTION__, cx, argc, vp);
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmbf bf = (rpmbf) ptr;
  -bool ok = false;
  -const char * _s = NULL;
  +bool ok = true;
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -args.rval().setBoolean(false);
  -if (!(ok = JS_ConvertArguments(cx, args, "s", &_s)))
  -goto exit;
  +RootedString str(cx, ToString(cx, args[0]));
  +const char * _s = JS_EncodeStringToUTF8(cx, str);
   
   args.rval().setBoolean(rpmbfChk(bf, _s, 0) > 0);
  -ok = true;
  -exit:
   return ok;
   }
   
   static bool
   rpmbf_clr(JSContext *cx, unsigned argc, Value* vp)
   {
  +//SPEW("==> %s(%p,%u,%p)\n", __FUNCTION__, cx, argc, vp);
  +CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmbf bf = (rpmbf) ptr;
  -bool ok = false;
  +bool ok = true;
   
   _METHOD_DEBUG_ENTRY(_debug);
   
   args.rval().setBoolean(rpmbfClr(bf) == 0);
  -ok = true;
   return ok;
   }
   
   static bool
   rpmbf_del(JSContext *cx, unsigned argc, Value* vp)
   {
  +//SPEW("==> %s(%p,%u,%p)\n", __FUNCTION__, cx, argc, vp);
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmbf bf = (rpmbf) ptr;
  -bool ok = false;
  -const char * _s = NULL;
  +bool ok = true;
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -args.rval().setBoolean(false);
  -if (!(ok = JS_ConvertArguments(cx, args, "s", &_s)))
  -goto exit;
  +RootedString str(cx, ToString(cx, args[0]));
  +const char * _s = JS_EncodeStringToUTF8(cx, str);
   
   args.rval().setBoolean(rpmbfDel(bf, _s, 0) == 0);
  -ok = true;
  -exit:
   return ok;
   }
   
   static bool
   rpmbf_intersect(JSContext *cx, unsigned argc, Value* vp)
   {
  +//SPEW("==> %s(%p,%u,%p)\n", __FUNCTION__, cx, argc, vp);
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmbf _a = (rpmbf) ptr;
  -JSObject * o = NULL;
  -rpmbf _b = NULL;
  -bool ok = false;
  +bool ok = true;
   
   _METHOD_DEBUG_E

[CVS] RPM: rpm-5_4: rpm/js/ rpmjs45.cpp

2017-07-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   12-Jul-2017 21:47:19
  Branch: rpm-5_4  Handle: 2017071219471900

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmjs45.cpp

  Log:
- rpmjs: create rpmNewGlobalObject().

  Summary:
RevisionChanges Path
1.1.2.11+106 -5 rpm/js/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmjs45.cpp
  --- rpm/js/rpmjs45.cpp10 Jul 2017 20:11:22 -  1.1.2.10
  +++ rpm/js/rpmjs45.cpp12 Jul 2017 19:47:19 -  1.1.2.11
  @@ -10,8 +10,10 @@
   /*==*/
   #include "shell/OSObject.cpp"
   /*==*/
  -#define mainmozMain
  +#define main mozMain
  +#define  NewGlobalObject mozNewGlobalObject
   #include "shell/js.cpp"
  +#undef   NewGlobalObject
   #undef   main
   /*==*/
   #include "shell/jsoptparse.cpp"
  @@ -23,7 +25,7 @@
   
   static int rpmjss_nopens;
   
  -static int _rpmjss45_debug;
  +static int _rpmjss45_debug = -1;
   #define SPEW(_fmt, ...) \
   if (_rpmjss45_debug) \
fprintf(stderr, _fmt, __VA_ARGS__)
  @@ -39,6 +41,104 @@
   rpmjss jss = &_jss;
   
   /*==*/
  +#include "rpmbf-js.c"
  +
  +static JSObject*
  +rpmNewGlobalObject(JSContext* cx, JS::CompartmentOptions& options,
  +JSPrincipals* principals)
  +{
  +RootedObject glob(cx, JS_NewGlobalObject(cx, _class, principals,
  + JS::DontFireOnNewGlobalHook, 
options));
  +if (!glob)
  +return nullptr;
  +
  +{
  +JSAutoCompartment ac(cx, glob);
  +
  +#ifndef LAZY_STANDARD_CLASSES
  +if (!JS_InitStandardClasses(cx, glob))
  +return nullptr;
  +#endif
  +
  +bool succeeded;
  +if (!JS_SetImmutablePrototype(cx, glob, ))
  +return nullptr;
  +MOZ_ASSERT(succeeded,
  +   "a fresh, unexposed global object is always capable of "
  +   "having its [[Prototype]] be immutable");
  +
  +#ifdef JS_HAS_CTYPES
  +if (!JS_InitCTypesClass(cx, glob))
  +return nullptr;
  +#endif
  +
  + if (!rpmjs_InitBfClass(cx, glob))
  + return nullptr;
  +
  +if (!JS_InitReflectParse(cx, glob))
  +return nullptr;
  +if (!JS_DefineDebuggerObject(cx, glob))
  +return nullptr;
  +if (!JS::RegisterPerfMeasurement(cx, glob))
  +return nullptr;
  +if (!JS_DefineFunctionsWithHelp(cx, glob, shell_functions) ||
  +!JS_DefineProfilingFunctions(cx, glob))
  +{
  +return nullptr;
  +}
  +if (!js::DefineTestingFunctions(cx, glob, fuzzingSafe, 
disableOOMFunctions))
  +return nullptr;
  +
  +if (!fuzzingSafe) {
  +if (!JS_DefineFunctionsWithHelp(cx, glob, 
fuzzing_unsafe_functions))
  +return nullptr;
  +if (!DefineConsole(cx, glob))
  +return nullptr;
  +}
  +
  +if (!DefineOS(cx, glob, fuzzingSafe))
  +return nullptr;
  +
  +RootedObject performanceObj(cx, JS_NewObject(cx, nullptr));
  +if (!performanceObj)
  +return nullptr;
  +RootedObject mozMemoryObj(cx, JS_NewObject(cx, nullptr));
  +if (!mozMemoryObj)
  +return nullptr;
  +RootedObject gcObj(cx, gc::NewMemoryInfoObject(cx));
  +if (!gcObj)
  +return nullptr;
  +if (!JS_DefineProperty(cx, glob, "performance", performanceObj, 
JSPROP_ENUMERATE))
  +return nullptr;
  +if (!JS_DefineProperty(cx, performanceObj, "mozMemory", 
mozMemoryObj, JSPROP_ENUMERATE))
  +return nullptr;
  +if (!JS_DefineProperty(cx, mozMemoryObj, "gc", gcObj, 
JSPROP_ENUMERATE))
  +return nullptr;
  +
  +/* Initialize FakeDOMObject. */
  +static const js::DOMCallbacks DOMcallbacks = {
  +InstanceClassHasProtoAtDepth
  +};
  +SetDOMCallbacks(cx->runtime(), );
  +
  +RootedObject domProto(cx, JS_InitClass(cx, glob, nullptr, 
_class, dom_constructor,
  +

[CVS] RPM: rpm-5_4: rpm/js/tscripts/ Bc.js Bf.js Cudf.js Dc.js Dig.js ...

2017-07-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   12-Jul-2017 21:46:03
  Branch: rpm-5_4  Handle: 2017071219460200

  Added files:  (Branch: rpm-5_4)
rpm/js/tscripts ack.js
  Modified files:   (Branch: rpm-5_4)
rpm/js/tscripts Bc.js Bf.js Cudf.js Dc.js Dig.js Dir.js Ds.js
Fc.js Fts.js Gi.js Io.js Iob.js Mc.js Mg.js Sw.js
Syck.js Uuid.js

  Log:
- rpmjs: remove GPSEE modules.

  Summary:
RevisionChanges Path
1.2.4.1 +2  -4  rpm/js/tscripts/Bc.js
1.4.4.1 +9  -6  rpm/js/tscripts/Bf.js
1.4.4.1 +6  -8  rpm/js/tscripts/Cudf.js
1.29.4.1+102 -104   rpm/js/tscripts/Dc.js
1.2.4.1 +2  -4  rpm/js/tscripts/Dig.js
1.5.4.1 +2  -4  rpm/js/tscripts/Dir.js
1.13.4.1+2  -4  rpm/js/tscripts/Ds.js
1.2.4.1 +2  -4  rpm/js/tscripts/Fc.js
1.5.4.1 +2  -5  rpm/js/tscripts/Fts.js
1.2.4.1 +2  -4  rpm/js/tscripts/Gi.js
1.6.4.1 +11 -14 rpm/js/tscripts/Io.js
1.2.4.1 +2  -4  rpm/js/tscripts/Iob.js
1.5.4.1 +6  -8  rpm/js/tscripts/Mc.js
1.2.4.1 +3  -5  rpm/js/tscripts/Mg.js
1.2.4.1 +2  -4  rpm/js/tscripts/Sw.js
1.2.4.1 +1  -3  rpm/js/tscripts/Syck.js
1.5.4.1 +2  -3  rpm/js/tscripts/Uuid.js
1.1.2.1 +25 -0  rpm/js/tscripts/ack.js
  

  patch -p0 <<'@@ .'
  Index: rpm/js/tscripts/Bc.js
  
  $ cvs diff -u -r1.2 -r1.2.4.1 Bc.js
  --- rpm/js/tscripts/Bc.js 11 Jan 2010 22:15:38 -  1.2
  +++ rpm/js/tscripts/Bc.js 12 Jul 2017 19:46:02 -  1.2.4.1
  @@ -1,10 +1,8 @@
   if (loglvl) print("--> Bc.js");
   
  -var GPSEE = require('rpmbc');
  -
  -var bc = new GPSEE.Bc();
  +var bc = new Bc();
   ack("typeof bc;", "object");
  -ack("bc instanceof GPSEE.Bc;", true);
  +ack("bc instanceof Bc;", true);
   ack("bc.debug = 1;", 1);
   ack("bc.debug = 0;", 0);
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/tscripts/Bf.js
  
  $ cvs diff -u -r1.4 -r1.4.4.1 Bf.js
  --- rpm/js/tscripts/Bf.js 11 Jan 2010 20:17:39 -  1.4
  +++ rpm/js/tscripts/Bf.js 12 Jul 2017 19:46:02 -  1.4.4.1
  @@ -1,29 +1,32 @@
   if (loglvl) print("--> Bf.js");
   
  -var GPSEE = require("rpmbf");
  +ack("Object.getOwnPropertyNames(Bf).sort();", "length,name,prototype");
  +ack("Bf.length;", 1);
  +ack("Bf.name;", "Bf");
  +ack("Bf.prototype;", "[object Bf]");
   
  -var bf = new GPSEE.Bf(0,0);
  +var bf = new Bf(0,0);
   ack("typeof bf;", "object");
  -// ack("bf instanceof rpmbf.Bf;", true);
  +ack("bf instanceof Bf;", true);
   ack("bf.debug = 1;", 1);
   ack("bf.debug = 0;", 0);
   
   ack("bf.clr();", true);
   delete bf;
   
  -var a = new GPSEE.Bf(3 * 1024, 8);
  +var a = new Bf(3 * 1024, 8);
   ack("a.add('foo');", true);
   ack("a.chk('foo');", true);
   ack("a.chk('bar');", false);
   ack("a.chk('baz');", false);
   
  -var b = new GPSEE.Bf(3 * 1024, 8);
  +var b = new Bf(3 * 1024, 8);
   ack("b.add('bar');", true);
   ack("b.chk('foo');", false);
   ack("b.chk('bar');", true);
   ack("b.chk('baz');", false);
   
  -var c = new GPSEE.Bf(3 * 1024, 8);
  +var c = new Bf(3 * 1024, 8);
   ack("c.chk('foo');", false);
   ack("c.chk('bar');", false);
   ack("c.chk('baz');", false);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/tscripts/Cudf.js
  
  $ cvs diff -u -r1.4 -r1.4.4.1 Cudf.js
  --- rpm/js/tscripts/Cudf.js   11 Jan 2010 22:15:38 -  1.4
  +++ rpm/js/tscripts/Cudf.js   12 Jul 2017 19:46:02 -  1.4.4.1
  @@ -3,11 +3,9 @@
   var RPMCUDV_CUDFDOC  = 257;
   var RPMCUDV_CUDF = 258;
   
  -var GPSEE = require('rpmcudf');
  -
  -var cudf = new GPSEE.Cudf();
  +var cudf = new Cudf();
   ack("typeof cudf;", "object");
  -ack("cudf instanceof GPSEE.Cudf;", true);
  +ack("cudf instanceof Cudf;", true);
   ack("cudf.debug = 1;", 1);
   ack("cudf.debug = 0;", 0);
   
  @@ -22,13 +20,13 @@
   delete cudf
  

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmcudf-js.c rpmdb-js.c rpmdbc...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 13:55:38
  Branch: rpm-5_4  Handle: 201707553700

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmcudf-js.c rpmdb-js.c rpmdbc-js.c
rpmdbe-js.c rpmdc-js.c rpmfi-js.c rpmfts-js.c
rpmio-js.c rpmjsfile.c rpmmc-js.c rpmmpf-js.c
rpmmpw-js.c rpmseq-js.c rpmsys-js.c rpmte-js.c
rpmts-js.c rpmtxn-js.c

  Log:
=rpmjs: convert JSVAL_NULL/JSVAL_VOID returns.

  Summary:
RevisionChanges Path
1.11.4.12   +3  -3  rpm/js/rpmaug-js.c
1.6.4.11+2  -2  rpm/js/rpmcudf-js.c
1.31.4.10   +10 -10 rpm/js/rpmdb-js.c
1.14.4.10   +10 -10 rpm/js/rpmdbc-js.c
1.21.4.11   +15 -15 rpm/js/rpmdbe-js.c
1.9.4.11+2  -2  rpm/js/rpmdc-js.c
1.15.4.9+2  -2  rpm/js/rpmfi-js.c
1.10.4.9+2  -2  rpm/js/rpmfts-js.c
1.9.4.11+8  -8  rpm/js/rpmio-js.c
1.4.4.4 +3  -3  rpm/js/rpmjsfile.c
1.12.4.10   +1  -1  rpm/js/rpmmc-js.c
1.7.4.10+1  -1  rpm/js/rpmmpf-js.c
1.21.4.11   +6  -6  rpm/js/rpmmpw-js.c
1.7.4.10+7  -7  rpm/js/rpmseq-js.c
1.8.4.10+5  -5  rpm/js/rpmsys-js.c
1.19.4.10   +5  -5  rpm/js/rpmte-js.c
1.33.4.11   +4  -4  rpm/js/rpmts-js.c
1.11.4.10   +3  -3  rpm/js/rpmtxn-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.11 -r1.11.4.12 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 11:50:41 -  1.11.4.11
  +++ rpm/js/rpmaug-js.c11 Jul 2017 11:55:37 -  1.11.4.12
  @@ -85,7 +85,7 @@
   default:
   case 0:  /* not found */
   case -1: /* multiply defined */
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
   }
   ok = true;
  @@ -115,7 +115,7 @@
break;
   default:
   case -1: /* multiply defined */
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
   }
   ok = true;
  @@ -225,7 +225,7 @@
   
   nmatches = rpmaugMatch(aug, _path, &_matches);
   if (nmatches <= 0) { /* not found */
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
goto exit;
   } else {
JSObject *o;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmcudf-js.c
  
  $ cvs diff -u -r1.6.4.10 -r1.6.4.11 rpmcudf-js.c
  --- rpm/js/rpmcudf-js.c   11 Jul 2017 11:50:41 -  1.6.4.10
  +++ rpm/js/rpmcudf-js.c   11 Jul 2017 11:55:37 -  1.6.4.11
  @@ -65,7 +65,7 @@
Y = rpmcudfFree(Y);
_fn = _free(_fn);
   } else
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
   ok = true;
   
   exit:
  @@ -90,7 +90,7 @@
*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, rpmiobStr(cudf->iob)));
(void) rpmiobEmpty(cudf->iob);
   } else
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
   ok = true;
   
   return ok;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmdb-js.c
  
  $ cvs diff -u -r1.31.4.9 -r1.31.4.10 rpmdb-js.c
  --- rpm/js/rpmdb-js.c 11 Jul 2017 11:50:41 -  1.31.4.9
  +++ rpm/js/rpmdb-js.c 11 Jul 2017 11:55:37 -  1.31.4.10
  @@ -396,7 +396,7 @@
args.rval().setBoolean(true);
break;
case DB_NOTFOUND:
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
}
   }
  @@ -446,7 +446,7 @@
args.rval().setBoolean(true);
break;
case DB_NOTFOUND:
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
}
   }
  @@ -508,7 +508,7 @@
*vp = STRING_TO_JSVAL(JS_NewStringCopyN(cx, _RPMDBT_PTR(_d)->data, 
_RPMDBT_PTR(_d)->size));
break;
case DB_NOTFOUND:
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
}
   }
  @@ -745,7 +745,7 @@
*vp = STRING_TO_JSVAL(JS_NewStringCopyN(cx, _RPMDBT_PTR(_d)->data, 
_RPMDBT_PTR(_d)->size));
break;
case DB_NOTFOUND:
  - *vp = JSVAL_VOID;
  + args.rval().setUndefined();
break;
}
   }
  @@ -799,7 +799,7 @@
args.rval().setBoolean(true);

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 13:50:41
  Branch: rpm-5_4  Handle: 201707504100

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-js.c
rpmdbc-js.c rpmdbe-js.c rpmdc-js.c rpmio-js.c
rpmmpf-js.c rpmmpw-js.c rpmseq-js.c rpmsm-js.c
rpmts-js.c rpmtxn-js.c

  Log:
- rpmjs: replace JSVAL_{TRUE,FALSE} returns with
args.rval().setBoolean().

  Summary:
RevisionChanges Path
1.11.4.11   +10 -10 rpm/js/rpmaug-js.c
1.10.4.10   +11 -11 rpm/js/rpmbf-js.c
1.6.4.10+14 -16 rpm/js/rpmcudf-js.c
1.31.4.9+46 -46 rpm/js/rpmdb-js.c
1.14.4.9+16 -17 rpm/js/rpmdbc-js.c
1.21.4.10   +97 -97 rpm/js/rpmdbe-js.c
1.9.4.10+4  -4  rpm/js/rpmdc-js.c
1.9.4.10+8  -8  rpm/js/rpmio-js.c
1.7.4.9 +13 -13 rpm/js/rpmmpf-js.c
1.21.4.10   +6  -6  rpm/js/rpmmpw-js.c
1.7.4.9 +20 -20 rpm/js/rpmseq-js.c
1.8.4.9 +3  -3  rpm/js/rpmsm-js.c
1.33.4.10   +3  -3  rpm/js/rpmts-js.c
1.11.4.9+12 -13 rpm/js/rpmtxn-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.10 -r1.11.4.11 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 11:13:11 -  1.11.4.10
  +++ rpm/js/rpmaug-js.c11 Jul 2017 11:50:41 -  1.11.4.11
  @@ -142,11 +142,11 @@
   
   switch (rpmaugInsert(aug, _path, _label, _before)) {
   case 0:  /* success */
  - *vp = JSVAL_TRUE;
  + args.rval().setBoolean(true);
break;
   default:
   case -1: /* failure */
  - *vp = JSVAL_FALSE;
  + args.rval().setBoolean(false);
break;
   }
   ok = true;
  @@ -194,11 +194,11 @@
   
   switch (rpmaugMv(aug, _src, _dst)) {
   case 0:  /* success */
  - *vp = JSVAL_TRUE;
  + args.rval().setBoolean(true);
break;
   default:
   case -1: /* failure */
  - *vp = JSVAL_FALSE;
  + args.rval().setBoolean(false);
break;
   }
   ok = true;
  @@ -257,11 +257,11 @@
   
   switch (rpmaugSave(aug)) {
   case 0:  /* success */
  - *vp = JSVAL_TRUE;
  + args.rval().setBoolean(true);
break;
   default:
   case -1: /* failure */
  - *vp = JSVAL_FALSE;
  + args.rval().setBoolean(false);
break;
   }
   ok = true;
  @@ -281,11 +281,11 @@
   
   switch (rpmaugLoad(aug)) {
   case 0:  /* success */
  - *vp = JSVAL_TRUE;
  + args.rval().setBoolean(true);
break;
   default:
   case -1: /* failure */
  - *vp = JSVAL_FALSE;
  + args.rval().setBoolean(false);
break;
   }
   ok = true;
  @@ -310,11 +310,11 @@
   
   switch (rpmaugPrint(aug, NULL, _path)) {
   case 0:  /* success */
  - *vp = JSVAL_TRUE;
  + args.rval().setBoolean(true);
break;
   default:
   case -1: /* failure */
  - *vp = JSVAL_FALSE;
  + args.rval().setBoolean(false);
break;
   }
   ok = true;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmbf-js.c
  
  $ cvs diff -u -r1.10.4.9 -r1.10.4.10 rpmbf-js.c
  --- rpm/js/rpmbf-js.c 11 Jul 2017 11:13:11 -  1.10.4.9
  +++ rpm/js/rpmbf-js.c 11 Jul 2017 11:50:41 -  1.10.4.10
  @@ -31,11 +31,11 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -*vp = JSVAL_FALSE;
  +args.rval().setBoolean(false);
   if (!(ok = JS_ConvertArguments(cx, args, "s", &_s)))
   goto exit;
   
  -*vp = (rpmbfAdd(bf, _s, 0) == 0 ? JSVAL_TRUE : JSVAL_FALSE);
  +args.rval().setBoolean(rpmbfAdd(bf, _s, 0) == 0);
   ok = true;
   exit:
   return ok;
  @@ -53,11 +53,11 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -*vp = JSVAL_FALSE;
  +args.rval().setBoolean(false);
   if (!(ok = JS_ConvertArguments(cx, args, "s", &_s)))
   goto exit;
   
  -*vp = (rpmbfChk(bf, _s, 0) > 0 ? JSVAL_TRUE : JSVAL_FALSE);
  +args.rval().setBoolean(rpmbfChk(bf, _s, 0) > 0);
   ok = true;
   exit:
   return ok;
  @@ -73,7 +73,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -*vp = (rpmbfClr(bf) == 0 ? JSVAL_TRUE : JSVAL_FALSE);
  +args.rval().setBoolean(rpmbfClr(bf) == 0);
   ok = true;
   return ok;
   }
  @@ -90,11 +90,11 @@
   
   _METHOD_DEBUG_ENTRY(_debug);

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 13:00:56
  Branch: rpm-5_4  Handle: 201707005500

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-js.c
rpmdbc-js.c rpmdbe-js.c rpmdc-js.c rpmdir-js.c
rpmds-js.c rpmfi-js.c rpmfts-js.c rpmhdr-js.c
rpmio-js.c rpmmc-js.c rpmmg-js.c rpmmi-js.c
rpmmpf-js.c rpmmpw-js.c rpmps-js.c rpmseq-js.c
rpmsm-js.c rpmsp-js.c rpmst-js.c rpmsx-js.c
rpmsys-js.c rpmte-js.c rpmts-js.c rpmtxn-js.c
rpmxar-js.c syck-js.c uuid-js.c

  Log:
- rpmjs: JS_ConvertArguments no longer needs argc.

  Summary:
RevisionChanges Path
1.11.4.9+9  -9  rpm/js/rpmaug-js.c
1.10.4.8+6  -6  rpm/js/rpmbf-js.c
1.6.4.8 +2  -2  rpm/js/rpmcudf-js.c
1.31.4.7+20 -20 rpm/js/rpmdb-js.c
1.14.4.7+7  -7  rpm/js/rpmdbc-js.c
1.21.4.8+40 -40 rpm/js/rpmdbe-js.c
1.9.4.8 +4  -4  rpm/js/rpmdc-js.c
1.8.4.6 +2  -2  rpm/js/rpmdir-js.c
1.20.4.7+1  -1  rpm/js/rpmds-js.c
1.15.4.7+1  -1  rpm/js/rpmfi-js.c
1.10.4.7+5  -5  rpm/js/rpmfts-js.c
1.24.4.8+5  -5  rpm/js/rpmhdr-js.c
1.9.4.8 +11 -11 rpm/js/rpmio-js.c
1.12.4.8+4  -4  rpm/js/rpmmc-js.c
1.4.4.7 +2  -2  rpm/js/rpmmg-js.c
1.28.4.8+5  -5  rpm/js/rpmmi-js.c
1.7.4.7 +5  -5  rpm/js/rpmmpf-js.c
1.21.4.8+3  -3  rpm/js/rpmmpw-js.c
1.18.4.8+1  -1  rpm/js/rpmps-js.c
1.7.4.7 +8  -8  rpm/js/rpmseq-js.c
1.8.4.7 +2  -2  rpm/js/rpmsm-js.c
1.4.4.7 +1  -1  rpm/js/rpmsp-js.c
1.10.4.6+2  -2  rpm/js/rpmst-js.c
1.8.4.8 +1  -1  rpm/js/rpmsx-js.c
1.8.4.8 +16 -16 rpm/js/rpmsys-js.c
1.19.4.8+3  -3  rpm/js/rpmte-js.c
1.33.4.8+3  -3  rpm/js/rpmts-js.c
1.11.4.7+3  -3  rpm/js/rpmtxn-js.c
1.5.4.7 +1  -1  rpm/js/rpmxar-js.c
1.9.4.7 +2  -2  rpm/js/syck-js.c
1.18.4.7+2  -2  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.8 -r1.11.4.9 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 10:54:44 -  1.11.4.8
  +++ rpm/js/rpmaug-js.c11 Jul 2017 11:00:55 -  1.11.4.9
  @@ -42,7 +42,7 @@
   _METHOD_DEBUG_ENTRY(_debug);
   
   /* XXX note optional EXPR. If EXPR is NULL, then NAME is deleted. */
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "s/s", &_name, &_expr)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "s/s", &_name, &_expr)))
   goto exit;
   
   switch (rpmaugDefvar(aug, _name, _expr)) {
  @@ -72,7 +72,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "s", &_path)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "s", &_path)))
   goto exit;
   
   switch (rpmaugGet(aug, _path, &_value)) {
  @@ -106,7 +106,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "ss", &_path, &_value)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "ss", &_path, &_value)))
   goto exit;
   
   switch (rpmaugSet(aug, _path, _value)) {
  @@ -137,7 +137,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "ssi", &_path, &_label, 
&_before)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "ssi", &_path, &_label, 
&_before)))
   goto exit;
   
   switch (rpmaugInsert(aug, _path, _label, _before)) {
  @@ -166,7 +166,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "s", &_path)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "s", &_path)))
   goto exit;
   
   /* XXX rpmaug_rm() returns number of deleted nodes. */
  @@ -189,7 +189,7 @@
   
   _METHOD_DEBUG_ENTRY(_debug);
   
  -if (!(ok = JS_ConvertArguments(cx, argc, argv, "ss", &_src, &_dst)))
  +if (!(ok = JS_ConvertArguments(cx, argv, "ss", &_src, &_dst)))
   goto exit;
   
   switch (rpmaugMv(aug, _src, _dst)

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 12:54:45
  Branch: rpm-5_4  Handle: 2017071110544401

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-js.c
rpmdc-js.c rpmdig-js.c rpmds-js.c rpmfc-js.c
rpmfi-js.c rpmgi-js.c rpmhdr-js.c rpmio-js.c
rpmiob-js.c rpmmc-js.c rpmmg-js.c rpmmi-js.c
rpmps-js.c rpmsm-js.c rpmsp-js.c rpmsw-js.c
rpmsx-js.c rpmsys-js.c rpmte-js.c rpmts-js.c
rpmxar-js.c

  Log:
- rpmjs: C++ will need casts.

  Summary:
RevisionChanges Path
1.11.4.8+14 -14 rpm/js/rpmaug-js.c
1.4.4.6 +1  -1  rpm/js/rpmbc-js.c
1.10.4.7+10 -10 rpm/js/rpmbf-js.c
1.6.4.7 +4  -4  rpm/js/rpmcudf-js.c
1.9.4.7 +6  -6  rpm/js/rpmdc-js.c
1.5.2.6 +1  -1  rpm/js/rpmdig-js.c
1.20.4.6+3  -3  rpm/js/rpmds-js.c
1.4.4.6 +1  -1  rpm/js/rpmfc-js.c
1.15.4.6+4  -4  rpm/js/rpmfi-js.c
1.4.4.6 +1  -1  rpm/js/rpmgi-js.c
1.24.4.7+9  -9  rpm/js/rpmhdr-js.c
1.9.4.7 +21 -21 rpm/js/rpmio-js.c
1.4.4.6 +1  -1  rpm/js/rpmiob-js.c
1.12.4.7+5  -5  rpm/js/rpmmc-js.c
1.4.4.6 +3  -3  rpm/js/rpmmg-js.c
1.28.4.7+8  -8  rpm/js/rpmmi-js.c
1.18.4.7+5  -5  rpm/js/rpmps-js.c
1.8.4.6 +3  -3  rpm/js/rpmsm-js.c
1.4.4.6 +2  -2  rpm/js/rpmsp-js.c
1.4.4.6 +1  -1  rpm/js/rpmsw-js.c
1.8.4.7 +2  -2  rpm/js/rpmsx-js.c
1.8.4.7 +18 -18 rpm/js/rpmsys-js.c
1.19.4.7+4  -4  rpm/js/rpmte-js.c
1.33.4.7+13 -13 rpm/js/rpmts-js.c
1.5.4.6 +2  -2  rpm/js/rpmxar-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.7 -r1.11.4.8 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 10:49:38 -  1.11.4.7
  +++ rpm/js/rpmaug-js.c11 Jul 2017 10:54:44 -  1.11.4.8
  @@ -34,7 +34,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _name = NULL;
   const char * _expr = NULL;
  @@ -65,7 +65,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _path = NULL;
   const char * _value = NULL;
  @@ -99,7 +99,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _path = NULL;
   const char * _value = NULL;
  @@ -129,7 +129,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _path = NULL;
   const char * _label = NULL;
  @@ -160,7 +160,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _path = NULL;
   
  @@ -182,7 +182,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _src = NULL;
   const char * _dst = NULL;
  @@ -212,7 +212,7 @@
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
  -rpmaug aug = ptr;
  +rpmaug aug = (rpmaug) ptr;
   bool ok = false;
   const char * _path = NULL;
   char ** _matches = NULL;
  @@ -250,7 +250,7 @@
   CallArgs argv = CallArgsFromVp(ar

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 12:49:39
  Branch: rpm-5_4  Handle: 2017071110493801

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-js.c
rpmdb-js.c rpmdbc-js.c rpmdbe-js.c rpmdc-js.c
rpmdig-js.c rpmdir-js.c rpmds-js.c rpmfc-js.c
rpmfi-js.c rpmfts-js.c rpmgi-js.c rpmhdr-js.c
rpmio-js.c rpmiob-js.c rpmmc-js.c rpmmg-js.c
rpmmi-js.c rpmmpf-js.c rpmmpw-js.c rpmps-js.c
rpmseq-js.c rpmsm-js.c rpmsp-js.c rpmst-js.c
rpmsw-js.c rpmsx-js.c rpmsys-js.c rpmte-js.c
rpmts-js.c rpmtxn-js.c rpmxar-js.c syck-js.c
uuid-js.c

  Log:
- rpmjs: use nullptr not NULL.

  Summary:
RevisionChanges Path
1.11.4.7+14 -14 rpm/js/rpmaug-js.c
1.4.4.5 +4  -4  rpm/js/rpmbc-js.c
1.10.4.6+10 -10 rpm/js/rpmbf-js.c
1.6.4.6 +6  -6  rpm/js/rpmcudf-js.c
1.31.4.6+26 -26 rpm/js/rpmdb-js.c
1.14.4.6+13 -13 rpm/js/rpmdbc-js.c
1.21.4.7+56 -56 rpm/js/rpmdbe-js.c
1.9.4.6 +7  -7  rpm/js/rpmdc-js.c
1.5.2.5 +4  -4  rpm/js/rpmdig-js.c
1.8.4.5 +5  -5  rpm/js/rpmdir-js.c
1.20.4.5+5  -5  rpm/js/rpmds-js.c
1.4.4.5 +4  -4  rpm/js/rpmfc-js.c
1.15.4.5+5  -5  rpm/js/rpmfi-js.c
1.10.4.6+10 -10 rpm/js/rpmfts-js.c
1.4.4.5 +4  -4  rpm/js/rpmgi-js.c
1.24.4.6+11 -11 rpm/js/rpmhdr-js.c
1.9.4.6 +22 -22 rpm/js/rpmio-js.c
1.4.4.5 +4  -4  rpm/js/rpmiob-js.c
1.12.4.6+8  -8  rpm/js/rpmmc-js.c
1.4.4.5 +5  -5  rpm/js/rpmmg-js.c
1.28.4.6+9  -9  rpm/js/rpmmi-js.c
1.7.4.6 +9  -9  rpm/js/rpmmpf-js.c
1.21.4.7+14 -14 rpm/js/rpmmpw-js.c
1.18.4.6+6  -6  rpm/js/rpmps-js.c
1.7.4.6 +10 -10 rpm/js/rpmseq-js.c
1.8.4.5 +4  -4  rpm/js/rpmsm-js.c
1.4.4.5 +4  -4  rpm/js/rpmsp-js.c
1.10.4.5+4  -4  rpm/js/rpmst-js.c
1.4.4.5 +4  -4  rpm/js/rpmsw-js.c
1.8.4.6 +4  -4  rpm/js/rpmsx-js.c
1.8.4.6 +21 -21 rpm/js/rpmsys-js.c
1.19.4.6+6  -6  rpm/js/rpmte-js.c
1.33.4.6+14 -14 rpm/js/rpmts-js.c
1.11.4.6+8  -8  rpm/js/rpmtxn-js.c
1.5.4.5 +5  -5  rpm/js/rpmxar-js.c
1.9.4.6 +4  -4  rpm/js/syck-js.c
1.18.4.6+6  -6  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.6 -r1.11.4.7 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 10:42:14 -  1.11.4.6
  +++ rpm/js/rpmaug-js.c11 Jul 2017 10:49:38 -  1.11.4.7
  @@ -33,7 +33,7 @@
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
  -void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
  +void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmaug aug = ptr;
   bool ok = false;
   const char * _name = NULL;
  @@ -64,7 +64,7 @@
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
  -void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
  +void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmaug aug = ptr;
   bool ok = false;
   const char * _path = NULL;
  @@ -98,7 +98,7 @@
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
  -void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
  +void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmaug aug = ptr;
   bool ok = false;
   const char * _path = NULL;
  @@ -128,7 +128,7 @@
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
  -void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
  +void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmaug aug = ptr;
   bool ok = false;
   const char * _path = NULL;
  @@ -159,7 +159,7 @@
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
  -void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
  +void * ptr = JS_GetInstancePrivate(cx, obj, , nullptr);
   rpmaug aug = ptr;
   b

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 12:42:15
  Branch: rpm-5_4  Handle: 2017071110421400

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbf-js.c rpmcudf-js.c rpmdb-js.c
rpmdbc-js.c rpmdbe-js.c rpmdc-js.c rpmfts-js.c
rpmhdr-js.c rpmio-js.c rpmmc-js.c rpmmi-js.c
rpmmpf-js.c rpmmpw-js.c rpmps-js.c rpmseq-js.c
rpmsys-js.c rpmte-js.c rpmts-js.c rpmtxn-js.c
syck-js.c uuid-js.c

  Log:
- rpmjs: retrieve a rooted "this" object".

  Summary:
RevisionChanges Path
1.11.4.6+10 -10 rpm/js/rpmaug-js.c
1.10.4.5+6  -6  rpm/js/rpmbf-js.c
1.6.4.5 +2  -2  rpm/js/rpmcudf-js.c
1.31.4.5+21 -21 rpm/js/rpmdb-js.c
1.14.4.5+8  -8  rpm/js/rpmdbc-js.c
1.21.4.6+52 -52 rpm/js/rpmdbe-js.c
1.9.4.5 +3  -3  rpm/js/rpmdc-js.c
1.10.4.5+5  -5  rpm/js/rpmfts-js.c
1.24.4.5+5  -5  rpm/js/rpmhdr-js.c
1.9.4.5 +17 -17 rpm/js/rpmio-js.c
1.12.4.5+4  -4  rpm/js/rpmmc-js.c
1.28.4.5+4  -4  rpm/js/rpmmi-js.c
1.7.4.5 +5  -5  rpm/js/rpmmpf-js.c
1.21.4.6+10 -10 rpm/js/rpmmpw-js.c
1.18.4.5+2  -2  rpm/js/rpmps-js.c
1.7.4.5 +6  -6  rpm/js/rpmseq-js.c
1.8.4.5 +16 -16 rpm/js/rpmsys-js.c
1.19.4.5+2  -2  rpm/js/rpmte-js.c
1.33.4.5+7  -7  rpm/js/rpmts-js.c
1.11.4.5+4  -4  rpm/js/rpmtxn-js.c
1.9.4.5 +2  -2  rpm/js/syck-js.c
1.18.4.5+2  -2  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.5 -r1.11.4.6 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 10:17:11 -  1.11.4.5
  +++ rpm/js/rpmaug-js.c11 Jul 2017 10:42:14 -  1.11.4.6
  @@ -32,7 +32,7 @@
   rpmaug_defvar(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -63,7 +63,7 @@
   rpmaug_get(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -97,7 +97,7 @@
   rpmaug_set(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -127,7 +127,7 @@
   rpmaug_insert(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -158,7 +158,7 @@
   rpmaug_rm(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -180,7 +180,7 @@
   rpmaug_mv(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -210,7 +210,7 @@
   rpmaug_match(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
   bool ok = false;
  @@ -248,7 +248,7 @@
   rpmaug_save(JSContext *cx, unsigned argc, Value* vp)
   {
   CallArgs argv = CallArgsFromVp(argc, vp);
  -JSObject *obj = JS_THIS_OBJECT(cx, vp);
  +  

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 12:17:13
  Branch: rpm-5_4  Handle: 2017071110171101

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-js.c
rpmdb-js.c rpmdbc-js.c rpmdbe-js.c rpmdc-js.c
rpmdig-js.c rpmdir-js.c rpmds-js.c rpmfc-js.c
rpmfi-js.c rpmfts-js.c rpmgi-js.c rpmhdr-js.c
rpmio-js.c rpmiob-js.c rpmmc-js.c rpmmg-js.c
rpmmi-js.c rpmmpf-js.c rpmmpw-js.c rpmps-js.c
rpmseq-js.c rpmsm-js.c rpmsp-js.c rpmst-js.c
rpmsw-js.c rpmsx-js.c rpmsys-js.c rpmte-js.c
rpmts-js.c rpmtxn-js.c rpmxar-js.c syck-js.c
uuid-js.c

  Log:
- rpmjs: use CallArgsFromVp instead of JS_ARGV.

  Summary:
RevisionChanges Path
1.11.4.5+11 -11 rpm/js/rpmaug-js.c
1.4.4.4 +1  -1  rpm/js/rpmbc-js.c
1.10.4.4+6  -6  rpm/js/rpmbf-js.c
1.6.4.4 +3  -3  rpm/js/rpmcudf-js.c
1.31.4.4+23 -23 rpm/js/rpmdb-js.c
1.14.4.4+10 -10 rpm/js/rpmdbc-js.c
1.21.4.5+54 -54 rpm/js/rpmdbe-js.c
1.9.4.4 +5  -5  rpm/js/rpmdc-js.c
1.5.2.4 +1  -1  rpm/js/rpmdig-js.c
1.8.4.4 +2  -2  rpm/js/rpmdir-js.c
1.20.4.4+1  -1  rpm/js/rpmds-js.c
1.4.4.4 +1  -1  rpm/js/rpmfc-js.c
1.15.4.4+1  -1  rpm/js/rpmfi-js.c
1.10.4.4+7  -7  rpm/js/rpmfts-js.c
1.4.4.4 +1  -1  rpm/js/rpmgi-js.c
1.24.4.4+6  -6  rpm/js/rpmhdr-js.c
1.9.4.4 +19 -19 rpm/js/rpmio-js.c
1.4.4.4 +1  -1  rpm/js/rpmiob-js.c
1.12.4.4+5  -5  rpm/js/rpmmc-js.c
1.4.4.4 +2  -2  rpm/js/rpmmg-js.c
1.28.4.4+5  -5  rpm/js/rpmmi-js.c
1.7.4.4 +7  -7  rpm/js/rpmmpf-js.c
1.21.4.5+12 -12 rpm/js/rpmmpw-js.c
1.18.4.4+3  -3  rpm/js/rpmps-js.c
1.7.4.4 +8  -8  rpm/js/rpmseq-js.c
1.8.4.4 +2  -2  rpm/js/rpmsm-js.c
1.4.4.4 +2  -2  rpm/js/rpmsp-js.c
1.10.4.4+2  -2  rpm/js/rpmst-js.c
1.4.4.4 +1  -1  rpm/js/rpmsw-js.c
1.8.4.5 +2  -2  rpm/js/rpmsx-js.c
1.8.4.4 +17 -17 rpm/js/rpmsys-js.c
1.19.4.4+3  -3  rpm/js/rpmte-js.c
1.33.4.4+8  -8  rpm/js/rpmts-js.c
1.11.4.4+6  -6  rpm/js/rpmtxn-js.c
1.5.4.4 +1  -1  rpm/js/rpmxar-js.c
1.9.4.4 +3  -3  rpm/js/syck-js.c
1.18.4.4+3  -3  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.4 -r1.11.4.5 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 10:12:47 -  1.11.4.4
  +++ rpm/js/rpmaug-js.c11 Jul 2017 10:17:11 -  1.11.4.5
  @@ -31,7 +31,7 @@
   static bool
   rpmaug_defvar(JSContext *cx, unsigned argc, Value* vp)
   {
  -jsval *argv = JS_ARGV(cx, vp);
  +CallArgs argv = CallArgsFromVp(argc, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
  @@ -62,7 +62,7 @@
   static bool
   rpmaug_get(JSContext *cx, unsigned argc, Value* vp)
   {
  -jsval *argv = JS_ARGV(cx, vp);
  +CallArgs argv = CallArgsFromVp(argc, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
  @@ -96,7 +96,7 @@
   static bool
   rpmaug_set(JSContext *cx, unsigned argc, Value* vp)
   {
  -jsval *argv = JS_ARGV(cx, vp);
  +CallArgs argv = CallArgsFromVp(argc, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
  @@ -126,7 +126,7 @@
   static bool
   rpmaug_insert(JSContext *cx, unsigned argc, Value* vp)
   {
  -jsval *argv = JS_ARGV(cx, vp);
  +CallArgs argv = CallArgsFromVp(argc, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
  @@ -157,7 +157,7 @@
   static bool
   rpmaug_rm(JSContext *cx, unsigned argc, Value* vp)
   {
  -jsval *argv = JS_ARGV(cx, vp);
  +CallArgs argv = CallArgsFromVp(argc, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   void * ptr = JS_GetInstancePrivate(cx, obj, , NULL);
   rpmaug aug = ptr;
  @@ -179,7 +179,7 @@
   stati

[CVS] RPM: rpm-5_4: rpm/js/ rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-...

2017-07-11 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   11-Jul-2017 12:12:48
  Branch: rpm-5_4  Handle: 2017071110124701

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmaug-js.c rpmbc-js.c rpmbf-js.c rpmcudf-js.c
rpmdb-js.c rpmdbc-js.c rpmdbe-js.c rpmdc-js.c
rpmdig-js.c rpmdir-js.c rpmds-js.c rpmfc-js.c
rpmfi-js.c rpmfts-js.c rpmgi-js.c rpmhdr-js.c
rpmio-js.c rpmiob-js.c rpmmc-js.c rpmmg-js.c
rpmmi-js.c rpmmpf-js.c rpmmpw-js.c rpmps-js.c
rpmseq-js.c rpmsm-js.c rpmsp-js.c rpmst-js.c
rpmsw-js.c rpmsx-js.c rpmsys-js.c rpmte-js.c
rpmts-js.c rpmtxn-js.c rpmxar-js.c syck-js.c
uuid-js.c

  Log:
- rpmjs: functions take Values* not jsval now.

  Summary:
RevisionChanges Path
1.11.4.4+11 -11 rpm/js/rpmaug-js.c
1.4.4.3 +1  -1  rpm/js/rpmbc-js.c
1.10.4.3+7  -7  rpm/js/rpmbf-js.c
1.6.4.3 +3  -3  rpm/js/rpmcudf-js.c
1.31.4.3+23 -23 rpm/js/rpmdb-js.c
1.14.4.3+10 -10 rpm/js/rpmdbc-js.c
1.21.4.4+54 -54 rpm/js/rpmdbe-js.c
1.9.4.3 +5  -5  rpm/js/rpmdc-js.c
1.5.2.3 +1  -1  rpm/js/rpmdig-js.c
1.8.4.3 +2  -2  rpm/js/rpmdir-js.c
1.20.4.3+1  -1  rpm/js/rpmds-js.c
1.4.4.3 +1  -1  rpm/js/rpmfc-js.c
1.15.4.3+1  -1  rpm/js/rpmfi-js.c
1.10.4.3+7  -7  rpm/js/rpmfts-js.c
1.4.4.3 +1  -1  rpm/js/rpmgi-js.c
1.24.4.3+6  -6  rpm/js/rpmhdr-js.c
1.9.4.3 +19 -19 rpm/js/rpmio-js.c
1.4.4.3 +1  -1  rpm/js/rpmiob-js.c
1.12.4.3+5  -5  rpm/js/rpmmc-js.c
1.4.4.3 +2  -2  rpm/js/rpmmg-js.c
1.28.4.3+5  -5  rpm/js/rpmmi-js.c
1.7.4.3 +7  -7  rpm/js/rpmmpf-js.c
1.21.4.4+15 -15 rpm/js/rpmmpw-js.c
1.18.4.3+3  -3  rpm/js/rpmps-js.c
1.7.4.3 +8  -8  rpm/js/rpmseq-js.c
1.8.4.3 +2  -2  rpm/js/rpmsm-js.c
1.4.4.3 +2  -2  rpm/js/rpmsp-js.c
1.10.4.3+2  -2  rpm/js/rpmst-js.c
1.4.4.3 +1  -1  rpm/js/rpmsw-js.c
1.8.4.4 +2  -2  rpm/js/rpmsx-js.c
1.8.4.3 +17 -17 rpm/js/rpmsys-js.c
1.19.4.3+3  -3  rpm/js/rpmte-js.c
1.33.4.3+8  -8  rpm/js/rpmts-js.c
1.11.4.3+6  -6  rpm/js/rpmtxn-js.c
1.5.4.3 +1  -1  rpm/js/rpmxar-js.c
1.9.4.3 +3  -3  rpm/js/syck-js.c
1.18.4.3+3  -3  rpm/js/uuid-js.c
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  
  $ cvs diff -u -r1.11.4.3 -r1.11.4.4 rpmaug-js.c
  --- rpm/js/rpmaug-js.c11 Jul 2017 09:42:32 -  1.11.4.3
  +++ rpm/js/rpmaug-js.c11 Jul 2017 10:12:47 -  1.11.4.4
  @@ -29,7 +29,7 @@
   /* XXX does aug_defnode() need binding? */
   /* XXX unclear whether aug.defvar("foo", "bar") or aug.foo = "bar" is better 
*/
   static bool
  -rpmaug_defvar(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_defvar(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
  @@ -60,7 +60,7 @@
   }
   
   static bool
  -rpmaug_get(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_get(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
  @@ -94,7 +94,7 @@
   }
   
   static bool
  -rpmaug_set(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_set(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
  @@ -124,7 +124,7 @@
   }
   
   static bool
  -rpmaug_insert(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_insert(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
  @@ -155,7 +155,7 @@
   }
   
   static bool
  -rpmaug_rm(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_rm(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
  @@ -177,7 +177,7 @@
   }
   
   static bool
  -rpmaug_mv(JSContext *cx, uintN argc, jsval *vp)
  +rpmaug_mv(JSContext *cx, unsigned argc, Value* vp)
   {
   jsval *argv = JS_ARGV(cx, vp);
   JSObject *obj = JS_THI

[CVS] RPM: rpm-5_4: rpm/ configure.ac rpm/js/ Makefile.am rpmjs45.cpp ...

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 22:11:23
  Branch: rpm-5_4  Handle: 2017071020112201

  Modified files:   (Branch: rpm-5_4)
rpm configure.ac
rpm/js  Makefile.am rpmjs45.cpp
rpm/js/src  Makefile.am
rpm/rpmio   Makefile.am rpmjss.cpp rpmjss.h

  Log:
- rpmjss: permit --without-mozjs builds (default).

  Summary:
RevisionChanges Path
2.472.2.177 +5  -1  rpm/configure.ac
1.44.2.18   +4  -20 rpm/js/Makefile.am
1.1.2.10+0  -1  rpm/js/rpmjs45.cpp
1.1.2.6 +8  -30 rpm/js/src/Makefile.am
1.293.2.106 +6  -20 rpm/rpmio/Makefile.am
1.1.2.4 +20 -11 rpm/rpmio/rpmjss.cpp
1.1.2.7 +1  -0  rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.176 -r2.472.2.177 configure.ac
  --- rpm/configure.ac  10 Jul 2017 09:39:54 -  2.472.2.176
  +++ rpm/configure.ac  10 Jul 2017 20:11:22 -  2.472.2.177
  @@ -3981,19 +3981,23 @@
   #AC_LANG_POP(C++)
   
   WITH_SPIDERMONKEY_SUBDIR=""
  +WITH_MOZJS_CXXFLAGS=""
   AC_LANG_PUSH(C++)
   RPM_CHECK_LIB(
   [MozJS (mozjs)], [mozjs],
   [mozjs], [_fini], [jsapi.h],
  -[no,internal:none], [js:include:extract],
  +[no,internal:none], [js:include:src],
   [
 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
 WITH_SPIDERMONKEY_SUBDIR="js/src"
 AC_DEFINE(HAVE_JSAPI_H, 1, [Define to 1 if you have ])
  AC_DEFINE(HAVE_LIBMOZJS, 1, [Define to 1 if you have the 'mozjs' 
library (-lmozjs).])
  +  WITH_MOZJS_CXXFLAGS="-DEXPORT_JS_API -DDLL_PREFIX='\"lib\"' 
-DDLL_SUFFIX='\".so\"' -DMOZILLA_CLIENT -D'moz_xmalloc(_len)=malloc(_len)' 
-include 
\${top_srcdir}/\$(WITH_MOZJS_SUBDIR)/extract/js/src/js/src/js-confdefs.h 
-I\${top_srcdir}/\$(WITH_MOZJS_SUBDIR)/extract/js/src 
-I\${top_srcdir}/\$(WITH_MOZJS_SUBDIR)/extract/mfbt \$(WITH_MOZJS_CPPFLAGS)"
  +
 fi
   ], [])
   AC_LANG_POP(C++)
  +AC_SUBST(WITH_MOZJS_CXXFLAGS)
   AC_SUBST(WITH_SPIDERMONKEY_SUBDIR)
   
   dnl # Google V8
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.17 -r1.44.2.18 Makefile.am
  --- rpm/js/Makefile.am10 Jul 2017 10:09:25 -  1.44.2.17
  +++ rpm/js/Makefile.am10 Jul 2017 20:11:22 -  1.44.2.18
  @@ -33,7 +33,7 @@
@WITH_FILE_CPPFLAGS@ \
@WITH_GPSEE_CPPFLAGS@ \
@WITH_LUA_CPPFLAGS@ \
  - @WITH_MOZJS185_CPPFLAGS@ \
  + @WITH_MOZJS_CPPFLAGS@ \
@WITH_NEON_CPPFLAGS@ \
@WITH_POPT_CPPFLAGS@ \
@WITH_SYCK_CPPFLAGS@ \
  @@ -118,25 +118,9 @@
rpmjs45shim.cpp \
rpmjs45.cpp
   #${moz_builddir}/shell/Unified_cpp_js_src_shell0.cpp
  -rpmjs45_CPPFLAGS = \
  - -DEXPORT_JS_API \
  - -DDLL_PREFIX='"lib"' -DDLL_SUFFIX='".so"' \
  - -DMOZILLA_CLIENT \
  - -D'moz_xmalloc(_len)=malloc(_len)' \
  - -I${moz_srcdir}/mfbt \
  - -I${moz_srcdir}/js/src \
  - -I${srcdir}/include \
  - -I../rpmio \
  - -include ${moz_srcdir}/js/src/js/src/js-confdefs.h \
  - -pthread \
  - -fPIC \
  - -O3
  -#rpmjs_CXXFLAGS = \
  -#-std=gnu++0x \
  -#-fno-rtti
  -rpmjs45_LDADD = \
  - ${builddir}/src/libmozjs.la \
  - $(RPMIO_LDADD_COMMON)
  +rpmjs45_CXXFLAGS = $(WITH_MOZJS_CXXFLAGS) -I../rpmio -fPIC -O3
  +rpmjs45_LDADD = $(WITH_MOZJS_LIBS)
  +rpmjs45_LDFLAGS = $(WITH_MOZJS_LDFLAGS)
   
   foo: rpmjs45
./rpmjs45 -f rpmjss.inp
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.9 -r1.1.2.10 rpmjs45.cpp
  --- rpm/js/rpmjs45.cpp10 Jul 2017 10:09:25 -  1.1.2.9
  +++ rpm/js/rpmjs45.cpp10 Jul 2017 20:11:22 -  1.1.2.10
  @@ -543,7 +543,6 @@
   #include 
   
   /*==*/
  -#define N_(_str)(_str)
   struct poptOption rpmjssIPoptTable[] = {
 { "allow", '\0', POPT_BIT_SET,
&_jss.flags, RPMJSS_FLAGS_ALLOW,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/src/Makefile.am
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 Makefile.am
  

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjss.cpp

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 17:11:37
  Branch: rpm-5_4  Handle: 2017071015113700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjss.cpp

  Log:
- rpmjss: permit global/multiple interpreters, add _rpmjssI_init and
%_jssI_init

  Summary:
RevisionChanges Path
1.1.2.3 +15 -12 rpm/rpmio/rpmjss.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjss.cpp
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmjss.cpp
  --- rpm/rpmio/rpmjss.cpp  10 Jul 2017 14:21:59 -  1.1.2.2
  +++ rpm/rpmio/rpmjss.cpp  10 Jul 2017 15:11:37 -  1.1.2.3
  @@ -1208,6 +1208,8 @@
   {   be += sprintf(be, "%25s: %"#_fmt"\n", #_foo, jss->_foo); }
   #define  XPRINT(_fmt, _foo)  if (jss->_foo) PRINT(_fmt, _foo)
   
  + if (jss->av)
  + argvPrint(__FUNCTION__, (ARGV_t)jss->av, NULL);
PRINT(x, flags);
   
XPRINT(s, Ifile);
  @@ -1305,37 +1307,39 @@
   
   RPMIOPOOL_INTERP_MODULE(jss)
   
  -#ifdef   NOTYET
   static const char * _rpmjssI_init = "\
  -print('_rpmjssI_init');\n\
  -version();\n\
  +print('-- _rpmjssI_init --');\n\
  +help(version);\n\
  +version(185); putstr('version: '); print(version());\n\
  +help(options);\n\
  +options('strict'); putstr('options: '); print(options('strict'));\
   ";
  -#endif
   
   rpmjss rpmjssNew(char ** av, uint32_t flags)
   {
   static const char * _av[] = { (char *) "rpmjss", NULL };
   int ac = argvCount((ARGV_t)av);
   int initialize (!(flags & 0x8000) || _rpmjssI == NULL);
  -SPEW("==> %s(%p[%u], 0x%x)\n", __FUNCTION__, av, ac, flags);
   rpmjss jss =
  -#ifdef   NOTYET
(flags & 0x8000) ? rpmjssI() :
  -#endif
rpmjssGetPool(_rpmjssPool);
   
   if (av == NULL) av = (char **) _av;
   
   /* Parse JSShell options. */
   if (initialize) {
  +
  + /* XXX TODO: global interpreter defauls from %{_jssI_config}. */
  +
rpmRC rc = rpmjssSetup(jss, ac, av, flags);
(void)rc;
   
  - /* Initialize JSShell interpreter. */
  - JSI_t I = (JSI_t) mozInit(jss);
  - jss->I = I;
  + /* Initialize JSShell interpreter (if not already). */
  + if (jss->I == NULL) {
  + JSI_t I = (JSI_t) mozInit(jss);
  + jss->I = I;
  + }
   
  -#ifdef   NOTYET
/* XXX TODO: rpmjssInfo() spewage on first open. */
   
static const char _jssI_init[] = "%{?_jssI_init}";
  @@ -1346,7 +1350,6 @@
   
(void) rpmjssRun(jss, s, NULL);
s = _free(s);
  -#endif
   }
   
   return rpmjssLink(jss);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmpython.c

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 16:25:48
  Branch: rpm-5_4  Handle: 2017071014254800

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmpython.c

  Log:
- rpmpython: add SPEW().

  Summary:
RevisionChanges Path
2.16.2.15   +9  -10 rpm/rpmio/rpmpython.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmpython.c
  
  $ cvs diff -u -r2.16.2.14 -r2.16.2.15 rpmpython.c
  --- rpm/rpmio/rpmpython.c 26 May 2017 20:49:23 -  2.16.2.14
  +++ rpm/rpmio/rpmpython.c 10 Jul 2017 14:25:48 -  2.16.2.15
  @@ -24,6 +24,11 @@
   
   #include "debug.h"
   
  +int _rpmpython_debug = 0;
  +#define SPEW(_fmt, ...) \
  +  if (_rpmpython_debug) \
  +  fprintf(stderr, _fmt, __VA_ARGS__)
  +
   static void rpmpythonFini(void * _python)
   {
   rpmpython python = (rpmpython) _python;
  @@ -34,8 +39,6 @@
   python->I = NULL;
   }
   
  -int _rpmpython_debug = 0;
  -
   #define  rpmpythonDbug   NULL
   #define  rpmpythonInit   NULL
   RPMIOPOOL_INTERP_MODULE(python)
  @@ -124,8 +127,7 @@
   rpmpython python = (flags & 0x8000)
? rpmpythonI() : rpmpythonGetPool(_rpmpythonPool);
   
  -if (_rpmpython_debug)
  -fprintf(stderr, "==> %s(%p, %d) python %p\n", __FUNCTION__, av, flags, 
python);
  +SPEW("==> %s(%p, %d) python %p\n", __FUNCTION__, av, flags, python);
   
   if (av == NULL) av = (char **) _av;
   
  @@ -145,8 +147,7 @@
const char * s = rpmExpand(_rpmpythonI_init, _pythonI_init, NULL);
int ac = argvCount((ARGV_t)av);
(void) PySys_SetArgv(ac, (char **)av);
  -if (_rpmpython_debug)
  -fprintf(stderr, "==\n%s\n==\n", s);
  +SPEW("==\n%s\n==\n", s);
(void) rpmpythonRun(python, s, NULL);
s = _free(s);
   }
  @@ -159,8 +160,7 @@
   {
   rpmRC rc = RPMRC_FAIL;
   
  -if (_rpmpython_debug)
  -fprintf(stderr, "==> %s(%p,%s)\n", __FUNCTION__, python, fn);
  +SPEW("==> %s(%p,%s)\n", __FUNCTION__, python, fn);
   
   if (python == NULL) python = rpmpythonI();
   
  @@ -207,8 +207,7 @@
   {
   rpmRC rc = RPMRC_FAIL;
   
  -if (_rpmpython_debug)
  -fprintf(stderr, "==> %s(%p,%s,%p)\n", __FUNCTION__, python, str, resultp);
  +SPEW("==> %s(%p,%s,%p)\n", __FUNCTION__, python, str, resultp);
   
   if (python == NULL) python = rpmpythonI();
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjss.cpp rpmjss.h

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 16:22:00
  Branch: rpm-5_4  Handle: 2017071014215900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjss.cpp rpmjss.h

  Log:
- rpmjss: parse options/arguments.

  Summary:
RevisionChanges Path
1.1.2.2 +534 -163   rpm/rpmio/rpmjss.cpp
1.1.2.6 +5  -5  rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjss.cpp
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmjss.cpp
  --- rpm/rpmio/rpmjss.cpp  10 Jul 2017 09:42:51 -  1.1.2.1
  +++ rpm/rpmio/rpmjss.cpp  10 Jul 2017 14:21:59 -  1.1.2.2
  @@ -366,8 +366,10 @@
   // Start the engine.
   if (rpmjss_nopens++ == 0) {
   
  - MaybeOverrideOutFileFromEnv("JS_STDERR", stderr, );
  - MaybeOverrideOutFileFromEnv("JS_STDOUT", stdout, );
  + if (gErrFile == NULL)
  + MaybeOverrideOutFileFromEnv("JS_STDERR", stderr, );
  + if (gOutFile == NULL)
  + MaybeOverrideOutFileFromEnv("JS_STDOUT", stdout, );
   
   #ifdef JS_CODEGEN_X86
if (!(jss->xf & XF_FPU))
  @@ -411,6 +413,7 @@
   
   JSRuntime * rt = JS_NewRuntime(_maxbytes, nurseryBytes);
   assert(rt);
  +assert(I->rt == NULL);
   I->rt = rt;
   
   #ifdef   DYING
  @@ -462,6 +465,7 @@
   
   JSContext * cx = NewContext(rt);
   assert(cx);
  +assert(I->cx == NULL);
   I->cx = cx;
   #ifdef   DYING
   JS_SetContextPrivate(cx, (void *)jss);
  @@ -494,6 +498,7 @@
options.setVersion(JSVERSION_DEFAULT);
glob = NewGlobalObject(cx, options, _principals);
   assert(glob);
  +assert(I->global == NULL);
I->global = glob;
   
JSAutoCompartment ac(cx, glob);
  @@ -568,323 +573,365 @@
   static struct JSIO_s _mozjs45 = { mozFini, mozInit, mozRun };
   JSIO_t mozjs45 = &_mozjs45;
   
  +#ifdef   DYING
   /*==*/
   struct rpmjss_s _jss;
   rpmjss jss = &_jss;
  +#endif
   
   /*==*/
  -struct poptOption rpmjssIPoptTable[] = {
  +static rpmjssFlags rpmjssFlagsDefault = (rpmjssFlags) (
  +RPMJSS_FLAGS_RELIMIT |
  +RPMJSS_FLAGS_JIT |
  +RPMJSS_FLAGS_STRICT |
  +0
  +);
  +
  +static rpmjssIonFlags rpmjssIonFlagsDefault = (rpmjssIonFlags) (
  +ION_SCALAR_REPLACEMENT |
  +ION_GVN |
  +ION_LICM |
  +ION_EDGECASE_ANALYSIS |
  +ION_RANGE_ANALYSIS |
  +ION_INLINING |
  +ION_OSR |
  +ION_LIMIT_SCRIPT_SIZE |
  +ION_OFFTHREAD_COMPILE |
  +0
  +);
  +
  +static rpmjssXFlags rpmjssXFlagsDefault = (rpmjssXFlags) (
  +XF_BASELINE |
  +XF_ION |
  +XF_ASMJS |
  +XF_NATIVE_REGEXP |
  +XF_UNBOXED_OBJECTS |
  +XF_CACHE_PER_PROCESS |
  +XF_FPU |
  +XF_SSE3 |
  +XF_SSE4 |
  +XF_THREADS |
  +XF_GGC |
  +XF_CGC |
  +XF_INCREMENTAL_GC |
  +0
  +);
  +
  +/*==*/
  +static rpmRC
  +rpmjssInitPopt(rpmjss jss, int ac, char * const* av)
  +{
  +
  +  struct poptOption rpmjssIPoptTable[] = {
 { "allow", '\0', POPT_BIT_SET,
  - &_jss.flags, RPMJSS_FLAGS_ALLOW,
  + >flags, RPMJSS_FLAGS_ALLOW,
   N_("Allow (read-only) access to caller's environment"), NULL },
 { "cache", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_jss.flags, RPMJSS_FLAGS_NOCACHE,
  + >flags, RPMJSS_FLAGS_NOCACHE,
   N_("Disables compiler caching via JSScript XDR serialization"), NULL 
},
 { "loadrc", '\0', POPT_BIT_SET,
  - &_jss.flags, RPMJSS_FLAGS_LOADRC,
  + >flags, RPMJSS_FLAGS_LOADRC,
   N_("Load RC file for interpreter based on script filename."), NULL },
 { "warn", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_jss.flags, RPMJSS_FLAGS_NOWARN,
  + >flags, RPMJSS_FLAGS_NOWARN,
   N_("Do not report warnings"), NULL },
   
 { "relimit", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_jss.flags, RPMJSS_FLAGS_RELIMIT,
  + >flags, RPMJSS_FLAGS_RELIMIT,
   N_("Do not limit regexps to n^3 levels of backtracking"), NULL },
 { "jit", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_jss.flags, RPMJSS_FLAGS_JIT,
  + >flags, RPMJSS_FLAGS_JIT,
   N_("Disable nanojit"), NU

[CVS] RPM: rpm-5_4: rpm/lib/ poptALL.c psm.c

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 11:44:00
  Branch: rpm-5_4  Handle: 201707100944

  Modified files:   (Branch: rpm-5_4)
rpm/lib poptALL.c psm.c

  Log:
- rpmjss: replace rpmjs with rpmjss.

  Summary:
RevisionChanges Path
2.144.2.20  +4  -4  rpm/lib/poptALL.c
2.399.2.29  +2  -2  rpm/lib/psm.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.144.2.19 -r2.144.2.20 poptALL.c
  --- rpm/lib/poptALL.c 20 May 2017 19:21:07 -  2.144.2.19
  +++ rpm/lib/poptALL.c 10 Jul 2017 09:44:00 -  2.144.2.20
  @@ -25,7 +25,7 @@
   #include 
   
   #include 
  -#include 
  +#include 
   #include 
   
   #include 
  @@ -451,7 +451,7 @@
   rpmcliFini(poptContext optCon)
   {
   extern rpmioPool _rpmjniPool;
  -extern rpmioPool _rpmjsPool;
  +extern rpmioPool _rpmjssPool;
   extern rpmioPool _headerPool;
   extern const char * evr_tuple_order;
   extern const char * evr_tuple_match;
  @@ -468,8 +468,8 @@
   /* Realease (and dereference) embedded interpreter global objects first. 
*/
   _rpmjniI = rpmjniFree(_rpmjniI);
   _rpmjniPool = rpmioFreePool(_rpmjniPool);
  -_rpmjsI = rpmjsFree(_rpmjsI);
  -_rpmjsPool = rpmioFreePool(_rpmjsPool);
  +_rpmjssI = rpmjssFree(_rpmjssI);
  +_rpmjssPool = rpmioFreePool(_rpmjssPool);
   RPMIOPOOL_INTERP_FREE(ruby)
   
   RPMIOPOOL_INTERP_FREE(mdb)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  
  $ cvs diff -u -r2.399.2.28 -r2.399.2.29 psm.c
  --- rpm/lib/psm.c 1 Jun 2017 18:38:24 -   2.399.2.28
  +++ rpm/lib/psm.c 10 Jul 2017 09:44:00 -  2.399.2.29
  @@ -16,7 +16,7 @@
   #include 
   #include 
   #include 
  -#include 
  +#include 
   #include 
   #include 
   #include 
  @@ -645,7 +645,7 @@
   #endif
   #if defined(WITH_MOZJS)
   if (!strcmp(Phe->p.argv[0], "")) {
  - RPMIOPOOL_INTERP_RUN(js)
  + RPMIOPOOL_INTERP_RUN(jss)
   } else
   #endif
   #if defined(WITH_MRBEMBED)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmev.c rpmjss.cpp

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 11:42:51
  Branch: rpm-5_4  Handle: 2017071009425100

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmev.c rpmjss.cpp

  Log:
- create.

  Summary:
RevisionChanges Path
1.1.2.1 +649 -0 rpm/rpmio/rpmev.c
1.1.2.1 +996 -0 rpm/rpmio/rpmjss.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmev.c
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmev.c
  --- /dev/null 2017-07-10 11:35:46.0 +0200
  +++ rpmev.c   2017-07-10 11:42:51.797005547 +0200
  @@ -0,0 +1,649 @@
  +#include "system.h"
  +#include 
  +
  +#if defined(WITH_LIBEV)
  +
  +#if defined(HAVE_EV_H)
  +# include 
  +#endif
  +
  +#else/* WITH_LIBEV */
  +
  +/* XXX stub in enough to include rpmev.h */
  +#define  EV_P_   void * loop,
  +struct ev_watcher {
  +int active;
  +int pending;
  +int priority;
  +void * data;
  +void (*cb)(EV_P_ void *w, int revents);
  +};
  +
  +union ev_any_watcher
  +{
  +struct ev_watcher w;
  +};
  +
  +#endif   /* WITH_LIBEV */
  +
  +#include 
  +#include 
  +
  +#define  _RPMEV_INTERNAL
  +#include 
  +
  +#include "debug.h"
  +
  +int _rpmev_debug = -1;
  +
  +#define SPEW(_fmt, ...) \
  +if (_rpmev_debug || _rpmio_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +
  +/*==*/
  +unsigned rpmioEV = 0;
  +struct poptOption rpmioEVTable[] = {
  +#if defined(WITH_LIBEV)
  + { "read", '\0', POPT_BIT_SET,   , EV_READ,
  +N_("read"), N_("EV_READ") },
  + { "write", '\0', POPT_BIT_SET,  , EV_WRITE,
  +N_("write"), N_("EV_WRITE") },
  + { "internal", '\0', POPT_BIT_SET,   , EV__IOFDSET,
  +N_("internal"), N_("EV__IOFDSET") },
  + { "timer", '\0', POPT_BIT_SET,  , EV_TIMER,
  +N_("timer"), N_("EV_TIMER") },
  + { "periodic", '\0', POPT_BIT_SET,   , EV_PERIODIC,
  +N_("periodic"), N_("EV_PERIODIC") },
  + { "signal", '\0', POPT_BIT_SET, , EV_SIGNAL,
  +N_("signal"), N_("EV_SIGNAL") },
  + { "child", '\0', POPT_BIT_SET,  , EV_CHILD,
  +N_("child"), N_("EV_CHILD") },
  + { "stat", '\0', POPT_BIT_SET,   , EV_STAT,
  +N_("stat"), N_("EV_STAT") },
  + { "idle", '\0', POPT_BIT_SET,   , EV_IDLE,
  +N_("idle"), N_("EV_IDLE") },
  + { "prepare", '\0', POPT_BIT_SET,, EV_PREPARE,
  +N_("prepare"), N_("EV_PREPARE") },
  + { "check", '\0', POPT_BIT_SET,  , EV_CHECK,
  +N_("check"), N_("EV_CHECK") },
  + { "embed", '\0', POPT_BIT_SET,  , EV_EMBED,
  +N_("embed"), N_("EV_EMBED") },
  + { "fork", '\0', POPT_BIT_SET,   , EV_FORK,
  +N_("fork"), N_("EV_FORK") },
  + { "cleanup", '\0', POPT_BIT_SET,, EV_CLEANUP,
  +N_("cleanup"), N_("EV_CLEANUP") },
  + { "async", '\0', POPT_BIT_SET,  , EV_ASYNC,
  +N_("async"), N_("EV_ASYNC") },
  + { "custom", '\0', POPT_BIT_SET, , EV_CUSTOM,
  +N_("custom"), N_("EV_CUSTOM") },
  + { "error", '\0', POPT_BIT_SET,  , EV_ERROR,
  +N_("error"), N_("EV_ERROR") },
  +#endif   /* WITH_LIBEV */
  +   POPT_TABLEEND
  +};
  +
  +unsigned rpmioEVFLAG = 0;
  +struct poptOption rpmioEVFLAGTable[] = {
  +#if defined(WITH_LIBEV)
  + { "env", '\0', POPT_BIT_CLR|POPT_ARGFLAG_TOGGLE,, 
EVFLAG_NOENV,
  +N_("env"), N_("EVFLAG_NOENV") },
  + { "forkcheck", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,  , 
EVFLAG_FORKCHECK,
  +N_("forkcheck"), N_("EVFLAG_FORKCHECK") },
  + { "inotify", '\0', POPT_BIT_CLR|POPT_ARGFLAG_TOGGLE, , 
EVFLAG_NOINOTIFY,
  +N_("inotify"), N_("EVFLAG_NOINOTIFY") },
  + { "signalfd", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE, , 
EVFLAG_SIGNALFD,
  +N_("signalfd"), N_("EVFL

[CVS] RPM: rpm-5_4: rpm/ configure.ac

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 11:39:54
  Branch: rpm-5_4  Handle: 2017071009395400

  Modified files:   (Branch: rpm-5_4)
rpm configure.ac

  Log:
- rpmjs: AutoFU for mozjs.

  Summary:
RevisionChanges Path
2.472.2.176 +97 -30 rpm/configure.ac
  

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.472.2.175 -r2.472.2.176 configure.ac
  --- rpm/configure.ac  13 Jun 2017 22:25:22 -  2.472.2.175
  +++ rpm/configure.ac  10 Jul 2017 09:39:54 -  2.472.2.176
  @@ -332,7 +332,7 @@
 rpm_CFLAGS_ADD([-Wsuggest-attribute=pure],[RPM_CFLAGS])
   rpm_CFLAGS_ADD([-Wno-unused-but-set-variable], [RPM_CFLAGS])
   dnl # -fno-delete-null-pointer as the kernel does 
http://patchwork.kernel.org/patch/36060/
  -  rpm_CFLAGS_ADD([-fno-delete-null-pointer-checks], [RPM_CFLAGS])
  +  rpm_CPPFLAGS_ADD([-fno-delete-null-pointer-checks], [RPM_CPPFLAGS])
 rpm_CFLAGS_ADD([-Wbool-compare],[RPM_CFLAGS])
 fi
   dnl #  rpm_CFLAGS_ADD([-Wdouble-promotion],[RPM_CFLAGS])
  @@ -449,6 +449,18 @@
   dnl #  rpm_CFLAGS_ADD([-fno-protect-parens],[RPM_CFLAGS])
   dnl #  rpm_CFLAGS_ADD([-fstack-arrays],[RPM_CFLAGS])
   
  +dnl # build RPM with Mozilla C++ flags (GCC only)
  +  rpm_CXXFLAGS_ADD([-std=gnu++0x], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fno-rtti], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fno-tree-vrp], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fno-strict-aliasing], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-ffunction-sections], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fdata-sections], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fno-exceptions], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fno-math-errno], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-freorder-blocks], [RPM_CXXFLAGS])
  +  rpm_CXXFLAGS_ADD([-fomit-frame-pointer], [RPM_CXXFLAGS])
  +
   dnl # build RPM instrumented for extra optimization/security (GCC only)
   dnl # --- other optimizations
 rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
  @@ -3894,51 +3906,106 @@
   ], [])
   AC_LANG_POP(C++)
   
  -dnl # JavaScript
  -WITH_JS_SUBDIR=""
  +dnl # Libicu18n/Libicuuc/Libicudata (for mozjs-45)
  +dnl # XXX FIXME: all the functions are versioned: _init will suffice.
  +RPM_CHECK_LIB(
  +[Libicu], [libicu],
  +[icui18n], [_init], [unicode/utypes.h],
  +[no,external:none], [],
  +[
  +LIBS="$LIBS -licuuc -licudata"
  +], [])
   
  -WITH_SPIDERMONKEY_SUBDIR=""
  +dnl # Libffi (for mozjs-45)
   RPM_CHECK_LIB(
  -[MozJS (js-1.8.5)], [mozjs185],
  -[mozjs185], [JS_NewContext], [jsapi.h],
  -[no,external:none], [mozjs185:src:src],
  -[ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
  -  WITH_SPIDERMONKEY_SUBDIR="$WITH_JS_SUBDIR/src"
  -  else
  -  WITH_JS_SUBDIR=js
  -  fi
  +[Libffi], [libffi],
  +[ffi], [ffi_prep_cif], [ffi.h],
  +[no,external:none], [],
  +[
  +AC_CHECK_FUNC(ffi_call)
  +AC_CHECK_FUNC(ffi_call_unix64)
  +AC_CHECK_FUNC(ffi_closure_alloc)
  +AC_CHECK_FUNC(ffi_closure_free)
  +AC_CHECK_FUNC(ffi_closure_unix64)
  +AC_CHECK_FUNC(ffi_closure_unix64_inner)
  +AC_CHECK_FUNC(ffi_java_ptrarray_to_raw)
  +AC_CHECK_FUNC(ffi_java_raw_call)
  +AC_CHECK_FUNC(ffi_java_raw_size)
  +AC_CHECK_FUNC(ffi_java_raw_to_ptrarray)
  +AC_CHECK_FUNC(ffi_prep_cif)
  +AC_CHECK_FUNC(ffi_prep_cif_machdep)
  +AC_CHECK_FUNC(ffi_prep_cif_var)
  +AC_CHECK_FUNC(ffi_prep_closure)
  +AC_CHECK_FUNC(ffi_prep_closure_loc)
  +AC_CHECK_FUNC(ffi_prep_java_raw_closure)
  +AC_CHECK_FUNC(ffi_prep_java_raw_closure_loc)
  +AC_CHECK_FUNC(ffi_prep_raw_closure)
  +AC_CHECK_FUNC(ffi_prep_raw_closure_loc)
  +AC_CHECK_FUNC(ffi_ptrarray_to_raw)
  +AC_CHECK_FUNC(ffi_raw_call)
  +AC_CHECK_FUNC(ffi_raw_size)
  +AC_CHECK_FUNC(ffi_raw_to_ptrarray)
   ], [])
  -AC_SUBST(WITH_SPIDERMONKEY_SUBDIR)
   
  +dnl # JavaScript
  +WITH_JS_SUBDIR=""
   #WITH_SPIDERMONKEY_SUBDIR=""
  -#AC_LANG_PUSH(C++)
   #RPM_CHECK_LIB(
  -#[MozJS (mozjs-24)], [mozjs24],
  -#[mozjs-24], [_fini], [jsapi.h],
  -#[no,external:none], [mozjs-24:src:src],
  +#[MozJS (js-1.8.5)], [mozjs185],
  +#[mozjs185], [JS_NewContext], [jsapi.h],
  +#[no,external:none], [mozjs185:src:src],
   #[ if test ".

[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmio/ Makefile.am librpmio.vers ...

2017-07-10 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   10-Jul-2017 11:38:54
  Branch: rpm-5_4  Handle: 20090419190007259511927

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES
rpm/rpmio   Makefile.am librpmio.vers macro.c poptIO.c rpmio.c
rpmjss.h
  Removed files:(Branch: rpm-5_4)
rpm/rpmio   rpmjs.cpp rpmjs.h rpmjsio.c rpmjsio.h rpmjsio.msg

  Log:
- rpmjs: upgrade js-1.8.5 with mozjs-45 (internal).

  Summary:
RevisionChanges Path
1.3501.2.582+1  -0  rpm/CHANGES
1.293.2.105 +23 -12 rpm/rpmio/Makefile.am
2.199.2.98  +7  -10 rpm/rpmio/librpmio.vers
2.249.2.49  +4  -5  rpm/rpmio/macro.c
1.94.2.41   +2  -2  rpm/rpmio/poptIO.c
1.230.2.62  +2  -2  rpm/rpmio/rpmio.c
1.1 +0  -901rpm/rpmio/rpmjs.cpp
1.10+0  -141rpm/rpmio/rpmjs.h
1.4 +0  -2960   rpm/rpmio/rpmjsio.c
1.1 +0  -56 rpm/rpmio/rpmjsio.h
1.1 +0  -90 rpm/rpmio/rpmjsio.msg
1.1.2.5 +0  -2  rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.581 -r1.3501.2.582 CHANGES
  --- rpm/CHANGES   1 Jul 2017 04:35:47 -   1.3501.2.581
  +++ rpm/CHANGES   10 Jul 2017 09:38:53 -  1.3501.2.582
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: rpmjs: upgrade js-1.8.5 with mozjs-45 (internal).
   - jbj: macros: update %efi 
(http://rpm5.org/community/rpm-devel/5699.html)/
   - jbj: scripts: honor COMPRESS envvar (if set) 
(http://rpm5.org/community/rpm-devel/5698.html)
   - jbj: scripts: get rid of unused 
(http://rpm5.org/community/rpm-devel/5697.html)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.104 -r1.293.2.105 Makefile.am
  --- rpm/rpmio/Makefile.am 4 Jul 2017 03:09:00 -   1.293.2.104
  +++ rpm/rpmio/Makefile.am 10 Jul 2017 09:38:54 -  1.293.2.105
  @@ -17,8 +17,7 @@
   EXTRA_DIST = librpmio.vers \
getdate.y html-parse.c html-parse.h libsqlio.c \
rpmcpio.c rpmcpio.h rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \
  - rpmjsio.msg rpmtar.c rpmtar.h \
  - rpmjs0ad.cpp rpmjs185.cpp rpmjs17.cpp rpmjs24.cpp rpmjs31.cpp 
rpmjs38.cpp rpmjs45.cpp \
  + rpmtar.c rpmtar.h \
tdir.c teio.c tfts.c tget.c tgfs.c tgit.c tglob.c thkp.c thtml.c \
tinv.c tkey.c tmire.c tmq.c tmqtt.c todbc.c tput.c tpython.c trpmio.c \
tsexp.c tsvn.c tsw.c lookup3.c duktape.c tjsmn.c tjson.c yajl.c \
  @@ -163,8 +162,8 @@
pcrs.h rpmacl.h rpmaio.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbz.h \
rpmcap.h rpmcdsa.h rpmct.h rpmcudf.h rpmcvs.h rpmdate.h rpmdav.h \
rpmdir.h rpmeio.h rpmev.h rpmficl.h rpmgc.h rpmgfs.h rpmgit.h \
  - rpmhash.h rpmhkp.h rpmhook.h rpmio_internal.h rpmjni.h rpmjs.h \
  - rpmjsio.h rpmkeyring.h rpmku.h rpmltc.h rpmlua.h \
  + rpmhash.h rpmhkp.h rpmhook.h rpmio_internal.h rpmjni.h rpmjss.h \
  + rpmkeyring.h rpmku.h rpmltc.h rpmlua.h \
rpmmqtt.h rpmmrb.h rpmmsq.h rpmnix.h rpmnss.h rpmodbc.h \
rpmperl.h rpmpgp.h rpmpython.h rpmruby.h rpmsed.h rpmsm.h rpmsp.h \
rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h rpmsvn.h rpmsx.h rpmsyck.h \
  @@ -181,7 +180,7 @@
groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\
salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
rpmgit.c rpmio-stub.c \
  - rpmjs.cpp rpmjsio.c rpmkeyring.c \
  + rpmjs45shim.cpp rpmjss.cpp rpmkeyring.c \
rpmnix.c rpmodbc.c rpmsql.c set.c \
ar.c \
argv.c \
  @@ -282,8 +281,7 @@
   DISTCLEANFILES += $(defexec_DATA)
   endif
   
  -# XXX FIXME: error: inlining failed in call to always_inline ‘__signbit’
  -librpmio_la_LIBADD =
  +librpmio_la_LIBADD = $(top_builddir)/js/src/libmozjs.la
   #librpmio_la_LIBADD += duktape.o -lm
   if ENABLE_BUILD_INTLIBDEP
   librpmio_la_LIBADD += \
  @@ -322,11 +320,24 @@
@$(LTCOMPILE) -O0 -c $<
   keccak.lo: $(top_srcdir)/rpmio/keccak.c
@$(LTCOMPILE) -O0 -c $<
  -# XXX JS_ALWAYS_INLINE needs -O0 with -fgnu-tm
  -#rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c
  -#@$(LTCOMPILE) -O0 -c $<
  -rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
  - @$(LTCOMPILE) -O0 -c $<
  +
  +moz_srcdir = ${top_srcdir}/js/extract
  +MOZ_CPPFLAGS = \
  + -DEXPORT_JS

[CVS] RPM: rpm-5_4: rpm/js/ rpmjs45.cpp

2017-07-09 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   09-Jul-2017 18:59:19
  Branch: rpm-5_4  Handle: 2017070916591900

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmjs45.cpp

  Log:
- rpmjs45: haul out a load of trash.

  Summary:
RevisionChanges Path
1.1.2.8 +57 -194rpm/js/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.7 -r1.1.2.8 rpmjs45.cpp
  --- rpm/js/rpmjs45.cpp9 Jul 2017 16:11:12 -   1.1.2.7
  +++ rpm/js/rpmjs45.cpp9 Jul 2017 16:59:19 -   1.1.2.8
  @@ -31,26 +31,15 @@
   
   /*==*/
   static bool
  -rpmSetRuntimeOptions(JSRuntime* rt, const OptionParser& op)
  +rpmSetRuntimeOptions(JSRuntime* rt, const rpmjss jss)
   {
  -#ifdef   DYING
  -enableBaseline = !op.getBoolOption("no-baseline");
  -assert(enableBaseline == ((jss->xf & XF_BASELINE) != 0));
  -enableIon = !op.getBoolOption("no-ion");
  -assert(enableIon == ((jss->xf & XF_ION) != 0));
  -enableAsmJS = !op.getBoolOption("no-asmjs");
  -assert(enableAsmJS == ((jss->xf & XF_ASMJS) != 0));
  -enableNativeRegExp = !op.getBoolOption("no-native-regexp");
  -assert(enableNativeRegExp == ((jss->xf & XF_NATIVE_REGEXP) != 0));
  -enableUnboxedArrays = op.getBoolOption("unboxed-arrays");
  -assert(enableUnboxedArrays == ((jss->xf & XF_UNBOXED_ARRAYS) != 0));
  -#else
  +const char * str;
  +
   enableBaseline = ((jss->xf & XF_BASELINE) != 0);
   enableIon = ((jss->xf & XF_ION) != 0);
   enableAsmJS = ((jss->xf & XF_ASMJS) != 0);
   enableNativeRegExp = ((jss->xf & XF_NATIVE_REGEXP) != 0);
   enableUnboxedArrays = ((jss->xf & XF_UNBOXED_ARRAYS) != 0);
  -#endif
   
   JS::RuntimeOptionsRef(rt).setBaseline(enableBaseline)
.setIon(enableIon)
  @@ -58,17 +47,11 @@
.setNativeRegExp(enableNativeRegExp)
.setUnboxedArrays(enableUnboxedArrays);
   
  -#ifdef   DYING
  -assert(op.getBoolOption("no-unboxed-objects") == ((jss->xf & 
XF_UNBOXED_OBJECTS) == 0));
  -if (op.getBoolOption("no-unboxed-objects"))
  -jit::JitOptions.disableUnboxedObjects = true;
  -#else
   if (!(jss->xf & XF_UNBOXED_OBJECTS))
   jit::JitOptions.disableUnboxedObjects = true;
  -#endif
   
  -if (const char* str = op.getStringOption("ion-scalar-replacement")) {
  -assert(!strcmp(str, jss->ion_scalar_replacement));
  +str = jss->ion_scalar_replacement;
  +if (str) {
   if (strcmp(str, "on") == 0)
   jit::JitOptions.disableScalarReplacement = false;
   else if (strcmp(str, "off") == 0)
  @@ -77,8 +60,8 @@
   return OptionFailure("ion-scalar-replacement", str);
   }
   
  -if (const char* str = op.getStringOption("ion-shared-stubs")) {
  -assert(!strcmp(str, jss->ion_shared_stubs));
  +str = jss->ion_shared_stubs;
  +if (str) {
   if (strcmp(str, "on") == 0)
   jit::JitOptions.disableSharedStubs = false;
   else if (strcmp(str, "off") == 0)
  @@ -87,8 +70,8 @@
   return OptionFailure("ion-shared-stubs", str);
   }
   
  -if (const char* str = op.getStringOption("ion-gvn")) {
  -assert(!strcmp(str, jss->ion_gvn));
  +str = jss->ion_gvn;
  +if (str) {
   if (strcmp(str, "off") == 0) {
   jit::JitOptions.disableGvn = true;
   } else if (strcmp(str, "on") != 0 &&
  @@ -101,8 +84,8 @@
   }
   }
   
  -if (const char* str = op.getStringOption("ion-licm")) {
  -assert(!strcmp(str, jss->ion_licm));
  +str = jss->ion_licm;
  +if (str) {
   if (strcmp(str, "on") == 0)
   jit::JitOptions.disableLicm = false;
   else if (strcmp(str, "off") == 0)
  @@ -111,8 +94,8 @@
   return OptionFailure("ion-licm", str);
   }
   
  -if (const char* str = op.getStringOption("ion-edgecase-analysis")) {
  -assert(!strcmp(str, jss->ion_edgecase_analysis));
  +str = jss->ion_edgecase_analysis;
  +if (str) {
   if (strcmp(str, &qu

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am rpmjs45.cpp rpm/rpmio/ rpmjss....

2017-07-09 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   09-Jul-2017 18:11:12
  Branch: rpm-5_4  Handle: 2017070916111200

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am rpmjs45.cpp
rpm/rpmio   rpmjss.h

  Log:
- rpmjs45: start switching to POPT arg processing.

  Summary:
RevisionChanges Path
1.44.2.16   +11 -80 rpm/js/Makefile.am
1.1.2.7 +587 -58rpm/js/rpmjs45.cpp
1.1.2.4 +37 -19 rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.15 -r1.44.2.16 Makefile.am
  --- rpm/js/Makefile.am8 Jul 2017 11:29:09 -   1.44.2.15
  +++ rpm/js/Makefile.am9 Jul 2017 16:11:12 -   1.44.2.16
  @@ -6,6 +6,8 @@
   
   LINT = splint
   
  +SUBDIS = src .
  +
   EXTRA_DIST = \
rpmjs45.cpp \
rpmjs52.cpp
  @@ -89,7 +91,9 @@
   noinst_PROGRAMS =tjs
   
   moz_srcdir = ${srcdir}/mozilla-release/js/src
  -moz_builddir =   ${builddir}/platform/x86_64/linux/build
  +#moz_builddir =  ${builddir}/platform/x86_64/linux/build
  +moz_builddir =   ${builddir}/src
  +
   #mozilla-release/memory/build/mozmemory_wrap.c \
   #mozilla-release/mozglue/misc/TimeStamp.cpp \
   #mozilla-release/mozglue/misc/TimeStamp_posix.cpp \
  @@ -108,85 +112,12 @@
   #${moz_srcdir}/perf/pm_linux.cpp \
   #${moz_srcdir}/vm/Initialization.cpp \
   #${moz_srcdir}/vm/TraceLogging.cpp \
  -#${moz_srcdir}/vm/TraceLoggingGraph.cpp \
  -#${moz_builddir}/Unified_cpp_js_src0.cpp \
  -#${moz_builddir}/Unified_cpp_js_src1.cpp \
  -#${moz_builddir}/Unified_cpp_js_src2.cpp \
  -#${moz_builddir}/Unified_cpp_js_src3.cpp \
  -#${moz_builddir}/Unified_cpp_js_src4.cpp \
  -#${moz_builddir}/Unified_cpp_js_src5.cpp \
  -#${moz_builddir}/Unified_cpp_js_src6.cpp \
  -#${moz_builddir}/Unified_cpp_js_src7.cpp \
  -#${moz_builddir}/Unified_cpp_js_src8.cpp \
  -#${moz_builddir}/Unified_cpp_js_src9.cpp \
  -#${moz_builddir}/Unified_cpp_js_src10.cpp \
  -#${moz_builddir}/Unified_cpp_js_src11.cpp \
  -#${moz_builddir}/Unified_cpp_js_src12.cpp \
  -#${moz_builddir}/Unified_cpp_js_src13.cpp \
  -#${moz_builddir}/Unified_cpp_js_src14.cpp \
  -#${moz_builddir}/Unified_cpp_js_src15.cpp \
  -#${moz_builddir}/Unified_cpp_js_src16.cpp \
  -#${moz_builddir}/Unified_cpp_js_src17.cpp \
  -#${moz_builddir}/Unified_cpp_js_src18.cpp \
  -#${moz_builddir}/Unified_cpp_js_src19.cpp \
  -#${moz_builddir}/Unified_cpp_js_src20.cpp \
  -#${moz_builddir}/Unified_cpp_js_src21.cpp \
  -#${moz_builddir}/Unified_cpp_js_src22.cpp \
  -#${moz_builddir}/Unified_cpp_js_src23.cpp \
  -#${moz_builddir}/Unified_cpp_js_src24.cpp \
  -#${moz_builddir}/Unified_cpp_js_src25.cpp \
  -#${moz_builddir}/Unified_cpp_js_src26.cpp \
  -#${moz_builddir}/Unified_cpp_js_src27.cpp \
  -#${moz_builddir}/Unified_cpp_js_src28.cpp \
  -#${moz_builddir}/Unified_cpp_js_src29.cpp \
  -#${moz_builddir}/Unified_cpp_js_src30.cpp \
  -#${moz_builddir}/Unified_cpp_js_src31.cpp \
  -#${moz_builddir}/Unified_cpp_js_src32.cpp \
  -#${moz_builddir}/Unified_cpp_js_src33.cpp \
  -#${moz_builddir}/Unified_cpp_js_src34.cpp \
  -#${moz_builddir}/Unified_cpp_js_src35.cpp \
  -#${moz_builddir}/Unified_cpp_js_src36.cpp
  +#${moz_srcdir}/vm/TraceLoggingGraph.cpp
   
   rpmjs45_SOURCES = \
  - ${moz_builddir}/Unified_cpp_js_src0.cpp \
  - ${moz_builddir}/Unified_cpp_js_src1.cpp \
  - ${moz_builddir}/Unified_cpp_js_src2.cpp \
  - ${moz_builddir}/Unified_cpp_js_src3.cpp \
  - ${moz_builddir}/Unified_cpp_js_src4.cpp \
  - ${moz_builddir}/Unified_cpp_js_src5.cpp \
  - ${moz_builddir}/Unified_cpp_js_src6.cpp \
  - ${moz_builddir}/Unified_cpp_js_src7.cpp \
  - ${moz_builddir}/Unified_cpp_js_src8.cpp \
  - ${moz_builddir}/Unified_cpp_js_src9.cpp \
  - ${moz_builddir}/Unified_cpp_js_src10.cpp \
  - ${moz_builddir}/Unified_cpp_js_src11.cpp \
  - ${moz_builddir}/Unified_cpp_js_src12.cpp \
  - ${moz_builddir}/Unified_cpp_js_src13.cpp \
  - ${moz_builddir}/Unified_cpp_js_src14.cpp \
  - ${moz_builddir}/Unified_cpp_js_src15.cpp \
  - ${moz_builddir}/Unified_cpp_js_src16.cpp \
  - ${moz_builddir}/Unified_cpp_js_src17.cpp \
  - ${moz_builddir}/Unified_cpp_js_src18.cpp \
  - ${moz_builddir}/Unified_cpp_js_src19.cpp \
  - ${moz_builddir}/Unified_cpp_js_src

[CVS] RPM: rpm-5_4: rpm/js/ rpmjs45.cpp rpm/rpmio/ rpmjss.h

2017-07-09 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   09-Jul-2017 11:42:42
  Branch: rpm-5_4  Handle: 2017070909424100

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmjs45.cpp
rpm/rpmio   rpmjss.h

  Log:
- rpmjs45: extend the rpmjss object.

  Summary:
RevisionChanges Path
1.1.2.6 +133 -129   rpm/js/rpmjs45.cpp
1.1.2.3 +86 -0  rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs45.cpp
  --- rpm/js/rpmjs45.cpp9 Jul 2017 07:10:29 -   1.1.2.5
  +++ rpm/js/rpmjs45.cpp9 Jul 2017 09:42:41 -   1.1.2.6
  @@ -26,6 +26,9 @@
   JSObject *global;
   };
   
  +struct rpmjss_s _jss;
  +rpmjss jss = &_jss;
  +
   /*==*/
   static void mozFini(rpmjss jss)
   {
  @@ -276,10 +279,6 @@
   #include 
   
   /*==*/
  -struct rpmjss_s _jss;
  -rpmjss jss = &_jss;
  -
  -#ifdef  NOTYET
   #define N_(_str)(_str)
   struct poptOption rpmjssIPoptTable[] = {
 { "allow", '\0', POPT_BIT_SET, &_jss.flags, RPMJSS_FLAGS_ALLOW,
  @@ -311,36 +310,6 @@
 POPT_TABLEEND
   };
   
  -static const char *Ifile;
  -static const char *Imodule;
  -static const char *Icode;
  -static const char *js_cache;
  -static const char *script;
  -static const char **scriptArgs;
  -static int thread_count;
  -
  -typedef enum rpmjssIonFlags_e {
  -ION_SHARED_STUBS = (1 <<  0),
  -ION_SCALAR_REPLACEMENT   = (1 <<  1),
  -ION_GVN  = (1 <<  2),
  -ION_LICM = (1 <<  3),
  -ION_EDGECASE_ANALYSIS= (1 <<  4),
  -ION_PGO  = (1 <<  5),
  -ION_RANGE_ANALYSIS   = (1 <<  6),
  -ION_SINCOS   = (1 <<  7),
  -ION_SINK = (1 <<  8),
  -ION_LOOP_UNROLLING   = (1 <<  9),
  -ION_INSTRUCTION_REORDERING   = (1 << 10),
  -ION_CHECK_RANGE_ANALYSIS = (1 << 11),
  -ION_EXTRA_CHECKS = (1 << 12),
  -ION_INLINING = (1 << 13),
  -ION_OSR  = (1 << 14),
  -ION_LIMIT_SCRIPT_SIZE= (1 << 15),
  -ION_EAGER= (1 << 16),
  -ION_OFFTHREAD_COMPILE= (1 << 17),
  -ION_PARALLEL_COMPILE = (1 << 18),
  -} rpmjssIonFlags;
  -
   rpmjssIonFlags _ionf = (rpmjssIonFlags) (
   ION_SCALAR_REPLACEMENT |
   ION_GVN |
  @@ -355,150 +324,186 @@
   0
   );
   
  -static int ion_warmup_threshold;
  -static const char * ion_regalloc;
  -
   struct poptOption rpmjssIonPoptTable[] = {
 { "ion-shared-stubs", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_SHARED_STUBS,
  + &_jss.ionf, ION_SHARED_STUBS,
N_("Use shared stubs (default: off)"), NULL },
 { "ion-scalar-replacement", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_SCALAR_REPLACEMENT,
  + &_jss.ionf, ION_SCALAR_REPLACEMENT,
N_("Scalar replacement (default: on)"), NULL },
 { "ion-gvn", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_GVN,
  + &_jss.ionf, ION_GVN,
N_("Global value numbering (default: on)"), NULL },
 { "ion-licm", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_LICM,
  + &_jss.ionf, ION_LICM,
N_("Loop invariant code motion (default: on)"), NULL },
 { "ion-edgecase-analysis", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_EDGECASE_ANALYSIS,
  + &_jss.ionf, ION_EDGECASE_ANALYSIS,
N_("Find edge cases where Ion can avoid bailouts (default: off)"), NULL 
},
 { "ion-pgo", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_PGO,
  + &_jss.ionf, ION_PGO,
N_("Profile guided optimization (default: off)"), NULL },
 { "ion-range-analysis", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_RANGE_ANALYSIS,
  + &_jss.ionf, ION_RANGE_ANALYSIS,
N_("Range analysis (default: on)"), NULL },
 { "ion-sincos", '\0', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE,
  - &_ionf, ION_SINCOS,
  + &_jss.ionf, I

[CVS] RPM: rpm-5_4: rpm/js/ extract.sh

2017-07-09 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   09-Jul-2017 11:32:56
  Branch: rpm-5_4  Handle: 2017070909325600

  Modified files:   (Branch: rpm-5_4)
rpm/js  extract.sh

  Log:
- rpmjs54: keep ctypes for JS_HAS_CTYPES.

  Summary:
RevisionChanges Path
1.1.2.10+0  -1  rpm/js/extract.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.9 -r1.1.2.10 extract.sh
  --- rpm/js/extract.sh 8 Jul 2017 19:56:57 -   1.1.2.9
  +++ rpm/js/extract.sh 9 Jul 2017 09:32:56 -   1.1.2.10
  @@ -112,7 +112,6 @@
   extract/js/src/config.status \
   extract/js/src/configure \
   extract/js/src/configure.in \
  -extract/js/src/ctypes \
   extract/js/src/doc \
   extract/js/src/editline \
   extract/js/src/gdb \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/src/ Makefile.am

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 22:32:11
  Branch: rpm-5_4  Handle: 2017070820321100

  Modified files:   (Branch: rpm-5_4)
rpm/js/src  Makefile.am

  Log:
- rpmjs45: uncouple from the mozilla-release tree.

  Summary:
RevisionChanges Path
1.1.2.5 +4  -4  rpm/js/src/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/js/src/Makefile.am
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 Makefile.am
  --- rpm/js/src/Makefile.am8 Jul 2017 19:56:57 -   1.1.2.4
  +++ rpm/js/src/Makefile.am8 Jul 2017 20:32:11 -   1.1.2.5
  @@ -51,7 +51,7 @@
   EXTRA_PROGRAMS =
   noinst_PROGRAMS = js
   
  -moz_srcdir = ${top_srcdir}/js/mozilla-release/js/src
  +moz_srcdir = ${top_srcdir}/js/extract
   
   #mozilla-release/memory/build/mozmemory_wrap.c \
   #mozilla-release/mozglue/misc/TimeStamp.cpp \
  @@ -119,11 +119,11 @@
-fPIC \
-DMOZILLA_CLIENT \
-D'moz_xmalloc(_len)=malloc(_len)' \
  - -I${moz_srcdir}/shell \
  - -I${moz_srcdir} \
  + -I${moz_srcdir}/js/src \
  + -I${moz_srcdir}/mfbt \
  + -I${top_srcdir}/js/include \
-I${srcdir} \
-I${builddir} \
  - -I${top_srcdir}/js/include \
-include ${top_srcdir}/config.h \
-Uioctl -Drpl_ioctl=ioctl \
-include js-confdefs.h \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ extract.sh rpm/js/src/ Makefile.am

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 21:56:57
  Branch: rpm-5_4  Handle: 2017070819565700

  Modified files:   (Branch: rpm-5_4)
rpm/js  extract.sh
rpm/js/src  Makefile.am

  Log:
- rpmjs45: eliminate need for moziila-release/js/src/js/src include
path(s).

  Summary:
RevisionChanges Path
1.1.2.9 +4  -1  rpm/js/extract.sh
1.1.2.4 +2  -8  rpm/js/src/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.8 -r1.1.2.9 extract.sh
  --- rpm/js/extract.sh 8 Jul 2017 16:59:54 -   1.1.2.8
  +++ rpm/js/extract.sh 8 Jul 2017 19:56:57 -   1.1.2.9
  @@ -89,6 +89,7 @@
   
   cp -p mozilla-release/js/src/js/src/selfhosted.out.h extract/js/src
   cp -p mozilla-release/js/src/js/src/jsautokw.h extract/js/src
  +cp -p mozilla-release/js/src/js/src/shell/shellmoduleloader.out.h 
extract/js/src/shell
   
   # mfbt doesn't change by arch or platform, so keep the same unified cpp
   mkdir -p extract/js/src/mfbt/
  @@ -126,7 +127,6 @@
   extract/js/src/README.html \
   extract/js/src/root-deps.mk \
   extract/js/src/root.mk \
  -extract/js/src/shell \
   extract/js/src/skip_subconfigures \
   extract/js/src/subconfigures \
   extract/js/src/tests \
  @@ -162,6 +162,9 @@
   jsversion.h
   jswrapper.h
   perf/jsperf.h
  +selfhosted.out.h
  +jsautokw.h
  +shell/shellmoduleloader.out.h
   "
   for F in $FILES; do
   cp -p extract/js/src/$F include
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/src/Makefile.am
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 Makefile.am
  --- rpm/js/src/Makefile.am8 Jul 2017 18:52:11 -   1.1.2.3
  +++ rpm/js/src/Makefile.am8 Jul 2017 19:56:57 -   1.1.2.4
  @@ -119,15 +119,11 @@
-fPIC \
-DMOZILLA_CLIENT \
-D'moz_xmalloc(_len)=malloc(_len)' \
  - -I${moz_srcdir}/js/src/shell \
  - -I${moz_srcdir}/js/src \
  - -I${moz_srcdir}/dist/include \
-I${moz_srcdir}/shell \
-I${moz_srcdir} \
  - -I${moz_builddir} \
  - -I${top_srcdir}/js/include \
-I${srcdir} \
-I${builddir} \
  + -I${top_srcdir}/js/include \
-include ${top_srcdir}/config.h \
-Uioctl -Drpl_ioctl=ioctl \
-include js-confdefs.h \
  @@ -158,13 +154,11 @@
   
   noinst_LTLIBRARIES = libmozjs.la
   
  -noinst_HEADERS = \
  - js-confdefs.h
  +noinst_HEADERS = js-confdefs.h

   libmozjs_la_SOURCES =$(MOZ_SOURCES)
   libmozjs_la_CPPFLAGS =   $(MOZ_CPPFLAGS)
   libmozjs_la_CXXFLAGS =   $(MOZ_CXXFLAGS)
  -libmozjs_la_LDFLAGS =
   
   js_SOURCES = js45shim.cpp js45.cpp
   js_CPPFLAGS =$(MOZ_CPPFLAGS)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/src/ Makefile.am

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 20:52:11
  Branch: rpm-5_4  Handle: 2017070818521100

  Modified files:   (Branch: rpm-5_4)
rpm/js/src  Makefile.am

  Log:
- rpmjs45: haul out linkage trash.

  Summary:
RevisionChanges Path
1.1.2.3 +0  -9  rpm/js/src/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/js/src/Makefile.am
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 Makefile.am
  --- rpm/js/src/Makefile.am8 Jul 2017 15:35:13 -   1.1.2.2
  +++ rpm/js/src/Makefile.am8 Jul 2017 18:52:11 -   1.1.2.3
  @@ -164,21 +164,12 @@
   libmozjs_la_SOURCES =$(MOZ_SOURCES)
   libmozjs_la_CPPFLAGS =   $(MOZ_CPPFLAGS)
   libmozjs_la_CXXFLAGS =   $(MOZ_CXXFLAGS)
  -libmozjs_la_LIBADD = \
  - -L${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib \
  - -lmozglue -lmemory \
  - -lm -ldl  -lffi -licui18n -licuuc -licudata
   libmozjs_la_LDFLAGS =
   
   js_SOURCES = js45shim.cpp js45.cpp
   js_CPPFLAGS =$(MOZ_CPPFLAGS)
   js_CXXFLAGS =$(MOZ_CXXFLAGS)
   js_LDADD =   libmozjs.la
  -#-L${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib \
  -#-lmozglue -lmemory \
  -#-lffi -licui18n -licuuc -licudata
  -#js_LDFLAGS = \
  -#-R${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib
   
   foo: js rpmjss.inp
./js -f rpmjss.inp
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ extract.sh gen-config.sh

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 18:59:54
  Branch: rpm-5_4  Handle: 2017070816595400

  Modified files:   (Branch: rpm-5_4)
rpm/js  extract.sh gen-config.sh

  Log:
- rpmjss: ensure that js/include is identical to
/usr/include/mozjs-XY.

  Summary:
RevisionChanges Path
1.1.2.8 +77 -26 rpm/js/extract.sh
1.1.2.7 +8  -5  rpm/js/gen-config.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.7 -r1.1.2.8 extract.sh
  --- rpm/js/extract.sh 8 Jul 2017 05:27:41 -   1.1.2.7
  +++ rpm/js/extract.sh 8 Jul 2017 16:59:54 -   1.1.2.8
  @@ -4,22 +4,36 @@
   
   rm -rf extract
   
  -mkdir extract
  -mkdir extract/js
  -mkdir -p extract/intl/icu/source/common/unicode
  +mkdir -p extract/
  +mkdir -p extract/js/
  +mkdir -p extract/memory/build/
  +mkdir -p extract/memory/fallible/
  +mkdir -p extract/memory/mozjemalloc/
  +mkdir -p extract/memory/mozalloc/
  +mkdir -p extract/mozglue/misc/
  +mkdir -p extract/intl/icu/source/common/unicode/
   
  -cp -r mozilla-release/js/src mozilla-release/js/public extract/js/
  -cp -r mozilla-release/mfbt extract/
  +cp -p -r mozilla-release/js/src mozilla-release/js/public extract/js/
  +cp -p -r mozilla-release/mfbt extract/
   
   # We need these even without ICU
  -cp mozilla-release/intl/icu/source/common/unicode/platform.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/ptypes.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/uconfig.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/umachine.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/urename.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/utypes.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/uvernum.h 
extract/intl/icu/source/common/unicode
  -cp mozilla-release/intl/icu/source/common/unicode/uversion.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/platform.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/ptypes.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/uconfig.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/umachine.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/urename.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/utypes.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/uvernum.h 
extract/intl/icu/source/common/unicode
  +cp -p mozilla-release/intl/icu/source/common/unicode/uversion.h 
extract/intl/icu/source/common/unicode
  +
  +cp -p -r mozilla-release/memory/build/moz*.h extract/memory/build
  +cp -p -r mozilla-release/memory/fallible/fallible.h extract/memory/fallible
  +cp -p -r mozilla-release/memory/mozjemalloc/jemalloc_types.h 
extract/memory/mozjemalloc
  +cp -p -r mozilla-release/memory/mozalloc/mozalloc_abort.h 
extract/memory/mozalloc
  +cp -p -r mozilla-release/memory/mozalloc/mozalloc.h extract/memory/mozalloc
  +cp -p -r mozilla-release/memory/mozalloc/mozalloc_oom.h 
extract/memory/mozalloc
  +cp -p -r mozilla-release/mozglue/misc/StackWalk.h extract/mozglue/misc
  +cp -p -r mozilla-release/mozglue/misc/TimeStamp.h extract/mozglue/misc
   
   cd mozilla-release/js/src
   
  @@ -73,12 +87,12 @@
   
   cd ../../..
   
  -cp mozilla-release/js/src/js/src/selfhosted.out.h extract/js/src
  -cp mozilla-release/js/src/js/src/jsautokw.h extract/js/src
  +cp -p mozilla-release/js/src/js/src/selfhosted.out.h extract/js/src
  +cp -p mozilla-release/js/src/js/src/jsautokw.h extract/js/src
   
   # mfbt doesn't change by arch or platform, so keep the same unified cpp
  -mkdir extract/js/src/mfbt
  -cp mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp extract/js/src/mfbt
  +mkdir -p extract/js/src/mfbt/
  +cp -p mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp extract/js/src/mfbt
   
   sed 's/#include ".*\/mfbt\//#include "/' < 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp > t1
   sed 's/#error ".*\/mfbt\//#error "/' < t1 > 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp
  @@ -125

[CVS] RPM: rpm-5_4: rpm/js/src/ js45shim.cpp

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 18:58:38
  Branch: rpm-5_4  Handle: 2017070816583700

  Added files:  (Branch: rpm-5_4)
rpm/js/src  js45shim.cpp

  Log:
- orphan.

  Summary:
RevisionChanges Path
1.1.2.1 +14 -0  rpm/js/src/js45shim.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/src/js45shim.cpp
  
  $ cvs diff -u -r0 -r1.1.2.1 js45shim.cpp
  --- /dev/null 2017-07-08 18:55:00.0 +0200
  +++ js45shim.cpp  2017-07-08 18:58:38.006112675 +0200
  @@ -0,0 +1,14 @@
  +#include "mfbt/Unified_cpp_mfbt0.cpp"
  +#include "jsarray.cpp"
  +#include "jsatom.cpp"
  +#include "jsmath.cpp"
  +#include "builtin/RegExp.cpp"
  +#include "ctypes/CTypes.cpp"
  +#include "ctypes/Library.cpp"
  +#include "frontend/Parser.cpp"
  +#include "gc/StoreBuffer.cpp"
  +#include "jit/x86-shared/Disassembler-x86-shared.cpp"
  +#include "perf/pm_linux.cpp"
  +#include "vm/Initialization.cpp"
  +#include "vm/TraceLogging.cpp"
  +#include "vm/TraceLoggingGraph.cpp"
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am gen-config.sh

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 13:29:09
  Branch: rpm-5_4  Handle: 2017070811290900

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am gen-config.sh

  Log:
- rpmjs45: regenerate platform build tree preserving timestamps.

  Summary:
RevisionChanges Path
1.44.2.15   +6  -4  rpm/js/Makefile.am
1.1.2.6 +49 -10 rpm/js/gen-config.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.14 -r1.44.2.15 Makefile.am
  --- rpm/js/Makefile.am8 Jul 2017 08:14:42 -   1.44.2.14
  +++ rpm/js/Makefile.am8 Jul 2017 11:29:09 -   1.44.2.15
  @@ -148,7 +148,6 @@
   #${moz_builddir}/Unified_cpp_js_src36.cpp
   
   rpmjs45_SOURCES = \
  - rpmjs45shim.cpp \
${moz_builddir}/Unified_cpp_js_src0.cpp \
${moz_builddir}/Unified_cpp_js_src1.cpp \
${moz_builddir}/Unified_cpp_js_src2.cpp \
  @@ -186,7 +185,8 @@
${moz_builddir}/Unified_cpp_js_src34.cpp \
${moz_builddir}/Unified_cpp_js_src35.cpp \
${moz_builddir}/Unified_cpp_js_src36.cpp \
  - rpmjs45.cpp
  + rpmjs45shim.cpp \
  + ${moz_builddir}/shell/Unified_cpp_js_src_shell0.cpp
   rpmjs45_CPPFLAGS = \
-DEXPORT_JS_API \
-DJS_HAS_CTYPES \
  @@ -194,13 +194,15 @@
-fPIC \
-DMOZILLA_CLIENT \
-D'moz_xmalloc(_len)=malloc(_len)' \
  - -I./include \
  - -I${moz_builddir} \
-I${moz_srcdir}/js/src/shell \
-I${moz_srcdir}/js/src \
-I${moz_srcdir}/dist/include \
-I${moz_srcdir}/shell \
-I${moz_srcdir} \
  + -I${moz_builddir} \
  + -I${srcdir}/include \
  + -I${srcdir} \
  + -I${builddir} \
-I../rpmio \
-include ${top_srcdir}/config.h \
-include js-confdefs.h \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/gen-config.sh
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 gen-config.sh
  --- rpm/js/gen-config.sh  8 Jul 2017 05:27:41 -   1.1.2.5
  +++ rpm/js/gen-config.sh  8 Jul 2017 11:29:09 -   1.1.2.6
  @@ -51,19 +51,58 @@
   
   cd ../../..
   
  -rm -rf platform/$1/$2/
  +destdir="platform/$1/$2"
   
  -mkdir -p platform/$1/$2/build
  -mkdir platform/$1/$2/include
  +mkdir -p "$destdir/include"
  +cp -p mozilla-release/js/src/js/src/js-config.h "$destdir/include"
   
  -cp mozilla-release/js/src/js/src/js-confdefs.h platform/$1/$2/build
  -cp mozilla-release/js/src/js/src/*.cpp platform/$1/$2/build
  -cp mozilla-release/js/src/js/src/js-config.h platform/$1/$2/include
  -
  -for unified_file in $(ls -1 platform/$1/$2/build/*.cpp) ; do
  - sed 's/#include ".*\/js\/src\//#include "/' < $unified_file > t1
  - sed 's/#error ".*\/js\/src\//#error "/' < t1 > $unified_file
  +subdir="$destdir/build"
  +mkdir -p "$subdir/.deps/"
  +mkdir -p "$subdir/.old/"
  +mv -f $subdir/Unified*.cpp "$subdir/.old/"
  +
  +cp -p mozilla-release/js/src/js/src/js-confdefs.h "$subdir"
  +cp -p mozilla-release/js/src/js/src/Unified_*.cpp "$subdir"
  +
  +for subfile in $subdir/*.cpp ; do
  + sed 's/#include ".*\/js\/src\//#include "/' < "$subfile" > t1
  + sed 's/#error ".*\/js\/src\//#error "/' < t1 > "$subfile"
rm t1
  + file=$(basename "$subfile")
  + depfile=$(basename "$file" .cpp).Po
  + reffile="$subdir/.old/$file"
  + if [ -f "$reffile" ]; then
  + touch -r "$reffile" "$subfile"
  + touch -r "$reffile" "$subdir/.deps/rpmjs45-$depfile"
  + touch -r "$reffile" "$subdir/.deps/$depfile"
  + else
  + touch "$subdir/.deps/rpmjs45-$depfile"
  + touch "$subdir/.deps/$depfile"
  + fi
   done
  +rm -rf "$subdir/.old/"
  +
  +subdir="$destdir/build/shell"
  +mkdir -p "$subdir/.deps/"
  +mkdir -p "$subdir/.old/"
  +mv -f $subdir/Unified*.cpp "$subdir/.old/"
   
  +cp -p mozilla-release/js/src/js/src/shell/Unified_* "$subdir"
   
  +for subfile in $subdir/*.cpp ; do
  + sed 's/#include ".*\/js\/src\//#include "/' < "$subfile" > t1
  + sed 's/#error ".*\/js\/src\//#e

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am rpmjs45shim.cpp

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 10:14:42
  Branch: rpm-5_4  Handle: 2017070808144200

  Added files:  (Branch: rpm-5_4)
rpm/js  rpmjs45shim.cpp
  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am

  Log:
- rpmjs45: uncouple from -lmozjs45 completely.

  Summary:
RevisionChanges Path
1.44.2.14   +2  -11 rpm/js/Makefile.am
1.1.2.1 +14 -0  rpm/js/rpmjs45shim.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.13 -r1.44.2.14 Makefile.am
  --- rpm/js/Makefile.am8 Jul 2017 07:39:17 -   1.44.2.13
  +++ rpm/js/Makefile.am8 Jul 2017 08:14:42 -   1.44.2.14
  @@ -148,16 +148,7 @@
   #${moz_builddir}/Unified_cpp_js_src36.cpp
   
   rpmjs45_SOURCES = \
  - ${moz_srcdir}/jsarray.cpp \
  - ${moz_srcdir}/jsatom.cpp \
  - ${moz_srcdir}/jsmath.cpp \
  - ${moz_srcdir}/builtin/RegExp.cpp \
  - ${moz_srcdir}/gc/StoreBuffer.cpp \
  - ${moz_srcdir}/frontend/Parser.cpp \
  - ${moz_srcdir}/jit/x86-shared/Disassembler-x86-shared.cpp \
  - ${moz_srcdir}/vm/Initialization.cpp \
  - ${moz_srcdir}/vm/TraceLogging.cpp \
  - ${moz_srcdir}/vm/TraceLoggingGraph.cpp \
  + rpmjs45shim.cpp \
${moz_builddir}/Unified_cpp_js_src0.cpp \
${moz_builddir}/Unified_cpp_js_src1.cpp \
${moz_builddir}/Unified_cpp_js_src2.cpp \
  @@ -237,7 +228,7 @@
-fno-rtti
   rpmjs45_LDADD = \
-L${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib \
  - -lmozjs-45 -lmozglue -lmemory \
  + -lmozglue -lmemory \
-lm -ldl  -lffi -licui18n -licuuc -licudata \
$(RPMIO_LDADD_COMMON)
   rpmjs45_LDFLAGS = \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45shim.cpp
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmjs45shim.cpp
  --- /dev/null 2017-07-08 10:11:00.0 +0200
  +++ rpmjs45shim.cpp   2017-07-08 10:14:42.677279338 +0200
  @@ -0,0 +1,14 @@
  +#include "mfbt/Unified_cpp_mfbt0.cpp"
  +#include "jsarray.cpp"
  +#include "jsatom.cpp"
  +#include "jsmath.cpp"
  +#include "builtin/RegExp.cpp"
  +#include "ctypes/CTypes.cpp"
  +#include "ctypes/Library.cpp"
  +#include "frontend/Parser.cpp"
  +#include "gc/StoreBuffer.cpp"
  +#include "jit/x86-shared/Disassembler-x86-shared.cpp"
  +#include "perf/pm_linux.cpp"
  +#include "vm/Initialization.cpp"
  +#include "vm/TraceLogging.cpp"
  +#include "vm/TraceLoggingGraph.cpp"
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am rpmjs45.cpp

2017-07-08 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 09:39:17
  Branch: rpm-5_4  Handle: 2017070807391700

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am rpmjs45.cpp

  Log:
- rpmjs45: uncouple (mostly) from -lmozjs-45.

  Summary:
RevisionChanges Path
1.44.2.13   +125 -11rpm/js/Makefile.am
1.1.2.4 +0  -36 rpm/js/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.12 -r1.44.2.13 Makefile.am
  --- rpm/js/Makefile.am7 Jul 2017 10:02:57 -   1.44.2.12
  +++ rpm/js/Makefile.am8 Jul 2017 07:39:17 -   1.44.2.13
  @@ -88,34 +88,143 @@
   EXTRA_PROGRAMS = rpmjs45 rpmjs52 v8
   noinst_PROGRAMS =tjs
   
  +moz_srcdir = ${srcdir}/mozilla-release/js/src
  +moz_builddir =   ${builddir}/platform/x86_64/linux/build
  +#mozilla-release/memory/build/mozmemory_wrap.c \
  +#mozilla-release/mozglue/misc/TimeStamp.cpp \
  +#mozilla-release/mozglue/misc/TimeStamp_posix.cpp \
  +#${moz_srcdir}/memory/mozalloc/Unified_cpp_memory_mozalloc0.cpp \
  +#mozilla-release/mfbt/decimal/Decimal.cpp \
  +#${moz_srcdir}/mfbt/Unified_cpp_mfbt0.cpp \
  +#${moz_srcdir}/jsarray.cpp \
  +#${moz_srcdir}/jsatom.cpp \
  +#${moz_srcdir}/jsmath.cpp \
  +#${moz_srcdir}/builtin/RegExp.cpp \
  +#${moz_srcdir}/ctypes/CTypes.cpp \
  +#${moz_srcdir}/ctypes/Library.cpp \
  +#${moz_srcdir}/frontend/Parser.cpp \
  +#${moz_srcdir}/gc/StoreBuffer.cpp \
  +#${moz_srcdir}/jit/x86-shared/Disassembler-x86-shared.cpp \
  +#${moz_srcdir}/perf/pm_linux.cpp \
  +#${moz_srcdir}/vm/Initialization.cpp \
  +#${moz_srcdir}/vm/TraceLogging.cpp \
  +#${moz_srcdir}/vm/TraceLoggingGraph.cpp \
  +#${moz_builddir}/Unified_cpp_js_src0.cpp \
  +#${moz_builddir}/Unified_cpp_js_src1.cpp \
  +#${moz_builddir}/Unified_cpp_js_src2.cpp \
  +#${moz_builddir}/Unified_cpp_js_src3.cpp \
  +#${moz_builddir}/Unified_cpp_js_src4.cpp \
  +#${moz_builddir}/Unified_cpp_js_src5.cpp \
  +#${moz_builddir}/Unified_cpp_js_src6.cpp \
  +#${moz_builddir}/Unified_cpp_js_src7.cpp \
  +#${moz_builddir}/Unified_cpp_js_src8.cpp \
  +#${moz_builddir}/Unified_cpp_js_src9.cpp \
  +#${moz_builddir}/Unified_cpp_js_src10.cpp \
  +#${moz_builddir}/Unified_cpp_js_src11.cpp \
  +#${moz_builddir}/Unified_cpp_js_src12.cpp \
  +#${moz_builddir}/Unified_cpp_js_src13.cpp \
  +#${moz_builddir}/Unified_cpp_js_src14.cpp \
  +#${moz_builddir}/Unified_cpp_js_src15.cpp \
  +#${moz_builddir}/Unified_cpp_js_src16.cpp \
  +#${moz_builddir}/Unified_cpp_js_src17.cpp \
  +#${moz_builddir}/Unified_cpp_js_src18.cpp \
  +#${moz_builddir}/Unified_cpp_js_src19.cpp \
  +#${moz_builddir}/Unified_cpp_js_src20.cpp \
  +#${moz_builddir}/Unified_cpp_js_src21.cpp \
  +#${moz_builddir}/Unified_cpp_js_src22.cpp \
  +#${moz_builddir}/Unified_cpp_js_src23.cpp \
  +#${moz_builddir}/Unified_cpp_js_src24.cpp \
  +#${moz_builddir}/Unified_cpp_js_src25.cpp \
  +#${moz_builddir}/Unified_cpp_js_src26.cpp \
  +#${moz_builddir}/Unified_cpp_js_src27.cpp \
  +#${moz_builddir}/Unified_cpp_js_src28.cpp \
  +#${moz_builddir}/Unified_cpp_js_src29.cpp \
  +#${moz_builddir}/Unified_cpp_js_src30.cpp \
  +#${moz_builddir}/Unified_cpp_js_src31.cpp \
  +#${moz_builddir}/Unified_cpp_js_src32.cpp \
  +#${moz_builddir}/Unified_cpp_js_src33.cpp \
  +#${moz_builddir}/Unified_cpp_js_src34.cpp \
  +#${moz_builddir}/Unified_cpp_js_src35.cpp \
  +#${moz_builddir}/Unified_cpp_js_src36.cpp
  +
   rpmjs45_SOURCES = \
  + ${moz_srcdir}/jsarray.cpp \
  + ${moz_srcdir}/jsatom.cpp \
  + ${moz_srcdir}/jsmath.cpp \
  + ${moz_srcdir}/builtin/RegExp.cpp \
  + ${moz_srcdir}/gc/StoreBuffer.cpp \
  + ${moz_srcdir}/frontend/Parser.cpp \
  + ${moz_srcdir}/jit/x86-shared/Disassembler-x86-shared.cpp \
  + ${moz_srcdir}/vm/Initialization.cpp \
  + ${moz_srcdir}/vm/TraceLogging.cpp \
  + ${moz_srcdir}/vm/TraceLoggingGraph.cpp \
  + ${moz_builddir}/Unified_cpp_js_src0.cpp \
  + ${moz_builddir}/Unified_cpp_js_src1.cpp \
  + ${moz_builddir}/Unified_cpp_js_src2.cpp \
  + ${moz_builddir}/Unified_cpp_js_src3.cpp \
  + ${moz_builddir}/Unified_cpp_js_src4.cpp \
  + ${moz_builddir}/Unified_cpp_js_src5.cpp \
  + ${moz_builddir}/Unified_cpp_js_src6.cpp \
  + ${moz_builddir}/Unified_cpp_js_sr

[CVS] RPM: rpm-5_4: rpm/js/ extract.sh gen-config.sh

2017-07-07 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   08-Jul-2017 07:27:41
  Branch: rpm-5_4  Handle: 2017070805274100

  Modified files:   (Branch: rpm-5_4)
rpm/js  extract.sh gen-config.sh

  Log:
- sanity.

  Summary:
RevisionChanges Path
1.1.2.7 +1  -1  rpm/js/extract.sh
1.1.2.5 +1  -1  rpm/js/gen-config.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 extract.sh
  --- rpm/js/extract.sh 7 Jul 2017 10:02:57 -   1.1.2.6
  +++ rpm/js/extract.sh 8 Jul 2017 05:27:41 -   1.1.2.7
  @@ -43,10 +43,10 @@
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
  + --enable-release \
--enable-optimize \
--enable-pie \
--enable-readline \
  - --enable-release \
--enable-shared-js \
--enable-system-ffi \
--enable-xterm-updates \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/gen-config.sh
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 gen-config.sh
  --- rpm/js/gen-config.sh  7 Jul 2017 10:02:57 -   1.1.2.4
  +++ rpm/js/gen-config.sh  8 Jul 2017 05:27:41 -   1.1.2.5
  @@ -30,10 +30,10 @@
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
  + --enable-release \
--enable-optimize \
--enable-pie \
--enable-readline \
  - --enable-release \
--enable-shared-js \
--enable-system-ffi \
--enable-xterm-updates \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ rpmjs45.cpp

2017-07-07 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   07-Jul-2017 13:29:12
  Branch: rpm-5_4  Handle: 2017070711291200

  Modified files:   (Branch: rpm-5_4)
rpm/js  rpmjs45.cpp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.3 +61 -11 rpm/js/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmjs45.cpp
  --- rpm/js/rpmjs45.cpp7 Jul 2017 05:06:15 -   1.1.2.2
  +++ rpm/js/rpmjs45.cpp7 Jul 2017 11:29:12 -   1.1.2.3
  @@ -8369,8 +8369,12 @@
   
   JS::SetLargeAllocationFailureCallback(I->rt, nullptr, nullptr);
   
  +#ifdef   DYING
   if (I->cx)
JS_DestroyContext(I->cx);
  +#else
  +DestroyContext(I->cx, true);
  +#endif
   I->cx = NULL;
   
   KillWatchdog(I->rt);
  @@ -8404,6 +8408,9 @@
   JSPrincipals * _principals = NULL;
   bool ok;
   
  +I = (JSI_t) calloc(1, sizeof(*I));
  +assert(I);
  +
   // Start the engine.
   if (rpmjss_nopens++ == 0)
JS_Init();
  @@ -8411,14 +8418,10 @@
   ok = InitSharedArrayBufferMailbox();
   assert(ok);
   
  -I = (JSI_t) calloc(1, sizeof(*I));
  -assert(I);
  -
   static uint32_t _maxbytes = 8L * 1024L * 1024L;
   static uint32_t _maxNurseryBytes = JS::DefaultNurseryBytes;
  -JSRuntime * _parentRuntime = nullptr;
   
  -JSRuntime * rt = JS_NewRuntime(_maxbytes, _maxNurseryBytes, 
_parentRuntime);
  +JSRuntime * rt = JS_NewRuntime(_maxbytes, _maxNurseryBytes);
   assert(rt);
   I->rt = rt;
   
  @@ -8432,13 +8435,14 @@
   #ifdef   DYING
   JS_SetRuntimePrivate(rt, (void *)jss);
   #else
  -JS_SetRuntimePrivate(rt, sr);
  +JS_SetRuntimePrivate(rt, sr);// XXX sr.get()
   #endif

   JS_SetErrorReporter(rt, my_ErrorReporter);
   JS::SetOutOfMemoryCallback(rt, my_OOMCallback, nullptr);
   
  -// XXX SetRuntimeOptions(rt, op);
  +// XXX ok = SetRuntimeOptions(rt, op);
  +// XXX assert(ok);
   
   sr->interruptFunc.init(rt, NullValue());
   sr->lastWarning.init(rt, NullValue());
  @@ -8454,28 +8458,51 @@
   JS_SetSecurityCallbacks(rt, ::securityCallbacks);
   JS_InitDestroyPrincipalsCallback(rt, ShellPrincipals::destroy);
   
  -// XXX JS_SetInterruptCallback(rt, ShellInterruptCallback);
  -
  +JS_SetInterruptCallback(rt, ShellInterruptCallback);
   JS::SetAsmJSCacheOps(rt, );
   
   JS_SetNativeStackQuota(rt, gMaxStackSize);
   
  -// XXX JS::dbg::SetDebuggerMallocSizeOf(rt, moz_malloc_size_of);
  +JS::dbg::SetDebuggerMallocSizeOf(rt, moz_malloc_size_of);
  +
  +ok = offThreadState.init();
  +assert(ok);
   
   ok = InitWatchdog(rt);
   assert(ok);
   
  +#ifdef   DYING
   JSContext * cx = JS_NewContext(rt, _stackChunkSize);
  +#else
  +JSContext * cx = NewContext(rt);
  +#endif
   assert(cx);
   I->cx = cx;
  +#ifdef   DYING
   JS_SetContextPrivate(cx, (void *)jss);
  -// XXX JS_SetSecondContextPrivate(cx, (void *)jss);
  +#else
  +JS_SetSecondContextPrivate(cx, (void *)jss);
  +#endif
   
   JS_SetGCParameter(rt, JSGC_MODE, JSGC_MODE_INCREMENTAL);
   JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 
1024  );
   
   JS::SetLargeAllocationFailureCallback(rt, my_LargeAllocFailCallback, 
(void  *)cx);
   
  +// Set some parameters to allow incremental GC in low memory conditions,
  +// as is done for the browser, except in more-deterministic builds or 
when
  +// disabled by command line options.
  +#ifndef JS_MORE_DETERMINISTIC
  +#ifdef   FIXME
  +if (!op.getBoolOption("no-incremental-gc"))
  +#endif
  +{
  +JS_SetGCParameter(rt, JSGC_DYNAMIC_HEAP_GROWTH, 1);
  +JS_SetGCParameter(rt, JSGC_DYNAMIC_MARK_SLICE, 1);
  +JS_SetGCParameter(rt, JSGC_SLICE_TIME_BUDGET, 10);
  +}
  +#endif
  +
   js::SetPreserveWrapperCallback(rt, DummyPreserveWrapperCallback);
   
   // result = Shell(cx, , envp);
  @@ -8486,6 +8513,29 @@
glob = NewGlobalObject(cx, options, _principals);
   assert(glob);
I->global = glob;
  +
  + JSAutoCompartment ac(cx, glob);
  +
  +#ifdef   FIXME
  + int result = ProcessArgs(cx, op);
  + 
  +#ifdef  FIXME
  +if (enableDisassemblyDumps)
  +js::DumpCompartmentPCCounts(cx);
  +#endif
  +
  +if (!op->getBoolOption("no-js-cache-per-process")) {
  

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am extract.sh gen-config.sh

2017-07-07 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   07-Jul-2017 12:02:58
  Branch: rpm-5_4  Handle: 2017070710025700

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am extract.sh gen-config.sh

  Log:
- rpmjs45: add --enable-ctypes, backout
--enable-{jitspew,mode-determinism}.

  Summary:
RevisionChanges Path
1.44.2.12   +6  -2  rpm/js/Makefile.am
1.1.2.6 +4  -3  rpm/js/extract.sh
1.1.2.4 +3  -3  rpm/js/gen-config.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.11 -r1.44.2.12 Makefile.am
  --- rpm/js/Makefile.am7 Jul 2017 05:06:15 -   1.44.2.11
  +++ rpm/js/Makefile.am7 Jul 2017 10:02:57 -   1.44.2.12
  @@ -183,11 +183,15 @@
   
   extract: mozilla-release
@echo "-- $@ --"
  - @CPPFLAGS="-fno-tree-vrp -fno-strict-aliasing 
-fno-delete-null-pointer-checks" sh -e ./extract.sh
  + @CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 
-mtune=generic -fno-tree-vrp -fno-strict-aliasing 
-fno-delete-null-pointer-checks' \
  + CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 
-mtune=generic -fno-tree-vrp -fno-strict-aliasing 
-fno-delete-null-pointer-checks' \
  + LINKFLAGS='-Wl,-z,relro' \
  + LDFLAGS='-Wl,-z,relro' \
  + sh -e ./extract.sh
   
   platform: extract
@echo "-- $@ --"
  - @sh -e ./gen-config.sh `uname -m` linux
  +#@sh -e ./gen-config.sh `uname -m` linux
   
   clean-local:
rm -rf platform extract include mozilla-release
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 extract.sh
  --- rpm/js/extract.sh 7 Jul 2017 05:06:15 -   1.1.2.5
  +++ rpm/js/extract.sh 7 Jul 2017 10:02:57 -   1.1.2.6
  @@ -55,10 +55,10 @@
--with-system-icu \
--with-system-zlib \
--with-intl-api \
  - --enable-more-deterministic \
  - --enable-ctypes \
  - --enable-jitspew
  + --enable-ctypes
   
  +#--enable-more-deterministic
  +#--enable-jitspew
   #--enable-gczeal
   #--enable-gc-trace
   
  @@ -69,6 +69,7 @@
   # we have to run make to generate a byte code version of the self hosted js 
and
   # a switch table
   make -j8
  +#make |& sed -e 's,/home/X/src/wdj54/js/mozilla-release,,g' | sed -e 
's,/X/src/wdj54/js/mozilla-release,,g' | tee xxx
   
   cd ../../..
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/gen-config.sh
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 gen-config.sh
  --- rpm/js/gen-config.sh  7 Jul 2017 05:06:15 -   1.1.2.3
  +++ rpm/js/gen-config.sh  7 Jul 2017 10:02:57 -   1.1.2.4
  @@ -42,10 +42,10 @@
--with-system-icu \
--with-system-zlib \
--with-intl-api \
  - --enable-more-deterministic \
  - --enable-ctypes \
  - --enable-jitspew
  + --enable-ctypes
   
  +#--enable-more-deterministic
  +#--enable-jitspew
   #--enable-gczeal
   #--enable-gc-trace
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-07-06 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   07-Jul-2017 00:11:17
  Branch: rpm-5_4  Handle: 2017070622111700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjss: WIP.

  Summary:
RevisionChanges Path
1.1.2.23+358 -6 rpm/rpmio/rpmjs45.cpp
1.1.2.12+23 -22 rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.22 -r1.1.2.23 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 4 Jul 2017 08:51:53 -   1.1.2.22
  +++ rpm/rpmio/rpmjs45.cpp 6 Jul 2017 22:11:17 -   1.1.2.23
  @@ -141,7 +141,7 @@
   };
   
   namespace js {
  -bool gCanUseExtraThreads = false;
  +bool gCanUseExtraThreads = true;
   namespace shell {
   
   #ifdef   NOTYET
  @@ -1428,8 +1428,10 @@
   return false;
   
   RootedObject object(cx, ());
  +#ifdef   FIXME
   if (!object->is())
   return false;
  +#endif
   
   resultOut.set(>as());
   return true;
  @@ -4462,12 +4464,14 @@
   return false;
   
   args.rval().setObject(*module);
  +return true;
   #else
   JSAutoByteString chars(cx, args[0].toString());
   if (!chars)
   return false;
  +
  +return false;
   #endif
  -return true;
   }
   
   static bool
  @@ -8019,8 +8023,10 @@
   if (const char* path = op->getStringOption("module-load-path"))
   moduleLoadPath = path;
   
  +#ifdef   FIXME
   if (!modulePaths.empty() && !InitModuleLoader(cx))
   return EXIT_FAILURE;
  +#endif
   
   while (!filePaths.empty() || !codeChunks.empty() || 
!modulePaths.empty()) {
   size_t fpArgno = filePaths.empty() ? SIZE_MAX : filePaths.argno();
  @@ -8350,9 +8356,11 @@
   if (op->getBoolOption("no-ggc"))
   noggc.emplace(cx->runtime());
   
  +#ifdef   FIXME
   Maybe nocgc;
   if (op->getBoolOption("no-cgc"))
   nocgc.emplace(cx->runtime());
  +#endif
   
   JSAutoRequest ar(cx);
   
  @@ -8375,8 +8383,10 @@
   
   int result = ProcessArgs(cx, op);
   
  +#ifdef   FIXME
   if (enableDisassemblyDumps)
   js::DumpCompartmentPCCounts(cx);
  +#endif
   
   if (!op->getBoolOption("no-js-cache-per-process")) {
   if (jsCacheAsmJSPath) {
  @@ -8622,6 +8632,342 @@
   #include 
   
   /*==*/
  +static int mozShellMain(int argc, char **argv, char **envp)
  +{
  +sArgc = argc;
  +sArgv = argv;
  +  
  +JSRuntime* rt;
  +JSContext* cx;
  +int result;
  +  
  +#ifdef HAVE_SETLOCALE
  +setlocale(LC_ALL, ""); 
  +#endif  
  +
  +MaybeOverrideOutFileFromEnv("JS_STDERR", stderr, );
  +MaybeOverrideOutFileFromEnv("JS_STDOUT", stdout, );
  +
  +OptionParser op("Usage: {progname} [options] [[script] scriptArgs*]");
  +
  +op.setDescription("The SpiderMonkey shell provides a command line 
interface to the "
  +"JavaScript engine. Code and file options provided via the command 
line are "
  +"run left to right. If provided, the optional script argument is run 
after "
  +"all options have been processed. Just-In-Time compilation modes may 
be enabled via "
  +"command line options.");
  +op.setDescriptionWidth(72);
  +op.setHelpWidth(80);
  +op.setVersion(JS_GetImplementationVersion());
  +
  +if (!op.addMultiStringOption('f', "file", "PATH", "File path to run")
  +|| !op.addMultiStringOption('m', "module", "PATH", "Module path to 
run")
  +|| !op.addMultiStringOption('e', "execute", "CODE", "Inline code to 
run")
  +|| !op.addBoolOption('i', "shell", "Enter prompt after running code")
  +|| !op.addBoolOption('c', "compileonly", "Only compile, don't run 
(syntax checking mode)")
  +|| !op.addBoolOption('w', "warnings", "Emit warnings")
  +|| !op.addBoolOption('W', "nowarnings", "Don't emit warnings")
  +|| !op.addBoolOption('s', "strict", "Check strictness")
  +|| !op.addBoolOption('D', "dump-bytecode", "Dump bytecode with exec 
count for all scripts")
  +

[CVS] RPM: rpm-5_4: rpm/js/ .cvsignore Makefile.am extract.sh gen-conf...

2017-07-06 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   06-Jul-2017 17:02:00
  Branch: rpm-5_4  Handle: 2017070615015901

  Added files:  (Branch: rpm-5_4)
rpm/js  rpmjs45.cpp
  Modified files:   (Branch: rpm-5_4)
rpm/js  .cvsignore Makefile.am extract.sh gen-config.sh

  Log:
- rpmjs: revert to mozjs-45 for now.

  Summary:
RevisionChanges Path
1.4.4.2 +2  -0  rpm/js/.cvsignore
1.44.2.10   +40 -4  rpm/js/Makefile.am
1.1.2.4 +31 -68 rpm/js/extract.sh
1.1.2.2 +15 -1  rpm/js/gen-config.sh
1.1.2.1 +76 -0  rpm/js/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/js/.cvsignore
  
  $ cvs diff -u -r1.4.4.1 -r1.4.4.2 .cvsignore
  --- rpm/js/.cvsignore 5 Jul 2017 15:34:28 -   1.4.4.1
  +++ rpm/js/.cvsignore 6 Jul 2017 15:01:59 -   1.4.4.2
  @@ -16,3 +16,5 @@
   include
   extract
   platform
  +rpmjs45
  +rpmjs52
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.9 -r1.44.2.10 Makefile.am
  --- rpm/js/Makefile.am5 Jul 2017 20:23:26 -   1.44.2.9
  +++ rpm/js/Makefile.am6 Jul 2017 15:01:59 -   1.44.2.10
  @@ -4,7 +4,10 @@
   
   LINT = splint
   
  -EXTRA_DIST = 
  +EXTRA_DIST =
  + rpmjs45.cpp \
  + rpmjs52.cpp
  +
   #$(srcdir)/Makefile.* \
   #$(srcdir)/*.[ch] \
   #$(srcdir)/legacy.cudf \
  @@ -80,9 +83,23 @@
rpmsx-js.c rpmsys-js.c rpmte-js.c rpmts-js.c rpmtxn-js.c rpmxar-js.c \
syck-js.c uuid-js.c
   
  -EXTRA_PROGRAMS = v8
  +EXTRA_PROGRAMS = rpmjs45 rpmjs52 v8
   noinst_PROGRAMS =tjs
   
  +rpmjs45_SOURCES = rpmjs45.cpp
  +rpmjs45_CPPFLAGS = -I./include -include js/RequiredDefines.h -fPIC 
-DRPMJSS_SELF_TEST
  +rpmjs45_LDADD = \
  + -L${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib -lmozjs-45 
-lmozglue -lmemory
  +rpmjs45_LDFLAGS = \
  + -R${abs_top_builddir}/js/mozilla-release/js/src/dist/sdk/lib
  +#rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC -DRPMJSS_SELF_TEST
  +#rpmjs45_LDADD = -L/usr/lib64 -lmozjs-45
  +
  +rpmjs52_SOURCES = rpmjs52.cpp
  +#rpmjs52_CPPFLAGS = -I./include -include js/RequiredDefines.h -fPIC 
-DRPMJSS_SELF_TEST
  +rpmjs52_CPPFLAGS = -include /usr/include/mozjs-52/js/RequiredDefines.h 
-I/usr/include/mozjs-52 -fPIC -DRPMJSS_SELF_TEST
  +rpmjs52_LDADD = -L/usr/lib64 -lmozjs-52 
mozilla-release/js/src/dist/sdk/lib/libmozglue.a
  +
   tjs_SOURCES =tjs.c
   tjs_LDADD =  librpmjsm.la $(RPM_LDADD_COMMON)
   
  @@ -90,9 +107,28 @@
   v8_CPPFLAGS =${CPPFLAGS} -fPIC
   v8_LDFLAGS = -fsanitize=address -lv8
   
  +#MOZJS_VERSION = 45.0esr
  +#MOZJS_VERSION = 45.0.1esr
  +#MOZJS_VERSION = 45.0.2esr
  +#MOZJS_VERSION = 45.1.0esr
  +#MOZJS_VERSION = 45.1.1esr
  +#MOZJS_VERSION = 45.2.0esr
  +#MOZJS_VERSION = 45.3.0esr
   #MOZJS_VERSION = 45.4.0esr
  -#MOZJS_VERSION = 45.9.0esr
  -MOZJS_VERSION = 52.2.1esr
  +#MOZJS_VERSION = 45.5.0esr
  +#MOZJS_VERSION = 45.5.1esr
  +#MOZJS_VERSION = 45.6.0esr
  +#MOZJS_VERSION = 45.7.0esr
  +#MOZJS_VERSION = 45.8.0esr
  +MOZJS_VERSION = 45.9.0esr
  +#MOZJS_VERSION = 52.1.0esr
  +#MOZJS_VERSION = 52.0esr
  +#MOZJS_VERSION = 52.0.1esr
  +#MOZJS_VERSION = 52.0.2esr
  +#MOZJS_VERSION = 52.1.1esr
  +#MOZJS_VERSION = 52.1.2esr
  +#MOZJS_VERSION = 52.2.0esr
  +#MOZJS_VERSION = 52.2.1esr
   
   MOZJS_TARBALL = firefox-${MOZJS_VERSION}.source.tar.xz
   MOZJS_URL =  
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${MOZJS_VERSION}/source/${MOZJS_TARBALL}
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 extract.sh
  --- rpm/js/extract.sh 5 Jul 2017 20:23:26 -   1.1.2.3
  +++ rpm/js/extract.sh 6 Jul 2017 15:01:59 -   1.1.2.4
  @@ -28,47 +28,40 @@
   #PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
   PYTHON=python ./configure \
--host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu \
  + --program-prefix= \
  + --disable-dependency-tracking \
--prefix=/usr \
  + --exec-prefix=/usr \
  + --bindir=/usr/bin \
  + --sbindir=/usr/sbin \
  + --sysconfdir=/etc \
  + --datadir=/usr/share \
  + --includedir=/usr/include \
--libdir=/usr/lib64 \
  +

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am extract.sh

2017-07-05 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   05-Jul-2017 22:23:26
  Branch: rpm-5_4  Handle: 2017070520232600

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am extract.sh

  Log:
- mozjs: upgrade to 52.2.1esr.

  Summary:
RevisionChanges Path
1.44.2.9+2  -1  rpm/js/Makefile.am
1.1.2.3 +212 -156   rpm/js/extract.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.8 -r1.44.2.9 Makefile.am
  --- rpm/js/Makefile.am5 Jul 2017 18:11:06 -   1.44.2.8
  +++ rpm/js/Makefile.am5 Jul 2017 20:23:26 -   1.44.2.9
  @@ -91,7 +91,8 @@
   v8_LDFLAGS = -fsanitize=address -lv8
   
   #MOZJS_VERSION = 45.4.0esr
  -MOZJS_VERSION = 45.9.0esr
  +#MOZJS_VERSION = 45.9.0esr
  +MOZJS_VERSION = 52.2.1esr
   
   MOZJS_TARBALL = firefox-${MOZJS_VERSION}.source.tar.xz
   MOZJS_URL =  
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${MOZJS_VERSION}/source/${MOZJS_TARBALL}
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 extract.sh
  --- rpm/js/extract.sh 5 Jul 2017 18:11:06 -   1.1.2.2
  +++ rpm/js/extract.sh 5 Jul 2017 20:23:26 -   1.1.2.3
  @@ -27,41 +27,48 @@
   # headers, but only to stub out functions that fail at runtime
   #PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
   PYTHON=python ./configure \
  - --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu \
  - --program-prefix= \
  - --disable-dependency-tracking \
  + --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu \
--prefix=/usr \
  - --exec-prefix=/usr \
  - --bindir=/usr/bin \
  - --sbindir=/usr/sbin \
  - --sysconfdir=/etc \
  - --datadir=/usr/share \
  - --includedir=/usr/include \
--libdir=/usr/lib64 \
  - --libexecdir=/usr/libexec \
  - --localstatedir=/var \
  - --sharedstatedir=/var/lib \
  - --mandir=/usr/share/man \
  - --infodir=/usr/share/info \
--enable-optimize \
--enable-pie \
--enable-posix-nspr-emulation \
--enable-readline \
--enable-release \
--enable-shared-js \
  - --enable-system-ffi \
  - --enable-xterm-updates \
--with-pthreads \
  - --with-system-icu \
--with-system-zlib \
  - --with-intl-api \
  - --enable-gczeal \
  - --enable-more-deterministic
  + --without-intl-api \
  + --enable-gczeal
  +
  +#--enable-gczeal
  +#--enable-more-deterministic
   #--enable-ctypes
   #--enable-gc-trace
   #--enable-jitspew
   
  -echo "CPPSRCS += \$(DEPTH)/mfbt/Unified_cpp_mfbt0.cpp 
\$(DEPTH)/../../mfbt/Compression.cpp \$(DEPTH)/../../mfbt/decimal/Decimal.cpp" 
>> js/src/backend.mk
  +#--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu
  +#--program-prefix=
  +#--disable-dependency-tracking
  +#--exec-prefix=/usr
  +#--bindir=/usr/bin
  +#--sbindir=/usr/sbin
  +#--sysconfdir=/etc
  +#--datadir=/usr/share
  +#--includedir=/usr/include
  +#--libexecdir=/usr/libexec
  +#--localstatedir=/var
  +#--sharedstatedir=/var/lib
  +#--mandir=/usr/share/man
  +#--infodir=/usr/share/info
  +#--enable-system-ffi
  +#--enable-xterm-updates
  +#--with-system-icu
  +#--with-intl-api
  +#--enable-gczeal
  +#--enable-more-deterministic
  +
  +#echo "CPPSRCS += \$(DEPTH)/mfbt/Unified_cpp_mfbt0.cpp 
\$(DEPTH)/../../mfbt/Compression.cpp \$(DEPTH)/../../mfbt/decimal/Decimal.cpp" 
>> js/src/backend.mk
   #echo "STATIC_LIBS += \$(DEPTH)/mfbt/libmfbt.a" >> js/src/backend.mk
   
   # skipping icu and relying on posix nspr emulation all helps.  After that we
  @@ -75,12 +82,19 @@
   cp mozilla-release/js/src/js/src/jsautokw.h extract/js/src
   
   # mfbt doesn't change by arch or platform, so keep the same unified cpp
  -mkdir extract/js/src/mfbt
  -cp mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp extract/js/src/mfbt
  +if [ -f mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp ]; then
  +mkdir -p extract/js/src/mfbt
   
  -sed 's/#include ".*\/mfbt\//#include "/' < 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp > t1
  -sed 's/#error ".*\/mfbt\//#error "/' < t1 > 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp
  -rm t1
  +cp mozilla-re

[CVS] RPM: rpm-5_4: rpm/js/ Makefile.am extract.sh

2017-07-05 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   05-Jul-2017 20:11:06
  Branch: rpm-5_4  Handle: 2017070518110600

  Modified files:   (Branch: rpm-5_4)
rpm/js  Makefile.am extract.sh

  Log:
- mozjs: build library and add additional configuration.

  Summary:
RevisionChanges Path
1.44.2.8+2  -2  rpm/js/Makefile.am
1.1.2.2 +40 -3  rpm/js/extract.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.7 -r1.44.2.8 Makefile.am
  --- rpm/js/Makefile.am5 Jul 2017 15:34:28 -   1.44.2.7
  +++ rpm/js/Makefile.am5 Jul 2017 18:11:06 -   1.44.2.8
  @@ -107,11 +107,11 @@
   
   extract: mozilla-release
@echo "-- $@ --"
  - @sh ./extract.sh
  + @CPPFLAGS="-fno-tree-vrp -fno-strict-aliasing 
-fno-delete-null-pointer-checks" sh -e ./extract.sh
   
   platform: extract
@echo "-- $@ --"
  - @sh ./gen-config.sh `uname -m` linux
  + @sh -e ./gen-config.sh `uname -m` linux
   
   clean-local:
rm -rf platform extract include mozilla-release
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 extract.sh
  --- rpm/js/extract.sh 5 Jul 2017 15:34:28 -   1.1.2.1
  +++ rpm/js/extract.sh 5 Jul 2017 18:11:06 -   1.1.2.2
  @@ -23,14 +23,51 @@
   
   cd mozilla-release/js/src
   
  -# skipping icu and relying on posix nspr emulation all helps.  After that we
   # only need js/src, js/public and mfbt.  Well, we also need 8 of the icu
   # headers, but only to stub out functions that fail at runtime
  -PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
  +#PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
  +PYTHON=python ./configure \
  + --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu \
  + --program-prefix= \
  + --disable-dependency-tracking \
  + --prefix=/usr \
  + --exec-prefix=/usr \
  + --bindir=/usr/bin \
  + --sbindir=/usr/sbin \
  + --sysconfdir=/etc \
  + --datadir=/usr/share \
  + --includedir=/usr/include \
  + --libdir=/usr/lib64 \
  + --libexecdir=/usr/libexec \
  + --localstatedir=/var \
  + --sharedstatedir=/var/lib \
  + --mandir=/usr/share/man \
  + --infodir=/usr/share/info \
  + --enable-optimize \
  + --enable-pie \
  + --enable-posix-nspr-emulation \
  + --enable-readline \
  + --enable-release \
  + --enable-shared-js \
  + --enable-system-ffi \
  + --enable-xterm-updates \
  + --with-pthreads \
  + --with-system-icu \
  + --with-system-zlib \
  + --with-intl-api \
  + --enable-gczeal \
  + --enable-more-deterministic
  +#--enable-ctypes
  +#--enable-gc-trace
  +#--enable-jitspew
  +
  +echo "CPPSRCS += \$(DEPTH)/mfbt/Unified_cpp_mfbt0.cpp 
\$(DEPTH)/../../mfbt/Compression.cpp \$(DEPTH)/../../mfbt/decimal/Decimal.cpp" 
>> js/src/backend.mk
  +#echo "STATIC_LIBS += \$(DEPTH)/mfbt/libmfbt.a" >> js/src/backend.mk
   
  +# skipping icu and relying on posix nspr emulation all helps.  After that we
   # we have to run make to generate a byte code version of the self hosted js 
and
   # a switch table
  -make -j4
  +make -j8
   
   cd ../../..
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/js/ .cvsignore Makefile.am extract.sh gen-conf...

2017-07-05 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   05-Jul-2017 17:34:28
  Branch: rpm-5_4  Handle: 2017070515342800

  Added files:  (Branch: rpm-5_4)
rpm/js  extract.sh gen-config.sh
  Modified files:   (Branch: rpm-5_4)
rpm/js  .cvsignore Makefile.am

  Log:
- js: automate mozjs download/build/extract/configure.

  Summary:
RevisionChanges Path
1.4.4.1 +5  -0  rpm/js/.cvsignore
1.44.2.7+26 -0  rpm/js/Makefile.am
1.1.2.1 +234 -0 rpm/js/extract.sh
1.1.2.1 +34 -0  rpm/js/gen-config.sh
  

  patch -p0 <<'@@ .'
  Index: rpm/js/.cvsignore
  
  $ cvs diff -u -r1.4 -r1.4.4.1 .cvsignore
  --- rpm/js/.cvsignore 20 Jan 2010 01:39:20 -  1.4
  +++ rpm/js/.cvsignore 5 Jul 2017 15:34:28 -   1.4.4.1
  @@ -11,3 +11,8 @@
   jsd
   rpmdb
   src
  +firefox-*
  +mozilla-release
  +include
  +extract
  +platform
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  
  $ cvs diff -u -r1.44.2.6 -r1.44.2.7 Makefile.am
  --- rpm/js/Makefile.am13 Mar 2016 23:44:46 -  1.44.2.6
  +++ rpm/js/Makefile.am5 Jul 2017 15:34:28 -   1.44.2.7
  @@ -90,6 +90,32 @@
   v8_CPPFLAGS =${CPPFLAGS} -fPIC
   v8_LDFLAGS = -fsanitize=address -lv8
   
  +#MOZJS_VERSION = 45.4.0esr
  +MOZJS_VERSION = 45.9.0esr
  +
  +MOZJS_TARBALL = firefox-${MOZJS_VERSION}.source.tar.xz
  +MOZJS_URL =  
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${MOZJS_VERSION}/source/${MOZJS_TARBALL}
  +
  +${MOZJS_TARBALL}:
  + @echo "-- fetch $@ --"
  + wget ${MOZJS_URL}
  +
  +mozilla-release: ${MOZJS_TARBALL}
  + @echo "-- $@ --"
  + xzcat ${MOZJS_TARBALL} | tar -xf-
  + mv firefox-${MOZJS_VERSION} $@
  +
  +extract: mozilla-release
  + @echo "-- $@ --"
  + @sh ./extract.sh
  +
  +platform: extract
  + @echo "-- $@ --"
  + @sh ./gen-config.sh `uname -m` linux
  +
  +clean-local:
  + rm -rf platform extract include mozilla-release
  +
   .PHONY:  lint
   lint:
$(LINT) $(DEFS) $(INCLUDES) $(librpmjs_la_sources)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  
  $ cvs diff -u -r0 -r1.1.2.1 extract.sh
  --- /dev/null 2017-07-05 17:33:00.0 +0200
  +++ extract.sh2017-07-05 17:34:28.236324233 +0200
  @@ -0,0 +1,234 @@
  +#!/bin/sh
  +
  +#run this with a mozilla-release directory with the untarred firefox download
  +
  +rm -rf extract
  +
  +mkdir extract
  +mkdir extract/js
  +mkdir -p extract/intl/icu/source/common/unicode
  +
  +cp -r mozilla-release/js/src mozilla-release/js/public extract/js/
  +cp -r mozilla-release/mfbt extract/
  +
  +# We need these even without ICU
  +cp mozilla-release/intl/icu/source/common/unicode/platform.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/ptypes.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uconfig.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/umachine.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/urename.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/utypes.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uvernum.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uversion.h 
extract/intl/icu/source/common/unicode
  +
  +cd mozilla-release/js/src
  +
  +# skipping icu and relying on posix nspr emulation all helps.  After that we
  +# only need js/src, js/public and mfbt.  Well, we also need 8 of the icu
  +# headers, but only to stub out functions that fail at runtime
  +PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
  +
  +# we have to run make to generate a byte code version of the self hosted js 
and
  +# a switch table
  +make -j4
  +
  +cd ../../..
  +
  +cp mozilla-release/js/src/js/src/selfhosted.out.h extract/js/src
  +cp mozilla-release/js/src/js/src/jsautokw.h extract/js/src
  +
  +# mfbt doesn't change by arch or platform, so keep the same unified cpp
  +mkdir extract/js/src/mfbt
  +cp mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp extra

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-07-04 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 10:51:54
  Branch: rpm-5_4  Handle: 2017070408515300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.22+108 -171   rpm/rpmio/rpmjs45.cpp
1.1.2.11+2  -2  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.21 -r1.1.2.22 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 4 Jul 2017 06:44:09 -   1.1.2.21
  +++ rpm/rpmio/rpmjs45.cpp 4 Jul 2017 08:51:53 -   1.1.2.22
  @@ -864,7 +864,6 @@
   JS_FS_HELP_END
   };
   
  -#ifdef   NOTYET
   bool
   DefineOS(JSContext* cx, HandleObject global, bool fuzzingSafe)
   {
  @@ -879,20 +878,26 @@
   
   RootedObject osfile(cx, JS_NewPlainObject(cx));
   if (!osfile ||
  +#ifdef   FIXME
   !JS_DefineFunctionsWithHelp(cx, osfile, osfile_functions) ||
  +#endif
   !JS_DefineProperty(cx, obj, "file", osfile, 0))
   {
   return false;
   }
   
  +#ifdef   FIXME
   if (!fuzzingSafe) {
   if (!JS_DefineFunctionsWithHelp(cx, osfile, osfile_unsafe_functions))
   return false;
   }
  +#endif
   
   RootedObject ospath(cx, JS_NewPlainObject(cx));
   if (!ospath ||
  +#ifdef   FIXME
   !JS_DefineFunctionsWithHelp(cx, ospath, ospath_functions) ||
  +#endif
   !JS_DefineProperty(cx, obj, "path", ospath, 0))
   {
   return false;
  @@ -924,7 +929,6 @@
   
   return true;
   }
  -#endif
   
   } // namespace shell
   } // namespace js
  @@ -1137,6 +1141,7 @@
   static char*
   GetLine(FILE* file, const char * prompt)
   {
  +FILE * fp = (gOutFile ? gOutFile : stdout);
   #ifdef EDITLINE
   /*
* Use readline only if file is stdin, because there's no way to specify
  @@ -1162,8 +1167,8 @@
   
   size_t len = 0;
   if (*prompt != '\0') {
  -fprintf(gOutFile, "%s", prompt);
  -fflush(gOutFile);
  +fprintf(fp, "%s", prompt);
  +fflush(fp);
   }
   
   size_t size = 80;
  @@ -1574,9 +1579,10 @@
   else
   RunModule(cx, filename, file, compileOnly);
   } else {
  +FILE * fp = (gOutFile ? gOutFile : stdout);
   // It's an interactive filehandle; drop into read-eval-print loop.
   MOZ_ASSERT(kind == FileScript);
  -ReadEvalPrintLoop(cx, file, gOutFile, compileOnly);
  +ReadEvalPrintLoop(cx, file, fp, compileOnly);
   }
   }
   
  @@ -1991,12 +1997,16 @@
   {
   MOZ_ASSERT(CacheEntry_isCacheEntry(cache));
   Value v = JS_GetReservedSlot(cache, CacheEntry_BYTECODE);
  +#ifdef   FIXME
   if (!v.isObject() || !v.toObject().is())
   return nullptr;
   
   ArrayBufferObject* arrayBuffer = ().as();
   *length = arrayBuffer->byteLength();
   return arrayBuffer->dataPointer();
  +#else
  +return nullptr;
  +#endif
   }
   
   static bool
  @@ -2004,6 +2014,7 @@
   {
   MOZ_ASSERT(CacheEntry_isCacheEntry(cache));
   
  +#ifdef   FIXME
   ArrayBufferObject::BufferContents contents =
   
ArrayBufferObject::BufferContents::create(buffer);
   Rooted<ArrayBufferObject*> arrayBuffer(cx, ArrayBufferObject::create(cx, 
length, contents));
  @@ -2012,6 +2023,9 @@
   
   SetReservedSlot(cache, CacheEntry_BYTECODE, ObjectValue(*arrayBuffer));
   return true;
  +#else
  +return false;
  +#endif
   }
   
   class AutoSaveFrameChain
  @@ -2186,9 +2200,7 @@
   ScopedJSFreePtr saveBuffer;
   
   if (loadBytecode) {
  -#ifdef   FIXME
   loadBuffer = CacheEntry_getBytecode(cacheEntry, );
  -#endif
   if (!loadBuffer)
   return false;
   }
  @@ -2297,10 +2309,8 @@
   }
   }
   
  -#ifdef   FIXME
   if (!CacheEntry_setBytecode(cx, cacheEntry, saveBuffer, saveLength))
   return false;
  -#endif
   
   saveBuffer.forget();
   }
  @@ -2337,6 +2347,7 @@
   JS_ReportError(cx, "can't read %s: %s", pathname,
  (ptrdiff_t(cc) < 0) ? strerror(errno) : 
"short read");
   } else {
  +#ifdef   FIXME
   char16_t* ucbuf =
   JS::UTF8CharsToNewTwoByteCharsZ(cx, 
JS::UTF8Ch

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-07-04 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 08:44:09
  Branch: rpm-5_4  Handle: 2017070406440900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.21+139 -134   rpm/rpmio/rpmjs45.cpp
1.1.2.10+31 -31 rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.20 -r1.1.2.21 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 4 Jul 2017 03:06:19 -   1.1.2.20
  +++ rpm/rpmio/rpmjs45.cpp 4 Jul 2017 06:44:09 -   1.1.2.21
  @@ -61,8 +61,10 @@
   #include "vm/Compression.h"
   #include "vm/Debugger.h"
   #include "vm/HelperThreads.h"
  +#include "vm/Interpreter.h"
   #include "vm/Monitor.h"
   #include "vm/NativeObject.h"
  +#include "vm/Runtime.h"
   #include "vm/Shape.h"
   #include "vm/String.h"
   #include "vm/StringBuffer.h"
  @@ -1934,8 +1936,10 @@
   MOZ_ASSERT(!rt->currentThreadHasExclusiveAccess());
   
   JS::PrepareForFullGC(rt);
  +#ifdef   FIXME
   AutoKeepAtoms keepAtoms(cx->perThreadData);
   rt->gc.gc(GC_NORMAL, JS::gcreason::SHARED_MEMORY_LIMIT);
  +#endif
   }
   
   static const uint32_t CacheEntry_SOURCE = 0;
  @@ -2034,7 +2038,6 @@
   }
   };
   
  -#ifndef  NOTYET
   static bool
   Evaluate(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -2304,7 +2307,6 @@
   
   return JS_WrapValue(cx, args.rval());
   }
  -#endif
   
   JSString*
   FileAsString(JSContext* cx, const char* pathname)
  @@ -2357,7 +2359,6 @@
* are closely modelled after the equivalent function in WebKit, as this is 
used
* to produce benchmark timings by SunSpider.
*/
  -#ifndef  NOTYET
   static bool
   Run(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -2431,7 +2432,6 @@
   #endif
   return true;
   }
  -#endif
   
   /*
* function readline()
  @@ -2650,7 +2650,6 @@
   return false;
   }
   
  -#ifndef  NOTYET
   static bool
   StartTimingMutator(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -2661,17 +2660,17 @@
   return false;
   }
   
  +#ifdef   FIXME
   if (!cx->runtime()->gc.stats.startTimingMutator()) {
   JS_ReportError(cx, "StartTimingMutator should only be called from 
outside of GC");
   return false;
   }
  +#endif
   
   args.rval().setUndefined();
   return true;
   }
  -#endif
   
  -#ifndef  NOTYET
   static bool
   StopTimingMutator(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -2682,6 +2681,7 @@
   return false;
   }
   
  +#ifdef   FIXME
   double mutator_ms, gc_ms;
   if (!cx->runtime()->gc.stats.stopTimingMutator(mutator_ms, gc_ms)) {
   JS_ReportError(cx, "stopTimingMutator called when not timing the 
mutator");
  @@ -2692,11 +2692,11 @@
   fprintf(gOutFile, "Mutator: %.3fms (%.1f%%), GC: %.3fms (%.1f%%)\n",
   mutator_ms, mutator_ms / total_ms * 100.0, gc_ms, gc_ms / 
total_ms * 100.0);
   }
  +#endif
   
   args.rval().setUndefined();
   return true;
   }
  -#endif
   
   static const char*
   ToSource(JSContext* cx, MutableHandleValue vp, JSAutoByteString* bytes)
  @@ -2756,6 +2756,7 @@
   
   if (v.isString()) {
   // To convert a string to a script, compile it. Parse it as an ES6 
Program.
  +#ifdef   FIX
   RootedLinearString linearStr(cx, StringToLinearString(cx, 
v.toString()));
   if (!linearStr)
   return nullptr;
  @@ -2764,6 +2765,13 @@
   if (!linearChars.initTwoByte(cx, linearStr))
   return nullptr;
   const char16_t* chars = linearChars.twoByteRange().start().get();
  +#else
  + JSAutoByteString strChars(cx, v.toString());
  + if (!strChars)
  +return nullptr;
  + size_t len = strChars.length();
  + const char * chars = strChars.ptr();
  +#endif
   
   RootedScript script(cx);
   CompileOptions options(cx);
  @@ -2778,10 +2786,12 @@
   
   // Unwrap bound functions.
   while (fun->isBoundFunction()) {
  +#ifdef   FIXME
   JSObject* target = fun->getBoundFunctionTarget();
   if (target && target->is())
   fun = >as();
   else
  +#endif
   break;
   }
   
  @@ -2790,9 +2800,13 @@
  

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmzstd.h zstdio.c

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:14:56
  Branch: rpm-5_4  Handle: 2017070403145600

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmzstd.h zstdio.c

  Log:
- zstd: permit building --without-zstd.

  Summary:
RevisionChanges Path
1.1.2.3 +2  -2  rpm/rpmio/rpmzstd.h
1.1.2.5 +31 -3  rpm/rpmio/zstdio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzstd.h
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmzstd.h
  --- rpm/rpmio/rpmzstd.h   3 Jun 2017 09:02:27 -   1.1.2.2
  +++ rpm/rpmio/rpmzstd.h   4 Jul 2017 03:14:56 -   1.1.2.3
  @@ -48,9 +48,9 @@
   void * b;
   
   size_t nib;
  -ZSTD_inBuffer zib;
  +void * zib;  /*!< ZSTD_inBuffer */
   size_t nob;
  -ZSTD_outBuffer zob;
  +void * zob;  /*!< ZSTD_outBuffer */
   };
   
   #ifdef   NOTYET
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/zstdio.c
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 zstdio.c
  --- rpm/rpmio/zstdio.c3 Jun 2017 09:02:27 -   1.1.2.4
  +++ rpm/rpmio/zstdio.c4 Jul 2017 03:14:56 -   1.1.2.5
  @@ -44,12 +44,14 @@
   /* === */
   int rpmzstdDump(const char * msg, void * _zstd, FILE *fp)
   {
  -rpmzstd zstd = (rpmzstd) _zstd;
   int rc = 0;
   
   if (fp == NULL)  fp = stderr;
   if (msg) fprintf(fp, "== %s\n", msg);
  +#if defined(WITH_ZSTD)
  +rpmzstd zstd = (rpmzstd) _zstd;
   if (zstd) {
  +
   #define PRINT(_fmt, _foo) \
   {   fprintf(fp, "%25s: %"#_fmt"\n", #_foo, zstd->_foo); }
PRINT(s,  path);
  @@ -83,6 +85,7 @@
   #undef   PRINT
   
   }
  +#endif   /* WITH_ZSTD */
   return rc;
   }
   
  @@ -90,7 +93,11 @@
   static
   const char * rpmzstdError(rpmzstd zstd, ssize_t rc)
   {
  +#if defined(WITH_ZSTD)
   return ZSTD_getErrorName(rc);
  +#else
  +return "ZSTD not configured.";
  +#endif   /* WITH_ZSTD */
   }
   
   #define ANSI_BRIGHT_BLUE "\x1b[34;1m"
  @@ -102,9 +109,11 @@
   
   static ssize_t rpmzstdCheck(rpmzstd zstd, const char * msg, ssize_t rc)
   {
  +#if defined(WITH_ZSTD)
   SPEW("<--\t%s: rc %6zd\t%s%s%s\n", msg, rc, ANSI_INVERSE_BOLD, 
ZSTD_getErrorName(rc), ANSI_RESET);
   if (ZSTD_isError(rc))
fprintf(stderr, "%s error: %s\n", msg, rpmzstdError(zstd, rc));
  +#endif   /* WITH_ZSTD */
   return rc;
   }
   
  @@ -122,6 +131,8 @@
if (colorize) be = stpcpy(be, ANSI_BRIGHT_BLUE);
be += sprintf(be, "== zstd(%p) use %ld\n",
zstd, use);
  +
  +#if defined(WITH_ZSTD)
   #define PRINT(_fmt, _foo) \
   {be += sprintf(be, "%25s: %"#_fmt"\n", #_foo, zstd->_foo); }
PRINT(s,  path);
  @@ -155,6 +166,8 @@
}
   
   #undef   PRINT
  +#endif   /* WITH_ZSTD */
  +
be--;
if (colorize) be = stpcpy(be, ANSI_RESET);
*be = '\0';
  @@ -171,6 +184,7 @@
   {
   rpmzstd zstd = (rpmzstd) _zstd;
   if (zstd) {
  +#if defined(WITH_ZSTD)
size_t rc;
if (zstd->_stream) {
if (ZSTDF_ISSET(DECOMPRESS))
  @@ -210,6 +224,7 @@
zstd->zob.dst = NULL;
zstd->zob.pos = 0;
zstd->zob.size = 0;
  +#endif   /* WITH_ZSTD */
   }
   }
   
  @@ -228,7 +243,6 @@
   char *t = stdio;
   char *te = t + sizeof(stdio) - 2;
   int c;
  -ssize_t rc;
   
   SPEW("--> %s(%s,%s,%d,0x%x)\n", __FUNCTION__, path, fmode, fdno, flags);
   switch ((c = *s++)) {
  @@ -328,6 +342,8 @@
   
   zstd->level = level;
   
  +#if defined(WITH_ZSTD)
  +ssize_t rc;
   if (ZSTDF_ISSET(DECOMPRESS)) {   /* decompress */
zstd->_stream = (void *) ZSTD_createDStream();
   assert(zstd->_stream);
  @@ -359,15 +375,18 @@
zstd->nb = zstd->nob;
zstd->b = xmalloc(zstd->nb);
   }
  +#endif   /* WITH_ZSTD */
   
   return rpmzstdLink(zstd);
   }
   
   int rpmzstdFlush(void * _zstd)
   {
  -rpmzstd zstd = (rpmzstd) _zstd;
   int rc = -2;
   
  +#if defined(WITH_ZSTD)
  +rpmzstd zstd = (rpmzstd) _zstd;
  +
   assert(zstd->_stream);
   if (ZSTDF_ISSET(DECOMPRESS)) {   /* decompress *

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmeio.c rpmeio.h

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:14:16
  Branch: rpm-5_4  Handle: 2017070403141600

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmeio.c rpmeio.h

  Log:
- rpmeio: permit building --without-libeio.

  Summary:
RevisionChanges Path
1.1.2.11+282 -154   rpm/rpmio/rpmeio.c
1.1.2.9 +48 -50 rpm/rpmio/rpmeio.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmeio.c
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmeio.c
  --- rpm/rpmio/rpmeio.c21 Jun 2017 09:09:37 -  1.1.2.10
  +++ rpm/rpmio/rpmeio.c4 Jul 2017 03:14:16 -   1.1.2.11
  @@ -1,19 +1,140 @@
   #include "system.h"
   
  +#if defined(WITH_LIBEV)
  +
   #if defined(HAVE_EV_H)
   # include 
   #endif
   
  +#else/* WITH_LIBEV */
  +
  +/* XXX stub in enough to include rpmev.h */
  +#define  EV_P_   void * loop,
  +#define  EV_A_   NULL,
  +#define  EV_DEFAULT  ev_default_loop(0)
  +#define  EVFLAG_AUTO 0
  +#define  EVRUN_ONCE  2
  +
  +typedef  struct ev_watcher   ev_idle;
  +typedef  struct ev_watcher   ev_async;
  +
  +struct ev_watcher {
  +int active;
  +int pending;
  +int priority;
  +void * data;
  +void (*cb)(EV_P_ void *w, int revents);
  +};
  +
  +union ev_any_watcher
  +{
  +struct ev_watcher w;
  +struct ev_watcher async;
  +};
  +
  +#define  ev_default_loop(_a) NULL
  +
  +#define  ev_userdata(_x) NULL
  +
  +#define  ev_set_userdata(_x, y)
  +
  +#define  ev_idle_stop(_w)(void)_w
  +#define  ev_async_send(_l, _w)   (void)_w
  +#define  ev_run(_a, _b)
  +#define  ev_loop_destroy(_a)
  +
  +#endif   /* WITH_LIBEV */
  +
  +#if defined(WITH_LIBEIO)
  +
  +#if defined(HAVE_EIO_H)
  +# include 
  +#endif
  +
  +#else/* WITH_LIBEIO */
  +
  +typedef struct eio_req   eio_req;
  +typedef int (*eio_cb)(eio_req *req);
  +
  +typedef struct eio_pwd * eio_wd;
  +typedef double   eio_tstamp;
  +typedef int  eio_uid_t;
  +typedef int  eio_gid_t;
  +typedef ssize_t  eio_ssize_t;
  +
  +/* XXX stub in enough to include rpmeio.h */
  +struct eio_req
  +{
  +eio_req volatile *next;  /* private ETP */
  +eio_wd wd;   /* all applicable requests: working directory 
of pathname, old name; wd_open: return wd */
  +eio_ssize_t result;  /* result of syscall, e.g. result = read (... */
  +off_t offs;  /* read, write, truncate, readahead, 
sync_file_range, fallocate: file offset, mknod: dev_t */
  +size_t size; /* read, write, readahead, sendfile, msync, mlock, 
sync_file_range, fallocate: length */
  +void *ptr1;  /* all applicable requests: pathname, old name; 
readdir: optional eio_dirents */
  +void *ptr2;  /* all applicable requests: new name or memory 
buffer; readdir: name strings */
  +eio_tstamp nv1;  /* utime, futime: atime; busy: sleep time */
  +eio_tstamp nv2;  /* utime, futime: mtime */
  +
  +int int1;/* all applicable requests: file descriptor; 
sendfile: output fd; open, msync, mlockall, readdir: flags */
  +long int2;   /* chown, fchown: uid; sendfile: input fd; 
open, chmod, mkdir, mknod: file mode, seek: whence, sync_file_range, fallocate: 
flags */
  +long int3;   /* chown, fchown: gid; rename, link: working 
directory of new name */
  +int errorno; /* errno value on syscall return */
  +
  +signed char type;/* EIO_xxx constant ETP */
  +
  +unsigned char cancelled; /* ETP */
  +
  +unsigned char flags; /* private */
  +#define  EIO_FLAG_PTR1_FREE  0x01
  +#define  EIO_FLAG_PTR2_FREE  0x02
  +
  +signed char pri; /* the priority */
  +#define  EIO_PRI_MIN -4
  +#define  EIO_PRI_MAX 4
  +#define  EIO_PRI_DEFAULT 0
  +
  +void *data;
  +eio_cb finish;
  +void (*destroy)(eio_req *req); /* called when request no longer needed */
  +void (*feed)(eio_req *req);/* only used for group requests */
  +
  +eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private ETP */
  +};
  +
  +#define  eio_poll()  -1
  +#define  eio_nthreads()  0
  +#define  eio_nready()0
  +#define  eio_nreqs() 0
  +#define  eio_npend

[CVS] RPM: rpm-5_4: rpm/rpmio/ msqio.c

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:13:28
  Branch: rpm-5_4  Handle: 2017070403132800

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   msqio.c

  Log:
- rpmmsq: permit building --without-mq & --without-msq.

  Summary:
RevisionChanges Path
1.1.2.25+79 -9  rpm/rpmio/msqio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/msqio.c
  
  $ cvs diff -u -r1.1.2.24 -r1.1.2.25 msqio.c
  --- rpm/rpmio/msqio.c 3 Jun 2017 09:02:26 -   1.1.2.24
  +++ rpm/rpmio/msqio.c 4 Jul 2017 03:13:28 -   1.1.2.25
  @@ -5,20 +5,34 @@
   
   #include "system.h"
   
  -#if defined(WITH_MQ) || defined(WITH_MSQ)
  -#if defined(HAVE_AIO_H)
  -# include 
  +#if defined(HAVE_SYS_IPC_H)
  +# include 
   #endif
  +
  +#if defined(WITH_MQ) || defined(WITH_MSQ)
   #if defined(HAVE_SYS_MSG_H)
   # include 
   #endif
  -#if defined(HAVE_SYS_IPC_H)
  -# include 
  -#endif
   #if defined(HAVE_MQUEUE_H)
   # include 
   #endif
  -#endif   /* WITH_MQ */
  +
  +#else/* WITH_MQ || WITH_MSQ */
  +
  +/* XXX stub in enough to use struct mq_attr */
  +
  +typedef int mqd_t;
  +
  +struct mq_attr
  +{
  +long mq_flags;   /* Message queue flags.  */
  +long mq_maxmsg;  /* Maximum number of messages.  */
  +long mq_msgsize; /* Maximum message size.  */
  +long mq_curmsgs; /* Number of messages currently queued.  */
  +long __pad[4];
  +};
  +
  +#endif   /* WITH_MQ || WITH_MSQ */
   
   #include "rpmio_internal.h"
   #include 
  @@ -27,6 +41,60 @@
   #include  /* XXX rpmzLog type */
   #include 
   
  +#if defined(WITH_AIO)
  +
  +#if defined(HAVE_AIO_H)
  +# include 
  +#endif
  +
  +#else/* WITH_AIO */
  +
  +/* XXX stub in enough to use struct aiocb_s pool */
  +enum {
  +LIO_READ,
  +LIO_WRITE,
  +LIO_NOP,
  +};
  +
  +struct aiocb
  +{
  +  int aio_fildes;/* File desriptor.  */
  +  int aio_lio_opcode;/* Operation to be performed.  */
  +  int aio_reqprio;   /* Request priority offset.  */
  +  volatile void *aio_buf;/* Location of buffer.  */
  +  size_t aio_nbytes; /* Length of transfer.  */
  +  struct sigevent aio_sigevent;  /* Signal number and value.  */
  +
  +  /* Internal members.  */
  +  struct aiocb *__next_prio;
  +  int __abs_prio;
  +  int __policy;
  +  int __error_code;
  +  __ssize_t __return_value;
  +
  +#ifndef __USE_FILE_OFFSET64
  +  __off_t aio_offset;/* File offset.  */
  +  char __pad[sizeof (__off64_t) - sizeof (__off_t)];
  +#else
  +  __off64_t aio_offset;  /* File offset.  */
  +#endif
  +  char __glibc_reserved[32];
  +};
  +
  +static ssize_t
  +aio_return (struct aiocb *aiocbp)
  +{
  +return aiocbp->__return_value;
  +}
  +
  +static int
  +aio_error (const struct aiocb *aiocbp)
  +{
  +return aiocbp->__error_code;
  +}
  +
  +#endif   /* WITH_AIO */
  +
   #define  _RPMAIO_INTERNAL
   #include "rpmaio.h"
   
  @@ -822,9 +890,10 @@
   
   static ssize_t rpmmsqReaderLoop(rpmmsq msq, int op, char *b, size_t nb, 
unsigned *priop)
   {
  -struct timespec ts = { 0, 1000 };/* XXX move into msq for 
persistence? */
  -ssize_t rc;
  +ssize_t rc = -2; /* assume error */
   
  +#if defined(WITH_MQ)
  +struct timespec ts = { 0, 1000 };/* XXX move into msq for 
persistence? */
   errno = 0;
   do {

  @@ -863,6 +932,7 @@
   #undef   NSEC
break;
   } while (rc < 0);
  +#endif   /* WITH_MQ */
   
   return rc;
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmaio.c

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:11:29
  Branch: rpm-5_4  Handle: 2017070403112900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmaio.c

  Log:
- rpmaio: permit building --without-aio.

  Summary:
RevisionChanges Path
1.1.2.4 +38 -3  rpm/rpmio/rpmaio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmaio.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 rpmaio.c
  --- rpm/rpmio/rpmaio.c29 May 2017 16:21:00 -  1.1.2.3
  +++ rpm/rpmio/rpmaio.c4 Jul 2017 03:11:29 -   1.1.2.4
  @@ -5,14 +5,49 @@
   
   #include "system.h"
   
  +#include 
  +#include 
  +
   #if defined(WITH_AIO)
   #if defined(HAVE_AIO_H)
   # include 
   #endif
  -#endif   /* WITH_AIO */
   
  -#include 
  -#include 
  +#else/* WITH_AIO */
  +
  +/* XXX stub in enough to use struct aiocb_s pool */
  +enum {
  +LIO_READ,
  +LIO_WRITE,
  +LIO_NOP,
  +};
  +
  +struct aiocb
  +{
  +  int aio_fildes;/* File desriptor.  */
  +  int aio_lio_opcode;/* Operation to be performed.  */
  +  int aio_reqprio;   /* Request priority offset.  */
  +  volatile void *aio_buf;/* Location of buffer.  */
  +  size_t aio_nbytes; /* Length of transfer.  */
  +  struct sigevent aio_sigevent;  /* Signal number and value.  */
  +
  +  /* Internal members.  */
  +  struct aiocb *__next_prio;
  +  int __abs_prio;
  +  int __policy;
  +  int __error_code;
  +  __ssize_t __return_value;
  +
  +#ifndef __USE_FILE_OFFSET64
  +  __off_t aio_offset;/* File offset.  */
  +  char __pad[sizeof (__off64_t) - sizeof (__off_t)];
  +#else
  +  __off64_t aio_offset;  /* File offset.  */
  +#endif
  +  char __glibc_reserved[32];
  +};
  +
  +#endif   /* WITH_AIO */
   
   #define  _RPMAIO_INTERNAL
   #include "rpmaio.h"
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmgc.c

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:10:11
  Branch: rpm-5_4  Handle: 2017070403101100

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmgc.c

  Log:
- rpmgc: disable FIPS-140-2 mode.

  Summary:
RevisionChanges Path
2.34.2.14   +2  -0  rpm/rpmio/rpmgc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmgc.c
  
  $ cvs diff -u -r2.34.2.13 -r2.34.2.14 rpmgc.c
  --- rpm/rpmio/rpmgc.c 17 May 2017 12:34:39 -  2.34.2.13
  +++ rpm/rpmio/rpmgc.c 4 Jul 2017 03:10:11 -   2.34.2.14
  @@ -1095,10 +1095,12 @@
/* XXX TODO: make FIPS mode configurable */
if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) {
rpmlog(RPMLOG_DEBUG, "-- libgcrypt %s configuration:\n", 
GCRYPT_VERSION);
  +#ifdef   BROKEN
gc->err = rpmgcErr(gc, "SET_ENFORCED_FIPS_FLAG",
gcry_control(GCRYCTL_SET_ENFORCED_FIPS_FLAG) );
gc->err = rpmgcErr(gc, "FORCE_FIPS_MODE",
gcry_control(GCRYCTL_FORCE_FIPS_MODE) );
  +#endif
}
   
gcry_set_progress_handler((gcry_handler_progress_t)rpmgcProgress, NULL);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjss.inp

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:06:01
  Branch: rpm-5_4  Handle: 201707040306

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjss.inp

  Log:
- sanity.

  Summary:
RevisionChanges Path
1.1.2.9 +4  -4  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjss.inp
  
  $ cvs diff -u -r1.1.2.8 -r1.1.2.9 rpmjss.inp
  --- rpm/rpmio/rpmjss.inp  3 Jul 2017 09:58:52 -   1.1.2.8
  +++ rpm/rpmio/rpmjss.inp  4 Jul 2017 03:06:00 -   1.1.2.9
  @@ -27,7 +27,7 @@
   var foo = 0; assertEq(foo, foo)
   //startTimingMutator()
   //stopTimingMutator()
  -throwError
  +throwError()
   //disassemble()
   //dis()
   //disfile()
  @@ -36,8 +36,8 @@
   stackDump()
   intern("intern")
   //getslx()
  -//evalcx()
  -//evalInWorker()
  +evalcx('lazy'), null)
  +evalInWorker("version();")
   //getSharedArrayBuffer()
   //setSharedArrayBuffer()
   //shapeOf()
  @@ -62,7 +62,7 @@
   //decompileFunction()
   //decompileThis()
   thisFilename()
  -//newGlobal()
  +newGlobal()
   //nukeCCW()
   createMappedArrayBuffer("js/createMappedArrayBuffer")
   getMaxArgs()
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Jul-2017 05:06:19
  Branch: rpm-5_4  Handle: 2017070403061900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.20+156 -6 rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.19 -r1.1.2.20 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 3 Jul 2017 09:58:52 -   1.1.2.19
  +++ rpm/rpmio/rpmjs45.cpp 4 Jul 2017 03:06:19 -   1.1.2.20
  @@ -7,8 +7,9 @@
   #include "system.h"
   
   #define  JS_CODEGEN_X64  1
  +#define  moz_xmalloc(_len)   malloc(_len)
   
  -#include 
  +#include 
   
   #include "mozilla/ArrayUtils.h" 
   #include "mozilla/Atomics.h"
  @@ -138,6 +139,7 @@
   };
   
   namespace js {
  +bool gCanUseExtraThreads = false;
   namespace shell {
   
   #ifdef   NOTYET
  @@ -3423,6 +3425,7 @@
   if (!str)
   return false;
   
  +#ifdef   FIXME
   AutoStableStringChars strChars(cx);
   if (!strChars.initTwoByte(cx, str))
   return false;
  @@ -3431,6 +3434,14 @@
   
   if (!JS_AtomizeAndPinUCStringN(cx, chars.start().get(), chars.length()))
   return false;
  +#else
  +JSAutoByteString chars(cx, str);
  +if (!chars)
  +return false;
  +
  +if (!JS_AtomizeAndPinStringN(cx, chars.ptr(), chars.length()))
  +return false;
  +#endif
   
   args.rval().setUndefined();
   return true;
  @@ -3578,8 +3589,10 @@
   
   JS_FireOnNewGlobalObject(cx, obj);
   
  +#ifdef   HACK
   if (!cx->compartment()->wrap(cx, ))
   return nullptr;
  +#endif
   return obj;
   }
   #endif
  @@ -3589,8 +3602,10 @@
   EvalInContext(JSContext* cx, unsigned argc, Value* vp)
   {
   CallArgs args = CallArgsFromVp(argc, vp);
  +#ifdef   FIXME
   if (!args.requireAtLeast(cx, "evalcx", 1))
   return false;
  +#endif
   
   RootedString str(cx, ToString(cx, args[0]));
   if (!str)
  @@ -3603,6 +3618,7 @@
   return false;
   }
   
  +#ifdef   FIXME
   AutoStableStringChars strChars(cx);
   if (!strChars.initTwoByte(cx, str))
   return false;
  @@ -3610,6 +3626,13 @@
   mozilla::Range chars = strChars.twoByteRange();
   size_t srclen = chars.length();
   const char16_t* src = chars.start().get();
  +#else
  +JSAutoByteString chars(cx, str);
  +if (!chars)
  +return false;
  +size_t srclen = chars.length();
  +const char* src = chars.ptr();
  +#endif
   
   bool lazy = false;
   if (srclen == 4) {
  @@ -3656,13 +3679,16 @@
   }
   }
   
  +#ifdef   HACK
   if (!cx->compartment()->wrap(cx, args.rval()))
   return false;
  +#endif
   
   return true;
   }
   #endif
   
  +#ifdef   FIXME
   struct WorkerInput
   {
   JSRuntime* runtime;
  @@ -3677,6 +3703,22 @@
   js_free(chars);
   }
   };
  +#else
  +struct WorkerInput
  +{
  +JSRuntime* runtime;
  +char* chars;
  +size_t length;
  +
  +WorkerInput(JSRuntime* runtime, char* chars, size_t length)
  +  : runtime(runtime), chars(chars), length(length)
  +{}
  +
  +~WorkerInput() {
  + if (chars) free(chars);
  +}
  +};
  +#endif
   
   static void SetWorkerRuntimeOptions(JSRuntime* rt);
   
  @@ -3717,7 +3759,9 @@
   return;
   }
   
  +#ifdef   FIXME
   JS::SetLargeAllocationFailureCallback(rt, my_LargeAllocFailCallback, 
(void*)cx);
  +#endif
   
   do {
   JSAutoRequest ar(cx);
  @@ -3767,6 +3811,7 @@
   return false;
   }
   
  +#ifdef   FIXME
   if (!args[0].toString()->ensureLinear(cx))
   return false;
   
  @@ -3780,6 +3825,18 @@
   WorkerInput* input = js_new(cx->runtime(), chars, 
str->length());
   if (!input)
   return false;
  +#else
  +JSAutoByteString chars(cx, args[0].toString());
  +if (!chars)
  +return false;
  +size_t nb = chars.length();
  +char * b = (char *) js_malloc(nb);
  +memcpy(b, chars.ptr(), nb);
  +
  +WorkerInput* input = js_new(cx->runtime(), b, nb);
  +if (!input)
  +return false;
  +#endif
   
   PRThread* thread = PR_CreateThread(PR_USER_THREAD, WorkerMain, input,
  PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, 

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   03-Jul-2017 11:58:53
  Branch: rpm-5_4  Handle: 2017070309585200

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.19+69 -47 rpm/rpmio/rpmjs45.cpp
1.1.2.8 +2  -2  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.18 -r1.1.2.19 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 3 Jul 2017 08:06:01 -   1.1.2.18
  +++ rpm/rpmio/rpmjs45.cpp 3 Jul 2017 09:58:52 -   1.1.2.19
  @@ -113,7 +113,7 @@
   
   /*==*/
   static void
  -rpmjssReportError(JSContext *cx, const char *message, JSErrorReport *report)
  +my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
   {
   fprintf(stderr, "%s:%u:%s\n",
report->filename ? report->filename : "",
  @@ -1390,7 +1390,6 @@
   return Evaluate(cx, options, src, srcLen, );
   }
   
  -#ifdef   NOTYET
   static bool
   GetLoaderObject(JSContext* cx, MutableHandleObject resultOut)
   {
  @@ -1409,7 +1408,6 @@
   resultOut.set(());
   return true;
   }
  -#endif
   
   static bool
   GetImportMethod(JSContext* cx, HandleObject loader, MutableHandleFunction 
resultOut)
  @@ -1428,7 +1426,6 @@
   return true;
   }
   
  -#ifdef   NOTYET
   static void
   RunModule(JSContext* cx, const char* filename, FILE* file, bool compileOnly)
   {
  @@ -1452,7 +1449,6 @@
   return;
   }
   }
  -#endif
   
   static bool
   EvalAndPrint(JSContext* cx, const char* bytes, size_t length,
  @@ -1489,7 +1485,6 @@
   return true;
   }
   
  -#ifdef   NOTYET
   static void
   ReadEvalPrintLoop(JSContext* cx, FILE* in, FILE* out, bool compileOnly)
   {
  @@ -1545,7 +1540,6 @@
   
   fprintf(out, "\n");
   }
  -#endif
   
   enum FileKind
   {
  @@ -1553,7 +1547,6 @@
   FileModule
   };
   
  -#ifdef   NOTYET
   static void
   Process(JSContext* cx, const char* filename, bool forceTTY, FileKind kind = 
FileScript)
   {
  @@ -1568,7 +1561,7 @@
   return;
   }
   }
  -AutoCloseFile autoClose(file);
  +js::shell::AutoCloseFile autoClose(file);
   
   if (!forceTTY && !isatty(fileno(file))) {
   // It's not interactive - just execute it.
  @@ -1582,7 +1575,6 @@
   ReadEvalPrintLoop(cx, file, gOutFile, compileOnly);
   }
   }
  -#endif
   
   static bool
   Version(JSContext* cx, unsigned argc, Value* vp)
  @@ -1884,7 +1876,6 @@
   return true;
   }
   
  -#ifndef  NOTYET
   class AutoNewContext
   {
 private:
  @@ -1927,7 +1918,6 @@
   }
   }
   };
  -#endif
   
   static void
   my_LargeAllocFailCallback(void* data)
  @@ -2042,7 +2032,7 @@
   }
   };
   
  -#ifdef   NOTYET
  +#ifndef  NOTYET
   static bool
   Evaluate(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -2168,9 +2158,15 @@
   }
   }
   
  +#ifdef   FIXME
   AutoStableStringChars codeChars(cx);
   if (!codeChars.initTwoByte(cx, code))
   return false;
  +#else
  +JSAutoByteString chars(cx, code);
  +if (!chars)
  +return false;
  +#endif
   
   AutoNewContext ancx;
   if (newContext) {
  @@ -2185,7 +2181,9 @@
   ScopedJSFreePtr saveBuffer;
   
   if (loadBytecode) {
  +#ifdef   FIXME
   loadBuffer = CacheEntry_getBytecode(cacheEntry, );
  +#endif
   if (!loadBuffer)
   return false;
   }
  @@ -2213,14 +2211,19 @@
   if (loadBytecode) {
   script = JS_DecodeScript(cx, loadBuffer, loadLength);
   } else {
  +#ifdef   FIXME
   mozilla::Range chars = 
codeChars.twoByteRange();
   (void) JS::Compile(cx, options, chars.start().get(), 
chars.length(), );
  +#else
  +(void) JS::Compile(cx, options, chars.ptr(), chars.length(), 
);
  +#endif
   }
   
   if (!script)
   return false;
   }
   
  +#ifdef   FIXME
   if (displayURL && !script->scriptSource()->hasDisplayURL()) {
   JSFlatString* flat = displayURL->ensureFlat(cx);
   if (!flat)
  @@ -2247,6 +2250,7 @@
   if (!script->scriptSource()->setSourceMapURL(cx, smurl))
   return false;

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-07-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   03-Jul-2017 10:06:01
  Branch: rpm-5_4  Handle: 2017070308060100

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjs45: EIP.

  Summary:
RevisionChanges Path
1.1.2.18+137 -145   rpm/rpmio/rpmjs45.cpp
1.1.2.7 +8  -8  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.17 -r1.1.2.18 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 3 Jul 2017 04:08:54 -   1.1.2.17
  +++ rpm/rpmio/rpmjs45.cpp 3 Jul 2017 08:06:01 -   1.1.2.18
  @@ -19,16 +19,62 @@
   
   #include "jsapi.h"
   #include "jsprf.h"
  +#include "jsobj.h"
  +
  +#include "js/Debug.h"
  +#include "js/GCAPI.h"
   #include "js/Initialization.h"
  +#include "js/StructuredClone.h"
  +#include "js/TrackedOptimizationInfo.h"
  +
   #include "js/Conversions.h"
   #include "js/CharacterEncoding.h"
   
   #include "jsfriendapi.h"
   
   #include "jswrapper.h"
  +#include "shellmoduleloader.out.h"
  +
  +#include "builtin/ModuleObject.h"
  +#include "builtin/TestingFunctions.h"
  +
  +#include "frontend/Parser.h"
  +
  +#include "gc/GCInternals.h"
  +#include "gc/Statistics.h"
  +  
  +#include "jit/arm/Simulator-arm.h"
  +#include "jit/InlinableNatives.h"
  +#include "jit/Ion.h"
  +#include "jit/JitcodeMap.h"
  +#include "jit/OptimizationTracking.h"
  +
  +#include "perf/jsperf.h"
   
  +#include "shell/jsoptparse.h"
  +#ifdef   NOTYET
  +#include "shell/OSObject.h"
  +#endif
  +
  +#include "vm/ArgumentsObject.h"
  +#include "vm/Compression.h"
  +#include "vm/Debugger.h"
  +#include "vm/HelperThreads.h"
  +#include "vm/Monitor.h"
  +#include "vm/NativeObject.h"
  +#include "vm/Shape.h"
  +#include "vm/String.h"
   #include "vm/StringBuffer.h"
  +#include "vm/Time.h"
   #include "vm/TypedArrayObject.h"
  +#include "vm/WrapperObject.h"
  +
  +#include "jscompartmentinlines.h"
  +#include "jsobjinlines.h"
  +
  +#include "vm/ErrorObject-inl.h"
  +#include "vm/Interpreter-inl.h"
  +#include "vm/Stack-inl.h"
   
   using namespace JS;
   using namespace js;
  @@ -74,18 +120,6 @@
(unsigned int) report->lineno, message);
   }
   
  -static void
  -rpmjssOOMCallback(JSContext* cx, void* data)
  -{
  -#ifdef   NOTYET
  -// If a script is running, the engine is about to throw the string "out 
of
  -// memory", which may or may not be caught. Otherwise the engine will 
just
  -// unwind and return null/false, with no exception set.
  -if (!JS_IsRunning(cx))
  -GetShellRuntime(cx)->gotError = true;
  -#endif
  -}
  -
   enum JSShellErrNum {
   #define MSG_DEF(name, count, exception, format) \
   name,
  @@ -94,21 +128,8 @@
   JSShellErr_Limit
   };
   
  -static const JSErrorFormatString jsShell_ErrorFormatString[JSShellErr_Limit] 
= {
  -#define MSG_DEF(name, count, exception, format) \
  -{ format, count, JSEXN_ERR } ,
  -#include "jsshell.msg"
  -#undef MSG_DEF
  -};
  -
   const JSErrorFormatString*
  -my_GetErrorMessage(void* userRef, const unsigned errorNumber)
  -{
  -if (errorNumber == 0 || errorNumber >= JSShellErr_Limit)
  -return nullptr;
  -
  -return _ErrorFormatString[errorNumber];
  -}
  +my_GetErrorMessage(void* userRef, const unsigned errorNumber);
   
   /*==*/
   enum PathResolutionMode {/* XXX shell/OSObject.h */
  @@ -513,7 +534,6 @@
   return true;
   }
   
  -#ifdef   NOTYET
   static bool
   ospath_join(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -557,18 +577,15 @@
   args.rval().setString(result);
   return true;
   }
  -#endif
   
   static const JSFunctionSpecWithHelp ospath_functions[] = {
   JS_FN_HELP("isAbsolute", ospath_isAbsolute, 1, 0,
   "isAbsolute(path)",
   "  Return whether the given path is absolute."),
   
  -#ifdef   NOTYET
   JS_FN_HELP("join", ospath_join, 1, 0,
   "join(paths...)",
   "  Jo

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp

2017-07-02 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   03-Jul-2017 06:08:54
  Branch: rpm-5_4  Handle: 2017070304085400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.17+659 -65rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.16 -r1.1.2.17 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 3 Jul 2017 03:41:36 -   1.1.2.16
  +++ rpm/rpmio/rpmjs45.cpp 3 Jul 2017 04:08:54 -   1.1.2.17
  @@ -27,6 +27,7 @@
   
   #include "jswrapper.h"
   
  +#include "vm/StringBuffer.h"
   #include "vm/TypedArrayObject.h"
   
   using namespace JS;
  @@ -141,9 +142,8 @@
   
   using namespace JS;
   
  -#else/* NOTYET */
  +#endif   /* NOTYET */
   
  -#ifdef   NOTYET
   /* --- shell/jsshell.h */
   class AutoCloseFile
   {
  @@ -162,9 +162,6 @@
   return success;
   }
   };
  -#endif
  -
  -#endif   /* NOTYET */
   
   #ifdef XP_WIN
   const char PathSeparator = '\\';
  @@ -268,9 +265,7 @@
   JS_ReportError(cx, "can't open %s: %s", pathname, strerror(errno));
   return nullptr;
   }
  -#ifdef   FIXME
   AutoCloseFile autoClose(file);
  -#endif
   
   RootedObject obj(cx);
   if (fseek(file, 0, SEEK_END) != 0) {
  @@ -282,12 +277,8 @@
   } else {
   obj = JS_NewUint8Array(cx, len);
   if (!obj) {
  -#if !defined(FIXME)
  - if (file && fileno(file) > 2) (void) fclose(file);
  -#endif
   return nullptr;
}
  -#if defined(FIXME)
   js::TypedArrayObject& ta = obj->as();
   if (ta.isSharedMemory()) {
   // Must opt in to use shared memory.  For now, don't.
  @@ -300,13 +291,9 @@
   // race-safe primitive to copy memory into the
   // buffer.)
   JS_ReportError(cx, "can't read %s: shared memory buffer", 
pathname);
  - if (file) (void) fclose(file);
   return nullptr;
   }
   char* buf = static_cast<char*>(ta.viewDataUnshared());
  -#else/* FIMXME */
  - char buf[len];
  -#endif   /* FIMXME */
   size_t cc = fread(buf, 1, len, file);
   if (cc != len) {
   JS_ReportError(cx, "can't read %s: %s", pathname,
  @@ -315,9 +302,6 @@
   }
   }
   }
  -#if !defined(FIXME)
  -if (file && fileno(file) > 2) (void) fclose(file);
  -#endif
   return obj;
   }
   
  @@ -415,9 +399,7 @@
   JS_ReportError(cx, "can't open %s: %s", filename.ptr(), 
strerror(errno));
   return false;
   }
  -#ifdef   FIXME
   AutoCloseFile autoClose(file);
  -#endif
   
   TypedArrayObject* obj = [1].toObject().as();
   
  @@ -426,28 +408,15 @@
   //
   // See further comments in FileAsTypedArray, above.
   JS_ReportError(cx, "can't write %s: shared memory buffer", 
filename.ptr());
  -#if !defined(FIXME)
  -if (file && fileno(file) > 2) (void) fclose(file);
  -#endif
   return false;
   }
   void* buf = obj->viewDataUnshared();
  -#ifdef   FIXME
   if (fwrite(buf, obj->bytesPerElement(), obj->length(), file) != 
obj->length() ||
   !autoClose.release())
   {
   JS_ReportError(cx, "can't write %s", filename.ptr());
   return false;
   }
  -#else
  -size_t nw = fwrite(buf, obj->bytesPerElement(), obj->length(), file);
  -if (file && fileno(file) > 2) (void) fclose(file);
  -if (nw != obj->length()) 
  -{
  -JS_ReportError(cx, "can't write %s", filename.ptr());
  -return false;
  -}   
  -#endif
   
   args.rval().setUndefined();
   return true;
  @@ -1590,9 +1559,7 @@
   return;
   }
   }
  -#ifdef   FIXME
   AutoCloseFile autoClose(file);
  -#endif
   
   if (!forceTTY && !isatty(fileno(file))) {
   // It's not interactive - just execute it.
  @@ -1605,9 +1572,6 @@
   MOZ_ASSERT(kind == FileScript);
   ReadEvalPrintLoop(cx, file, gOutFile, compileOnly);
   }
  -#if !defined(FIXME)
  -if (file && fileno(file) > 2) (void) fclose(file);
  -#endif
 

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp

2017-07-02 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   03-Jul-2017 05:41:37
  Branch: rpm-5_4  Handle: 2017070303413600

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp

  Log:
- rpmjs45: WOP.

  Summary:
RevisionChanges Path
1.1.2.16+1007 -63   rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.15 -r1.1.2.16 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 2 Jul 2017 13:58:09 -   1.1.2.15
  +++ rpm/rpmio/rpmjs45.cpp 3 Jul 2017 03:41:36 -   1.1.2.16
  @@ -8,6 +8,8 @@
   
   #define  JS_CODEGEN_X64  1
   
  +#include 
  +
   #include "mozilla/ArrayUtils.h" 
   #include "mozilla/Atomics.h"
   #include "mozilla/DebugOnly.h"
  @@ -319,21 +321,25 @@
   return obj;
   }
   
  -#ifdef   NOTYET
  +#if !defined(FIXME)
  +JSString*
  +FileAsString(JSContext* cx, const char* pathname);
  +#endif
  +
   static bool
   ReadFile(JSContext* cx, unsigned argc, Value* vp, bool scriptRelative)
   {
   CallArgs args = CallArgsFromVp(argc, vp);
   
   if (args.length() < 1 || args.length() > 2) {
  -JS_ReportErrorNumber(cx, js::shell::my_GetErrorMessage, nullptr,
  +JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
args.length() < 1 ? JSSMSG_NOT_ENOUGH_ARGS : 
JSSMSG_TOO_MANY_ARGS,
"snarf");
   return false;
   }
   
   if (!args[0].isString() || (args.length() == 2 && !args[1].isString())) {
  -JS_ReportErrorNumber(cx, js::shell::my_GetErrorMessage, nullptr, 
JSSMSG_INVALID_ARGS, "snarf");
  +JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, 
JSSMSG_INVALID_ARGS, "snarf");
   return false;
   }
   
  @@ -367,23 +373,18 @@
   args.rval().setString(str);
   return true;
   }
  -#endif
   
  -#ifdef   NOTYET
   static bool
   osfile_readFile(JSContext* cx, unsigned argc, Value* vp)
   {
   return ReadFile(cx, argc, vp, false);
   }
  -#endif
   
  -#ifdef   NOTYET
   static bool
   osfile_readRelativeToScript(JSContext* cx, unsigned argc, Value* vp)
   {
   return ReadFile(cx, argc, vp, true);
   }
  -#endif
   
   static bool
   osfile_writeTypedArrayToFile(JSContext* cx, unsigned argc, Value* vp)
  @@ -498,7 +499,6 @@
   return true;
   }
   
  -#ifdef   NOTYET
   static const JSFunctionSpecWithHelp osfile_functions[] = {
   JS_FN_HELP("readFile", osfile_readFile, 1, 0,
   "readFile(filename, [\"binary\"])",
  @@ -512,7 +512,6 @@
   
   JS_FS_HELP_END
   };
  -#endif
   
   static const JSFunctionSpecWithHelp osfile_unsafe_functions[] = {
   JS_FN_HELP("writeTypedArrayToFile", osfile_writeTypedArrayToFile, 2, 0,
  @@ -650,20 +649,18 @@
   // other one returns an integer status code, and always writes the result 
into
   // the provided buffer.
   
  -#ifdef   NOTYET
   inline char*
   strerror_message(int result, char* buffer)
   {
   return result == 0 ? buffer : nullptr;
   }
  -#endif
   
   inline char*
   strerror_message(char* result, char* buffer)
   {
   return result;
   }
  -#endif
  +#endif   /* !XP_WIN */
   
   static void
   ReportSysError(JSContext* cx, const char* prefix)
  @@ -969,7 +966,6 @@
   static const double MAX_TIMEOUT_INTERVAL = 1800.0;
   
   // Per-runtime shell state.
  -#ifdef   NOTYET
   struct ShellRuntime
   {
   ShellRuntime();
  @@ -996,7 +992,6 @@
   bool quitting;
   bool gotError;
   };
  -#endif
   
   // Shell state set once at startup.
   static bool enableCodeCoverage = false;
  @@ -1119,7 +1114,6 @@
   } // extern "C"
   #endif
   
  -#ifdef   NOTYET
   ShellRuntime::ShellRuntime()
 : isWorker(false),
   timeoutInterval(-1.0),
  @@ -1135,9 +1129,7 @@
   quitting(false),
   gotError(false)
   {}
  -#endif
   
  -#ifdef   NOTYET
   static ShellRuntime*
   GetShellRuntime(JSRuntime *rt)
   {
  @@ -1145,7 +1137,6 @@
   MOZ_ASSERT(sr);
   return sr;
   }
  -#endif
   
   #ifdef   NOTYET
   static ShellRuntime*
  @@ -3801,9 +3792,7 @@
   }
   #endif
   
  -#ifdef  NOTYET
   Vector<PRThread*, 0, SystemAllocPolicy> workerThreads;
  -#endif
   
   #ifdef  NOTYET
   static bool
  @@ -3925,7 +3914,6 @@
   }
   #endif
   
  -#ifdef   NOTYET
   static bool
   InitWatchdog(JSRuntime* rt)
   {
  @@ -3944,9 +3932,7 @@

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjss.inp

2017-07-02 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   02-Jul-2017 15:59:58
  Branch: rpm-5_4  Handle: 2017070213595700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjss.inp

  Log:
- orphan.

  Summary:
RevisionChanges Path
1.1.2.6 +49 -49 rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjss.inp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjss.inp
  --- rpm/rpmio/rpmjss.inp  2 Jul 2017 12:34:29 -   1.1.2.5
  +++ rpm/rpmio/rpmjss.inp  2 Jul 2017 13:59:57 -   1.1.2.6
  @@ -14,7 +14,7 @@
   load("js/hello.js")
   loadRelativeToScript("js/hello.js")
   //evaluate("evaluate")
  -run("js/hello.js")
  +//run("js/hello.js")
   //var foo = readline()
   print("foo")
   var foo = "bar"
  @@ -23,58 +23,58 @@
   var foo = "printErr"; printErr(foo)
   var foo = "putstr"; putstr(foo)
   dateNow()
  -//help
  +//help()
   var foo = 0; assertEq(foo, foo)
  -//startTimingMutator
  -//stopTimingMutator
  +//startTimingMutator()
  +//stopTimingMutator()
   throwError
  -//disassemble
  -//dis
  -//disfile
  -//dissrc
  -//notes
  -//stackDump
  -//intern
  -//getslx
  -//evalcx
  -//evalInWorker
  -//getSharedArrayBuffer
  -//setSharedArrayBuffer
  -//shapeOf
  -//arrayInfo
  -//sleep
  -//compile
  -//parseModule
  -//setModuleResolveHook
  -//getModuleLoadPath
  -//parse
  -//syntaxParse
  -//offThreadCompileScript
  -//runOffThreadScript
  -//timeout
  -//interruptIf
  -//invokeInterruptCallback
  -//setInterruptCallback
  -//enableLastWarnong
  -//disableLastWarnong
  -//clearLastWarnong
  -//elapsed
  -//decompileFunction
  -//decompileThis
  -//thisFilename
  -//newGlobal
  -//nukeCCW
  +//disassemble()
  +//dis()
  +//disfile()
  +//dissrc()
  +//notes()
  +stackDump()
  +intern("intern")
  +//getslx()
  +//evalcx()
  +//evalInWorker()
  +//getSharedArrayBuffer()
  +//setSharedArrayBuffer()
  +//shapeOf()
  +//arrayInfo()
  +//sleep()
  +//compile()
  +//parseModule()
  +//setModuleResolveHook()
  +//getModuleLoadPath()
  +//parse()
  +//syntaxParse()
  +//offThreadCompileScript()
  +//runOffThreadScript()
  +//timeout()
  +//interruptIf()
  +//invokeInterruptCallback()
  +//setInterruptCallback()
  +//enableLastWarnong()
  +//disableLastWarnong()
  +//clearLastWarnong()
  +elapsed()
  +//decompileFunction()
  +//decompileThis()
  +//thisFilename()
  +//newGlobal()
  +//nukeCCW()
   createMappedArrayBuffer("js/createMappedArrayBuffer")
  -//getMaxArgs
  -//objectEmulatingUndefined
  +getMaxArgs()
  +objectEmulatingUndefined()
   isCachingEnabled()
  -//setCachingEnabled
  +//setCachingEnabled()
   cacheEntry("cacheEntry")
  -//printProfilerEvents
  -//enableSingleStepProfiling
  -//disableSingleStepProfiling
  +//printProfilerEvents()
  +//enableSingleStepProfiling()
  +//disableSingleStepProfiling()
   isLatin1("isLatin1")
  -//stackPointerInfo
  -//entryPoints
  -//require
  +stackPointerInfo()
  +//entryPoints()
  +//require()
   quit
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp

2017-07-02 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   02-Jul-2017 15:58:09
  Branch: rpm-5_4  Handle: 2017070213580900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp

  Log:
- rpmjs45: WIP.

  Summary:
RevisionChanges Path
1.1.2.15+115 -124   rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.14 -r1.1.2.15 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 2 Jul 2017 12:34:29 -   1.1.2.14
  +++ rpm/rpmio/rpmjs45.cpp 2 Jul 2017 13:58:09 -   1.1.2.15
  @@ -25,6 +25,8 @@
   
   #include "jswrapper.h"
   
  +#include "vm/TypedArrayObject.h"
  +
   using namespace JS;
   using namespace js;
   #ifdef   NOTYET
  @@ -61,6 +63,51 @@
   };
   
   /*==*/
  +static void
  +rpmjssReportError(JSContext *cx, const char *message, JSErrorReport *report)
  +{
  +fprintf(stderr, "%s:%u:%s\n",
  + report->filename ? report->filename : "",
  + (unsigned int) report->lineno, message);
  +}
  +
  +static void
  +rpmjssOOMCallback(JSContext* cx, void* data)
  +{
  +#ifdef   NOTYET
  +// If a script is running, the engine is about to throw the string "out 
of
  +// memory", which may or may not be caught. Otherwise the engine will 
just
  +// unwind and return null/false, with no exception set.
  +if (!JS_IsRunning(cx))
  +GetShellRuntime(cx)->gotError = true;
  +#endif
  +}
  +
  +enum JSShellErrNum {
  +#define MSG_DEF(name, count, exception, format) \
  +name,
  +#include "jsshell.msg"
  +#undef MSG_DEF
  +JSShellErr_Limit
  +};
  +
  +static const JSErrorFormatString jsShell_ErrorFormatString[JSShellErr_Limit] 
= {
  +#define MSG_DEF(name, count, exception, format) \
  +{ format, count, JSEXN_ERR } ,
  +#include "jsshell.msg"
  +#undef MSG_DEF
  +};
  +
  +const JSErrorFormatString*
  +my_GetErrorMessage(void* userRef, const unsigned errorNumber)
  +{
  +if (errorNumber == 0 || errorNumber >= JSShellErr_Limit)
  +return nullptr;
  +
  +return _ErrorFormatString[errorNumber];
  +}
  +
  +/*==*/
   enum PathResolutionMode {/* XXX shell/OSObject.h */
   RootRelative,
   ScriptRelative
  @@ -161,7 +208,6 @@
* command line.) Otherwise, it will be relative to the current working
* directory.
*/
  -#ifndef  NOTYET
   JSString*
   ResolvePath(JSContext* cx, HandleString filenameStr, PathResolutionMode 
resolveMode)
   {
  @@ -211,9 +257,7 @@
   
   return JS_NewStringCopyZ(cx, buffer);
   }
  -#endif
   
  -#ifdef   NOTYET
   static JSObject*
   FileAsTypedArray(JSContext* cx, const char* pathname)
   {
  @@ -270,11 +314,10 @@
   }
   }
   #if !defined(FIXME)
  -if (file) (void) fclose(file);
  +if (file && fileno(file) > 2) (void) fclose(file);
   #endif
   return obj;
   }
  -#endif
   
   #ifdef   NOTYET
   static bool
  @@ -283,18 +326,14 @@
   CallArgs args = CallArgsFromVp(argc, vp);
   
   if (args.length() < 1 || args.length() > 2) {
  -#ifdef   FIXME
   JS_ReportErrorNumber(cx, js::shell::my_GetErrorMessage, nullptr,
args.length() < 1 ? JSSMSG_NOT_ENOUGH_ARGS : 
JSSMSG_TOO_MANY_ARGS,
"snarf");
  -#endif
   return false;
   }
   
   if (!args[0].isString() || (args.length() == 2 && !args[1].isString())) {
  -#ifdef   FIXME
   JS_ReportErrorNumber(cx, js::shell::my_GetErrorMessage, nullptr, 
JSSMSG_INVALID_ARGS, "snarf");
  -#endif
   return false;
   }
   
  @@ -346,7 +385,6 @@
   }
   #endif
   
  -#ifdef   NOTYET
   static bool
   osfile_writeTypedArrayToFile(JSContext* cx, unsigned argc, Value* vp)
   {
  @@ -376,7 +414,9 @@
   JS_ReportError(cx, "can't open %s: %s", filename.ptr(), 
strerror(errno));
   return false;
   }
  +#ifdef   FIXME
   AutoCloseFile autoClose(file);
  +#endif
   
   TypedArrayObject* obj = [1].toObject().as();
   
  @@ -385,22 +425,33 @@
   //
   // See further comments in FileAsTypedArray, above.
   JS_ReportError(cx, "can't write %s: shared memory buffer", 
filename.ptr());
  +#if !defined(FIXME)
  +if (file && fileno(f

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs45.cpp rpmjss.inp

2017-07-02 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   02-Jul-2017 14:34:30
  Branch: rpm-5_4  Handle: 2017070212342900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs45.cpp rpmjss.inp

  Log:
- r[pmjs45: WIP.

  Summary:
RevisionChanges Path
1.293.2.103 +1  -1  rpm/rpmio/Makefile.am
1.1.2.14+4263 -183  rpm/rpmio/rpmjs45.cpp
1.1.2.5 +64 -2  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.102 -r1.293.2.103 Makefile.am
  --- rpm/rpmio/Makefile.am 28 Jun 2017 09:54:15 -  1.293.2.102
  +++ rpm/rpmio/Makefile.am 2 Jul 2017 12:34:29 -   1.293.2.103
  @@ -575,7 +575,7 @@
   rpmjs38_LDADD = -L/usr/lib64 -lmozjs-38 $(RPMIO_LDADD_COMMON)
   
   rpmjs45_SOURCES = rpmjs45.cpp
  -rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -I/F/mozjs45/firefox-45.9.0esr/js/src -fPIC 
-DRPMJSS_SELF_TEST
  +rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -I./js45/src/shell -I./js45/src -DXP_UNIX -fPIC 
-DRPMJSS_SELF_TEST
   rpmjs45_LDADD = -L/usr/lib64 -lmozjs-45 $(RPMIO_LDADD_COMMON)
   
   mozjs:   rpmjs185 rpmjs17 rpmjs24 rpmjs31 rpmjs38 rpmjs45
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.13 -r1.1.2.14 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 1 Jul 2017 04:00:07 -   1.1.2.13
  +++ rpm/rpmio/rpmjs45.cpp 2 Jul 2017 12:34:29 -   1.1.2.14
  @@ -46,84 +46,6 @@
   
   #include "debug.h"
   
  -/*==*/
  -typedef struct JSI_s * JSI_t;
  -struct JSI_s {
  -JSRuntime*rt;
  -JSContext*cx;
  -JSObject *global;
  -};
  -
  -// Shell state set once at startup.
  -static bool enableCodeCoverage = false;
  -static bool enableDisassemblyDumps = false;
  -static bool offthreadCompilation = false;
  -static bool enableBaseline = false;
  -static bool enableIon = false;
  -static bool enableAsmJS = false;
  -static bool enableNativeRegExp = false;
  -static bool enableUnboxedArrays = false;
  -#ifdef JS_GC_ZEAL
  -static char gZealStr[128];
  -#endif
  -static bool printTiming = false;
  -static const char* jsCacheDir = nullptr;
  -static const char* jsCacheAsmJSPath = nullptr;
  -static bool reportWarnings = true;
  -static bool compileOnly = false;
  -static bool fuzzingSafe = false;
  -static bool disableOOMFunctions = false;
  -static const char* moduleLoadPath = ".";
  -
  -#ifdef DEBUG
  -static bool dumpEntrainedVariables = false;
  -static bool OOM_printAllocationCount = false;
  -#endif
  -
  -/*==*/
  -static bool
  -global_enumerate(JSContext* cx, HandleObject obj)
  -{
  -#ifdef LAZY_STANDARD_CLASSES
  -return JS_EnumerateStandardClasses(cx, obj);
  -#else
  -return true;
  -#endif
  -}
  -
  -static bool
  -global_resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolvedp)
  -{
  -#ifdef LAZY_STANDARD_CLASSES
  -if (!JS_ResolveStandardClass(cx, obj, id, resolvedp))
  -return false;
  -#endif
  -return true;
  -}
  -
  -static bool
  -global_mayResolve(const JSAtomState& names, jsid id, JSObject* maybeObj)
  -{
  -return JS_MayResolveStandardClass(names, id, maybeObj);
  -}
  -
  -static JSClass global_class = {
  -"global",
  -JSCLASS_GLOBAL_FLAGS,
  -nullptr,
  -nullptr,
  -nullptr,
  -nullptr,
  -global_enumerate,
  -global_resolve,
  -global_mayResolve,
  -nullptr,
  -nullptr,
  -nullptr,
  -nullptr,
  -JS_GlobalObjectTraceHook
  -};
  -
   static int rpmjss_nopens;
   
   static int _rpmjss45_debug;
  @@ -131,51 +53,13 @@
   if (_rpmjss45_debug) \
fprintf(stderr, _fmt, __VA_ARGS__)
   
  -/*==*/
  -static void
  -rpmjssReportError(JSContext *cx, const char *message, JSErrorReport *report)
  -{
  -fprintf(stderr, "%s:%u:%s\n",
  - report->filename ? report->filename : "",
  - (unsigned int) report->lineno, message);
  -}
  -
  -static void
  -rpmjssOOMCallback(JSContext* cx, void* data)
  -{
  -#ifdef   NOTYET
  -// If a script is running, the engine is about to throw the string "

[CVS] RPM: rpm-5_4: rpm/tests/ thkp.c

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:46:08
  Branch: rpm-5_4  Handle: 2017070104460800

  Modified files:   (Branch: rpm-5_4)
rpm/tests   thkp.c

  Log:
- argv: add 3rd argument to controll trimming input.

  Summary:
RevisionChanges Path
1.1.4.9 +1  -1  rpm/tests/thkp.c
  

  patch -p0 <<'@@ .'
  Index: rpm/tests/thkp.c
  
  $ cvs diff -u -r1.1.4.8 -r1.1.4.9 thkp.c
  --- rpm/tests/thkp.c  16 Feb 2015 21:45:17 -  1.1.4.8
  +++ rpm/tests/thkp.c  1 Jul 2017 04:46:08 -   1.1.4.9
  @@ -173,7 +173,7 @@
if (gotstdin)
continue;
gotstdin++;
  - if (argvFgets(, NULL))
  + if (argvFgets(, NULL, 0))
goto exit;
}
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/macros/ macros.rpmbuild.in mandri...

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:35:47
  Branch: rpm-5_4  Handle: 2017070104354700

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES
rpm/macros  macros.rpmbuild.in mandriva.in

  Log:
- macros: update %efi (http://rpm5.org/community/rpm-devel/5699.html).

  Summary:
RevisionChanges Path
1.3501.2.581+1  -0  rpm/CHANGES
1.4.4.21+5  -4  rpm/macros/macros.rpmbuild.in
1.7.2.24+6  -10 rpm/macros/mandriva.in
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.580 -r1.3501.2.581 CHANGES
  --- rpm/CHANGES   1 Jul 2017 04:32:20 -   1.3501.2.580
  +++ rpm/CHANGES   1 Jul 2017 04:35:47 -   1.3501.2.581
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: macros: update %efi 
(http://rpm5.org/community/rpm-devel/5699.html)/
   - jbj: scripts: honor COMPRESS envvar (if set) 
(http://rpm5.org/community/rpm-devel/5698.html)
   - jbj: scripts: get rid of unused 
(http://rpm5.org/community/rpm-devel/5697.html)
   - jbj: argv: attempt input trimming in argvFgets (if requested).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.rpmbuild.in
  
  $ cvs diff -u -r1.4.4.20 -r1.4.4.21 macros.rpmbuild.in
  --- rpm/macros/macros.rpmbuild.in 17 Sep 2014 03:00:52 -  1.4.4.20
  +++ rpm/macros/macros.rpmbuild.in 1 Jul 2017 04:35:47 -   1.4.4.21
  @@ -1,7 +1,7 @@
   #/*! \page build_macros Default configuration: @USRLIBRPM@/macros.rpmbuild
   # \verbatim
   #
  -# $Id: macros.rpmbuild.in,v 1.4.4.20 2014/09/17 03:00:52 jbj Exp $
  +# $Id: macros.rpmbuild.in,v 1.4.4.21 2017/07/01 04:35:47 jbj Exp $
   #
   # This file contains rpmbuild configuration macros.
   #
  @@ -669,9 +669,6 @@
   #
   %ix86   i386 i486 i586 i686 pentium3 pentium4 athlon
   
  -# arch macro for all EFI-compatible architectures
  -%efi %{ix86} x86_64 ia64
  -
   # same thing for arm
   %armarm armv3 armv3l armv3b armv4 armv4l armv4b armv5 armv5l armv5b 
armv5te armv5tel armv5teb xscale armv6 armv6l armv7l armv7hl armv7lh armv7hln 
armv7hnl armv7lhn armv7lnh armv7nhl armv7nlh
   
  @@ -692,6 +689,10 @@
   %mipsel mipsel mips2el mips3el mips4el loongson2e loongson2f octeonel
   
   %mipsx %mips %mipsel mips64 mips64el
  +
  +# arch macro for all EFI-compatible architectures
  +%efi %{ix86} x86_64 ia64 %{arm} aarch64
  +

   #
   # Use in %install to generate locale specific file lists. For example,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/mandriva.in
  
  $ cvs diff -u -r1.7.2.23 -r1.7.2.24 mandriva.in
  --- rpm/macros/mandriva.in20 Jul 2012 15:02:58 -  1.7.2.23
  +++ rpm/macros/mandriva.in1 Jul 2017 04:35:47 -   1.7.2.24
  @@ -1,7 +1,7 @@
  -%distributionMandriva Linux
  -%vendor  Mandriva
  -%bugurl  http://qa.mandriva.com
  -%disturl http://mandriva.org
  +%distributionOpenMandriva Lx
  +%vendor  OpenMandriva
  +%bugurl  http://issues.openmandriva.org/
  +%disturl http://openmandriva.org/
   
   # This macro will disable the transaction lock on /var/lib/rpm/__db.*.
   # This lock is of no use to us and will also result in errors when trying to
  @@ -32,11 +32,6 @@
   # mdvbz#64914
   %_rpmgio .ufdio
   
  -# This will die as soon as remaining usage has been phased out...
  -%mkrel(c:)   %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}
  -%manbo_mkrel()   %mkrel
  -%multiarch() %{1}
  -
   # This will enable the use of distepoch and disttag in stead of polluting
   # %release with such.
   %evr_tuple_select1234
  @@ -133,8 +128,9 @@
   %_enable_debug_packages 1
   
   
  -# Default extension to use (for info files)
  +# Default extension to use (for man & info files)
   %_extension .xz
  +%_compress xz -0f --text -T0
   
   
   # Macro: %{mklibname  [ []] [-s] [-d]}
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/scripts/ brp-compress

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:32:21
  Branch: rpm-5_4  Handle: 2017070104322000

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES
rpm/scripts brp-compress

  Log:
- scripts: honor COMPRESS envvar (if set)
(http://rpm5.org/community/rpm-devel/5698.html)

  Summary:
RevisionChanges Path
1.3501.2.580+1  -0  rpm/CHANGES
1.13.10.4   +2  -2  rpm/scripts/brp-compress
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.579 -r1.3501.2.580 CHANGES
  --- rpm/CHANGES   1 Jul 2017 04:25:13 -   1.3501.2.579
  +++ rpm/CHANGES   1 Jul 2017 04:32:20 -   1.3501.2.580
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: scripts: honor COMPRESS envvar (if set) 
(http://rpm5.org/community/rpm-devel/5698.html)
   - jbj: scripts: get rid of unused 
(http://rpm5.org/community/rpm-devel/5697.html)
   - jbj: argv: attempt input trimming in argvFgets (if requested).
   - jbj: rpmeio: stub in libeio wrapper(s).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-compress
  
  $ cvs diff -u -r1.13.10.3 -r1.13.10.4 brp-compress
  --- rpm/scripts/brp-compress  28 Mar 2016 22:02:51 -  1.13.10.3
  +++ rpm/scripts/brp-compress  1 Jul 2017 04:32:20 -   1.13.10.4
  @@ -8,8 +8,8 @@
   cd "$RPM_BUILD_ROOT"
   
   # Compress man pages
  -COMPRESS="gzip -9 -n"
  -COMPRESS_EXT=.gz
  +COMPRESS=${COMPRESS:-gzip -9 -n}
  +COMPRESS_EXT=${COMPRESS_EXT:-.gz}
   
   for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/scripts/ Makefile.am brp-java-gcj...

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:25:13
  Branch: rpm-5_4  Handle: 2601005436539062237

  Modified files:   (Branch: rpm-5_4)
rpm CHANGES
rpm/scripts Makefile.am
  Removed files:(Branch: rpm-5_4)
rpm/scripts brp-java-gcjcompile brp-sparc64-linux
check-multiarch-files mkmultiarch
multiarch-dispatch multiarch-dispatch.h
multiarch-platform

  Log:
- jbj: scripts: get rid of unused
(http://rpm5.org/community/rpm-devel/5697.html)

  Summary:
RevisionChanges Path
1.3501.2.579+1  -0  rpm/CHANGES
1.75.2.25   +4  -12 rpm/scripts/Makefile.am
1.3 +0  -41 rpm/scripts/brp-java-gcjcompile
1.2 +0  -41 rpm/scripts/brp-sparc64-linux
1.2 +0  -91 rpm/scripts/check-multiarch-files
1.1 +0  -91 rpm/scripts/mkmultiarch
1.1 +0  -31 rpm/scripts/multiarch-dispatch
1.1 +0  -172rpm/scripts/multiarch-dispatch.h
1.1 +0  -14 rpm/scripts/multiarch-platform
  

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3501.2.578 -r1.3501.2.579 CHANGES
  --- rpm/CHANGES   20 Jun 2017 07:39:06 -  1.3501.2.578
  +++ rpm/CHANGES   1 Jul 2017 04:25:13 -   1.3501.2.579
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +- jbj: scripts: get rid of unused 
(http://rpm5.org/community/rpm-devel/5697.html)
   - jbj: argv: attempt input trimming in argvFgets (if requested).
   - jbj: rpmeio: stub in libeio wrapper(s).
   - jbj: rpmev: stub in libev wrapper(s).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/Makefile.am
  
  $ cvs diff -u -r1.75.2.24 -r1.75.2.25 Makefile.am
  --- rpm/scripts/Makefile.am   18 Sep 2014 05:07:03 -  1.75.2.24
  +++ rpm/scripts/Makefile.am   1 Jul 2017 04:25:13 -   1.75.2.25
  @@ -6,9 +6,9 @@
makeshlibs
   
   EXTRA_DIST = api-sanity-autotest.pl api-sanity-checker.pl \
  - brp-compress brp-python-bytecompile brp-java-gcjcompile \
  + brp-compress brp-python-bytecompile \
brp-strip brp-strip-comment-note brp-nobuildrootpath \
  - brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
  + brp-strip-shared brp-strip-static-archive \
brp-implant-ident-static brp-java-repack-jars \
check-files cross-build dbconvert.sh \
deb_Packages deb_Sources \
  @@ -23,8 +23,6 @@
check-java-closure.sh java.prov.sh java.req.sh \
gstreamer.sh javadeps.sh libtooldeps.sh mgo \
mono-find-provides mono-find-requires \
  - check-multiarch-files multiarch-platform multiarch-dispatch \
  - multiarch-dispatch.h mkmultiarch gem_helper.rb \
URPM-Makefile.PL.in URPM-Makefile.am \
nix_meta \
osgideps.pl pkgconfigdeps.sh \
  @@ -48,16 +46,14 @@
   
   noinst_SCRIPTS =
   
  -noinst_SCRIPTS += multiarch-dispatch multiarch-platform
   bin_SCRIPTS = gendiff
   
   
  -noinst_SCRIPTS += check-multiarch-files mkmultiarch
   pkgdir = @USRLIBRPM@
   pkg_SCRIPTS = \
  - brp-compress brp-python-bytecompile brp-java-gcjcompile \
  + brp-compress brp-python-bytecompile \
brp-strip brp-strip-comment-note brp-nobuildrootpath \
  - brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
  + brp-strip-shared brp-strip-static-archive \
check-files cross-build dbconvert.sh executabledeps.sh \
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
find-provides.perl \
  @@ -95,9 +91,6 @@
   pkgconfigdir = $(libdir)/pkgconfig
   pkgconfig_DATA = rpm.pc
   
  -pkgincdir = $(includedir)
  -noinst_HEADERS = multiarch-dispatch.h
  -
   install-exec-hook:
   if WITH_PATH_VERSIONED
-for p in $(bin_SCRIPTS); do \
  @@ -112,4 +105,3 @@
   `echo "$(DESTDIR)$(pkgconfigdir)/$${p}" | sed 
's/\.\([^.]*\)$$/-$(VERSION).\1/'`; \
done
   endif
  -
  @@ .
  rm -f rpm/scripts/brp-java-gcjcompile <<'@@ .'
  Index: rpm/scripts/brp-java-gcjcompile
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f rpm/scripts/brp-sparc64-linux <<'@@ .'
  Index: rpm/scripts/brp-sparc64-linux
  

[CVS] RPM: rpm-5_4: rpm/lib/ tevr.c

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:04:25
  Branch: rpm-5_4  Handle: 2017070104042500

  Modified files:   (Branch: rpm-5_4)
rpm/lib tevr.c

  Log:
- argv: add 3rd arg to trim input.

  Summary:
RevisionChanges Path
2.5.4.5 +1  -1  rpm/lib/tevr.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/tevr.c
  
  $ cvs diff -u -r2.5.4.4 -r2.5.4.5 tevr.c
  --- rpm/lib/tevr.c16 May 2017 18:29:12 -  2.5.4.4
  +++ rpm/lib/tevr.c1 Jul 2017 04:04:25 -   2.5.4.5
  @@ -160,7 +160,7 @@
   
   if (ac == 0 || !strcmp(*av, "-")) {
av = NULL;
  - xx = argvFgets(, NULL);
  + xx = argvFgets(, NULL, 0);
ac = argvCount(av);
   }
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp

2017-06-30 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   01-Jul-2017 06:00:08
  Branch: rpm-5_4  Handle: 2017070104000700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp

  Log:
- rpmjs45: sanity.

  Summary:
RevisionChanges Path
1.1.2.13+1  -3  rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.12 -r1.1.2.13 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 28 Jun 2017 09:54:15 -  1.1.2.12
  +++ rpm/rpmio/rpmjs45.cpp 1 Jul 2017 04:00:07 -   1.1.2.13
  @@ -2846,8 +2846,6 @@
   JSContext* cx = I->cx;
   JSObject* global = I->global;
   
  -bool ok;
  -
   JS::RootedValue rval(cx);
   
   {// Scope for JSAutoCompartment
  @@ -2855,8 +2853,8 @@
   
JS::CompileOptions opts(cx);
opts.setFileAndLine(fn, ln);
  - ok = JS::Evaluate(cx, opts, script, strlen(script), );
   
  + bool ok = JS::Evaluate(cx, opts, script, strlen(script), );
if (!ok)
return 1;
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs45.cpp rpmjss.inp

2017-06-25 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   26-Jun-2017 00:46:55
  Branch: rpm-5_4  Handle: 2017062522465400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs45.cpp rpmjss.inp

  Log:
- rpmjss: WIP.

  Summary:
RevisionChanges Path
1.1.2.11+1245 -131  rpm/rpmio/rpmjs45.cpp
1.1.2.3 +3  -2  rpm/rpmio/rpmjss.inp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 25 Jun 2017 08:20:02 -  1.1.2.10
  +++ rpm/rpmio/rpmjs45.cpp 25 Jun 2017 22:46:54 -  1.1.2.11
  @@ -6,124 +6,991 @@
   
   #include "system.h"
   
  +#define  JS_CODEGEN_X64  1
  +
  +#include "mozilla/ArrayUtils.h" 
  +#include "mozilla/Atomics.h"
  +#include "mozilla/DebugOnly.h"
  +#include "mozilla/GuardObjects.h"
  +#include "mozilla/mozalloc.h"
  +#include "mozilla/PodOperations.h"
  +
   #include "jsapi.h"
   #include "jsprf.h"
   #include "js/Initialization.h"
   #include "js/Conversions.h"
   
  -#include "jsfriendapi.h"
  +#include "jsfriendapi.h"
  +
  +#include "jswrapper.h"
  +
  +using namespace JS;
  +using namespace js;
  +#ifdef   NOTYET
  +using namespace js::cli;
  +using namespace js::shell;
  +#endif
  +
  +using mozilla::ArrayLength;
  +using mozilla::Atomic;
  +using mozilla::MakeUnique;
  +using mozilla::Maybe;
  +using mozilla::NumberEqualsInt32;
  +using mozilla::PodCopy;
  +using mozilla::PodEqual;
  +using mozilla::UniquePtr;
  +
  +#define  _RPMJSS_INTERNAL
  +#include 
  +
  +#include "debug.h"
  +
  +/*==*/
  +typedef struct JSI_s * JSI_t;
  +struct JSI_s {
  +JSRuntime*rt;
  +JSContext*cx;
  +JSObject *global;
  +};
  +
  +// Shell state set once at startup.
  +static bool enableCodeCoverage = false;
  +static bool enableDisassemblyDumps = false;
  +static bool offthreadCompilation = false;
  +static bool enableBaseline = false;
  +static bool enableIon = false;
  +static bool enableAsmJS = false;
  +static bool enableNativeRegExp = false;
  +static bool enableUnboxedArrays = false;
  +#ifdef JS_GC_ZEAL
  +static char gZealStr[128];
  +#endif
  +static bool printTiming = false;
  +static const char* jsCacheDir = nullptr;
  +static const char* jsCacheAsmJSPath = nullptr;
  +static bool reportWarnings = true;
  +static bool compileOnly = false;
  +static bool fuzzingSafe = false;
  +static bool disableOOMFunctions = false;
  +static const char* moduleLoadPath = ".";
  +
  +#ifdef DEBUG
  +static bool dumpEntrainedVariables = false;
  +static bool OOM_printAllocationCount = false;
  +#endif
  +
  +/*==*/
  +static bool
  +global_enumerate(JSContext* cx, HandleObject obj)
  +{
  +#ifdef LAZY_STANDARD_CLASSES
  +return JS_EnumerateStandardClasses(cx, obj);
  +#else
  +return true;
  +#endif
  +}
  +
  +static bool
  +global_resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolvedp)
  +{
  +#ifdef LAZY_STANDARD_CLASSES
  +if (!JS_ResolveStandardClass(cx, obj, id, resolvedp))
  +return false;
  +#endif
  +return true;
  +}
  +
  +static bool
  +global_mayResolve(const JSAtomState& names, jsid id, JSObject* maybeObj)
  +{
  +return JS_MayResolveStandardClass(names, id, maybeObj);
  +}
  +
  +static JSClass global_class = {
  +"global",
  +JSCLASS_GLOBAL_FLAGS,
  +nullptr,
  +nullptr,
  +nullptr,
  +nullptr,
  +global_enumerate,
  +global_resolve,
  +global_mayResolve,
  +nullptr,
  +nullptr,
  +nullptr,
  +nullptr,
  +JS_GlobalObjectTraceHook
  +};
  +
  +static int rpmjss_nopens;
  +
  +static int _rpmjss45_debug;
  +#define SPEW(_fmt, ...) \
  +if (_rpmjss45_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +
  +/*==*/
  +static void
  +rpmjssReportError(JSContext *cx, const char *message, JSErrorReport *report)
  +{
  +fprintf(stderr, "%s:%u:%s\n",
  + report->filename ? report->filename : "",
  + (unsigned int) report->lineno, message);
  +}
  +
  +static void
  +rpmjssOOMCallback(JSContext* cx, void* data)
  +{
  +#ifdef   NOTYET
  +// If a scr

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs17.cpp rpmjs24.cpp rpmjs31.cpp rpm...

2017-06-25 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   26-Jun-2017 00:45:50
  Branch: rpm-5_4  Handle: 2017062522455000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs17.cpp rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp

  Log:
- rpmjss: ensure that gOutfile and gErrfile are set.

  Summary:
RevisionChanges Path
1.1.2.10+3  -2  rpm/rpmio/rpmjs17.cpp
1.1.2.11+3  -2  rpm/rpmio/rpmjs24.cpp
1.1.2.11+3  -2  rpm/rpmio/rpmjs31.cpp
1.1.2.11+3  -2  rpm/rpmio/rpmjs38.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.9 -r1.1.2.10 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 25 Jun 2017 08:20:01 -  1.1.2.9
  +++ rpm/rpmio/rpmjs17.cpp 25 Jun 2017 22:45:50 -  1.1.2.10
  @@ -69,8 +69,6 @@
   int gExitCode = 0;
   bool gQuitting = false;
   bool gGotError = false;
  -FILE *gErrFile = NULL;
  -FILE *gOutFile = NULL;
   
   static bool reportWarnings = true;
   static bool compileOnly = false;
  @@ -678,6 +676,7 @@
   static JSBool
   PutStr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   jsval *argv;
   JSString *str;
   char *bytes;
  @@ -743,12 +742,14 @@
   static JSBool
   Print(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   return PrintInternal(cx, argc, vp, gOutFile);
   }
   
   static JSBool
   PrintErr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gErrFile = stderr;
   return PrintInternal(cx, argc, vp, gErrFile);
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs24.cpp
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmjs24.cpp
  --- rpm/rpmio/rpmjs24.cpp 25 Jun 2017 08:20:01 -  1.1.2.10
  +++ rpm/rpmio/rpmjs24.cpp 25 Jun 2017 22:45:50 -  1.1.2.11
  @@ -74,8 +74,6 @@
   int gExitCode = 0;
   bool gQuitting = false;
   bool gGotError = false;
  -FILE *gErrFile = NULL;
  -FILE *gOutFile = NULL;
   
   static bool reportWarnings = true;
   static bool compileOnly = false;
  @@ -1087,6 +1085,7 @@
   static JSBool
   PutStr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   CallArgs args = CallArgsFromVp(argc, vp);
   
   if (args.length() != 0) {
  @@ -1155,6 +1154,7 @@
   static JSBool
   Print(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   CallArgs args = CallArgsFromVp(argc, vp);
   return PrintInternal(cx, args, gOutFile);
   }
  @@ -1162,6 +1162,7 @@
   static JSBool
   PrintErr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gErrFile = stderr;
   CallArgs args = CallArgsFromVp(argc, vp);
   return PrintInternal(cx, args, gErrFile);
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs31.cpp
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmjs31.cpp
  --- rpm/rpmio/rpmjs31.cpp 25 Jun 2017 08:20:02 -  1.1.2.10
  +++ rpm/rpmio/rpmjs31.cpp 25 Jun 2017 22:45:50 -  1.1.2.11
  @@ -63,8 +63,6 @@
   static int gExitCode = 0;
   static bool gQuitting = false;
   static bool gGotError = false;
  -static FILE *gErrFile = nullptr;
  -static FILE *gOutFile = nullptr;
   
   static bool reportWarnings = true;
   static bool compileOnly = false;
  @@ -,6 +1109,7 @@
   static bool
   PutStr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   CallArgs args = CallArgsFromVp(argc, vp);
   
   if (args.length() != 0) {
  @@ -1176,6 +1175,7 @@
   static bool
   Print(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gOutFile = stdout;
   CallArgs args = CallArgsFromVp(argc, vp);
   return PrintInternal(cx, args, gOutFile);
   }
  @@ -1183,6 +1183,7 @@
   static bool
   PrintErr(JSContext *cx, unsigned argc, jsval *vp)
   {
  +FILE *gErrFile = stderr;
   CallArgs args = CallArgsFromVp(argc, vp);
   return PrintInternal(cx, args, gErrFile);
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs38.cpp
  
  $ cvs diff -u -r1.1.2.10 -r1.1.2.11 rpmjs38.cpp
  --- rpm/rpmio/rpmjs38.cpp 25 Jun 2017 08:20:02 -  1.1.2.10
  +++ rpm/rpmio/rpmjs38.cpp 25 Jun 2017 22:45:50 -  1.1.2.11
  @@ -78,8 +78,6 @@
   static int gExitCode = 0;
   static bool gQuitting = false;
   static bool gGot

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rp...

2017-06-24 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   25-Jun-2017 01:46:21
  Branch: rpm-5_4  Handle: 2017062423462100

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rpmjs31.cpp
rpmjs38.cpp

  Log:
- rpmjss: make as similar as possible.

  Summary:
RevisionChanges Path
1.1.2.8 +17 -22 rpm/rpmio/rpmjs17.cpp
1.1.2.8 +1  -8  rpm/rpmio/rpmjs185.cpp
1.1.2.9 +46 -36 rpm/rpmio/rpmjs24.cpp
1.1.2.9 +43 -32 rpm/rpmio/rpmjs31.cpp
1.1.2.9 +37 -25 rpm/rpmio/rpmjs38.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.7 -r1.1.2.8 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 24 Jun 2017 20:32:04 -  1.1.2.7
  +++ rpm/rpmio/rpmjs17.cpp 24 Jun 2017 23:46:21 -  1.1.2.8
  @@ -28,9 +28,9 @@
   
   static int rpmjss_nopens;
   
  -static int _rpmjss17_debug;
  +int _rpmjss_debug;
   #define SPEW(_fmt, ...) \
  -if (_rpmjss17_debug) \
  +if (_rpmjss_debug) \
fprintf(stderr, _fmt, __VA_ARGS__)
   
   /*==*/
  @@ -465,13 +465,13 @@
   JS_SetVersion(I->cx, JSVERSION_LATEST);
   JS_SetErrorReporter(I->cx, rpmjssReportError);
   
  -JS::RootedObject global(I->cx,
  +JS::RootedObject glob(I->cx,
JS_NewGlobalObject(I->cx, _clasp, _principals));
  -I->global = global;
  +I->global = glob;
   assert(I->global);
   JS_SetGlobalObject(I->cx, I->global);
   
  -ok = JS_InitStandardClasses(I->cx, global);
  +ok = JS_InitStandardClasses(I->cx, I->global);
   assert(ok);
   #ifdef  JS_HAS_CTYPES
   ok = JS_InitCTypesClass(I->cx, I->global);
  @@ -489,17 +489,12 @@
   {
   JSI_t I = (JSI_t) jss->I;
   
  -JSBool ok;
  -
  -// In practice, you would want to exit this any
  -// time you're spinning the event loop
  -JSAutoRequest ar(I->cx);
  -
  +JS::RootedObject glob(I->cx, I->global);
   JS::RootedValue rval(I->cx);
   {// Scope for JSAutoCompartment
  - JSAutoCompartment ac(I->cx, I->global);
  + JSAutoCompartment ac(I->cx, glob);
   
  - ok = JS_EvaluateScript(I->cx, I->global,
  + JSBool ok = JS_EvaluateScript(I->cx, glob,
script, strlen(script), fn, ln,
rval.address());
if (!ok)
  @@ -510,29 +505,29 @@
   size_t nb = sizeof(b);
   char * t = NULL;
   
  -if (JSVAL_IS_NULL(rval)) {
  +if (rval.isNull()) {
t = xstrdup("");
   } else
  -if (JSVAL_IS_VOID(rval)) {
  +if (rval.isUndefined()) {
t = xstrdup("");
   } else
  -if (JSVAL_IS_BOOLEAN(rval)) {
  +if (rval.isBoolean()) {
snprintf(b, nb, "%c", (rval.toBoolean() ? 'T' : 'F'));
t = xstrdup(b);
   } else
  -if (JSVAL_IS_INT(rval)) {/* int32_t */
  +if (rval.isInt32()) {
snprintf(b, nb, "%d", rval.toInt32());
t = xstrdup(b);
   } else
  -if (JSVAL_IS_DOUBLE(rval)) {
  +if (rval.isDouble()) {
snprintf(b, nb, "%.16g", rval.toDouble());
t = xstrdup(b);
   } else
  -if (JSVAL_IS_NUMBER(rval)) {
  +if (rval.isNumber()) {
snprintf(b, nb, "%.16g", rval.toNumber());
t = xstrdup(b);
   } else
  -if (JSVAL_IS_STRING(rval)) {
  +if (rval.isString()) {
t = JS_EncodeString(I->cx, rval.toString());
   } else
t = xstrdup("");
  @@ -545,8 +540,8 @@
   return 0;
   }
   
  -static struct JSIO_s _mozjs17 = { mozFini, mozInit, mozRun };
  -JSIO_t mozjs17 = &_mozjs17;
  +static struct JSIO_s _mozjs = { mozFini, mozInit, mozRun };
  +JSIO_t mozjs17 = &_mozjs;
   
   #if defined(RPMJSS_SELF_TEST)
   #include 
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs185.cpp
  
  $ cvs diff -u -r1.1.2.7 -r1.1.2.8 rpmjs185.cpp
  --- rpm/rpmio/rpmjs185.cpp24 Jun 2017 20:47:34 -  1.1.2.7
  +++ rpm/rpmio/rpmjs185.cpp24 Jun 2017 23:46:21 -  1.1.2.8
  @@ -471,13 +471,6 @@
   {
   JSI_t I = (JSI_t) jss->I;
   
  -JSClass * _clasp = (JSClass *)_class;
  -#ifdef   NOTYET
  -JSFunctionSpec * _functions = global_functions;
  -#endif
  -JSPrin

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs185.cpp

2017-06-24 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   24-Jun-2017 22:47:34
  Branch: rpm-5_4  Handle: 2017062420473400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs185.cpp

  Log:
- orphan.

  Summary:
RevisionChanges Path
1.293.2.100 +1  -1  rpm/rpmio/Makefile.am
1.1.2.7 +50 -6  rpm/rpmio/rpmjs185.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.99 -r1.293.2.100 Makefile.am
  --- rpm/rpmio/Makefile.am 24 Jun 2017 20:32:04 -  1.293.2.99
  +++ rpm/rpmio/Makefile.am 24 Jun 2017 20:47:34 -  1.293.2.100
  @@ -552,7 +552,7 @@
   
   rpmjs185_SOURCES = rpmjs185.cpp
   rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC 
-DRPMJSS_SELF_TEST
  -rpmjs185_LDADD = -L/usr/lib64 -ljs
  +rpmjs185_LDADD = -L/usr/lib64 -ljs $(RPMIO_LDADD_COMMON)
   
   rpmjs17_SOURCES = rpmjs17.cpp
   rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC -DRPMJSS_SELF_TEST
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs185.cpp
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 rpmjs185.cpp
  --- rpm/rpmio/rpmjs185.cpp24 Jun 2017 19:09:35 -  1.1.2.6
  +++ rpm/rpmio/rpmjs185.cpp24 Jun 2017 20:47:34 -  1.1.2.7
  @@ -493,8 +493,40 @@
if (!ok)
return 1;
   }
  -JSString *str = JS_ValueToString(I->cx, rval);
  -char * t = JS_EncodeString(I->cx, str);
  +
  +char b[128];
  +size_t nb = sizeof(b);
  +char * t = NULL;
  +
  +if (JSVAL_IS_NULL(rval)) {
  + t = xstrdup("");
  +} else
  +if (JSVAL_IS_VOID(rval)) {
  + t = xstrdup("");
  +} else
  +if (JSVAL_IS_BOOLEAN(rval)) {
  + snprintf(b, nb, "%c", (JSVAL_TO_BOOLEAN(rval) ? 'T' : 'F'));
  + t = xstrdup(b);
  +} else
  +if (JSVAL_IS_INT(rval)) {/* int32_t */
  + snprintf(b, nb, "%d", JSVAL_TO_INT(rval));
  + t = xstrdup(b);
  +} else
  +if (JSVAL_IS_DOUBLE(rval)) {
  + snprintf(b, nb, "%.16g", JSVAL_TO_DOUBLE(rval));
  + t = xstrdup(b);
  +} else
  +#ifdef   FIXME
  +if (JSVAL_IS_NUMBER(rval)) {
  + snprintf(b, nb, "%.16g", JSVAL_TO_NUMBER(rval));
  + t = xstrdup(b);
  +} else
  +#endif
  +if (JSVAL_IS_STRING(rval)) {
  + t = JS_EncodeString(I->cx, JSVAL_TO_STRING(rval));
  +} else
  + t = xstrdup("");
  +
   if (resultp)
*resultp = t;
   else
  @@ -507,6 +539,9 @@
   JSIO_t mozjs185 = &_mozjs185;
   
   #if defined(RPMJSS_SELF_TEST)
  +#include 
  +#include 
  +
   struct rpmjss_s _jss;
   rpmjss jss = &_jss;
   
  @@ -518,14 +553,23 @@
   JSI_t I = (JSI_t) mozInit(jss);
   jss->I = I;
   
  -{
  - const char *script = "'hello'+'world, it is '+new Date()";
  +const char * _fn = "rpmjss.inp";
  +FD_t fd = Fopen(_fn, "r.fpio");
  +ARGV_t av = NULL;
  +rc = argvFgets(, fd, 0);
  +rc = Fclose(fd);
  +int ac = argvCount(av);
  +
  +for (int i = 0; i < ac; i++) {
  + const char *script = av[i];
const char * result = NULL;
  - rc = mozRun(jss, , script, __FILE__, __LINE__);
  - fprintf(stderr, "<== result |%s|\n", result);
  + rc = mozRun(jss, , script, _fn, i);
  + fprintf(stderr, "<== result |%s| from |%s|\n", result, script);
result = _free(result);
   }
   
  +av = argvFree(av);
  +
   mozFini(jss);
   
   return rc;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rp...

2017-06-24 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   24-Jun-2017 21:09:35
  Branch: rpm-5_4  Handle: 2017062419093401

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rpmjs31.cpp
rpmjs38.cpp rpmjs45.cpp rpmjss.h

  Log:
- rpmjss: return the script result.

  Summary:
RevisionChanges Path
1.1.2.6 +11 -6  rpm/rpmio/rpmjs17.cpp
1.1.2.6 +11 -6  rpm/rpmio/rpmjs185.cpp
1.1.2.7 +11 -6  rpm/rpmio/rpmjs24.cpp
1.1.2.7 +11 -6  rpm/rpmio/rpmjs31.cpp
1.1.2.7 +11 -6  rpm/rpmio/rpmjs38.cpp
1.1.2.8 +1528 -16   rpm/rpmio/rpmjs45.cpp
1.1.2.2 +2  -1  rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 23 Jun 2017 06:51:22 -  1.1.2.5
  +++ rpm/rpmio/rpmjs17.cpp 24 Jun 2017 19:09:34 -  1.1.2.6
  @@ -484,8 +484,8 @@
   return I;
   }
   
  -static int mozRun(rpmjss jss,
  - const char * script, const char * filename, int lineno)
  +static int mozRun(rpmjss jss, const char ** resultp,
  + const char * script, const char * fn, unsigned ln)
   {
   JSI_t I = (JSI_t) jss->I;
   
  @@ -500,15 +500,17 @@
JSAutoCompartment ac(I->cx, I->global);
   
ok = JS_EvaluateScript(I->cx, I->global,
  - script, strlen(script), filename, lineno,
  + script, strlen(script), fn, ln,
rval.address());
if (!ok)
return 1;
   }
   JSString *str = rval.toString();
   char * t = JS_EncodeString(I->cx, str);
  -printf("%s\n", t);
  -t = _free(t);
  +if (resultp)
  + *resultp = t;
  +else
  + t = _free(t);
   
   return 0;
   }
  @@ -530,7 +532,10 @@
   
   {
const char *script = "'hello'+'world, it is '+new Date()";
  - rc = mozRun(jss, script, __FILE__, __LINE__);
  + const char * result = NULL;
  + rc = mozRun(jss, , script, __FILE__, __LINE__);
  + fprintf(stderr, "<== result |%s|\n", result);
  + result = _free(result);
   }
   
   mozFini(jss);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs185.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs185.cpp
  --- rpm/rpmio/rpmjs185.cpp23 Jun 2017 06:51:22 -  1.1.2.5
  +++ rpm/rpmio/rpmjs185.cpp24 Jun 2017 19:09:35 -  1.1.2.6
  @@ -466,8 +466,8 @@
   return I;
   }
   
  -static int mozRun(rpmjss jss,
  - const char * script, const char * filename, int lineno)
  +static int mozRun(rpmjss jss, const char ** resultp,
  + const char * script, const char * fn, unsigned ln)
   {
   JSI_t I = (JSI_t) jss->I;
   
  @@ -488,15 +488,17 @@
   #endif
   
ok = JS_EvaluateScript(I->cx, I->global,
  - script, strlen(script), filename, lineno,
  + script, strlen(script), fn, ln,
);
if (!ok)
return 1;
   }
   JSString *str = JS_ValueToString(I->cx, rval);
   char * t = JS_EncodeString(I->cx, str);
  -printf("%s\n", t);
  -t = _free(t);
  +if (resultp)
  + *resultp = t;
  +else
  + t = _free(t);
   
   return 0;
   }
  @@ -518,7 +520,10 @@
   
   {
const char *script = "'hello'+'world, it is '+new Date()";
  - rc = mozRun(jss, script, __FILE__, __LINE__);
  + const char * result = NULL;
  + rc = mozRun(jss, , script, __FILE__, __LINE__);
  + fprintf(stderr, "<== result |%s|\n", result);
  + result = _free(result);
   }
   
   mozFini(jss);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs24.cpp
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 rpmjs24.cpp
  --- rpm/rpmio/rpmjs24.cpp 23 Jun 2017 06:51:22 -  1.1.2.6
  +++ rpm/rpmio/rpmjs24.cpp 24 Jun 2017 19:09:35 -  1.1.2.7
  @@ -103,8 +103,8 @@
   return I;
   }
   
  -static int mozRun(rpmjss jss,
  - const char * script, const char * filename, int lineno)
  +static int mozRun(rpmjss jss, const char ** resultp,
  + const char * script, const char * fn, unsigned ln)
   {
 

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rp...

2017-06-23 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   23-Jun-2017 08:51:22
  Branch: rpm-5_4  Handle: 2017062306512200

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp rpmjs31.cpp
rpmjs38.cpp rpmjs45.cpp

  Log:
- rpmjss: fix: plug the JS_EncodeString() memory leak.

  Summary:
RevisionChanges Path
1.1.2.5 +3  -1  rpm/rpmio/rpmjs17.cpp
1.1.2.5 +3  -1  rpm/rpmio/rpmjs185.cpp
1.1.2.6 +3  -1  rpm/rpmio/rpmjs24.cpp
1.1.2.6 +3  -1  rpm/rpmio/rpmjs31.cpp
1.1.2.6 +3  -1  rpm/rpmio/rpmjs38.cpp
1.1.2.7 +3  -1  rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 23 Jun 2017 03:39:43 -  1.1.2.4
  +++ rpm/rpmio/rpmjs17.cpp 23 Jun 2017 06:51:22 -  1.1.2.5
  @@ -506,7 +506,9 @@
return 1;
   }
   JSString *str = rval.toString();
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs185.cpp
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 rpmjs185.cpp
  --- rpm/rpmio/rpmjs185.cpp23 Jun 2017 03:39:43 -  1.1.2.4
  +++ rpm/rpmio/rpmjs185.cpp23 Jun 2017 06:51:22 -  1.1.2.5
  @@ -494,7 +494,9 @@
return 1;
   }
   JSString *str = JS_ValueToString(I->cx, rval);
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs24.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs24.cpp
  --- rpm/rpmio/rpmjs24.cpp 23 Jun 2017 03:39:43 -  1.1.2.5
  +++ rpm/rpmio/rpmjs24.cpp 23 Jun 2017 06:51:22 -  1.1.2.6
  @@ -139,7 +139,9 @@
return 1;
   }
   JSString *str = rval.toString();
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs31.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs31.cpp
  --- rpm/rpmio/rpmjs31.cpp 23 Jun 2017 03:39:43 -  1.1.2.5
  +++ rpm/rpmio/rpmjs31.cpp 23 Jun 2017 06:51:22 -  1.1.2.6
  @@ -136,7 +136,9 @@
return 1;
   }
   JSString *str = rval.toString();
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs38.cpp
  
  $ cvs diff -u -r1.1.2.5 -r1.1.2.6 rpmjs38.cpp
  --- rpm/rpmio/rpmjs38.cpp 23 Jun 2017 03:39:43 -  1.1.2.5
  +++ rpm/rpmio/rpmjs38.cpp 23 Jun 2017 06:51:22 -  1.1.2.6
  @@ -136,7 +136,9 @@
return 1;
   }
   JSString *str = rval.toString();
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 23 Jun 2017 03:39:43 -  1.1.2.6
  +++ rpm/rpmio/rpmjs45.cpp 23 Jun 2017 06:51:22 -  1.1.2.7
  @@ -813,7 +813,9 @@
   }
   
   JSString *str = rval.toString();
  -printf("%s\n", JS_EncodeString(I->cx, str));
  +char * t = JS_EncodeString(I->cx, str);
  +printf("%s\n", t);
  +t = _free(t);
   
   return 0;
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs17.cpp rpmjs185.cpp rp...

2017-06-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   23-Jun-2017 05:39:44
  Branch: rpm-5_4  Handle: 2017062303394301

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmjss.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs17.cpp rpmjs185.cpp rpmjs24.cpp
rpmjs31.cpp rpmjs38.cpp rpmjs45.cpp

  Log:
- rpmjss: avoid "namesapce js" collision.

  Summary:
RevisionChanges Path
1.293.2.98  +7  -7  rpm/rpmio/Makefile.am
1.1.2.4 +419 -43rpm/rpmio/rpmjs17.cpp
1.1.2.4 +389 -32rpm/rpmio/rpmjs185.cpp
1.1.2.5 +38 -28 rpm/rpmio/rpmjs24.cpp
1.1.2.5 +33 -28 rpm/rpmio/rpmjs31.cpp
1.1.2.5 +33 -28 rpm/rpmio/rpmjs38.cpp
1.1.2.6 +679 -61rpm/rpmio/rpmjs45.cpp
1.1.2.1 +141 -0 rpm/rpmio/rpmjss.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.97 -r1.293.2.98 Makefile.am
  --- rpm/rpmio/Makefile.am 23 Jun 2017 00:43:55 -  1.293.2.97
  +++ rpm/rpmio/Makefile.am 23 Jun 2017 03:39:43 -  1.293.2.98
  @@ -551,27 +551,27 @@
   rpmgpg_LDADD = $(RPMIO_LDADD_COMMON)
   
   rpmjs185_SOURCES = rpmjs185.cpp
  -rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC 
-DRPMJS_SELF_TEST
  +rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC 
-DRPMJSS_SELF_TEST
   rpmjs185_LDADD = -L/usr/lib64 -ljs
   
   rpmjs17_SOURCES = rpmjs17.cpp
  -rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC -DRPMJS_SELF_TEST
  +rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC -DRPMJSS_SELF_TEST
   rpmjs17_LDADD = -L/usr/lib64 -lmozjs-17.0
   
   rpmjs24_SOURCES = rpmjs24.cpp
  -rpmjs24_CPPFLAGS = -include /usr/include/mozjs-24/js/RequiredDefines.h 
-I/usr/include/mozjs-24 -fPIC -DRPMJS_SELF_TEST
  +rpmjs24_CPPFLAGS = -include /usr/include/mozjs-24/js/RequiredDefines.h 
-I/usr/include/mozjs-24 -fPIC -DRPMJSS_SELF_TEST
   rpmjs24_LDADD = -L/usr/lib64 -lmozjs-24
   
   rpmjs31_SOURCES = rpmjs31.cpp
  -rpmjs31_CPPFLAGS = -include /usr/include/mozjs-31/js/RequiredDefines.h 
-I/usr/include/mozjs-31 -fPIC -DRPMJS_SELF_TEST
  +rpmjs31_CPPFLAGS = -include /usr/include/mozjs-31/js/RequiredDefines.h 
-I/usr/include/mozjs-31 -fPIC -DRPMJSS_SELF_TEST
   rpmjs31_LDADD = -L/usr/lib64 -lmozjs-31
   
   rpmjs38_SOURCES = rpmjs38.cpp
  -rpmjs38_CPPFLAGS = -include /usr/include/mozjs-38/js/RequiredDefines.h 
-I/usr/include/mozjs-38 -fPIC -DRPMJS_SELF_TEST
  +rpmjs38_CPPFLAGS = -include /usr/include/mozjs-38/js/RequiredDefines.h 
-I/usr/include/mozjs-38 -fPIC -DRPMJSS_SELF_TEST
   rpmjs38_LDADD = -L/usr/lib64 -lmozjs-38
   
   rpmjs45_SOURCES = rpmjs45.cpp
  -rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC -DRPMJS_SELF_TEST
  +rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC -DRPMJSS_SELF_TEST
   rpmjs45_LDADD = -L/usr/lib64 -lmozjs-45
   
   mozjs:   rpmjs185 rpmjs17 rpmjs24 rpmjs31 rpmjs38 rpmjs45
  @@ -582,7 +582,7 @@
-./rpmjs38
-./rpmjs45
   
  -mozjs45: rpmjs45
  +moz45:   rpmjs45
@-env ASAN_OPTIONS=detect_leaks=0 ./rpmjs45
   
   rpmpbzip2_SOURCES = rpmpbzip2.c
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 22 Jun 2017 17:35:24 -  1.1.2.3
  +++ rpm/rpmio/rpmjs17.cpp 23 Jun 2017 03:39:43 -  1.1.2.4
  @@ -2,14 +2,14 @@
   // #define __STDC_LIMIT_MACROS
   // #include 
   
  +#pragma GCC diagnostic ignored "-Winvalid-offsetof"
  +
   #include "system.h"
   
  -#define  js  jsns
   #include "jsapi.h"
  -#undef   js
   
  -#define  _RPMJS_INTERNAL
  -#include 
  +#define  _RPMJSS_INTERNAL
  +#include 
   
   #include "debug.h"
   
  @@ -26,8 +26,12 @@
   JS_ConvertStub,
   };
   
  -struct rpmjs_s _js;
  -rpmjs js = &_js;
  +static int rpmjss_nopens;
  +
  +static int _rpmjss17_debug;
  +#define SPEW(_fmt, ...) \
  +if (_rpmjss17_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /*==*/
   typedef struct JSI_s * JSI_t;
  @@ -38,7 +42,7 @@
   };
   
   static void
  -

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs45.cpp

2017-06-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   23-Jun-2017 02:43:56
  Branch: rpm-5_4  Handle: 2017062300435500

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs45.cpp

  Log:
- rpmjs45: muzzle GCC/ASAN.

  Summary:
RevisionChanges Path
1.293.2.97  +3  -0  rpm/rpmio/Makefile.am
1.1.2.5 +67 -7  rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.96 -r1.293.2.97 Makefile.am
  --- rpm/rpmio/Makefile.am 22 Jun 2017 17:35:24 -  1.293.2.96
  +++ rpm/rpmio/Makefile.am 23 Jun 2017 00:43:55 -  1.293.2.97
  @@ -582,6 +582,9 @@
-./rpmjs38
-./rpmjs45
   
  +mozjs45: rpmjs45
  + @-env ASAN_OPTIONS=detect_leaks=0 ./rpmjs45
  +
   rpmpbzip2_SOURCES = rpmpbzip2.c
   rpmpbzip2_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs45.cpp
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 rpmjs45.cpp
  --- rpm/rpmio/rpmjs45.cpp 22 Jun 2017 17:35:24 -  1.1.2.4
  +++ rpm/rpmio/rpmjs45.cpp 23 Jun 2017 00:43:55 -  1.1.2.5
  @@ -2,6 +2,8 @@
   // #define __STDC_LIMIT_MACROS
   // #include 
   
  +#pragma GCC diagnostic ignored "-Winvalid-offsetof"
  +
   #include "system.h"
   
   #define  js  jsns
  @@ -14,7 +16,35 @@
   
   #include "debug.h"
   
  -/* The class of the global object. */
  +/*==*/
  +#ifdef   NOTYET  /* XXX HandleObject and HandleId */
  +static bool
  +global_enumerate(JSContext* cx, HandleObject obj)
  +{
  +#ifdef LAZY_STANDARD_CLASSES
  +return JS_EnumerateStandardClasses(cx, obj);
  +#else
  +return true;
  +#endif
  +}
  +
  +static bool
  +global_resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolvedp)
  +{
  +#ifdef LAZY_STANDARD_CLASSES
  +if (!JS_ResolveStandardClass(cx, obj, id, resolvedp))
  +return false;
  +#endif
  +return true;
  +}
  +
  +static bool
  +global_mayResolve(const JSAtomState& names, jsid id, JSObject* maybeObj)
  +{
  +return JS_MayResolveStandardClass(names, id, maybeObj);
  +}
  +#endif   /* NOTYET */
  +
   static JSClass global_class = {
   "global",
   JSCLASS_GLOBAL_FLAGS,
  @@ -22,9 +52,15 @@
   nullptr,
   nullptr,
   nullptr,
  +#ifdef   NOTYET  /* XXX HandleObject and HandleId */
  +global_enumerate,
  +global_resolve,
  +global_mayResolve,
  +#else
   nullptr,
   nullptr,
   nullptr,
  +#endif
   nullptr,
   nullptr,
   nullptr,
  @@ -32,8 +68,12 @@
   JS_GlobalObjectTraceHook
   };
   
  -struct rpmjs_s _js;
  -rpmjs js = &_js;
  +static int rpmjs_nopens;
  +
  +static int _rpmjs45_debug;
  +#define SPEW(_fmt, ...) \
  +if (_rpmjs45_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
   
   /*==*/
   typedef struct JSI_s * JSI_t;
  @@ -52,8 +92,6 @@
   }
   
   /*==*/
  -static int rpmjs_nopens;
  -
   static void mozFini(rpmjs js)
   {
   JSI_t I = (JSI_t) js->I;
  @@ -80,6 +118,7 @@
   
   static uint32_t _maxbytes = 8L * 1024L * 1024L;
   static size_t _stackChunkSize = 8192;
  +bool ok;
   
   if (rpmjs_nopens++ == 0)
JS_Init();
  @@ -95,6 +134,22 @@
   assert(I->cx);
   JS_SetContextPrivate(I->cx, (void *)js);
   
  +#ifdef   NOTYET
  +JS_SetErrorReporter(I->cx, rpmjsReportError);
  +#endif
  +
  +#ifdef   HACK
  +#ifdef  JS_HAS_CTYPES
  +ok = JS_InitCTypesClass(I->cx, I->global);
  +assert(ok);
  +#endif
  + 
  +#ifdef   NOTYET
  +ok = JS_DefineFunctions(I->cx, I->global, _functions);
  +assert(ok);
  +#endif
  +#endif
  +
   return I;
   }
   
  @@ -118,14 +173,16 @@
JS_NewGlobalObject(I->cx, _clasp, _principals, 
JS::FireOnNewGlobalHook));
   if (!global)
return 1;
  +
   I->global = global;
   assert(I->global);
   
   JS::RootedValue rval(I->cx);
   
   {// Scope for JSAutoCompartment
  - JSAutoCompartment ac(I->cx, global);
  - JS_InitStandardClasses(I->cx, global);
  + JSAutoCompartment ac(I->cx, I->global);
  + ok = JS_InitStandardClasses(I->cx, global);
  +assert(ok)

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs.h rpmjs17.cpp rpmjs18...

2017-06-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jun-2017 19:35:24
  Branch: rpm-5_4  Handle: 2017062217352400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs.h rpmjs17.cpp rpmjs185.cpp
rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp rpmjs45.cpp

  Log:
- rpmjs: prepare for modularization.

  Summary:
RevisionChanges Path
1.293.2.96  +6  -6  rpm/rpmio/Makefile.am
1.10.2.4+2  -0  rpm/rpmio/rpmjs.h
1.1.2.3 +2  -0  rpm/rpmio/rpmjs17.cpp
1.1.2.3 +2  -0  rpm/rpmio/rpmjs185.cpp
1.1.2.4 +2  -0  rpm/rpmio/rpmjs24.cpp
1.1.2.4 +2  -0  rpm/rpmio/rpmjs31.cpp
1.1.2.4 +2  -0  rpm/rpmio/rpmjs38.cpp
1.1.2.4 +2  -0  rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.95 -r1.293.2.96 Makefile.am
  --- rpm/rpmio/Makefile.am 22 Jun 2017 17:25:47 -  1.293.2.95
  +++ rpm/rpmio/Makefile.am 22 Jun 2017 17:35:24 -  1.293.2.96
  @@ -551,27 +551,27 @@
   rpmgpg_LDADD = $(RPMIO_LDADD_COMMON)
   
   rpmjs185_SOURCES = rpmjs185.cpp
  -rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC
  +rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC 
-DRPMJS_SELF_TEST
   rpmjs185_LDADD = -L/usr/lib64 -ljs
   
   rpmjs17_SOURCES = rpmjs17.cpp
  -rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC
  +rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC -DRPMJS_SELF_TEST
   rpmjs17_LDADD = -L/usr/lib64 -lmozjs-17.0
   
   rpmjs24_SOURCES = rpmjs24.cpp
  -rpmjs24_CPPFLAGS = -include /usr/include/mozjs-24/js/RequiredDefines.h 
-I/usr/include/mozjs-24 -fPIC
  +rpmjs24_CPPFLAGS = -include /usr/include/mozjs-24/js/RequiredDefines.h 
-I/usr/include/mozjs-24 -fPIC -DRPMJS_SELF_TEST
   rpmjs24_LDADD = -L/usr/lib64 -lmozjs-24
   
   rpmjs31_SOURCES = rpmjs31.cpp
  -rpmjs31_CPPFLAGS = -include /usr/include/mozjs-31/js/RequiredDefines.h 
-I/usr/include/mozjs-31 -fPIC
  +rpmjs31_CPPFLAGS = -include /usr/include/mozjs-31/js/RequiredDefines.h 
-I/usr/include/mozjs-31 -fPIC -DRPMJS_SELF_TEST
   rpmjs31_LDADD = -L/usr/lib64 -lmozjs-31
   
   rpmjs38_SOURCES = rpmjs38.cpp
  -rpmjs38_CPPFLAGS = -include /usr/include/mozjs-38/js/RequiredDefines.h 
-I/usr/include/mozjs-38 -fPIC
  +rpmjs38_CPPFLAGS = -include /usr/include/mozjs-38/js/RequiredDefines.h 
-I/usr/include/mozjs-38 -fPIC -DRPMJS_SELF_TEST
   rpmjs38_LDADD = -L/usr/lib64 -lmozjs-38
   
   rpmjs45_SOURCES = rpmjs45.cpp
  -rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC
  +rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC -DRPMJS_SELF_TEST
   rpmjs45_LDADD = -L/usr/lib64 -lmozjs-45
   
   mozjs:   rpmjs185 rpmjs17 rpmjs24 rpmjs31 rpmjs38 rpmjs45
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs.h
  
  $ cvs diff -u -r1.10.2.3 -r1.10.2.4 rpmjs.h
  --- rpm/rpmio/rpmjs.h 22 Jun 2017 17:25:47 -  1.10.2.3
  +++ rpm/rpmio/rpmjs.h 22 Jun 2017 17:35:24 -  1.10.2.4
  @@ -57,6 +57,8 @@
   int  (*mozRun)   (rpmjs js, const char * script, const char * filename, 
int lineno);
   };
   
  +extern JSIO_t mozjs185;
  +extern JSIO_t mozjs17;
   extern JSIO_t mozjs24;
   extern JSIO_t mozjs31;
   extern JSIO_t mozjs38;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 22 Jun 2017 17:25:47 -  1.1.2.2
  +++ rpm/rpmio/rpmjs17.cpp 22 Jun 2017 17:35:24 -  1.1.2.3
  @@ -139,6 +139,7 @@
   static struct JSIO_s _mozjs17 = { mozFini, mozInit, mozRun };
   JSIO_t mozjs17 = &_mozjs17;
   
  +#if defined(RPMJS_SELF_TEST)
   /*==*/
   int main(int argc, const char *argv[])
   {
  @@ -158,3 +159,4 @@
   
   return rc;
   }
  +#endif   /* RPMJS_SELF_TEST */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs185.cpp
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmjs185.cpp
  --- rpm/rpmio/rpmjs185.cpp22 Jun 2017 17:25:47 -  1.1.2.2
  +++ rpm/rpmio/rpmjs185

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmjs.h rpmjs17.cpp rpmjs18...

2017-06-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jun-2017 19:25:47
  Branch: rpm-5_4  Handle: 2017062217254700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmjs.h rpmjs17.cpp rpmjs185.cpp
rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp rpmjs45.cpp

  Log:
- rpmjs: collect the whole set.

  Summary:
RevisionChanges Path
1.293.2.95  +13 -3  rpm/rpmio/Makefile.am
1.10.2.3+13 -0  rpm/rpmio/rpmjs.h
1.1.2.2 +156 -90rpm/rpmio/rpmjs17.cpp
1.1.2.2 +166 -94rpm/rpmio/rpmjs185.cpp
1.1.2.3 +52 -38 rpm/rpmio/rpmjs24.cpp
1.1.2.3 +55 -42 rpm/rpmio/rpmjs31.cpp
1.1.2.3 +51 -40 rpm/rpmio/rpmjs38.cpp
1.1.2.3 +54 -40 rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.94 -r1.293.2.95 Makefile.am
  --- rpm/rpmio/Makefile.am 21 Jun 2017 17:26:24 -  1.293.2.94
  +++ rpm/rpmio/Makefile.am 22 Jun 2017 17:25:47 -  1.293.2.95
  @@ -18,7 +18,7 @@
getdate.y html-parse.c html-parse.h libsqlio.c \
rpmcpio.c rpmcpio.h rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \
rpmjsio.msg rpmtar.c rpmtar.h \
  - rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp rpmjs45.cpp \
  + rpmjs185.cpp rpmjs17.cpp rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp 
rpmjs45.cpp \
tdir.c teio.c tfts.c tget.c tgfs.c tgit.c tglob.c thkp.c thtml.c \
tinv.c tkey.c tmire.c tmq.c tmqtt.c todbc.c tput.c tpython.c trpmio.c \
tsexp.c tsvn.c tsw.c lookup3.c duktape.c tjsmn.c tjson.c yajl.c \
  @@ -32,7 +32,7 @@
   EXTRA_PROGRAMS += bsdiff bspatch fanotify pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz rpmzstd \
  - rpmjs24 rpmjs31 rpmjs38 rpmjs45 \
  + rpmjs185 rpmjs17 rpmjs24 rpmjs31 rpmjs38 rpmjs45 \
tasn tbf tcap tder tdir teio tfts tget tglob thkp tmagic tmire \
tmount todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
dumpasn1 lookup3 trel twitter github tmicrojson
  @@ -550,6 +550,14 @@
   rpmgpg_SOURCES = rpmgpg.c
   rpmgpg_LDADD = $(RPMIO_LDADD_COMMON)
   
  +rpmjs185_SOURCES = rpmjs185.cpp
  +rpmjs185_CPPFLAGS = -DXP_UNIX=1 -DJS_THREADSAFE=1 -I/usr/include/js -fPIC
  +rpmjs185_LDADD = -L/usr/lib64 -ljs
  +
  +rpmjs17_SOURCES = rpmjs17.cpp
  +rpmjs17_CPPFLAGS = -include /usr/include/js-17.0/js/RequiredDefines.h 
-I/usr/include/js-17.0 -fPIC
  +rpmjs17_LDADD = -L/usr/lib64 -lmozjs-17.0
  +
   rpmjs24_SOURCES = rpmjs24.cpp
   rpmjs24_CPPFLAGS = -include /usr/include/mozjs-24/js/RequiredDefines.h 
-I/usr/include/mozjs-24 -fPIC
   rpmjs24_LDADD = -L/usr/lib64 -lmozjs-24
  @@ -566,7 +574,9 @@
   rpmjs45_CPPFLAGS = -include /usr/include/mozjs-45/js/RequiredDefines.h 
-I/usr/include/mozjs-45 -fPIC
   rpmjs45_LDADD = -L/usr/lib64 -lmozjs-45
   
  -mozjs:   rpmjs24 rpmjs31 rpmjs38 rpmjs45
  +mozjs:   rpmjs185 rpmjs17 rpmjs24 rpmjs31 rpmjs38 rpmjs45
  + -./rpmjs185
  + -./rpmjs17
-./rpmjs24
-./rpmjs31
-./rpmjs38
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs.h
  
  $ cvs diff -u -r1.10.2.2 -r1.10.2.3 rpmjs.h
  --- rpm/rpmio/rpmjs.h 17 May 2017 12:34:40 -  1.10.2.2
  +++ rpm/rpmio/rpmjs.h 22 Jun 2017 17:25:47 -  1.10.2.3
  @@ -50,9 +50,22 @@
   RPMJS_FLAGS_GLOBAL   = (1<<31),
   };
   
  +typedef  struct JSIO_s * JSIO_t;
  +struct JSIO_s {
  +void (*mozFini)  (rpmjs js);
  +void * (*mozInit)(rpmjs js);
  +int  (*mozRun)   (rpmjs js, const char * script, const char * filename, 
int lineno);
  +};
  +
  +extern JSIO_t mozjs24;
  +extern JSIO_t mozjs31;
  +extern JSIO_t mozjs38;
  +extern JSIO_t mozjs45;
  +
   struct rpmjs_s {
   struct rpmioItem_s _item;/*!< usage mutex and pool identifier. */
   uint32_t flags;  /*!< JSOPTION_FOO in 0x bits */
  +JSIO_t jsio;
   void * I;/*!< JS interpreter {rt, cx, globalObj} 
*/
   };
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs17.cpp
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmjs17.cpp
  --- rpm/rpmio/rpmjs17.cpp 22 Jun 2017 17:03:52 -  1.1.2.1
  +++ rpm/rpmio/rpmjs17.cpp 22 Jun 2017 17:25:47 -  1.1.2.2
  @@ -1,94 +1,160 @@
  -/* 
  - * This define 

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp rpm...

2017-06-22 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   22-Jun-2017 14:35:43
  Branch: rpm-5_4  Handle: 2017062212354300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmjs24.cpp rpmjs31.cpp rpmjs38.cpp rpmjs45.cpp

  Log:
- rpmjs: WIP.

  Summary:
RevisionChanges Path
1.1.2.2 +121 -37rpm/rpmio/rpmjs24.cpp
1.1.2.2 +118 -38rpm/rpmio/rpmjs31.cpp
1.1.2.2 +120 -40rpm/rpmio/rpmjs38.cpp
1.1.2.2 +120 -40rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs24.cpp
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmjs24.cpp
  --- rpm/rpmio/rpmjs24.cpp 21 Jun 2017 17:26:24 -  1.1.2.1
  +++ rpm/rpmio/rpmjs24.cpp 22 Jun 2017 12:35:43 -  1.1.2.2
  @@ -1,7 +1,17 @@
  -// following code might be needed in some case
  +// following code might be needed in some cases
   // #define __STDC_LIMIT_MACROS
   // #include 
  +
  +#include "system.h"
  +
  +#define  js  jsns
   #include "jsapi.h"
  +#undef   js
  +
  +#define  _RPMJS_INTERNAL
  +#include 
  +
  +#include "debug.h"
   
   /* The class of the global object. */
   static JSClass global_class = {
  @@ -16,46 +26,120 @@
   JS_ConvertStub,
   };
   
  +#define  JS_Init()
  +
  +struct rpmjs_s _js;
  +rpmjs js = &_js;
  +
  +/*==*/
  +typedef struct JSI_s * JSI_t;
  +struct JSI_s {
  +JSRuntime*rt;
  +JSContext*cx;
  +JSObject *global;
  +};
  +
  +static void
  +rpmjsReportError(JSContext *cx, const char *message, JSErrorReport *report)
  +{
  +fprintf(stderr, "%s:%u:%s\n",
  + report->filename ? report->filename : "",
  + (unsigned int) report->lineno, message);
  +}
  +
  +/*==*/
  +static int rpmjs_nopens;
  +
  +static void mozFini(rpmjs js)
  +{
  +JSI_t I = (JSI_t) js->I;
  +
  +if (I->cx)
  + JS_DestroyContext(I->cx);
  +I->cx = NULL;
  +
  +if (I->rt)
  + JS_DestroyRuntime(I->rt);
  +I->rt = NULL;
  +
  +if (--rpmjs_nopens <= 0)  {
  + JS_ShutDown();
  + rpmjs_nopens = 0; 
  +}   
  +free(I);
  +}
  +
  +static JSI_t mozInit(rpmjs js)
  +{   
  +JSI_t I = NULL;
  +uint32_t flags = js->flags;
  +
  +static uint32_t _maxbytes = 8L * 1024L * 1024L;
  +static size_t _stackChunkSize = 8192;
  +
  +if (rpmjs_nopens++ == 0)
  + JS_Init();
  +
  +I = (JSI_t) calloc(1, sizeof(*I));
  +assert(I);
  +
  +I->rt = JS_NewRuntime(_maxbytes, JS_USE_HELPER_THREADS);
  +assert(I->rt);
  +JS_SetRuntimePrivate(I->rt, (void *)js);
  +
  +I->cx = JS_NewContext(I->rt, _stackChunkSize);
  +assert(I->cx);
  +JS_SetContextPrivate(I->cx, (void *)js);
  +
  +return I;
  +}
  +
  +/*==*/
  +static void rpmjsFini(void * _js)
  +{   
  +rpmjs js = (rpmjs) _js;
  +
  +mozFini(js);
  +js->I = NULL;
  +}
  +
  +/*==*/
   int main(int argc, const char *argv[])
   {
  -JSRuntime *rt = JS_NewRuntime(8L * 1024 * 1024, JS_USE_HELPER_THREADS);
  -if (!rt)
  -return 1;
  -
  -JSContext *cx = JS_NewContext(rt, 8192);
  -if (!cx)
  -return 1;
  -
  -{ // Scope for our various stack objects (JSAutoRequest, RootedObject), 
so they all go
  -  // out of scope before we JS_DestroyContext.
  -
  -  JSAutoRequest ar(cx); // In practice, you would want to exit this any
  -// time you're spinning the event loop
  -
  -  JS::RootedObject global(cx, JS_NewGlobalObject(cx, _class, 
nullptr));
  -  if (!global)
  -  return 1;
  -
  -  JS::RootedValue rval(cx);
  -
  -  { // Scope for JSAutoCompartment
  -JSAutoCompartment ac(cx, global);
  -JS_InitStandardClasses(cx, global);
  -
  -const char *script = "'hello'+'world, it is '+new Date()";
  -const char *filename = "noname";
  -int lineno = 1;
  -bool ok = JS_EvaluateScript(cx, global, script, strlen(script), 
filename, lineno, rval.address());
  -if (!ok)
  -  return 1;
  -  }
  +JSI_t I = mozInit(js);
  +js->I = I;
   
  -  JSString *str = rval.toSt

  1   2   3   4   5   6   7   8   9   10   >